summaryrefslogtreecommitdiff
path: root/binfilter/bf_svx
diff options
context:
space:
mode:
Diffstat (limited to 'binfilter/bf_svx')
-rw-r--r--binfilter/bf_svx/source/dialog/imapdlg.hrc104
-rw-r--r--binfilter/bf_svx/source/dialog/impgrf.hrc38
-rw-r--r--binfilter/bf_svx/source/dialog/makefile.mk76
-rw-r--r--binfilter/bf_svx/source/dialog/rlrcitem.hxx55
-rw-r--r--binfilter/bf_svx/source/dialog/svx_dlgutil.cxx122
-rw-r--r--binfilter/bf_svx/source/dialog/svx_imapdlg.src367
-rw-r--r--binfilter/bf_svx/source/dialog/svx_impgrf.cxx88
-rw-r--r--binfilter/bf_svx/source/dialog/svx_impgrf.src123
-rw-r--r--binfilter/bf_svx/source/dialog/svx_lingu.src230
-rw-r--r--binfilter/bf_svx/source/dialog/svx_rulritem.cxx230
-rw-r--r--binfilter/bf_svx/source/dialog/svx_sdstring.src3957
-rw-r--r--binfilter/bf_svx/source/dialog/svx_txencbox.cxx40
-rw-r--r--binfilter/bf_svx/source/editeng/editattr.hxx420
-rw-r--r--binfilter/bf_svx/source/editeng/editdoc.hxx718
-rw-r--r--binfilter/bf_svx/source/editeng/editeng.hrc58
-rw-r--r--binfilter/bf_svx/source/editeng/editobj2.hxx268
-rw-r--r--binfilter/bf_svx/source/editeng/editsel.hxx79
-rw-r--r--binfilter/bf_svx/source/editeng/editstt2.hxx134
-rw-r--r--binfilter/bf_svx/source/editeng/editundo.hxx157
-rw-r--r--binfilter/bf_svx/source/editeng/eerdll2.hxx67
-rw-r--r--binfilter/bf_svx/source/editeng/impedit.hxx826
-rw-r--r--binfilter/bf_svx/source/editeng/makefile.mk85
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editattr.cxx452
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editdbg.cxx75
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editdoc.cxx1993
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editdoc2.cxx345
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editeng.cxx1357
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editeng.src454
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editobj.cxx1529
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editsel.cxx112
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editundo.cxx265
-rw-r--r--binfilter/bf_svx/source/editeng/svx_editview.cxx214
-rw-r--r--binfilter/bf_svx/source/editeng/svx_eerdll.cxx239
-rw-r--r--binfilter/bf_svx/source/editeng/svx_forbiddencharacterstable.cxx88
-rw-r--r--binfilter/bf_svx/source/editeng/svx_impedit.cxx259
-rw-r--r--binfilter/bf_svx/source/editeng/svx_impedit2.cxx2084
-rw-r--r--binfilter/bf_svx/source/editeng/svx_impedit3.cxx3113
-rw-r--r--binfilter/bf_svx/source/editeng/svx_impedit4.cxx533
-rw-r--r--binfilter/bf_svx/source/editeng/svx_impedit5.cxx566
-rw-r--r--binfilter/bf_svx/source/editeng/svx_svxacorr.cxx408
-rw-r--r--binfilter/bf_svx/source/editeng/svx_swafopt.cxx104
-rw-r--r--binfilter/bf_svx/source/editeng/svx_txtrange.cxx663
-rw-r--r--binfilter/bf_svx/source/editeng/svx_unolingu.cxx657
-rw-r--r--binfilter/bf_svx/source/engine3d/makefile.mk77
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_camera3d.cxx393
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_class3d.cxx103
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_cube3d.cxx336
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_deflt3d.cxx93
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_dlight3d.cxx190
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_e3dcmpt.cxx61
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_extrud3d.cxx700
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_float3d.cxx62
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_float3d.src110
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_label3d.cxx220
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx954
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_light3d.cxx317
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_obj3d.cxx2969
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_objfac3d.cxx143
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_plight3d.cxx133
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_pntobj3d.cxx174
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_poly3d.cxx1958
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_polygn3d.cxx426
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_polyob3d.cxx666
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_polysc3d.cxx135
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_scene3d.cxx1447
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_sphere3d.cxx703
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_svx3ditems.cxx531
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_view3d.cxx249
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_viewpt3d.cxx565
-rw-r--r--binfilter/bf_svx/source/engine3d/svx_volume3d.cxx152
-rw-r--r--binfilter/bf_svx/source/form/makefile.mk77
-rw-r--r--binfilter/bf_svx/source/form/svx_ParseContext.cxx134
-rw-r--r--binfilter/bf_svx/source/form/svx_filtnav.src185
-rw-r--r--binfilter/bf_svx/source/form/svx_fmdmod.cxx99
-rw-r--r--binfilter/bf_svx/source/form/svx_fmdpage.cxx126
-rw-r--r--binfilter/bf_svx/source/form/svx_fmexpl.src945
-rw-r--r--binfilter/bf_svx/source/form/svx_fmimplids.cxx37
-rw-r--r--binfilter/bf_svx/source/form/svx_fmmodel.cxx386
-rw-r--r--binfilter/bf_svx/source/form/svx_fmobj.cxx248
-rw-r--r--binfilter/bf_svx/source/form/svx_fmobjfac.cxx122
-rw-r--r--binfilter/bf_svx/source/form/svx_fmpage.cxx203
-rw-r--r--binfilter/bf_svx/source/form/svx_fmpgeimp.cxx310
-rw-r--r--binfilter/bf_svx/source/form/svx_fmprop.cxx53
-rw-r--r--binfilter/bf_svx/source/form/svx_fmsearch.src120
-rw-r--r--binfilter/bf_svx/source/form/svx_fmstring.src352
-rw-r--r--binfilter/bf_svx/source/form/svx_fmtools.cxx73
-rw-r--r--binfilter/bf_svx/source/form/svx_siimport.cxx159
-rw-r--r--binfilter/bf_svx/source/form/svx_taborder.src238
-rw-r--r--binfilter/bf_svx/source/form/svx_tbxform.src574
-rw-r--r--binfilter/bf_svx/source/inc/AccessibleStringWrap.hxx65
-rw-r--r--binfilter/bf_svx/source/inc/XPropertyTable.hxx49
-rw-r--r--binfilter/bf_svx/source/inc/dbtoolsclient.hxx145
-rw-r--r--binfilter/bf_svx/source/inc/filtnav.hxx102
-rw-r--r--binfilter/bf_svx/source/inc/fmPropBrw.hxx52
-rw-r--r--binfilter/bf_svx/source/inc/fmcontr.hxx254
-rw-r--r--binfilter/bf_svx/source/inc/fmctrler.hxx405
-rw-r--r--binfilter/bf_svx/source/inc/fmexch.hxx123
-rw-r--r--binfilter/bf_svx/source/inc/fmexpl.hrc40
-rw-r--r--binfilter/bf_svx/source/inc/fmexpl.hxx131
-rw-r--r--binfilter/bf_svx/source/inc/fmgroup.hxx120
-rw-r--r--binfilter/bf_svx/source/inc/fmimplids.hxx41
-rw-r--r--binfilter/bf_svx/source/inc/fmobj.hxx103
-rw-r--r--binfilter/bf_svx/source/inc/fmpgeimp.hxx126
-rw-r--r--binfilter/bf_svx/source/inc/fmprop.hrc372
-rw-r--r--binfilter/bf_svx/source/inc/fmresids.hrc147
-rw-r--r--binfilter/bf_svx/source/inc/fmsearch.hrc69
-rw-r--r--binfilter/bf_svx/source/inc/fmservs.hxx104
-rw-r--r--binfilter/bf_svx/source/inc/fmshimp.hxx178
-rw-r--r--binfilter/bf_svx/source/inc/fmstatic.hxx82
-rw-r--r--binfilter/bf_svx/source/inc/fmtools.hxx91
-rw-r--r--binfilter/bf_svx/source/inc/fmundo.hxx148
-rw-r--r--binfilter/bf_svx/source/inc/fmurl.hxx63
-rw-r--r--binfilter/bf_svx/source/inc/fmvwimp.hxx234
-rw-r--r--binfilter/bf_svx/source/inc/gridcell.hxx929
-rw-r--r--binfilter/bf_svx/source/inc/gridcols.hxx71
-rw-r--r--binfilter/bf_svx/source/inc/multipro.hxx74
-rw-r--r--binfilter/bf_svx/source/inc/mutxhelp.hxx48
-rw-r--r--binfilter/bf_svx/source/inc/sdbdatacolumn.hxx145
-rw-r--r--binfilter/bf_svx/source/inc/showcols.hxx69
-rw-r--r--binfilter/bf_svx/source/inc/sqlparserclient.hxx70
-rw-r--r--binfilter/bf_svx/source/inc/svdoimp.hxx277
-rw-r--r--binfilter/bf_svx/source/inc/svdoutlinercache.hxx58
-rw-r--r--binfilter/bf_svx/source/inc/taborder.hrc41
-rw-r--r--binfilter/bf_svx/source/inc/taborder.hxx113
-rw-r--r--binfilter/bf_svx/source/inc/tabwin.hxx52
-rw-r--r--binfilter/bf_svx/source/inc/tbxform.hxx142
-rw-r--r--binfilter/bf_svx/source/inc/trace.hxx69
-rw-r--r--binfilter/bf_svx/source/inc/unoedprx.hxx155
-rw-r--r--binfilter/bf_svx/source/inc/unopolyhelper.hxx55
-rw-r--r--binfilter/bf_svx/source/inc/xmlxtexp.hxx48
-rw-r--r--binfilter/bf_svx/source/inc/xmlxtimp.hxx67
-rw-r--r--binfilter/bf_svx/source/items/makefile.mk86
-rw-r--r--binfilter/bf_svx/source/items/svx_algitem.cxx518
-rw-r--r--binfilter/bf_svx/source/items/svx_bulitem.cxx384
-rw-r--r--binfilter/bf_svx/source/items/svx_chrtitem.cxx376
-rw-r--r--binfilter/bf_svx/source/items/svx_clipfmtitem.cxx109
-rw-r--r--binfilter/bf_svx/source/items/svx_drawitem.cxx322
-rw-r--r--binfilter/bf_svx/source/items/svx_e3ditem.cxx155
-rw-r--r--binfilter/bf_svx/source/items/svx_flditem.cxx759
-rw-r--r--binfilter/bf_svx/source/items/svx_frmitems.cxx2882
-rw-r--r--binfilter/bf_svx/source/items/svx_grfitem.cxx175
-rw-r--r--binfilter/bf_svx/source/items/svx_hlnkitem.cxx104
-rw-r--r--binfilter/bf_svx/source/items/svx_numitem.cxx937
-rw-r--r--binfilter/bf_svx/source/items/svx_pageitem.cxx278
-rw-r--r--binfilter/bf_svx/source/items/svx_paperinf.cxx179
-rw-r--r--binfilter/bf_svx/source/items/svx_paraitem.cxx1244
-rw-r--r--binfilter/bf_svx/source/items/svx_postattr.cxx90
-rw-r--r--binfilter/bf_svx/source/items/svx_rotmodit.cxx132
-rw-r--r--binfilter/bf_svx/source/items/svx_svxerr.cxx52
-rw-r--r--binfilter/bf_svx/source/items/svx_svxerr.src246
-rw-r--r--binfilter/bf_svx/source/items/svx_svxfont.cxx429
-rw-r--r--binfilter/bf_svx/source/items/svx_svxitems.src501
-rw-r--r--binfilter/bf_svx/source/items/svx_textitem.cxx2621
-rw-r--r--binfilter/bf_svx/source/items/svx_writingmodeitem.cxx91
-rw-r--r--binfilter/bf_svx/source/items/svx_xmlcnitm.cxx236
-rw-r--r--binfilter/bf_svx/source/items/svx_zoomitem.cxx98
-rw-r--r--binfilter/bf_svx/source/options/makefile.mk60
-rw-r--r--binfilter/bf_svx/source/options/svx_adritem.cxx206
-rw-r--r--binfilter/bf_svx/source/options/svx_asiancfg.cxx176
-rw-r--r--binfilter/bf_svx/source/options/svx_optdll.cxx79
-rw-r--r--binfilter/bf_svx/source/options/svx_optgrid.cxx66
-rw-r--r--binfilter/bf_svx/source/outliner/makefile.mk62
-rw-r--r--binfilter/bf_svx/source/outliner/outl_pch.hxx37
-rw-r--r--binfilter/bf_svx/source/outliner/outleeng.hxx70
-rw-r--r--binfilter/bf_svx/source/outliner/outliner.hrc44
-rw-r--r--binfilter/bf_svx/source/outliner/paralist.hxx67
-rw-r--r--binfilter/bf_svx/source/outliner/svx_outleeng.cxx151
-rw-r--r--binfilter/bf_svx/source/outliner/svx_outlin2.cxx461
-rw-r--r--binfilter/bf_svx/source/outliner/svx_outliner.cxx1257
-rw-r--r--binfilter/bf_svx/source/outliner/svx_outliner.src184
-rw-r--r--binfilter/bf_svx/source/outliner/svx_outlobj.cxx258
-rw-r--r--binfilter/bf_svx/source/outliner/svx_outlvw.cxx201
-rw-r--r--binfilter/bf_svx/source/outliner/svx_paralist.cxx98
-rw-r--r--binfilter/bf_svx/source/svdraw/makefile.mk124
-rw-r--r--binfilter/bf_svx/source/svdraw/svditext.hxx58
-rw-r--r--binfilter/bf_svx/source/svdraw/svdtxhdl.hxx106
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_dialdll.cxx92
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_impgrfll.cxx95
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdattr.cxx1456
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdcrtv.cxx284
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svddrag.cxx79
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svddrgv.cxx223
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdedtv.cxx207
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdedtv2.cxx130
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdedxv.cxx189
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdetc.cxx632
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdglev.cxx96
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdglue.cxx225
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdhdl.cxx177
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdhlpln.cxx101
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdio.cxx647
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svditer.cxx77
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx387
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdmark.cxx212
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx2245
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdmrkv.cxx901
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdmrkv1.cxx107
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdoattr.cxx1049
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdobj.cxx3442
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdocapt.cxx543
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdocirc.cxx907
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx1947
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdograf.cxx1606
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx1030
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdomeas.cxx1012
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx902
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdopage.cxx254
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdopath.cxx979
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdorect.cxx586
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdotext.cxx1633
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdotxat.cxx522
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdotxed.cxx73
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdotxfl.cxx60
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx308
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdotxtr.cxx339
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdouno.cxx479
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdoutl.cxx127
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdoutlinercache.cxx111
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdovirt.cxx318
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdpage.cxx1635
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdpagv.cxx911
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdpntv.cxx997
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdpoev.cxx163
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdsnpv.cxx277
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdstr.src378
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdsuro.cxx283
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx282
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdtrans.cxx425
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdtxhdl.cxx396
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdundo.cxx371
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdview.cxx232
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdviter.cxx196
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdvmark.cxx109
-rw-r--r--binfilter/bf_svx/source/svdraw/svx_svdxcgv.cxx49
-rw-r--r--binfilter/bf_svx/source/svxlink/fileobj.hxx90
-rw-r--r--binfilter/bf_svx/source/svxlink/makefile.mk74
-rw-r--r--binfilter/bf_svx/source/svxlink/svx_fileobj.cxx579
-rw-r--r--binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx222
-rw-r--r--binfilter/bf_svx/source/svxlink/svx_linkmgr.src117
-rw-r--r--binfilter/bf_svx/source/unodraw/UnoGraphicExporter.hxx45
-rw-r--r--binfilter/bf_svx/source/unodraw/UnoNameItemTable.hxx95
-rw-r--r--binfilter/bf_svx/source/unodraw/makefile.mk78
-rw-r--r--binfilter/bf_svx/source/unodraw/shapeimpl.hxx144
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_UnoNameItemTable.cxx335
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_UnoNamespaceMap.cxx316
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_XPropertyTable.cxx751
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_gluepts.cxx554
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx143
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoctabl.cxx319
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unodtabl.cxx112
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unofdesc.cxx266
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unogtabl.cxx107
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unohtabl.cxx105
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoipset.cxx683
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unomlstr.cxx67
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unomod.cxx759
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unomtabl.cxx479
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unonrule.cxx599
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unontabl.cxx318
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unopage.cxx777
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unopool.cxx409
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoprov.cxx1244
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx1785
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx1145
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshap4.cxx888
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshape.cxx3825
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshcol.cxx247
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshtxt.cxx980
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unottabl.cxx110
-rw-r--r--binfilter/bf_svx/source/unoedit/makefile.mk64
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx150
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoedacc.cxx29
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoedhlp.cxx102
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoedprx.cxx1199
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoedsrc.cxx76
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unofield.cxx1075
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unofored.cxx503
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoforou.cxx505
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unotext.cxx2154
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unotext2.cxx635
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoviwed.cxx135
-rw-r--r--binfilter/bf_svx/source/unoedit/svx_unoviwou.cxx167
-rw-r--r--binfilter/bf_svx/source/xml/editsource.hxx56
-rw-r--r--binfilter/bf_svx/source/xml/makefile.mk57
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmleohlp.cxx733
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx798
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx170
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx113
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmlxtexp.cxx98
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx376
-rw-r--r--binfilter/bf_svx/source/xoutdev/makefile.mk72
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx__xfont.cxx703
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx__ximp.cxx222
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx__xoutbmp.cxx38
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx__xpoly.cxx2056
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xattr.cxx4720
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xattr2.cxx1364
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xattrbmp.cxx773
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xfontmac.cxx1682
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xiocomp.cxx68
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xline.cxx772
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xout.cxx809
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xout1.cxx92
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xpool.cxx387
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtabbtmp.cxx489
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtabcolr.cxx630
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtabdash.cxx504
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtabgrdt.cxx538
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtabhtch.cxx489
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtable.cxx426
-rw-r--r--binfilter/bf_svx/source/xoutdev/svx_xtablend.cxx515
-rw-r--r--binfilter/bf_svx/util/bf_sfxwin.flt184
-rw-r--r--binfilter/bf_svx/util/bf_svx.flt132
-rw-r--r--binfilter/bf_svx/util/dl.flt138
-rw-r--r--binfilter/bf_svx/util/gal.dxp21
-rw-r--r--binfilter/bf_svx/util/hidother.hrc27
-rw-r--r--binfilter/bf_svx/util/makefile.mk145
-rw-r--r--binfilter/bf_svx/util/makefile.pmk28
-rw-r--r--binfilter/bf_svx/util/svx.dxp3
-rw-r--r--binfilter/bf_svx/util/svx_hidother.src388
-rw-r--r--binfilter/bf_svx/util/svx_svxpch.cxx72
321 files changed, 144498 insertions, 0 deletions
diff --git a/binfilter/bf_svx/source/dialog/imapdlg.hrc b/binfilter/bf_svx/source/dialog/imapdlg.hrc
new file mode 100644
index 000000000000..71990a4f0555
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/imapdlg.hrc
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include <dialogs.hrc>
+
+// ImapDlg-Dialoge
+#define RID_SVX_IMAPDLG_START RID_SVX_IMAP_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 IL_IMAPDLG 1
+#define ILH_IMAPDLG 2
+
+/******************************************************************************/
+
+#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 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 FL_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)
diff --git a/binfilter/bf_svx/source/dialog/impgrf.hrc b/binfilter/bf_svx/source/dialog/impgrf.hrc
new file mode 100644
index 000000000000..45b1e2108246
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/impgrf.hrc
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_IMPGRF_HRC
+#define _SVX_IMPGRF_HRC
+
+// define -------------------------------------------------------------------
+
+#define STR_UNKNOWN_FORMAT 2
+#define STR_PATH_NOT_FOUND1 7
+#define STR_LINK 17
+#define STR_PREVIEW 18
+#define STR_IMPORTGRAPHIC_COUNT 19
+
+#endif
diff --git a/binfilter/bf_svx/source/dialog/makefile.mk b/binfilter/bf_svx/source/dialog/makefile.mk
new file mode 100644
index 000000000000..c4253f31792b
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/makefile.mk
@@ -0,0 +1,76 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_dialogs
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+.IF "$(GUI)" != "MAC"
+CFLAGS+=-DDG_DLL
+.ELSE
+CFLAGS+=-D DG_DLL
+.ENDIF
+
+# --- Files --------------------------------------------------------
+
+BMP_IN=$(BFPRJ)$/win/res
+
+SRS1NAME=svx_dialogs
+SRC1FILES = \
+ svx_imapdlg.src \
+ svx_impgrf.src \
+ svx_lingu.src
+
+SRS2NAME=svx_drawdlgs
+SRC2FILES = \
+ svx_sdstring.src
+
+SLOFILES=\
+ $(SLO)$/svx_dlgutil.obj \
+ $(SLO)$/svx_impgrf.obj
+
+.IF "$(COM)" == "C50"
+EXCEPTIONSNOOPTFILES=$(SLO)$/svx_impgrf.obj
+.ELSE
+EXCEPTIONSFILES+=$(SLO)$/svx_impgrf.obj
+.ENDIF
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/dialog/rlrcitem.hxx b/binfilter/bf_svx/source/dialog/rlrcitem.hxx
new file mode 100644
index 000000000000..75f8a96ef872
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/rlrcitem.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_RLRCITEM_HXX
+#define _SVX_RLRCITEM_HXX
+
+#include <bf_sfx2/ctrlitem.hxx>
+namespace binfilter {
+
+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& );
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/dialog/svx_dlgutil.cxx b/binfilter/bf_svx/source/dialog/svx_dlgutil.cxx
new file mode 100644
index 000000000000..1e81648b639d
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_dlgutil.cxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <limits.h>
+
+#include "dialogs.hrc"
+
+#include "dlgutil.hxx"
+namespace binfilter {
+
+/*N*/ FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ FieldUnit eUnit = FUNIT_INCH;
+/*N*/ return eUnit;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ long CalcToUnit( float nIn, SfxMapUnit eUnit )
+/*N*/ {
+/*N*/ // nIn ist in Points
+/*N*/
+/*N*/ DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
+/*N*/ eUnit == SFX_MAPUNIT_100TH_MM ||
+/*N*/ eUnit == SFX_MAPUNIT_10TH_MM ||
+/*N*/ eUnit == SFX_MAPUNIT_MM ||
+/*N*/ eUnit == SFX_MAPUNIT_CM, "this unit is not implemented" );
+/*N*/
+/*N*/ float nTmp = nIn;
+/*N*/
+/*N*/ if ( SFX_MAPUNIT_TWIP != eUnit )
+/*N*/ nTmp = nIn * 10 / 567;
+/*N*/
+/*N*/ switch ( eUnit )
+/*N*/ {
+/*N*/ 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;
+/*N*/ }
+/*N*/
+/*N*/ nTmp *= 20;
+/*N*/ long nRet = (long)nTmp;
+/*N*/ return nRet;
+/*N*/ //! return (long)(nTmp * 20);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtrl )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 //STRIP001 long nOut = 0;
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor )
+/*N*/ {
+/*N*/ DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
+/*N*/ eUnit == SFX_MAPUNIT_100TH_MM ||
+/*N*/ eUnit == SFX_MAPUNIT_10TH_MM ||
+/*N*/ eUnit == SFX_MAPUNIT_MM ||
+/*N*/ eUnit == SFX_MAPUNIT_CM, "this unit is not implemented" );
+/*N*/
+/*N*/ long nRet = 0;
+/*N*/
+/*N*/ if ( SFX_MAPUNIT_TWIP == eUnit )
+/*N*/ nRet = nIn;
+/*N*/ else
+/*N*/ nRet = nIn * 567;
+/*N*/
+/*N*/ switch ( eUnit )
+/*N*/ {
+/*N*/ 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;
+/*N*/ }
+/*N*/
+/*N*/ // ggf. aufrunden
+/*N*/ if ( SFX_MAPUNIT_TWIP != eUnit )
+/*N*/ {
+/*N*/ long nMod = 10;
+/*N*/ long nTmp = nRet % nMod;
+/*N*/
+/*N*/ if ( nTmp >= 4 )
+/*N*/ nRet += 10 - nTmp;
+/*N*/ nRet /= 10;
+/*N*/ }
+/*N*/ return nRet * nFaktor / 20;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/dialog/svx_imapdlg.src b/binfilter/bf_svx/source/dialog/svx_imapdlg.src
new file mode 100644
index 000000000000..e10e5236b5fd
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_imapdlg.src
@@ -0,0 +1,367 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "imapdlg.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_IMAP ----------------------------------------------------
+Control RID_SVXCTL_IMAP
+{
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 56 ) ;
+ HelpId = HID_IMAPDLG_GRAPHWND ;
+};
+
+/******************************************************************************/
+Menu RID_SVXMN_IMAP
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_URL ;
+ Text [ de ] = "~Beschreibung..." ;
+ Text [ en-US ] = "Description..." ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Descrição...";
+ Text[ ru ] = "ОпиÑание...";
+ Text[ el ] = "~ΠεÏιγÏαφή...";
+ Text[ nl ] = "~Beschrijving...";
+ Text[ fr ] = "~Description...";
+ Text[ es ] = "~Descripción...";
+ Text[ fi ] = "Kuvaus...";
+ Text[ ca ] = "~Descripció...";
+ Text[ it ] = "D~escrizione...";
+ Text[ sk ] = "Popis...";
+ Text[ da ] = "Beskrivelse...";
+ Text[ sv ] = "~Beskrivning...";
+ Text[ pl ] = "Opis...";
+ Text[ pt-BR ] = "Descrição...";
+ Text[ th ] = "คำอธิบาย...";
+ Text[ ja ] = "説明...";
+ Text[ ko ] = "설명...";
+ Text[ zh-CN ] = "说明...";
+ Text[ zh-TW ] = "æè¿°...";
+ Text[ tr ] = "Açıklama...";
+ Text[ hi-IN ] = "विवरण...";
+ Text[ ar ] = "...الوصÙ";
+ Text[ he ] = "‮ת×ור...‬";
+ };
+ MenuItem
+ {
+ Identifier = MN_MACRO ;
+ Text [ de ] = "Ma~kro..." ;
+ Text [ en-US ] = "~Macro..." ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Ma~cro...";
+ Text[ ru ] = "МакроÑ...";
+ Text[ el ] = "Μα~κÏοεντολή...";
+ Text[ nl ] = "Ma~cro...";
+ Text[ fr ] = "Ma~cro...";
+ Text[ es ] = "Ma~cro...";
+ Text[ fi ] = "~Makro...";
+ Text[ ca ] = "~Macro...";
+ Text[ it ] = "Macro...";
+ Text[ sk ] = "~Makro...";
+ Text[ da ] = "Makro...";
+ Text[ sv ] = "Ma~kro...";
+ Text[ pl ] = "~Makro...";
+ Text[ pt-BR ] = "~Macro...";
+ Text[ th ] = "~มาโคร...";
+ Text[ ja ] = "マクロ(~M)...";
+ Text[ ko ] = "매í¬ë¡œ(~M)...";
+ Text[ zh-CN ] = "å®(~M)...";
+ Text[ zh-TW ] = "巨集(~M)...";
+ Text[ tr ] = "Makro...";
+ Text[ hi-IN ] = "~मॉकà¥à¤°à¥‹...";
+ Text[ ar ] = "...ماكرو";
+ Text[ he ] = "‮הפעלת מ×קרו...‬";
+ };
+ MenuItem
+ {
+ Identifier = MN_ACTIVATE ;
+ Text [ de ] = "~Aktiv" ;
+ Text [ en-US ] = "Active" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Activo";
+ Text[ ru ] = "Ðктивный";
+ Text[ el ] = "ΕνεÏ~γά";
+ Text[ nl ] = "~Actief";
+ Text[ fr ] = "~Actif";
+ Text[ es ] = "~Activo";
+ Text[ fi ] = "Aktiivinen";
+ Text[ ca ] = "Actiu";
+ Text[ it ] = "~Attivo";
+ Text[ sk ] = "Aktívny";
+ Text[ da ] = "Aktiv";
+ Text[ sv ] = "~Aktiv";
+ Text[ pl ] = "Aktywny";
+ Text[ pt-BR ] = "Ativo";
+ Text[ th ] = "ใช้งานอยู่";
+ Text[ ja ] = "アクティブ";
+ Text[ ko ] = "활성";
+ Text[ zh-CN ] = "使用";
+ Text[ zh-TW ] = "å•Ÿå‹•";
+ Text[ tr ] = "Etkin";
+ Text[ hi-IN ] = "कà¥à¤°à¤¿à¤¯à¤¾à¤¶à¥€à¤²";
+ Text[ ar ] = "نشط";
+ Text[ he ] = "~Aktiv";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_POSITION ;
+ Text [ de ] = "A~nordnung" ;
+ Text [ en-US ] = "Arrange" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_FRAME_TO_TOP ;
+ Text [ de ] = "Ganz nach ~vorn" ;
+ Text [ en-US ] = "Bring to Front" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "P~rimeiro plano";
+ Text[ ru ] = "ВынеÑти на ~передний план";
+ Text[ el ] = "ΜεταφοÏά σε Ï€~Ïώτο πλάνο";
+ Text[ nl ] = "~Vooraan";
+ Text[ fr ] = "Tout à l'~avant";
+ Text[ es ] = "Traer al ~frente";
+ Text[ fi ] = "Tuo eteen";
+ Text[ ca ] = "Porta al davant";
+ Text[ it ] = "Porta in primo piano";
+ Text[ sk ] = "Preniesť do popredia";
+ Text[ da ] = "~Placer forrest";
+ Text[ sv ] = "Längst ~fram";
+ Text[ pl ] = "~Przesuń na wierzch";
+ Text[ pt-BR ] = "Trazer para a Frente";
+ Text[ th ] = "นำไปด้านหน้า";
+ Text[ ja ] = "最å‰é¢ã¸ç§»å‹•";
+ Text[ ko ] = "맨 앞으로";
+ Text[ zh-CN ] = "移动到最上é¢";
+ Text[ zh-TW ] = "移動到最上é¢";
+ Text[ tr ] = "En öne getir";
+ Text[ hi-IN ] = "सामने लाओ";
+ Text[ ar ] = "إحضار إلى الأمام";
+ Text[ he ] = "Ganz nach ~vorn";
+ };
+ MenuItem
+ {
+ Identifier = MN_MOREFRONT ;
+ Text [ de ] = "W~eiter nach vorn" ;
+ Text [ en-US ] = "Bring ~Forward" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Mais para a frente";
+ Text[ ru ] = "ПеремеÑтить ~вперед";
+ Text[ el ] = "Îœ~εταφοÏά ένα επίπεδο εμπÏός";
+ Text[ nl ] = "Naar v~oren";
+ Text[ fr ] = "V~ers l'avant";
+ Text[ es ] = "Traer ~adelante";
+ Text[ fi ] = "Siirrä ~eteenpäin";
+ Text[ ca ] = "Porta ~més endavant";
+ Text[ it ] = "Porta più avanti";
+ Text[ sk ] = "Preniesť ~bližšie";
+ Text[ da ] = "F~lyt fremad";
+ Text[ sv ] = "Längre fra~m";
+ Text[ pl ] = "P~rzesuń do przodu";
+ Text[ pt-BR ] = "A~vançar";
+ Text[ th ] = "นำ~ส่งต่อ";
+ Text[ ja ] = "ã•ã‚‰ã«å‰ã¸(~F)";
+ Text[ ko ] = "앞으로 ì´ë™(~F)";
+ Text[ zh-CN ] = "上移一层(~F)";
+ Text[ zh-TW ] = "上移一層(~F)";
+ Text[ tr ] = "Bir öne getir";
+ Text[ hi-IN ] = "~आगे लाओ";
+ Text[ ar ] = "إحضار أماماً";
+ Text[ he ] = "W~eiter nach vorn";
+ };
+ MenuItem
+ {
+ Identifier = MN_MOREBACK ;
+ Text [ de ] = "Weiter ~nach hinten" ;
+ Text [ en-US ] = "Send Back~ward" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Mais para o f~undo";
+ Text[ ru ] = "ПеремеÑтить ~назад";
+ Text[ el ] = "~ΜεταφοÏά πίσω";
+ Text[ nl ] = "Naar a~chteren";
+ Text[ fr ] = "~Vers l'arrière";
+ Text[ es ] = "Enviar a~trás";
+ Text[ fi ] = "Siirrä taakse~päin";
+ Text[ ca ] = "Envia cap ~enrere";
+ Text[ it ] = "Porta più i~ndietro";
+ Text[ sk ] = "P~reniesÅ¥ Äalej";
+ Text[ da ] = "Flyt bag~ud";
+ Text[ sv ] = "Längre ba~k";
+ Text[ pl ] = "Pr~zesuń do tyłu";
+ Text[ pt-BR ] = "Rec~uar";
+ Text[ th ] = "ส่งย้อน~à¸à¸¥à¸±à¸š";
+ Text[ ja ] = "ã•ã‚‰ã«å¾Œã¸(~W)";
+ Text[ ko ] = "뒤로 ì´ë™(~W)";
+ Text[ zh-CN ] = "下移一层(~W)";
+ Text[ zh-TW ] = "下移一層(~W)";
+ Text[ tr ] = "Bir alta gönder";
+ Text[ hi-IN ] = "पि~छली ओर भेजो";
+ Text[ ar ] = "إرسال خلÙاَ";
+ Text[ he ] = "Weiter ~nach hinten";
+ };
+ MenuItem
+ {
+ Identifier = MN_FRAME_TO_BOTTOM ;
+ Text [ de ] = "Ganz nach ~hinten" ;
+ Text [ en-US ] = "~Send to Back" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Enviar para ~trás";
+ Text[ ru ] = "Ðа ~задний план";
+ Text[ el ] = "ΜεταφοÏά σε ~δεÏτεÏο πλάνο";
+ Text[ nl ] = "~Achteraan";
+ Text[ fr ] = "Tout à l'a~rrière";
+ Text[ es ] = "Enviar al ~fondo";
+ Text[ fi ] = "Vie ~taakse";
+ Text[ ca ] = "~Envia al fons";
+ Text[ it ] = "Porta in fondo";
+ Text[ sk ] = "Odo~slať na pozadie";
+ Text[ da ] = "Placer ~bagest";
+ Text[ sv ] = "Längst b~ak";
+ Text[ pl ] = "Prz~esuń na spód";
+ Text[ pt-BR ] = "Enviar para Trá~s";
+ Text[ th ] = "~ย้ายไปไว้ข้างหลังสุด";
+ Text[ ja ] = "最背é¢ã¸ç§»å‹•(~S)";
+ Text[ ko ] = "맨 뒤로(~S)";
+ Text[ zh-CN ] = "移到底层(~S)";
+ Text[ zh-TW ] = "移動到最下é¢(~S)";
+ Text[ tr ] = "En alta gönder";
+ Text[ hi-IN ] = "पीछे ~भेजो";
+ Text[ ar ] = "إرسال إلى الخلÙ";
+ Text[ he ] = "Ganz nach ~hinten";
+ };
+ };
+ };
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Disposição";
+ Text[ ru ] = "РаÑположить";
+ Text[ el ] = "~Τακτοποίηση";
+ Text[ nl ] = "~Positie";
+ Text[ fr ] = "~Disposition";
+ Text[ es ] = "~Disposición";
+ Text[ fi ] = "Järjestä";
+ Text[ ca ] = "Organitza";
+ Text[ it ] = "~Disponi";
+ Text[ sk ] = "Usporiadať";
+ Text[ da ] = "Placering";
+ Text[ sv ] = "~Placering";
+ Text[ pl ] = "Rozmieszczenie";
+ Text[ pt-BR ] = "Organizar";
+ Text[ th ] = "จัดเรียง";
+ Text[ ja ] = "整列";
+ Text[ ko ] = "배치";
+ Text[ zh-CN ] = "排åº";
+ Text[ zh-TW ] = "排åº";
+ Text[ tr ] = "Sıralama";
+ Text[ hi-IN ] = "कà¥à¤°à¤® में रखो";
+ Text[ ar ] = "ترتيب";
+ Text[ he ] = "‮סידור‬";
+ };
+ 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 [ de ] = "Alles ausw~ählen" ;
+ Text [ en-US ] = "Select ~All" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Seleccionar t~udo";
+ Text[ ru ] = "Выделить вÑе";
+ Text[ el ] = "Επιλογή όλ~ων";
+ Text[ nl ] = "Alles ~selecteren";
+ Text[ fr ] = "Tout s~électionner";
+ Text[ es ] = "~Seleccionar todo";
+ Text[ fi ] = "~Valitse kaikki";
+ Text[ ca ] = "Selecciona ~tots";
+ Text[ it ] = "Seleziona tutto";
+ Text[ sk ] = "Vybrať ~všetko";
+ Text[ da ] = "Marker alt";
+ Text[ sv ] = "~Välj ut allt";
+ Text[ pl ] = "Zaznacz ~wszystko";
+ Text[ pt-BR ] = "Selecionar ~Tudo";
+ Text[ th ] = "เลือà¸~ทั้งหมด";
+ Text[ ja ] = "ã™ã¹ã¦é¸æŠž(~A)";
+ Text[ ko ] = "ëª¨ë‘ ì„ íƒ(~A)";
+ Text[ zh-CN ] = "全部选中(~A)";
+ Text[ zh-TW ] = "全部é¸å–(~A)";
+ Text[ tr ] = "Tümünü seç";
+ Text[ hi-IN ] = "~सब चà¥à¤¨à¥‹";
+ Text[ ar ] = "تحديد الكل";
+ Text[ he ] = "‮בחירה כוללת‬";
+ };
+ MenuItem
+ {
+ Identifier = MN_DELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text [ de ] = "~Löschen" ;
+ Text [ en-US ] = "~Delete" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Die Selektion löschen : Die Selektion l÷schen */
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "E~liminar";
+ Text[ ru ] = "Удалить";
+ Text[ el ] = "ΔιαγÏα~φή";
+ Text[ nl ] = "~Wissen";
+ Text[ fr ] = "~Supprimer";
+ Text[ es ] = "~Borrar";
+ Text[ fi ] = "~Poista";
+ Text[ ca ] = "~Suprimeix";
+ Text[ it ] = "~Cancella";
+ Text[ sk ] = "~Zmazať";
+ Text[ da ] = "~Slet";
+ Text[ sv ] = "~Radera";
+ Text[ pl ] = "~Usuń";
+ Text[ pt-BR ] = "E~xcluir";
+ Text[ th ] = "~ลบ";
+ Text[ ja ] = "削除(~D)";
+ Text[ ko ] = "삭제(~D)";
+ Text[ zh-CN ] = "删除(~D)";
+ Text[ zh-TW ] = "刪除(~D)";
+ Text[ tr ] = "Sil";
+ Text[ hi-IN ] = "~मिटाओ";
+ Text[ ar ] = "حذÙ";
+ Text[ he ] = "‮מחיקה‬";
+ };
+ };
+};
diff --git a/binfilter/bf_svx/source/dialog/svx_impgrf.cxx b/binfilter/bf_svx/source/dialog/svx_impgrf.cxx
new file mode 100644
index 000000000000..b414f1231857
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_impgrf.cxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ------------------------------------------------------------------
+
+#include <limits.h> // USHRT_MAX
+
+#include <bf_sfx2/docfile.hxx>
+
+using namespace ::ucbhelper;
+using namespace ::com::sun::star::uno;
+
+#include "dialogs.hrc"
+#include "impgrf.hrc"
+
+#define _SVX_IMPGRF_CXX
+#include "impgrf.hxx"
+
+#include "dialmgr.hxx"
+#include "helpid.hrc"
+namespace binfilter {
+
+// defines ---------------------------------------------------------------
+
+#define IMPGRF_INIKEY_ASLINK "ImportGraphicAsLink"
+#define IMPGRF_INIKEY_PREVIEW "ImportGraphicPreview"
+#define IMPGRF_CONFIGNAME String(DEFINE_CONST_UNICODE("ImportGraphicDialog"))
+
+// -----------------------------------------------------------------------
+
+/*N*/ GraphicFilter* DialogsResMgr::GetGrfFilter_Impl()
+/*N*/ {
+/*N*/ if( !pGrapicFilter )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ pGrapicFilter = new GraphicFilter;
+/*N*/ #else
+/*N*/ pGrapicFilter = new GraphicFilter(sal_False);
+/*N*/ #endif
+/*N*/ ::binfilter::FillFilter( *pGrapicFilter );
+/*N*/ }
+/*N*/ return pGrapicFilter;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ GraphicFilter* GetGrfFilter()
+/*N*/ {
+/*N*/ return (*(DialogsResMgr**)GetAppData(BF_SHL_SVX))->GetGrfFilter_Impl();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ USHORT FillFilter( GraphicFilter& rFilter )
+/*N*/ {
+/*N*/ return rFilter.GetImportFormatCount();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/dialog/svx_impgrf.src b/binfilter/bf_svx/source/dialog/svx_impgrf.src
new file mode 100644
index 000000000000..e20463ffbcaf
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_impgrf.src
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+ // pragma -------------------------------------------------------------------
+
+ // include ------------------------------------------------------------------
+#include "dialogs.hrc"
+#include "impgrf.hrc"
+ // --------------------------------------------------------------------------
+Resource RID_SVXRES_IMPORTGRAPHIC
+{
+ String STR_PATH_NOT_FOUND1
+ {
+ Text [ de ] = "Das Verzeichnis '" ;
+ Text [ en-US ] = "The directory '" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "O directório '";
+ Text[ ru ] = "Каталог '";
+ Text[ el ] = "Ο κατάλογος '";
+ Text[ nl ] = "Map '";
+ Text[ fr ] = "Le répertoire '";
+ Text[ es ] = "El directorio '";
+ Text[ fi ] = "Hakemistoa";
+ Text[ ca ] = "El directori ";
+ Text[ it ] = "La cartella '";
+ Text[ sk ] = "Adresár '";
+ Text[ da ] = "Biblioteket '";
+ Text[ sv ] = "Katalogen '";
+ Text[ pl ] = "Katalog '";
+ Text[ pt-BR ] = "O diretório";
+ Text[ th ] = "ไดเร็à¸à¸—อรี่ '";
+ Text[ ja ] = "ディレクトリ'";
+ Text[ ko ] = "디렉토리 '";
+ Text[ zh-CN ] = "这个目录 '";
+ Text[ zh-TW ] = "這個目錄<";
+ Text[ tr ] = "Dizin '";
+ Text[ hi-IN ] = "डैरकà¥à¤Ÿà¤°à¥€ '";
+ Text[ ar ] = "الدليل '";
+ Text[ he ] = "Das Verzeichnis '";
+ };
+ String STR_LINK
+ {
+ Text [ de ] = "~Verknüpfen" ;
+ Text [ en-US ] = "~Link" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Ligar";
+ Text[ ru ] = "СвÑзать";
+ Text[ el ] = "ΣÏνδεση";
+ Text[ nl ] = "~Koppelen";
+ Text[ fr ] = "~Lien";
+ Text[ es ] = "~Vincular";
+ Text[ fi ] = "~Linkitä";
+ Text[ ca ] = "~Enllaça";
+ Text[ it ] = "~Collega";
+ Text[ sk ] = "~Odkaz";
+ Text[ da ] = "Kæd";
+ Text[ sv ] = "Lä~nka";
+ Text[ pl ] = "Połą~cz";
+ Text[ pt-BR ] = "~Vincular";
+ Text[ th ] = "เ~ชื่อมโยง";
+ Text[ ja ] = "リンク(~L)";
+ Text[ ko ] = "ì—°ê²°(~L)";
+ Text[ zh-CN ] = "链接(~L)";
+ Text[ zh-TW ] = "連çµ(~L)";
+ Text[ tr ] = "~Bağlantı oluştur";
+ Text[ hi-IN ] = "~लिंक";
+ Text[ ar ] = "ربط";
+ Text[ he ] = "~Verknüpfen";
+ };
+ String STR_PREVIEW
+ {
+ Text [ de ] = "V~orschau" ;
+ Text [ en-US ] = "Pr~eview" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Visualizar";
+ Text[ ru ] = "ПроÑмотр";
+ Text[ el ] = "ΠÏοεπισκόπηση";
+ Text[ nl ] = "~Voorbeeld";
+ Text[ fr ] = "A~perçu";
+ Text[ es ] = "~Previsualización";
+ Text[ fi ] = "Esi~katselu";
+ Text[ ca ] = "~Previsualització";
+ Text[ it ] = "Ante~prima";
+ Text[ sk ] = "~Náhľad";
+ Text[ da ] = "Eksempel";
+ Text[ sv ] = "~Förhandsvisning";
+ Text[ pl ] = "Po~dglÄ…d";
+ Text[ pt-BR ] = "Vi~sualizar";
+ Text[ th ] = "à¹à¸ª~ดงตัวอย่าง";
+ Text[ ja ] = "プレビュー(~E)";
+ Text[ ko ] = "미리 보기(~E)";
+ Text[ zh-CN ] = "预览(~E)";
+ Text[ zh-TW ] = "é è¦½(~E)";
+ Text[ tr ] = "Ö~nizleme";
+ Text[ hi-IN ] = "पूरà¥à¤µ~दृशà¥à¤¯";
+ Text[ ar ] = "معاينة";
+ Text[ he ] = "V~orschau";
+ };
+};
diff --git a/binfilter/bf_svx/source/dialog/svx_lingu.src b/binfilter/bf_svx/source/dialog/svx_lingu.src
new file mode 100644
index 000000000000..8e4287a08514
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_lingu.src
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+ // 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 [ de ] = "Dieses Wort sollten Sie vermeiden! Thesaurus starten?" ;
+ Message [ en-US ] = "This word appears in the list of words you want to avoid. Start thesaurus?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Evite esta palavra! Iniciar o dicionário de sinónimos?";
+ Message[ ru ] = "Это Ñлово указано в ÑпиÑке Ñлов, которые необходимо избегать. ЗапуÑтить тезауруÑ?";
+ Message[ el ] = "Η λέξη αυτή ανήκει σε αυτές που θέλετε να αποφÏγετε! Îα εκκινήσει ο θησαυÏός λέξεων;";
+ Message[ nl ] = "Dit woord is niet zo geschikt. Thesaurus starten?";
+ Message[ fr ] = "Evitez l'utilisation de ce mot ! Lancer le dictionnaire des synonymes ?";
+ Message[ es ] = "¡Evite esta palabra! ¿Desea iniciar la búsqueda de sinónimos?";
+ Message[ fi ] = "Tämä sana esiintyy vältettävien sanojen luettelossa. Avataanko synonyymisanasto?";
+ Message[ ca ] = "Aquesta paraula apareix a la llista de paraules que voleu evitar. Voleu iniciar el tesaurus?";
+ Message[ it ] = "Questo termine andrebbe evitato. Avviare il dizionario dei sinonimi?";
+ Message[ sk ] = "Toto slovo sa nachádza v zozname slov, ktorým sa chcete vyhnúť.\nSpustiť slovník synoným?";
+ Message[ da ] = "Undgå venligst dette ord! Vil du bruge synonymordbogen?";
+ Message[ sv ] = "Undvik det här ordet! Starta synonymordlista?";
+ Message[ pl ] = "Ten wyraz występuje na liście tych, których chcesz unikać! Uruchomić Tezaurus?";
+ Message[ pt-BR ] = "Esta palavra aparece na lista de palavras que se deseja evitar! Deseja iniciar o dicionário de sinônimos?";
+ Message[ th ] = "คำนี้ปราà¸à¸à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¸„ำที่คุณต้องà¸à¸²à¸£à¹€à¸¥à¸µà¹ˆà¸¢à¸‡ เริ่มอรรถาภิธานหรือไม่?";
+ Message[ ja ] = "ã“ã®å˜èªžã®ä½¿ç”¨ã¯é¿ã‘ã¦ãã ã•ã„。類義語辞典を開始ã—ã¾ã™ã‹ã€‚";
+ Message[ ko ] = "ì´ ë‹¨ì–´ëŠ” 부ì í•© 단어 목ë¡ì— 있습니다. ë™ì˜ì–´ ì‚¬ì „ì„ ì‹œìž‘í• ê¹Œìš”?";
+ Message[ zh-CN ] = "应该é¿å…使用这个字ï¼æ‚¨è¦å¯åŠ¨åŒä¹‰è¯è¯å…¸ï¼Ÿ";
+ Message[ zh-TW ] = "您應該é¿å…使用這個字﹗è¦å•Ÿå‹•åŒç¾©è©žè©žå…¸ï¼Ÿ";
+ Message[ tr ] = "Bu sözcüğü kullanmaktan kaçınmalısınız! Eş anlamlılar sözlüğü başlatılsın mı?";
+ Message[ hi-IN ] = "इस शबà¥à¤¦ उन शबà¥à¤¦à¥‹à¤‚ की सूची में है जिसको आप तà¥à¤¯à¤¾à¤—ना चाहते है । शबà¥à¤¦à¤•à¥‹à¤¶ पà¥à¤°à¤¾à¤°à¤‚भ करना है?";
+ Message[ ar ] = "يجب عليك تجنب استخدام هذه الكلمة! هل تريد بدء تشغيل قاموس المرادÙات؟";
+ Message[ he ] = "Dieses Wort sollten Sie vermeiden! Thesaurus starten?";
+};
+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 [ de ] = "Überprüfung am Anfang des Dokumentes fortsetzen?" ;
+ Message [ en-US ] = "Continue checking at beginning of document?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Deseja continuar com a verificação no início do documento?";
+ Message[ ru ] = "Продолжить проверку в начале документа?";
+ Message[ el ] = "Îα συνεχιστεί ο έλεγχος από την αÏχή του εγγÏάφου;";
+ Message[ nl ] = "Controle aan het begin van het document voortzetten?";
+ Message[ fr ] = "Continuer la vérification au début du document ?";
+ Message[ es ] = "¿Desea continuar la revisión desde el inicio del documento?";
+ Message[ fi ] = "Jatketaanko tarkistusta asiakirjan alusta?";
+ Message[ ca ] = "Voleu continuar verificant des del principi del document?";
+ Message[ it ] = "Continuare a controllare dall'inizio del documento?";
+ Message[ sk ] = "PokraÄovaÅ¥ v kontrole od zaÄiatku dokumentu?";
+ Message[ da ] = "Vil du fortsætte kontrollen fra dokumentets begyndelse?";
+ Message[ sv ] = "Fortsätta kontroll i början på dokumentet?";
+ Message[ pl ] = "Czy kontynuować sprawdzanie od początku dokumentu?";
+ Message[ pt-BR ] = "Deseja continuar a verificação pelo início do documento?";
+ Message[ th ] = "ทำà¸à¸²à¸£à¸•à¸§à¸£à¸ªà¸­à¸šà¸•à¹ˆà¸­à¸—ี่จุดเริ่มต้นเอà¸à¸ªà¸²à¸£à¸«à¸£à¸·à¸­à¹„ม่?";
+ Message[ ja ] = "ドキュメントã®å§‹ã‚ã«æˆ»ã£ã¦ãƒã‚§ãƒƒã‚¯ã‚’続行ã—ã¾ã™ã‹ï¼Ÿ";
+ Message[ ko ] = "문서 처ìŒë¶€í„° 검사를 계ì†í•˜ê² ìŠµë‹ˆê¹Œ?";
+ Message[ zh-CN ] = "从文档开端继续æœå¯»ï¼Ÿ";
+ Message[ zh-TW ] = "從文件起始ä½ç½®ç¹¼çºŒæœå°‹ï¼Ÿ";
+ Message[ tr ] = "Denetlemeye, belge başında devam edilsin mi?";
+ Message[ hi-IN ] = "लेखपतà¥à¤° की पà¥à¤°à¤¾à¤°à¤‚भ से जाà¤à¤š जारी रखना है?";
+ Message[ ar ] = "هل تريد متابعة التدقيق عند بداية المستند؟";
+ Message[ he ] = "Überprüfung am Anfang des Dokumentes fortsetzen?";
+};
+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 [ de ] = "Überprüfung am Ende des Dokumentes fortsetzen?" ;
+ Message [ en-US ] = "Continue checking at end of document?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Continuar a verificação no fim do documento?";
+ Message[ ru ] = "Продолжить проверку в конце документа?";
+ Message[ el ] = "Îα συνεχιστεί ο έλεγχος από το τέλος του εγγÏάφου;";
+ Message[ nl ] = "Controle aan het einde van het document voortzetten?";
+ Message[ fr ] = "Continuer la vérification à la fin du document ?";
+ Message[ es ] = "¿Desea continuar la revisión al final del documento?";
+ Message[ fi ] = "Jatketaanko tarkistusta asiakirjan lopusta?";
+ Message[ ca ] = "Voleu continuar verificant des del final del document?";
+ Message[ it ] = "Continuare il controllo alla fine del documento?";
+ Message[ sk ] = "PokraÄovaÅ¥ v kontrole od konca dokumentu?";
+ Message[ da ] = "Vil du fortsætte kontrollen fra dokumentets slutning?";
+ Message[ sv ] = "Fortsätta kontroll vid slutet av dokumentet?";
+ Message[ pl ] = "Czy kontynuować sprawdzanie od końcu dokumentu?";
+ Message[ pt-BR ] = "Deseja continuar a verificação pelo fim do documento?";
+ Message[ th ] = "ทำà¸à¸²à¸£à¸•à¸£à¸§à¸ˆà¸ªà¸­à¸šà¸•à¹ˆà¸­à¸—ี่ส่วนท้ายเอà¸à¸ªà¸²à¸£à¸«à¸£à¸·à¸­à¹„ม่?";
+ Message[ ja ] = "ドキュメント末ã«æˆ»ã£ã¦ãƒã‚§ãƒƒã‚¯ã‚’続行ã—ã¾ã™ã‹ï¼Ÿ";
+ Message[ ko ] = "문서 ëì—서부터 검사를 계ì†í•˜ê² ìŠµë‹ˆê¹Œ?";
+ Message[ zh-CN ] = "从文档的结æŸä½ç½®ç»§ç»­æœå¯»ï¼Ÿ";
+ Message[ zh-TW ] = "從文件的çµæŸä½ç½®ç¹¼çºŒæœå°‹ï¼Ÿ";
+ Message[ tr ] = "Denetlemeye, belge sonunda devam edilsin mi?";
+ Message[ hi-IN ] = "लेखपतà¥à¤° की अंत से जाà¤à¤š जारी रखना है?";
+ Message[ ar ] = "هل تريد متابعة التدقيق عند نهاية المستند؟";
+ Message[ he ] = "Überprüfung am Ende des Dokumentes fortsetzen?";
+};
+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 [ de ] = "Möchten Sie den Haupttext prüfen?" ;
+ Message [ en-US ] = "Do you want to check the main text?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Deseja verificar o texto principal?";
+ Message[ ru ] = "Проверить оÑновной текÑÑ‚?";
+ Message[ el ] = "Θέλετε να γίνει έλεγχος του κÏÏιου κειμένου;";
+ Message[ nl ] = "Wilt u de hoofdtekst controleren?";
+ Message[ fr ] = "Voulez-vous vérifier le texte principal ?";
+ Message[ es ] = "¿Desea verificar el texto principal?";
+ Message[ fi ] = "Haluatko tarkistaa päätekstin?";
+ Message[ ca ] = "Voleu verificar el text principal?";
+ Message[ it ] = "Controllare il testo principale?";
+ Message[ sk ] = "Prajete si skontrolovať hlavný text?";
+ Message[ da ] = "Vil du kontrollere brødteksten?";
+ Message[ sv ] = "Vill du kontrollera huvudtexten?";
+ Message[ pl ] = "Czy chcesz sprawdzić tekst główny?";
+ Message[ pt-BR ] = "Deseja verificar o texto principal?";
+ Message[ th ] = "คุณต้องà¸à¸²à¸£à¸•à¸£à¸§à¸ˆà¸ªà¸­à¸šà¸‚้อความหลัà¸à¸«à¸£à¸·à¸­à¹„ม่?";
+ Message[ ja ] = "メインテキストをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã‹ï¼Ÿ";
+ Message[ ko ] = "주 í…스트를 검사하겠습니까?";
+ Message[ zh-CN ] = "您想è¦æ£€æŸ¥æ­£æ–‡å—?";
+ Message[ zh-TW ] = "您想è¦æª¢æŸ¥å…§æ–‡ï¼Ÿ";
+ Message[ tr ] = "Ana metni denetlemek istiyor musunuz?";
+ Message[ hi-IN ] = "आप पà¥à¤°à¤§à¤¾à¤¨ टेकà¥à¤¸à¥à¤Ÿà¥ को जाà¤à¤š करना चाहते है?";
+ Message[ ar ] = "هل تريد التدقيق ÙÙŠ النص الرئيسي؟";
+ Message[ he ] = "Möchten Sie den Haupttext prüfen?";
+};
+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 [ de ] = "Sonderbereiche prüfen?" ;
+ Message [ en-US ] = "Do you want check the special regions?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Deseja verificar as regiões especiais?";
+ Message[ ru ] = "Проверить Ñпециальные облаÑти?";
+ Message[ el ] = "Θέλετε να γίνει έλεγχος των ειδικών πεÏιοχών;";
+ Message[ nl ] = "Wilt u de speciale bereiken controleren?";
+ Message[ fr ] = "Voulez-vous vérifier les zones spéciales?";
+ Message[ es ] = "¿Desea verificar las áreas especiales?";
+ Message[ fi ] = "Tarkistetaanko erityisalueet?";
+ Message[ ca ] = "Voleu verificar les regions especials?";
+ Message[ it ] = "Controllare le aree speciali?";
+ Message[ sk ] = "Prajete si skontrolovať špeciálne oblasti?";
+ Message[ da ] = "Vil du kontrollere særområderne?";
+ Message[ sv ] = "Vill du kontrollera specialområden?";
+ Message[ pl ] = "Czy chcesz sprawdzić obszary specjalne?";
+ Message[ pt-BR ] = "Deseja verificar as regiões especiais?";
+ Message[ th ] = "คุณต้องà¸à¸²à¸£à¸•à¸£à¸§à¸ˆà¸ªà¸­à¸šà¸ªà¹ˆà¸§à¸™à¸žà¸´à¹€à¸¨à¸©à¸«à¸£à¸·à¸­à¹„ม่?";
+ Message[ ja ] = "特別範囲をãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã‹ã€‚";
+ Message[ ko ] = "특수 ì˜ì—­ì„ 검사하겠습니까?";
+ Message[ zh-CN ] = "您è¦æ£€æŸ¥ç‰¹æ®ŠåŒºåŸŸå—?";
+ Message[ zh-TW ] = "檢查特殊å€åŸŸï¼Ÿ";
+ Message[ tr ] = "Özel bölümler denetlensin mi?";
+ Message[ hi-IN ] = "आप विशेष पà¥à¤°à¤¦à¥‡à¤¶à¥‹à¤‚ को जाà¤à¤š करना चाहते है?";
+ Message[ ar ] = "هل تريد التدقيق ÙÙŠ المناطق الخاصة؟";
+ Message[ he ] = "Sonderbereiche prüfen?";
+};
+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 [ de ] = "Sonderbereichprüfung ist ausgeschaltet, Trotzdem prüfen?" ;
+ Message [ en-US ] = "Check special regions is deactivated. Check anyway?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "A revisão de áreas especiais está desactivada. Mesmo assim prosseguir?";
+ Message[ ru ] = "Проверка Ñпециальных облаÑтей отключена. Проверить, неÑÐ¼Ð¾Ñ‚Ñ€Ñ Ð½Ð° Ñто?";
+ Message[ el ] = "Ο έλεγχος ειδικών πεÏιοχών είναι απενεÏγοποιημένος. Θέλετε να γίνει ο έλεγχος παÏ΄όλα αυτά;";
+ Message[ nl ] = "De functie 'Speciale bereiken controleren' is uitgeschakeld. Controle toch uitvoeren?";
+ Message[ fr ] = "La vérification dans les zones spéciales est désactivée. Vérifier tout de même ?";
+ Message[ es ] = "La verificación de las áreas especiales está desactivada, ¿Desea verificar de todas maneras?";
+ Message[ fi ] = "Tarkista erityisalueet -toiminto on poistettu käytöstä. Tarkistetaanko kuitenkin?";
+ Message[ ca ] = "La verificació de les àrees especials està desactivada, Voleu verificar de totes maneres?";
+ Message[ it ] = "Il controllo delle aree speciali non è attivo, controllare lo stesso?";
+ Message[ sk ] = "Kontrola špeciálnych oblastí je vypnutá. Napriek tomu skontrolovať?";
+ Message[ da ] = "Stavekontrol i særområder er slået fra, skal der kontrolleres alligevel?";
+ Message[ sv ] = "Kontroll av specialområden är avstängd. Kontrollera ändå?";
+ Message[ pl ] = "Sprawdzanie obszarów specjalnych jest nieaktywne. Sprawdzić mimo to?";
+ Message[ pt-BR ] = "A verificação de regiões especiais está desativada. Verificar mesmo assim?";
+ Message[ th ] = "ตรวจสอบส่วนพิเศษที่ไม่ถูà¸à¹ƒà¸Šà¹‰à¸‡à¸²à¸™ ตรวจสอบหรือไม่?";
+ Message[ ja ] = "特別範囲ã®ãƒã‚§ãƒƒã‚¯ãŒã‚ªãƒ•ã«ãªã£ã¦ã„ã¾ã™ã€‚ãã‚Œã§ã‚‚ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã‹ã€‚";
+ Message[ ko ] = "특수ì˜ì—­ 검사가 비활성 ìƒíƒœìž…니다. ê·¸ëž˜ë„ ê²€ì‚¬í• ê¹Œìš”?";
+ Message[ zh-CN ] = "å·²ç»å…³é—­ç‰¹æ®ŠåŒºåŸŸçš„检查功能,您还是è¦æ‰§è¡Œæ£€æŸ¥ï¼Ÿ";
+ Message[ zh-TW ] = "已經關閉檢查特殊å€åŸŸï¹æ‚¨é‚„是è¦åŸ·è¡Œæª¢æŸ¥ï¼Ÿ";
+ Message[ tr ] = "Özel bölüm denetleme etkin değil, yine de denetlensin mi?";
+ Message[ hi-IN ] = "विशेष पà¥à¤°à¤¦à¥‡à¤¶à¥‹à¤‚ की जाà¤à¤š निषà¥à¤•à¥à¤°à¤¿à¤¯ किया है । किसी तरह जाà¤à¤š करना चाहते है?";
+ Message[ ar ] = "تدقيق المناطق الخاصة غير نشط. هل تريد التدقيق بالرغم من ذلك؟";
+ Message[ he ] = "Sonderbereichprüfung ist ausgeschaltet, Trotzdem prüfen?";
+};
diff --git a/binfilter/bf_svx/source/dialog/svx_rulritem.cxx b/binfilter/bf_svx/source/dialog/svx_rulritem.cxx
new file mode 100644
index 000000000000..fd81accd4dd7
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_rulritem.cxx
@@ -0,0 +1,230 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "dialogs.hrc"
+#include "rulritem.hxx"
+namespace binfilter {
+
+//------------------------------------------------------------------------
+
+/*N*/ TYPEINIT1(SvxPagePosSizeItem, SfxPoolItem);
+/*N*/ TYPEINIT1(SvxLongLRSpaceItem, SfxPoolItem);
+/*N*/ TYPEINIT1(SvxLongULSpaceItem, SfxPoolItem);
+/*N*/ TYPEINIT1(SvxColumnItem, SfxPoolItem);
+/*N*/ TYPEINIT1(SvxObjectItem, SfxPoolItem);
+
+//------------------------------------------------------------------------
+
+/*N*/ int SvxLongLRSpaceItem::operator==( const SfxPoolItem& rCmp) const
+/*N*/ {
+/*N*/ return SfxPoolItem::operator==(rCmp) &&
+/*N*/ lLeft==((const SvxLongLRSpaceItem &)rCmp).lLeft &&
+/*N*/ lRight==((const SvxLongLRSpaceItem &)rCmp).lRight;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+/*N*/ #define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLongLRSpaceItem::Clone(SfxItemPool *pPool) const
+/*N*/ {
+/*N*/ return new SvxLongLRSpaceItem(*this);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxLongLRSpaceItem::SvxLongLRSpaceItem(long lL, long lR, USHORT nId)
+/*N*/ : SfxPoolItem(nId),
+/*N*/ lLeft(lL),
+/*N*/ lRight(lR)
+/*N*/ {}
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxLongLRSpaceItem::SvxLongLRSpaceItem(const SvxLongLRSpaceItem &rCpy)
+/*N*/ : SfxPoolItem(rCpy),
+/*N*/ lLeft(rCpy.lLeft),
+/*N*/ lRight(rCpy.lRight)
+/*N*/ {}
+
+//------------------------------------------------------------------------
+
+/*N*/ int SvxLongULSpaceItem::operator==( const SfxPoolItem& rCmp) const
+/*N*/ {
+/*N*/ return SfxPoolItem::operator==(rCmp) &&
+/*N*/ lLeft==((const SvxLongULSpaceItem &)rCmp).lLeft &&
+/*N*/ lRight==((const SvxLongULSpaceItem &)rCmp).lRight;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLongULSpaceItem::Clone(SfxItemPool *pPool) const
+/*N*/ {
+/*N*/ return new SvxLongULSpaceItem(*this);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxLongULSpaceItem::SvxLongULSpaceItem(long lL, long lR, USHORT nId)
+/*N*/ : SfxPoolItem(nId),
+/*N*/ lLeft(lL),
+/*N*/ lRight(lR)
+/*N*/ {}
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxLongULSpaceItem::SvxLongULSpaceItem(const SvxLongULSpaceItem &rCpy)
+/*N*/ : SfxPoolItem(rCpy),
+/*N*/ lLeft(rCpy.lLeft),
+/*N*/ lRight(rCpy.lRight)
+/*N*/ {}
+
+//------------------------------------------------------------------------
+
+/*N*/ int SvxPagePosSizeItem::operator==( const SfxPoolItem& rCmp) const
+/*N*/ {
+/*N*/ return SfxPoolItem::operator==(rCmp) &&
+/*N*/ aPos == ((const SvxPagePosSizeItem &)rCmp).aPos &&
+/*N*/ lWidth == ((const SvxPagePosSizeItem &)rCmp).lWidth &&
+/*N*/ lHeight == ((const SvxPagePosSizeItem &)rCmp).lHeight;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPagePosSizeItem::Clone(SfxItemPool *pPool) const
+/*N*/ {
+/*N*/ return new SvxPagePosSizeItem(*this);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, long lW, long lH)
+/*N*/ : SfxPoolItem(SID_RULER_PAGE_POS),
+/*N*/ aPos(rP),
+/*N*/ lWidth(lW),
+/*N*/ lHeight(lH)
+/*N*/ {}
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxPagePosSizeItem::SvxPagePosSizeItem(const SvxPagePosSizeItem &rCpy)
+/*N*/ : SfxPoolItem(rCpy),
+/*N*/ aPos(rCpy.aPos),
+/*N*/ lWidth(rCpy.lWidth),
+/*N*/ lHeight(rCpy.lHeight)
+/*N*/ {}
+
+
+//------------------------------------------------------------------------
+
+/*N*/ void SvxColumnItem::DeleteAndDestroyColumns()
+/*N*/ {
+/*N*/ for( USHORT i = aColumns.Count(); i>0; )
+/*N*/ {
+/*N*/ SvxColumnDescription *pTmp = (SvxColumnDescription *)aColumns[--i];
+/*N*/ aColumns.Remove( i );
+/*N*/ delete pTmp;
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ int SvxColumnItem::operator==(const SfxPoolItem& rCmp) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return TRUE;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxColumnItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxColumnItem(*this);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxColumnItem::SvxColumnItem( USHORT nAct ) :
+/*N*/
+/*N*/ SfxPoolItem( SID_RULER_BORDERS ),
+/*N*/
+/*N*/ nActColumn ( nAct ),
+/*N*/ nLeft ( 0 ),
+/*N*/ nRight ( 0 ),
+/*N*/ bTable ( FALSE )
+/*N*/
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxColumnItem::SvxColumnItem( const SvxColumnItem& rCopy ) :
+/*N*/
+/*N*/ SfxPoolItem( rCopy ),
+/*N*/
+/*N*/ nActColumn( rCopy.nActColumn ),
+/*N*/ nLeft ( rCopy.nLeft ),
+/*N*/ nRight ( rCopy.nRight ),
+/*N*/ bTable ( rCopy.bTable ),
+/*N*/ aColumns ( (BYTE)rCopy.Count() )
+/*N*/
+/*N*/ {
+/*N*/ const USHORT nCount = rCopy.Count();
+/*N*/
+/*N*/ for ( USHORT i = 0; i < nCount; ++i )
+/*N*/ Append( rCopy[i] );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxColumnItem::~SvxColumnItem()
+/*N*/ {
+/*N*/ DeleteAndDestroyColumns();
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxObjectItem::SvxObjectItem( long nSX, long nEX,
+/*N*/ long nSY, long nEY, BOOL limits ) :
+/*N*/
+/*N*/ SfxPoolItem( SID_RULER_OBJECT ),
+/*N*/
+/*N*/ nStartX ( nSX ),
+/*N*/ nEndX ( nEX ),
+/*N*/ nStartY ( nSY ),
+/*N*/ nEndY ( nEY ),
+/*N*/ bLimits ( limits )
+/*N*/
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/dialog/svx_sdstring.src b/binfilter/bf_svx/source/dialog/svx_sdstring.src
new file mode 100644
index 000000000000..e71896bad90b
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_sdstring.src
@@ -0,0 +1,3957 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+ // include ------------------------------------------------------------------
+#include "dialogs.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // Strings fuer die Draw-Dialoge --------------------------------------------
+
+String RID_SVXSTR_GRADIENT
+{
+ Text [ de ] = "Farbverlauf" ;
+ Text [ en-US ] = "Gradient" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Gradação";
+ Text[ ru ] = "Градиент";
+ Text[ el ] = "~Διαβάθ. χÏώματος";
+ Text[ nl ] = "Kleurovergangen";
+ Text[ fr ] = "Dégradé";
+ Text[ es ] = "Gradiente";
+ Text[ fi ] = "Liukuvärjäys";
+ Text[ ca ] = "Gradient de color";
+ Text[ it ] = "Sfumatura";
+ Text[ sk ] = "Prechod";
+ Text[ da ] = "Farvegraduering";
+ Text[ sv ] = "Färggradient";
+ Text[ pl ] = "Gradient";
+ Text[ pt-BR ] = "Gradiente";
+ Text[ th ] = "ไล่ระดับสี";
+ Text[ ja ] = "グラデーション";
+ Text[ ko ] = "ê·¸ë¼ë””언트";
+ Text[ zh-CN ] = "彩色图案";
+ Text[ zh-TW ] = "彩色圖案";
+ Text[ tr ] = "Gradyan";
+ Text[ hi-IN ] = "गà¥à¤°à¥‡à¤¡à¤¿à¤à¤¨à¥à¤Ÿà¥";
+ Text[ ar ] = "تدرج اللون";
+ Text[ he ] = "Farbverlauf";
+};
+
+String RID_SVXSTR_BITMAP
+{
+ Text [ de ] = "Bitmap" ;
+ Text [ en-US ] = "Bitmap" ;
+ Text[ pt ] = "Bitmap";
+ Text[ ru ] = "РаÑÑ‚Ñ€";
+ Text[ el ] = "Bitmap";
+ Text[ nl ] = "Bitmap";
+ Text[ fr ] = "Bitmap";
+ Text[ es ] = "Mapa de bits";
+ Text[ fi ] = "Bittikartta";
+ Text[ ca ] = "Mapa de bits";
+ Text[ it ] = "Bitmap";
+ Text[ sk ] = "Bitová mapa";
+ Text[ da ] = "Bitmap";
+ Text[ sv ] = "Bitmap";
+ Text[ pl ] = "Mapa bitowa";
+ Text[ pt-BR ] = "Bitmap";
+ Text[ th ] = "บิทà¹à¸¡à¹‡à¸›";
+ Text[ ja ] = "ビットマップ";
+ Text[ ko ] = "비트맵";
+ Text[ zh-CN ] = "ä½å›¾";
+ Text[ zh-TW ] = "點陣圖";
+ Text[ tr ] = "Bitmap";
+ Text[ hi-IN ] = "बिटमॉपà¥";
+ Text[ ar ] = "صورة نقطية";
+ Text[ he ] = "Bitmap";
+};
+
+String RID_SVXSTR_LINESTYLE
+{
+ Text [ de ] = "Linienstil" ;
+ Text [ en-US ] = "Line Style" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Estilo de linha";
+ Text[ ru ] = "Стиль линии";
+ Text[ el ] = "Στυλ γÏαμμής";
+ Text[ nl ] = "Lijntype";
+ Text[ fr ] = "Style de ligne";
+ Text[ es ] = "Estilo de línea";
+ Text[ fi ] = "Viivatyyli";
+ Text[ ca ] = "Estil de línia";
+ Text[ it ] = "Stile linea";
+ Text[ sk ] = "Å týl Äiary";
+ Text[ da ] = "Stregtype";
+ Text[ sv ] = "Linjestil";
+ Text[ pl ] = "Styl linii";
+ Text[ pt-BR ] = "Estilo da Linha";
+ Text[ th ] = "ลัà¸à¸©à¸“ะเส้น";
+ Text[ ja ] = "線スタイル";
+ Text[ ko ] = "ì„  스타ì¼";
+ Text[ zh-CN ] = "线æ¡å¼æ ·";
+ Text[ zh-TW ] = "ç·šæ¢å¼æ¨£";
+ Text[ tr ] = "Çizgi biçimi";
+ Text[ hi-IN ] = "रेखा शैली";
+ Text[ ar ] = "نمط الخط";
+ Text[ he ] = "‮סגנון קו‬";
+};
+
+String RID_SVXSTR_COLOR
+{
+ Text [ de ] = "Farbe" ;
+ Text [ en-US ] = "Color" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Cor";
+ Text[ ru ] = "Цвет";
+ Text[ el ] = "ΧÏώμα";
+ Text[ nl ] = "Kleur";
+ Text[ fr ] = "Couleur";
+ Text[ es ] = "Color";
+ Text[ fi ] = "Väri";
+ Text[ ca ] = "Color";
+ Text[ it ] = "Colore";
+ Text[ sk ] = "Farba";
+ Text[ da ] = "Farve";
+ Text[ sv ] = "Färg";
+ Text[ pl ] = "Kolor";
+ Text[ pt-BR ] = "Cor";
+ Text[ th ] = "สี";
+ Text[ ja ] = "色";
+ Text[ ko ] = "색ìƒ";
+ Text[ zh-CN ] = "颜色";
+ Text[ zh-TW ] = "é¡è‰²";
+ Text[ tr ] = "Renk";
+ Text[ hi-IN ] = "रंग";
+ Text[ ar ] = "اللون";
+ Text[ he ] = "‮צבע‬";
+};
+String RID_SVXSTR_HATCH
+{
+ Text [ de ] = "Schraffur" ;
+ Text [ en-US ] = "Hatching" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Tracejado";
+ Text[ ru ] = "Штриховка";
+ Text[ el ] = "ΓÏαμμοσκιά";
+ Text[ nl ] = "Arcering";
+ Text[ fr ] = "Hachure";
+ Text[ es ] = "Trama";
+ Text[ fi ] = "Viivoitus";
+ Text[ ca ] = "Ombreig";
+ Text[ it ] = "Tratteggio";
+ Text[ sk ] = "Å rafovanie";
+ Text[ da ] = "Skravering";
+ Text[ sv ] = "Skraffering";
+ Text[ pl ] = "Kreskowanie";
+ Text[ pt-BR ] = "Hachurado";
+ Text[ th ] = "à¹à¸£à¹€à¸‡à¸²";
+ Text[ ja ] = "ãƒãƒƒãƒãƒ³ã‚°";
+ Text[ ko ] = "í•´ì¹­";
+ Text[ zh-CN ] = "阴影线";
+ Text[ zh-TW ] = "陰影線";
+ Text[ tr ] = "Tarama";
+ Text[ hi-IN ] = "हाचिंग";
+ Text[ ar ] = "نقش";
+ Text[ he ] = "Schraffur";
+};
+
+String RID_SVXSTR_LINEEND
+{
+ Text [ de ] = "Linienende" ;
+ Text [ en-US ] = "Arrowheads" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Fim de linha";
+ Text[ ru ] = "Стили Ñтрелок";
+ Text[ el ] = "Τέλος γÏαμμής";
+ Text[ nl ] = "Lijnuiteinde";
+ Text[ fr ] = "Extrémité de ligne";
+ Text[ es ] = "Fines de línea";
+ Text[ fi ] = "Nuolenkärjet";
+ Text[ ca ] = "Extrems de la fletxa";
+ Text[ it ] = "Estremità linea";
+ Text[ sk ] = "Kótovacie šípky";
+ Text[ da ] = "Pile";
+ Text[ sv ] = "Linjeslut";
+ Text[ pl ] = "Groty strzałek";
+ Text[ pt-BR ] = "Terminações de linha";
+ Text[ th ] = "หัวลูà¸à¸¨à¸£";
+ Text[ ja ] = "ç·šã®çµ‚点";
+ Text[ ko ] = "화살표 모양";
+ Text[ zh-CN ] = "线æ¡ç®­å¤´";
+ Text[ zh-TW ] = "ç·šæ¢ç®­é ­";
+ Text[ tr ] = "Çizgi ucu";
+ Text[ hi-IN ] = "तीर की चोटी";
+ Text[ ar ] = "نهاية الخط";
+ Text[ he ] = "Linienende";
+};
+
+String RID_SVXSTR_BLACK
+{
+ Text [ de ] = "Schwarz" ;
+ Text [ en-US ] = "Black" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Preto";
+ Text[ ru ] = "Черный";
+ Text[ el ] = "ΜαÏÏο";
+ Text[ nl ] = "Zwart";
+ Text[ fr ] = "Noir";
+ Text[ es ] = "Negro";
+ Text[ fi ] = "Musta";
+ Text[ ca ] = "Negre";
+ Text[ it ] = "Nero";
+ Text[ sk ] = "ÄŒierna";
+ Text[ da ] = "Sort";
+ Text[ sv ] = "Svart";
+ Text[ pl ] = "Czarny";
+ Text[ pt-BR ] = "Preto";
+ Text[ th ] = "ดำ";
+ Text[ ja ] = "é»’";
+ Text[ ko ] = "ê²€ì€ìƒ‰";
+ Text[ zh-CN ] = "黑色";
+ Text[ zh-TW ] = "黑色";
+ Text[ tr ] = "Siyah";
+ Text[ hi-IN ] = "काला";
+ Text[ ar ] = "أسود";
+ Text[ he ] = "Schwarz";
+};
+String RID_SVXSTR_BLUE
+{
+ Text [ de ] = "Blau" ;
+ Text [ en-US ] = "Blue" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Azul";
+ Text[ ru ] = "Синий";
+ Text[ el ] = "Μπλε";
+ Text[ nl ] = "Blauw";
+ Text[ fr ] = "Bleu";
+ Text[ es ] = "Azul";
+ Text[ fi ] = "Sininen";
+ Text[ ca ] = "Blau";
+ Text[ it ] = "Blu";
+ Text[ sk ] = "Modrá";
+ Text[ da ] = "Blå";
+ Text[ sv ] = "Blått";
+ Text[ pl ] = "Niebieski";
+ Text[ pt-BR ] = "Azul";
+ Text[ th ] = "น้ำเงิน";
+ Text[ ja ] = "é’";
+ Text[ ko ] = "청색";
+ Text[ zh-CN ] = "è“色";
+ Text[ zh-TW ] = "è—色";
+ Text[ tr ] = "Mavi";
+ Text[ hi-IN ] = "नीला";
+ Text[ ar ] = "أزرق";
+ Text[ he ] = "Blau";
+};
+String RID_SVXSTR_GREEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Grün : Gr³n */
+ /* ### ACHTUNG: Neuer Text in Resource? Grün : Gr³n */
+ Text [ de ] = "Grün" ;
+ Text [ en-US ] = "Green" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Verde";
+ Text[ ru ] = "Зеленый";
+ Text[ el ] = "ΠÏάσινο";
+ Text[ nl ] = "Groen";
+ Text[ fr ] = "Vert";
+ Text[ es ] = "Verde";
+ Text[ fi ] = "Vihreä";
+ Text[ ca ] = "Verd";
+ Text[ it ] = "Verde";
+ Text[ sk ] = "Zelená";
+ Text[ da ] = "Grøn";
+ Text[ sv ] = "Grönt";
+ Text[ pl ] = "Zielony";
+ Text[ pt-BR ] = "Verde";
+ Text[ th ] = "เขียว";
+ Text[ ja ] = "ç·‘";
+ Text[ ko ] = "녹색";
+ Text[ zh-CN ] = "绿色";
+ Text[ zh-TW ] = "綠色";
+ Text[ tr ] = "YeÅŸil";
+ Text[ hi-IN ] = "हरा";
+ Text[ ar ] = "أخضر";
+ Text[ he ] = "Grün";
+};
+String RID_SVXSTR_CYAN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Türkis : T³rkis */
+ /* ### ACHTUNG: Neuer Text in Resource? Türkis : T³rkis */
+ Text [ de ] = "Türkis" ;
+ Text [ en-US ] = "Turquoise" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Turquesa";
+ Text[ ru ] = "Бирюзовый";
+ Text[ el ] = "ΤυÏκουάζ";
+ Text[ nl ] = "Turkoois";
+ Text[ fr ] = "Turquoise";
+ Text[ es ] = "Turquesa";
+ Text[ fi ] = "Turkoosi";
+ Text[ ca ] = "Turquesa";
+ Text[ it ] = "Ciano";
+ Text[ sk ] = "Tyrkysová";
+ Text[ da ] = "Turkis";
+ Text[ sv ] = "Turkost";
+ Text[ pl ] = "Turkusowy";
+ Text[ pt-BR ] = "Turquesa";
+ Text[ th ] = "ฟ้า";
+ Text[ ja ] = "é’ç·‘";
+ Text[ ko ] = "ì²­ë¡ìƒ‰";
+ Text[ zh-CN ] = "è“绿色";
+ Text[ zh-TW ] = "è—玉色";
+ Text[ tr ] = "Turkuaz";
+ Text[ hi-IN ] = "टरà¥à¤•à¥‹à¤‡à¤¸";
+ Text[ ar ] = "تركواز";
+ Text[ he ] = "Türkis";
+};
+String RID_SVXSTR_RED
+{
+ Text [ de ] = "Rot" ;
+ Text [ en-US ] = "Red" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Vermelho";
+ Text[ ru ] = "КраÑный";
+ Text[ el ] = "Κόκκινο";
+ Text[ nl ] = "Rood";
+ Text[ fr ] = "Rouge";
+ Text[ es ] = "Rojo";
+ Text[ fi ] = "Punainen";
+ Text[ ca ] = "Vermell";
+ Text[ it ] = "Rosso";
+ Text[ sk ] = "Červená";
+ Text[ da ] = "Rød";
+ Text[ sv ] = "Rött";
+ Text[ pl ] = "Czerwony";
+ Text[ pt-BR ] = "Vermelho";
+ Text[ th ] = "à¹à¸”ง";
+ Text[ ja ] = "赤";
+ Text[ ko ] = "ì ìƒ‰";
+ Text[ zh-CN ] = "红色";
+ Text[ zh-TW ] = "紅色";
+ Text[ tr ] = "Kırmızı";
+ Text[ hi-IN ] = "लाल";
+ Text[ ar ] = "أحمر";
+ Text[ he ] = "Rot";
+};
+String RID_SVXSTR_MAGENTA
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Magenta : Violett */
+ Text [ de ] = "Magenta" ;
+ Text [ en-US ] = "Magenta" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Violeta";
+ Text[ ru ] = "Пурпурный";
+ Text[ el ] = "Ματζέντα";
+ Text[ nl ] = "Violet";
+ Text[ fr ] = "Magenta";
+ Text[ es ] = "Magenta";
+ Text[ fi ] = "Magenta";
+ Text[ ca ] = "Magenta";
+ Text[ it ] = "Magenta";
+ Text[ sk ] = "Purpurová";
+ Text[ da ] = "Magenta";
+ Text[ sv ] = "Magenta";
+ Text[ pl ] = "Purpurowy";
+ Text[ pt-BR ] = "Magenta";
+ Text[ th ] = "ม่วง";
+ Text[ ja ] = "マゼンタ";
+ Text[ ko ] = "ì„ í™ìƒ‰";
+ Text[ zh-CN ] = "紫红色";
+ Text[ zh-TW ] = "紫紅色";
+ Text[ tr ] = "Mor";
+ Text[ hi-IN ] = "मेजनà¥à¤Ÿà¤¾";
+ Text[ ar ] = "أرجواني";
+ Text[ he ] = "Magenta";
+};
+String RID_SVXSTR_BROWN
+{
+ Text [ de ] = "Braun" ;
+ Text [ en-US ] = "Brown" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Castanho";
+ Text[ ru ] = "Коричневый";
+ Text[ el ] = "Καφέ";
+ Text[ nl ] = "Bruin";
+ Text[ fr ] = "Marron";
+ Text[ es ] = "Marrón";
+ Text[ fi ] = "Ruskea";
+ Text[ ca ] = "Marró";
+ Text[ it ] = "Marrone";
+ Text[ sk ] = "Hnedá";
+ Text[ da ] = "Brun";
+ Text[ sv ] = "Brunt";
+ Text[ pl ] = "BrÄ…zowy";
+ Text[ pt-BR ] = "Marrom";
+ Text[ th ] = "น้ำตาล";
+ Text[ ja ] = "茶色";
+ Text[ ko ] = "갈색";
+ Text[ zh-CN ] = "棕色";
+ Text[ zh-TW ] = "棕色";
+ Text[ tr ] = "Kahverengi";
+ Text[ hi-IN ] = "भूरा";
+ Text[ ar ] = "بني";
+ Text[ he ] = "Braun";
+};
+String RID_SVXSTR_GREY
+{
+ Text [ de ] = "Grau" ;
+ Text [ en-US ] = "Gray" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Cinzento";
+ Text[ ru ] = "Серый";
+ Text[ el ] = "ΓκÏι";
+ Text[ nl ] = "Grijs";
+ Text[ fr ] = "Gris";
+ Text[ es ] = "Gris";
+ Text[ fi ] = "Harmaa";
+ Text[ ca ] = "Gris";
+ Text[ it ] = "Grigio";
+ Text[ sk ] = "Šedá";
+ Text[ da ] = "Grå";
+ Text[ sv ] = "Grått";
+ Text[ pl ] = "Szary";
+ Text[ pt-BR ] = "Cinza";
+ Text[ th ] = "เทา";
+ Text[ ja ] = "ç°è‰²";
+ Text[ ko ] = "회색";
+ Text[ zh-CN ] = "ç°è‰²";
+ Text[ zh-TW ] = "ç°è‰²";
+ Text[ tr ] = "Gri";
+ Text[ hi-IN ] = "गà¥à¤°à¥‡";
+ Text[ ar ] = "رمادي";
+ Text[ he ] = "Grau";
+};
+String RID_SVXSTR_LIGHTGREY
+{
+ Text [ de ] = "Hellgrau" ;
+ Text [ en-US ] = "Light gray" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Cinzento-claro";
+ Text[ ru ] = "Светло-Ñерый";
+ Text[ el ] = "Ανοιχτό γκÏι";
+ Text[ nl ] = "Lichtgrijs";
+ Text[ fr ] = "Gris clair";
+ Text[ es ] = "Gris claro";
+ Text[ fi ] = "Kirkas harmaa";
+ Text[ ca ] = "Gris clar";
+ Text[ it ] = "Grigio chiaro";
+ Text[ sk ] = "Svetlo sivá";
+ Text[ da ] = "Lysegrå";
+ Text[ sv ] = "Ljusgrått";
+ Text[ pl ] = "Jasnoszary";
+ Text[ pt-BR ] = "Cinza claro";
+ Text[ th ] = "เทาอ่อน";
+ Text[ ja ] = "明るã„ç°è‰²";
+ Text[ ko ] = "ë°ì€ 회색";
+ Text[ zh-CN ] = "æµ…ç°è‰²";
+ Text[ zh-TW ] = "æ·ºç°è‰²";
+ Text[ tr ] = "Açık gri";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ गà¥à¤°à¥‡";
+ Text[ ar ] = "رمادي Ùاتح";
+ Text[ he ] = "Hellgrau";
+};
+String RID_SVXSTR_LIGHTBLUE
+{
+ Text [ de ] = "Hellblau" ;
+ Text [ en-US ] = "Light blue" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Azul-claro";
+ Text[ ru ] = "Светло-Ñиний";
+ Text[ el ] = "Ανοιχτό μπλε";
+ Text[ nl ] = "Lichtblauw";
+ Text[ fr ] = "Bleu clair";
+ Text[ es ] = "Azul claro";
+ Text[ fi ] = "Kirkas sininen";
+ Text[ ca ] = "Blau clar";
+ Text[ it ] = "Blu chiaro";
+ Text[ sk ] = "Svetlo modrá";
+ Text[ da ] = "Lyseblå";
+ Text[ sv ] = "Ljusblått";
+ Text[ pl ] = "Błękitny";
+ Text[ pt-BR ] = "Azul claro";
+ Text[ th ] = "น้ำเงินอ่อน";
+ Text[ ja ] = "明るã„é’";
+ Text[ ko ] = "ë°ì€ 청색";
+ Text[ zh-CN ] = "æµ…è“色";
+ Text[ zh-TW ] = "æ·ºè—色";
+ Text[ tr ] = "Açık mavi";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ नीला";
+ Text[ ar ] = "أزرق Ùاتح";
+ Text[ he ] = "Hellblau";
+};
+String RID_SVXSTR_LIGHTGREEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hellgrün : Hellgr³n */
+ /* ### ACHTUNG: Neuer Text in Resource? Hellgrün : Hellgr³n */
+ Text [ de ] = "Hellgrün" ;
+ Text [ en-US ] = "Light green" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Verde-claro";
+ Text[ ru ] = "Светло-зеленый";
+ Text[ el ] = "Ανοιχτό Ï€Ïάσινο";
+ Text[ nl ] = "Lichtgroen";
+ Text[ fr ] = "Vert clair";
+ Text[ es ] = "Verde claro";
+ Text[ fi ] = "Kirkas vihreä";
+ Text[ ca ] = "Verd clar";
+ Text[ it ] = "Verde chiaro";
+ Text[ sk ] = "Svetlo zelená";
+ Text[ da ] = "Lysegrøn";
+ Text[ sv ] = "Ljusgrönt";
+ Text[ pl ] = "Jasnozielony";
+ Text[ pt-BR ] = "Verde claro";
+ Text[ th ] = "เขียวอ่อน";
+ Text[ ja ] = "明るã„ç·‘";
+ Text[ ko ] = "ë°ì€ 녹색";
+ Text[ zh-CN ] = "浅绿色";
+ Text[ zh-TW ] = "淺綠色";
+ Text[ tr ] = "Açık yeşil";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ हरा";
+ Text[ ar ] = "أخضر Ùاتح";
+ Text[ he ] = "Hellgrün";
+};
+String RID_SVXSTR_LIGHTCYAN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Helltürkis : Hellt³rkis */
+ /* ### ACHTUNG: Neuer Text in Resource? Helltürkis : Hellt³rkis */
+ Text [ de ] = "Helltürkis" ;
+ Text [ en-US ] = "Light cyan" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Turquesa-claro";
+ Text[ ru ] = "Светло-бирюзовый";
+ Text[ el ] = "Ανοιχτό κυανό";
+ Text[ nl ] = "Licht turkoois";
+ Text[ fr ] = "Turquoise clair";
+ Text[ es ] = "Turquesa claro";
+ Text[ fi ] = "Kirkas syaani";
+ Text[ ca ] = "Cian clar";
+ Text[ it ] = "Ciano chiaro";
+ Text[ sk ] = "Svetlo modrozelená";
+ Text[ da ] = "Lys turkis";
+ Text[ sv ] = "Ljusturkost";
+ Text[ pl ] = "Jasnoseledynowy";
+ Text[ pt-BR ] = "Ciano claro";
+ Text[ th ] = "ฟ้าอ่อน";
+ Text[ ja ] = "明るã„é’ç·‘";
+ Text[ ko ] = "ë°ì€ ì²­ë¡ìƒ‰";
+ Text[ zh-CN ] = "æµ…è“绿色";
+ Text[ zh-TW ] = "æ·ºè—綠色";
+ Text[ tr ] = "Açık turkuaz";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ सियान";
+ Text[ ar ] = "تركواز Ùاتح";
+ Text[ he ] = "Helltürkis";
+};
+String RID_SVXSTR_LIGHTRED
+{
+ Text [ de ] = "Hellrot" ;
+ Text [ en-US ] = "Light red" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Vermelho-claro";
+ Text[ ru ] = "Светло-краÑный";
+ Text[ el ] = "Ανοιχτό κόκκινο";
+ Text[ nl ] = "Lichtrood";
+ Text[ fr ] = "Rouge clair";
+ Text[ es ] = "Rojo claro";
+ Text[ fi ] = "Kirkas punainen";
+ Text[ ca ] = "Vermell clar";
+ Text[ it ] = "Rosso chiaro";
+ Text[ sk ] = "Svetlo Äervená";
+ Text[ da ] = "Lys rød";
+ Text[ sv ] = "Ljusrött";
+ Text[ pl ] = "Jasnoczerwony";
+ Text[ pt-BR ] = "Vermelho claro";
+ Text[ th ] = "à¹à¸”งอ่อน";
+ Text[ ja ] = "明るã„赤";
+ Text[ ko ] = "ë°ì€ ì ìƒ‰";
+ Text[ zh-CN ] = "浅红色";
+ Text[ zh-TW ] = "淺紅色";
+ Text[ tr ] = "Açık kırmızı";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ लाल";
+ Text[ ar ] = "أحمر Ùاتح";
+ Text[ he ] = "Hellrot";
+};
+String RID_SVXSTR_LIGHTMAGENTA
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hellmagenta : Hellviolett */
+ Text [ de ] = "Hellmagenta" ;
+ Text [ en-US ] = "Light magenta" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Violeta-claro";
+ Text[ ru ] = "Светло-пурпурный";
+ Text[ el ] = "Ανοιχτό ματζέντα";
+ Text[ nl ] = "Lichtviolet";
+ Text[ fr ] = "Magenta clair";
+ Text[ es ] = "Magenta claro";
+ Text[ fi ] = "Kirkas magenta";
+ Text[ ca ] = "Magenta clar";
+ Text[ it ] = "Magenta chiaro";
+ Text[ sk ] = "Svetlo purpurová";
+ Text[ da ] = "Lys magenta";
+ Text[ sv ] = "Ljus magenta";
+ Text[ pl ] = "Jasnopurpurowy";
+ Text[ pt-BR ] = "Magenta claro";
+ Text[ th ] = "ม่วงอ่อน";
+ Text[ ja ] = "明るã„マゼンタ";
+ Text[ ko ] = "ë°ì€ ì„ í™ìƒ‰";
+ Text[ zh-CN ] = "浅紫红色";
+ Text[ zh-TW ] = "淺紫紅色";
+ Text[ tr ] = "Eflatun";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ मेजनà¥à¤Ÿà¤¾";
+ Text[ ar ] = "أرجواني Ùاتح";
+ Text[ he ] = "Hellmagenta";
+};
+String RID_SVXSTR_YELLOW
+{
+ Text [ de ] = "Gelb" ;
+ Text [ en-US ] = "Yellow" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Amarelo";
+ Text[ ru ] = "Желтый";
+ Text[ el ] = "ΚίτÏινο";
+ Text[ nl ] = "Geel";
+ Text[ fr ] = "Jaune";
+ Text[ es ] = "Amarillo";
+ Text[ fi ] = "Keltainen";
+ Text[ ca ] = "Groc";
+ Text[ it ] = "Giallo";
+ Text[ sk ] = "Žltá";
+ Text[ da ] = "Gul";
+ Text[ sv ] = "Gult";
+ Text[ pl ] = "Żółty";
+ Text[ pt-BR ] = "Amarelo";
+ Text[ th ] = "เหลือง";
+ Text[ ja ] = "黄色";
+ Text[ ko ] = "황색";
+ Text[ zh-CN ] = "黄色";
+ Text[ zh-TW ] = "黃色";
+ Text[ tr ] = "Sarı";
+ Text[ hi-IN ] = "पीला";
+ Text[ ar ] = "أصÙر";
+ Text[ he ] = "Gelb";
+};
+String RID_SVXSTR_WHITE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Weiß : Wei˜ */
+ /* ### ACHTUNG: Neuer Text in Resource? Weiß : Wei˜ */
+ Text [ de ] = "Weiß" ;
+ Text [ en-US ] = "White" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Branco";
+ Text[ ru ] = "Белый";
+ Text[ el ] = "Λευκό";
+ Text[ nl ] = "Wit";
+ Text[ fr ] = "Blanc";
+ Text[ es ] = "Blanco";
+ Text[ fi ] = "Valkoinen";
+ Text[ ca ] = "Blanc";
+ Text[ it ] = "Bianco";
+ Text[ sk ] = "Biela";
+ Text[ da ] = "Hvid";
+ Text[ sv ] = "Vitt";
+ Text[ pl ] = "Biały";
+ Text[ pt-BR ] = "Branco";
+ Text[ th ] = "ขาว";
+ Text[ ja ] = "白";
+ Text[ ko ] = "í°ìƒ‰";
+ Text[ zh-CN ] = "白色";
+ Text[ zh-TW ] = "白色";
+ Text[ tr ] = "Beyaz";
+ Text[ hi-IN ] = "सफ़ेद";
+ Text[ ar ] = "أبيض";
+ Text[ he ] = "Weiß";
+};
+String RID_SVXSTR_BLUEGREY
+{
+ Text [ de ] = "Blaugrau" ;
+ Text [ en-US ] = "Blue gray" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Azul acizentado";
+ Text[ ru ] = "Сине-Ñерый";
+ Text[ el ] = "Μπλε-γκÏι";
+ Text[ nl ] = "Blauwgrijs";
+ Text[ fr ] = "Gris bleu";
+ Text[ es ] = "Gris azulado";
+ Text[ fi ] = "Siniharmaa";
+ Text[ ca ] = "Gris blavós";
+ Text[ it ] = "Grigioblu";
+ Text[ sk ] = "Modrošedá";
+ Text[ da ] = "Blågrå";
+ Text[ sv ] = "Blågrått";
+ Text[ pl ] = "Szaroniebieski";
+ Text[ pt-BR ] = "Cinza azulado";
+ Text[ th ] = "น้ำเงินเทา";
+ Text[ ja ] = "é’ç°è‰²";
+ Text[ ko ] = "회청색";
+ Text[ zh-CN ] = "è“ç°è‰²";
+ Text[ zh-TW ] = "è—ç°è‰²";
+ Text[ tr ] = "Mavi-gri";
+ Text[ hi-IN ] = "नीला गà¥à¤°à¥‡";
+ Text[ ar ] = "رمادي مزرق";
+ Text[ he ] = "Blaugrau";
+};
+String RID_SVXSTR_ORANGE
+{
+ Text [ de ] = "Orange" ;
+ Text [ en-US ] = "Orange" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Laranja";
+ Text[ ru ] = "Оранжевый";
+ Text[ el ] = "ΠοÏτοκαλί";
+ Text[ nl ] = "Oranje";
+ Text[ fr ] = "Orange";
+ Text[ es ] = "Naranja";
+ Text[ fi ] = "Oranssi";
+ Text[ ca ] = "Taronja";
+ Text[ it ] = "Arancione";
+ Text[ sk ] = "Oranžová";
+ Text[ da ] = "Orange";
+ Text[ sv ] = "Orange";
+ Text[ pl ] = "Pomarańczowy";
+ Text[ pt-BR ] = "Laranja";
+ Text[ th ] = "ส้ม";
+ Text[ ja ] = "橙色";
+ Text[ ko ] = "주황색";
+ Text[ zh-CN ] = "橙色";
+ Text[ zh-TW ] = "桔色";
+ Text[ tr ] = "Turuncu";
+ Text[ hi-IN ] = "नारंगी";
+ Text[ ar ] = "برتقالي";
+ Text[ he ] = "Orange";
+};
+String RID_SVXSTR_ARROW
+{
+ Text [ de ] = "Pfeil" ;
+ Text [ en-US ] = "Arrow" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Seta";
+ Text[ ru ] = "Стрелка";
+ Text[ el ] = "Βέλος";
+ Text[ nl ] = "Pijl";
+ Text[ fr ] = "Flèche";
+ Text[ es ] = "Flecha";
+ Text[ fi ] = "Nuoli";
+ Text[ ca ] = "Fletxa";
+ Text[ it ] = "Freccia";
+ Text[ sk ] = "Šípka";
+ Text[ da ] = "Pil";
+ Text[ sv ] = "Pil";
+ Text[ pl ] = "Strzałka";
+ Text[ pt-BR ] = "Seta";
+ Text[ th ] = "ลูà¸à¸¨à¸£";
+ Text[ ja ] = "矢å°";
+ Text[ ko ] = "화살표";
+ Text[ zh-CN ] = "箭头";
+ Text[ zh-TW ] = "ç®­é ­";
+ Text[ tr ] = "Ok";
+ Text[ hi-IN ] = "तीर";
+ Text[ ar ] = "سهم";
+ Text[ he ] = "Pfeil";
+};
+String RID_SVXSTR_SQUARE
+{
+ Text [ de ] = "Quadrat" ;
+ Text [ en-US ] = "Square" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Quadrado";
+ Text[ ru ] = "Квадрат";
+ Text[ el ] = "ΤετÏάγωνο";
+ Text[ nl ] = "Vierkant";
+ Text[ fr ] = "Carré";
+ Text[ es ] = "Cuadrado";
+ Text[ fi ] = "Neliö";
+ Text[ ca ] = "Quadrat";
+ Text[ it ] = "Quadrato";
+ Text[ sk ] = "Å tvorec";
+ Text[ da ] = "Kvadrat";
+ Text[ sv ] = "Kvadrat";
+ Text[ pl ] = "Kwadrat";
+ Text[ pt-BR ] = "Quadrado";
+ Text[ th ] = "สี่เหลี่ยมจัตุรัส";
+ Text[ ja ] = "正方形";
+ Text[ ko ] = "정사ê°í˜•";
+ Text[ zh-CN ] = "正方形";
+ Text[ zh-TW ] = "正方形";
+ Text[ tr ] = "Kare";
+ Text[ hi-IN ] = "सम चतà¥à¤°à¥à¤­à¥à¤œ";
+ Text[ ar ] = "مربع";
+ Text[ he ] = "Quadrat";
+};
+String RID_SVXSTR_CIRCLE
+{
+ Text [ de ] = "Kreis" ;
+ Text [ en-US ] = "Circle" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Círculo";
+ Text[ ru ] = "Круг";
+ Text[ el ] = "ΚÏκλος";
+ Text[ nl ] = "Cirkel";
+ Text[ fr ] = "Cercle";
+ Text[ es ] = "Círculo";
+ Text[ fi ] = "Ympyrä";
+ Text[ ca ] = "Cercle";
+ Text[ it ] = "Cerchio";
+ Text[ sk ] = "Kruh";
+ Text[ da ] = "Cirkel";
+ Text[ sv ] = "Cirkel";
+ Text[ pl ] = "Koło";
+ Text[ pt-BR ] = "Círculo";
+ Text[ th ] = "วงà¸à¸¥à¸¡";
+ Text[ ja ] = "円";
+ Text[ ko ] = "ì›";
+ Text[ zh-CN ] = "圆";
+ Text[ zh-TW ] = "圓形";
+ Text[ tr ] = "Daire";
+ Text[ hi-IN ] = "वृतà¥à¤¤";
+ Text[ ar ] = "دائرة";
+ Text[ he ] = "Kreis";
+};
+
+
+
+
+
+
+
+
+// BM: some additional standard colors
+
+String RID_SVXSTR_VIOLET
+{
+ Text [ de ] = "Lila";
+ Text [ en-US ] = "Violet";
+ Text[ pt ] = "Violeta";
+ Text[ ru ] = "Фиолетовый";
+ Text[ el ] = "Βιολετί";
+ Text[ nl ] = "Lila";
+ Text[ fr ] = "Violet";
+ Text[ es ] = "Violeta";
+ Text[ fi ] = "Violetti";
+ Text[ ca ] = "Violeta";
+ Text[ it ] = "Lilla";
+ Text[ sk ] = "Fialová";
+ Text[ da ] = "Lilla";
+ Text[ sv ] = "Lila";
+ Text[ pl ] = "Fiolet";
+ Text[ pt-BR ] = "Violeta";
+ Text[ th ] = "ม่วง";
+ Text[ ja ] = "ç´«";
+ Text[ ko ] = "ë³´ë¼ìƒ‰";
+ Text[ zh-CN ] = "紫色";
+ Text[ zh-TW ] = "紫色";
+ Text[ tr ] = "MenekÅŸe";
+ Text[ hi-IN ] = "बैंगनी";
+ Text[ ar ] = "بنÙسجي";
+ Text[ he ] = "Lila";
+};
+
+String RID_SVXSTR_BORDEAUX
+{
+ Text [ de ] = "Bordeaux";
+ Text [ en-US ] = "Bordeaux";
+ Text[ pt ] = "Bordeaux";
+ Text[ ru ] = "Бордовый";
+ Text[ el ] = "ΜποÏντό";
+ Text[ nl ] = "Bordeaux";
+ Text[ fr ] = "Bordeaux";
+ Text[ es ] = "Burdeos";
+ Text[ fi ] = "Bordeaux";
+ Text[ ca ] = "Burdeus";
+ Text[ it ] = "Bordeaux";
+ Text[ sk ] = "Tmavo Äervená";
+ Text[ da ] = "Bordeauxrød";
+ Text[ sv ] = "Bordeaux";
+ Text[ pl ] = "Bordowy";
+ Text[ pt-BR ] = "Bordô";
+ Text[ th ] = "บอร์โด";
+ Text[ ja ] = "ãˆã‚“ã˜";
+ Text[ ko ] = "보르ë„";
+ Text[ zh-CN ] = "深红色";
+ Text[ zh-TW ] = "深紅色";
+ Text[ tr ] = "Bordo";
+ Text[ hi-IN ] = "बोरà¥à¤¡à¤¯à¤•à¥à¤¸";
+ Text[ ar ] = "أحمر قانÙ";
+ Text[ he ] = "Bordeaux";
+};
+
+String RID_SVXSTR_PALE_YELLOW
+{
+ Text [ de ] = "Blassgelb";
+ Text [ en-US ] = "Pale yellow";
+ Text[ pt ] = "Amarelo-claro";
+ Text[ ru ] = "Бледно-желтый";
+ Text[ el ] = "Απαλό κίτÏινο";
+ Text[ nl ] = "Geel pastel";
+ Text[ fr ] = "Jaune pâle";
+ Text[ es ] = "Amarillo pastel";
+ Text[ fi ] = "Vaaleankeltainen";
+ Text[ ca ] = "Groc pastel";
+ Text[ it ] = "Giallo chiaro";
+ Text[ sk ] = "Svetložltá";
+ Text[ da ] = "Bleggul";
+ Text[ sv ] = "Blekgul";
+ Text[ pl ] = "Bladożółty";
+ Text[ pt-BR ] = "Amarelo-pálido";
+ Text[ th ] = "เหลืองซีด";
+ Text[ ja ] = "淡黄色";
+ Text[ ko ] = "담황색";
+ Text[ zh-CN ] = "浅黄色";
+ Text[ zh-TW ] = "淺黃色";
+ Text[ tr ] = "Solgun sarı";
+ Text[ hi-IN ] = "फीका पीला";
+ Text[ ar ] = "أصÙر شاحب";
+ Text[ he ] = "Blassgelb";
+};
+
+String RID_SVXSTR_PALE_GREEN
+{
+ Text [ de ] = "Blassgrün";
+ Text [ en-US ] = "Pale green";
+ Text[ pt ] = "Verde-claro";
+ Text[ ru ] = "Бледно-зеленый";
+ Text[ el ] = "Απαλό Ï€Ïάσινο";
+ Text[ nl ] = "Groen pastel";
+ Text[ fr ] = "Vert pâle";
+ Text[ es ] = "Verde pastel";
+ Text[ fi ] = "Vaaleanvihreä";
+ Text[ ca ] = "Verd pastel";
+ Text[ it ] = "Verde chiaro";
+ Text[ sk ] = "Svetlozelená";
+ Text[ da ] = "Bleggrøn";
+ Text[ sv ] = "Blekgrön";
+ Text[ pl ] = "Bladozielony";
+ Text[ pt-BR ] = "Verde-pálido";
+ Text[ th ] = "เขียวซีด";
+ Text[ ja ] = "æ·¡ç·‘";
+ Text[ ko ] = "담녹색";
+ Text[ zh-CN ] = "淡绿色";
+ Text[ zh-TW ] = "淺綠色";
+ Text[ tr ] = "Solgun yeÅŸil";
+ Text[ hi-IN ] = "फीका हरा";
+ Text[ ar ] = "أخضر شاحب";
+ Text[ he ] = "Blassgrün";
+};
+
+String RID_SVXSTR_DKVIOLET
+{
+ Text [ de ] = "Dunkellila";
+ Text [ en-US ] = "Dark violet";
+ Text[ pt ] = "Violeta escuro";
+ Text[ ru ] = "Темно-фиолетовый";
+ Text[ el ] = "ΣκοÏÏο βιολετί";
+ Text[ nl ] = "Donkepaars";
+ Text[ fr ] = "Violet foncé";
+ Text[ es ] = "Violeta oscuro";
+ Text[ fi ] = "Tummanvioletti";
+ Text[ ca ] = "Violeta fosc";
+ Text[ it ] = "Lilla scuro";
+ Text[ sk ] = "Tmavo fialová";
+ Text[ da ] = "Mørkelilla";
+ Text[ sv ] = "Mörklila";
+ Text[ pl ] = "Ciemny fiolet";
+ Text[ pt-BR ] = "Violeta escuro";
+ Text[ th ] = "ม่วงเข้ม";
+ Text[ ja ] = "濃紫";
+ Text[ ko ] = "진보ë¼ìƒ‰";
+ Text[ zh-CN ] = "深紫色";
+ Text[ zh-TW ] = "深紫色";
+ Text[ tr ] = "Koyu lila";
+ Text[ hi-IN ] = "गहरा नीला";
+ Text[ ar ] = "بنÙسجي غامق";
+ Text[ he ] = "Dunkellila";
+};
+
+String RID_SVXSTR_SALMON
+{
+ Text [ de ] = "Lachs";
+ Text [ en-US ] = "Salmon";
+ Text[ pt ] = "Salmão";
+ Text[ ru ] = "Ðлый";
+ Text[ el ] = "Σομόν";
+ Text[ nl ] = "Zalmkleur";
+ Text[ fr ] = "Saumon";
+ Text[ es ] = "Salmón";
+ Text[ fi ] = "Lohisuomu";
+ Text[ ca ] = "Salmó";
+ Text[ it ] = "Salmone";
+ Text[ sk ] = "Lososová";
+ Text[ da ] = "Laksefarvet";
+ Text[ sv ] = "Lax";
+ Text[ pl ] = "Åososiowy";
+ Text[ pt-BR ] = "Salmão";
+ Text[ th ] = "ชมพู";
+ Text[ ja ] = "サーモンピンク";
+ Text[ ko ] = "연어 살색";
+ Text[ zh-CN ] = "橙红色";
+ Text[ zh-TW ] = "橙紅色";
+ Text[ tr ] = "Somon";
+ Text[ hi-IN ] = "नारंगी";
+ Text[ ar ] = "قرنÙلي";
+ Text[ he ] = "Lachs";
+};
+
+String RID_SVXSTR_SEABLUE
+{
+ Text [ de ] = "Seeblau";
+ Text [ en-US ] = "Sea blue";
+ Text[ pt ] = "Azul marinho";
+ Text[ ru ] = "МорÑÐºÐ°Ñ Ð²Ð¾Ð»Ð½Ð°";
+ Text[ el ] = "Γαλάζιο";
+ Text[ nl ] = "Azuurblauw";
+ Text[ fr ] = "Azur";
+ Text[ es ] = "Azul marino";
+ Text[ fi ] = "Merensininen";
+ Text[ ca ] = "Blau marí";
+ Text[ it ] = "Blu mare";
+ Text[ sk ] = "Námornícka modrá";
+ Text[ da ] = "Azurblå";
+ Text[ sv ] = "Havsblå";
+ Text[ pl ] = "Lazurowy";
+ Text[ pt-BR ] = "Azul marinho";
+ Text[ th ] = "น้ำเงินทะเล";
+ Text[ ja ] = "æµ·ã®é’";
+ Text[ ko ] = "심청색";
+ Text[ zh-CN ] = "æ¹–è“色";
+ Text[ zh-TW ] = "æµ·æ°´è—";
+ Text[ tr ] = "Deniz mavisi";
+ Text[ hi-IN ] = "समà¥à¤¦à¥à¤°à¥€ नीला";
+ Text[ ar ] = "أزرق نيلي";
+ Text[ he ] = "Seeblau";
+};
+
+String RID_SVXSTR_COLOR_SUN
+{
+ // attention: this is the color string for the Sun Microsystems specific colors !!!
+ Text [ de ] = "Sun";
+ Text [ en-US ] = "Sun" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Sun";
+ Text[ ru ] = "Sun";
+ Text[ el ] = "Sun";
+ Text[ nl ] = "Sun";
+ Text[ fr ] = "Sun";
+ Text[ es ] = "Sun";
+ Text[ fi ] = "Aurinko";
+ Text[ ca ] = "Sun";
+ Text[ it ] = "Sun";
+ Text[ sk ] = "Sun modrá";
+ Text[ da ] = "Sun";
+ Text[ sv ] = "Sun";
+ Text[ pl ] = "Sun";
+ Text[ pt-BR ] = "Sun";
+ Text[ th ] = "ซัน";
+ Text[ ja ] = "Sun";
+ Text[ ko ] = "Sun";
+ Text[ zh-CN ] = "Sun";
+ Text[ zh-TW ] = "Sun";
+ Text[ tr ] = "Sun";
+ Text[ hi-IN ] = "Sun";
+ Text[ ar ] = "Sun";
+ Text[ he ] = "Sun";
+};
+
+String RID_SVXSTR_TBLAFMT_3D
+{
+ Text [ de ] = "3D";
+ Text [ en-US ] = "3D";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "3D";
+ Text[ ru ] = "Трехмерный";
+ Text[ el ] = "3Δ";
+ Text[ nl ] = "3D";
+ Text[ fr ] = "3D";
+ Text[ es ] = "3D";
+ Text[ fi ] = "Kolmiulotteinen";
+ Text[ ca ] = "3D";
+ Text[ it ] = "3D";
+ Text[ sk ] = "3D";
+ Text[ da ] = "3D";
+ Text[ sv ] = "3D";
+ Text[ pl ] = "3D";
+ Text[ pt-BR ] = "3D";
+ Text[ th ] = "3มิติ";
+ Text[ ja ] = "3D";
+ Text[ ko ] = "3D";
+ Text[ zh-CN ] = "3 ç»´";
+ Text[ zh-TW ] = "3D";
+ Text[ tr ] = "3B";
+ Text[ hi-IN ] = "3D";
+ Text[ ar ] = "ثلاثي الأبعاد";
+ Text[ he ] = "3D";
+};
+String RID_SVXSTR_TBLAFMT_BLACK1
+{
+ Text [ de ] = "Schwarz 1";
+ Text [ en-US ] = "Black 1";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Preto 1";
+ Text[ ru ] = "Черный 1";
+ Text[ el ] = "ΜαÏÏο 1";
+ Text[ nl ] = "Zwart 1";
+ Text[ fr ] = "Noir 1";
+ Text[ es ] = "Negro 1";
+ Text[ fi ] = "Musta 1";
+ Text[ ca ] = "Negre 1";
+ Text[ it ] = "Nero 1";
+ Text[ sk ] = "ÄŒierna 1";
+ Text[ da ] = "Sort 1";
+ Text[ sv ] = "Svart 1";
+ Text[ pl ] = "Czarny 1";
+ Text[ pt-BR ] = "Preto 1";
+ Text[ th ] = "ดำ 1";
+ Text[ ja ] = "é»’ 1";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 1";
+ Text[ zh-CN ] = "黑色 1";
+ Text[ zh-TW ] = "黑色 1";
+ Text[ tr ] = "Siyah 1";
+ Text[ hi-IN ] = "काला 1";
+ Text[ ar ] = "أسود 1";
+ Text[ he ] = "Schwarz 1";
+};
+String RID_SVXSTR_TBLAFMT_BLACK2
+{
+ Text [ de ] = "Schwarz 2";
+ Text [ en-US ] = "Black 2";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Preto 2";
+ Text[ ru ] = "Черный 2";
+ Text[ el ] = "ΜαÏÏο 2";
+ Text[ nl ] = "Zwart 2";
+ Text[ fr ] = "Noir 2";
+ Text[ es ] = "Negro 2";
+ Text[ fi ] = "Musta 2";
+ Text[ ca ] = "Negre 2";
+ Text[ it ] = "Nero 2";
+ Text[ sk ] = "ÄŒierna 2";
+ Text[ da ] = "Sort 2";
+ Text[ sv ] = "Svart 2";
+ Text[ pl ] = "Czarny 2";
+ Text[ pt-BR ] = "Preto 2";
+ Text[ th ] = "ดำ 2";
+ Text[ ja ] = "é»’ 2";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 2";
+ Text[ zh-CN ] = "黑色 2";
+ Text[ zh-TW ] = "黑色 2";
+ Text[ tr ] = "Siyah 2";
+ Text[ hi-IN ] = "काला 2";
+ Text[ ar ] = "أسود 2";
+ Text[ he ] = "Schwarz 2";
+};
+String RID_SVXSTR_TBLAFMT_BLUE
+{
+ Text [ de ] = "Blau";
+ Text [ en-US ] = "Blue";
+ Text[ pt ] = "Azul";
+ Text[ ru ] = "Синий";
+ Text[ el ] = "Μπλε";
+ Text[ nl ] = "Blauw";
+ Text[ fr ] = "Bleu";
+ Text[ es ] = "Azul";
+ Text[ fi ] = "Sininen";
+ Text[ ca ] = "Blau";
+ Text[ it ] = "Blu";
+ Text[ sk ] = "Modrá";
+ Text[ da ] = "Blå";
+ Text[ sv ] = "Blått";
+ Text[ pl ] = "Niebieski";
+ Text[ pt-BR ] = "Azul";
+ Text[ th ] = "น้ำเงิน";
+ Text[ ja ] = "é’";
+ Text[ ko ] = "청색";
+ Text[ zh-CN ] = "è“色";
+ Text[ zh-TW ] = "è—色";
+ Text[ tr ] = "Mavi";
+ Text[ hi-IN ] = "नीला";
+ Text[ ar ] = "أزرق";
+ Text[ he ] = "Blau";
+};
+String RID_SVXSTR_TBLAFMT_BROWN
+{
+ Text [ de ] = "Braun";
+ Text [ en-US ] = "Brown";
+ Text[ pt ] = "Castanho";
+ Text[ ru ] = "Коричневый";
+ Text[ el ] = "Καφέ";
+ Text[ nl ] = "Bruin";
+ Text[ fr ] = "Marron";
+ Text[ es ] = "Marrón";
+ Text[ fi ] = "Ruskea";
+ Text[ ca ] = "Marró";
+ Text[ it ] = "Marrone";
+ Text[ sk ] = "Hnedá";
+ Text[ da ] = "Brun";
+ Text[ sv ] = "Brunt";
+ Text[ pl ] = "BrÄ…zowy";
+ Text[ pt-BR ] = "Marrom";
+ Text[ th ] = "น้ำตาล";
+ Text[ ja ] = "茶色";
+ Text[ ko ] = "갈색";
+ Text[ zh-CN ] = "棕色";
+ Text[ zh-TW ] = "棕色";
+ Text[ tr ] = "Kahverengi";
+ Text[ hi-IN ] = "भूरा";
+ Text[ ar ] = "بني";
+ Text[ he ] = "Braun";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY
+{
+ Text [ de ] = "Währung";
+ Text [ en-US ] = "Currency";
+ Text[ pt ] = "Moeda";
+ Text[ ru ] = "Валюта";
+ Text[ el ] = "Îόμισμα";
+ Text[ nl ] = "Valuta";
+ Text[ fr ] = "Monnaie";
+ Text[ es ] = "Moneda";
+ Text[ fi ] = "Valuutta";
+ Text[ ca ] = "Moneda";
+ Text[ it ] = "Valuta";
+ Text[ sk ] = "Mena";
+ Text[ da ] = "Valuta";
+ Text[ sv ] = "Valuta";
+ Text[ pl ] = "Waluta";
+ Text[ pt-BR ] = "Moeda";
+ Text[ th ] = "สà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™";
+ Text[ ja ] = "通貨";
+ Text[ ko ] = "통화";
+ Text[ zh-CN ] = "è´§å¸";
+ Text[ zh-TW ] = "貨幣";
+ Text[ tr ] = "Para birimi";
+ Text[ hi-IN ] = "मà¥à¤¦à¥à¤°à¤¾";
+ Text[ ar ] = "العملة";
+ Text[ he ] = "Währung";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_3D
+{
+ Text [ de ] = "Währung 3D";
+ Text [ en-US ] = "Currency 3D";
+ Text[ pt ] = "Moeda 3D";
+ Text[ ru ] = "Ð¢Ñ€ÐµÑ…Ð¼ÐµÑ€Ð½Ð°Ñ Ð²Ð°Ð»ÑŽÑ‚Ð°";
+ Text[ el ] = "Îόμισμα 3Δ";
+ Text[ nl ] = "Valuta 3D";
+ Text[ fr ] = "Monnaie 3D";
+ Text[ es ] = "Moneda 3D";
+ Text[ fi ] = "Valuutta kolmiulotteisena";
+ Text[ ca ] = "Moneda 3D";
+ Text[ it ] = "Valuta 3D";
+ Text[ sk ] = "Mena 3D";
+ Text[ da ] = "Valuta 3D";
+ Text[ sv ] = "Valuta 3D";
+ Text[ pl ] = "Waluta 3D";
+ Text[ pt-BR ] = "Moeda 3D";
+ Text[ th ] = "สà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™ 3มิติ";
+ Text[ ja ] = "通貨 3D";
+ Text[ ko ] = "통화 3D";
+ Text[ zh-CN ] = "è´§å¸ 3 ç»´";
+ Text[ zh-TW ] = "貨幣 3D";
+ Text[ tr ] = "Para birimi 3B";
+ Text[ hi-IN ] = "मà¥à¤¦à¥à¤°à¤¾ 3D";
+ Text[ ar ] = "عملة ثلاثية الأبعاد";
+ Text[ he ] = "Währung 3D";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_GRAY
+{
+ Text [ de ] = "Währung Grau";
+ Text [ en-US ] = "Currency Gray";
+ Text[ pt ] = "Moeda em cinzento";
+ Text[ ru ] = "Валюта ÑераÑ";
+ Text[ el ] = "Îόμισμα ΓκÏι";
+ Text[ nl ] = "Valuta grijs";
+ Text[ fr ] = "Monnaie grise";
+ Text[ es ] = "Moneda gris";
+ Text[ fi ] = "Valuutta harmaana";
+ Text[ ca ] = "Gris moneda";
+ Text[ it ] = "Valuta grigio";
+ Text[ sk ] = "Šedá mena";
+ Text[ da ] = "Valuta grå";
+ Text[ sv ] = "Valuta grått";
+ Text[ pl ] = "Waluta Szara";
+ Text[ pt-BR ] = "Moeda cor cinza";
+ Text[ th ] = "สà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™à¸ªà¸µà¹€à¸—า";
+ Text[ ja ] = "通貨 ç°è‰²";
+ Text[ ko ] = "통화 회색";
+ Text[ zh-CN ] = "è´§å¸ ç°è‰²";
+ Text[ zh-TW ] = "貨幣 ç°è‰²";
+ Text[ tr ] = "Para birimi gri";
+ Text[ hi-IN ] = "मà¥à¤¦à¥à¤°à¤¾ गà¥à¤°à¥‡";
+ Text[ ar ] = "عملة رمادية";
+ Text[ he ] = "Währung Grau";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_LAVENDER
+{
+ Text [ de ] = "Währung Flieder";
+ Text [ en-US ] = "Currency Lavender";
+ Text[ pt ] = "Moeda em lilás";
+ Text[ ru ] = "Валюта фиолетоваÑ";
+ Text[ el ] = "Îόμισμα λεβάντα";
+ Text[ nl ] = "Valuta lavendel";
+ Text[ fr ] = "Monnaie lavande";
+ Text[ es ] = "Moneda lavanda";
+ Text[ fi ] = "Valuutta laventelinvihreänä";
+ Text[ ca ] = "Lavanda Moneda";
+ Text[ it ] = "Valuta lavanda";
+ Text[ sk ] = "Levanduľová mena";
+ Text[ da ] = "Valuta lysviolet";
+ Text[ sv ] = "Valuta syrenlila";
+ Text[ pl ] = "Waluta Fioletowa";
+ Text[ pt-BR ] = "Moeda cor lilás";
+ Text[ th ] = "สà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™à¸ªà¸µà¸¡à¹ˆà¸§à¸‡à¸­à¹ˆà¸­à¸™";
+ Text[ ja ] = "通貨 ラベンダー";
+ Text[ ko ] = "통화 ë‹´ìžìƒ‰";
+ Text[ zh-CN ] = "è´§å¸ æ·¡ç´«è‰²";
+ Text[ zh-TW ] = "貨幣 淡紫色";
+ Text[ tr ] = "Para birimi eflatun";
+ Text[ hi-IN ] = "मà¥à¤¦à¥à¤°à¤¾ हलà¥à¤•à¤¾ पीला";
+ Text[ ar ] = "عملة أرجوانية Ùاتح";
+ Text[ he ] = "Währung Flieder";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_TURQUOISE
+{
+ Text [ de ] = "Währung Türkis";
+ Text [ en-US ] = "Currency Turquoise";
+ Text[ pt ] = "Moeda em turquesa";
+ Text[ ru ] = "Валюта бирюзоваÑ";
+ Text[ el ] = "Îόμισμα Ï„Ï…Ïκουάζ";
+ Text[ nl ] = "Valuta turkoois";
+ Text[ fr ] = "Monnaie turquoise";
+ Text[ es ] = "Moneda turquesa";
+ Text[ fi ] = "Valuutta turkoosina";
+ Text[ ca ] = "Turquesa moneda";
+ Text[ it ] = "Valuta turchese";
+ Text[ sk ] = "Tyrkysová mena";
+ Text[ da ] = "Valuta turkis";
+ Text[ sv ] = "Valuta turkost";
+ Text[ pl ] = "Waluta Turkusowa";
+ Text[ pt-BR ] = "Moeda cor turquesa";
+ Text[ th ] = "สà¸à¸¸à¸¥à¹€à¸‡à¸´à¸™à¸ªà¸µà¸™à¹‰à¸³à¹€à¸‡à¸´à¸™à¸—ะเล";
+ Text[ ja ] = "通貨 é’ç·‘";
+ Text[ ko ] = "통화 청옥색";
+ Text[ zh-CN ] = "è´§å¸ è“玉色";
+ Text[ zh-TW ] = "貨幣 è—玉色";
+ Text[ tr ] = "Para birimi turkuaz";
+ Text[ hi-IN ] = "मà¥à¤¦à¥à¤°à¤¾ टरà¥à¤•à¥‹à¤‡à¤¸";
+ Text[ ar ] = "عملة تركواز";
+ Text[ he ] = "Währung Türkis";
+};
+String RID_SVXSTR_TBLAFMT_GRAY
+{
+ Text [ de ] = "Grau";
+ Text [ en-US ] = "Gray";
+ Text[ pt ] = "Cinzento";
+ Text[ ru ] = "Серый";
+ Text[ el ] = "ΓκÏι";
+ Text[ nl ] = "Grijs";
+ Text[ fr ] = "Gris";
+ Text[ es ] = "Gris";
+ Text[ fi ] = "Harmaa";
+ Text[ ca ] = "Gris";
+ Text[ it ] = "Grigio";
+ Text[ sk ] = "Šedá";
+ Text[ da ] = "Grå";
+ Text[ sv ] = "Grått";
+ Text[ pl ] = "Szary";
+ Text[ pt-BR ] = "Cinza";
+ Text[ th ] = "เทา";
+ Text[ ja ] = "ç°è‰²";
+ Text[ ko ] = "회색";
+ Text[ zh-CN ] = "ç°è‰²";
+ Text[ zh-TW ] = "ç°è‰²";
+ Text[ tr ] = "Gri";
+ Text[ hi-IN ] = "गà¥à¤°à¥‡";
+ Text[ ar ] = "رمادي";
+ Text[ he ] = "Grau";
+};
+String RID_SVXSTR_TBLAFMT_GREEN
+{
+ Text [ de ] = "Grün";
+ Text [ en-US ] = "Green";
+ Text[ pt ] = "Verde";
+ Text[ ru ] = "Зеленый";
+ Text[ el ] = "ΠÏάσινο";
+ Text[ nl ] = "Groen";
+ Text[ fr ] = "Vert";
+ Text[ es ] = "Verde";
+ Text[ fi ] = "Vihreä";
+ Text[ ca ] = "Verd";
+ Text[ it ] = "Verde";
+ Text[ sk ] = "Zelená";
+ Text[ da ] = "Grøn";
+ Text[ sv ] = "Grönt";
+ Text[ pl ] = "Zielony";
+ Text[ pt-BR ] = "Verde";
+ Text[ th ] = "เขียว";
+ Text[ ja ] = "ç·‘";
+ Text[ ko ] = "녹색";
+ Text[ zh-CN ] = "绿色";
+ Text[ zh-TW ] = "綠色";
+ Text[ tr ] = "YeÅŸil";
+ Text[ hi-IN ] = "हरा";
+ Text[ ar ] = "أخضر";
+ Text[ he ] = "Grün";
+};
+String RID_SVXSTR_TBLAFMT_LAVENDER
+{
+ Text [ de ] = "Flieder";
+ Text [ en-US ] = "Lavender";
+ Text[ pt ] = "Lilás";
+ Text[ ru ] = "Фиолетовый";
+ Text[ el ] = "Λεβάντα";
+ Text[ nl ] = "Bordeaux";
+ Text[ fr ] = "Lavande";
+ Text[ es ] = "Lavanda";
+ Text[ fi ] = "Laventelinvihreä";
+ Text[ ca ] = "Lavanda";
+ Text[ it ] = "Lavanda";
+ Text[ sk ] = "Levanduľová";
+ Text[ da ] = "Lysviolet";
+ Text[ sv ] = "Syrenlila";
+ Text[ pl ] = "Fioletowy";
+ Text[ pt-BR ] = "Lilás";
+ Text[ th ] = "ม่วงอ่อน";
+ Text[ ja ] = "ラベンダー";
+ Text[ ko ] = "ë‹´ìžìƒ‰";
+ Text[ zh-CN ] = "淡紫色";
+ Text[ zh-TW ] = "淡紫色";
+ Text[ tr ] = "Eflatun";
+ Text[ hi-IN ] = "हलà¥à¤•à¤¾ पीला";
+ Text[ ar ] = "أرجواني Ùاتح";
+ Text[ he ] = "Flieder";
+};
+String RID_SVXSTR_TBLAFMT_RED
+{
+ Text [ de ] = "Rot";
+ Text [ en-US ] = "Red";
+ Text[ pt ] = "Vermelho";
+ Text[ ru ] = "КраÑный";
+ Text[ el ] = "Κόκκινο";
+ Text[ nl ] = "Rood";
+ Text[ fr ] = "Rouge";
+ Text[ es ] = "Rojo";
+ Text[ fi ] = "Punainen";
+ Text[ ca ] = "Vermell";
+ Text[ it ] = "Rosso";
+ Text[ sk ] = "Červená";
+ Text[ da ] = "Rød";
+ Text[ sv ] = "Rött";
+ Text[ pl ] = "Czerwony";
+ Text[ pt-BR ] = "Vermelho";
+ Text[ th ] = "à¹à¸”ง";
+ Text[ ja ] = "赤";
+ Text[ ko ] = "ì ìƒ‰";
+ Text[ zh-CN ] = "红色";
+ Text[ zh-TW ] = "紅色";
+ Text[ tr ] = "Kırmızı";
+ Text[ hi-IN ] = "लाल";
+ Text[ ar ] = "أحمر";
+ Text[ he ] = "Rot";
+};
+String RID_SVXSTR_TBLAFMT_TURQUOISE
+{
+ Text [ de ] = "Türkis";
+ Text [ en-US ] = "Turquoise";
+ Text[ pt ] = "Turquesa";
+ Text[ ru ] = "Бирюзовый";
+ Text[ el ] = "ΤυÏκουάζ";
+ Text[ nl ] = "Turkoois";
+ Text[ fr ] = "Turquoise";
+ Text[ es ] = "Turquesa";
+ Text[ fi ] = "Turkoosi";
+ Text[ ca ] = "Turquesa";
+ Text[ it ] = "Turchese";
+ Text[ sk ] = "Tyrkysová";
+ Text[ da ] = "Turkis";
+ Text[ sv ] = "Turkost";
+ Text[ pl ] = "Turkusowy";
+ Text[ pt-BR ] = "Turquesa";
+ Text[ th ] = "น้ำเงินทะเล";
+ Text[ ja ] = "é’ç·‘";
+ Text[ ko ] = "ì²­ë¡ìƒ‰";
+ Text[ zh-CN ] = "è“玉色";
+ Text[ zh-TW ] = "è—玉色";
+ Text[ tr ] = "Turkuaz";
+ Text[ hi-IN ] = "टरà¥à¤•à¥‹à¤‡à¤¸";
+ Text[ ar ] = "تركواز";
+ Text[ he ] = "Türkis";
+};
+String RID_SVXSTR_TBLAFMT_YELLOW
+{
+ Text [ de ] = "Gelb";
+ Text [ en-US ] = "Yellow";
+ Text[ pt ] = "Amarelo";
+ Text[ ru ] = "Желтый";
+ Text[ el ] = "ΚίτÏινο";
+ Text[ nl ] = "Geel";
+ Text[ fr ] = "Jaune";
+ Text[ es ] = "Amarillo";
+ Text[ fi ] = "Keltainen";
+ Text[ ca ] = "Groc";
+ Text[ it ] = "Giallo";
+ Text[ sk ] = "Žltá";
+ Text[ da ] = "Gul";
+ Text[ sv ] = "Gult";
+ Text[ pl ] = "Żółty";
+ Text[ pt-BR ] = "Amarelo";
+ Text[ th ] = "เหลือง";
+ Text[ ja ] = "黄色";
+ Text[ ko ] = "황색";
+ Text[ zh-CN ] = "黄色";
+ Text[ zh-TW ] = "黃色";
+ Text[ tr ] = "Sarı";
+ Text[ hi-IN ] = "पीला";
+ Text[ ar ] = "أصÙر";
+ Text[ he ] = "Gelb";
+};
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// 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 [ de ] = "Farbverlauf";
+ Text [ en-US ] = "Gradient";
+ Text[ pt ] = "Gradação";
+ Text[ ru ] = "Градиент";
+ Text[ el ] = "~Διαβάθ. χÏώματος";
+ Text[ nl ] = "Kleurovergangen";
+ Text[ fr ] = "Dégradé";
+ Text[ es ] = "Gradiente";
+ Text[ fi ] = "Liukuvärjäys";
+ Text[ ca ] = "Gradient";
+ Text[ it ] = "Sfumatura";
+ Text[ sk ] = "Prechod";
+ Text[ da ] = "Farvegraduering";
+ Text[ sv ] = "Färggradient";
+ Text[ pl ] = "Gradient";
+ Text[ pt-BR ] = "Gradiente";
+ Text[ th ] = "ไล่ระดับสี";
+ Text[ ja ] = "グラデーション";
+ Text[ ko ] = "ê·¸ë¼ë””언트";
+ Text[ zh-CN ] = "彩色图案";
+ Text[ zh-TW ] = "彩色圖案";
+ Text[ tr ] = "Gradyan";
+ Text[ hi-IN ] = "गà¥à¤°à¥‡à¤¡à¤¿à¤à¤¨à¥à¤Ÿà¥";
+ Text[ ar ] = "تدرج اللون";
+ Text[ he ] = "Farbverlauf";
+};
+String RID_SVXSTR_GRDT1
+{
+ Text [ de ] = "Linear Blau/weiß";
+ Text [ en-US ] = "Linear blue/white";
+ Text[ pt ] = "Linear azul/branco";
+ Text[ ru ] = "Линейный: Ñиний/белый";
+ Text[ el ] = "ΓÏαμμικά μπλέ/λευκό";
+ Text[ nl ] = "Lineair blauw/wit";
+ Text[ fr ] = "Linéaire bleu/blanc";
+ Text[ es ] = "Lineal azul/blanco";
+ Text[ fi ] = "Lineaarinen sininen/valkoinen";
+ Text[ ca ] = "Blau/blanc lineal";
+ Text[ it ] = "Lineare blu/bianco";
+ Text[ sk ] = "Lineárna modrá/biela";
+ Text[ da ] = "Lineær blå/hvid";
+ Text[ sv ] = "Linjär blått/vitt";
+ Text[ pl ] = "Liniowy błękit-biel";
+ Text[ pt-BR ] = "Linear azul / branco";
+ Text[ th ] = "เส้นสีน้ำเงิน/ขาว";
+ Text[ ja ] = "線状 é’/白";
+ Text[ ko ] = "선형 청색/í°ìƒ‰";
+ Text[ zh-CN ] = "线性 è“/白";
+ Text[ zh-TW ] = "ç·šæ¢è—/白";
+ Text[ tr ] = "DoÄŸrusal mavi/beyaz";
+ Text[ hi-IN ] = "संकà¥à¤šà¤¿à¤¤ नीला/सफेद";
+ Text[ ar ] = "خطي أزرق/أبيض";
+ Text[ he ] = "Linear Blau/weiß";
+};
+String RID_SVXSTR_GRDT2
+{
+ Text [ de ] = "Linear violett/grün";
+ Text [ en-US ] = "Linear magenta/green";
+ Text[ pt ] = "Linear violeta/verde";
+ Text[ ru ] = "Линейный: пурпурный/зеленый";
+ Text[ el ] = "ΓÏαμμικά ματζέν./Ï€Ïάσινο";
+ Text[ nl ] = "Lineair violet/groen";
+ Text[ fr ] = "Linéaire violet/vert";
+ Text[ es ] = "Lineal magenta/verde";
+ Text[ fi ] = "Lineaarinen magenta/vihreä";
+ Text[ ca ] = "Magenta/verd lineal";
+ Text[ it ] = "Lineare magenta/verde";
+ Text[ sk ] = "Lineárna purpurová/zelená";
+ Text[ da ] = "Lineær violet/grøn";
+ Text[ sv ] = "Linjär violett/grönt";
+ Text[ pl ] = "Liniowy purpura-zieleń";
+ Text[ pt-BR ] = "Linear magenta / verde";
+ Text[ th ] = "เส้นสีม่วง/เขียว";
+ Text[ ja ] = "線状 紫/緑";
+ Text[ ko ] = "선형 ë³´ë¼ìƒ‰/녹색";
+ Text[ zh-CN ] = "线性 紫/绿";
+ Text[ zh-TW ] = "ç·šæ¢ç´…紫色/綠色";
+ Text[ tr ] = "DoÄŸrusal menekÅŸe/yeÅŸil";
+ Text[ hi-IN ] = "संकà¥à¤šà¤¿à¤¤ मेजनà¥à¤Ÿà¤¾/हरा";
+ Text[ ar ] = "خطي أرجواني/أخضر";
+ Text[ he ] = "Linear violett/grün";
+};
+String RID_SVXSTR_GRDT3
+{
+ Text [ de ] = "Linear gelb/braun";
+ Text [ en-US ] = "Linear yellow/brown";
+ Text[ pt ] = "Linear amarelo/castanho";
+ Text[ ru ] = "Линейный: желтый/коричневый";
+ Text[ el ] = "ΓÏαμμικά κίτÏινο/καφέ";
+ Text[ nl ] = "Lineair geel/bruin";
+ Text[ fr ] = "Linéaire jaune/marron";
+ Text[ es ] = "Lineal amarillo/marrón";
+ Text[ fi ] = "Lineaarinen keltainen/ruskea";
+ Text[ ca ] = "Marró/groc lineal";
+ Text[ it ] = "Lineare giallo/marrone";
+ Text[ sk ] = "Lineárna žltá/hnedá";
+ Text[ da ] = "Lineær gul/brun";
+ Text[ sv ] = "Linjär gult/brunt";
+ Text[ pl ] = "Liniowy żółć-brąz";
+ Text[ pt-BR ] = "Linear amarelo / marrom";
+ Text[ th ] = "เส้นสีเหลือง/น้ำตาล";
+ Text[ ja ] = "線状 黄色/茶色";
+ Text[ ko ] = "선형 황색/갈색";
+ Text[ zh-CN ] = "线性 黄/棕色";
+ Text[ zh-TW ] = "ç·šæ¢é»ƒè‰²/棕色";
+ Text[ tr ] = "Doğrusal sarı/kahverengi";
+ Text[ hi-IN ] = "संकà¥à¤šà¤¿à¤¤ पीला/भूरा";
+ Text[ ar ] = "خطي أصÙر/بني";
+ Text[ he ] = "Linear gelb/braun";
+};
+String RID_SVXSTR_GRDT4
+{
+ Text [ de ] = "Radial grün/schwarz";
+ Text [ en-US ] = "Radial green/black";
+ Text[ pt ] = "Radial verde/preto";
+ Text[ ru ] = "Радиальный: зеленый/черный";
+ Text[ el ] = "Ακτινικά Ï€Ïάσινο/μαÏÏο";
+ Text[ nl ] = "Radiaal groen/zwart";
+ Text[ fr ] = "Radial vert/noir";
+ Text[ es ] = "Radial verde/negro";
+ Text[ fi ] = "Säteittäinen vihreä/musta";
+ Text[ ca ] = "Radial verd/negre";
+ Text[ it ] = "Radiale verde/nero";
+ Text[ sk ] = "Radiálna zelená/Äierna";
+ Text[ da ] = "Radial grøn/sort";
+ Text[ sv ] = "Radiellt grönt/svart";
+ Text[ pl ] = "Radialny zieleń-czerń";
+ Text[ pt-BR ] = "Radial verde / preto";
+ Text[ th ] = "รัศมีสีเขียว/ดำ";
+ Text[ ja ] = "放射状 緑/黒";
+ Text[ ko ] = "방사형 녹색/ê²€ì€ìƒ‰";
+ Text[ zh-CN ] = "å¾„å‘ ç»¿/黑";
+ Text[ zh-TW ] = "光線狀綠色/黑色";
+ Text[ tr ] = "Radyal yeÅŸil/siyah";
+ Text[ hi-IN ] = "किरण-समà¥à¤¬à¤¨à¥à¤§à¥€ हरा/काला";
+ Text[ ar ] = "شعاعي أخضر/أسود";
+ Text[ he ] = "Radial grün/schwarz";
+};
+String RID_SVXSTR_GRDT5
+{
+ Text [ de ] = "Radial rot/gelb";
+ Text [ en-US ] = "Radial red/yellow";
+ Text[ pt ] = "Radial vermelho/amarelo";
+ Text[ ru ] = "Радиальный: краÑный/желтый";
+ Text[ el ] = "Ακτινικά κόκκινο/κίτÏινο";
+ Text[ nl ] = "Radiaal rood/geel";
+ Text[ fr ] = "Radial rouge/jaune";
+ Text[ es ] = "Radial rojo/amarillo";
+ Text[ fi ] = "Säteittäinen punainen/keltainen";
+ Text[ ca ] = "Radial vermell/groc";
+ Text[ it ] = "Radiale rosso/giallo";
+ Text[ sk ] = "Radiálna Äervená/žltá";
+ Text[ da ] = "Radial rød/gul";
+ Text[ sv ] = "Radiellt rött/gult";
+ Text[ pl ] = "Radialny czerwień-żółć";
+ Text[ pt-BR ] = "Radial vermelho / amarelo";
+ Text[ th ] = "รัศมีสีà¹à¸”ง/เหลือง";
+ Text[ ja ] = "放射状 赤/黄色";
+ Text[ ko ] = "방사형 ì ìƒ‰/황색";
+ Text[ zh-CN ] = "å¾„å‘ çº¢/黄";
+ Text[ zh-TW ] = "光線狀紅色/黃色";
+ Text[ tr ] = "Radyal kırmızı/sarı";
+ Text[ hi-IN ] = "किरण-समà¥à¤¬à¤¨à¥à¤§à¥€ लाल/पीला";
+ Text[ ar ] = "شعاعي أحمر/أصÙر";
+ Text[ he ] = "Radial rot/gelb";
+};
+String RID_SVXSTR_GRDT6
+{
+ Text [ de ] = "Rechteck rot/weiß";
+ Text [ en-US ] = "Rectangular red/white";
+ Text[ pt ] = "Rectangular vermelho/branco";
+ Text[ ru ] = "ПрÑмоугольный: краÑный/белый";
+ Text[ el ] = "ΟÏθογώνιο κόκκινο/λευκό";
+ Text[ nl ] = "Rechthoek rood/wit";
+ Text[ fr ] = "Rectangulaire rouge/blanc";
+ Text[ es ] = "Rectangular rojo/blanco";
+ Text[ fi ] = "Suorakulmio punainen/valkoinen";
+ Text[ ca ] = "Rectangular vermell/blanc";
+ Text[ it ] = "Rettangolare rosso/bianco";
+ Text[ sk ] = "Obdĺžnik Äervená/biela";
+ Text[ da ] = "Rektangel rød/hvid";
+ Text[ sv ] = "Rektangulär rött/vitt";
+ Text[ pl ] = "Rombowy czerwień-biel";
+ Text[ pt-BR ] = "Retangular vermelho / branco";
+ Text[ th ] = "สีเหลี่ยมสีà¹à¸”ง/ขาว";
+ Text[ ja ] = "長方形 赤/白";
+ Text[ ko ] = "ì§ì‚¬ê°í˜• ì ìƒ‰/í°ìƒ‰";
+ Text[ zh-CN ] = "矩形 红/白";
+ Text[ zh-TW ] = "矩形紅色/白色";
+ Text[ tr ] = "Dikdörtgen kırmızı/beyaz";
+ Text[ hi-IN ] = "आयताकार लाल/सफेद";
+ Text[ ar ] = "مستطيل أحمر/أبيض";
+ Text[ he ] = "Rechteck rot/weiß";
+};
+String RID_SVXSTR_GRDT7
+{
+ Text [ de ] = "Quadratisch gelb/weiß";
+ Text [ en-US ] = "Square yellow/white";
+ Text[ pt ] = "Quadrado amarelo/branco";
+ Text[ ru ] = "Квадратный: желтый/белый";
+ Text[ el ] = "ΤετÏάγωνο κίτÏινο/λευκό";
+ Text[ nl ] = "Vierkant geel/wit";
+ Text[ fr ] = "Carré jaune/blanc";
+ Text[ es ] = "Cuadrado amarillo/blanco";
+ Text[ fi ] = "Neliö keltainen/valkoinen";
+ Text[ ca ] = "Quadrat groc/blanc";
+ Text[ it ] = "Quadrato giallo/bianco";
+ Text[ sk ] = "Štvorec žltá/biela";
+ Text[ da ] = "Kvadratisk gul/hvid";
+ Text[ sv ] = "Kvadratisk gult/vitt";
+ Text[ pl ] = "Kwadratowy żółć-biel";
+ Text[ pt-BR ] = "Quadrado amarelo / branco";
+ Text[ th ] = "สีเหลี่ยมจัตุรัสสีเหลือง/ขาว";
+ Text[ ja ] = "正方形 黄色/白";
+ Text[ ko ] = "정사ê°í˜• 황색/í°ìƒ‰";
+ Text[ zh-CN ] = "正方形 黄/白";
+ Text[ zh-TW ] = "正方形黃色/白色";
+ Text[ tr ] = "Kare sarı/beyaz";
+ Text[ hi-IN ] = "समचतà¥à¤°à¥à¤­à¥à¤œ पीला/सफेद";
+ Text[ ar ] = "مربع أصÙر/أبيض";
+ Text[ he ] = "Quadratisch gelb/weiß";
+};
+String RID_SVXSTR_GRDT8
+{
+ Text [ de ] = "Ellipsoid blaugrau/hellblau";
+ Text [ en-US ] = "Ellipsoid blue gray/light blue";
+ Text[ pt ] = "Elipsoidal cinzento azulado/azul-claro";
+ Text[ ru ] = "ЭллипÑоидный: Ñеро-голубой/голубой";
+ Text[ el ] = "Ελλειψ. μπλε-γκÏι/μπλε ανοιχ.";
+ Text[ nl ] = "Ellips grijsblauw/lichtblauw";
+ Text[ fr ] = "Ellipsoïde gris bleu/bleu clair";
+ Text[ es ] = "Elipsoide azul gris/azul claro";
+ Text[ fi ] = "Ellipsoidi siniharmaa/kirkas sininen";
+ Text[ ca ] = "Elipsoide blau gris/blau clar";
+ Text[ it ] = "Ellissoidale blu-grigio/celeste";
+ Text[ sk ] = "Ovál modrošedý/svetlomodrý";
+ Text[ da ] = "Ellipsoide blågrå/lyseblå";
+ Text[ sv ] = "Ellipsoid blågrå/ljusblå";
+ Text[ pl ] = "Eliptyczny szarość-błękit";
+ Text[ pt-BR ] = "Elipsóide cinza-azulado / azul-claro";
+ Text[ th ] = "วงรีสีน้ำเงินเทา/น้ำเงินอ่อน";
+ Text[ ja ] = "楕円体 é’ç°è‰²/明るã„é’";
+ Text[ ko ] = "타ì›í˜• 회청색/ë°ì€ 청색";
+ Text[ zh-CN ] = "椭圆体 è“ç°/æµ…è“";
+ Text[ zh-TW ] = "橢圓è—ç°è‰²/æ·ºç°è‰²";
+ Text[ tr ] = "Elipsoid mavi gri/açık mavi";
+ Text[ hi-IN ] = "दीरà¥à¤˜à¤µà¥ƒà¤¤à¥à¤¤à¤œ नीला गà¥à¤°à¥‡/हलà¥à¤•à¤¾ नीला";
+ Text[ ar ] = "بيضوي رمادي مزرق/أزرق Ùاتح";
+ Text[ he ] = "Ellipsoid blaugrau/hellblau";
+};
+String RID_SVXSTR_GRDT9
+{
+ Text [ de ] = "Axial hellrot/weiß";
+ Text [ en-US ] = "Axial light red/white";
+ Text[ pt ] = "Axial vermelho-claro/branco";
+ Text[ ru ] = "ОÑевой: Ñветло-краÑный/белый";
+ Text[ el ] = "Αξονικό λευκό/κόκκινο ανοιχ.";
+ Text[ nl ] = "Axiaal lichtrood/wit";
+ Text[ fr ] = "Axial rouge clair/blanc";
+ Text[ es ] = "Axial rojo claro/blanco";
+ Text[ fi ] = "Akselivalaistus punainen/valkoinen";
+ Text[ ca ] = "Llum axial vermella/blanca";
+ Text[ it ] = "Assiale rosso chiaro/bianco";
+ Text[ sk ] = "Svetlo osi Äervená/biela";
+ Text[ da ] = "Aksial lys rød/hvid";
+ Text[ sv ] = "Axialt ljusrött/vitt";
+ Text[ pl ] = "Osiowy róż-biel";
+ Text[ pt-BR ] = "Axial vermelho-claro / branco";
+ Text[ th ] = "à¹à¸à¸™à¸ªà¸µà¹à¸”งอ่อน/ขาว";
+ Text[ ja ] = "軸状 明るã„赤/白";
+ Text[ ko ] = "축 ë°ì€ ì ìƒ‰/í°ìƒ‰";
+ Text[ zh-CN ] = "è½´å‘ æµ…çº¢/白";
+ Text[ zh-TW ] = "軸å‘淺紅色/白色";
+ Text[ tr ] = "Eksen açık kırmızı/beyaz";
+ Text[ hi-IN ] = "धà¥à¤°à¥€-समà¥à¤¬à¤¨à¥à¤§à¥€ हलà¥à¤•à¤¾ लाल/सफेद";
+ Text[ ar ] = "محوري أحمر Ùاتح/أبيض";
+ Text[ he ] = "Axial hellrot/weiß";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// 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";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH10_DEF
+{
+ Text = "Hatch";
+};
+
+String RID_SVXSTR_HATCH0
+{
+ Text [ de ] = "Schwarz 45 Grad weit";
+ Text [ en-US ] = "Black 45 degrees wide";
+ Text[ pt ] = "Preto 45 graus de largura";
+ Text[ ru ] = "Ð§ÐµÑ€Ð½Ð°Ñ 45 градуÑов, разреженнаÑ";
+ Text[ el ] = "ΜαÏÏο 45 μοίÏες πλατιά";
+ Text[ nl ] = "Zwart 45 graden breed";
+ Text[ fr ] = "Noir 45 degrés de large";
+ Text[ es ] = "Negro 45 grados ancho";
+ Text[ fi ] = "Musta 45 astetta leveä";
+ Text[ ca ] = "Negre d'ample 45 graus";
+ Text[ it ] = "Nero 45 gradi, ampio";
+ Text[ sk ] = "Čierna 45 stupňov široká";
+ Text[ da ] = "Sort 45 grader vidt";
+ Text[ sv ] = "Svart 45 grader vid";
+ Text[ pl ] = "Czarne 45° szerokie";
+ Text[ pt-BR ] = "Preto 45 graus espaçado";
+ Text[ th ] = "à¸à¸§à¹‰à¸²à¸‡ 45 องศาสีดำ";
+ Text[ ja ] = "黒 45度 幅広";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 45ë„ ë„“ì´";
+ Text[ zh-CN ] = "黑色 45 度(宽è·)";
+ Text[ zh-TW ] = "黑色 45 度寬";
+ Text[ tr ] = "Siyah 45 derece geniÅŸ";
+ Text[ hi-IN ] = "काला 45 डिगà¥à¤°à¤¿à¤¯à¤¾à¤ चौड़ाई";
+ Text[ ar ] = "أسود 45 درجة واسع";
+ Text[ he ] = "Schwarz 45 Grad weit";
+};
+String RID_SVXSTR_HATCH1
+{
+ Text [ de ] = "Schwarz 45 Grad";
+ Text [ en-US ] = "Black 45 degrees";
+ Text[ pt ] = "Preto 45 graus";
+ Text[ ru ] = "Ð§ÐµÑ€Ð½Ð°Ñ 45 градуÑов";
+ Text[ el ] = "ΜαÏÏο 45 μοίÏες";
+ Text[ nl ] = "Zwart 45 graden";
+ Text[ fr ] = "Noir 45 degrés";
+ Text[ es ] = "Negro 45 grados";
+ Text[ fi ] = "Musta 45 astetta";
+ Text[ ca ] = "Negre 45 graus";
+ Text[ it ] = "Nero 45 gradi";
+ Text[ sk ] = "Čierna 45 stupňov";
+ Text[ da ] = "Sort 45 grader";
+ Text[ sv ] = "Svart 45 grader";
+ Text[ pl ] = "Czarne 45°";
+ Text[ pt-BR ] = "Preto 45 graus";
+ Text[ th ] = " 45 องศาสีดำ";
+ Text[ ja ] = "黒 45度";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 45ë„";
+ Text[ zh-CN ] = "黑色 45 度";
+ Text[ zh-TW ] = "黑色 45 度";
+ Text[ tr ] = "Siyah 45 derece";
+ Text[ hi-IN ] = "काला 45 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أسود 45 درجة";
+ Text[ he ] = "Schwarz 45 Grad";
+};
+String RID_SVXSTR_HATCH2
+{
+ Text [ de ] = "Schwarz -45 Grad";
+ Text [ en-US ] = "Black -45 degrees";
+ Text[ pt ] = "Preto -45 graus";
+ Text[ ru ] = "Ð§ÐµÑ€Ð½Ð°Ñ -45 градуÑов";
+ Text[ el ] = "ΜαÏÏο -45 μοίÏες";
+ Text[ nl ] = "Zwart -45 graden";
+ Text[ fr ] = "Noir -45 degrés";
+ Text[ es ] = "Negro -45 grados";
+ Text[ fi ] = "Musta -45 astetta";
+ Text[ ca ] = "Negre -45 graus";
+ Text[ it ] = "Nero -45 gradi";
+ Text[ sk ] = "Čierna -45 stupňov";
+ Text[ da ] = "Sort -45 grader";
+ Text[ sv ] = "Svart -45 grader";
+ Text[ pl ] = "Czarne -45°";
+ Text[ pt-BR ] = "Preto -45 graus";
+ Text[ th ] = "สีดำ -45 องศา";
+ Text[ ja ] = "黒 -45度";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 45 ë„";
+ Text[ zh-CN ] = "黑色 -45 度";
+ Text[ zh-TW ] = "黑色 -45 度";
+ Text[ tr ] = "Siyah -45 derece";
+ Text[ hi-IN ] = "काला -45 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أسود -45 درجة";
+ Text[ he ] = "Schwarz -45 Grad";
+};
+String RID_SVXSTR_HATCH3
+{
+ Text [ de ] = "Schwarz 90 Grad";
+ Text [ en-US ] = "Black 90 degrees";
+ Text[ pt ] = "Preto 90 graus";
+ Text[ ru ] = "Ð§ÐµÑ€Ð½Ð°Ñ 90 градуÑов";
+ Text[ el ] = "ΜαÏÏο 90 μοίÏες";
+ Text[ nl ] = "Zwart 90 graden";
+ Text[ fr ] = "Noir 90 degrés";
+ Text[ es ] = "Negro 90 grados";
+ Text[ fi ] = "Musta 90 astetta";
+ Text[ ca ] = "Negre 90 graus";
+ Text[ it ] = "Nero 90 gradi";
+ Text[ sk ] = "Čierna 90 stupňov";
+ Text[ da ] = "Sort 90 grader";
+ Text[ sv ] = "Svart 90 grader";
+ Text[ pl ] = "Czarne 90°";
+ Text[ pt-BR ] = "Preto 90 graus";
+ Text[ th ] = "90 องศาสีดำ";
+ Text[ ja ] = "黒 90度";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 90 ë„";
+ Text[ zh-CN ] = "黑色 90 度";
+ Text[ zh-TW ] = "黑色 90 度";
+ Text[ tr ] = "Siyah 90 derece";
+ Text[ hi-IN ] = "काला 90 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أسود 90 درجة";
+ Text[ he ] = "Schwarz 90 Grad";
+};
+String RID_SVXSTR_HATCH4
+{
+ Text [ de ] = "Rot Netz 45 Grad";
+ Text [ en-US ] = "Red crossed 45 degrees";
+ Text[ pt ] = "Vermelho cruzado 45 graus";
+ Text[ ru ] = "КраÑÐ½Ð°Ñ Ð¿ÐµÑ€ÐµÐºÑ€ÐµÑÑ‚Ð½Ð°Ñ 45 градуÑов";
+ Text[ el ] = "ΣÏμπτωση κόκκινου στις 45 μοίÏες";
+ Text[ nl ] = "Rood gekruist 45 graden";
+ Text[ fr ] = "Rouge double incliné 45 degrés";
+ Text[ es ] = "Rojo red 45 grados";
+ Text[ fi ] = "Punainen ristissä 45 astetta";
+ Text[ ca ] = "Vermell encreuat 45 graus";
+ Text[ it ] = "Rosso a rete 45 gradi";
+ Text[ sk ] = "Červené šrafovanie 45 stupňov";
+ Text[ da ] = "Rødt gitter 45 grader";
+ Text[ sv ] = "Rött nät 45 grader";
+ Text[ pl ] = "Czerwona siatka 45°";
+ Text[ pt-BR ] = "Vermelho cruzado 45 graus";
+ Text[ th ] = "45 องศาขวางสีà¹à¸”ง";
+ Text[ ja ] = "赤 縞 45度";
+ Text[ ko ] = "ì ìƒ‰ 네트 45ë„";
+ Text[ zh-CN ] = "红色网格线 45 度";
+ Text[ zh-TW ] = "紅網狀 45 度";
+ Text[ tr ] = "Kırmızı ızgaralı 45 derece";
+ Text[ hi-IN ] = "लाल कटा हà¥à¤† 45 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أحمر شبكة 45 درجة";
+ Text[ he ] = "Rot Netz 45 Grad";
+};
+String RID_SVXSTR_HATCH5
+{
+ Text [ de ] = "Rot Netz 0 Grad";
+ Text [ en-US ] = "Red crossed 0 degrees";
+ Text[ pt ] = "Vermelho cruzado 0 graus";
+ Text[ ru ] = "КраÑÐ½Ð°Ñ Ð¿ÐµÑ€ÐµÐºÑ€ÐµÑÑ‚Ð½Ð°Ñ 0 градуÑов";
+ Text[ el ] = "ΣÏμπτωση κόκκινου στις 0 μοίÏες";
+ Text[ nl ] = "Rood gekruist 0 graden";
+ Text[ fr ] = "Rouge double incliné 0 degré";
+ Text[ es ] = "Rojo red 0 grados";
+ Text[ fi ] = "Punainen ristissä 0 astetta";
+ Text[ ca ] = "Vermell encreuat 0 graus";
+ Text[ it ] = "Rosso a rete 0 gradi";
+ Text[ sk ] = "Červené šrafovanie 0 stupňov";
+ Text[ da ] = "Rødt gitter 0 grader";
+ Text[ sv ] = "Rött nät 0 grader";
+ Text[ pl ] = "Czerwona siatka 0°";
+ Text[ pt-BR ] = "Vermelho cruzado 0 graus";
+ Text[ th ] = " 0 องศาขวางสีà¹à¸”ง";
+ Text[ ja ] = "赤 縞 0度";
+ Text[ ko ] = "ì ìƒ‰ 네트 0ë„";
+ Text[ zh-CN ] = "红色网格线 0 度";
+ Text[ zh-TW ] = "紅網 0 度";
+ Text[ tr ] = "Kırmızı ızgaralı 0 derece";
+ Text[ hi-IN ] = "लाल कटा हà¥à¤† 0 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أحمر شبكة 0 درجة";
+ Text[ he ] = "Rot Netz 0 Grad";
+};
+String RID_SVXSTR_HATCH6
+{
+ Text [ de ] = "Blau Netz 45 Grad";
+ Text [ en-US ] = "Blue crossed 45 degrees";
+ Text[ pt ] = "Azul cruzado 45 graus";
+ Text[ ru ] = "СинÑÑ Ð¿ÐµÑ€ÐµÐºÑ€ÐµÑÑ‚Ð½Ð°Ñ 45 градуÑов";
+ Text[ el ] = "ΣÏμπτωση μπλε στις 45 μοίÏες";
+ Text[ nl ] = "Blauw gekruist 45 graden";
+ Text[ fr ] = "Bleu double incliné 45 degrés";
+ Text[ es ] = "Azul red 45 grados";
+ Text[ fi ] = "Sininen ristissä 45 astetta";
+ Text[ ca ] = "Blau encreuat 45 graus";
+ Text[ it ] = "Blu a rete 45 gradi";
+ Text[ sk ] = "Modré šrafovanie 45 stupňov";
+ Text[ da ] = "Blåt gitter 45 grader";
+ Text[ sv ] = "Blått nät 45 grader";
+ Text[ pl ] = "Niebieska siatka 45°";
+ Text[ pt-BR ] = "Azul cruzado 45 graus";
+ Text[ th ] = " 45 องศาขวางสีน้ำเงิน";
+ Text[ ja ] = "é’ ç¸ž 45度";
+ Text[ ko ] = "청색 네트 45ë„";
+ Text[ zh-CN ] = "è“色网格线 45 度";
+ Text[ zh-TW ] = "è—網 45 度";
+ Text[ tr ] = "Mavi ızgaralı 45 derece";
+ Text[ hi-IN ] = "नीला कटा हà¥à¤† 45 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أزرق شبكة 45 درجة";
+ Text[ he ] = "Blau Netz 45 Grad";
+};
+String RID_SVXSTR_HATCH7
+{
+ Text [ de ] = "Blau Netz 0 Grad";
+ Text [ en-US ] = "Blue crossed 0 degrees";
+ Text[ pt ] = "Azul cruzado 0 graus";
+ Text[ ru ] = "СинÑÑ Ð¿ÐµÑ€ÐµÐºÑ€ÐµÑÑ‚Ð½Ð°Ñ 0 градуÑов";
+ Text[ el ] = "ΣÏμπτωση μπλε στις 0 μοίÏες";
+ Text[ nl ] = "Bauw gekruist 0 graden";
+ Text[ fr ] = "Bleu double incliné 0 degré";
+ Text[ es ] = "Azul red 0 grados";
+ Text[ fi ] = "Sininen ristissä 0 astetta";
+ Text[ ca ] = "Blau encreuat 0 graus";
+ Text[ it ] = "Blu a rete 0 gradi";
+ Text[ sk ] = "Modré šrafovanie 0 stupňov";
+ Text[ da ] = "Blåt gitter 0 grader";
+ Text[ sv ] = "Blått nät 0 grader";
+ Text[ pl ] = "Niebieska siatka 0°";
+ Text[ pt-BR ] = "Azul cruzado 0 graus";
+ Text[ th ] = " 0 องศาขวางสีน้ำเงิน";
+ Text[ ja ] = "é’ ç¸ž 0度";
+ Text[ ko ] = "청색 네트 0ë„";
+ Text[ zh-CN ] = "è“色网格线 0 度";
+ Text[ zh-TW ] = "è—網 0 度";
+ Text[ tr ] = "Mavi ızgaralı 0 derece";
+ Text[ hi-IN ] = "नीला कटा हà¥à¤† 0 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أزرق شبكة 0 درجة";
+ Text[ he ] = "Blau Netz 0 Grad";
+};
+String RID_SVXSTR_HATCH8
+{
+ Text [ de ] = "Blau 3er Netz 90 Grad";
+ Text [ en-US ] = "Blue triple 90 degrees";
+ Text[ pt ] = "Azul cruzado triplo 90 graus";
+ Text[ ru ] = "СинÑÑ Ñ‚Ñ€Ð¾Ð¹Ð½Ð°Ñ 90 градуÑов";
+ Text[ el ] = "Μπλέ Ï„Ïιπλό 90 μοίÏες";
+ Text[ nl ] = "Blauw drievoudig gekruist 90 graden";
+ Text[ fr ] = "Bleu triple incliné 90 degrés";
+ Text[ es ] = "Azul red triple 90 grados";
+ Text[ fi ] = "Sininen kolminkertainen 90 astetta";
+ Text[ ca ] = "Blau triple 90 graus";
+ Text[ it ] = "Blu tripla rete 90 gradi";
+ Text[ sk ] = "Modrá trikrát 90 stupňov";
+ Text[ da ] = "Blåt 3'er gitter 90 grader";
+ Text[ sv ] = "Blått trippelnät 90 grader";
+ Text[ pl ] = "Potrójne niebieskie 90°";
+ Text[ pt-BR ] = "Azul triplo 90 graus";
+ Text[ th ] = " 90 องศาสามอันสีน้ำเงิน";
+ Text[ ja ] = "é’ 3本縞 90度";
+ Text[ ko ] = "청색 3중네트 90ë„";
+ Text[ zh-CN ] = "è“色三é‡ç½‘格线 90 度";
+ Text[ zh-TW ] = "è—色三網 90 度";
+ Text[ tr ] = "Mavi 3'lü ızgaralı 90 derece";
+ Text[ hi-IN ] = "नीला तिगà¥à¤¨à¤¾ 90 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أزرق شبكة ثلاثية 90 درجة";
+ Text[ he ] = "Blau 3er Netz 90 Grad";
+};
+String RID_SVXSTR_HATCH9
+{
+ Text [ de ] = "Schwarz 0 Grad";
+ Text [ en-US ] = "Black 0 degrees";
+ Text[ pt ] = "Preto 0 graus";
+ Text[ ru ] = "Ð§ÐµÑ€Ð½Ð°Ñ 0 градуÑов";
+ Text[ el ] = "ΜαÏÏο 0 μοίÏες";
+ Text[ nl ] = "Zwart 0 graden";
+ Text[ fr ] = "Noir 0 degré";
+ Text[ es ] = "Negro 0 grados";
+ Text[ fi ] = "Musta 0 astetta";
+ Text[ ca ] = "Negre 0 graus";
+ Text[ it ] = "Nero 0 gradi";
+ Text[ sk ] = "Čierna 0 stupňov";
+ Text[ da ] = "Sort 0 grader";
+ Text[ sv ] = "Svart 0 grader";
+ Text[ pl ] = "Czarne 0°";
+ Text[ pt-BR ] = "Preto 0 graus";
+ Text[ th ] = "0 องศาสีดำ";
+ Text[ ja ] = "黒 0度";
+ Text[ ko ] = "ê²€ì€ìƒ‰ 0ë„";
+ Text[ zh-CN ] = "黑色 0 度";
+ Text[ zh-TW ] = "黑色 0 度";
+ Text[ tr ] = "Siyah 0 derece";
+ Text[ hi-IN ] = "काला 0 डिगà¥à¤°à¤¿à¤¯à¤¾à¤";
+ Text[ ar ] = "أسود 0 درجة";
+ Text[ he ] = "Schwarz 0 Grad";
+};
+String RID_SVXSTR_HATCH10
+{
+ Text [ de ] = "Schraffur" ;
+ Text [ en-US ] = "Hatching" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Tracejado";
+ Text[ ru ] = "Штриховка";
+ Text[ el ] = "ΓÏαμμοσκιά";
+ Text[ nl ] = "Arcering";
+ Text[ fr ] = "Hachure";
+ Text[ es ] = "Trama";
+ Text[ fi ] = "Viivoitus";
+ Text[ ca ] = "Ombreig";
+ Text[ it ] = "Tratteggio";
+ Text[ sk ] = "Å rafovanie";
+ Text[ da ] = "Skravering";
+ Text[ sv ] = "Skraffering";
+ Text[ pl ] = "Kreskowanie";
+ Text[ pt-BR ] = "Hachurado";
+ Text[ th ] = "à¹à¸£à¹€à¸‡à¸²";
+ Text[ ja ] = "ãƒãƒƒãƒãƒ³ã‚°";
+ Text[ ko ] = "í•´ì¹­";
+ Text[ zh-CN ] = "阴影线";
+ Text[ zh-TW ] = "陰影線";
+ Text[ tr ] = "Tarama";
+ Text[ hi-IN ] = "हाचिंग";
+ Text[ ar ] = "نقش";
+ Text[ he ] = "Schraffur";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// 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";
+};
+
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP21_DEF
+{
+ Text = "Bitmape";
+};
+
+String RID_SVXSTR_BMP0
+{
+ Text [ de ] = "Leer";
+ Text [ en-US ] = "Blank";
+ Text[ pt ] = "Vazio";
+ Text[ ru ] = "ПуÑто";
+ Text[ el ] = "Κενό";
+ Text[ nl ] = "Blanco";
+ Text[ fr ] = "Vide";
+ Text[ es ] = "Vacío";
+ Text[ fi ] = "Tyhjä";
+ Text[ ca ] = "En blanc";
+ Text[ it ] = "Vuoto";
+ Text[ sk ] = "Prázdny";
+ Text[ da ] = "Tomt";
+ Text[ sv ] = "Tomt";
+ Text[ pl ] = "Pusty";
+ Text[ pt-BR ] = "Em branco";
+ Text[ th ] = "ช่องว่าง";
+ Text[ ja ] = "空白";
+ Text[ ko ] = "공백";
+ Text[ zh-CN ] = "空缺";
+ Text[ zh-TW ] = "空缺";
+ Text[ tr ] = "BoÅŸ";
+ Text[ hi-IN ] = "खाली";
+ Text[ ar ] = "Ùارغ";
+ Text[ he ] = "Leer";
+};
+String RID_SVXSTR_BMP1
+{
+ Text [ de ] = "Himmel";
+ Text [ en-US ] = "Sky";
+ Text[ pt ] = "Céu";
+ Text[ ru ] = "Ðебо";
+ Text[ el ] = "ΟυÏανός";
+ Text[ nl ] = "Hemel";
+ Text[ fr ] = "Ciel";
+ Text[ es ] = "Cielo";
+ Text[ fi ] = "Taivas";
+ Text[ ca ] = "Cel";
+ Text[ it ] = "Cielo";
+ Text[ sk ] = "Obloha";
+ Text[ da ] = "Himmel";
+ Text[ sv ] = "Himmel";
+ Text[ pl ] = "Niebo";
+ Text[ pt-BR ] = "Céu";
+ Text[ th ] = "ท้องฟ้า";
+ Text[ ja ] = "空";
+ Text[ ko ] = "하늘";
+ Text[ zh-CN ] = "天空";
+ Text[ zh-TW ] = "天空";
+ Text[ tr ] = "Gökyüzü";
+ Text[ hi-IN ] = "आकाश";
+ Text[ ar ] = "السماء";
+ Text[ he ] = "Himmel";
+};
+String RID_SVXSTR_BMP2
+{
+ Text [ de ] = "Wasser";
+ Text [ en-US ] = "Water";
+ Text[ pt ] = "Ãgua";
+ Text[ ru ] = "Вода";
+ Text[ el ] = "ÎεÏÏŒ";
+ Text[ nl ] = "Water";
+ Text[ fr ] = "Eau";
+ Text[ es ] = "Agua";
+ Text[ fi ] = "Vesi";
+ Text[ ca ] = "Aigua";
+ Text[ it ] = "Acqua";
+ Text[ sk ] = "Voda";
+ Text[ da ] = "Vand";
+ Text[ sv ] = "Vatten";
+ Text[ pl ] = "Woda";
+ Text[ pt-BR ] = "Ãgua";
+ Text[ th ] = "น้ำ";
+ Text[ ja ] = "æ°´é¢";
+ Text[ ko ] = "수면";
+ Text[ zh-CN ] = "æ°´";
+ Text[ zh-TW ] = "æ°´";
+ Text[ tr ] = "Su";
+ Text[ hi-IN ] = "पानी";
+ Text[ ar ] = "مياه";
+ Text[ he ] = "Wasser";
+};
+String RID_SVXSTR_BMP3
+{
+ Text [ de ] = "Grobkörnig";
+ Text [ en-US ] = "Coarse grained";
+ Text[ pt ] = "Granulado grosso";
+ Text[ ru ] = "ÐšÑ€ÑƒÐ¿Ð½Ð°Ñ Ð·ÐµÑ€Ð½Ð¸ÑтоÑÑ‚ÑŒ";
+ Text[ el ] = "ΧοντÏόκοκκα";
+ Text[ nl ] = "Grove korrel";
+ Text[ fr ] = "Gros grain";
+ Text[ es ] = "Grano grueso";
+ Text[ fi ] = "Karkea jyvitys";
+ Text[ ca ] = "En gra gruixut";
+ Text[ it ] = "Grana grossa";
+ Text[ sk ] = "Hrubozrnný";
+ Text[ da ] = "Grynet";
+ Text[ sv ] = "Grovkornig";
+ Text[ pl ] = "Chropowatość";
+ Text[ pt-BR ] = "Granulado grosso";
+ Text[ th ] = "เนื้อหยาบ";
+ Text[ ja ] = "ã–らã–らã—ãŸé¢";
+ Text[ ko ] = "거친 알갱ì´";
+ Text[ zh-CN ] = "粗颗粒";
+ Text[ zh-TW ] = "æ·±è—";
+ Text[ tr ] = "Ä°ri taneler";
+ Text[ hi-IN ] = "कोà¤à¤°à¥à¤¸ गà¥à¤°à¥‡à¤‡à¤¨à¥à¤¡";
+ Text[ ar ] = "Ø­ÙبَيْبÙيّ خشن";
+ Text[ he ] = "Grobkörnig";
+};
+String RID_SVXSTR_BMP4
+{
+ Text [ de ] = "Quecksilber";
+ Text [ en-US ] = "Mercury";
+ Text[ pt ] = "Mercúrio";
+ Text[ ru ] = "Ртуть";
+ Text[ el ] = "ΥδÏάÏγυÏος";
+ Text[ nl ] = "Kwikzilver";
+ Text[ fr ] = "Mercure";
+ Text[ es ] = "Mercurio";
+ Text[ fi ] = "Elohopea";
+ Text[ ca ] = "Mercuri";
+ Text[ it ] = "Mercurio";
+ Text[ sk ] = "Medený";
+ Text[ da ] = "Kviksølv";
+ Text[ sv ] = "Kvicksilver";
+ Text[ pl ] = "Rtęć";
+ Text[ pt-BR ] = "Mercúrio";
+ Text[ th ] = "ปรอท";
+ Text[ ja ] = "スペースメタル";
+ Text[ ko ] = "수ì€";
+ Text[ zh-CN ] = "水银";
+ Text[ zh-TW ] = "水銀";
+ Text[ tr ] = "Çikolata";
+ Text[ hi-IN ] = "मरà¥à¤•à¥à¤°à¥€";
+ Text[ ar ] = "زئبق";
+ Text[ he ] = "Quecksilber";
+};
+String RID_SVXSTR_BMP5
+{
+ Text [ de ] = "Weltraum";
+ Text [ en-US ] = "Space";
+ Text[ pt ] = "Espaço cósmico";
+ Text[ ru ] = "КоÑмоÑ";
+ Text[ el ] = "Διάστημα";
+ Text[ nl ] = "Heelal";
+ Text[ fr ] = "Cosmos";
+ Text[ es ] = "Espacio";
+ Text[ fi ] = "Avaruus";
+ Text[ ca ] = "Espai";
+ Text[ it ] = "Spazio";
+ Text[ sk ] = "Medzera";
+ Text[ da ] = "Verdensrum";
+ Text[ sv ] = "Världsrymd";
+ Text[ pl ] = "Kosmos";
+ Text[ pt-BR ] = "Espaço";
+ Text[ th ] = "อวà¸à¸²à¸¨";
+ Text[ ja ] = "銀河星雲";
+ Text[ ko ] = "우주";
+ Text[ zh-CN ] = "宇宙";
+ Text[ zh-TW ] = "太空";
+ Text[ tr ] = "Uzay";
+ Text[ hi-IN ] = "अंतरिकà¥à¤·";
+ Text[ ar ] = "الÙضاء";
+ Text[ he ] = "Weltraum";
+};
+String RID_SVXSTR_BMP6
+{
+ Text [ de ] = "Metall";
+ Text [ en-US ] = "Metal";
+ Text[ pt ] = "Metal";
+ Text[ ru ] = "Металл";
+ Text[ el ] = "Μέταλλο";
+ Text[ nl ] = "Metaal";
+ Text[ fr ] = "Métal";
+ Text[ es ] = "Metal";
+ Text[ fi ] = "Metalli";
+ Text[ ca ] = "Metall";
+ Text[ it ] = "Metallo";
+ Text[ sk ] = "Kov";
+ Text[ da ] = "Metal";
+ Text[ sv ] = "Metall";
+ Text[ pl ] = "Metal";
+ Text[ pt-BR ] = "Metal";
+ Text[ th ] = "โลหะ";
+ Text[ ja ] = "ã¤ã¶ã¤ã¶ã—ãŸé¢";
+ Text[ ko ] = "금ì†";
+ Text[ zh-CN ] = "金属";
+ Text[ zh-TW ] = "金屬";
+ Text[ tr ] = "Metal";
+ Text[ hi-IN ] = "लोहा";
+ Text[ ar ] = "معدن";
+ Text[ he ] = "Metall";
+};
+String RID_SVXSTR_BMP7
+{
+ Text [ de ] = "Tropfen";
+ Text [ en-US ] = "Droplets";
+ Text[ pt ] = "Gotas";
+ Text[ ru ] = "Капли";
+ Text[ el ] = "Σταγόνες";
+ Text[ nl ] = "Druppels";
+ Text[ fr ] = "Gouttelettes";
+ Text[ es ] = "Gotas";
+ Text[ fi ] = "Pisarat";
+ Text[ ca ] = "Gotetes";
+ Text[ it ] = "Gocce";
+ Text[ sk ] = "Kvapky";
+ Text[ da ] = "Dråber";
+ Text[ sv ] = "Droppar";
+ Text[ pl ] = "Krople";
+ Text[ pt-BR ] = "Gotículas";
+ Text[ th ] = "หยดนิดเดียว";
+ Text[ ja ] = "ã—ãšã";
+ Text[ ko ] = "물방울";
+ Text[ zh-CN ] = "æ°´æ»´";
+ Text[ zh-TW ] = "æ°´æ»´";
+ Text[ tr ] = "Damla";
+ Text[ hi-IN ] = "डà¥à¤°à¥‹à¤ªà¥à¤²à¥‡à¤Ÿà¥à¤¸à¥";
+ Text[ ar ] = "قطرات";
+ Text[ he ] = "Tropfen";
+};
+String RID_SVXSTR_BMP8
+{
+ Text [ de ] = "Marmor";
+ Text [ en-US ] = "Marble";
+ Text[ pt ] = "Mármore";
+ Text[ ru ] = "Мрамор";
+ Text[ el ] = "ΜάÏμαÏο";
+ Text[ nl ] = "Marmer";
+ Text[ fr ] = "Marbre";
+ Text[ es ] = "Mármol";
+ Text[ fi ] = "Marmori";
+ Text[ ca ] = "Marbre";
+ Text[ it ] = "Marmo";
+ Text[ sk ] = "Mramor";
+ Text[ da ] = "Marmor";
+ Text[ sv ] = "Marmor";
+ Text[ pl ] = "Marmur";
+ Text[ pt-BR ] = "Mármore";
+ Text[ th ] = "หินอ่อน";
+ Text[ ja ] = "白大ç†çŸ³";
+ Text[ ko ] = "대리ì„";
+ Text[ zh-CN ] = "大ç†çŸ³";
+ Text[ zh-TW ] = "大ç†çŸ³";
+ Text[ tr ] = "Mermer";
+ Text[ hi-IN ] = "संगमरमर";
+ Text[ ar ] = "رخام";
+ Text[ he ] = "Marmor";
+};
+String RID_SVXSTR_BMP9
+{
+ Text [ de ] = "Leinen";
+ Text [ en-US ] = "Linen";
+ Text[ pt ] = "Linho";
+ Text[ ru ] = "Полотно";
+ Text[ el ] = "Λινό";
+ Text[ nl ] = "Linnen";
+ Text[ fr ] = "Lin";
+ Text[ es ] = "Lino";
+ Text[ fi ] = "Pellava";
+ Text[ ca ] = "Lli";
+ Text[ it ] = "Lino";
+ Text[ sk ] = "Plátno";
+ Text[ da ] = "Lærred";
+ Text[ sv ] = "Linne";
+ Text[ pl ] = "Len";
+ Text[ pt-BR ] = "Linho";
+ Text[ th ] = "ลินิน";
+ Text[ ja ] = "リãƒãƒ³åœ°";
+ Text[ ko ] = "아마í¬";
+ Text[ zh-CN ] = "麻布";
+ Text[ zh-TW ] = "亞麻";
+ Text[ tr ] = "Keten";
+ Text[ hi-IN ] = "लिनन";
+ Text[ ar ] = "كتّان";
+ Text[ he ] = "Leinen";
+};
+String RID_SVXSTR_BMP10
+{
+ Text [ de ] = "Stein";
+ Text [ en-US ] = "Stone";
+ Text[ pt ] = "Pedra";
+ Text[ ru ] = "Камень";
+ Text[ el ] = "ΠέτÏα";
+ Text[ nl ] = "Steen";
+ Text[ fr ] = "Pierre";
+ Text[ es ] = "Piedra";
+ Text[ fi ] = "Kivi";
+ Text[ ca ] = "Pedra";
+ Text[ it ] = "Pietra";
+ Text[ sk ] = "Kameň";
+ Text[ da ] = "Sten";
+ Text[ sv ] = "Sten";
+ Text[ pl ] = "Kamień";
+ Text[ pt-BR ] = "Pedra";
+ Text[ th ] = "หิน";
+ Text[ ja ] = "花崗岩";
+ Text[ ko ] = "ëŒ";
+ Text[ zh-CN ] = "石碑";
+ Text[ zh-TW ] = "石頭";
+ Text[ tr ] = "TaÅŸ";
+ Text[ hi-IN ] = "पतà¥à¤¥à¤°";
+ Text[ ar ] = "حجر";
+ Text[ he ] = "Stein";
+};
+String RID_SVXSTR_BMP11
+{
+ Text [ de ] = "Schotter";
+ Text [ en-US ] = "Gravel";
+ Text[ pt ] = "Cascalho";
+ Text[ ru ] = "Гравий";
+ Text[ el ] = "Χαλίκια";
+ Text[ nl ] = "Puin";
+ Text[ fr ] = "Gravier";
+ Text[ es ] = "Grava";
+ Text[ fi ] = "Sora";
+ Text[ ca ] = "Grava";
+ Text[ it ] = "Ghiaia";
+ Text[ sk ] = "Å trk";
+ Text[ da ] = "Grus";
+ Text[ sv ] = "Makadam";
+ Text[ pl ] = "Żwir";
+ Text[ pt-BR ] = "Cascalho";
+ Text[ th ] = "à¸à¸£à¸§à¸”";
+ Text[ ja ] = "砂利é“";
+ Text[ ko ] = "ìžê°ˆ";
+ Text[ zh-CN ] = "碎石";
+ Text[ zh-TW ] = "碎石";
+ Text[ tr ] = "Çakıl";
+ Text[ hi-IN ] = "कंकड";
+ Text[ ar ] = "حصى";
+ Text[ he ] = "Schotter";
+};
+String RID_SVXSTR_BMP12
+{
+ Text [ de ] = "Mauer";
+ Text [ en-US ] = "Wall";
+ Text[ pt ] = "Parede";
+ Text[ ru ] = "Стена";
+ Text[ el ] = "Τοίχος";
+ Text[ nl ] = "Muur";
+ Text[ fr ] = "Muraille";
+ Text[ es ] = "Muralla";
+ Text[ fi ] = "Seinä";
+ Text[ ca ] = "Mur";
+ Text[ it ] = "Muro";
+ Text[ sk ] = "Stena";
+ Text[ da ] = "Mur";
+ Text[ sv ] = "Mur";
+ Text[ pl ] = "Mur";
+ Text[ pt-BR ] = "Parede";
+ Text[ th ] = "ผนัง";
+ Text[ ja ] = "石垣";
+ Text[ ko ] = "ë²½";
+ Text[ zh-CN ] = "墙";
+ Text[ zh-TW ] = "牆";
+ Text[ tr ] = "Duvar";
+ Text[ hi-IN ] = "वॉल";
+ Text[ ar ] = "سور";
+ Text[ he ] = "Mauer";
+};
+String RID_SVXSTR_BMP13
+{
+ Text [ de ] = "Ziegelsteine";
+ Text [ en-US ] = "Brownstone";
+ Text[ pt ] = "Tijolos";
+ Text[ ru ] = "Кирпич";
+ Text[ el ] = "ΠυÏίμαχα τοÏβλα";
+ Text[ nl ] = "Bakstenen";
+ Text[ fr ] = "Briques";
+ Text[ es ] = "Ladrillo";
+ Text[ fi ] = "Tiilenruskea";
+ Text[ ca ] = "Totxo";
+ Text[ it ] = "Mattoni";
+ Text[ sk ] = "Drahokamy";
+ Text[ da ] = "Teglsten";
+ Text[ sv ] = "Tegelstenar";
+ Text[ pl ] = "Cegły";
+ Text[ pt-BR ] = "Tijolos";
+ Text[ th ] = "หินสีน้ำตาล";
+ Text[ ja ] = "れんãŒå¡€";
+ Text[ ko ] = "ë²½ëŒ";
+ Text[ zh-CN ] = "红砖墙";
+ Text[ zh-TW ] = "磚石";
+ Text[ tr ] = "TuÄŸla";
+ Text[ hi-IN ] = "बà¥à¤°à¤‰à¤¨à¤¸à¥à¤Ÿà¥‹à¤¨à¥";
+ Text[ ar ] = "قوالب طوب";
+ Text[ he ] = "Ziegelsteine";
+};
+String RID_SVXSTR_BMP14
+{
+ Text [ de ] = "Geflecht";
+ Text [ en-US ] = "Netting";
+ Text[ pt ] = "Rede";
+ Text[ ru ] = "Сеть";
+ Text[ el ] = "Πλέγμα";
+ Text[ nl ] = "Vlechtwerk";
+ Text[ fr ] = "Tresses";
+ Text[ es ] = "Malla";
+ Text[ fi ] = "Verkko";
+ Text[ ca ] = "Malla";
+ Text[ it ] = "Rete";
+ Text[ sk ] = "Pletivo";
+ Text[ da ] = "Fletværk";
+ Text[ sv ] = "Flätverk";
+ Text[ pl ] = "Plecionka";
+ Text[ pt-BR ] = "Malha";
+ Text[ th ] = "ตาข่าย";
+ Text[ ja ] = "麻織物";
+ Text[ ko ] = "엮어ì§";
+ Text[ zh-CN ] = "编织物";
+ Text[ zh-TW ] = "編織物";
+ Text[ tr ] = "Hasır";
+ Text[ hi-IN ] = "नेटà¥à¤Ÿà¤¿à¤‚ग";
+ Text[ ar ] = "شبكة";
+ Text[ he ] = "Geflecht";
+};
+String RID_SVXSTR_BMP15
+{
+ Text [ de ] = "Laub";
+ Text [ en-US ] = "Leaves";
+ Text[ pt ] = "Folhagem";
+ Text[ ru ] = "ЛиÑÑ‚ÑŒÑ";
+ Text[ el ] = "ΦÏλλωμα";
+ Text[ nl ] = "Loof";
+ Text[ fr ] = "Vigne vierge";
+ Text[ es ] = "Follaje";
+ Text[ fi ] = "Lehdet";
+ Text[ ca ] = "Fulles";
+ Text[ it ] = "Foglie";
+ Text[ sk ] = "Lístie";
+ Text[ da ] = "Løv";
+ Text[ sv ] = "Löv";
+ Text[ pl ] = "Liście";
+ Text[ pt-BR ] = "Folhagem";
+ Text[ th ] = "ใบไม้";
+ Text[ ja ] = "蔦";
+ Text[ ko ] = "나뭇잎";
+ Text[ zh-CN ] = "æ ‘å¶";
+ Text[ zh-TW ] = "樹葉";
+ Text[ tr ] = "Yapraklar";
+ Text[ hi-IN ] = "पतà¥à¤¤à¤¾";
+ Text[ ar ] = "ورق أشجار";
+ Text[ he ] = "Laub";
+};
+String RID_SVXSTR_BMP16
+{
+ Text [ de ] = "Kunstrasen";
+ Text [ en-US ] = "Artificial Turf";
+ Text[ pt ] = "Relva artificial";
+ Text[ ru ] = "ИÑкуÑÑтвенный дерн";
+ Text[ el ] = "Τεχνητός χοÏτοτάπητας";
+ Text[ nl ] = "Kunstgras";
+ Text[ fr ] = "Gazon artificiel";
+ Text[ es ] = "Césped sintético";
+ Text[ fi ] = "Keinonurmi";
+ Text[ ca ] = "Gespa artificial";
+ Text[ it ] = "Prato artificiale";
+ Text[ sk ] = "Umelý trávnik";
+ Text[ da ] = "Kunstig plæne";
+ Text[ sv ] = "Konstgjord gräsmatta";
+ Text[ pl ] = "Sztuczny trawnik";
+ Text[ pt-BR ] = "Grama Artificial";
+ Text[ th ] = "หà¸à¹‰à¸²à¹€à¸—ียม";
+ Text[ ja ] = "人工èŠç”Ÿ";
+ Text[ ko ] = "ì¸ê³µìž”ë””";
+ Text[ zh-CN ] = "人造è‰åœ°";
+ Text[ zh-TW ] = "人造è‰åœ°";
+ Text[ tr ] = "Yapay çim";
+ Text[ hi-IN ] = "कृतà¥à¤°à¤¿à¤® ढेला";
+ Text[ ar ] = "نجيل صناعي";
+ Text[ he ] = "Kunstrasen";
+};
+String RID_SVXSTR_BMP17
+{
+ Text [ de ] = "Gänseblümchen";
+ Text [ en-US ] = "Daisy";
+ Text[ pt ] = "Margaridas";
+ Text[ ru ] = "Маргаритки";
+ Text[ el ] = "ΑσπÏολοÏλουδο";
+ Text[ nl ] = "Madeliefjes";
+ Text[ fr ] = "Marguerites";
+ Text[ es ] = "Margarita";
+ Text[ fi ] = "Päivänkakkara";
+ Text[ ca ] = "Margarida";
+ Text[ it ] = "Margherite";
+ Text[ sk ] = "Sedmikráska";
+ Text[ da ] = "Tusindfryd";
+ Text[ sv ] = "Tusenskönor";
+ Text[ pl ] = "Stokrotka";
+ Text[ pt-BR ] = "Margarida";
+ Text[ th ] = "เดซี่";
+ Text[ ja ] = "デージー";
+ Text[ ko ] = "ë°ì´ì§€ê½ƒ";
+ Text[ zh-CN ] = "é›èŠ";
+ Text[ zh-TW ] = "é››èŠ";
+ Text[ tr ] = "Papatya";
+ Text[ hi-IN ] = "गà¥à¤²à¤¬à¤¹à¤¾à¤°";
+ Text[ ar ] = "زهرة الربيع";
+ Text[ he ] = "Gänseblümchen";
+};
+String RID_SVXSTR_BMP18
+{
+ Text [ de ] = "Orange";
+ Text [ en-US ] = "Orange";
+ Text[ pt ] = "Laranja";
+ Text[ ru ] = "ÐпельÑин";
+ Text[ el ] = "ΠοÏτοκαλί";
+ Text[ nl ] = "Oranje";
+ Text[ fr ] = "Rouille";
+ Text[ es ] = "Naranja";
+ Text[ fi ] = "Oranssi";
+ Text[ ca ] = "Taronja";
+ Text[ it ] = "Arancione";
+ Text[ sk ] = "Oranžová";
+ Text[ da ] = "Orange";
+ Text[ sv ] = "Orange";
+ Text[ pl ] = "Pomarańcza";
+ Text[ pt-BR ] = "Laranja";
+ Text[ th ] = "ส้ม";
+ Text[ ja ] = "オレンジ";
+ Text[ ko ] = "주황색";
+ Text[ zh-CN ] = "橙色";
+ Text[ zh-TW ] = "橙色";
+ Text[ tr ] = "Turuncu";
+ Text[ hi-IN ] = "नारंग";
+ Text[ ar ] = "برتقالي";
+ Text[ he ] = "Orange";
+};
+String RID_SVXSTR_BMP19
+{
+ Text [ de ] = "Feurig";
+ Text [ en-US ] = "Fiery";
+ Text[ pt ] = "Chamas";
+ Text[ ru ] = "Огонь";
+ Text[ el ] = "Φλεγόμενος";
+ Text[ nl ] = "Vurig";
+ Text[ fr ] = "Flamme";
+ Text[ es ] = "Fogoso";
+ Text[ fi ] = "Tulinen";
+ Text[ ca ] = "Fogós";
+ Text[ it ] = "Fiamma";
+ Text[ sk ] = "Plamenný";
+ Text[ da ] = "Flammende";
+ Text[ sv ] = "Eldig";
+ Text[ pl ] = "PÅ‚omienie";
+ Text[ pt-BR ] = "Chamas";
+ Text[ th ] = "เพลิง";
+ Text[ ja ] = "ç¼ç†±";
+ Text[ ko ] = "불꽃";
+ Text[ zh-CN ] = "ç«ç„°";
+ Text[ zh-TW ] = "ç«ç´…色";
+ Text[ tr ] = "AteÅŸ";
+ Text[ hi-IN ] = "तीकà¥à¤·à¥à¤£";
+ Text[ ar ] = "ناري";
+ Text[ he ] = "Feurig";
+};
+String RID_SVXSTR_BMP20
+{
+ Text [ de ] = "Rosen";
+ Text [ en-US ] = "Roses";
+ Text[ pt ] = "Rosas";
+ Text[ ru ] = "Розы";
+ Text[ el ] = "ΤÏιαντάφυλλο";
+ Text[ nl ] = "Rozen";
+ Text[ fr ] = "Roses";
+ Text[ es ] = "Rosas";
+ Text[ fi ] = "Ruusut";
+ Text[ ca ] = "Roses";
+ Text[ it ] = "Rose";
+ Text[ sk ] = "Ruže";
+ Text[ da ] = "Roser";
+ Text[ sv ] = "Rosor";
+ Text[ pl ] = "Róże";
+ Text[ pt-BR ] = "Rosas";
+ Text[ th ] = "à¸à¸¸à¸«à¸¥à¸²à¸š";
+ Text[ ja ] = "真ã£èµ¤ãªãƒãƒ©";
+ Text[ ko ] = "장미";
+ Text[ zh-CN ] = "玫瑰";
+ Text[ zh-TW ] = "玫瑰";
+ Text[ tr ] = "Gül";
+ Text[ hi-IN ] = "गà¥à¤²à¤¾à¤¬";
+ Text[ ar ] = "ورد";
+ Text[ he ] = "Rosen";
+};
+
+String RID_SVXSTR_BMP21
+{
+ Text [ de ] = "Bitmap";
+ Text [ en-US ] = "Bitmap";
+ Text[ pt ] = "Bitmap";
+ Text[ ru ] = "РаÑÑ‚Ñ€";
+ Text[ el ] = "Bitmap";
+ Text[ nl ] = "Bitmap";
+ Text[ fr ] = "Bitmap";
+ Text[ es ] = "Mapa de bits";
+ Text[ fi ] = "Bittikartta";
+ Text[ ca ] = "Mapa de bits";
+ Text[ it ] = "Bitmap";
+ Text[ sk ] = "Bitová mapa";
+ Text[ da ] = "Bitmap";
+ Text[ sv ] = "Bitmap";
+ Text[ pl ] = "Mapa bitowa";
+ Text[ pt-BR ] = "Bitmap";
+ Text[ th ] = "บิทà¹à¸¡à¹‡à¸›";
+ Text[ ja ] = "ビットマップ";
+ Text[ ko ] = "비트맵";
+ Text[ zh-CN ] = "ä½å›¾";
+ Text[ zh-TW ] = "點陣圖";
+ Text[ tr ] = "Bitmap";
+ Text[ hi-IN ] = "बिटमॉपà¥";
+ Text[ ar ] = "صورة نقطية";
+ Text[ he ] = "Bitmap";
+};
+///////////////////////////////////////////////////////////////////////////////
+//
+// 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)";
+};
+/* nicht uebersetzen */
+// needed: #i33205#
+String RID_SVXSTR_DASH11_DEF
+{
+ Text = "Dash";
+};
+
+String RID_SVXSTR_DASH0
+{
+ Text [ de ] = "Ultrafein gestrichelt";
+ Text [ en-US ] = "Ultrafine dashed";
+ Text[ pt ] = "Tracejado ultrafino";
+ Text[ ru ] = "Сверхтонкий штрих";
+ Text[ el ] = "Διακεκομμένη (Î Î¿Î»Ï Î»ÎµÏ€Ï„Î®)";
+ Text[ nl ] = "Extra fijne streepjes";
+ Text[ fr ] = "Traits ultrafins";
+ Text[ es ] = "Trazos ultrafinos";
+ Text[ fi ] = "Hyvin ohut katkoviiva";
+ Text[ ca ] = "Traços molt fins";
+ Text[ it ] = "A tratti finissimi";
+ Text[ sk ] = "Veľmi jemne Äiarkovaný";
+ Text[ da ] = "Ultrafin stiplet";
+ Text[ sv ] = "Mycket fint streckad";
+ Text[ pl ] = "Bardzo cienkie kreski";
+ Text[ pt-BR ] = "Tracejado ultra fino";
+ Text[ th ] = "เส้นประที่บางมาà¸";
+ Text[ ja ] = "極細ã®ç ´ç·š";
+ Text[ ko ] = "미세한 파선";
+ Text[ zh-CN ] = "超细划线";
+ Text[ zh-TW ] = "超細點劃線";
+ Text[ tr ] = "Çok ince kesik çizgili";
+ Text[ hi-IN ] = "अतà¥à¤¯à¤¨à¥à¤¤ सूकà¥à¤·à¥à¤® बिनà¥à¤¦à¥à¤“ं से डॉशॠकी हà¥à¤¯à¥€";
+ Text[ ar ] = "Ø´Ùرط رÙيعة جداً";
+ Text[ he ] = "Ultrafein gestrichelt";
+};
+String RID_SVXSTR_DASH1
+{
+ Text [ de ] = "Fein gestrichelt";
+ Text [ en-US ] = "Fine dashed";
+ Text[ pt ] = "Tracejado fino";
+ Text[ ru ] = "Тонкий штрих";
+ Text[ el ] = "Διακεκομμένη (λεπτή)";
+ Text[ nl ] = "Streepjes";
+ Text[ fr ] = "Traits fins";
+ Text[ es ] = "Trazos finos";
+ Text[ fi ] = "Ohut katkoviiva";
+ Text[ ca ] = "Traços fins";
+ Text[ it ] = "A tratti fini";
+ Text[ sk ] = "Jemne Äiarkovaný";
+ Text[ da ] = "Fin stiplet";
+ Text[ sv ] = "Fint streckad";
+ Text[ pl ] = "Cienkie kreski";
+ Text[ pt-BR ] = "Tracejado fino";
+ Text[ th ] = "เส้นประบาง";
+ Text[ ja ] = "ç´°ã‹ã„ç ´ç·š";
+ Text[ ko ] = "섬세한 파선";
+ Text[ zh-CN ] = "细划线";
+ Text[ zh-TW ] = "細點劃線";
+ Text[ tr ] = "İnce kesik çizgili";
+ Text[ hi-IN ] = "सूकà¥à¤·à¥à¤® बिनà¥à¤¦à¥à¤“ं से डॉशॠकी हà¥à¤¯à¥€";
+ Text[ ar ] = "Ø´Ùرط رÙيعة";
+ Text[ he ] = "Fein gestrichelt";
+};
+String RID_SVXSTR_DASH2
+{
+ Text [ de ] = "Ultrafein 2 Punkte 3 Striche";
+ Text [ en-US ] = "Ultrafine 2 dots 3 dashes";
+ Text[ pt ] = "3 traços 2 pontos ultrafino";
+ Text[ ru ] = "Ð¡Ð²ÐµÑ€Ñ…Ñ‚Ð¾Ð½ÐºÐ°Ñ 2 точки 3 штриха";
+ Text[ el ] = "2 τελείες - 3 παÏλες (Ï€Î¿Î»Ï Î»ÎµÏ€Ï„Î­Ï‚)";
+ Text[ nl ] = "Extra fijn 2 puntjes 3 streepjes";
+ Text[ fr ] = "Ultrafine 2 points 3 traits";
+ Text[ es ] = "Ultrafino 2 puntos 2 trazos";
+ Text[ fi ] = "Hyvin ohut, 2 pistettä, 3 katkoviivaa";
+ Text[ ca ] = "Ultrafí 2 punts 2 traços";
+ Text[ it ] = "A 2 punti 3 linee finissimi";
+ Text[ sk ] = "Veľmi jemné dve bodky a tri Äiarky";
+ Text[ da ] = "Ultrafin 2 punkter 3 streger";
+ Text[ sv ] = "Mycket fint 2 prickar 3 streck";
+ Text[ pl ] = "Bardzo cienkie 2 kropki 3 kreski";
+ Text[ pt-BR ] = "3 traços 2 pontos ultra fino";
+ Text[ th ] = "เส้นประ 2 จุด 3 ขีดที่บางมาà¸";
+ Text[ ja ] = "極細ã®äºŒç‚¹ä¸‰ç ´ç·š";
+ Text[ ko ] = "섬세한 2ì  3파선";
+ Text[ zh-CN ] = "超细2点3划线";
+ Text[ zh-TW ] = "超細兩點三劃線";
+ Text[ tr ] = "Çok ince 2 nokta 3 çizgi";
+ Text[ hi-IN ] = "अतà¥à¤¯à¤¨à¥à¤¤ सूकà¥à¤·à¥à¤® 2 बिनà¥à¤¦à¥ 3 डॉश";
+ Text[ ar ] = "2 نقطة 3 شرط، رÙيعة جداً";
+ Text[ he ] = "Ultrafein 2 Punkte 3 Striche";
+};
+String RID_SVXSTR_DASH3
+{
+ Text [ de ] = "Fein gepunktet";
+ Text [ en-US ] = "Fine dotted";
+ Text[ pt ] = "Pontilhado fino";
+ Text[ ru ] = "Тонкий пунктир 1";
+ Text[ el ] = "Λεπτή διάστικτη";
+ Text[ nl ] = "Fijn gestippeld";
+ Text[ fr ] = "Fine pointillée";
+ Text[ es ] = "Punteado fino";
+ Text[ fi ] = "Pienet pisteet";
+ Text[ ca ] = "Amb puntejat fi";
+ Text[ it ] = "A punti fini";
+ Text[ sk ] = "Jemne bodkované";
+ Text[ da ] = "Fin punkteret";
+ Text[ sv ] = "Fint prickig";
+ Text[ pl ] = "Delikatne kropki";
+ Text[ pt-BR ] = "Pontilhado fino";
+ Text[ th ] = "จุดบาง";
+ Text[ ja ] = "ç´°ã‹ã„点線";
+ Text[ ko ] = "여린 ì ì„ ";
+ Text[ zh-CN ] = "细点线";
+ Text[ zh-TW ] = "細點";
+ Text[ tr ] = "İnce noktalı";
+ Text[ hi-IN ] = "सूकà¥à¤·à¥à¤® बिनà¥à¤¦à¥€";
+ Text[ ar ] = "نقاط رÙيعة";
+ Text[ he ] = "Fein gepunktet";
+};
+String RID_SVXSTR_DASH4
+{
+ Text [ de ] = "Strich mit feinen Punkten";
+ Text [ en-US ] = "Line with fine dots";
+ Text[ pt ] = "Traço com pontos finos";
+ Text[ ru ] = "Ð›Ð¸Ð½Ð¸Ñ Ñ Ñ‚Ð¾Ð½ÐºÐ¸Ð¼ пунктиром";
+ Text[ el ] = "ΓÏαμμή με λεπτές τελείες";
+ Text[ nl ] = "Lijn met fijne puntjes";
+ Text[ fr ] = "Trait avec des points fins";
+ Text[ es ] = "Trazo con puntos finos";
+ Text[ fi ] = "Viiva pienillä pisteillä";
+ Text[ ca ] = "Traç amb punts fins";
+ Text[ it ] = "Linea con punti fini";
+ Text[ sk ] = "Čiara tvorená jemnými bodkami";
+ Text[ da ] = "Streg med fine prikker";
+ Text[ sv ] = "Streck med fina prickar";
+ Text[ pl ] = "Linia z delikatnymi kropkami";
+ Text[ pt-BR ] = "Traço com pontilhado fino";
+ Text[ th ] = "เส้นเป็นจุดบาง";
+ Text[ ja ] = "ç´°ã‹ã„点ã®é›†ã¾ã£ãŸç·š";
+ Text[ ko ] = "섬세한 ì ì„ ";
+ Text[ zh-CN ] = "细点划线";
+ Text[ zh-TW ] = "細點線æ¢";
+ Text[ tr ] = "İnce noktalı çizgi";
+ Text[ hi-IN ] = "सूकà¥à¤· बिनà¥à¤¦à¥à¤“ं सहित रेखा";
+ Text[ ar ] = "خط ذو نقاط رÙيعة";
+ Text[ he ] = "Strich mit feinen Punkten";
+};
+String RID_SVXSTR_DASH5
+{
+ Text [ de ] = "Fein gestrichelt (variabel)";
+ Text [ en-US ] = "Fine dashed (variable)";
+ Text[ pt ] = "Tracejado fino (variável)";
+ Text[ ru ] = "Тонкий пунктир 2";
+ Text[ el ] = "Διακεκομμένη λεπτή (μεταβλητή)";
+ Text[ nl ] = "Streepjes (variabel)";
+ Text[ fr ] = "Traits fins (variable)";
+ Text[ es ] = "Trazos finos (variable)";
+ Text[ fi ] = "Pienet katkoviivat (muuttuja)";
+ Text[ ca ] = "Traços fins (variable)";
+ Text[ it ] = "A tratti fini (var)";
+ Text[ sk ] = "Jemne Äiarkovaný (premenlivé)";
+ Text[ da ] = "Fin stiplet (variabel)";
+ Text[ sv ] = "Fint streckad (variabel)";
+ Text[ pl ] = "Cienkie kreski (zmienne)";
+ Text[ pt-BR ] = "Tracejado fino (variável)";
+ Text[ th ] = "เส้นประบาง (ตัวà¹à¸›à¸£)";
+ Text[ ja ] = "ç´°ã‹ã„ç ´ç·š(å¯å¤‰)";
+ Text[ ko ] = "섬세한 파선(가변)";
+ Text[ zh-CN ] = "细划线 (å¯å˜)";
+ Text[ zh-TW ] = "細點劃線(å¯è®Š)";
+ Text[ tr ] = "İnce kesik çizgili (değişken)";
+ Text[ hi-IN ] = "सूकà¥à¤·à¥à¤® रूप से डॉश की हà¥à¤¯à¥€ (वेरिà¤à¤¬à¤²à¥)";
+ Text[ ar ] = "Ø´Ùرط رÙيعة (متغيرة)";
+ Text[ he ] = "Fein gestrichelt (variabel)";
+};
+String RID_SVXSTR_DASH6
+{
+ Text [ de ] = "3 Striche 3 Punkte (variabel)";
+ Text [ en-US ] = "3 dashes 3 dots (variable)";
+ Text[ pt ] = "3 traços 3 pontos (variável)";
+ Text[ ru ] = "3 штриха 3 точки";
+ Text[ el ] = "3 παÏλες - 3 τελείες (μεταβλητή)";
+ Text[ nl ] = "3 streepjes 3 puntjes (variabel)";
+ Text[ fr ] = "3 traits 3 points (variable)";
+ Text[ es ] = "3 trazos 3 puntos (variable)";
+ Text[ fi ] = "3 katkoviivaa, 3 pistettä (muuttuja)";
+ Text[ ca ] = "3 traços 3 punts (variable)";
+ Text[ it ] = "A 3 linee 3 punti (var)";
+ Text[ sk ] = "3 Äiarky 3 bodky (premenlivé)";
+ Text[ da ] = "3 streger 3 punkter (variabel)";
+ Text[ sv ] = "3 streck 3 prickar (variabel)";
+ Text[ pl ] = "3 kreski 3 kropki (zmienne)";
+ Text[ pt-BR ] = "3 traços 3 pontos (variável)";
+ Text[ th ] = "3 ขีด 3 จุด (ตัวà¹à¸›à¸£)";
+ Text[ ja ] = "三破線三点鎖線(å¯å¤‰)";
+ Text[ ko ] = "삼파선 ì‚¼ì  ì‡„ì„ (가변)";
+ Text[ zh-CN ] = "3 划 3 点 (å¯å˜)";
+ Text[ zh-TW ] = "3 劃線 3 點(å¯è®Š)";
+ Text[ tr ] = "3 çizgi 3 nokta (değişken)";
+ Text[ hi-IN ] = "3 डॉश 3 बिनà¥à¤¦à¥ (वेरिà¤à¤¬à¤²à¥)";
+ Text[ ar ] = "3 Ø´Ùرط 3 نقاط (متغيرة)";
+ Text[ he ] = "3 Striche 3 Punkte (variabel)";
+};
+String RID_SVXSTR_DASH7
+{
+ Text [ de ] = "Ultrafein gepunktet (variabel)";
+ Text [ en-US ] = "Ultrafine dotted (variable)";
+ Text[ pt ] = "Pontilhado ultrafino (variável)";
+ Text[ ru ] = "Сверхтонкий пунктир";
+ Text[ el ] = "Î Î¿Î»Ï Î»ÎµÏ€Ï„Î® διάστικτη (μεταβλητή)";
+ Text[ nl ] = "Extra fijn gestippeld (variabel)";
+ Text[ fr ] = "Ultrafine pointillée (variable)";
+ Text[ es ] = "Punteado ultrafino (variable)";
+ Text[ fi ] = "Hyvin ohut pisteviiva (muuttuja)";
+ Text[ ca ] = "Puntejat molt fi (variable)";
+ Text[ it ] = "A punti finissimi (var)";
+ Text[ sk ] = "Veľmi jemne bodkované (premenlivé)";
+ Text[ da ] = "Ultrafin punkteret (variabel)";
+ Text[ sv ] = "Mycket fint prickig (variabel)";
+ Text[ pl ] = "Bardzo delikatne kropki (zmienne)";
+ Text[ pt-BR ] = "Pontilhado ultra fino (variável)";
+ Text[ th ] = "จุดบางมาà¸(ตัวà¹à¸›à¸£)";
+ Text[ ja ] = "極細ã®ç‚¹ç·š(å¯å¤‰)";
+ Text[ ko ] = "미세한 ì ì„ (가변)";
+ Text[ zh-CN ] = "超细点线 (å¯å˜)";
+ Text[ zh-TW ] = "超細點(å¯è®Š)";
+ Text[ tr ] = "Çok ince noktalı (değişken)";
+ Text[ hi-IN ] = "बिनà¥à¤¦à¥à¤“ं से चिहà¥à¤¨à¤¿à¤¤ अतà¥à¤¯à¤¨à¥à¤¯ सूकà¥à¤·à¥à¤® रेखा (वेरिà¤à¤¬à¤²à¥)";
+ Text[ ar ] = "نقاط رÙيعة جداً (متغيرة)";
+ Text[ he ] = "Ultrafein gepunktet (variabel)";
+};
+String RID_SVXSTR_DASH8
+{
+ Text [ de ] = "Linienstil 9";
+ Text [ en-US ] = "Line style 9";
+ Text[ pt ] = "Estilo de linha 9";
+ Text[ ru ] = "Стиль линии 9";
+ Text[ el ] = "Στυλ γÏαμμής 9";
+ Text[ nl ] = "Lijntype 9";
+ Text[ fr ] = "Style de ligne 9";
+ Text[ es ] = "Estilo de línea 9";
+ Text[ fi ] = "Viivatyyli 9";
+ Text[ ca ] = "Estil de línia 9";
+ Text[ it ] = "Stile linea 9";
+ Text[ sk ] = "Å týl Äiary 9";
+ Text[ da ] = "Stregtype 9";
+ Text[ sv ] = "Linjestil 9";
+ Text[ pl ] = "Styl linii 9";
+ Text[ pt-BR ] = "Estilo de linha 9";
+ Text[ th ] = "เส้นลัà¸à¸©à¸“ะที่ 9";
+ Text[ ja ] = "線スタイル 9";
+ Text[ ko ] = "ì„  ìŠ¤íƒ€ì¼ 9";
+ Text[ zh-CN ] = "线æ¡å¼æ · 9";
+ Text[ zh-TW ] = "ç·šæ¢å¼æ¨£ 9";
+ Text[ tr ] = "Çizgi biçimi 9";
+ Text[ hi-IN ] = "रेखा शैली 9";
+ Text[ ar ] = "نمط الخط 9";
+ Text[ he ] = "Linienstil 9";
+};
+String RID_SVXSTR_DASH9
+{
+ Text [ de ] = "2 Punkte 1 Strich";
+ Text [ en-US ] = "2 dots 1 dash";
+ Text[ pt ] = "2 pontos 1 traço";
+ Text[ ru ] = "2 точки 1 штрих";
+ Text[ el ] = "2 τελείες - 1 παÏλα";
+ Text[ nl ] = "2 puntjes 1 streepje";
+ Text[ fr ] = "2 points 1 trait";
+ Text[ es ] = "2 puntos 1 trazo";
+ Text[ fi ] = "2 pistettä, 1 katkoviiva";
+ Text[ ca ] = "2 punts 1 traç";
+ Text[ it ] = "A 2 punti 1 linea";
+ Text[ sk ] = "2 bodky 1 Äiarka";
+ Text[ da ] = "2 punkter 1 streg";
+ Text[ sv ] = "2 prickar 1 streck";
+ Text[ pl ] = "2 kropki 1 kreska";
+ Text[ pt-BR ] = "2 pontos 1 traço";
+ Text[ th ] = "2 จุด 1 ขีด";
+ Text[ ja ] = "二点鎖線";
+ Text[ ko ] = "ì´ì  쇄선";
+ Text[ zh-CN ] = "2 点 1 划";
+ Text[ zh-TW ] = "2 點 1 劃線";
+ Text[ tr ] = "2 nokta 1 çizgi";
+ Text[ hi-IN ] = "2 बिनà¥à¤¦à¥ 1 डॉश";
+ Text[ ar ] = "2 نقطة 1 شرطة";
+ Text[ he ] = "2 Punkte 1 Strich";
+};
+String RID_SVXSTR_DASH10
+{
+ Text [ de ] = "Gestrichelt (variabel)";
+ Text [ en-US ] = "Dashed (variable)";
+ Text[ pt ] = "Pontilhado (variável)";
+ Text[ ru ] = "Пунктир 2";
+ Text[ el ] = "Διακεκομμένη (μεταβλητή)";
+ Text[ nl ] = "Streepjes (variabel)";
+ Text[ fr ] = "Traits (variable)";
+ Text[ es ] = "Trazos (variable)";
+ Text[ fi ] = "Katkoviiva (muuttuja)";
+ Text[ ca ] = "Traços (variable)";
+ Text[ it ] = "A tratti (var)";
+ Text[ sk ] = "Čiarky (premenlivé)";
+ Text[ da ] = "Stiplet (variabel)";
+ Text[ sv ] = "Streckad (variabel)";
+ Text[ pl ] = "Kreski (zmienne)";
+ Text[ pt-BR ] = "Tracejado (variável)";
+ Text[ th ] = "เส้นประ (ตัวà¹à¸›à¸£)";
+ Text[ ja ] = "ç ´ç·š(å¯å¤‰)";
+ Text[ ko ] = "파선(가변)";
+ Text[ zh-CN ] = "划线 (å¯å˜)";
+ Text[ zh-TW ] = "點劃線(å¯è®Š)";
+ Text[ tr ] = "Kesik çizgili (değişken)";
+ Text[ hi-IN ] = "डॉश किया हà¥à¤† (वेरिà¤à¤¬à¤²à¥)";
+ Text[ ar ] = "Ø´Ùرط (متغيرة)";
+ Text[ he ] = "Gestrichelt (variabel)";
+};
+String RID_SVXSTR_DASH11
+{
+ Text [ de ] = "Gestrichelt";
+ Text [ en-US ] = "Dashed";
+ Text[ pt ] = "Tracejado";
+ Text[ ru ] = "Пунктир 1";
+ Text[ el ] = "Διακεκομμένη";
+ Text[ nl ] = "Streepjes";
+ Text[ fr ] = "Traits";
+ Text[ es ] = "Trazos";
+ Text[ fi ] = "Katkoviiva";
+ Text[ ca ] = "Traçat";
+ Text[ it ] = "A tratti";
+ Text[ sk ] = "Čiarkované";
+ Text[ da ] = "Stiplet";
+ Text[ sv ] = "Streckat";
+ Text[ pl ] = "Kreski";
+ Text[ pt-BR ] = "Tracejado";
+ Text[ th ] = "เส้นประ";
+ Text[ ja ] = "破線状";
+ Text[ ko ] = "파선";
+ Text[ zh-CN ] = "破折å·";
+ Text[ zh-TW ] = "破折號";
+ Text[ tr ] = "Kesik çizgi";
+ Text[ hi-IN ] = "डॉश की हà¥à¤¯à¥€";
+ Text[ ar ] = "Ø´Ùرط";
+ Text[ he ] = "Gestrichelt";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// 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 [ de ] = "Pfeil konkav";
+ Text [ en-US ] = "Arrow concave";
+ Text[ pt ] = "Seta côncava";
+ Text[ ru ] = "Ð’Ð¾Ð³Ð½ÑƒÑ‚Ð°Ñ Ñтрелка";
+ Text[ el ] = "Βέλος κοίλο";
+ Text[ nl ] = "Pijl concaaf";
+ Text[ fr ] = "Flèche concave";
+ Text[ es ] = "Flecha cóncava";
+ Text[ fi ] = "Kovera nuoli";
+ Text[ ca ] = "Fletxa còncava";
+ Text[ it ] = "Freccia concava";
+ Text[ sk ] = "Konkávna šípka";
+ Text[ da ] = "Pil konkav";
+ Text[ sv ] = "Pil konkav";
+ Text[ pl ] = "Strzałka wklęsła";
+ Text[ pt-BR ] = "Seta côncava";
+ Text[ th ] = "ลูà¸à¸¨à¸£à¸—ี่เว้าเข้าข้างใน";
+ Text[ ja ] = "中ãã¼ã¿ã®çŸ¢å°";
+ Text[ ko ] = "오목 화살표";
+ Text[ zh-CN ] = "凹形箭头";
+ Text[ zh-TW ] = "箭頭凹形";
+ Text[ tr ] = "İçbükey ok";
+ Text[ hi-IN ] = "तीर नतोदर";
+ Text[ ar ] = "سهم مقعر";
+ Text[ he ] = "Pfeil konkav";
+};
+String RID_SVXSTR_LEND1
+{
+ Text [ de ] = "Quadrat 45";
+ Text [ en-US ] = "Square 45";
+ Text[ pt ] = "Quadrado 45";
+ Text[ ru ] = "Ромб";
+ Text[ el ] = "ΤετÏάγωνο 45";
+ Text[ nl ] = "Vierkant 45";
+ Text[ fr ] = "Carré 45";
+ Text[ es ] = "Cuadrado 45";
+ Text[ fi ] = "Neliö 45";
+ Text[ ca ] = "Quadrat 45";
+ Text[ it ] = "Quadrato 45";
+ Text[ sk ] = "Å tvorec 45";
+ Text[ da ] = "Kvadrat 45";
+ Text[ sv ] = "Kvadrat 45";
+ Text[ pl ] = "Kwadrat 45";
+ Text[ pt-BR ] = "Losango";
+ Text[ th ] = "สี่เหลี่ยมจัตุรัส 45";
+ Text[ ja ] = "真四角 45度傾斜";
+ Text[ ko ] = "정사ê°í˜• 45";
+ Text[ zh-CN ] = "正方形 45 度";
+ Text[ zh-TW ] = "正方形 45 度";
+ Text[ tr ] = "Kare 45";
+ Text[ hi-IN ] = "समचतà¥à¤°à¥à¤­à¥à¤œ 45";
+ Text[ ar ] = "مربع 45";
+ Text[ he ] = "Quadrat 45";
+};
+String RID_SVXSTR_LEND2
+{
+ Text [ de ] = "Schmaler Pfeil";
+ Text [ en-US ] = "Small arrow";
+ Text[ pt ] = "Seta estreita";
+ Text[ ru ] = "ÐšÐ¾Ñ€Ð¾Ñ‚ÐºÐ°Ñ Ñтрелка";
+ Text[ el ] = "Λεπτό βέλος";
+ Text[ nl ] = "Smalle pijl";
+ Text[ fr ] = "Flèche étroite";
+ Text[ es ] = "Flecha estrecha";
+ Text[ fi ] = "Pieni nuoli";
+ Text[ ca ] = "Fletxa petita";
+ Text[ it ] = "Freccia piccola";
+ Text[ sk ] = "Malá šípka";
+ Text[ da ] = "Smal pil";
+ Text[ sv ] = "Smal pil";
+ Text[ pl ] = "Cienka strzałka";
+ Text[ pt-BR ] = "Seta pequena";
+ Text[ th ] = "ลูà¸à¸¨à¸£à¹€à¸¥à¹‡à¸";
+ Text[ ja ] = "é•·ç´°ã„矢å°";
+ Text[ ko ] = "가는 화살표";
+ Text[ zh-CN ] = "细箭头";
+ Text[ zh-TW ] = "ç´°å°ç®­é ­";
+ Text[ tr ] = "Ä°nce ok";
+ Text[ hi-IN ] = "छोटा तीर";
+ Text[ ar ] = "سهم رÙيع";
+ Text[ he ] = "Schmaler Pfeil";
+};
+String RID_SVXSTR_LEND3
+{
+ Text [ de ] = "Bemaßungsenden";
+ Text [ en-US ] = "Dimension lines";
+ Text[ pt ] = "Linhas de dimensionamento";
+ Text[ ru ] = "Размерные линии";
+ Text[ el ] = "ΓÏαμμές διαστασιολόγησης";
+ Text[ nl ] = "Afmetingseinden";
+ Text[ fr ] = "Extrémités de cotation";
+ Text[ es ] = "Líneas de dimensiones";
+ Text[ fi ] = "Mittajanat";
+ Text[ ca ] = "Fines de dimensions";
+ Text[ it ] = "Estremità quotatura";
+ Text[ sk ] = "Kótovacie Äiary";
+ Text[ da ] = "Dimensioneringsstreger";
+ Text[ sv ] = "Dimensioneringsändar";
+ Text[ pl ] = "Linie wymiarowe";
+ Text[ pt-BR ] = "Linhas de cota";
+ Text[ th ] = "เส้นมีมิติ";
+ Text[ ja ] = "寸法線ã®çµ‚点";
+ Text[ ko ] = "치수선";
+ Text[ zh-CN ] = "定尺寸线æ¡";
+ Text[ zh-TW ] = "定尺寸線æ¢";
+ Text[ tr ] = "Boyutlandırma çizgileri";
+ Text[ hi-IN ] = "परिमाण समà¥à¤¬à¤¨à¥à¤§à¥€ रेखाà¤à¤";
+ Text[ ar ] = "خطوط قياس";
+ Text[ he ] = "Bemaßungsenden";
+};
+String RID_SVXSTR_LEND4
+{
+ Text [ de ] = "Doppelpfeil";
+ Text [ en-US ] = "Double Arrow";
+ Text[ pt ] = "Seta dupla";
+ Text[ ru ] = "Ð”Ð²Ð¾Ð¹Ð½Ð°Ñ Ñтрелка";
+ Text[ el ] = "Διπλό βέλος";
+ Text[ nl ] = "Dubbele pijl";
+ Text[ fr ] = "Double flèche";
+ Text[ es ] = "Flecha doble";
+ Text[ fi ] = "Tuplanuoli";
+ Text[ ca ] = "Fletxa doble";
+ Text[ it ] = "Freccia doppia";
+ Text[ sk ] = "Dvojitá šípka";
+ Text[ da ] = "Dobbeltpil";
+ Text[ sv ] = "Dubbel pil";
+ Text[ pl ] = "Podwójna strzałka";
+ Text[ pt-BR ] = "Seta dupla";
+ Text[ th ] = "ลูà¸à¸¨à¸£à¸„ู่";
+ Text[ ja ] = "二é‡çŸ¢å°";
+ Text[ ko ] = "ì´ì¤‘ 화살표";
+ Text[ zh-CN ] = "åŒç®­å¤´";
+ Text[ zh-TW ] = "雙箭頭";
+ Text[ tr ] = "İki uçlu ok";
+ Text[ hi-IN ] = "दà¥à¤µà¤¿à¤—à¥à¤£à¤¿à¤¤ तीर";
+ Text[ ar ] = "سهم مزدوج";
+ Text[ he ] = "Doppelpfeil";
+};
+String RID_SVXSTR_LEND5
+{
+ Text [ de ] = "Abgerundeter kurzer Pfeil";
+ Text [ en-US ] = "Rounded short arrow";
+ Text[ pt ] = "Seta curta arredondada";
+ Text[ ru ] = "Ð¡ÐºÑ€ÑƒÐ³Ð»ÐµÐ½Ð½Ð°Ñ ÐºÐ¾Ñ€Ð¾Ñ‚ÐºÐ°Ñ Ñтрелка";
+ Text[ el ] = "ΣτÏογγυλευμένο κοντό βέλος";
+ Text[ nl ] = "Afgeronde korte pijl";
+ Text[ fr ] = "Flèche courte arrondie";
+ Text[ es ] = "Flecha corta redondeada";
+ Text[ fi ] = "Pyöristetty lyhyt nuoli";
+ Text[ ca ] = "Fletxa curta arrodonida";
+ Text[ it ] = "Freccia corta arrotondata";
+ Text[ sk ] = "Zaoblená krátká šípka";
+ Text[ da ] = "Afrundet kort pil";
+ Text[ sv ] = "Avrundad kort pil";
+ Text[ pl ] = "Zaokr. krótka strzałka";
+ Text[ pt-BR ] = "Seta pequena arredondada";
+ Text[ th ] = "ลูà¸à¸¨à¸£à¸ªà¸±à¹‰à¸™à¸¡à¸™";
+ Text[ ja ] = "å…ˆã®ä¸¸ã„短ã‹ã‚ã®çŸ¢å°";
+ Text[ ko ] = "둥글린 ì§§ì€ í™”ì‚´í‘œ";
+ Text[ zh-CN ] = "圆形短箭头";
+ Text[ zh-TW ] = "圓形短箭頭";
+ Text[ tr ] = "Yuvarlatılmış kısa ok";
+ Text[ hi-IN ] = "गोल आकार का छोटा तीर";
+ Text[ ar ] = "سهم قصير مستدير";
+ Text[ he ] = "Abgerundeter kurzer Pfeil";
+};
+String RID_SVXSTR_LEND6
+{
+ Text [ de ] = "Symmetrischer Pfeil";
+ Text [ en-US ] = "Symmetric arrow";
+ Text[ pt ] = "Seta simétrica";
+ Text[ ru ] = "Ð¡Ð¸Ð¼Ð¼ÐµÑ‚Ñ€Ð¸Ñ‡Ð½Ð°Ñ Ñтрелка";
+ Text[ el ] = "ΣυμμετÏικό βέλος";
+ Text[ nl ] = "Symmetrische pijl";
+ Text[ fr ] = "Flèche symétrique";
+ Text[ es ] = "Flecha simétrica";
+ Text[ fi ] = "Symmetrinen nuoli";
+ Text[ ca ] = "Fletxa simètrica";
+ Text[ it ] = "Freccia simmetrica";
+ Text[ sk ] = "Súmerná šípka";
+ Text[ da ] = "Symmetrisk pil";
+ Text[ sv ] = "Symmetrisk pil";
+ Text[ pl ] = "Strzałka symetryczna";
+ Text[ pt-BR ] = "Seta simétrica";
+ Text[ th ] = "ลูà¸à¸¨à¸£à¸ªà¸¡à¸¡à¸²à¸•à¸£";
+ Text[ ja ] = "ãƒãƒ©ãƒ³ã‚¹ã®ã¨ã‚ŒãŸçŸ¢å°";
+ Text[ ko ] = "대칭 화살표";
+ Text[ zh-CN ] = "对称箭头";
+ Text[ zh-TW ] = "å°ç¨±å¼ç®­é ­";
+ Text[ tr ] = "Simetrik ok";
+ Text[ hi-IN ] = "समरूप का तीर";
+ Text[ ar ] = "سهم متناسق";
+ Text[ he ] = "Symmetrischer Pfeil";
+};
+String RID_SVXSTR_LEND7
+{
+ Text [ de ] = "Linien-Pfeil";
+ Text [ en-US ] = "Line arrow";
+ Text[ pt ] = "Linha-seta";
+ Text[ ru ] = "Ð›Ð¸Ð½ÐµÐ¹Ð½Ð°Ñ Ñтрелка";
+ Text[ el ] = "ΓÏαμμή-βέλος";
+ Text[ nl ] = "Lijn-pijl";
+ Text[ fr ] = "Ligne fléchée";
+ Text[ es ] = "Línea de flecha";
+ Text[ fi ] = "Viivanuoli";
+ Text[ ca ] = "Fletxa línia";
+ Text[ it ] = "Linea freccia";
+ Text[ sk ] = "Šípka Äiary";
+ Text[ da ] = "Streg-pil";
+ Text[ sv ] = "Linjepil";
+ Text[ pl ] = "Strzałka linii";
+ Text[ pt-BR ] = "Seta tipo linha";
+ Text[ th ] = "เส้นลูà¸à¸¨à¸£";
+ Text[ ja ] = "線状ã®çŸ¢å°";
+ Text[ ko ] = "선 화살표";
+ Text[ zh-CN ] = "线æ¡ç®­å¤´";
+ Text[ zh-TW ] = "劃線箭頭";
+ Text[ tr ] = "Çizgili ok";
+ Text[ hi-IN ] = "रेखा तीर";
+ Text[ ar ] = "سهم خطي";
+ Text[ he ] = "Linien-Pfeil";
+};
+String RID_SVXSTR_LEND8
+{
+ Text [ de ] = "Abgerundeter langer Pfeil";
+ Text [ en-US ] = "Rounded large arrow";
+ Text[ pt ] = "Seta longa arredondada";
+ Text[ ru ] = "Ð¡ÐºÑ€ÑƒÐ³Ð»ÐµÐ½Ð½Ð°Ñ Ð´Ð»Ð¸Ð½Ð½Ð°Ñ Ñтрелка";
+ Text[ el ] = "ΣτÏογγυλευμένο μακÏÏ Î²Î­Î»Î¿Ï‚";
+ Text[ nl ] = "Afgeronde lange pijl";
+ Text[ fr ] = "Flèche longue arrondie";
+ Text[ es ] = "Flecha larga redondeada";
+ Text[ fi ] = "Pyöristetty iso nuoli";
+ Text[ ca ] = "Fletxa gran arrodonida";
+ Text[ it ] = "Freccia lunga arrotondata";
+ Text[ sk ] = "Zaoblená veľká šípka";
+ Text[ da ] = "Afrundet lang pil";
+ Text[ sv ] = "Avrundad stor pil";
+ Text[ pl ] = "Zaokr. długa strzałka";
+ Text[ pt-BR ] = "Seta grande arredondada";
+ Text[ th ] = "ลูà¸à¸¨à¸£à¹ƒà¸«à¸à¹ˆà¸¡à¸™";
+ Text[ ja ] = "å…ˆã®ä¸¸ã„é•·ã‚ã®çŸ¢å°";
+ Text[ ko ] = "둥글린 긴 화살표";
+ Text[ zh-CN ] = "圆形长箭头";
+ Text[ zh-TW ] = "圓形大箭頭";
+ Text[ tr ] = "Yuvarlatılmış uzun ok";
+ Text[ hi-IN ] = "गोल आकार का बड़ा तीर";
+ Text[ ar ] = "سهم طويل مستدير";
+ Text[ he ] = "Abgerundeter langer Pfeil";
+};
+String RID_SVXSTR_LEND9
+{
+ Text [ de ] = "Kreis";
+ Text [ en-US ] = "Circle";
+ Text[ pt ] = "Círculo";
+ Text[ ru ] = "Круг";
+ Text[ el ] = "ΚÏκλος";
+ Text[ nl ] = "Cirkel";
+ Text[ fr ] = "Cercle";
+ Text[ es ] = "Círculo";
+ Text[ fi ] = "Ympyrä";
+ Text[ ca ] = "Cercle";
+ Text[ it ] = "Cerchio";
+ Text[ sk ] = "Kruh";
+ Text[ da ] = "Cirkel";
+ Text[ sv ] = "Cirkel";
+ Text[ pl ] = "Koło";
+ Text[ pt-BR ] = "Círculo";
+ Text[ th ] = "วงà¸à¸¥à¸¡";
+ Text[ ja ] = "丸å°";
+ Text[ ko ] = "ì›";
+ Text[ zh-CN ] = "圆";
+ Text[ zh-TW ] = "圓形";
+ Text[ tr ] = "Daire";
+ Text[ hi-IN ] = "वृतà¥à¤¤";
+ Text[ ar ] = "دائرة";
+ Text[ he ] = "Kreis";
+};
+String RID_SVXSTR_LEND10
+{
+ Text [ de ] = "Quadrat";
+ Text [ en-US ] = "Square";
+ Text[ pt ] = "Quadrado";
+ Text[ ru ] = "Квадрат";
+ Text[ el ] = "ΤετÏάγωνο";
+ Text[ nl ] = "Vierkant";
+ Text[ fr ] = "Carré";
+ Text[ es ] = "Cuadrado";
+ Text[ fi ] = "Neliö";
+ Text[ ca ] = "Quadrat";
+ Text[ it ] = "Quadrato";
+ Text[ sk ] = "Å tvorec";
+ Text[ da ] = "Kvadrat";
+ Text[ sv ] = "Kvadrat";
+ Text[ pl ] = "Kwadrat";
+ Text[ pt-BR ] = "Quadrado";
+ Text[ th ] = "สี่เหลี่ยมจัตุรัส";
+ Text[ ja ] = "真四角";
+ Text[ ko ] = "정사ê°í˜•";
+ Text[ zh-CN ] = "正方形";
+ Text[ zh-TW ] = "正方形";
+ Text[ tr ] = "Kare";
+ Text[ hi-IN ] = "समचतà¥à¤°à¥à¤­à¥à¤œ";
+ Text[ ar ] = "مربع";
+ Text[ he ] = "Quadrat";
+};
+String RID_SVXSTR_LEND11
+{
+ Text [ de ] = "Pfeil";
+ Text [ en-US ] = "Arrow";
+ Text[ pt ] = "Seta";
+ Text[ ru ] = "Стрелка";
+ Text[ el ] = "Βέλος";
+ Text[ nl ] = "Pijl";
+ Text[ fr ] = "Flèche";
+ Text[ es ] = "Flecha";
+ Text[ fi ] = "Nuoli";
+ Text[ ca ] = "Fletxa";
+ Text[ it ] = "Freccia";
+ Text[ sk ] = "Šípka";
+ Text[ da ] = "Pil";
+ Text[ sv ] = "Pil";
+ Text[ pl ] = "Strzałka";
+ Text[ pt-BR ] = "Seta";
+ Text[ th ] = "ลูà¸à¸¨à¸£";
+ Text[ ja ] = "矢å°";
+ Text[ ko ] = "화살표";
+ Text[ zh-CN ] = "箭头";
+ Text[ zh-TW ] = "ç®­é ­";
+ Text[ tr ] = "Ok";
+ Text[ hi-IN ] = "तीर";
+ Text[ ar ] = "سهم";
+ Text[ he ] = "Pfeil";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standard transparence gradients
+//
+
+/* nicht uebersetzen */
+// needed: #i33205#
+String RID_SVXSTR_TRASNGR0_DEF
+{
+ Text = "Transparency";
+};
+
+String RID_SVXSTR_TRASNGR0
+{
+ Text [ de ] = "Flächentransparenz";
+ Text [ en-US ] = "Transparency";
+ Text[ pt ] = "Transparência";
+ Text[ ru ] = "ПрозрачноÑÑ‚ÑŒ";
+ Text[ el ] = "Διαφάνεια επιφάνειας";
+ Text[ nl ] = "Transparantie";
+ Text[ fr ] = "Transparence";
+ Text[ es ] = "Transparencia";
+ Text[ fi ] = "Läpinäkyvyys";
+ Text[ ca ] = "Transparència";
+ Text[ it ] = "Trasparenza";
+ Text[ sk ] = "Priehľadnosť";
+ Text[ da ] = "Fladetransparens";
+ Text[ sv ] = "Yttransparens";
+ Text[ pl ] = "Przezroczystość";
+ Text[ pt-BR ] = "Transparência";
+ Text[ th ] = "โปร่งà¹à¸ªà¸‡";
+ Text[ ja ] = "表é¢ã®é€åŒ–性";
+ Text[ ko ] = "ë©´ì˜ íˆ¬ëª… 효과";
+ Text[ zh-CN ] = "é€æ˜Ž";
+ Text[ zh-TW ] = "å¹³é¢é€æ˜Ž";
+ Text[ tr ] = "Saydamlık";
+ Text[ hi-IN ] = "पारदरà¥à¤¶à¤•à¤¤à¤¾";
+ Text[ ar ] = "Ø´ÙاÙية";
+ Text[ he ] = "Flächentransparenz";
+};
diff --git a/binfilter/bf_svx/source/dialog/svx_txencbox.cxx b/binfilter/bf_svx/source/dialog/svx_txencbox.cxx
new file mode 100644
index 000000000000..f80f806da5ff
--- /dev/null
+++ b/binfilter/bf_svx/source/dialog/svx_txencbox.cxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include "txencbox.hxx"
+#include "dialogs.hrc"
+
+#include <rtl/tencinfo.h>
+#include <rtl/locale.h>
+#include <osl/nlsupport.h>
+namespace binfilter {
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/editattr.hxx b/binfilter/bf_svx/source/editeng/editattr.hxx
new file mode 100644
index 000000000000..f9f99f96488b
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editattr.hxx
@@ -0,0 +1,420 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITATTR_HXX
+#define _EDITATTR_HXX
+
+#include <eeitemid.hxx>
+namespace binfilter {
+
+class SvxFont;
+class SvxFontItem;
+class SvxWeightItem;
+class SvxPostureItem;
+class SvxShadowedItem;
+class SvxEscapementItem;
+class SvxContourItem;
+class SvxCrossedOutItem;
+class SvxUnderlineItem;
+class SvxFontHeightItem;
+class SvxCharScaleWidthItem;
+class SvxColorItem;
+class SvxAutoKernItem;
+class SvxKerningItem;
+class SvxCharSetColorItem;
+class SvxWordLineModeItem;
+class SvxFieldItem;
+class SvxLanguageItem;
+class SvxEmphasisMarkItem;
+class SvxCharReliefItem;
+}//end of namespace binfilter
+#include <bf_svtools/poolitem.hxx>
+class SfxVoidItem;
+namespace binfilter {
+
+
+#define CH_FEATURE_OLD (BYTE) 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, OutputDevice* pOutDev );
+
+ 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, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribWeight
+// -------------------------------------------------------------------------
+class EditCharAttribWeight : public EditCharAttrib
+{
+public:
+ EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+ // -------------------------------------------------------------------------
+// class EditCharAttribItalic
+// -------------------------------------------------------------------------
+class EditCharAttribItalic : public EditCharAttrib
+{
+public:
+ EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribShadow
+// -------------------------------------------------------------------------
+class EditCharAttribShadow : public EditCharAttrib
+{
+public:
+ EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribEscapement
+// -------------------------------------------------------------------------
+class EditCharAttribEscapement : public EditCharAttrib
+{
+public:
+ EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribOutline
+// -------------------------------------------------------------------------
+class EditCharAttribOutline : public EditCharAttrib
+{
+public:
+ EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribStrikeout
+// -------------------------------------------------------------------------
+class EditCharAttribStrikeout : public EditCharAttrib
+{
+public:
+ EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribUnderline
+// -------------------------------------------------------------------------
+class EditCharAttribUnderline : public EditCharAttrib
+{
+public:
+ EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+// -------------------------------------------------------------------------
+// class EditCharAttribEmphasisMark
+// -------------------------------------------------------------------------
+class EditCharAttribEmphasisMark : public EditCharAttrib
+{
+public:
+ EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+// -------------------------------------------------------------------------
+// class EditCharAttribRelief
+// -------------------------------------------------------------------------
+class EditCharAttribRelief : public EditCharAttrib
+{
+public:
+ EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFontHeight
+// -------------------------------------------------------------------------
+class EditCharAttribFontHeight : public EditCharAttrib
+{
+public:
+ EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFontWidth
+// -------------------------------------------------------------------------
+class EditCharAttribFontWidth : public EditCharAttrib
+{
+public:
+ EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribColor
+// -------------------------------------------------------------------------
+class EditCharAttribColor : public EditCharAttrib
+{
+public:
+ EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribLanguage
+// -------------------------------------------------------------------------
+class EditCharAttribLanguage : public EditCharAttrib
+{
+public:
+ EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribTab
+// -------------------------------------------------------------------------
+class EditCharAttribTab : public EditCharAttrib
+{
+public:
+ EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribLineBreak
+// -------------------------------------------------------------------------
+class EditCharAttribLineBreak : public EditCharAttrib
+{
+public:
+ EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// 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, OutputDevice* pOutDev );
+ 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, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribKerning
+// -------------------------------------------------------------------------
+class EditCharAttribKerning : public EditCharAttrib
+{
+public:
+ EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribWordLineMode
+// -------------------------------------------------------------------------
+class EditCharAttribWordLineMode: public EditCharAttrib
+{
+public:
+ EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+
+}//end of namespace binfilter
+#endif // _EDITATTR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/editdoc.hxx b/binfilter/bf_svx/source/editeng/editdoc.hxx
new file mode 100644
index 000000000000..c9240a335141
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editdoc.hxx
@@ -0,0 +1,718 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITDOC_HXX
+#define _EDITDOC_HXX
+
+#include <editattr.hxx>
+#include <svxfont.hxx>
+
+#include <bf_svtools/itemset.hxx>
+
+#include <bf_svtools/style.hxx>
+
+#include <bf_svtools/itempool.hxx>
+
+#include <tools/table.hxx>
+namespace binfilter {
+
+class ImpEditEngine;
+class SvxTabStop;
+
+DBG_NAMEEX( EE_TextPortion )//STRIP008
+
+#define CHARPOSGROW 16
+#define DEFTAB 720
+
+void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent = TRUE, short nScriptType = 0 );
+USHORT GetScriptItemId( USHORT nItemId, short nScriptType );
+BOOL IsScriptItemValid( USHORT nItemId, short nScriptType );
+
+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;
+}
+
+struct ScriptTypePosInfo
+{
+ short nScriptType;
+ USHORT nStartPos;
+ USHORT nEndPos;
+
+ ScriptTypePosInfo( short _Type, USHORT _Start, USHORT _End )
+ {
+ nScriptType = _Type;
+ nStartPos = _Start;
+ nEndPos = _End;
+ }
+};
+
+SV_DECL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo, 0, 4 )//STRIP008 ;
+
+struct WritingDirectionInfo
+{
+ BYTE nType;
+ USHORT nStartPos;
+ USHORT nEndPos;
+
+ WritingDirectionInfo( BYTE _Type, USHORT _Start, USHORT _End )
+ {
+ nType = _Type;
+ nStartPos = _Start;
+ nEndPos = _End;
+ }
+};
+
+SV_DECL_VARARR( WritingDirectionInfos, WritingDirectionInfo, 0, 4 )//STRIP008 ;
+
+typedef EditCharAttrib* EditCharAttribPtr;
+SV_DECL_PTRARR( CharAttribArray, EditCharAttribPtr, 0, 4 )//STRIP008 ;
+
+
+
+// ----------------------------------------------------------------------
+// class SvxFontTable
+// ----------------------------------------------------------------------
+
+// ----------------------------------------------------------------------
+// class SvxColorList
+// ----------------------------------------------------------------------
+
+// ----------------------------------------------------------------------
+// class ItemList
+// ----------------------------------------------------------------------
+
+// -------------------------------------------------------------------------
+// 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 );
+
+ const SfxPoolItem& GetItem( USHORT nWhich );
+ BOOL HasItem( USHORT nWhich );
+};
+
+// -------------------------------------------------------------------------
+// class CharAttribList
+// -------------------------------------------------------------------------
+class CharAttribList
+{
+private:
+ CharAttribArray aAttribs;
+ SvxFont aDefFont; // schneller, als jedesmal vom Pool!
+ BOOL bHasEmptyAttribs;
+
+ CharAttribList( const CharAttribList& ) {;}
+
+public:
+ CharAttribList();
+ ~CharAttribList();
+
+ 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();
+ void OptimizeRanges( SfxItemPool& rItemPool );
+
+ 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 );
+
+ CharAttribArray& GetAttribs() { return aAttribs; }
+ const CharAttribArray& GetAttribs() const { return aAttribs; }
+
+ // Debug:
+};
+
+// -------------------------------------------------------------------------
+// class ContentNode
+// -------------------------------------------------------------------------
+class ContentNode : public XubString
+{
+private:
+ ContentAttribs aContentAttribs;
+ CharAttribList aCharAttribList;
+
+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 );
+ SfxStyleSheet* GetStyleSheet() { return aContentAttribs.GetStyleSheet(); }
+
+ void CreateDefFont();
+
+ BOOL IsFeature( USHORT nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); }
+};
+
+typedef ContentNode* ContentNodePtr;
+SV_DECL_PTRARR( ContentList, ContentNodePtr, 0, 4 )//STRIP008 ;
+
+// -------------------------------------------------------------------------
+// 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(); }
+
+ 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 PORTIONKIND_EXTRASPACE 5
+
+#define DELMODE_SIMPLE 0
+#define DELMODE_RESTOFWORD 1
+#define DELMODE_RESTOFCONTENT 2
+
+#define CHAR_NORMAL 0x00
+#define CHAR_KANA 0x01
+#define CHAR_PUNCTUATIONLEFT 0x02
+#define CHAR_PUNCTUATIONRIGHT 0x04
+
+// -------------------------------------------------------------------------
+// struct ExtraPortionInfos
+// -------------------------------------------------------------------------
+struct ExtraPortionInfo
+{
+ long nOrgWidth;
+ long nWidthFullCompression;
+
+ long nPortionOffsetX;
+
+ USHORT nMaxCompression100thPercent;
+
+ BYTE nAsianCompressionTypes;
+ BOOL bFirstCharIsRightPunktuation;
+ BOOL bCompressed;
+
+ long* pOrgDXArray;
+
+ ~ExtraPortionInfo();
+
+};
+
+
+// -------------------------------------------------------------------------
+// class TextPortion
+// -------------------------------------------------------------------------
+class TextPortion
+{
+private:
+ ExtraPortionInfo* pExtraInfos;
+ USHORT nLen;
+ Size aOutSz;
+ BYTE nKind;
+ BYTE nRightToLeft;
+ sal_Unicode nExtraValue;
+
+
+ TextPortion() { DBG_CTOR( EE_TextPortion, 0 );
+ pExtraInfos = NULL; nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;}
+
+public:
+ TextPortion( USHORT nL ) : aOutSz( -1, -1 )
+ { DBG_CTOR( EE_TextPortion, 0 );
+ pExtraInfos = NULL; nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; nRightToLeft = FALSE;}
+ TextPortion( const TextPortion& r ) : aOutSz( r.aOutSz )
+ { DBG_CTOR( EE_TextPortion, 0 );
+ pExtraInfos = NULL; nLen = r.nLen; nKind = r.nKind; nExtraValue = r.nExtraValue; nRightToLeft = r.nRightToLeft; }
+
+ ~TextPortion() { DBG_DTOR( EE_TextPortion, 0 ); delete pExtraInfos; }
+
+ 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; }
+
+ void SetRightToLeft( BYTE b ) { nRightToLeft = b; }
+ BYTE GetRightToLeft() const { return nRightToLeft; }
+ BOOL IsRightToLeft() const { return (nRightToLeft&1); }
+
+ sal_Unicode GetExtraValue() const { return nExtraValue; }
+ void SetExtraValue( sal_Unicode n ) { nExtraValue = n; }
+
+ BOOL HasValidSize() const { return aOutSz.Width() != (-1); }
+
+ ExtraPortionInfo* GetExtraInfos() const { return pExtraInfos; }
+ void SetExtraInfos( ExtraPortionInfo* p ) { delete pExtraInfos; pExtraInfos = p; }
+};
+
+// -------------------------------------------------------------------------
+// class TextPortionList
+// -------------------------------------------------------------------------
+typedef TextPortion* TextPortionPtr;
+SV_DECL_PTRARR( TextPortionArray, TextPortionPtr, 0, 8 )//STRIP008 ;
+
+class TextPortionList : public TextPortionArray
+{
+public:
+ TextPortionList();
+ ~TextPortionList();
+
+ void Reset();
+ USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart, BOOL bPreferStartingPortion = FALSE );
+ void DeleteFromPortion( USHORT nDelFrom );
+};
+
+class ParaPortion;
+
+SV_DECL_VARARR( CharPosArray, sal_Int32, 0, CHARPOSGROW )//STRIP008 ;
+
+// ------------------------------------------------------------------------
+// class EditLine
+// -------------------------------------------------------------------------
+class EditLine
+{
+private:
+ CharPosArray aPositions;
+ long nTxtWidth;
+ 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 bHangingPunctuation;
+ 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 SetTextWidth( long n ) { nTxtWidth = n; }
+ long GetTextWidth() const { return nTxtWidth; }
+
+ void SetMaxAscent( USHORT n ) { nMaxAscent = n; }
+ USHORT GetMaxAscent() const { return nMaxAscent; }
+
+ void SetHangingPunctuation( BOOL b ) { bHangingPunctuation = b; }
+ BOOL IsHangingPunctuation() const { return bHangingPunctuation; }
+
+ 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& 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 )//STRIP008 ;
+
+class EditLineList : public LineArray
+{
+public:
+ EditLineList();
+ ~EditLineList();
+
+ void Reset();
+ void DeleteFromLine( USHORT nDelFrom );
+};
+
+// -------------------------------------------------------------------------
+// class ParaPortion
+// -------------------------------------------------------------------------
+class ParaPortion
+{
+ friend class ImpEditEngine; // zum Einstellen der Hoehe
+private:
+ EditLineList aLineList;
+ TextPortionList aTextPortionList;
+ ContentNode* pNode;
+ long nHeight;
+
+ ScriptTypePosInfos aScriptInfos;
+ WritingDirectionInfos aWritingDirectionInfos;
+
+ 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 );
+
+ 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 );
+
+ 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; }
+
+ USHORT GetInvalidPosStart() const { return nInvalidPosStart; }
+ short GetInvalidDiff() const { return nInvalidDiff; }
+
+ void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine );
+
+};
+
+typedef ParaPortion* ParaPortionPtr;
+SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 )//STRIP008 ;
+
+// -------------------------------------------------------------------------
+// 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:
+};
+
+// -------------------------------------------------------------------------
+// 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 Adjust( const ContentList& rNodes );
+
+ EditSelection& operator = ( const EditPaM& r );
+ BOOL operator == ( const EditSelection& r ) const
+ { return ( ( aStartPaM == r.aStartPaM ) && ( aEndPaM == r.aEndPaM ) )
+ ? TRUE : FALSE; }
+ BOOL operator != ( const EditSelection& r ) const { return !( r == *this ); }
+};
+
+// -------------------------------------------------------------------------
+// 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 )//STRIP008 ;
+
+// -------------------------------------------------------------------------
+// class EditDoc
+// -------------------------------------------------------------------------
+class EditDoc : public ContentList
+{
+private:
+ SfxItemPool* pItemPool;
+ Link aModifyHdl;
+
+ SvxFont aDefFont; //schneller, als jedesmal vom Pool!
+ USHORT nDefTab;
+ BOOL bIsVertical;
+
+ BOOL bOwnerOfPool;
+ BOOL bModified;
+
+protected:
+ void ImplDestroyContents();
+
+public:
+ EditDoc( SfxItemPool* pItemPool );
+ ~EditDoc();
+
+ BOOL IsModified() const { return bModified; }
+ void SetModified( BOOL b );
+
+ void SetModifyHdl( const Link& rLink ) { aModifyHdl = rLink; }
+ Link GetModifyHdl() const { return aModifyHdl; }
+
+ void CreateDefFont( BOOL bUseStyles );
+ const SvxFont& GetDefFont() { return aDefFont; }
+
+ void SetDefTab( USHORT nTab ) { nDefTab = nTab ? nTab : DEFTAB; }
+ USHORT GetDefTab() const { return nDefTab; }
+
+ void SetVertical( BOOL bVertical ) { bIsVertical = bVertical; }
+ BOOL IsVertical() const { return bIsVertical; }
+
+ EditPaM Clear();
+ EditPaM RemoveText();
+ EditPaM RemoveChars( EditPaM aPaM, USHORT nChars );
+ 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, USHORT nStartPos = 0, USHORT nEndPos = 0xFFFF, BOOL bResolveFields = TRUE ) 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, 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;
+};
+
+}//end of namespace binfilter
+#endif // _EDITDOC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/editeng.hrc b/binfilter/bf_svx/source/editeng/editeng.hrc
new file mode 100644
index 000000000000..7f97b8aaf20f
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editeng.hrc
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDITENG_HRC
+#define _EDITENG_HRC
+
+#ifndef _SOLAR_HRC
+#include <bf_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_EDITUNDO_TRANSLITERATE ( RID_EDIT_START + 8 )
+
+#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_WORDLANGUAGE 5
+#define MN_PARALANGUAGE 6
+
+#define MN_ALTSTART 1000
+#define MN_AUTOSTART 2000
+#define MN_DICTSTART 3000
+
+
+#endif // _EDITENG_HRC
diff --git a/binfilter/bf_svx/source/editeng/editobj2.hxx b/binfilter/bf_svx/source/editeng/editobj2.hxx
new file mode 100644
index 000000000000..cb76c3b9bd1d
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editobj2.hxx
@@ -0,0 +1,268 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITOBJ2_HXX
+#define _EDITOBJ2_HXX
+
+#include <editobj.hxx>
+#include <editdoc.hxx>
+
+#include <unotools/fontcvt.hxx>
+class SfxStyleSheetPool;
+namespace binfilter {
+
+
+
+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, 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( XEditAttributeListImpl, XEditAttributePtr, 0, 4 )//STRIP008 ;
+
+class XEditAttributeList : public XEditAttributeListImpl
+{
+public:
+ XEditAttribute* FindAttrib( USHORT nWhich, USHORT nChar ) const;
+};
+
+struct XParaPortion
+{
+ long nHeight;
+ USHORT nFirstLineOffset;
+
+ EditLineList aLines;
+ TextPortionList aTextPortions;
+};
+
+typedef XParaPortion* XParaPortionPtr;
+SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0, 4 )//STRIP008 ;
+
+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; }
+};
+
+struct LoadStoreTempInfos
+{
+ ByteString aOrgString_Load;
+
+ FontToSubsFontConverter hOldSymbolConv_Store;
+ BOOL bSymbolParagraph_Store;
+
+
+ LoadStoreTempInfos() { bSymbolParagraph_Store = FALSE; hOldSymbolConv_Store = NULL; }
+};
+
+class ContentInfo
+{
+ friend class BinTextObject;
+
+private:
+ String aText;
+ String aStyle;
+ XEditAttributeList aAttribs;
+ SfxStyleFamily eFamily;
+ SfxItemSet aParaAttribs;
+
+ LoadStoreTempInfos* pTempLoadStoreInfos;
+
+ ContentInfo( SfxItemPool& rPool );
+ ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse );
+
+public:
+ ~ContentInfo();
+
+ const String& GetText() const { return aText; }
+ const 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; }
+
+ LoadStoreTempInfos* GetLoadStoreTempInfos() const { return pTempLoadStoreInfos; }
+ void CreateLoadStoreTempInfos();
+ void DestroyLoadStoreTempInfos();
+
+
+};
+
+typedef ContentInfo* ContentInfoPtr;
+SV_DECL_PTRARR( ContentInfoList, ContentInfoPtr, 1, 4 )//STRIP008 ;
+
+// 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;
+
+ sal_uInt32 nObjSettings;
+ USHORT nMetric;
+ USHORT nVersion;
+ USHORT nUserType;
+ USHORT nScriptType;
+
+ BOOL bVertical;
+ BOOL bStoreUnicodeStrings;
+
+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 );
+
+
+ BOOL IsVertical() const;
+ void SetVertical( BOOL b );
+
+ void SetScriptType( USHORT nType );
+
+ USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert
+ 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 void ClearPortionInfo();
+
+
+
+
+ virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd );
+
+ virtual BOOL HasField( TypeId Type = NULL ) const;
+
+ SfxItemSet GetParaAttribs( USHORT nPara ) 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 StoreUnicodeStrings( BOOL b ) { bStoreUnicodeStrings = b; }
+
+ void PrepareStore( SfxStyleSheetPool* pStyleSheetPool );
+ void FinishStore();
+ void FinishLoad( SfxStyleSheetPool* pStyleSheetPool );
+};
+
+}//end of namespace binfilter
+#endif // _EDITOBJ2_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/editsel.hxx b/binfilter/bf_svx/source/editeng/editsel.hxx
new file mode 100644
index 000000000000..1f9ced3625c3
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editsel.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITSEL_HXX
+#define _EDITSEL_HXX
+
+#include <vcl/seleng.hxx>
+namespace binfilter {
+
+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 );
+};
+
+}//end of namespace binfilter
+#endif // _EDITSEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/editstt2.hxx b/binfilter/bf_svx/source/editeng/editstt2.hxx
new file mode 100644
index 000000000000..ea92d555b88f
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editstt2.hxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITSTT2_HXX
+#define _EDITSTT2_HXX
+
+#include <editstat.hxx>
+namespace binfilter {
+
+class InternalEditStatus : public EditStatus
+{
+
+public:
+ InternalEditStatus() { ; }
+
+ void TurnOnFlags( ULONG nFlags )
+ { nControlBits |= nFlags; }
+
+ void TurnOffFlags( ULONG nFlags )
+ { nControlBits &= ~nFlags; }
+
+ void TurnOnStatusBits( ULONG nBits )
+ { nStatusBits |= nBits; }
+
+ void TurnOffStatusBits( ULONG nBits )
+ { nStatusBits &= ~nBits; }
+
+
+ BOOL UseCharAttribs() const
+ { return ( ( nControlBits & EE_CNTRL_USECHARATTRIBS ) != 0 ); }
+
+ BOOL NotifyCursorMovements() const
+ { return ( ( nControlBits & EE_CNTRL_CRSRLEFTPARA ) != 0 ); }
+
+ BOOL UseIdleFormatter() const
+ { return ( ( nControlBits & EE_CNTRL_DOIDLEFORMAT) != 0 ); }
+
+ BOOL AllowPasteSpecial() const
+ { return ( ( nControlBits & EE_CNTRL_PASTESPECIAL ) != 0 ); }
+
+ BOOL DoAutoIndenting() const
+ { return ( ( nControlBits & EE_CNTRL_AUTOINDENTING ) != 0 ); }
+
+ BOOL DoUndoAttribs() const
+ { return ( ( nControlBits & EE_CNTRL_UNDOATTRIBS ) != 0 ); }
+
+ BOOL OneCharPerLine() const
+ { return ( ( nControlBits & EE_CNTRL_ONECHARPERLINE ) != 0 ); }
+
+ BOOL IsOutliner() const
+ { return ( ( nControlBits & EE_CNTRL_OUTLINER ) != 0 ); }
+
+ BOOL IsOutliner2() const
+ { return ( ( nControlBits & EE_CNTRL_OUTLINER2 ) != 0 ); }
+
+ BOOL IsAnyOutliner() const
+ { return IsOutliner() || IsOutliner2(); }
+
+ BOOL DoNotUseColors() const
+ { return ( ( nControlBits & EE_CNTRL_NOCOLORS ) != 0 ); }
+
+ BOOL AllowBigObjects() const
+ { return ( ( nControlBits & EE_CNTRL_ALLOWBIGOBJS ) != 0 ); }
+
+ BOOL DoStretch() const
+ { return ( ( nControlBits & EE_CNTRL_STRETCHING ) != 0 ); }
+
+ BOOL AutoPageSize() const
+ { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZE ) != 0 ); }
+ BOOL AutoPageWidth() const
+ { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEX ) != 0 ); }
+ BOOL AutoPageHeight() const
+ { return ( ( nControlBits & EE_CNTRL_AUTOPAGESIZEY ) != 0 ); }
+
+ BOOL MarkFields() const
+ { return ( ( nControlBits & EE_CNTRL_MARKFIELDS ) != 0 ); }
+
+ BOOL DoRestoreFont() const
+ { return ( ( nControlBits & EE_CNTRL_RESTOREFONT ) != 0 ); }
+
+ BOOL DoImportRTFStyleSheets() const
+ { return ( ( nControlBits & EE_CNTRL_RTFSTYLESHEETS ) != 0 ); }
+
+ BOOL DoDrawRedLines() const
+ { return ( ( nControlBits & EE_CNTRL_NOREDLINES ) == 0 ); }
+
+ BOOL DoAutoCorrect() const
+ { return ( ( nControlBits & EE_CNTRL_AUTOCORRECT ) != 0 ); }
+
+ BOOL DoAutoComplete() const
+ { return ( ( nControlBits & EE_CNTRL_AUTOCOMPLETE ) != 0 ); }
+
+ BOOL DoTabIndenting() const
+ { return ( ( nControlBits & EE_CNTRL_TABINDENTING ) != 0 ); }
+
+ BOOL DoFormat100() const
+ { return ( ( nControlBits & EE_CNTRL_FORMAT100 ) != 0 ); }
+
+ BOOL ULSpaceSummation() const
+ { return ( ( nControlBits & EE_CNTRL_ULSPACESUMMATION ) != 0 ); }
+
+ BOOL ULSpaceFirstParagraph() const
+ { return ( ( nControlBits & EE_CNTRL_ULSPACEFIRSTPARA ) != 0 ); }
+};
+
+}//end of namespace binfilter
+#endif // _EDITSTT2_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/editundo.hxx b/binfilter/bf_svx/source/editeng/editundo.hxx
new file mode 100644
index 000000000000..99ef04022524
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/editundo.hxx
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EDITUNDO_HXX
+#define _EDITUNDO_HXX
+
+#include <editdoc.hxx>
+#include <editund2.hxx>
+#include <editdata.hxx>
+namespace binfilter {
+
+#define UNDO_NOACTION 0
+#define UNDO_NEWUNDO 1
+#define UNDO_UNDOSDELETED 2
+#define UNDO_EMPTYGROUPDELETED 3
+#define UNDO_INVALIDEND 4
+
+class ImpEditEngine;
+class EditView;
+
+// -----------------------------------------------------------------------
+// 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
+// ------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------
+// EditUndoInsertFeature
+// ------------------------------------------------------------------------
+class EditUndoInsertFeature : public EditUndo
+{
+private:
+ EPaM aEPaM;
+ SfxPoolItem* pFeature;
+
+public:
+ EditUndoInsertFeature( ImpEditEngine* pImpEE, const EPaM& rEPaM,
+ const SfxPoolItem& rFeature);
+ ~EditUndoInsertFeature();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+// -----------------------------------------------------------------------
+// EditUndoMoveParagraphs
+// ------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------
+// EditUndoSetStyleSheet
+// ------------------------------------------------------------------------
+class EditUndoSetStyleSheet: public EditUndo
+{
+private:
+ USHORT nPara;
+ XubString aPrevName;
+ XubString aNewName;
+ SfxStyleFamily ePrevFamily;
+ SfxStyleFamily eNewFamily;
+ SfxItemSet aPrevParaAttribs;
+
+public:
+
+ 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:
+ EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems );
+ ~EditUndoSetParaAttribs();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+// -----------------------------------------------------------------------
+// EditUndoSetAttribs
+// ------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------
+// EditUndoTransliteration
+// ------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------
+// EditUndoMarkSelection
+// ------------------------------------------------------------------------
+
+
+}//end of namespace binfilter
+#endif // _EDITUNDO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/eerdll2.hxx b/binfilter/bf_svx/source/editeng/eerdll2.hxx
new file mode 100644
index 000000000000..d3ac745ab5fb
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/eerdll2.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _EERDLL2_HXX
+#define _EERDLL2_HXX
+
+#include <forbiddencharacterstable.hxx>
+#include <rtl/ref.hxx>
+namespace binfilter {
+
+class SfxPoolItem;
+class SvxAutoCorrect;
+
+class GlobalEditData
+{
+private:
+ SfxPoolItem** ppDefItems;
+ OutputDevice* pStdRefDevice;
+
+ Link aGetAutoCorrectHdl;
+
+ rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable;
+
+public:
+ GlobalEditData();
+ ~GlobalEditData();
+
+ SfxPoolItem** GetDefItems();
+ OutputDevice* GetStdRefDevice();
+
+ void SetGetAutoCorrectHdl( const Link& rHdl ) { aGetAutoCorrectHdl = rHdl; }
+ SvxAutoCorrect* GetAutoCorrect() const { return (SvxAutoCorrect*) aGetAutoCorrectHdl.Call( NULL ); }
+
+ rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable();
+ void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; }
+};
+
+
+}//end of namespace binfilter
+#endif //_EERDLL2_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/impedit.hxx b/binfilter/bf_svx/source/editeng/impedit.hxx
new file mode 100644
index 000000000000..76b1a93fa1b2
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/impedit.hxx
@@ -0,0 +1,826 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _IMPEDIT_HXX
+#define _IMPEDIT_HXX
+
+#include <editdoc.hxx>
+#include <editsel.hxx>
+#include <editundo.hxx>
+#include <editobj2.hxx>
+#include <editstt2.hxx>
+#include <editdata.hxx>
+
+#include <vcl/virdev.hxx>
+#include <vcl/cursor.hxx>
+#include <vcl/dndhelp.hxx>
+
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
+#include <com/sun/star/i18n/WordType.hpp>
+
+#include <bf_svtools/colorcfg.hxx>
+#include <rtl/ref.hxx>
+
+namespace binfilter {
+class SvtCTLOptions;
+class SvKeyValueIterator;
+class SvUShorts;
+
+DBG_NAMEEX( EditView )//STRIP008
+DBG_NAMEEX( EditEngine )//STRIP008
+
+#define PIMPEE pImpEditView->pEditEngine->pImpEditEngine
+
+#define DEL_LEFT 1
+#define DEL_RIGHT 2
+#define TRAVEL_X_DONTKNOW 0xFFFFFFFF
+#define CURSOR_BIDILEVEL_DONTKNOW 0xFFFF
+#define MAXCHARSINPARA 0x3FFF-CHARPOSGROW // Max 16K, because WYSIWYG array
+
+#define ATTRSPECIAL_WHOLEWORD 1
+#define ATTRSPECIAL_EDGE 2
+
+#define GETCRSR_TXTONLY 0x0001
+#define GETCRSR_STARTOFLINE 0x0002
+#define GETCRSR_ENDOFLINE 0x0004
+#define GETCRSR_PREFERPORTIONSTART 0x0008
+
+#define LINE_SEP 0x0A
+
+typedef EENotify* EENotifyPtr;
+SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 )//STRIP008 ; // IMPL is in outliner.cxx, move to EE later and share declaration, or use BlockNotifications from EE directly
+
+
+class EditView;
+class EditEngine;
+class EditUndoRemoveChars;
+class SvxFontTable;
+class SvxColorList;
+
+class SvxLRSpaceItem;
+class TextRanger;
+class SvxForbiddenCharactersTable;
+
+
+}//end of namespace binfilter
+namespace com {
+namespace sun {
+namespace star {
+namespace datatransfer {
+namespace clipboard {
+ class XClipboard;
+}}}}}
+
+namespace binfilter {
+
+struct ImplIMEInfos
+{
+ String aOldTextAfterStartPos;
+ sal_uInt16* pAttribs;
+ EditPaM aPos;
+ sal_uInt16 nLen;
+ sal_Bool bCursor;
+ sal_Bool bWasCursorOverwrite;
+};
+
+
+struct FormatterFontMetric
+{
+ sal_uInt16 nMaxAscent;
+ sal_uInt16 nMaxDescent;
+
+ FormatterFontMetric() { nMaxAscent = 0; nMaxDescent = 0; /* nMinLeading = 0xFFFF; */ }
+ sal_uInt16 GetHeight() const { return nMaxAscent+nMaxDescent; }
+};
+
+ // ----------------------------------------------------------------------
+// class ImpEditView
+// ----------------------------------------------------------------------
+class ImpEditView : public vcl::unohelper::DragAndDropClient
+{
+ friend class EditView;
+ friend class EditEngine;
+ friend class ImpEditEngine;
+
+private:
+ EditView* pEditView;
+ Cursor* pCursor;
+ Color* pBackgroundColor;
+ EditEngine* pEditEngine;
+ Window* pOutWin;
+ Pointer* pPointer;
+
+ long nInvMore;
+ ULONG nControl;
+ sal_uInt32 nTravelXPos;
+ sal_uInt16 nExtraCursorFlags;
+ sal_uInt16 nCursorBidiLevel;
+ sal_uInt16 nScrollDiffX;
+ sal_Bool bReadOnly;
+ sal_Bool bClickedInSelection;
+ sal_Bool bActiveDragAndDropListener;
+
+ Point aAnchorPoint;
+ Rectangle aOutArea;
+ Point aVisDocStartPos;
+ EESelectionMode eSelectionMode;
+ EditSelection aEditSelection;
+ EVAnchorMode eAnchorMode;
+
+protected:
+
+ // DragAndDropClient
+
+
+
+public:
+ ~ImpEditView();
+
+ EditView* GetEditViewPtr() { return pEditView; }
+
+ sal_uInt16 GetScrollDiffX() const { return nScrollDiffX; }
+ void SetScrollDiffX( sal_uInt16 n ) { nScrollDiffX = n; }
+
+ sal_uInt16 GetCursorBidiLevel() const { return nCursorBidiLevel; }
+ void SetCursorBidiLevel( sal_uInt16 n ) { nCursorBidiLevel = n; }
+
+ Point GetDocPos( const Point& rWindowPos ) const;
+ Point GetWindowPos( const Point& rDocPos ) const;
+ Rectangle GetWindowPos( const Rectangle& rDocPos ) const;
+
+ const Rectangle& GetOutputArea() const { return aOutArea; }
+
+ BOOL IsVertical() const;
+
+ void SetVisDocStartPos( const Point& rPos ) { aVisDocStartPos = rPos; }
+ const Point& GetVisDocStartPos() const { return aVisDocStartPos; }
+
+ long GetVisDocLeft() const { return aVisDocStartPos.X(); }
+ long GetVisDocTop() const { return aVisDocStartPos.Y(); }
+ long GetVisDocRight() const { return aVisDocStartPos.X() + ( !IsVertical() ? aOutArea.GetWidth() : aOutArea.GetHeight() ); }
+ long GetVisDocBottom() const { return aVisDocStartPos.Y() + ( !IsVertical() ? aOutArea.GetHeight() : aOutArea.GetWidth() ); }
+ Rectangle GetVisDocArea() const;
+
+ EditSelection& GetEditSelection() { return aEditSelection; }
+ void SetEditSelection( const EditSelection& rEditSelection );
+ sal_Bool HasSelection() const { return aEditSelection.HasRange(); }
+
+ void DrawSelection() { DrawSelection( aEditSelection ); }
+ void DrawSelection( EditSelection, Region* pRegion = NULL );
+
+ Window* GetWindow() const { return pOutWin; }
+
+ EESelectionMode GetSelectionMode() const { return eSelectionMode; }
+
+ inline void SetPointer( const Pointer& rPointer );
+ inline const Pointer& GetPointer();
+
+ inline void SetCursor( const Cursor& rCursor );
+ inline Cursor* GetCursor();
+
+
+ EVAnchorMode GetAnchorMode() const { return eAnchorMode; }
+ void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, BOOL test );
+ void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags = 0 );
+
+ 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 ); }
+
+ const Color& GetBackgroundColor() const {
+ return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }
+
+ // 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 )//STRIP008 ;
+
+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 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;
+
+ ColorConfig* pColorConfig;
+ SvtCTLOptions* pCTLOptions;
+
+ SfxItemSet* pEmptyItemSet;
+ EditUndoManager* pUndoManager;
+ ESelection* pUndoMarkSelection;
+
+ ImplIMEInfos* mpIMEInfos;
+
+ NotifyList aNotifyCache;
+
+ XubString aWordDelimiters;
+ XubString aGroupChars;
+
+ EditSelFunctionSet aSelFuncSet;
+ EditSelectionEngine aSelEngine;
+
+ Color maBackgroundColor;
+
+ sal_uInt32 nBlockNotifications;
+ sal_uInt16 nStretchX;
+ sal_uInt16 nStretchY;
+
+ USHORT nAsianCompressionMode;
+ BOOL bKernAsianPunctuation;
+
+ EEHorizontalTextDirection eDefaultHorizontalTextDirection;
+
+ sal_uInt16 nBigTextObjectStart;
+ ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > xBI;
+
+ XubString aAutoCompleteText;
+
+ InternalEditStatus aStatus;
+
+ LanguageType eDefLanguage;
+
+ sal_Bool bIsFormatting;
+ sal_Bool bFormatted;
+ sal_Bool bInSelection;
+ sal_Bool bIsInUndo;
+ sal_Bool bUpdate;
+ sal_Bool bUndoEnabled;
+ sal_Bool bOwnerOfRefDev;
+ sal_Bool bDowning;
+ sal_Bool bUseAutoColor;
+ sal_Bool bForceAutoColor;
+ sal_Bool bCallParaInsertedOrDeleted;
+
+ // Fuer Formatierung / Update....
+ DeletedNodesList aDeletedNodes;
+ Rectangle aInvalidRec;
+ sal_uInt32 nCurTextHeight;
+ sal_uInt16 nOnePixelInRef;
+
+ // Wenn an einer Stelle erkannt wird, dass der StatusHdl gerufen werden
+ // muss, dies aber nicht sofort geschehen darf (kritischer Abschnitt):
+ Link aNotifyHdl;
+ Link aImportHdl;
+ Link aBeginMovingParagraphsHdl;
+ Link aEndMovingParagraphsHdl;
+ Link aBeginPasteOrDropHdl;
+ Link aEndPasteOrDropHdl;
+ Link aModifyHdl;
+
+ rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable;
+
+
+ // ================================================================
+ // Methoden...
+ // ================================================================
+
+ void CursorMoved( ContentNode* pPrevNode );
+ void ParaAttribsChanged( ContentNode* pNode );
+ 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; }
+
+
+ EditPaM GetPaM( Point aDocPos, sal_Bool bSmart = sal_True );
+ EditPaM GetPaM( ParaPortion* pPortion, Point aPos, sal_Bool bSmart = sal_True );
+ long GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion );
+ USHORT GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nX, BOOL bSmart = TRUE );
+ Range GetInvalidYOffsets( ParaPortion* pPortion );
+ Range GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* pLine );
+
+ void SetParaAttrib( BYTE nFunc, EditSelection aSel, sal_uInt16 nValue );
+ sal_uInt16 GetParaAttrib( BYTE nFunc, EditSelection aSel );
+ void SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
+
+ EditTextObject* CreateBinTextObject( EditSelection aSelection, SfxItemPool*, 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 );
+ void ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, long nRemainingSpace );
+ 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 ImpInsertText( EditSelection aCurEditSelection, const String& rStr );
+ EditPaM ImpInsertFeature( EditSelection aEditSelection, const SfxPoolItem& rItem );
+ void ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, EditUndoRemoveChars* pCurUndo = 0 );
+
+ EditPaM ImpFastInsertText( EditPaM aPaM, const String& rStr );
+ EditPaM ImpFastInsertParagraph( sal_uInt16 nPara );
+
+ sal_Bool ImpCheckRefMapMode();
+
+ BOOL ImplHasText() const;
+
+ void ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray );
+
+
+
+ EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, BOOL bAcceptStartOfWord = TRUE );
+ EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, USHORT nCharacterIteratorMode, BOOL bToLeft );
+ EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, BOOL bStart );
+
+
+ void InitScriptTypes( USHORT nPara );
+ USHORT GetScriptType( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const;
+ USHORT GetScriptType( const EditSelection& rSel ) const;
+ BOOL IsScriptChange( const EditPaM& rPaM ) const;
+ BOOL HasScriptType( USHORT nPara, USHORT nType ) const;
+
+
+ void ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex );
+
+
+
+ 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;
+
+
+
+ void SetBackgroundColor( const Color& rColor ) { maBackgroundColor = rColor; }
+ Color GetBackgroundColor() const { return maBackgroundColor; }
+
+ Color GetAutoColor() const;
+ void EnableAutoColor( BOOL b ) { bUseAutoColor = b; }
+ BOOL IsAutoColorEnabled() const { return bUseAutoColor; }
+ void ForceAutoColor( BOOL b ) { bForceAutoColor = b; }
+ BOOL IsForceAutoColor() const { return bForceAutoColor; }
+
+ inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode );
+ inline void EraseVirtualDevice();
+
+ void CheckIdleFormatter();
+
+ inline ParaPortion* FindParaPortion( ContentNode* pNode ) const;
+
+ void SetValidPaperSize( const Size& rSz );
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > ImplGetBreakIterator();
+
+
+
+protected:
+
+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 SetVertical( BOOL bVertical );
+ BOOL IsVertical() const { return GetEditDoc().IsVertical(); }
+
+ void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ) { eDefaultHorizontalTextDirection = eHTextDir; }
+ EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const { return eDefaultHorizontalTextDirection; }
+
+
+ void InitWritingDirections( USHORT nPara );
+ BOOL IsRightToLeft( USHORT nPara ) const;
+ BYTE GetRightToLeft( USHORT nPara, USHORT nChar, USHORT* pStart = NULL, USHORT* pEnd = NULL );
+ BOOL HasDifferentRTLLevels( const ContentNode* pNode );
+
+ 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 );
+
+
+ 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 InsertLineBreak( EditSelection aEditSelection );
+ EditPaM InsertField( EditSelection aEditSelection, const SvxFieldItem& rFld );
+ sal_Bool UpdateFields();
+
+
+ EditTextObject* CreateTextObject();
+ EditTextObject* CreateTextObject( EditSelection aSel );
+ void SetText( const EditTextObject& rTextObject );
+ EditSelection InsertText( const EditTextObject& rTextObject, EditSelection aSel );
+
+
+
+ sal_uInt32 CalcTextHeight();
+ sal_uInt32 GetTextHeight() const;
+ sal_uInt32 CalcTextWidth( BOOL bIgnoreExtraSpace );
+ sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace );
+ sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const;
+
+ SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const;
+ SfxItemSet GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib = FALSE );
+ void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial = 0 );
+ void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0, sal_Bool bRemoveFeatures = sal_False );
+
+ 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 ) const;
+
+
+ sal_Bool IsModified() const { return aEditDoc.IsModified(); }
+ void SetModifyFlag( sal_Bool b ) { aEditDoc.SetModified( b ); }
+ void SetModifyHdl( const Link& rLink ) { aModifyHdl = rLink; }
+ Link GetModifyHdl() const { return aModifyHdl; }
+
+
+ sal_Bool IsInSelectionMode() { return bInSelection; }
+
+
+// Fuer Undo/Redo
+
+// OV-Special
+ EditPaM InsertParagraph( sal_uInt16 nPara );
+ EditSelection* SelectParagraph( sal_uInt16 nPara );
+
+ void SetNotifyHdl( const Link& rLink ) { aNotifyHdl = rLink; }
+ Link GetNotifyHdl() const { return aNotifyHdl; }
+
+ void FormatAndUpdate( EditView* pCurView = 0 );
+ inline void IdleFormatAndUpdate( EditView* pCurView = 0 );
+
+ ColorConfig& GetColorConfig();
+ BOOL IsVisualCursorTravelingEnabled();
+ BOOL DoVisualCursorTraveling( const ContentNode* pNode );
+
+ 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( sal_uInt16 nPara, SfxStyleSheet* pStyle );
+ SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const;
+
+
+ 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 EnterBlockNotifications();
+ void LeaveBlockNotifications();
+
+ void UndoActionStart( sal_uInt16 nId );
+ void UndoActionEnd( sal_uInt16 nId );
+
+ EditView* GetActiveView() const { return pActiveView; }
+ void SetActiveView( EditView* pView );
+
+ void SetDefaultLanguage( LanguageType eLang ) { eDefLanguage = eLang; }
+ LanguageType GetDefaultLanguage() const { return eDefLanguage; }
+
+ LanguageType GetLanguage( const EditSelection rSelection ) const;
+ LanguageType GetLanguage( const EditPaM& rPaM, USHORT* pEndPos = NULL ) const;
+ ::com::sun::star::lang::Locale GetLocale( const EditPaM& rPaM ) const;
+
+
+
+ void SetEditTextObjectPool( SfxItemPool* pP ) { pTextObjectPool = pP; }
+ SfxItemPool* GetEditTextObjectPool() const { return pTextObjectPool; }
+
+ const SvxLRSpaceItem& GetLRSpaceItem( ContentNode* pNode );
+ SvxAdjust GetJustification( USHORT nPara ) const;
+
+ void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY );
+ inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY );
+
+ void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ) { nBigTextObjectStart = nStartAtPortionCount; }
+ sal_uInt16 GetBigTextObjectStart() const { return nBigTextObjectStart; }
+
+ inline EditEngine* GetEditEnginePtr() const { return pEditEngine; }
+
+ void SetAsianCompressionMode( USHORT n );
+ USHORT GetAsianCompressionMode() const { return nAsianCompressionMode; }
+
+ void SetKernAsianPunctuation( BOOL b );
+ BOOL IsKernAsianPunctuation() const { return bKernAsianPunctuation; }
+
+ rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const;
+ void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
+};
+
+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 );
+ 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;
+}
+
+#ifndef SVX_LIGHT
+inline EditUndoManager& ImpEditEngine::GetUndoManager()
+{
+ if ( !pUndoManager )
+ pUndoManager = new EditUndoManager( this );
+ return *pUndoManager;
+}
+#endif
+
+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( IsVertical() ? POINTER_TEXT_VERTICAL : POINTER_TEXT );
+ return *pPointer;
+ }
+
+ if(POINTER_TEXT == pPointer->GetStyle() && IsVertical())
+ {
+ delete pPointer;
+ pPointer = new Pointer(POINTER_TEXT_VERTICAL);
+ }
+ else if(POINTER_TEXT_VERTICAL == pPointer->GetStyle() && !IsVertical())
+ {
+ delete 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;
+}
+
+void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit );
+BYTE GetCharTypeForCompression( xub_Unicode cChar );
+Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin );
+
+}//end of namespace binfilter
+#endif // _IMPEDIT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/makefile.mk b/binfilter/bf_svx/source/editeng/makefile.mk
new file mode 100644
index 000000000000..77799043089e
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/makefile.mk
@@ -0,0 +1,85 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_editeng
+
+NO_HIDS=TRUE
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=eeng_pch
+PROJECTPCHSOURCE=svx_eeng_pch
+
+ENABLE_EXCEPTIONS=TRUE
+
+
+# --- Settings -----------------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Allgemein ----------------------------------------------------------
+
+.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != ""
+CDEFS+=-DEDITDEBUG
+.ENDIF
+
+SLOFILES = \
+ $(SLO)$/svx_txtrange.obj \
+ $(SLO)$/svx_forbiddencharacterstable.obj \
+ $(SLO)$/svx_swafopt.obj \
+ $(SLO)$/svx_editattr.obj \
+ $(SLO)$/svx_editdbg.obj \
+ $(SLO)$/svx_editdoc.obj \
+ $(SLO)$/svx_editdoc2.obj \
+ $(SLO)$/svx_editeng.obj \
+ $(SLO)$/svx_editobj.obj \
+ $(SLO)$/svx_editsel.obj \
+ $(SLO)$/svx_editundo.obj \
+ $(SLO)$/svx_editview.obj \
+ $(SLO)$/svx_eerdll.obj \
+ $(SLO)$/svx_impedit.obj \
+ $(SLO)$/svx_impedit2.obj \
+ $(SLO)$/svx_impedit3.obj \
+ $(SLO)$/svx_impedit4.obj \
+ $(SLO)$/svx_impedit5.obj \
+ $(SLO)$/svx_unolingu.obj
+
+SRS1NAME=$(TARGET)
+SRC1FILES= svx_editeng.src
+
+EXCEPTIONSFILES= \
+ $(SLO)$/svx_unolingu.obj
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/editeng/svx_editattr.cxx b/binfilter/bf_svx/source/editeng/svx_editattr.cxx
new file mode 100644
index 000000000000..b8be0ec71f1f
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editattr.cxx
@@ -0,0 +1,452 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+#include <svxfont.hxx>
+
+
+#include <bf_svtools/poolitem.hxx>
+
+#include "itemdata.hxx"
+
+#include <tools/date.hxx>
+
+#include <tools/time.hxx>
+
+#include <fontitem.hxx>
+#include <postitem.hxx>
+#include <wghtitem.hxx>
+#include <udlnitem.hxx>
+#include <cntritem.hxx>
+#include <shdditem.hxx>
+#include <escpitem.hxx>
+#include <wrlmitem.hxx>
+#include <fhgtitem.hxx>
+#include <crsditem.hxx>
+#include <cscoitem.hxx>
+#include <kernitem.hxx>
+#include <akrnitem.hxx>
+#include <langitem.hxx>
+#include <emphitem.hxx>
+#include <charscaleitem.hxx>
+#include <charreliefitem.hxx>
+#include <editattr.hxx>
+
+#include <vcl/outdev.hxx>
+
+namespace binfilter {
+
+/*N*/ DBG_NAME( EE_EditAttrib )
+
+// -------------------------------------------------------------------------
+// class EditAttrib
+// -------------------------------------------------------------------------
+/*N*/ EditAttrib::EditAttrib( const SfxPoolItem& rAttr )
+/*N*/ {
+/*N*/ DBG_CTOR( EE_EditAttrib, 0 );
+/*N*/ pItem = &rAttr;
+/*N*/ }
+
+/*N*/ EditAttrib::~EditAttrib()
+/*N*/ {
+/*N*/ DBG_DTOR( EE_EditAttrib, 0 );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttrib
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+/*N*/ : EditAttrib( rAttr )
+/*N*/ {
+/*N*/ nStart = nS;
+/*N*/ nEnd = nE;
+/*N*/ bFeature = FALSE;
+/*N*/ bEdge = FALSE;
+/*N*/
+/*N*/ DBG_ASSERT( ( rAttr.Which() >= EE_ITEMS_START ) && ( rAttr.Which() <= EE_ITEMS_END ), "EditCharAttrib CTOR: Invalid id!" );
+/*N*/ DBG_ASSERT( ( rAttr.Which() < EE_FEATURE_START ) || ( rAttr.Which() > EE_FEATURE_END ) || ( nE = (nS+1) ), "EditCharAttrib CTOR: Invalid feature!" );
+/*N*/ }
+
+/*N*/ void EditCharAttrib::SetFont( SvxFont&, OutputDevice* )
+/*N*/ {
+/*N*/ }
+
+
+// -------------------------------------------------------------------------
+// class EditCharAttribFont
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO || rAttr.Which() == EE_CHAR_FONTINFO_CJK || rAttr.Which() == EE_CHAR_FONTINFO_CTL, "Kein Fontattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribFont::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ const SvxFontItem& rAttr = (const SvxFontItem&)(*GetItem());
+/*N*/
+/*N*/ rFont.SetName( rAttr.GetFamilyName() );
+/*N*/ rFont.SetFamily( rAttr.GetFamily() );
+/*N*/ rFont.SetPitch( rAttr.GetPitch() );
+/*N*/ rFont.SetCharSet( rAttr.GetCharSet() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribItalic
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC || rAttr.Which() == EE_CHAR_ITALIC_CJK || rAttr.Which() == EE_CHAR_ITALIC_CTL, "Kein Italicattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribItalic::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetItalic( ((const SvxPostureItem*)GetItem())->GetPosture() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribWeight
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT || rAttr.Which() == EE_CHAR_WEIGHT_CJK || rAttr.Which() == EE_CHAR_WEIGHT_CTL, "Kein Weightttribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetWeight( (FontWeight)((const SvxWeightItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribUnderline
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Kein Underlineattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
+/*N*/ {
+/*N*/ rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
+/*N*/ if ( pOutDev )
+/*?*/ pOutDev->SetTextLineColor( ((const SvxUnderlineItem*)GetItem())->GetColor() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribFontHeight
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT || rAttr.Which() == EE_CHAR_FONTHEIGHT_CJK || rAttr.Which() == EE_CHAR_FONTHEIGHT_CTL, "Kein Heightattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ // Prop wird ignoriert
+/*N*/ rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem*)GetItem())->GetHeight() ) );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribFontWidth
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxCharScaleWidthItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Kein Widthattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribFontWidth::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ // must be calculated outside, because f(device)...
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribStrikeout
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Kein Sizeattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetStrikeout( (FontStrikeout)((const SvxCrossedOutItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribColor
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Kein Colorattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribColor::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetColor( ((const SvxColorItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribLanguage
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribLanguage::EditCharAttribLanguage( const SvxLanguageItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( ( rAttr.Which() == EE_CHAR_LANGUAGE ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CJK ) || ( rAttr.Which() == EE_CHAR_LANGUAGE_CTL ), "Kein Languageattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribLanguage::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetLanguage( ((const SvxLanguageItem*)GetItem())->GetLanguage() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribShadow
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Kein Shadowattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetShadow( (BOOL)((const SvxShadowedItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribEscapement
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Kein Escapementattribut!" );
+/*N*/ }
+
+#if defined( WIN ) && !defined( WNT )
+#pragma optimize ("", off)
+#endif
+
+/*N*/ void EditCharAttribEscapement::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ USHORT nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
+/*N*/ rFont.SetPropr( (BYTE)nProp );
+/*N*/
+/*N*/ short nEsc = ((const SvxEscapementItem*)GetItem())->GetEsc();
+/*N*/ if ( nEsc == DFLT_ESC_AUTO_SUPER )
+/*N*/ nEsc = 100 - nProp;
+/*N*/ else if ( nEsc == DFLT_ESC_AUTO_SUB )
+/*N*/ nEsc = -( 100 - nProp );
+/*N*/ rFont.SetEscapement( nEsc );
+/*N*/ }
+
+#if defined( WIN ) && !defined( WNT )
+#pragma optimize ("", on)
+#endif
+
+
+// -------------------------------------------------------------------------
+// class EditCharAttribOutline
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Kein Outlineattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetOutline( (BOOL)((const SvxContourItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribTab
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos )
+/*N*/ : EditCharAttrib( rAttr, nPos, nPos+1 )
+/*N*/ {
+/*N*/ SetFeature( TRUE );
+/*N*/ }
+
+/*N*/ void EditCharAttribTab::SetFont( SvxFont&, OutputDevice* )
+/*N*/ {
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribLineBreak
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos )
+/*N*/ : EditCharAttrib( rAttr, nPos, nPos+1 )
+/*N*/ {
+/*N*/ SetFeature( TRUE );
+/*N*/ }
+
+/*N*/ void EditCharAttribLineBreak::SetFont( SvxFont&, OutputDevice* )
+/*N*/ {
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribField
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos )
+/*N*/ : EditCharAttrib( (const SfxPoolItem&)rAttr, nPos, nPos+1 )
+/*N*/ {
+/*N*/ SetFeature( TRUE ); // !!!
+/*N*/ pTxtColor = 0;
+/*N*/ pFldColor = 0;
+/*N*/ }
+
+/*N*/ void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ if ( pFldColor )
+/*N*/ {
+/*N*/ rFont.SetFillColor( *pFldColor );
+/*N*/ rFont.SetTransparent( FALSE );
+/*N*/ }
+/*N*/ if ( pTxtColor )
+/*N*/ rFont.SetColor( *pTxtColor );
+/*N*/ }
+
+/*N*/ EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
+/*N*/ : EditCharAttrib( *rAttr.GetItem(), rAttr.GetStart(), rAttr.GetEnd() ),
+/*N*/ aFieldValue( rAttr.aFieldValue )
+/*N*/ {
+/*N*/ // Diesen CCTOR nur fuer temporaeres Object verwenden,
+/*N*/ // Item wird nicht gepoolt.
+/*N*/ pTxtColor = rAttr.pTxtColor ? new Color( *rAttr.pTxtColor ) : 0;
+/*N*/ pFldColor = rAttr.pFldColor ? new Color( *rAttr.pFldColor ) : 0;
+/*N*/ }
+
+/*N*/ EditCharAttribField::~EditCharAttribField()
+/*N*/ {
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ BOOL EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
+/*N*/ {
+/*N*/ if ( aFieldValue != rAttr.aFieldValue )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) )
+/*N*/ return FALSE;
+/*N*/ if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) )
+/*N*/ return FALSE;
+/*N*/ if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribPairKerning
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Kein PairKerning!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribPairKerning::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetKerning( ((const SvxAutoKernItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribKerning
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Kein Kerning!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribKerning::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetFixKerning( ((const SvxKerningItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribWordLineMode
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Kein Kerning!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribWordLineMode::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetWordLineMode( ((const SvxWordLineModeItem*)GetItem())->GetValue() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribEmphasisMark
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribEmphasisMark::EditCharAttribEmphasisMark( const SvxEmphasisMarkItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_EMPHASISMARK, "Kein Emphasisattribut!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribEmphasisMark::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetEmphasisMark( ((const SvxEmphasisMarkItem*)GetItem())->GetEmphasisMark() );
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditCharAttribRelief
+// -------------------------------------------------------------------------
+/*N*/ EditCharAttribRelief::EditCharAttribRelief( const SvxCharReliefItem& rAttr, USHORT nStart, USHORT nEnd )
+/*N*/ : EditCharAttrib( rAttr, nStart, nEnd )
+/*N*/ {
+/*N*/ DBG_ASSERT( rAttr.Which() == EE_CHAR_RELIEF, "Not a relief attribute!" );
+/*N*/ }
+
+/*N*/ void EditCharAttribRelief::SetFont( SvxFont& rFont, OutputDevice* )
+/*N*/ {
+/*N*/ rFont.SetRelief( (FontRelief)((const SvxCharReliefItem*)GetItem())->GetValue() );
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editdbg.cxx b/binfilter/bf_svx/source/editeng/svx_editdbg.cxx
new file mode 100644
index 000000000000..2e319fe2eb68
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editdbg.cxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+
+
+
+
+#include <vcl/window.hxx>
+
+#include <editdoc.hxx>
+namespace binfilter {
+
+#if defined( DBG_UTIL ) || ( OSL_DEBUG_LEVEL > 1 )
+
+
+
+
+
+
+
+
+
+/*N*/ BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart )
+/*N*/ {
+/*N*/ USHORT nPrev = 0;
+/*N*/ for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = rAttribs[nAttr];
+/*N*/ USHORT nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd();
+/*N*/ if ( nCur < nPrev )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ nPrev = nCur;
+/*N*/ }
+/*N*/ return TRUE;
+/*N*/ }
+
+#endif
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editdoc.cxx b/binfilter/bf_svx/source/editeng/svx_editdoc.cxx
new file mode 100644
index 000000000000..10ebae9f0bfb
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editdoc.cxx
@@ -0,0 +1,1993 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+#include <tstpitem.hxx>
+#include <fontitem.hxx>
+#include <crsditem.hxx>
+#include <fhgtitem.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 <langitem.hxx>
+#include <emphitem.hxx>
+#include <charreliefitem.hxx>
+
+#include <vcl/outdev.hxx>
+
+#include <editdoc.hxx>
+#include <eerdll.hxx>
+#include <eerdll2.hxx>
+
+#include <tools/stream.hxx>
+
+#include <tools/shl.hxx>
+
+#include <com/sun/star/i18n/ScriptType.hpp>
+
+#include <stdlib.h> // qsort
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+
+// ------------------------------------------------------------
+
+/*N*/ USHORT GetScriptItemId( USHORT nItemId, short nScriptType )
+/*N*/ {
+/*N*/ USHORT nId = nItemId;
+/*N*/
+/*N*/ if ( ( nScriptType == i18n::ScriptType::ASIAN ) ||
+/*N*/ ( nScriptType == i18n::ScriptType::COMPLEX ) )
+/*N*/ {
+/*N*/ switch ( nItemId )
+/*N*/ {
+/*N*/ case EE_CHAR_LANGUAGE:
+/*N*/ nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_LANGUAGE_CJK : EE_CHAR_LANGUAGE_CTL;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTINFO:
+/*N*/ nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_FONTINFO_CJK : EE_CHAR_FONTINFO_CTL;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTHEIGHT:
+/*N*/ nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_FONTHEIGHT_CJK : EE_CHAR_FONTHEIGHT_CTL;
+/*N*/ break;
+/*N*/ case EE_CHAR_WEIGHT:
+/*N*/ nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_WEIGHT_CJK : EE_CHAR_WEIGHT_CTL;
+/*N*/ break;
+/*N*/ case EE_CHAR_ITALIC:
+/*N*/ nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_ITALIC_CJK : EE_CHAR_ITALIC_CTL;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return nId;
+/*N*/ }
+
+/*N*/ BOOL IsScriptItemValid( USHORT nItemId, short nScriptType )
+/*N*/ {
+/*N*/ BOOL bValid = TRUE;
+/*N*/
+/*N*/ switch ( nItemId )
+/*N*/ {
+/*N*/ case EE_CHAR_LANGUAGE:
+/*N*/ bValid = nScriptType == i18n::ScriptType::LATIN;
+/*N*/ break;
+/*N*/ case EE_CHAR_LANGUAGE_CJK:
+/*N*/ bValid = nScriptType == i18n::ScriptType::ASIAN;
+/*N*/ break;
+/*N*/ case EE_CHAR_LANGUAGE_CTL:
+/*N*/ bValid = nScriptType == i18n::ScriptType::COMPLEX;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTINFO:
+/*N*/ bValid = nScriptType == i18n::ScriptType::LATIN;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTINFO_CJK:
+/*N*/ bValid = nScriptType == i18n::ScriptType::ASIAN;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTINFO_CTL:
+/*N*/ bValid = nScriptType == i18n::ScriptType::COMPLEX;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTHEIGHT:
+/*N*/ bValid = nScriptType == i18n::ScriptType::LATIN;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTHEIGHT_CJK:
+/*N*/ bValid = nScriptType == i18n::ScriptType::ASIAN;
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTHEIGHT_CTL:
+/*N*/ bValid = nScriptType == i18n::ScriptType::COMPLEX;
+/*N*/ break;
+/*N*/ case EE_CHAR_WEIGHT:
+/*N*/ bValid = nScriptType == i18n::ScriptType::LATIN;
+/*N*/ break;
+/*N*/ case EE_CHAR_WEIGHT_CJK:
+/*N*/ bValid = nScriptType == i18n::ScriptType::ASIAN;
+/*N*/ break;
+/*N*/ case EE_CHAR_WEIGHT_CTL:
+/*N*/ bValid = nScriptType == i18n::ScriptType::COMPLEX;
+/*N*/ break;
+/*N*/ case EE_CHAR_ITALIC:
+/*N*/ bValid = nScriptType == i18n::ScriptType::LATIN;
+/*N*/ break;
+/*N*/ case EE_CHAR_ITALIC_CJK:
+/*N*/ bValid = nScriptType == i18n::ScriptType::ASIAN;
+/*N*/ break;
+/*N*/ case EE_CHAR_ITALIC_CTL:
+/*N*/ bValid = nScriptType == i18n::ScriptType::COMPLEX;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ return bValid;
+/*N*/ }
+
+
+// ------------------------------------------------------------
+
+// Sollte spaeter zentral nach TOOLS/STRING (Aktuell: 303)
+// fuer Grep: WS_TARGET
+
+/*N*/ DBG_NAME( EE_TextPortion )
+/*N*/ DBG_NAME( EE_EditLine )
+/*N*/ DBG_NAME( EE_ContentNode )
+/*N*/ DBG_NAME( EE_CharAttribList )
+
+/*N*/ SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
+/*N*/ { SID_ATTR_FRAMEDIRECTION, SFX_ITEM_POOLABLE }, // EE_PARA_WRITINGDIR
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_XMLATTRIBS
+/*N*/ { SID_ATTR_PARA_HANGPUNCTUATION, SFX_ITEM_POOLABLE }, // EE_PARA_HANGINGPUNCTUATION
+/*N*/ { SID_ATTR_PARA_FORBIDDEN_RULES, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_PARA_SCRIPTSPACE, SFX_ITEM_POOLABLE }, // EE_PARA_ASIANCJKSPACING
+/*N*/ { SID_ATTR_NUMBERING_RULE, SFX_ITEM_POOLABLE }, // EE_PARA_NUMBULL
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_HYPHENATE
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_BULLETSTATE
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_OUTLLRSPACE
+/*N*/ { SID_ATTR_PARA_OUTLLEVEL, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_PARA_BULLET, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_LRSPACE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_ULSPACE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_PARA_LINESPACE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_PARA_ADJUST, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_TABSTOP, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_COLOR, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_FONT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_FONTHEIGHT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_WEIGHT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_UNDERLINE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_STRIKEOUT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_POSTURE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CONTOUR, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_SHADOWED, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_ESCAPEMENT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_AUTOKERN, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_KERNING, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_WORDLINEMODE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_LANGUAGE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CJK_LANGUAGE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CTL_LANGUAGE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CJK_FONT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CTL_FONT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CJK_FONTHEIGHT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CTL_FONTHEIGHT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CJK_WEIGHT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CTL_WEIGHT, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CJK_POSTURE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_CTL_POSTURE, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_EMPHASISMARK, SFX_ITEM_POOLABLE },
+/*N*/ { SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE },
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_CHAR_RUBI_DUMMY
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_CHAR_XMLATTRIBS
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_TAB
+/*N*/ { 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_LINEBR
+/*N*/ { SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // EE_FEATURE_NOTCONV
+/*N*/ { SID_FIELD, SFX_ITEM_POOLABLE }
+/*N*/ };
+
+/*N*/ USHORT aV1Map[] = {
+/*N*/ 3999, 4001, 4002, 4003, 4004, 4005, 4006,
+/*N*/ 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4017, 4018, 4019 // MI: 4019?
+/*N*/ };
+
+/*N*/ USHORT aV2Map[] = {
+/*N*/ 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009,
+/*N*/ 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4018, 4019, 4020
+/*N*/ };
+
+/*N*/ USHORT aV3Map[] = {
+/*N*/ 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007,
+/*N*/ 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019,
+/*N*/ 4020, 4021
+/*N*/ };
+
+/*N*/ USHORT aV4Map[] = {
+/*N*/ 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
+/*N*/ 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
+/*N*/ 4014, 4015, 4016, 4017, 4018,
+/*N*/ /* CJK Items inserted here: EE_CHAR_LANGUAGE - EE_CHAR_XMLATTRIBS */
+/*N*/ 4034, 4035, 4036, 4037
+/*N*/ };
+
+/*N*/ SV_IMPL_PTRARR( ContentList, ContentNode* );
+/*N*/ SV_IMPL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo );
+/*N*/ SV_IMPL_VARARR( WritingDirectionInfos, WritingDirectionInfo );
+// SV_IMPL_VARARR( ExtraCharInfos, ExtraCharInfo );
+
+
+/*N*/ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
+/*N*/ {
+/*N*/ if ( (*((EditCharAttrib**)pFirst))->GetStart() < (*((EditCharAttrib**)pSecond))->GetStart() )
+/*N*/ return (-1);
+/*N*/ else if ( (*((EditCharAttrib**)pFirst))->GetStart() > (*((EditCharAttrib**)pSecond))->GetStart() )
+/*N*/ return (1);
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+/*N*/ {
+/*N*/ // das neue Attribut im Pool anlegen
+/*N*/ const SfxPoolItem& rNew = rPool.Put( rAttr );
+/*N*/
+/*N*/ EditCharAttrib* pNew = 0;
+/*N*/ switch( rNew.Which() )
+/*N*/ {
+/*N*/ case EE_CHAR_LANGUAGE:
+/*N*/ case EE_CHAR_LANGUAGE_CJK:
+/*N*/ case EE_CHAR_LANGUAGE_CTL:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribLanguage( (const SvxLanguageItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_COLOR:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribColor( (const SvxColorItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTINFO:
+/*N*/ case EE_CHAR_FONTINFO_CJK:
+/*N*/ case EE_CHAR_FONTINFO_CTL:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribFont( (const SvxFontItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTHEIGHT:
+/*N*/ case EE_CHAR_FONTHEIGHT_CJK:
+/*N*/ case EE_CHAR_FONTHEIGHT_CTL:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribFontHeight( (const SvxFontHeightItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTWIDTH:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribFontWidth( (const SvxCharScaleWidthItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_WEIGHT:
+/*N*/ case EE_CHAR_WEIGHT_CJK:
+/*N*/ case EE_CHAR_WEIGHT_CTL:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribWeight( (const SvxWeightItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_UNDERLINE:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribUnderline( (const SvxUnderlineItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_EMPHASISMARK:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribEmphasisMark( (const SvxEmphasisMarkItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_RELIEF:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribRelief( (const SvxCharReliefItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_STRIKEOUT:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribStrikeout( (const SvxCrossedOutItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_ITALIC:
+/*N*/ case EE_CHAR_ITALIC_CJK:
+/*N*/ case EE_CHAR_ITALIC_CTL:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribItalic( (const SvxPostureItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_OUTLINE:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribOutline( (const SvxContourItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_SHADOW:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribShadow( (const SvxShadowedItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_ESCAPEMENT:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribEscapement( (const SvxEscapementItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_PAIRKERNING:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribPairKerning( (const SvxAutoKernItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_KERNING:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribKerning( (const SvxKerningItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_WLM:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribWordLineMode( (const SvxWordLineModeItem&)rNew, nS, nE );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_XMLATTRIBS:
+/*N*/ {
+/*?*/ pNew = new EditCharAttrib( rNew, nS, nE ); // Attrib is only for holding XML information...
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_FEATURE_TAB:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribTab( (const SfxVoidItem&)rNew, nS );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_FEATURE_LINEBR:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribLineBreak( (const SfxVoidItem&)rNew, nS );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_FEATURE_FIELD:
+/*N*/ {
+/*N*/ pNew = new EditCharAttribField( (const SvxFieldItem&)rNew, nS );
+/*N*/ }
+/*N*/ break;
+/*N*/ default:
+/*N*/ {
+/*N*/ DBG_ERROR( "Ungueltiges Attribut!" );
+/*N*/ }
+/*N*/ }
+/*N*/ return pNew;
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class EditLine
+// -------------------------------------------------------------------------
+
+/*N*/ EditLine::EditLine()
+/*N*/ {
+/*N*/ DBG_CTOR( EE_EditLine, 0 );
+/*N*/
+/*N*/ nStart = nEnd = 0;
+/*N*/ nStartPortion = 0; // damit in ungueltiger Zeile ohne Portions von einer gueltigen Zeile mit der Portion Nr0 unterscieden werden kann.
+/*N*/ nEndPortion = 0;
+/*N*/ nHeight = 0;
+/*N*/ nStartPosX = 0;
+/*N*/ nTxtHeight = 0;
+/*N*/ nTxtWidth = 0;
+/*N*/ nCrsrHeight = 0;
+/*N*/ nMaxAscent = 0;
+/*N*/ bHangingPunctuation = FALSE;
+/*N*/ bInvalid = TRUE;
+/*N*/ }
+
+/*N*/ EditLine::EditLine( const EditLine& r )
+/*N*/ {
+/*N*/ DBG_CTOR( EE_EditLine, 0 );
+/*N*/
+/*N*/ nEnd = r.nEnd;
+/*N*/ nStart = r.nStart;
+/*N*/ nStartPortion = r.nStartPortion;
+/*N*/ nEndPortion = r.nEndPortion;
+/*N*/ bHangingPunctuation = r.bHangingPunctuation;
+/*N*/
+/*N*/ nHeight = 0;
+/*N*/ nStartPosX = 0;
+/*N*/ nTxtHeight = 0;
+/*N*/ nTxtWidth = 0;
+/*N*/ nCrsrHeight = 0;
+/*N*/ nMaxAscent = 0;
+/*N*/ bInvalid = TRUE;
+/*N*/ }
+
+/*N*/ EditLine::~EditLine()
+/*N*/ {
+/*N*/ DBG_DTOR( EE_EditLine, 0 );
+/*N*/ }
+
+
+/*N*/ BOOL operator == ( const EditLine& r1, const EditLine& r2 )
+/*N*/ {
+/*N*/ if ( r1.nStart != r2.nStart )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( r1.nEnd != r2.nEnd )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( r1.nStartPortion != r2.nStartPortion )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( r1.nEndPortion != r2.nEndPortion )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ EditLine& EditLine::operator = ( const EditLine& r )
+/*N*/ {
+/*N*/ nEnd = r.nEnd;
+/*N*/ nStart = r.nStart;
+/*N*/ nEndPortion = r.nEndPortion;
+/*N*/ nStartPortion = r.nStartPortion;
+/*N*/ return *this;
+/*N*/ }
+
+
+
+/*N*/ Size EditLine::CalcTextSize( ParaPortion& rParaPortion )
+/*N*/ {
+/*N*/ Size aSz;
+/*N*/ Size aTmpSz;
+/*N*/ TextPortion* pPortion;
+/*N*/
+/*N*/ USHORT nIndex = GetStart();
+/*N*/
+/*N*/ DBG_ASSERT( rParaPortion.GetTextPortions().Count(), "GetTextSize vor CreatePortions !" );
+/*N*/
+/*N*/ for ( USHORT n = nStartPortion; n <= nEndPortion; n++ )
+/*N*/ {
+/*N*/ pPortion = rParaPortion.GetTextPortions().GetObject(n);
+/*N*/ switch ( pPortion->GetKind() )
+/*N*/ {
+/*N*/ case PORTIONKIND_TEXT:
+/*N*/ case PORTIONKIND_FIELD:
+/*N*/ case PORTIONKIND_HYPHENATOR:
+/*N*/ {
+/*N*/ aTmpSz = pPortion->GetSize();
+/*N*/ aSz.Width() += aTmpSz.Width();
+/*N*/ if ( aSz.Height() < aTmpSz.Height() )
+/*N*/ aSz.Height() = aTmpSz.Height();
+/*N*/ }
+/*N*/ break;
+/*N*/ case PORTIONKIND_TAB:
+/*N*/ // case PORTIONKIND_EXTRASPACE:
+/*N*/ {
+/*N*/ aSz.Width() += pPortion->GetSize().Width();
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ nIndex += pPortion->GetLen();
+/*N*/ }
+/*N*/
+/*N*/ SetHeight( (USHORT)aSz.Height() );
+/*N*/ return aSz;
+/*N*/ }
+
+ // -------------------------------------------------------------------------
+// class EditLineList
+// -------------------------------------------------------------------------
+/*N*/ EditLineList::EditLineList()
+/*N*/ {
+/*N*/ }
+
+/*N*/ EditLineList::~EditLineList()
+/*N*/ {
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ void EditLineList::Reset()
+/*N*/ {
+/*N*/ for ( USHORT nLine = 0; nLine < Count(); nLine++ )
+/*N*/ delete GetObject(nLine);
+/*N*/ Remove( 0, Count() );
+/*N*/ }
+
+/*N*/ void EditLineList::DeleteFromLine( USHORT nDelFrom )
+/*N*/ {
+/*N*/ DBG_ASSERT( nDelFrom <= (Count() - 1), "DeleteFromLine: Out of range" );
+/*N*/ for ( USHORT nL = nDelFrom; nL < Count(); nL++ )
+/*N*/ delete GetObject(nL);
+/*N*/ Remove( nDelFrom, Count()-nDelFrom );
+/*N*/ }
+
+
+ // -------------------------------------------------------------------------
+// class EditSelection
+// -------------------------------------------------------------------------
+
+/*N*/ EditSelection::EditSelection()
+/*N*/ {
+/*N*/ }
+
+/*N*/ EditSelection::EditSelection( const EditPaM& rStartAndAnd )
+/*N*/ {
+/*N*/ // koennte noch optimiert werden!
+/*N*/ // nicht erst Def-CTOR vom PaM rufen!
+/*N*/ aStartPaM = rStartAndAnd;
+/*N*/ aEndPaM = rStartAndAnd;
+/*N*/ }
+
+/*N*/ EditSelection::EditSelection( const EditPaM& rStart, const EditPaM& rEnd )
+/*N*/ {
+/*N*/ // koennte noch optimiert werden!
+/*N*/ aStartPaM = rStart;
+/*N*/ aEndPaM = rEnd;
+/*N*/ }
+
+/*N*/ EditSelection& EditSelection::operator = ( const EditPaM& rPaM )
+/*N*/ {
+/*N*/ aStartPaM = rPaM;
+/*N*/ aEndPaM = rPaM;
+/*N*/ return *this;
+/*N*/ }
+
+/*N*/ BOOL EditSelection::Adjust( const ContentList& rNodes )
+/*N*/ {
+/*N*/ DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in Adjust(1)" );
+/*N*/ DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in Adjust(2)" );
+/*N*/
+/*N*/ ContentNode* pStartNode = aStartPaM.GetNode();
+/*N*/ ContentNode* pEndNode = aEndPaM.GetNode();
+/*N*/
+/*N*/ USHORT nStartNode = rNodes.GetPos( pStartNode );
+/*N*/ USHORT nEndNode = rNodes.GetPos( pEndNode );
+/*N*/
+/*N*/ DBG_ASSERT( nStartNode != USHRT_MAX, "Node im Wald in Adjust(1)" );
+/*N*/ DBG_ASSERT( nEndNode != USHRT_MAX, "Node im Wald in Adjust(2)" );
+/*N*/
+/*N*/ BOOL bSwap = FALSE;
+/*N*/ if ( nStartNode > nEndNode )
+/*N*/ bSwap = TRUE;
+/*N*/ else if ( ( nStartNode == nEndNode ) && ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) )
+/*N*/ bSwap = TRUE;
+/*N*/
+/*N*/ if ( bSwap )
+/*N*/ {
+/*?*/ EditPaM aTmpPaM( aStartPaM );
+/*?*/ aStartPaM = aEndPaM;
+/*?*/ aEndPaM = aTmpPaM;
+/*N*/ }
+/*N*/
+/*N*/ return bSwap;
+/*N*/ }
+
+
+ // -------------------------------------------------------------------------
+// class EditPaM
+// -------------------------------------------------------------------------
+/*N*/ BOOL operator == ( const EditPaM& r1, const EditPaM& r2 )
+/*N*/ {
+/*N*/ if ( r1.GetNode() != r2.GetNode() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( r1.GetIndex() != r2.GetIndex() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ EditPaM& EditPaM::operator = ( const EditPaM& rPaM )
+/*N*/ {
+/*N*/ nIndex = rPaM.nIndex;
+/*N*/ pNode = rPaM.pNode;
+/*N*/ return *this;
+/*N*/ }
+
+/*N*/ BOOL operator != ( const EditPaM& r1, const EditPaM& r2 )
+/*N*/ {
+/*N*/ return !( r1 == r2 );
+/*N*/ }
+
+
+ // -------------------------------------------------------------------------
+// class ContentNode
+// -------------------------------------------------------------------------
+/*N*/ ContentNode::ContentNode( SfxItemPool& rPool ) : aContentAttribs( rPool )
+/*N*/ {
+/*N*/ DBG_CTOR( EE_ContentNode, 0 );
+/*N*/ }
+
+/*N*/ ContentNode::ContentNode( const XubString& rStr, const ContentAttribs& rContentAttribs ) :
+/*N*/ XubString( rStr ), aContentAttribs( rContentAttribs )
+/*N*/ {
+/*N*/ DBG_CTOR( EE_ContentNode, 0 );
+/*N*/ }
+
+/*N*/ ContentNode::~ContentNode()
+/*N*/ {
+/*N*/ DBG_DTOR( EE_ContentNode, 0 );
+/*N*/ }
+
+/*N*/ void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemPool )
+/*N*/ {
+/*N*/ if ( !nNew )
+/*N*/ return;
+/*N*/
+/*N*/ // Da Features anders behandelt werden als normale Zeichenattribute,
+/*N*/ // kann sich hier auch die Sortierung der Start-Liste aendern!
+/*N*/ // In jedem if..., in dem weiter (n) Moeglichkeiten aufgrund von
+/*N*/ // bFeature oder Spezialfall existieren,
+/*N*/ // muessen (n-1) Moeglichkeiten mit bResort versehen werden.
+/*N*/ // Die wahrscheinlichste Moeglichkeit erhaelt kein bResort,
+/*N*/ // so dass nicht neu sortiert wird, wenn sich alle Attribute
+/*N*/ // gleich verhalten.
+/*N*/ BOOL bResort = FALSE;
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+/*N*/ while ( pAttrib )
+/*N*/ {
+/*N*/ if ( pAttrib->GetEnd() >= nIndex )
+/*N*/ {
+/*N*/ // Alle Attribute hinter der Einfuegeposition verschieben...
+/*N*/ if ( pAttrib->GetStart() > nIndex )
+/*N*/ {
+/*N*/ pAttrib->MoveForward( nNew );
+/*N*/ }
+/*N*/ // 0: Leeres Attribut expandieren, wenn an Einfuegestelle
+/*N*/ else if ( pAttrib->IsEmpty() )
+/*N*/ {
+/*?*/ // 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 );
+/*N*/ }
+/*N*/ // 1: Attribut startet davor, geht bis Index...
+/*N*/ else if ( pAttrib->GetEnd() == nIndex ) // Start muss davor liegen
+/*N*/ {
+/*N*/ // Nur expandieren, wenn kein Feature,
+/*N*/ // und wenn nicht in ExcludeListe!
+/*N*/ // Sonst geht z.B. ein UL bis zum neuen ULDB, beide expandieren
+/*N*/ // if ( !pAttrib->IsFeature() && !rExclList.FindAttrib( pAttrib->Which() ) )
+/*N*/ if ( !pAttrib->IsFeature() && !aCharAttribList.FindEmptyAttrib( pAttrib->Which(), nIndex ) )
+/*N*/ {
+/*?*/ if ( !pAttrib->IsEdge() )
+/*?*/ pAttrib->Expand( nNew );
+/*N*/ }
+/*N*/ else
+/*N*/ bResort = TRUE;
+/*N*/ }
+/*N*/ // 2: Attribut startet davor, geht hinter Index...
+/*N*/ else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
+/*N*/ {
+/*?*/ DBG_ASSERT( !pAttrib->IsFeature(), "Grosses Feature?!" );
+/*?*/ pAttrib->Expand( nNew );
+/*N*/ }
+/*N*/ // 3: Attribut startet auf Index...
+/*N*/ else if ( pAttrib->GetStart() == nIndex )
+/*N*/ {
+/*?*/ if ( pAttrib->IsFeature() )
+/*?*/ {
+/*?*/ pAttrib->MoveForward( nNew );
+/*?*/ bResort = TRUE;
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if ( nIndex == 0 )
+/*?*/ {
+/*?*/ pAttrib->Expand( nNew );
+/*?*/ bResort = TRUE;
+/*?*/ }
+/*?*/ else
+/*?*/ pAttrib->MoveForward( nNew );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( pAttrib->IsEdge() )
+/*?*/ pAttrib->SetEdge( FALSE );
+/*N*/
+/*N*/ DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" );
+/*N*/
+/*N*/ DBG_ASSERT( pAttrib->GetStart() <= pAttrib->GetEnd(), "Expand: Attribut verdreht!" );
+/*N*/ DBG_ASSERT( ( pAttrib->GetEnd() <= Len() ), "Expand: Attrib groesser als Absatz!" );
+/*N*/ if ( pAttrib->IsEmpty() )
+/*N*/ {
+/*?*/ DBG_ERROR( "Leeres Attribut nach ExpandAttribs?" );
+/*?*/ bResort = TRUE;
+/*?*/ aCharAttribList.GetAttribs().Remove( nAttr );
+/*?*/ rItemPool.Remove( *pAttrib->GetItem() );
+/*?*/ delete pAttrib;
+/*?*/ nAttr--;
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+/*N*/ }
+/*N*/
+/*N*/ if ( bResort )
+/*N*/ aCharAttribList.ResortAttribs();
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Expand: Start-Liste verdreht" );
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& rItemPool )
+/*N*/ {
+/*N*/ if ( !nDeleted )
+/*N*/ return;
+/*N*/
+/*N*/ // Da Features anders behandelt werden als normale Zeichenattribute,
+/*N*/ // kann sich hier auch die Sortierung der Start-Liste aendern!
+/*N*/ BOOL bResort = FALSE;
+/*N*/ BOOL bDelAttr = FALSE;
+/*N*/ USHORT nEndChanges = nIndex+nDeleted;
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+/*N*/ while ( pAttrib )
+/*N*/ {
+/*N*/ bDelAttr = FALSE;
+/*N*/ if ( pAttrib->GetEnd() >= nIndex )
+/*N*/ {
+/*N*/ // Alles Attribute hinter der Einfuegeposition verschieben...
+/*N*/ if ( pAttrib->GetStart() >= nEndChanges )
+/*N*/ {
+/*N*/ pAttrib->MoveBackward( nDeleted );
+/*N*/ }
+/*N*/ // 1. Innenliegende Attribute loeschen...
+/*N*/ else if ( ( pAttrib->GetStart() >= nIndex ) && ( pAttrib->GetEnd() <= nEndChanges ) )
+/*N*/ {
+/*N*/ // Spezialfall: Attrubt deckt genau den Bereich ab
+/*N*/ // => als leeres Attribut behalten.
+/*N*/ if ( !pAttrib->IsFeature() && ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
+/*?*/ pAttrib->GetEnd() = nIndex; // leer
+/*N*/ else
+/*N*/ bDelAttr = TRUE;
+/*N*/ }
+/*N*/ // 2. Attribut beginnt davor, endet drinnen oder dahinter...
+/*N*/ else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
+/*N*/ {
+/*?*/ DBG_ASSERT( !pAttrib->IsFeature(), "Collapsing Feature!" );
+/*?*/ if ( pAttrib->GetEnd() <= nEndChanges ) // endet drinnen
+/*?*/ pAttrib->GetEnd() = nIndex;
+/*?*/ else
+/*?*/ pAttrib->Collaps( nDeleted ); // endet dahinter
+/*N*/ }
+/*N*/ // 3. Attribut beginnt drinnen, endet dahinter...
+/*N*/ else if ( ( pAttrib->GetStart() >= nIndex ) && ( pAttrib->GetEnd() > nEndChanges ) )
+/*N*/ {
+/*?*/ // Features duerfen nicht expandieren!
+/*?*/ if ( pAttrib->IsFeature() )
+/*?*/ {
+/*?*/ pAttrib->MoveBackward( nDeleted );
+/*?*/ bResort = TRUE;
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ pAttrib->GetStart() = nEndChanges;
+/*?*/ pAttrib->MoveBackward( nDeleted );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" );
+/*N*/
+/*N*/ DBG_ASSERT( pAttrib->GetStart() <= pAttrib->GetEnd(), "Collaps: Attribut verdreht!" );
+/*N*/ DBG_ASSERT( ( pAttrib->GetEnd() <= Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" );
+/*N*/ if ( bDelAttr /* || pAttrib->IsEmpty() */ )
+/*N*/ {
+/*N*/ bResort = TRUE;
+/*N*/ aCharAttribList.GetAttribs().Remove( nAttr );
+/*N*/ rItemPool.Remove( *pAttrib->GetItem() );
+/*N*/ delete pAttrib;
+/*N*/ nAttr--;
+/*N*/ }
+/*N*/ else if ( pAttrib->IsEmpty() )
+/*?*/ aCharAttribList.HasEmptyAttribs() = TRUE;
+/*N*/
+/*N*/ nAttr++;
+/*N*/ pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+/*N*/ }
+/*N*/
+/*N*/ if ( bResort )
+/*N*/ aCharAttribList.ResortAttribs();
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Collaps: Start-Liste verdreht" );
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs )
+/*N*/ {
+/*N*/ DBG_ASSERT( pPrevNode, "kopieren von Attributen auf einen NULL-Pointer ?" );
+/*N*/
+/*N*/ xub_StrLen nCut = pPrevNode->Len();
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttrib )
+/*N*/ {
+/*N*/ if ( pAttrib->GetEnd() < nCut )
+/*N*/ {
+/*N*/ // bleiben unveraendert....
+/*N*/ ;
+/*N*/ }
+/*N*/ else if ( pAttrib->GetEnd() == nCut )
+/*N*/ {
+/*N*/ // muessen als leeres Attribut kopiert werden.
+/*N*/ if ( bKeepEndingAttribs && !pAttrib->IsFeature() && !aCharAttribList.FindAttrib( pAttrib->GetItem()->Which(), 0 ) )
+/*N*/ {
+/*?*/ EditCharAttrib* pNewAttrib = MakeCharAttrib( rPool, *(pAttrib->GetItem()), 0, 0 );
+/*?*/ DBG_ASSERT( pNewAttrib, "MakeCharAttrib fehlgeschlagen!" );
+/*?*/ aCharAttribList.InsertAttrib( pNewAttrib );
+/*N*/ }
+/*N*/ }
+/*N*/ else if ( pAttrib->IsInside( nCut ) || ( !nCut && !pAttrib->GetStart() && !pAttrib->IsFeature() ) )
+/*N*/ {
+/*?*/ // 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;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ // 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--;
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ContentNode::AppendAttribs( ContentNode* pNextNode )
+/*N*/ {
+/*N*/ DBG_ASSERT( pNextNode, "kopieren von Attributen von einen NULL-Pointer ?" );
+/*N*/
+/*N*/ USHORT nNewStart = Len();
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute VOR AppendAttribs kaputt" );
+/*N*/ #endif
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttrib = GetAttrib( pNextNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttrib )
+/*N*/ {
+/*?*/ // 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 );
+/*N*/ }
+/*N*/ // Fuer die Attribute, die nur ruebergewandert sind:
+/*N*/ pNextNode->GetCharAttribs().Clear();
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute NACH AppendAttribs kaputt" );
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ContentNode::CreateDefFont()
+/*N*/ {
+/*N*/ // Erst alle Informationen aus dem Style verwenden...
+/*N*/ SfxStyleSheet* pS = aContentAttribs.GetStyleSheet();
+/*N*/ if ( pS )
+/*N*/ CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() );
+/*N*/
+/*N*/ // ... dann die harte Absatzformatierung rueberbuegeln...
+/*N*/ CreateFont( GetCharAttribs().GetDefFont(),
+/*N*/ GetContentAttribs().GetItems(), ( pS ? FALSE : TRUE ) );
+/*N*/ }
+
+/*N*/ void ContentNode::SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont )
+/*N*/ {
+/*N*/ aContentAttribs.SetStyleSheet( pS );
+/*N*/ if ( bRecalcFont )
+/*N*/ CreateDefFont();
+/*N*/ }
+
+
+ // -------------------------------------------------------------------------
+// class ContentAttribs
+// -------------------------------------------------------------------------
+/*N*/ ContentAttribs::ContentAttribs( SfxItemPool& rPool ) :
+/*N*/ aAttribSet( rPool, EE_PARA_START, EE_CHAR_END )
+/*N*/ {
+/*N*/ pStyle = 0;
+/*N*/ }
+
+/*N*/ ContentAttribs::ContentAttribs( const ContentAttribs& rRef ) :
+/*N*/ aAttribSet( rRef.aAttribSet )
+/*N*/ {
+/*N*/ pStyle = rRef.pStyle;
+/*N*/ }
+
+/*N*/ ContentAttribs::~ContentAttribs()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab )
+/*N*/ {
+/*N*/ const SvxTabStopItem& rTabs = (const SvxTabStopItem&) GetItem( EE_PARA_TABS );
+/*N*/ for ( USHORT i = 0; i < rTabs.Count(); i++ )
+/*N*/ {
+/*N*/ const SvxTabStop& rTab = rTabs[i];
+/*N*/ if ( rTab.GetTabPos() > nCurPos )
+/*N*/ return rTab;
+/*N*/ }
+/*N*/
+/*N*/ // DefTab ermitteln...
+/*N*/ SvxTabStop aTabStop;
+/*N*/ long x = nCurPos / nDefTab + 1;
+/*N*/ aTabStop.GetTabPos() = nDefTab * x;
+/*N*/ return aTabStop;
+/*N*/ }
+
+/*N*/ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS )
+/*N*/ {
+/*N*/ BOOL bStyleChanged = ( pStyle != pS );
+/*N*/ pStyle = pS;
+/*N*/ // #104799# Only when other style sheet, not when current style sheet modified
+/*N*/ if ( pStyle && bStyleChanged )
+/*N*/ {
+/*N*/ // Gezielt die Attribute aus der Absatzformatierung entfernen, die im Style
+/*N*/ // spezifiziert sind, damit die Attribute des Styles wirken koennen.
+/*N*/ const SfxItemSet& rStyleAttribs = pStyle->GetItemSet();
+/*N*/ for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+/*N*/ {
+/*N*/ // #99635# Don't change bullet on/off
+/*N*/ if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON ) )
+/*N*/ aAttribSet.ClearItem( nWhich );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ const SfxPoolItem& ContentAttribs::GetItem( USHORT nWhich )
+/*N*/ {
+/*N*/ // Harte Absatzattribute haben Vorrang!
+/*N*/ SfxItemSet* pTakeFrom = &aAttribSet;
+/*N*/ if ( pStyle && ( aAttribSet.GetItemState( nWhich, FALSE ) != SFX_ITEM_ON ) )
+/*N*/ pTakeFrom = &pStyle->GetItemSet();
+/*N*/
+/*N*/ return pTakeFrom->Get( nWhich );
+/*N*/ }
+
+/*N*/ BOOL ContentAttribs::HasItem( USHORT nWhich )
+/*N*/ {
+/*N*/ BOOL bHasItem = FALSE;
+/*N*/ if ( aAttribSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_ON )
+/*N*/ bHasItem = TRUE;
+/*N*/ else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ bHasItem = TRUE;
+/*N*/
+/*N*/ return bHasItem;
+/*N*/ }
+
+
+
+ // ----------------------------------------------------------------------
+// class ItemList
+// ----------------------------------------------------------------------
+
+ // -------------------------------------------------------------------------
+// class EditDoc
+// -------------------------------------------------------------------------
+/*N*/ EditDoc::EditDoc( SfxItemPool* pPool )
+/*N*/ {
+/*N*/ if ( pPool )
+/*N*/ {
+/*N*/ pItemPool = pPool;
+/*N*/ bOwnerOfPool = FALSE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ pItemPool = new EditEngineItemPool( FALSE );
+/*?*/ bOwnerOfPool = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ nDefTab = DEFTAB;
+/*N*/ bIsVertical = FALSE;
+/*N*/
+/*N*/ // Don't create a empty node, Clear() will be called in EditEngine-CTOR
+/*N*/
+/*N*/ SetModified( FALSE );
+/*N*/ };
+
+/*N*/ EditDoc::~EditDoc()
+/*N*/ {
+/*N*/ ImplDestroyContents();
+/*N*/ if ( bOwnerOfPool )
+/*?*/ delete pItemPool;
+/*N*/ }
+
+/*N*/ void EditDoc::ImplDestroyContents()
+/*N*/ {
+/*N*/ for ( USHORT nNode = Count(); nNode; )
+/*N*/ RemoveItemsFromPool( GetObject( --nNode ) );
+/*N*/ DeleteAndDestroy( 0, Count() );
+/*N*/ }
+
+/*N*/ void EditDoc::RemoveItemsFromPool( ContentNode* pNode )
+/*N*/ {
+/*N*/ for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[nAttr];
+/*N*/ GetItemPool().Remove( *pAttr->GetItem() );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent, short nScriptType )
+/*N*/ {
+/*N*/ Font aPrevFont( rFont );
+/*N*/ rFont.SetAlign( ALIGN_BASELINE );
+/*N*/ rFont.SetTransparent( TRUE );
+/*N*/
+/*N*/ USHORT nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType );
+/*N*/ USHORT nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
+/*N*/ USHORT nWhich_FontHeight = GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType );
+/*N*/ USHORT nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType );
+/*N*/ USHORT nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType );
+/*N*/
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SFX_ITEM_ON ) )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)rSet.Get( nWhich_FontInfo );
+/*N*/ rFont.SetName( rFontItem.GetFamilyName() );
+/*N*/ rFont.SetFamily( rFontItem.GetFamily() );
+/*N*/ rFont.SetPitch( rFontItem.GetPitch() );
+/*N*/ rFont.SetCharSet( rFontItem.GetCharSet() );
+/*N*/ }
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( nWhich_Language ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetLanguage( ((const SvxLanguageItem&)rSet.Get( nWhich_Language )).GetLanguage() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_COLOR ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetColor( ((const SvxColorItem&)rSet.Get( EE_CHAR_COLOR )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem&)rSet.Get( nWhich_FontHeight ) ).GetHeight() ) );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( nWhich_Weight )).GetWeight() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetUnderline() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetItalic( ((const SvxPostureItem&)rSet.Get( nWhich_Italic )).GetPosture() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OUTLINE ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetOutline( ((const SvxContourItem&)rSet.Get( EE_CHAR_OUTLINE )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_SHADOW ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetShadow( ((const SvxShadowedItem&)rSet.Get( EE_CHAR_SHADOW )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SFX_ITEM_ON ) )
+/*N*/ {
+/*N*/ const SvxEscapementItem& rEsc = (const SvxEscapementItem&) rSet.Get( EE_CHAR_ESCAPEMENT );
+/*N*/
+/*N*/ USHORT nProp = rEsc.GetProp();
+/*N*/ rFont.SetPropr( (BYTE)nProp );
+/*N*/
+/*N*/ short nEsc = rEsc.GetEsc();
+/*N*/ if ( nEsc == DFLT_ESC_AUTO_SUPER )
+/*N*/ nEsc = 100 - nProp;
+/*N*/ else if ( nEsc == DFLT_ESC_AUTO_SUB )
+/*N*/ nEsc = -( 100 - nProp );
+/*N*/ rFont.SetEscapement( nEsc );
+/*N*/ }
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetKerning( ((const SvxAutoKernItem&)rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_KERNING ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetFixKerning( ((const SvxKerningItem&)rSet.Get( EE_CHAR_KERNING )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_WLM ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetWordLineMode( ((const SvxWordLineModeItem&)rSet.Get( EE_CHAR_WLM )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_EMPHASISMARK ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetEmphasisMark( ((const SvxEmphasisMarkItem&)rSet.Get( EE_CHAR_EMPHASISMARK )).GetValue() );
+/*N*/ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_RELIEF ) == SFX_ITEM_ON ) )
+/*N*/ rFont.SetRelief( (FontRelief)((const SvxCharReliefItem&)rSet.Get( EE_CHAR_RELIEF )).GetValue() );
+/*N*/
+/*N*/ // Ob ich jetzt den ganzen Font vergleiche, oder vor jeder Aenderung
+/*N*/ // pruefe, ob der Wert sich aendert, bleibt sich relativ gleich.
+/*N*/ // So ggf ein MakeUniqFont im Font mehr, dafuer bei Aenderung schnellerer
+/*N*/ // Abbruch der Abfrage, oder ich musste noch jedesmal ein bChanged pflegen.
+/*N*/ if ( rFont == aPrevFont )
+/*N*/ rFont = aPrevFont; // => Gleicher ImpPointer fuer IsSameInstance
+/*N*/ }
+
+/*N*/ void EditDoc::CreateDefFont( BOOL bUseStyles )
+/*N*/ {
+/*N*/ SfxItemSet aTmpSet( GetItemPool(), EE_PARA_START, EE_CHAR_END );
+/*N*/ CreateFont( aDefFont, aTmpSet );
+/*N*/ aDefFont.SetVertical( IsVertical() );
+/*N*/ aDefFont.SetOrientation( IsVertical() ? 2700 : 0 );
+/*N*/
+/*N*/ for ( USHORT nNode = 0; nNode < Count(); nNode++ )
+/*N*/ {
+/*N*/ ContentNode* pNode = GetObject( nNode );
+/*N*/ pNode->GetCharAttribs().GetDefFont() = aDefFont;
+/*N*/ if ( bUseStyles )
+/*?*/ pNode->CreateDefFont();
+/*N*/ }
+/*N*/ }
+
+/*N*/ static const sal_Unicode aCR[] = { 0x0d, 0x00 };
+/*N*/ static const sal_Unicode aLF[] = { 0x0a, 0x00 };
+/*N*/ static const sal_Unicode aCRLF[] = { 0x0d, 0x0a, 0x00 };
+
+/*N*/ XubString EditDoc::GetSepStr( LineEnd eEnd )
+/*N*/ {
+/*N*/ XubString aSep;
+/*N*/ if ( eEnd == LINEEND_CR )
+/*N*/ aSep = aCR;
+/*N*/ else if ( eEnd == LINEEND_LF )
+/*N*/ aSep = aLF;
+/*N*/ else
+/*N*/ aSep = aCRLF;
+/*N*/ return aSep;
+/*N*/ }
+
+/*N*/ XubString EditDoc::GetText( LineEnd eEnd ) const
+/*N*/ {
+/*N*/ ULONG nLen = GetTextLen();
+/*N*/ USHORT nNodes = Count();
+/*N*/
+/*N*/ String aSep = EditDoc::GetSepStr( eEnd );
+/*N*/ USHORT nSepSize = aSep.Len();
+/*N*/
+/*N*/ if ( nSepSize )
+/*N*/ nLen += nNodes * nSepSize;
+/*N*/ if ( nLen > 0xFFFb / sizeof(xub_Unicode) )
+/*N*/ {
+/*?*/ DBG_ERROR( "Text zu gross fuer String" );
+/*?*/ return XubString();
+/*N*/ }
+/*N*/ xub_Unicode* pStr = new xub_Unicode[nLen+1];
+/*N*/ xub_Unicode* pCur = pStr;
+/*N*/ USHORT nLastNode = nNodes-1;
+/*N*/ for ( USHORT nNode = 0; nNode < nNodes; nNode++ )
+/*N*/ {
+/*N*/ XubString aTmp( GetParaAsString( GetObject(nNode) ) );
+/*N*/ memcpy( pCur, aTmp.GetBuffer(), aTmp.Len()*sizeof(sal_Unicode) );
+/*N*/ pCur += aTmp.Len();
+/*N*/ if ( nSepSize && ( nNode != nLastNode ) )
+/*N*/ {
+/*N*/ memcpy( pCur, aSep.GetBuffer(), nSepSize*sizeof(sal_Unicode ) );
+/*N*/ pCur += nSepSize;
+/*N*/ }
+/*N*/ }
+/*N*/ *pCur = '\0';
+/*N*/ XubString aASCIIText( pStr );
+/*N*/ delete[] pStr;
+/*N*/ return aASCIIText;
+/*N*/ }
+
+/*N*/ XubString EditDoc::GetParaAsString( USHORT nNode ) const
+/*N*/ {
+/*N*/ return GetParaAsString( SaveGetObject( nNode ) );
+/*N*/ }
+
+/*N*/ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, BOOL bResolveFields ) const
+/*N*/ {
+/*N*/ if ( nEndPos > pNode->Len() )
+/*N*/ nEndPos = pNode->Len();
+/*N*/
+/*N*/ DBG_ASSERT( nStartPos <= nEndPos, "Start und Ende vertauscht?" );
+/*N*/
+/*N*/ USHORT nIndex = nStartPos;
+/*N*/ XubString aStr;
+/*N*/ EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex );
+/*N*/ while ( nIndex < nEndPos )
+/*N*/ {
+/*N*/ USHORT nEnd = nEndPos;
+/*N*/ if ( pNextFeature && ( pNextFeature->GetStart() < nEnd ) )
+/*N*/ nEnd = pNextFeature->GetStart();
+/*N*/ else
+/*N*/ pNextFeature = 0; // Feature interessiert unten nicht
+/*N*/
+/*N*/
+/*N*/ DBG_ASSERT( nEnd >= nIndex, "Ende vorm Index?" );
+/*N*/ aStr += XubString( *pNode, nIndex, nEnd-nIndex );
+/*N*/
+/*N*/ if ( pNextFeature )
+/*N*/ {
+/*N*/ switch ( pNextFeature->GetItem()->Which() )
+/*N*/ {
+/*N*/ case EE_FEATURE_TAB: aStr += '\t';
+/*N*/ break;
+/*N*/ case EE_FEATURE_LINEBR: aStr += '\x0A';
+/*N*/ break;
+/*N*/ case EE_FEATURE_FIELD: if ( bResolveFields )
+/*N*/ aStr += ((EditCharAttribField*)pNextFeature)->GetFieldValue();
+/*N*/ break;
+/*N*/ default: DBG_ERROR( "Was fuer ein Feature ?" );
+/*N*/ }
+/*N*/ pNextFeature = pNode->GetCharAttribs().FindFeature( ++nEnd );
+/*N*/ }
+/*N*/ nIndex = nEnd;
+/*N*/ }
+/*N*/ return aStr;
+/*N*/ }
+
+/*N*/ ULONG EditDoc::GetTextLen() const
+/*N*/ {
+/*N*/ ULONG nLen = 0;
+/*N*/ for ( USHORT nNode = 0; nNode < Count(); nNode++ )
+/*N*/ {
+/*N*/ ContentNode* pNode = GetObject( nNode );
+/*N*/ nLen += pNode->Len();
+/*N*/ // Felder k”nnen laenger sein als der Platzhalter im Node.
+/*N*/ const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
+/*N*/ for ( USHORT nAttr = rAttrs.Count(); nAttr; )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = rAttrs[--nAttr];
+/*N*/ if ( pAttr->Which() == EE_FEATURE_FIELD )
+/*N*/ {
+/*N*/ USHORT nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len();
+/*N*/ if ( !nFieldLen )
+/*N*/ nLen--;
+/*N*/ else
+/*N*/ nLen += nFieldLen-1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nLen;
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::Clear()
+/*N*/ {
+/*N*/ ImplDestroyContents();
+/*N*/
+/*N*/ ContentNode* pNode = new ContentNode( GetItemPool() );
+/*N*/ Insert( pNode, 0 );
+/*N*/
+/*N*/ CreateDefFont( FALSE );
+/*N*/
+/*N*/ SetModified( FALSE );
+/*N*/
+/*N*/ EditPaM aPaM( pNode, 0 );
+/*N*/ return aPaM;
+/*N*/ }
+/*N*/
+/*N*/ void EditDoc::SetModified( BOOL b )
+/*N*/ {
+/*N*/ bModified = b;
+/*N*/ if ( bModified )
+/*N*/ {
+/*N*/ aModifyHdl.Call( NULL );
+/*N*/ }
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::RemoveText()
+/*N*/ {
+/*N*/ // Das alte ItemSetmerken, damit z.B. im Chart Font behalten bleibt
+/*N*/ ContentNode* pPrevFirstNode = GetObject(0);
+/*N*/ SfxStyleSheet* pPrevStyle = pPrevFirstNode->GetStyleSheet();
+/*N*/ SfxItemSet aPrevSet( pPrevFirstNode->GetContentAttribs().GetItems() );
+/*N*/ Font aPrevFont( pPrevFirstNode->GetCharAttribs().GetDefFont() );
+/*N*/
+/*N*/ ImplDestroyContents();
+/*N*/
+/*N*/ ContentNode* pNode = new ContentNode( GetItemPool() );
+/*N*/ Insert( pNode, 0 );
+/*N*/
+/*N*/ pNode->SetStyleSheet( pPrevStyle, FALSE );
+/*N*/ pNode->GetContentAttribs().GetItems().Set( aPrevSet );
+/*N*/ pNode->GetCharAttribs().GetDefFont() = aPrevFont;
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ EditPaM aPaM( pNode, 0 );
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr )
+/*N*/ {
+/*N*/ DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+/*N*/ DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+/*N*/ DBG_ASSERT( rStr.Search( '\t' ) == STRING_NOTFOUND, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+/*N*/ DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertText1" );
+/*N*/
+/*N*/ aPaM.GetNode()->Insert( rStr, aPaM.GetIndex() );
+/*N*/ aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() );
+/*N*/ aPaM.GetIndex() += rStr.Len();
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs )
+/*N*/ {
+/*N*/ DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertParaBreak" );
+/*N*/ ContentNode* pCurNode = aPaM.GetNode();
+/*N*/ USHORT nPos = GetPos( pCurNode );
+/*N*/ XubString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() );
+/*N*/ aPaM.GetNode()->Erase( aPaM.GetIndex() );
+/*N*/
+/*N*/ // ContenNode-CTOR kopiert auch die Absatzattribute
+/*N*/ ContentNode* pNode = new ContentNode( aStr, aPaM.GetNode()->GetContentAttribs());
+/*N*/ // Den Default-Font kopieren
+/*N*/ pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont();
+/*N*/ SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet();
+/*N*/ if ( pStyle )
+/*N*/ {
+/*N*/ XubString aFollow( pStyle->GetFollow() );
+/*N*/ if ( aFollow.Len() && ( aFollow != pStyle->GetName() ) )
+/*N*/ {
+/*?*/ SfxStyleSheetBase* pNext = pStyle->GetPool().Find( aFollow, pStyle->GetFamily() );
+/*?*/ pNode->SetStyleSheet( (SfxStyleSheet*)pNext );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Zeichenattribute muessen ggf. kopiert bzw gestutzt werden:
+/*N*/ pNode->CopyAndCutAttribs( aPaM.GetNode(), GetItemPool(), bKeepEndingAttribs );
+/*N*/
+/*N*/ Insert( pNode, nPos+1 );
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ aPaM.SetNode( pNode );
+/*N*/ aPaM.SetIndex( 0 );
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem )
+/*N*/ {
+/*N*/ DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertFeature" );
+/*N*/
+/*N*/ aPaM.GetNode()->Insert( CH_FEATURE, aPaM.GetIndex() );
+/*N*/ aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), 1, GetItemPool() );
+/*N*/
+/*N*/ // Fuer das Feature ein Feature-Attribut anlegen...
+/*N*/ EditCharAttrib* pAttrib = MakeCharAttrib( GetItemPool(), rItem, aPaM.GetIndex(), aPaM.GetIndex()+1 );
+/*N*/ DBG_ASSERT( pAttrib, "Warum kann ich kein Feature anlegen ?" );
+/*N*/ aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib );
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ aPaM.GetIndex()++;
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight )
+/*N*/ {
+/*N*/ const EditPaM aPaM( pLeft, pLeft->Len() );
+/*N*/
+/*N*/ // Erst die Attribute, da sonst nLen nicht stimmt!
+/*N*/ pLeft->AppendAttribs( pRight );
+/*N*/ // Dann den Text...
+/*N*/ *pLeft += *pRight;
+/*N*/
+/*N*/ // der rechte verschwindet.
+/*N*/ RemoveItemsFromPool( pRight );
+/*N*/ USHORT nRight = GetPos( pRight );
+/*N*/ Remove( nRight );
+/*N*/ delete pRight;
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM EditDoc::RemoveChars( EditPaM aPaM, USHORT nChars )
+/*N*/ {
+/*N*/ // Evtl. Features entfernen!
+/*N*/ aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars );
+/*N*/ aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() );
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+/*N*/ {
+/*N*/ DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
+/*N*/ DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
+/*N*/
+/*N*/ // fuer Optimierung:
+/*N*/ // dieses endet am Anfang der Selektion => kann erweitert werden
+/*N*/ EditCharAttrib* pEndingAttrib = 0;
+/*N*/ // dieses startet am Ende der Selektion => kann erweitert werden
+/*N*/ EditCharAttrib* pStartingAttrib = 0;
+/*N*/
+/*N*/ DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" );
+/*N*/
+/*N*/ RemoveAttribs( pNode, nStart, nEnd, pStartingAttrib, pEndingAttrib, rPoolItem.Which() );
+/*N*/
+/*N*/ if ( pStartingAttrib && pEndingAttrib &&
+/*N*/ ( *(pStartingAttrib->GetItem()) == rPoolItem ) &&
+/*N*/ ( *(pEndingAttrib->GetItem()) == rPoolItem ) )
+/*N*/ {
+/*?*/ // wird ein groesses Attribut.
+/*?*/ pEndingAttrib->GetEnd() = pStartingAttrib->GetEnd();
+/*?*/ GetItemPool().Remove( *(pStartingAttrib->GetItem()) );
+/*?*/ pNode->GetCharAttribs().GetAttribs().Remove( pNode->GetCharAttribs().GetAttribs().GetPos( pStartingAttrib ) );
+/*?*/ delete pStartingAttrib;
+/*N*/ }
+/*N*/ else if ( pStartingAttrib && ( *(pStartingAttrib->GetItem()) == rPoolItem ) )
+/*?*/ pStartingAttrib->GetStart() = nStart;
+/*N*/ else if ( pEndingAttrib && ( *(pEndingAttrib->GetItem()) == rPoolItem ) )
+/*N*/ pEndingAttrib->GetEnd() = nEnd;
+/*N*/ else
+/*N*/ InsertAttrib( rPoolItem, pNode, nStart, nEnd );
+/*N*/
+/*N*/ if ( pStartingAttrib )
+/*?*/ pNode->GetCharAttribs().ResortAttribs();
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/ }
+
+
+/*N*/ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich )
+/*N*/ {
+/*N*/ DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
+/*N*/ DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
+/*N*/
+/*N*/ // dieses endet am Anfang der Selektion => kann erweitert werden
+/*N*/ rpEnding = 0;
+/*N*/ // dieses startet am Ende der Selektion => kann erweitert werden
+/*N*/ rpStarting = 0;
+/*N*/
+/*N*/ BOOL bChanged = FALSE;
+/*N*/
+/*N*/ DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" );
+/*N*/
+/*N*/ // ueber die Attribute iterieren...
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttr )
+/*N*/ {
+/*N*/ BOOL bRemoveAttrib = FALSE;
+/*N*/ // MT 11.9.97:
+/*N*/ // Ich denke dass in dieser Methode generell keine Features geloescht
+/*N*/ // werden sollen.
+/*N*/ // => Dann koennen die Feature-Abfragen weiter unten entfallen
+/*N*/ USHORT nAttrWhich = pAttr->Which();
+/*N*/ if ( ( nAttrWhich < EE_FEATURE_START ) && ( !nWhich || ( nAttrWhich == nWhich ) ) )
+/*N*/ {
+/*N*/ // Attribut beginnt in Selection
+/*N*/ if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) )
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Attribut endet in Selection
+/*N*/ else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) )
+/*N*/ {
+/*N*/ bChanged = TRUE;
+/*N*/ if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() )
+/*N*/ {
+/*N*/ pAttr->GetEnd() = nStart; // dann hoert es hier auf
+/*N*/ rpEnding = pAttr;
+/*N*/ }
+/*N*/ else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
+/*N*/ {
+/*N*/ // Feature nur loeschen, wenn genau an der Stelle
+/*N*/ bRemoveAttrib = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ // Attribut ueberlappt die Selektion
+/*N*/ else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) )
+/*N*/ {
+/*?*/ 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!
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bRemoveAttrib )
+/*N*/ {
+/*?*/ DBG_ASSERT( ( pAttr != rpStarting ) && ( pAttr != rpEnding ), "Loeschen und behalten des gleichen Attributs ?" );
+/*?*/ DBG_ASSERT( !pAttr->IsFeature(), "RemoveAttribs: Remove a feature?!" );
+/*?*/ pNode->GetCharAttribs().GetAttribs().Remove(nAttr);
+/*?*/ GetItemPool().Remove( *pAttr->GetItem() );
+/*?*/ delete pAttr;
+/*?*/ nAttr--;
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/
+/*N*/ if ( bChanged )
+/*N*/ SetModified( TRUE );
+/*N*/
+/*N*/ return bChanged;
+/*N*/ }
+
+/*N*/ void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ // Diese Methode prueft nicht mehr, ob ein entspr. Attribut
+/*N*/ // schon an der Stelle existiert!
+/*N*/
+/*N*/ EditCharAttrib* pAttrib = MakeCharAttrib( GetItemPool(), rPoolItem, nStart, nEnd );
+/*N*/ DBG_ASSERT( pAttrib, "MakeCharAttrib fehlgeschlagen!" );
+/*N*/ pNode->GetCharAttribs().InsertAttrib( pAttrib );
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/ }
+
+/*N*/ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+/*N*/ {
+/*N*/ if ( nStart != nEnd )
+/*N*/ {
+/*N*/ InsertAttribInSelection( pNode, nStart, nEnd, rPoolItem );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Pruefen, ob schon ein neues Attribut mit der WhichId an der Stelle:
+/*N*/ EditCharAttrib* pAttr = pNode->GetCharAttribs().FindEmptyAttrib( rPoolItem.Which(), nStart );
+/*N*/ if ( pAttr )
+/*N*/ {
+/*?*/ // Attribut entfernen....
+/*?*/ pNode->GetCharAttribs().GetAttribs().Remove(
+/*?*/ pNode->GetCharAttribs().GetAttribs().GetPos( pAttr ) );
+/*N*/ }
+/*N*/
+/*N*/ // pruefen, ob ein 'gleiches' Attribut an der Stelle liegt.
+/*N*/ pAttr = pNode->GetCharAttribs().FindAttrib( rPoolItem.Which(), nStart );
+/*N*/ if ( pAttr )
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ InsertAttrib( rPoolItem, pNode, nStart, nStart );
+/*N*/ }
+/*N*/
+/*N*/ SetModified( TRUE );
+/*N*/ }
+
+/*N*/ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet )
+/*N*/ {
+/*N*/ DBG_ASSERT( pNode, "Wo soll ich suchen ?" );
+/*N*/ DBG_ASSERT( nStartPos <= nEndPos, "Ungueltiger Bereich!" );
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ // keine Selection...
+/*N*/ if ( nStartPos == nEndPos )
+/*N*/ {
+/*N*/ while ( pAttr && ( pAttr->GetStart() <= nEndPos) )
+/*N*/ {
+/*N*/ const SfxPoolItem* pItem = 0;
+/*N*/ // Attribut liegt dadrueber...
+/*N*/ if ( ( pAttr->GetStart() < nStartPos ) && ( pAttr->GetEnd() > nStartPos ) )
+/*?*/ pItem = pAttr->GetItem();
+/*N*/ // Attribut endet hier, ist nicht leer
+/*N*/ else if ( ( pAttr->GetStart() < nStartPos ) && ( pAttr->GetEnd() == nStartPos ) )
+/*N*/ {
+/*?*/ if ( !pNode->GetCharAttribs().FindEmptyAttrib( pAttr->GetItem()->Which(), nStartPos ) )
+/*?*/ pItem = pAttr->GetItem();
+/*N*/ }
+/*N*/ // Attribut endet hier, ist leer
+/*N*/ else if ( ( pAttr->GetStart() == nStartPos ) && ( pAttr->GetEnd() == nStartPos ) )
+/*N*/ {
+/*?*/ pItem = pAttr->GetItem();
+/*N*/ }
+/*N*/ // Attribut beginnt hier
+/*N*/ else if ( ( pAttr->GetStart() == nStartPos ) && ( pAttr->GetEnd() > nStartPos ) )
+/*N*/ {
+/*N*/ if ( nStartPos == 0 ) // Sonderfall
+/*N*/ pItem = pAttr->GetItem();
+/*N*/ }
+/*N*/
+/*N*/ if ( pItem )
+/*N*/ {
+/*N*/ USHORT nWhich = pItem->Which();
+/*N*/ if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+/*N*/ {
+/*N*/ rCurSet.Put( *pItem );
+/*N*/ }
+/*N*/ else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ {
+/*?*/ const SfxPoolItem& rItem = rCurSet.Get( nWhich );
+/*?*/ if ( rItem != *pItem )
+/*?*/ {
+/*?*/ rCurSet.InvalidateItem( nWhich );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/ }
+/*N*/ else // Selektion
+/*N*/ {
+/*N*/ while ( pAttr && ( pAttr->GetStart() < nEndPos) )
+/*N*/ {
+/*N*/ const SfxPoolItem* pItem = 0;
+/*N*/ // Attribut liegt dadrueber...
+/*N*/ if ( ( pAttr->GetStart() <= nStartPos ) && ( pAttr->GetEnd() >= nEndPos ) )
+/*N*/ pItem = pAttr->GetItem();
+/*N*/ // Attribut startet mitten drin...
+/*N*/ else if ( pAttr->GetStart() >= nStartPos )
+/*N*/ {
+/*N*/ // !!! pItem = pAttr->GetItem();
+/*N*/ // einfach nur pItem reicht nicht, da ich z.B. bei Shadow
+/*N*/ // niemals ein ungleiches Item finden wuerde, da ein solche
+/*N*/ // seine Anwesenheit durch Abwesenheit repraesentiert!
+/*N*/ // if ( ... )
+/*N*/ // Es muesste geprueft werden, on genau das gleiche Attribut
+/*N*/ // an der Bruchstelle aufsetzt, was recht aufwendig ist.
+/*N*/ // Da ich beim Einfuegen von Attributen aber etwas optimiere
+/*N*/ // tritt der Fall nicht so schnell auf...
+/*N*/ // Also aus Geschwindigkeitsgruenden:
+/*N*/ rCurSet.InvalidateItem( pAttr->GetItem()->Which() );
+/*N*/
+/*N*/ }
+/*N*/ // Attribut endet mitten drin...
+/*N*/ else if ( pAttr->GetEnd() > nStartPos )
+/*N*/ {
+/*N*/ // pItem = pAttr->GetItem();
+/*N*/ // 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() );
+/*N*/ }
+/*N*/
+/*N*/ if ( pItem )
+/*N*/ {
+/*N*/ USHORT nWhich = pItem->Which();
+/*N*/ if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+/*N*/ {
+/*N*/ rCurSet.Put( *pItem );
+/*N*/ }
+/*N*/ else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ {
+/*?*/ const SfxPoolItem& rItem = rCurSet.Get( nWhich );
+/*?*/ if ( rItem != *pItem )
+/*?*/ {
+/*?*/ rCurSet.InvalidateItem( nWhich );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribList
+// -------------------------------------------------------------------------
+
+/*N*/ CharAttribList::CharAttribList()
+/*N*/ {
+/*N*/ DBG_CTOR( EE_CharAttribList, 0 );
+/*N*/ bHasEmptyAttribs = FALSE;
+/*N*/ }
+
+/*N*/ CharAttribList::~CharAttribList()
+/*N*/ {
+/*N*/ DBG_DTOR( EE_CharAttribList, 0 );
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+/*N*/ while ( pAttr )
+/*N*/ {
+/*N*/ delete pAttr;
+/*N*/ ++nAttr;
+/*N*/ pAttr = GetAttrib( aAttribs, nAttr );
+/*N*/ }
+/*N*/ Clear();
+/*N*/ }
+
+/*N*/ void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib )
+/*N*/ {
+/*N*/ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/ // optimieren: binaere Suche ? !
+/*N*/ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/
+/*N*/ // MT: 26.11.98
+/*N*/ // Vielleicht aber auch einfach nur rueckwaerts iterieren:
+/*N*/ // Der haeufigste und kritischste Fall: Attribute kommen bereits
+/*N*/ // sortiert an (InsertBinTextObject!)
+/*N*/ // Hier waere auch binaere Suche nicht optimal.
+/*N*/ // => Wuerde einiges bringen!
+/*N*/
+/*N*/ const USHORT nCount = Count();
+/*N*/ const USHORT nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt.
+/*N*/
+/*N*/ if ( pAttrib->IsEmpty() )
+/*N*/ bHasEmptyAttribs = TRUE;
+/*N*/
+/*N*/ BOOL bInserted = FALSE;
+/*N*/ for ( USHORT x = 0; x < nCount; x++ )
+/*N*/ {
+/*N*/ EditCharAttribPtr pCurAttrib = aAttribs[x];
+/*N*/ if ( pCurAttrib->GetStart() > nStart )
+/*N*/ {
+/*N*/ aAttribs.Insert( pAttrib, x );
+/*N*/ bInserted = TRUE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ if ( !bInserted )
+/*N*/ aAttribs.Insert( pAttrib, nCount );
+/*N*/ }
+
+/*N*/ void CharAttribList::ResortAttribs()
+/*N*/ {
+/*N*/ if ( Count() )
+/*N*/ {
+/*N*/ qsort( (void*)aAttribs.GetData(), aAttribs.Count(), sizeof( EditCharAttrib* ), CompareStart );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool )
+/*N*/ {
+/*N*/ for ( USHORT n = 0; n < aAttribs.Count(); n++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = aAttribs.GetObject( n );
+/*N*/ for ( USHORT nNext = n+1; nNext < aAttribs.Count(); nNext++ )
+/*N*/ {
+/*N*/ EditCharAttrib* p = aAttribs.GetObject( nNext );
+/*N*/ if ( !pAttr->IsFeature() && ( p->GetStart() == pAttr->GetEnd() ) && ( p->Which() == pAttr->Which() ) )
+/*N*/ {
+/*N*/ if ( *p->GetItem() == *pAttr->GetItem() )
+/*N*/ {
+/*N*/ pAttr->GetEnd() = p->GetEnd();
+/*N*/ aAttribs.Remove( nNext );
+/*N*/ rItemPool.Remove( *p->GetItem() );
+/*N*/ delete p;
+/*N*/ }
+/*N*/ break; // only 1 attr with same which can start here.
+/*N*/ }
+/*N*/ else if ( p->GetStart() > pAttr->GetEnd() )
+/*N*/ {
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
+/*N*/ {
+/*N*/ // Rueckwaerts, falls eins dort endet, das naechste startet.
+/*N*/ // => Das startende gilt...
+/*N*/ USHORT nAttr = aAttribs.Count()-1;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+/*N*/ while ( pAttr )
+/*N*/ {
+/*N*/ if ( ( pAttr->Which() == nWhich ) && pAttr->IsIn(nPos) )
+/*N*/ return pAttr;
+/*N*/ pAttr = GetAttrib( aAttribs, --nAttr );
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( nWhich, "FindNextAttrib: Which?" );
+/*N*/ const USHORT nAttribs = aAttribs.Count();
+/*N*/ for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = aAttribs[ nAttr ];
+/*N*/ if ( ( pAttr->GetStart() >= nFromPos ) && ( pAttr->Which() == nWhich ) )
+/*N*/ return pAttr;
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+
+
+
+/*N*/ BOOL CharAttribList::HasBoundingAttrib( USHORT nBound )
+/*N*/ {
+/*N*/ // Rueckwaerts, falls eins dort endet, das naechste startet.
+/*N*/ // => Das startende gilt...
+/*N*/ USHORT nAttr = aAttribs.Count()-1;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+/*N*/ while ( pAttr && ( pAttr->GetEnd() >= nBound ) )
+/*N*/ {
+/*?*/ if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) )
+/*?*/ return TRUE;
+/*?*/ pAttr = GetAttrib( aAttribs, --nAttr );
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos )
+/*N*/ {
+/*N*/ if ( !bHasEmptyAttribs )
+/*N*/ return 0;
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+/*N*/ while ( pAttr && ( pAttr->GetStart() <= nPos ) )
+/*N*/ {
+/*N*/ if ( ( pAttr->GetStart() == nPos ) && ( pAttr->GetEnd() == nPos ) && ( pAttr->Which() == nWhich ) )
+/*N*/ return pAttr;
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( aAttribs, nAttr );
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const
+/*N*/ {
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttrib* pNextAttrib = GetAttrib( aAttribs, nAttr );
+/*N*/
+/*N*/ // erstmal zur gewuenschten Position...
+/*N*/ while ( pNextAttrib && ( pNextAttrib->GetStart() < nPos ) )
+/*N*/ {
+/*N*/ nAttr++;
+/*N*/ pNextAttrib = GetAttrib( aAttribs, nAttr );
+/*N*/ }
+/*N*/
+/*N*/ // jetzt das Feature suchen...
+/*N*/ while ( pNextAttrib && !pNextAttrib->IsFeature() )
+/*N*/ {
+/*N*/ nAttr++;
+/*N*/ pNextAttrib = GetAttrib( aAttribs, nAttr );
+/*N*/ }
+/*N*/
+/*N*/ return pNextAttrib;
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts )
+/*N*/ : SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ aItemInfos, 0, bPersistenRefCounts )
+/*N*/ {
+/*N*/ SetVersionMap( 1, 3999, 4015, aV1Map );
+/*N*/ SetVersionMap( 2, 3999, 4019, aV2Map );
+/*N*/ SetVersionMap( 3, 3997, 4020, aV3Map );
+/*N*/ SetVersionMap( 4, 3994, 4022, aV4Map );
+/*N*/
+/*N*/ DBG_ASSERT( EE_DLL(), "EditDLL?!" );
+/*N*/ SfxPoolItem** ppDefItems = EE_DLL()->GetGlobalData()->GetDefItems();
+/*N*/ SetDefaults( ppDefItems );
+/*N*/ }
+
+/*N*/ EditEngineItemPool::~EditEngineItemPool()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvStream& EditEngineItemPool::Store( SvStream& rStream ) const
+/*N*/ {
+/*N*/ // Bei einem 3.1-Export muess ein Hack eingebaut werden, da BUG im
+/*N*/ // SfxItemSet::Load, aber nicht nachtraeglich in 3.1 fixbar.
+/*N*/
+/*N*/ // Der eingestellte Range muss nach Store erhalten bleiben, weil dann
+/*N*/ // erst die ItemSets gespeichert werden...
+/*N*/
+/*N*/ long nVersion = rStream.GetVersion();
+/*N*/ BOOL b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) )
+/*N*/ ? TRUE : FALSE;
+/*N*/
+/*N*/ EditEngineItemPool* pThis = (EditEngineItemPool*)this;
+/*N*/ if ( b31Format )
+/*N*/ pThis->SetStoringRange( 3997, 4022 );
+/*N*/ else
+/*N*/ pThis->SetStoringRange( EE_ITEMS_START, EE_ITEMS_END );
+/*N*/
+/*N*/ return SfxItemPool::Store( rStream );
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editdoc2.cxx b/binfilter/bf_svx/source/editeng/svx_editdoc2.cxx
new file mode 100644
index 000000000000..ed31fed1d5e1
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editdoc2.cxx
@@ -0,0 +1,345 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+
+#include <vcl/outdev.hxx>
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+
+
+#include "kernitem.hxx"
+
+namespace binfilter {
+
+/*N*/ DBG_NAME( EE_ParaPortion )
+
+/*N*/ SV_IMPL_VARARR( CharPosArray, sal_Int32 );
+
+/*
+
+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
+// -------------------------------------------------------------------------
+/*N*/ TextPortionList::TextPortionList()
+/*N*/ {
+/*N*/ }
+
+/*N*/ TextPortionList::~TextPortionList()
+/*N*/ {
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ void TextPortionList::Reset()
+/*N*/ {
+/*N*/ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+/*N*/ delete GetObject( nPortion );
+/*N*/ Remove( 0, Count() );
+/*N*/ }
+
+/*N*/ void TextPortionList::DeleteFromPortion( USHORT nDelFrom )
+/*N*/ {
+/*N*/ DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" );
+/*N*/ for ( USHORT nP = nDelFrom; nP < Count(); nP++ )
+/*N*/ delete GetObject( nP );
+/*N*/ Remove( nDelFrom, Count()-nDelFrom );
+/*N*/ }
+
+/*N*/ USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion )
+/*N*/ {
+/*N*/ // Bei nCharPos an Portion-Grenze wird die linke Portion gefunden
+/*N*/ USHORT nTmpPos = 0;
+/*N*/ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+/*N*/ {
+/*N*/ TextPortion* pPortion = GetObject( nPortion );
+/*N*/ nTmpPos += pPortion->GetLen();
+/*N*/ if ( nTmpPos >= nCharPos )
+/*N*/ {
+/*N*/ // take this one if we don't prefer the starting portion, or if it's the last one
+/*N*/ if ( ( nTmpPos != nCharPos ) || !bPreferStartingPortion || ( nPortion == Count() - 1 ) )
+/*N*/ {
+/*N*/ nPortionStart = nTmpPos - pPortion->GetLen();
+/*N*/ return nPortion;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*?*/ DBG_ERROR( "FindPortion: Nicht gefunden!" );
+/*?*/ return ( Count() - 1 );
+/*N*/ }
+
+/*N*/ ExtraPortionInfo::~ExtraPortionInfo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+// -------------------------------------------------------------------------
+// class ParaPortion
+// -------------------------------------------------------------------------
+/*N*/ ParaPortion::ParaPortion( ContentNode* pN )
+/*N*/ {
+/*N*/ DBG_CTOR( EE_ParaPortion, 0 );
+/*N*/
+/*N*/ pNode = pN;
+/*N*/ bInvalid = TRUE;
+/*N*/ bVisible = TRUE;
+/*N*/ bSimple = FALSE;
+/*N*/ bForceRepaint = FALSE;
+/*N*/ nInvalidPosStart = 0;
+/*N*/ nInvalidDiff = 0;
+/*N*/ nHeight = 0;
+/*N*/ nFirstLineOffset = 0;
+/*N*/ nBulletX = 0;
+/*N*/ }
+
+/*N*/ ParaPortion::~ParaPortion()
+/*N*/ {
+/*N*/ DBG_DTOR( EE_ParaPortion, 0 );
+/*N*/ }
+
+/*N*/ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
+/*N*/ {
+/*N*/ if ( bInvalid == FALSE )
+/*N*/ {
+/*N*/ // nInvalidPosEnd = nStart; // ??? => CreateLines
+/*N*/ nInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff );
+/*N*/ nInvalidDiff = nDiff;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Einfaches hintereinander tippen
+/*N*/ if ( ( nDiff > 0 ) && ( nInvalidDiff > 0 ) &&
+/*N*/ ( ( nInvalidPosStart+nInvalidDiff ) == nStart ) )
+/*N*/ {
+/*N*/ nInvalidDiff += nDiff;
+/*N*/ }
+/*N*/ // Einfaches hintereinander loeschen
+/*N*/ else if ( ( nDiff < 0 ) && ( nInvalidDiff < 0 ) && ( nInvalidPosStart == nStart ) )
+/*N*/ {
+/*?*/ nInvalidPosStart += nDiff;
+/*?*/ nInvalidDiff += nDiff;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // nInvalidPosEnd = pNode->Len();
+/*N*/ DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
+/*N*/ nInvalidPosStart = Min( nInvalidPosStart, (USHORT) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
+/*N*/ nInvalidDiff = 0;
+/*N*/ bSimple = FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ bInvalid = TRUE;
+/*N*/ aScriptInfos.Remove( 0, aScriptInfos.Count() );
+/*N*/ aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
+/*N*/ // aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+/*N*/ }
+
+/*N*/ void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ if ( bInvalid == FALSE )
+/*N*/ {
+/*N*/ nInvalidPosStart = nStart;
+/*N*/ // nInvalidPosEnd = nEnd;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nInvalidPosStart = Min( nInvalidPosStart, nStart );
+/*N*/ // nInvalidPosEnd = pNode->Len();
+/*N*/ }
+/*N*/ nInvalidDiff = 0;
+/*N*/ bInvalid = TRUE;
+/*N*/ bSimple = FALSE;
+/*N*/ aScriptInfos.Remove( 0, aScriptInfos.Count() );
+/*N*/ aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
+/*N*/ // aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+/*N*/ }
+
+/*N*/ USHORT ParaPortion::GetLineNumber( USHORT nIndex )
+/*N*/ {
+/*N*/ DBG_ASSERTWARNING( aLineList.Count(), "Leere ParaPortion in GetLine!" );
+/*N*/ DBG_ASSERT( bVisible, "Wozu GetLine() bei einem unsichtbaren Absatz?" );
+/*N*/
+/*N*/ for ( USHORT nLine = 0; nLine < aLineList.Count(); nLine++ )
+/*N*/ {
+/*N*/ if ( aLineList[nLine]->IsIn( nIndex ) )
+/*N*/ return nLine;
+/*N*/ }
+/*N*/
+/*?*/ // Dann sollte es am Ende der letzten Zeile sein!
+/*?*/ DBG_ASSERT( nIndex == aLineList[ aLineList.Count() - 1 ]->GetEnd(), "Index voll daneben!" );
+/*?*/ return (aLineList.Count()-1);
+/*N*/ }
+
+
+/*N*/ void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine )
+/*N*/ {
+/*N*/ USHORT nLines = aLineList.Count();
+/*N*/ DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" );
+/*N*/ if ( nLastFormattedLine < ( nLines - 1 ) )
+/*N*/ {
+/*?*/ 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();
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ DBG_ASSERT( aLineList[ aLineList.Count()-1 ]->GetEnd() == pNode->Len(), "CorrectLines: Ende stimmt nicht!" );
+/*N*/ }
+
+ // -------------------------------------------------------------------------
+// class ParaPortionList
+// -------------------------------------------------------------------------
+/*N*/ ParaPortionList::ParaPortionList()
+/*N*/ {
+/*N*/ }
+
+/*N*/ ParaPortionList::~ParaPortionList()
+/*N*/ {
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ void ParaPortionList::Reset()
+/*N*/ {
+/*N*/ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+/*N*/ delete GetObject( nPortion );
+/*N*/ Remove( 0, Count() );
+/*N*/ }
+
+/*N*/ long ParaPortionList::GetYOffset( ParaPortion* pPPortion )
+/*N*/ {
+/*N*/ long nHeight = 0;
+/*N*/ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+/*N*/ {
+/*N*/ ParaPortion* pTmpPortion = GetObject(nPortion);
+/*N*/ if ( pTmpPortion == pPPortion )
+/*N*/ return nHeight;
+/*?*/ nHeight += pTmpPortion->GetHeight();
+/*?*/ }
+/*?*/ DBG_ERROR( "GetYOffset: Portion nicht gefunden" );
+/*?*/ return nHeight;
+/*N*/ }
+
+/*N*/ USHORT ParaPortionList::FindParagraph( long nYOffset )
+/*N*/ {
+/*N*/ long nY = 0;
+/*N*/ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+/*N*/ {
+/*N*/ nY += GetObject(nPortion)->GetHeight(); // sollte auch bei !bVisible richtig sein!
+/*N*/ if ( nY > nYOffset )
+/*N*/ return nPortion;
+/*N*/ }
+/*N*/ return 0xFFFF; // solte mal ueber EE_PARA_NOT_FOUND erreicht werden!
+/*N*/ }
+
+
+
+
+
+/*N*/ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit )
+/*N*/ {
+/*N*/ DBG_ASSERT( eSourceUnit != eDestUnit, "ConvertItem - Why?!" );
+/*N*/
+/*N*/ switch ( rPoolItem.Which() )
+/*N*/ {
+/*N*/ case EE_PARA_LRSPACE:
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_PARA_ULSPACE:
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_PARA_SBL:
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_PARA_TABS:
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_CHAR_FONTHEIGHT:
+/*N*/ case EE_CHAR_FONTHEIGHT_CJK:
+/*N*/ case EE_CHAR_FONTHEIGHT_CTL:
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editeng.cxx b/binfilter/bf_svx/source/editeng/svx_editeng.cxx
new file mode 100644
index 000000000000..451a23616f9a
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editeng.cxx
@@ -0,0 +1,1357 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+// #define _SOLAR__PRIVATE 1
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define USE_SVXFONT
+
+#define _SVSTDARR_USHORTS
+#include <bf_svtools/svstdarr.hxx>
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <eerdll2.hxx>
+#include <eerdll.hxx>
+#include <editeng.hrc>
+
+
+
+#include "itemdata.hxx"
+
+
+
+#include <flditem.hxx>
+
+#include "lrspitem.hxx"
+
+
+#include <numitem.hxx>
+#include <bulitem.hxx>
+
+
+
+
+
+#if OSL_DEBUG_LEVEL > 1
+#endif
+namespace binfilter {
+
+// 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::linguistic2;
+
+
+
+/*N*/ DBG_NAME( EditEngine )
+/*N*/ DBG_NAMEEX( EditView )//STRIP008 ;
+
+#if (OSL_DEBUG_LEVEL > 1) || defined ( DBG_UTIL )
+/*N*/ static sal_Bool bDebugPaint = sal_False;
+#endif
+
+SV_IMPL_VARARR( EECharAttribArray, EECharAttrib );
+
+
+ // ----------------------------------------------------------------------
+// EditEngine
+// ----------------------------------------------------------------------
+/*N*/ EditEngine::EditEngine( SfxItemPool* pItemPool )
+/*N*/ {
+/*N*/ DBG_CTOR( EditEngine, 0 );
+/*N*/ pImpEditEngine = new ImpEditEngine( this, pItemPool );
+/*N*/ }
+
+/*N*/ EditEngine::~EditEngine()
+/*N*/ {
+/*N*/ DBG_DTOR( EditEngine, 0 );
+/*N*/ delete pImpEditEngine;
+/*N*/ }
+
+/*N*/ void EditEngine::EnableUndo( sal_Bool bEnable )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->EnableUndo( bEnable );
+/*N*/ }
+
+/*N*/ sal_Bool EditEngine::IsUndoEnabled()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->IsUndoEnabled();
+/*N*/ }
+
+/*N*/ sal_Bool EditEngine::IsInUndo()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->IsInUndo();
+/*N*/ }
+
+#ifndef SVX_LIGHT
+/*N*/ SfxUndoManager& EditEngine::GetUndoManager()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetUndoManager();
+/*N*/ }
+#endif
+
+/*N*/ void EditEngine::UndoActionStart( sal_uInt16 nId )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ DBG_ASSERT( !pImpEditEngine->IsInUndo(), "Aufruf von UndoActionStart im Undomodus!" );
+/*N*/ if ( !pImpEditEngine->IsInUndo() )
+/*N*/ pImpEditEngine->UndoActionStart( nId );
+/*N*/ }
+
+/*N*/ void EditEngine::UndoActionEnd( sal_uInt16 nId )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ DBG_ASSERT( !pImpEditEngine->IsInUndo(), "Aufruf von UndoActionEnd im Undomodus!" );
+/*N*/ if ( !pImpEditEngine->IsInUndo() )
+/*N*/ pImpEditEngine->UndoActionEnd( nId );
+/*N*/ }
+
+/*N*/ void EditEngine::SetRefDevice( OutputDevice* pRefDev )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetRefDevice( pRefDev );
+/*N*/ }
+
+/*N*/ OutputDevice* EditEngine::GetRefDevice() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetRefDevice();
+/*N*/ }
+
+/*N*/ void EditEngine::SetRefMapMode( const MapMode& rMapMode )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetRefMapMode( rMapMode );
+/*N*/ }
+
+/*N*/ MapMode EditEngine::GetRefMapMode()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetRefMapMode();
+/*N*/ }
+
+/*N*/ void EditEngine::SetBackgroundColor( const Color& rColor )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetBackgroundColor( rColor );
+/*N*/ }
+
+
+/*N*/ Color EditEngine::GetAutoColor() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetAutoColor();
+/*N*/ }
+
+/*N*/ void EditEngine::EnableAutoColor( BOOL b )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->EnableAutoColor( b );
+/*N*/ }
+
+
+
+/*N*/ BOOL EditEngine::IsForceAutoColor() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->IsForceAutoColor();
+/*N*/ }
+
+/*N*/ const SfxItemSet& EditEngine::GetEmptyItemSet()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetEmptyItemSet();
+/*N*/ }
+
+
+/*N*/ EditView* EditEngine::RemoveView( EditView* pView )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ DBG_CHKOBJ( pView, EditView, 0 );
+/*N*/
+/*N*/ pView->HideCursor();
+/*N*/ EditView* pRemoved = 0;
+/*N*/ sal_uInt16 nPos = pImpEditEngine->GetEditViews().GetPos( pView );
+/*N*/ DBG_ASSERT( nPos != USHRT_MAX, "RemoveView mit ungueltigem Index" );
+/*N*/ if ( nPos != USHRT_MAX )
+/*N*/ {
+/*N*/ pRemoved = pImpEditEngine->GetEditViews().GetObject( nPos );
+/*N*/ pImpEditEngine->GetEditViews().Remove( nPos );
+/*N*/ if ( pImpEditEngine->GetActiveView() == pView )
+/*N*/ {
+/*N*/ pImpEditEngine->SetActiveView( 0 );
+/*N*/ pImpEditEngine->GetSelEngine().SetCurView( 0 );
+/*N*/ }
+/*N*/ }
+/*N*/ return pRemoved;
+/*N*/ }
+
+
+
+
+/*N*/ sal_Bool EditEngine::HasView( EditView* pView ) const
+/*N*/ {
+/*N*/ return pImpEditEngine->GetEditViews().GetPos( pView ) != USHRT_MAX;
+/*N*/ }
+
+
+
+/*N*/ void EditEngine::SetDefTab( sal_uInt16 nDefTab )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->GetEditDoc().SetDefTab( nDefTab );
+/*N*/ if ( pImpEditEngine->IsFormatted() )
+/*N*/ {
+/*N*/ pImpEditEngine->FormatFullDoc();
+/*N*/ pImpEditEngine->UpdateViews( (EditView*) 0 );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void EditEngine::SetPaperSize( const Size& rNewSize )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ Size aOldSize( pImpEditEngine->GetPaperSize() );
+/*N*/ pImpEditEngine->SetValidPaperSize( rNewSize );
+/*N*/ Size aNewSize( pImpEditEngine->GetPaperSize() );
+/*N*/
+/*N*/ sal_Bool bAutoPageSize = pImpEditEngine->GetStatus().AutoPageSize();
+/*N*/ if ( bAutoPageSize || ( aNewSize.Width() != aOldSize.Width() ) )
+/*N*/ {
+/*N*/ for ( sal_uInt16 nView = 0; nView < pImpEditEngine->aEditViews.Count(); nView++ )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditView* pView = pImpEditEngine->aEditViews[nView];
+/*N*/ }
+/*N*/
+/*N*/ if ( bAutoPageSize || pImpEditEngine->IsFormatted() )
+/*N*/ {
+/*N*/ // Aendern der Breite hat bei AutoPageSize keine Wirkung, da durch
+/*N*/ // Textbreite bestimmt.
+/*N*/ // Optimierung erst nach Vobis-Auslieferung aktivieren...
+/*N*/ // if ( !bAutoPageSize )
+/*N*/ pImpEditEngine->FormatFullDoc();
+/*N*/ // else
+/*N*/ // {
+/*N*/ // pImpEditEngine->FormatDoc(); // PageSize, falls Aenderung
+/*N*/ // pImpEditEngine->CheckAutoPageSize(); // Falls nichts formatiert wurde
+/*N*/ // }
+/*N*/
+/*N*/ pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
+/*N*/
+/*N*/ if ( pImpEditEngine->GetUpdateMode() && pImpEditEngine->GetActiveView() )
+/*?*/ pImpEditEngine->pActiveView->ShowCursor( sal_False, sal_False );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ const Size& EditEngine::GetPaperSize() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetPaperSize();
+/*N*/ }
+
+/*N*/ void EditEngine::SetVertical( BOOL bVertical )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetVertical( bVertical );
+/*N*/ }
+
+/*N*/ BOOL EditEngine::IsVertical() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->IsVertical();
+/*N*/ }
+
+
+
+/*N*/ USHORT EditEngine::GetScriptType( const ESelection& rSelection ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ EditSelection aSel( pImpEditEngine->CreateSel( rSelection ) );
+/*N*/ return pImpEditEngine->GetScriptType( aSel );
+/*N*/ }
+
+/*N*/ LanguageType EditEngine::GetLanguage( USHORT nPara, USHORT nPos ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "GetLanguage - nPara is invalid!" );
+/*N*/ return pNode ? pImpEditEngine->GetLanguage( EditPaM( pNode, nPos ) ) : LANGUAGE_DONTKNOW;
+/*N*/ }
+
+
+
+/*N*/ void EditEngine::SetAsianCompressionMode( USHORT n )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ pImpEditEngine->SetAsianCompressionMode( n );
+/*N*/ }
+
+
+/*N*/ void EditEngine::SetKernAsianPunctuation( BOOL b )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ pImpEditEngine->SetKernAsianPunctuation( b );
+/*N*/ }
+
+
+
+
+/*N*/ void EditEngine::ClearPolygon()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetTextRanger( 0 );
+/*N*/ }
+
+
+
+/*N*/ void EditEngine::SetMinAutoPaperSize( const Size& rSz )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetMinAutoPaperSize( rSz );
+/*N*/ }
+
+
+/*N*/ void EditEngine::SetMaxAutoPaperSize( const Size& rSz )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetMaxAutoPaperSize( rSz );
+/*N*/ }
+
+/*N*/ XubString EditEngine::GetText( LineEnd eEnd ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetEditDoc().GetText( eEnd );
+/*N*/ }
+
+/*N*/ XubString EditEngine::GetText( const ESelection& rESelection, const LineEnd eEnd ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
+/*N*/ return pImpEditEngine->GetSelected( aSel, eEnd );
+/*N*/ }
+
+/*N*/ sal_uInt16 EditEngine::GetParagraphCount() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->aEditDoc.Count();
+/*N*/ }
+
+/*N*/ sal_uInt16 EditEngine::GetLineCount( sal_uInt16 nParagraph ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetLineCount( nParagraph );
+/*N*/ }
+
+/*N*/ sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return 0; //STRIP001
+/*N*/ }
+
+/*?*/ sal_uInt32 EditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine )
+/*?*/ {{DBG_BF_ASSERT(0, "STRIP");} return 0;//STRIP001
+/*?*/ }
+
+/*N*/ sal_uInt16 EditEngine::GetFirstLineOffset( sal_uInt16 nParagraph )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*?*/ pImpEditEngine->FormatDoc();
+/*N*/ ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nParagraph );
+/*N*/ return ( pPortion ? pPortion->GetFirstLineOffset() : 0 );
+/*N*/ }
+
+/*N*/ sal_uInt32 EditEngine::GetTextHeight( sal_uInt16 nParagraph ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return 0; //STRIP001
+/*N*/ }
+
+
+/*N*/ ESelection EditEngine::GetWord( const ESelection& rSelection, USHORT nWordType ) const
+/*N*/ {
+/*N*/ // ImpEditEngine-Iteration-Methods should be const!
+/*N*/ EditEngine* pE = (EditEngine*)this;
+/*N*/
+/*N*/ EditSelection aSel( pE->pImpEditEngine->CreateSel( rSelection ) );
+/*N*/ aSel = pE->pImpEditEngine->SelectWord( aSel, nWordType );
+/*N*/ return pE->pImpEditEngine->CreateESel( aSel );
+/*N*/ }
+
+/*N*/ sal_uInt32 EditEngine::GetTextHeight() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*?*/ pImpEditEngine->FormatDoc();
+/*N*/
+/*N*/ sal_uInt32 nHeight = !IsVertical() ? pImpEditEngine->GetTextHeight() : pImpEditEngine->CalcTextWidth( TRUE );
+/*N*/ return nHeight;
+/*N*/ }
+
+/*N*/ sal_uInt32 EditEngine::CalcTextWidth()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*?*/ pImpEditEngine->FormatDoc();
+/*N*/
+/*N*/ sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( TRUE ) : pImpEditEngine->GetTextHeight();
+/*N*/ return nWidth;
+/*N*/ }
+
+/*N*/ void EditEngine::SetUpdateMode( sal_Bool bUpdate )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetUpdateMode( bUpdate );
+/*N*/ if ( pImpEditEngine->pActiveView )
+/*?*/ pImpEditEngine->pActiveView->ShowCursor( sal_False, sal_False );
+/*N*/ }
+
+/*N*/ sal_Bool EditEngine::GetUpdateMode() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetUpdateMode();
+/*N*/ }
+
+/*N*/ void EditEngine::Clear()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->Clear();
+/*N*/ }
+
+/*N*/ void EditEngine::SetText( const XubString& rText )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetText( rText );
+/*N*/ if ( rText.Len() )
+/*N*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ }
+
+/*N*/ EditTextObject* EditEngine::CreateTextObject()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->CreateTextObject();
+/*N*/ }
+
+
+/*N*/ void EditEngine::SetText( const EditTextObject& rTextObject )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->EnterBlockNotifications();
+/*N*/ pImpEditEngine->SetText( rTextObject );
+/*N*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ pImpEditEngine->LeaveBlockNotifications();
+/*N*/ }
+
+
+
+/*N*/ void EditEngine::SetNotifyHdl( const Link& rLink )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetNotifyHdl( rLink );
+/*N*/ }
+
+/*N*/ Link EditEngine::GetNotifyHdl() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetNotifyHdl();
+/*N*/ }
+
+/*N*/ void EditEngine::SetBeginMovingParagraphsHdl( const Link& rLink )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->aBeginMovingParagraphsHdl = rLink;
+/*N*/ }
+
+/*N*/ void EditEngine::SetEndMovingParagraphsHdl( const Link& rLink )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->aEndMovingParagraphsHdl = rLink;
+/*N*/ }
+
+/*N*/ void EditEngine::SetBeginPasteOrDropHdl( const Link& rLink )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->aBeginPasteOrDropHdl = rLink;
+/*N*/ }
+
+/*N*/ void EditEngine::SetEndPasteOrDropHdl( const Link& rLink )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->aEndPasteOrDropHdl = rLink;
+/*N*/ }
+
+/*N*/ EditTextObject* EditEngine::CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ DBG_ASSERT( nPara < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Startpara out of Range" );
+/*N*/ DBG_ASSERT( nPara+nParas-1 < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Endpara out of Range" );
+/*N*/
+/*N*/ ContentNode* pStartNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+/*N*/ ContentNode* pEndNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara+nParas-1 );
+/*N*/ DBG_ASSERT( pStartNode, "Start-Absatz existiert nicht: CreateTextObject" );
+/*N*/ DBG_ASSERT( pEndNode, "End-Absatz existiert nicht: CreateTextObject" );
+/*N*/
+/*N*/ if ( pStartNode && pEndNode )
+/*N*/ {
+/*N*/ EditSelection aTmpSel;
+/*N*/ aTmpSel.Min() = EditPaM( pStartNode, 0 );
+/*N*/ aTmpSel.Max() = EditPaM( pEndNode, pEndNode->Len() );
+/*N*/ return pImpEditEngine->CreateTextObject( aTmpSel );
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+
+/*N*/ sal_uInt16 EditEngine::GetTextLen( sal_uInt16 nPara ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "Absatz nicht gefunden: GetTextLen" );
+/*N*/ if ( pNode )
+/*N*/ return pNode->Len();
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ XubString EditEngine::GetText( sal_uInt16 nPara ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ XubString aStr;
+/*N*/ if ( nPara < pImpEditEngine->GetEditDoc().Count() )
+/*N*/ aStr = pImpEditEngine->GetEditDoc().GetParaAsString( nPara );
+/*N*/ return aStr;
+/*N*/ }
+
+/*N*/ sal_Bool EditEngine::IsModified() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->IsModified();
+/*N*/ }
+
+
+
+
+/*N*/ void EditEngine::InsertParagraph( sal_uInt16 nPara, const XubString& rTxt )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ if ( nPara > GetParagraphCount() )
+/*N*/ {
+/*?*/ DBG_ASSERTWARNING( nPara == USHRT_MAX, "AbsatzNr zu Gro? aber nicht LIST_APPEND! " );
+/*?*/ nPara = GetParagraphCount();
+/*N*/ }
+/*N*/
+/*N*/ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+/*N*/ EditPaM aPaM( pImpEditEngine->InsertParagraph( nPara ) );
+/*N*/ // Bei einem InsertParagraph von aussen sollen keine Harten
+/*N*/ // Attribute uebernommen werden !
+/*N*/ pImpEditEngine->RemoveCharAttribs( nPara );
+/*N*/ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+/*N*/ pImpEditEngine->ImpInsertText( EditSelection( aPaM, aPaM ), rTxt );
+/*N*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ }
+
+
+/*N*/ void EditEngine::SetText( sal_uInt16 nPara, const XubString& rTxt )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ EditSelection* pSel = pImpEditEngine->SelectParagraph( nPara );
+/*N*/ if ( pSel )
+/*N*/ {
+/*N*/ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+/*N*/ pImpEditEngine->ImpInsertText( *pSel, rTxt );
+/*N*/ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+/*N*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ delete pSel;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void EditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ // Keine Undoklammerung noetig.
+/*N*/ pImpEditEngine->SetParaAttribs( nPara, rSet );
+/*N*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ }
+
+/*N*/ const SfxItemSet& EditEngine::GetParaAttribs( sal_uInt16 nPara ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetParaAttribs( nPara );
+/*N*/ }
+
+/*N*/ sal_Bool EditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->HasParaAttrib( nPara, nWhich );
+/*N*/ }
+
+/*N*/ const SfxPoolItem& EditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetParaAttrib( nPara, nWhich );
+/*N*/ }
+
+/*N*/ void EditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ SfxItemSet EditEngine::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ EditSelection aSel( pImpEditEngine->
+/*N*/ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+/*N*/ return pImpEditEngine->GetAttribs( aSel, bOnlyHardAttrib );
+/*N*/ }
+
+/*N*/ SfxItemSet EditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetAttribs( nPara, nStart, nEnd, nFlags );
+/*N*/ }
+
+
+// MT: Can be removed after 6.x?
+
+
+/*N*/ void EditEngine::StripPortions()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ VirtualDevice aTmpDev;
+/*N*/ Rectangle aBigRec( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) );
+/*N*/ if ( IsVertical() )
+/*N*/ {
+/*?*/ aBigRec.Right() = 0;
+/*?*/ aBigRec.Left() = -0x7FFFFFFF;
+/*N*/ }
+/*N*/ pImpEditEngine->Paint( &aTmpDev, aBigRec, Point(), sal_True );
+/*N*/ }
+
+/*N*/ void EditEngine::GetPortions( sal_uInt16 nPara, SvUShorts& rList )
+/*N*/ {
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*N*/ pImpEditEngine->FormatFullDoc();
+/*N*/
+/*N*/ ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
+/*N*/ if ( pParaPortion )
+/*N*/ {
+/*N*/ sal_uInt16 nEnd = 0;
+/*N*/ sal_uInt16 nTextPortions = pParaPortion->GetTextPortions().Count();
+/*N*/ for ( sal_uInt16 n = 0; n < nTextPortions; n++ )
+/*N*/ {
+/*N*/ nEnd += pParaPortion->GetTextPortions()[n]->GetLen();
+/*N*/ rList.Insert( nEnd, rList.Count() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ sal_Bool EditEngine::IsFlatMode() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return !( pImpEditEngine->aStatus.UseCharAttribs() );
+/*N*/ }
+
+/*N*/ void EditEngine::SetControlWord( sal_uInt32 nWord )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( nWord != pImpEditEngine->aStatus.GetControlWord() )
+/*N*/ {
+/*N*/ sal_uInt32 nPrev = pImpEditEngine->aStatus.GetControlWord();
+/*N*/ pImpEditEngine->aStatus.GetControlWord() = nWord;
+/*N*/
+/*N*/ sal_uInt32 nChanges = nPrev ^ nWord;
+/*N*/ if ( pImpEditEngine->IsFormatted() )
+/*N*/ {
+/*N*/ // ggf. neu formatieren:
+/*N*/ if ( ( nChanges & EE_CNTRL_USECHARATTRIBS ) ||
+/*N*/ ( nChanges & EE_CNTRL_USEPARAATTRIBS ) ||
+/*N*/ ( nChanges & EE_CNTRL_ONECHARPERLINE ) ||
+/*N*/ ( nChanges & EE_CNTRL_STRETCHING ) ||
+/*N*/ ( nChanges & EE_CNTRL_OUTLINER ) ||
+/*N*/ ( nChanges & EE_CNTRL_NOCOLORS ) ||
+/*N*/ ( nChanges & EE_CNTRL_OUTLINER2 ) )
+/*N*/ {
+/*N*/ if ( ( nChanges & EE_CNTRL_USECHARATTRIBS ) ||
+/*N*/ ( nChanges & EE_CNTRL_USEPARAATTRIBS ) )
+/*N*/ {
+/*?*/ sal_Bool bUseCharAttribs = ( nWord & EE_CNTRL_USECHARATTRIBS ) ? sal_True : sal_False;
+/*?*/ pImpEditEngine->GetEditDoc().CreateDefFont( bUseCharAttribs );
+/*N*/ }
+/*N*/
+/*N*/ pImpEditEngine->FormatFullDoc();
+/*N*/ pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ sal_uInt32 EditEngine::GetControlWord() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->aStatus.GetControlWord();
+/*N*/ }
+
+
+/*N*/ Point EditEngine::GetDocPos( const Point& rPaperPos ) const
+/*N*/ {
+/*N*/ Point aDocPos( rPaperPos );
+/*N*/ if ( IsVertical() )
+/*N*/ {
+/*?*/ aDocPos.X() = rPaperPos.Y();
+/*?*/ aDocPos.Y() = GetPaperSize().Width() - rPaperPos.X();
+/*N*/ }
+/*N*/ return aDocPos;
+/*N*/ }
+
+/*N*/ Point EditEngine::GetDocPosTopLeft( sal_uInt16 nParagraph )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ ParaPortion* pPPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nParagraph );
+/*N*/ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetWindowPosTopLeft" );
+/*N*/ Point aPoint;
+/*N*/ if ( pPPortion )
+/*N*/ {
+/*N*/ // Falls jemand mit einer leeren Engine ein GetLineHeight() macht.
+/*N*/ DBG_ASSERT( pImpEditEngine->IsFormatted() || !pImpEditEngine->IsFormatting(), "GetDocPosTopLeft: Doc not formatted - unable to format!" );
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*?*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ if ( pPPortion->GetLines().Count() )
+/*N*/ {
+/*N*/ // So richtiger, falls grosses Bullet.
+/*N*/ EditLine* pFirstLine = pPPortion->GetLines()[0];
+/*N*/ aPoint.X() = pFirstLine->GetStartPosX();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ const SvxLRSpaceItem& rLRItem = pImpEditEngine->GetLRSpaceItem( pPPortion->GetNode() );
+/*?*/ aPoint.X() = pImpEditEngine->GetXValue( (short)(rLRItem.GetTxtLeft() + rLRItem.GetTxtFirstLineOfst()) );
+/*N*/ }
+/*N*/ aPoint.Y() = pImpEditEngine->GetParaPortions().GetYOffset( pPPortion );
+/*N*/ }
+/*N*/ return aPoint;
+/*N*/ }
+
+
+/*N*/ sal_Bool EditEngine::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*?*/ pImpEditEngine->FormatDoc();
+/*N*/
+/*N*/ sal_Bool bTextPos = sal_False;
+/*N*/ // #90780# take unrotated positions for calculation here
+/*N*/ Point aDocPos = GetDocPos( rPaperPos );
+/*N*/
+/*N*/ if ( ( aDocPos.Y() > 0 ) && ( aDocPos.Y() < (long)pImpEditEngine->GetTextHeight() ) )
+/*N*/ {
+/*N*/ EditPaM aPaM = pImpEditEngine->GetPaM( aDocPos, sal_False );
+/*N*/ if ( aPaM.GetNode() )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = pImpEditEngine->FindParaPortion( aPaM.GetNode() );
+/*N*/ DBG_ASSERT( pParaPortion, "ParaPortion?" );
+/*N*/
+/*N*/ sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex() );
+/*N*/ EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
+/*N*/ Range aLineXPosStartEnd = pImpEditEngine->GetLineXPosStartEnd( pParaPortion, pLine );
+/*N*/ if ( ( aDocPos.X() >= aLineXPosStartEnd.Min() - nBorder ) &&
+/*N*/ ( aDocPos.X() <= aLineXPosStartEnd.Max() + nBorder ) )
+/*N*/ {
+/*N*/ bTextPos = sal_True;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return bTextPos;
+/*N*/ }
+
+/*N*/ void EditEngine::SetEditTextObjectPool( SfxItemPool* pPool )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetEditTextObjectPool( pPool );
+/*N*/ }
+
+/*N*/ SfxItemPool* EditEngine::GetEditTextObjectPool() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetEditTextObjectPool();
+/*N*/ }
+
+/*N*/ void EditEngine::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ EditSelection aSel( pImpEditEngine->
+/*N*/ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+/*N*/
+/*N*/ pImpEditEngine->SetAttribs( aSel, rSet );
+/*N*/ }
+
+
+/*N*/ void EditEngine::QuickInsertText( const XubString& rText, const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ EditSelection aSel( pImpEditEngine->
+/*N*/ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+/*N*/
+/*N*/ pImpEditEngine->ImpInsertText( aSel, rText );
+/*N*/ }
+
+/*N*/ void EditEngine::QuickDelete( const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ EditSelection aSel( pImpEditEngine->
+/*N*/ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+/*N*/
+/*N*/ pImpEditEngine->ImpDeleteSelection( aSel );
+/*N*/ }
+
+
+/*N*/ void EditEngine::QuickInsertLineBreak( const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ EditSelection aSel( pImpEditEngine->
+/*N*/ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+/*N*/
+/*N*/ pImpEditEngine->InsertLineBreak( aSel );
+/*N*/ }
+
+/*N*/ void EditEngine::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ EditSelection aSel( pImpEditEngine->
+/*N*/ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+/*N*/
+/*N*/ pImpEditEngine->ImpInsertFeature( aSel, rFld );
+/*N*/ }
+
+/*N*/ void EditEngine::QuickFormatDoc( sal_Bool bFull )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ if ( bFull )
+/*N*/ pImpEditEngine->FormatFullDoc();
+/*N*/ else
+/*N*/ pImpEditEngine->FormatDoc();
+/*N*/ pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
+/*N*/ }
+
+/*N*/ void EditEngine::QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->RemoveCharAttribs( nPara, nWhich );
+/*N*/ }
+
+/*N*/ void EditEngine::SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetStyleSheet( nPara, pStyle );
+/*N*/ }
+
+/*N*/ SfxStyleSheet* EditEngine::GetStyleSheet( sal_uInt16 nPara ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetStyleSheet( nPara );
+/*N*/ }
+
+/*N*/ void EditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetStyleSheetPool( pSPool );
+/*N*/ }
+
+/*N*/ SfxStyleSheetPool* EditEngine::GetStyleSheetPool()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->GetStyleSheetPool();
+/*N*/ }
+
+/*N*/ void EditEngine::SetWordDelimiters( const XubString& rDelimiters )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->aWordDelimiters = rDelimiters;
+/*N*/ if ( pImpEditEngine->aWordDelimiters.Search( CH_FEATURE ) == STRING_NOTFOUND )
+/*N*/ pImpEditEngine->aWordDelimiters.Insert( CH_FEATURE );
+/*N*/ }
+
+/*N*/ XubString EditEngine::GetWordDelimiters() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return pImpEditEngine->aWordDelimiters;
+/*N*/ }
+
+
+
+
+
+
+
+/*N*/ void EditEngine::EraseVirtualDevice()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->EraseVirtualDevice();
+/*N*/ }
+
+/*N*/ void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetForbiddenCharsTable( xForbiddenChars );
+/*N*/ }
+
+
+
+/*N*/ void EditEngine::SetDefaultLanguage( LanguageType eLang )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetDefaultLanguage( eLang );
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void EditEngine::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ pImpEditEngine->SetCharStretching( nX, nY );
+/*N*/ }
+
+
+/*N*/ sal_Bool EditEngine::ShouldCreateBigTextObject() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ sal_uInt16 nTextPortions = 0;
+/*N*/ sal_uInt16 nParas = pImpEditEngine->GetEditDoc().Count();
+/*N*/ for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions()[nPara];
+/*N*/ nTextPortions += pParaPortion->GetTextPortions().Count();
+/*N*/ }
+/*N*/ return ( nTextPortions >= pImpEditEngine->GetBigTextObjectStart() ) ? sal_True : sal_False;
+/*N*/ }
+
+/*N*/ USHORT EditEngine::GetFieldCount( USHORT nPara ) const
+/*N*/ {
+/*N*/ USHORT nFields = 0;
+/*N*/ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+/*N*/ if ( pNode )
+/*N*/ {
+/*N*/ const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
+/*N*/ for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = rAttrs[nAttr];
+/*N*/ if ( pAttr->Which() == EE_FEATURE_FIELD )
+/*N*/ nFields++;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return nFields;
+/*N*/ }
+
+/*N*/ EFieldInfo EditEngine::GetFieldInfo( USHORT nPara, USHORT nField ) const
+/*N*/ {
+/*N*/ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+/*N*/ if ( pNode )
+/*N*/ {
+/*N*/ USHORT nCurrentField = 0;
+/*N*/ const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
+/*N*/ for ( sal_uInt16 nAttr = 0; nAttr < rAttrs.Count(); nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = rAttrs[nAttr];
+/*N*/ if ( pAttr->Which() == EE_FEATURE_FIELD )
+/*N*/ {
+/*N*/ if ( nCurrentField == nField )
+/*N*/ {
+/*N*/ EFieldInfo aInfo( *(const SvxFieldItem*)pAttr->GetItem(), nPara, pAttr->GetStart() );
+/*N*/ aInfo.aCurrentText = ((EditCharAttribField*)pAttr)->GetFieldValue();
+/*N*/ return aInfo;
+/*N*/ }
+/*N*/
+/*N*/ nCurrentField++;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return EFieldInfo();
+/*N*/ }
+
+
+/*N*/ sal_Bool EditEngine::UpdateFields()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ sal_Bool bChanges = pImpEditEngine->UpdateFields();
+/*N*/ if ( bChanges )
+/*N*/ pImpEditEngine->FormatAndUpdate();
+/*N*/ return bChanges;
+/*N*/ }
+
+/*N*/ USHORT EditEngine::FindParagraph( long nDocPosY )
+/*N*/ {
+/*N*/ return pImpEditEngine->GetParaPortions().FindParagraph( nDocPosY );
+/*N*/ }
+
+/*N*/ EPosition EditEngine::FindDocPosition( const Point& rDocPos ) const
+/*N*/ {
+/*N*/ EPosition aPos;
+/*N*/ // From the point of the API, this is const....
+/*N*/ EditPaM aPaM = ((EditEngine*)this)->pImpEditEngine->GetPaM( rDocPos, FALSE );
+/*N*/ if ( aPaM.GetNode() )
+/*N*/ {
+/*N*/ aPos.nPara = pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() );
+/*N*/ aPos.nIndex = aPaM.GetIndex();
+/*N*/ }
+/*N*/ return aPos;
+/*N*/ }
+
+/*N*/ Rectangle EditEngine::GetCharacterBounds( const EPosition& rPos ) const
+/*N*/ {
+/*N*/ Rectangle aBounds;
+/*N*/ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( rPos.nPara );
+/*N*/
+/*N*/ // #109151# Check against index, not paragraph
+/*N*/ if ( pNode && ( rPos.nIndex < pNode->Len() ) )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ return aBounds;
+/*N*/ }
+
+/*N*/ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ // Funktioniert nur, wenn nicht bereits in der Formatierung...
+/*N*/ if ( !pImpEditEngine->IsFormatted() )
+/*N*/ pImpEditEngine->FormatDoc();
+/*N*/
+/*N*/ ParagraphInfos aInfos;
+/*N*/ aInfos.bValid = pImpEditEngine->IsFormatted();
+/*N*/ if ( pImpEditEngine->IsFormatted() )
+/*N*/ {
+/*?*/ 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 = (USHORT)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();
+/*?*/ }
+/*N*/ }
+/*N*/ return aInfos;
+/*N*/ }
+
+
+// =====================================================================
+// ====================== Virtuelle Methoden =======================
+// =====================================================================
+/*N*/ void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT nTextStart, USHORT nTextLen, const sal_Int32*, const SvxFont&, sal_uInt16 nPara, sal_uInt16 nIndex, BYTE nRightToLeft )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ }
+
+/*N*/ void __EXPORT EditEngine::PaintingFirstLine( sal_uInt16, const Point&, long, const Point&, short, OutputDevice* )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ }
+
+/*N*/ void __EXPORT EditEngine::ParagraphInserted( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( GetNotifyHdl().IsSet() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EENotify aNotify( EE_NOTIFY_PARAGRAPHINSERTED );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void __EXPORT EditEngine::ParagraphDeleted( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( GetNotifyHdl().IsSet() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EENotify aNotify( EE_NOTIFY_PARAGRAPHREMOVED );
+/*N*/ }
+/*N*/ }
+
+/*N*/ sal_Bool __EXPORT EditEngine::FormattingParagraph( sal_uInt16 )
+/*N*/ {
+/*N*/ // return sal_True, wenn die Attribute geaendert wurden...
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return sal_False;
+/*N*/ }
+
+/*N*/ void __EXPORT EditEngine::ParaAttribsChanged( sal_uInt16 /* nParagraph */ )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ }
+
+
+/*N*/ void __EXPORT EditEngine::ParagraphHeightChanged( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/
+/*N*/ if ( GetNotifyHdl().IsSet() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EENotify aNotify( EE_NOTIFY_TEXTHEIGHTCHANGED );
+/*N*/ }
+/*N*/ }
+
+/*N*/ XubString __EXPORT EditEngine::GetUndoComment( sal_uInt16 nId ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ XubString aComment;
+/*N*/ switch ( nId )
+/*N*/ {
+/*N*/ case EDITUNDO_REMOVECHARS:
+/*N*/ case EDITUNDO_CONNECTPARAS:
+/*N*/ case EDITUNDO_REMOVEFEATURE:
+/*N*/ case EDITUNDO_DELCONTENT:
+/*N*/ case EDITUNDO_DELETE:
+/*N*/ case EDITUNDO_CUT:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_DEL ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_MOVEPARAGRAPHS:
+/*N*/ case EDITUNDO_MOVEPARAS:
+/*N*/ case EDITUNDO_DRAGANDDROP:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_MOVE ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_INSERTFEATURE:
+/*N*/ case EDITUNDO_SPLITPARA:
+/*N*/ case EDITUNDO_INSERTCHARS:
+/*N*/ case EDITUNDO_PASTE:
+/*N*/ case EDITUNDO_INSERT:
+/*N*/ case EDITUNDO_READ:
+/*N*/ aComment = XubString( EditResId( RID_EDITUNDO_INSERT ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_SRCHANDREPL:
+/*N*/ case EDITUNDO_REPLACEALL:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_REPLACE ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_ATTRIBS:
+/*N*/ case EDITUNDO_PARAATTRIBS:
+/*N*/ case EDITUNDO_STRETCH:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_SETATTRIBS ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_RESETATTRIBS:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_RESETATTRIBS ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_STYLESHEET:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_SETSTYLE ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_TRANSLITERATE:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_TRANSLITERATE ) );
+/*N*/ break;
+/*N*/ case EDITUNDO_INDENTBLOCK:
+/*N*/ case EDITUNDO_UNINDENTBLOCK:
+/*?*/ aComment = XubString( EditResId( RID_EDITUNDO_INDENT ) );
+/*N*/ break;
+/*N*/ }
+/*N*/ return aComment;
+/*N*/ }
+
+/*N*/ Rectangle EditEngine::GetBulletArea( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ return Rectangle( Point(), Point() );
+/*N*/ }
+
+/*N*/ XubString __EXPORT EditEngine::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16, sal_uInt16, Color*&, Color*& )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditEngine, 0 );
+/*N*/ return ' ';
+/*N*/ }
+
+
+
+ // =====================================================================
+// ====================== Statische Methoden =======================
+// =====================================================================
+/*N*/ SfxItemPool* EditEngine::CreatePool( sal_Bool bPersistentRefCounts )
+/*N*/ {
+/*N*/ SfxItemPool* pPool = new EditEngineItemPool( bPersistentRefCounts );
+/*N*/ return pPool;
+/*N*/ }
+
+
+/*N*/ Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType )
+/*N*/ {
+/*N*/ SvxFont aFont;
+/*N*/ CreateFont( aFont, rItemSet, nScriptType );
+/*N*/ return aFont;
+/*N*/ }
+
+// Maybe we can remove the next two methods, check after 6.x
+
+/*N*/ SvxFont EditEngine::CreateSvxFontFromItemSet( const SfxItemSet& rItemSet )
+/*N*/ {
+/*N*/ SvxFont aFont;
+/*N*/ CreateFont( aFont, rItemSet );
+/*N*/ return aFont;
+/*N*/ }
+
+
+// Mal in den Outliner schieben...
+/*N*/ void EditEngine::ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel,
+/*N*/ const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace )
+/*N*/ {
+/*N*/ if ( pOldBullet || pOldLRSpace )
+/*N*/ {
+/*N*/ // Numberformat dynamisch, weil Zuweisungsoperator nicht implementiert.
+/*N*/
+/*N*/ // Altes NumBulletItem nur uebernehmen, wenn kein altes BulletItem
+/*N*/ const SvxNumberFormat* pFmt = ( !pOldBullet && ( rNumBullet.GetNumRule()->GetLevelCount() > nLevel ) ) ?
+/*N*/ rNumBullet.GetNumRule()->Get( nLevel ) : NULL;
+/*N*/ SvxNumberFormat* pNumberFormat = pFmt
+/*N*/ ? new SvxNumberFormat( *pFmt )
+/*N*/ : new SvxNumberFormat( SVX_NUM_NUMBER_NONE );
+/*N*/ if ( pOldBullet )
+/*N*/ {
+/*N*/ // Style
+/*N*/ SvxExtNumType eNumType;
+/*N*/ switch( pOldBullet->GetStyle() )
+/*N*/ {
+/*N*/ case BS_BMP: eNumType = SVX_NUM_BITMAP; break;
+/*N*/ case BS_BULLET: eNumType = SVX_NUM_CHAR_SPECIAL; break;
+/*N*/ case BS_ROMAN_BIG: eNumType = SVX_NUM_ROMAN_UPPER; break;
+/*N*/ case BS_ROMAN_SMALL: eNumType = SVX_NUM_ROMAN_LOWER; break;
+/*N*/ case BS_ABC_BIG: eNumType = SVX_NUM_CHARS_UPPER_LETTER; break;
+/*N*/ case BS_ABC_SMALL: eNumType = SVX_NUM_CHARS_LOWER_LETTER; break;
+/*N*/ case BS_123: eNumType = SVX_NUM_ARABIC; break;
+/*N*/ default: eNumType = SVX_NUM_NUMBER_NONE; break;
+/*N*/ }
+/*N*/ pNumberFormat->SetNumberingType( eNumType );
+/*N*/
+/*N*/ // Justification
+/*N*/ SvxAdjust eAdjust;
+/*N*/ switch( pOldBullet->GetJustification() & (BJ_HRIGHT|BJ_HCENTER|BJ_HLEFT) )
+/*N*/ {
+/*?*/ case BJ_HRIGHT: eAdjust = SVX_ADJUST_RIGHT; break;
+/*?*/ case BJ_HCENTER: eAdjust = SVX_ADJUST_CENTER; break;
+/*N*/ default: eAdjust = SVX_ADJUST_LEFT; break;
+/*N*/ }
+/*N*/ pNumberFormat->SetNumAdjust(eAdjust);
+/*N*/
+/*N*/ // Prefix/Suffix
+/*N*/ pNumberFormat->SetPrefix( pOldBullet->GetPrevText() );
+/*N*/ pNumberFormat->SetSuffix( pOldBullet->GetFollowText() );
+/*N*/
+/*N*/ //Font
+/*N*/ if ( eNumType != SVX_NUM_BITMAP )
+/*N*/ {
+/*N*/ Font aTmpFont = pOldBullet->GetFont();
+/*N*/ pNumberFormat->SetBulletFont( &aTmpFont );
+/*N*/ }
+/*N*/
+/*N*/ // Color
+/*N*/ pNumberFormat->SetBulletColor( pOldBullet->GetFont().GetColor() );
+/*N*/
+/*N*/ // Start
+/*N*/ pNumberFormat->SetStart( pOldBullet->GetStart() );
+/*N*/
+/*N*/ // Scale
+/*N*/ pNumberFormat->SetBulletRelSize( pOldBullet->GetScale() );
+/*N*/
+/*N*/ // Bullet/Bitmap
+/*N*/ if( eNumType == SVX_NUM_CHAR_SPECIAL )
+/*N*/ {
+/*N*/ pNumberFormat->SetBulletChar( pOldBullet->GetSymbol() );
+/*N*/ }
+/*N*/ else if( eNumType == SVX_NUM_BITMAP )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SvxBrushItem aBItem( Graphic( pOldBullet->GetBitmap() ), GPOS_NONE );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Einzug und Erstzeileneinzug
+/*N*/ if ( pOldLRSpace )
+/*N*/ {
+/*N*/ short nLSpace = (short)pOldLRSpace->GetTxtLeft();
+/*N*/ pNumberFormat->SetLSpace( nLSpace );
+/*N*/ pNumberFormat->SetAbsLSpace( nLSpace );
+/*N*/ pNumberFormat->SetFirstLineOffset( pOldLRSpace->GetTxtFirstLineOfst() );
+/*N*/ }
+/*N*/
+/*N*/ rNumBullet.GetNumRule()->SetLevel( nLevel, *pNumberFormat );
+/*N*/ delete pNumberFormat;
+/*N*/ }
+/*N*/ }
+
+
+
+// ---------------------------------------------------
+
+
+/*N*/ EFieldInfo::EFieldInfo()
+/*N*/ {
+/*N*/ pFieldItem = NULL;
+/*N*/ }
+
+
+/*N*/ EFieldInfo::EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ) : aPosition( nPara, nPos )
+/*N*/ {
+/*N*/ pFieldItem = new SvxFieldItem( rFieldItem );
+/*N*/ }
+
+/*N*/ EFieldInfo::~EFieldInfo()
+/*N*/ {
+/*N*/ delete pFieldItem;
+/*N*/ }
+
+/*N*/ EFieldInfo::EFieldInfo( const EFieldInfo& rFldInfo )
+/*N*/ {
+/*N*/ *this = rFldInfo;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editeng.src b/binfilter/bf_svx/source/editeng/svx_editeng.src
new file mode 100644
index 000000000000..8775bb4294e5
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editeng.src
@@ -0,0 +1,454 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include <editeng.hrc>
+#include <helpid.hrc>
+
+String RID_EDITUNDO_DEL
+{
+ Text [ de ] = "Löschen" ;
+ Text [ en-US ] = "Delete" ;
+ Text[ pt ] = "Eliminar";
+ Text[ ru ] = "Удалить";
+ Text[ el ] = "ΔιαγÏαφή";
+ Text[ nl ] = "Wissen";
+ Text[ fr ] = "Supprimer";
+ Text[ es ] = "Borrar";
+ Text[ fi ] = "Poista";
+ Text[ ca ] = "Suprimeix";
+ Text[ it ] = "Elimina";
+ Text[ sk ] = "Zmazať";
+ Text[ da ] = "Slet";
+ Text[ sv ] = "Radera";
+ Text[ pl ] = "Usuń";
+ Text[ pt-BR ] = "Excluir";
+ Text[ th ] = "ลบ";
+ Text[ ja ] = "削除";
+ Text[ ko ] = "삭제";
+ Text[ zh-CN ] = "删除";
+ Text[ zh-TW ] = "刪除";
+ Text[ tr ] = "Sil";
+ Text[ hi-IN ] = "मिटाओ";
+ Text[ ar ] = "حذÙ";
+ Text[ he ] = "‮מחיקה‬";
+};
+
+String RID_EDITUNDO_MOVE
+{
+ Text [ de ] = "Verschieben" ;
+ Text [ en-US ] = "Move" ;
+ Text[ pt ] = "Mover";
+ Text[ ru ] = "ПеремеÑтить";
+ Text[ el ] = "Μετακίνηση";
+ Text[ nl ] = "Verplaatsen";
+ Text[ fr ] = "Déplacer";
+ Text[ es ] = "Desplazar";
+ Text[ fi ] = "Siirrä";
+ Text[ ca ] = "Mou";
+ Text[ it ] = "Sposta";
+ Text[ sk ] = "Presunúť";
+ Text[ da ] = "Flyt";
+ Text[ sv ] = "Flytta";
+ Text[ pl ] = "Przesuń";
+ Text[ pt-BR ] = "Mover";
+ Text[ th ] = "ย้าย";
+ Text[ ja ] = "移動";
+ Text[ ko ] = "ì´ë™";
+ Text[ zh-CN ] = "移动";
+ Text[ zh-TW ] = "移動";
+ Text[ tr ] = "Taşı";
+ Text[ hi-IN ] = "सà¥à¤¥à¤¾à¤¨à¤¾à¤¨à¥à¤¤à¤°";
+ Text[ ar ] = "إزاحة";
+ Text[ he ] = "‮הזזה‬";
+};
+
+String RID_EDITUNDO_INSERT
+{
+ Text [ de ] = "Einfügen" ;
+ Text [ en-US ] = "Insert" ;
+ Text[ pt ] = "Inserir";
+ Text[ ru ] = "Ð’Ñтавить";
+ Text[ el ] = "Εισαγωγή";
+ Text[ nl ] = "Invoegen";
+ Text[ fr ] = "Insérer";
+ Text[ es ] = "Insertar";
+ Text[ fi ] = "Lisää";
+ Text[ ca ] = "Insereix";
+ Text[ it ] = "Inserisci";
+ Text[ sk ] = "Vložiť";
+ Text[ da ] = "Indsæt";
+ Text[ sv ] = "Infoga";
+ Text[ pl ] = "Wstaw";
+ Text[ pt-BR ] = "Inserir";
+ Text[ th ] = "à¹à¸—รà¸";
+ Text[ ja ] = "挿入";
+ Text[ ko ] = "삽입";
+ Text[ zh-CN ] = "æ’å…¥";
+ Text[ zh-TW ] = "æ’å…¥";
+ Text[ tr ] = "Ekle";
+ Text[ hi-IN ] = "जोड़ो";
+ Text[ ar ] = "إدراج";
+ Text[ he ] = "‮הוספה‬";
+};
+
+String RID_EDITUNDO_REPLACE
+{
+ Text [ de ] = "Ersetzen" ;
+ Text [ en-US ] = "Replace" ;
+ Text[ pt ] = "Substituir";
+ Text[ ru ] = "Заменить";
+ Text[ el ] = "Αντικατάσταση";
+ Text[ nl ] = "Vervangen";
+ Text[ fr ] = "Remplacer";
+ Text[ es ] = "Reemplazar";
+ Text[ fi ] = "Korvaa";
+ Text[ ca ] = "Reemplaça";
+ Text[ it ] = "Sostituisci";
+ Text[ sk ] = "Nahradiť";
+ Text[ da ] = "Erstat";
+ Text[ sv ] = "Ersätt";
+ Text[ pl ] = "Zamień";
+ Text[ pt-BR ] = "Substituir";
+ Text[ th ] = "à¹à¸—นที่";
+ Text[ ja ] = "ç½®æ›";
+ Text[ ko ] = "바꾸기";
+ Text[ zh-CN ] = "替æ¢";
+ Text[ zh-TW ] = "代替";
+ Text[ tr ] = "DeÄŸiÅŸtir";
+ Text[ hi-IN ] = "पà¥à¤°à¤¤à¤¿à¤¸à¥à¤¥à¤¾à¤ªà¤¨";
+ Text[ ar ] = "استبدال";
+ Text[ he ] = "‮החלפה‬";
+};
+
+String RID_EDITUNDO_SETATTRIBS
+{
+ Text [ de ] = "Attribute anwenden" ;
+ Text [ en-US ] = "Apply attributes" ;
+ Text[ pt ] = "Aplicar atributos";
+ Text[ ru ] = "Применить атрибуты";
+ Text[ el ] = "ΕφαÏμογή ιδιοτήτων";
+ Text[ nl ] = "Attributen toepassen";
+ Text[ fr ] = "Appliquer les attributs";
+ Text[ es ] = "Aplicar atributos";
+ Text[ fi ] = "Käytä määritteitä";
+ Text[ ca ] = "Aplica els atributs";
+ Text[ it ] = "Applica attributi";
+ Text[ sk ] = "Použiť atribúty";
+ Text[ da ] = "Anvend attributter";
+ Text[ sv ] = "Använd attribut";
+ Text[ pl ] = "Zastosuj atrybuty";
+ Text[ pt-BR ] = "Aplicar atributos";
+ Text[ th ] = "ใช้คุณลัà¸à¸©à¸“ะ";
+ Text[ ja ] = "属性をé©ç”¨";
+ Text[ ko ] = "ì†ì„± ì ìš©";
+ Text[ zh-CN ] = "使用属性";
+ Text[ zh-TW ] = "使用屬性";
+ Text[ tr ] = "Öznitelikleri kullan";
+ Text[ hi-IN ] = "à¤à¤Ÿà¥à¤°à¤¿à¤¬à¥à¤¯à¥‚टà¥à¤¸ लागू करो";
+ Text[ ar ] = "استخدام السمات";
+ Text[ he ] = "â€®×™×©×•× ×ª×›×•× ×•×ªâ€¬";
+};
+
+String RID_EDITUNDO_RESETATTRIBS
+{
+ Text [ de ] = "Attribute zurücksetzen" ;
+ Text [ en-US ] = "Reset attributes" ;
+ Text[ pt ] = "Repor atributos";
+ Text[ ru ] = "ВоÑÑтановить атрибуты";
+ Text[ el ] = "ΕπαναφοÏά ιδιοτήτων";
+ Text[ nl ] = "Attributen herstellen";
+ Text[ fr ] = "Restaurer les attributs";
+ Text[ es ] = "Restablecer atributos";
+ Text[ fi ] = "Palauta määritteet";
+ Text[ ca ] = "Reinicia els atributs";
+ Text[ it ] = "Reimposta attributi";
+ Text[ sk ] = "Obnoviť atribúty";
+ Text[ da ] = "Nulstil attributer";
+ Text[ sv ] = "Återställ attribut";
+ Text[ pl ] = "Resetuj atrybuty";
+ Text[ pt-BR ] = "Redefinir atributos";
+ Text[ th ] = "à¸à¸³à¸«à¸™à¸”คุณลัà¸à¸©à¸“ะใหม่";
+ Text[ ja ] = "属性を元ã«æˆ»ã™";
+ Text[ ko ] = "ì†ì„± ì›ëž˜ëŒ€ë¡œ";
+ Text[ zh-CN ] = "é‡è®¾å±žæ€§";
+ Text[ zh-TW ] = "é‡è¨­å±¬æ€§";
+ Text[ tr ] = "Öznitelikleri başa al";
+ Text[ hi-IN ] = "à¤à¤Ÿà¥à¤°à¤¿à¤¬à¥à¤¯à¥‚टà¥à¤¸ रिसेटà¥à¤Ÿ करो";
+ Text[ ar ] = "إعادة تعيين السمات";
+ Text[ he ] = "‮×יפוס תכונות‬";
+};
+
+String RID_EDITUNDO_INDENT
+{
+ Text [ de ] = "Einrücken" ;
+ Text [ en-US ] = "Indent" ;
+ Text[ pt ] = "Avançar";
+ Text[ ru ] = "ОтÑтуп";
+ Text[ el ] = "Εσοχή";
+ Text[ nl ] = "Inspringing";
+ Text[ fr ] = "Mettre en retrait";
+ Text[ es ] = "Sangría";
+ Text[ fi ] = "Sisennä";
+ Text[ ca ] = "Sagnat";
+ Text[ it ] = "Rientro";
+ Text[ sk ] = "Odsadenie";
+ Text[ da ] = "Indryk";
+ Text[ sv ] = "Dra in";
+ Text[ pl ] = "Wcięcie";
+ Text[ pt-BR ] = "Recuo";
+ Text[ th ] = "ระยะเยื้อง";
+ Text[ ja ] = "挿入";
+ Text[ ko ] = "들여쓰기";
+ Text[ zh-CN ] = "缩进";
+ Text[ zh-TW ] = "縮排";
+ Text[ tr ] = "Girinti";
+ Text[ hi-IN ] = "इनà¥à¤¡à¥‡à¤¨à¥à¤Ÿ";
+ Text[ ar ] = "إزاحة";
+ Text[ he ] = "‮כניסה‬";
+};
+
+String RID_EDITUNDO_SETSTYLE
+{
+ Text [ de ] = "Vorlagen anwenden" ;
+ Text [ en-US ] = "Apply Styles" ;
+ Text[ pt ] = "Aplicar estilos";
+ Text[ ru ] = "Применить Ñтили";
+ Text[ el ] = "ΕφαÏμογή Ï€ÏοτÏπων";
+ Text[ nl ] = "Opmaakprofielen toepassen";
+ Text[ fr ] = "Appliquer les styles";
+ Text[ es ] = "Aplicar estilos";
+ Text[ fi ] = "Käytä tyylejä";
+ Text[ ca ] = "Aplica els estils";
+ Text[ it ] = "Applica modelli";
+ Text[ sk ] = "Použiť štýly";
+ Text[ da ] = "Anvend typografier";
+ Text[ sv ] = "Använd mallar";
+ Text[ pl ] = "Zastosuj style";
+ Text[ pt-BR ] = "Aplicar Estilos";
+ Text[ th ] = "ใช้ลัà¸à¸©à¸“ะ";
+ Text[ ja ] = "スタイルをé©ç”¨";
+ Text[ ko ] = "ìŠ¤íƒ€ì¼ ì ìš©";
+ Text[ zh-CN ] = "使用样å¼";
+ Text[ zh-TW ] = "使用樣å¼";
+ Text[ tr ] = "Şablonları kullan";
+ Text[ hi-IN ] = "शैलियों को लागू करो";
+ Text[ ar ] = "استخدام نماذج";
+ Text[ he ] = "â€®×™×©×•× ×¡×’× ×•× ×•×ªâ€¬";
+};
+
+String RID_EDITUNDO_TRANSLITERATE
+{
+ Text [ de ] = "Groß-/Kleinschreibung";
+ Text [ en-US ] = "Case/Characters";
+ Text [ x-comment ] = "; nk03.04.01: hier passt Englisch Uebesetzung besser.";
+ Text[ pt ] = "Caixa/Caracteres";
+ Text[ ru ] = "РегиÑÑ‚Ñ€";
+ Text[ el ] = "Κεφαλαία/Πεζά";
+ Text[ nl ] = "Hoofdletters/kleine letters";
+ Text[ fr ] = "Casse/Caractères";
+ Text[ es ] = "Mayúsculas/minúsculas";
+ Text[ fi ] = "Muuta kirjainkoko";
+ Text[ ca ] = "Majúscules/minúscules";
+ Text[ it ] = "Maiuscole/minuscole";
+ Text[ sk ] = "Veľkosť/znaky";
+ Text[ da ] = "Store og små bogstaver";
+ Text[ sv ] = "Bokstäver/tecken";
+ Text[ pl ] = "Wielkie i małe litery";
+ Text[ pt-BR ] = "Caixa/Caracteres";
+ Text[ th ] = "ตัวพิมพ์/ตัวอัà¸à¸‚ระ";
+ Text[ ja ] = "文字種ã®å¤‰æ›";
+ Text[ ko ] = "ë¬¸ìž ë°”ê¾¸ê¸°";
+ Text[ zh-CN ] = "å˜åŒ–å­—æ¯å’Œå­—体格å¼";
+ Text[ zh-TW ] = "變化字æ¯å’Œå­—åž‹æ ¼å¼";
+ Text[ tr ] = "KoÅŸul/Karakterler";
+ Text[ hi-IN ] = "केस/अकà¥à¤·à¤°à¥‡à¤‚";
+ Text[ ar ] = "الكتابة بأحر٠كبيرة أو صغيرة";
+ Text[ he ] = "‮סיווג ×ותיות‬";
+};
+
+
+Menu RID_MENU_SPELL
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_SPELLING ;
+ HelpId = HID_EDITENG_SPELLER_START;
+ Text [ de ] = "~Rechtschreibprüfung..." ;
+ Text [ en-US ] = "~Spellcheck..." ;
+ Text [ x-comment ] = "; triple dots (...) are required now at the end of the text";
+ Text[ pt ] = "Or~tografia";
+ Text[ ru ] = "~Проверка орфографии";
+ Text[ el ] = "ΟÏθογÏαφικός έλεγχος";
+ Text[ nl ] = "~Spellingcontrole";
+ Text[ fr ] = "~Vérification orthographique...";
+ Text[ es ] = "~Revisión ortográfica...";
+ Text[ fi ] = "~Oikeinkirjoituksen tarkistus";
+ Text[ ca ] = "~Ortografia";
+ Text[ it ] = "Controllo ~ortografico...";
+ Text[ sk ] = "~Kontrola pravopisu";
+ Text[ da ] = "~Stavekontrol";
+ Text[ sv ] = "~Rättstavning...";
+ Text[ pl ] = "~Pisownia";
+ Text[ pt-BR ] = "Verificação ~Ortográfica";
+ Text[ th ] = "~ตรวจสอบà¸à¸²à¸£à¸ªà¸°à¸à¸”";
+ Text[ ja ] = "文章校正(~S)...";
+ Text[ ko ] = "맞춤법 검사(~S)...";
+ Text[ zh-CN ] = "拼写检查(~S)...";
+ Text[ zh-TW ] = "拼寫檢查(~S)...";
+ Text[ tr ] = "~Yazım Kontrolü...";
+ Text[ hi-IN ] = "~अकà¥à¤·à¤° की जाà¤à¤š";
+ Text[ ar ] = "تد~قيق إملائي";
+ Text[ he ] = "‮בדיקת ×יות‬";
+ };
+ MenuItem
+ {
+ Identifier = MN_INSERT ;
+ HelpId = HID_EDITENG_SPELLER_ADDWORD;
+ SubMenu = Menu
+ {
+ };
+ Text [ de ] = "~Aufnehmen" ;
+ Text [ en-US ] = "~Add" ;
+ Text[ pt ] = "~Adicionar";
+ Text[ ru ] = "Добавить";
+ Text[ el ] = "ΠÏ~οσθήκη";
+ Text[ nl ] = "~Toevoegen";
+ Text[ fr ] = "~Ajouter";
+ Text[ es ] = "~Incluir";
+ Text[ fi ] = "Lis~ää";
+ Text[ ca ] = "~Afegeix";
+ Text[ it ] = "A~ggiungi";
+ Text[ sk ] = "Prid~ať";
+ Text[ da ] = "Ti~lføj";
+ Text[ sv ] = "~Lägg till";
+ Text[ pl ] = "~Dodaj";
+ Text[ pt-BR ] = "~Adicionar";
+ Text[ th ] = "เ~พิ่ม";
+ Text[ ja ] = "追加(~A)";
+ Text[ ko ] = "추가(~A)";
+ Text[ zh-CN ] = "加入(~A)";
+ Text[ zh-TW ] = "加入(~A)";
+ Text[ tr ] = "Ekle";
+ Text[ hi-IN ] = "~जोड़ो";
+ Text[ ar ] = "إضاÙØ©";
+ Text[ he ] = "‮הוספה‬";
+ };
+ MenuItem
+ {
+ Identifier = MN_IGNORE ;
+ HelpId = HID_EDITENG_SPELLER_IGNORE;
+ Text [ de ] = "Alle i~gnorieren" ;
+ Text [ en-US ] = "Ignore All" ;
+ Text[ pt ] = "I~gnorar tudo";
+ Text[ ru ] = "ПропуÑтить вÑе";
+ Text[ el ] = "ΠαÏά~βλεψη όλων";
+ Text[ nl ] = "Alle ~negeren";
+ Text[ fr ] = "Tout ~ignorer";
+ Text[ es ] = "I~gnorar todo";
+ Text[ fi ] = "Ohita kaikki";
+ Text[ ca ] = "Ignora'ls tots";
+ Text[ it ] = "~Ignora tutto";
+ Text[ sk ] = "Ignorovať všetko";
+ Text[ da ] = "I~gnorer alle";
+ Text[ sv ] = "~Ignorera alla";
+ Text[ pl ] = "Ignoruj wszystko";
+ Text[ pt-BR ] = "Ignorar Tudo";
+ Text[ th ] = "เพิà¸à¹€à¸‰à¸¢à¸—ั้งหมด";
+ Text[ ja ] = "ã™ã¹ã¦ç„¡è¦–ã™ã‚‹";
+ Text[ ko ] = "ëª¨ë‘ ë¬´ì‹œ";
+ Text[ zh-CN ] = "全部忽略";
+ Text[ zh-TW ] = "全部忽略";
+ Text[ tr ] = "Tümünü yok say";
+ Text[ hi-IN ] = "सब उपेकà¥à¤·à¤¾ करो";
+ Text[ ar ] = "تجاهل الكل";
+ Text[ he ] = "‮התעלמות מהכל‬";
+ };
+ MenuItem
+ {
+ Identifier = MN_AUTOCORR ;
+ HelpId = HID_EDITENG_SPELLER_AUTOCORRECT;
+ SubMenu = Menu
+ {
+ };
+ Text [ de ] = "Auto~Korrektur" ;
+ Text [ en-US ] = "AutoCorrect" ;
+ Text[ pt ] = "Auto~Correcção";
+ Text[ ru ] = "Ðвтозамена";
+ Text[ el ] = "Αυτόματη ~ΔιόÏθωση";
+ Text[ nl ] = "~AutoCorrectie";
+ Text[ fr ] = "AutoCo~rrection";
+ Text[ es ] = "~Corrección automática";
+ Text[ fi ] = "Automaattinen korjaus";
+ Text[ ca ] = "Auto~correcció";
+ Text[ it ] = "~Correzione automatica";
+ Text[ sk ] = "Automatické opravy";
+ Text[ da ] = "Auto~Korrektur";
+ Text[ sv ] = "Auto~Korrigering";
+ Text[ pl ] = "Autokorekta";
+ Text[ pt-BR ] = "AutoCorreção";
+ Text[ th ] = "à¹à¸à¹‰à¹„ขอัตโนมัติ";
+ Text[ ja ] = "オートコレクト";
+ Text[ ko ] = "ìžë™ 수정";
+ Text[ zh-CN ] = "自动更正";
+ Text[ zh-TW ] = "自動校正";
+ Text[ tr ] = "Otomatik düzeltme";
+ Text[ hi-IN ] = "सà¥à¤µà¤¯à¤‚ ठीक करो";
+ Text[ ar ] = "تصحيح تلقائي";
+ Text[ he ] = "‮תיקון ×וטומטי‬";
+ };
+ };
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/editeng/svx_editobj.cxx b/binfilter/bf_svx/source/editeng/svx_editobj.cxx
new file mode 100644
index 000000000000..bed0287f1ca8
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editobj.cxx
@@ -0,0 +1,1529 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+//#define ENABLE_STRING_STREAM_OPERATORS
+
+#include <vcl/outdev.hxx>
+
+#include <editobj2.hxx>
+#include <editeng.hxx>
+#include <fontitem.hxx>
+#include <cscoitem.hxx>
+
+#include "itemdata.hxx"
+
+#include <flditem.hxx>
+#include <lrspitem.hxx>
+#include <tstpitem.hxx>
+#include <bulitem.hxx>
+#include <numitem.hxx>
+#include <brshitem.hxx>
+#include <bf_svtools/intitem.hxx>
+
+#include <tools/tenccvt.hxx>
+namespace binfilter {
+
+/*N*/ DBG_NAME( EE_EditTextObject )
+/*N*/ DBG_NAME( XEditAttribute )
+
+//--------------------------------------------------------------
+
+/*N*/ BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, SvxBulletItem& rBullet )
+/*N*/ {
+/*N*/ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel );
+/*N*/ if ( pFmt )
+/*N*/ {
+/*N*/ rBullet.SetWidth( (-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance() );
+/*N*/ rBullet.SetSymbol( pFmt->GetBulletChar() );
+/*N*/ rBullet.SetPrevText( pFmt->GetPrefix() );
+/*N*/ rBullet.SetFollowText( pFmt->GetSuffix() );
+/*N*/ rBullet.SetStart( pFmt->GetStart() );
+/*N*/ rBullet.SetScale( pFmt->GetBulletRelSize() );
+/*N*/
+/*N*/ Font aBulletFont( rBullet.GetFont() );
+/*N*/ if ( pFmt->GetBulletFont() )
+/*N*/ aBulletFont = *pFmt->GetBulletFont();
+/*N*/ aBulletFont.SetColor( pFmt->GetBulletColor() );
+/*N*/ rBullet.SetFont( aBulletFont );
+/*N*/
+/*N*/ if ( pFmt->GetBrush() && pFmt->GetBrush()->GetGraphic() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 Bitmap aBmp( pFmt->GetBrush()->GetGraphic()->GetBitmap() );
+/*N*/ }
+/*N*/
+/*N*/ switch ( pFmt->GetNumberingType() )
+/*N*/ {
+/*?*/ 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:
+/*N*/ rBullet.SetStyle( BS_BULLET );
+/*N*/ 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" );
+/*N*/ }
+/*N*/
+/*N*/ switch ( pFmt->GetNumAdjust() )
+/*N*/ {
+/*N*/ case SVX_ADJUST_LEFT:
+/*N*/ rBullet.SetJustification( BJ_VCENTER|BJ_HLEFT );
+/*N*/ 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" );
+/*N*/ }
+/*N*/ }
+/*N*/ return pFmt ? TRUE : FALSE;
+/*N*/ }
+
+
+/*N*/ XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ // das neue Attribut im Pool anlegen
+/*N*/ const SfxPoolItem& rNew = rPool.Put( rItem );
+/*N*/
+/*N*/ XEditAttribute* pNew = new XEditAttribute( rNew, nStart, nEnd );
+/*N*/ return pNew;
+/*N*/ }
+
+
+
+/*N*/ XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+/*N*/ {
+/*N*/ DBG_CTOR( XEditAttribute, 0 );
+/*N*/ pItem = &rAttr;
+/*N*/ nStart = nS;
+/*N*/ nEnd = nE;
+/*N*/ }
+
+/*N*/ XEditAttribute::~XEditAttribute()
+/*N*/ {
+/*N*/ DBG_DTOR( XEditAttribute, 0 );
+/*N*/ pItem = 0; // Gehoert dem Pool.
+/*N*/ }
+
+/*N*/ XEditAttribute* XEditAttributeList::FindAttrib( USHORT nWhich, USHORT nChar ) const
+/*N*/ {
+/*N*/ for ( USHORT n = Count(); n; )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = GetObject( --n );
+/*N*/ if( ( pAttr->GetItem()->Which() == nWhich ) && ( pAttr->GetStart() <= nChar ) && ( pAttr->GetEnd() > nChar ) )
+/*N*/ return pAttr;
+/*N*/ }
+/*N*/ return NULL;
+/*N*/ }
+
+/*N*/ ContentInfo::ContentInfo( SfxItemPool& rPool ) : aParaAttribs( rPool, EE_PARA_START, EE_CHAR_END )
+/*N*/ {
+/*N*/ eFamily = SFX_STYLE_FAMILY_PARA;
+/*N*/ pTempLoadStoreInfos = NULL;
+/*N*/ }
+
+// Richtiger CopyCTOR unsinning, weil ich mit einem anderen Pool arbeiten muss!
+/*N*/ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse )
+/*N*/ : aParaAttribs( rPoolToUse, EE_PARA_START, EE_CHAR_END )
+/*N*/ {
+/*N*/ pTempLoadStoreInfos = NULL;
+/*N*/ // So sollten die Items im richtigen Pool landen!
+/*N*/ aParaAttribs.Set( rCopyFrom.GetParaAttribs() );
+/*N*/ aText = rCopyFrom.GetText();
+/*N*/ aStyle = rCopyFrom.GetStyle();
+/*N*/ eFamily = rCopyFrom.GetFamily();
+/*N*/
+/*N*/ // Attribute kopieren...
+/*N*/ for ( USHORT n = 0; n < rCopyFrom.GetAttribs().Count(); n++ )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = rCopyFrom.GetAttribs().GetObject( n );
+/*N*/ XEditAttribute* pMyAttr = MakeXEditAttribute( rPoolToUse, *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
+/*N*/ aAttribs.Insert( pMyAttr, aAttribs.Count() );
+/*N*/ }
+/*N*/ }
+
+/*N*/ ContentInfo::~ContentInfo()
+/*N*/ {
+/*N*/ for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = aAttribs.GetObject(nAttr);
+/*N*/ // Item aus Pool entfernen!
+/*N*/ aParaAttribs.GetPool()->Remove( *pAttr->GetItem() );
+/*N*/ delete pAttr;
+/*N*/ }
+/*N*/ aAttribs.Remove( 0, aAttribs.Count() );
+/*N*/ }
+
+/*N*/ void ContentInfo::CreateLoadStoreTempInfos()
+/*N*/ {
+/*N*/ delete pTempLoadStoreInfos;
+/*N*/ pTempLoadStoreInfos = new LoadStoreTempInfos;
+/*N*/ }
+
+/*N*/ void ContentInfo::DestroyLoadStoreTempInfos()
+/*N*/ {
+/*N*/ delete pTempLoadStoreInfos;
+/*N*/ pTempLoadStoreInfos = NULL;
+/*N*/ }
+
+/*N*/ EditTextObject::EditTextObject( USHORT n)
+/*N*/ {
+/*N*/ DBG_CTOR( EE_EditTextObject, 0 );
+/*N*/ nWhich = n;
+/*N*/ }
+
+/*N*/ EditTextObject::EditTextObject( const EditTextObject& r )
+/*N*/ {
+/*N*/ DBG_CTOR( EE_EditTextObject, 0 );
+/*N*/ nWhich = r.nWhich;
+/*N*/ }
+
+/*N*/ __EXPORT EditTextObject::~EditTextObject()
+/*N*/ {
+/*N*/ DBG_DTOR( EE_EditTextObject, 0 );
+/*N*/ }
+
+/*N*/ USHORT EditTextObject::GetParagraphCount() const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ XubString EditTextObject::GetText( USHORT nParagraph ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return XubString();//STRIP001
+/*N*/ }
+
+/*N*/ void EditTextObject::Insert( const EditTextObject& rObj, USHORT nPara )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+
+
+
+/*N*/ void EditTextObject::ClearPortionInfo()
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+
+
+
+/*N*/ void EditTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+
+
+/*N*/ BOOL EditTextObject::HasField( TypeId aType ) const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ SfxItemSet EditTextObject::GetParaAttribs( USHORT nPara ) const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return SfxItemSet( *(SfxItemPool*)NULL );
+/*N*/ }
+
+
+
+
+
+/*N*/ void EditTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ void EditTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ BOOL __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily,
+/*N*/ const XubString&, SfxStyleFamily )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily,
+/*N*/ const XubString& rOldName, const XubString& rNewName )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ USHORT EditTextObject::GetUserType() const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ void EditTextObject::SetUserType( USHORT n )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+
+
+/*N*/ BOOL EditTextObject::IsVertical() const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void EditTextObject::SetVertical( BOOL bVertical )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+
+/*N*/ BOOL EditTextObject::Store( SvStream& rOStream ) const
+/*N*/ {
+/*N*/ if ( rOStream.GetError() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ // Vorspann:
+/*N*/ ULONG nStartPos = rOStream.Tell();
+/*N*/
+/*N*/ USHORT nWhich = Which();
+/*N*/ rOStream << nWhich;
+/*N*/
+/*N*/ sal_uInt32 nStructSz = 0;
+/*N*/ rOStream << nStructSz;
+/*N*/
+/*N*/ // Eigene Daten:
+/*N*/ StoreData( rOStream );
+/*N*/
+/*N*/ // Nachspann:
+/*N*/ ULONG nEndPos = rOStream.Tell();
+/*N*/ nStructSz = nEndPos - nStartPos - sizeof( nWhich ) - sizeof( nStructSz );
+/*N*/ rOStream.Seek( nStartPos + sizeof( nWhich ) );
+/*N*/ rOStream << nStructSz;
+/*N*/ rOStream.Seek( nEndPos );
+/*N*/
+/*N*/ return rOStream.GetError() ? FALSE : TRUE;
+/*N*/ }
+
+/*N*/ EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool )
+/*N*/ {
+/*N*/ ULONG nStartPos = rIStream.Tell();
+/*N*/
+/*N*/ // Ertmal sehen, was fuer ein Object...
+/*N*/ USHORT nWhich;
+/*N*/ rIStream >> nWhich;
+/*N*/
+/*N*/ sal_uInt32 nStructSz;
+/*N*/ rIStream >> nStructSz;
+/*N*/
+/*N*/ DBG_ASSERT( ( nWhich == 0x22 /*EE_FORMAT_BIN300*/ ) || ( nWhich == EE_FORMAT_BIN ), "CreateTextObject: Unbekanntes Objekt!" );
+/*N*/
+/*N*/ if ( rIStream.GetError() )
+/*N*/ return NULL;
+/*N*/
+/*N*/ EditTextObject* pTxtObj = NULL;
+/*N*/ switch ( nWhich )
+/*N*/ {
+/*N*/ case 0x22 /*BIN300*/: pTxtObj = new BinTextObject( 0 );
+/*N*/ ((BinTextObject*)pTxtObj)->CreateData300( rIStream );
+/*N*/ break;
+/*N*/ case EE_FORMAT_BIN: pTxtObj = new BinTextObject( pGlobalTextObjectPool );
+/*N*/ pTxtObj->CreateData( rIStream );
+/*N*/ break;
+/*N*/ default:
+/*N*/ {
+/*N*/ // Wenn ich das Format nicht kenne, ueberlese ich den Inhalt:
+/*?*/ rIStream.SetError( EE_READWRITE_WRONGFORMAT );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Sicherstellen, dass der Stream an der richtigen Stelle hinterlassen wird.
+/*N*/ ULONG nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
+/*N*/ rIStream.Seek( nStartPos + nFullSz );
+/*N*/ return pTxtObj;
+/*N*/ }
+
+
+/*N*/ void __EXPORT EditTextObject::StoreData( SvStream& rOStream ) const
+/*N*/ {
+/*N*/ DBG_ERROR( "StoreData: Basisklasse!" );
+/*N*/ }
+
+/*N*/ void __EXPORT EditTextObject::CreateData( SvStream& rIStream )
+/*N*/ {
+/*N*/ DBG_ERROR( "CreateData: Basisklasse!" );
+/*N*/ }
+
+/*N*/ USHORT EditTextObject::GetVersion() const
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ return 0;
+/*N*/ }
+
+
+/*N*/ void EditTextObject::AdjustImportedLRSpaceItems( BOOL bTurnOfBullets )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ void EditTextObject::PrepareStore( SfxStyleSheetPool* pStyleSheetPool )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ void EditTextObject::FinishStore()
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ void EditTextObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool )
+/*N*/ {
+/*N*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+/*N*/ }
+
+/*N*/ BinTextObject::BinTextObject( SfxItemPool* pP ) :
+/*N*/ EditTextObject( EE_FORMAT_BIN )
+/*N*/ {
+/*N*/ nVersion = 0;
+/*N*/ nMetric = 0xFFFF;
+/*N*/ nUserType = 0;
+/*N*/ nObjSettings = 0;
+/*N*/ pPortionInfo = 0;
+/*N*/ if ( pP )
+/*N*/ {
+/*N*/ pPool = pP;
+/*N*/ bOwnerOfPool = FALSE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pPool = EditEngine::CreatePool();
+/*N*/ bOwnerOfPool = TRUE;
+/*N*/ }
+/*N*/ bVertical = FALSE;
+/*N*/ bStoreUnicodeStrings = FALSE;
+/*N*/ nScriptType = 0;
+/*N*/ }
+
+/*N*/ BinTextObject::BinTextObject( const BinTextObject& r ) :
+/*N*/ EditTextObject( r )
+/*N*/ {
+/*N*/ nVersion = r.nVersion;
+/*N*/ nMetric = r.nMetric;
+/*N*/ nUserType = r.nUserType;
+/*N*/ nObjSettings = r.nObjSettings;
+/*N*/ bVertical = r.bVertical;
+/*N*/ nScriptType = r.nScriptType;
+/*N*/ pPortionInfo = NULL; // PortionInfo nicht kopieren
+/*N*/ bStoreUnicodeStrings = FALSE;
+/*N*/ if ( !r.bOwnerOfPool )
+/*N*/ {
+/*N*/ // Dann den Pool mitverwenden
+/*N*/ pPool = r.pPool;
+/*N*/ bOwnerOfPool = FALSE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pPool = EditEngine::CreatePool();
+/*N*/ bOwnerOfPool = TRUE;
+/*N*/
+/*N*/ }
+/*N*/
+/*N*/ if ( bOwnerOfPool && pPool && r.pPool )
+/*N*/ pPool->SetDefaultMetric( r.pPool->GetMetric( DEF_METRIC ) );
+/*N*/
+/*N*/ for ( USHORT n = 0; n < r.aContents.Count(); n++ )
+/*N*/ {
+/*N*/ ContentInfo* pOrg = r.aContents.GetObject( n );
+/*N*/ DBG_ASSERT( pOrg, "NULL-Pointer in ContentList!" );
+/*N*/ ContentInfo* pNew = new ContentInfo( *pOrg, *pPool );
+/*N*/ aContents.Insert( pNew, aContents.Count() );
+/*N*/ }
+/*N*/ }
+
+/*N*/ __EXPORT BinTextObject::~BinTextObject()
+/*N*/ {
+/*N*/ ClearPortionInfo();
+/*N*/ DeleteContents();
+/*N*/ if ( bOwnerOfPool )
+/*N*/ {
+/*N*/ // Nicht mehr, wegen 1xDefItems.
+/*N*/ // siehe auch ~EditDoc().
+/*N*/ // pPool->ReleaseDefaults( TRUE /* bDelete */ );
+/*N*/ delete pPool;
+/*N*/ }
+/*N*/ }
+
+/*N*/ USHORT BinTextObject::GetUserType() const
+/*N*/ {
+/*N*/ return nUserType;
+/*N*/ }
+
+/*N*/ void BinTextObject::SetUserType( USHORT n )
+/*N*/ {
+/*N*/ nUserType = n;
+/*N*/ }
+
+
+
+/*N*/ BOOL BinTextObject::IsVertical() const
+/*N*/ {
+/*N*/ return bVertical;
+/*N*/ }
+
+/*N*/ void BinTextObject::SetVertical( BOOL b )
+/*N*/ {
+/*N*/ if ( b != bVertical )
+/*N*/ {
+/*?*/ bVertical = b;
+/*?*/ ClearPortionInfo();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void BinTextObject::SetScriptType( USHORT nType )
+/*N*/ {
+/*N*/ nScriptType = nType;
+/*N*/ }
+
+
+/*N*/ void BinTextObject::DeleteContents()
+/*N*/ {
+/*N*/ for ( USHORT n = 0; n < aContents.Count(); n++ )
+/*N*/ {
+/*N*/ ContentInfo* p = aContents.GetObject( n );
+/*N*/ DBG_ASSERT( p, "NULL-Pointer in ContentList!" );
+/*N*/ delete p;
+/*N*/ }
+/*N*/ aContents.Remove( 0, aContents.Count() );
+/*N*/ }
+
+/*N*/ EditTextObject* __EXPORT BinTextObject::Clone() const
+/*N*/ {
+/*N*/ return new BinTextObject( *this );
+/*N*/ }
+
+/*N*/ XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ return MakeXEditAttribute( *pPool, rItem, nStart, nEnd );
+/*N*/ }
+
+/*N*/ void BinTextObject::DestroyAttrib( XEditAttribute* pAttr )
+/*N*/ {
+/*N*/ pPool->Remove( *pAttr->GetItem() );
+/*N*/ delete pAttr;
+/*N*/ }
+
+/*N*/ ContentInfo* BinTextObject::CreateAndInsertContent()
+/*N*/ {
+/*N*/ ContentInfo* pC = new ContentInfo( *pPool );
+/*N*/ aContents.Insert( pC, aContents.Count() );
+/*N*/ return pC;
+/*N*/ }
+
+/*N*/ USHORT BinTextObject::GetParagraphCount() const
+/*N*/ {
+/*N*/ return aContents.Count();
+/*N*/ }
+
+/*N*/ XubString BinTextObject::GetText( USHORT nPara ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" );
+/*N*/ if ( nPara < aContents.Count() )
+/*N*/ {
+/*N*/ ContentInfo* pC = aContents[ nPara ];
+/*N*/ return pC->GetText();
+/*N*/ }
+/*?*/ return XubString();
+/*N*/ }
+
+/*N*/ void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara )
+/*N*/ {
+/*N*/ DBG_ASSERT( rObj.Which() == EE_FORMAT_BIN, "UTO: Unbekanntes Textobjekt" );
+/*N*/
+/*N*/ const BinTextObject& rBinObj = (const BinTextObject&)rObj;
+/*N*/
+/*N*/ if ( nDestPara > aContents.Count() )
+/*N*/ nDestPara = aContents.Count();
+/*N*/
+/*N*/ const USHORT nParas = rBinObj.GetContents().Count();
+/*N*/ for ( USHORT nP = 0; nP < nParas; nP++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = rBinObj.GetContents()[ nP ];
+/*N*/ ContentInfo* pNew = new ContentInfo( *pC, *GetPool() );
+/*N*/ aContents.Insert( pNew, nDestPara+nP );
+/*N*/ }
+/*N*/ ClearPortionInfo();
+/*N*/ }
+
+
+
+
+/*N*/ void BinTextObject::ClearPortionInfo()
+/*N*/ {
+/*N*/ if ( pPortionInfo )
+/*N*/ {
+/*?*/ for ( USHORT n = pPortionInfo->Count(); n; )
+/*?*/ delete pPortionInfo->GetObject( --n );
+/*?*/ delete pPortionInfo;
+/*?*/ pPortionInfo = NULL;
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ BOOL bChanged = FALSE;
+/*N*/
+/*N*/ for ( USHORT nPara = GetContents().Count(); nPara; )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( --nPara );
+/*N*/
+/*N*/ for ( USHORT nW = nStart; nW <= nEnd; nW++ )
+/*N*/ {
+/*N*/ if ( ( pC->GetParaAttribs().GetItemState( nW, FALSE ) != SFX_ITEM_ON )
+/*N*/ && ( rAttribs.GetItemState( nW, FALSE ) == SFX_ITEM_ON ) )
+/*N*/ {
+/*N*/ pC->GetParaAttribs().Put( rAttribs.Get( nW ) );
+/*N*/ bChanged = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( bChanged )
+/*N*/ ClearPortionInfo();
+/*N*/ }
+
+
+
+/*N*/ BOOL BinTextObject::HasField( TypeId aType ) const
+/*N*/ {
+/*N*/ USHORT nParagraphs = GetContents().Count();
+/*N*/ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( nPara );
+/*N*/ USHORT nAttrs = pC->GetAttribs().Count();
+/*N*/ for ( USHORT nAttr = 0; nAttr < nAttrs; nAttr++ )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = pC->GetAttribs()[nAttr];
+/*N*/ if ( pAttr->GetItem()->Which() == EE_FEATURE_FIELD )
+/*N*/ {
+/*N*/ if ( !aType )
+/*N*/ return TRUE;
+/*N*/
+/*N*/ const SvxFieldData* pFldData = ((const SvxFieldItem*)pAttr->GetItem())->GetField();
+/*N*/ if ( pFldData && pFldData->IsA( aType ) )
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ SfxItemSet BinTextObject::GetParaAttribs( USHORT nPara ) const
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( nPara );
+/*N*/ return pC->GetParaAttribs();
+/*N*/ }
+
+
+
+
+
+/*N*/ void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& rFamily ) const
+/*N*/ {
+/*N*/ if ( nPara < aContents.Count() )
+/*N*/ {
+/*N*/ ContentInfo* pC = aContents[ nPara ];
+/*N*/ rName = pC->GetStyle();
+/*N*/ rFamily = pC->GetFamily();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& rFamily )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ BOOL BinTextObject::ImpChangeStyleSheets(
+/*N*/ const XubString& rOldName, SfxStyleFamily eOldFamily,
+/*N*/ const XubString& rNewName, SfxStyleFamily eNewFamily )
+/*N*/ {
+/*N*/ const USHORT nParagraphs = GetContents().Count();
+/*N*/ BOOL bChanges = FALSE;
+/*N*/
+/*N*/ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( nPara );
+/*N*/ if ( pC->GetFamily() == eOldFamily )
+/*N*/ {
+/*N*/ if ( pC->GetStyle() == rOldName )
+/*N*/ {
+/*N*/ pC->GetStyle() = rNewName;
+/*N*/ pC->GetFamily() = eNewFamily;
+/*N*/ bChanges = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return bChanges;
+/*N*/ }
+
+/*N*/ BOOL __EXPORT BinTextObject::ChangeStyleSheets(
+/*N*/ const XubString& rOldName, SfxStyleFamily eOldFamily,
+/*N*/ const XubString& rNewName, SfxStyleFamily eNewFamily )
+/*N*/ {
+/*N*/ BOOL bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily );
+/*N*/ if ( bChanges )
+/*N*/ ClearPortionInfo();
+/*N*/
+/*N*/ return bChanges;
+/*N*/ }
+
+/*N*/ void __EXPORT BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily,
+/*N*/ const XubString& rOldName, const XubString& rNewName )
+/*N*/ {
+/*N*/ ImpChangeStyleSheets( rOldName, eFamily, rNewName, eFamily );
+/*N*/ }
+
+/*N*/ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const
+/*N*/ {
+/*N*/ USHORT nVer = 602;
+/*N*/ rOStream << nVer;
+/*N*/
+/*N*/ rOStream << bOwnerOfPool;
+/*N*/
+/*N*/ // Erst den Pool speichern, spaeter nur noch Surregate
+/*N*/ if ( bOwnerOfPool )
+/*N*/ {
+/*N*/ GetPool()->SetFileFormatVersion( SOFFICE_FILEFORMAT_50 );
+/*N*/ GetPool()->Store( rOStream );
+/*N*/ }
+/*N*/
+/*N*/ // Aktuelle Zeichensatz speichern...
+/*N*/ // #90477# GetSOStoreTextEncoding: Bug in 5.2, when default char set is multi byte text encoding
+/*N*/ rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), (USHORT) rOStream.GetVersion() );
+/*N*/ rOStream << (USHORT) eEncoding;
+/*N*/
+/*N*/ // Die Anzahl der Absaetze...
+/*N*/ USHORT nParagraphs = GetContents().Count();
+/*N*/ rOStream << nParagraphs;
+/*N*/
+/*N*/ char cFeatureConverted = ByteString( CH_FEATURE, eEncoding ).GetChar(0);
+/*N*/
+/*N*/ // Die einzelnen Absaetze...
+/*N*/ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( nPara );
+/*N*/
+/*N*/ // Text...
+/*N*/ ByteString aText( pC->GetText(), eEncoding );
+/*N*/
+/*N*/ // Symbols?
+/*N*/ BOOL bSymbolPara = FALSE;
+/*N*/ if ( pC->GetLoadStoreTempInfos() && pC->GetLoadStoreTempInfos()->bSymbolParagraph_Store )
+/*N*/ {
+/*?*/ DBG_ASSERT( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_ON, "Why bSymbolParagraph_Store?" );
+/*?*/ aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL );
+/*?*/ bSymbolPara = TRUE;
+/*N*/ }
+/*N*/ else if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
+/*N*/ if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
+/*N*/ {
+/*?*/ aText = ByteString( pC->GetText(), RTL_TEXTENCODING_SYMBOL );
+/*?*/ bSymbolPara = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ for ( USHORT nA = 0; nA < pC->GetAttribs().Count(); nA++ )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = pC->GetAttribs().GetObject( nA );
+/*N*/
+/*N*/ if ( pAttr->GetItem()->Which() == EE_CHAR_FONTINFO )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)*pAttr->GetItem();
+/*N*/ if ( ( !bSymbolPara && ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) )
+/*N*/ || ( bSymbolPara && ( rFontItem.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
+/*N*/ {
+/*N*/ // Not correctly converted
+/*N*/ String aPart( pC->GetText(), pAttr->GetStart(), pAttr->GetEnd() - pAttr->GetStart() );
+/*N*/ ByteString aNew( aPart, rFontItem.GetCharSet() );
+/*N*/ aText.Erase( pAttr->GetStart(), pAttr->GetEnd() - pAttr->GetStart() );
+/*N*/ aText.Insert( aNew, pAttr->GetStart() );
+/*N*/ }
+/*N*/
+/*N*/ // #88414# Convert StarSymbol back to StarBats
+/*N*/ FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
+/*N*/ if ( hConv )
+/*N*/ {
+/*N*/ // Don't create a new Attrib with StarBats font, MBR changed the
+/*N*/ // SvxFontItem::Store() to store StarBats instead of StarSymbol!
+/*N*/ for ( USHORT nChar = pAttr->GetStart(); nChar < pAttr->GetEnd(); nChar++ )
+/*N*/ {
+/*N*/ sal_Unicode cOld = pC->GetText().GetChar( nChar );
+/*N*/ char cConv = ByteString::ConvertFromUnicode( ConvertFontToSubsFontChar( hConv, cOld ), RTL_TEXTENCODING_SYMBOL );
+/*N*/ if ( cConv )
+/*N*/ aText.SetChar( nChar, cConv );
+/*N*/ }
+/*N*/
+/*N*/ DestroyFontToSubsFontConverter( hConv );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // #88414# Convert StarSymbol back to StarBats
+/*N*/ // StarSymbol as paragraph attribute or in StyleSheet?
+/*N*/
+/*N*/ FontToSubsFontConverter hConv = NULL;
+/*N*/ if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ hConv = CreateFontToSubsFontConverter( ((const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO )).GetFamilyName(), FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
+/*N*/ }
+/*N*/ else if ( pC->GetStyle().Len() && pC->GetLoadStoreTempInfos() )
+/*N*/ {
+/*?*/ hConv = pC->GetLoadStoreTempInfos()->hOldSymbolConv_Store;
+/*N*/ }
+/*N*/
+/*N*/ if ( hConv )
+/*N*/ {
+/*?*/ for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ )
+/*?*/ {
+/*?*/ if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) )
+/*?*/ {
+/*?*/ sal_Unicode cOld = pC->GetText().GetChar( nChar );
+/*?*/ char cConv = ByteString::ConvertFromUnicode( ConvertFontToSubsFontChar( hConv, cOld ), RTL_TEXTENCODING_SYMBOL );
+/*?*/ if ( cConv )
+/*?*/ aText.SetChar( nChar, cConv );
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ DestroyFontToSubsFontConverter( hConv );
+/*?*/
+/*?*/ if ( pC->GetLoadStoreTempInfos() )
+/*?*/ pC->GetLoadStoreTempInfos()->hOldSymbolConv_Store = NULL;
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // Convert CH_FEATURE to CH_FEATURE_OLD
+/*N*/ aText.SearchAndReplaceAll( cFeatureConverted, CH_FEATURE_OLD );
+/*N*/ rOStream.WriteByteString( aText );
+/*N*/
+/*N*/ // StyleName und Family...
+/*N*/ rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) );
+/*N*/ rOStream << (USHORT)pC->GetFamily();
+/*N*/
+/*N*/ // Absatzattribute...
+/*N*/ pC->GetParaAttribs().Store( rOStream );
+/*N*/
+/*N*/ // Die Anzahl der Attribute...
+/*N*/ USHORT nAttribs = pC->GetAttribs().Count();
+/*N*/ rOStream << nAttribs;
+/*N*/
+/*N*/ // Und die einzelnen Attribute
+/*N*/ // Items als Surregate => immer 8 Byte pro Attrib
+/*N*/ // Which = 2; Surregat = 2; Start = 2; End = 2;
+/*N*/ for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+/*N*/ {
+/*N*/ XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
+/*N*/
+/*N*/ rOStream << pX->GetItem()->Which();
+/*N*/ GetPool()->StoreSurrogate( rOStream, pX->GetItem() );
+/*N*/ rOStream << pX->GetStart();
+/*N*/ rOStream << pX->GetEnd();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Ab 400:
+/*N*/ rOStream << nMetric;
+/*N*/
+/*N*/ // Ab 600
+/*N*/ rOStream << nUserType;
+/*N*/ rOStream << nObjSettings;
+/*N*/
+/*N*/ // Ab 601
+/*N*/ rOStream << bVertical;
+/*N*/
+/*N*/ // Ab 602
+/*N*/ rOStream << nScriptType;
+/*N*/
+/*N*/ rOStream << bStoreUnicodeStrings;
+/*N*/ if ( bStoreUnicodeStrings )
+/*N*/ {
+/*?*/ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+/*?*/ {
+/*?*/ ContentInfo* pC = GetContents().GetObject( nPara );
+/*?*/ USHORT nL = pC->GetText().Len();
+/*?*/ rOStream << nL;
+/*?*/ rOStream.Write( pC->GetText().GetBuffer(), nL*sizeof(sal_Unicode) );
+/*?*/
+/*?*/ // #91575# StyleSheetName must be Unicode too!
+/*?*/ // Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed...
+/*?*/ // If needed, change nL back to ULONG and increase version...
+/*?*/ nL = pC->GetStyle().Len();
+/*?*/ rOStream << nL;
+/*?*/ rOStream.Write( pC->GetStyle().GetBuffer(), nL*sizeof(sal_Unicode) );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
+/*N*/ {
+/*N*/ rIStream >> nVersion;
+/*N*/
+/*N*/ // Das Textobject wurde erstmal mit der aktuellen Einstellung
+/*N*/ // von pTextObjectPool erzeugt.
+/*N*/ BOOL bOwnerOfCurrent = bOwnerOfPool;
+/*N*/ rIStream >> bOwnerOfPool;
+/*N*/
+/*N*/ if ( bOwnerOfCurrent && !bOwnerOfPool )
+/*N*/ {
+/*N*/ // Es wurde ein globaler Pool verwendet, mir jetzt nicht uebergeben,
+/*N*/ // aber ich brauche ihn!
+/*?*/ DBG_ERROR( "Man gebe mir den globalen TextObjectPool!" );
+/*?*/ return;
+/*N*/ }
+/*N*/ else if ( !bOwnerOfCurrent && bOwnerOfPool )
+/*N*/ {
+/*N*/ // Es soll ein globaler Pool verwendet werden, aber dieses
+/*N*/ // Textobject hat einen eigenen.
+/*N*/ pPool = EditEngine::CreatePool();
+/*N*/ }
+/*N*/
+/*N*/ if ( bOwnerOfPool )
+/*N*/ GetPool()->Load( rIStream );
+/*N*/
+/*N*/ // CharSet, in dem gespeichert wurde:
+/*N*/ USHORT nCharSet;
+/*N*/ rIStream >> nCharSet;
+/*N*/
+/*N*/ rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet, (USHORT)rIStream.GetVersion() );
+/*N*/
+/*N*/ // Die Anzahl der Absaetze...
+/*N*/ USHORT nParagraphs;
+/*N*/ rIStream >> nParagraphs;
+/*N*/
+/*N*/ // Die einzelnen Absaetze...
+/*N*/ for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = CreateAndInsertContent();
+/*N*/
+/*N*/ // Der Text...
+/*N*/ ByteString aByteString;
+/*N*/ rIStream.ReadByteString( aByteString );
+/*N*/ pC->GetText() = String( aByteString, eSrcEncoding );
+/*N*/
+/*N*/ // StyleName und Family...
+/*N*/ rIStream.ReadByteString( pC->GetStyle(), eSrcEncoding );
+/*N*/ USHORT nStyleFamily;
+/*N*/ rIStream >> nStyleFamily;
+/*N*/ pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
+/*N*/
+/*N*/ // Absatzattribute...
+/*N*/ pC->GetParaAttribs().Load( rIStream );
+/*N*/
+/*N*/ // Die Anzahl der Attribute...
+/*N*/ USHORT nAttribs;
+/*N*/ rIStream >> nAttribs;
+/*N*/
+/*N*/ // Und die einzelnen Attribute
+/*N*/ // Items als Surregate => immer 8 Byte pro Attrib
+/*N*/ // Which = 2; Surregat = 2; Start = 2; End = 2;
+/*N*/ USHORT nAttr;
+/*N*/ for ( nAttr = 0; nAttr < nAttribs; nAttr++ )
+/*N*/ {
+/*N*/ USHORT nWhich, nStart, nEnd;
+/*N*/ const SfxPoolItem* pItem;
+/*N*/
+/*N*/ rIStream >> nWhich;
+/*N*/ nWhich = pPool->GetNewWhich( nWhich );
+/*N*/ pItem = pPool->LoadSurrogate( rIStream, nWhich, 0 );
+/*N*/ rIStream >> nStart;
+/*N*/ rIStream >> nEnd;
+/*N*/ if ( pItem )
+/*N*/ {
+/*N*/ if ( pItem->Which() == EE_FEATURE_NOTCONV )
+/*N*/ {
+/*?*/ pC->GetText().SetChar( nStart, ByteString::ConvertToUnicode( aByteString.GetChar( nStart ), ((SvxCharSetColorItem*)pItem)->GetCharSet() ) );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = new XEditAttribute( *pItem, nStart, nEnd );
+/*N*/ pC->GetAttribs().Insert( pAttr, pC->GetAttribs().Count() );
+/*N*/
+/*N*/ if ( ( nWhich >= EE_FEATURE_START ) && ( nWhich <= EE_FEATURE_END ) )
+/*N*/ {
+/*N*/ // Convert CH_FEATURE to CH_FEATURE_OLD
+/*N*/ DBG_ASSERT( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" );
+/*N*/ if ( (BYTE) aByteString.GetChar( nStart ) == CH_FEATURE_OLD )
+/*N*/ pC->GetText().SetChar( nStart, CH_FEATURE );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Symbol-Conversion neccessary?
+/*N*/ // All Strings are converted with the SourceCharSet in CreateData()...
+/*N*/
+/*N*/ // Keep old ByteString, maybe Symbol-Conversion neccessary, will be
+/*N*/ // checked in FinishLoad(), I need the StyleSheetPool for this...
+/*N*/ if ( pC->GetStyle().Len() && ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_ON ) )
+/*N*/ {
+/*N*/ pC->CreateLoadStoreTempInfos();
+/*N*/ pC->GetLoadStoreTempInfos()->aOrgString_Load = aByteString;
+/*N*/ }
+/*N*/
+/*N*/ // But check for paragraph and character symbol attribs here,
+/*N*/ // FinishLoad will not be called in OpenOffice Calc, no StyleSheets...
+/*N*/
+/*N*/ BOOL bSymbolPara = FALSE;
+/*N*/ if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
+/*N*/ if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
+/*N*/ {
+/*N*/ pC->GetText() = String( aByteString, RTL_TEXTENCODING_SYMBOL );
+/*N*/ bSymbolPara = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ for ( nAttr = pC->GetAttribs().Count(); nAttr; )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = pC->GetAttribs().GetObject( --nAttr );
+/*N*/ if ( pAttr->GetItem()->Which() == EE_CHAR_FONTINFO )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)*pAttr->GetItem();
+/*N*/ if ( ( !bSymbolPara && ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) )
+/*N*/ || ( bSymbolPara && ( rFontItem.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
+/*N*/ {
+/*N*/ // Not correctly converted
+/*N*/ ByteString aPart( aByteString, pAttr->GetStart(), pAttr->GetEnd()-pAttr->GetStart() );
+/*N*/ String aNew( aPart, rFontItem.GetCharSet() );
+/*N*/ pC->GetText().Erase( pAttr->GetStart(), pAttr->GetEnd()-pAttr->GetStart() );
+/*N*/ pC->GetText().Insert( aNew, pAttr->GetStart() );
+/*N*/ }
+/*N*/
+/*N*/ // #88414# Convert StarMath and StarBats to StarSymbol
+/*N*/ FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
+/*N*/ if ( hConv )
+/*N*/ {
+/*N*/ SvxFontItem aNewFontItem( rFontItem );
+/*N*/ aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+/*N*/
+/*N*/ pC->GetAttribs().Remove( nAttr );
+/*N*/ XEditAttribute* pNewAttr = CreateAttrib( aNewFontItem, pAttr->GetStart(), pAttr->GetEnd() );
+/*N*/ pC->GetAttribs().Insert( pNewAttr, nAttr );
+/*N*/ DestroyAttrib( pAttr );
+/*N*/
+/*N*/ for ( USHORT nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ )
+/*N*/ {
+/*N*/ sal_Unicode cOld = pC->GetText().GetChar( nChar );
+/*N*/ DBG_ASSERT( cOld >= 0xF000, "cOld not converted?!" );
+/*N*/ sal_Unicode cConv = ConvertFontToSubsFontChar( hConv, cOld );
+/*N*/ if ( cConv )
+/*N*/ pC->GetText().SetChar( nChar, cConv );
+/*N*/ }
+/*N*/
+/*N*/ DestroyFontToSubsFontConverter( hConv );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // #88414# Convert StarMath and StarBats to StarSymbol
+/*N*/ // Maybe old symbol font as paragraph attribute?
+/*N*/ if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
+/*N*/ FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
+/*N*/ if ( hConv )
+/*N*/ {
+/*N*/ SvxFontItem aNewFontItem( rFontItem );
+/*N*/ aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+/*N*/ pC->GetParaAttribs().Put( aNewFontItem );
+/*N*/
+/*N*/ for ( USHORT nChar = 0; nChar < pC->GetText().Len(); nChar++ )
+/*N*/ {
+/*N*/ if ( !pC->GetAttribs().FindAttrib( EE_CHAR_FONTINFO, nChar ) )
+/*N*/ {
+/*N*/ sal_Unicode cOld = pC->GetText().GetChar( nChar );
+/*N*/ DBG_ASSERT( cOld >= 0xF000, "cOld not converted?!" );
+/*N*/ sal_Unicode cConv = ConvertFontToSubsFontChar( hConv, cOld );
+/*N*/ if ( cConv )
+/*N*/ pC->GetText().SetChar( nChar, cConv );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DestroyFontToSubsFontConverter( hConv );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Ab 400 auch die DefMetric:
+/*N*/ if ( nVersion >= 400 )
+/*N*/ {
+/*N*/ USHORT nTmpMetric;
+/*N*/ rIStream >> nTmpMetric;
+/*N*/ if ( nVersion >= 401 )
+/*N*/ {
+/*N*/ // In der 400 gab es noch einen Bug bei Textobjekten mit eigenem
+/*N*/ // Pool, deshalb erst ab 401 auswerten.
+/*N*/ nMetric = nTmpMetric;
+/*N*/ if ( bOwnerOfPool && pPool && ( nMetric != 0xFFFF ) )
+/*N*/ pPool->SetDefaultMetric( (SfxMapUnit)nMetric );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( nVersion >= 600 )
+/*N*/ {
+/*N*/ rIStream >> nUserType;
+/*N*/ rIStream >> nObjSettings;
+/*N*/ }
+/*N*/
+/*N*/ if ( nVersion >= 601 )
+/*N*/ {
+/*N*/ rIStream >> bVertical;
+/*N*/ }
+/*N*/
+/*N*/ if ( nVersion >= 602 )
+/*N*/ {
+/*N*/ rIStream >> nScriptType;
+/*N*/
+/*N*/ BOOL bUnicodeStrings;
+/*N*/ rIStream >> bUnicodeStrings;
+/*N*/ if ( bUnicodeStrings )
+/*N*/ {
+/*?*/ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+/*?*/ {
+/*?*/ ContentInfo* pC = GetContents().GetObject( nPara );
+/*?*/ USHORT nL;
+/*?*/
+/*?*/ // Text
+/*?*/ rIStream >> nL;
+/*?*/ if ( nL )
+/*?*/ {
+/*?*/ pC->GetText().AllocBuffer( nL );
+/*?*/ rIStream.Read( pC->GetText().GetBufferAccess(), nL*sizeof(sal_Unicode) );
+/*?*/ pC->GetText().ReleaseBufferAccess( (USHORT)nL );
+/*?*/ }
+/*?*/
+/*?*/ // StyleSheetName
+/*?*/ rIStream >> nL;
+/*?*/ if ( nL )
+/*?*/ {
+/*?*/ pC->GetStyle().AllocBuffer( nL );
+/*?*/ rIStream.Read( pC->GetStyle().GetBufferAccess(), nL*sizeof(sal_Unicode) );
+/*?*/ pC->GetStyle().ReleaseBufferAccess( (USHORT)nL );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // Ab 500 werden die Tabs anders interpretiert: TabPos + LI, vorher nur TabPos.
+/*N*/ // Wirkt nur wenn auch Tab-Positionen eingestellt wurden, nicht beim DefTab.
+/*N*/ if ( nVersion < 500 )
+/*N*/ {
+/*N*/ for ( USHORT n = 0; n < aContents.Count(); n++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = aContents.GetObject( n );
+/*N*/ const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( EE_PARA_LRSPACE );
+/*N*/ if ( rLRSpace.GetTxtLeft() && ( pC->GetParaAttribs().GetItemState( EE_PARA_TABS ) == SFX_ITEM_ON ) )
+/*N*/ {
+/*N*/ const SvxTabStopItem& rTabs = (const SvxTabStopItem&) pC->GetParaAttribs().Get( EE_PARA_TABS );
+/*N*/ SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS );
+/*N*/ for ( USHORT t = 0; t < rTabs.Count(); t++ )
+/*N*/ {
+/*N*/ const SvxTabStop& rT = rTabs[ t ];
+/*N*/ aNewTabs.Insert( SvxTabStop( rT.GetTabPos() - rLRSpace.GetTxtLeft(),
+/*N*/ rT.GetAdjustment(), rT.GetDecimal(), rT.GetFill() ) );
+/*N*/ }
+/*N*/ pC->GetParaAttribs().Put( aNewTabs );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ USHORT BinTextObject::GetVersion() const
+/*N*/ {
+/*N*/ return nVersion;
+/*N*/ }
+
+
+/*N*/ void BinTextObject::PrepareStore( SfxStyleSheetPool* pStyleSheetPool )
+/*N*/ {
+/*N*/ // Some Items must be generated for the 5.0 file format,
+/*N*/ // because we don't have a special format for 5.x or 6.x
+/*N*/ USHORT nParas = GetContents().Count();
+/*N*/ const SvxNumBulletItem** ppNumBulletItems = new const SvxNumBulletItem*[nParas];
+/*N*/ for ( USHORT nPara = nParas; nPara; )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( --nPara );
+/*N*/ const SvxNumBulletItem* pSvxNumBulletItem = NULL;
+/*N*/ const SfxPoolItem* pTmpItem = NULL;
+/*N*/ if ( pC->GetParaAttribs().GetItemState(EE_PARA_NUMBULLET, FALSE, &pTmpItem ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ pSvxNumBulletItem = (const SvxNumBulletItem*)pTmpItem;
+/*N*/ }
+/*N*/ else if ( pStyleSheetPool && pC->GetStyle().Len() )
+/*N*/ {
+/*N*/ SfxStyleSheet* pStyle = (SfxStyleSheet*)pStyleSheetPool->Find( pC->GetStyle(), pC->GetFamily() );
+/*N*/ if ( pStyle )
+/*N*/ pSvxNumBulletItem = &(const SvxNumBulletItem&)pStyle->GetItemSet().Get(EE_PARA_NUMBULLET);
+/*N*/ }
+/*N*/
+/*N*/ ppNumBulletItems[nPara] = pSvxNumBulletItem;
+/*N*/
+/*N*/ if ( pSvxNumBulletItem )
+/*N*/ {
+/*N*/ // Check if Item allready used, don't create a new one in this case.
+/*N*/ BOOL bInserted = FALSE;
+/*N*/ for ( USHORT nP = nPara+1; nP < nParas; nP++ )
+/*N*/ {
+/*N*/ if ( ppNumBulletItems[nP] == pSvxNumBulletItem )
+/*N*/ {
+/*N*/ ContentInfo* pTmpC = GetContents().GetObject( nP );
+/*N*/ pC->GetParaAttribs().Put( pTmpC->GetParaAttribs().Get( EE_PARA_BULLET ) );
+/*N*/ bInserted = TRUE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ if ( !bInserted )
+/*N*/ {
+/*N*/ SvxBulletItem aNewBullet( EE_PARA_BULLET );
+/*N*/ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pC->GetParaAttribs().Get( EE_PARA_OUTLLEVEL );
+/*N*/ lcl_CreateBulletItem( *pSvxNumBulletItem, rLevel.GetValue(), aNewBullet );
+/*N*/ pC->GetParaAttribs().Put( aNewBullet );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // SymbolConvertion because of StyleSheet?
+/*N*/ // Cannot be checked in StoreData, no StyleSheetPool, so do it here...
+/*N*/
+/*N*/ pC->DestroyLoadStoreTempInfos(); // Maybe old infos, if somebody is not calling FinishLoad after CreateData, but PrepareStore...
+/*N*/
+/*N*/ if ( ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_ON ) && pC->aStyle.Len() && pStyleSheetPool )
+/*N*/ {
+/*N*/ SfxStyleSheet* pStyle = (SfxStyleSheet*)pStyleSheetPool->Find( pC->GetStyle(), pC->GetFamily() );
+/*N*/ if ( pStyle )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)pStyle->GetItemSet().Get( EE_CHAR_FONTINFO );
+/*N*/ if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
+/*N*/ {
+/*?*/ if ( !pC->GetLoadStoreTempInfos() )
+/*?*/ pC->CreateLoadStoreTempInfos();
+/*?*/ pC->GetLoadStoreTempInfos()->bSymbolParagraph_Store = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
+/*N*/ if ( hConv )
+/*N*/ {
+/*?*/ // #88414# Convert StarSymbol back to StarBats
+/*?*/ if ( !pC->GetLoadStoreTempInfos() )
+/*?*/ pC->CreateLoadStoreTempInfos();
+/*?*/ pC->GetLoadStoreTempInfos()->hOldSymbolConv_Store = hConv;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ delete[] ppNumBulletItems;
+/*N*/ }
+
+/*N*/ void BinTextObject::FinishStore()
+/*N*/ {
+/*N*/ for ( USHORT nPara = GetContents().Count(); nPara; )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( --nPara );
+/*N*/ pC->GetParaAttribs().ClearItem( EE_PARA_BULLET );
+/*N*/
+/*N*/ pC->DestroyLoadStoreTempInfos();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void BinTextObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool )
+/*N*/ {
+/*N*/ BOOL bCreateNumBulletItem = nVersion && ( nVersion < 501 );
+/*N*/ for ( USHORT nPara = GetContents().Count(); nPara; )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( --nPara );
+/*N*/
+/*N*/ if( GetUserType() == 0x0003 ) // !! OUTLINERMODE_OUTLINEOBJECT !!
+/*N*/ {
+/*N*/ if ( pC->GetParaAttribs().GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+/*N*/ {
+/*?*/ SvxNumBulletItem* pNumBullet = (SvxNumBulletItem*) &pC->GetParaAttribs().Get( EE_PARA_NUMBULLET );
+/*?*/ if( pNumBullet->GetNumRule()->GetNumRuleType() != SVX_RULETYPE_PRESENTATION_NUMBERING )
+/*?*/ {
+/*?*/ pNumBullet->GetNumRule()->SetNumRuleType( SVX_RULETYPE_PRESENTATION_NUMBERING );
+/*?*/ pC->GetParaAttribs().Put( *pNumBullet, EE_PARA_NUMBULLET );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( bCreateNumBulletItem )
+/*N*/ {
+/*N*/ BOOL bBulletInPara = pC->GetParaAttribs().GetItemState( EE_PARA_BULLET ) == SFX_ITEM_ON;
+/*N*/ BOOL bLRSpaceInPara = pC->GetParaAttribs().GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON;
+/*N*/
+/*N*/ // Nur wenn ein Attribut hart gesetzt, ansonsten muss es in den Vorlagen
+/*N*/ // richtig konvertiert sein.
+/*N*/
+/*N*/ if ( bBulletInPara || bLRSpaceInPara )
+/*N*/ {
+/*N*/ const SvxBulletItem* pBullet = NULL;
+/*N*/ const SvxLRSpaceItem* pLRSpace = NULL;
+/*N*/ SvxNumBulletItem* pNumBullet = NULL;
+/*N*/ SfxStyleSheet* pStyle = NULL;
+/*N*/
+/*N*/ if ( pC->GetStyle().Len() )
+/*N*/ pStyle = (SfxStyleSheet*)pStyleSheetPool->Find( pC->GetStyle(), pC->GetFamily() );
+/*N*/
+/*N*/ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pC->GetParaAttribs().Get( EE_PARA_OUTLLEVEL );
+/*N*/ USHORT nLevel = rLevel.GetValue();
+/*N*/
+/*N*/ if ( !pStyle || bBulletInPara )
+/*N*/ pBullet = (const SvxBulletItem*) &pC->GetParaAttribs().Get( EE_PARA_BULLET );
+/*N*/ else
+/*N*/ pBullet = (const SvxBulletItem*) &pStyle->GetItemSet().Get( EE_PARA_BULLET );
+/*N*/
+/*N*/ if ( !pStyle || bLRSpaceInPara )
+/*N*/ pLRSpace = (const SvxLRSpaceItem*) &pC->GetParaAttribs().Get( EE_PARA_LRSPACE );
+/*N*/ else
+/*?*/ pLRSpace = (const SvxLRSpaceItem*) &pStyle->GetItemSet().Get( EE_PARA_LRSPACE );
+/*N*/
+/*N*/ if ( !pStyle || ( pC->GetParaAttribs().GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON ) )
+/*?*/ pNumBullet = (SvxNumBulletItem*) &pC->GetParaAttribs().Get( EE_PARA_NUMBULLET );
+/*N*/ else
+/*N*/ pNumBullet = (SvxNumBulletItem*) &pStyle->GetItemSet().Get( EE_PARA_NUMBULLET );
+/*N*/
+/*N*/ SvxNumBulletItem aNumBullet( *pNumBullet );
+/*N*/ EditEngine::ImportBulletItem( aNumBullet, nLevel, pBullet, pLRSpace );
+/*N*/ pC->GetParaAttribs().Put( aNumBullet );
+/*N*/
+/*N*/ if ( bLRSpaceInPara )
+/*N*/ pC->GetParaAttribs().ClearItem( EE_PARA_LRSPACE );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Symbol-Convertion because of StyleSheet?
+/*N*/ if ( pStyleSheetPool && pC->GetLoadStoreTempInfos() && pC->GetLoadStoreTempInfos()->aOrgString_Load.Len() )
+/*N*/ {
+/*N*/ SfxStyleSheet* pStyle = (SfxStyleSheet*)pStyleSheetPool->Find( pC->GetStyle(), pC->GetFamily() );
+/*N*/ if ( pStyle )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)pStyle->GetItemSet().Get( EE_CHAR_FONTINFO );
+/*N*/ if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
+/*N*/ {
+/*?*/ String aConverted( pC->GetLoadStoreTempInfos()->aOrgString_Load, RTL_TEXTENCODING_SYMBOL );
+/*?*/
+/*?*/ // Replace only Parts without hard font attribute, other symbol encoding
+/*?*/ // is already done in CreateData()...
+/*?*/
+/*?*/ USHORT nLastEnd = 0;
+/*?*/ for ( USHORT nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ )
+/*?*/ {
+/*?*/ XEditAttribute* pAttr = pC->GetAttribs().GetObject( nAttr );
+/*?*/ if ( pAttr->GetItem()->Which() == EE_CHAR_FONTINFO )
+/*?*/ {
+/*?*/ if ( nLastEnd < pAttr->GetStart() )
+/*?*/ {
+/*?*/ USHORT nLen = pAttr->GetStart() - nLastEnd;
+/*?*/ pC->GetText().Erase( nLastEnd, nLen );
+/*?*/ pC->GetText().Insert( aConverted, nLastEnd, nLen, nLastEnd );
+/*?*/ }
+/*?*/ nLastEnd = pAttr->GetEnd();
+/*?*/
+/*?*/ }
+/*?*/ }
+/*?*/ if ( nLastEnd < pC->GetText().Len() )
+/*?*/ {
+/*?*/ USHORT nLen = pC->GetText().Len() - nLastEnd;
+/*?*/ pC->GetText().Erase( nLastEnd, nLen );
+/*?*/ pC->GetText().Insert( aConverted, nLastEnd, nLen, nLastEnd );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ pC->DestroyLoadStoreTempInfos();
+/*N*/
+/*N*/ // MT 07/00: EE_PARA_BULLET no longer needed
+/*N*/ pC->GetParaAttribs().ClearItem( EE_PARA_BULLET );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void BinTextObject::AdjustImportedLRSpaceItems( BOOL bTurnOfBullets )
+/*N*/ {
+/*N*/ for ( USHORT nPara = GetContents().Count(); nPara; )
+/*N*/ {
+/*N*/ ContentInfo* pC = GetContents().GetObject( --nPara );
+/*N*/ if ( !bTurnOfBullets )
+/*N*/ {
+/*N*/ for ( USHORT n = 0; n <=1; n++ )
+/*N*/ {
+/*N*/ USHORT nItemId = n ? EE_PARA_LRSPACE : EE_PARA_OUTLLRSPACE;
+/*N*/ if ( pC->GetParaAttribs().GetItemState( nItemId ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( nItemId );
+/*N*/ if ( !rItem.GetTxtFirstLineOfst() )
+/*N*/ {
+/*N*/ SvxLRSpaceItem aNewItem( rItem );
+/*N*/ aNewItem.SetTxtFirstLineOfst( (short) -1200 ); // Outliner im Draw mit MAP100TH_MM
+/*N*/ if( pC->GetParaAttribs().GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+/*N*/ {
+/*?*/ 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() );
+/*N*/ }
+/*N*/ pC->GetParaAttribs().Put( aNewItem );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Wurden in alten Versionen vom Outliner mal am Absatz gesetzt, soll nicht mehr sein
+/*N*/ if ( !bTurnOfBullets && ( nVersion < 500 ) )
+/*N*/ {
+/*N*/ for ( USHORT nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ )
+/*N*/ pC->GetParaAttribs().ClearItem( nW );
+/*N*/ }
+/*N*/
+/*N*/ if ( bTurnOfBullets )
+/*N*/ {
+/*N*/ SfxUInt16Item aBulletState( EE_PARA_BULLETSTATE, 0 );
+/*N*/ pC->GetParaAttribs().Put( aBulletState );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ #define CHARSETMARKER 0x9999
+
+/*N*/ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream )
+/*N*/ {
+/*N*/ // Fuer Aufwaertskompatibilitaet.
+/*N*/
+/*N*/ // Erst den Pool laden...
+/*N*/ // Ist in der 300 immer gespeichert worden!
+/*N*/ GetPool()->Load( rIStream );
+/*N*/
+/*N*/ // Die Anzahl der Absaetze...
+/*N*/ sal_uInt32 nParagraphs;
+/*N*/ rIStream >> nParagraphs;
+/*N*/
+/*N*/ // Die einzelnen Absaetze...
+/*N*/ for ( sal_uInt32 nPara = 0; nPara < nParagraphs; nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = CreateAndInsertContent();
+/*N*/
+/*N*/ // Der Text...
+/*N*/ rIStream.ReadByteString( pC->GetText() );
+/*N*/
+/*N*/ // StyleName und Family...
+/*N*/ rIStream.ReadByteString( pC->GetStyle() );
+/*N*/ USHORT nStyleFamily;
+/*N*/ rIStream >> nStyleFamily;
+/*N*/ pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
+/*N*/
+/*N*/ // Absatzattribute...
+/*N*/ pC->GetParaAttribs().Load( rIStream );
+/*N*/
+/*N*/ // Die Anzahl der Attribute...
+/*N*/ sal_uInt32 nAttribs;
+/*N*/ rIStream >> nAttribs;
+/*N*/
+/*N*/ // Und die einzelnen Attribute
+/*N*/ // Items als Surregate => immer 8 Byte pro Attrib
+/*N*/ // Which = 2; Surregat = 2; Start = 2; End = 2;
+/*N*/ for ( sal_uInt32 nAttr = 0; nAttr < nAttribs; nAttr++ )
+/*N*/ {
+/*N*/ USHORT nWhich, nStart, nEnd;
+/*N*/ const SfxPoolItem* pItem;
+/*N*/
+/*N*/ rIStream >> nWhich;
+/*N*/ nWhich = pPool->GetNewWhich( nWhich );
+/*N*/ pItem = pPool->LoadSurrogate( rIStream, nWhich, 0 );
+/*N*/ rIStream >> nStart;
+/*N*/ rIStream >> nEnd;
+/*N*/ if ( pItem )
+/*N*/ {
+/*N*/ XEditAttribute* pAttr = new XEditAttribute( *pItem, nStart, nEnd );
+/*N*/ pC->GetAttribs().Insert( pAttr, pC->GetAttribs().Count() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Prueffen, ob ein Zeichensatz gespeichert wurde
+/*N*/ USHORT nCharSetMarker;
+/*N*/ rIStream >> nCharSetMarker;
+/*N*/ if ( nCharSetMarker == CHARSETMARKER )
+/*N*/ {
+/*N*/ USHORT nCharSet;
+/*N*/ rIStream >> nCharSet;
+/*N*/ }
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editsel.cxx b/binfilter/bf_svx/source/editeng/svx_editsel.cxx
new file mode 100644
index 000000000000..48cb2747a660
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editsel.cxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editview.hxx>
+namespace binfilter {
+
+// ----------------------------------------------------------------------
+// class EditSelFunctionSet
+// ----------------------------------------------------------------------
+/*N*/ EditSelFunctionSet::EditSelFunctionSet()
+/*N*/ {
+/*N*/ pCurView = NULL;
+/*N*/ }
+
+/*N*/ void __EXPORT EditSelFunctionSet::CreateAnchor()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditSelFunctionSet::DestroyAnchor()
+/*N*/ {
+/*N*/ // Nur bei Mehrfachselektion
+/*N*/ }
+
+/*N*/ BOOL __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ BOOL __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void __EXPORT EditSelFunctionSet::DeselectAtPoint( const Point& )
+/*N*/ {
+/*N*/ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/ // ! Implementieren, wenn Mehrfachselektion moeglich !
+/*N*/ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/ }
+
+/*N*/ void __EXPORT EditSelFunctionSet::BeginDrag()
+/*N*/ {
+/*N*/ // Nur bei Mehrfachselektion
+/*N*/ }
+
+
+/*N*/ void __EXPORT EditSelFunctionSet::DeselectAll()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+// ----------------------------------------------------------------------
+// class EditSelectionEngine
+// ----------------------------------------------------------------------
+/*N*/ EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 )
+/*N*/ {
+/*N*/ // Wegen Bug OV: (1994)
+/*N*/ // 1995: RangeSelection lassen, SingleSelection nur fuer ListBoxen geeignet!
+/*N*/ SetSelectionMode( RANGE_SELECTION );
+/*N*/ EnableDrag( TRUE );
+/*N*/ }
+
+/*N*/ void EditSelectionEngine::SetCurView( EditView* pNewView )
+/*N*/ {
+/*N*/ if ( GetFunctionSet() )
+/*N*/ ((EditSelFunctionSet*)GetFunctionSet())->SetCurView( pNewView );
+/*N*/
+/*N*/ if ( pNewView )
+/*?*/ SetWindow( pNewView->GetWindow() );
+/*N*/ else
+/*N*/ SetWindow( (Window*)0 );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editundo.cxx b/binfilter/bf_svx/source/editeng/svx_editundo.cxx
new file mode 100644
index 000000000000..9cbb22fed8f4
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editundo.cxx
@@ -0,0 +1,265 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+namespace binfilter {
+
+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
+
+/*N*/ TYPEINIT1( EditUndoInsertChars, EditUndo );
+
+
+ // -----------------------------------------------------------------------
+// EditUndoManager
+// ------------------------------------------------------------------------
+/*N*/ EditUndoManager::EditUndoManager( ImpEditEngine* p )
+/*N*/ {
+/*N*/ pImpEE = p;
+/*N*/ }
+
+
+
+ // -----------------------------------------------------------------------
+// EditUndo
+// ------------------------------------------------------------------------
+/*N*/ EditUndo::EditUndo( USHORT nI, ImpEditEngine* p )
+/*N*/ {
+/*N*/ DBG_CTOR( EditUndo, 0 );
+/*N*/ nId = nI;
+/*N*/ pImpEE = p;
+/*N*/ }
+
+/*N*/ EditUndo::~EditUndo()
+/*N*/ {
+/*N*/ DBG_DTOR( EditUndo, 0 );
+/*N*/ }
+
+/*N*/ USHORT __EXPORT EditUndo::GetId() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditUndo, 0 );
+/*N*/ return nId;
+/*N*/ }
+
+
+/*N*/ XubString __EXPORT EditUndo::GetComment() const
+/*N*/ {
+/*N*/ XubString aComment;
+/*N*/ if ( pImpEE )
+/*N*/ {
+/*N*/ EditEngine* pEditEng = pImpEE->GetEditEnginePtr();
+/*N*/ aComment = pEditEng->GetUndoComment( GetId() );
+/*N*/ }
+/*N*/ return aComment;
+/*N*/ }
+
+ // -----------------------------------------------------------------------
+// EditUndoInsertChars
+// ------------------------------------------------------------------------
+/*N*/ EditUndoInsertChars::EditUndoInsertChars( ImpEditEngine* pImpEE, const EPaM& rEPaM, const XubString& rStr )
+/*N*/ : EditUndo( EDITUNDO_INSERTCHARS, pImpEE ),
+/*N*/ aEPaM( rEPaM ), aText( rStr )
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoInsertChars::Undo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoInsertChars::Redo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ BOOL __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction )
+/*N*/ {
+/*N*/ if ( !pNextAction->ISA( EditUndoInsertChars ) )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ EditUndoInsertChars* pNext = (EditUndoInsertChars*)pNextAction;
+/*N*/
+/*N*/ if ( aEPaM.nPara != pNext->aEPaM.nPara )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ if ( ( aEPaM.nIndex + aText.Len() ) == pNext->aEPaM.nIndex )
+/*N*/ {
+/*N*/ aText += pNext->aText;
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoInsertChars::Repeat()
+/*N*/ {
+/*N*/ DBG_ERROR( "EditUndoInsertChars::Repeat nicht implementiert!" );
+/*N*/ }
+
+ // -----------------------------------------------------------------------
+// EditUndoRemoveChars
+// ------------------------------------------------------------------------
+
+
+
+
+ // -----------------------------------------------------------------------
+// EditUndoInsertFeature
+// ------------------------------------------------------------------------
+/*N*/ EditUndoInsertFeature::EditUndoInsertFeature( ImpEditEngine* pImpEE, const EPaM& rEPaM, const SfxPoolItem& rFeature)
+/*N*/ : EditUndo( EDITUNDO_INSERTFEATURE, pImpEE ), aEPaM( rEPaM )
+/*N*/ {
+/*N*/ pFeature = rFeature.Clone();
+/*N*/ DBG_ASSERT( pFeature, "Feature konnte nicht dupliziert werden: EditUndoInsertFeature" );
+/*N*/ }
+
+/*N*/ EditUndoInsertFeature::~EditUndoInsertFeature()
+/*N*/ {
+/*N*/ delete pFeature;
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoInsertFeature::Undo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoInsertFeature::Redo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoInsertFeature::Repeat()
+/*N*/ {
+/*N*/ DBG_ERROR( "EditUndoInsertFeature::Repeat nicht implementiert!" );
+/*N*/ }
+
+ // -----------------------------------------------------------------------
+// EditUndoMoveParagraphs
+// ------------------------------------------------------------------------
+
+
+
+
+
+ // -----------------------------------------------------------------------
+// EditUndoSetStyleSheet
+// ------------------------------------------------------------------------
+/*N*/ EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* pImpEE, USHORT nP,
+/*N*/ const XubString& rPrevName, SfxStyleFamily ePrevFam,
+/*N*/ const XubString& rNewName, SfxStyleFamily eNewFam,
+/*N*/ const SfxItemSet& rPrevParaAttribs )
+/*N*/ : EditUndo( EDITUNDO_STYLESHEET, pImpEE ), aPrevName( rPrevName ), aNewName( rNewName ),
+/*N*/ aPrevParaAttribs( rPrevParaAttribs )
+/*N*/ {
+/*N*/ ePrevFamily = ePrevFam;
+/*N*/ eNewFamily = eNewFam;
+/*N*/ nPara = nP;
+/*N*/ }
+
+/*N*/ EditUndoSetStyleSheet::~EditUndoSetStyleSheet()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoSetStyleSheet::Undo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoSetStyleSheet::Redo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoSetStyleSheet::Repeat()
+/*N*/ {
+/*N*/ DBG_ERROR( "EditUndoSetStyleSheet::Repeat nicht implementiert!" );
+/*N*/ }
+
+ // -----------------------------------------------------------------------
+// EditUndoSetParaAttribs
+// ------------------------------------------------------------------------
+/*N*/ EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems )
+/*N*/ : EditUndo( EDITUNDO_PARAATTRIBS, pImpEE ),
+/*N*/ aPrevItems( rPrevItems ),
+/*N*/ aNewItems(rNewItems )
+/*N*/ {
+/*N*/ nPara = nP;
+/*N*/ }
+
+/*N*/ EditUndoSetParaAttribs::~EditUndoSetParaAttribs()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoSetParaAttribs::Undo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoSetParaAttribs::Redo()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void __EXPORT EditUndoSetParaAttribs::Repeat()
+/*N*/ {
+/*N*/ DBG_ERROR( "EditUndoSetParaAttribs::Repeat nicht implementiert!" );
+/*N*/ }
+
+ // -----------------------------------------------------------------------
+// EditUndoSetAttribs
+// ------------------------------------------------------------------------
+
+
+
+
+
+
+ // -----------------------------------------------------------------------
+// EditUndoTransliteration
+// ------------------------------------------------------------------------
+
+
+
+
+
+ // -----------------------------------------------------------------------
+// EditUndoMarkSelection
+// ------------------------------------------------------------------------
+
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_editview.cxx b/binfilter/bf_svx/source/editeng/svx_editview.cxx
new file mode 100644
index 000000000000..1687133d8aa1
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_editview.cxx
@@ -0,0 +1,214 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _SOLAR__PRIVATE 1
+
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+
+
+
+#include "itemdata.hxx"
+
+
+
+#include <editeng.hrc>
+#include <helpid.hrc>
+
+#include <com/sun/star/beans/PropertyValues.hdl>
+namespace binfilter {
+
+using namespace rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::linguistic2;
+
+
+/*N*/ DBG_NAME( EditView )
+
+// From SW => Create common method
+
+
+/*N*/ EditView::~EditView()
+/*N*/ {
+/*N*/ DBG_DTOR( EditView, 0 );
+/*N*/ delete pImpEditView;
+/*N*/ }
+
+
+/*N*/ EditEngine* EditView::GetEditEngine() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+/*N*/ return pImpEditView->pEditEngine;
+/*N*/ }
+
+/*N*/ void EditView::SetSelection( const ESelection& rESel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+/*N*/
+/*N*/ // Falls jemand gerade ein leeres Attribut hinterlassen hat,
+/*N*/ // und dann der Outliner die Selektion manipulitert:
+/*N*/ if ( !pImpEditView->GetEditSelection().HasRange() )
+/*N*/ {
+/*N*/ ContentNode* pNode = pImpEditView->GetEditSelection().Max().GetNode();
+/*N*/ PIMPEE->CursorMoved( pNode );
+/*N*/ }
+/*N*/ EditSelection aNewSelection( PIMPEE->ConvertSelection( rESel.nStartPara, rESel.nStartPos, rESel.nEndPara, rESel.nEndPos ) );
+/*N*/
+/*N*/ // Selektion darf nicht bei einem unsichtbaren Absatz Starten/Enden:
+/*N*/ ParaPortion* pPortion = PIMPEE->FindParaPortion( aNewSelection.Min().GetNode() );
+/*N*/ if ( !pPortion->IsVisible() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pPortion = PIMPEE->GetPrevVisPortion( pPortion );
+/*N*/ }
+/*N*/ pPortion = PIMPEE->FindParaPortion( aNewSelection.Max().GetNode() );
+/*N*/ if ( !pPortion->IsVisible() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pPortion = PIMPEE->GetPrevVisPortion( pPortion );
+/*N*/ }
+/*N*/
+/*N*/ pImpEditView->DrawSelection(); // alte Selektion 'weg-zeichnen'
+/*N*/ pImpEditView->SetEditSelection( aNewSelection );
+/*N*/ pImpEditView->DrawSelection();
+/*N*/ sal_Bool bGotoCursor = pImpEditView->DoAutoScroll();
+/*N*/ ShowCursor( bGotoCursor );
+/*N*/ }
+
+/*N*/ ESelection EditView::GetSelection() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+/*N*/
+/*N*/ ESelection aSelection;
+/*N*/
+/*N*/ aSelection.nStartPara = PIMPEE->GetEditDoc().GetPos( pImpEditView->GetEditSelection().Min().GetNode() );
+/*N*/ aSelection.nEndPara = PIMPEE->GetEditDoc().GetPos( pImpEditView->GetEditSelection().Max().GetNode() );
+/*N*/
+/*N*/ aSelection.nStartPos = pImpEditView->GetEditSelection().Min().GetIndex();
+/*N*/ aSelection.nEndPos = pImpEditView->GetEditSelection().Max().GetIndex();
+/*N*/
+/*N*/ return aSelection;
+/*N*/ }
+
+/*N*/ sal_Bool EditView::HasSelection() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ return pImpEditView->HasSelection();
+/*N*/ }
+
+
+
+
+
+
+/*N*/ Window* EditView::GetWindow() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ return pImpEditView->pOutWin;
+/*N*/ }
+
+/*N*/ const Rectangle& EditView::GetVisArea() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ // Change return value to Rectangle in next incompatible build !!!
+/*N*/ static Rectangle aRect;
+/*N*/ aRect = pImpEditView->GetVisDocArea();
+/*N*/ return aRect;
+/*N*/ }
+
+/*N*/ const Rectangle& EditView::GetOutputArea() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ return pImpEditView->GetOutputArea();
+/*N*/ }
+
+
+/*N*/ void EditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+/*N*/
+/*N*/ // Draw vertraegt die Assertion nicht, spaeter mal aktivieren
+/*N*/ // DBG_ASSERT( pImpEditView->pEditEngine->HasView( this ), "ShowCursor - View nicht angemeldet!" );
+/*N*/ // DBG_ASSERT( !GetWindow()->IsInPaint(), "ShowCursor - Why in Paint ?!" );
+/*N*/
+/*N*/ if ( pImpEditView->pEditEngine->HasView( this ) )
+/*N*/ {
+/*N*/ // Das ControlWord hat mehr Gewicht:
+/*N*/ if ( !pImpEditView->DoAutoScroll() )
+/*N*/ bGotoCursor = sal_False;
+/*N*/ pImpEditView->ShowCursor( bGotoCursor, bForceVisCursor );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void EditView::HideCursor()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( EditView, 0 );
+/*N*/ pImpEditView->GetCursor()->Hide();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+#ifndef SVX_LIGHT
+#endif
+
+/*N*/ void EditView::Cut()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void EditView::Copy()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void EditView::Paste()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_eerdll.cxx b/binfilter/bf_svx/source/editeng/svx_eerdll.cxx
new file mode 100644
index 000000000000..d5b13e8b1f78
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_eerdll.cxx
@@ -0,0 +1,239 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <bf_svtools/solar.hrc>
+#include <eerdll.hxx>
+
+
+#include <vcl/outdev.hxx>
+
+#include <eerdll2.hxx>
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+#include <lspcitem.hxx>
+#include <adjitem.hxx>
+#include <tstpitem.hxx>
+#include <bulitem.hxx>
+
+
+
+#include "itemdata.hxx"
+
+
+
+#include <flditem.hxx>
+#include <emphitem.hxx>
+#include <scriptspaceitem.hxx>
+
+#include <bf_svtools/itempool.hxx>
+
+#include <vcl/virdev.hxx>
+
+#include <vcl/svapp.hxx>
+
+#include <akrnitem.hxx>
+#include <cntritem.hxx>
+#include <crsditem.hxx>
+#include <cscoitem.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 <wrlmitem.hxx>
+#include <numitem.hxx>
+#include <langitem.hxx>
+#include <charscaleitem.hxx>
+#include <charreliefitem.hxx>
+#include <frmdiritem.hxx>
+#include <xmlcnitm.hxx>
+
+
+
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+
+/*N*/ GlobalEditData::GlobalEditData()
+/*N*/ {
+/*N*/ ppDefItems = NULL;
+/*N*/ pStdRefDevice = NULL;
+/*N*/ }
+
+/*N*/ GlobalEditData::~GlobalEditData()
+/*N*/ {
+/*N*/ // DefItems zerstoeren...
+/*N*/ // Oder einfach stehen lassen, da sowieso App-Ende?!
+/*N*/ if ( ppDefItems )
+/*N*/ SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, TRUE );
+/*N*/ delete pStdRefDevice;
+/*N*/ }
+
+/*N*/ SfxPoolItem** GlobalEditData::GetDefItems()
+/*N*/ {
+/*N*/ if ( !ppDefItems )
+/*N*/ {
+/*N*/ ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
+/*N*/
+/*N*/ // Absatzattribute:
+/*N*/ SvxNumRule aTmpNumRule( 0, 0, FALSE );
+/*N*/
+/*N*/ ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR );
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
+/*N*/ #else
+/*N*/ ppDefItems[1] = new SfxVoidItem( EE_PARA_XMLATTRIBS );
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, FALSE );
+/*N*/ ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, TRUE );
+/*N*/ ppDefItems[4] = new SvxScriptSpaceItem( TRUE, EE_PARA_ASIANCJKSPACING );
+/*N*/ ppDefItems[5] = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET );
+/*N*/ ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, FALSE );
+/*N*/ ppDefItems[7] = new SfxUInt16Item( EE_PARA_BULLETSTATE, 0 );
+/*N*/ ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE );
+/*N*/ ppDefItems[9] = new SfxUInt16Item( EE_PARA_OUTLLEVEL );
+/*N*/ ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET );
+/*N*/ ppDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE );
+/*N*/ ppDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE );
+/*N*/ ppDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL );
+/*N*/ ppDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+/*N*/ ppDefItems[15] = new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS );
+/*N*/
+/*N*/ // Zeichenattribute:
+/*N*/ ppDefItems[16] = new SvxColorItem( Color( COL_AUTO ), EE_CHAR_COLOR );
+/*N*/ ppDefItems[17] = new SvxFontItem( EE_CHAR_FONTINFO );
+/*N*/ ppDefItems[18] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT );
+/*N*/ ppDefItems[19] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH );
+/*N*/ ppDefItems[20] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT );
+/*N*/ ppDefItems[21] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE );
+/*N*/ ppDefItems[22] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT );
+/*N*/ ppDefItems[23] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC );
+/*N*/ ppDefItems[24] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE );
+/*N*/ ppDefItems[25] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW );
+/*N*/ ppDefItems[26] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT );
+/*N*/ ppDefItems[27] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING );
+/*N*/ ppDefItems[28] = new SvxKerningItem( 0, EE_CHAR_KERNING );
+/*N*/ ppDefItems[29] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM );
+/*N*/ ppDefItems[30] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE );
+/*N*/ ppDefItems[31] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK );
+/*N*/ ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL );
+/*N*/ ppDefItems[33] = new SvxFontItem( EE_CHAR_FONTINFO_CJK );
+/*N*/ ppDefItems[34] = new SvxFontItem( EE_CHAR_FONTINFO_CTL );
+/*N*/ ppDefItems[35] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CJK );
+/*N*/ ppDefItems[36] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CTL );
+/*N*/ ppDefItems[37] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK );
+/*N*/ ppDefItems[38] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL );
+/*N*/ ppDefItems[39] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK );
+/*N*/ ppDefItems[40] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL );
+/*N*/ ppDefItems[41] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK );
+/*N*/ ppDefItems[42] = new SvxCharReliefItem( RELIEF_NONE, EE_CHAR_RELIEF );
+/*N*/ ppDefItems[43] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY );
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ppDefItems[44] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS );
+/*N*/ #else
+/*N*/ // no need to have alien attributes persistent
+/*N*/ ppDefItems[44] = new SfxVoidItem( EE_CHAR_XMLATTRIBS );
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/
+/*N*/ // Features
+/*N*/ ppDefItems[45] = new SfxVoidItem( EE_FEATURE_TAB );
+/*N*/ ppDefItems[46] = new SfxVoidItem( EE_FEATURE_LINEBR );
+/*N*/ ppDefItems[47] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
+/*N*/ ppDefItems[48] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
+/*N*/
+/*N*/ DBG_ASSERT( EDITITEMCOUNT == 49, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
+/*N*/
+/*N*/ // Init DefFonts:
+/*N*/ GetDefaultFonts( *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START],
+/*N*/ *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO_CJK - EE_ITEMS_START],
+/*N*/ *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO_CTL - EE_ITEMS_START] );
+/*N*/ }
+/*N*/
+/*N*/ return ppDefItems;
+/*N*/ }
+
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable()
+/*N*/ {
+/*N*/ if ( !xForbiddenCharsTable.is() )
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF = ::legacy_binfilters::getLegacyProcessServiceFactory();
+/*N*/ xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF );
+/*N*/ }
+/*N*/ return xForbiddenCharsTable;
+/*N*/ }
+
+
+/*N*/ OutputDevice* GlobalEditData::GetStdRefDevice()
+/*N*/ {
+/*N*/ if ( !pStdRefDevice )
+/*N*/ {
+/*N*/ pStdRefDevice = new VirtualDevice;
+/*N*/ pStdRefDevice->SetMapMode( MAP_TWIP );
+/*N*/ }
+/*N*/ return pStdRefDevice;
+/*N*/ }
+
+/*N*/ EditResId::EditResId( USHORT nId ):
+/*N*/ ResId( nId, *EE_DLL()->GetResMgr() )
+/*N*/ {
+/*N*/ }
+
+/*N*/ EditDLL::EditDLL()
+/*N*/ {
+/*N*/ pGlobalData = new GlobalEditData;
+/*N*/ DBG_ASSERT( !*(EditDLL**)GetAppData(BF_SHL_EDIT), "Noch eine EditDLL ?!" );
+/*N*/ *(EditDLL**)GetAppData(BF_SHL_EDIT) = this;
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ByteString aResMgrName( "bf_svx" ); //STRIP005
+/*N*/ #else
+/*N*/ ByteString aResMgrName( "bf_svl" ); //STRIP005
+/*N*/ #endif
+/*N*/ pResMgr = ResMgr::CreateResMgr(
+/*N*/ aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
+/*N*/ }
+
+/*N*/ EditDLL::~EditDLL()
+/*N*/ {
+/*N*/ delete pResMgr;
+/*N*/ delete pGlobalData;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_forbiddencharacterstable.cxx b/binfilter/bf_svx/source/editeng/svx_forbiddencharacterstable.cxx
new file mode 100644
index 000000000000..943f34fb128c
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_forbiddencharacterstable.cxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <forbiddencharacterstable.hxx>
+
+#include <unotools/localedatawrapper.hxx>
+#include <unolingu.hxx>
+
+/*STRIP001*/#include <tools/debug.hxx>
+namespace binfilter {
+/*N*/ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize, USHORT nGrow )
+/*N*/ : SvxForbiddenCharactersTableImpl( nISize, nGrow )
+/*N*/ {
+/*N*/ mxMSF = xMSF;
+/*N*/ }
+
+
+/*N*/ SvxForbiddenCharactersTable::~SvxForbiddenCharactersTable()
+/*N*/ {
+/*N*/ for ( ULONG n = Count(); n; )
+/*N*/ delete GetObject( --n );
+/*N*/ }
+
+
+
+const ::com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( USHORT nLanguage, BOOL bGetDefault ) const
+{
+ ForbiddenCharactersInfo* pInf = Get( nLanguage );
+ if ( !pInf && bGetDefault && mxMSF.is() )
+ {
+ const SvxForbiddenCharactersTableImpl *pConstImpl =
+ dynamic_cast<const SvxForbiddenCharactersTableImpl*>(this);
+ SvxForbiddenCharactersTableImpl* pImpl =
+ const_cast<SvxForbiddenCharactersTableImpl*>(pConstImpl);
+ pInf = new ForbiddenCharactersInfo;
+ pImpl->Insert( nLanguage, pInf );
+ pInf->bTemporary = TRUE;
+ LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) );
+ pInf->aForbiddenChars = aWrapper.getForbiddenCharacters();
+ }
+ return pInf ? &pInf->aForbiddenChars : NULL;
+}
+
+
+
+/*N*/ void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, const ::com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars )
+/*N*/ {
+/*N*/ ForbiddenCharactersInfo* pInf = Get( nLanguage );
+/*N*/ if ( !pInf )
+/*N*/ {
+/*N*/ pInf = new ForbiddenCharactersInfo;
+/*N*/ Insert( nLanguage, pInf );
+/*N*/ }
+/*N*/ pInf->bTemporary = FALSE;
+/*N*/ pInf->aForbiddenChars = rForbiddenChars;
+/*N*/ }
+
+/*N*/ void SvxForbiddenCharactersTable::ClearForbiddenCharacters( USHORT nLanguage )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit.cxx b/binfilter/bf_svx/source/editeng/svx_impedit.cxx
new file mode 100644
index 000000000000..2740a029bb07
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_impedit.cxx
@@ -0,0 +1,259 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+
+
+
+
+
+
+
+
+
+
+
+#include "itemdata.hxx"
+
+
+
+#include <flditem.hxx>
+
+namespace binfilter {
+
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::linguistic2;
+
+#define SCRLRANGE 20 // 1/20 der Breite/Hoehe scrollen, wenn im QueryDrop
+
+
+/*N*/ ImpEditView::~ImpEditView()
+/*N*/ {
+/*N*/ if ( pOutWin && ( pOutWin->GetCursor() == pCursor ) )
+/*N*/ pOutWin->SetCursor( NULL );
+/*N*/
+/*N*/ delete pCursor;
+/*N*/ delete pBackgroundColor;
+/*N*/ delete pPointer;
+/*N*/ }
+
+
+/*N*/ void ImpEditView::SetEditSelection( const EditSelection& rEditSelection )
+/*N*/ {
+/*N*/ // #100856# set state before notification
+/*N*/ aEditSelection = rEditSelection;
+/*N*/
+/*N*/ if ( pEditEngine->pImpEditEngine->GetNotifyHdl().IsSet() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EENotify aNotify( EE_NOTIFY_TEXTVIEWSELECTIONCHANGED );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion )
+/*N*/ {
+/*N*/ // Vor dem Zeichnen der Selektion muss sichergestellt werden,
+/*N*/ // das der Fensterinhalt komplett gueltig ist!
+/*N*/ // Muss hier stehen, damit auf jeden Fall weg wenn lerr, nicht spaeter
+/*N*/ // zwei Paint-Events!
+/*N*/ // 19.10: Muss sogar vor Abfrage von bUpdate, falls nach Invalidate
+/*N*/ // noch Paints in der Queue, aber jemand schaltet den UpdateMode um!
+/*N*/
+/*N*/ // pRegion: Wenn nicht NULL, dann nur Region berechnen.
+/*N*/ PolyPolygon* pPolyPoly = NULL;
+/*N*/ if ( pRegion )
+/*?*/ pPolyPoly = new PolyPolygon;
+/*N*/
+/*N*/ sal_Bool bClipRegion = pOutWin->IsClipRegion();
+/*N*/ Region aOldRegion = pOutWin->GetClipRegion();
+/*N*/
+/*N*/ if ( !pRegion )
+/*N*/ {
+/*N*/ if ( pEditEngine->pImpEditEngine->GetUpdateMode() == sal_False )
+/*N*/ return;
+/*N*/ if ( pEditEngine->pImpEditEngine->IsInUndo() )
+/*N*/ return;
+/*N*/
+/*N*/ if ( !aTmpSel.HasRange() )
+/*N*/ return;
+/*N*/
+/*?*/ // 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();
+/*?*/ pOutWin->IntersectClipRegion( aTmpOutArea );
+/*?*/
+/*?*/ if ( pOutWin->GetCursor() )
+/*?*/ pOutWin->GetCursor()->Hide();
+/*?*/ }
+/*?*/
+/*?*/ aTmpSel.Adjust( pEditEngine->pImpEditEngine->GetEditDoc() );
+/*?*/
+/*?*/ 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() ) < GetVisDocTop() )
+/*?*/ continue;
+/*?*/ if ( nParaStart > GetVisDocBottom() )
+/*?*/ break;
+/*?*/
+/*?*/ sal_uInt16 nStartLine = 0;
+/*?*/ sal_uInt16 nEndLine = pTmpPortion->GetLines().Count() -1;
+/*?*/ if ( nPara == nStartPara )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 nStartLine = pTmpPortion->GetLines().FindLine( aTmpSel.Min().GetIndex(), sal_False );
+/*?*/ if ( nPara == nEndPara )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 nEndLine = pTmpPortion->GetLines().FindLine( aTmpSel.Max().GetIndex(), sal_True );
+/*?*/
+/*?*/ // ueber die Zeilen iterieren....
+/*?*/ for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditLine* pLine = pTmpPortion->GetLines().GetObject( nLine );
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ if ( pRegion )
+/*?*/ {
+/*?*/ *pRegion = Region( *pPolyPoly );
+/*?*/ delete pPolyPoly;
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if ( pOutWin->GetCursor() )
+/*?*/ pOutWin->GetCursor()->Show();
+/*?*/
+/*?*/ if ( bClipRegion )
+/*?*/ pOutWin->SetClipRegion( aOldRegion );
+/*?*/ else
+/*?*/ pOutWin->SetClipRegion();
+/*?*/ }
+/*N*/ }
+
+
+
+/*N*/ BOOL ImpEditView::IsVertical() const
+/*N*/ {
+/*N*/ return pEditEngine->pImpEditEngine->IsVertical();
+/*N*/ }
+
+/*N*/ Rectangle ImpEditView::GetVisDocArea() const
+/*N*/ {
+/*N*/ return Rectangle( GetVisDocLeft(), GetVisDocTop(), GetVisDocRight(), GetVisDocBottom() );
+/*N*/ }
+
+/*N*/ Point ImpEditView::GetDocPos( const Point& rWindowPos ) const
+/*N*/ {
+/*N*/ // Fensterposition => Dokumentposition
+/*N*/ Point aPoint;
+/*N*/
+/*N*/ if ( !pEditEngine->pImpEditEngine->IsVertical() )
+/*N*/ {
+/*N*/ aPoint.X() = rWindowPos.X() - aOutArea.Left() + GetVisDocLeft();
+/*N*/ aPoint.Y() = rWindowPos.Y() - aOutArea.Top() + GetVisDocTop();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aPoint.X() = rWindowPos.Y() - aOutArea.Top() + GetVisDocLeft();
+/*?*/ aPoint.Y() = aOutArea.Right() - rWindowPos.X() + GetVisDocTop();
+/*N*/ }
+/*N*/
+/*N*/ return aPoint;
+/*N*/ }
+
+/*N*/ Point ImpEditView::GetWindowPos( const Point& rDocPos ) const
+/*N*/ {
+/*N*/ // Dokumentposition => Fensterposition
+/*N*/ Point aPoint;
+/*N*/
+/*N*/ if ( !pEditEngine->pImpEditEngine->IsVertical() )
+/*N*/ {
+/*N*/ aPoint.X() = rDocPos.X() + aOutArea.Left() - GetVisDocLeft();
+/*N*/ aPoint.Y() = rDocPos.Y() + aOutArea.Top() - GetVisDocTop();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aPoint.X() = aOutArea.Right() - rDocPos.Y() + GetVisDocTop();
+/*?*/ aPoint.Y() = rDocPos.X() + aOutArea.Top() - GetVisDocLeft();
+/*N*/ }
+/*N*/
+/*N*/ return aPoint;
+/*N*/ }
+
+/*N*/ Rectangle ImpEditView::GetWindowPos( const Rectangle& rDocRect ) const
+/*N*/ {
+/*N*/ // Dokumentposition => Fensterposition
+/*N*/ Point aPos( GetWindowPos( rDocRect.TopLeft() ) );
+/*N*/ Size aSz = rDocRect.GetSize();
+/*N*/ Rectangle aRect;
+/*N*/ if ( !pEditEngine->pImpEditEngine->IsVertical() )
+/*N*/ {
+/*N*/ aRect = Rectangle( aPos, aSz );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ Point aNewPos( aPos.X()-aSz.Height(), aPos.Y() );
+/*?*/ aRect = Rectangle( aNewPos, Size( aSz.Height(), aSz.Width() ) );
+/*N*/ }
+/*N*/ return aRect;
+/*N*/ }
+
+/*N*/ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, USHORT nShowCursorFlags )
+/*N*/ {
+/*N*/ // Kein ShowCursor bei einer leeren View...
+/*N*/ if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) )
+/*N*/ return;
+/*N*/
+/*?*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit2.cxx b/binfilter/bf_svx/source/editeng/svx_impedit2.cxx
new file mode 100644
index 000000000000..794864bfb27a
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_impedit2.cxx
@@ -0,0 +1,2084 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+#include <lspcitem.hxx>
+
+
+
+#include "itemdata.hxx"
+
+#include <tools/date.hxx>
+
+#include <tools/time.hxx>
+
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <eerdll2.hxx>
+#include <eerdll.hxx>
+#include <txtrange.hxx>
+#include <bf_svtools/colorcfg.hxx>
+#include <bf_svtools/ctloptions.hxx>
+
+#include <lrspitem.hxx>
+#include <ulspitem.hxx>
+#include <adjitem.hxx>
+#include <scripttypeitem.hxx>
+#include <frmdiritem.hxx>
+
+
+
+
+#include <vcl/cmdevt.h>
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+#include <com/sun/star/i18n/ScriptType.hpp>
+
+#include <com/sun/star/text/CharacterCompressionType.hpp>
+
+
+
+#include <unicode/ubidi.h>
+namespace binfilter {
+
+#if defined(MACOSX) && ( __GNUC__ < 3 )
+// moved from editundo.hxx
+const EPaM& EditUndoRemoveChars::GetEPaM() { return aEPaM; }
+String& EditUndoRemoveChars::GetStr() { return aText; }
+#endif
+
+using namespace ::com::sun::star;
+
+/*N*/ USHORT lcl_CalcExtraSpace( ParaPortion* pPortion, const SvxLineSpacingItem& rLSItem )
+/*N*/ {
+/*N*/ 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 */
+/*N*/ if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+/*N*/ {
+/*?*/ nExtra = rLSItem.GetInterLineSpace();
+/*N*/ }
+/*N*/
+/*N*/ return nExtra;
+/*N*/ }
+
+ // ----------------------------------------------------------------------
+// class ImpEditEngine
+// ----------------------------------------------------------------------
+
+/*N*/ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
+/*N*/ aEditDoc( pItemPool ),
+/*N*/ aPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ),
+/*N*/ aMaxAutoPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ),
+/*N*/ aMinAutoPaperSize( 0x0, 0x0 ),
+/*N*/ aGroupChars( RTL_CONSTASCII_USTRINGPARAM( "{}()[]" ) ),
+/*N*/ aWordDelimiters( RTL_CONSTASCII_USTRINGPARAM( " .,;:-'`'?!_=\"{}()[]\0xFF" ) )
+/*N*/ {
+/*N*/ pEditEngine = pEE;
+/*N*/ pRefDev = NULL;
+/*N*/ pVirtDev = NULL;
+/*N*/ pEmptyItemSet = NULL;
+/*N*/ pActiveView = NULL;
+/*N*/ pTextObjectPool = NULL;
+/*N*/ mpIMEInfos = NULL;
+/*N*/ pStylePool = NULL;
+/*N*/ pUndoManager = NULL;
+/*N*/ pUndoMarkSelection = NULL;
+/*N*/ pTextRanger = NULL;
+/*N*/ pColorConfig = NULL;
+/*N*/ pCTLOptions = NULL;
+/*N*/
+/*N*/ nCurTextHeight = 0;
+/*N*/ nBlockNotifications = 0;
+/*N*/ nBigTextObjectStart = 20;
+/*N*/
+/*N*/ nStretchX = 100;
+/*N*/ nStretchY = 100;
+/*N*/
+/*N*/ bInSelection = FALSE;
+/*N*/ bOwnerOfRefDev = FALSE;
+/*N*/ bDowning = FALSE;
+/*N*/ bIsInUndo = FALSE;
+/*N*/ bIsFormatting = FALSE;
+/*N*/ bFormatted = FALSE;
+/*N*/ bUpdate = TRUE;
+/*N*/ bUseAutoColor = TRUE;
+/*N*/ bForceAutoColor = FALSE;
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ bUndoEnabled = TRUE;
+/*N*/ #else
+/*N*/ bUndoEnabled = FALSE;
+/*N*/ #endif
+/*N*/ bCallParaInsertedOrDeleted = FALSE;
+/*N*/
+/*N*/ eDefLanguage = LANGUAGE_DONTKNOW;
+/*N*/ maBackgroundColor = COL_AUTO;
+/*N*/
+/*N*/ nAsianCompressionMode = text::CharacterCompressionType::NONE;
+/*N*/ bKernAsianPunctuation = FALSE;
+/*N*/
+/*N*/ eDefaultHorizontalTextDirection = EE_HTEXTDIR_DEFAULT;
+/*N*/
+/*N*/
+/*N*/ aStatus.GetControlWord() = EE_CNTRL_USECHARATTRIBS | EE_CNTRL_DOIDLEFORMAT |
+/*N*/ EE_CNTRL_PASTESPECIAL | EE_CNTRL_UNDOATTRIBS |
+/*N*/ EE_CNTRL_ALLOWBIGOBJS | EE_CNTRL_RTFSTYLESHEETS |
+/*N*/ EE_CNTRL_FORMAT100;
+/*N*/
+/*N*/ aSelEngine.SetFunctionSet( &aSelFuncSet );
+/*N*/
+/*N*/ pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice();
+/*N*/
+/*N*/ // Ab hier wird schon auf Daten zugegriffen!
+/*N*/ SetRefDevice( pRefDev );
+/*N*/ InitDoc( FALSE );
+/*N*/
+/*N*/ bCallParaInsertedOrDeleted = TRUE;
+/*N*/
+/*N*/ }
+
+/*N*/ ImpEditEngine::~ImpEditEngine()
+/*N*/ {
+/*N*/ // das Zerstoeren von Vorlagen kann sonst unnoetiges Formatieren ausloesen,
+/*N*/ // wenn eine Parent-Vorlage zerstoert wird.
+/*N*/ // Und das nach dem Zerstoeren der Daten!
+/*N*/ bDowning = TRUE;
+/*N*/ SetUpdateMode( FALSE );
+/*N*/
+/*N*/ delete pVirtDev;
+/*N*/ delete pEmptyItemSet;
+/*N*/ delete pUndoManager;
+/*N*/ delete pTextRanger;
+/*N*/ delete mpIMEInfos;
+/*N*/ delete pColorConfig;
+/*N*/ delete pCTLOptions;
+/*N*/ if ( bOwnerOfRefDev )
+/*N*/ delete pRefDev;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
+/*N*/ {
+/*N*/ if ( bOwnerOfRefDev )
+/*N*/ delete pRefDev;
+/*N*/
+/*N*/ pRefDev = pRef;
+/*N*/ bOwnerOfRefDev = FALSE;
+/*N*/
+/*N*/ if ( !pRef )
+/*N*/ pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice();
+/*N*/
+/*N*/ nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
+/*N*/
+/*N*/ if ( IsFormatted() )
+/*N*/ {
+/*N*/ FormatFullDoc();
+/*N*/ UpdateViews( (EditView*) 0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
+/*N*/ {
+/*N*/ if ( GetRefDevice()->GetMapMode() == rMapMode )
+/*N*/ return;
+/*N*/
+/*N*/ // Wenn RefDev == GlobalRefDev => eigenes anlegen!
+/*N*/ if ( !bOwnerOfRefDev && ( pRefDev == EE_DLL()->GetGlobalData()->GetStdRefDevice() ) )
+/*N*/ {
+/*N*/ pRefDev = new VirtualDevice;
+/*N*/ pRefDev->SetMapMode( MAP_TWIP );
+/*N*/ SetRefDevice( pRefDev );
+/*N*/ bOwnerOfRefDev = TRUE;
+/*N*/ }
+/*N*/ pRefDev->SetMapMode( rMapMode );
+/*N*/ nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
+/*N*/ if ( IsFormatted() )
+/*N*/ {
+/*N*/ FormatFullDoc();
+/*N*/ UpdateViews( (EditView*) 0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs )
+/*N*/ {
+/*N*/ USHORT nParas = aEditDoc.Count();
+/*N*/ for ( USHORT n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ )
+/*N*/ {
+/*N*/ if ( aEditDoc[n]->GetStyleSheet() )
+/*N*/ EndListening( *aEditDoc[n]->GetStyleSheet(), FALSE );
+/*N*/ }
+/*N*/
+/*N*/ if ( bKeepParaAttribs )
+/*N*/ aEditDoc.RemoveText();
+/*N*/ else
+/*N*/ aEditDoc.Clear();
+/*N*/
+/*N*/ GetParaPortions().Reset();
+/*N*/
+/*N*/ ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] );
+/*N*/ GetParaPortions().Insert( pIniPortion, 0 );
+/*N*/
+/*N*/ bFormatted = FALSE;
+/*N*/
+/*N*/ if ( IsCallParaInsertedOrDeleted() )
+/*N*/ {
+/*N*/ GetEditEnginePtr()->ParagraphDeleted( EE_PARA_ALL );
+/*N*/ GetEditEnginePtr()->ParagraphInserted( 0 );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd eEnd ) const
+/*N*/ {
+/*N*/ XubString aText;
+/*N*/ if ( !rSel.HasRange() )
+/*N*/ return aText;
+/*N*/
+/*N*/ String aSep = EditDoc::GetSepStr( eEnd );
+/*N*/
+/*N*/ EditSelection aSel( rSel );
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/
+/*N*/ ContentNode* pStartNode = aSel.Min().GetNode();
+/*N*/ ContentNode* pEndNode = aSel.Max().GetNode();
+/*N*/ USHORT nStartNode = aEditDoc.GetPos( pStartNode );
+/*N*/ USHORT nEndNode = aEditDoc.GetPos( pEndNode );
+/*N*/
+/*N*/ DBG_ASSERT( nStartNode <= nEndNode, "Selektion nicht sortiert ?" );
+/*N*/
+/*N*/ // ueber die Absaetze iterieren...
+/*N*/ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+/*N*/ {
+/*N*/ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetSelected" );
+/*N*/ ContentNode* pNode = aEditDoc.GetObject( nNode );
+/*N*/
+/*N*/ xub_StrLen nStartPos = 0;
+/*N*/ xub_StrLen nEndPos = pNode->Len();
+/*N*/ if ( nNode == nStartNode )
+/*N*/ nStartPos = aSel.Min().GetIndex();
+/*N*/ if ( nNode == nEndNode ) // kann auch == nStart sein!
+/*N*/ nEndPos = aSel.Max().GetIndex();
+/*N*/
+/*N*/ aText += aEditDoc.GetParaAsString( pNode, nStartPos, nEndPos );
+/*N*/ if ( nNode < nEndNode )
+/*N*/ aText += aSep;
+/*N*/ }
+/*N*/ return aText;
+/*N*/ }
+
+
+
+
+
+
+/*N*/ EditPaM ImpEditEngine::Clear()
+/*N*/ {
+/*N*/ InitDoc( FALSE );
+/*N*/
+/*N*/ EditPaM aPaM = aEditDoc.GetStartPaM();
+/*N*/ EditSelection aSel( aPaM );
+/*N*/
+/*N*/ nCurTextHeight = 0;
+/*N*/
+/*N*/ ResetUndoManager();
+/*N*/
+/*N*/ for ( USHORT nView = aEditViews.Count(); nView; )
+/*N*/ {
+/*?*/ EditView* pView = aEditViews[--nView];
+/*?*/ DBG_CHKOBJ( pView, EditView, 0 );
+/*?*/ pView->pImpEditView->SetEditSelection( aSel );
+/*N*/ }
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::RemoveText()
+/*N*/ {
+/*N*/ InitDoc( TRUE );
+/*N*/
+/*N*/ EditPaM aStartPaM = aEditDoc.GetStartPaM();
+/*N*/ EditSelection aEmptySel( aStartPaM, aStartPaM );
+/*N*/ for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+/*N*/ {
+/*N*/ EditView* pView = aEditViews.GetObject(nView);
+/*N*/ DBG_CHKOBJ( pView, EditView, 0 );
+/*N*/ pView->pImpEditView->SetEditSelection( aEmptySel );
+/*N*/ }
+/*N*/ ResetUndoManager();
+/*N*/ return aEditDoc.GetStartPaM();
+/*N*/ }
+
+
+/*N*/ void ImpEditEngine::SetText( const XubString& rText )
+/*N*/ {
+/*N*/ // RemoveText loescht die Undo-Liste!
+/*N*/ EditPaM aStartPaM = RemoveText();
+/*N*/ BOOL bUndoCurrentlyEnabled = IsUndoEnabled();
+/*N*/ // Der von Hand reingesteckte Text kann nicht vom Anwender rueckgaengig gemacht werden.
+/*N*/ EnableUndo( FALSE );
+/*N*/
+/*N*/ EditSelection aEmptySel( aStartPaM, aStartPaM );
+/*N*/ EditPaM aPaM = aStartPaM;
+/*N*/ if ( rText.Len() )
+/*N*/ aPaM = ImpInsertText( aEmptySel, rText );
+/*N*/
+/*N*/ for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+/*N*/ {
+/*N*/ EditView* pView = aEditViews[nView];
+/*N*/ DBG_CHKOBJ( pView, EditView, 0 );
+/*N*/ pView->pImpEditView->SetEditSelection( EditSelection( aPaM, aPaM ) );
+/*N*/ // Wenn kein Text, dann auch Kein Format&Update
+/*N*/ // => Der Text bleibt stehen.
+/*N*/ if ( !rText.Len() && GetUpdateMode() )
+/*N*/ {
+/*?*/ Rectangle aTmpRec( pView->GetOutputArea().TopLeft(),
+/*?*/ Size( aPaperSize.Width(), nCurTextHeight ) );
+/*?*/ aTmpRec.Intersection( pView->GetOutputArea() );
+/*?*/ pView->GetWindow()->Invalidate( aTmpRec );
+/*N*/ }
+/*N*/ }
+/*N*/ if( !rText.Len() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht.
+/*N*/ nCurTextHeight = 0;
+/*N*/ EnableUndo( bUndoCurrentlyEnabled );
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "Undo nach SetText?" );
+/*N*/ #endif
+/*N*/ }
+
+
+/*N*/ const SfxItemSet& ImpEditEngine::GetEmptyItemSet()
+/*N*/ {
+/*N*/ if ( !pEmptyItemSet )
+/*N*/ {
+/*N*/ pEmptyItemSet = new SfxItemSet( aEditDoc.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END );
+/*N*/ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+/*N*/ {
+/*N*/ pEmptyItemSet->ClearItem( nWhich );
+/*N*/ }
+/*N*/ }
+/*N*/ return *pEmptyItemSet;
+/*N*/ }
+
+// ----------------------------------------------------------------------
+// MISC
+// ----------------------------------------------------------------------
+/*N*/ void ImpEditEngine::CursorMoved( ContentNode* pPrevNode )
+/*N*/ {
+/*N*/ // Leere Attribute loeschen, aber nur, wenn Absatz nicht leer!
+/*N*/ if ( pPrevNode->GetCharAttribs().HasEmptyAttribs() && pPrevNode->Len() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 pPrevNode->GetCharAttribs().DeleteEmptyAttribs( aEditDoc.GetItemPool() );
+/*N*/ }
+
+/*N*/ void ImpEditEngine::TextModified()
+/*N*/ {
+/*N*/ bFormatted = FALSE;
+/*N*/
+/*N*/ if ( GetNotifyHdl().IsSet() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EENotify aNotify( EE_NOTIFY_TEXTMODIFIED );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void ImpEditEngine::ParaAttribsChanged( ContentNode* pNode )
+/*N*/ {
+/*N*/ DBG_ASSERT( pNode, "ParaAttribsChanged: Welcher?" );
+/*N*/
+/*N*/ aEditDoc.SetModified( TRUE );
+/*N*/ bFormatted = FALSE;
+/*N*/
+/*N*/ ParaPortion* pPortion = FindParaPortion( pNode );
+/*N*/ DBG_ASSERT( pPortion, "ParaAttribsChanged: Portion?" );
+/*N*/ pPortion->MarkSelectionInvalid( 0, pNode->Len() );
+/*N*/
+/*N*/ USHORT nPara = aEditDoc.GetPos( pNode );
+/*N*/ pEditEngine->ParaAttribsChanged( nPara );
+/*N*/
+/*N*/ ParaPortion* pNextPortion = GetParaPortions().SaveGetObject( nPara+1 );
+/*N*/ // => wird sowieso noch formatiert, wenn Invalid.
+/*N*/ if ( pNextPortion && !pNextPortion->IsInvalid() )
+/*?*/ CalcHeight( pNextPortion );
+/*N*/ }
+
+// ----------------------------------------------------------------------
+// Cursorbewegungen
+// ----------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType )
+/*N*/ {
+/*N*/ xub_StrLen nMax = rPaM.GetNode()->Len();
+/*N*/ EditPaM aNewPaM( rPaM );
+/*N*/ if ( aNewPaM.GetIndex() < nMax )
+/*N*/ {
+/*N*/ uno::Reference < i18n::XBreakIterator > xBI = ImplGetBreakIterator();
+/*N*/ i18n::Boundary aBoundary = xBI->nextWord( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale( aNewPaM ), nWordType );
+/*N*/ aNewPaM.SetIndex( (USHORT)aBoundary.startPos );
+/*N*/ }
+/*N*/ // not 'else', maybe the index reached nMax now...
+/*N*/ if ( aNewPaM.GetIndex() >= nMax )
+/*N*/ {
+/*?*/ // Naechster Absatz...
+/*?*/ USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
+/*?*/ ContentNode* pNextNode = aEditDoc.SaveGetObject( ++nCurPara );
+/*?*/ if ( pNextNode )
+/*?*/ {
+/*?*/ aNewPaM.SetNode( pNextNode );
+/*?*/ aNewPaM.SetIndex( 0 );
+/*?*/ }
+/*N*/ }
+/*N*/ return aNewPaM;
+/*N*/ }
+
+
+
+/*N*/ EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType, BOOL bAcceptStartOfWord )
+/*N*/ {
+/*N*/ EditSelection aNewSel( rCurSel );
+/*N*/ EditPaM aPaM( rCurSel.Max() );
+/*N*/ uno::Reference < i18n::XBreakIterator > xBI = ImplGetBreakIterator();
+/*N*/ sal_Int16 nType = xBI->getWordType( *aPaM.GetNode(), aPaM.GetIndex(), GetLocale( aPaM ) );
+/*N*/ if ( nType == i18n::WordType::ANY_WORD )
+/*N*/ {
+/*N*/ i18n::Boundary aBoundary = xBI->getWordBoundary( *aPaM.GetNode(), aPaM.GetIndex(), GetLocale( aPaM ), nWordType, sal_True );
+/*N*/ // don't select when curser at end of word
+/*N*/ if ( ( aBoundary.endPos > aPaM.GetIndex() ) &&
+/*N*/ ( bAcceptStartOfWord || ( aBoundary.startPos < aPaM.GetIndex() ) ) )
+/*N*/ {
+/*N*/ aNewSel.Min().SetIndex( (USHORT)aBoundary.startPos );
+/*N*/ aNewSel.Max().SetIndex( (USHORT)aBoundary.endPos );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return aNewSel;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::InitScriptTypes( USHORT nPara )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/ rTypes.Remove( 0, rTypes.Count() );
+/*N*/
+/*N*/
+/*N*/ // pParaPortion->aExtraCharInfos.Remove( 0, pParaPortion->aExtraCharInfos.Count() );
+/*N*/
+/*N*/ ContentNode* pNode = pParaPortion->GetNode();
+/*N*/ if ( pNode->Len() )
+/*N*/ {
+/*N*/ uno::Reference < i18n::XBreakIterator > xBI = ImplGetBreakIterator();
+/*N*/
+/*N*/ String aText( *pNode );
+/*N*/
+/*N*/ // To handle fields put the character from the field in the string,
+/*N*/ // because endOfScript( ... ) will skip the CH_FEATURE, because this is WEAK
+/*N*/ EditCharAttrib* pField = pNode->GetCharAttribs().FindNextAttrib( EE_FEATURE_FIELD, 0 );
+/*N*/ while ( pField )
+/*N*/ {
+/*N*/ ::rtl::OUString aFldText( ((EditCharAttribField*)pField)->GetFieldValue() );
+/*N*/ if ( aFldText.getLength() )
+/*N*/ {
+/*N*/ aText.SetChar( pField->GetStart(), aFldText.getStr()[0] );
+/*N*/ short nFldScriptType = xBI->getScriptType( aFldText, 0 );
+/*N*/
+/*N*/ for ( USHORT nCharInField = 1; nCharInField < aFldText.getLength(); nCharInField++ )
+/*N*/ {
+/*N*/ short nTmpType = xBI->getScriptType( aFldText, nCharInField );
+/*N*/
+/*N*/ // First char from field wins...
+/*N*/ if ( nFldScriptType == i18n::ScriptType::WEAK )
+/*N*/ {
+/*?*/ nFldScriptType = nTmpType;
+/*?*/ aText.SetChar( pField->GetStart(), aFldText.getStr()[nCharInField] );
+/*N*/ }
+/*N*/
+/*N*/ // ... but if the first one is LATIN, and there are CJK or CTL chars too,
+/*N*/ // we prefer that ScripType because we need an other font.
+/*N*/ if ( ( nTmpType == i18n::ScriptType::ASIAN ) || ( nTmpType == i18n::ScriptType::COMPLEX ) )
+/*N*/ {
+/*?*/ aText.SetChar( pField->GetStart(), aFldText.getStr()[nCharInField] );
+/*?*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ pField = pNode->GetCharAttribs().FindNextAttrib( EE_FEATURE_FIELD, pField->GetEnd() );
+/*N*/ }
+/*N*/
+/*N*/ ::rtl::OUString aOUText( aText );
+/*N*/ USHORT nTextLen = (USHORT)aOUText.getLength();
+/*N*/
+/*N*/ long nPos = 0;
+/*N*/ short nScriptType = xBI->getScriptType( aOUText, nPos );
+/*N*/ rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
+/*N*/ nPos = xBI->endOfScript( aOUText, nPos, nScriptType );
+/*N*/ while ( ( nPos != (-1) ) && ( nPos < nTextLen ) )
+/*N*/ {
+/*N*/ rTypes[rTypes.Count()-1].nEndPos = (USHORT)nPos;
+/*N*/
+/*N*/ nScriptType = xBI->getScriptType( aOUText, nPos );
+/*N*/ long nEndPos = xBI->endOfScript( aOUText, nPos, nScriptType );
+/*N*/
+/*N*/ // #96850# Handle blanks as weak, remove if BreakIterator returns WEAK for spaces.
+/*N*/ if ( ( nScriptType == i18n::ScriptType::LATIN ) && ( aOUText.getStr()[ nPos ] == 0x20 ) )
+/*N*/ {
+/*?*/ BOOL bOnlySpaces = TRUE;
+/*?*/ for ( USHORT n = nPos+1; ( n < nEndPos ) && bOnlySpaces; n++ )
+/*?*/ {
+/*?*/ if ( aOUText.getStr()[ n ] != 0x20 )
+/*?*/ bOnlySpaces = FALSE;
+/*?*/ }
+/*?*/ if ( bOnlySpaces )
+/*?*/ nScriptType = i18n::ScriptType::WEAK;
+/*N*/ }
+/*N*/
+/*N*/ if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes[rTypes.Count()-1].nScriptType ) )
+/*N*/ {
+/*?*/ // Expand last ScriptTypePosInfo, don't create weak or unecessary portions
+/*?*/ rTypes[rTypes.Count()-1].nEndPos = (USHORT)nEndPos;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
+/*N*/ }
+/*N*/
+/*N*/ nPos = nEndPos;
+/*N*/ }
+/*N*/
+/*N*/ if ( rTypes[0].nScriptType == i18n::ScriptType::WEAK )
+/*N*/ rTypes[0].nScriptType = ( rTypes.Count() > 1 ) ? rTypes[1].nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
+/*N*/ }
+/*N*/ }
+
+/*N*/ USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) const
+/*N*/ {
+/*N*/ USHORT nScriptType = 0;
+/*N*/
+/*N*/ if ( pEndPos )
+/*?*/ *pEndPos = rPaM.GetNode()->Len();
+/*N*/
+/*N*/ if ( rPaM.GetNode()->Len() )
+/*N*/ {
+/*N*/ USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() );
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ if ( !pParaPortion->aScriptInfos.Count() )
+/*?*/ ((ImpEditEngine*)this)->InitScriptTypes( nPara );
+/*N*/
+/*N*/ ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/ USHORT nPos = rPaM.GetIndex();
+/*N*/ for ( USHORT n = 0; n < rTypes.Count(); n++ )
+/*N*/ {
+/*N*/ if ( ( rTypes[n].nStartPos <= nPos ) && ( rTypes[n].nEndPos >= nPos ) )
+/*N*/ {
+/*N*/ nScriptType = rTypes[n].nScriptType;
+/*N*/ if( pEndPos )
+/*?*/ *pEndPos = rTypes[n].nEndPos;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
+/*N*/ }
+
+/*N*/ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
+/*N*/ {
+/*N*/ EditSelection aSel( rSel );
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/
+/*N*/ short nScriptType = 0;
+/*N*/
+/*N*/ USHORT nStartPara = GetEditDoc().GetPos( aSel.Min().GetNode() );
+/*N*/ USHORT nEndPara = GetEditDoc().GetPos( aSel.Max().GetNode() );
+/*N*/
+/*N*/ for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ if ( !pParaPortion->aScriptInfos.Count() )
+/*N*/ ((ImpEditEngine*)this)->InitScriptTypes( nPara );
+/*N*/
+/*N*/ ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/
+/*N*/ USHORT nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0;
+/*N*/ USHORT nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len();
+/*N*/ for ( USHORT n = 0; n < rTypes.Count(); n++ )
+/*N*/ {
+/*N*/ if ( ( rTypes[n].nStartPos <= nE ) && ( rTypes[n].nEndPos >= nS ) )
+/*N*/ {
+/*N*/ if ( rTypes[n].nScriptType != i18n::ScriptType::WEAK )
+/*N*/ {
+/*N*/ nScriptType |= GetItemScriptType ( rTypes[n].nScriptType );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ if ( !nScriptType && n )
+/*?*/ {
+/*?*/ // #93548# When starting with WEAK, use prev ScriptType...
+/*?*/ nScriptType = rTypes[n-1].nScriptType;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
+/*N*/ }
+
+/*N*/ BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const
+/*N*/ {
+/*N*/ BOOL bScriptChange = FALSE;
+/*N*/
+/*N*/ if ( rPaM.GetNode()->Len() )
+/*N*/ {
+/*N*/ USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() );
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ if ( !pParaPortion->aScriptInfos.Count() )
+/*?*/ ((ImpEditEngine*)this)->InitScriptTypes( nPara );
+/*N*/
+/*N*/ ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/ USHORT nPos = rPaM.GetIndex();
+/*N*/ for ( USHORT n = 0; n < rTypes.Count(); n++ )
+/*N*/ {
+/*N*/ if ( rTypes[n].nStartPos == nPos )
+/*N*/ {
+/*N*/ bScriptChange = TRUE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return bScriptChange;
+/*N*/ }
+
+/*N*/ BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const
+/*N*/ {
+/*N*/ BOOL bTypeFound = FALSE;
+/*N*/
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ if ( !pParaPortion->aScriptInfos.Count() )
+/*N*/ ((ImpEditEngine*)this)->InitScriptTypes( nPara );
+/*N*/
+/*N*/ ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/ for ( USHORT n = rTypes.Count(); n && !bTypeFound; )
+/*N*/ {
+/*N*/ if ( rTypes[--n].nScriptType == nType )
+/*N*/ bTypeFound = TRUE;
+/*N*/ }
+/*N*/ return bTypeFound;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::InitWritingDirections( USHORT nPara )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ WritingDirectionInfos& rInfos = pParaPortion->aWritingDirectionInfos;
+/*N*/ rInfos.Remove( 0, rInfos.Count() );
+/*N*/
+/*N*/ BOOL bCTL = FALSE;
+/*N*/ ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/ for ( USHORT n = 0; n < rTypes.Count(); n++ )
+/*N*/ {
+/*N*/ if ( rTypes[n].nScriptType == i18n::ScriptType::COMPLEX )
+/*N*/ {
+/*N*/ bCTL = TRUE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ const BYTE nDefaultDir = IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
+/*N*/ if ( ( bCTL || ( nDefaultDir == UBIDI_RTL ) ) && pParaPortion->GetNode()->Len() )
+/*N*/ {
+/*?*/
+/*?*/ String aText( *pParaPortion->GetNode() );
+/*?*/
+/*?*/ //
+/*?*/ // Bidi functions from icu 2.0
+/*?*/ //
+/*?*/ UErrorCode nError = U_ZERO_ERROR;
+/*?*/ UBiDi* pBidi = ubidi_openSized( aText.Len(), 0, &nError );
+/*?*/ nError = U_ZERO_ERROR;
+/*?*/
+/*?*/ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.GetBuffer()), aText.Len(), nDefaultDir, NULL, &nError ); // UChar != sal_Unicode in MinGW
+/*?*/ nError = U_ZERO_ERROR;
+/*?*/
+/*?*/ long nCount = ubidi_countRuns( pBidi, &nError );
+/*?*/
+/*?*/ int32_t nStart = 0;
+/*?*/ int32_t nEnd;
+/*?*/ UBiDiLevel nCurrDir;
+/*?*/
+/*?*/ for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+/*?*/ {
+/*?*/ ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
+/*?*/ rInfos.Insert( WritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ), rInfos.Count() );
+/*?*/ nStart = nEnd;
+/*?*/ }
+/*?*/
+/*?*/ ubidi_close( pBidi );
+/*N*/ }
+/*N*/
+/*N*/ // No infos mean no CTL and default dir is L2R...
+/*N*/ if ( !rInfos.Count() )
+/*N*/ rInfos.Insert( WritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->Len() ), rInfos.Count() );
+/*N*/
+/*N*/ }
+
+/*N*/ BOOL ImpEditEngine::IsRightToLeft( USHORT nPara ) const
+/*N*/ {
+/*N*/ BOOL bR2L = FALSE;
+/*N*/ const SvxFrameDirectionItem* pFrameDirItem = NULL;
+/*N*/
+/*N*/ if ( !IsVertical() )
+/*N*/ {
+/*N*/ bR2L = GetDefaultHorizontalTextDirection() == EE_HTEXTDIR_R2L;
+/*N*/ pFrameDirItem = &(const SvxFrameDirectionItem&)GetParaAttrib( nPara, EE_PARA_WRITINGDIR );
+/*N*/ if ( pFrameDirItem->GetValue() == FRMDIR_ENVIRONMENT )
+/*N*/ {
+/*N*/ // #103045# if DefaultHorizontalTextDirection is set, use that value, otherwise pool default.
+/*N*/ if ( GetDefaultHorizontalTextDirection() != EE_HTEXTDIR_DEFAULT )
+/*N*/ {
+/*?*/ pFrameDirItem = NULL; // bR2L allready set to default horizontal text direction
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Use pool default
+/*N*/ pFrameDirItem = &(const SvxFrameDirectionItem&)((ImpEditEngine*)this)->GetEmptyItemSet().Get( EE_PARA_WRITINGDIR );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( pFrameDirItem )
+/*N*/ bR2L = pFrameDirItem->GetValue() == FRMDIR_HORI_RIGHT_TOP;
+/*N*/
+/*N*/ return bR2L;
+/*N*/ }
+
+
+
+/*N*/ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, USHORT* pEnd )
+/*N*/ {
+/*N*/ // BYTE nRightToLeft = IsRightToLeft( nPara ) ? 1 : 0;
+/*N*/ BYTE nRightToLeft = 0;
+/*N*/
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+/*N*/ if ( pNode && pNode->Len() )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/ if ( !pParaPortion->aWritingDirectionInfos.Count() )
+/*N*/ InitWritingDirections( nPara );
+/*N*/
+/*N*/ BYTE nType = 0;
+/*N*/ WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos;
+/*N*/ for ( USHORT n = 0; n < rDirInfos.Count(); n++ )
+/*N*/ {
+/*N*/ if ( ( rDirInfos[n].nStartPos <= nPos ) && ( rDirInfos[n].nEndPos >= nPos ) )
+/*N*/ {
+/*N*/ nRightToLeft = rDirInfos[n].nType;
+/*N*/ if ( pStart )
+/*?*/ *pStart = rDirInfos[n].nStartPos;
+/*N*/ if ( pEnd )
+/*?*/ *pEnd = rDirInfos[n].nEndPos;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nRightToLeft;
+/*N*/ }
+
+/*N*/ SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const
+/*N*/ {
+/*N*/ SvxAdjust eJustification = SVX_ADJUST_LEFT;
+/*N*/
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ {
+/*N*/ eJustification = ((const SvxAdjustItem&) GetParaAttrib( nPara, EE_PARA_JUST )).GetAdjust();
+/*N*/
+/*N*/ if ( IsRightToLeft( nPara ) )
+/*N*/ {
+/*?*/ if ( eJustification == SVX_ADJUST_LEFT )
+/*?*/ eJustification = SVX_ADJUST_RIGHT;
+/*?*/ else if ( eJustification == SVX_ADJUST_RIGHT )
+/*?*/ eJustification = SVX_ADJUST_LEFT;
+/*N*/ }
+/*N*/ }
+/*N*/ return eJustification;
+/*N*/ }
+
+
+// ----------------------------------------------------------------------
+// Textaenderung
+// ----------------------------------------------------------------------
+
+/*N*/ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndoRemoveChars* pCurUndo )
+/*N*/ {
+/*N*/ aEditDoc.RemoveChars( rPaM, nChars );
+/*N*/ TextModified();
+/*N*/ }
+
+
+
+/*N*/ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, BOOL bBackward )
+/*N*/ {
+/*N*/ DBG_ASSERT( pLeft != pRight, "Den gleichen Absatz zusammenfuegen ?" );
+/*N*/ DBG_ASSERT( aEditDoc.GetPos( pLeft ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(1)" );
+/*N*/ DBG_ASSERT( aEditDoc.GetPos( pRight ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(2)" );
+/*N*/
+/*N*/ USHORT nParagraphTobeDeleted = aEditDoc.GetPos( pRight );
+/*N*/ DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pRight, nParagraphTobeDeleted );
+/*N*/ aDeletedNodes.Insert( pInf, aDeletedNodes.Count() );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 InsertUndo( new EditUndoConnectParas( this,
+/*N*/ }
+/*N*/ #endif
+/*N*/
+/*N*/ if ( bBackward )
+/*N*/ {
+/*?*/ pLeft->SetStyleSheet( pRight->GetStyleSheet(), TRUE );
+/*?*/ pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() );
+/*?*/ pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont();
+/*N*/ }
+/*N*/
+/*N*/ ParaAttribsChanged( pLeft );
+/*N*/
+/*N*/ // Erstmal Portions suchen, da pRight nach ConnectParagraphs weg.
+/*N*/ ParaPortion* pLeftPortion = FindParaPortion( pLeft );
+/*N*/ ParaPortion* pRightPortion = FindParaPortion( pRight );
+/*N*/ DBG_ASSERT( pLeftPortion, "Blinde Portion in ImpConnectParagraphs(1)" );
+/*N*/ DBG_ASSERT( pRightPortion, "Blinde Portion in ImpConnectParagraphs(2)" );
+/*N*/ DBG_ASSERT( nParagraphTobeDeleted == GetParaPortions().GetPos( pRightPortion ), "NodePos != PortionPos?" );
+/*N*/
+/*N*/ if ( IsCallParaInsertedOrDeleted() )
+/*N*/ GetEditEnginePtr()->ParagraphDeleted( nParagraphTobeDeleted );
+/*N*/
+/*N*/ EditPaM aPaM = aEditDoc.ConnectParagraphs( pLeft, pRight );
+/*N*/ GetParaPortions().Remove( nParagraphTobeDeleted );
+/*N*/ delete pRightPortion;
+/*N*/
+/*N*/ pLeftPortion->MarkSelectionInvalid( aPaM.GetIndex(), pLeft->Len() );
+/*N*/
+/*N*/ // der rechte Node wird von EditDoc::ConnectParagraphs() geloescht.
+/*N*/
+/*N*/ if ( GetTextRanger() )
+/*N*/ {
+/*?*/ // 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();
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ TextModified();
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+
+/*N*/ EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel )
+/*N*/ {
+/*N*/ if ( !aSel.HasRange() )
+/*?*/ return aSel.Min();
+/*N*/
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/ EditPaM aStartPaM( aSel.Min() );
+/*N*/ EditPaM aEndPaM( aSel.Max() );
+/*N*/
+/*N*/ CursorMoved( aStartPaM.GetNode() ); // nur damit neu eingestellte Attribute verschwinden...
+/*N*/ CursorMoved( aEndPaM.GetNode() ); // nur damit neu eingestellte Attribute verschwinden...
+/*N*/
+/*N*/ DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" );
+/*N*/ DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" );
+/*N*/
+/*N*/ USHORT nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() );
+/*N*/ USHORT nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() );
+/*N*/
+/*N*/ DBG_ASSERT( nEndNode != USHRT_MAX, "Start > End ?!" );
+/*N*/ DBG_ASSERT( nStartNode <= nEndNode, "Start > End ?!" );
+/*N*/
+/*N*/ // Alle Nodes dazwischen entfernen....
+/*N*/ for ( ULONG z = nStartNode+1; z < nEndNode; z++ )
+/*N*/ {
+/*?*/ // Immer nStartNode+1, wegen Remove()!
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpRemoveParagraph( nStartNode+1 );
+/*N*/ }
+/*N*/
+/*N*/ if ( aStartPaM.GetNode() != aEndPaM.GetNode() )
+/*N*/ {
+/*N*/ // Den Rest des StartNodes...
+/*N*/ USHORT nChars;
+/*N*/ nChars = aStartPaM.GetNode()->Len() - aStartPaM.GetIndex();
+/*N*/ ImpRemoveChars( aStartPaM, nChars );
+/*N*/ ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in ImpDeleteSelection(3)" );
+/*N*/ pPortion->MarkSelectionInvalid( aStartPaM.GetIndex(), aStartPaM.GetNode()->Len() );
+/*N*/
+/*N*/ // Den Anfang des EndNodes....
+/*N*/ nChars = aEndPaM.GetIndex();
+/*N*/ aEndPaM.SetIndex( 0 );
+/*N*/ ImpRemoveChars( aEndPaM, nChars );
+/*N*/ pPortion = FindParaPortion( aEndPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in ImpDeleteSelection(4)" );
+/*N*/ pPortion->MarkSelectionInvalid( 0, aEndPaM.GetNode()->Len() );
+/*N*/ // Zusammenfuegen....
+/*N*/ aStartPaM = ImpConnectParagraphs( aStartPaM.GetNode(), aEndPaM.GetNode() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ USHORT nChars;
+/*N*/ nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex();
+/*N*/ ImpRemoveChars( aStartPaM, nChars );
+/*N*/ ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in ImpDeleteSelection(5)" );
+/*N*/ pPortion->MarkInvalid( aEndPaM.GetIndex(), aStartPaM.GetIndex() - aEndPaM.GetIndex() );
+/*N*/ }
+/*N*/
+/*N*/ UpdateSelections();
+/*N*/ TextModified();
+/*N*/ return aStartPaM;
+/*N*/ }
+
+
+/*N*/ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rStr )
+/*N*/ {
+/*N*/ EditPaM aPaM;
+/*N*/ if ( aCurSel.HasRange() )
+/*N*/ aPaM = ImpDeleteSelection( aCurSel );
+/*N*/ else
+/*N*/ aPaM = aCurSel.Max();
+/*N*/
+/*N*/ EditPaM aCurPaM( aPaM ); // fuers Invalidieren
+/*N*/
+/*N*/ XubString aText( rStr );
+/*N*/ aText.ConvertLineEnd( LINEEND_LF );
+/*N*/ SfxVoidItem aTabItem( EE_FEATURE_TAB );
+/*N*/
+/*N*/ // Konvertiert nach LineSep = \n
+/*N*/ // Token mit LINE_SEP abfragen,
+/*N*/ // da der MAC-Compiler aus \n etwas anderes macht!
+/*N*/
+/*N*/ USHORT nStart = 0;
+/*N*/ while ( nStart < aText.Len() )
+/*N*/ {
+/*N*/ USHORT nEnd = aText.Search( LINE_SEP, nStart );
+/*N*/ if ( nEnd == STRING_NOTFOUND )
+/*N*/ nEnd = aText.Len(); // nicht dereferenzieren!
+/*N*/
+/*N*/ // Start == End => Leerzeile
+/*N*/ if ( nEnd > nStart )
+/*N*/ {
+/*N*/ XubString aLine( aText, nStart, nEnd-nStart );
+/*N*/ xub_StrLen nChars = aPaM.GetNode()->Len() + aLine.Len();
+/*N*/ if ( nChars > MAXCHARSINPARA )
+/*N*/ {
+/*?*/ USHORT nMaxNewChars = MAXCHARSINPARA-aPaM.GetNode()->Len();
+/*?*/ nEnd -= ( aLine.Len() - nMaxNewChars ); // Dann landen die Zeichen im naechsten Absatz.
+/*?*/ aLine.Erase( nMaxNewChars ); // Del Rest...
+/*N*/ }
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() )
+/*N*/ InsertUndo( new EditUndoInsertChars( this, CreateEPaM( aPaM ), aLine ) );
+/*N*/ #endif
+/*N*/ // Tabs ?
+/*N*/ if ( aLine.Search( '\t' ) == STRING_NOTFOUND )
+/*N*/ aPaM = aEditDoc.InsertText( aPaM, aLine );
+/*N*/ else
+/*N*/ {
+/*N*/ USHORT nStart2 = 0;
+/*N*/ while ( nStart2 < aLine.Len() )
+/*N*/ {
+/*N*/ USHORT nEnd2 = aLine.Search( '\t', nStart2 );
+/*N*/ if ( nEnd2 == STRING_NOTFOUND )
+/*?*/ nEnd2 = aLine.Len(); // nicht dereferenzieren!
+/*N*/
+/*N*/ if ( nEnd2 > nStart2 )
+/*?*/ aPaM = aEditDoc.InsertText( aPaM, XubString( aLine, nStart2, nEnd2-nStart2 ) );
+/*N*/ if ( nEnd2 < aLine.Len() )
+/*N*/ {
+/*N*/ // aPaM = ImpInsertFeature( EditSelection( aPaM, aPaM ), );
+/*N*/ aPaM = aEditDoc.InsertFeature( aPaM, aTabItem );
+/*N*/ }
+/*N*/ nStart2 = nEnd2+1;
+/*N*/ }
+/*N*/ }
+/*N*/ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
+/*N*/ pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
+/*N*/ }
+/*N*/ if ( nEnd < aText.Len() )
+/*N*/ aPaM = ImpInsertParaBreak( aPaM );
+/*N*/
+/*N*/ nStart = nEnd+1;
+/*N*/ }
+/*N*/
+/*N*/ TextModified();
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::ImpFastInsertText( EditPaM aPaM, const XubString& rStr )
+/*N*/ {
+/*N*/ DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "FastInsertText: Zeilentrenner nicht erlaubt!" );
+/*N*/ DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "FastInsertText: Zeilentrenner nicht erlaubt!" );
+/*N*/ DBG_ASSERT( rStr.Search( '\t' ) == STRING_NOTFOUND, "FastInsertText: Features nicht erlaubt!" );
+/*N*/
+/*N*/ if ( ( aPaM.GetNode()->Len() + rStr.Len() ) < MAXCHARSINPARA )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() )
+/*?*/ InsertUndo( new EditUndoInsertChars( this, CreateEPaM( aPaM ), rStr ) );
+/*N*/ #endif
+/*N*/
+/*N*/ aPaM = aEditDoc.InsertText( aPaM, rStr );
+/*N*/ TextModified();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aPaM = ImpInsertText( aPaM, rStr );
+/*N*/ }
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolItem& rItem )
+/*N*/ {
+/*N*/ EditPaM aPaM;
+/*N*/ if ( aCurSel.HasRange() )
+/*?*/ aPaM = ImpDeleteSelection( aCurSel );
+/*N*/ else
+/*N*/ aPaM = aCurSel.Max();
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() )
+/*N*/ InsertUndo( new EditUndoInsertFeature( this, CreateEPaM( aPaM ), rItem ) );
+/*N*/ #endif
+/*N*/ aPaM = aEditDoc.InsertFeature( aPaM, rItem );
+/*N*/
+/*N*/ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in InsertFeature" );
+/*N*/ pPortion->MarkInvalid( aPaM.GetIndex()-1, 1 );
+/*N*/
+/*N*/ TextModified();
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEndingAttribs )
+/*N*/ {
+/*N*/ EditPaM aPaM( aEditDoc.InsertParaBreak( rPaM, bKeepEndingAttribs ) );
+/*N*/
+/*N*/ ParaPortion* pPortion = FindParaPortion( rPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in ImpInsertParaBreak" );
+/*N*/ pPortion->MarkInvalid( rPaM.GetIndex(), 0 );
+/*N*/
+/*N*/ // Optimieren: Nicht unnoetig viele GetPos auf die Listen ansetzen!
+/*N*/ // Hier z.B. bei Undo, aber auch in allen anderen Methoden.
+/*N*/ USHORT nPos = GetParaPortions().GetPos( pPortion );
+/*N*/ ParaPortion* pNewPortion = new ParaPortion( aPaM.GetNode() );
+/*N*/ GetParaPortions().Insert( pNewPortion, nPos + 1 );
+/*N*/ ParaAttribsChanged( pNewPortion->GetNode() );
+/*N*/ if ( IsCallParaInsertedOrDeleted() )
+/*N*/ GetEditEnginePtr()->ParagraphInserted( nPos+1 );
+/*N*/
+/*N*/ CursorMoved( rPaM.GetNode() ); // falls leeres Attribut entstanden.
+/*N*/ TextModified();
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::ImpFastInsertParagraph( USHORT nPara )
+/*N*/ {
+/*N*/ ContentNode* pNode = new ContentNode( aEditDoc.GetItemPool() );
+/*N*/ // Falls FlatMode, wird spaeter kein Font eingestellt:
+/*N*/ pNode->GetCharAttribs().GetDefFont() = aEditDoc.GetDefFont();
+/*N*/
+/*N*/ aEditDoc.Insert( pNode, nPara );
+/*N*/
+/*N*/ ParaPortion* pNewPortion = new ParaPortion( pNode );
+/*N*/ GetParaPortions().Insert( pNewPortion, nPara );
+/*N*/ if ( IsCallParaInsertedOrDeleted() )
+/*N*/ GetEditEnginePtr()->ParagraphInserted( nPara );
+/*N*/
+/*N*/ return EditPaM( pNode, 0 );
+/*N*/ }
+
+/*N*/ BOOL ImpEditEngine::UpdateFields()
+/*N*/ {
+/*N*/ BOOL bChanges = FALSE;
+/*N*/ USHORT nParas = GetEditDoc().Count();
+/*N*/ for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+/*N*/ {
+/*N*/ BOOL bChangesInPara = FALSE;
+/*N*/ ContentNode* pNode = GetEditDoc().GetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "NULL-Pointer im Doc" );
+/*N*/ CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
+/*N*/ USHORT nAttrs = rAttribs.Count();
+/*N*/ for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = rAttribs[nAttr];
+/*N*/ if ( pAttr->Which() == EE_FEATURE_FIELD )
+/*N*/ {
+/*N*/ EditCharAttribField* pField = (EditCharAttribField*)pAttr;
+/*N*/ EditCharAttribField* pCurrent = new EditCharAttribField( *pField );
+/*N*/ pField->Reset();
+/*N*/
+/*N*/ if ( aStatus.MarkFields() )
+/*N*/ pField->GetFldColor() = new Color( GetColorConfig().GetColorValue( WRITERFIELDSHADINGS ).nColor );
+/*N*/
+/*N*/ XubString aFldValue = GetEditEnginePtr()->CalcFieldValue(
+/*N*/ (const SvxFieldItem&)*pField->GetItem(),
+/*N*/ nPara, pField->GetStart(),
+/*N*/ pField->GetTxtColor(), pField->GetFldColor() );
+/*N*/ pField->GetFieldValue() = aFldValue;
+/*N*/ if ( *pField != *pCurrent )
+/*N*/ {
+/*N*/ bChanges = TRUE;
+/*N*/ bChangesInPara = TRUE;
+/*N*/ }
+/*N*/ delete pCurrent;
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bChangesInPara )
+/*N*/ {
+/*N*/ // ggf. etwas genauer invalidieren.
+/*N*/ ParaPortion* pPortion = GetParaPortions().GetObject( nPara );
+/*N*/ DBG_ASSERT( pPortion, "NULL-Pointer im Doc" );
+/*N*/ pPortion->MarkSelectionInvalid( 0, pNode->Len() );
+/*N*/ }
+/*N*/ }
+/*N*/ return bChanges;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::InsertLineBreak( EditSelection aCurSel )
+/*N*/ {
+/*N*/ EditPaM aPaM( ImpInsertFeature( aCurSel, SfxVoidItem( EE_FEATURE_LINEBR ) ) );
+/*N*/ return aPaM;
+/*N*/ }
+
+// ----------------------------------------------------------------------
+// Hilfsfunktionen
+// ----------------------------------------------------------------------
+
+/*N*/ EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart )
+/*N*/ {
+/*N*/ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: GetPaM" );
+/*N*/
+/*N*/ long nY = 0;
+/*N*/ long nTmpHeight;
+/*N*/ EditPaM aPaM;
+/*N*/ USHORT nPortion;
+/*N*/ for ( nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+/*N*/ {
+/*N*/ ParaPortion* pPortion = GetParaPortions().GetObject(nPortion);
+/*N*/ nTmpHeight = pPortion->GetHeight(); // sollte auch bei !bVisible richtig sein!
+/*N*/ nY += nTmpHeight;
+/*N*/ if ( nY > aDocPos.Y() )
+/*N*/ {
+/*N*/ nY -= nTmpHeight;
+/*N*/ aDocPos.Y() -= nY;
+/*N*/ // unsichtbare Portions ueberspringen:
+/*N*/ while ( pPortion && !pPortion->IsVisible() )
+/*N*/ {
+/*?*/ nPortion++;
+/*?*/ pPortion = GetParaPortions().SaveGetObject( nPortion );
+/*N*/ }
+/*N*/ DBG_ASSERT( pPortion, "Keinen sichtbaren Absatz gefunden: GetPaM" );
+/*N*/ aPaM = GetPaM( pPortion, aDocPos, bSmart );
+/*N*/ return aPaM;
+/*N*/
+/*N*/ }
+/*N*/ }
+/*?*/ // 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;
+/*N*/ }
+
+/*N*/ sal_uInt32 ImpEditEngine::GetTextHeight() const
+/*N*/ {
+/*N*/ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
+/*N*/ DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Nicht formatiert" );
+/*N*/ return nCurTextHeight;
+/*N*/ }
+
+/*N*/ sal_uInt32 ImpEditEngine::CalcTextWidth( BOOL bIgnoreExtraSpace )
+/*N*/ {
+/*N*/ // Wenn noch nicht formatiert und nicht gerade dabei.
+/*N*/ // Wird in der Formatierung bei AutoPageSize gerufen.
+/*N*/ if ( !IsFormatted() && !IsFormatting() )
+/*?*/ FormatDoc();
+/*N*/
+/*N*/ EditLine* pLine;
+/*N*/
+/*N*/ long nMaxWidth = 0;
+/*N*/ long nCurWidth = 0;
+/*N*/
+/*N*/ // --------------------------------------------------
+/*N*/ // Ueber alle Absaetze...
+/*N*/ // --------------------------------------------------
+/*N*/ USHORT nParas = GetParaPortions().Count();
+/*N*/ USHORT nBiggestPara = 0;
+/*N*/ USHORT nBiggestLine = 0;
+/*N*/ for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+/*N*/ {
+/*N*/ ParaPortion* pPortion = GetParaPortions().GetObject( nPara );
+/*N*/ const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pPortion->GetNode() );
+/*N*/
+/*N*/ if ( pPortion->IsVisible() )
+/*N*/ {
+/*N*/ // --------------------------------------------------
+/*N*/ // Ueber die Zeilen des Absatzes...
+/*N*/ // --------------------------------------------------
+/*N*/ ULONG nLines = pPortion->GetLines().Count();
+/*N*/ for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+/*N*/ {
+/*N*/ pLine = pPortion->GetLines().GetObject( nLine );
+/*N*/ DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in CalcWidth" );
+/*N*/ // nCurWidth = pLine->GetStartPosX();
+/*N*/ // Bei Center oder Right haengt die breite von der
+/*N*/ // Papierbreite ab, hier nicht erwuenscht.
+/*N*/ // Am besten generell nicht auf StartPosX verlassen,
+/*N*/ // es muss auch die rechte Einrueckung beruecksichtigt werden!
+/*N*/ nCurWidth = GetXValue( rLRItem.GetTxtLeft() );
+/*N*/ if ( nLine == 0 )
+/*N*/ {
+/*N*/ long nFI = GetXValue( rLRItem.GetTxtFirstLineOfst() );
+/*N*/ nCurWidth += nFI;
+/*N*/ if ( pPortion->GetBulletX() > nCurWidth )
+/*N*/ {
+/*?*/ nCurWidth -= nFI; // LI?
+/*?*/ if ( pPortion->GetBulletX() > nCurWidth )
+/*?*/ nCurWidth = pPortion->GetBulletX();
+/*N*/ }
+/*N*/ }
+/*N*/ nCurWidth += GetXValue( rLRItem.GetRight() );
+/*N*/ nCurWidth += CalcLineWidth( pPortion, pLine, bIgnoreExtraSpace );
+/*N*/ if ( nCurWidth > nMaxWidth )
+/*N*/ {
+/*N*/ nMaxWidth = nCurWidth;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if ( nMaxWidth < 0 )
+/*?*/ nMaxWidth = 0;
+/*N*/
+/*N*/ nMaxWidth++; // Ein breiter, da in CreateLines bei >= umgebrochen wird.
+/*N*/ return (sal_uInt32)nMaxWidth;
+/*N*/ }
+
+/*N*/ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace )
+/*N*/ {
+/*N*/ USHORT nPara = GetEditDoc().GetPos( pPortion->GetNode() );
+/*N*/ ULONG nOldLayoutMode = GetRefDevice()->GetLayoutMode();
+/*N*/
+/*N*/ ImplInitLayoutMode( GetRefDevice(), nPara, 0xFFFF );
+/*N*/
+/*N*/ SvxAdjust eJustification = GetJustification( nPara );
+/*N*/
+/*N*/ // Berechnung der Breite ohne die Indents...
+/*N*/ sal_uInt32 nWidth = 0;
+/*N*/ USHORT nPos = pLine->GetStart();
+/*N*/ for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+/*N*/ {
+/*N*/ TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP );
+/*N*/ switch ( pTextPortion->GetKind() )
+/*N*/ {
+/*N*/ case PORTIONKIND_FIELD:
+/*N*/ case PORTIONKIND_HYPHENATOR:
+/*N*/ case PORTIONKIND_TAB:
+/*N*/ {
+/*N*/ nWidth += pTextPortion->GetSize().Width();
+/*N*/ }
+/*N*/ break;
+/*N*/ case PORTIONKIND_TEXT:
+/*N*/ {
+/*N*/ if ( ( eJustification != SVX_ADJUST_BLOCK ) || ( !bIgnoreExtraSpace ) )
+/*N*/ {
+/*N*/ nWidth += pTextPortion->GetSize().Width();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ SvxFont aTmpFont( pPortion->GetNode()->GetCharAttribs().GetDefFont() );
+/*?*/ SeekCursor( pPortion->GetNode(), nPos+1, aTmpFont );
+/*?*/ aTmpFont.SetPhysFont( GetRefDevice() );
+/*?*/ nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), *pPortion->GetNode(), nPos, pTextPortion->GetLen(), NULL ).Width();
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ nPos += pTextPortion->GetLen();
+/*N*/ }
+/*N*/
+/*N*/ GetRefDevice()->SetLayoutMode( nOldLayoutMode );
+/*N*/
+/*N*/ return nWidth;
+/*N*/ }
+
+/*N*/ sal_uInt32 ImpEditEngine::CalcTextHeight()
+/*N*/ {
+/*N*/ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: CalcTextHeight" );
+/*N*/ sal_uInt32 nY = 0;
+/*N*/ for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+/*N*/ nY += GetParaPortions()[nPortion]->GetHeight();
+/*N*/ return nY;
+/*N*/ }
+
+/*N*/ USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
+/*N*/ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+/*N*/ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineCount" );
+/*N*/ if ( pPPortion )
+/*N*/ return pPPortion->GetLines().Count();
+/*N*/
+/*N*/ return 0xFFFF;
+/*N*/ }
+
+
+
+
+/*N*/ void ImpEditEngine::UpdateSelections()
+/*N*/ {
+/*N*/ USHORT nInvNodes = aDeletedNodes.Count();
+/*N*/
+/*N*/ // Pruefen, ob eine der Selektionen auf einem geloeschten Node steht...
+/*N*/ // Wenn der Node gueltig ist, muss noch der Index geprueft werden!
+/*N*/ for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+/*N*/ {
+/*N*/ EditView* pView = aEditViews.GetObject(nView);
+/*N*/ DBG_CHKOBJ( pView, EditView, 0 );
+/*N*/ EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
+/*N*/ BOOL bChanged = FALSE;
+/*N*/ for ( USHORT n = 0; n < nInvNodes; n++ )
+/*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
+/*?*/ }
+/*N*/ }
+/*N*/ if ( !bChanged )
+/*N*/ {
+/*N*/ // Index prueffen, falls Node geschrumpft.
+/*N*/ if ( aCurSel.Min().GetIndex() > aCurSel.Min().GetNode()->Len() )
+/*N*/ {
+/*?*/ aCurSel.Min().GetIndex() = aCurSel.Min().GetNode()->Len();
+/*?*/ pView->pImpEditView->SetEditSelection( aCurSel );
+/*N*/ }
+/*N*/ if ( aCurSel.Max().GetIndex() > aCurSel.Max().GetNode()->Len() )
+/*N*/ {
+/*?*/ aCurSel.Max().GetIndex() = aCurSel.Max().GetNode()->Len();
+/*?*/ pView->pImpEditView->SetEditSelection( aCurSel );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Loeschen...
+/*N*/ for ( USHORT n = 0; n < nInvNodes; n++ )
+/*N*/ {
+/*N*/ DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n );
+/*N*/ delete pInf;
+/*N*/ }
+/*N*/ aDeletedNodes.Remove( 0, aDeletedNodes.Count() );
+/*N*/ }
+
+/*N*/ EditSelection ImpEditEngine::ConvertSelection( USHORT nStartPara, USHORT nStartPos,
+/*N*/ USHORT nEndPara, USHORT nEndPos ) const
+/*N*/ {
+/*N*/ EditSelection aNewSelection;
+/*N*/
+/*N*/ // Start...
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nStartPara );
+/*N*/ USHORT nIndex = nStartPos;
+/*N*/ if ( !pNode )
+/*N*/ {
+/*?*/ pNode = aEditDoc[ aEditDoc.Count()-1 ];
+/*?*/ nIndex = pNode->Len();
+/*N*/ }
+/*N*/ else if ( nIndex > pNode->Len() )
+/*?*/ nIndex = pNode->Len();
+/*N*/
+/*N*/ aNewSelection.Min().SetNode( pNode );
+/*N*/ aNewSelection.Min().SetIndex( nIndex );
+/*N*/
+/*N*/ // End...
+/*N*/ pNode = aEditDoc.SaveGetObject( nEndPara );
+/*N*/ nIndex = nEndPos;
+/*N*/ if ( !pNode )
+/*N*/ {
+/*?*/ pNode = aEditDoc[ aEditDoc.Count()-1 ];
+/*?*/ nIndex = pNode->Len();
+/*N*/ }
+/*N*/ else if ( nIndex > pNode->Len() )
+/*?*/ nIndex = pNode->Len();
+/*N*/
+/*N*/ aNewSelection.Max().SetNode( pNode );
+/*N*/ aNewSelection.Max().SetIndex( nIndex );
+/*N*/
+/*N*/ return aNewSelection;
+/*N*/ }
+
+
+
+/*N*/ void ImpEditEngine::SetActiveView( EditView* pView )
+/*N*/ {
+/*N*/ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/ // Eigentlich waere jetzt ein bHasVisSel und HideSelection notwendig !!!
+/*N*/
+/*N*/ if ( pView == pActiveView )
+/*N*/ return;
+/*N*/
+/*N*/ if ( pActiveView && pActiveView->HasSelection() )
+/*?*/ pActiveView->pImpEditView->DrawSelection(); // Wegzeichnen...
+/*N*/
+/*N*/ pActiveView = pView;
+/*N*/
+/*N*/ if ( pActiveView && pActiveView->HasSelection() )
+/*?*/ pActiveView->pImpEditView->DrawSelection(); // Wegzeichnen...
+/*N*/
+/*N*/ // NN: Quick fix for #78668#:
+/*N*/ // When editing of a cell in Calc is ended, the edit engine is not deleted,
+/*N*/ // only the edit views are removed. If mpIMEInfos is still set in that case,
+/*N*/ // mpIMEInfos->aPos points to an invalid selection.
+/*N*/ // -> reset mpIMEInfos now
+/*N*/ // (probably something like this is necessary whenever the content is modified
+/*N*/ // from the outside)
+/*N*/
+/*N*/ if ( !pView && mpIMEInfos )
+/*N*/ {
+/*?*/ delete mpIMEInfos;
+/*?*/ mpIMEInfos = NULL;
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
+/*N*/ {
+/*N*/ Range aRange( 0, 0 );
+/*N*/
+/*N*/ if ( pPortion->IsVisible() )
+/*N*/ {
+/*N*/ const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+/*N*/ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+/*N*/ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+/*N*/ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+/*N*/
+/*N*/ // erst von vorne...
+/*N*/ USHORT nFirstInvalid = 0xFFFF;
+/*N*/ USHORT nLine;
+/*N*/ for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+/*N*/ {
+/*N*/ EditLine* pL = pPortion->GetLines().GetObject( nLine );
+/*N*/ if ( pL->IsInvalid() )
+/*N*/ {
+/*N*/ nFirstInvalid = nLine;
+/*N*/ break;
+/*N*/ }
+/*?*/ if ( nLine && !aStatus.IsOutliner() ) // nicht die erste Zeile
+/*?*/ aRange.Min() += nSBL;
+/*?*/ aRange.Min() += pL->GetHeight();
+/*N*/ }
+/*N*/ DBG_ASSERT( nFirstInvalid != 0xFFFF, "Keine ungueltige Zeile gefunden in GetInvalidYOffset(1)" );
+/*N*/
+/*N*/
+/*N*/ // Abgleichen und weiter...
+/*N*/ aRange.Max() = aRange.Min();
+/*N*/ aRange.Max() += pPortion->GetFirstLineOffset();
+/*N*/ if ( nFirstInvalid != 0 ) // Nur wenn nicht die erste Zeile ungueltig
+/*?*/ aRange.Min() = aRange.Max();
+/*N*/
+/*N*/ USHORT nLastInvalid = pPortion->GetLines().Count()-1;
+/*N*/ for ( nLine = nFirstInvalid; nLine < pPortion->GetLines().Count(); nLine++ )
+/*N*/ {
+/*N*/ EditLine* pL = pPortion->GetLines().GetObject( nLine );
+/*N*/ if ( pL->IsValid() )
+/*N*/ {
+/*?*/ nLastInvalid = nLine;
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if ( nLine && !aStatus.IsOutliner() )
+/*N*/ aRange.Max() += nSBL;
+/*N*/ aRange.Max() += pL->GetHeight();
+/*N*/ }
+/*N*/
+/*N*/ // MT 07/00 SBL kann jetzt kleiner 100% sein => ggf. die Zeile davor neu ausgeben.
+/*N*/ if( ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) && rLSItem.GetPropLineSpace() &&
+/*N*/ ( rLSItem.GetPropLineSpace() < 100 ) )
+/*N*/ {
+/*?*/ EditLine* pL = pPortion->GetLines().GetObject( nFirstInvalid );
+/*?*/ long n = pL->GetTxtHeight() * ( 100 - rLSItem.GetPropLineSpace() );
+/*?*/ n /= 100;
+/*?*/ aRange.Min() -= n;
+/*?*/ aRange.Max() += n;
+/*N*/ }
+/*N*/
+/*N*/ if ( ( nLastInvalid == pPortion->GetLines().Count()-1 ) && ( !aStatus.IsOutliner() ) )
+/*N*/ aRange.Max() += GetYValue( rULSpace.GetLower() );
+/*N*/ }
+/*N*/ return aRange;
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart )
+/*N*/ {
+/*N*/ DBG_ASSERT( pPortion->IsVisible(), "Wozu GetPaM() bei einem unsichtbaren Absatz?" );
+/*N*/ DBG_ASSERT( IsFormatted(), "GetPaM: Nicht formatiert" );
+/*N*/
+/*N*/ USHORT nCurIndex = 0;
+/*N*/ EditPaM aPaM;
+/*N*/ aPaM.SetNode( pPortion->GetNode() );
+/*N*/
+/*N*/ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+/*N*/ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+/*N*/ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+/*N*/
+/*N*/ long nY = pPortion->GetFirstLineOffset();
+/*N*/
+/*N*/ DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetPaM!" );
+/*N*/
+/*N*/ EditLine* pLine = 0;
+/*N*/ for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+/*N*/ {
+/*N*/ EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
+/*N*/ nY += pTmpLine->GetHeight();
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ nY += nSBL;
+/*N*/ if ( nY > aDocPos.Y() ) // das war 'se
+/*N*/ {
+/*N*/ pLine = pTmpLine;
+/*N*/ break; // richtige Y-Position intressiert nicht
+/*N*/ }
+/*N*/
+/*?*/ nCurIndex += pTmpLine->GetLen();
+/*N*/ }
+/*N*/
+/*N*/ if ( !pLine ) // darf nur im Bereich von SA passieren!
+/*N*/ {
+/*?*/ #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;
+/*N*/ }
+/*N*/
+/*N*/ // Wenn Zeile gefunden, nur noch X-Position => Index
+/*N*/ nCurIndex = GetChar( pPortion, pLine, aDocPos.X(), bSmart );
+/*N*/ aPaM.SetIndex( nCurIndex );
+/*N*/
+/*N*/ if ( nCurIndex && ( nCurIndex == pLine->GetEnd() ) &&
+/*N*/ ( pLine != pPortion->GetLines().GetObject( pPortion->GetLines().Count()-1) ) )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 aPaM = CursorLeft( aPaM, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL );
+/*N*/ }
+/*N*/
+/*N*/ return aPaM;
+/*N*/ }
+
+/*N*/ USHORT ImpEditEngine::GetChar( ParaPortion* pParaPortion, EditLine* pLine, long nXPos, BOOL bSmart )
+/*N*/ {
+/*N*/ DBG_ASSERT( pLine, "Keine Zeile erhalten: GetChar" );
+/*N*/
+/*N*/ USHORT nChar = 0xFFFF;
+/*N*/ USHORT nCurIndex = pLine->GetStart();
+/*N*/
+/*N*/
+/*N*/ // Search best matching portion with GetPortionXOffset()
+/*N*/ for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
+/*N*/ {
+/*N*/ TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i );
+/*N*/ long nXLeft = GetPortionXOffset( pParaPortion, pLine, i );
+/*N*/ long nXRight = nXLeft + pPortion->GetSize().Width();
+/*N*/ if ( ( nXLeft <= nXPos ) && ( nXRight >= nXPos ) )
+/*N*/ {
+/*N*/ nChar = nCurIndex;
+/*N*/
+/*N*/ // Search within Portion...
+/*N*/
+/*N*/ // Don't search within special portions...
+/*N*/ if ( pPortion->GetKind() != PORTIONKIND_TEXT )
+/*N*/ {
+/*?*/ // ...but check on which side
+/*?*/ if ( bSmart )
+/*?*/ {
+/*?*/ long nLeftDiff = nXPos-nXLeft;
+/*?*/ long nRightDiff = nXRight-nXPos;
+/*?*/ if ( nRightDiff < nLeftDiff )
+/*?*/ nChar++;
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ USHORT nMax = pPortion->GetLen();
+/*N*/ USHORT nOffset = 0xFFFF;
+/*N*/ USHORT nTmpCurIndex = nChar - pLine->GetStart();
+/*N*/
+/*N*/ long nXInPortion = nXPos - nXLeft;
+/*N*/ if ( pPortion->IsRightToLeft() )
+/*?*/ nXInPortion = nXRight - nXPos;
+/*N*/
+/*N*/ // Search in Array...
+/*N*/ for ( USHORT x = 0; x < nMax; x++ )
+/*N*/ {
+/*N*/ long nTmpPosMax = pLine->GetCharPosArray().GetObject( nTmpCurIndex+x );
+/*N*/ if ( nTmpPosMax > nXInPortion )
+/*N*/ {
+/*N*/ // pruefen, ob dieser oder der davor...
+/*N*/ long nTmpPosMin = x ? pLine->GetCharPosArray().GetObject( nTmpCurIndex+x-1 ) : 0;
+/*N*/ long nDiffLeft = nXInPortion - nTmpPosMin;
+/*N*/ long nDiffRight = nTmpPosMax - nXInPortion;
+/*N*/ DBG_ASSERT( nDiffLeft >= 0, "DiffLeft negativ" );
+/*N*/ DBG_ASSERT( nDiffRight >= 0, "DiffRight negativ" );
+/*N*/ nOffset = ( bSmart && ( nDiffRight < nDiffLeft ) ) ? x+1 : x;
+/*N*/ // I18N: If there are character position with the length of 0,
+/*N*/ // they belong to the same character, we can not use this position as an index.
+/*N*/ // Skip all 0-positions, cheaper than using XBreakIterator:
+/*N*/ if ( nOffset < nMax )
+/*N*/ {
+/*N*/ const long nX = pLine->GetCharPosArray().GetObject(nOffset);
+/*N*/ while ( ( (nOffset+1) < nMax ) && ( pLine->GetCharPosArray().GetObject(nOffset+1) == nX ) )
+/*N*/ nOffset++;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Bei Verwendung des CharPosArray duerfte es keine Ungenauigkeiten geben!
+/*N*/ // Vielleicht bei Kerning ?
+/*N*/ // 0xFFF passiert z.B. bei Outline-Font, wenn ganz hinten.
+/*N*/ if ( nOffset == 0xFFFF )
+/*N*/ nOffset = nMax;
+/*N*/
+/*N*/ DBG_ASSERT( nOffset <= nMax, "nOffset > nMax" );
+/*N*/
+/*N*/ nChar += nOffset;
+/*N*/
+/*N*/ // Check if index is within a cell:
+/*N*/ if ( nChar && ( nChar < pParaPortion->GetNode()->Len() ) )
+/*N*/ {
+/*N*/ EditPaM aPaM( pParaPortion->GetNode(), nChar+1 );
+/*N*/ USHORT nScriptType = GetScriptType( aPaM );
+/*N*/ if ( nScriptType == i18n::ScriptType::COMPLEX )
+/*N*/ {
+/*?*/ uno::Reference < i18n::XBreakIterator > xBI = ImplGetBreakIterator();
+/*?*/ sal_Int32 nCount = 1;
+/*?*/ lang::Locale aLocale = GetLocale( aPaM );
+/*?*/ USHORT nRight = (USHORT)xBI->nextCharacters( *pParaPortion->GetNode(), nChar, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
+/*?*/ USHORT nLeft = (USHORT)xBI->previousCharacters( *pParaPortion->GetNode(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
+/*?*/ if ( ( nLeft != nChar ) && ( nRight != nChar ) )
+/*?*/ {
+/*?*/ nChar = ( Abs( nRight - nChar ) < Abs( nLeft - nChar ) ) ? nRight : nLeft;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ nCurIndex += pPortion->GetLen();
+/*N*/ }
+/*N*/
+/*N*/ if ( nChar == 0xFFFF )
+/*N*/ {
+/*?*/ nChar = ( nXPos <= pLine->GetStartPosX() ) ? pLine->GetStart() : pLine->GetEnd();
+/*N*/ }
+/*N*/
+/*N*/ return nChar;
+/*N*/ }
+
+/*N*/ Range ImpEditEngine::GetLineXPosStartEnd( ParaPortion* pParaPortion, EditLine* pLine )
+/*N*/ {
+/*N*/ Range aLineXPosStartEnd;
+/*N*/
+/*N*/ USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() );
+/*N*/ if ( !IsRightToLeft( nPara ) )
+/*N*/ {
+/*N*/ aLineXPosStartEnd.Min() = pLine->GetStartPosX();
+/*N*/ aLineXPosStartEnd.Max() = pLine->GetStartPosX() + pLine->GetTextWidth();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aLineXPosStartEnd.Min() = GetPaperSize().Width() - ( pLine->GetStartPosX() + pLine->GetTextWidth() );
+/*?*/ aLineXPosStartEnd.Max() = GetPaperSize().Width() - pLine->GetStartPosX();
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ return aLineXPosStartEnd;
+/*N*/ }
+
+/*N*/ long ImpEditEngine::GetPortionXOffset( ParaPortion* pParaPortion, EditLine* pLine, USHORT nTextPortion )
+/*N*/ {
+/*N*/ long nX = pLine->GetStartPosX();
+/*N*/
+/*N*/ for ( USHORT i = pLine->GetStartPortion(); i < nTextPortion; i++ )
+/*N*/ {
+/*N*/ TextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i );
+/*N*/ switch ( pPortion->GetKind() )
+/*N*/ {
+/*N*/ case PORTIONKIND_FIELD:
+/*N*/ case PORTIONKIND_TEXT:
+/*N*/ case PORTIONKIND_HYPHENATOR:
+/*N*/ case PORTIONKIND_TAB:
+/*N*/ // case PORTIONKIND_EXTRASPACE:
+/*N*/ {
+/*N*/ nX += pPortion->GetSize().Width();
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ USHORT nPara = GetEditDoc().GetPos( pParaPortion->GetNode() );
+/*N*/ BOOL bR2LPara = IsRightToLeft( nPara );
+/*N*/
+/*N*/ TextPortion* pDestPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
+/*N*/ if ( pDestPortion->GetKind() != PORTIONKIND_TAB )
+/*N*/ {
+/*N*/ if ( !bR2LPara && pDestPortion->GetRightToLeft() )
+/*N*/ {
+/*?*/ // Portions behind must be added, visual before this portion
+/*?*/ sal_uInt16 nTmpPortion = nTextPortion+1;
+/*?*/ while ( nTmpPortion <= pLine->GetEndPortion() )
+/*?*/ {
+/*?*/ TextPortion* pNextTextPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+/*?*/ if ( pNextTextPortion->GetRightToLeft() && ( pNextTextPortion->GetKind() != PORTIONKIND_TAB ) )
+/*?*/ nX += pNextTextPortion->GetSize().Width();
+/*?*/ else
+/*?*/ break;
+/*?*/ nTmpPortion++;
+/*?*/ }
+/*?*/ // Portions before must be removed, visual behind this portion
+/*?*/ nTmpPortion = nTextPortion;
+/*?*/ while ( nTmpPortion > pLine->GetStartPortion() )
+/*?*/ {
+/*?*/ --nTmpPortion;
+/*?*/ TextPortion* pPrevTextPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+/*?*/ if ( pPrevTextPortion->GetRightToLeft() && ( pPrevTextPortion->GetKind() != PORTIONKIND_TAB ) )
+/*?*/ nX -= pPrevTextPortion->GetSize().Width();
+/*?*/ else
+/*?*/ break;
+/*?*/ }
+/*N*/ }
+/*N*/ else if ( bR2LPara && !pDestPortion->IsRightToLeft() )
+/*N*/ {
+/*?*/ // Portions behind must be ermoved, visual behind this portion
+/*?*/ sal_uInt16 nTmpPortion = nTextPortion+1;
+/*?*/ while ( nTmpPortion <= pLine->GetEndPortion() )
+/*?*/ {
+/*?*/ TextPortion* pNextTextPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+/*?*/ if ( !pNextTextPortion->IsRightToLeft() && ( pNextTextPortion->GetKind() != PORTIONKIND_TAB ) )
+/*?*/ nX += pNextTextPortion->GetSize().Width();
+/*?*/ else
+/*?*/ break;
+/*?*/ nTmpPortion++;
+/*?*/ }
+/*?*/ // Portions before must be added, visual before this portion
+/*?*/ nTmpPortion = nTextPortion;
+/*?*/ while ( nTmpPortion > pLine->GetStartPortion() )
+/*?*/ {
+/*?*/ --nTmpPortion;
+/*?*/ TextPortion* pPrevTextPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+/*?*/ if ( !pPrevTextPortion->IsRightToLeft() && ( pPrevTextPortion->GetKind() != PORTIONKIND_TAB ) )
+/*?*/ nX -= pPrevTextPortion->GetSize().Width();
+/*?*/ else
+/*?*/ break;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bR2LPara )
+/*N*/ {
+/*?*/ // Switch X postions...
+/*?*/ DBG_ASSERT( GetTextRanger() || GetPaperSize().Width(), "GetPortionXOffset - paper size?!" );
+/*?*/ DBG_ASSERT( GetTextRanger() || (nX <= GetPaperSize().Width()), "GetPortionXOffset - position out of paper size!" );
+/*?*/ nX = GetPaperSize().Width() - nX;
+/*?*/ nX -= pDestPortion->GetSize().Width();
+/*N*/ }
+/*N*/
+/*N*/ return nX;
+/*N*/ }
+
+
+/*N*/ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
+/*N*/ {
+/*N*/ pPortion->nHeight = 0;
+/*N*/ pPortion->nFirstLineOffset = 0;
+/*N*/
+/*N*/ if ( pPortion->IsVisible() )
+/*N*/ {
+/*N*/ DBG_ASSERT( pPortion->GetLines().Count(), "Absatz ohne Zeilen in ParaPortion::CalcHeight" );
+/*N*/ for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+/*N*/ pPortion->nHeight += pPortion->GetLines().GetObject( nLine )->GetHeight();
+/*N*/
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ {
+/*N*/ const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+/*N*/ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+/*N*/ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+/*N*/
+/*N*/ if ( nSBL )
+/*N*/ {
+/*?*/ if ( pPortion->GetLines().Count() > 1 )
+/*?*/ pPortion->nHeight += ( pPortion->GetLines().Count() - 1 ) * nSBL;
+/*?*/ if ( aStatus.ULSpaceSummation() )
+/*?*/ pPortion->nHeight += nSBL;
+/*N*/ }
+/*N*/
+/*N*/ USHORT nPortion = GetParaPortions().GetPos( pPortion );
+/*N*/ if ( nPortion || aStatus.ULSpaceFirstParagraph() )
+/*N*/ {
+/*N*/ USHORT nUpper = GetYValue( rULItem.GetUpper() );
+/*N*/ pPortion->nHeight += nUpper;
+/*N*/ pPortion->nFirstLineOffset = nUpper;
+/*N*/ }
+/*N*/
+/*N*/ if ( ( nPortion != (GetParaPortions().Count()-1) ) )
+/*N*/ {
+/*N*/ pPortion->nHeight += GetYValue( rULItem.GetLower() ); // nicht in letzter
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ if ( nPortion && !aStatus.ULSpaceSummation() )
+/*N*/ {
+/*N*/ ParaPortion* pPrev = GetParaPortions().SaveGetObject( nPortion-1 );
+/*N*/ const SvxULSpaceItem& rPrevULItem = (const SvxULSpaceItem&)pPrev->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+/*N*/ const SvxLineSpacingItem& rPrevLSItem = (const SvxLineSpacingItem&)pPrev->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+/*N*/
+/*N*/ // Verhalten WinWord6/Writer3:
+/*N*/ // Bei einem proportionalen Zeilenabstand wird auch der Absatzabstand
+/*N*/ // manipuliert.
+/*N*/ // Nur Writer3: Nicht aufaddieren, sondern Mindestabstand.
+/*N*/
+/*N*/ // Pruefen, ob Abstand durch LineSpacing > Upper:
+/*N*/ USHORT nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) );
+/*N*/ if ( nExtraSpace > pPortion->nFirstLineOffset )
+/*N*/ {
+/*?*/ // Absatz wird 'groesser':
+/*?*/ pPortion->nHeight += ( nExtraSpace - pPortion->nFirstLineOffset );
+/*?*/ pPortion->nFirstLineOffset = nExtraSpace;
+/*N*/ }
+/*N*/
+/*N*/ // nFirstLineOffset jetzt f(pNode) => jetzt f(pNode, pPrev) ermitteln:
+/*N*/ USHORT nPrevLower = GetYValue( rPrevULItem.GetLower() );
+/*N*/
+/*N*/ // Dieser PrevLower steckt noch in der Hoehe der PrevPortion...
+/*N*/ if ( nPrevLower > pPortion->nFirstLineOffset )
+/*N*/ {
+/*N*/ // Absatz wird 'kleiner':
+/*N*/ pPortion->nHeight -= pPortion->nFirstLineOffset;
+/*N*/ pPortion->nFirstLineOffset = 0;
+/*N*/ }
+/*N*/ else if ( nPrevLower )
+/*N*/ {
+/*?*/ // Absatz wird 'etwas kleiner':
+/*?*/ pPortion->nHeight -= nPrevLower;
+/*?*/ pPortion->nFirstLineOffset -= nPrevLower;
+/*N*/ }
+/*N*/
+/*N*/ // Finde ich zwar nicht so gut, aber Writer3-Feature:
+/*N*/ // Pruefen, ob Abstand durch LineSpacing > Lower:
+/*N*/ // Dieser Wert steckt nicht in der Hoehe der PrevPortion.
+/*N*/ if ( !pPrev->IsInvalid() )
+/*N*/ {
+/*N*/ nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPrev, rPrevLSItem ) );
+/*N*/ if ( nExtraSpace > nPrevLower )
+/*N*/ {
+/*?*/ USHORT nMoreLower = nExtraSpace - nPrevLower;
+/*?*/ // Absatz wird 'groesser', 'waechst' nach unten:
+/*?*/ if ( nMoreLower > pPortion->nFirstLineOffset )
+/*?*/ {
+/*?*/ pPortion->nHeight += ( nMoreLower - pPortion->nFirstLineOffset );
+/*?*/ pPortion->nFirstLineOffset = nMoreLower;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void ImpEditEngine::SetValidPaperSize( const Size& rNewSz )
+/*N*/ {
+/*N*/ aPaperSize = rNewSz;
+/*N*/
+/*N*/ long nMinWidth = aStatus.AutoPageWidth() ? aMinAutoPaperSize.Width() : 0;
+/*N*/ long nMaxWidth = aStatus.AutoPageWidth() ? aMaxAutoPaperSize.Width() : 0x7FFFFFFF;
+/*N*/ long nMinHeight = aStatus.AutoPageHeight() ? aMinAutoPaperSize.Height() : 0;
+/*N*/ long nMaxHeight = aStatus.AutoPageHeight() ? aMaxAutoPaperSize.Height() : 0x7FFFFFFF;
+/*N*/
+/*N*/ // Minimale/Maximale Breite:
+/*N*/ if ( aPaperSize.Width() < nMinWidth )
+/*N*/ aPaperSize.Width() = nMinWidth;
+/*N*/ else if ( aPaperSize.Width() > nMaxWidth )
+/*?*/ aPaperSize.Width() = nMaxWidth;
+/*N*/
+/*N*/ // Minimale/Maximale Hoehe:
+/*N*/ if ( aPaperSize.Height() < nMinHeight )
+/*?*/ aPaperSize.Height() = nMinHeight;
+/*N*/ else if ( aPaperSize.Height() > nMaxHeight )
+/*?*/ aPaperSize.Height() = nMaxHeight;
+/*N*/ }
+
+
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const
+/*N*/ {
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
+/*N*/ if ( !xF.is() && bGetInternal )
+/*N*/ xF = EE_DLL()->GetGlobalData()->GetForbiddenCharsTable();
+/*N*/ return xF;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ {
+/*N*/ EE_DLL()->GetGlobalData()->SetForbiddenCharsTable( xForbiddenChars );
+/*N*/ }
+
+ ColorConfig& ImpEditEngine::GetColorConfig()
+/*N*/ {
+/*N*/ if ( !pColorConfig )
+/*N*/ pColorConfig = new ColorConfig;
+/*N*/
+/*N*/ return *pColorConfig;
+/*N*/ }
+
+
+
+
+
+/*N*/ void ImpEditEngine::EnterBlockNotifications()
+/*N*/ {
+/*N*/ if( !nBlockNotifications )
+/*N*/ {
+/*N*/ // #109864# Send out START notification immediately, to allow
+/*N*/ // external, non-queued events to be captured as well from
+/*N*/ // client side
+/*N*/ EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_START );
+/*N*/ aNotify.pEditEngine = GetEditEnginePtr();
+/*N*/ GetNotifyHdl().Call( &aNotify );
+/*N*/ }
+/*N*/
+/*N*/ nBlockNotifications++;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::LeaveBlockNotifications()
+/*N*/ {
+/*N*/ DBG_ASSERT( nBlockNotifications, "LeaveBlockNotifications - Why?" );
+/*N*/
+/*N*/ nBlockNotifications--;
+/*N*/ if ( !nBlockNotifications )
+/*N*/ {
+/*N*/ // Call blocked notify events...
+/*N*/ while ( aNotifyCache.Count() )
+/*N*/ {
+/*N*/ EENotify* pNotify = aNotifyCache[0];
+/*N*/ // Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler...
+/*N*/ aNotifyCache.Remove( 0 );
+/*N*/ GetNotifyHdl().Call( pNotify );
+/*N*/ delete pNotify;
+/*N*/ }
+/*N*/
+/*N*/ EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_END );
+/*N*/ aNotify.pEditEngine = GetEditEnginePtr();
+/*N*/ GetNotifyHdl().Call( &aNotify );
+/*N*/ }
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit3.cxx b/binfilter/bf_svx/source/editeng/svx_impedit3.cxx
new file mode 100644
index 000000000000..ff5de653ba34
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_impedit3.cxx
@@ -0,0 +1,3113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#define _SVSTDARR_USHORTS
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitemid.hxx"
+
+#include <adjitem.hxx>
+#include <tstpitem.hxx>
+#include <lspcitem.hxx>
+
+
+
+#include "itemdata.hxx"
+
+#include <tools/date.hxx>
+
+#include <tools/time.hxx>
+
+#include <flditem.hxx>
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <txtrange.hxx>
+#include <udlnitem.hxx>
+#include <fhgtitem.hxx>
+#include <kernitem.hxx>
+#include <lrspitem.hxx>
+#include <ulspitem.hxx>
+#include <fontitem.hxx>
+#include <wghtitem.hxx>
+#include <postitem.hxx>
+#include <langitem.hxx>
+#include <scriptspaceitem.hxx>
+#include <charscaleitem.hxx>
+
+#include <bf_svtools/colorcfg.hxx>
+
+#include <forbiddencharacterstable.hxx>
+
+
+#include <unolingu.hxx>
+
+#include <math.h>
+
+#include <vcl/svapp.hxx>
+
+
+#include <vcl/metric.hxx>
+
+#include <com/sun/star/i18n/ScriptType.hpp>
+
+#include <i18npool/mslangid.hxx>
+
+
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+
+using ::rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::linguistic2;
+
+/*N*/ SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16, 8 )//STRIP008 ;
+/*N*/ SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
+
+#define CH_HYPH '-'
+
+#define RESDIFF 10
+
+#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() { bValid = FALSE; }
+};
+
+
+
+
+
+
+
+
+ // ----------------------------------------------------------------------
+// class ImpEditEngine
+// ----------------------------------------------------------------------
+/*N*/ void ImpEditEngine::UpdateViews( EditView* pCurView )
+/*N*/ {
+/*N*/ if ( !GetUpdateMode() || IsFormatting() || aInvalidRec.IsEmpty() )
+/*N*/ return;
+/*N*/
+/*N*/ DBG_ASSERT( IsFormatted(), "UpdateViews: Doc nicht formatiert!" );
+/*N*/
+/*N*/ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+/*N*/ {
+/*N*/ EditView* pView = aEditViews[nView];
+/*N*/ DBG_CHKOBJ( pView, EditView, 0 );
+/*N*/ pView->HideCursor();
+/*N*/
+/*N*/ Rectangle aClipRec( aInvalidRec );
+/*N*/ Rectangle aVisArea( pView->GetVisArea() );
+/*N*/ aClipRec.Intersection( aVisArea );
+/*N*/
+/*N*/ if ( !aClipRec.IsEmpty() )
+/*N*/ {
+/*N*/ // in Fensterkoordinaten umwandeln....
+/*N*/ aClipRec = pView->pImpEditView->GetWindowPos( aClipRec );
+/*N*/
+/*N*/ if ( ( pView == pCurView ) )
+/*N*/ Paint( pView->pImpEditView, aClipRec, sal_True );
+/*N*/ else
+/*N*/ pView->GetWindow()->Invalidate( aClipRec );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( pCurView )
+/*N*/ {
+/*N*/ sal_Bool bGotoCursor = pCurView->pImpEditView->DoAutoScroll();
+/*N*/ pCurView->ShowCursor( bGotoCursor );
+/*N*/ }
+/*N*/
+/*N*/ aInvalidRec = Rectangle();
+/*N*/ }
+
+/*N*/ void ImpEditEngine::FormatFullDoc()
+/*N*/ {
+/*N*/ for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+/*N*/ GetParaPortions()[nPortion]->MarkSelectionInvalid( 0, GetParaPortions()[nPortion]->GetNode()->Len() );
+/*N*/ FormatDoc();
+/*N*/ }
+
+/*N*/ void ImpEditEngine::FormatDoc()
+/*N*/ {
+/*N*/ if ( !GetUpdateMode() || IsFormatting() )
+/*N*/ return;
+/*N*/
+/*N*/ EnterBlockNotifications();
+/*N*/
+/*N*/ bIsFormatting = sal_True;
+/*N*/
+/*N*/ long nY = 0;
+/*N*/ sal_Bool bGrow = sal_False;
+/*N*/
+/*N*/ Font aOldFont( GetRefDevice()->GetFont() );
+/*N*/
+/*N*/ // Hier schon, damit nicht jedesmal in CreateLines...
+/*N*/ sal_Bool bMapChanged = ImpCheckRefMapMode();
+/*N*/
+/*N*/ aInvalidRec = Rectangle(); // leermachen
+/*N*/ for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+/*N*/ if ( pParaPortion->MustRepaint() || ( pParaPortion->IsInvalid() && pParaPortion->IsVisible() ) )
+/*N*/ {
+/*N*/ if ( pParaPortion->IsInvalid() )
+/*N*/ {
+/*N*/ sal_Bool bChangedByDerivedClass = GetEditEnginePtr()->FormattingParagraph( nPara );
+/*N*/ if ( bChangedByDerivedClass )
+/*N*/ {
+/*?*/ pParaPortion->GetTextPortions().Reset();
+/*?*/ pParaPortion->MarkSelectionInvalid( 0, pParaPortion->GetNode()->Len() );
+/*N*/ }
+/*N*/ }
+/*N*/ // bei MustRepaint() sollte keine Formatierung noetig sein!
+/*N*/ // 23.1.95: Evtl. ist sie durch eine andere Aktion aber doch
+/*N*/ // ungueltig geworden!
+/*N*/ // if ( pParaPortion->MustRepaint() || CreateLines( nPara ) )
+/*N*/ if ( ( pParaPortion->MustRepaint() && !pParaPortion->IsInvalid() )
+/*N*/ || CreateLines( nPara, nY ) )
+/*N*/ {
+/*N*/ if ( !bGrow && GetTextRanger() )
+/*N*/ {
+/*?*/ // 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();
+/*?*/ }
+/*N*/ }
+/*N*/ bGrow = sal_True;
+/*N*/ if ( IsCallParaInsertedOrDeleted() )
+/*N*/ GetEditEnginePtr()->ParagraphHeightChanged( nPara );
+/*N*/ pParaPortion->SetMustRepaint( sal_False );
+/*N*/ }
+/*N*/
+/*N*/ // InvalidRec nur einmal setzen...
+/*N*/ if ( aInvalidRec.IsEmpty() )
+/*N*/ {
+/*N*/ // Bei Paperwidth 0 (AutoPageSize) bleibt es sonst Empty()...
+/*N*/ long nWidth = Max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) );
+/*N*/ Range aInvRange( GetInvalidYOffsets( pParaPortion ) );
+/*N*/ aInvalidRec = Rectangle( Point( 0, nY+aInvRange.Min() ),
+/*N*/ Size( nWidth, aInvRange.Len() ) );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aInvalidRec.Bottom() = nY + pParaPortion->GetHeight();
+/*N*/ }
+/*N*/ }
+/*N*/ else if ( bGrow )
+/*N*/ {
+/*?*/ aInvalidRec.Bottom() = nY + pParaPortion->GetHeight();
+/*N*/ }
+/*N*/ nY += pParaPortion->GetHeight();
+/*N*/ }
+/*N*/
+/*N*/ // Man kann auch durch UpdateMode An=>AUS=>AN in die Formatierung gelangen...
+/*N*/ // Optimierung erst nach Vobis-Auslieferung aktivieren...
+/*N*/ // if ( !aInvalidRec.IsEmpty() )
+/*N*/ {
+/*N*/ sal_uInt32 nNewHeight = CalcTextHeight();
+/*N*/ long nDiff = nNewHeight - nCurTextHeight;
+/*N*/ if ( nDiff )
+/*N*/ aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTHEIGHTCHANGED : EE_STAT_TEXTWIDTHCHANGED;
+/*N*/ if ( nNewHeight < nCurTextHeight )
+/*N*/ {
+/*N*/ aInvalidRec.Bottom() = (long)Max( nNewHeight, nCurTextHeight );
+/*N*/ if ( aInvalidRec.IsEmpty() )
+/*N*/ {
+/*?*/ aInvalidRec.Top() = 0;
+/*?*/ // Left und Right werden nicht ausgewertet, aber wegen IsEmpty gesetzt.
+/*?*/ aInvalidRec.Left() = 0;
+/*?*/ aInvalidRec.Right() = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ nCurTextHeight = nNewHeight;
+/*N*/
+/*N*/ if ( aStatus.AutoPageSize() )
+/*N*/ CheckAutoPageSize();
+/*N*/ else if ( nDiff )
+/*N*/ {
+/*N*/ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+/*N*/ {
+/*N*/ EditView* pView = aEditViews[nView];
+/*N*/ ImpEditView* pImpView = pView->pImpEditView;
+/*N*/ if ( pImpView->DoAutoHeight() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 Size aSz( pImpView->GetOutputArea().GetWidth(), nCurTextHeight );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( aStatus.DoRestoreFont() )
+/*?*/ GetRefDevice()->SetFont( aOldFont );
+/*N*/ bIsFormatting = sal_False;
+/*N*/ bFormatted = sal_True;
+/*N*/
+/*N*/ if ( bMapChanged )
+/*N*/ GetRefDevice()->Pop();
+/*N*/
+/*N*/ LeaveBlockNotifications();
+/*N*/ }
+
+/*N*/ sal_Bool ImpEditEngine::ImpCheckRefMapMode()
+/*N*/ {
+/*N*/ sal_Bool bChange = sal_False;
+/*N*/
+/*N*/ if ( aStatus.DoFormat100() )
+/*N*/ {
+/*N*/ MapMode aMapMode( GetRefDevice()->GetMapMode() );
+/*N*/ if ( aMapMode.GetScaleX().GetNumerator() != aMapMode.GetScaleX().GetDenominator() )
+/*N*/ bChange = sal_True;
+/*N*/ else if ( aMapMode.GetScaleY().GetNumerator() != aMapMode.GetScaleY().GetDenominator() )
+/*N*/ bChange = sal_True;
+/*N*/
+/*N*/ if ( bChange )
+/*N*/ {
+/*N*/ Fraction Scale1( 1, 1 );
+/*N*/ aMapMode.SetScaleX( Scale1 );
+/*N*/ aMapMode.SetScaleY( Scale1 );
+/*N*/ GetRefDevice()->Push();
+/*N*/ GetRefDevice()->SetMapMode( aMapMode );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bChange;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::CheckAutoPageSize()
+/*N*/ {
+/*N*/ Size aPrevPaperSize( GetPaperSize() );
+/*N*/ if ( GetStatus().AutoPageWidth() )
+/*N*/ aPaperSize.Width() = (long) !IsVertical() ? CalcTextWidth( TRUE ) : GetTextHeight();
+/*N*/ if ( GetStatus().AutoPageHeight() )
+/*N*/ aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( TRUE );
+/*N*/
+/*N*/ SetValidPaperSize( aPaperSize ); //Min, Max beruecksichtigen
+/*N*/
+/*N*/ if ( aPaperSize != aPrevPaperSize )
+/*N*/ {
+/*N*/ if ( ( !IsVertical() && ( aPaperSize.Width() != aPrevPaperSize.Width() ) )
+/*N*/ || ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
+/*N*/ {
+/*N*/ // Falls davor zentriert/rechts oder Tabs...
+/*N*/ aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTWIDTHCHANGED : EE_STAT_TEXTHEIGHTCHANGED;
+/*N*/ for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
+/*N*/ {
+/*N*/ // Es brauchen nur Absaetze neu formatiert werden,
+/*N*/ // die nicht linksbuendig sind.
+/*N*/ // Die Hoehe kann sich hier nicht mehr aendern.
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+/*N*/ ContentNode* pNode = pParaPortion->GetNode();
+/*N*/ SvxAdjust eJustification = GetJustification( nPara );
+/*N*/ if ( eJustification != SVX_ADJUST_LEFT )
+/*N*/ {
+/*N*/ pParaPortion->MarkSelectionInvalid( 0, pNode->Len() );
+/*N*/ CreateLines( nPara, 0 ); // 0: Bei AutoPageSize kein TextRange!
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ Size aInvSize = aPaperSize;
+/*N*/ if ( aPaperSize.Width() < aPrevPaperSize.Width() )
+/*?*/ aInvSize.Width() = aPrevPaperSize.Width();
+/*N*/ if ( aPaperSize.Height() < aPrevPaperSize.Height() )
+/*N*/ aInvSize.Height() = aPrevPaperSize.Height();
+/*N*/
+/*N*/ Size aSz( aInvSize );
+/*N*/ if ( IsVertical() )
+/*N*/ {
+/*?*/ aSz.Width() = aInvSize.Height();
+/*?*/ aSz.Height() = aInvSize.Width();
+/*N*/ }
+/*N*/ aInvalidRec = Rectangle( Point(), aSz );
+/*N*/
+/*N*/
+/*N*/ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditView* pView = aEditViews[nView];
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+/*N*/
+/*N*/ // sal_Bool: Aenderung der Hoehe des Absatzes Ja/Nein - sal_True/sal_False
+/*N*/ DBG_ASSERT( pParaPortion->GetNode(), "Portion ohne Node in CreateLines" );
+/*N*/ DBG_ASSERT( pParaPortion->IsVisible(), "Unsichtbare Absaetze nicht formatieren!" );
+/*N*/ DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" );
+/*N*/
+/*N*/ BOOL bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 );
+/*N*/ BOOL bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger();
+/*N*/
+/*N*/ // ---------------------------------------------------------------
+/*N*/ // Schnelle Sonderbehandlung fuer leere Absaetze...
+/*N*/ // ---------------------------------------------------------------
+/*N*/ if ( ( pParaPortion->GetNode()->Len() == 0 ) && !GetTextRanger() )
+/*N*/ {
+/*N*/ // schnelle Sonderbehandlung...
+/*N*/ if ( pParaPortion->GetTextPortions().Count() )
+/*N*/ pParaPortion->GetTextPortions().Reset();
+/*N*/ if ( pParaPortion->GetLines().Count() )
+/*N*/ pParaPortion->GetLines().Reset();
+/*N*/ CreateAndInsertEmptyLine( pParaPortion, nStartPosY );
+/*N*/ return FinishCreateLines( pParaPortion );
+/*N*/ }
+/*N*/
+/*N*/ // ---------------------------------------------------------------
+/*N*/ // Initialisierung......
+/*N*/ // ---------------------------------------------------------------
+/*N*/
+/*N*/ // Immer fuer 100% formatieren:
+/*N*/ sal_Bool bMapChanged = ImpCheckRefMapMode();
+/*N*/
+/*N*/ if ( pParaPortion->GetLines().Count() == 0 )
+/*N*/ {
+/*N*/ EditLine* pL = new EditLine;
+/*N*/ pParaPortion->GetLines().Insert( pL, 0 );
+/*N*/ }
+/*N*/
+/*N*/ // ---------------------------------------------------------------
+/*N*/ // Absatzattribute holen......
+/*N*/ // ---------------------------------------------------------------
+/*N*/ ContentNode* const pNode = pParaPortion->GetNode();
+/*N*/
+/*N*/ BOOL bRightToLeftPara = IsRightToLeft( nPara );
+/*N*/
+/*N*/ SvxAdjust eJustification = GetJustification( nPara );
+/*N*/ sal_Bool bHyphenatePara = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HYPHENATE )).GetValue();
+/*N*/ const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pNode );
+/*N*/ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL );
+/*N*/ const BOOL bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue();
+/*N*/
+/*N*/ // const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 )
+/*N*/ // ? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff()
+/*N*/ // : pNode->Len();
+/*N*/ const short nInvalidDiff = pParaPortion->GetInvalidDiff();
+/*N*/ const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
+/*N*/ const sal_uInt16 nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
+/*N*/
+/*N*/ sal_Bool bQuickFormat = sal_False;
+/*N*/ if ( !bEmptyNodeWithPolygon && !HasScriptType( nPara, i18n::ScriptType::COMPLEX ) )
+/*N*/ {
+/*N*/ if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff > 0 ) &&
+/*N*/ ( pNode->Search( CH_FEATURE, nInvalidStart ) > nInvalidEnd ) )
+/*N*/ {
+/*N*/ bQuickFormat = sal_True;
+/*N*/ }
+/*N*/ else if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
+/*N*/ {
+/*?*/ // 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;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // SW disables TEXT_LAYOUT_COMPLEX_DISABLED, so maybe I have to enable it...
+/*N*/ ULONG nOldLayoutMode = GetRefDevice()->GetLayoutMode();
+/*N*/
+/*N*/ ImplInitLayoutMode( GetRefDevice(), nPara, 0xFFFF );
+/*N*/
+/*N*/ sal_uInt16 nRealInvalidStart = nInvalidStart;
+/*N*/
+/*N*/ if ( bEmptyNodeWithPolygon )
+/*N*/ {
+/*?*/ TextPortion* pDummyPortion = new TextPortion( 0 );
+/*?*/ pParaPortion->GetTextPortions().Reset();
+/*?*/ pParaPortion->GetTextPortions().Insert( pDummyPortion, 0 );
+/*N*/ }
+/*N*/ else if ( bQuickFormat )
+/*N*/ {
+/*N*/ // schnellere Methode:
+/*N*/ RecalcTextPortion( pParaPortion, nInvalidStart, nInvalidDiff );
+/*N*/ }
+/*N*/ else // nRealInvalidStart kann vor InvalidStart liegen, weil Portions geloescht....
+/*N*/ {
+/*N*/ CreateTextPortions( pParaPortion, nRealInvalidStart );
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // ---------------------------------------------------------------
+/*N*/ // Zeile mit InvalidPos suchen, eine Zeile davor beginnen...
+/*N*/ // Zeilen flaggen => nicht removen !
+/*N*/ // ---------------------------------------------------------------
+/*N*/
+/*N*/ sal_uInt16 nLine = pParaPortion->GetLines().Count()-1;
+/*N*/ for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
+/*N*/ {
+/*N*/ EditLine* pLine = pParaPortion->GetLines().GetObject( nL );
+/*N*/ if ( pLine->GetEnd() > nRealInvalidStart ) // nicht nInvalidStart!
+/*N*/ {
+/*N*/ nLine = nL;
+/*N*/ break;
+/*N*/ }
+/*N*/ pLine->SetValid();
+/*N*/ }
+/*N*/ // Eine Zeile davor beginnen...
+/*N*/ // Wenn ganz hinten getippt wird, kann sich die Zeile davor nicht aendern.
+/*N*/ if ( nLine && ( !pParaPortion->IsSimpleInvalid() || ( nInvalidEnd < pNode->Len() ) || ( nInvalidDiff <= 0 ) ) )
+/*N*/ nLine--;
+/*N*/
+/*N*/ EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
+/*N*/
+/*N*/ static Rectangle aZeroArea = Rectangle( Point(), Point() );
+/*N*/ Rectangle aBulletArea( aZeroArea );
+/*N*/ if ( !nLine )
+/*N*/ {
+/*N*/ aBulletArea = GetEditEnginePtr()->GetBulletArea( GetParaPortions().GetPos( pParaPortion ) );
+/*N*/ if ( aBulletArea.Right() > 0 )
+/*N*/ pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
+/*N*/ else
+/*N*/ pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+/*N*/ }
+/*N*/
+/*N*/ // ---------------------------------------------------------------
+/*N*/ // Ab hier alle Zeilen durchformatieren...
+/*N*/ // ---------------------------------------------------------------
+/*N*/ sal_uInt16 nDelFromLine = 0xFFFF;
+/*N*/ sal_Bool bLineBreak = sal_False;
+/*N*/
+/*N*/ sal_uInt16 nIndex = pLine->GetStart();
+/*N*/ EditLine aSaveLine( *pLine );
+/*N*/ SvxFont aTmpFont( pNode->GetCharAttribs().GetDefFont() );
+/*N*/
+/*N*/ sal_Bool bCalcCharPositions = sal_True;
+/*N*/ sal_Int32* pBuf = new sal_Int32[ pNode->Len() ];
+/*N*/
+/*N*/ sal_Bool bSameLineAgain = sal_False; // Fuer TextRanger, wenn sich die Hoehe aendert.
+/*N*/ TabInfo aCurrentTab;
+/*N*/
+/*N*/ BOOL bForceOneRun = bEmptyNodeWithPolygon;
+/*N*/ BOOL bCompressedChars = FALSE;
+/*N*/
+/*N*/ while ( ( nIndex < pNode->Len() ) || bForceOneRun )
+/*N*/ {
+/*N*/ bForceOneRun = FALSE;
+/*N*/
+/*N*/ sal_Bool bEOL = sal_False;
+/*N*/ sal_Bool bEOC = sal_False;
+/*N*/ sal_uInt16 nPortionStart = 0;
+/*N*/ sal_uInt16 nPortionEnd = 0;
+/*N*/
+/*N*/ long nStartX = GetXValue( rLRItem.GetTxtLeft() );
+/*N*/ if ( nIndex == 0 )
+/*N*/ {
+/*N*/ long nFI = GetXValue( rLRItem.GetTxtFirstLineOfst() );
+/*N*/ nStartX += nFI;
+/*N*/
+/*N*/ if ( !nLine && ( pParaPortion->GetBulletX() > nStartX ) )
+/*N*/ {
+/*N*/ nStartX -= nFI; // Vielleicht reicht der LI?
+/*N*/ if ( pParaPortion->GetBulletX() > nStartX )
+/*N*/ nStartX = pParaPortion->GetBulletX();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ long nMaxLineWidth;
+/*N*/ if ( !IsVertical() )
+/*N*/ nMaxLineWidth = aStatus.AutoPageWidth() ? aMaxAutoPaperSize.Width() : aPaperSize.Width();
+/*N*/ else
+/*?*/ nMaxLineWidth = aStatus.AutoPageHeight() ? aMaxAutoPaperSize.Height() : aPaperSize.Height();
+/*N*/
+/*N*/ nMaxLineWidth -= GetXValue( rLRItem.GetRight() );
+/*N*/ nMaxLineWidth -= nStartX;
+/*N*/
+/*N*/ // Wenn PaperSize == long_max, kann ich keinen neg. Erstzeileneinzug
+/*N*/ // abziehen (Overflow)
+/*N*/ if ( ( nMaxLineWidth < 0 ) && ( nStartX < 0 ) )
+/*?*/ nMaxLineWidth = ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) - GetXValue( rLRItem.GetRight() );
+/*N*/
+/*N*/ // Wenn jetzt noch kleiner 0, kann es nur der rechte Rand sein.
+/*N*/ if ( nMaxLineWidth <= 0 )
+/*?*/ nMaxLineWidth = 1;
+/*N*/
+/*N*/ // Problem: Da eine Zeile _vor_ der ungueltigen Position mit der
+/*N*/ // Formatierung begonnen wird, werden hier leider auch die Positionen
+/*N*/ // neu bestimmt...
+/*N*/ // Loesungsansatz:
+/*N*/ // Die Zeile davor kann nur groesser werden, nicht kleiner
+/*N*/ // => ...
+/*N*/ if ( bCalcCharPositions )
+/*N*/ pLine->GetCharPosArray().Remove( 0, pLine->GetCharPosArray().Count() );
+/*N*/
+/*N*/ sal_uInt16 nTmpPos = nIndex;
+/*N*/ sal_uInt16 nTmpPortion = pLine->GetStartPortion();
+/*N*/ long nTmpWidth = 0;
+/*N*/ long nXWidth = nMaxLineWidth;
+/*N*/ if ( nXWidth <= nTmpWidth ) // while muss 1x durchlaufen werden
+/*?*/ nXWidth = nTmpWidth+1;
+/*N*/
+/*N*/ SvLongsPtr pTextRanges = 0;
+/*N*/ long nTextExtraYOffset = 0;
+/*N*/ long nTextXOffset = 0;
+/*N*/ long nTextLineHeight = 0;
+/*N*/ if ( GetTextRanger() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 GetTextRanger()->SetVertical( IsVertical() );
+/*N*/ }
+/*N*/
+/*N*/ // Portion suchen, die nicht mehr in Zeile passt....
+/*N*/ TextPortion* pPortion;
+/*N*/ sal_Bool bBrokenLine = sal_False;
+/*N*/ bLineBreak = sal_False;
+/*N*/ EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( pLine->GetStart() );
+/*N*/ while ( ( nTmpWidth < nXWidth ) && !bEOL && ( nTmpPortion < pParaPortion->GetTextPortions().Count() ) )
+/*N*/ {
+/*N*/ nPortionStart = nTmpPos;
+/*N*/ pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+/*N*/ if ( pPortion->GetKind() == PORTIONKIND_HYPHENATOR )
+/*N*/ {
+/*?*/ // 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 );
+/*N*/ }
+/*N*/ DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" );
+/*N*/ DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Leere Portion in CreateLines ?!" );
+/*N*/ if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) )
+/*N*/ {
+/*N*/ sal_uInt16 nWhich = pNextFeature->GetItem()->Which();
+/*N*/ switch ( nWhich )
+/*N*/ {
+/*N*/ case EE_FEATURE_TAB:
+/*N*/ {
+/*N*/ long nOldTmpWidth = nTmpWidth;
+/*N*/
+/*N*/ // Tab-Pos suchen...
+/*N*/ long nCurPos = nTmpWidth+nStartX;
+/*N*/ // nCurPos -= rLRItem.GetTxtLeft(); // Tabs relativ zu LI
+/*N*/ // Skalierung rausrechnen
+/*N*/ if ( aStatus.DoStretch() && ( nStretchX != 100 ) )
+/*?*/ nCurPos = nCurPos*100/nStretchX;
+/*N*/
+/*N*/ aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - rLRItem.GetTxtLeft(), aEditDoc.GetDefTab() );
+/*N*/ aCurrentTab.nTabPos = GetXValue( (long) ( aCurrentTab.aTabStop.GetTabPos() + rLRItem.GetTxtLeft() ) );
+/*N*/ aCurrentTab.bValid = FALSE;
+/*N*/
+/*N*/ // Switch direction in R2L para...
+/*N*/ if ( bRightToLeftPara )
+/*N*/ {
+/*?*/ if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT )
+/*?*/ aCurrentTab.aTabStop.GetAdjustment() = SVX_TAB_ADJUST_LEFT;
+/*?*/ else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_LEFT )
+/*?*/ aCurrentTab.aTabStop.GetAdjustment() = SVX_TAB_ADJUST_RIGHT;
+/*N*/ }
+/*N*/
+/*N*/ if ( ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT ) ||
+/*N*/ ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER ) ||
+/*N*/ ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) )
+/*N*/ {
+/*N*/ // Bei LEFT/DEFAULT wird dieses Tab nicht mehr betrachtet.
+/*N*/ aCurrentTab.bValid = TRUE;
+/*N*/ aCurrentTab.nStartPosX = nTmpWidth;
+/*N*/ aCurrentTab.nCharPos = nTmpPos;
+/*N*/ aCurrentTab.nTabPortion = nTmpPortion;
+/*N*/ }
+/*N*/
+/*N*/ pPortion->GetKind() = PORTIONKIND_TAB;
+/*N*/ pPortion->SetExtraValue( aCurrentTab.aTabStop.GetFill() );
+/*N*/ pPortion->GetSize().Width() = aCurrentTab.nTabPos - (nTmpWidth+nStartX);
+/*N*/
+/*N*/ // #90520# Height needed...
+/*N*/ SeekCursor( pNode, nTmpPos+1, aTmpFont );
+/*N*/ pPortion->GetSize().Height() = aTmpFont.QuickGetTextSize( GetRefDevice(), String(), 0, 0, NULL ).Height();
+/*N*/
+/*N*/ DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab falsch berechnet!" );
+/*N*/
+/*N*/ nTmpWidth = aCurrentTab.nTabPos-nStartX;
+/*N*/
+/*N*/ // Wenn dies das erste Token in der Zeile ist,
+/*N*/ // und nTmpWidth > aPaperSize.Width, habe ich eine
+/*N*/ // Endlos-Schleife!
+/*N*/ if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
+/*N*/ {
+/*?*/ // Aber was jetzt ?
+/*?*/ // Tab passend machen
+/*?*/ pPortion->GetSize().Width() = nXWidth-nOldTmpWidth;
+/*?*/ nTmpWidth = nXWidth-1;
+/*?*/ bEOL = sal_True;
+/*?*/ bBrokenLine = sal_True;
+/*N*/ }
+/*N*/ pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
+/*N*/ bCompressedChars = FALSE;
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_FEATURE_LINEBR:
+/*N*/ {
+/*N*/ DBG_ASSERT( pPortion, "?!" );
+/*N*/ pPortion->GetSize().Width() = 0;
+/*N*/ bEOL = sal_True;
+/*N*/ bLineBreak = sal_True;
+/*N*/ pPortion->GetKind() = PORTIONKIND_LINEBREAK;
+/*N*/ bCompressedChars = FALSE;
+/*N*/ pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
+/*N*/ }
+/*N*/ break;
+/*N*/ case EE_FEATURE_FIELD:
+/*N*/ {
+/*N*/ long nCurWidth = nTmpWidth;
+/*N*/ SeekCursor( pNode, nTmpPos+1, aTmpFont );
+/*N*/ sal_Unicode cChar = 0; // later: NBS?
+/*N*/ aTmpFont.SetPhysFont( GetRefDevice() );
+/*N*/ String aFieldValue = cChar ? String(cChar) : ((EditCharAttribField*)pNextFeature)->GetFieldValue();
+/*N*/ if ( bCalcCharPositions || !pPortion->HasValidSize() )
+/*N*/ {
+/*N*/ pPortion->GetSize() = aTmpFont.QuickGetTextSize( GetRefDevice(), aFieldValue, 0, aFieldValue.Len(), 0 );
+/*N*/ // Damit kein Scrollen bei ueberlangen Feldern
+/*N*/ if ( pPortion->GetSize().Width() > nXWidth )
+/*?*/ pPortion->GetSize().Width() = nXWidth;
+/*N*/ }
+/*N*/ nTmpWidth += pPortion->GetSize().Width();
+/*N*/ pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
+/*N*/ pPortion->GetKind() = cChar ? PORTIONKIND_TEXT : PORTIONKIND_FIELD;
+/*N*/ // Wenn dies das erste Token in der Zeile ist,
+/*N*/ // und nTmpWidth > aPaperSize.Width, habe ich eine
+/*N*/ // Endlos-Schleife!
+/*N*/ if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
+/*N*/ {
+/*?*/ nTmpWidth = nXWidth-1;
+/*?*/ bEOL = sal_True;
+/*?*/ bBrokenLine = sal_True;
+/*N*/ }
+/*N*/ // Compression in Fields????
+/*N*/ // I think this could be a little bit difficult and is not very usefull
+/*N*/ bCompressedChars = FALSE;
+/*N*/ }
+/*N*/ break;
+/*N*/ default: DBG_ERROR( "Was fuer ein Feature ?" );
+/*N*/ }
+/*N*/ pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1 );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Empty Portion - Extra Space?!" );
+/*N*/ SeekCursor( pNode, nTmpPos+1, aTmpFont );
+/*N*/ aTmpFont.SetPhysFont( GetRefDevice() );
+/*N*/ if ( bCalcCharPositions || !pPortion->HasValidSize() )
+/*N*/ pPortion->GetSize() = aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, pPortion->GetLen(), pBuf );
+/*N*/
+/*N*/ if ( bCalcCharPositions )
+/*N*/ {
+/*N*/ sal_uInt16 nLen = pPortion->GetLen();
+/*N*/ // Es wird am Anfang generell das Array geplaettet
+/*N*/ // => Immer einfach schnelles insert.
+/*N*/ sal_uInt16 nPos = nTmpPos - pLine->GetStart();
+/*N*/ pLine->GetCharPosArray().Insert( pBuf, nLen, nPos );
+/*N*/ }
+/*N*/
+/*N*/ // And now check for Compression:
+/*N*/ if ( pPortion->GetLen() && GetAsianCompressionMode() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 bCompressedChars |= ImplCalcAsianCompression( pNode, pPortion, nTmpPos, (long*)pLine->GetCharPosArray().GetData() + (nTmpPos-pLine->GetStart()), 10000, FALSE );
+/*N*/
+/*N*/ nTmpWidth += pPortion->GetSize().Width();
+/*N*/
+/*N*/ pPortion->SetRightToLeft( GetRightToLeft( nPara, nTmpPos+1 ) );
+/*N*/
+/*N*/ USHORT nPortionEnd = nTmpPos + pPortion->GetLen();
+/*N*/ if( bScriptSpace && ( nPortionEnd < pNode->Len() ) && ( nTmpWidth < nXWidth ) && IsScriptChange( EditPaM( pNode, nPortionEnd ) ) )
+/*N*/ {
+/*N*/ BOOL bAllow = FALSE;
+/*N*/ USHORT nScriptTypeLeft = GetScriptType( EditPaM( pNode, nPortionEnd ) );
+/*N*/ USHORT nScriptTypeRight = GetScriptType( EditPaM( pNode, nPortionEnd+1 ) );
+/*N*/ if ( ( nScriptTypeLeft == i18n::ScriptType::ASIAN ) || ( nScriptTypeRight == i18n::ScriptType::ASIAN ) )
+/*N*/ bAllow = TRUE;
+/*N*/
+/*N*/ // No spacing within L2R/R2L nesting
+/*N*/ if ( bAllow )
+/*N*/ {
+/*?*/ long nExtraSpace = pPortion->GetSize().Height()/5;
+/*?*/ nExtraSpace = GetXValue( nExtraSpace );
+/*?*/ pPortion->GetSize().Width() += nExtraSpace;
+/*?*/ nTmpWidth += nExtraSpace;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( aCurrentTab.bValid && ( nTmpPortion != aCurrentTab.nTabPortion ) )
+/*N*/ {
+/*N*/ long nWidthAfterTab = 0;
+/*N*/ for ( USHORT n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ )
+/*N*/ {
+/*N*/ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( n );
+/*N*/ nWidthAfterTab += pTP->GetSize().Width();
+/*N*/ }
+/*N*/ long nW; // Length before tab position
+/*N*/ if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT )
+/*N*/ {
+/*N*/ nW = nWidthAfterTab;
+/*N*/ }
+/*N*/ else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER )
+/*N*/ {
+/*?*/ nW = nWidthAfterTab/2;
+/*N*/ }
+/*N*/ else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL )
+/*N*/ {
+/*?*/ 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 -= pParaPortion->GetTextPortions().GetObject( nTmpPortion )->GetSize().Width();
+/*?*/ nW += aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, nDecPos, NULL ).Width();
+/*?*/ aCurrentTab.bValid = FALSE;
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ DBG_ERROR( "CreateLines: Tab not handled!" );
+/*N*/ }
+/*N*/ long nMaxW = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nStartX;
+/*N*/ if ( nW >= nMaxW )
+/*N*/ {
+/*?*/ nW = nMaxW;
+/*?*/ aCurrentTab.bValid = FALSE;
+/*N*/ }
+/*N*/ TextPortion* pTabPortion = pParaPortion->GetTextPortions().GetObject( aCurrentTab.nTabPortion );
+/*N*/ pTabPortion->GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW - nStartX;
+/*N*/ nTmpWidth = aCurrentTab.nStartPosX + pTabPortion->GetSize().Width() + nWidthAfterTab;
+/*N*/ }
+/*N*/
+/*N*/ nTmpPos += pPortion->GetLen();
+/*N*/ nPortionEnd = nTmpPos;
+/*N*/ nTmpPortion++;
+/*N*/ if ( aStatus.OneCharPerLine() )
+/*N*/ bEOL = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ aCurrentTab.bValid = FALSE;
+/*N*/
+/*N*/ // das war evtl. eine Portion zu weit:
+/*N*/ sal_Bool bFixedEnd = sal_False;
+/*N*/ if ( aStatus.OneCharPerLine() )
+/*N*/ {
+/*?*/ // 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();
+/*?*/ }
+/*N*/ }
+/*N*/ else if ( nTmpWidth >= nXWidth )
+/*N*/ {
+/*N*/ nPortionEnd = nTmpPos;
+/*N*/ nTmpPos -= pPortion->GetLen();
+/*N*/ nPortionStart = nTmpPos;
+/*N*/ nTmpPortion--;
+/*N*/ bEOL = sal_False;
+/*N*/ bEOC = sal_False;
+/*N*/ switch ( pPortion->GetKind() )
+/*N*/ {
+/*N*/ case PORTIONKIND_TEXT:
+/*N*/ {
+/*N*/ nTmpWidth -= pPortion->GetSize().Width();
+/*N*/ }
+/*N*/ break;
+/*N*/ case PORTIONKIND_FIELD:
+/*N*/ case PORTIONKIND_TAB:
+/*N*/ {
+/*?*/ nTmpWidth -= pPortion->GetSize().Width();
+/*?*/ bEOL = sal_True;
+/*?*/ bFixedEnd = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ default:
+/*N*/ {
+/*?*/ // Ein Feature wird nicht umgebrochen:
+/*?*/ DBG_ASSERT( ( pPortion->GetKind() == PORTIONKIND_LINEBREAK ), "Was fuer ein Feature ?" );
+/*?*/ bEOL = sal_True;
+/*?*/ bFixedEnd = sal_True;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bEOL = sal_True;
+/*N*/ bEOC = sal_True;
+/*N*/ pLine->SetEnd( nPortionEnd );
+/*N*/ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine TextPortions?" );
+/*N*/ pLine->SetEndPortion( (sal_uInt16)pParaPortion->GetTextPortions().Count() - 1 );
+/*N*/ }
+/*N*/
+/*N*/ if ( aStatus.OneCharPerLine() )
+/*N*/ {
+/*?*/ pLine->SetEnd( nPortionEnd );
+/*?*/ pLine->SetEndPortion( nTmpPortion-1 );
+/*N*/ }
+/*N*/ else if ( bFixedEnd )
+/*N*/ {
+/*N*/ pLine->SetEnd( nPortionStart );
+/*N*/ pLine->SetEndPortion( nTmpPortion-1 );
+/*N*/ }
+/*N*/ else if ( bLineBreak || bBrokenLine )
+/*N*/ {
+/*N*/ pLine->SetEnd( nPortionStart+1 );
+/*N*/ pLine->SetEndPortion( nTmpPortion-1 );
+/*N*/ bEOC = sal_False; // wurde oben gesetzt, vielleich mal die if's umstellen?
+/*N*/ }
+/*N*/ else if ( !bEOL )
+/*N*/ {
+/*N*/ DBG_ASSERT( (nPortionEnd-nPortionStart) == pPortion->GetLen(), "Doch eine andere Portion?!" );
+/*N*/ long nRemainingWidth = nMaxLineWidth - nTmpWidth;
+/*N*/ sal_Bool bCanHyphenate = ( aTmpFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL );
+/*N*/ if ( bCompressedChars && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed )
+/*N*/ {
+/*?*/ // I need the manipulated DXArray for determining the break postion...
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImplCalcAsianCompression( pNode, pPortion, nPortionStart, (long*)pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()), 10000, TRUE );
+/*N*/ }
+/*N*/ ImpBreakLine( pParaPortion, pLine, pPortion, nPortionStart,
+/*N*/ nRemainingWidth, bCanHyphenate && bHyphenatePara );
+/*N*/ }
+/*N*/
+/*N*/ // ------------------------------------------------------------------
+/*N*/ // Zeile fertig => justieren
+/*N*/ // ------------------------------------------------------------------
+/*N*/
+/*N*/ // CalcTextSize sollte besser durch ein kontinuierliches
+/*N*/ // Registrieren ersetzt werden !
+/*N*/ Size aTextSize = pLine->CalcTextSize( *pParaPortion );
+/*N*/
+/*N*/ if ( aTextSize.Height() == 0 )
+/*N*/ {
+/*?*/ SeekCursor( pNode, pLine->GetStart()+1, aTmpFont );
+/*?*/ aTmpFont.SetPhysFont( pRefDev );
+/*?*/ aTextSize.Height() = aTmpFont.GetPhysTxtSize( pRefDev, String() ).Height();
+/*?*/ pLine->SetHeight( (sal_uInt16)aTextSize.Height() );
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // Die Fontmetriken koennen nicht kontinuierlich berechnet werden,
+/*N*/ // wenn der Font sowieso eingestellt ist, weil ggf. ein grosser Font
+/*N*/ // erst nach dem Umbrechen ploetzlich in der naechsten Zeile landet
+/*N*/ // => Font-Metriken zu gross.
+/*N*/ FormatterFontMetric aFormatterMetrics;
+/*N*/ sal_uInt16 nTPos = pLine->GetStart();
+/*N*/ for ( sal_uInt16 nP = pLine->GetStartPortion(); nP <= pLine->GetEndPortion(); nP++ )
+/*N*/ {
+/*N*/ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nP );
+/*N*/ // #95819# problem with hard font height attribute, when everthing but the line break has this attribute
+/*N*/ if ( pTP->GetKind() != PORTIONKIND_LINEBREAK )
+/*N*/ {
+/*N*/ SeekCursor( pNode, nTPos+1, aTmpFont );
+/*N*/ aTmpFont.SetPhysFont( GetRefDevice() );
+/*N*/ RecalcFormatterFontMetrics( aFormatterMetrics, aTmpFont );
+/*N*/ }
+/*N*/ nTPos += pTP->GetLen();
+/*N*/ }
+/*N*/ sal_uInt16 nLineHeight = aFormatterMetrics.GetHeight();
+/*N*/ if ( nLineHeight > pLine->GetHeight() )
+/*N*/ pLine->SetHeight( nLineHeight );
+/*N*/ pLine->SetMaxAscent( aFormatterMetrics.nMaxAscent );
+/*N*/
+/*N*/ bSameLineAgain = sal_False;
+/*N*/ if ( GetTextRanger() && ( pLine->GetHeight() > nTextLineHeight ) )
+/*N*/ {
+/*N*/ // Nochmal mit der anderen Groesse aufsetzen!
+/*?*/ bSameLineAgain = sal_True;
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ {
+/*N*/ if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
+/*N*/ {
+/*?*/ 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 );
+/*?*/ }
+/*N*/ }
+/*N*/ else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+/*N*/ {
+/*N*/ if ( nPara || ( pLine->GetStartPortion() != 0 ) ) // Nicht die aller erste Zeile
+/*N*/ {
+/*N*/ // #100508# There are documents with PropLineSpace 0, why?
+/*N*/ if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
+/*N*/ {
+/*N*/ sal_uInt16 nTxtHeight = pLine->GetHeight();
+/*N*/ sal_uInt32 nH = nTxtHeight;
+/*N*/ nH *= rLSItem.GetPropLineSpace();
+/*N*/ nH /= 100;
+/*N*/ // Der Ascent muss um die Differenz angepasst werden:
+/*N*/ long nDiff = pLine->GetHeight() - nH;
+/*N*/ if ( nDiff > pLine->GetMaxAscent() )
+/*?*/ nDiff = pLine->GetMaxAscent();
+/*N*/ pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() - nDiff) );
+/*N*/ pLine->SetHeight( (sal_uInt16)nH, nTxtHeight );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // #80582# - Bullet should not influence line height
+/*N*/ // if ( !nLine )
+/*N*/ // {
+/*N*/ // long nBulletHeight = aBulletArea.GetHeight();
+/*N*/ // if ( nBulletHeight > (long)pLine->GetHeight() )
+/*N*/ // {
+/*N*/ // long nDiff = nBulletHeight - (long)pLine->GetHeight();
+/*N*/ // // nDiff auf oben und unten verteilen.
+/*N*/ // pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff/2) );
+/*N*/ // pLine->SetHeight( (sal_uInt16)nBulletHeight );
+/*N*/ // }
+/*N*/ // }
+/*N*/
+/*N*/ if ( ( !IsVertical() && aStatus.AutoPageWidth() ) ||
+/*N*/ ( IsVertical() && aStatus.AutoPageHeight() ) )
+/*N*/ {
+/*N*/ // Wenn die Zeile in die aktuelle Papierbreite passt, muss
+/*N*/ // diese Breite fuer die Ausrichting verwendet werden.
+/*N*/ // Wenn sie nicht passt oder sie die Papierbreite aendert,
+/*N*/ // wird bei Justification != LEFT sowieso noch mal formatiert.
+/*N*/ long nMaxLineWidthFix = ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() )
+/*N*/ - GetXValue( rLRItem.GetRight() ) - nStartX;
+/*N*/ if ( aTextSize.Width() < nMaxLineWidthFix )
+/*N*/ nMaxLineWidth = nMaxLineWidthFix;
+/*N*/ }
+/*N*/
+/*N*/ if ( bCompressedChars )
+/*N*/ {
+/*?*/ long nRemainingWidth = nMaxLineWidth - aTextSize.Width();
+/*?*/ if ( nRemainingWidth > 0 )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImplExpandCompressedPortions( pLine, pParaPortion, nRemainingWidth );
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( pLine->IsHangingPunctuation() )
+/*N*/ {
+/*?*/ // Width from HangingPunctuation was set to 0 in ImpBreakLine,
+/*?*/ // check for rel width now, maybe create compression...
+/*?*/ long n = nMaxLineWidth - aTextSize.Width();
+/*?*/ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( pLine->GetEndPortion() );
+/*?*/ sal_uInt16 nPosInArray = pLine->GetEnd()-1-pLine->GetStart();
+/*?*/ long nNewValue = ( nPosInArray ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0 ) + n;
+/*?*/ pLine->GetCharPosArray()[ nPosInArray ] = nNewValue;
+/*?*/ pTP->GetSize().Width() += n;
+/*N*/ }
+/*N*/
+/*N*/ pLine->SetTextWidth( aTextSize.Width() );
+/*N*/ switch ( eJustification )
+/*N*/ {
+/*N*/ case SVX_ADJUST_CENTER:
+/*N*/ {
+/*N*/ long n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
+/*N*/ n += nStartX; // Einrueckung bleibt erhalten.
+/*N*/ if ( n > 0 )
+/*N*/ pLine->SetStartPosX( (sal_uInt16)n );
+/*N*/ else
+/*N*/ pLine->SetStartPosX( 0 );
+/*N*/
+/*N*/ }
+/*N*/ break;
+/*N*/ case SVX_ADJUST_RIGHT:
+/*N*/ {
+/*N*/ // Bei automatisch umgebrochenen Zeilen, die ein Blank
+/*N*/ // am Ende enthalten, darf das Blank nicht ausgegeben werden!
+/*N*/
+/*N*/ long n = nMaxLineWidth - aTextSize.Width();
+/*N*/ n += nStartX; // Einrueckung bleibt erhalten.
+/*N*/ if ( n > 0 )
+/*N*/ pLine->SetStartPosX( (sal_uInt16)n );
+/*N*/ else
+/*?*/ pLine->SetStartPosX( 0 );
+/*N*/ }
+/*N*/ break;
+/*N*/ case SVX_ADJUST_BLOCK:
+/*N*/ {
+/*N*/ long nRemainingSpace = nMaxLineWidth - aTextSize.Width();
+/*N*/ pLine->SetStartPosX( (sal_uInt16)nStartX );
+/*N*/ if ( !bEOC && ( nRemainingSpace > 0 ) ) // nicht die letzte Zeile...
+/*N*/ ImpAdjustBlocks( pParaPortion, pLine, nRemainingSpace );
+/*N*/ }
+/*N*/ break;
+/*N*/ default:
+/*N*/ {
+/*N*/ pLine->SetStartPosX( (sal_uInt16)nStartX ); // FI, LI
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ // -----------------------------------------------------------------
+/*N*/ // pruefen, ob die Zeile neu ausgegeben werden muss...
+/*N*/ // -----------------------------------------------------------------
+/*N*/ pLine->SetInvalid();
+/*N*/
+/*N*/ // Wenn eine Portion umgebrochen wurde sind ggf. viel zu viele Positionen
+/*N*/ // im CharPosArray:
+/*N*/ if ( bCalcCharPositions )
+/*N*/ {
+/*N*/ sal_uInt16 nLen = pLine->GetLen();
+/*N*/ sal_uInt16 nCount = pLine->GetCharPosArray().Count();
+/*N*/ if ( nCount > nLen )
+/*N*/ pLine->GetCharPosArray().Remove( nLen, nCount-nLen );
+/*N*/ }
+/*N*/
+/*N*/ if ( GetTextRanger() )
+/*N*/ {
+/*?*/ 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 ) );
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Fuer kleiner 0 noch ueberlegen!
+/*N*/ if ( pParaPortion->IsSimpleInvalid() /* && ( nInvalidDiff > 0 ) */ )
+/*N*/ {
+/*N*/ // Aenderung durch einfache Textaenderung...
+/*N*/ // Formatierung nicht abbrechen, da Portions evtl. wieder
+/*N*/ // gesplittet werden muessen!
+/*N*/ // Wenn irgendwann mal abbrechbar, dann fogende Zeilen Validieren!
+/*N*/ // Aber ggf. als Valid markieren, damit weniger Ausgabe...
+/*N*/ if ( pLine->GetEnd() < nInvalidStart )
+/*N*/ {
+/*?*/ if ( *pLine == aSaveLine )
+/*?*/ {
+/*?*/ pLine->SetValid();
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nStart = pLine->GetStart();
+/*N*/ sal_uInt16 nEnd = pLine->GetEnd();
+/*N*/
+/*N*/ if ( nStart > nInvalidEnd )
+/*N*/ {
+/*?*/ if ( ( ( nStart-nInvalidDiff ) == aSaveLine.GetStart() ) &&
+/*?*/ ( ( nEnd-nInvalidDiff ) == aSaveLine.GetEnd() ) )
+/*?*/ {
+/*?*/ pLine->SetValid();
+/*?*/ if ( bCalcCharPositions && bQuickFormat )
+/*?*/ {
+/*?*/ bCalcCharPositions = sal_False;
+/*?*/ bLineBreak = sal_False;
+/*?*/ pParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
+/*?*/ break;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ else if ( bCalcCharPositions && bQuickFormat && ( nEnd > nInvalidEnd) )
+/*N*/ {
+/*N*/ // Wenn die ungueltige Zeile so endet, dass die naechste an
+/*N*/ // der 'gleichen' Textstelle wie vorher beginnt, also nicht
+/*N*/ // anders umgebrochen wird, brauche ich dort auch nicht die
+/*N*/ // textbreiten neu bestimmen:
+/*N*/ if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
+/*N*/ {
+/*N*/ bCalcCharPositions = sal_False;
+/*N*/ bLineBreak = sal_False;
+/*N*/ pParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( !bSameLineAgain )
+/*N*/ {
+/*N*/ nIndex = pLine->GetEnd(); // naechste Zeile Start = letzte Zeile Ende
+/*N*/ // weil nEnd hinter das letzte Zeichen zeigt!
+/*N*/
+/*N*/ sal_uInt16 nEndPortion = pLine->GetEndPortion();
+/*N*/
+/*N*/ // Naechste Zeile oder ggf. neue Zeile....
+/*N*/ pLine = 0;
+/*N*/ if ( nLine < pParaPortion->GetLines().Count()-1 )
+/*N*/ pLine = pParaPortion->GetLines().GetObject( ++nLine );
+/*N*/ if ( pLine && ( nIndex >= pNode->Len() ) )
+/*N*/ {
+/*N*/ nDelFromLine = nLine;
+/*N*/ break;
+/*N*/ }
+/*N*/ if ( !pLine )
+/*N*/ {
+/*N*/ if ( nIndex < pNode->Len() )
+/*N*/ {
+/*N*/ pLine = new EditLine;
+/*N*/ pParaPortion->GetLines().Insert( pLine, ++nLine );
+/*N*/ }
+/*N*/ else if ( nIndex && bLineBreak && GetTextRanger() )
+/*N*/ {
+/*?*/ // normaly CreateAndInsertEmptyLine would be called, but I want to use
+/*?*/ // CreateLines, so I need Polygon code only here...
+/*?*/ TextPortion* pDummyPortion = new TextPortion( 0 );
+/*?*/ pParaPortion->GetTextPortions().Insert( pDummyPortion, pParaPortion->GetTextPortions().Count() );
+/*?*/ pLine = new EditLine;
+/*?*/ pParaPortion->GetLines().Insert( pLine, ++nLine );
+/*?*/ bForceOneRun = TRUE;
+/*?*/ bProcessingEmptyLine = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if ( pLine )
+/*N*/ {
+/*N*/ aSaveLine = *pLine;
+/*N*/ pLine->SetStart( nIndex );
+/*N*/ pLine->SetEnd( nIndex );
+/*N*/ pLine->SetStartPortion( nEndPortion+1 );
+/*N*/ pLine->SetEndPortion( nEndPortion+1 );
+/*N*/ }
+/*N*/ }
+/*N*/ } // while ( Index < Len )
+/*N*/
+/*N*/ if ( nDelFromLine != 0xFFFF )
+/*N*/ pParaPortion->GetLines().DeleteFromLine( nDelFromLine );
+/*N*/
+/*N*/ DBG_ASSERT( pParaPortion->GetLines().Count(), "Keine Zeile nach CreateLines!" );
+/*N*/
+/*N*/ if ( bLineBreak == sal_True )
+/*N*/ CreateAndInsertEmptyLine( pParaPortion, nStartPosY );
+/*N*/
+/*N*/ delete[] pBuf;
+/*N*/
+/*N*/ sal_Bool bHeightChanged = FinishCreateLines( pParaPortion );
+/*N*/
+/*N*/ if ( bMapChanged )
+/*?*/ GetRefDevice()->Pop();
+/*N*/
+/*N*/ GetRefDevice()->SetLayoutMode( nOldLayoutMode );
+/*N*/
+/*N*/ return bHeightChanged;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uInt32 nStartPosY )
+/*N*/ {
+/*N*/ DBG_ASSERT( !GetTextRanger(), "Don't use CreateAndInsertEmptyLine with a polygon!" );
+/*N*/
+/*N*/ EditLine* pTmpLine = new EditLine;
+/*N*/ pTmpLine->SetStart( pParaPortion->GetNode()->Len() );
+/*N*/ pTmpLine->SetEnd( pParaPortion->GetNode()->Len() );
+/*N*/ pParaPortion->GetLines().Insert( pTmpLine, pParaPortion->GetLines().Count() );
+/*N*/
+/*N*/ sal_Bool bLineBreak = pParaPortion->GetNode()->Len() ? sal_True : sal_False;
+/*N*/ const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pParaPortion->GetNode() );
+/*N*/ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+/*N*/ short nStartX = GetXValue( (short)(rLRItem.GetTxtLeft() + rLRItem.GetTxtFirstLineOfst()) );
+/*N*/
+/*N*/ Rectangle aBulletArea = Rectangle( Point(), Point() );
+/*N*/ if ( bLineBreak == sal_True )
+/*N*/ {
+/*N*/ nStartX = (short)GetXValue( rLRItem.GetTxtLeft() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aBulletArea = GetEditEnginePtr()->GetBulletArea( GetParaPortions().GetPos( pParaPortion ) );
+/*N*/ if ( aBulletArea.Right() > 0 )
+/*?*/ pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
+/*N*/ else
+/*N*/ pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+/*N*/ if ( pParaPortion->GetBulletX() > nStartX )
+/*N*/ {
+/*?*/ nStartX = (short)GetXValue( rLRItem.GetTxtLeft() );
+/*?*/ if ( pParaPortion->GetBulletX() > nStartX )
+/*?*/ nStartX = pParaPortion->GetBulletX();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ SvxFont aTmpFont;
+/*N*/ SeekCursor( pParaPortion->GetNode(), bLineBreak ? pParaPortion->GetNode()->Len() : 0, aTmpFont );
+/*N*/ aTmpFont.SetPhysFont( pRefDev );
+/*N*/
+/*N*/ TextPortion* pDummyPortion = new TextPortion( 0 );
+/*N*/ pDummyPortion->GetSize() = aTmpFont.GetPhysTxtSize( pRefDev, String() );
+/*N*/ pParaPortion->GetTextPortions().Insert( pDummyPortion, pParaPortion->GetTextPortions().Count() );
+/*N*/ FormatterFontMetric aFormatterMetrics;
+/*N*/ RecalcFormatterFontMetrics( aFormatterMetrics, aTmpFont );
+/*N*/ pTmpLine->SetMaxAscent( aFormatterMetrics.nMaxAscent );
+/*N*/ pTmpLine->SetHeight( (sal_uInt16) pDummyPortion->GetSize().Height() );
+/*N*/ sal_uInt16 nLineHeight = aFormatterMetrics.GetHeight();
+/*N*/ if ( nLineHeight > pTmpLine->GetHeight() )
+/*N*/ pTmpLine->SetHeight( nLineHeight );
+/*N*/
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ {
+/*N*/ USHORT nPara = GetParaPortions().GetPos( pParaPortion );
+/*N*/ SvxAdjust eJustification = GetJustification( nPara );
+/*N*/ long nMaxLineWidth = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height();
+/*N*/ nMaxLineWidth -= GetXValue( rLRItem.GetRight() );
+/*N*/ long nTextXOffset = 0;
+/*N*/ if ( nMaxLineWidth < 0 )
+/*N*/ nMaxLineWidth = 1;
+/*N*/ if ( eJustification == SVX_ADJUST_CENTER )
+/*N*/ nStartX = nMaxLineWidth / 2;
+/*N*/ else if ( eJustification == SVX_ADJUST_RIGHT )
+/*?*/ nStartX = (short)nMaxLineWidth;
+/*N*/
+/*N*/ nStartX += (short)nTextXOffset;
+/*N*/ }
+/*N*/
+/*N*/ pTmpLine->SetStartPosX( nStartX );
+/*N*/
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ {
+/*N*/ if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
+/*N*/ {
+/*?*/ 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 );
+/*?*/ }
+/*N*/ }
+/*N*/ else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+/*N*/ {
+/*?*/ USHORT nPara = GetParaPortions().GetPos( pParaPortion );
+/*?*/ if ( nPara || ( pTmpLine->GetStartPortion() != 0 ) ) // Nicht die aller erste Zeile
+/*?*/ {
+/*?*/ // #100508# There are documents with PropLineSpace 0, why?
+/*?*/ if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
+/*?*/ {
+/*?*/ sal_uInt16 nTxtHeight = pTmpLine->GetHeight();
+/*?*/ sal_uInt32 nH = nTxtHeight;
+/*?*/ nH *= rLSItem.GetPropLineSpace();
+/*?*/ nH /= 100;
+/*?*/ // Der Ascent muss um die Differenz angepasst werden:
+/*?*/ long nDiff = pTmpLine->GetHeight() - nH;
+/*?*/ if ( nDiff > pTmpLine->GetMaxAscent() )
+/*?*/ nDiff = pTmpLine->GetMaxAscent();
+/*?*/ pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() - nDiff) );
+/*?*/ pTmpLine->SetHeight( (sal_uInt16)nH, nTxtHeight );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( !bLineBreak )
+/*N*/ {
+/*N*/ long nMinHeight = aBulletArea.GetHeight();
+/*N*/ if ( nMinHeight > (long)pTmpLine->GetHeight() )
+/*N*/ {
+/*?*/ 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 );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // -2: Die neue ist bereits eingefuegt.
+/*N*/ EditLine* pLastLine = pParaPortion->GetLines().GetObject( pParaPortion->GetLines().Count()-2 );
+/*N*/ DBG_ASSERT( pLastLine, "Weicher Umbruch, keine Zeile ?!" );
+/*N*/ DBG_ASSERT( pLastLine->GetEnd() == pParaPortion->GetNode()->Len(), "Doch anders?" );
+/*N*/ // pTmpLine->SetStart( pLastLine->GetEnd() );
+/*N*/ // pTmpLine->SetEnd( pLastLine->GetEnd() );
+/*N*/ sal_uInt16 nPos = (sal_uInt16) pParaPortion->GetTextPortions().Count() - 1 ;
+/*N*/ pTmpLine->SetStartPortion( nPos );
+/*N*/ pTmpLine->SetEndPortion( nPos );
+/*N*/ }
+/*N*/ }
+
+/*N*/ sal_Bool ImpEditEngine::FinishCreateLines( ParaPortion* pParaPortion )
+/*N*/ {
+/*N*/ // CalcCharPositions( pParaPortion );
+/*N*/ pParaPortion->SetValid();
+/*N*/ long nOldHeight = pParaPortion->GetHeight();
+/*N*/ // sal_uInt16 nPos = GetParaPortions().GetPos( pParaPortion );
+/*N*/ // DBG_ASSERT( nPos != USHRT_MAX, "FinishCreateLines: Portion nicht in Liste!" );
+/*N*/ // ParaPortion* pPrev = nPos ? GetParaPortions().GetObject( nPos-1 ) : 0;
+/*N*/ CalcHeight( pParaPortion );
+/*N*/
+/*N*/ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "FinishCreateLines: Keine Text-Portion?" );
+/*N*/ sal_Bool bRet = ( pParaPortion->GetHeight() != nOldHeight );
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, TextPortion* pPortion, sal_uInt16 nPortionStart, long nRemainingWidth, sal_Bool bCanHyphenate )
+/*N*/ {
+/*N*/ ContentNode* const pNode = pParaPortion->GetNode();
+/*N*/
+/*N*/ sal_uInt16 nBreakInLine = nPortionStart - pLine->GetStart();
+/*N*/ sal_uInt16 nMax = nBreakInLine + pPortion->GetLen();
+/*N*/ while ( ( nBreakInLine < nMax ) && ( pLine->GetCharPosArray()[nBreakInLine] < nRemainingWidth ) )
+/*N*/ nBreakInLine++;
+/*N*/
+/*N*/ sal_uInt16 nMaxBreakPos = nBreakInLine + pLine->GetStart();
+/*N*/ sal_uInt16 nBreakPos = 0xFFFF;
+/*N*/
+/*N*/ sal_Bool bCompressBlank = sal_False;
+/*N*/ sal_Bool bHyphenated = sal_False;
+/*N*/ sal_Bool bHangingPunctuation = sal_False;
+/*N*/ sal_Unicode cAlternateReplChar = 0;
+/*N*/ sal_Unicode cAlternateExtraChar = 0;
+/*N*/
+/*N*/ if ( ( nMaxBreakPos < ( nMax + pLine->GetStart() ) ) && ( pNode->GetChar( nMaxBreakPos ) == ' ' ) )
+/*N*/ {
+/*N*/ // Break behind the blank, blank will be compressed...
+/*N*/ nBreakPos = nMaxBreakPos + 1;
+/*N*/ bCompressBlank = sal_True;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nMinBreakPos = pLine->GetStart();
+/*N*/ USHORT nAttrs = pNode->GetCharAttribs().GetAttribs().Count();
+/*N*/ for ( USHORT nAttr = nAttrs; nAttr; )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[--nAttr];
+/*N*/ if ( pAttr->IsFeature() && ( pAttr->GetEnd() > nMinBreakPos ) && ( pAttr->GetEnd() <= nMaxBreakPos ) )
+/*N*/ {
+/*N*/ nMinBreakPos = pAttr->GetEnd();
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ lang::Locale aLocale = GetLocale( EditPaM( pNode, nMaxBreakPos ) );
+/*N*/
+/*N*/ Reference < i18n::XBreakIterator > xBI = ImplGetBreakIterator();
+/*N*/ OUString aText( *pNode );
+/*N*/ Reference< XHyphenator > xHyph;
+/*N*/ i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, Sequence< PropertyValue >(), 1 );
+/*N*/ i18n::LineBreakUserOptions aUserOptions;
+/*N*/
+/*N*/ const i18n::ForbiddenCharacters* pForbidden = GetForbiddenCharsTable()->GetForbiddenCharacters( SvxLocaleToLanguage( aLocale ), TRUE );
+/*N*/ aUserOptions.forbiddenBeginCharacters = pForbidden->beginLine;
+/*N*/ aUserOptions.forbiddenEndCharacters = pForbidden->endLine;
+/*N*/ aUserOptions.applyForbiddenRules = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_FORBIDDENRULES )).GetValue();
+/*N*/ aUserOptions.allowPunctuationOutsideMargin = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HANGINGPUNCTUATION )).GetValue();
+/*N*/ aUserOptions.allowHyphenateEnglish = FALSE;
+/*N*/
+/*N*/ i18n::LineBreakResults aLBR = xBI->getLineBreak( *pNode, nMaxBreakPos, aLocale, nMinBreakPos, aHyphOptions, aUserOptions );
+/*N*/ nBreakPos = (USHORT)aLBR.breakIndex;
+/*N*/
+/*N*/ // BUG in I18N - under special condition (break behind field, #87327#) breakIndex is < nMinBreakPos
+/*N*/ if ( nBreakPos < nMinBreakPos )
+/*N*/ {
+/*N*/ nBreakPos = nMinBreakPos;
+/*N*/ }
+/*N*/ else if ( ( nBreakPos > nMaxBreakPos ) && !aUserOptions.allowPunctuationOutsideMargin )
+/*N*/ {
+/*N*/ DBG_ERROR( "I18N: XBreakIterator::getLineBreak returns position > Max" );
+/*N*/ nBreakPos = nMaxBreakPos;
+/*N*/ }
+/*N*/
+/*N*/ // #101795# nBreakPos can never be outside the portion, even not with hangig punctuation
+/*N*/ if ( nBreakPos > nMaxBreakPos )
+/*N*/ nBreakPos = nMaxBreakPos;
+/*N*/
+/*N*/ // BUG in I18N - the japanese dot is in the next line!
+/*N*/ // !!! Testen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/ if ( (nBreakPos + ( aUserOptions.allowPunctuationOutsideMargin ? 0 : 1 ) ) <= nMaxBreakPos )
+/*N*/ {
+/*N*/ sal_Unicode cFirstInNextLine = ( (nBreakPos+1) < pNode->Len() ) ? pNode->GetChar( nBreakPos ) : 0;
+/*N*/ if ( cFirstInNextLine == 12290 )
+/*N*/ nBreakPos++;
+/*N*/ }
+/*N*/
+/*N*/ bHangingPunctuation = ( nBreakPos > nMaxBreakPos ) ? sal_True : sal_False;
+/*N*/ pLine->SetHangingPunctuation( bHangingPunctuation );
+/*N*/
+/*N*/ if ( nBreakPos <= pLine->GetStart() )
+/*N*/ {
+/*N*/ // keine Trenner in Zeile => abhacken !
+/*N*/ nBreakPos = nMaxBreakPos;
+/*N*/ // MT: I18N nextCharacters !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+/*N*/ if ( nBreakPos <= pLine->GetStart() )
+/*N*/ nBreakPos = pLine->GetStart() + 1; // Sonst Endlosschleife!
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // die angeknackste Portion ist die End-Portion
+/*N*/ pLine->SetEnd( nBreakPos );
+/*N*/
+/*N*/ sal_uInt16 nEndPortion = SplitTextPortion( pParaPortion, nBreakPos, pLine );
+/*N*/
+/*N*/ if ( !bCompressBlank && !bHangingPunctuation )
+/*N*/ {
+/*N*/ // #96187# When justification is not SVX_ADJUST_LEFT, it's important to compress
+/*N*/ // the trailing space even if there is enough room for the space...
+/*N*/ // Don't check for SVX_ADJUST_LEFT, doesn't matter to compress in this case too...
+/*N*/ DBG_ASSERT( nBreakPos > pLine->GetStart(), "ImpBreakLines - BreakPos not expected!" );
+/*N*/ if ( pNode->GetChar( nBreakPos-1 ) == ' ' )
+/*N*/ bCompressBlank = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ if ( bCompressBlank || bHangingPunctuation )
+/*N*/ {
+/*N*/ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nEndPortion );
+/*N*/ DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: Keine TextPortion!" );
+/*N*/ DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+/*N*/ sal_uInt16 nPosInArray = nBreakPos - 1 - pLine->GetStart();
+/*N*/ pTP->GetSize().Width() = ( nPosInArray && ( pTP->GetLen() > 1 ) ) ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0;
+/*N*/ pLine->GetCharPosArray()[ nPosInArray ] = pTP->GetSize().Width();
+/*N*/ }
+/*N*/ else if ( bHyphenated )
+/*N*/ {
+/*N*/ // Eine Portion fuer den Trenner einbauen...
+/*N*/ TextPortion* pHyphPortion = new TextPortion( 0 );
+/*N*/ pHyphPortion->GetKind() = PORTIONKIND_HYPHENATOR;
+/*N*/ String aHyphText( CH_HYPH );
+/*N*/ if ( cAlternateReplChar )
+/*N*/ {
+/*?*/ 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 ];
+/*N*/ }
+/*N*/ else if ( cAlternateExtraChar )
+/*N*/ {
+/*?*/ pHyphPortion->SetExtraValue( cAlternateExtraChar );
+/*?*/ aHyphText.Insert( cAlternateExtraChar, 0 );
+/*N*/ }
+/*N*/
+/*N*/ // Breite der Hyph-Portion ermitteln:
+/*N*/ SvxFont aFont;
+/*N*/ SeekCursor( pParaPortion->GetNode(), nBreakPos, aFont );
+/*N*/ aFont.SetPhysFont( GetRefDevice() );
+/*N*/ pHyphPortion->GetSize().Height() = GetRefDevice()->GetTextHeight();
+/*N*/ pHyphPortion->GetSize().Width() = GetRefDevice()->GetTextWidth( aHyphText );
+/*N*/
+/*N*/ pParaPortion->GetTextPortions().Insert( pHyphPortion, ++nEndPortion );
+/*N*/ }
+/*N*/ pLine->SetEndPortion( nEndPortion );
+/*N*/ }
+
+/*N*/ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, long nRemainingSpace )
+/*N*/ {
+/*N*/ DBG_ASSERT( nRemainingSpace > 0, "AdjustBlocks: Etwas zuwenig..." );
+/*N*/ DBG_ASSERT( pLine, "AdjustBlocks: Zeile ?!" );
+/*N*/ if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() )
+/*N*/ return ;
+/*N*/
+/*N*/ const USHORT nFirstChar = pLine->GetStart();
+/*N*/ const USHORT nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter
+/*N*/ ContentNode* pNode = pParaPortion->GetNode();
+/*N*/
+/*N*/ DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" );
+/*N*/
+/*N*/ // Search blanks or Kashidas...
+/*N*/ SvUShorts aPositions;
+/*N*/ USHORT nChar;
+/*N*/ for ( nChar = nFirstChar; nChar <= nLastChar; nChar++ )
+/*N*/ {
+/*N*/ if ( pNode->GetChar(nChar) == ' ' )
+/*N*/ {
+/*N*/ // Don't use blank if language is arabic
+/*N*/ LanguageType eLang = GetLanguage( EditPaM( pNode, nChar ) );
+/*N*/ if ( MsLangId::getPrimaryLanguage( eLang) != LANGUAGE_ARABIC_PRIMARY_ONLY )
+/*N*/ aPositions.Insert( nChar, aPositions.Count() );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Kashidas ?
+/*N*/ ImpFindKashidas( pNode, nFirstChar, nLastChar, aPositions );
+/*N*/
+/*N*/
+/*N*/ if ( !aPositions.Count() )
+/*N*/ return;
+/*N*/
+/*N*/ // Wenn das letzte Zeichen ein Blank ist, will ich es nicht haben!
+/*N*/ // Die Breite muss auf die Blocker davor verteilt werden...
+/*N*/ // Aber nicht, wenn es das einzige ist
+/*N*/ if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( aPositions.Count() > 1 ) && ( MsLangId::getPrimaryLanguage( GetLanguage( EditPaM( pNode, nLastChar ) ) ) != LANGUAGE_ARABIC_PRIMARY_ONLY ) )
+/*N*/ {
+/*N*/ aPositions.Remove( aPositions.Count()-1, 1 );
+/*N*/ USHORT nPortionStart, nPortion;
+/*N*/ nPortion = pParaPortion->GetTextPortions().FindPortion( nLastChar+1, nPortionStart );
+/*N*/ TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ];
+/*N*/ long nRealWidth = pLine->GetCharPosArray()[nLastChar-nFirstChar];
+/*N*/ long nBlankWidth = nRealWidth;
+/*N*/ if ( nLastChar > nPortionStart )
+/*N*/ nBlankWidth -= pLine->GetCharPosArray()[nLastChar-nFirstChar-1];
+/*N*/ // Evtl. ist das Blank schon in ImpBreakLine abgezogen worden:
+/*N*/ if ( nRealWidth == pLastPortion->GetSize().Width() )
+/*N*/ {
+/*N*/ // Beim letzten Zeichen muss die Portion hinter dem Blank aufhoeren
+/*N*/ // => Korrektur vereinfachen:
+/*N*/ DBG_ASSERT( ( nPortionStart + pLastPortion->GetLen() ) == ( nLastChar+1 ), "Blank doch nicht am Portion-Ende?!" );
+/*N*/ pLastPortion->GetSize().Width() -= nBlankWidth;
+/*N*/ nRemainingSpace += nBlankWidth;
+/*N*/ }
+/*N*/ pLine->GetCharPosArray()[nLastChar-nFirstChar] -= nBlankWidth;
+/*N*/ }
+/*N*/
+/*N*/ USHORT nGaps = aPositions.Count();
+/*N*/ const long nMore4Everyone = nRemainingSpace / nGaps;
+/*N*/ long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nGaps;
+/*N*/
+/*N*/ DBG_ASSERT( nSomeExtraSpace < (long)nGaps, "AdjustBlocks: ExtraSpace zu gross" );
+/*N*/ DBG_ASSERT( nSomeExtraSpace >= 0, "AdjustBlocks: ExtraSpace < 0 " );
+/*N*/
+/*N*/ // Die Positionen im Array und die Portion-Breiten korrigieren:
+/*N*/ // Letztes Zeichen wird schon nicht mehr beachtet...
+/*N*/ for ( USHORT n = 0; n < aPositions.Count(); n++ )
+/*N*/ {
+/*N*/ nChar = aPositions[n];
+/*N*/ if ( nChar < nLastChar )
+/*N*/ {
+/*N*/ USHORT nPortionStart, nPortion;
+/*N*/ nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart );
+/*N*/ TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ];
+/*N*/
+/*N*/ // Die Breite der Portion:
+/*N*/ pLastPortion->GetSize().Width() += nMore4Everyone;
+/*N*/ if ( nSomeExtraSpace )
+/*N*/ pLastPortion->GetSize().Width()++;
+/*N*/
+/*N*/ // Correct positions in array
+/*N*/ // Even for kashidas just change positions, VCL will then draw the kashida automaticly
+/*N*/ USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen();
+/*N*/ for ( USHORT n = nChar; n < nPortionEnd; n++ )
+/*N*/ {
+/*N*/ pLine->GetCharPosArray()[n-nFirstChar] += nMore4Everyone;
+/*N*/ if ( nSomeExtraSpace )
+/*N*/ pLine->GetCharPosArray()[n-nFirstChar]++;
+/*N*/ }
+/*N*/
+/*N*/ if ( nSomeExtraSpace )
+/*N*/ nSomeExtraSpace--;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Now the text width contains the extra width...
+/*N*/ pLine->SetTextWidth( pLine->GetTextWidth() + nRemainingSpace );
+/*N*/ }
+
+/*N*/ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT nEnd, SvUShorts& rArray )
+/*N*/ {
+/*N*/ // the search has to be performed on a per word base
+/*N*/
+/*N*/ EditSelection aWordSel( EditPaM( pNode, nStart ) );
+/*N*/ aWordSel = SelectWord( aWordSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
+/*N*/ if ( aWordSel.Min().GetIndex() < nStart )
+/*N*/ aWordSel.Min().GetIndex() = nStart;
+/*N*/
+/*N*/ while ( ( aWordSel.Min().GetNode() == pNode ) && ( aWordSel.Min().GetIndex() < nEnd ) )
+/*N*/ {
+/*N*/ if ( aWordSel.Max().GetIndex() > nEnd )
+/*N*/ aWordSel.Max().GetIndex() = nEnd;
+/*N*/
+/*N*/ String aWord = GetSelected( aWordSel );
+/*N*/ xub_StrLen nIdx = 0;
+/*N*/ xub_StrLen nKashidaPos = STRING_LEN;
+/*N*/ xub_Unicode cCh;
+/*N*/ xub_Unicode cPrevCh = 0;
+/*N*/
+/*N*/ while ( nIdx < aWord.Len() )
+/*N*/ {
+/*N*/ cCh = aWord.GetChar( nIdx );
+/*N*/
+/*N*/ // 1. Priority:
+/*N*/ // after user inserted kashida
+/*N*/ if ( 0x640 == cCh )
+/*N*/ {
+/*?*/ nKashidaPos = aWordSel.Min().GetIndex() + nIdx;
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ // 2. Priority:
+/*N*/ // after a Seen or Sad
+/*N*/ if ( nIdx + 1 < aWord.Len() &&
+/*N*/ ( 0x633 == cCh || 0x635 == cCh ) )
+/*N*/ {
+/*?*/ nKashidaPos = aWordSel.Min().GetIndex() + nIdx;
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ // 3. Priority:
+/*N*/ // before final form of Teh Marbuta, Hah, Dal
+/*N*/ // 4. Priority:
+/*N*/ // before final form of Alef, Lam or Kaf
+/*N*/ if ( nIdx && nIdx + 1 == aWord.Len() &&
+/*N*/ ( 0x629 == cCh || 0x62D == cCh || 0x62F == cCh ||
+/*N*/ 0x627 == cCh || 0x644 == cCh || 0x643 == cCh ) )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 DBG_ASSERT( 0 != cPrevCh, "No previous character" );
+/*N*/ }
+/*N*/
+/*N*/ // 5. Priority:
+/*N*/ // before media Bah
+/*N*/ if ( nIdx && nIdx + 1 < aWord.Len() && 0x628 == cCh )
+/*N*/ {
+/*?*/ DBG_ASSERT( 0 != cPrevCh, "No previous character" );
+/*?*/
+/*?*/ // check if next character is Reh, Yeh or Alef Maksura
+/*?*/ xub_Unicode cNextCh = aWord.GetChar( nIdx + 1 );
+/*?*/
+/*?*/ if ( 0x631 == cNextCh || 0x64A == cNextCh ||
+/*?*/ 0x649 == cNextCh )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 // check if character is connectable to previous character,
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // 6. Priority:
+/*N*/ // other connecting possibilities
+/*N*/ if ( nIdx && nIdx + 1 == aWord.Len() &&
+/*N*/ 0x60C <= cCh && 0x6FE >= cCh )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 DBG_ASSERT( 0 != cPrevCh, "No previous character" );
+/*N*/ }
+/*N*/
+/*N*/ // Do not consider Fathatan, Dammatan, Kasratan, Fatha,
+/*N*/ // Damma, Kasra, Shadda and Sukun when checking if
+/*N*/ // a character can be connected to previous character.
+/*N*/ if ( cCh < 0x64B || cCh > 0x652 )
+/*N*/ cPrevCh = cCh;
+/*N*/
+/*N*/ ++nIdx;
+/*N*/ } // end of current word
+/*N*/
+/*N*/ if ( STRING_LEN != nKashidaPos )
+/*?*/ rArray.Insert( nKashidaPos, rArray.Count() );
+/*N*/
+/*N*/ aWordSel = WordRight( aWordSel.Max(), ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
+/*N*/ aWordSel = SelectWord( aWordSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
+/*N*/ }
+/*N*/ }
+
+/*N*/ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nPos, EditLine* pCurLine )
+/*N*/ {
+/*N*/ DBG_ASSERT( pPortion, "SplitTextPortion: Welche ?" );
+/*N*/
+/*N*/ // Die Portion bei nPos wird geplittet, wenn bei nPos nicht
+/*N*/ // sowieso ein Wechsel ist
+/*N*/ if ( nPos == 0 )
+/*N*/ return 0;
+/*N*/
+/*N*/ sal_uInt16 nSplitPortion;
+/*N*/ sal_uInt16 nTmpPos = 0;
+/*N*/ TextPortion* pTextPortion = 0;
+/*N*/ sal_uInt16 nPortions = pPortion->GetTextPortions().Count();
+/*N*/ for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
+/*N*/ {
+/*N*/ TextPortion* pTP = pPortion->GetTextPortions().GetObject(nSplitPortion);
+/*N*/ nTmpPos += pTP->GetLen();
+/*N*/ if ( nTmpPos >= nPos )
+/*N*/ {
+/*N*/ if ( nTmpPos == nPos ) // dann braucht nichts geteilt werden
+/*N*/ {
+/*N*/ // Skip Portions with ExtraSpace
+/*N*/ // while ( ( (nSplitPortion+1) < nPortions ) && (pPortion->GetTextPortions().GetObject(nSplitPortion+1)->GetKind() == PORTIONKIND_EXTRASPACE ) )
+/*N*/ // nSplitPortion++;
+/*N*/
+/*N*/ return nSplitPortion;
+/*N*/ }
+/*N*/ pTextPortion = pTP;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT( pTextPortion, "Position ausserhalb des Bereichs!" );
+/*N*/ DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: Keine TextPortion!" );
+/*N*/
+/*N*/ sal_uInt16 nOverlapp = nTmpPos - nPos;
+/*N*/ pTextPortion->GetLen() -= nOverlapp;
+/*N*/ TextPortion* pNewPortion = new TextPortion( nOverlapp );
+/*N*/ pPortion->GetTextPortions().Insert( pNewPortion, nSplitPortion+1 );
+/*N*/ // Groessen setzen:
+/*N*/ if ( pCurLine )
+/*N*/ {
+/*N*/ // Kein neues GetTextSize, sondern Werte aus Array verwenden:
+/*N*/ DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+/*N*/ pTextPortion->GetSize().Width() = pCurLine->GetCharPosArray()[ nPos-pCurLine->GetStart()-1 ];
+/*N*/
+/*N*/ if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed )
+/*N*/ {
+/*?*/ // We need the original size from the portion
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 USHORT nTxtPortionStart = pPortion->GetTextPortions().GetStartPos( nSplitPortion );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*?*/ pTextPortion->GetSize().Width() = (-1);
+/*N*/
+/*N*/ return nSplitPortion;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& rStart /* , sal_Bool bCreateBlockPortions */ )
+/*N*/ {
+/*N*/ sal_uInt16 nStartPos = rStart;
+/*N*/ ContentNode* pNode = pParaPortion->GetNode();
+/*N*/ DBG_ASSERT( pNode->Len(), "CreateTextPortions sollte nicht fuer leere Absaetze verwendet werden!" );
+/*N*/
+/*N*/ SortedPositions aPositions;
+/*N*/ aPositions.Insert( (sal_uInt32) 0 );
+/*N*/
+/*N*/ sal_uInt16 nAttr = 0;
+/*N*/ EditCharAttrib* pAttrib = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttrib )
+/*N*/ {
+/*N*/ // Start und Ende in das Array eintragen...
+/*N*/ // Die InsertMethode laesst keine doppelten Werte zu....
+/*N*/ aPositions.Insert( pAttrib->GetStart() );
+/*N*/ aPositions.Insert( pAttrib->GetEnd() );
+/*N*/ nAttr++;
+/*N*/ pAttrib = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/ aPositions.Insert( pNode->Len() );
+/*N*/
+/*N*/ if ( !pParaPortion->aScriptInfos.Count() )
+/*?*/ ((ImpEditEngine*)this)->InitScriptTypes( GetParaPortions().GetPos( pParaPortion ) );
+/*N*/
+/*N*/ const ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
+/*N*/ for ( USHORT nT = 0; nT < rTypes.Count(); nT++ )
+/*N*/ aPositions.Insert( rTypes[nT].nStartPos );
+/*N*/
+/*N*/ const WritingDirectionInfos& rWritingDirections = pParaPortion->aWritingDirectionInfos;
+/*N*/ for ( USHORT nD = 0; nD < rWritingDirections.Count(); nD++ )
+/*?*/ aPositions.Insert( rWritingDirections[nD].nStartPos );
+/*N*/
+/*N*/ if ( mpIMEInfos && mpIMEInfos->nLen && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) )
+/*N*/ {
+/*?*/ 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];
+/*?*/ }
+/*?*/ }
+/*?*/ aPositions.Insert( mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen );
+/*N*/ }
+/*N*/
+/*N*/ // Ab ... loeschen:
+/*N*/ // Leider muss die Anzahl der TextPortions mit aPositions.Count()
+/*N*/ // nicht uebereinstimmen, da evtl. Zeilenumbrueche...
+/*N*/ sal_uInt16 nPortionStart = 0;
+/*N*/ sal_uInt16 nInvPortion = 0;
+/*N*/ sal_uInt16 nP; for ( nP = 0; nP < pParaPortion->GetTextPortions().Count(); nP++ )
+/*N*/ {
+/*N*/ TextPortion* pTmpPortion = pParaPortion->GetTextPortions().GetObject(nP);
+/*N*/ nPortionStart += pTmpPortion->GetLen();
+/*N*/ if ( nPortionStart >= nStartPos )
+/*N*/ {
+/*N*/ nPortionStart -= pTmpPortion->GetLen();
+/*N*/ rStart = nPortionStart;
+/*N*/ nInvPortion = nP;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ DBG_ASSERT( nP < pParaPortion->GetTextPortions().Count() || !pParaPortion->GetTextPortions().Count(), "Nichts zum loeschen: CreateTextPortions" );
+/*N*/ if ( nInvPortion && ( nPortionStart+pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen() > nStartPos ) )
+/*N*/ {
+/*?*/ // 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();
+/*N*/ }
+/*N*/ pParaPortion->GetTextPortions().DeleteFromPortion( nInvPortion );
+/*N*/
+/*N*/ // Eine Portion kann auch durch einen Zeilenumbruch entstanden sein:
+/*N*/ aPositions.Insert( nPortionStart );
+/*N*/
+/*N*/ sal_uInt16 nInvPos;
+/*N*/ sal_Bool bFound = aPositions.Seek_Entry( nPortionStart, &nInvPos );
+/*N*/ DBG_ASSERT( bFound && ( nInvPos < (aPositions.Count()-1) ), "InvPos ?!" );
+/*N*/ for ( sal_uInt16 i = nInvPos+1; i < aPositions.Count(); i++ )
+/*N*/ {
+/*N*/ TextPortion* pNew = new TextPortion( (sal_uInt16)aPositions[i] - (sal_uInt16)aPositions[i-1] );
+/*N*/ pParaPortion->GetTextPortions().Insert( pNew, pParaPortion->GetTextPortions().Count());
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions?!" );
+/*N*/ #ifdef EDITDEBUG
+/*N*/ DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nStartPos, short nNewChars )
+/*N*/ {
+/*N*/ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions!" );
+/*N*/ DBG_ASSERT( nNewChars, "RecalcTextPortion mit Diff == 0" );
+/*N*/
+/*N*/ ContentNode* const pNode = pParaPortion->GetNode();
+/*N*/ if ( nNewChars > 0 )
+/*N*/ {
+/*N*/ // Wenn an nStartPos ein Attribut beginnt/endet, faengt eine neue Portion
+/*N*/ // an, ansonsten wird die Portion an nStartPos erweitert.
+/*N*/
+/*N*/ if ( pNode->GetCharAttribs().HasBoundingAttrib( nStartPos ) || IsScriptChange( EditPaM( pNode, nStartPos ) ) )
+/*N*/ {
+/*N*/ sal_uInt16 nNewPortionPos = 0;
+/*N*/ if ( nStartPos )
+/*?*/ nNewPortionPos = SplitTextPortion( pParaPortion, nStartPos ) + 1;
+/*N*/
+/*N*/ // Eine leere Portion kann hier stehen, wenn der Absatz leer war,
+/*N*/ // oder eine Zeile durch einen harten Zeilenumbruch entstanden ist.
+/*N*/ if ( ( nNewPortionPos < pParaPortion->GetTextPortions().Count() ) &&
+/*N*/ !pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
+/*N*/ {
+/*N*/ DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "Leere Portion war keine TextPortion!" );
+/*N*/ pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() += nNewChars;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ TextPortion* pNewPortion = new TextPortion( nNewChars );
+/*N*/ pParaPortion->GetTextPortions().Insert( pNewPortion, nNewPortionPos );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nPortionStart;
+/*N*/ const sal_uInt16 nTP = pParaPortion->GetTextPortions().
+/*N*/ FindPortion( nStartPos, nPortionStart );
+/*N*/ TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
+/*N*/ DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
+/*N*/ pTP->GetLen() += nNewChars;
+/*N*/ pTP->GetSize().Width() = (-1);
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ // 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;
+/*?*/ }
+/*N*/ }
+/*N*/ #ifdef EDITDEBUG
+/*N*/ DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetTextRanger( TextRanger* pRanger )
+/*N*/ {
+/*N*/ if ( pTextRanger != pRanger )
+/*N*/ {
+/*?*/ 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 );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetVertical( BOOL bVertical )
+/*N*/ {
+/*N*/ if ( IsVertical() != bVertical )
+/*N*/ {
+/*?*/ GetEditDoc().SetVertical( bVertical );
+/*?*/ sal_Bool bUseCharAttribs = ( aStatus.GetControlWord() & EE_CNTRL_USECHARATTRIBS ) ? sal_True : sal_False;
+/*?*/ GetEditDoc().CreateDefFont( bUseCharAttribs );
+/*?*/ if ( IsFormatted() )
+/*?*/ {
+/*?*/ FormatFullDoc();
+/*?*/ UpdateViews( GetActiveView() );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut, sal_uInt16 nIgnoreWhich )
+/*N*/ {
+/*N*/ // Es war mal geplant, SeekCursor( nStartPos, nEndPos, ... ), damit nur
+/*N*/ // ab der StartPosition neu gesucht wird.
+/*N*/ // Problem: Es mussten zwei Listen beruecksichtigt/gefuehrt werden:
+/*N*/ // OrderedByStart,OrderedByEnd.
+/*N*/
+/*N*/ if ( nPos > pNode->Len() )
+/*N*/ nPos = pNode->Len();
+/*N*/
+/*N*/ rFont = pNode->GetCharAttribs().GetDefFont();
+/*N*/
+/*N*/ short nScriptType = GetScriptType( EditPaM( pNode, nPos ) );
+/*N*/ if ( ( nScriptType == i18n::ScriptType::ASIAN ) || ( nScriptType == i18n::ScriptType::COMPLEX ) )
+/*N*/ {
+/*N*/ const SvxFontItem& rFontItem = (const SvxFontItem&)pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) );
+/*N*/ rFont.SetName( rFontItem.GetFamilyName() );
+/*N*/ rFont.SetFamily( rFontItem.GetFamily() );
+/*N*/ rFont.SetPitch( rFontItem.GetPitch() );
+/*N*/ rFont.SetCharSet( rFontItem.GetCharSet() );
+/*N*/ Size aSz( rFont.GetSize() );
+/*N*/ aSz.Height() = ((const SvxFontHeightItem&)pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ) ).GetHeight();
+/*N*/ rFont.SetSize( aSz );
+/*N*/ rFont.SetWeight( ((const SvxWeightItem&)pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ))).GetWeight() );
+/*N*/ rFont.SetItalic( ((const SvxPostureItem&)pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ))).GetPosture() );
+/*N*/ rFont.SetLanguage( ((const SvxLanguageItem&)pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ))).GetLanguage() );
+/*N*/ }
+/*N*/
+/*N*/ sal_uInt16 nRelWidth = ((const SvxCharScaleWidthItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH)).GetValue();
+/*N*/
+/*N*/ if ( pOut )
+/*N*/ {
+/*N*/ const SvxUnderlineItem& rTextLineColor = (const SvxUnderlineItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_UNDERLINE );
+/*N*/ if ( rTextLineColor.GetColor() != COL_TRANSPARENT )
+/*?*/ pOut->SetTextLineColor( rTextLineColor.GetColor() );
+/*N*/ else
+/*N*/ pOut->SetTextLineColor();
+/*N*/ }
+/*N*/
+/*N*/ const SvxLanguageItem* pCJKLanguageItem = NULL;
+/*N*/
+/*N*/ if ( aStatus.UseCharAttribs() )
+/*N*/ {
+/*N*/ const CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
+/*N*/ sal_uInt16 nAttr = 0;
+/*N*/ EditCharAttrib* pAttrib = GetAttrib( rAttribs, nAttr );
+/*N*/ while ( pAttrib && ( pAttrib->GetStart() <= nPos ) )
+/*N*/ {
+/*N*/ // Beim Seeken nicht die Attr beruecksichtigen, die dort beginnen!
+/*N*/ // Leere Attribute werden beruecksichtigt( verwendet), da diese
+/*N*/ // gerade eingestellt wurden.
+/*N*/ // 12.4.95: Doch keine Leeren Attribute verwenden:
+/*N*/ // - Wenn gerade eingestellt und leer => keine Auswirkung auf Font
+/*N*/ // In einem leeren Absatz eingestellte Zeichen werden sofort wirksam.
+/*N*/ if ( ( pAttrib->Which() != nIgnoreWhich ) &&
+/*N*/ ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) )
+/*N*/ || ( !pNode->Len() ) ) )
+/*N*/ {
+/*N*/ DBG_ASSERT( ( pAttrib->Which() >= EE_CHAR_START ) && ( pAttrib->Which() <= EE_FEATURE_END ), "Unglueltiges Attribut in Seek() " );
+/*N*/ if ( IsScriptItemValid( pAttrib->Which(), nScriptType ) )
+/*N*/ {
+/*N*/ pAttrib->SetFont( rFont, pOut );
+/*N*/ // #i1550# hard color attrib should win over text color from field
+/*N*/ if ( pAttrib->Which() == EE_FEATURE_FIELD )
+/*N*/ {
+/*N*/ EditCharAttrib* pColorAttr = pNode->GetCharAttribs().FindAttrib( EE_CHAR_COLOR, nPos );
+/*N*/ if ( pColorAttr )
+/*N*/ pColorAttr->SetFont( rFont, pOut );
+/*N*/ }
+/*N*/ }
+/*N*/ if ( pAttrib->Which() == EE_CHAR_FONTWIDTH )
+/*N*/ nRelWidth = ((const SvxCharScaleWidthItem*)pAttrib->GetItem())->GetValue();
+/*N*/ if ( pAttrib->Which() == EE_CHAR_LANGUAGE_CJK )
+/*N*/ pCJKLanguageItem = (const SvxLanguageItem*) pAttrib->GetItem();
+/*N*/ }
+/*N*/ pAttrib = GetAttrib( rAttribs, ++nAttr );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( !pCJKLanguageItem )
+/*N*/ pCJKLanguageItem = (const SvxLanguageItem*) &pNode->GetContentAttribs().GetItem( EE_CHAR_LANGUAGE_CJK );
+/*N*/
+/*N*/ rFont.SetCJKContextLanguage( pCJKLanguageItem->GetLanguage() );
+/*N*/
+/*N*/ if ( rFont.GetKerning() && IsKernAsianPunctuation() && ( nScriptType == i18n::ScriptType::ASIAN ) )
+/*?*/ rFont.SetKerning( rFont.GetKerning() | KERNING_ASIAN );
+/*N*/
+/*N*/ if ( aStatus.DoNotUseColors() )
+/*N*/ {
+/*?*/ // 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 );
+/*N*/ }
+/*N*/
+/*N*/ if ( aStatus.DoStretch() || ( nRelWidth != 100 ) )
+/*N*/ {
+/*N*/ // Fuer das aktuelle Ausgabegeraet, weil es sonst bei einem
+/*N*/ // Drucker als RefDev auf dem Bildschirm #?!@' aussieht!
+/*N*/ OutputDevice* pDev = pOut ? pOut : GetRefDevice();
+/*N*/ rFont.SetPhysFont( pDev );
+/*N*/ FontMetric aMetric( pDev->GetFontMetric() );
+/*N*/ // Fuer die Hoehe nicht die Metriken nehmen, da das bei
+/*N*/ // Hoch-/Tiefgestellt schief geht.
+/*N*/ Size aRealSz( aMetric.GetSize().Width(), rFont.GetSize().Height() );
+/*N*/ if ( aStatus.DoStretch() )
+/*N*/ {
+/*?*/ 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 );
+/*?*/ }
+/*N*/ }
+/*N*/ if ( nRelWidth != 100 )
+/*N*/ {
+/*N*/ aRealSz.Width() *= nRelWidth;
+/*N*/ aRealSz.Width() /= 100;
+/*N*/ }
+/*N*/ rFont.SetSize( aRealSz );
+/*N*/ // Font wird nicht restauriert...
+/*N*/ }
+/*N*/
+/*N*/ if ( ( ( rFont.GetColor() == COL_AUTO ) || ( IsForceAutoColor() ) ) && pOut )
+/*N*/ {
+/*N*/ if ( IsAutoColorEnabled() && ( pOut->GetOutDevType() != OUTDEV_PRINTER ) )
+/*N*/ {
+/*N*/ // Never use WindowTextColor on the printer
+/*N*/ rFont.SetColor( GetAutoColor() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ if ( ( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() )
+/*?*/ rFont.SetColor( COL_WHITE );
+/*?*/ else
+/*?*/ rFont.SetColor( COL_BLACK );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( mpIMEInfos && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) &&
+/*N*/ ( nPos > mpIMEInfos->aPos.GetIndex() ) && ( nPos <= ( mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen ) ) )
+/*N*/ {
+/*?*/ 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 ) );
+/*?*/ else if ( nAttr & EXTTEXTINPUT_ATTR_HALFTONETEXT )
+/*?*/ rFont.SetColor( Color( COL_LIGHTGRAY ) );
+/*?*/ 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 ) );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics, SvxFont& rFont )
+/*N*/ {
+/*N*/ // Fuer Zeilenhoehe bei Hoch/Tief erstmal ohne Propr!
+/*N*/ sal_uInt16 nPropr = rFont.GetPropr();
+/*N*/ DBG_ASSERT( ( nPropr == 100 ) || rFont.GetEscapement(), "Propr ohne Escape?!" );
+/*N*/ if ( nPropr != 100 )
+/*N*/ {
+/*N*/ rFont.SetPropr( 100 );
+/*N*/ rFont.SetPhysFont( pRefDev );
+/*N*/ }
+/*N*/ FontMetric aMetric( pRefDev->GetFontMetric() );
+/*N*/
+/*N*/ sal_uInt16 nAscent = (sal_uInt16)aMetric.GetAscent();
+/*N*/ sal_uInt16 nDescent = (sal_uInt16)aMetric.GetDescent();
+/*N*/ sal_uInt16 nLeading = ( aMetric.GetIntLeading() > 0 ) ? (sal_uInt16)aMetric.GetIntLeading() : 0;
+/*N*/ // Fonts ohne Leading bereiten Probleme
+/*N*/ if ( ( nLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) )
+/*N*/ {
+/*N*/ // Da schaun wir mal, was fuer eine Leading ich auf dem
+/*N*/ // Bildschirm erhalte
+/*N*/ VirtualDevice* pVDev = GetVirtualDevice( pRefDev->GetMapMode() );
+/*N*/ rFont.SetPhysFont( pVDev );
+/*N*/ aMetric = pVDev->GetFontMetric();
+/*N*/
+/*N*/ // Damit sich die Leading nicht wieder rausrechnet,
+/*N*/ // wenn die ganze Zeile den Font hat, nTmpLeading.
+/*N*/
+/*N*/ // 4/96: Kommt bei HP Laserjet 4V auch nicht hin
+/*N*/ // => Werte komplett vom Bildschirm holen.
+/*N*/ // sal_uInt16 nTmpLeading = (sal_uInt16)aMetric.GetIntLeading();
+/*N*/ // nAscent += nTmpLeading;
+/*N*/ nAscent = (sal_uInt16)aMetric.GetAscent();
+/*N*/ nDescent = (sal_uInt16)aMetric.GetDescent();
+/*N*/ // nLeading = (sal_uInt16)aMetric.GetIntLeading();
+/*N*/ }
+/*N*/ if ( nAscent > rCurMetrics.nMaxAscent )
+/*N*/ rCurMetrics.nMaxAscent = nAscent;
+/*N*/ if ( nDescent > rCurMetrics.nMaxDescent )
+/*N*/ rCurMetrics.nMaxDescent= nDescent;
+/*N*/
+/*N*/ // Sonderbehandlung Hoch/Tief:
+/*N*/ if ( rFont.GetEscapement() )
+/*N*/ {
+/*N*/ // Jetzt unter Beruecksichtigung von Escape/Propr
+/*N*/ // Ascent oder Descent ggf vergroessern
+/*N*/ short nDiff = (short)(rFont.GetSize().Height()*rFont.GetEscapement()/100L);
+/*N*/ if ( rFont.GetEscapement() > 0 )
+/*N*/ {
+/*N*/ nAscent = (sal_uInt16) (((long)nAscent)*nPropr/100 + nDiff);
+/*N*/ if ( nAscent > rCurMetrics.nMaxAscent )
+/*N*/ rCurMetrics.nMaxAscent = nAscent;
+/*N*/ }
+/*N*/ else // muss < 0 sein
+/*N*/ {
+/*N*/ nDescent = (sal_uInt16) (((long)nDescent)*nPropr/100 - nDiff);
+/*N*/ if ( nDescent > rCurMetrics.nMaxDescent )
+/*N*/ rCurMetrics.nMaxDescent= nDescent;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aStartPos, sal_Bool bStripOnly, short nOrientation )
+/*N*/ {
+/*N*/ if ( !GetUpdateMode() && !bStripOnly )
+/*N*/ return;
+/*N*/
+/*N*/ if ( !IsFormatted() )
+/*?*/ FormatDoc();
+/*N*/
+/*N*/ long nFirstVisXPos = - pOutDev->GetMapMode().GetOrigin().X();
+/*N*/ long nFirstVisYPos = - pOutDev->GetMapMode().GetOrigin().Y();
+/*N*/
+/*N*/ EditLine* pLine;
+/*N*/ Point aTmpPos;
+/*N*/ Point aRedLineTmpPos;
+/*N*/ DBG_ASSERT( GetParaPortions().Count(), "Keine ParaPortion?!" );
+/*N*/ SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() );
+/*N*/ Font aOldFont( pOutDev->GetFont() );
+/*N*/ // Bei gedrehtem Text wird aStartPos als TopLeft angesehen, da andere
+/*N*/ // Informationen fehlen, und sowieso das ganze Object ungescrollt
+/*N*/ // dargestellt wird.
+/*N*/ // Das Rechteck ist unendlich gross.
+/*N*/ Point aOrigin( aStartPos );
+/*N*/ double nCos, nSin;
+/*N*/ if ( nOrientation )
+/*N*/ {
+/*?*/ double nRealOrientation = nOrientation*F_PI1800;
+/*?*/ nCos = cos( nRealOrientation );
+/*?*/ nSin = sin( nRealOrientation );
+/*N*/ }
+/*N*/
+/*N*/ // Fuer OnlineSpelling:
+/*N*/ // EditPaM aCursorPos;
+/*N*/ // if( GetStatus().DoOnlineSpelling() && pActiveView )
+/*N*/ // aCurPos = pActiveView->pImpEditView->GetEditSelections().Max();
+/*N*/
+/*N*/ // --------------------------------------------------
+/*N*/ // Ueber alle Absaetze...
+/*N*/ // --------------------------------------------------
+/*N*/ for ( sal_uInt16 n = 0; n < GetParaPortions().Count(); n++ )
+/*N*/ {
+/*N*/ ParaPortion* pPortion = GetParaPortions().GetObject( n );
+/*N*/ DBG_ASSERT( pPortion, "NULL-Pointer in TokenList in Paint" );
+/*N*/ // falls beim Tippen Idle-Formatierung, asynchrones Paint.
+/*N*/ // Unsichtbare Portions koennen ungueltig sein.
+/*N*/ if ( pPortion->IsVisible() && pPortion->IsInvalid() )
+/*N*/ return;
+/*N*/ long nParaHeight = pPortion->GetHeight();
+/*N*/ sal_uInt16 nIndex = 0;
+/*N*/ if ( pPortion->IsVisible() && (
+/*N*/ ( !IsVertical() && ( ( aStartPos.Y() + nParaHeight ) > aClipRec.Top() ) ) ||
+/*N*/ ( IsVertical() && ( ( aStartPos.X() - nParaHeight ) < aClipRec.Right() ) ) ) )
+/*N*/
+/*N*/ {
+/*N*/ // --------------------------------------------------
+/*N*/ // Ueber die Zeilen des Absatzes...
+/*N*/ // --------------------------------------------------
+/*N*/ sal_uInt16 nLines = pPortion->GetLines().Count();
+/*N*/ sal_uInt16 nLastLine = nLines-1;
+/*N*/
+/*N*/ if ( !IsVertical() )
+/*N*/ aStartPos.Y() += pPortion->GetFirstLineOffset();
+/*N*/ else
+/*?*/ aStartPos.X() -= pPortion->GetFirstLineOffset();
+/*N*/
+/*N*/ Point aParaStart( aStartPos );
+/*N*/
+/*N*/ const SvxLineSpacingItem& rLSItem = ((const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ));
+/*N*/ sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+/*N*/ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+/*N*/ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
+/*N*/ {
+/*N*/ pLine = pPortion->GetLines().GetObject(nLine);
+/*N*/ DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in UpdateViews" );
+/*N*/ aTmpPos = aStartPos;
+/*N*/ if ( !IsVertical() )
+/*N*/ {
+/*N*/ aTmpPos.X() += pLine->GetStartPosX();
+/*N*/ aTmpPos.Y() += pLine->GetMaxAscent();
+/*N*/ aStartPos.Y() += pLine->GetHeight();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aTmpPos.Y() += pLine->GetStartPosX();
+/*?*/ aTmpPos.X() -= pLine->GetMaxAscent();
+/*?*/ aStartPos.X() -= pLine->GetHeight();
+/*N*/ }
+/*N*/
+/*N*/ if ( ( !IsVertical() && ( aStartPos.Y() > aClipRec.Top() ) )
+/*N*/ || ( IsVertical() && aStartPos.X() < aClipRec.Right() ) )
+/*N*/ {
+/*N*/ if ( ( nLine == 0 ) && !bStripOnly ) // erste Zeile
+/*N*/ {
+/*N*/ // VERT???
+/*N*/ GetEditEnginePtr()->PaintingFirstLine( n, aParaStart, aTmpPos.Y(), aOrigin, nOrientation, pOutDev );
+/*N*/ }
+/*N*/ // --------------------------------------------------
+/*N*/ // Ueber die Portions der Zeile...
+/*N*/ // --------------------------------------------------
+/*N*/ nIndex = pLine->GetStart();
+/*N*/ for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
+/*N*/ {
+/*N*/ DBG_ASSERT( pPortion->GetTextPortions().Count(), "Zeile ohne Textportion im Paint!" );
+/*N*/ TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( y );
+/*N*/ DBG_ASSERT( pTextPortion, "NULL-Pointer im Portioniterator in UpdateViews" );
+/*N*/
+/*N*/ long nPortionXOffset = GetPortionXOffset( pPortion, pLine, y );
+/*N*/ if ( !IsVertical() )
+/*N*/ {
+/*N*/ aTmpPos.X() = aStartPos.X() + nPortionXOffset;
+/*N*/ if ( aTmpPos.X() > aClipRec.Right() )
+/*N*/ break; // Keine weitere Ausgabe in Zeile noetig
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aTmpPos.Y() = aStartPos.Y() + nPortionXOffset;
+/*?*/ if ( aTmpPos.Y() > aClipRec.Bottom() )
+/*?*/ break; // Keine weitere Ausgabe in Zeile noetig
+/*N*/ }
+/*N*/
+/*N*/ // R2L replaces with obove...
+/*N*/ // New position after processing R2L text...
+/*N*/ // R2L if ( nR2LWidth && !pTextPortion->GetRightToLeft() )
+/*N*/ // R2L {
+/*N*/ // R2L if ( !IsVertical() )
+/*N*/ // R2L aTmpPos.X() += nR2LWidth;
+/*N*/ // R2L else
+/*N*/ // R2L aTmpPos.Y() += nR2LWidth;
+/*N*/ // R2L
+/*N*/ // R2L nR2LWidth = 0;
+/*N*/ // R2L }
+/*N*/
+/*N*/ switch ( pTextPortion->GetKind() )
+/*N*/ {
+/*N*/ case PORTIONKIND_TEXT:
+/*N*/ case PORTIONKIND_FIELD:
+/*N*/ case PORTIONKIND_HYPHENATOR:
+/*N*/ {
+/*N*/ SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev );
+/*N*/
+/*N*/ BOOL bDrawFrame = FALSE;
+/*N*/
+/*N*/ if ( ( pTextPortion->GetKind() == PORTIONKIND_FIELD ) && !aTmpFont.IsTransparent() &&
+/*N*/ ( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() &&
+/*N*/ ( IsAutoColorEnabled() && ( pOutDev->GetOutDevType() != OUTDEV_PRINTER ) ) )
+/*N*/ {
+/*?*/ aTmpFont.SetTransparent( TRUE );
+/*?*/ pOutDev->SetFillColor();
+/*?*/ pOutDev->SetLineColor( GetAutoColor() );
+/*?*/ bDrawFrame = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ if ( pTextPortion->GetKind() == PORTIONKIND_HYPHENATOR )
+/*N*/ {
+/*N*/ aTmpFont.SetFillColor( COL_LIGHTGRAY );
+/*N*/ aTmpFont.SetTransparent( sal_False );
+/*N*/ }
+/*N*/ if ( pTextPortion->GetRightToLeft() )
+/*N*/ {
+/*N*/ aTmpFont.SetFillColor( COL_LIGHTGRAY );
+/*N*/ aTmpFont.SetTransparent( sal_False );
+/*N*/ }
+/*N*/ else if ( GetScriptType( EditPaM( pPortion->GetNode(), nIndex+1 ) ) == i18n::ScriptType::COMPLEX )
+/*N*/ {
+/*N*/ aTmpFont.SetFillColor( COL_LIGHTCYAN );
+/*N*/ aTmpFont.SetTransparent( sal_False );
+/*N*/ }
+/*N*/ #endif
+/*N*/ aTmpFont.SetPhysFont( pOutDev );
+/*N*/
+/*N*/ ULONG nOldLayoutMode = pOutDev->GetLayoutMode();
+/*N*/ ImplInitLayoutMode( pOutDev, n, nIndex );
+/*N*/
+/*N*/ XubString aText;
+/*N*/ USHORT nTextStart = 0;
+/*N*/ USHORT nTextLen = 0;
+/*N*/ const sal_Int32* pDXArray = 0;
+/*N*/ sal_Int32* pTmpDXArray = 0;
+/*N*/
+/*N*/ if ( pTextPortion->GetKind() == PORTIONKIND_TEXT )
+/*N*/ {
+/*N*/ aText = *pPortion->GetNode();
+/*N*/ nTextStart = nIndex;
+/*N*/ nTextLen = pTextPortion->GetLen();
+/*N*/ pDXArray = pLine->GetCharPosArray().GetData()+( nIndex-pLine->GetStart() );
+/*N*/ }
+/*N*/ else if ( pTextPortion->GetKind() == PORTIONKIND_FIELD )
+/*N*/ {
+/*?*/ 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();
+/*?*/ nTextStart = 0;
+/*?*/ nTextLen = aText.Len();
+/*?*/
+/*?*/ pTmpDXArray = new sal_Int32[ 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 );
+/*?*/
+/*?*/ // add a meta file comment if we record to a metafile
+/*?*/ GDIMetaFile* pMtf = pOutDev->GetConnectMetaFile();
+/*?*/ if( pMtf )
+/*?*/ {
+/*?*/ SvxFieldItem* pFieldItem = PTR_CAST( SvxFieldItem, pAttr->GetItem() );
+/*?*/
+/*?*/ if( pFieldItem )
+/*?*/ {
+/*?*/ const SvxFieldData* pFieldData = pFieldItem->GetField();
+/*?*/ if( pFieldData )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");}//STRIP001 pMtf->AddAction( pFieldData->createBeginComment() );
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ }
+/*N*/ else if ( pTextPortion->GetKind() == PORTIONKIND_HYPHENATOR )
+/*N*/ {
+/*N*/ if ( pTextPortion->GetExtraValue() )
+/*N*/ aText = pTextPortion->GetExtraValue();
+/*N*/ aText += CH_HYPH;
+/*N*/ nTextStart = 0;
+/*N*/ nTextLen = aText.Len();
+/*N*/ }
+/*N*/
+/*N*/ long nTxtWidth = pTextPortion->GetSize().Width();
+/*N*/
+/*N*/ Point aOutPos( aTmpPos );
+/*N*/ aRedLineTmpPos = aTmpPos;
+/*N*/ //L2R if ( pTextPortion->GetRightToLeft() )
+/*N*/ //L2R {
+/*N*/ //L2R sal_uInt16 nNextPortion = y+1;
+/*N*/ //L2R while ( nNextPortion <= pLine->GetEndPortion() )
+/*N*/ //L2R {
+/*N*/ //L2R TextPortion* pNextTextPortion = pPortion->GetTextPortions().GetObject( nNextPortion );
+/*N*/ //L2R if ( pNextTextPortion->GetRightToLeft() )
+/*N*/ //L2R {
+/*N*/ //L2R if ( !IsVertical() )
+/*N*/ //L2R aOutPos.X() += pNextTextPortion->GetSize().Width();
+/*N*/ //L2R else
+/*N*/ //L2R aOutPos.Y() += pNextTextPortion->GetSize().Width();
+/*N*/ //L2R }
+/*N*/ //L2R else
+/*N*/ //L2R break;
+/*N*/ //L2R nNextPortion++;
+/*N*/ //L2R }
+/*N*/ //L2R }
+/*N*/ if ( bStripOnly )
+/*N*/ {
+/*N*/ // VERT???
+/*N*/ GetEditEnginePtr()->DrawingText( aOutPos, aText, nTextStart, nTextLen, pDXArray, aTmpFont, n, nIndex, pTextPortion->GetRightToLeft() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ short nEsc = aTmpFont.GetEscapement();
+/*N*/ if ( nOrientation )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 // Bei Hoch/Tief selbst Hand anlegen:
+/*N*/ }
+/*N*/ // nur ausgeben, was im sichtbaren Bereich beginnt:
+/*N*/ // Wichtig, weil Bug bei einigen Grafikkarten bei transparentem Font, Ausgabe bei neg.
+/*N*/ if ( nOrientation || ( !IsVertical() && ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) )
+/*N*/ || ( IsVertical() && ( ( aTmpPos.Y() + nTxtWidth ) >= nFirstVisYPos ) ) )
+/*N*/ {
+/*N*/ if ( nEsc && ( ( aTmpFont.GetUnderline() != UNDERLINE_NONE ) ) )
+/*N*/ {
+/*?*/ // 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 )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 Size aSz = aTmpFont.GetPhysTxtSize( pOutDev, aText, nTextStart, nTextLen );
+/*?*/ }
+/*N*/ }
+/*N*/ Point aRealOutPos( aOutPos );
+/*N*/ if ( ( pTextPortion->GetKind() == PORTIONKIND_TEXT )
+/*N*/ && pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed
+/*N*/ && pTextPortion->GetExtraInfos()->bFirstCharIsRightPunktuation )
+/*N*/ {
+/*?*/ aRealOutPos.X() += pTextPortion->GetExtraInfos()->nPortionOffsetX;
+/*N*/ }
+/*N*/
+/*N*/ aTmpFont.QuickDrawText( pOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray );
+/*N*/ if ( bDrawFrame )
+/*N*/ {
+/*?*/ Point aTopLeft( aTmpPos );
+/*?*/ aTopLeft.Y() -= pLine->GetMaxAscent();
+/*?*/ if ( nOrientation )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 aTopLeft = lcl_ImplCalcRotatedPos( aTopLeft, aOrigin, nSin, nCos );
+/*?*/ Rectangle aRect( aTopLeft, pTextPortion->GetSize() );
+/*?*/ pOutDev->DrawRect( aRect );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ pOutDev->SetLayoutMode( nOldLayoutMode );
+/*N*/
+/*N*/ if ( pTmpDXArray )
+/*?*/ delete[] pTmpDXArray;
+/*N*/
+/*N*/ // R2L if ( !pTextPortion->GetRightToLeft() )
+/*N*/ // R2L {
+/*N*/ // R2L if ( !IsVertical() )
+/*N*/ // R2L aTmpPos.X() += nTxtWidth;
+/*N*/ // R2L else
+/*N*/ // R2L aTmpPos.Y() += nTxtWidth;
+/*N*/ // R2L }
+/*N*/ // R2L else
+/*N*/ // R2L {
+/*N*/ // R2L nR2LWidth += nTxtWidth;
+/*N*/ // R2L }
+/*N*/
+/*N*/ if ( pTextPortion->GetKind() == PORTIONKIND_FIELD )
+/*N*/ {
+/*?*/ EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature( nIndex );
+/*?*/ DBG_ASSERT( pAttr, "Feld nicht gefunden" );
+/*?*/ DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Feld vom falschen Typ!" );
+/*?*/
+/*?*/ // add a meta file comment if we record to a metafile
+/*?*/ GDIMetaFile* pMtf = pOutDev->GetConnectMetaFile();
+/*?*/ if( pMtf )
+/*?*/ {
+/*?*/ SvxFieldItem* pFieldItem = PTR_CAST( SvxFieldItem, pAttr->GetItem() );
+/*?*/
+/*?*/ if( pFieldItem )
+/*?*/ {
+/*?*/ const SvxFieldData* pFieldData = pFieldItem->GetField();
+/*?*/ if( pFieldData )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");}//STRIP001 pMtf->AddAction( pFieldData->createEndComment() );
+/*?*/ }
+/*?*/ }
+/*?*/
+/*N*/ }
+/*N*/
+/*N*/ }
+/*N*/ break;
+/*N*/ // case PORTIONKIND_EXTRASPACE:
+/*N*/ case PORTIONKIND_TAB:
+/*N*/ {
+/*?*/ if ( pTextPortion->GetExtraValue() && ( pTextPortion->GetExtraValue() != ' ' ) )
+/*?*/ {
+/*?*/ SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev );
+/*?*/ 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( (USHORT)nChars, pTextPortion->GetExtraValue() );
+/*?*/ pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText );
+/*?*/ }
+/*?*/ // R2L if ( !IsVertical() )
+/*?*/ // R2L aTmpPos.X() += pTextPortion->GetSize().Width();
+/*?*/ // R2L else
+/*?*/ // R2L aTmpPos.Y() += pTextPortion->GetSize().Width();
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ // R2L if ( !IsVertical() && ( aTmpPos.X() > aClipRec.Right() ) )
+/*N*/ // R2L break; // Keine weitere Ausgabe in Zeile noetig
+/*N*/ // R2L else if ( IsVertical() && ( aTmpPos.Y() > aClipRec.Bottom() ) )
+/*N*/ // R2L break; // Keine weitere Ausgabe in Zeile noetig
+/*N*/ nIndex += pTextPortion->GetLen();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( ( nLine != nLastLine ) && !aStatus.IsOutliner() )
+/*N*/ {
+/*?*/ if ( !IsVertical() )
+/*?*/ aStartPos.Y() += nSBL;
+/*?*/ else
+/*?*/ aStartPos.X() -= nSBL;
+/*N*/ }
+/*N*/
+/*N*/ // keine sichtbaren Aktionen mehr?
+/*N*/ if ( !IsVertical() && ( aStartPos.Y() >= aClipRec.Bottom() ) )
+/*N*/ break;
+/*N*/ else if ( IsVertical() && ( aStartPos.X() <= aClipRec.Left() ) )
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if ( !aStatus.IsOutliner() )
+/*N*/ {
+/*N*/ const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+/*N*/ long nUL = GetYValue( rULItem.GetLower() );
+/*N*/ if ( !IsVertical() )
+/*N*/ aStartPos.Y() += nUL;
+/*N*/ else
+/*N*/ aStartPos.X() -= nUL;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ if ( !IsVertical() )
+/*?*/ aStartPos.Y() += nParaHeight;
+/*?*/ else
+/*?*/ aStartPos.X() -= nParaHeight;
+/*N*/ }
+/*N*/
+/*N*/ // keine sichtbaren Aktionen mehr?
+/*N*/ if ( !IsVertical() && ( aStartPos.Y() > aClipRec.Bottom() ) )
+/*N*/ break;
+/*N*/ if ( IsVertical() && ( aStartPos.X() < aClipRec.Left() ) )
+/*N*/ break;
+/*N*/ }
+/*N*/ if ( aStatus.DoRestoreFont() )
+/*?*/ pOutDev->SetFont( aOldFont );
+/*N*/ }
+
+/*N*/ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool bUseVirtDev )
+/*N*/ {
+/*N*/ DBG_ASSERT( pView, "Keine View - Kein Paint!" );
+/*N*/ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+/*N*/
+/*N*/ if ( !GetUpdateMode() || IsInUndo() )
+/*N*/ return;
+/*N*/
+/*N*/ // Schnittmenge aus Paintbereich und OutputArea.
+/*N*/ Rectangle aClipRec( pView->GetOutputArea() );
+/*N*/ aClipRec.Intersection( rRec );
+/*N*/
+/*N*/ Window* pOutWin = pView->GetWindow();
+/*N*/
+/*N*/ if ( bUseVirtDev )
+/*N*/ {
+/*N*/ Rectangle aClipRecPixel( pOutWin->LogicToPixel( aClipRec ) );
+/*N*/ if ( !IsVertical() )
+/*N*/ {
+/*N*/ // etwas mehr, falls abgerundet!
+/*N*/ aClipRecPixel.Right() += 1;
+/*N*/ aClipRecPixel.Bottom() += 1;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aClipRecPixel.Left() -= 1;
+/*?*/ aClipRecPixel.Bottom() += 1;
+/*N*/ }
+/*N*/
+/*N*/ // Wenn aClipRecPixel > XXXX, dann invalidieren ?!
+/*N*/
+/*N*/ VirtualDevice* pVDev = GetVirtualDevice( pOutWin->GetMapMode() );
+/*N*/ pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() );
+/*N*/
+/*N*/ pVDev->SetBackground( pView->GetBackgroundColor() );
+/*N*/
+/*N*/ sal_Bool bVDevValid = sal_True;
+/*N*/ Size aOutSz( pVDev->GetOutputSizePixel() );
+/*N*/ if ( ( aOutSz.Width() < aClipRecPixel.GetWidth() ) ||
+/*N*/ ( aOutSz.Height() < aClipRecPixel.GetHeight() ) )
+/*N*/ {
+/*N*/ bVDevValid = pVDev->SetOutputSizePixel( aClipRecPixel.GetSize() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Das VirtDev kann bei einem Resize sehr gross werden =>
+/*N*/ // irgendwann mal kleiner machen!
+/*N*/ if ( ( aOutSz.Height() > ( aClipRecPixel.GetHeight() + RESDIFF ) ) ||
+/*N*/ ( aOutSz.Width() > ( aClipRecPixel.GetWidth() + RESDIFF ) ) )
+/*N*/ {
+/*?*/ bVDevValid = pVDev->SetOutputSizePixel( aClipRecPixel.GetSize() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pVDev->Erase();
+/*N*/ }
+/*N*/ }
+/*N*/ DBG_ASSERT( bVDevValid, "VDef konnte nicht vergroessert werden!" );
+/*N*/ if ( !bVDevValid )
+/*N*/ {
+/*?*/ Paint( pView, rRec, sal_False /* ohne VDev */ );
+/*?*/ return;
+/*N*/ }
+/*N*/
+/*N*/ // PaintRect fuer VDev nicht mit alignter Groesse,
+/*N*/ // da sonst die Zeile darunter auch ausgegeben werden muss:
+/*N*/ Rectangle aTmpRec( Point( 0, 0 ), aClipRec.GetSize() );
+/*N*/
+/*N*/ aClipRec = pOutWin->PixelToLogic( aClipRecPixel );
+/*N*/ Point aStartPos;
+/*N*/ if ( !IsVertical() )
+/*N*/ {
+/*N*/ aStartPos = aClipRec.TopLeft();
+/*N*/ aStartPos = pView->GetDocPos( aStartPos );
+/*N*/ aStartPos.X() *= (-1);
+/*N*/ aStartPos.Y() *= (-1);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aStartPos = aClipRec.TopRight();
+/*?*/ Point aDocPos( pView->GetDocPos( aStartPos ) );
+/*?*/ aStartPos.X() = aClipRec.GetSize().Width() + aDocPos.Y();
+/*?*/ aStartPos.Y() = -aDocPos.X();
+/*N*/ }
+/*N*/
+/*N*/ Paint( pVDev, aTmpRec, aStartPos );
+/*N*/
+/*N*/ sal_Bool bClipRegion;
+/*N*/ Region aOldRegion;
+/*N*/ MapMode aOldMapMode;
+/*N*/ if ( GetTextRanger() )
+/*N*/ {
+/*?*/ // Some problems here with push/pop, why?!
+/*?*/ // pOutWin->Push( PUSH_CLIPREGION|PUSH_MAPMODE );
+/*?*/ 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( GetTextRanger()->GetPolyPolygon() ) );
+/*N*/ }
+/*N*/
+/*N*/ pOutWin->DrawOutDev( aClipRec.TopLeft(), aClipRec.GetSize(),
+/*N*/ Point(0,0), aClipRec.GetSize(), *pVDev );
+/*N*/
+/*N*/ if ( GetTextRanger() )
+/*N*/ {
+/*?*/ // pOutWin->Pop();
+/*?*/ if ( bClipRegion )
+/*?*/ pOutWin->SetClipRegion( aOldRegion );
+/*?*/ else
+/*?*/ pOutWin->SetClipRegion();
+/*?*/ pOutWin->SetMapMode( aOldMapMode );
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ pView->DrawSelection();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ Point aStartPos;
+/*?*/ if ( !IsVertical() )
+/*?*/ {
+/*?*/ aStartPos = pView->GetOutputArea().TopLeft();
+/*?*/ aStartPos.X() -= pView->GetVisDocLeft();
+/*?*/ aStartPos.Y() -= pView->GetVisDocTop();
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ aStartPos = pView->GetOutputArea().TopRight();
+/*?*/ aStartPos.X() += pView->GetVisDocTop();
+/*?*/ aStartPos.Y() -= pView->GetVisDocLeft();
+/*?*/ }
+/*?*/
+/*?*/ // 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 ( !IsVertical() && ( 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();
+/*N*/ }
+/*N*/
+/*N*/ }
+
+
+
+
+/*N*/ void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bForceUpdate )
+/*N*/ {
+/*N*/ sal_Bool bChanged = ( GetUpdateMode() != bUp );
+/*N*/
+/*N*/ // Beim Umschalten von sal_True auf sal_False waren alle Selektionen sichtbar,
+/*N*/ // => Wegmalen
+/*N*/ // Umgekehrt waren alle unsichtbar => malen
+/*N*/
+/*N*/ // DrawAllSelections(); sieht im Outliner schlecht aus !
+/*N*/ // EditView* pView = aEditViewList.First();
+/*N*/ // while ( pView )
+/*N*/ // {
+/*N*/ // DBG_CHKOBJ( pView, EditView, 0 );
+/*N*/ // pView->pImpEditView->DrawSelection();
+/*N*/ // pView = aEditViewList.Next();
+/*N*/ // }
+/*N*/
+/*N*/ // Wenn !bFormatted, also z.B. nach SetText, braucht bei UpdateMode sal_True
+/*N*/ // nicht sofort formatiert werden, weil warscheinlich noch Text kommt.
+/*N*/ // Spaetestens bei einem Paint / CalcTextWidth wird formatiert.
+/*N*/
+/*N*/ bUpdate = bUp;
+/*N*/ if ( bUpdate && ( bChanged || bForceUpdate ) )
+/*N*/ FormatAndUpdate( pCurView );
+/*N*/ }
+
+/*N*/ EditPaM ImpEditEngine::InsertParagraph( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ EditPaM aPaM;
+/*N*/ if ( nPara != 0 )
+/*N*/ {
+/*N*/ ContentNode* pNode = GetEditDoc().SaveGetObject( nPara-1 );
+/*N*/ if ( !pNode )
+/*?*/ pNode = GetEditDoc().SaveGetObject( GetEditDoc().Count() - 1 );
+/*N*/ DBG_ASSERT( pNode, "Kein einziger Absatz in InsertParagraph ?" );
+/*N*/ aPaM = EditPaM( pNode, pNode->Len() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ ContentNode* pNode = GetEditDoc().SaveGetObject( 0 );
+/*?*/ aPaM = EditPaM( pNode, 0 );
+/*N*/ }
+/*N*/
+/*N*/ return ImpInsertParaBreak( aPaM );
+/*N*/ }
+
+/*N*/ EditSelection* ImpEditEngine::SelectParagraph( sal_uInt16 nPara )
+/*N*/ {
+/*N*/ EditSelection* pSel = 0;
+/*N*/ ContentNode* pNode = GetEditDoc().SaveGetObject( nPara );
+/*N*/ DBG_ASSERTWARNING( pNode, "Absatz existiert nicht: SelectParagraph" );
+/*N*/ if ( pNode )
+/*N*/ pSel = new EditSelection( EditPaM( pNode, 0 ), EditPaM( pNode, pNode->Len() ) );
+/*N*/
+/*N*/ return pSel;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::FormatAndUpdate( EditView* pCurView )
+/*N*/ {
+/*N*/ if ( bDowning )
+/*N*/ return ;
+/*N*/
+/*N*/ {
+/*N*/ FormatDoc();
+/*N*/ UpdateViews( pCurView );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY )
+/*N*/ {
+/*N*/ if ( !IsVertical() )
+/*N*/ {
+/*N*/ nStretchX = nX;
+/*N*/ nStretchY = nY;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nStretchX = nY;
+/*N*/ nStretchY = nX;
+/*N*/ }
+/*N*/
+/*N*/ if ( aStatus.DoStretch() )
+/*N*/ {
+/*?*/ FormatFullDoc();
+/*?*/ UpdateViews( GetActiveView() );
+/*N*/ }
+/*N*/ }
+
+/*N*/ const SvxLRSpaceItem& ImpEditEngine::GetLRSpaceItem( ContentNode* pNode )
+/*N*/ {
+/*N*/ return (const SvxLRSpaceItem&)pNode->GetContentAttribs().GetItem( aStatus.IsOutliner() ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
+/*N*/ }
+
+/*N*/ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, USHORT nPara, USHORT nIndex )
+/*N*/ {
+/*N*/ BOOL bCTL = FALSE;
+/*N*/ BYTE bR2L = FALSE;
+/*N*/ if ( nIndex == 0xFFFF )
+/*N*/ {
+/*N*/ bCTL = HasScriptType( nPara, i18n::ScriptType::COMPLEX );
+/*N*/ bR2L = IsRightToLeft( nPara );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ ContentNode* pNode = GetEditDoc().SaveGetObject( nPara );
+/*N*/ short nScriptType = GetScriptType( EditPaM( pNode, nIndex+1 ) );
+/*N*/ bCTL = nScriptType == i18n::ScriptType::COMPLEX;
+/*N*/ bR2L = GetRightToLeft( nPara, nIndex );
+/*N*/ }
+/*N*/
+/*N*/ ULONG nLayoutMode = pOutDev->GetLayoutMode();
+/*N*/
+/*N*/ // We always use the left postion for DrawText()
+/*N*/ nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL);
+/*N*/
+/*N*/ if ( !bCTL && !bR2L)
+/*N*/ {
+/*?*/ // No CTL/Bidi checking neccessary
+/*?*/ nLayoutMode |= ( TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // CTL/Bidi checking neccessary
+/*N*/ // Don't use BIDI_STRONG, VCL must do some checks.
+/*N*/ nLayoutMode &= ~( TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG );
+/*N*/
+/*N*/ if ( bR2L )
+/*N*/ nLayoutMode |= TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_TEXTORIGIN_LEFT;
+/*N*/ }
+/*N*/
+/*N*/ pOutDev->SetLayoutMode( nLayoutMode );
+/*N*/
+/*N*/ }
+
+/*N*/ Reference < i18n::XBreakIterator > ImpEditEngine::ImplGetBreakIterator()
+/*N*/ {
+/*N*/ if ( !xBI.is() )
+/*N*/ {
+/*N*/ Reference< lang::XMultiServiceFactory > xMSF = ::legacy_binfilters::getLegacyProcessServiceFactory();
+/*N*/ Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) );
+/*N*/ if ( xI.is() )
+/*N*/ {
+/*N*/ Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XBreakIterator >*)0) );
+/*N*/ x >>= xBI;
+/*N*/ }
+/*N*/ }
+/*N*/ return xBI;
+/*N*/ }
+
+/*N*/ Color ImpEditEngine::GetAutoColor() const
+/*N*/ {
+/*N*/ Color aColor = const_cast<ImpEditEngine*>(this)->GetColorConfig().GetColorValue( FONTCOLOR ).nColor;
+/*N*/
+/*N*/ if ( GetBackgroundColor() != COL_AUTO )
+/*N*/ {
+/*?*/ if ( GetBackgroundColor().IsDark() && aColor.IsDark() )
+/*?*/ aColor = COL_WHITE;
+/*?*/ else if ( GetBackgroundColor().IsBright() && aColor.IsBright() )
+/*?*/ aColor = COL_BLACK;
+/*N*/ }
+/*N*/
+/*N*/ return aColor;
+/*N*/ }
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit4.cxx b/binfilter/bf_svx/source/editeng/svx_impedit4.cxx
new file mode 100644
index 000000000000..b5a0ad3903b3
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_impedit4.cxx
@@ -0,0 +1,533 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <vcl/svapp.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+
+#include "lrspitem.hxx"
+#include "langitem.hxx"
+
+#include <rtl/tencinfo.h>
+
+#include <unolingu.hxx>
+
+namespace binfilter {
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::linguistic2;
+
+
+
+
+
+
+
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+
+
+
+/*N*/ EditTextObject* ImpEditEngine::CreateTextObject()
+/*N*/ {
+/*N*/ EditSelection aCompleteSelection;
+/*N*/ aCompleteSelection.Min() = aEditDoc.GetStartPaM();
+/*N*/ aCompleteSelection.Max() = aEditDoc.GetEndPaM();
+/*N*/
+/*N*/ return CreateTextObject( aCompleteSelection );
+/*N*/ }
+
+/*N*/ EditTextObject* ImpEditEngine::CreateTextObject( EditSelection aSel )
+/*N*/ {
+/*N*/ return CreateBinTextObject( aSel, GetEditTextObjectPool(), aStatus.AllowBigObjects(), nBigTextObjectStart );
+/*N*/ }
+
+/*N*/ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemPool* pPool, sal_Bool bAllowBigObjects, sal_uInt16 nBigObjectStart ) const
+/*N*/ {
+/*N*/ BinTextObject* pTxtObj = new BinTextObject( pPool );
+/*N*/ pTxtObj->SetVertical( IsVertical() );
+/*N*/ MapUnit eMapUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+/*N*/ pTxtObj->SetMetric( (sal_uInt16) eMapUnit );
+/*N*/ if ( pTxtObj->IsOwnerOfPool() )
+/*N*/ pTxtObj->GetPool()->SetDefaultMetric( (SfxMapUnit) eMapUnit );
+/*N*/
+/*N*/ sal_uInt16 nStartNode, nEndNode;
+/*N*/ sal_uInt32 nTextPortions = 0;
+/*N*/
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+/*N*/ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+/*N*/
+/*N*/ sal_Bool bOnlyFullParagraphs = ( aSel.Min().GetIndex() ||
+/*N*/ ( aSel.Max().GetIndex() < aSel.Max().GetNode()->Len() ) ) ?
+/*N*/ sal_False : sal_True;
+/*N*/
+/*N*/ // Vorlagen werden nicht gespeichert!
+/*N*/ // ( Nur Name und Familie, Vorlage selbst muss in App stehen! )
+/*N*/
+/*N*/ pTxtObj->SetScriptType( GetScriptType( aSel ) );
+/*N*/
+/*N*/ // ueber die Absaetze iterieren...
+/*N*/ sal_uInt16 nNode;
+/*N*/ for ( nNode = nStartNode; nNode <= nEndNode; nNode++ )
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+/*N*/ DBG_ASSERT( pNode, "Node nicht gefunden: Search&Replace" );
+/*N*/
+/*N*/ if ( bOnlyFullParagraphs )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions()[nNode];
+/*N*/ nTextPortions += pParaPortion->GetTextPortions().Count();
+/*N*/ }
+/*N*/
+/*N*/ sal_uInt16 nStartPos = 0;
+/*N*/ sal_uInt16 nEndPos = pNode->Len();
+/*N*/
+/*N*/ sal_Bool bEmptyPara = nEndPos ? sal_False : sal_True;
+/*N*/
+/*N*/ if ( ( nNode == nStartNode ) && !bOnlyFullParagraphs )
+/*?*/ nStartPos = aSel.Min().GetIndex();
+/*N*/ if ( ( nNode == nEndNode ) && !bOnlyFullParagraphs )
+/*?*/ nEndPos = aSel.Max().GetIndex();
+/*N*/
+/*N*/
+/*N*/ ContentInfo* pC = pTxtObj->CreateAndInsertContent();
+/*N*/
+/*N*/ // Die Absatzattribute...
+/*N*/ pC->GetParaAttribs().Set( pNode->GetContentAttribs().GetItems() );
+/*N*/
+/*N*/ // Seit der 5.1 werden im Outliner die LRSpaceItems anders interpretiert.
+/*N*/ // Damit sie in einer 5.0 und aelter richtig sind, muss das Flag
+/*N*/ // richtig gesetzt sein...
+/*N*/ sal_Bool bOutliner = aStatus.IsAnyOutliner();
+/*N*/ for ( sal_uInt16 n = 0; n <=1; n++ )
+/*N*/ {
+/*N*/ sal_uInt16 nItemId = n ? EE_PARA_LRSPACE : EE_PARA_OUTLLRSPACE;
+/*N*/ if ( pC->GetParaAttribs().GetItemState( nItemId ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( nItemId );
+/*N*/ if ( rItem.IsBulletFI() != bOutliner )
+/*N*/ {
+/*N*/ SvxLRSpaceItem aNewItem( rItem );
+/*N*/ aNewItem.SetBulletFI( bOutliner );
+/*N*/ pC->GetParaAttribs().Put( aNewItem );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // Das StyleSheet...
+/*N*/ if ( pNode->GetStyleSheet() )
+/*N*/ {
+/*N*/ pC->GetStyle() = pNode->GetStyleSheet()->GetName();
+/*N*/ pC->GetFamily() = pNode->GetStyleSheet()->GetFamily();
+/*N*/ }
+/*N*/
+/*N*/ // Der Text...
+/*N*/ pC->GetText() = pNode->Copy( nStartPos, nEndPos-nStartPos );
+/*N*/
+/*N*/ // und die Attribute...
+/*N*/ sal_uInt16 nAttr = 0;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttr )
+/*N*/ {
+/*N*/ // In einem leeren Absatz die Attribute behalten!
+/*N*/ if ( bEmptyPara ||
+/*N*/ ( ( pAttr->GetEnd() > nStartPos ) && ( pAttr->GetStart() < nEndPos ) ) )
+/*N*/ {
+/*N*/ XEditAttribute* pX = pTxtObj->CreateAttrib( *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
+/*N*/ // Evtl. korrigieren...
+/*N*/ if ( ( nNode == nStartNode ) && ( nStartPos != 0 ) )
+/*N*/ {
+/*?*/ pX->GetStart() = ( pX->GetStart() > nStartPos ) ? pX->GetStart()-nStartPos : 0;
+/*?*/ pX->GetEnd() -= nStartPos;
+/*N*/
+/*N*/ }
+/*N*/ if ( nNode == nEndNode )
+/*N*/ {
+/*N*/ if ( pX->GetEnd() > (nEndPos-nStartPos) )
+/*?*/ pX->GetEnd() = nEndPos-nStartPos;
+/*N*/ }
+/*N*/ DBG_ASSERT( pX->GetEnd() <= (nEndPos-nStartPos), "CreateBinTextObject: Attribut zu lang!" );
+/*N*/ if ( !pX->GetLen() && !bEmptyPara )
+/*?*/ pTxtObj->DestroyAttrib( pX );
+/*N*/ else
+/*N*/ pC->GetAttribs().Insert( pX, pC->GetAttribs().Count() );
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Bei grossen Textobjekten die PortionInfos merken:
+/*N*/ // Schwelle rauf setzen, wenn Olli die Absaetze nicht mehr zerhackt!
+/*N*/ if ( bAllowBigObjects && bOnlyFullParagraphs && IsFormatted() && GetUpdateMode() && ( nTextPortions >= nBigObjectStart ) )
+/*N*/ {
+/*?*/ 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++ )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditLine* pLine = pParaPortion->GetLines()[n];
+/*?*/ }
+/*?*/ #ifdef DBG_UTIL
+/*?*/ USHORT nTest, nTPLen = 0, nTxtLen = 0;
+/*?*/ for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; )
+/*?*/ nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen();
+/*?*/ for ( nTest = pParaPortion->GetLines().Count(); nTest; )
+/*?*/ nTxtLen += pParaPortion->GetLines().GetObject( --nTest )->GetLen();
+/*?*/ DBG_ASSERT( ( nTPLen == pParaPortion->GetNode()->Len() ) && ( nTxtLen == pParaPortion->GetNode()->Len() ), "CreateBinTextObject: ParaPortion not completely formatted!" );
+/*?*/ #endif
+/*?*/ }
+/*N*/ }
+/*N*/ return pTxtObj;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetText( const EditTextObject& rTextObject )
+/*N*/ {
+/*N*/ // Da Setzen eines TextObject ist nicht Undo-faehig!
+/*N*/ ResetUndoManager();
+/*N*/ sal_Bool bUpdate = GetUpdateMode();
+/*N*/ sal_Bool bUndo = IsUndoEnabled();
+/*N*/
+/*N*/ SetText( XubString() );
+/*N*/ EditPaM aPaM = aEditDoc.GetStartPaM();
+/*N*/
+/*N*/ SetUpdateMode( sal_False );
+/*N*/ EnableUndo( sal_False );
+/*N*/
+/*N*/ InsertText( rTextObject, EditSelection( aPaM, aPaM ) );
+/*N*/ SetVertical( rTextObject.IsVertical() );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "Woher kommt das Undo in SetText ?!" );
+/*N*/ #endif
+/*N*/ SetUpdateMode( bUpdate );
+/*N*/ EnableUndo( bUndo );
+/*N*/ }
+
+/*N*/ EditSelection ImpEditEngine::InsertText( const EditTextObject& rTextObject, EditSelection aSel )
+/*N*/ {
+/*N*/ EnterBlockNotifications();
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/ if ( aSel.HasRange() )
+/*?*/ aSel = ImpDeleteSelection( aSel );
+/*N*/ EditSelection aNewSel = InsertBinTextObject( (BinTextObject&)rTextObject, aSel.Max() );
+/*N*/ LeaveBlockNotifications();
+/*N*/ return aNewSel;
+/*N*/
+/*N*/ // MT 05/00: InsertBinTextObject direkt hier machen...
+/*N*/ }
+
+/*N*/ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, EditPaM aPaM )
+/*N*/ {
+/*N*/ // Optimieren:
+/*N*/ // Kein GetPos undFindParaportion, sondern Index berechnen!
+/*N*/ EditSelection aSel( aPaM, aPaM );
+/*N*/
+/*N*/ sal_Bool bUsePortionInfo = sal_False;
+/*N*/ sal_Bool bFields = sal_False;
+/*N*/ XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo();
+/*N*/
+/*N*/ if ( pPortionInfo && ( (long)pPortionInfo->GetPaperWidth() == aPaperSize.Width() )
+/*N*/ && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() ) )
+/*N*/ {
+/*?*/ if ( ( pPortionInfo->GetRefDevPtr() == (sal_uIntPtr)GetRefDevice() ) ||
+/*?*/ ( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
+/*?*/ ( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
+/*?*/ bUsePortionInfo = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ sal_Bool bConvertItems = sal_False;
+/*N*/ MapUnit eSourceUnit, eDestUnit;
+/*N*/ if ( rTextObject.HasMetric() )
+/*N*/ {
+/*N*/ eSourceUnit = (MapUnit)rTextObject.GetMetric();
+/*N*/ eDestUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+/*N*/ if ( eSourceUnit != eDestUnit )
+/*N*/ bConvertItems = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ sal_uInt16 nContents = rTextObject.GetContents().Count();
+/*N*/ sal_uInt16 nPara = aEditDoc.GetPos( aPaM.GetNode() );
+/*N*/
+/*N*/ for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = rTextObject.GetContents().GetObject( n );
+/*N*/ sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True;
+/*N*/ sal_uInt16 nStartPos = aPaM.GetIndex();
+/*N*/
+/*N*/ aPaM = ImpFastInsertText( aPaM, pC->GetText() );
+/*N*/
+/*N*/ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in FastInsertText" );
+/*N*/ pPortion->MarkInvalid( nStartPos, pC->GetText().Len() );
+/*N*/
+/*N*/ // Zeicheattribute...
+/*N*/ sal_Bool bAllreadyHasAttribs = aPaM.GetNode()->GetCharAttribs().Count() ? sal_True : sal_False;
+/*N*/ sal_uInt16 nNewAttribs = pC->GetAttribs().Count();
+/*N*/ if ( nNewAttribs )
+/*N*/ {
+/*N*/ BOOL bUpdateFields = FALSE;
+/*N*/ for ( sal_uInt16 nAttr = 0; nAttr < nNewAttribs; nAttr++ )
+/*N*/ {
+/*N*/ XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
+/*N*/ // Kann passieren wenn Absaetze >16K entstehen, dann wird einfach umgebrochen.
+/*N*/ if ( pX->GetEnd() <= aPaM.GetNode()->Len() )
+/*N*/ {
+/*N*/ if ( !bAllreadyHasAttribs || pX->IsFeature() )
+/*N*/ {
+/*N*/ // Normale Attribute gehen dann schneller...
+/*N*/ // Features duerfen nicht ueber EditDoc::InsertAttrib
+/*N*/ // eingefuegt werden, sie sind bei FastInsertText schon im TextFluss
+/*N*/ DBG_ASSERT( pX->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut zu gross!" );
+/*N*/ EditCharAttrib* pAttr;
+/*N*/ if ( !bConvertItems )
+/*N*/ pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), *(pX->GetItem()), pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos );
+/*N*/ else
+/*N*/ {
+/*?*/ SfxPoolItem* pNew = pX->GetItem()->Clone();
+/*?*/ ConvertItem( *pNew, eSourceUnit, eDestUnit );
+/*?*/ pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), *pNew, pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos );
+/*?*/ delete pNew;
+/*N*/ }
+/*N*/ DBG_ASSERT( pAttr->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (1)" );
+/*N*/ aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttr );
+/*N*/ if ( pAttr->Which() == EE_FEATURE_FIELD )
+/*N*/ bUpdateFields = TRUE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ 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() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bUpdateFields )
+/*N*/ UpdateFields();
+/*N*/
+/*N*/ // Sonst QuickFormat => Keine Attribute!
+/*N*/ pPortion->MarkSelectionInvalid( nStartPos, pC->GetText().Len() );
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT( CheckOrderedList( aPaM.GetNode()->GetCharAttribs().GetAttribs(), sal_True ), "InsertBinTextObject: Start-Liste verdreht" );
+/*N*/
+/*N*/ sal_Bool bParaAttribs = sal_False;
+/*N*/ if ( bNewContent || ( ( n > 0 ) && ( n < (nContents-1) ) ) )
+/*N*/ {
+/*N*/ bParaAttribs = sal_False;
+/*N*/ // #101512# Don't overwrite level/style from existing paragraph in OutlineView
+/*N*/ // MT 10/2002: Removed because of #103874#, handled in Outliner::EndPasteOrDropHdl now.
+/*N*/ // if ( !aStatus.IsOutliner() || n )
+/*N*/ {
+/*N*/ // nur dann Style und ParaAttribs, wenn neuer Absatz, oder
+/*N*/ // komplett inneliegender...
+/*N*/ bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False;
+/*N*/ if ( GetStyleSheetPool() && pC->GetStyle().Len() )
+/*N*/ {
+/*N*/ SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() );
+/*N*/ DBG_ASSERT( pStyle, "InsertBinTextObject - Style not found!" );
+/*N*/ SetStyleSheet( nPara, pStyle );
+/*N*/ }
+/*N*/ if ( !bConvertItems )
+/*N*/ SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), pC->GetParaAttribs() );
+/*N*/ else
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bNewContent && bUsePortionInfo )
+/*N*/ {
+/*?*/ 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++ )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditLine* pLine = pXP->aLines[m];
+/*?*/ }
+/*?*/ #ifdef DBG_UTIL
+/*?*/ USHORT nTest, nTPLen = 0, nTxtLen = 0;
+/*?*/ for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; )
+/*?*/ nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen();
+/*?*/ for ( nTest = pParaPortion->GetLines().Count(); nTest; )
+/*?*/ nTxtLen += pParaPortion->GetLines().GetObject( --nTest )->GetLen();
+/*?*/ DBG_ASSERT( ( nTPLen == pParaPortion->GetNode()->Len() ) && ( nTxtLen == pParaPortion->GetNode()->Len() ), "InsertBinTextObject: ParaPortion not completely formatted!" );
+/*?*/ #endif
+/*N*/ }
+/*N*/ }
+/*N*/ if ( !bParaAttribs ) // DefFont wird bei FastInsertParagraph nicht berechnet
+/*N*/ {
+/*N*/ aPaM.GetNode()->GetCharAttribs().GetDefFont() = aEditDoc.GetDefFont();
+/*N*/ if ( aStatus.UseCharAttribs() )
+/*N*/ aPaM.GetNode()->CreateDefFont();
+/*N*/ }
+/*N*/
+/*N*/ // Zeilenumbruch, wenn weitere folgen...
+/*N*/ if ( n < ( nContents-1) )
+/*N*/ {
+/*N*/ if ( bNewContent )
+/*N*/ aPaM = ImpFastInsertParagraph( nPara+1 );
+/*N*/ else
+/*?*/ aPaM = ImpInsertParaBreak( aPaM, sal_False );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ aSel.Max() = aPaM;
+/*N*/ return aSel;
+/*N*/ }
+
+/*N*/ LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, USHORT* pEndPos ) const
+/*N*/ {
+/*N*/ short nScriptType = GetScriptType( rPaM, pEndPos ); // pEndPos will be valid now, pointing to ScriptChange or NodeLen
+/*N*/ USHORT nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
+/*N*/ const SvxLanguageItem* pLangItem = &(const SvxLanguageItem&)rPaM.GetNode()->GetContentAttribs().GetItem( nLangId );
+/*N*/ EditCharAttrib* pAttr = rPaM.GetNode()->GetCharAttribs().FindAttrib( nLangId, rPaM.GetIndex() );
+/*N*/ if ( pAttr )
+/*?*/ pLangItem = (const SvxLanguageItem*)pAttr->GetItem();
+/*N*/
+/*N*/ if ( pEndPos && pAttr && ( pAttr->GetEnd() < *pEndPos ) )
+/*?*/ *pEndPos = pAttr->GetEnd();
+/*N*/
+/*N*/ return pLangItem->GetLanguage();
+/*N*/ }
+
+/*N*/ ::com::sun::star::lang::Locale ImpEditEngine::GetLocale( const EditPaM& rPaM ) const
+/*N*/ {
+/*N*/ return SvxCreateLocale( GetLanguage( rPaM ) );
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void ImpEditEngine::SetAsianCompressionMode( USHORT n )
+/*N*/ {
+/*N*/ if ( n != nAsianCompressionMode )
+/*N*/ {
+/*N*/ nAsianCompressionMode = n;
+/*N*/ if ( ImplHasText() )
+/*N*/ {
+/*N*/ FormatFullDoc();
+/*N*/ UpdateViews();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetKernAsianPunctuation( BOOL b )
+/*N*/ {
+/*N*/ if ( b != bKernAsianPunctuation )
+/*N*/ {
+/*NBFF*/ bKernAsianPunctuation = b;
+/*NBFF*/ if ( ImplHasText() )
+/*NBFF*/ {
+/*NBFF*/ FormatFullDoc();
+/*NBFF*/ UpdateViews();
+/*NBFF*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ BOOL ImpEditEngine::ImplHasText() const
+/*N*/ {
+/*N*/ return ( ( GetEditDoc().Count() > 1 ) || GetEditDoc().GetObject(0)->Len() );
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit5.cxx b/binfilter/bf_svx/source/editeng/svx_impedit5.cxx
new file mode 100644
index 000000000000..7fb359d9e175
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_impedit5.cxx
@@ -0,0 +1,566 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+
+
+
+namespace binfilter {
+
+/*N*/ void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
+/*N*/ {
+/*N*/ if ( pStylePool != pSPool )
+/*N*/ {
+/*N*/ // if ( pStylePool )
+/*N*/ // EndListening( *pStylePool, TRUE );
+/*N*/
+/*N*/ pStylePool = pSPool;
+/*N*/
+/*N*/ // if ( pStylePool )
+/*N*/ // StartListening( *pStylePool, TRUE );
+/*N*/ }
+/*N*/ }
+
+/*N*/ SfxStyleSheet* ImpEditEngine::GetStyleSheet( USHORT nPara ) const
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+/*N*/ return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle )
+/*N*/ {
+/*N*/ DBG_ASSERT( GetStyleSheetPool() || !pStyle, "SetStyleSheet: No StyleSheetPool registered!" );
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+/*N*/ SfxStyleSheet* pCurStyle = pNode->GetStyleSheet();
+/*N*/ if ( pStyle != pCurStyle )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
+/*N*/ {
+/*N*/ XubString aPrevStyleName;
+/*N*/ if ( pCurStyle )
+/*N*/ aPrevStyleName = pCurStyle->GetName();
+/*N*/
+/*N*/ XubString aNewStyleName;
+/*N*/ if ( pStyle )
+/*N*/ aNewStyleName = pStyle->GetName();
+/*N*/
+/*N*/ InsertUndo(
+/*N*/ new EditUndoSetStyleSheet( this, aEditDoc.GetPos( pNode ),
+/*N*/ aPrevStyleName, pCurStyle ? pCurStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
+/*N*/ aNewStyleName, pStyle ? pStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
+/*N*/ pNode->GetContentAttribs().GetItems() ) );
+/*N*/ }
+/*N*/ #endif
+/*N*/ if ( pCurStyle )
+/*N*/ EndListening( *pCurStyle, FALSE );
+/*N*/ pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() );
+/*N*/ if ( pStyle )
+/*N*/ StartListening( *pStyle, FALSE );
+/*N*/ ParaAttribsChanged( pNode );
+/*N*/ }
+/*N*/ FormatAndUpdate();
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void ImpEditEngine::UndoActionStart( USHORT nId )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() )
+/*N*/ {
+/*N*/ GetUndoManager().EnterListAction( GetEditEnginePtr()->GetUndoComment( nId ), XubString(), nId );
+/*N*/ DBG_ASSERT( !pUndoMarkSelection, "UndoAction SelectionMarker?" );
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ImpEditEngine::UndoActionEnd( USHORT nId )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() )
+/*N*/ {
+/*N*/ GetUndoManager().LeaveListAction();
+/*N*/ delete pUndoMarkSelection;
+/*N*/ pUndoMarkSelection = NULL;
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" );
+/*N*/ if ( pUndoMarkSelection )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditUndoMarkSelection* pU = new EditUndoMarkSelection( this, *pUndoMarkSelection );
+/*N*/ }
+/*N*/ GetUndoManager().AddUndoAction( pUndo, bTryMerge );
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ImpEditEngine::ResetUndoManager()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( HasUndoManager() )
+/*N*/ GetUndoManager().Clear();
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void ImpEditEngine::EnableUndo( BOOL bEnable )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ // Beim Umschalten des Modus Liste loeschen:
+/*N*/ if ( bEnable != IsUndoEnabled() )
+/*N*/ ResetUndoManager();
+/*N*/
+/*N*/ bUndoEnabled = bEnable;
+/*N*/ #endif
+/*N*/ }
+
+
+
+
+/*N*/ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, BOOL bOnlyHardAttrib )
+/*N*/ {
+/*N*/ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+/*N*/
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/
+/*N*/ #if OSL_DEBUG_LEVEL > 1
+/*N*/ // if ( ( aSel.Min().GetNode() == aSel.Max().GetNode() ) && ( bOnlyHardAttrib == EditEngineAttribs_All ) )
+/*N*/ // return GetAttribs( aEditDoc.GetPos( aSel.Min().GetNode() ), aSel.Min().GetIndex(), aSel.Max().GetIndex(), GETATTRIBS_ALL );
+/*N*/ #endif
+/*N*/
+/*N*/
+/*N*/ SfxItemSet aCurSet( GetEmptyItemSet() );
+/*N*/
+/*N*/ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+/*N*/ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+/*N*/
+/*N*/ // ueber die Absaetze iterieren...
+/*N*/ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.GetObject( nNode );
+/*N*/ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetAttrib" );
+/*N*/
+/*N*/ xub_StrLen nStartPos = 0;
+/*N*/ xub_StrLen nEndPos = pNode->Len();
+/*N*/ if ( nNode == nStartNode )
+/*N*/ nStartPos = aSel.Min().GetIndex();
+/*N*/ if ( nNode == nEndNode ) // kann auch == nStart sein!
+/*N*/ nEndPos = aSel.Max().GetIndex();
+/*N*/
+/*N*/ // Problem: Vorlagen....
+/*N*/ // => Andersrum:
+/*N*/ // 1) Harte Zeichenattribute, wie gehabt...
+/*N*/ // 2) Nur wenn OFF, Style and Absatzattr. pruefen...
+/*N*/
+/*N*/ // Erst die ganz harte Formatierung...
+/*N*/ aEditDoc.FindAttribs( pNode, nStartPos, nEndPos, aCurSet );
+/*N*/
+/*N*/ if( bOnlyHardAttrib != EditEngineAttribs_OnlyHard )
+/*N*/ {
+/*N*/ // Und dann Absatzformatierung und Vorlage...
+/*N*/ // SfxStyleSheet* pStyle = pNode->GetStyleSheet();
+/*N*/ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+/*N*/ {
+/*N*/ if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+/*N*/ {
+/*N*/ if ( bOnlyHardAttrib == EditEngineAttribs_All )
+/*N*/ {
+/*N*/ const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
+/*N*/ aCurSet.Put( rItem );
+/*N*/ }
+/*N*/ else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ {
+/*?*/ const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nWhich );
+/*?*/ aCurSet.Put( rItem );
+/*N*/ }
+/*N*/ }
+/*N*/ else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SfxPoolItem* pItem = NULL;
+/*N*/ if ( bOnlyHardAttrib == EditEngineAttribs_All )
+/*N*/ {
+/*N*/ pItem = &pNode->GetContentAttribs().GetItem( nWhich );
+/*N*/ }
+/*N*/ else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ {
+/*?*/ pItem = &pNode->GetContentAttribs().GetItems().Get( nWhich );
+/*N*/ }
+/*N*/ // pItem can only be NULL when bOnlyHardAttrib...
+/*N*/ if ( !pItem || ( *pItem != aCurSet.Get( nWhich ) ) )
+/*N*/ {
+/*N*/ // Problem: Wenn Absatzvorlage mit z.B. Font,
+/*N*/ // aber Font hart und anders und komplett in Selektion
+/*N*/ // Falsch, wenn invalidiert....
+/*N*/ // => Lieber nicht invalidieren, UMSTELLEN!
+/*N*/ // Besser waere, Absatzweise ein ItemSet zu fuellen
+/*N*/ // und dieses mit dem gesmten vergleichen.
+/*N*/ // aCurSet.InvalidateItem( nWhich );
+/*N*/ if ( nWhich <= EE_PARA_END )
+/*?*/ aCurSet.InvalidateItem( nWhich );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Leere Slots mit Defaults fuellen...
+/*N*/ if ( bOnlyHardAttrib == EditEngineAttribs_All )
+/*N*/ {
+/*N*/ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ )
+/*N*/ {
+/*N*/ if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+/*N*/ {
+/*?*/ aCurSet.Put( aEditDoc.GetItemPool().GetDefaultItem( nWhich ) );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ /*
+/*N*/ #ifdef MAC
+/*N*/ FILE* fp = fopen( "debug.log", "a" );
+/*N*/ #elif defined UNX
+/*N*/ FILE* fp = fopen( "/tmp/debug.log", "a" );
+/*N*/ #else
+/*N*/ FILE* fp = fopen( "d:\\debug.log", "a" );
+/*N*/ #endif
+/*N*/ if ( fp )
+/*N*/ {
+/*N*/ fprintf( fp, "\n \n<= Attribute: Absatz %i\n", nNode );
+/*N*/ DbgOutItemSet( fp, aCurSet, TRUE, FALSE );
+/*N*/ fclose( fp );
+/*N*/ }
+/*N*/ */
+/*N*/ #endif
+/*N*/
+/*N*/ return aCurSet;
+/*N*/ }
+
+
+/*N*/ SfxItemSet ImpEditEngine::GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags ) const
+/*N*/ {
+/*N*/ // MT: #94002# Optimized function with less Puts(), which cause unnecessary cloning from default items.
+/*N*/ // If this works, change GetAttribs( EditSelection ) to use this for each paragraph and merge the results!
+/*N*/
+/*N*/ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+/*N*/
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "GetAttribs - unknown paragraph!" );
+/*N*/ DBG_ASSERT( nStart <= nEnd, "getAttribs: Start > End not supported!" );
+/*N*/
+/*N*/ SfxItemSet aAttribs( ((ImpEditEngine*)this)->GetEmptyItemSet() );
+/*N*/
+/*N*/ if ( pNode )
+/*N*/ {
+/*N*/ if ( nEnd > pNode->Len() )
+/*N*/ nEnd = pNode->Len();
+/*?*/
+/*N*/ if ( nStart > nEnd )
+/*?*/ nStart = nEnd;
+/*N*/
+/*N*/ // StyleSheet / Parattribs...
+/*N*/
+/*N*/ if ( pNode->GetStyleSheet() && ( nFlags & GETATTRIBS_STYLESHEET ) )
+/*N*/ aAttribs.Set( pNode->GetStyleSheet()->GetItemSet(), TRUE );
+/*N*/
+/*N*/ if ( nFlags & GETATTRIBS_PARAATTRIBS )
+/*N*/ aAttribs.Put( pNode->GetContentAttribs().GetItems() );
+/*N*/
+/*N*/ // CharAttribs...
+/*N*/
+/*N*/ if ( nFlags & GETATTRIBS_CHARATTRIBS )
+/*N*/ {
+/*N*/ // Make testing easier...
+/*N*/ pNode->GetCharAttribs().OptimizeRanges( ((ImpEditEngine*)this)->GetEditDoc().GetItemPool() );
+/*N*/
+/*N*/ const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
+/*N*/ for ( USHORT nAttr = 0; nAttr < rAttrs.Count(); nAttr++ )
+/*N*/ {
+/*N*/ EditCharAttrib* pAttr = rAttrs.GetObject( nAttr );
+/*N*/
+/*N*/ if ( nStart == nEnd )
+/*N*/ {
+/*N*/ USHORT nCursorPos = nStart;
+/*N*/ if ( ( pAttr->GetStart() <= nCursorPos ) && ( pAttr->GetEnd() >= nCursorPos ) )
+/*N*/ {
+/*N*/ // To be used the attribute has to start BEFORE the position, or it must be a
+/*N*/ // new empty attr AT the position, or we are on position 0.
+/*N*/ if ( ( pAttr->GetStart() < nCursorPos ) || pAttr->IsEmpty() || !nCursorPos )
+/*N*/ {
+/*N*/ // maybe this attrib ends here and a new attrib with 0 Len may follow and be valid here,
+/*N*/ // but that s no problem, the empty item will come later and win.
+/*N*/ aAttribs.Put( *pAttr->GetItem() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Check every attribute covering the area, partial or full.
+/*N*/ if ( ( pAttr->GetStart() < nEnd ) && ( pAttr->GetEnd() > nStart ) )
+/*N*/ {
+/*N*/ if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) )
+/*N*/ {
+/*N*/ // full coverage
+/*N*/ aAttribs.Put( *pAttr->GetItem() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // OptimizeRagnge() assures that not the same attr can follow for full coverage
+/*N*/ // only partial, check with current, when using para/styhe, otherwise invalid.
+/*N*/ if ( !( nFlags & (GETATTRIBS_PARAATTRIBS|GETATTRIBS_STYLESHEET) ) ||
+/*N*/ ( *pAttr->GetItem() != aAttribs.Get( pAttr->Which() ) ) )
+/*N*/ {
+/*N*/ aAttribs.InvalidateItem( pAttr->Which() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( pAttr->GetStart() > nEnd )
+/*N*/ {
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return aAttribs;
+/*N*/ }
+
+
+/*N*/ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial )
+/*N*/ {
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/
+/*N*/ // Wenn keine Selektion => die Attribute aufs Wort anwenden.
+/*N*/ // ( Der RTF-Perser sollte die Methode eigentlich nie ohne Range rufen )
+/*N*/ if ( ( nSpecial == ATTRSPECIAL_WHOLEWORD ) && !aSel.HasRange() )
+/*?*/ aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, FALSE );
+/*N*/
+/*N*/ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+/*N*/ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+/*N*/
+/*N*/ BOOL bCheckLanguage = FALSE;
+/*N*/
+/*N*/ // ueber die Absaetze iterieren...
+/*N*/ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+/*N*/ {
+/*N*/ BOOL bParaAttribFound = FALSE;
+/*N*/ BOOL bCharAttribFound = FALSE;
+/*N*/
+/*N*/ ContentNode* pNode = aEditDoc.GetObject( nNode );
+/*N*/ ParaPortion* pPortion = GetParaPortions().GetObject( nNode );
+/*N*/
+/*N*/ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: SetAttribs" );
+/*N*/ DBG_ASSERT( GetParaPortions().GetObject( nNode ), "Portion nicht gefunden: SetAttribs" );
+/*N*/
+/*N*/ xub_StrLen nStartPos = 0;
+/*N*/ xub_StrLen nEndPos = pNode->Len();
+/*N*/ if ( nNode == nStartNode )
+/*N*/ nStartPos = aSel.Min().GetIndex();
+/*N*/ if ( nNode == nEndNode ) // kann auch == nStart sein!
+/*N*/ nEndPos = aSel.Max().GetIndex();
+/*N*/
+/*N*/ // ueber die Items iterieren...
+/*N*/ #ifdef EDITDEBUG
+/*N*/ // FILE* fp = fopen( "d:\\debug.log", "a" );
+/*N*/ // if ( fp )
+/*N*/ // {
+/*N*/ // fprintf( fp, "\n \n=> Zeichen-Attribute: Absatz %i, %i-%i\n", nNode, nStartPos, nEndPos );
+/*N*/ // DbgOutItemSet( fp, rSet, TRUE, FALSE );
+/*N*/ // fclose( fp );
+/*N*/ // }
+/*N*/ #endif
+/*N*/
+/*N*/ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+/*N*/ {
+/*N*/ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SfxPoolItem& rItem = rSet.Get( nWhich );
+/*N*/ if ( nWhich <= EE_PARA_END )
+/*N*/ {
+/*?*/ pNode->GetContentAttribs().GetItems().Put( rItem );
+/*?*/ bParaAttribFound = TRUE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aEditDoc.InsertAttrib( pNode, nStartPos, nEndPos, rItem );
+/*N*/ bCharAttribFound = TRUE;
+/*N*/ if ( nSpecial == ATTRSPECIAL_EDGE )
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( bParaAttribFound )
+/*N*/ {
+/*?*/ ParaAttribsChanged( pPortion->GetNode() );
+/*N*/ }
+/*N*/ else if ( bCharAttribFound )
+/*N*/ {
+/*N*/ bFormatted = FALSE;
+/*N*/ if ( !pNode->Len() || ( nStartPos != nEndPos ) )
+/*N*/ {
+/*N*/ pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ typedef EditCharAttrib* EditCharAttribPtr;
+
+/*N*/ void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemoveFeatures )
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+/*N*/ ParaPortion* pPortion = GetParaPortions().SaveGetObject( nPara );
+/*N*/
+/*N*/ DBG_ASSERT( pNode, "Node nicht gefunden: RemoveCharAttribs" );
+/*N*/ DBG_ASSERT( pPortion, "Portion nicht gefunden: RemoveCharAttribs" );
+/*N*/
+/*N*/ if ( !pNode )
+/*N*/ return;
+/*N*/
+/*N*/ USHORT nAttr = 0;
+/*N*/ EditCharAttribPtr pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttr )
+/*N*/ {
+/*N*/ if ( ( !pAttr->IsFeature() || bRemoveFeatures ) &&
+/*N*/ ( !nWhich || ( pAttr->GetItem()->Which() == nWhich ) ) )
+/*N*/ {
+/*?*/ pNode->GetCharAttribs().GetAttribs().Remove( nAttr );
+/*?*/ delete pAttr;
+/*?*/ nAttr--;
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/
+/*N*/ pPortion->MarkSelectionInvalid( 0, pNode->Len() );
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+/*N*/
+/*N*/ if ( !pNode )
+/*N*/ return;
+/*N*/
+/*N*/ #ifdef EDITDEBUG
+/*N*/ // FILE* fp = fopen( "d:\\debug.log", "a" );
+/*N*/ // if ( fp )
+/*N*/ // {
+/*N*/ // fprintf( fp, "\n \n=> Absatz-Attribute: Absatz %i\n", nPara );
+/*N*/ // DbgOutItemSet( fp, rSet, TRUE, FALSE );
+/*N*/ // fclose( fp );
+/*N*/ // }
+/*N*/ #endif
+/*N*/
+/*N*/ if ( !( pNode->GetContentAttribs().GetItems() == rSet ) )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
+/*N*/ {
+/*N*/ if ( rSet.GetPool() != &aEditDoc.GetItemPool() )
+/*N*/ {
+/*?*/ SfxItemSet aTmpSet( GetEmptyItemSet() );
+/*?*/ aTmpSet.Put( rSet );
+/*?*/ InsertUndo( new EditUndoSetParaAttribs( this, nPara, pNode->GetContentAttribs().GetItems(), aTmpSet ) );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ InsertUndo( new EditUndoSetParaAttribs( this, nPara, pNode->GetContentAttribs().GetItems(), rSet ) );
+/*N*/ }
+/*N*/ }
+/*N*/ #endif
+/*N*/ pNode->GetContentAttribs().GetItems().Set( rSet );
+/*N*/ if ( aStatus.UseCharAttribs() )
+/*N*/ pNode->CreateDefFont();
+/*N*/
+/*N*/ ParaAttribsChanged( pNode );
+/*N*/ }
+/*N*/ }
+
+/*N*/ const SfxItemSet& ImpEditEngine::GetParaAttribs( USHORT nPara ) const
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.GetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttribs" );
+/*N*/ return pNode->GetContentAttribs().GetItems();
+/*N*/ }
+
+/*N*/ BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.GetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "Node nicht gefunden: HasParaAttrib" );
+/*N*/
+/*N*/ return pNode->GetContentAttribs().HasItem( nWhich );
+/*N*/ }
+
+/*N*/ const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich ) const
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.GetObject( nPara );
+/*N*/ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttrib" );
+/*N*/
+/*N*/ return pNode->GetContentAttribs().GetItem( nWhich );
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_svxacorr.cxx b/binfilter/bf_svx/source/editeng/svx_svxacorr.cxx
new file mode 100644
index 000000000000..a8049b30a2a9
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_svxacorr.cxx
@@ -0,0 +1,408 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define ITEMID_UNDERLINE 0
+#define ITEMID_WEIGHT 0
+#define ITEMID_ESCAPEMENT 0
+#define ITEMID_CHARSETCOLOR 0
+#define ITEMID_COLOR 0
+
+#include <vcl/svapp.hxx>
+#include <bf_sfx2/docfile.hxx>
+// fuer die Sort-String-Arrays aus dem SVMEM.HXX
+#define _SVSTDARR_STRINGSISORTDTOR
+#define _SVSTDARR_STRINGSDTOR
+
+#include <unotools/charclass.hxx>
+#include <com/sun/star/i18n/UnicodeType.hdl>
+
+#include <svxids.hrc>
+
+#include "escpitem.hxx"
+#include "svxacorr.hxx"
+
+#include <helpid.hrc>
+
+#include <unotools/streamwrap.hxx>
+#include <bf_xmloff/xmltoken.hxx>
+namespace binfilter {
+
+using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
+using namespace ::binfilter::xmloff::token;
+using namespace ::rtl;
+using namespace ::utl;
+
+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 pXMLImplWrdStt_ExcptLstStr[] = "WordExceptList.xml";
+static const sal_Char pXMLImplCplStt_ExcptLstStr[] = "SentenceExceptList.xml";
+static const sal_Char pXMLImplAutocorr_ListStr[] = "DocumentList.xml";
+
+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
+
+
+
+/*N*/ typedef SvxAutoCorrectLanguageLists* SvxAutoCorrectLanguageListsPtr;
+/*N*/ DECLARE_TABLE( SvxAutoCorrLanguageTable_Impl, SvxAutoCorrectLanguageListsPtr)//STRIP008 ;
+
+/*N*/ DECLARE_TABLE( SvxAutoCorrLastFileAskTable_Impl, long )//STRIP008 ;
+
+
+
+
+
+
+
+
+
+ // wird nach dem austauschen der Zeichen von den Funktionen
+ // - FnCptlSttWrd
+ // - FnCptlSttSntnc
+ // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
+ // aufgenommen werden.
+
+
+
+/*N*/ static USHORT GetAppLang()
+/*N*/ {
+/*N*/ return Application::GetSettings().GetLanguage();
+/*N*/ }
+
+
+
+
+
+/* -----------------18.11.98 15:28-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ void lcl_ClearTable(SvxAutoCorrLanguageTable_Impl& rLangTable)
+/*N*/ {
+/*N*/ SvxAutoCorrectLanguageListsPtr pLists = rLangTable.Last();
+/*N*/ while(pLists)
+/*N*/ {
+/*?*/ delete pLists;
+/*?*/ pLists = rLangTable.Prev();
+/*N*/ }
+/*N*/ rLangTable.Clear();
+/*N*/ }
+
+/* -----------------19.11.98 10:15-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ long SvxAutoCorrect::GetDefaultFlags()
+/*N*/ {
+/*N*/ long nRet = Autocorrect
+/*N*/ | CptlSttSntnc
+/*N*/ | CptlSttWrd
+/*N*/ | ChgFractionSymbol
+/*N*/ | ChgOrdinalNumber
+/*N*/ | ChgToEnEmDash
+/*N*/ | ChgWeightUnderl
+/*N*/ | SetINetAttr
+/*N*/ | ChgQuotes
+/*N*/ | SaveWordCplSttLst
+/*N*/ | SaveWordWrdSttLst;
+/*N*/ LanguageType eLang = GetAppLang();
+/*N*/ switch( eLang )
+/*N*/ {
+/*N*/ case LANGUAGE_ENGLISH:
+/*N*/ case LANGUAGE_ENGLISH_US:
+/*N*/ case LANGUAGE_ENGLISH_UK:
+/*N*/ case LANGUAGE_ENGLISH_AUS:
+/*N*/ case LANGUAGE_ENGLISH_CAN:
+/*N*/ case LANGUAGE_ENGLISH_NZ:
+/*N*/ case LANGUAGE_ENGLISH_EIRE:
+/*N*/ case LANGUAGE_ENGLISH_SAFRICA:
+/*N*/ case LANGUAGE_ENGLISH_JAMAICA:
+/*N*/ case LANGUAGE_ENGLISH_CARRIBEAN:
+/*N*/ nRet &= ~(ChgQuotes|ChgSglQuotes);
+/*N*/ break;
+/*N*/ }
+/*N*/ return nRet;
+/*N*/ }
+
+
+/*N*/ SvxAutoCorrect::SvxAutoCorrect( const String& rShareAutocorrFile,
+/*N*/ const String& rUserAutocorrFile )
+/*N*/ : sShareAutoCorrFile( rShareAutocorrFile ),
+/*N*/ sUserAutoCorrFile( rUserAutocorrFile ),
+/*N*/ cStartSQuote( 0 ), cEndSQuote( 0 ), cStartDQuote( 0 ), cEndDQuote( 0 ),
+/*N*/ pLangTable( new SvxAutoCorrLanguageTable_Impl ),
+/*N*/ pLastFileTable( new SvxAutoCorrLastFileAskTable_Impl ),
+/*N*/ pCharClass( 0 )
+/*N*/ {
+/*N*/ nFlags = SvxAutoCorrect::GetDefaultFlags();
+/*N*/
+/*N*/ c1Div2 = ByteString::ConvertToUnicode( '\xBD', RTL_TEXTENCODING_MS_1252 );
+/*N*/ c1Div4 = ByteString::ConvertToUnicode( '\xBC', RTL_TEXTENCODING_MS_1252 );
+/*N*/ c3Div4 = ByteString::ConvertToUnicode( '\xBE', RTL_TEXTENCODING_MS_1252 );
+/*N*/ cEmDash = ByteString::ConvertToUnicode( '\x97', RTL_TEXTENCODING_MS_1252 );
+/*N*/ cEnDash = ByteString::ConvertToUnicode( '\x96', RTL_TEXTENCODING_MS_1252 );
+/*N*/ }
+
+/*N*/ SvxAutoCorrect::SvxAutoCorrect( const SvxAutoCorrect& rCpy )
+/*N*/ : nFlags( rCpy.nFlags & ~(ChgWordLstLoad|CplSttLstLoad|WrdSttLstLoad)),
+/*N*/ aSwFlags( rCpy.aSwFlags ),
+/* Die Sprachentabelle wird neu aufgebaut, da sie im Dtor von rCpy abgeraeumt wird!
+ */
+/*N*/ sShareAutoCorrFile( rCpy.sShareAutoCorrFile ),
+/*N*/ sUserAutoCorrFile( rCpy.sUserAutoCorrFile ),
+/*N*/ cStartSQuote( rCpy.cStartSQuote ), cEndSQuote( rCpy.cEndSQuote ),
+/*N*/ cStartDQuote( rCpy.cStartDQuote ), cEndDQuote( rCpy.cEndDQuote ),
+/*N*/ c1Div2( rCpy.c1Div2 ), c1Div4( rCpy.c1Div4 ), c3Div4( rCpy.c3Div4 ),
+/*N*/ cEmDash( rCpy.cEmDash ), cEnDash( rCpy.cEnDash ),
+/*N*/ pLangTable( new SvxAutoCorrLanguageTable_Impl ),
+/*N*/ pLastFileTable( new SvxAutoCorrLastFileAskTable_Impl ),
+/*N*/ pCharClass( 0 )
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ SvxAutoCorrect::~SvxAutoCorrect()
+/*N*/ {
+/*N*/ lcl_ClearTable(*pLangTable);
+/*N*/ delete pLangTable;
+/*N*/ delete pLastFileTable;
+/*N*/ delete pCharClass;
+/*N*/ }
+
+
+/*N*/ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn )
+/*N*/ {
+/*N*/ long nOld = nFlags;
+/*N*/ nFlags = bOn ? nFlags | nFlag
+/*N*/ : nFlags & ~nFlag;
+/*N*/
+/*N*/ if( !bOn )
+/*N*/ {
+/*N*/ if( (nOld & CptlSttSntnc) != (nFlags & CptlSttSntnc) )
+/*?*/ nFlags &= ~CplSttLstLoad;
+/*N*/ if( (nOld & CptlSttWrd) != (nFlags & CptlSttWrd) )
+/*?*/ nFlags &= ~WrdSttLstLoad;
+/*N*/ if( (nOld & Autocorrect) != (nFlags & Autocorrect) )
+/*?*/ nFlags &= ~ChgWordLstLoad;
+/*N*/ }
+/*N*/ }
+
+
+ // Zwei Grossbuchstaben am Wort-Anfang ??
+
+
+
+
+
+
+
+
+
+
+
+
+//The method below is renamed from _GetQuote to GetQuote by BerryJia for Bug95846 Time:2002-8-13 15:50
+
+
+
+
+
+
+
+ // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort
+ // in die Datei geschrieben!
+
+
+ // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort
+ // in die Datei geschrieben!
+
+
+
+
+
+
+
+
+
+
+
+ // - loesche einen Eintrag
+
+
+ // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
+ // koennen aus der Wortliste herausgeholt werden!)
+
+ // - Text mit Attributierung (kann nur der SWG - SWG-Format!)
+
+
+
+
+/* This code is copied from SwXMLTextBlocks::GeneratePackageName */
+
+
+
+/* -----------------18.11.98 16:00-------------------
+ *
+ * --------------------------------------------------*/
+
+
+// suche das oder die Worte in der ErsetzungsTabelle
+/* -----------------18.11.98 13:46-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 14:28-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 14:49-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------20.11.98 11:53-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------18.11.98 11:16-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists(
+/*N*/ SvxAutoCorrect& rParent,
+/*N*/ const String& rShareAutoCorrectFile,
+/*N*/ const String& rUserAutoCorrectFile,
+/*N*/ LanguageType eLang)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/* -----------------18.11.98 11:16-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 15:20-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+ // - Text mit Attributierung (kann nur der SWG - SWG-Format!)
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+ // - loesche einen Eintrag
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_swafopt.cxx b/binfilter/bf_svx/source/editeng/svx_swafopt.cxx
new file mode 100644
index 000000000000..9e2e061ff5ec
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_swafopt.cxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <vcl/keycodes.hxx>
+
+#include "swafopt.hxx"
+namespace binfilter {
+
+/*------------------------------------------------------------------------
+ Beschreibung:
+------------------------------------------------------------------------*/
+
+/*N*/ SvxSwAutoFmtFlags& SvxSwAutoFmtFlags::operator=( const SvxSwAutoFmtFlags& rAFFlags )
+/*N*/ {
+/*N*/ bAutoCorrect = rAFFlags.bAutoCorrect;
+/*N*/ bReplaceQuote = rAFFlags.bReplaceQuote;
+/*N*/ bCptlSttSntnc = rAFFlags.bCptlSttSntnc;
+/*N*/ bCptlSttWrd = rAFFlags.bCptlSttWrd;
+/*N*/ bChkFontAttr = rAFFlags.bChkFontAttr;
+/*N*/
+/*N*/ bChgUserColl = rAFFlags.bChgUserColl;
+/*N*/ bChgEnumNum = rAFFlags.bChgEnumNum;
+/*N*/ bDelEmptyNode = rAFFlags.bDelEmptyNode;
+/*N*/ bSetNumRule = rAFFlags.bSetNumRule;
+/*N*/ bAFmtByInput = rAFFlags.bAFmtByInput;
+/*N*/
+/*N*/ bChgFracionSymbol = rAFFlags.bChgFracionSymbol;
+/*N*/ bChgOrdinalNumber = rAFFlags.bChgOrdinalNumber;
+/*N*/ bChgToEnEmDash = rAFFlags.bChgToEnEmDash;
+/*N*/ bChgWeightUnderl = rAFFlags.bChgWeightUnderl;
+/*N*/ bSetINetAttr = rAFFlags.bSetINetAttr;
+/*N*/ bSetBorder = rAFFlags.bSetBorder;
+/*N*/ bCreateTable = rAFFlags.bCreateTable;
+/*N*/ bReplaceStyles = rAFFlags.bReplaceStyles;
+/*N*/ bAFmtDelSpacesAtSttEnd = rAFFlags.bAFmtDelSpacesAtSttEnd;
+/*N*/ bAFmtDelSpacesBetweenLines = rAFFlags.bAFmtDelSpacesBetweenLines;
+/*N*/ bAFmtByInpDelSpacesAtSttEnd = rAFFlags.bAFmtByInpDelSpacesAtSttEnd;
+/*N*/ bAFmtByInpDelSpacesBetweenLines = rAFFlags.bAFmtByInpDelSpacesBetweenLines;
+/*N*/
+/*N*/ bDummy = rAFFlags.bDummy;
+/*N*/
+/*N*/ bDummy5 = rAFFlags.bDummy5;
+/*N*/ bDummy6 = rAFFlags.bDummy6;
+/*N*/ bDummy7 = rAFFlags.bDummy7;
+/*N*/ bDummy8 = rAFFlags.bDummy8;
+/*N*/
+/*N*/ bWithRedlining = rAFFlags.bWithRedlining;
+/*N*/
+/*N*/ bRightMargin = rAFFlags.bRightMargin;
+/*N*/ nRightMargin = rAFFlags.nRightMargin;
+/*N*/
+/*N*/ cBullet = rAFFlags.cBullet;
+/*N*/ aBulletFont = rAFFlags.aBulletFont;
+/*N*/
+/*N*/ cByInputBullet = rAFFlags.cByInputBullet;
+/*N*/ aByInputBulletFont = rAFFlags.aByInputBulletFont;
+/*N*/
+/*N*/ bAutoCompleteWords = rAFFlags.bAutoCompleteWords;
+/*N*/ bAutoCmpltCollectWords = rAFFlags.bAutoCmpltCollectWords;
+/*N*/ bAutoCmpltKeepList = rAFFlags.bAutoCmpltKeepList;
+/*N*/ bAutoCmpltEndless = rAFFlags.bAutoCmpltEndless;
+/*N*/ bAutoCmpltAppendBlanc = rAFFlags.bAutoCmpltAppendBlanc;
+/*N*/ bAutoCmpltShowAsTip = rAFFlags.bAutoCmpltShowAsTip;
+/*N*/ pAutoCmpltList = rAFFlags.pAutoCmpltList;
+/*N*/ nAutoCmpltExpandKey = rAFFlags.nAutoCmpltExpandKey;
+/*N*/
+/*N*/ nAutoCmpltWordLen = rAFFlags.nAutoCmpltWordLen;
+/*N*/ nAutoCmpltListLen = rAFFlags.nAutoCmpltListLen;
+/*N*/
+/*N*/ return *this;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_txtrange.cxx b/binfilter/bf_svx/source/editeng/svx_txtrange.cxx
new file mode 100644
index 000000000000..acb00a348b1b
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_txtrange.cxx
@@ -0,0 +1,663 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <xoutx.hxx>
+
+#include "txtrange.hxx"
+#include <math.h>
+
+
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* TextRanger::TextRanger()
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung 20.01.97 AMA
+|*
+*************************************************************************/
+
+#ifdef WIN
+#pragma optimize ( "", off )
+#endif
+
+/*N*/ TextRanger::TextRanger( const XPolyPolygon& rXPoly, const XPolyPolygon* pXLine,
+/*N*/ USHORT nCacheSz, USHORT nLft, USHORT nRght, BOOL bSimpl, BOOL bInnr,
+/*N*/ BOOL bVert ) :
+/*N*/ pBound( NULL ), nCacheSize( nCacheSz ), nCacheIdx( 0 ), nPointCount( 0 ),
+/*N*/ nLeft( nLft ), nRight( nRght ), nUpper( 0 ), nLower( 0 ),
+/*N*/ bSimple( bSimpl ), bInner( bInnr ), bVertical( bVert )
+/*N*/ {
+/*N*/ #ifdef DBG_UTIL
+/*N*/ bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE;
+/*N*/ #endif
+/*N*/ pRangeArr = new Range[ nCacheSize ];
+/*N*/ pCache = new SvLongsPtr[ nCacheSize ];
+/*N*/ memset( pRangeArr, 0, nCacheSize * sizeof( Range ) );
+/*N*/ memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) );
+/*N*/ USHORT nCount = rXPoly.Count();
+/*N*/ pPoly = new PolyPolygon( nCount );
+/*N*/ for( USHORT i = 0; i < nCount; ++i )
+/*N*/ {
+/*N*/ Polygon aTmp = XOutCreatePolygon( rXPoly[ i ], NULL, 100 );
+/*N*/ nPointCount += aTmp.GetSize();
+/*N*/ pPoly->Insert( aTmp, i );
+/*N*/ }
+/*N*/ if( pXLine )
+/*N*/ {
+/*N*/ nCount = pXLine->Count();
+/*N*/ pLine = new PolyPolygon();
+/*N*/ for( USHORT i = 0; i < nCount; ++i )
+/*N*/ {
+/*N*/ Polygon aTmp = XOutCreatePolygon( (*pXLine)[ i ], NULL, 100 );
+/*N*/ nPointCount += aTmp.GetSize();
+/*N*/ pLine->Insert( aTmp, i );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ pLine = NULL;
+/*N*/
+/*N*/ #if 0
+/*N*/ ULONG nPolyPtr = (ULONG)&rXPoly;
+/*N*/ String aDbgFile( "d:\\" );
+/*N*/ aDbgFile += nPolyPtr;
+/*N*/ aDbgFile += ".pol";
+/*N*/ SvFileStream aStream( aDbgFile, STREAM_WRITE|STREAM_TRUNC );
+/*N*/ aStream << "pPoly: " << String( (ULONG)pPoly ).GetStr();
+/*N*/ for ( USHORT nPoly = 0; nPoly < pPoly->Count(); nPoly++ )
+/*N*/ {
+/*N*/ const Polygon& rPoly = pPoly->GetObject( nPoly );
+/*N*/ for ( USHORT n = 0; n < rPoly.GetSize(); n++ )
+/*N*/ {
+/*N*/ const Point& rPoint = rPoly.GetPoint( n );
+/*N*/ aStream << String( rPoint.X() ).GetStr() << ", " << String( rPoint.Y() ).GetStr() << endl;
+/*N*/ }
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+#ifdef WIN
+#pragma optimize ( "", on )
+#endif
+
+/*************************************************************************
+|*
+|* TextRanger::~TextRanger()
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung 20.01.97 AMA
+|*
+*************************************************************************/
+
+/*N*/ TextRanger::~TextRanger()
+/*N*/ {
+/*N*/ for( USHORT i = 0; i < nCacheSize; ++i )
+/*N*/ delete pCache[i];
+/*N*/ delete[] pCache;
+/*N*/ delete[] pRangeArr;
+/*N*/ delete pPoly;
+/*N*/ delete pLine;
+/*N*/ }
+
+/*-----------------17.11.00 09:49-------------------
+ * TextRanger::SetVertical(..)
+ * If there's is a change in the writing direction,
+ * the cache has to be cleared.
+ * --------------------------------------------------*/
+
+
+/*************************************************************************
+|*
+|* SvxBoundArgs
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung 20.01.97 AMA
+|*
+*************************************************************************/
+
+/*N*/ class SvxBoundArgs
+/*N*/ {
+/*N*/ SvBools aBoolArr;
+/*N*/ SvLongs *pLongArr;
+/*N*/ TextRanger *pTextRanger;
+/*N*/ long nMin;
+/*N*/ long nMax;
+/*N*/ long nTop;
+/*N*/ long nBottom;
+/*N*/ long nUpDiff;
+/*N*/ long nLowDiff;
+/*N*/ long nUpper;
+/*N*/ long nLower;
+/*N*/ long nStart;
+/*N*/ long nEnd;
+/*N*/ USHORT nCut;
+/*N*/ USHORT nLast;
+/*N*/ USHORT nNext;
+/*N*/ BYTE nAct;
+/*N*/ BYTE nFirst;
+/*N*/ BOOL bClosed : 1;
+/*N*/ BOOL bInner : 1;
+/*N*/ BOOL bMultiple : 1;
+/*N*/ BOOL bConcat : 1;
+/*N*/ BOOL bRotate : 1;
+/*N*/ void NoteRange( BOOL bToggle );
+/*N*/ long Cut( long nY, const Point& rPt1, const Point& rPt2 );
+/*N*/ void Add();
+/*N*/ void CheckCut( const Point& rLst, const Point& rNxt );
+/*N*/ inline long A( const Point& rP ) const { return bRotate ? rP.Y() : rP.X(); }
+/*N*/ inline long B( const Point& rP ) const { return bRotate ? rP.X() : rP.Y(); }
+/*N*/ public:
+/*N*/ SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, const Range& rRange );
+/*N*/ void NotePoint( const long nA ) { NoteMargin( nA - nStart, nA + nEnd ); }
+/*N*/ void NoteMargin( const long nL, const long nR )
+/*N*/ { if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; }
+/*N*/ USHORT Area( const Point& rPt );
+/*N*/ void NoteUpLow( long nA, const BYTE nArea );
+/*N*/ void Calc( const PolyPolygon& rPoly );
+/*N*/ void Concat( const PolyPolygon* pPoly );
+/*N*/ // inlines
+/*N*/ void NoteLast() { if( bMultiple ) NoteRange( nAct == nFirst ); }
+/*N*/ void SetClosed( const BOOL bNew ){ bClosed = bNew; }
+/*N*/ BOOL IsClosed() const { return bClosed; }
+/*N*/ void SetConcat( const BOOL bNew ){ bConcat = bNew; }
+/*N*/ BOOL IsConcat() const { return bConcat; }
+/*N*/ BYTE GetAct() const { return nAct; }
+/*N*/ };
+
+/*N*/ SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong,
+/*N*/ const Range& rRange )
+/*N*/ : aBoolArr( 4, 4 ), pLongArr( pLong ), pTextRanger( pRanger ),
+/*N*/ nTop( rRange.Min() ), nBottom( rRange.Max() ),
+/*N*/ bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ),
+/*N*/ bConcat( FALSE ), bRotate( pRanger->IsVertical() )
+/*N*/ {
+/*N*/ if( bRotate )
+/*N*/ {
+/*?*/ nStart = pRanger->GetUpper();
+/*?*/ nEnd = pRanger->GetLower();
+/*?*/ nLowDiff = pRanger->GetLeft();
+/*?*/ nUpDiff = pRanger->GetRight();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nStart = pRanger->GetLeft();
+/*N*/ nEnd = pRanger->GetRight();
+/*N*/ nLowDiff = pRanger->GetUpper();
+/*N*/ nUpDiff = pRanger->GetLower();
+/*N*/ }
+/*N*/ nUpper = nTop - nUpDiff;
+/*N*/ nLower = nBottom + nLowDiff;
+/*N*/ pLongArr->Remove( 0, pLongArr->Count() );
+/*N*/ }
+
+
+/*N*/ void SvxBoundArgs::CheckCut( const Point& rLst, const Point& rNxt )
+/*N*/ {
+/*N*/ if( nCut & 1 )
+/*N*/ NotePoint( Cut( nBottom, rLst, rNxt ) );
+/*N*/ if( nCut & 2 )
+/*N*/ NotePoint( Cut( nTop, rLst, rNxt ) );
+/*N*/ if( rLst.X() != rNxt.X() && rLst.Y() != rNxt.Y() )
+/*N*/ {
+/*N*/ long nYps;
+/*N*/ if( nLowDiff && ( ( nCut & 1 ) || nLast == 1 || nNext == 1 ) )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 nYps = CalcMax( rLst, rNxt, nBottom, nLower );
+/*N*/ }
+/*N*/ if( nUpDiff && ( ( nCut & 2 ) || nLast == 2 || nNext == 2 ) )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 nYps = CalcMax( rLst, rNxt, nTop, nUpper );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SvxBoundArgs::NoteRange( BOOL bToggle )
+/*N*/ {
+/*N*/ DBG_ASSERT( nMax >= nMin || bInner, "NoteRange: Min > Max?");
+/*N*/ if( nMax < nMin )
+/*N*/ return;
+/*N*/ if( !bClosed )
+/*N*/ bToggle = FALSE;
+/*N*/ USHORT nIdx = 0;
+/*N*/ USHORT nCount = pLongArr->Count();
+/*N*/ DBG_ASSERT( nCount == 2 * aBoolArr.Count(), "NoteRange: Incompatible Sizes" );
+/*N*/ while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin )
+/*N*/ ++nIdx;
+/*N*/ BOOL bOdd = nIdx % 2 ? TRUE : FALSE;
+/*N*/ // Kein Ueberlappung mit vorhandenen Intervallen?
+/*N*/ if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) )
+/*N*/ { // Dann wird ein neues eingefuegt ...
+/*N*/ pLongArr->Insert( nMin, nIdx );
+/*N*/ pLongArr->Insert( nMax, nIdx + 1 );
+/*N*/ aBoolArr.Insert( bToggle, nIdx / 2 );
+/*N*/ }
+/*N*/ else
+/*N*/ { // ein vorhandes Intervall erweitern ...
+/*N*/ USHORT nMaxIdx = nIdx;
+/*N*/ // Wenn wir auf einer linken Intervallgrenze gelandet sind, muss diese
+/*N*/ // auf nMin gesenkt werden.
+/*N*/ if( bOdd )
+/*N*/ --nIdx;
+/*N*/ else
+/*N*/ (*pLongArr)[ nIdx ] = nMin;
+/*N*/ while( nMaxIdx < nCount && (*pLongArr)[ nMaxIdx ] < nMax )
+/*N*/ ++nMaxIdx;
+/*N*/ DBG_ASSERT( nMaxIdx > nIdx || nMin == nMax, "NoteRange: Funny Situation." );
+/*N*/ if( nMaxIdx )
+/*N*/ --nMaxIdx;
+/*N*/ if( nMaxIdx < nIdx )
+/*N*/ nMaxIdx = nIdx;
+/*N*/ // Wenn wir auf einer rechten Intervallgrenze landen, muss diese
+/*N*/ // auf nMax angehoben werden.
+/*N*/ if( nMaxIdx % 2 )
+/*N*/ (*pLongArr)[ nMaxIdx-- ] = nMax;
+/*N*/ // Jetzt werden eventuell noch Intervalle verschmolzen
+/*N*/ USHORT nDiff = nMaxIdx - nIdx;
+/*N*/ nMaxIdx = nIdx / 2; // Ab hier ist nMaxIdx der Index im BoolArray.
+/*N*/ if( nDiff )
+/*N*/ {
+/*N*/ (*pLongArr).Remove( nIdx + 1, nDiff );
+/*N*/ nDiff /= 2;
+/*N*/ USHORT nStop = nMaxIdx + nDiff;
+/*N*/ for( USHORT i = nMaxIdx; i < nStop; ++i )
+/*N*/ bToggle ^= aBoolArr[ i ];
+/*N*/ aBoolArr.Remove( nMaxIdx, nDiff );
+/*N*/ }
+/*N*/ DBG_ASSERT( nMaxIdx < aBoolArr.Count(), "NoteRange: Too much deleted" );
+/*N*/ aBoolArr[ nMaxIdx ] ^= bToggle;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
+/*N*/ {
+/*N*/ USHORT nCount;
+/*N*/ nAct = 0;
+/*N*/ for( USHORT i = 0; i < rPoly.Count(); ++i )
+/*N*/ {
+/*N*/ const Polygon& rPol = rPoly[ i ];
+/*N*/ nCount = rPol.GetSize();
+/*N*/ if( nCount )
+/*N*/ {
+/*N*/ const Point& rNull = rPol[ 0 ];
+/*N*/ SetClosed( IsConcat() || ( rNull == rPol[ nCount - 1 ] ) );
+/*N*/ nLast = Area( rNull );
+/*N*/ if( nLast & 12 )
+/*N*/ {
+/*N*/ nFirst = 3;
+/*N*/ if( bMultiple )
+/*N*/ nAct = 0;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Der erste Punkt des Polygons liegt innerhalb der Zeile.
+/*N*/ if( nLast )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 if( bMultiple || !nAct )
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if( bMultiple || !nAct )
+/*N*/ {
+/*N*/ nMin = A(rNull);
+/*N*/ nMax = nMin + nEnd;
+/*N*/ nMin -= nStart;
+/*N*/ }
+/*N*/ else
+/*?*/ NotePoint( A(rNull) );
+/*N*/ }
+/*N*/ nFirst = 0; // In welcher Richtung wird die Zeile verlassen?
+/*N*/ nAct = 3; // Wir sind z.Z. innerhalb der Zeile.
+/*N*/ }
+/*N*/ if( nCount > 1 )
+/*N*/ {
+/*N*/ USHORT nIdx = 1;
+/*N*/ while( TRUE )
+/*N*/ {
+/*N*/ const Point& rLast = rPol[ nIdx - 1 ];
+/*N*/ if( nIdx == nCount )
+/*N*/ nIdx = 0;
+/*N*/ const Point& rNext = rPol[ nIdx ];
+/*N*/ nNext = Area( rNext );
+/*N*/ nCut = nNext ^ nLast;
+/*N*/ USHORT nOldAct = nAct;
+/*N*/ if( nAct )
+/*N*/ CheckCut( rLast, rNext );
+/*N*/ if( nCut & 4 )
+/*N*/ {
+/*N*/ NoteUpLow( Cut( nLower, rLast, rNext ), 2 );
+/*N*/ if( nAct && nAct != nOldAct )
+/*N*/ {
+/*N*/ nOldAct = nAct;
+/*N*/ CheckCut( rLast, rNext );
+/*N*/ }
+/*N*/ }
+/*N*/ if( nCut & 8 )
+/*N*/ {
+/*N*/ NoteUpLow( Cut( nUpper, rLast, rNext ), 1 );
+/*N*/ if( nAct && nAct != nOldAct )
+/*N*/ CheckCut( rLast, rNext );
+/*N*/ }
+/*N*/ if( !nIdx )
+/*N*/ {
+/*N*/ if( !( nNext & 12 ) )
+/*N*/ NoteLast();
+/*N*/ break;
+/*N*/ }
+/*N*/ if( !( nNext & 12 ) )
+/*N*/ {
+/*N*/ if( !nNext )
+/*N*/ NotePoint( A(rNext) );
+/*N*/ else if( nNext & 1 )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 NoteFarPoint( A(rNext), nLower-B(rNext), nLowDiff );
+/*N*/ else
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 NoteFarPoint( A(rNext), B(rNext)-nUpper, nUpDiff );
+/*N*/ }
+/*N*/ nLast = nNext;
+/*N*/ if( ++nIdx == nCount && !IsClosed() )
+/*N*/ {
+/*N*/ if( !( nNext & 12 ) )
+/*N*/ NoteLast();
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if( bMultiple && IsConcat() )
+/*N*/ {
+/*N*/ Add();
+/*N*/ nAct = 0;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if( !bMultiple )
+/*N*/ {
+/*?*/ DBG_ASSERT( pLongArr->Count() == 0, "I said: Simple!" );
+/*?*/ if( nAct )
+/*?*/ {
+/*?*/ if( bInner )
+/*?*/ {
+/*?*/ long nTmpMin, nTmpMax;
+/*?*/ {
+/*?*/ nTmpMin = nMin + 2 * nStart;
+/*?*/ nTmpMax = nMax - 2 * nEnd;
+/*?*/ if( nTmpMin <= nTmpMax )
+/*?*/ {
+/*?*/ pLongArr->Insert( nTmpMin, 0 );
+/*?*/ pLongArr->Insert( nTmpMax, 1 );
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ pLongArr->Insert( nMin, 0 );
+/*?*/ pLongArr->Insert( nMax, 1 );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ else if( !IsConcat() )
+/*N*/ Add();
+/*N*/ }
+
+/*N*/ void SvxBoundArgs::Add()
+/*N*/ {
+/*N*/ USHORT nLongIdx = 1;
+/*N*/ USHORT nCount = aBoolArr.Count();
+/*N*/ if( nCount && ( !bInner || !pTextRanger->IsSimple() ) )
+/*N*/ {
+/*N*/ BOOL bDelete = aBoolArr[ 0 ];
+/*N*/ if( bInner )
+/*N*/ bDelete = !bDelete;
+/*N*/ for( USHORT nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
+/*N*/ {
+/*N*/ if( bDelete )
+/*N*/ {
+/*N*/ USHORT nNext = 2;
+/*N*/ while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] &&
+/*N*/ (!bInner || nBoolIdx < nCount ) )
+/*N*/ nNext += 2;
+/*N*/ pLongArr->Remove( nLongIdx, nNext );
+/*N*/ nNext /= 2;
+/*N*/ nBoolIdx -= nNext;
+/*N*/ nCount -= nNext;
+/*N*/ aBoolArr.Remove( nBoolIdx, nNext );
+/*N*/ if( nBoolIdx )
+/*N*/ aBoolArr[ nBoolIdx - 1 ] = FALSE;
+/*N*/ #if OSL_DEBUG_LEVEL > 1
+/*N*/ else
+/*N*/ ++nNext;
+/*N*/ #endif
+/*N*/ }
+/*N*/ bDelete = nBoolIdx < nCount && aBoolArr[ nBoolIdx ];
+/*N*/ nLongIdx += 2;
+/*N*/ DBG_ASSERT( nLongIdx == 2*nBoolIdx+1, "BoundArgs: Array-Idx Confusion" );
+/*N*/ DBG_ASSERT( aBoolArr.Count()*2 == pLongArr->Count(),
+/*N*/ "BoundArgs: Array-Count: Confusion" );
+/*N*/ }
+/*N*/ }
+/*N*/ if( 0 != ( nCount = pLongArr->Count() ) )
+/*N*/ {
+/*N*/ if( bInner )
+/*N*/ {
+/*?*/ 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 );
+/*?*/
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
+/*N*/ {
+/*N*/ SetConcat( TRUE );
+/*N*/ DBG_ASSERT( pPoly, "Nothing to do?" );
+/*N*/ SvLongs *pOld = pLongArr;
+/*N*/ pLongArr = new SvLongs( 2, 8 );
+/*N*/ aBoolArr.Remove( 0, aBoolArr.Count() );
+/*N*/ bInner = FALSE;
+/*N*/ Calc( *pPoly );
+/*N*/ USHORT nCount = pLongArr->Count();
+/*N*/ USHORT nIdx = 0;
+/*N*/ USHORT i = 0;
+/*N*/ BOOL bSubtract = pTextRanger->IsInner();
+/*N*/ while( i < nCount )
+/*N*/ {
+/*N*/ USHORT nOldCount = pOld->Count();
+/*N*/ if( nIdx == nOldCount )
+/*N*/ { // Am Ende des alten Arrays angelangt...
+/*?*/ if( !bSubtract )
+/*?*/ pOld->Insert( pLongArr, nIdx, i, USHRT_MAX );
+/*?*/ break;
+/*N*/ }
+/*N*/ long nLeft = (*pLongArr)[ i++ ];
+/*N*/ long nRight = (*pLongArr)[ i++ ];
+/*N*/ USHORT nLeftPos = nIdx + 1;
+/*N*/ while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] )
+/*N*/ nLeftPos += 2;
+/*N*/ if( nLeftPos >= nOldCount )
+/*N*/ { // Das aktuelle Intervall gehoert ans Ende des alten Arrays...
+/*?*/ if( !bSubtract )
+/*?*/ pOld->Insert( pLongArr, nOldCount, i - 2, USHRT_MAX );
+/*?*/ break;
+/*N*/ }
+/*N*/ USHORT nRightPos = nLeftPos - 1;
+/*N*/ while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] )
+/*N*/ nRightPos += 2;
+/*N*/ if( nRightPos < nLeftPos )
+/*N*/ { // Das aktuelle Intervall gehoert zwischen zwei alte Intervalle
+/*?*/ if( !bSubtract )
+/*?*/ pOld->Insert( pLongArr, nRightPos, i - 2, i );
+/*?*/ nIdx = nRightPos + 2;
+/*N*/ }
+/*N*/ else if( bSubtract ) // Subtrahieren ggf. Trennen
+/*N*/ {
+/*?*/ 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;
+/*N*/ }
+/*N*/ else // Verschmelzen
+/*N*/ {
+/*N*/ if( nLeft < (*pOld)[ nLeftPos - 1 ] )
+/*N*/ (*pOld)[ nLeftPos - 1 ] = nLeft;
+/*N*/ if( nRight > (*pOld)[ nRightPos - 1 ] )
+/*N*/ (*pOld)[ nRightPos - 1 ] = nRight;
+/*N*/ if( nRightPos - nLeftPos > 1 )
+/*?*/ pOld->Remove( nLeftPos, nRightPos - nLeftPos - 1 );
+/*N*/
+/*N*/ }
+/*N*/ nIdx = nLeftPos - 1;
+/*N*/ }
+/*N*/ delete pLongArr;
+/*N*/ }
+
+/*************************************************************************
+ * 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
+ *************************************************************************/
+
+/*N*/ USHORT SvxBoundArgs::Area( const Point& rPt )
+/*N*/ {
+/*N*/ long nB = B( rPt );
+/*N*/ if( nB >= nBottom )
+/*N*/ {
+/*N*/ if( nB >= nLower )
+/*N*/ return 5;
+/*N*/ return 1;
+/*N*/ }
+/*N*/ if( nB <= nTop )
+/*N*/ {
+/*N*/ if( nB <= nUpper )
+/*N*/ return 10;
+/*N*/ return 2;
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+/*************************************************************************
+ * 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.
+ *************************************************************************/
+
+/*N*/ long SvxBoundArgs::Cut( long nB, const Point& rPt1, const Point& rPt2 )
+/*N*/ {
+/*N*/ if( pTextRanger->IsVertical() )
+/*N*/ {
+/*?*/ double nQuot = nB - rPt1.X();
+/*?*/ nQuot /= ( rPt2.X() - rPt1.X() );
+/*?*/ nQuot *= ( rPt2.Y() - rPt1.Y() );
+/*?*/ return long( rPt1.Y() + nQuot );
+/*N*/ }
+/*N*/ double nQuot = nB - rPt1.Y();
+/*N*/ nQuot /= ( rPt2.Y() - rPt1.Y() );
+/*N*/ nQuot *= ( rPt2.X() - rPt1.X() );
+/*N*/ return long( rPt1.X() + nQuot );
+/*N*/ }
+
+/*N*/ void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea )
+/*N*/ {
+/*N*/ if( nAct )
+/*N*/ {
+/*N*/ NoteMargin( nA, nA );
+/*N*/ if( bMultiple )
+/*N*/ {
+/*N*/ NoteRange( nArea != nAct );
+/*N*/ nAct = 0;
+/*N*/ }
+/*N*/ if( !nFirst )
+/*N*/ nFirst = nArea;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nAct = nArea;
+/*N*/ nMin = nA;
+/*N*/ nMax = nA;
+/*N*/ }
+/*N*/ }
+
+/*N*/ SvLongsPtr TextRanger::GetTextRanges( const Range& rRange )
+/*N*/ {
+/*N*/ DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" );
+/*N*/ USHORT nIndex = 0;
+/*N*/ while( nIndex < nCacheSize && rRange != pRangeArr[ nIndex ] )
+/*N*/ ++nIndex;
+/*N*/ if( nIndex >= nCacheSize )
+/*N*/ {
+/*N*/ ++nCacheIdx;
+/*N*/ nCacheIdx %= nCacheSize;
+/*N*/ pRangeArr[ nCacheIdx ] = rRange;
+/*N*/ if( !pCache[ nCacheIdx ] )
+/*N*/ pCache[ nCacheIdx ] = new SvLongs( 2, 8 );
+/*N*/ nIndex = nCacheIdx;
+/*N*/ SvxBoundArgs aArg( this, pCache[ nCacheIdx ], rRange );
+/*N*/ aArg.Calc( *pPoly );
+/*N*/ if( pLine )
+/*N*/ aArg.Concat( pLine );
+/*N*/ }
+/*N*/ return pCache[ nIndex ];
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/editeng/svx_unolingu.cxx b/binfilter/bf_svx/source/editeng/svx_unolingu.cxx
new file mode 100644
index 000000000000..f9c650817839
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_unolingu.cxx
@@ -0,0 +1,657 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <unolingu.hxx>
+
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+
+#include <tools/debug.hxx>
+#include <tools/urlobj.hxx>
+#include <bf_svtools/pathoptions.hxx>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
+#include <comphelper/processfactory.hxx>
+
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+
+#include <i18npool/mslangid.hxx>
+#include <bf_svtools/lingucfg.hxx>
+#include <vcl/msgbox.hxx>
+#include <tools/shl.hxx>
+
+#include <dialmgr.hxx>
+#include "dialogs.hrc"
+#include <legacysmgr/legacy_binfilters_smgr.hxx>
+
+namespace binfilter {
+using namespace ::rtl;
+using namespace ::comphelper;
+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::linguistic2;
+
+#define A2OU(x) OUString::createFromAscii(x)
+
+///////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ static Reference< XLinguServiceManager > GetLngSvcMgr_Impl()
+/*N*/ {
+/*N*/ Reference< XLinguServiceManager > xRes;
+/*N*/ Reference< XMultiServiceFactory > xMgr = ::legacy_binfilters::getLegacyProcessServiceFactory();
+/*N*/ if (xMgr.is())
+/*N*/ {
+/*N*/ xRes = Reference< XLinguServiceManager > ( xMgr->createInstance(
+/*N*/ OUString( RTL_CONSTASCII_USTRINGPARAM(
+/*N*/ "com.sun.star.linguistic2.LinguServiceManager" ) ) ), UNO_QUERY ) ;
+/*N*/ }
+/*N*/ return xRes;
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////
+
+// static member initialization
+BOOL SvxLinguConfigUpdate::bUpdated = FALSE;
+
+/*N*/ void SvxLinguConfigUpdate::UpdateAll()
+/*N*/ {
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////
+
+
+//! Dummy implementation in order to avoid loading of lingu DLL
+//! when only the XSupportedLocales interface is used.
+//! The dummy accesses the real implementation (and thus loading the DLL)
+//! when "real" work needs to be done only.
+/*N*/ class ThesDummy_Impl :
+/*N*/ public cppu::WeakImplHelper1< XThesaurus >
+/*N*/ {
+/*N*/ Reference< XThesaurus > xThes; // the real one...
+/*N*/ Sequence< Locale > *pLocaleSeq;
+/*N*/
+/*N*/ void GetCfgLocales();
+/*N*/
+/*N*/ void GetThes_Impl();
+/*N*/
+/*N*/ public:
+/*N*/ ThesDummy_Impl() : pLocaleSeq(0) {}
+/*N*/ ~ThesDummy_Impl();
+/*N*/
+/*N*/ // XSupportedLocales
+/*N*/ virtual ::com::sun::star::uno::Sequence<
+/*N*/ ::com::sun::star::lang::Locale > SAL_CALL
+/*N*/ getLocales()
+/*N*/ throw(::com::sun::star::uno::RuntimeException);
+/*N*/ virtual sal_Bool SAL_CALL
+/*N*/ hasLocale( const ::com::sun::star::lang::Locale& rLocale )
+/*N*/ throw(::com::sun::star::uno::RuntimeException);
+/*N*/
+/*N*/ // XThesaurus
+/*N*/ virtual ::com::sun::star::uno::Sequence<
+/*N*/ ::com::sun::star::uno::Reference<
+/*N*/ ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
+/*N*/ queryMeanings( const ::rtl::OUString& rTerm,
+/*N*/ const ::com::sun::star::lang::Locale& rLocale,
+/*N*/ const ::com::sun::star::beans::PropertyValues& rProperties )
+/*N*/ throw(::com::sun::star::lang::IllegalArgumentException,
+/*N*/ ::com::sun::star::uno::RuntimeException);
+/*N*/ };
+
+
+/*N*/ ThesDummy_Impl::~ThesDummy_Impl()
+/*N*/ {
+/*N*/ delete pLocaleSeq;
+/*N*/ }
+
+
+/*N*/ void ThesDummy_Impl::GetCfgLocales()
+/*N*/ {
+/*N*/ if (!pLocaleSeq)
+/*N*/ {
+/*N*/ SvtLinguConfig aCfg;
+/*N*/ String aNode( A2OU( "ServiceManager/ThesaurusList" ) );
+/*N*/ Sequence < OUString > aNodeNames( aCfg.GetNodeNames( aNode ) );
+/*N*/ const OUString *pNodeNames = aNodeNames.getConstArray();
+/*N*/ INT32 nLen = aNodeNames.getLength();
+/*N*/ pLocaleSeq = new Sequence< Locale >( nLen );
+/*N*/ Locale *pLocale = pLocaleSeq->getArray();
+/*N*/ for (INT32 i = 0; i < nLen; ++i)
+/*N*/ {
+/*N*/ pLocale[i] = SvxCreateLocale(
+/*N*/ MsLangId::convertIsoStringToLanguage( pNodeNames[i] ) );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void ThesDummy_Impl::GetThes_Impl()
+/*N*/ {
+/*N*/ // update configuration before accessing the service
+/*N*/ if (!SvxLinguConfigUpdate::IsUpdated())
+/*?*/ SvxLinguConfigUpdate::UpdateAll();
+/*N*/
+/*N*/ if (!xThes.is())
+/*N*/ {
+/*N*/ Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
+/*N*/ if (xLngSvcMgr.is())
+/*N*/ xThes = xLngSvcMgr->getThesaurus();
+/*N*/
+/*?*/ if (xThes.is())
+/*?*/ {
+/*?*/ // no longer needed...
+/*?*/ delete pLocaleSeq; pLocaleSeq = 0;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ uno::Sequence< lang::Locale > SAL_CALL
+/*N*/ ThesDummy_Impl::getLocales()
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); uno::Sequence< lang::Locale > aa; return aa; //STRIP001
+/*N*/ }
+
+
+/*N*/ sal_Bool SAL_CALL
+/*N*/ ThesDummy_Impl::hasLocale( const lang::Locale& rLocale )
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {
+/*N*/ if (SvxLinguConfigUpdate::IsUpdated())
+/*N*/ GetThes_Impl();
+/*N*/ if (xThes.is())
+/*?*/ return xThes->hasLocale( rLocale );
+/*N*/ else if (!pLocaleSeq)
+/*N*/ GetCfgLocales();
+/*N*/ BOOL bFound = FALSE;
+/*N*/ INT32 nLen = pLocaleSeq->getLength();
+/*N*/ const Locale *pLocale = pLocaleSeq->getConstArray();
+/*N*/ const Locale *pEnd = pLocale + nLen;
+/*N*/ for ( ; pLocale < pEnd && !bFound; ++pLocale)
+/*N*/ {
+/*N*/ bFound = pLocale->Language == rLocale.Language &&
+/*N*/ pLocale->Country == rLocale.Country &&
+/*N*/ pLocale->Variant == rLocale.Variant;
+/*N*/ }
+/*N*/ return bFound;
+/*N*/ }
+
+
+/*N*/ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL
+/*N*/ ThesDummy_Impl::queryMeanings(
+/*N*/ const ::rtl::OUString& rTerm,
+/*N*/ const lang::Locale& rLocale,
+/*N*/ const beans::PropertyValues& rProperties )
+/*N*/ throw(lang::IllegalArgumentException,
+/*N*/ uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); uno::Sequence< uno::Reference< linguistic2::XMeaning > > aRes;return aRes; //STRIP001
+/*N*/ }
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+//! Dummy implementation in order to avoid loading of lingu DLL.
+//! The dummy accesses the real implementation (and thus loading the DLL)
+//! when it needs to be done only.
+/*N*/ class SpellDummy_Impl :
+/*N*/ public cppu::WeakImplHelper1< XSpellChecker1 >
+/*N*/ {
+/*N*/ Reference< XSpellChecker1 > xSpell; // the real one...
+/*N*/
+/*N*/ void GetSpell_Impl();
+/*N*/
+/*N*/ public:
+/*N*/
+/*N*/ // XSupportedLanguages (for XSpellChecker1)
+/*N*/ virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL
+/*N*/ getLanguages()
+/*N*/ throw(::com::sun::star::uno::RuntimeException);
+/*N*/ virtual sal_Bool SAL_CALL
+/*N*/ hasLanguage( sal_Int16 nLanguage )
+/*N*/ throw(::com::sun::star::uno::RuntimeException);
+/*N*/
+/*N*/ // XSpellChecker1 (same as XSpellChecker but sal_Int16 for language)
+/*N*/ virtual sal_Bool SAL_CALL
+/*N*/ isValid( const ::rtl::OUString& rWord, sal_Int16 nLanguage,
+/*N*/ const ::com::sun::star::beans::PropertyValues& rProperties )
+/*N*/ throw(::com::sun::star::lang::IllegalArgumentException,
+/*N*/ ::com::sun::star::uno::RuntimeException);
+/*N*/ virtual ::com::sun::star::uno::Reference<
+/*N*/ ::com::sun::star::linguistic2::XSpellAlternatives > SAL_CALL
+/*N*/ spell( const ::rtl::OUString& rWord, sal_Int16 nLanguage,
+/*N*/ const ::com::sun::star::beans::PropertyValues& rProperties )
+/*N*/ throw(::com::sun::star::lang::IllegalArgumentException,
+/*N*/ ::com::sun::star::uno::RuntimeException);
+/*N*/ };
+
+
+/*N*/ void SpellDummy_Impl::GetSpell_Impl()
+/*N*/ { DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+/*N*/ uno::Sequence< sal_Int16 > SAL_CALL
+/*N*/ SpellDummy_Impl::getLanguages()
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return uno::Sequence< sal_Int16 >(); //STRIP001
+/*N*/ }
+
+
+/*N*/ sal_Bool SAL_CALL
+/*N*/ SpellDummy_Impl::hasLanguage( sal_Int16 nLanguage )
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");return FALSE; //STRIP001
+/*N*/ }
+
+
+/*N*/ sal_Bool SAL_CALL
+/*N*/ SpellDummy_Impl::isValid( const ::rtl::OUString& rWord, sal_Int16 nLanguage,
+/*N*/ const beans::PropertyValues& rProperties )
+/*N*/ throw(lang::IllegalArgumentException,
+/*N*/ uno::RuntimeException)
+/*N*/ {
+/*?*/ GetSpell_Impl();
+/*?*/ BOOL bRes = TRUE;
+/*?*/ if (xSpell.is())
+/*?*/ bRes = xSpell->isValid( rWord, nLanguage, rProperties );
+/*?*/ return bRes;
+/*N*/ }
+
+
+/*N*/ uno::Reference< linguistic2::XSpellAlternatives > SAL_CALL
+/*N*/ SpellDummy_Impl::spell( const ::rtl::OUString& rWord, sal_Int16 nLanguage,
+/*N*/ const beans::PropertyValues& rProperties )
+/*N*/ throw(lang::IllegalArgumentException,
+/*N*/ uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); uno::Reference< linguistic2::XSpellAlternatives > xRes; return xRes; //STRIP001
+/*N*/ }
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+//! Dummy implementation in order to avoid loading of lingu DLL.
+//! The dummy accesses the real implementation (and thus loading the DLL)
+//! when it needs to be done only.
+/*N*/ class HyphDummy_Impl :
+/*N*/ public cppu::WeakImplHelper1< XHyphenator >
+/*N*/ {
+/*N*/ Reference< XHyphenator > xHyph; // the real one...
+/*N*/
+/*N*/ void GetHyph_Impl();
+/*N*/
+/*N*/ public:
+/*N*/
+/*N*/ // XSupportedLocales
+/*N*/ virtual ::com::sun::star::uno::Sequence<
+/*N*/ ::com::sun::star::lang::Locale > SAL_CALL
+/*N*/ getLocales()
+/*N*/ throw(::com::sun::star::uno::RuntimeException);
+/*N*/ virtual sal_Bool SAL_CALL
+/*N*/ hasLocale( const ::com::sun::star::lang::Locale& rLocale )
+/*N*/ throw(::com::sun::star::uno::RuntimeException);
+/*N*/
+/*N*/ // XHyphenator
+/*N*/ virtual ::com::sun::star::uno::Reference<
+/*N*/ ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
+/*N*/ hyphenate( const ::rtl::OUString& rWord,
+/*N*/ const ::com::sun::star::lang::Locale& rLocale,
+/*N*/ sal_Int16 nMaxLeading,
+/*N*/ const ::com::sun::star::beans::PropertyValues& rProperties )
+/*N*/ throw(::com::sun::star::lang::IllegalArgumentException,
+/*N*/ ::com::sun::star::uno::RuntimeException);
+/*N*/ virtual ::com::sun::star::uno::Reference<
+/*N*/ ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
+/*N*/ queryAlternativeSpelling( const ::rtl::OUString& rWord,
+/*N*/ const ::com::sun::star::lang::Locale& rLocale,
+/*N*/ sal_Int16 nIndex,
+/*N*/ const ::com::sun::star::beans::PropertyValues& rProperties )
+/*N*/ throw(::com::sun::star::lang::IllegalArgumentException,
+/*N*/ ::com::sun::star::uno::RuntimeException);
+/*N*/ virtual ::com::sun::star::uno::Reference<
+/*N*/ ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL
+/*N*/ createPossibleHyphens(
+/*N*/ const ::rtl::OUString& rWord,
+/*N*/ const ::com::sun::star::lang::Locale& rLocale,
+/*N*/ const ::com::sun::star::beans::PropertyValues& rProperties )
+/*N*/ throw(::com::sun::star::lang::IllegalArgumentException,
+/*N*/ ::com::sun::star::uno::RuntimeException);
+/*N*/ };
+
+
+/*N*/ void HyphDummy_Impl::GetHyph_Impl()
+/*N*/ {
+/*N*/ // update configuration before accessing the service
+/*N*/ if (!SvxLinguConfigUpdate::IsUpdated())
+/*N*/ SvxLinguConfigUpdate::UpdateAll();
+/*N*/
+/*N*/ if (!xHyph.is())
+/*N*/ {
+/*N*/ Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
+/*N*/ if (xLngSvcMgr.is())
+/*N*/ xHyph = xLngSvcMgr->getHyphenator();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ uno::Sequence< lang::Locale > SAL_CALL
+/*N*/ HyphDummy_Impl::getLocales()
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return uno::Sequence< lang::Locale >();//STRIP001
+/*N*/ }
+
+
+/*N*/ sal_Bool SAL_CALL
+/*N*/ HyphDummy_Impl::hasLocale( const lang::Locale& rLocale )
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {
+/*N*/ GetHyph_Impl();
+/*N*/ BOOL bRes = FALSE;
+/*N*/ if (xHyph.is())
+/*N*/ bRes = xHyph->hasLocale( rLocale );
+/*N*/ return bRes;
+/*N*/ }
+
+
+/*N*/ uno::Reference< linguistic2::XHyphenatedWord > SAL_CALL
+/*N*/ HyphDummy_Impl::hyphenate(
+/*N*/ const ::rtl::OUString& rWord,
+/*N*/ const lang::Locale& rLocale,
+/*N*/ sal_Int16 nMaxLeading,
+/*N*/ const beans::PropertyValues& rProperties )
+/*N*/ throw(lang::IllegalArgumentException,
+/*N*/ uno::RuntimeException)
+/*N*/ {
+/*N*/ GetHyph_Impl();
+/*N*/ uno::Reference< linguistic2::XHyphenatedWord > xRes;
+/*N*/ if (xHyph.is())
+/*N*/ xRes = xHyph->hyphenate( rWord, rLocale, nMaxLeading, rProperties );
+/*N*/ return xRes;
+/*N*/ }
+
+
+/*N*/ uno::Reference< linguistic2::XHyphenatedWord > SAL_CALL
+/*N*/ HyphDummy_Impl::queryAlternativeSpelling(
+/*N*/ const ::rtl::OUString& rWord,
+/*N*/ const lang::Locale& rLocale,
+/*N*/ sal_Int16 nIndex,
+/*N*/ const PropertyValues& rProperties )
+/*N*/ throw(lang::IllegalArgumentException,
+/*N*/ uno::RuntimeException)
+/*N*/ {
+/*N*/ GetHyph_Impl();
+/*N*/ uno::Reference< linguistic2::XHyphenatedWord > xRes;
+/*N*/ if (xHyph.is())
+/*N*/ xRes = xHyph->queryAlternativeSpelling( rWord, rLocale, nIndex, rProperties );
+/*N*/ return xRes;
+/*N*/ }
+
+
+/*N*/ uno::Reference< linguistic2::XPossibleHyphens > SAL_CALL
+/*N*/ HyphDummy_Impl::createPossibleHyphens(
+/*N*/ const ::rtl::OUString& rWord,
+/*N*/ const lang::Locale& rLocale,
+/*N*/ const beans::PropertyValues& rProperties )
+/*N*/ throw(lang::IllegalArgumentException,
+/*N*/ uno::RuntimeException)
+/*N*/ {
+/*?*/ GetHyph_Impl();
+/*?*/ uno::Reference< linguistic2::XPossibleHyphens > xRes;
+/*?*/ if (xHyph.is())
+/*?*/ xRes = xHyph->createPossibleHyphens( rWord, rLocale, rProperties );
+/*?*/ return xRes;
+/*N*/ }
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ typedef cppu::WeakImplHelper1 < XEventListener > LinguMgrAppExitLstnrBaseClass;
+
+/*N*/ class LinguMgrAppExitLstnr : public LinguMgrAppExitLstnrBaseClass
+/*N*/ {
+/*N*/ Reference< XComponent > xDesktop;
+/*N*/
+/*N*/ public:
+/*N*/ LinguMgrAppExitLstnr();
+/*N*/ virtual ~LinguMgrAppExitLstnr();
+/*N*/
+/*N*/ virtual void AtExit() = 0;
+/*N*/
+/*N*/
+/*N*/ // lang::XEventListener
+/*N*/ virtual void SAL_CALL disposing(const EventObject& rSource)
+/*N*/ throw( RuntimeException );
+/*N*/ };
+
+/*N*/ LinguMgrAppExitLstnr::LinguMgrAppExitLstnr()
+/*N*/ {
+/*N*/ // add object to frame::Desktop EventListeners in order to properly call
+/*N*/ // the AtExit function at appliction exit.
+/*N*/
+/*N*/ Reference< XMultiServiceFactory > xMgr = ::legacy_binfilters::getLegacyProcessServiceFactory();
+/*N*/ if ( xMgr.is() )
+/*N*/ {
+/*N*/ xDesktop = Reference< XComponent > ( xMgr->createInstance(
+/*N*/ OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.frame.Desktop" ) ) ), UNO_QUERY ) ;
+/*N*/ if (xDesktop.is())
+/*N*/ xDesktop->addEventListener( this );
+/*N*/ }
+/*N*/ }
+
+/*N*/ LinguMgrAppExitLstnr::~LinguMgrAppExitLstnr()
+/*N*/ {
+/*N*/ if (xDesktop.is())
+/*N*/ {
+/*?*/ xDesktop->removeEventListener( this );
+/*?*/ xDesktop = NULL; //! release reference to desktop
+/*N*/ }
+/*N*/ DBG_ASSERT(!xDesktop.is(), "reference to desktop should be realeased");
+/*N*/ }
+
+/*N*/ void LinguMgrAppExitLstnr::disposing(const EventObject& rSource)
+/*N*/ throw( RuntimeException )
+/*N*/ {
+/*N*/ if (xDesktop.is() && rSource.Source == xDesktop)
+/*N*/ {
+/*N*/ xDesktop->removeEventListener( this );
+/*N*/ xDesktop = NULL; //! release reference to desktop
+/*N*/
+/*N*/ AtExit();
+/*N*/ }
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////
+
+/*N*/ class LinguMgrExitLstnr : public LinguMgrAppExitLstnr
+/*N*/ {
+/*N*/ public:
+/*N*/ virtual void AtExit();
+/*N*/ };
+
+/*N*/ void LinguMgrExitLstnr::AtExit()
+/*N*/ {
+/*N*/ // release references
+/*N*/ LinguMgr::xLngSvcMgr = 0;
+/*N*/ LinguMgr::xSpell = 0;
+/*N*/ LinguMgr::xHyph = 0;
+/*N*/ LinguMgr::xThes = 0;
+/*N*/ LinguMgr::xDicList = 0;
+/*N*/ LinguMgr::xProp = 0;
+/*N*/ LinguMgr::xIgnoreAll = 0;
+/*N*/ LinguMgr::xChangeAll = 0;
+/*N*/
+/*N*/ LinguMgr::bExiting = sal_True;
+/*N*/
+/*N*/ //TL:TODO: MBA fragen wie ich ohne Absturz hier meinen Speicher
+/*N*/ // wieder freibekomme...
+/*N*/ //delete LinguMgr::pExitLstnr;
+/*N*/ LinguMgr::pExitLstnr = 0;
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////
+
+
+// static member initialization
+/*N*/ LinguMgrExitLstnr * LinguMgr::pExitLstnr = 0;
+/*N*/ sal_Bool LinguMgr::bExiting = sal_False;
+/*N*/ Reference< XLinguServiceManager > LinguMgr::xLngSvcMgr = 0;
+/*N*/ Reference< XSpellChecker1 > LinguMgr::xSpell = 0;
+/*N*/ Reference< XHyphenator > LinguMgr::xHyph = 0;
+/*N*/ Reference< XThesaurus > LinguMgr::xThes = 0;
+/*N*/ Reference< XDictionaryList > LinguMgr::xDicList = 0;
+/*N*/ Reference< XPropertySet > LinguMgr::xProp = 0;
+/*N*/ Reference< XDictionary1 > LinguMgr::xIgnoreAll = 0;
+/*N*/ Reference< XDictionary1 > LinguMgr::xChangeAll = 0;
+
+/*N*/ Reference< XHyphenator > LinguMgr::GetHyphenator()
+/*N*/ {
+/*N*/ return xHyph.is() ? xHyph : GetHyph();
+/*N*/ }
+
+/*N*/ Reference< XDictionaryList > LinguMgr::GetDictionaryList()
+/*N*/ {
+/*N*/ return xDicList.is() ? xDicList : GetDicList();
+/*N*/ }
+
+/*N*/ Reference< XHyphenator > LinguMgr::GetHyph()
+/*N*/ {
+/*N*/ if (bExiting)
+/*N*/ return 0;
+/*N*/
+/*N*/ if (!pExitLstnr)
+/*N*/ pExitLstnr = new LinguMgrExitLstnr;
+/*N*/
+/*N*/ //! use dummy implementation in order to avoid loading of lingu DLL
+/*N*/ xHyph = new HyphDummy_Impl;
+/*N*/
+/*
+ if (!xLngSvcMgr.is())
+ xLngSvcMgr = GetLngSvcMgr_Impl();
+
+ if (xLngSvcMgr.is())
+ {
+ xHyph = xLngSvcMgr->getHyphenator();
+ }
+*/
+/*N*/ return xHyph;
+/*N*/ }
+
+/*N*/ Reference< XDictionaryList > LinguMgr::GetDicList()
+/*N*/ {
+/*N*/ if (bExiting)
+/*N*/ return 0;
+/*N*/
+/*N*/ if (!pExitLstnr)
+/*N*/ pExitLstnr = new LinguMgrExitLstnr;
+/*N*/
+/*N*/ Reference< XMultiServiceFactory > xMgr( ::legacy_binfilters::getLegacyProcessServiceFactory() );
+/*N*/ if (xMgr.is())
+/*N*/ {
+/*N*/ xDicList = Reference< XDictionaryList > ( xMgr->createInstance(
+/*N*/ A2OU("com.sun.star.linguistic2.DictionaryList") ), UNO_QUERY );
+/*N*/ }
+/*N*/ return xDicList;
+/*N*/ }
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+//TL:TODO: remove argument or provide SvxGetIgnoreAllList with the same one
+
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
+
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+//TL:TODO: soll mal den rictigen Rückgabetyp bekommen!
+
+
+
+/*N*/ LanguageType SvxLocaleToLanguage( const Locale& rLocale )
+/*N*/ {
+/*N*/ // empty Locale -> LANGUAGE_NONE
+/*N*/ if ( rLocale.Language.getLength() == 0 )
+/*N*/ return LANGUAGE_NONE;
+/*N*/
+/*N*/ return MsLangId::convertLocaleToLanguage( rLocale );
+/*N*/ }
+
+/*N*/ Locale& SvxLanguageToLocale( Locale& rLocale, LanguageType eLang )
+/*N*/ {
+/*N*/ if ( eLang != LANGUAGE_NONE /* && eLang != LANGUAGE_SYSTEM */)
+/*N*/ MsLangId::convertLanguageToLocale( eLang, rLocale );
+/*N*/ else
+/*N*/ rLocale = Locale();
+/*N*/
+/*N*/ return rLocale;
+/*N*/ }
+
+/*N*/ Locale SvxCreateLocale( LanguageType eLang )
+/*N*/ {
+/*N*/ Locale aLocale;
+/*N*/ if ( eLang != LANGUAGE_NONE /* && eLang != LANGUAGE_SYSTEM */)
+/*N*/ MsLangId::convertLanguageToLocale( eLang, aLocale );
+/*N*/
+/*N*/ return aLocale;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/makefile.mk b/binfilter/bf_svx/source/engine3d/makefile.mk
new file mode 100644
index 000000000000..03b7fcec76c9
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/makefile.mk
@@ -0,0 +1,77 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_engine3d
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+SRS1NAME=svx_engine3d
+SRC1FILES=\
+ svx_float3d.src
+
+SLOFILES= \
+ $(SLO)$/svx_svx3ditems.obj \
+ $(SLO)$/svx_deflt3d.obj \
+ $(SLO)$/svx_class3d.obj \
+ $(SLO)$/svx_volume3d.obj \
+ $(SLO)$/svx_viewpt3d.obj \
+ $(SLO)$/svx_camera3d.obj \
+ $(SLO)$/svx_poly3d.obj \
+ $(SLO)$/svx_polygn3d.obj \
+ $(SLO)$/svx_objfac3d.obj \
+ $(SLO)$/svx_obj3d.obj \
+ $(SLO)$/svx_light3d.obj \
+ $(SLO)$/svx_dlight3d.obj \
+ $(SLO)$/svx_plight3d.obj \
+ $(SLO)$/svx_pntobj3d.obj \
+ $(SLO)$/svx_polyob3d.obj \
+ $(SLO)$/svx_scene3d.obj \
+ $(SLO)$/svx_polysc3d.obj \
+ $(SLO)$/svx_cube3d.obj \
+ $(SLO)$/svx_sphere3d.obj \
+ $(SLO)$/svx_extrud3d.obj \
+ $(SLO)$/svx_lathe3d.obj \
+ $(SLO)$/svx_label3d.obj \
+ $(SLO)$/svx_view3d.obj \
+ $(SLO)$/svx_e3dcmpt.obj
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/engine3d/svx_camera3d.cxx b/binfilter/bf_svx/source/engine3d/svx_camera3d.cxx
new file mode 100644
index 000000000000..193434037740
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_camera3d.cxx
@@ -0,0 +1,393 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "camera3d.hxx"
+
+
+#include <svdio.hxx>
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ Camera3D::Camera3D(const Vector3D& rPos, const Vector3D& rLookAt,
+/*N*/ double fFocalLen, double fBankAng) :
+/*N*/ aResetPos(rPos),
+/*N*/ aResetLookAt(rLookAt),
+/*N*/ fResetFocalLength(fFocalLen),
+/*N*/ fResetBankAngle(fBankAng),
+/*N*/ fBankAngle(fBankAng),
+/*N*/ bAutoAdjustProjection(TRUE)
+/*N*/ {
+/*N*/ SetVPD(0);
+/*N*/ SetPosition(rPos);
+/*N*/ SetLookAt(rLookAt);
+/*N*/ SetFocalLength(fFocalLen);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Default-Konstruktor
+|*
+\************************************************************************/
+
+/*?*/ Camera3D::Camera3D()
+/*?*/ {
+/*?*/ Vector3D aVector3D(0,0,1);
+/*?*/ Camera3D(aVector3D, Vector3D());
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::Reset()
+/*N*/ {
+/*N*/ SetVPD(0);
+/*N*/ fBankAngle = fResetBankAngle;
+/*N*/ SetPosition(aResetPos);
+/*N*/ SetLookAt(aResetLookAt);
+/*N*/ SetFocalLength(fResetFocalLength);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Defaultwerte fuer Reset setzen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetDefaults(const Vector3D& rPos, const Vector3D& rLookAt,
+/*N*/ double fFocalLen, double fBankAng)
+/*N*/ {
+/*N*/ aResetPos = rPos;
+/*N*/ aResetLookAt = rLookAt;
+/*N*/ fResetFocalLength = fFocalLen;
+/*N*/ fResetBankAngle = fBankAng;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ViewWindow setzen und PRP anpassen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetViewWindow(double fX, double fY, double fW, double fH)
+/*N*/ {
+/*N*/ Viewport3D::SetViewWindow(fX, fY, fW, fH);
+/*N*/ if ( bAutoAdjustProjection )
+/*N*/ SetFocalLength(fFocalLength);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Kameraposition setzen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetPosition(const Vector3D& rNewPos)
+/*N*/ {
+/*N*/ if ( rNewPos != aPosition )
+/*N*/ {
+/*N*/ aPosition = rNewPos;
+/*N*/ SetVRP(aPosition);
+/*N*/ SetVPN(aPosition - aLookAt);
+/*N*/ SetBankAngle(fBankAngle);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Blickpunkt setzen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetLookAt(const Vector3D& rNewLookAt)
+/*N*/ {
+/*N*/ if ( rNewLookAt != aLookAt )
+/*N*/ {
+/*N*/ aLookAt = rNewLookAt;
+/*N*/ SetVPN(aPosition - aLookAt);
+/*N*/ SetBankAngle(fBankAngle);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Position und Blickpunkt setzen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetPosAndLookAt(const Vector3D& rNewPos,
+/*N*/ const Vector3D& rNewLookAt)
+/*N*/ {
+/*N*/ if ( rNewPos != aPosition || rNewLookAt != aLookAt )
+/*N*/ {
+/*N*/ aPosition = rNewPos;
+/*N*/ aLookAt = rNewLookAt;
+/*N*/
+/*N*/ SetVRP(aPosition);
+/*N*/ SetVPN(aPosition - aLookAt);
+/*N*/ SetBankAngle(fBankAngle);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* seitlichen Neigungswinkel setzen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetBankAngle(double fAngle)
+/*N*/ {
+/*N*/ Vector3D aDiff = aPosition - aLookAt;
+/*N*/ Vector3D aPrj = aDiff;
+/*N*/
+/*N*/ fBankAngle = fAngle;
+/*N*/
+/*N*/ if ( aDiff.Y() == 0 )
+/*N*/ aPrj.Y() = -1;
+/*N*/ else
+/*N*/ { // aPrj = Projektion von aDiff auf die XZ-Ebene
+/*N*/ aPrj.Y() = 0;
+/*N*/ if ( aDiff.Y() < 0 )
+/*N*/ aPrj = -aPrj;
+/*N*/ }
+/*N*/ // von aDiff nach oben zeigenden View-Up-Vektor berechnen
+/*N*/ aPrj |= aDiff;
+/*N*/ aPrj |= aDiff;
+/*N*/ aDiff.Normalize();
+/*N*/
+/*N*/ // auf Z-Achse rotieren, dort um BankAngle drehen und zurueck
+/*N*/ Matrix4D aTf;
+/*N*/ double fV = sqrt(aDiff.Y() * aDiff.Y() + aDiff.Z() * aDiff.Z());
+/*N*/
+/*N*/ if ( fV != 0 )
+/*N*/ aTf.RotateX(aDiff.Y() / fV, aDiff.Z() / fV);
+/*N*/ aTf.RotateY(-aDiff.X(), fV);
+/*N*/ aTf.RotateZ(fBankAngle);
+/*N*/ aTf.RotateY(aDiff.X(), fV);
+/*N*/ if ( fV != 0 )
+/*N*/ aTf.RotateX(-aDiff.Y() / fV, aDiff.Z() / fV);
+/*N*/
+/*N*/ SetVUV(aTf * aPrj);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Brennweite setzen
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::SetFocalLength(double fLen)
+/*N*/ {
+/*N*/ if ( fLen < 5 )
+/*N*/ fLen = 5;
+/*N*/ SetPRP(Vector3D(0, 0, fLen / 35.0 * aViewWin.W));
+/*N*/ fFocalLength = fLen;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Um den Blickpunkt drehen, Position wird dabei veraendert
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::RotateAroundLookAt(double fHAngle, double fVAngle)
+/*N*/ {
+/*N*/ Matrix4D aTf;
+/*N*/ Vector3D aDiff = aPosition - aLookAt;
+/*N*/ double fV = sqrt(aDiff.X() * aDiff.X() + aDiff.Z() * aDiff.Z());
+/*N*/
+/*N*/ if ( fV != 0 ) aTf.RotateY(aDiff.Z() / fV, aDiff.X() / fV);
+/*N*/ aTf.RotateZ(fVAngle);
+/*N*/ if ( fV != 0 ) aTf.RotateY(-aDiff.Z() / fV, aDiff.X() / fV);
+/*N*/ aTf.RotateY(fHAngle);
+/*N*/
+/*N*/ aDiff *= aTf;
+/*N*/ SetPosition(aLookAt + aDiff);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Camera3D fuer die Filerevision 3.1
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::WriteData31(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ Viewport3D::WriteData(rOut);
+/*N*/
+/*N*/ rOut << aResetPos;
+/*N*/ rOut << aResetLookAt;
+/*N*/ rOut << fResetFocalLength;
+/*N*/ rOut << fResetBankAngle;
+/*N*/ rOut << aPosition;
+/*N*/ rOut << aLookAt;
+/*N*/ rOut << fFocalLength;
+/*N*/ rOut << fBankAngle;
+/*N*/ rOut << BOOL(bAutoAdjustProjection);
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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.
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/
+/*N*/ if (rOut.GetVersion() < 3560) // FG: Ab der Release 356 wurde das Fileformat geaendert
+/*N*/ { // Falls das Format der Version 31 geschrieben werden soll
+/*N*/ WriteData31(rOut); // muss am Stream die Version der 3.1 gesetzt sein.
+/*N*/ return; // Im Prinzip kann man auf diese Art auch Zwischenversionen
+/*N*/ } // erzeugen.
+/*N*/
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("Camera3D");
+/*N*/ #endif
+/*N*/ Viewport3D::WriteData(rOut);
+/*N*/
+/*N*/ rOut << aResetPos; // Alles Vektoren 3*double
+/*N*/ rOut << aResetLookAt;
+/*N*/ rOut << fResetFocalLength;
+/*N*/ rOut << fResetBankAngle;
+/*N*/ rOut << aPosition;
+/*N*/ rOut << aLookAt;
+/*N*/ rOut << fFocalLength;
+/*N*/ rOut << fBankAngle;
+/*N*/ rOut << BOOL(bAutoAdjustProjection);
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if ( rIn.GetError() != SVSTREAM_OK )
+/*N*/ return;
+/*N*/
+/*N*/ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+/*N*/ {
+/*N*/ ReadData31(rIn);
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("Camera3D");
+/*N*/ #endif
+/*N*/
+/*N*/ Viewport3D::ReadData(rHead, rIn);
+/*N*/
+/*N*/ BOOL bTmp;
+/*N*/
+/*N*/ rIn >> aResetPos;
+/*N*/ rIn >> aResetLookAt;
+/*N*/ rIn >> fResetFocalLength;
+/*N*/ rIn >> fResetBankAngle;
+/*N*/ rIn >> aPosition;
+/*N*/ rIn >> aLookAt;
+/*N*/ rIn >> fFocalLength;
+/*N*/ rIn >> fBankAngle;
+/*N*/ rIn >> bTmp; bAutoAdjustProjection = bTmp;
+/*N*/
+/*N*/ SetVPD(0);
+/*N*/ SetPosAndLookAt(aPosition, aLookAt);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+/*N*/ void Camera3D::ReadData31(SvStream& rIn)
+/*N*/ {
+/*N*/ if ( rIn.GetError() != SVSTREAM_OK )
+/*N*/ return;
+/*N*/
+/*N*/ Viewport3D::ReadData31 (rIn);
+/*N*/
+/*N*/ BOOL bTmp;
+/*N*/
+/*N*/ rIn >> aResetPos;
+/*N*/ rIn >> aResetLookAt;
+/*N*/ rIn >> fResetFocalLength;
+/*N*/ rIn >> fResetBankAngle;
+/*N*/ rIn >> aPosition;
+/*N*/ rIn >> aLookAt;
+/*N*/ rIn >> fFocalLength;
+/*N*/ rIn >> fBankAngle;
+/*N*/ rIn >> bTmp; bAutoAdjustProjection = bTmp;
+/*N*/
+/*N*/ SetVPD(0);
+/*N*/ SetPosAndLookAt(aPosition, aLookAt);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator<<(SvStream& rOStream, const Camera3D& rCam)
+/*N*/ {
+/*N*/ rCam.WriteData31(rOStream);
+/*N*/ return rOStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator>>(SvStream& rIStream, Camera3D& rCam)
+/*N*/ {
+/*N*/ rCam.ReadData31(rIStream);
+/*N*/ return rIStream;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_class3d.cxx b/binfilter/bf_svx/source/engine3d/svx_class3d.cxx
new file mode 100644
index 000000000000..28ffed6999bb
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_class3d.cxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+
+#include "matrix3d.hxx"
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Cast-Operator auf homogene 4x4 Matrix
+|*
+\************************************************************************/
+
+/*N*/ Old_Matrix3D::operator Matrix4D()
+/*N*/ {
+/*N*/ Matrix4D aNewMat;
+/*N*/
+/*N*/ aNewMat[0] = Point4D(M[0], aTranslation[0]);
+/*N*/ aNewMat[1] = Point4D(M[1], aTranslation[1]);
+/*N*/ aNewMat[2] = Point4D(M[2], aTranslation[2]);
+/*N*/
+/*N*/ return aNewMat;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungs-Operator mit homogener 4x4 Matrix
+|*
+\************************************************************************/
+
+/*N*/ Old_Matrix3D Old_Matrix3D::operator=(const Matrix4D& rMat)
+/*N*/ {
+/*N*/ M[0] = Vector3D(rMat[0][0], rMat[0][1], rMat[0][2]);
+/*N*/ M[1] = Vector3D(rMat[1][0], rMat[1][1], rMat[1][2]);
+/*N*/ M[2] = Vector3D(rMat[2][0], rMat[2][1], rMat[2][2]);
+/*N*/ aTranslation = Vector3D(rMat[0][3], rMat[1][3], rMat[2][3]);
+/*N*/
+/*N*/ return *this;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Matrix3D
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator>>(SvStream& rIStream, Old_Matrix3D& rMatrix3D)
+/*N*/ {
+/*N*/ for (int i = 0; i < 3; i++)
+/*N*/ rIStream >> rMatrix3D.M[i];
+/*N*/
+/*N*/ rIStream >> rMatrix3D.aTranslation;
+/*N*/
+/*N*/ return rIStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Matrix3D
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator<<(SvStream& rOStream, const Old_Matrix3D& rMatrix3D)
+/*N*/ {
+/*N*/ for (int i = 0; i < 3; i++)
+/*N*/ rOStream << rMatrix3D.M[i];
+/*N*/
+/*N*/ rOStream << rMatrix3D.aTranslation;
+/*N*/
+/*N*/ return rOStream;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_cube3d.cxx b/binfilter/bf_svx/source/engine3d/svx_cube3d.cxx
new file mode 100644
index 000000000000..4f561cecc2d7
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_cube3d.cxx
@@ -0,0 +1,336 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdstr.hrc"
+
+#include "cube3d.hxx"
+
+#include "globl3d.hxx"
+
+
+
+#include "e3dcmpt.hxx"
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dCubeObj, E3dCompoundObject);
+
+/*N*/ E3dCubeObj::E3dCubeObj()
+/*N*/ : E3dCompoundObject()
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ E3dDefaultAttributes aDefault;
+/*N*/ SetDefaultAttributes(aDefault);
+/*N*/ }
+
+/*N*/ void E3dCubeObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+/*N*/ {
+/*N*/ aCubePos = rDefault.GetDefaultCubePos();
+/*N*/ aCubeSize = rDefault.GetDefaultCubeSize();
+/*N*/ nSideFlags = rDefault.GetDefaultCubeSideFlags();
+/*N*/ bPosIsCenter = rDefault.GetDefaultCubePosIsCenter();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dCubeObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_CUBEOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus 6 Polygonen
+|*
+\************************************************************************/
+
+/*N*/ SdrObject *E3dCubeObj::DoConvertToPolyObj(BOOL bBezier) const
+/*N*/ {
+/*N*/ return NULL;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Give out simple line geometry
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dCubeObj::CreateGeometry()
+/*N*/ {
+/*N*/ Vector3D aPos(aCubePos);
+/*N*/ Polygon3D aRect3D(4);
+/*N*/ Polygon3D aNormals3D(4);
+/*N*/ Polygon3D aTexture3D(4);
+/*N*/ short nV1, nV2;
+/*N*/ UINT16 nSideBit = 0x0001;
+/*N*/
+/*N*/ // Start der Geometrieerzeugung ankuendigen
+/*N*/ StartCreateGeometry();
+/*N*/
+/*N*/ if ( bPosIsCenter )
+/*?*/ aCubePos -= aCubeSize / 2;
+/*N*/
+/*N*/ for (nV1 = 0; nV1 < 3; nV1++)
+/*N*/ {
+/*N*/ if ( nV1 == 0 ) nV2 = 2;
+/*N*/ else nV2 = nV1 - 1;
+/*N*/
+/*N*/ // Nur die Flaechen erzeugen, fuer die ein Bit
+/*N*/ if ( nSideFlags & nSideBit )
+/*N*/ { // Flaechenpunkte entgegen dem Uhrzeigersinn generieren
+/*N*/ aRect3D[0] = aPos; aPos[nV1] += aCubeSize[nV1];
+/*N*/ aRect3D[1] = aPos; aPos[nV2] += aCubeSize[nV2];
+/*N*/ aRect3D[2] = aPos; aPos[nV1] -= aCubeSize[nV1];
+/*N*/ aRect3D[3] = aPos; aPos[nV2] -= aCubeSize[nV2];
+/*N*/
+/*N*/ if(GetCreateNormals())
+/*N*/ {
+/*N*/ aNormals3D = aRect3D;
+/*N*/ aNormals3D[0].Normalize();
+/*N*/ aNormals3D[1].Normalize();
+/*N*/ aNormals3D[2].Normalize();
+/*N*/ aNormals3D[3].Normalize();
+/*N*/
+/*N*/ if(GetCreateTexture())
+/*N*/ {
+/*N*/ aTexture3D[1].X() = 0.0;
+/*N*/ aTexture3D[1].Y() = 0.0;
+/*N*/
+/*N*/ aTexture3D[0].X() = 1.0;
+/*N*/ aTexture3D[0].Y() = 0.0;
+/*N*/
+/*N*/ aTexture3D[2].X() = 0.0;
+/*N*/ aTexture3D[2].Y() = 1.0;
+/*N*/
+/*N*/ aTexture3D[3].X() = 1.0;
+/*N*/ aTexture3D[3].Y() = 1.0;
+/*N*/
+/*N*/ AddGeometry(aRect3D, aNormals3D, aTexture3D, FALSE);
+/*N*/ }
+/*N*/ else
+/*?*/ AddGeometry(aRect3D, aNormals3D, FALSE);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ AddGeometry(aRect3D, FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/ nSideBit <<= 1;
+/*N*/ }
+/*N*/ aPos += aCubeSize;
+/*N*/
+/*N*/ for (nV1 = 2; nV1 >= 0; nV1--)
+/*N*/ {
+/*N*/ if ( nV1 == 2 ) nV2 = 0;
+/*N*/ else nV2 = nV1 + 1;
+/*N*/
+/*N*/ if ( nSideFlags & nSideBit )
+/*N*/ { // Flaechenpunkte entgegen dem Uhrzeigersinn generieren
+/*N*/ aRect3D[0] = aPos; aPos[nV1] -= aCubeSize[nV1];
+/*N*/ aRect3D[1] = aPos; aPos[nV2] -= aCubeSize[nV2];
+/*N*/ aRect3D[2] = aPos; aPos[nV1] += aCubeSize[nV1];
+/*N*/ aRect3D[3] = aPos; aPos[nV2] += aCubeSize[nV2];
+/*N*/
+/*N*/ if(GetCreateTexture())
+/*N*/ {
+/*N*/ aTexture3D[1].X() = 0.0;
+/*N*/ aTexture3D[1].Y() = 0.0;
+/*N*/
+/*N*/ aTexture3D[0].X() = 1.0;
+/*N*/ aTexture3D[0].Y() = 0.0;
+/*N*/
+/*N*/ aTexture3D[2].X() = 0.0;
+/*N*/ aTexture3D[2].Y() = 1.0;
+/*N*/
+/*N*/ aTexture3D[3].X() = 1.0;
+/*N*/ aTexture3D[3].Y() = 1.0;
+/*N*/ }
+/*N*/
+/*N*/ if(GetCreateNormals())
+/*N*/ {
+/*N*/ aNormals3D = aRect3D;
+/*N*/ aNormals3D[0].Normalize();
+/*N*/ aNormals3D[1].Normalize();
+/*N*/ aNormals3D[2].Normalize();
+/*N*/ aNormals3D[3].Normalize();
+/*N*/
+/*N*/ if(GetCreateTexture())
+/*N*/ AddGeometry(aRect3D, aNormals3D, aTexture3D, FALSE);
+/*N*/ else
+/*?*/ AddGeometry(aRect3D, aNormals3D, FALSE);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ AddGeometry(aRect3D, FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/ nSideBit <<= 1;
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dCubeObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+/*?*/ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+/*N*/ }
+/*N*/
+/*N*/ // call parent, schreibt die SubList (alte Geometrie) raus
+/*N*/ E3dCompoundObject::WriteData(rOut);
+/*N*/
+/*N*/ E3dIOCompat aCompat(rOut, STREAM_WRITE, 1);
+/*N*/ rOut << aCubePos;
+/*N*/ rOut << aCubeSize;
+/*N*/ rOut << BOOL(bPosIsCenter);
+/*N*/ rOut << nSideFlags;
+/*N*/
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+/*?*/ ((E3dCompoundObject*)this)->ReCreateGeometry();
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dCubeObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ BOOL bAllDone(FALSE);
+/*N*/ if(AreBytesLeft())
+/*N*/ {
+/*N*/ E3dIOCompat aIoCompat(rIn, STREAM_READ);
+/*N*/ if(aIoCompat.GetVersion() >= 1)
+/*N*/ {
+/*N*/ BOOL bTmp;
+/*N*/ rIn >> aCubePos;
+/*N*/ rIn >> aCubeSize;
+/*N*/ rIn >> bTmp; bPosIsCenter = bTmp;
+/*N*/ rIn >> nSideFlags;
+/*N*/ bAllDone = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(!bAllDone)
+/*N*/ {
+/*N*/ // Geometrie aus erzeugten PolyObj's rekonstruieren
+/*N*/ const Volume3D& rVolume = GetLocalBoundVolume();
+/*N*/ aCubeSize = rVolume.MaxVec() - rVolume.MinVec();
+/*N*/ aCubePos = rVolume.MinVec();
+/*N*/ bPosIsCenter = FALSE;
+/*N*/ nSideFlags = CUBE_FULL;
+/*N*/ }
+/*N*/
+/*N*/ // Geometrie neu erzeugen, mit oder ohne E3dPolyObj's
+/*N*/ ReCreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dCubeObj::SetCubePos(const Vector3D& rNew)
+/*N*/ {
+/*N*/ if(aCubePos != rNew)
+/*N*/ {
+/*N*/ aCubePos = rNew;
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCubeObj::SetCubeSize(const Vector3D& rNew)
+/*N*/ {
+/*N*/ if(aCubeSize != rNew)
+/*N*/ {
+/*N*/ aCubeSize = rNew;
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCubeObj::SetPosIsCenter(BOOL bNew)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_deflt3d.cxx b/binfilter/bf_svx/source/engine3d/svx_deflt3d.cxx
new file mode 100644
index 000000000000..13c627925ab2
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_deflt3d.cxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+
+#include "cube3d.hxx"
+
+#include "svxids.hrc"
+
+
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Klasse zum verwalten der 3D-Default Attribute
+|*
+\************************************************************************/
+
+// Konstruktor
+/*N*/ E3dDefaultAttributes::E3dDefaultAttributes()
+/*N*/ {
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ void E3dDefaultAttributes::Reset()
+/*N*/ {
+/*N*/ // Compound-Objekt
+/*N*/ // aDefaultFrontMaterial;
+/*N*/ // aDefaultBackMaterial;
+/*N*/ bDefaultCreateNormals = TRUE;
+/*N*/ bDefaultCreateTexture = TRUE;
+/*N*/ bDefaultUseDifferentBackMaterial = FALSE;
+/*N*/
+/*N*/ // Cube-Objekt
+/*N*/ aDefaultCubePos = Vector3D(-500.0, -500.0, -500.0);
+/*N*/ aDefaultCubeSize = Vector3D(1000.0, 1000.0, 1000.0);
+/*N*/ nDefaultCubeSideFlags = CUBE_FULL;
+/*N*/ bDefaultCubePosIsCenter = FALSE;
+/*N*/
+/*N*/ // Sphere-Objekt
+/*N*/ aDefaultSphereCenter = Vector3D(0.0, 0.0, 0.0);
+/*N*/ aDefaultSphereSize = Vector3D(1000.0, 1000.0, 1000.0);
+/*N*/
+/*N*/ // Lathe-Objekt
+/*N*/ nDefaultLatheEndAngle = 3600;
+/*N*/ fDefaultLatheScale = 1.0;
+/*N*/ bDefaultLatheSmoothed = TRUE;
+/*N*/ bDefaultLatheSmoothFrontBack = FALSE;
+/*N*/ bDefaultLatheCharacterMode = FALSE;
+/*N*/ bDefaultLatheCloseFront = TRUE;
+/*N*/ bDefaultLatheCloseBack = TRUE;
+/*N*/
+/*N*/ // Extrude-Objekt
+/*N*/ fDefaultExtrudeScale = 1.0;
+/*N*/ bDefaultExtrudeSmoothed = TRUE;
+/*N*/ bDefaultExtrudeSmoothFrontBack = FALSE;
+/*N*/ bDefaultExtrudeCharacterMode = FALSE;
+/*N*/ bDefaultExtrudeCloseFront = TRUE;
+/*N*/ bDefaultExtrudeCloseBack = TRUE;
+/*N*/
+/*N*/ // Scene-Objekt
+/*N*/ // aDefaultLightGroup;
+/*N*/ bDefaultDither = TRUE;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_dlight3d.cxx b/binfilter/bf_svx/source/engine3d/svx_dlight3d.cxx
new file mode 100644
index 000000000000..d243f57e45f0
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_dlight3d.cxx
@@ -0,0 +1,190 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdio.hxx"
+
+#include "globl3d.hxx"
+
+#include "polyob3d.hxx"
+
+#include "dlight3d.hxx"
+
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dDistantLight, E3dLight);
+
+/*************************************************************************
+|*
+|* E3dDistantLight-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dDistantLight::E3dDistantLight(const Vector3D& rPos, const Vector3D& rDir,
+/*N*/ const Color& rColor, double fLightIntensity) :
+/*N*/ E3dLight(rPos, rColor, fLightIntensity)
+/*N*/ {
+/*N*/ SetDirection(rDir);
+/*N*/ CreateLightObj();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* E3dDistantLight-Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dDistantLight::~E3dDistantLight()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dDistantLight::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_DISTLIGHT_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Richtung ZUR Lichtquelle setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dDistantLight::SetDirection(const Vector3D& rNewDir)
+/*N*/ {
+/*N*/ if ( aDirection != rNewDir )
+/*N*/ {
+/*N*/ aDirection = rNewDir;
+/*N*/ aDirection.Normalize();
+/*N*/ CreateLightObj();
+/*N*/ StructureChanged(this);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Lichtstaerke an uebergeben Punkt bestimmen und die akkumulierte
+|* Punktfarbe berechnen
+|*
+\************************************************************************/
+
+/*?*/ FASTBOOL E3dDistantLight::CalcLighting(Color& rNewColor,
+/*?*/ const Vector3D& rPnt,
+/*?*/ const Vector3D& rPntNormal,
+/*?*/ const Color& rPntColor)
+/*?*/ {
+/*?*/ double fR = 0, fG = 0, fB = 0;
+/*?*/
+/*?*/ if ( IsOn() )
+/*?*/ {
+/*?*/ double fLight = rPntNormal.Scalar(aDirection);
+/*?*/
+/*?*/ if ( fLight > 0 )
+/*?*/ {
+/*?*/ fR = fLight * GetRed();
+/*?*/ fG = fLight * GetGreen();
+/*?*/ fB = fLight * GetBlue();
+/*?*/ }
+/*?*/ }
+/*?*/ return ImpCalcLighting(rNewColor, rPntColor, fR, fG, fB);
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Darstellung des Lichtobjekts in der Szene ein-/ausschalten
+|*
+\************************************************************************/
+
+/*N*/ void E3dDistantLight::CreateLightObj()
+/*N*/ {
+/*N*/ pSub->Clear();
+/*N*/
+/*N*/ if ( IsLightObjVisible() )
+/*N*/ {
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() + aDirection, GetPosition()));
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* sichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dDistantLight::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ E3dLight::WriteData(rOut);
+/*N*/
+/*N*/ #ifdef E3D_STREAMING
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dDistantLight");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aDirection;
+/*N*/ #endif
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ }
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dDistantLight::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ E3dLight::ReadData(rHead, rIn);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dDistantLight");
+/*N*/ #endif
+/*N*/
+/*N*/ rIn >> aDirection;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_e3dcmpt.cxx b/binfilter/bf_svx/source/engine3d/svx_e3dcmpt.cxx
new file mode 100644
index 000000000000..82834e190ec8
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_e3dcmpt.cxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+
+#include "e3dcmpt.hxx"
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Konstruktor, schreibt bzw. liest Versionsnummer
+|*
+\************************************************************************/
+
+/*N*/ E3dIOCompat::E3dIOCompat(SvStream& rNewStream, USHORT nNewMode, UINT16 nVer)
+/*N*/ : SdrDownCompat(rNewStream, nNewMode, TRUE),
+/*N*/ nVersion(nVer)
+/*N*/ {
+/*N*/ if (nNewMode == STREAM_WRITE)
+/*N*/ {
+/*N*/ DBG_ASSERT(nVer != E3DIOCOMPAT_VERSIONDONTKNOW,
+/*N*/ "kann unbekannte Version nicht schreiben");
+/*N*/ rNewStream << nVersion;
+/*N*/ }
+/*N*/ else if (nNewMode == STREAM_READ)
+/*N*/ {
+/*N*/ DBG_ASSERT(nVer == E3DIOCOMPAT_VERSIONDONTKNOW,
+/*N*/ "Lesen mit Angabe der Version ist Quatsch!");
+/*N*/ rNewStream >> nVersion;
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_extrud3d.cxx b/binfilter/bf_svx/source/engine3d/svx_extrud3d.cxx
new file mode 100644
index 000000000000..18f3dc1825a6
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_extrud3d.cxx
@@ -0,0 +1,700 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdstr.hrc"
+
+
+#include "globl3d.hxx"
+
+#include "polyob3d.hxx"
+
+#include "extrud3d.hxx"
+
+#include "e3dcmpt.hxx"
+
+
+
+#include "svxids.hrc"
+
+
+
+
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dExtrudeObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor, erzeugt zwei Deckelflaechen-PolyPolygone und (PointCount-1)
+|* Seitenflaechen-Rechtecke aus dem uebergebenen PolyPolygon
+|*
+\************************************************************************/
+
+/*N*/ E3dExtrudeObj::E3dExtrudeObj(E3dDefaultAttributes& rDefault, const PolyPolygon& rPP, double fDepth)
+/*N*/ : E3dCompoundObject(rDefault),
+/*N*/ aExtrudePolygon(rPP, rDefault.GetDefaultExtrudeScale())
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ SetDefaultAttributes(rDefault);
+/*N*/
+/*N*/ // set extrude depth
+/*N*/ mpObjectItemSet->Put(Svx3DDepthItem((sal_uInt32)(fDepth + 0.5)));
+/*N*/
+/*N*/ // Geometrie erzeugen
+/*N*/ CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* wie voriger Konstruktor, nur mit XPolygon; das XPolygon wird
+|* jedoch nicht Bezier-konvertiert, sondern es werden nur seine
+|* Punktkoordinaten uebernommen
+|*
+\************************************************************************/
+
+/*N*/ E3dExtrudeObj::E3dExtrudeObj(E3dDefaultAttributes& rDefault, const XPolyPolygon& rXPP, double fDepth)
+/*N*/ : E3dCompoundObject(rDefault),
+/*N*/ aExtrudePolygon(rXPP, rDefault.GetDefaultExtrudeScale())
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ SetDefaultAttributes(rDefault);
+/*N*/
+/*N*/ // set extrude depth
+/*N*/ mpObjectItemSet->Put(Svx3DDepthItem((sal_uInt32)(fDepth + 0.5)));
+/*N*/
+/*N*/ // Geometrie erzeugen
+/*N*/ CreateGeometry();
+/*N*/ }
+
+/*N*/ E3dExtrudeObj::E3dExtrudeObj()
+/*N*/ : E3dCompoundObject()
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ E3dDefaultAttributes aDefault;
+/*N*/ SetDefaultAttributes(aDefault);
+/*N*/ }
+
+/*N*/ void E3dExtrudeObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ ImpForceItemSet();
+/*N*/
+/*N*/ fExtrudeScale = rDefault.GetDefaultExtrudeScale();
+/*N*/
+/*N*/ // #107245#
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothNormalsItem(rDefault.GetDefaultExtrudeSmoothed()));
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothLidsItem(rDefault.GetDefaultExtrudeSmoothFrontBack()));
+/*N*/ mpObjectItemSet->Put(Svx3DCharacterModeItem(rDefault.GetDefaultExtrudeCharacterMode()));
+/*N*/ mpObjectItemSet->Put(Svx3DCloseFrontItem(rDefault.GetDefaultExtrudeCloseFront()));
+/*N*/ mpObjectItemSet->Put(Svx3DCloseBackItem(rDefault.GetDefaultExtrudeCloseBack()));
+/*N*/
+/*N*/ // Bei extrudes defaultmaessig StdTexture in X und Y
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionXItem(1));
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionYItem(1));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D E3dExtrudeObj::GetFrontSide()
+/*N*/ {
+/*N*/ // Polygon als Grundlage holen
+/*N*/ PolyPolygon3D aPolyPoly3D(aExtrudePolygon);
+/*N*/
+/*N*/ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+/*N*/ // Start- und Endpunkte verhindern
+/*N*/ aPolyPoly3D.RemoveDoublePoints();
+/*N*/
+/*N*/ // Normale holen
+/*N*/ Vector3D aNormal = aPolyPoly3D.GetNormal();
+/*N*/ if((aNormal.Z() > 0.0) != (GetExtrudeDepth() != 0))
+/*N*/ aPolyPoly3D.FlipDirections();
+/*N*/
+/*N*/ // Orientierung evtl. vorhandener Loecher in einen definierten
+/*N*/ // Ausgangszustand bringen
+/*N*/ aPolyPoly3D.SetDirections();
+/*N*/
+/*N*/ return aPolyPoly3D;
+/*N*/ }
+
+/*N*/ PolyPolygon3D E3dExtrudeObj::GetBackSide(const PolyPolygon3D& rFrontSide)
+/*N*/ {
+/*N*/ PolyPolygon3D aBackSide(rFrontSide);
+/*N*/
+/*N*/ if(GetExtrudeDepth() != 0)
+/*N*/ {
+/*N*/ // Extrudevektor bilden
+/*N*/ Vector3D aNormal = aBackSide.GetNormal();
+/*N*/ if(aNormal.Z() < 0.0)
+/*N*/ aNormal.Z() = -aNormal.Z();
+/*N*/ Vector3D aOffset = aNormal * (double)GetExtrudeDepth();
+/*N*/
+/*N*/ // eventuell Skalieren
+/*N*/ if(GetPercentBackScale() != 100)
+/*N*/ ScalePoly(aBackSide, (double)GetPercentBackScale() / 100.0);
+/*N*/
+/*N*/ // Verschieben
+/*N*/ Matrix4D aTrans;
+/*N*/ aTrans.Translate(aOffset);
+/*N*/ aBackSide.Transform(aTrans);
+/*N*/ }
+/*N*/
+/*N*/ return aBackSide;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Give out simple line geometry
+|*
+\************************************************************************/
+
+
+/*N*/ void E3dExtrudeObj::CreateGeometry()
+/*N*/ {
+/*N*/ // Start der Geometrieerzeugung ankuendigen
+/*N*/ StartCreateGeometry();
+/*N*/
+/*N*/ // #78972# prepare new line geometry creation
+/*N*/ maLinePolyPolygon.Clear();
+/*N*/
+/*N*/ // Polygon als Grundlage holen
+/*N*/ PolyPolygon3D aFrontSide = GetFrontSide();
+/*N*/
+/*N*/ if(GetExtrudeDepth() != 0)
+/*N*/ {
+/*N*/ // Hinteres Polygon erzeugen
+/*N*/ PolyPolygon3D aBackSide = GetBackSide(aFrontSide);
+/*N*/
+/*N*/ // Was muss erzeugt werden?
+/*N*/ if(!aFrontSide.IsClosed())
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(TRUE));
+/*N*/
+/*N*/ double fTextureDepth=1.0;
+/*N*/ double fTextureStart=0.0;
+/*N*/
+/*N*/ // Texturen erzeugen?
+/*N*/ if(!GetCreateTexture())
+/*N*/ fTextureStart = fTextureDepth = 0.0;
+/*N*/
+/*N*/ // Falls Texturen erzeugen Randbreite fuer diese bestimmen
+/*N*/ double fSurroundFactor = 1.0;
+/*N*/ if(GetCreateTexture())
+/*N*/ {
+/*N*/ fSurroundFactor = aFrontSide.GetLength() / sqrt(aFrontSide.GetPolyArea());
+/*N*/ fSurroundFactor = (double)((long)(fSurroundFactor - 0.5));
+/*N*/ if(fSurroundFactor == 0.0)
+/*N*/ fSurroundFactor = 1.0;
+/*N*/ }
+/*N*/
+/*N*/ // Segment erzeugen
+/*N*/ ImpCreateSegment(
+/*N*/ aFrontSide,
+/*N*/ aBackSide,
+/*N*/ 0L,
+/*N*/ 0L,
+/*N*/ GetCloseFront(), // #107245# bExtrudeCloseFront,
+/*N*/ GetCloseBack(), // #107245# bExtrudeCloseBack,
+/*N*/ (double)GetPercentDiagonal() / 200.0,
+/*N*/ GetSmoothNormals(), // #107245# GetExtrudeSmoothed(),
+/*N*/ GetSmoothNormals(), // #107245# GetExtrudeSmoothed(),
+/*N*/ GetSmoothLids(), // #107245# GetExtrudeSmoothFrontBack(),
+/*N*/ fSurroundFactor,
+/*N*/ fTextureStart,
+/*N*/ fTextureDepth,
+/*N*/ GetCreateNormals(),
+/*N*/ GetCreateTexture(),
+/*N*/ GetCharacterMode(), // #107245# bExtrudeCharacterMode,
+/*N*/ FALSE,
+/*N*/ // #78972#
+/*N*/ &maLinePolyPolygon);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // nur ein Polygon erzeugen
+/*?*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(TRUE));
+/*?*/
+/*?*/ // Fuer evtl. selbst erzeugte Normalen
+/*?*/ PolyPolygon3D aNormalsFront;
+/*?*/
+/*?*/ // Extrudevektor bilden
+/*?*/ Vector3D aNormal = aFrontSide.GetNormal();
+/*?*/ Vector3D aOffset = aNormal * (double)GetExtrudeDepth();
+/*?*/
+/*?*/ // Normalen und Vorderseite selbst erzeugen
+/*?*/ AddFrontNormals(aFrontSide, aNormalsFront, aOffset);
+/*?*/ CreateFront(aFrontSide, aNormalsFront, GetCreateNormals(), GetCreateTexture());
+/*?*/
+/*?*/ // #78972#
+/*?*/ maLinePolyPolygon.Insert(aFrontSide);
+/*N*/ }
+/*N*/
+/*N*/ // #78972#
+/*N*/ ImpCompleteLinePolygon(maLinePolyPolygon, aFrontSide.Count(), FALSE);
+/*N*/
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dExtrudeObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_EXTRUDEOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+/*N*/ void E3dExtrudeObj::CreateWireframe(Polygon3D& rWirePoly, const Matrix4D* pTf,
+/*N*/ E3dDragDetail eDetail)
+/*N*/ {
+/*N*/ if ( eDetail == E3DDETAIL_ALLLINES ||
+/*N*/ (eDetail == E3DDETAIL_DEFAULT && GetDragDetail() == E3DDETAIL_ALLLINES) )
+/*N*/ {
+/*N*/ // Detailliert erzeugen
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // call parent
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 E3dObject::CreateWireframe(rWirePoly, pTf, eDetail);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dExtrudeObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::WriteData(rOut);
+/*N*/
+/*N*/ E3dIOCompat aCompat(rOut, STREAM_WRITE, 1);
+/*N*/ rOut << aExtrudePolygon;
+/*N*/ rOut << fExtrudeScale;
+/*N*/
+/*N*/ rOut << (double)GetExtrudeDepth();
+/*N*/
+/*N*/ rOut << (double)GetPercentBackScale() / 100.0;
+/*N*/
+/*N*/ rOut << (double)GetPercentDiagonal() / 200.0;
+/*N*/
+/*N*/ rOut << GetSmoothNormals(); // #107245# (BOOL)bExtrudeSmoothed;
+/*N*/ rOut << GetSmoothLids(); // #107245# (BOOL)bExtrudeSmoothFrontBack;
+/*N*/ rOut << GetCharacterMode(); // #107245# (BOOL)bExtrudeCharacterMode;
+/*N*/
+/*N*/ // Ab Version 513a (5.2.99): Parameter fuer das
+/*N*/ // Erzeugen der Vorder/Rueckwand
+/*N*/ rOut << GetCloseFront(); // #107245# (BOOL)bExtrudeCloseFront;
+/*N*/ rOut << GetCloseBack(); // #107245# (BOOL)bExtrudeCloseBack;
+/*N*/
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry();
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dExtrudeObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ BOOL bAllDone(FALSE);
+/*N*/
+/*N*/ if(AreBytesLeft())
+/*N*/ {
+/*N*/ E3dIOCompat aIoCompat(rIn, STREAM_READ);
+/*N*/ if(aIoCompat.GetVersion() >= 1)
+/*N*/ {
+/*N*/ BOOL bTmp;
+/*N*/ double fTmp;
+/*N*/
+/*N*/ rIn >> aExtrudePolygon;
+/*N*/ rIn >> fExtrudeScale;
+/*N*/
+/*N*/ rIn >> fTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DDepthItem(sal_uInt32(fTmp + 0.5)));
+/*N*/
+/*N*/ rIn >> fTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DBackscaleItem(sal_uInt16(fTmp * 100.0)));
+/*N*/
+/*N*/ rIn >> fTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DPercentDiagonalItem(sal_uInt16(fTmp * 200.0)));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bExtrudeSmoothed = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothNormalsItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bExtrudeSmoothFrontBack = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothLidsItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bExtrudeCharacterMode = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DCharacterModeItem(bTmp));
+/*N*/
+/*N*/ bAllDone = TRUE;
+/*N*/
+/*N*/ if(aIoCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Ab Version 513a (5.2.99): Parameter fuer das
+/*N*/ // Erzeugen der Vorder/Rueckwand
+/*N*/ BOOL bTmp;
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bExtrudeCloseFront = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseFrontItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bExtrudeCloseBack = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseBackItem(bTmp));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // #107245# bExtrudeCloseFront = TRUE;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseFrontItem(sal_True));
+/*N*/
+/*N*/ // #107245# bExtrudeCloseBack = TRUE;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseBackItem(sal_True));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(!bAllDone)
+/*N*/ {
+/*N*/ // Geometrie aus geladenen PolyObj's rekonstruieren
+/*N*/ SdrObjList* pSubList = GetSubList();
+/*N*/ if(pSubList && pSubList->GetObjCount())
+/*N*/ {
+/*N*/ // Vorderseite und Rueckseite sind die ersten
+/*N*/ // PolyObj's in der Liste, hole diese
+/*N*/ E3dPolyObj* pFront = NULL;
+/*N*/ E3dPolyObj* pBack = NULL;
+/*N*/ E3dPolyObj* pOther = NULL;
+/*N*/
+/*N*/ UINT16 a;
+/*N*/ for(a=0;a<pSubList->GetObjCount();a++)
+/*N*/ {
+/*N*/ E3dPolyObj* pCandidate = (E3dPolyObj*)pSubList->GetObj(a);
+/*N*/ if(pCandidate->ISA(E3dPolyObj))
+/*N*/ {
+/*N*/ // Die Nromalen der Vorder/Rueckseiten zeigen in Z-Richtung,
+/*N*/ // nutze dies aus
+/*N*/ const Vector3D& rNormal = pCandidate->GetNormal();
+/*N*/ if(fabs(rNormal.X()) < 0.0000001 && fabs(rNormal.Y()) < 0.0000001)
+/*N*/ {
+/*N*/ if(rNormal.Z() > 0.0)
+/*N*/ {
+/*N*/ // Vorderseite
+/*N*/ pFront = pCandidate;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Rueckseite
+/*N*/ pBack = pCandidate;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(!pOther)
+/*N*/ pOther = pCandidate;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Extrude-Tiefe feststellen
+/*N*/ if(pOther)
+/*N*/ {
+/*N*/ const PolyPolygon3D& rOtherPoly = pOther->GetPolyPolygon3D();
+/*N*/ // Hintereinanderliegende Paare in der alten Version waren
+/*N*/ // 0,1 und 3,2 (0,3 vorne)
+/*N*/ double fVal = (rOtherPoly[0][1] - rOtherPoly[0][0]).GetLength();
+/*N*/ mpObjectItemSet->Put(Svx3DDepthItem(sal_uInt32(fVal + 0.5)));
+/*N*/ }
+/*N*/ else
+/*N*/ // Einen Default vorsehen, kann aber eigentlich nie geschehen
+/*N*/ mpObjectItemSet->Put(Svx3DDepthItem(100));
+/*N*/
+/*N*/ // Polygon fuer Vorderseite holen
+/*N*/ if(pFront)
+/*N*/ {
+/*N*/ aExtrudePolygon = pFront->GetPolyPolygon3D();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pBack)
+/*N*/ {
+/*N*/ // Rueckseite benutzen und um -fExtrudeDepth in Z
+/*N*/ // verschieben
+/*N*/ aExtrudePolygon = pBack->GetPolyPolygon3D();
+/*N*/ Matrix4D aMat;
+/*N*/ aMat.Translate(Vector3D(0.0, 0.0, -(double)GetExtrudeDepth()));
+/*N*/ aExtrudePolygon.Transform(aMat);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Die Polygondaten koennen aus den Vorderkanten
+/*N*/ // der weiteren Polygone (Punkte 0,3) restauriert werden.
+/*N*/ // evtl. spaeter ergaenzen
+/*N*/ aExtrudePolygon.Clear();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Bestimmen, ob die Teilpolygone von aExtrudePolygon
+/*N*/ // geschlossen waren. Sie waren geschlossen, wenn ein
+/*N*/ // entsprechendes PolyObj existiert
+/*N*/ for(a=0;a<aExtrudePolygon.Count();a++)
+/*N*/ {
+/*N*/ Polygon3D &rPoly = aExtrudePolygon[a];
+/*N*/ USHORT nCnt = rPoly.GetPointCount();
+/*N*/
+/*N*/ if(nCnt)
+/*N*/ {
+/*N*/ Vector3D& rFirst = rPoly[0];
+/*N*/ Vector3D& rLast = rPoly[nCnt - 1];
+/*N*/ BOOL bClosePoly(FALSE);
+/*N*/
+/*N*/ for(UINT16 b=0;b<pSubList->GetObjCount();b++)
+/*N*/ {
+/*N*/ E3dPolyObj* pCandidate = (E3dPolyObj*)pSubList->GetObj(b);
+/*N*/ if(pCandidate->ISA(E3dPolyObj)
+/*N*/ && pCandidate != pFront && pCandidate != pBack)
+/*N*/ {
+/*N*/ const PolyPolygon3D& rCandPoly = pCandidate->GetPolyPolygon3D();
+/*N*/ if(rCandPoly[0].GetPointCount() > 2)
+/*N*/ {
+/*N*/ if(rCandPoly[0][0] == rFirst && rCandPoly[0][3] == rLast)
+/*N*/ bClosePoly = TRUE;
+/*N*/ if(rCandPoly[0][3] == rFirst && rCandPoly[0][0] == rLast)
+/*N*/ bClosePoly = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ rPoly.SetClosed(bClosePoly);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Setze die weiteren Parameter auf die defaults
+/*N*/ fExtrudeScale = 1.0;
+/*N*/
+/*N*/ mpObjectItemSet->Put(Svx3DBackscaleItem(100));
+/*N*/
+/*N*/ mpObjectItemSet->Put(Svx3DPercentDiagonalItem(10));
+/*N*/
+/*N*/ // #107245# bExtrudeSmoothed = TRUE;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothNormalsItem(sal_True));
+/*N*/
+/*N*/ // #107245# bExtrudeSmoothFrontBack = FALSE;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothLidsItem(sal_False));
+/*N*/
+/*N*/ // #107245# bExtrudeCharacterMode = FALSE;
+/*N*/ mpObjectItemSet->Put(Svx3DCharacterModeItem(sal_False));
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // correct position of extrude polygon, in case it's not positioned
+/*N*/ // at the Z==0 layer
+/*N*/ if(aExtrudePolygon.Count() && aExtrudePolygon[0].GetPointCount())
+/*N*/ {
+/*N*/ const Vector3D& rFirstPoint = aExtrudePolygon[0][0];
+/*N*/ if(rFirstPoint.Z() != 0.0)
+/*N*/ {
+/*N*/ // change transformation so that source poly lies in Z == 0,
+/*N*/ // so it can be exported as 2D polygon
+/*N*/ //
+/*N*/ // ATTENTION: the translation has to be multiplied from LEFT
+/*N*/ // SIDE since it was executed as the first translate for this
+/*N*/ // 3D object during it's creation.
+/*N*/ double fTransDepth(rFirstPoint.Z());
+/*N*/ Matrix4D aTransMat;
+/*N*/ aTransMat.TranslateZ(fTransDepth);
+/*N*/ NbcSetTransform(aTransMat * GetTransform());
+/*N*/
+/*N*/ // correct polygon itself
+/*N*/ aTransMat.Identity();
+/*N*/ aTransMat.TranslateZ(-fTransDepth);
+/*N*/ aExtrudePolygon.Transform(aTransMat);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ ReCreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dExtrudeObj::SetExtrudePolygon(const PolyPolygon3D &rNew)
+/*N*/ {
+/*N*/ if(aExtrudePolygon != rNew)
+/*N*/ {
+/*N*/ aExtrudePolygon = rNew;
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+
+// #107245#
+// void E3dExtrudeObj::SetExtrudeSmoothed(BOOL bNew)
+// {
+// if(bExtrudeSmoothed != bNew)
+// {
+// bExtrudeSmoothed = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dExtrudeObj::SetExtrudeSmoothFrontBack(BOOL bNew)
+// {
+// if(bExtrudeSmoothFrontBack != bNew)
+// {
+// bExtrudeSmoothFrontBack = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dExtrudeObj::SetExtrudeCharacterMode(BOOL bNew)
+// {
+// if(bExtrudeCharacterMode != bNew)
+// {
+// bExtrudeCharacterMode = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dExtrudeObj::SetExtrudeCloseFront(BOOL bNew)
+// {
+// if(bExtrudeCloseFront != bNew)
+// {
+// bExtrudeCloseFront = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dExtrudeObj::SetExtrudeCloseBack(BOOL bNew)
+// {
+// if(bExtrudeCloseBack != bNew)
+// {
+// bExtrudeCloseBack = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+//////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ void E3dExtrudeObj::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::PostItemChange(nWhich);
+/*N*/
+/*N*/ switch(nWhich)
+/*N*/ {
+/*N*/ case SDRATTR_3DOBJ_PERCENT_DIAGONAL:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_BACKSCALE:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_DEPTH:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Aufbrechen
+|*
+\************************************************************************/
+
+
+
+// EOF
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_float3d.cxx b/binfilter/bf_svx/source/engine3d/svx_float3d.cxx
new file mode 100644
index 000000000000..a6d7b6678e18
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_float3d.cxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <bf_sfx2/dispatch.hxx>
+
+#include <bf_sfx2/dockwin.hxx>
+
+#include <bf_svx/f3dchild.hxx>
+
+#include "float3d.hrc"
+namespace binfilter {
+
+/*N*/ SFX_IMPL_DOCKINGWINDOW( Svx3DChildWindow, SID_3D_WIN )
+
+
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Effekte
+|*
+\************************************************************************/
+/*N*/ __EXPORT Svx3DChildWindow::Svx3DChildWindow( Window* pParent,
+/*N*/ USHORT nId,
+/*N*/ SfxBindings* pBindings,
+/*N*/ SfxChildWinInfo* pInfo ) :
+/*N*/ SfxChildWindow( pParent, nId )
+/*N*/ {
+DBG_BF_ASSERT(0, "STRIP"); //STRIP001 Svx3DWin* pWin = new Svx3DWin( pBindings, this, pParent );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_float3d.src b/binfilter/bf_svx/source/engine3d/svx_float3d.src
new file mode 100644
index 000000000000..39c7a7299d0c
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_float3d.src
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#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 );
+
+#define MASKCOLOR MaskColor = Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; };
+
+
+
+
+
+
+
+/*Image RID_SVXIMAGE_LIGHT_ON_SELECTED {
+ ImageBitmap = Bitmap { File = "lightons.bmp" ; };
+ MASKCOLOR
+};
+Image RID_SVXIMAGE_LIGHT_OFF_SELECTED {
+ ImageBitmap = Bitmap { File = "lightsel.bmp" ; };
+ MASKCOLOR
+};*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/engine3d/svx_label3d.cxx b/binfilter/bf_svx/source/engine3d/svx_label3d.cxx
new file mode 100644
index 000000000000..7552776d4383
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_label3d.cxx
@@ -0,0 +1,220 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdstr.hrc"
+
+#include "svdio.hxx"
+
+#include "globl3d.hxx"
+
+#include "label3d.hxx"
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dLabelObj, E3dPointObj);
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dLabelObj::~E3dLabelObj()
+/*N*/ {
+/*N*/ // zugehoeriges 2D-SdrObject loeschen
+/*N*/ delete p2DLabelObj;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dLabelObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_LABELOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* virtuelle Methode, die ein 2D-Objekt zurueckgibt, falls moeglich
+|*
+\************************************************************************/
+
+//E3dDisplayObj* E3dLabelObj::MakeViewTransform(Viewport3D& rViewpt,
+// E3dLightList&,
+// E3dDisplayObj* pDispObj)
+//{
+// aViewPos = rViewpt.GetViewTransform() * GetTransPosition();
+//
+// // 2D-Position des Labels bestimmen
+// Point a2DPos = rViewpt.ProjectAndMap(aViewPos);
+// aViewPos -= rViewpt.GetPRP();
+//
+// if ( p2DLabelObj )
+// p2DLabelObj->SetAnchorPos(a2DPos);
+//
+// if ( pDispObj )
+// {
+// pDispObj->Set2DObj(p2DLabelObj);
+// pDispObj->Set3DObj(this);
+// }
+// else
+// pDispObj = new E3dDisplayObj(this, p2DLabelObj);
+//
+// SetDisplayObj(pDispObj);
+//
+// return pDispObj;
+//}
+
+/*************************************************************************
+|*
+|* SdrPage auch an p2DLabelObj setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dLabelObj::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ E3dPointObj::SetPage(pNewPage);
+/*N*/ if ( p2DLabelObj )
+/*N*/ p2DLabelObj->SetPage(pNewPage);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SdrModel auch an p2DLabelObj setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dLabelObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ E3dPointObj::SetModel(pNewModel);
+/*N*/ if ( p2DLabelObj )
+/*N*/ p2DLabelObj->SetModel(pNewModel);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Anzahl der Handles zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Handle-Liste fuellen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* In Stream schreiben
+|*
+\************************************************************************/
+
+/*N*/ void E3dLabelObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ E3dPointObj::WriteData(rOut);
+/*N*/
+/*N*/ #ifdef E3D_STREAMING
+/*N*/
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dLabelObj");
+/*N*/ #endif
+/*N*/ DBG_ASSERT(p2DLabelObj, "p2DLabelObj muss vor dem Speichern definiert sein!");
+/*N*/
+/*N*/ rOut << *p2DLabelObj;
+/*N*/ #endif
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dLabelObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ E3dPointObj::ReadData(rHead, rIn);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dLabelObj");
+/*N*/ #endif
+/*N*/
+/*N*/ // loeschen, falls schon vorhanden
+/*N*/ delete p2DLabelObj;
+/*N*/ p2DLabelObj = NULL;
+/*N*/
+/*N*/ SdrObjIOHeaderLookAhead aHead(rIn, STREAM_READ);
+/*N*/
+/*N*/ p2DLabelObj = SdrObjFactory::MakeNewObject(aHead.nInventor,
+/*N*/ aHead.nIdentifier, GetPage());
+/*N*/ if ( p2DLabelObj != NULL )
+/*N*/ {
+/*N*/ rIn >> *p2DLabelObj;
+/*N*/ p2DLabelObj->SetModel(GetModel());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aHead.SkipRecord();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx b/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx
new file mode 100644
index 000000000000..de3974725482
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_lathe3d.cxx
@@ -0,0 +1,954 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdstr.hrc"
+
+
+
+
+#include "globl3d.hxx"
+
+#include "svdio.hxx"
+
+#include "polyob3d.hxx"
+
+#include "lathe3d.hxx"
+
+
+
+#include "svxids.hrc"
+
+
+
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dLatheObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor aus SV-Polygon, Scale gibt den Umrechnungsfaktor fuer
+|* die Koordinaten an
+|*
+\************************************************************************/
+
+/*N*/ E3dLatheObj::E3dLatheObj(E3dDefaultAttributes& rDefault, const PolyPolygon& rPoly)
+/*N*/ : E3dCompoundObject(rDefault),
+/*N*/ aPolyPoly3D (PolyPolygon3D(rPoly, rDefault.GetDefaultLatheScale()))
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ SetDefaultAttributes(rDefault);
+/*N*/
+/*N*/ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+/*N*/ // Start- und Endpunkte verhindern
+/*N*/ aPolyPoly3D.RemoveDoublePoints();
+/*N*/
+/*N*/ const Polygon3D rPoly3D = aPolyPoly3D[0];
+/*N*/ sal_uInt32 nSegCnt((sal_uInt32)rPoly3D.GetPointCount());
+/*N*/ if(nSegCnt && !rPoly3D.IsClosed())
+/*N*/ nSegCnt -= 1;
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(nSegCnt));
+/*N*/
+/*N*/ // Geometrie erzeugen
+/*N*/ CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dLatheObj::E3dLatheObj()
+/*N*/ : aPolyPoly3D(Polygon3D())
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ E3dDefaultAttributes aDefault;
+/*N*/ SetDefaultAttributes(aDefault);
+/*N*/ }
+
+/*N*/ void E3dLatheObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ ImpForceItemSet();
+/*N*/
+/*N*/ fLatheScale = rDefault.GetDefaultLatheScale();
+/*N*/
+/*N*/ // #107245#
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothNormalsItem(rDefault.GetDefaultLatheSmoothed()));
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothLidsItem(rDefault.GetDefaultLatheSmoothFrontBack()));
+/*N*/ mpObjectItemSet->Put(Svx3DCharacterModeItem(rDefault.GetDefaultLatheCharacterMode()));
+/*N*/ mpObjectItemSet->Put(Svx3DCloseFrontItem(rDefault.GetDefaultLatheCloseFront()));
+/*N*/ mpObjectItemSet->Put(Svx3DCloseBackItem(rDefault.GetDefaultLatheCloseBack()));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Give out simple line geometry
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* 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
+/*N*/ void E3dLatheObj::CreateGeometry()
+/*N*/ {
+/*N*/ // Start der Geometrieerzeugung ankuendigen
+/*N*/ StartCreateGeometry();
+/*N*/
+/*N*/ // #78972#
+/*N*/ maLinePolyPolygon.Clear();
+/*N*/
+/*N*/ // Polygon erzeugen
+/*N*/ PolyPolygon3D aLathePoly3D(aPolyPoly3D);
+/*N*/
+/*N*/ // Eventuelle Anpassung der Segmentanzahlen
+/*N*/ aLathePoly3D = CreateLathePolyPoly(aPolyPoly3D, GetVerticalSegments());
+/*N*/
+/*N*/ // Normale holen
+/*N*/ Vector3D aNormal = aLathePoly3D.GetNormal();
+/*N*/ if(aNormal.Z() > 0.0)
+/*N*/ {
+/*N*/ aLathePoly3D.FlipDirections();
+/*N*/ aNormal = aLathePoly3D.GetNormal();
+/*N*/ }
+/*N*/
+/*N*/ // Orientierung evtl. vorhandener Loecher in einen definierten
+/*N*/ // Ausgangszustand bringen
+/*N*/ aLathePoly3D.SetDirections();
+/*N*/
+/*N*/ // Spezialfall Einzelnes Polygon erzeugen
+/*N*/ BOOL bSinglePoly = (GetEndAngle() == 0 || GetHorizontalSegments() == 0);
+/*N*/ if(bSinglePoly)
+/*N*/ {
+/*?*/ // nur ein Polygon erzeugen
+/*?*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(TRUE));
+/*?*/
+/*?*/ // Fuer evtl. selbst erzeugte Normalen
+/*?*/ PolyPolygon3D aNormalsFront;
+/*?*/
+/*?*/ // Normalen und Vorderseite selbst erzeugen
+/*?*/ AddFrontNormals(aLathePoly3D, aNormalsFront, aNormal);
+/*?*/ CreateFront(aLathePoly3D, aNormalsFront, GetCreateNormals(), GetCreateTexture());
+/*?*/
+/*?*/ // #78972#
+/*?*/ maLinePolyPolygon.Insert(aLathePoly3D);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Eventuell doppelseitig erzeugen?
+/*N*/ if(!aLathePoly3D.IsClosed())
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(TRUE));
+/*N*/
+/*N*/ // Seiten genenrieren?
+/*N*/ BOOL bCreateSides = ((GetEndAngle() < 3600 && !GetDoubleSided())
+/*N*/ || (GetBackScale() != 100));
+/*N*/
+/*N*/ // Polygone vorbereiten
+/*N*/ PolyPolygon3D aPrev, aFront, aBack, aNext;
+/*N*/
+/*N*/ // Rotation vorbereiten
+/*N*/ double fAng = DEG2RAD(double(GetEndAngle()) / 10);
+/*N*/ Matrix4D aRotMat;
+/*N*/
+/*N*/ // Skalierung vorbereiten
+/*N*/ double fScalePerStep;
+/*N*/ if(GetBackScale() != 100)
+/*N*/ fScalePerStep = (((double)GetBackScale() - 100.0) / 100.0) / (double)GetHorizontalSegments();
+/*N*/
+/*N*/ // Texturen erzeugen?
+/*N*/ double fTextureDepth=1.0;
+/*N*/ double fTextureStart=0.0;
+/*N*/ if(!GetCreateTexture())
+/*N*/ fTextureStart = fTextureDepth = 0.0;
+/*N*/
+/*N*/ // aPrev bis aBack ausfuellen als Startvorbereitung
+/*N*/ aRotMat.RotateY(-(fAng / (double)GetHorizontalSegments()));
+/*N*/ aPrev = aLathePoly3D;
+/*N*/ RotatePoly(aPrev, aRotMat);
+/*N*/ if(GetBackScale() != 100)
+/*N*/ {
+/*N*/ ScalePoly(aPrev, 1.0 - fScalePerStep);
+/*N*/ }
+/*N*/ aRotMat.Identity();
+/*N*/ aRotMat.RotateY(fAng / (double)GetHorizontalSegments());
+/*N*/ aFront = aLathePoly3D;
+/*N*/ aBack = aLathePoly3D;
+/*N*/ RotatePoly(aBack, aRotMat);
+/*N*/ if(GetBackScale() != 100)
+/*N*/ {
+/*N*/ ScalePoly(aBack, 1.0 + fScalePerStep);
+/*N*/ }
+/*N*/
+/*N*/ // Werte fuer Textur-Zwischensegmenterzeugung berechnen
+/*N*/ double fTmpStart = 0.0;
+/*N*/ double fTmpLength = fTextureDepth / (double)GetHorizontalSegments();
+/*N*/ sal_uInt16 nUpperBound = (sal_uInt16)GetHorizontalSegments();
+/*N*/
+/*N*/ for(UINT16 a=0;a<nUpperBound;a++)
+/*N*/ {
+/*N*/ // Naechstes Polygon vorbereiten
+/*N*/ aNext = aLathePoly3D;
+/*N*/
+/*N*/ // Rotieren
+/*N*/ if(!(a+2 == nUpperBound && GetEndAngle() == 3600))
+/*N*/ {
+/*N*/ aRotMat.Identity();
+/*N*/ aRotMat.RotateY((fAng * (double)(a+2))/ (double)nUpperBound);
+/*N*/ RotatePoly(aNext, aRotMat);
+/*N*/ }
+/*N*/
+/*N*/ // Skalieren
+/*N*/ if(GetBackScale() != 100)
+/*N*/ {
+/*N*/ ScalePoly(aNext, 1.0 + (fScalePerStep * (double)(a+2)));
+/*N*/ }
+/*N*/
+/*N*/ // Jetzt Segment erzeugen
+/*N*/ ImpCreateSegment(
+/*N*/ aFront,
+/*N*/ aBack,
+/*N*/ &aPrev,
+/*N*/ &aNext,
+/*N*/ (a == 0) && bCreateSides && GetCloseFront(), // #107245# bLatheCloseFront,
+/*N*/ (a == nUpperBound-1) && bCreateSides && GetCloseBack(), // #107245# bLatheCloseBack,
+/*N*/ ((double)GetPercentDiagonal() / 200.0)
+/*N*/ * (double(nUpperBound) / 6.0),
+/*N*/ GetSmoothNormals(), // #107245# GetLatheSmoothed(),
+/*N*/ GetSmoothNormals(), // #107245# GetLatheSmoothed(),
+/*N*/ GetSmoothLids(), // #107245# GetLatheSmoothFrontBack(),
+/*N*/ 1.0,
+/*N*/ fTmpStart,
+/*N*/ fTmpLength,
+/*N*/ GetCreateTexture(),
+/*N*/ GetCreateNormals(),
+/*N*/ GetCharacterMode(), // #107245# GetLatheCharacterMode(),
+/*N*/ TRUE,
+/*N*/ // #78972#
+/*N*/ &maLinePolyPolygon);
+/*N*/
+/*N*/ // naechsten Schritt vorbereiten
+/*N*/ fTmpStart += fTmpLength;
+/*N*/ aPrev = aFront;
+/*N*/ aFront = aBack;
+/*N*/ aBack = aNext;
+/*N*/ }
+/*N*/ }
+
+ // #78972#
+/*N*/ BOOL bClosedLines = ((GetEndAngle() == 3600) && (GetBackScale() == 100));
+/*N*/ ImpCompleteLinePolygon(maLinePolyPolygon, aLathePoly3D.Count(), bClosedLines);
+/*N*/
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::CreateGeometry();
+/*N*/ }
+
+/*N*/ PolyPolygon3D E3dLatheObj::CreateLathePolyPoly(PolyPolygon3D& rPolyPoly3D, long nVSegs)
+/*N*/ {
+/*N*/ PolyPolygon3D aLathePolyPolygon3D = rPolyPoly3D;
+/*N*/ sal_uInt16 nCnt = aLathePolyPolygon3D.Count();
+/*N*/ sal_uInt16 nOrigSegmentCnt = aPolyPoly3D[0].GetPointCount();
+/*N*/
+/*N*/ if(nOrigSegmentCnt && !aPolyPoly3D[0].IsClosed())
+/*N*/ nOrigSegmentCnt -= 1;
+/*N*/
+/*N*/ if(nVSegs && nVSegs != nOrigSegmentCnt)
+/*N*/ {
+/*N*/ // make sure minimum is not too small, 3 edges for closed
+/*N*/ // and 2 edges for open obects
+/*N*/ sal_Int32 nMinVSegs = aPolyPoly3D[0].IsClosed() ? 3 : 2;
+/*N*/ if(nVSegs <= nMinVSegs)
+/*N*/ nVSegs = nMinVSegs;
+/*N*/
+/*N*/ if(nVSegs != nOrigSegmentCnt)
+/*N*/ {
+/*N*/ // Erstes Polygon anpassen
+/*N*/ aLathePolyPolygon3D[0] = CreateLathePoly(aLathePolyPolygon3D[0], nVSegs);
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(nVSegs));
+/*N*/
+/*N*/ // andere Polygone im richtigen Verhaeltnis anpassen,
+/*N*/ // aber nur, wenn Wert fuer erstes angepasst werden musste
+/*N*/ for(UINT16 i = 1; i < nCnt; i++ )
+/*N*/ {
+/*?*/ Polygon3D &rPoly3D = aLathePolyPolygon3D[i];
+/*?*/ sal_uInt16 nSegCnt(rPoly3D.GetPointCount());
+/*?*/ if(nSegCnt && !rPoly3D.IsClosed())
+/*?*/ nSegCnt -= 1;
+/*?*/ long nNewVSegs = (nSegCnt * nVSegs) / nOrigSegmentCnt;
+/*?*/
+/*?*/ // make sure min is not too small for subpolys, too
+/*?*/ if(nNewVSegs <= nMinVSegs)
+/*?*/ nNewVSegs = nMinVSegs;
+/*?*/
+/*?*/ if(nNewVSegs && nNewVSegs != nSegCnt)
+/*?*/ {
+/*?*/ aLathePolyPolygon3D[i] = CreateLathePoly(aLathePolyPolygon3D[i], nNewVSegs);
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return aLathePolyPolygon3D;
+/*N*/ }
+
+/*N*/ Polygon3D E3dLatheObj::CreateLathePoly(Polygon3D& rPoly3D, long nVSegs)
+/*N*/ {
+/*N*/ // attention: Here number of SEGMENTS is given, while GetExpandedPolygon()
+/*N*/ // takes number of points. Calc PntNum first
+/*N*/ long nNumPts = rPoly3D.IsClosed() ? nVSegs : nVSegs + 1;
+/*N*/ if(nNumPts != rPoly3D.GetPointCount())
+/*N*/ return rPoly3D.GetExpandedPolygon(nNumPts);
+/*N*/ return rPoly3D;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dLatheObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_LATHEOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+/*N*/ void E3dLatheObj::CreateWireframe(Polygon3D& rWirePoly, const Matrix4D* pTf,
+/*N*/ E3dDragDetail eDetail)
+/*N*/ {
+/*N*/ // Nur selbst erzeugen, wenn alle Linien angezeigt werden sollen
+/*N*/ if ( eDetail == E3DDETAIL_ALLLINES ||
+/*N*/ (eDetail == E3DDETAIL_DEFAULT && GetDragDetail() == E3DDETAIL_ALLLINES) )
+/*N*/ {
+/*N*/ // Detailliert erzeugen
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // call parent
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 E3dObject::CreateWireframe(rWirePoly, pTf, eDetail);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dLatheObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+/*N*/ }
+/*N*/
+/*N*/ // leider kann das E3dLatheObj nicht auf E3dObject abgestuetzt werden,
+/*N*/ // da neue Member hinzugekommen sind und die Kompatibilitaet erhalten
+/*N*/ // bleiben muss.
+/*N*/ SdrAttrObj::WriteData(rOut);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dLatheObj");
+/*N*/ #endif
+/*N*/
+/*N*/ pSub->Save(rOut);
+/*N*/
+/*N*/ // Parameter aus E3dObject speichern
+/*N*/ rOut << aLocalBoundVol;
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ aMat3D = aTfMatrix;
+/*N*/ rOut << aMat3D;
+/*N*/ rOut << nLogicalGroup;
+/*N*/ rOut << nObjTreeLevel;
+/*N*/ rOut << nPartOfParent;
+/*N*/ rOut << UINT16(eDragDetail);
+/*N*/
+/*N*/ // neue Member
+/*N*/ // Alte version schreibt Polygon3D raus, neue Version
+/*N*/ // benutzt dafuer das erste Teilpolygon von PolyPolygon3D
+/*N*/ // rOut << aPolyPoly3D;
+/*N*/ rOut << aPolyPoly3D[0];
+/*N*/
+/*N*/ rOut << GetHorizontalSegments();
+/*N*/
+/*N*/ rOut << GetEndAngle();
+/*N*/
+/*N*/ rOut << ((E3dLatheObj*)this)->GetDoubleSided();
+/*N*/ rOut << fLatheScale;
+/*N*/
+/*N*/ // Ab Version 364f (19.06.97)
+/*N*/
+/*N*/ // #83965# internally the real number of segments (edges) is
+/*N*/ // used, no longer the number of points
+/*N*/ sal_Int32 nVSegs = GetVerticalSegments();
+/*N*/ if(!aPolyPoly3D[0].IsClosed())
+/*N*/ nVSegs += 1;
+/*N*/
+/*N*/ rOut << nVSegs;
+/*N*/
+/*N*/ // Ab Version 374 (15.12.97)
+/*N*/ rOut << aPolyPoly3D;
+/*N*/
+/*N*/ rOut << ((double)GetBackScale() / 100.0);
+/*N*/
+/*N*/ rOut << ((double)GetPercentDiagonal() / 200.0);
+/*N*/
+/*N*/ rOut << GetSmoothNormals(); // #107245# (BOOL)bLatheSmoothed;
+/*N*/ rOut << GetSmoothLids(); // #107245# (BOOL)bLatheSmoothFrontBack;
+/*N*/ rOut << GetCharacterMode(); // #107245# (BOOL)bLatheCharacterMode;
+/*N*/
+/*N*/ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+/*N*/ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+/*N*/ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+/*N*/ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+/*N*/ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+/*N*/ // E3dCompoundObject oder E3dObject aendern.
+/*N*/ rOut << GetDoubleSided();
+/*N*/
+/*N*/ rOut << BOOL(bCreateNormals);
+/*N*/ rOut << BOOL(bCreateTexture);
+/*N*/
+/*N*/ sal_uInt16 nVal = GetNormalsKind();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ nVal = GetTextureProjectionX();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ nVal = GetTextureProjectionY();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ rOut << BOOL(GetShadow3D());
+/*N*/
+/*N*/ rOut << GetMaterialAmbientColor();
+/*N*/ rOut << GetMaterialColor();
+/*N*/ rOut << GetMaterialSpecular();
+/*N*/ rOut << GetMaterialEmission();
+/*N*/ rOut << GetMaterialSpecularIntensity();
+/*N*/
+/*N*/ aBackMaterial.WriteData(rOut);
+/*N*/
+/*N*/ rOut << (UINT16)GetTextureKind();
+/*N*/
+/*N*/ rOut << (UINT16)GetTextureMode();
+/*N*/
+/*N*/ rOut << BOOL(GetNormalsInvert());
+/*N*/
+/*N*/ // Ab Version 513a (5.2.99): Parameter fuer das
+/*N*/ // Erzeugen der Vorder/Rueckwand
+/*N*/ rOut << GetCloseFront(); // #107245# BOOL(bLatheCloseFront);
+/*N*/ rOut << GetCloseBack(); // #107245# BOOL(bLatheCloseBack);
+/*N*/
+/*N*/ // neu ab 534: (hat noch gefehlt)
+/*N*/ rOut << BOOL(GetTextureFilter());
+/*N*/
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry();
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dLatheObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ // leider kann das E3dLatheObj nicht auf E3dObject abgestuetzt werden,
+/*N*/ // da neue Member hinzugekommen sind und die Kompatibilitaet erhalten
+/*N*/ // bleiben muss.
+/*N*/ SdrAttrObj::ReadData(rHead, rIn);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dLatheObj");
+/*N*/ #endif
+/*N*/ // dann die Member
+/*N*/ UINT16 nTmp16;
+/*N*/
+/*N*/ // #106240# Flag if poly was loaded (all versions above 3.0 and 3.1)
+/*N*/ sal_Bool bPolyWasRead(sal_False);
+/*N*/
+/*N*/ pSub->Load(rIn, *pPage);
+/*N*/
+/*N*/ // Parameter aus E3dObject laden
+/*N*/ rIn >> aLocalBoundVol;
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ rIn >> aMat3D;
+/*N*/ aTfMatrix = Matrix4D(aMat3D);
+/*N*/ rIn >> nLogicalGroup;
+/*N*/ rIn >> nObjTreeLevel;
+/*N*/ rIn >> nPartOfParent;
+/*N*/ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+/*N*/
+/*N*/ // BoundVolume muss neu berechnet werden
+/*N*/ bBoundVolValid = FALSE;
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft ())
+/*N*/ {
+/*N*/ // neue Member
+/*N*/ BOOL bTmp;
+/*N*/ sal_Int32 nTmp;
+/*N*/
+/*N*/ // alte Version holt sich nur ein Polygon3D, wird hier durch
+/*N*/ // Eintragen als erstes Teilpolygon geladen
+/*N*/ // rIn >> aPolyPoly3D;
+/*N*/ rIn >> aPolyPoly3D[0];
+/*N*/
+/*N*/ // #106240# OK, this file does have a saved polygon
+/*N*/ bPolyWasRead = sal_True;
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DHorizontalSegmentsItem(nTmp));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DEndAngleItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(bTmp));
+/*N*/
+/*N*/ rIn >> fLatheScale;
+/*N*/ }
+/*N*/
+/*N*/ // #106240# No PolyPolygon as base for the lathe object was saved.
+/*N*/ // Reconstruct it from the objects in the SubList.
+/*N*/ if(!bPolyWasRead)
+/*N*/ {
+/*N*/ // This is really a old 3.0 or 3.1 file, reconstruct
+/*N*/ // the not saved polygon using the SubList.
+/*N*/ SdrObjList* pSubList = GetSubList();
+/*N*/
+/*N*/ if(pSubList && pSubList->GetObjCount())
+/*N*/ {
+/*N*/ sal_uInt16 nHorSegCount = (sal_uInt16)GetHorizontalSegments() / 2;
+/*N*/ sal_uInt16 nVerSegCount = (sal_uInt16)(pSubList->GetObjCount() / nHorSegCount);
+/*N*/ Polygon3D aNewBasePoly;
+/*N*/
+/*N*/ for(sal_uInt16 a(0); a < nVerSegCount; a++)
+/*N*/ {
+/*N*/ E3dPolyObj* pCandidate = (E3dPolyObj*)pSubList->GetObj(a * nHorSegCount);
+/*N*/ if(pCandidate->ISA(E3dPolyObj))
+/*N*/ {
+/*N*/ const PolyPolygon3D& rCandPoly = ((E3dPolyObj*)pCandidate)->GetPolyPolygon3D();
+/*N*/
+/*N*/ if(rCandPoly[0].GetPointCount() > 1)
+/*N*/ {
+/*N*/ aNewBasePoly[a] = rCandPoly[0][1];
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ aPolyPoly3D.Clear();
+/*N*/ aNewBasePoly.SetClosed(sal_True);
+/*N*/ aPolyPoly3D.Insert(aNewBasePoly);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Ab Version 364f (19.06.97)
+/*N*/ sal_Int32 nTmp;
+/*N*/ rIn >> nTmp;
+/*N*/
+/*N*/ // #83965# internally the real number of segments (edges) is
+/*N*/ // used, no longer the number of points
+/*N*/ if(!aPolyPoly3D[0].IsClosed())
+/*N*/ nTmp -= 1;
+/*N*/
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(nTmp));
+/*N*/ }
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Ab Version 374 (15.12.97)
+/*N*/ // Gesamtes PolyPolygon laden
+/*N*/ BOOL bTmp;
+/*N*/ double fTmp;
+/*N*/
+/*N*/ aPolyPoly3D.Clear();
+/*N*/ rIn >> aPolyPoly3D;
+/*N*/
+/*N*/ rIn >> fTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DBackscaleItem((sal_uInt16)(fTmp * 100.0)));
+/*N*/
+/*N*/ rIn >> fTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DPercentDiagonalItem(sal_uInt16(fTmp * 200.0)));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bLatheSmoothed = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothNormalsItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bLatheSmoothFrontBack = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothLidsItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bLatheCharacterMode = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DCharacterModeItem(bTmp));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Geometrie aus erzeugten PolyObj's rekonstruieren
+/*N*/ mpObjectItemSet->Put(Svx3DBackscaleItem(100));
+/*N*/
+/*N*/ mpObjectItemSet->Put(Svx3DPercentDiagonalItem(10));
+/*N*/
+/*N*/ // #107245# bLatheSmoothed = TRUE;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothNormalsItem(sal_True));
+/*N*/
+/*N*/ // #107245# bLatheSmoothFrontBack = FALSE;
+/*N*/ mpObjectItemSet->Put(Svx3DSmoothLidsItem(sal_False));
+/*N*/
+/*N*/ // #107245# bLatheCharacterMode = FALSE;
+/*N*/ mpObjectItemSet->Put(Svx3DCharacterModeItem(sal_False));
+/*N*/ }
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+/*N*/ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+/*N*/ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+/*N*/ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+/*N*/ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+/*N*/ // E3dCompoundObject oder E3dObject aendern.
+/*N*/ BOOL bTmp, bTmp2;
+/*N*/ sal_uInt16 nTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; bCreateNormals = bTmp;
+/*N*/ rIn >> bTmp; bCreateTexture = bTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DNormalsKindItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionXItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionYItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DShadow3DItem(bTmp));
+/*N*/
+/*N*/ Color aCol;
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ SetMaterialAmbientColor(aCol);
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ // do NOT use, this is the old 3D-Color(!)
+/*N*/ // SetItem(XFillColorItem(String(), aCol));
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialSpecularItem(aCol));
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialEmissionItem(aCol));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialSpecularIntensityItem(nTmp));
+/*N*/
+/*N*/ aBackMaterial.ReadData(rIn);
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureKindItem(nTmp));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureModeItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DNormalsInvertItem(bTmp));
+/*N*/ }
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Ab Version 513a (5.2.99): Parameter fuer das
+/*N*/ // Erzeugen der Vorder/Rueckwand
+/*N*/ BOOL bTmp;
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bLatheCloseFront = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseFrontItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; // #107245# bLatheCloseBack = bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseBackItem(bTmp));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // #107245# bLatheCloseFront = TRUE;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseFrontItem(sal_True));
+/*N*/
+/*N*/ // #107245# bLatheCloseBack = TRUE;
+/*N*/ mpObjectItemSet->Put(Svx3DCloseBackItem(sal_True));
+/*N*/ }
+/*N*/
+/*N*/ // neu ab 534: (hat noch gefehlt)
+/*N*/ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+/*N*/ {
+/*N*/ BOOL bTmp;
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureFilterItem(bTmp));
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // correct position of extrude polygon, in case it's not positioned
+/*N*/ // at the Z==0 layer
+/*N*/ if(aPolyPoly3D.Count() && aPolyPoly3D[0].GetPointCount())
+/*N*/ {
+/*N*/ const Vector3D& rFirstPoint = aPolyPoly3D[0][0];
+/*N*/ if(rFirstPoint.Z() != 0.0)
+/*N*/ {
+/*N*/ // change transformation so that source poly lies in Z == 0,
+/*N*/ // so it can be exported as 2D polygon
+/*N*/ //
+/*N*/ // ATTENTION: the translation has to be multiplied from LEFT
+/*N*/ // SIDE since it was executed as the first translate for this
+/*N*/ // 3D object during it's creation.
+/*N*/ double fTransDepth(rFirstPoint.Z());
+/*N*/ Matrix4D aTransMat;
+/*N*/ aTransMat.TranslateZ(fTransDepth);
+/*N*/ NbcSetTransform(aTransMat * GetTransform());
+/*N*/
+/*N*/ // correct polygon itself
+/*N*/ aTransMat.Identity();
+/*N*/ aTransMat.TranslateZ(-fTransDepth);
+/*N*/ aPolyPoly3D.Transform(aTransMat);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ ReCreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus n Polygonen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Neue Segmentierung (Beschreibung siehe Header-File)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dLatheObj::SetPolyPoly3D(const PolyPolygon3D& rNew)
+/*N*/ {
+/*N*/ if(aPolyPoly3D != rNew)
+/*N*/ {
+/*N*/ aPolyPoly3D = rNew;
+/*N*/
+/*N*/ // #83965# take care of vertical segments, too.
+/*N*/ sal_Int32 nNumVSegs = aPolyPoly3D[0].GetPointCount();
+/*N*/ if(!aPolyPoly3D[0].IsClosed())
+/*N*/ nNumVSegs -= 1;
+/*N*/ ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(nNumVSegs));
+/*N*/
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+
+// #107245#
+// void E3dLatheObj::SetLatheSmoothed(BOOL bNew)
+// {
+// if(bLatheSmoothed != bNew)
+// {
+// bLatheSmoothed = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dLatheObj::SetLatheSmoothFrontBack(BOOL bNew)
+// {
+// if(bLatheSmoothFrontBack != bNew)
+// {
+// bLatheSmoothFrontBack = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dLatheObj::SetLatheCharacterMode(BOOL bNew)
+// {
+// if(bLatheCharacterMode != bNew)
+// {
+// bLatheCharacterMode = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dLatheObj::SetLatheCloseFront(BOOL bNew)
+// {
+// if(bLatheCloseFront != bNew)
+// {
+// bLatheCloseFront = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+// #107245#
+// void E3dLatheObj::SetLatheCloseBack(BOOL bNew)
+// {
+// if(bLatheCloseBack != bNew)
+// {
+// bLatheCloseBack = bNew;
+// bGeometryValid = FALSE;
+// }
+// }
+
+//////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ void E3dLatheObj::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::PostItemChange(nWhich);
+/*N*/
+/*N*/ switch(nWhich)
+/*N*/ {
+/*N*/ case SDRATTR_3DOBJ_HORZ_SEGS:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_VERT_SEGS:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_PERCENT_DIAGONAL:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_BACKSCALE:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_END_ANGLE:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Aufbrechen
+|*
+\************************************************************************/
+
+
+
+// EOF
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_light3d.cxx b/binfilter/bf_svx/source/engine3d/svx_light3d.cxx
new file mode 100644
index 000000000000..e8d4f2dc039d
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_light3d.cxx
@@ -0,0 +1,317 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdio.hxx"
+
+#include "globl3d.hxx"
+
+#include "light3d.hxx"
+
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dLight, E3dPointObj);
+
+/*************************************************************************
+|*
+|* E3dLight-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dLight::E3dLight(const Vector3D& rPos, const Color& rColor,
+/*N*/ double fLightIntensity) :
+/*N*/ E3dPointObj(rPos),
+/*N*/ fIntensity(fLightIntensity),
+/*N*/ bOn(TRUE),
+/*N*/ bVisible(FALSE)
+/*N*/ {
+/*N*/ SetColor(rColor);
+/*N*/ aLocalBoundVol = Volume3D();
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* E3dLight-Konstruktor 2
+|*
+\************************************************************************/
+
+/*N*/ E3dLight::E3dLight() :
+/*N*/ E3dPointObj(Vector3D()),
+/*N*/
+/*N*/ aColor(255, 255, 255),
+/*N*/
+/*N*/ fRed(1.0),
+/*N*/ fGreen(1.0),
+/*N*/ fBlue(1.0),
+/*N*/ fIntensity(1.0),
+/*N*/ bOn(TRUE),
+/*N*/ bVisible(FALSE)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* protected, daher kein Einfuegen von Objekten von aussen moeglich
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::Insert3DObj(E3dObject* p3DObj)
+/*N*/ {
+/*N*/ // E3dPointObj::Insert3DObj(p3DObj);
+/*N*/ GetSubList()->InsertObject(p3DObj);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dLight::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_LIGHT_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Lichtstaerke an uebergeben Punkt bestimmen und die akkumulierte
+|* Punktfarbe berechnen; Return = TRUE bedeutet, dass die maximale
+|* Farbintensitaet aller Farbanteile erreicht ist.
+|*
+\************************************************************************/
+
+/*N*/ FASTBOOL E3dLight::ImpCalcLighting(Color& rNewColor, const Color& rPntColor,
+/*N*/ double fR, double fG, double fB) const
+/*N*/ {
+/*N*/ ULONG nR(rNewColor.GetRed()),
+/*N*/ nG(rNewColor.GetGreen()),
+/*N*/ nB(rNewColor.GetBlue());
+/*N*/ ULONG nPntR(rPntColor.GetRed()),
+/*N*/ nPntG(rPntColor.GetGreen()),
+/*N*/ nPntB(rPntColor.GetBlue());
+/*N*/
+/*N*/ if ( bOn )
+/*N*/ {
+/*N*/ nR += (ULONG) (fR * nPntR);
+/*N*/ nG += (ULONG) (fG * nPntG);
+/*N*/ nB += (ULONG) (fB * nPntB);
+/*N*/
+/*N*/ nR = Min(nR, nPntR);
+/*N*/ nG = Min(nG, nPntG);
+/*N*/ nB = Min(nB, nPntB);
+/*N*/
+/*N*/ rNewColor.SetRed((USHORT) nR);
+/*N*/ rNewColor.SetGreen((USHORT) nG);
+/*N*/ rNewColor.SetBlue((USHORT) nB);
+/*N*/ }
+/*N*/ return ( nR == nPntR && nG == nPntG && nB == nPntB );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Lichtstaerke an uebergeben Punkt bestimmen und die akkumulierte
+|* Punktfarbe berechnen
+|*
+\************************************************************************/
+
+/*N*/ FASTBOOL E3dLight::CalcLighting(Color& rNewColor,
+/*N*/ const Vector3D& rPnt,
+/*N*/ const Vector3D& rPntNormal,
+/*N*/ const Color& rPntColor)
+/*N*/ {
+/*N*/ return ImpCalcLighting(rNewColor, rPntColor, fRed, fGreen, fBlue);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* neue Position setzen und Aenderung an Parents (Szene) melden
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::SetPosition(const Vector3D& rNewPos)
+/*N*/ {
+/*N*/ E3dPointObj::SetPosition(rNewPos);
+/*N*/ CreateLightObj();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* neue Intensitaet setzen und Aenderung an Parents (Szene) melden
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::SetIntensity(double fNew)
+/*N*/ {
+/*N*/ if ( fIntensity != fNew )
+/*N*/ {
+/*N*/ fIntensity = fNew;
+/*N*/ StructureChanged(this);
+/*N*/ SetColor(aColor);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* neue Farbe setzen und Aenderung an Parents (Szene) melden
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::SetColor(const Color& rNewColor)
+/*N*/ {
+/*N*/ if ( aColor != rNewColor )
+/*N*/ {
+/*N*/ aColor = rNewColor;
+/*N*/ StructureChanged(this);
+/*N*/ }
+/*N*/
+/*N*/ fRed = fIntensity * aColor.GetRed() / 255;
+/*N*/ fGreen = fIntensity * aColor.GetGreen() / 255;
+/*N*/ fBlue = fIntensity * aColor.GetBlue() / 255;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Lichtquelle ein-/ausschalten und Aenderung an Parents (Szene) melden
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Darstellung des Lichtobjekts in der Szene ein-/ausschalten
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Darstellung des Lichtobjekts in der Szene ein-/ausschalten
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::CreateLightObj()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* sichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ E3dPointObj::WriteData(rOut);
+/*N*/
+/*N*/ #ifdef E3D_STREAMING
+/*N*/
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dLight");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aColor;
+/*N*/ rOut << fIntensity;
+/*N*/ rOut << fRed;
+/*N*/ rOut << fGreen;
+/*N*/ rOut << fBlue;
+/*N*/ rOut << BOOL(bOn);
+/*N*/ rOut << BOOL(bVisible);
+/*N*/ #endif
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ }
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ E3dPointObj::ReadData(rHead, rIn);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dLight");
+/*N*/ #endif
+/*N*/
+/*N*/ BOOL bTmp;
+/*N*/
+/*N*/ rIn >> aColor;
+/*N*/ rIn >> fIntensity;
+/*N*/ rIn >> fRed;
+/*N*/ rIn >> fGreen;
+/*N*/ rIn >> fBlue;
+/*N*/ rIn >> bTmp; bOn = bTmp;
+/*N*/ rIn >> bTmp; bVisible = bTmp;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dLight::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Attribute abfragen
+|*
+\************************************************************************/
+
+/*N*/ SfxStyleSheet*E3dLight::GetStyleSheet() const
+/*N*/ {
+/*N*/ return 0;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_obj3d.cxx b/binfilter/bf_svx/source/engine3d/svx_obj3d.cxx
new file mode 100644
index 000000000000..950028c4469a
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_obj3d.cxx
@@ -0,0 +1,2969 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+#include "svdstr.hrc"
+
+#include "svdview.hxx"
+
+
+
+
+
+
+#include "globl3d.hxx"
+
+
+
+#include "polyob3d.hxx"
+
+
+#include "polysc3d.hxx"
+
+
+
+
+
+
+#include "xoutx.hxx"
+
+
+
+
+
+
+
+
+
+
+
+#include "xlnwtit.hxx"
+
+
+#include "svdio.hxx"
+
+
+
+#include "svxids.hrc"
+
+
+
+
+
+
+
+
+
+
+
+#include "eeitem.hxx"
+
+
+namespace binfilter {
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+/*************************************************************************
+|*
+|* Liste fuer 3D-Objekte
+|*
+\************************************************************************/
+
+/*N*/ TYPEINIT1(E3dObjList, SdrObjList);
+
+/*N*/ E3dObjList::E3dObjList(SdrModel* pNewModel, SdrPage* pNewPage, E3dObjList* pNewUpList)
+/*N*/ : SdrObjList(pNewModel, pNewPage, pNewUpList)
+/*N*/ {
+/*N*/ }
+
+/*?*/ E3dObjList::E3dObjList(const E3dObjList& rSrcList)
+/*?*/ : SdrObjList(rSrcList)
+/*?*/ {
+/*?*/ }
+
+/*N*/ E3dObjList::~E3dObjList()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void E3dObjList::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+/*N*/ {
+/*N*/ // Owner holen
+/*N*/ DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "AW: Einfuegen 3DObject in Parent != 3DObject");
+/*N*/
+/*N*/ // Ist es ueberhaupt ein 3D-Objekt?
+/*N*/ if(pObj && pObj->ISA(E3dObject))
+/*N*/ {
+/*N*/ // Normales 3D Objekt, einfuegen mittels
+/*N*/ // call parent
+/*N*/ SdrObjList::NbcInsertObject(pObj, nPos, pReason);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ // Kein 3D Objekt, fuege in Seite statt in Szene ein...
+/*?*/ GetOwnerObj()->GetPage()->InsertObject(pObj, nPos);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ SdrObject* E3dObjList::RemoveObject(ULONG nObjNum)
+/*N*/ {
+/*N*/ // Owner holen
+/*N*/ DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "AW: Entfernen 3DObject aus Parent != 3DObject");
+/*N*/ E3dObject* pOwner = (E3dObject*)GetOwnerObj();
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrObject* pRetval = SdrObjList::RemoveObject(nObjNum);
+/*N*/
+/*N*/ // FitSnapRectToBoundVol vorbereiten
+/*N*/ if(GetOwnerObj() && GetOwnerObj()->ISA(E3dScene))
+/*N*/ ((E3dScene*)GetOwnerObj())->CorrectSceneDimensions();
+/*N*/
+/*N*/ return pRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ TYPEINIT1(E3dObject, SdrAttrObj);
+
+/*N*/ E3dObject::E3dObject() :
+/*N*/ nLogicalGroup(0),
+/*N*/ nObjTreeLevel(0),
+/*N*/ eDragDetail(E3DDETAIL_ONEBOX),
+/*N*/ nPartOfParent(0),
+/*N*/ bTfHasChanged(TRUE),
+/*N*/ bBoundVolValid(TRUE),
+/*N*/ bIsSelected(FALSE)
+/*N*/ {
+/*N*/ bIs3DObj = TRUE;
+/*N*/ pSub = new E3dObjList(NULL, NULL);
+/*N*/ pSub->SetOwnerObj(this);
+/*N*/ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+/*N*/ bClosedObj = TRUE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dObject::~E3dObject()
+/*N*/ {
+/*N*/ delete pSub;
+/*N*/ pSub = NULL;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Selektions-Flag setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Aufbrechen, default-Implementierungen
+|*
+\************************************************************************/
+
+
+/*N*/ SdrAttrObj* E3dObject::GetBreakObj()
+/*N*/ {
+/*N*/ return 0L;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetRectsDirty muss ueber die lokale SdrSubList gehen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetRectsDirty(FASTBOOL bNotMyself)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrAttrObj::SetRectsDirty(bNotMyself);
+/*N*/
+/*N*/ // Eigene SubListe AUCH behandeln
+/*N*/ if(pSub && pSub->GetObjCount())
+/*N*/ {
+/*N*/ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pSub->GetObj(i);
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/ ((E3dObject*)pObj)->SetRectsDirty(bNotMyself);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Inventor zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT32 E3dObject::GetObjInventor() const
+/*N*/ {
+/*N*/ return E3dInventor;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dObject::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_OBJECT_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Faehigkeiten des Objektes feststellen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Layer abfragen
+|*
+\************************************************************************/
+
+/*N*/ SdrLayerID E3dObject::GetLayer() const
+/*N*/ {
+/*N*/ FASTBOOL bFirst = TRUE;
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/ SdrLayerID nLayer = SdrLayerID(nLayerID);
+/*N*/
+/*N*/ for ( ULONG i = 0; i < nObjCnt; i++ )
+/*N*/ {
+/*N*/ SdrLayerID nObjLayer;
+/*N*/ if(pOL->GetObj(i)->ISA(E3dPolyObj))
+/*N*/ nObjLayer = SdrLayerID(nLayerID);
+/*N*/ else
+/*N*/ nObjLayer = pOL->GetObj(i)->GetLayer();
+/*N*/
+/*N*/ if (bFirst)
+/*N*/ {
+/*N*/ nLayer = nObjLayer;
+/*N*/ bFirst = FALSE;
+/*N*/ }
+/*N*/ else if ( nObjLayer != nLayer )
+/*N*/ return 0;
+/*N*/ }
+/*N*/ return nLayer;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::NbcSetLayer(SdrLayerID nLayer)
+/*N*/ {
+/*N*/ SdrAttrObj::NbcSetLayer(nLayer);
+/*N*/
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/ ULONG i;
+/*N*/ for ( i = 0; i < nObjCnt; i++ )
+/*N*/ pOL->GetObj(i)->NbcSetLayer(nLayer);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ObjList auch an SubList setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetObjList(SdrObjList* pNewObjList)
+/*N*/ {
+/*N*/ SdrObject::SetObjList(pNewObjList);
+/*N*/ pSub->SetUpList(pNewObjList);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ SdrAttrObj::SetPage(pNewPage);
+/*N*/ pSub->SetPage(pNewPage);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrAttrObj::SetModel(pNewModel);
+/*N*/ pSub->SetModel(pNewModel);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* resize object, used from old 2d interfaces, e.g. in Move/Scale dialog
+|* (F4)
+|*
+\************************************************************************/
+/*N*/ void E3dObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ // SdrAttrObj::NbcResize(rRef, xFact, yFact);
+/*N*/
+/*N*/ // Bewegung in X,Y im Augkoordinatensystem
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/
+/*N*/ if(pScene)
+/*N*/ {
+/*N*/ // pos ermitteln
+/*N*/ B3dTransformationSet& rTransSet = pScene->GetCameraSet();
+/*N*/ Vector3D aScaleCenter((double)rRef.X(), (double)rRef.Y(), 32768.0);
+/*N*/ aScaleCenter = rTransSet.ViewToEyeCoor(aScaleCenter);
+/*N*/
+/*N*/ // scale-faktoren holen
+/*N*/ double fScaleX = xFact;
+/*N*/ double fScaleY = yFact;
+/*N*/
+/*N*/ // build transform
+/*N*/ Matrix4D mFullTransform(GetFullTransform());
+/*N*/ Matrix4D mTrans(mFullTransform);
+/*N*/
+/*N*/ mTrans *= rTransSet.GetOrientation();
+/*N*/ mTrans.Translate(-aScaleCenter);
+/*N*/ mTrans.Scale(fScaleX, fScaleY, 1.0);
+/*N*/ mTrans.Translate(aScaleCenter);
+/*N*/ mTrans *= rTransSet.GetInvOrientation();
+/*N*/ mFullTransform.Invert();
+/*N*/ mTrans *= mFullTransform;
+/*N*/
+/*N*/ // anwenden
+/*N*/ Matrix4D mObjTrans(GetTransform());
+/*N*/ mObjTrans *= mTrans;
+/*N*/ SetTransform(mObjTrans);
+/*N*/
+/*N*/ // force new camera and SnapRect on scene, geometry may have really
+/*N*/ // changed
+/*N*/ pScene->CorrectSceneDimensions();
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objekt verschieben in 2D, wird bei Cursortasten benoetigt
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* liefere die Sublist, aber nur dann, wenn darin Objekte enthalten sind !
+|*
+\************************************************************************/
+
+/*N*/ SdrObjList* E3dObject::GetSubList() const
+/*N*/ {
+/*N*/ return pSub;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Anzahl der Handles zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Handle-Liste fuellen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Paint; wird z.Z. nicht benutzt, da das Paint ueber die
+|* (2D-)Displayliste der Szene laeuft
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Objekt als Kontur in das Polygon einfuegen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Schatten fuer 3D-Objekte zeichnen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* SnapRect berechnen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::RecalcSnapRect()
+/*N*/ {
+/*N*/ maSnapRect = Rectangle();
+/*N*/ if(pSub && pSub->GetObjCount())
+/*N*/ {
+/*N*/ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pSub->GetObj(i);
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/ Rectangle aSubRect = ((E3dObject*)pObj)->GetSnapRect();
+/*N*/ maSnapRect.Union(aSubRect);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* BoundRect berechnen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::RecalcBoundRect()
+/*N*/ {
+/*N*/ // BoundRect aus SnapRect berechnen
+/*N*/ aOutRect = GetSnapRect();
+/*N*/
+/*N*/ if(pSub && pSub->GetObjCount())
+/*N*/ {
+/*N*/ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pSub->GetObj(i);
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/ Rectangle aSubRect = ((E3dObject*)pObj)->GetBoundRect();
+/*N*/ aOutRect.Union(aSubRect);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Einfuegen eines 3D-Objekts an den Parent weitermelden, damit dieser
+|* ggf. eine Sonderbehandlung fuer spezielle Objekte durchfuehren kann
+|* (z.B. Light/Label in E3dScene)
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::NewObjectInserted(const E3dObject* p3DObj)
+/*N*/ {
+/*N*/ if(GetParentObj())
+/*N*/ GetParentObj()->NewObjectInserted(p3DObj);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Parent ueber Aenderung der Struktur (z.B. durch Transformation)
+|* informieren; dabei wird das Objekt, in welchem die Aenderung
+|* aufgetreten ist, uebergeben
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::StructureChanged(const E3dObject* p3DObj)
+/*N*/ {
+/*N*/ if ( GetParentObj() )
+/*N*/ {
+/*N*/ // Wenn sich im Child das BoundVolume geaendert hat, muessen
+/*N*/ // auch die der Parents angepasst werden
+/*N*/ if ( !p3DObj->bBoundVolValid )
+/*N*/ GetParentObj()->bBoundVolValid = FALSE;
+/*N*/
+/*N*/ GetParentObj()->StructureChanged(p3DObj);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 3D-Objekt einfuegen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::Insert3DObj(E3dObject* p3DObj)
+/*N*/ {
+/*N*/ DBG_ASSERT(p3DObj, "Insert3DObj mit NULL-Zeiger!");
+/*N*/ p3DObj->SetObjTreeLevel(nObjTreeLevel + 1);
+/*N*/ SdrPage* pPg = pPage;
+/*N*/ pSub->InsertObject(p3DObj);
+/*N*/ pPage = pPg;
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ NewObjectInserted(p3DObj);
+/*N*/ StructureChanged(this);
+/*N*/ }
+
+/*N*/ void E3dObject::Remove3DObj(E3dObject* p3DObj)
+/*N*/ {
+/*N*/ DBG_ASSERT(p3DObj, "Remove3DObj mit NULL-Zeiger!");
+/*N*/
+/*N*/ if(p3DObj->GetParentObj() == this)
+/*N*/ {
+/*N*/ SdrPage* pPg = pPage;
+/*N*/ pSub->RemoveObject(p3DObj->GetOrdNum());
+/*N*/ pPage = pPg;
+/*N*/
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ StructureChanged(this);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Parent holen
+|*
+\************************************************************************/
+
+/*N*/ E3dObject* E3dObject::GetParentObj() const
+/*N*/ {
+/*N*/ E3dObject* pRetval = NULL;
+/*N*/
+/*N*/ if(GetObjList()
+/*N*/ && GetObjList()->GetOwnerObj()
+/*N*/ && GetObjList()->GetOwnerObj()->ISA(E3dObject))
+/*N*/ pRetval = ((E3dObject*)GetObjList()->GetOwnerObj());
+/*N*/ return pRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Uebergeordnetes Szenenobjekt bestimmen
+|*
+\************************************************************************/
+
+/*N*/ E3dScene* E3dObject::GetScene() const
+/*N*/ {
+/*N*/ if(GetParentObj())
+/*N*/ return GetParentObj()->GetScene();
+/*N*/ return NULL;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* umschliessendes Volumen inklusive aller Kindobjekte berechnen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::RecalcBoundVolume()
+/*N*/ {
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/
+/*N*/ if(nObjCnt)
+/*N*/ {
+/*N*/ aBoundVol = Volume3D();
+/*N*/
+/*N*/ for (ULONG i = 0; i < nObjCnt; i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pOL->GetObj(i);
+/*N*/
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/ // Bei den Kindobjekten auch die lokalen Transformationen
+/*N*/ // beruecksichtigen
+/*N*/ E3dObject* p3DObj = (E3dObject*) pObj;
+/*N*/ const Volume3D& rVol = p3DObj->GetBoundVolume();
+/*N*/ const Matrix4D& rTf = p3DObj->GetTransform();
+/*N*/ aBoundVol.Union(rVol.GetTransformVolume(rTf));
+/*N*/ }
+/*N*/
+/*N*/ aLocalBoundVol = aBoundVol;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aBoundVol = aLocalBoundVol;
+/*N*/ }
+/*N*/
+/*N*/ bBoundVolValid = TRUE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* umschliessendes Volumen zurueckgeben und ggf. neu berechnen
+|*
+\************************************************************************/
+
+/*N*/ const Volume3D& E3dObject::GetBoundVolume()
+/*N*/ {
+/*N*/ if ( !bBoundVolValid )
+/*N*/ RecalcBoundVolume();
+/*N*/
+/*N*/ if(!aBoundVol.IsValid())
+/*N*/ aBoundVol = Volume3D(Vector3D(), Vector3D());
+/*N*/
+/*N*/ return aBoundVol;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Mittelpunkt liefern
+|*
+\************************************************************************/
+
+/*N*/ Vector3D E3dObject::GetCenter()
+/*N*/ {
+/*N*/ Volume3D aVolume = GetBoundVolume();
+/*N*/ return (aVolume.MaxVec() + aVolume.MinVec()) / 2.0;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Aederung des BoundVolumes an alle Kindobjekte weitergeben
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetBoundVolInvalid()
+/*N*/ {
+/*N*/ bBoundVolValid = FALSE;
+/*N*/
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/
+/*N*/ for (ULONG i = 0; i < nObjCnt; i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pOL->GetObj(i);
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/
+/*N*/ ((E3dObject*) pObj)->SetBoundVolInvalid();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Aederung der Transformation an alle Kindobjekte weitergeben
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetTransformChanged()
+/*N*/ {
+/*N*/ bTfHasChanged = TRUE;
+/*N*/ bBoundVolValid = FALSE;
+/*N*/
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/
+/*N*/ for (ULONG i = 0; i < nObjCnt; i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pOL->GetObj(i);
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/
+/*N*/ ((E3dObject*) pObj)->SetTransformChanged();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* hierarchische Transformation ueber alle Parents bestimmen und mit
+|* der uebergebenen Matrix verketten
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* hierarchische Transformation ueber alle Parents bestimmen, in
+|* aFullTfMatrix ablegen und diese zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ const Matrix4D& E3dObject::GetFullTransform()
+/*N*/ {
+/*N*/ if ( bTfHasChanged )
+/*N*/ {
+/*N*/ aFullTfMatrix = aTfMatrix;
+/*N*/
+/*N*/ if ( GetParentObj() )
+/*N*/ aFullTfMatrix *= GetParentObj()->GetFullTransform();
+/*N*/
+/*N*/ bTfHasChanged = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ return aFullTfMatrix;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformationsmatrix abfragen
+|*
+\************************************************************************/
+
+/*N*/ const Matrix4D& E3dObject::GetTransform() const
+/*N*/ {
+/*N*/ return aTfMatrix;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformationsmatrix setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::NbcSetTransform(const Matrix4D& rMatrix)
+/*N*/ {
+/*N*/ aTfMatrix = rMatrix;
+/*N*/ SetTransformChanged();
+/*N*/ StructureChanged(this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformationsmatrix auf Einheitsmatrix zuruecksetzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::NbcResetTransform()
+/*N*/ {
+/*N*/ aTfMatrix.Identity();
+/*N*/ SetTransformChanged();
+/*N*/ StructureChanged(this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformationsmatrix setzen mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetTransform(const Matrix4D& rMatrix)
+/*N*/ {
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetTransform(rMatrix);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformationsmatrix zuruecksetzen mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Translation
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* Translation mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Skalierungen
+|*
+\************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/*************************************************************************
+|*
+|* gleichmaessige Skalierung
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Skalierungen mit mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Rotationen mit Winkel in Radiant
+|*
+\************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Rotationen mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+
+/************************************************************************/
+
+
+/************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Objektbaum-Ebene des Objekts und aller Children setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SetObjTreeLevel(USHORT nNewLevel)
+/*N*/ {
+/*N*/ nObjTreeLevel = nNewLevel;
+/*N*/ nNewLevel++;
+/*N*/
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/
+/*N*/ for (ULONG i = 0; i < nObjCnt; i++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pOL->GetObj(i);
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+/*N*/
+/*N*/ ((E3dObject*) pObj)->SetObjTreeLevel(nNewLevel);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* logische Gruppe setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Linien fuer die Wireframe-Darstellung des Objekts dem uebergebenen
+|* Polygon3D hinzufuegen. Als default wird das BoundVolume verwendet.
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Wireframe-XPolyPolygon erzeugen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Drag-Polygon zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+//////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ const SfxItemSet& E3dObject::GetItemSet() const
+/*N*/ {
+/*N*/ // include Items of scene this object belongs to
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/ if(pScene && pScene != this)
+/*N*/ {
+/*N*/ SfxItemSet& rSet = (SfxItemSet&)SdrAttrObj::GetItemSet();
+/*N*/ SfxItemSet aSet(*rSet.GetPool(), SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST);
+/*N*/ aSet.Put(pScene->E3dObject::GetItemSet());
+/*N*/ rSet.Put(aSet);
+/*N*/ }
+/*N*/
+/*N*/ return SdrAttrObj::GetItemSet();
+/*N*/ }
+
+/*N*/ SfxItemSet* E3dObject::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/
+/*N*/ // ranges for 3D (object and scene)
+/*N*/ SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+
+// private support routines for ItemSet access. NULL pointer means clear item.
+/*N*/ void E3dObject::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ // propagate item changes to scene
+/*N*/ if(!nWhich || (nWhich >= SDRATTR_3DSCENE_FIRST && nWhich <= SDRATTR_3DSCENE_LAST))
+/*N*/ {
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/ if(pScene && pScene != this)
+/*N*/ pScene->E3dObject::ItemChange(nWhich, pNewItem);
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrAttrObj::ItemChange(nWhich, pNewItem);
+/*N*/ }
+
+// #107770# Like propagating ItemChange to the scene if scene items are changed,
+// do the same with the PostItemChange calls.
+/*N*/ void E3dObject::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ // propagate item changes to scene
+/*N*/ if(!nWhich || (nWhich >= SDRATTR_3DSCENE_FIRST && nWhich <= SDRATTR_3DSCENE_LAST))
+/*N*/ {
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/ if(pScene && pScene != this)
+/*N*/ pScene->PostItemChange(nWhich);
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrAttrObj::PostItemChange(nWhich);
+/*N*/ }
+
+/*N*/ void E3dObject::ItemSetChanged( const SfxItemSet& rSet )
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrAttrObj::ItemSetChanged( rSet );
+/*N*/
+/*N*/ // local changes
+/*N*/ StructureChanged(this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* StyleSheet setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet,
+/*N*/ FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrAttrObj::NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+/*N*/
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/ for ( ULONG i = 0; i < nObjCnt; i++ )
+/*?*/ pOL->GetObj(i)->NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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)
+|*
+\************************************************************************/
+
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ void E3dObject::WriteOnlyOwnMembers(SvStream& rOut) const
+/*N*/ {
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dObjectOwnMembers");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aLocalBoundVol;
+/*N*/
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ aMat3D = aTfMatrix;
+/*N*/ rOut << aMat3D;
+/*N*/
+/*N*/ rOut << nLogicalGroup;
+/*N*/ rOut << nObjTreeLevel;
+/*N*/ rOut << nPartOfParent;
+/*N*/ rOut << UINT16(eDragDetail);
+/*N*/ }
+/*N*/ #endif
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long position = rOut.Tell();
+/*N*/ SdrAttrObj::WriteData(rOut);
+/*N*/ position = rOut.Tell();
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dObject");
+/*N*/ #endif
+/*N*/
+/*N*/ position = rOut.Tell();
+/*N*/ pSub->Save(rOut);
+/*N*/ position = rOut.Tell();
+/*N*/
+/*N*/ if (rOut.GetVersion() < 3560)
+/*N*/ {
+/*N*/ rOut << aLocalBoundVol;
+/*N*/
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ aMat3D = aTfMatrix;
+/*N*/ rOut << aMat3D;
+/*N*/
+/*N*/ rOut << nLogicalGroup;
+/*N*/ rOut << nObjTreeLevel;
+/*N*/ rOut << nPartOfParent;
+/*N*/ rOut << UINT16(eDragDetail);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ WriteOnlyOwnMembers(rOut);
+/*N*/ }
+/*N*/ position = rOut.Tell();
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ long position = rIn.Tell();
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ position = rIn.Tell();
+/*N*/ SdrAttrObj::ReadData(rHead, rIn);
+/*N*/ position = rIn.Tell();
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dObject");
+/*N*/ #endif
+/*N*/ pSub->Load(rIn, *pPage);
+/*N*/
+/*N*/ position = rIn.Tell();
+/*N*/ if ((rIn.GetVersion() < 3560) || (rHead.GetVersion() <= 12))
+/*N*/ {
+/*N*/ UINT16 nTmp16;
+/*N*/
+/*N*/ rIn >> aLocalBoundVol;
+/*N*/
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ rIn >> aMat3D;
+/*N*/ aTfMatrix = Matrix4D(aMat3D);
+/*N*/
+/*N*/ rIn >> nLogicalGroup;
+/*N*/ rIn >> nObjTreeLevel;
+/*N*/ rIn >> nPartOfParent;
+/*N*/ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ ReadOnlyOwnMembers(rHead, rIn);
+/*N*/ }
+/*N*/ position = rIn.Tell();
+/*N*/
+/*N*/ // Wie ein veraendertes Objekt behandeln
+/*N*/ SetTransformChanged();
+/*N*/ StructureChanged(this);
+/*N*/
+/*N*/ // BoundVolume muss neu berechnet werden
+/*N*/ bBoundVolValid = FALSE;
+/*N*/
+/*N*/ // SnapRect auch
+/*N*/ bSnapRectDirty = TRUE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Nur die Daten des E3dObject aus Stream laden (nicht der Sublisten und
+|* der Basisklassen). Wird von E3dSphere auch genutzt. (FileFormat-Optimierung)
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::ReadOnlyOwnMembers(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dObjectOwnMembers");
+/*N*/ #endif
+/*N*/ UINT16 nTmp16;
+/*N*/
+/*N*/ rIn >> aLocalBoundVol;
+/*N*/
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ rIn >> aMat3D;
+/*N*/ aTfMatrix = Matrix4D(aMat3D);
+/*N*/
+/*N*/ rIn >> nLogicalGroup;
+/*N*/ rIn >> nObjTreeLevel;
+/*N*/ rIn >> nPartOfParent;
+/*N*/ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+/*N*/
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* nach dem Laden...
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::AfterRead()
+/*N*/ {
+/*N*/ SdrAttrObj::AfterRead();
+/*N*/ if (pSub)
+/*N*/ pSub->AfterRead();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* erstelle neues GeoData-Objekt
+|*
+\************************************************************************/
+
+/*N*/ SdrObjGeoData *E3dObject::NewGeoData() const
+/*N*/ {
+/*N*/ // Theoretisch duerfen auch nur Szenen ihre GeoDatas erstellen und verwalten !!
+/*N*/ // AW: Dies stimmt nicht mehr, diese Stelle ist mit der neuen Engine OK!
+/*N*/ return new E3DObjGeoData;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* uebergebe aktuelle werte an das GeoData-Objekt
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {
+/*N*/ SdrAttrObj::SaveGeoData (rGeo);
+/*N*/
+/*N*/ ((E3DObjGeoData &) rGeo).aLocalBoundVol = aLocalBoundVol;
+/*N*/ ((E3DObjGeoData &) rGeo).aTfMatrix = aTfMatrix;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* uebernehme werte aus dem GeoData-Objekt
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::RestGeoData(const SdrObjGeoData& rGeo)
+/*N*/ {
+/*N*/ aLocalBoundVol = ((E3DObjGeoData &) rGeo).aLocalBoundVol;
+/*N*/ NbcSetTransform (((E3DObjGeoData &) rGeo).aTfMatrix);
+/*N*/
+/*N*/ SdrAttrObj::RestGeoData (rGeo);
+/*N*/ GetScene()->FitSnapRectToBoundVol();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Pruefe, ob die SubRecords ok sind und mit der Factory gelesen werden
+|* koennen.
+|*
+\************************************************************************/
+
+/*N*/ BOOL E3dObject::ImpCheckSubRecords (const SdrObjIOHeader& rHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bDoRead = FALSE;
+/*N*/
+/*N*/ if ( rIn.GetError() == SVSTREAM_OK )
+/*N*/ {
+/*N*/ if (rHead.GetVersion () <= 12)
+/*N*/ {
+/*N*/ ULONG nPos0 = rIn.Tell();
+/*N*/ // Einen SubRecord ueberspringen (SdrObject)
+/*N*/ { SdrDownCompat aCompat(rIn,STREAM_READ); }
+/*N*/ // Nocheinen SubRecord ueberspringen (SdrAttrObj)
+/*N*/ { SdrDownCompat aCompat(rIn,STREAM_READ); }
+/*N*/ // Und nun muesste meiner kommen
+/*N*/ bDoRead = rHead.GetBytesLeft() != 0;
+/*N*/ rIn.Seek (nPos0); // FilePos wieder restaurieren
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bDoRead = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bDoRead;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Keine DefaultAttr, zu langsam
+|*
+\************************************************************************/
+
+/*N*/ void E3dObject::ForceDefaultAttr()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************/
+
+/*N*/ TYPEINIT1(E3dCompoundObject, E3dObject);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dCompoundObject::E3dCompoundObject() : E3dObject()
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ E3dDefaultAttributes aDefault;
+/*N*/ SetDefaultAttributes(aDefault);
+/*N*/
+/*N*/ bBytesLeft = FALSE;
+/*N*/ bCreateE3dPolyObj = FALSE;
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+
+/*N*/ E3dCompoundObject::E3dCompoundObject(E3dDefaultAttributes& rDefault) : E3dObject()
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ SetDefaultAttributes(rDefault);
+/*N*/
+/*N*/ bBytesLeft = FALSE;
+/*N*/ bCreateE3dPolyObj = FALSE;
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ aMaterialAmbientColor = rDefault.GetDefaultAmbientColor();
+/*N*/
+//is always default, so it needs not to be set /*N*/ aBackMaterial = rDefault.GetDefaultBackMaterial();
+/*N*/ bCreateNormals = rDefault.GetDefaultCreateNormals();
+/*N*/ bCreateTexture = rDefault.GetDefaultCreateTexture();
+/*N*/ bUseDifferentBackMaterial = rDefault.GetDefaultUseDifferentBackMaterial();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dCompoundObject::~E3dCompoundObject ()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Start der Geometrieerzeugung ankuendigen
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::StartCreateGeometry()
+/*N*/ {
+/*N*/ // Geometriestart mitteilen
+/*N*/ aDisplayGeometry.StartDescription();
+/*N*/
+/*N*/ // Lokales Volumen reset
+/*N*/ aLocalBoundVol = Volume3D();
+/*N*/
+/*N*/ // Geometrie ist ab jetzt gueltig, um ein rekursives weiteres
+/*N*/ // Erzeugen zu verhindern
+/*N*/ bGeometryValid = TRUE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dCompoundObject::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_COMPOUNDOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Compounds brauchen Defaults
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::ForceDefaultAttr()
+/*N*/ {
+/*N*/ SdrAttrObj::ForceDefaultAttr();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SnapRect berechnen
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::RecalcSnapRect()
+/*N*/ {
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/ if(pScene)
+/*N*/ {
+/*N*/ // Objekttransformation uebernehmen
+/*N*/ const Volume3D& rBoundVol = GetBoundVolume();
+/*N*/ maSnapRect = Rectangle();
+/*N*/
+/*N*/ if(rBoundVol.IsValid())
+/*N*/ {
+/*N*/ const Matrix4D& rTrans = GetFullTransform();
+/*N*/ Vol3DPointIterator aIter(rBoundVol, &rTrans);
+/*N*/ Vector3D aTfVec;
+/*N*/ while ( aIter.Next(aTfVec) )
+/*N*/ {
+/*N*/ aTfVec = pScene->GetCameraSet().WorldToViewCoor(aTfVec);
+/*N*/ Point aPoint((long)(aTfVec.X() + 0.5), (long)(aTfVec.Y() + 0.5));
+/*N*/ maSnapRect.Union(Rectangle(aPoint, aPoint));
+/*N*/ }
+/*N*/ }
+/*N*/ bSnapRectDirty = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* BoundRect berechnen und evtl. Schatten einbeziehen
+|* Dazu muss ein eventueller Schatten des einzelnen 3D-Objektes
+|* beruecksichtigt werden
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::RecalcBoundRect()
+/*N*/ {
+/*N*/ // BoundRect aus SnapRect berechnen
+/*N*/ aOutRect = GetSnapRect();
+/*N*/
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/ if(pScene)
+/*N*/ {
+/*N*/ // Schatten beruecksichtigen
+/*N*/ if(DoDrawShadow())
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+ // Linienbreite beruecksichtigen
+/*N*/ INT32 nLineWidth = ((const XLineWidthItem&)(GetItem(XATTR_LINEWIDTH))).GetValue();
+/*N*/ if(nLineWidth)
+/*N*/ {
+/*?*/ Rectangle aShadowRect = aOutRect;
+/*?*/ aShadowRect.Left() -= nLineWidth;
+/*?*/ aShadowRect.Right() += nLineWidth;
+/*?*/ aShadowRect.Top() -= nLineWidth;
+/*?*/ aShadowRect.Bottom() += nLineWidth;
+/*?*/ aOutRect.Union(aShadowRect);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* BoundVolume holen. Falls die Geometrie ungueltig ist, diese neu
+|* erzeugen und das BoundVol neu berechnen
+|*
+\************************************************************************/
+
+/*N*/ const Volume3D& E3dCompoundObject::GetBoundVolume()
+/*N*/ {
+/*N*/ // Geometrie aktuell?
+/*N*/ if(!bGeometryValid)
+/*N*/ {
+/*N*/ // Neu erzeugen und eine Neubestimmung des BoundVol erzwingen
+/*N*/ ReCreateGeometry();
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ return E3dObject::GetBoundVolume();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Rausschreiben der Datenmember eines E3dCompounds
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ #ifdef E3D_STREAMING
+/*N*/
+/*N*/ if (!aLocalBoundVol.IsValid() && aBoundVol.IsValid())
+/*N*/ {
+/*N*/ // Das aLocalBoundVol wird gespeichert.
+/*N*/ // Ist dieses ungueltig, so wird das aBoundVol genommen
+/*N*/ // (sollten beim E3dCompoundObject sowieso gleich sein)
+/*N*/ ((E3dCompoundObject*) this)->aLocalBoundVol = aBoundVol;
+/*N*/ }
+/*N*/
+/*N*/ E3dObject::WriteData(rOut);
+/*N*/ if (rOut.GetVersion() < 3560)
+/*N*/ {
+/*N*/ // In diesem Fall passiert nichts, da vor der Version 4.0
+/*N*/ // also im Falle der Revision 3.1
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dCompoundObject");
+/*N*/ #endif
+/*N*/ rOut << BOOL(GetDoubleSided());
+/*N*/ #endif
+/*N*/
+/*N*/ // neue Parameter zur Geometrieerzeugung
+/*N*/ rOut << BOOL(bCreateNormals);
+/*N*/ rOut << BOOL(bCreateTexture);
+/*N*/
+/*N*/ sal_uInt16 nVal = GetNormalsKind();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ nVal = GetTextureProjectionX();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ nVal = GetTextureProjectionY();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ rOut << BOOL(GetShadow3D());
+/*N*/
+/*N*/ // neu al 384:
+/*N*/ rOut << GetMaterialAmbientColor();
+/*N*/ rOut << GetMaterialColor();
+/*N*/ rOut << GetMaterialSpecular();
+/*N*/ rOut << GetMaterialEmission();
+/*N*/ rOut << GetMaterialSpecularIntensity();
+/*N*/
+/*N*/ aBackMaterial.WriteData(rOut);
+/*N*/
+/*N*/ rOut << (UINT16)GetTextureKind();
+/*N*/
+/*N*/ rOut << (UINT16)GetTextureMode();
+/*N*/
+/*N*/ rOut << BOOL(GetNormalsInvert());
+/*N*/
+/*N*/ // neu ab 534: (hat noch gefehlt)
+/*N*/ rOut << BOOL(GetTextureFilter());
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Einlesen der Datenmember eines E3dCompounds
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if ( rIn.GetError() != SVSTREAM_OK )
+/*N*/ return;
+/*N*/
+/*N*/ E3dObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ // Vor der Filerevision 13 wurde das Objekt nie geschrieben.
+/*N*/ // auch kein Kompatibilitaetsrecord.
+/*N*/ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+/*N*/ {
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dCompoundObject");
+/*N*/ #endif
+/*N*/
+/*N*/ bBytesLeft = FALSE;
+/*N*/ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+/*N*/ {
+/*N*/ BOOL bTmp, bTmp2;
+/*N*/ sal_uInt16 nTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(bTmp));
+/*N*/
+/*N*/ // neue Parameter zur Geometrieerzeugung
+/*N*/ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+/*N*/ {
+/*N*/ rIn >> bTmp;
+/*N*/ bCreateNormals = bTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ bCreateTexture = bTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DNormalsKindItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionXItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionYItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DShadow3DItem(bTmp));
+/*N*/
+/*N*/ // Setze ein Flag fuer den Aufrufer, dass neues Format
+/*N*/ // zu lesen ist
+/*N*/ bBytesLeft = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // neu al 384:
+/*N*/ if (aCompat.GetBytesLeft () >= sizeof (B3dMaterial))
+/*N*/ {
+/*N*/ UINT16 nTmp;
+/*N*/
+/*N*/ Color aCol;
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ SetMaterialAmbientColor(aCol);
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ // do NOT use, this is the old 3D-Color(!)
+/*N*/ // SetItem(XFillColorItem(String(), aCol));
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialSpecularItem(aCol));
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialEmissionItem(aCol));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialSpecularIntensityItem(nTmp));
+/*N*/
+/*N*/ aBackMaterial.ReadData(rIn);
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureKindItem(nTmp));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureModeItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DNormalsInvertItem(bTmp));
+/*N*/ }
+/*N*/
+/*N*/ // neu ab 534: (hat noch gefehlt)
+/*N*/ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+/*N*/ {
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureFilterItem(bTmp));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Bitmaps fuer 3D-Darstellung von Gradients und Hatches holen
+|*
+\************************************************************************/
+
+
+
+
+/*************************************************************************
+|*
+|* Give out simple line geometry
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::DestroyGeometry()
+/*N*/ {
+/*N*/ // Alle Objekte in der Sub-Liste zerstoeren. Dies sind die
+/*N*/ // zur Visualisierung des Objektes verwendeten Hilfsobjekte
+/*N*/ pSub->Clear();
+/*N*/ delete pSub;
+/*N*/ pSub = new E3dObjList(NULL, NULL);
+/*N*/ pSub->SetOwnerObj(this);
+/*N*/ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+/*N*/
+/*N*/ // Neue Geometrie zerstoeren
+/*N*/ aDisplayGeometry.Erase();
+/*N*/
+/*N*/ // BoundVols resetten
+/*N*/ aLocalBoundVol = Volume3D();
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ StructureChanged(this);
+/*N*/
+/*N*/ // Geometrie ist ungueltig
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::CreateGeometry()
+/*N*/ {
+/*N*/ // Geometrie ist gueltig, um rekursion zu verhindern
+/*N*/ bGeometryValid = TRUE;
+/*N*/
+/*N*/ // Eventuell entstandene Geometrie noch korrigieren
+/*N*/ // und Default -Normalen oder -Texturkoordinaten erzeugen
+/*N*/ if(bCreateNormals)
+/*N*/ {
+/*N*/ if(GetNormalsKind() > 1)
+/*?*/ GetDisplayGeometry().CreateDefaultNormalsSphere();
+/*N*/ if(GetNormalsInvert())
+/*?*/ GetDisplayGeometry().InvertNormals();
+/*N*/ }
+/*N*/
+/*N*/ if(bCreateTexture)
+/*N*/ {
+/*N*/ GetDisplayGeometry().CreateDefaultTexture(
+/*N*/ ((GetTextureProjectionX() > 0) ? B3D_CREATE_DEFAULT_X : FALSE)
+/*N*/ |((GetTextureProjectionY() > 0) ? B3D_CREATE_DEFAULT_Y : FALSE),
+/*N*/ GetTextureProjectionX() > 1);
+/*N*/ }
+/*N*/
+/*N*/ // Am Ende der Geometrieerzeugung das model an den erzeugten
+/*N*/ // PolyObj's setzen, d.h. beim ueberladen dieser Funktion
+/*N*/ // den parent am Ende rufen.
+/*N*/ if(bCreateE3dPolyObj)
+/*N*/ SetModel(pModel);
+/*N*/
+/*N*/ // Das Ende der Geometrieerzeugung anzeigen
+/*N*/ aDisplayGeometry.EndDescription();
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::ReCreateGeometry(BOOL bCreateOldGeometry)
+/*N*/ {
+/*N*/ // Geometrie zerstoeren
+/*N*/ DestroyGeometry();
+/*N*/
+/*N*/ // Flag fuer Geometrieerzeugung setzen
+/*N*/ bCreateE3dPolyObj = bCreateOldGeometry;
+/*N*/
+/*N*/ // ... und neu erzeugen
+/*N*/ CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::AddGeometry(const PolyPolygon3D& rPolyPolygon3D,
+/*N*/ BOOL bHintIsComplex, BOOL bOutline)
+/*N*/ {
+/*N*/ if(rPolyPolygon3D.Count())
+/*N*/ {
+/*N*/ // eventuell alte Geometrie erzeugen (z.B. zum speichern)
+/*N*/ if(bCreateE3dPolyObj)
+/*N*/ {
+/*N*/ E3dPolyObj* pObj = new E3dPolyObj(
+/*N*/ rPolyPolygon3D, GetDoubleSided(), TRUE);
+/*N*/ pObj->SetPartOfParent();
+/*N*/ Insert3DObj(pObj);
+/*N*/ }
+/*N*/
+/*N*/ // neue Geometrie erzeugen
+/*N*/ for(USHORT a = 0; a < rPolyPolygon3D.Count(); a++ )
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3D = rPolyPolygon3D[a];
+/*N*/ aDisplayGeometry.StartObject(bHintIsComplex, bOutline);
+/*N*/ for(USHORT b = 0; b < rPoly3D.GetPointCount(); b++ )
+/*N*/ aDisplayGeometry.AddEdge(rPoly3D[b]);
+/*N*/ }
+/*N*/ aDisplayGeometry.EndObject();
+/*N*/
+/*N*/ // LocalBoundVolume pflegen
+/*N*/ aLocalBoundVol.Union(rPolyPolygon3D.GetPolySize());
+/*N*/
+/*N*/ // Eigenes BoundVol nicht mehr gueltig
+/*N*/ SetBoundVolInvalid();
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+/*?*/ 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();
+/*?*/ }
+/*?*/ }
+
+/*N*/ void E3dCompoundObject::AddGeometry(
+/*N*/ const PolyPolygon3D& rPolyPolygon3D,
+/*N*/ const PolyPolygon3D& rPolyNormal3D,
+/*N*/ const PolyPolygon3D& rPolyTexture3D,
+/*N*/ BOOL bHintIsComplex, BOOL bOutline)
+/*N*/ {
+/*N*/ if(rPolyPolygon3D.Count())
+/*N*/ {
+/*N*/ // eventuell alte Geometrie erzeugen (z.B. zum speichern)
+/*N*/ if(bCreateE3dPolyObj)
+/*N*/ {
+/*N*/ E3dPolyObj* pObj = new E3dPolyObj(
+/*N*/ rPolyPolygon3D, rPolyNormal3D,
+/*N*/ rPolyTexture3D, GetDoubleSided(), TRUE);
+/*N*/ pObj->SetPartOfParent();
+/*N*/ Insert3DObj(pObj);
+/*N*/ }
+/*N*/
+/*N*/ // neue Geometrie erzeugen
+/*N*/ for(USHORT a = 0; a < rPolyPolygon3D.Count(); a++ )
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3D = rPolyPolygon3D[a];
+/*N*/ const Polygon3D& rNormal3D = rPolyNormal3D[a];
+/*N*/ const Polygon3D& rTexture3D = rPolyTexture3D[a];
+/*N*/ aDisplayGeometry.StartObject(bHintIsComplex, bOutline);
+/*N*/ for(USHORT b = 0; b < rPoly3D.GetPointCount(); b++ )
+/*N*/ aDisplayGeometry.AddEdge(rPoly3D[b], rNormal3D[b], rTexture3D[b]);
+/*N*/ }
+/*N*/ aDisplayGeometry.EndObject();
+/*N*/
+/*N*/ // LocalBoundVolume pflegen
+/*N*/ aLocalBoundVol.Union(rPolyPolygon3D.GetPolySize());
+/*N*/
+/*N*/ // Eigenes BoundVol nicht mehr gueltig
+/*N*/ SetBoundVolInvalid();
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Hilfsfunktionen zur Geometrieerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::RotatePoly(
+/*N*/ PolyPolygon3D& rPolyPolyRotate,
+/*N*/ Matrix4D& rRotMat)
+/*N*/ {
+/*N*/ USHORT nPolyCnt = rPolyPolyRotate.Count();
+/*N*/
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ Polygon3D& rPolyRotate = rPolyPolyRotate[a];
+/*N*/ USHORT nPntCnt = rPolyRotate.GetPointCount();
+/*N*/
+/*N*/ for(UINT16 b=0;b<nPntCnt;b++)
+/*N*/ rPolyRotate[b] *= rRotMat;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::GrowPoly(
+/*N*/ PolyPolygon3D& rPolyPolyGrow,
+/*N*/ PolyPolygon3D& rPolyPolyNormals,
+/*N*/ double fFactor)
+/*N*/ {
+/*N*/ USHORT nPolyCnt = rPolyPolyGrow.Count();
+/*N*/
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ Polygon3D& rPolyGrow = rPolyPolyGrow[a];
+/*N*/ const Polygon3D& rPolyNormals = rPolyPolyNormals[a];
+/*N*/ USHORT nPntCnt = rPolyGrow.GetPointCount();
+/*N*/
+/*N*/ for(UINT16 b=0;b<nPntCnt;b++)
+/*N*/ rPolyGrow[b] += rPolyNormals[b] * fFactor;
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void E3dCompoundObject::ScalePoly(
+/*N*/ PolyPolygon3D& rPolyPolyScale,
+/*N*/ double fFactor)
+/*N*/ {
+/*N*/ USHORT nPolyCnt = rPolyPolyScale.Count();
+/*N*/ Vector3D aMiddle = rPolyPolyScale.GetMiddle();
+/*N*/
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ Polygon3D& rPolyScale = rPolyPolyScale[a];
+/*N*/ USHORT nPntCnt = rPolyScale.GetPointCount();
+/*N*/
+/*N*/ for(UINT16 b=0;b<nPntCnt;b++)
+/*N*/ rPolyScale[b] = ((rPolyScale[b] - aMiddle) * fFactor) + aMiddle;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::CreateFront(
+/*N*/ const PolyPolygon3D& rPolyPoly3D,
+/*N*/ const PolyPolygon3D& rFrontNormals,
+/*N*/ BOOL bCreateNormals,
+/*N*/ BOOL bCreateTexture)
+/*N*/ {
+/*N*/ // Vorderseite
+/*N*/ if(bCreateNormals)
+/*N*/ {
+/*N*/ if(bCreateTexture)
+/*N*/ {
+/*N*/ // Polygon fuer die Textur erzeugen
+/*N*/ PolyPolygon3D aPolyTexture = rPolyPoly3D;
+/*N*/ Volume3D aSize = aPolyTexture.GetPolySize();
+/*N*/ Matrix4D aTrans;
+/*N*/
+/*N*/ aTrans.Identity();
+/*N*/ aTrans.Translate(-aSize.MinVec());
+/*N*/ aPolyTexture.Transform(aTrans);
+/*N*/
+/*N*/ double fFactorX(1.0), fFactorY(1.0), fFactorZ(1.0);
+/*N*/
+/*N*/ if(aSize.GetWidth() != 0.0)
+/*N*/ fFactorX = 1.0 / aSize.GetWidth();
+/*N*/
+/*N*/ if(aSize.GetHeight() != 0.0)
+/*N*/ fFactorY = 1.0 / aSize.GetHeight();
+/*N*/
+/*N*/ if(aSize.GetDepth() != 0.0)
+/*N*/ fFactorZ = 1.0 / aSize.GetDepth();
+/*N*/
+/*N*/ aTrans.Identity();
+/*N*/ aTrans.Scale(fFactorX, -fFactorY, fFactorZ);
+/*N*/ aTrans.Translate(Vector3D(0.0, 1.0, 0.0));
+/*N*/ aPolyTexture.Transform(aTrans);
+/*N*/
+/*N*/ AddGeometry(rPolyPoly3D, rFrontNormals, aPolyTexture, TRUE);
+/*N*/ }
+/*N*/ else
+/*N*/ AddGeometry(rPolyPoly3D, rFrontNormals, TRUE);
+/*N*/ }
+/*N*/ else
+/*N*/ AddGeometry(rPolyPoly3D, TRUE);
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::AddFrontNormals(
+/*N*/ const PolyPolygon3D& rPolyPoly3D,
+/*N*/ PolyPolygon3D& rNormalsFront,
+/*N*/ Vector3D &rOffset)
+/*N*/ {
+/*N*/ Vector3D aFrontNormal = -rOffset;
+/*N*/ aFrontNormal.Normalize();
+/*N*/ USHORT nPolyCnt = rPolyPoly3D.Count();
+/*N*/
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3D = rPolyPoly3D[a];
+/*N*/ Polygon3D& rNormalPoly = rNormalsFront[a];
+/*N*/ USHORT nPntCnt = rPoly3D.GetPointCount();
+/*N*/
+/*N*/ for(UINT16 b=0;b<nPntCnt;b++)
+/*N*/ {
+/*N*/ rNormalPoly[b] += aFrontNormal;
+/*N*/ rNormalPoly[b].Normalize();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::CreateBack(
+/*N*/ const PolyPolygon3D& rPolyPoly3D,
+/*N*/ const PolyPolygon3D& rBackNormals,
+/*N*/ BOOL bCreateNormals,
+/*N*/ BOOL bCreateTexture)
+/*N*/ {
+/*N*/ // PolyPolygon umdrehen
+/*N*/ PolyPolygon3D aLocalPoly = rPolyPoly3D;
+/*N*/ aLocalPoly.FlipDirections();
+/*N*/
+/*N*/ // Rueckseite
+/*N*/ if(bCreateNormals)
+/*N*/ {
+/*N*/ PolyPolygon3D aLocalNormals = rBackNormals;
+/*N*/ aLocalNormals.FlipDirections();
+/*N*/ if(bCreateTexture)
+/*N*/ {
+/*N*/ // Polygon fuer die Textur erzeugen
+/*N*/ PolyPolygon3D aPolyTexture(aLocalPoly);
+/*N*/ Volume3D aSize = aPolyTexture.GetPolySize();
+/*N*/ Matrix4D aTrans;
+/*N*/
+/*N*/ aTrans.Identity();
+/*N*/ aTrans.Translate(-aSize.MinVec());
+/*N*/ aPolyTexture.Transform(aTrans);
+/*N*/
+/*N*/ double fFactorX(1.0), fFactorY(1.0), fFactorZ(1.0);
+/*N*/
+/*N*/ if(aSize.GetWidth() != 0.0)
+/*N*/ fFactorX = 1.0 / aSize.GetWidth();
+/*N*/
+/*N*/ if(aSize.GetHeight() != 0.0)
+/*N*/ fFactorY = 1.0 / aSize.GetHeight();
+/*N*/
+/*N*/ if(aSize.GetDepth() != 0.0)
+/*N*/ fFactorZ = 1.0 / aSize.GetDepth();
+/*N*/
+/*N*/ aTrans.Identity();
+/*N*/ aTrans.Scale(fFactorX, -fFactorY, fFactorZ);
+/*N*/ aTrans.Translate(Vector3D(0.0, 1.0, 0.0));
+/*N*/ aPolyTexture.Transform(aTrans);
+/*N*/
+/*N*/ AddGeometry(aLocalPoly, aLocalNormals, aPolyTexture, TRUE);
+/*N*/ }
+/*N*/ else
+/*N*/ AddGeometry(aLocalPoly, aLocalNormals, TRUE);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ AddGeometry(aLocalPoly, TRUE);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::AddBackNormals(
+/*N*/ const PolyPolygon3D& rPolyPoly3D,
+/*N*/ PolyPolygon3D& rNormalsBack,
+/*N*/ Vector3D& rOffset)
+/*N*/ {
+/*N*/ Vector3D aBackNormal = rOffset;
+/*N*/ aBackNormal.Normalize();
+/*N*/ USHORT nPolyCnt = rPolyPoly3D.Count();
+/*N*/
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3D = rPolyPoly3D[a];
+/*N*/ Polygon3D& rNormalPoly = rNormalsBack[a];
+/*N*/ USHORT nPntCnt = rPoly3D.GetPointCount();
+/*N*/
+/*N*/ for(UINT16 b=0;b<nPntCnt;b++)
+/*N*/ {
+/*N*/ rNormalPoly[b] += aBackNormal;
+/*N*/ rNormalPoly[b].Normalize();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::CreateInBetween(
+/*N*/ const PolyPolygon3D& rPolyPolyFront,
+/*N*/ const PolyPolygon3D& rPolyPolyBack,
+/*N*/ const PolyPolygon3D& rFrontNormals,
+/*N*/ const PolyPolygon3D& rBackNormals,
+/*N*/ BOOL bCreateNormals,
+/*N*/ double fSurroundFactor,
+/*N*/ double fTextureStart,
+/*N*/ double fTextureDepth,
+/*N*/ BOOL bRotateTexture90)
+/*N*/ {
+/*N*/ USHORT nPolyCnt = rPolyPolyFront.Count();
+/*N*/ BOOL bCreateTexture = (fTextureDepth == 0.0) ? FALSE : TRUE;
+/*N*/ double fPolyLength, fPolyPos;
+/*N*/ USHORT nLastIndex;
+/*N*/
+/*N*/ // Verbindungsstuecke
+/*N*/ if(bCreateNormals)
+/*N*/ {
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3DFront = rPolyPolyFront[a];
+/*N*/ const Polygon3D& rPoly3DBack = rPolyPolyBack[a];
+/*N*/
+/*N*/ const Polygon3D& rPolyNormalsFront = rFrontNormals[a];
+/*N*/ const Polygon3D& rPolyNormalsBack = rBackNormals[a];
+/*N*/
+/*N*/ Polygon3D aRect3D(4);
+/*N*/ Polygon3D aNormal3D(4);
+/*N*/ Polygon3D aTexture3D(4);
+/*N*/ USHORT nPntCnt = rPoly3DFront.GetPointCount();
+/*N*/ USHORT nPrefillIndex = rPoly3DFront.IsClosed() ? nPntCnt - 1 : 0;
+/*N*/
+/*N*/ aRect3D[3] = rPoly3DFront[nPrefillIndex];
+/*N*/ aRect3D[2] = rPoly3DBack[nPrefillIndex];
+/*N*/ aNormal3D[3] = rPolyNormalsFront[nPrefillIndex];
+/*N*/ aNormal3D[2] = rPolyNormalsBack[nPrefillIndex];
+/*N*/
+/*N*/ if(bCreateTexture)
+/*N*/ {
+/*N*/ fPolyLength = rPoly3DFront.GetLength();
+/*N*/ fPolyPos = 0.0;
+/*N*/ nLastIndex = rPoly3DFront.IsClosed() ? nPntCnt - 1 : 0;
+/*N*/
+/*N*/ if(bRotateTexture90)
+/*N*/ {
+/*N*/ // X,Y vertauschen
+/*N*/ aTexture3D[3].X() = fTextureStart;
+/*N*/ aTexture3D[3].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+/*N*/
+/*N*/ aTexture3D[2].X() = fTextureStart + fTextureDepth;
+/*N*/ aTexture3D[2].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aTexture3D[3].X() = fPolyPos * fSurroundFactor;
+/*N*/ aTexture3D[3].Y() = fTextureStart;
+/*N*/
+/*N*/ aTexture3D[2].X() = fPolyPos * fSurroundFactor;
+/*N*/ aTexture3D[2].Y() = fTextureStart + fTextureDepth;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ for (USHORT i = rPoly3DFront.IsClosed() ? 0 : 1; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ aRect3D[0] = aRect3D[3];
+/*N*/ aRect3D[1] = aRect3D[2];
+/*N*/
+/*N*/ aRect3D[3] = rPoly3DFront[i];
+/*N*/ aRect3D[2] = rPoly3DBack[i];
+/*N*/
+/*N*/ aNormal3D[0] = aNormal3D[3];
+/*N*/ aNormal3D[1] = aNormal3D[2];
+/*N*/
+/*N*/ aNormal3D[3] = rPolyNormalsFront[i];
+/*N*/ aNormal3D[2] = rPolyNormalsBack[i];
+/*N*/
+/*N*/ if(bCreateTexture)
+/*N*/ {
+/*N*/ // Texturkoordinaten ermitteln
+/*N*/ Vector3D aPart = rPoly3DFront[i] - rPoly3DFront[nLastIndex];
+/*N*/ fPolyPos += aPart.GetLength() / fPolyLength;
+/*N*/ nLastIndex = i;
+/*N*/
+/*N*/ // Der Abschnitt am Polygon entspricht dem Teil
+/*N*/ // von fPolyPos bis fPolyPos+fPartLength
+/*N*/
+/*N*/ aTexture3D[0] = aTexture3D[3];
+/*N*/ aTexture3D[1] = aTexture3D[2];
+/*N*/
+/*N*/ if(bRotateTexture90)
+/*N*/ {
+/*N*/ // X,Y vertauschen
+/*N*/ aTexture3D[3].X() = fTextureStart;
+/*N*/ aTexture3D[3].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+/*N*/
+/*N*/ aTexture3D[2].X() = fTextureStart + fTextureDepth;
+/*N*/ aTexture3D[2].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aTexture3D[3].X() = fPolyPos * fSurroundFactor;
+/*N*/ aTexture3D[3].Y() = fTextureStart;
+/*N*/
+/*N*/ aTexture3D[2].X() = fPolyPos * fSurroundFactor;
+/*N*/ aTexture3D[2].Y() = fTextureStart + fTextureDepth;
+/*N*/ }
+/*N*/
+/*N*/ AddGeometry(aRect3D, aNormal3D, aTexture3D, FALSE);
+/*N*/ }
+/*N*/ else
+/*N*/ AddGeometry(aRect3D, aNormal3D, FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3DFront = rPolyPolyFront[a];
+/*N*/ const Polygon3D& rPoly3DBack = rPolyPolyBack[a];
+/*N*/ Polygon3D aRect3D(4);
+/*N*/ USHORT nPntCnt = rPoly3DFront.GetPointCount();
+/*N*/ USHORT nPrefillIndex = rPoly3DFront.IsClosed() ? nPntCnt - 1 : 0;
+/*N*/
+/*N*/ aRect3D[3] = rPoly3DFront[nPrefillIndex];
+/*N*/ aRect3D[2] = rPoly3DBack[nPrefillIndex];
+/*N*/
+/*N*/ for (USHORT i = rPoly3DFront.IsClosed() ? 0 : 1; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ aRect3D[0] = aRect3D[3];
+/*N*/ aRect3D[1] = aRect3D[2];
+/*N*/
+/*N*/ aRect3D[3] = rPoly3DFront[i];
+/*N*/ aRect3D[2] = rPoly3DBack[i];
+/*N*/
+/*N*/ AddGeometry(aRect3D, FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dCompoundObject::AddInBetweenNormals(
+/*N*/ const PolyPolygon3D& rPolyPolyFront,
+/*N*/ const PolyPolygon3D& rPolyPolyBack,
+/*N*/ PolyPolygon3D& rNormals,
+/*N*/ BOOL bSmoothed)
+/*N*/ {
+/*N*/ USHORT nPolyCnt = rPolyPolyFront.Count();
+/*N*/
+/*N*/ // Verbindungsstuecke
+/*N*/ for(UINT16 a=0;a<nPolyCnt;a++)
+/*N*/ {
+/*N*/ const Polygon3D& rPoly3DFront = rPolyPolyFront[a];
+/*N*/ const Polygon3D& rPoly3DBack = rPolyPolyBack[a];
+/*N*/ Polygon3D& rNormalPoly = rNormals[a];
+/*N*/ USHORT nPntCnt = rPoly3DFront.GetPointCount();
+/*N*/
+/*N*/ if(rPoly3DBack.IsClosed())
+/*N*/ {
+/*N*/ Vector3D aNormal = (rPoly3DBack[nPntCnt - 1] - rPoly3DFront[nPntCnt - 1])
+/*N*/ |(rPoly3DFront[0] - rPoly3DFront[nPntCnt - 1]);
+/*N*/ aNormal.Normalize();
+/*N*/ for (USHORT i = 0; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ Vector3D aNextNormal = (rPoly3DBack[i] - rPoly3DFront[i])
+/*N*/ |(rPoly3DFront[(i+1 == nPntCnt) ? 0 : i+1] - rPoly3DFront[i]);
+/*N*/ aNextNormal.Normalize();
+/*N*/ if(bSmoothed)
+/*N*/ {
+/*N*/ Vector3D aMidNormal = aNormal + aNextNormal;
+/*N*/ aMidNormal.Normalize();
+/*N*/ rNormalPoly[i] += aMidNormal;
+/*N*/ }
+/*N*/ else
+/*N*/ rNormalPoly[i] += aNormal;
+/*N*/ rNormalPoly[i].Normalize();
+/*N*/ aNormal = aNextNormal;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Vector3D aNormal;
+/*N*/ if(rPoly3DBack[0] == rPoly3DFront[0])
+/*N*/ {
+/*N*/ aNormal = (rPoly3DBack[1] - rPoly3DFront[1])
+/*N*/ |(rPoly3DFront[1] - rPoly3DFront[0]);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aNormal = (rPoly3DBack[0] - rPoly3DFront[0])
+/*N*/ |(rPoly3DFront[1] - rPoly3DFront[0]);
+/*N*/ }
+/*N*/ aNormal.Normalize();
+/*N*/ rNormalPoly[0] += aNormal; rNormalPoly[0].Normalize();
+/*N*/ for (USHORT i = 1; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ Vector3D aNextNormal;
+/*N*/ if(i+1 == nPntCnt)
+/*N*/ {
+/*N*/ aNextNormal = aNormal;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aNextNormal = (rPoly3DBack[i] - rPoly3DFront[i])
+/*N*/ |(rPoly3DFront[i+1] - rPoly3DFront[i]);
+/*N*/ }
+/*N*/ aNextNormal.Normalize();
+/*N*/ if(bSmoothed)
+/*N*/ {
+/*N*/ Vector3D aMidNormal = aNormal + aNextNormal;
+/*N*/ aMidNormal.Normalize();
+/*N*/ rNormalPoly[i] += aMidNormal;
+/*N*/ }
+/*N*/ else
+/*N*/ rNormalPoly[i] += aNormal;
+/*N*/ rNormalPoly[i].Normalize();
+/*N*/ aNormal = aNextNormal;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Copy-Operator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Ausgabeparameter an 3D-Kontext setzen
+|*
+\************************************************************************/
+
+
+
+
+/*************************************************************************
+|*
+|* Hittest fuer 3D-Objekte, wird an Geometrie weitergegeben
+|*
+\************************************************************************/
+
+/*N*/ SdrObject* E3dCompoundObject::CheckHit(const Point& rPnt, USHORT nTol,
+/*N*/ const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ E3dPolyScene* pScene = (E3dPolyScene*)GetScene();
+/*N*/ if(pScene)
+/*N*/ {
+/*N*/ // HitLine holen in ObjektKoordinaten
+/*N*/ // ObjectTrans setzen
+/*N*/ Matrix4D mTransform = ((E3dCompoundObject*)this)->GetFullTransform();
+/*N*/ pScene->GetCameraSet().SetObjectTrans(mTransform);
+/*N*/
+/*N*/ // HitPoint Front und Back erzeugen und umrechnen
+/*N*/ Vector3D aFront(rPnt.X(), rPnt.Y(), 0.0);
+/*N*/ Vector3D aBack(rPnt.X(), rPnt.Y(), ZBUFFER_DEPTH_RANGE);
+/*N*/ aFront = pScene->GetCameraSet().ViewToObjectCoor(aFront);
+/*N*/ aBack = pScene->GetCameraSet().ViewToObjectCoor(aBack);
+/*N*/
+/*N*/ const Volume3D& rBoundVol = ((E3dCompoundObject*)this)->GetBoundVolume();
+/*N*/ if(rBoundVol.IsValid())
+/*N*/ {
+/*N*/ double fXMax = aFront.X();
+/*N*/ double fXMin = aBack.X();
+/*N*/
+/*N*/ if(fXMax < fXMin)
+/*N*/ {
+/*N*/ fXMax = aBack.X();
+/*N*/ fXMin = aFront.X();
+/*N*/ }
+/*N*/
+/*N*/ if(rBoundVol.MinVec().X() <= fXMax && rBoundVol.MaxVec().X() >= fXMin)
+/*N*/ {
+/*N*/ double fYMax = aFront.Y();
+/*N*/ double fYMin = aBack.Y();
+/*N*/
+/*N*/ if(fYMax < fYMin)
+/*N*/ {
+/*N*/ fYMax = aBack.Y();
+/*N*/ fYMin = aFront.Y();
+/*N*/ }
+/*N*/
+/*N*/ if(rBoundVol.MinVec().Y() <= fYMax && rBoundVol.MaxVec().Y() >= fYMin)
+/*N*/ {
+/*N*/ double fZMax = aFront.Z();
+/*N*/ double fZMin = aBack.Z();
+/*N*/
+/*N*/ if(fZMax < fZMin)
+/*N*/ {
+/*N*/ fZMax = aBack.Z();
+/*N*/ fZMin = aFront.Z();
+/*N*/ }
+/*N*/
+/*N*/ if(rBoundVol.MinVec().Z() <= fZMax && rBoundVol.MaxVec().Z() >= fZMin)
+/*N*/ {
+/*N*/ // Geometrie herstellen
+/*N*/ if(!bGeometryValid)
+/*?*/ ((E3dCompoundObject*)this)->ReCreateGeometry();
+/*N*/
+/*N*/ // 3D Volumes schneiden sich, teste in der Geometrie
+/*N*/ // auf Basis der Projektion weiter
+/*N*/ if(((E3dCompoundObject*)this)->aDisplayGeometry.CheckHit(aFront, aBack, nTol) != -1L)
+/*?*/ return ((E3dCompoundObject*)this);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return NULL;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Geometrie des Objektes auf angegebenen Punkt zentrieren
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Schattenattribute holen
+|*
+\************************************************************************/
+
+
+
+
+
+
+/*N*/ BOOL E3dCompoundObject::DoDrawShadow()
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ BOOL bRetval(FALSE);
+/*N*/ BOOL bShadOn = ((SdrShadowItem&)(rSet.Get(SDRATTR_SHADOW))).GetValue();
+/*N*/
+/*N*/ if(bShadOn)
+/*N*/ {
+/*?*/ bRetval = TRUE;
+/*?*/
+/*?*/ if(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue() == XFILL_NONE)
+/*?*/ {
+/*?*/ if(((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue() == XLINE_NONE)
+/*?*/ {
+/*?*/ bRetval = FALSE;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ return bRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objekt als WireFrame zeichnen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Create vertical polygons for line polygon
+|*
+\************************************************************************/
+
+// #78972#
+/*N*/ void E3dCompoundObject::ImpCompleteLinePolygon(PolyPolygon3D& rLinePolyPoly,
+/*N*/ sal_uInt16 nPolysPerRun, BOOL bClosed)
+/*N*/ {
+/*N*/ if(rLinePolyPoly.Count() && nPolysPerRun)
+/*N*/ {
+/*N*/ // get number of layers
+/*N*/ sal_uInt16 nLayers(rLinePolyPoly.Count() / nPolysPerRun);
+/*N*/ sal_uInt16 a, b, c;
+/*N*/
+/*N*/ // add vertical Polygons if at least two horizontal ones exist
+/*N*/ if(nLayers > 1)
+/*N*/ {
+/*N*/ for(a = 0; a < nPolysPerRun; a++)
+/*N*/ {
+/*N*/ const sal_uInt16 nPntCnt = rLinePolyPoly[a].GetPointCount();
+/*N*/
+/*N*/ for(b = 0; b < nPntCnt; b++)
+/*N*/ {
+/*N*/ Polygon3D aNewVerPoly(bClosed ? nLayers + 1 : nLayers);
+/*N*/
+/*N*/ for(c = 0; c < nLayers; c++)
+/*N*/ aNewVerPoly[c] = rLinePolyPoly[(c * nPolysPerRun) + a][b];
+/*N*/
+/*N*/ // evtl. set first point again to close polygon
+/*N*/ if(bClosed)
+/*N*/ aNewVerPoly[aNewVerPoly.GetPointCount()] = aNewVerPoly[0];
+/*N*/
+/*N*/ // insert
+/*N*/ rLinePolyPoly.Insert(aNewVerPoly);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // open closed polygons
+/*N*/ for(a = 0; a < rLinePolyPoly.Count(); a++)
+/*N*/ {
+/*N*/ if(rLinePolyPoly[a].IsClosed())
+/*N*/ {
+/*N*/ rLinePolyPoly[a][rLinePolyPoly[a].GetPointCount()] = rLinePolyPoly[a][0];
+/*N*/ rLinePolyPoly[a].SetClosed(FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*************************************************************************
+|*
+|* Ein Segment fuer Extrude oder Lathe erzeugen
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::ImpCreateSegment(
+/*N*/ const PolyPolygon3D& rFront, // vorderes Polygon
+/*N*/ const PolyPolygon3D& rBack, // hinteres Polygon
+/*N*/ const PolyPolygon3D* pPrev, // smooth uebergang zu Vorgaenger
+/*N*/ const PolyPolygon3D* pNext, // smooth uebergang zu Nachfolger
+/*N*/ BOOL bCreateFront, // vorderen Deckel erzeugen
+/*N*/ BOOL bCreateBack, // hinteren Deckel erzeugen
+/*N*/ double fPercentDiag, // Anteil des Deckels an der Tiefe
+/*N*/ BOOL bSmoothLeft, // Glaetten der umlaufenden Normalen links
+/*N*/ BOOL bSmoothRight, // Glaetten der umlaufenden Normalen rechts
+/*N*/ BOOL bSmoothFrontBack, // Glaetten der Abschlussflaechen
+/*N*/ double fSurroundFactor, // Wertebereich der Texturkoordinaten im Umlauf
+/*N*/ double fTextureStart, // TexCoor ueber Extrude-Tiefe
+/*N*/ double fTextureDepth, // TexCoor ueber Extrude-Tiefe
+/*N*/ BOOL bCreateTexture,
+/*N*/ BOOL bCreateNormals,
+/*N*/ BOOL bCharacterExtrude, // FALSE=exakt, TRUE=ohne Ueberschneidungen
+/*N*/ BOOL bRotateTexture90, // Textur der Seitenflaechen um 90 Grad kippen
+/*N*/ PolyPolygon3D* pLineGeometry // For creation of line geometry
+/*N*/ )
+/*N*/ {
+/*N*/ PolyPolygon3D aNormalsLeft, aNormalsRight;
+/*N*/ AddInBetweenNormals(rFront, rBack, aNormalsLeft, bSmoothLeft);
+/*N*/ AddInBetweenNormals(rFront, rBack, aNormalsRight, bSmoothRight);
+/*N*/ Vector3D aOffset = rBack.GetMiddle() - rFront.GetMiddle();
+/*N*/
+/*N*/ // Ausnahmen: Nicht geschlossen
+/*N*/ if(!rFront.IsClosed())
+/*N*/ {
+/*N*/ bCreateFront = FALSE;
+/*N*/ }
+/*N*/ if(!rBack.IsClosed())
+/*N*/ {
+/*N*/ bCreateBack = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ // Ausnahmen: Einfache Linie
+/*N*/ if(rFront[0].GetPointCount() < 3 || (!bCreateFront && !bCreateBack))
+/*N*/ {
+/*N*/ fPercentDiag = 0.0;
+/*N*/ }
+/*N*/
+/*N*/ if(fPercentDiag == 0.0)
+/*N*/ {
+/*N*/ // Ohne Schraegen, Vorderseite
+/*N*/ if(bCreateFront)
+/*N*/ {
+/*N*/ PolyPolygon3D aNormalsFront;
+/*N*/ AddFrontNormals(rFront, aNormalsFront, aOffset);
+/*N*/
+/*N*/ if(!bSmoothFrontBack)
+/*N*/ CreateFront(rFront, aNormalsFront, bCreateNormals, bCreateTexture);
+/*N*/ if(bSmoothLeft)
+/*N*/ AddFrontNormals(rFront, aNormalsLeft, aOffset);
+/*N*/ if(bSmoothFrontBack)
+/*?*/ CreateFront(rFront, aNormalsLeft, bCreateNormals, bCreateTexture);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pPrev)
+/*N*/ AddInBetweenNormals(*pPrev, rFront, aNormalsLeft, bSmoothLeft);
+/*N*/ }
+/*N*/
+/*N*/ // Ohne Schraegen, Rueckseite
+/*N*/ if(bCreateBack)
+/*N*/ {
+/*N*/ PolyPolygon3D aNormalsBack;
+/*N*/ AddBackNormals(rBack, aNormalsBack, aOffset);
+/*N*/
+/*N*/ if(!bSmoothFrontBack)
+/*N*/ CreateBack(rBack, aNormalsBack, bCreateNormals, bCreateTexture);
+/*N*/ if(bSmoothRight)
+/*N*/ AddBackNormals(rBack, aNormalsRight, aOffset);
+/*N*/ if(bSmoothFrontBack)
+/*?*/ CreateBack(rBack, aNormalsRight, bCreateNormals, bCreateTexture);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pNext)
+/*N*/ AddInBetweenNormals(rBack, *pNext, aNormalsRight, bSmoothRight);
+/*N*/ }
+/*N*/
+/*N*/ // eigentliches Zwischenstueck
+/*N*/ CreateInBetween(rFront, rBack,
+/*N*/ aNormalsLeft, aNormalsRight,
+/*N*/ bCreateNormals,
+/*N*/ fSurroundFactor,
+/*N*/ fTextureStart,
+/*N*/ fTextureDepth,
+/*N*/ bRotateTexture90);
+/*N*/
+/*N*/ // #78972#
+/*N*/ if(pLineGeometry)
+/*N*/ {
+/*N*/ pLineGeometry->Insert(rFront);
+/*N*/ if(bCreateBack)
+/*N*/ pLineGeometry->Insert(rBack);
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Mit Scraegen, Vorderseite
+/*N*/ PolyPolygon3D aLocalFront = rFront;
+/*N*/ PolyPolygon3D aLocalBack = rBack;
+/*N*/ double fExtrudeDepth, fDiagLen;
+/*N*/ double fTexMidStart = fTextureStart;
+/*N*/ double fTexMidDepth = fTextureDepth;
+/*N*/
+/*N*/ if(bCreateFront || bCreateBack)
+/*N*/ {
+/*N*/ fExtrudeDepth = aOffset.GetLength();
+/*N*/ fDiagLen = fPercentDiag * fExtrudeDepth;
+/*N*/ }
+/*N*/
+/*N*/ PolyPolygon3D aOuterFront;
+/*N*/ PolyPolygon3D aOuterBack;
+/*N*/
+/*N*/ if(bCreateFront)
+/*N*/ {
+/*N*/ PolyPolygon3D aNormalsOuterFront;
+/*N*/ AddFrontNormals(aLocalFront, aNormalsOuterFront, aOffset);
+/*N*/
+/*N*/ if(bCharacterExtrude)
+/*N*/ {
+/*N*/ // Polygon kopieren
+/*N*/ aOuterFront = aLocalFront;
+/*N*/
+/*N*/ // notwendige Normalen erzeugen
+/*N*/ PolyPolygon3D aGrowDirection;
+/*N*/ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothLeft);
+/*N*/
+/*N*/ // Groesse inneres Polygon merken
+/*N*/ Volume3D aOldSize(aLocalFront.GetPolySize());
+/*N*/
+/*N*/ // Inneres Polygon vergroessern
+/*N*/ GrowPoly(aLocalFront, aGrowDirection, fDiagLen);
+/*N*/
+/*N*/ // Inneres Polygon nach innen verschieben
+/*N*/ //GrowPoly(aLocalFront, aNormalsOuterFront, -fDiagLen);
+/*N*/
+/*N*/ // Neue Groesse inneres Polygon feststellen
+/*N*/ Volume3D aNewSize(aLocalFront.GetPolySize());
+/*N*/
+/*N*/ // Skalierung feststellen (nur X,Y)
+/*N*/ Vector3D aScaleVec(
+/*N*/ (aNewSize.GetWidth() != 0.0) ? aOldSize.GetWidth() / aNewSize.GetWidth() : 1.0,
+/*N*/ (aNewSize.GetHeight() != 0.0) ? aOldSize.GetHeight() / aNewSize.GetHeight() : 1.0,
+/*N*/ (aNewSize.GetDepth() != 0.0) ? aOldSize.GetDepth() / aNewSize.GetDepth() : 1.0);
+/*N*/
+/*N*/ // Transformation bilden
+/*N*/ Matrix4D aTransMat;
+/*N*/ aTransMat.Scale(aScaleVec);
+/*N*/
+/*N*/ // aeusseres und inneres Polygon skalieren
+/*N*/ aLocalFront.Transform(aTransMat);
+/*N*/ aOuterFront.Transform(aTransMat);
+/*N*/
+/*N*/ // Neue Groesse aktualisieren
+/*N*/ aNewSize = aLocalFront.GetPolySize();
+/*N*/
+/*N*/ // Translation feststellen
+/*N*/ Vector3D aTransVec(
+/*N*/ aOldSize.MinVec().X() - aNewSize.MinVec().X(),
+/*N*/ aOldSize.MinVec().Y() - aNewSize.MinVec().Y(),
+/*N*/ aOldSize.MinVec().Z() - aNewSize.MinVec().Z());
+/*N*/
+/*N*/ // Transformation bilden
+/*N*/ aTransMat.Identity();
+/*N*/ aTransMat.Translate(aTransVec);
+/*N*/
+/*N*/ // aeusseres und inneres Polygon skalieren
+/*N*/ aLocalFront.Transform(aTransMat);
+/*N*/ aOuterFront.Transform(aTransMat);
+/*N*/
+/*N*/ // move aLocalFront again, scale and translate has moved it back
+/*N*/ GrowPoly(aLocalFront, aNormalsOuterFront, -fDiagLen);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Polygon kopieren
+/*N*/ aOuterFront = aLocalFront;
+/*N*/
+/*N*/ // notwendige Normalen erzeugen
+/*N*/ PolyPolygon3D aGrowDirection;
+/*N*/ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothLeft);
+/*N*/
+/*N*/ // Aeusseres Polygon verkleinern
+/*N*/ GrowPoly(aOuterFront, aGrowDirection, -fDiagLen);
+/*N*/ aOuterFront.CorrectGrownPoly(aLocalFront);
+/*N*/
+/*N*/ // Inneres Polygon nach innen verschieben
+/*N*/ GrowPoly(aLocalFront, aNormalsOuterFront, -fDiagLen);
+/*N*/ }
+/*N*/
+/*N*/ // eventuell noch glaetten
+/*N*/ if(bSmoothLeft)
+/*N*/ {
+/*N*/ if(bSmoothFrontBack)
+/*?*/ AddInBetweenNormals(aOuterFront, aLocalFront, aNormalsOuterFront, bSmoothLeft);
+/*N*/ AddInBetweenNormals(aOuterFront, aLocalFront, aNormalsLeft, bSmoothLeft);
+/*N*/ }
+/*N*/
+/*N*/ // vordere Zwischenstuecke erzeugen
+/*N*/ CreateInBetween(aOuterFront, aLocalFront,
+/*N*/ aNormalsOuterFront, aNormalsLeft,
+/*N*/ bCreateNormals,
+/*N*/ fSurroundFactor,
+/*N*/ fTextureStart,
+/*N*/ fTextureDepth * fPercentDiag,
+/*N*/ bRotateTexture90);
+/*N*/
+/*N*/ // Vorderseite erzeugen
+/*N*/ CreateFront(aOuterFront, aNormalsOuterFront, bCreateNormals, bCreateTexture);
+/*N*/
+/*N*/ // Weitere Texturwerte setzen
+/*N*/ fTexMidStart += fTextureDepth * fPercentDiag;
+/*N*/ fTexMidDepth -= fTextureDepth * fPercentDiag;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ if(pPrev)
+/*?*/ AddInBetweenNormals(*pPrev, rFront, aNormalsLeft, bSmoothLeft);
+/*N*/ }
+/*N*/
+/*N*/ // Mit Scraegen, Rueckseite
+/*N*/ if(bCreateBack)
+/*N*/ {
+/*N*/ PolyPolygon3D aNormalsOuterBack;
+/*N*/ AddBackNormals(aLocalBack, aNormalsOuterBack, aOffset);
+/*N*/
+/*N*/ if(bCharacterExtrude)
+/*N*/ {
+/*N*/ // Polygon kopieren
+/*N*/ aOuterBack = aLocalBack;
+/*N*/
+/*N*/ // notwendige Normalen erzeugen
+/*N*/ PolyPolygon3D aGrowDirection;
+/*N*/ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothRight);
+/*N*/
+/*N*/ // Groesse inneres Polygon merken
+/*N*/ Volume3D aOldSize(aLocalBack.GetPolySize());
+/*N*/
+/*N*/ // Inneres Polygon vergroessern
+/*N*/ GrowPoly(aLocalBack, aGrowDirection, fDiagLen);
+/*N*/
+/*N*/ // Inneres Polygon nach innen verschieben
+/*N*/ //GrowPoly(aLocalBack, aNormalsOuterBack, -fDiagLen);
+/*N*/
+/*N*/ // Neue Groesse inneres Polygon feststellen
+/*N*/ Volume3D aNewSize(aLocalBack.GetPolySize());
+/*N*/
+/*N*/ // Skalierung feststellen (nur X,Y)
+/*N*/ Vector3D aScaleVec(
+/*N*/ (aNewSize.GetWidth() != 0.0) ? aOldSize.GetWidth() / aNewSize.GetWidth() : 1.0,
+/*N*/ (aNewSize.GetHeight() != 0.0) ? aOldSize.GetHeight() / aNewSize.GetHeight() : 1.0,
+/*N*/ (aNewSize.GetDepth() != 0.0) ? aOldSize.GetDepth() / aNewSize.GetDepth() : 1.0);
+/*N*/
+/*N*/ // Transformation bilden
+/*N*/ Matrix4D aTransMat;
+/*N*/ aTransMat.Scale(aScaleVec);
+/*N*/
+/*N*/ // aeusseres und inneres Polygon skalieren
+/*N*/ aLocalBack.Transform(aTransMat);
+/*N*/ aOuterBack.Transform(aTransMat);
+/*N*/
+/*N*/ // Neue Groesse aktualisieren
+/*N*/ aNewSize = aLocalBack.GetPolySize();
+/*N*/
+/*N*/ // Translation feststellen
+/*N*/ Vector3D aTransVec(
+/*N*/ aOldSize.MinVec().X() - aNewSize.MinVec().X(),
+/*N*/ aOldSize.MinVec().Y() - aNewSize.MinVec().Y(),
+/*N*/ aOldSize.MinVec().Z() - aNewSize.MinVec().Z());
+/*N*/
+/*N*/ // Transformation bilden
+/*N*/ aTransMat.Identity();
+/*N*/ aTransMat.Translate(aTransVec);
+/*N*/
+/*N*/ // aeusseres und inneres Polygon skalieren
+/*N*/ aLocalBack.Transform(aTransMat);
+/*N*/ aOuterBack.Transform(aTransMat);
+/*N*/
+/*N*/ // move aLocalBack again, scale and translate has moved it back
+/*N*/ GrowPoly(aLocalBack, aNormalsOuterBack, -fDiagLen);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Polygon kopieren
+/*N*/ aOuterBack = aLocalBack;
+/*N*/
+/*N*/ // notwendige Normalen erzeugen
+/*N*/ PolyPolygon3D aGrowDirection;
+/*N*/ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothRight);
+/*N*/
+/*N*/ // Aeusseres Polygon verkleinern
+/*N*/ GrowPoly(aOuterBack, aGrowDirection, -fDiagLen);
+/*N*/ aOuterBack.CorrectGrownPoly(aLocalBack);
+/*N*/
+/*N*/ // Inneres Polygon nach innen verschieben
+/*N*/ GrowPoly(aLocalBack, aNormalsOuterBack, -fDiagLen);
+/*N*/ }
+/*N*/
+/*N*/ // eventuell noch glaetten
+/*N*/ if(bSmoothRight)
+/*N*/ {
+/*N*/ if(bSmoothFrontBack)
+/*?*/ AddInBetweenNormals(aLocalBack, aOuterBack, aNormalsOuterBack, bSmoothRight);
+/*N*/ AddInBetweenNormals(aLocalBack, aOuterBack, aNormalsRight, bSmoothRight);
+/*N*/ }
+/*N*/
+/*N*/ // vordere Zwischenstuecke erzeugen
+/*N*/ // hintere Zwischenstuecke erzeugen
+/*N*/ CreateInBetween(aLocalBack, aOuterBack,
+/*N*/ aNormalsRight, aNormalsOuterBack,
+/*N*/ bCreateNormals,
+/*N*/ fSurroundFactor,
+/*N*/ fTextureStart + (fTextureDepth * (1.0 - fPercentDiag)),
+/*N*/ fTextureDepth * fPercentDiag,
+/*N*/ bRotateTexture90);
+/*N*/
+/*N*/ // Rueckseite erzeugen
+/*N*/ CreateBack(aOuterBack, aNormalsOuterBack, bCreateNormals, bCreateTexture);
+/*N*/
+/*N*/ // Weitere Texturwerte setzen
+/*N*/ fTexMidDepth -= fTextureDepth * fPercentDiag;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ if(pNext)
+/*?*/ AddInBetweenNormals(rBack, *pNext, aNormalsRight, bSmoothRight);
+/*?*/ }
+/*N*/
+/*N*/ // eigentliches Zwischenstueck
+/*N*/ CreateInBetween(aLocalFront, aLocalBack,
+/*N*/ aNormalsLeft, aNormalsRight,
+/*N*/ bCreateNormals,
+/*N*/ fSurroundFactor,
+/*N*/ fTexMidStart,
+/*N*/ fTexMidDepth,
+/*N*/ bRotateTexture90);
+/*N*/
+/*N*/ // #78972#
+/*N*/ if(pLineGeometry)
+/*N*/ {
+/*N*/ if(bCreateFront)
+/*N*/ pLineGeometry->Insert(aOuterFront);
+/*N*/ pLineGeometry->Insert(aLocalFront);
+/*N*/ if(bCreateBack)
+/*N*/ {
+/*N*/ pLineGeometry->Insert(aLocalBack);
+/*N*/ pLineGeometry->Insert(aOuterBack);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Parameter Geometrieerzeugung setzen
+|*
+\************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* DisplayGeometry rausruecken
+|*
+\************************************************************************/
+
+/*N*/ B3dGeometry& E3dCompoundObject::GetDisplayGeometry()
+/*N*/ {
+/*N*/ // Geometrie herstellen
+/*N*/ if(!bGeometryValid)
+/*?*/ ReCreateGeometry();
+/*N*/
+/*N*/ return aDisplayGeometry;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Material des Objektes
+|*
+\************************************************************************/
+
+/*N*/ void E3dCompoundObject::SetMaterialAmbientColor(const Color& rColor)
+/*N*/ {
+/*N*/ if(aMaterialAmbientColor != rColor)
+/*N*/ {
+/*?*/ aMaterialAmbientColor = rColor;
+/*N*/ }
+/*N*/ }
+
+
+
+/*************************************************************************
+|*
+|* 3D Ausgabe
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Objekt als Kontur in das Polygon einfuegen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Schatten fuer 3D-Objekte zeichnen
+|*
+\************************************************************************/
+
+
+
+
+/*************************************************************************
+|*
+|* convert given PolyPolygon3D to screen coor
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+// private support routines for ItemSet access. NULL pointer means clear item.
+/*N*/ void E3dCompoundObject::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dObject::PostItemChange(nWhich);
+/*N*/
+/*N*/ // handle value change
+/*N*/ switch(nWhich)
+/*N*/ {
+/*N*/ case SDRATTR_3DOBJ_DOUBLE_SIDED:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_NORMALS_KIND:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_NORMALS_INVERT:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_TEXTURE_PROJ_X:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_TEXTURE_PROJ_Y:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// EOF
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_objfac3d.cxx b/binfilter/bf_svx/source/engine3d/svx_objfac3d.cxx
new file mode 100644
index 000000000000..1d6cf8689b0a
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_objfac3d.cxx
@@ -0,0 +1,143 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "globl3d.hxx"
+
+#include "polysc3d.hxx"
+
+#include "dlight3d.hxx"
+
+#include "plight3d.hxx"
+
+#include "polyob3d.hxx"
+
+#include "cube3d.hxx"
+
+#include "sphere3d.hxx"
+
+#include "extrud3d.hxx"
+
+#include "lathe3d.hxx"
+
+#include "polygn3d.hxx"
+
+#include "objfac3d.hxx"
+
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dObjFactory::E3dObjFactory()
+/*N*/ {
+/*N*/ SdrObjFactory::InsertMakeObjectHdl(LINK(this, E3dObjFactory, MakeObject));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dObjFactory::~E3dObjFactory()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Chart-interne Objekte erzeugen
+|*
+\************************************************************************/
+
+/*N*/ IMPL_LINK( E3dObjFactory, MakeObject, SdrObjFactory*, pObjFactory)
+/*N*/ {
+/*N*/ if ( pObjFactory->nInventor == E3dInventor )
+/*N*/ {
+/*N*/ switch ( pObjFactory->nIdentifier )
+/*N*/ {
+/*N*/ case E3D_POLYSCENE_ID:
+/*N*/ pObjFactory->pNewObj = new E3dPolyScene();
+/*N*/ break;
+/*N*/ case E3D_LIGHT_ID:
+/*N*/ pObjFactory->pNewObj = new E3dLight();
+/*N*/ break;
+/*N*/ case E3D_DISTLIGHT_ID:
+/*N*/ pObjFactory->pNewObj = new E3dDistantLight();
+/*N*/ break;
+/*N*/ case E3D_POINTLIGHT_ID:
+/*N*/ pObjFactory->pNewObj = new E3dPointLight();
+/*N*/ break;
+/*N*/ case E3D_SPOTLIGHT_ID:
+/*N*/ break;
+/*N*/ case E3D_OBJECT_ID:
+/*N*/ pObjFactory->pNewObj = new E3dObject();
+/*N*/ break;
+/*N*/ case E3D_POLYOBJ_ID :
+/*N*/ pObjFactory->pNewObj = new E3dPolyObj();
+/*N*/ break;
+/*N*/ case E3D_POLYGONOBJ_ID :
+/*N*/ pObjFactory->pNewObj = new E3dPolygonObj();
+/*N*/ break;
+/*N*/ case E3D_CUBEOBJ_ID :
+/*N*/ pObjFactory->pNewObj = new E3dCubeObj();
+/*N*/ break;
+/*N*/ case E3D_SPHEREOBJ_ID:
+/*N*/ // FG: ruft den dummy constructor, da dieser Aufruf nur beim Laden von Dokumenten erfolgt.
+/*N*/ // die wirkliche Anzahkl Segmente wird aber erst nach dem Laden der Member festgelegt.
+/*N*/ // dies hat zur Folge das die erste Kugel gleich wieder zerstoert wird, obwohl sie nie
+/*N*/ // gebraucht worden ist.
+/*N*/ pObjFactory->pNewObj = new E3dSphereObj(123);
+/*N*/ break;
+/*N*/ case E3D_POINTOBJ_ID:
+/*N*/ pObjFactory->pNewObj = new E3dPointObj();
+/*N*/ break;
+/*N*/ case E3D_EXTRUDEOBJ_ID:
+/*N*/ pObjFactory->pNewObj = new E3dExtrudeObj();
+/*N*/ break;
+/*N*/ case E3D_LATHEOBJ_ID:
+/*N*/ pObjFactory->pNewObj = new E3dLatheObj();
+/*N*/ break;
+/*N*/ case E3D_LABELOBJ_ID:
+/*N*/ pObjFactory->pNewObj = new E3dLabelObj();
+/*N*/ break;
+/*N*/ case E3D_COMPOUNDOBJ_ID:
+/*N*/ pObjFactory->pNewObj = new E3dCompoundObject();
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_plight3d.cxx b/binfilter/bf_svx/source/engine3d/svx_plight3d.cxx
new file mode 100644
index 000000000000..755c1565578b
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_plight3d.cxx
@@ -0,0 +1,133 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#include "polyob3d.hxx"
+
+#include "plight3d.hxx"
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dPointLight, E3dLight);
+
+/*************************************************************************
+|*
+|* E3dPointLight-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPointLight::E3dPointLight(const Vector3D& rPos, const Color& rColor,
+/*N*/ double fLightIntensity) :
+/*N*/ E3dLight(rPos, rColor, fLightIntensity)
+/*N*/ {
+/*N*/ CreateLightObj();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* E3dPointLight-Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPointLight::~E3dPointLight()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Lichtstaerke an uebergeben Punkt bestimmen und die akkumulierte
+|* Punktfarbe berechnen
+|*
+\************************************************************************/
+
+/*N*/ FASTBOOL E3dPointLight::CalcLighting(Color& rNewColor,
+/*N*/ const Vector3D& rPnt,
+/*N*/ const Vector3D& rPntNormal,
+/*N*/ const Color& rPntColor)
+/*N*/ {
+/*N*/ double fR = 0, fG = 0, fB = 0;
+/*N*/
+/*N*/ if ( IsOn() )
+/*N*/ {
+/*N*/ double fLight;
+/*N*/ Vector3D aPntToLight = GetTransPosition() - rPnt;
+/*N*/
+/*N*/ aPntToLight.Normalize();
+/*N*/ fLight = rPntNormal.Scalar(aPntToLight);
+/*N*/
+/*N*/ if ( fLight > 0 )
+/*N*/ {
+/*N*/ fR = fLight * GetRed();
+/*N*/ fG = fLight * GetGreen();
+/*N*/ fB = fLight * GetBlue();
+/*N*/ }
+/*N*/ }
+/*N*/ return ImpCalcLighting(rNewColor, rPntColor, fR, fG, fB);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Darstellung des Lichtobjekts in der Szene ein-/ausschalten
+|*
+\************************************************************************/
+
+/*N*/ void E3dPointLight::CreateLightObj()
+/*N*/ {
+/*N*/ pSub->Clear();
+/*N*/
+/*N*/ if ( IsLightObjVisible() )
+/*N*/ {
+/*N*/ Vector3D aDiff(0.5,0,0);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ aDiff = Vector3D(0,0.5,0);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ aDiff = Vector3D(0,0,0.5);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ aDiff = Vector3D(0.35,0.35,0.35);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ aDiff = Vector3D(0.35,0.35,-0.35);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ aDiff = Vector3D(-0.35,0.35,-0.35);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ aDiff = Vector3D(-0.35,0.35,0.35);
+/*N*/ Insert3DObj(new E3dPolyObj(GetPosition() - aDiff, GetPosition() + aDiff));
+/*N*/ }
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_pntobj3d.cxx b/binfilter/bf_svx/source/engine3d/svx_pntobj3d.cxx
new file mode 100644
index 000000000000..0f5651922741
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_pntobj3d.cxx
@@ -0,0 +1,174 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdio.hxx"
+
+
+#include "pntobj3d.hxx"
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dPointObj, E3dObject);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPointObj::E3dPointObj(const Vector3D& rPos) :
+/*N*/ aPosition(rPos),
+/*N*/ bTransPosValid(FALSE)
+/*N*/ {
+/*N*/ aLocalBoundVol = Volume3D(aPosition, Vector3D(), FALSE);
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPointObj::E3dPointObj() :
+/*N*/ aPosition(Vector3D()),
+/*N*/ bTransPosValid(FALSE)
+/*N*/ {
+/*N*/ aLocalBoundVol = Volume3D(aPosition, Vector3D(), FALSE);
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* bei Aenderung der Transformation
+|*
+\************************************************************************/
+
+/*N*/ void E3dPointObj::SetTransformChanged()
+/*N*/ {
+/*N*/ E3dObject::SetTransformChanged();
+/*N*/ bTransPosValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* neue Position setzen und Aenderung an Parents (Szene) melden
+|*
+\************************************************************************/
+
+/*N*/ void E3dPointObj::SetPosition(const Vector3D& rNewPos)
+/*N*/ {
+/*N*/ if ( aPosition != rNewPos )
+/*N*/ {
+/*N*/ aPosition = rNewPos;
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ bTransPosValid = FALSE;
+/*N*/ StructureChanged(this);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformierte Position zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ const Vector3D& E3dPointObj::GetTransPosition()
+/*N*/ {
+/*N*/ if ( !bTransPosValid )
+/*N*/ {
+/*N*/ aTransPos = GetFullTransform() * aPosition;
+/*N*/ bTransPosValid = TRUE;
+/*N*/ }
+/*N*/ return aTransPos;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* sichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dPointObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ E3dObject::WriteData(rOut);
+/*N*/
+/*N*/ #ifdef E3D_STREAMING
+/*N*/
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dPointObj");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aPosition;
+/*N*/ #endif
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ }
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dPointObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ E3dObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dPointObj");
+/*N*/ #endif
+/*N*/
+/*N*/ rIn >> aPosition;
+/*N*/
+/*N*/ bTransPosValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_poly3d.cxx b/binfilter/bf_svx/source/engine3d/svx_poly3d.cxx
new file mode 100644
index 000000000000..8bf00f12d82d
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_poly3d.cxx
@@ -0,0 +1,1958 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+
+#ifndef _STRING_H
+#include <string.h>
+#ifndef _STRING_H
+#define _STRING_H
+#endif
+#endif
+
+#include "xpoly.hxx"
+
+#include "poly3d.hxx"
+
+
+#include <tools/poly.hxx>
+
+
+namespace binfilter {
+
+/*N*/ DBG_NAME(Polygon3D)
+/*N*/ DBG_NAME(PolyPolygon3D)
+
+/*************************************************************************
+|*
+|* 3D-PolyPolygon-Implementierung
+|*
+\************************************************************************/
+
+/*N*/ DECLARE_LIST(Polygon3DList, Polygon3D*)//STRIP008 ;
+
+/*N*/ class ImpPolyPolygon3D
+/*N*/ {
+/*N*/ public:
+/*N*/ Polygon3DList aPoly3DList;
+/*N*/ UINT16 nRefCount;
+/*N*/
+/*N*/ ImpPolyPolygon3D(UINT16 nInitSize = 4, UINT16 nResize = 4)
+/*N*/ : aPoly3DList(1024, nInitSize, nResize) { nRefCount = 1; }
+/*N*/ ImpPolyPolygon3D(const ImpPolyPolygon3D& rImpPolyPoly3D);
+/*N*/ ~ImpPolyPolygon3D();
+/*N*/
+/*N*/ BOOL operator==(const ImpPolyPolygon3D& rImpPolyPoly3D) const;
+/*N*/ BOOL operator!=(const ImpPolyPolygon3D& rImpPolyPoly3D) const
+/*N*/ { return !operator==(rImpPolyPoly3D); }
+/*N*/ };
+
+/*************************************************************************
+|*
+|* Standard-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ ImpPolygon3D::ImpPolygon3D(UINT16 nInitSize, UINT16 nPolyResize)
+/*N*/ {
+/*N*/ pPointAry = NULL;
+/*N*/ bDeleteOldAry = FALSE;
+/*N*/ bClosed = FALSE;
+/*N*/ nSize = 0;
+/*N*/ nResize = nPolyResize;
+/*N*/ nPoints = 0;
+/*N*/ nRefCount = 1;
+/*N*/ Resize(nInitSize);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Copy-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ ImpPolygon3D::ImpPolygon3D(const ImpPolygon3D& rImpPoly3D)
+/*N*/ {
+/*N*/ ((ImpPolygon3D&)rImpPoly3D).CheckPointDelete();
+/*N*/
+/*N*/ pPointAry = NULL;
+/*N*/ bDeleteOldAry = FALSE;
+/*N*/ bClosed = rImpPoly3D.bClosed;
+/*N*/ nSize = 0;
+/*N*/ nResize = rImpPoly3D.nResize;
+/*N*/ nPoints = 0;
+/*N*/ nRefCount = 1;
+/*N*/ Resize(rImpPoly3D.nSize);
+/*N*/
+/*N*/ // Kopieren
+/*N*/ nPoints = rImpPoly3D.nPoints;
+/*N*/ memcpy(pPointAry, rImpPoly3D.pPointAry, nSize*sizeof(Vector3D));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ ImpPolygon3D::~ImpPolygon3D()
+/*N*/ {
+/*N*/ delete[] (char*)pPointAry;
+/*N*/
+/*N*/ if(bDeleteOldAry)
+/*N*/ delete[] (char*)pOldPointAry;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Gibt unter Beachtung eines Flags den Speicher fuer das Polygon frei.
+|*
+\************************************************************************/
+
+/*N*/ void ImpPolygon3D::CheckPointDelete()
+/*N*/ {
+/*N*/ if(bDeleteOldAry)
+/*N*/ {
+/*N*/ delete[] (char*)pOldPointAry;
+/*N*/ bDeleteOldAry = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ImpPolygon3D::Resize()
+|*
+|* !!! Polygongroesse aendern - wenn bDeletePoints FALSE, dann den
+|* Punkt-Array nicht loeschen, sondern in pOldPointAry sichern und
+|* das Flag bDeleteOldAry setzen. Beim naechsten Zugriff wird
+|* das Array dann geloescht.
+|* Damit wird verhindert, dass bei Poly3D[n] = Poly3D[0] durch ein
+|* Resize der fuer den rechten Ausdruck verwendete Vector3D-Array
+|* vorzeitig geloescht wird.
+|*
+\************************************************************************/
+
+/*N*/ void ImpPolygon3D::Resize(UINT16 nNewSize, BOOL bDeletePoints)
+/*N*/ {
+/*N*/ if(nNewSize == nSize)
+/*N*/ return;
+/*N*/
+/*N*/ UINT16 nOldSize = nSize;
+/*N*/
+/*N*/ CheckPointDelete();
+/*N*/ pOldPointAry = pPointAry;
+/*N*/
+/*N*/ // Neue Groesse auf vielfaches von nResize runden, sofern Objekt
+/*N*/ // nicht neu angelegt wurde (nSize != 0)
+/*N*/ if(nSize && nNewSize > nSize)
+/*N*/ {
+/*N*/ DBG_ASSERT(nResize, "Resize-Versuch trotz nResize = 0 !");
+/*N*/ nNewSize = nSize + ((nNewSize-nSize-1) / nResize + 1) * nResize;
+/*N*/ }
+/*N*/
+/*N*/ // Punkt-Array erzeugen
+/*N*/ nSize = nNewSize;
+/*N*/ pPointAry = (Vector3D*)new char[nSize * sizeof(Vector3D)];
+/*N*/ memset(pPointAry, 0, nSize * sizeof(Vector3D));
+/*N*/
+/*N*/ // Eventuell umkopieren
+/*N*/ if(nOldSize)
+/*N*/ {
+/*N*/ if(nOldSize < nSize)
+/*N*/ {
+/*N*/ memcpy(pPointAry, pOldPointAry, nOldSize * sizeof(Vector3D));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ memcpy(pPointAry, pOldPointAry, nSize*sizeof(Vector3D));
+/*N*/
+/*N*/ // Anzahl der gueltigen Punkte anpassen
+/*N*/ if(nPoints > nSize)
+/*N*/ nPoints = nSize;
+/*N*/ }
+/*N*/ if(bDeletePoints)
+/*N*/ delete[] (char*)pOldPointAry;
+/*N*/ else
+/*N*/ bDeleteOldAry = TRUE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Vektoren einfuegen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Vektoren entfernen
+|*
+\************************************************************************/
+
+/*N*/ void ImpPolygon3D::Remove(UINT16 nPos, UINT16 nCount)
+/*N*/ {
+/*N*/ CheckPointDelete();
+/*N*/
+/*N*/ if(nPos + nCount <= nPoints)
+/*N*/ {
+/*N*/ UINT16 nMove = nPoints - nPos - nCount;
+/*N*/ if(nMove)
+/*N*/ memmove(&pPointAry[nPos], &pPointAry[nPos+nCount],
+/*N*/ nMove * sizeof(Vector3D));
+/*N*/
+/*N*/ nPoints -= nCount;
+/*N*/ memset(&pPointAry[nPoints], 0, nCount * sizeof(Vector3D));
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Standard-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D::Polygon3D(UINT16 nSize, UINT16 nResize)
+/*N*/ {
+/*N*/ pImpPolygon3D = new ImpPolygon3D(nSize, nResize);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Copy-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D::Polygon3D(const Polygon3D& rPoly3D)
+/*N*/ {
+/*N*/ pImpPolygon3D = rPoly3D.pImpPolygon3D;
+/*N*/ pImpPolygon3D->nRefCount++;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor aus Standard-Polygon
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D::Polygon3D(const Polygon& rPoly, double fScale)
+/*N*/ {
+/*N*/ UINT16 nSize(rPoly.GetSize());
+/*N*/ pImpPolygon3D = new ImpPolygon3D(nSize);
+/*N*/
+/*N*/ if(fScale != 1.0)
+/*N*/ {
+/*?*/ for(UINT16 a=0; a<nSize; a++)
+/*?*/ {
+/*?*/ pImpPolygon3D->pPointAry[a].X() = rPoly[a].X() * fScale;
+/*?*/ pImpPolygon3D->pPointAry[a].Y() = -rPoly[a].Y() * fScale;
+/*?*/ pImpPolygon3D->pPointAry[a].Z() = 0.0;
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ for(UINT16 a=0; a<nSize; a++)
+/*N*/ {
+/*N*/ pImpPolygon3D->pPointAry[a].X() = rPoly[a].X();
+/*N*/ pImpPolygon3D->pPointAry[a].Y() = -rPoly[a].Y();
+/*N*/ pImpPolygon3D->pPointAry[a].Z() = 0.0;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ pImpPolygon3D->nPoints = nSize;
+/*N*/
+/*N*/ CheckClosed();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor aus XPolygon - Achtung! Es werden nur die Punkte
+|* uebernommen, ohne Konvertierung
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D::Polygon3D(const XPolygon& rXPoly, double fScale)
+/*N*/ {
+/*N*/ UINT16 nSize(rXPoly.GetPointCount());
+/*N*/ pImpPolygon3D = new ImpPolygon3D(nSize);
+/*N*/
+/*N*/ if(fScale != 1.0)
+/*N*/ {
+/*?*/ for(UINT16 a=0; a<nSize; a++)
+/*?*/ {
+/*?*/ pImpPolygon3D->pPointAry[a].X() = rXPoly[a].X() * fScale;
+/*?*/ pImpPolygon3D->pPointAry[a].Y() = -rXPoly[a].Y() * fScale;
+/*?*/ pImpPolygon3D->pPointAry[a].Z() = 0.0;
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ for(UINT16 a=0; a<nSize; a++)
+/*N*/ {
+/*N*/ pImpPolygon3D->pPointAry[a].X() = rXPoly[a].X();
+/*N*/ pImpPolygon3D->pPointAry[a].Y() = -rXPoly[a].Y();
+/*N*/ pImpPolygon3D->pPointAry[a].Z() = 0.0;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ pImpPolygon3D->nPoints = nSize;
+/*N*/
+/*N*/ CheckClosed();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Closed-Status der Einzelpolygone korrigieren
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::CheckClosed()
+/*N*/ {
+/*N*/ // #97067# Test needs to look for > 1, not for != 0
+/*N*/ if(pImpPolygon3D->nPoints > 1
+/*N*/ && pImpPolygon3D->pPointAry[0] == pImpPolygon3D->pPointAry[pImpPolygon3D->nPoints - 1])
+/*N*/ {
+/*N*/ pImpPolygon3D->bClosed = TRUE;
+/*N*/ pImpPolygon3D->nPoints--;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D::~Polygon3D()
+/*N*/ {
+/*N*/ if( pImpPolygon3D->nRefCount > 1 )
+/*N*/ pImpPolygon3D->nRefCount--;
+/*N*/ else
+/*N*/ delete pImpPolygon3D;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Closed-Zustand des Polygons testen
+|*
+\************************************************************************/
+
+/*N*/ BOOL Polygon3D::IsClosed() const
+/*N*/ {
+/*N*/ return pImpPolygon3D->bClosed;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Closed-Zustand des Polygons aendern
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::SetClosed(BOOL bNew)
+/*N*/ {
+/*N*/ if(bNew != IsClosed())
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ pImpPolygon3D->bClosed = bNew;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Referenzzaehler desImpPoly3D pruefen und ggf. von diesem abkoppeln
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::CheckReference()
+/*N*/ {
+/*N*/ if(pImpPolygon3D->nRefCount > 1)
+/*N*/ {
+/*N*/ pImpPolygon3D->nRefCount--;
+/*N*/ pImpPolygon3D = new ImpPolygon3D(*pImpPolygon3D);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* neue Groesse setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Groesse zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Laenge der Polygonkante zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ double Polygon3D::GetLength() const
+/*N*/ {
+/*N*/ double fRetval = 0.0;
+/*N*/ Vector3D *pLast = &pImpPolygon3D->pPointAry[
+/*N*/ IsClosed() ? pImpPolygon3D->nPoints - 1 : 0];
+/*N*/
+/*N*/ for(UINT16 a=IsClosed() ? 0 : 1;a<pImpPolygon3D->nPoints;a++)
+/*N*/ {
+/*N*/ Vector3D *pCandidate = &pImpPolygon3D->pPointAry[a];
+/*N*/ Vector3D aVec = *pCandidate - *pLast;
+/*N*/ fRetval += aVec.GetLength();
+/*N*/ pLast = pCandidate;
+/*N*/ }
+/*N*/
+/*N*/ return fRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Anzahl der belegten Punkte setzen
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::SetPointCount(UINT16 nPoints)
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ if(pImpPolygon3D->nSize < nPoints)
+/*?*/ pImpPolygon3D->Resize(nPoints);
+/*N*/
+/*N*/ if(nPoints < pImpPolygon3D->nPoints)
+/*N*/ {
+/*N*/ UINT16 nSize = pImpPolygon3D->nPoints - nPoints;
+/*N*/ memset(&pImpPolygon3D->pPointAry[nPoints], 0, nSize * sizeof(Vector3D));
+/*N*/ }
+/*N*/ pImpPolygon3D->nPoints = nPoints;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Anzahl der belegten Punkte zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 Polygon3D::GetPointCount() const
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ return pImpPolygon3D->nPoints;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Polygonpunkte entfernen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* const-Arrayoperator
+|*
+\************************************************************************/
+
+/*N*/ const Vector3D& Polygon3D::operator[]( UINT16 nPos ) const
+/*N*/ {
+/*N*/ DBG_ASSERT(nPos < pImpPolygon3D->nPoints, "Ungueltiger Index bei const-Arrayzugriff auf Polygon3D");
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ return pImpPolygon3D->pPointAry[nPos];
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Arrayoperator
+|*
+\************************************************************************/
+
+/*N*/ Vector3D& Polygon3D::operator[]( UINT16 nPos )
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ if(nPos >= pImpPolygon3D->nSize)
+/*N*/ {
+/*N*/ DBG_ASSERT(pImpPolygon3D->nResize, "Ungueltiger Index bei Arrayzugriff auf Polygon3D");
+/*N*/ pImpPolygon3D->Resize(nPos + 1, FALSE);
+/*N*/ }
+/*N*/
+/*N*/ if(nPos >= pImpPolygon3D->nPoints)
+/*N*/ pImpPolygon3D->nPoints = nPos + 1;
+/*N*/
+/*N*/ return pImpPolygon3D->pPointAry[nPos];
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D& Polygon3D::operator=(const Polygon3D& rPoly3D)
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/
+/*N*/ rPoly3D.pImpPolygon3D->nRefCount++;
+/*N*/
+/*N*/ if(pImpPolygon3D->nRefCount > 1)
+/*N*/ pImpPolygon3D->nRefCount--;
+/*N*/ else
+/*N*/ delete pImpPolygon3D;
+/*N*/
+/*N*/ pImpPolygon3D = rPoly3D.pImpPolygon3D;
+/*N*/
+/*N*/ return *this;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Vergleichsoperator
+|*
+\************************************************************************/
+
+/*N*/ BOOL Polygon3D::operator==(const Polygon3D& rPoly3D) const
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/
+/*N*/ if(rPoly3D.pImpPolygon3D == pImpPolygon3D)
+/*N*/ return TRUE;
+/*N*/
+/*N*/ if(pImpPolygon3D->nPoints != rPoly3D.pImpPolygon3D->nPoints)
+/*N*/ return FALSE;
+/*N*/
+/*N*/ // point-to point compare necessary
+/*N*/ for(UINT16 a=0;a<pImpPolygon3D->nPoints;a++)
+/*N*/ if(pImpPolygon3D->pPointAry[a] != rPoly3D.pImpPolygon3D->pPointAry[a])
+/*N*/ return FALSE;
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ungleichoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* aus einem Stream lesen
+|*
+*************************************************************************/
+
+/*N*/ SvStream& operator>>(SvStream& rIStream, Polygon3D& rPoly3D)
+/*N*/ {
+/*N*/ DBG_CHKOBJ(&rPoly3D, Polygon3D, NULL);
+/*N*/ UINT16 nPntCnt;
+/*N*/
+/*N*/ rPoly3D.pImpPolygon3D->CheckPointDelete();
+/*N*/
+/*N*/ // Anzahl der Punkte einlesen und Array erzeugen
+/*N*/ rIStream >> nPntCnt;
+/*N*/ rPoly3D.pImpPolygon3D->nPoints = nPntCnt;
+/*N*/
+/*N*/ if(rPoly3D.pImpPolygon3D->nRefCount != 1)
+/*N*/ {
+/*?*/ if(rPoly3D.pImpPolygon3D->nRefCount)
+/*?*/ rPoly3D.pImpPolygon3D->nRefCount--;
+/*?*/ rPoly3D.pImpPolygon3D = new ImpPolygon3D(nPntCnt);
+/*N*/ }
+/*N*/ else
+/*N*/ rPoly3D.pImpPolygon3D->Resize(nPntCnt);
+/*N*/
+/*N*/ Vector3D* pPoint = rPoly3D.pImpPolygon3D->pPointAry;
+/*N*/
+/*N*/ for(UINT16 i = 0; i < nPntCnt; i++)
+/*N*/ rIStream >> *pPoint++;
+/*N*/
+/*N*/ // auf geschlossenheit pruefen
+/*N*/ if(*rPoly3D.pImpPolygon3D->pPointAry == *(pPoint-1))
+/*N*/ {
+/*N*/ rPoly3D.pImpPolygon3D->bClosed = TRUE;
+/*N*/ rPoly3D.pImpPolygon3D->nPoints = nPntCnt-1;
+/*N*/ }
+/*N*/
+/*N*/ INT16 nTmp;
+/*N*/ rIStream >> nTmp; // war mal nConvexPoint
+/*N*/ rIStream >> nTmp; // alt: rPoly3D.nOuterPoly;
+/*N*/
+/*N*/ return rIStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* in einem Stream speichern
+|*
+*************************************************************************/
+
+/*N*/ SvStream& operator<<(SvStream& rOStream, const Polygon3D& rPoly3D)
+/*N*/ {
+/*N*/ DBG_CHKOBJ(&rPoly3D, Polygon3D, NULL);
+/*N*/
+/*N*/ rPoly3D.pImpPolygon3D->CheckPointDelete();
+/*N*/
+/*N*/ Vector3D* pPoint = rPoly3D.pImpPolygon3D->pPointAry;
+/*N*/ UINT16 nPntCnt = rPoly3D.GetPointCount();
+/*N*/
+/*N*/ if(rPoly3D.pImpPolygon3D->bClosed)
+/*N*/ {
+/*N*/ nPntCnt++;
+/*N*/ rOStream << nPntCnt;
+/*N*/ nPntCnt--;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rOStream << nPntCnt;
+/*N*/ }
+/*N*/
+/*N*/ for (UINT16 i = 0; i < nPntCnt; i++)
+/*N*/ rOStream << *pPoint++;
+/*N*/
+/*N*/ if(rPoly3D.pImpPolygon3D->bClosed)
+/*N*/ {
+/*N*/ // ersten Punkt nochmal, um polygon auf geschlossen zu zwingen
+/*N*/ pPoint = rPoly3D.pImpPolygon3D->pPointAry;
+/*N*/ rOStream << *pPoint;
+/*N*/ }
+/*N*/
+/*N*/ rOStream << (INT16)0; // war mal nConvexPoint
+/*N*/ rOStream << (INT16)-1; // alt: rPoly3D.nOuterPoly;
+/*N*/
+/*N*/ return rOStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Laufrichtung des Polygons feststellen
+|*
+\************************************************************************/
+
+/*N*/ BOOL Polygon3D::IsClockwise(const Vector3D &rNormal) const
+/*N*/ {
+/*N*/ double fZValue = rNormal.Scalar(GetNormal());
+/*N*/ return (fZValue >= 0.0);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Eine garantier die Orientierung wiederspiegelnde Ecke des Polygons
+|* liefern
+|*
+\************************************************************************/
+
+/*N*/ UINT16 Polygon3D::GetHighestEdge() const
+/*N*/ {
+/*N*/ UINT16 nRetval = 0;
+/*N*/ Vector3D *pHighest = &pImpPolygon3D->pPointAry[nRetval];
+/*N*/ for(UINT16 a=1;a<pImpPolygon3D->nPoints;a++)
+/*N*/ {
+/*N*/ Vector3D *pCandidate = &pImpPolygon3D->pPointAry[a];
+/*N*/ if(pCandidate->X() <= pHighest->X())
+/*N*/ {
+/*N*/ if(pCandidate->X() < pHighest->X())
+/*N*/ {
+/*N*/ pHighest = pCandidate;
+/*N*/ nRetval = a;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pCandidate->Y() <= pHighest->Y())
+/*N*/ {
+/*N*/ if(pCandidate->Y() < pHighest->Y())
+/*N*/ {
+/*N*/ pHighest = pCandidate;
+/*N*/ nRetval = a;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pCandidate->Z() < pHighest->Z())
+/*N*/ {
+/*N*/ pHighest = pCandidate;
+/*N*/ nRetval = a;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Normale des Polygons liefern
+|*
+|* Dabei eine Ecke waehlen, die die spezifische Orientierung des Polygons
+|* besitzt und mit gleichen Punkten rechnen!
+|*
+\************************************************************************/
+
+/*N*/ Vector3D Polygon3D::GetNormal() const
+/*N*/ {
+/*N*/ Vector3D aNormal(0.0, 0.0, -1.0);
+/*N*/
+/*N*/ if(pImpPolygon3D->nPoints > 2)
+/*N*/ {
+/*N*/ // HighestEdge bestimmen
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/ UINT16 nHighest = GetHighestEdge();
+/*N*/ const Vector3D &rHighest = (*this)[nHighest];
+/*N*/
+/*N*/ // Vorgaenger bestimmen
+/*N*/ UINT16 nPrev(nHighest);
+/*N*/ do {
+/*N*/ nPrev = (nPrev == 0) ? nPntCnt-1 : nPrev-1;
+/*N*/ } while((*this)[nPrev] == rHighest && nPrev != nHighest);
+/*N*/ const Vector3D &rPrev = (*this)[nPrev];
+/*N*/
+/*N*/ // Nachfolger bestimmen
+/*N*/ UINT16 nNext(nHighest);
+/*N*/ do {
+/*N*/ nNext = (nNext == nPntCnt-1) ? 0 : nNext+1;
+/*N*/ } while((*this)[nNext] == rHighest && nNext != nHighest);
+/*N*/ const Vector3D &rNext = (*this)[nNext];
+/*N*/
+/*N*/ // Fehlerfaelle abfangen
+/*N*/ if(rHighest == rPrev || rHighest == rNext || rPrev == rNext)
+/*N*/ return aNormal;
+/*N*/
+/*N*/ // Normale bilden
+/*N*/ aNormal = (rPrev - rHighest)|(rNext - rHighest);
+/*N*/
+/*N*/ // get length
+/*N*/ double fLen = aNormal.GetLength();
+/*N*/
+/*N*/ // correct length
+/*N*/ if(fabs(fLen) < SMALL_DVALUE)
+/*N*/ fLen = 0.0;
+/*N*/
+/*N*/ if(0.0 != fLen)
+/*N*/ {
+/*N*/ // use own normalize here since we already know the vector length
+/*N*/ // with square root applied
+/*N*/ // aNormal.Normalize();
+/*N*/ if(1.0 != fLen)
+/*N*/ {
+/*N*/ // normalize
+/*N*/ double fFac = 1.0 / fLen;
+/*N*/ aNormal = Vector3D(aNormal.X() * fFac, aNormal.Y() * fFac, aNormal.Z() * fFac);
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // points are on one line, use default normal
+/*N*/ aNormal = Vector3D(0.0, 0.0, -1.0);
+/*N*/ }
+/*N*/ }
+/*N*/ return aNormal;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Mittelpunkt des Polygons (in Bezug auf die Einzelpunkte) berechnen
+|*
+\************************************************************************/
+
+/*N*/ Vector3D Polygon3D::GetMiddle() const
+/*N*/ {
+/*N*/ Vector3D aMiddle;
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/
+/*N*/ for(UINT16 i = 0; i < nPntCnt; i++)
+/*N*/ aMiddle += pImpPolygon3D->pPointAry[i];
+/*N*/
+/*N*/ aMiddle /= (double)nPntCnt;
+/*N*/
+/*N*/ return aMiddle;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Laufrichtung des Polygons umkehren
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::FlipDirection()
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/ UINT16 nCnt = nPntCnt / 2;
+/*N*/ Vector3D* pBeg = pImpPolygon3D->pPointAry;
+/*N*/ Vector3D* pEnd = pBeg + nPntCnt - 1;
+/*N*/
+/*N*/ for(UINT16 i = 0; i < nCnt; i++)
+/*N*/ {
+/*N*/ Vector3D aTmp = *pBeg;
+/*N*/ *pBeg++ = *pEnd;
+/*N*/ *pEnd-- = aTmp;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Polygonpunkte mit uebergebener Matrix transformieren
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::Transform(const Matrix4D& rTfMatrix)
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ Vector3D* pPoint = pImpPolygon3D->pPointAry;
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/
+/*N*/ for(UINT16 i = 0; i < nPntCnt; i++)
+/*N*/ *pPoint++ *= rTfMatrix;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* doppelte aufeinanderfolgende Polygonpunkte entfernen; ein
+|* geschlossenes Polygon wird dabei ggf. "geoeffnet"
+|*
+\************************************************************************/
+
+/*N*/ void Polygon3D::RemoveDoublePoints()
+/*N*/ {
+/*N*/ pImpPolygon3D->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/
+/*N*/ if(nPntCnt)
+/*N*/ {
+/*N*/ Vector3D* pPoint = pImpPolygon3D->pPointAry;
+/*N*/ Vector3D aP0 = *pPoint;
+/*N*/
+/*N*/ pPoint += nPntCnt;
+/*N*/
+/*N*/ while(*--pPoint == aP0 && nPntCnt > 3)
+/*N*/ {
+/*N*/ nPntCnt--;
+/*N*/ pImpPolygon3D->bClosed = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ for(UINT16 i = nPntCnt-1; i > 0 && nPntCnt > 3; i--)
+/*N*/ {
+/*N*/ if(*pPoint == *(pPoint-1))
+/*N*/ {
+/*N*/ pImpPolygon3D->Remove(i, 1);
+/*N*/ nPntCnt--;
+/*N*/ }
+/*N*/ pPoint--;
+/*N*/ }
+/*N*/
+/*N*/ SetPointCount(nPntCnt);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ DBG_ASSERT(FALSE, "Empty polygon used!");
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ueberlappen sich das aktuelle und das angegebene Polygon ?
+|*
+\************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Existiert ein Schnitt zwischen den Polys?
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Crossings Test for point and whole polygon
+|*
+\************************************************************************/
+
+/*N*/ BOOL Polygon3D::IsInside(const Vector3D& rPnt, BOOL bWithBorder) const
+/*N*/ {
+/*N*/ BOOL bInside(FALSE);
+/*N*/ UINT16 nNumPoint(GetPointCount());
+/*N*/ Vector3D* pPoints = pImpPolygon3D->pPointAry;
+/*N*/
+/*N*/ for(UINT16 a=0;a<nNumPoint;a++)
+/*N*/ {
+/*N*/ if(bWithBorder
+/*N*/ && (fabs(pPoints[a].X() - rPnt.X()) < SMALL_DVALUE)
+/*N*/ && (fabs(pPoints[a].Y() - rPnt.Y()) < SMALL_DVALUE))
+/*N*/ return TRUE;
+/*N*/
+/*N*/ UINT16 nPrev((!a) ? nNumPoint-1 : a-1);
+/*N*/
+/*N*/ if((pPoints[nPrev].Y() - rPnt.Y() > -SMALL_DVALUE) != (pPoints[a].Y() - rPnt.Y() > -SMALL_DVALUE))
+/*N*/ {
+/*N*/ BOOL bXFlagOld(pPoints[nPrev].X() - rPnt.X() > -SMALL_DVALUE);
+/*N*/
+/*N*/ if(bXFlagOld == (pPoints[a].X() - rPnt.X() > -SMALL_DVALUE))
+/*N*/ {
+/*N*/ if(bXFlagOld)
+/*N*/ bInside = !bInside;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ double fCmp =
+/*N*/ pPoints[a].X() - (pPoints[a].Y() - rPnt.Y()) *
+/*N*/ (pPoints[nPrev].X() - pPoints[a].X()) /
+/*N*/ (pPoints[nPrev].Y() - pPoints[a].Y());
+/*N*/
+/*N*/ if((bWithBorder && fCmp > rPnt.X()) || (!bWithBorder && fCmp - rPnt.X() > -SMALL_DVALUE))
+/*N*/ bInside = !bInside;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bInside;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* FG: Identisch wie oben, das Polygon herausgeben
+|*
+\************************************************************************/
+
+/*N*/ Polygon Polygon3D::GetPolygon() const
+/*N*/ {
+/*N*/ BOOL bClosed = IsClosed();
+/*N*/ UINT16 nSize = pImpPolygon3D->nPoints;
+/*N*/ if(bClosed)
+/*N*/ nSize++;
+/*N*/ Polygon aPolygon(nSize);
+/*N*/ Vector3D* pVec3D = pImpPolygon3D->pPointAry;
+/*N*/
+/*N*/ if (pVec3D)
+/*N*/ {
+/*N*/ UINT16 i;
+/*N*/ for (i = 0; i < pImpPolygon3D->nPoints; i++)
+/*N*/ {
+/*N*/ // X und Y uebernehmen, Z vernachlaessigen
+/*N*/ aPolygon.SetPoint(Point((long) pVec3D[i].X(),
+/*N*/ (long) -pVec3D[i].Y()), i);
+/*N*/ }
+/*N*/ if(bClosed)
+/*N*/ aPolygon.SetPoint(Point((long) pVec3D[0].X(),
+/*N*/ (long) -pVec3D[0].Y()), i);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ for (UINT16 i = 0; i < nSize; i++)
+/*N*/ {
+/*?*/ aPolygon.SetPoint(Point(), i);
+/*N*/ }
+/*N*/ }
+/*N*/ aPolygon.SetSize(nSize);
+/*N*/ return(aPolygon);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ausdehnung des Polygons ermitteln
+|*
+\************************************************************************/
+
+/*N*/ Volume3D Polygon3D::GetPolySize() const
+/*N*/ {
+/*N*/ Volume3D aRetval;
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/
+/*N*/ aRetval.Reset();
+/*N*/ for(UINT16 i = 0; i < nPntCnt; i++)
+/*N*/ aRetval.Union((*this)[i]);
+/*N*/
+/*N*/ return aRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Flaeche des Polygons ermitteln
+|*
+\************************************************************************/
+
+
+/*N*/ double Polygon3D::GetPolyArea(const Vector3D& rNormal) const
+/*N*/ {
+/*N*/ double fRetval = 0.0;
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/
+/*N*/ if(nPntCnt > 2)
+/*N*/ {
+/*N*/ const Vector3D& rFirst = (*this)[0];
+/*N*/ Vector3D aLastVector = (*this)[1] - rFirst;
+/*N*/
+/*N*/ for (UINT16 i = 2; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ const Vector3D& rPoint = (*this)[i];
+/*N*/ Vector3D aNewVec = rPoint - rFirst;
+/*N*/ Vector3D aArea = aLastVector;
+/*N*/ aArea |= aNewVec;
+/*N*/ fRetval += (rNormal.Scalar(aArea)) / 2.0;
+/*N*/ }
+/*N*/ }
+/*N*/ return fabs(fRetval);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Schnitt zwischen den von den Punkten angegebenen Kanten ermitteln.
+|* Dabei ist der Rueckgabewert != 0.0, wenn der Schnitt innerhalb
+|* der Parameterbereiche der Kanten liegt und gibt den Wert ]0.0, 1.0]
+|* innerhalb der ersten Kante an.
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Diese Version arbeitet mit der Kante nEdge1 aus dem lokalen
+|* Polygon und nEdge2 aus dem uebergebenen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* test if point is on line in range ]0.0..1.0[ without
+|* the points. If so, return TRUE and put the parameter
+|* value in pCut (if provided)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Diese Version nimmt die Startpunkte und Vektoren (relative Angabe
+|* des Endpunktes) zweier Kanten
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Orientierung im Punkt nIndex liefern
+|*
+\************************************************************************/
+
+/*N*/ BOOL Polygon3D::GetPointOrientation(UINT16 nIndex) const
+/*N*/ {
+/*N*/ UINT16 nPntCnt = pImpPolygon3D->nPoints;
+/*N*/ BOOL bRetval(TRUE);
+/*N*/
+/*N*/ if(nIndex < nPntCnt)
+/*N*/ {
+/*N*/ const Vector3D& rMid = (*this)[nIndex];
+/*N*/ const Vector3D& rPre = (*this)[(nIndex == 0) ? nPntCnt-1 : nIndex-1];
+/*N*/ const Vector3D& rPos = (*this)[(nIndex == nPntCnt-1) ? 0 : nIndex+1];
+/*N*/
+/*N*/ Vector3D aNormal = (rPre - rMid)|(rPos - rMid);
+/*N*/ bRetval = (aNormal.Z() > 0.0) ? TRUE : FALSE;
+/*N*/ }
+/*N*/
+/*N*/ return bRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* get position on polypos, with clipping to start/end
+|*
+\************************************************************************/
+
+/*N*/ Vector3D Polygon3D::GetPosition(double fPos) const
+/*N*/ {
+/*N*/ Vector3D aRetval((*this)[0]);
+/*N*/
+/*N*/ if(fPos <= 0.0 || pImpPolygon3D->nPoints < 2)
+/*N*/ return aRetval;
+/*N*/
+/*N*/ double fLen = GetLength();
+/*N*/
+/*N*/ if(fPos >= fLen)
+/*N*/ {
+/*N*/ aRetval = (*this)[pImpPolygon3D->nPoints - 1];
+/*N*/ return aRetval;
+/*N*/ }
+/*N*/
+/*N*/ UINT16 nPos(0);
+/*N*/ Vector3D aPart((*this)[0] - (*this)[1]);
+/*N*/ double fPartLen = aPart.GetLength();
+/*N*/
+/*N*/ while(fPos > fPartLen)
+/*N*/ {
+/*N*/ fPos -= fPartLen;
+/*N*/ nPos++;
+/*N*/ aPart = Vector3D((*this)[nPos] - (*this)[nPos+1]);
+/*N*/ fPartLen = aPart.GetLength();
+/*N*/ }
+/*N*/
+/*N*/ aRetval.CalcInBetween((*this)[nPos], (*this)[nPos+1], fPos / fPartLen);
+/*N*/
+/*N*/ return aRetval;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// create a expanded or compresssed poly with exactly nNum Points
+//
+/*N*/ Polygon3D Polygon3D::GetExpandedPolygon(sal_uInt32 nNum)
+/*N*/ {
+/*N*/ if(GetPointCount() && nNum && (sal_uInt32)GetPointCount() != nNum)
+/*N*/ {
+/*N*/ Polygon3D aDestPoly((sal_uInt16)nNum);
+/*N*/
+/*N*/ // length of step in dest poly
+/*N*/ double fStep = GetLength() / (double)(IsClosed() ? nNum : nNum - 1);
+/*N*/
+/*N*/ // actual positions for run
+/*N*/ double fDestPos = 0.0;
+/*N*/ double fSrcPos = 0.0;
+/*N*/
+/*N*/ // actual indices for run
+/*N*/ sal_uInt32 nSrcPos = 0;
+/*N*/ sal_uInt32 nSrcPosNext = (nSrcPos+1 == (sal_uInt32)GetPointCount()) ? 0 : nSrcPos + 1;
+/*N*/
+/*N*/ // length of next source step
+/*N*/ double fNextSrcLen = ((*this)[(sal_uInt16)nSrcPos] - (*this)[(sal_uInt16)nSrcPosNext]).GetLength();
+/*N*/
+/*N*/ for(sal_uInt32 b = 0; b < nNum; b++)
+/*N*/ {
+/*N*/ // calc fDestPos in source
+/*N*/ while(fSrcPos + fNextSrcLen < fDestPos)
+/*N*/ {
+/*N*/ fSrcPos += fNextSrcLen;
+/*N*/ nSrcPos++;
+/*N*/ nSrcPosNext = (nSrcPos+1 == (sal_uInt32)GetPointCount()) ? 0 : nSrcPos + 1;
+/*N*/ fNextSrcLen = ((*this)[(sal_uInt16)nSrcPos] - (*this)[(sal_uInt16)nSrcPosNext]).GetLength();
+/*N*/ }
+/*N*/
+/*N*/ // fDestPos is between fSrcPos and (fSrcPos + fNextSrcLen)
+/*N*/ double fLenA = (fDestPos - fSrcPos) / fNextSrcLen;
+/*N*/ Vector3D aOld1 = (*this)[(sal_uInt16)nSrcPos];
+/*N*/ Vector3D aOld2 = (*this)[(sal_uInt16)nSrcPosNext];
+/*N*/ Vector3D aNewPoint;
+/*N*/ aNewPoint.CalcInBetween(aOld1, aOld2, fLenA);
+/*N*/
+/*N*/ aDestPoly[(sal_uInt16)b] = aNewPoint;
+/*N*/
+/*N*/ // next step
+/*N*/ fDestPos += fStep;
+/*N*/ }
+/*N*/
+/*N*/ if(aDestPoly.GetPointCount() >= 3)
+/*N*/ aDestPoly.SetClosed(IsClosed());
+/*N*/
+/*N*/ return aDestPoly;
+/*N*/ }
+/*N*/ else
+/*N*/ return *this;
+/*N*/ }
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//+--------------- ImpPolyPolygon3D -------------------------------------+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+/*************************************************************************
+|*
+|* Copy-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ ImpPolyPolygon3D::ImpPolyPolygon3D(const ImpPolyPolygon3D& rImpPolyPoly3D) :
+/*N*/ aPoly3DList(rImpPolyPoly3D.aPoly3DList)
+/*N*/ {
+/*N*/ nRefCount = 1;
+/*N*/ // Einzelne Elemente duplizieren
+/*N*/ Polygon3D* pPoly3D = aPoly3DList.First();
+/*N*/
+/*N*/ while ( pPoly3D )
+/*N*/ {
+/*N*/ aPoly3DList.Replace(new Polygon3D(*(aPoly3DList.GetCurObject())));
+/*N*/ pPoly3D = aPoly3DList.Next();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ ImpPolyPolygon3D::~ImpPolyPolygon3D()
+/*N*/ {
+/*N*/ Polygon3D* pPoly3D = aPoly3DList.First();
+/*N*/
+/*N*/ while( pPoly3D )
+/*N*/ {
+/*N*/ delete pPoly3D;
+/*N*/ pPoly3D = aPoly3DList.Next();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Gleichheitsoperator
+|*
+\************************************************************************/
+
+/*N*/ BOOL ImpPolyPolygon3D::operator==(const ImpPolyPolygon3D& rImpPolyPoly3D) const
+/*N*/ {
+/*N*/ UINT16 nCnt = (UINT16) aPoly3DList.Count();
+/*N*/ const Polygon3DList& rCmpList = rImpPolyPoly3D.aPoly3DList;
+/*N*/
+/*N*/ if ( nCnt != (UINT16) rCmpList.Count() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ BOOL bEqual = TRUE;
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt && bEqual; i++ )
+/*N*/ bEqual = ( *aPoly3DList.GetObject(i) == *rCmpList.GetObject(i) );
+/*N*/
+/*N*/ return bEqual;
+/*N*/ }
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//+--------------- PolyPolygon3D ----------------------------------------+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D::PolyPolygon3D(UINT16 nInitSize, UINT16 nResize)
+/*N*/ {
+/*N*/ DBG_CTOR(PolyPolygon3D, NULL);
+/*N*/ pImpPolyPolygon3D = new ImpPolyPolygon3D(nInitSize, nResize);
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* Konstruktor mit Polygon3D
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D::PolyPolygon3D(const Polygon3D& rPoly3D)
+/*N*/ {
+/*N*/ DBG_CTOR(PolyPolygon3D, NULL);
+/*N*/ pImpPolyPolygon3D = new ImpPolyPolygon3D;
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(new Polygon3D(rPoly3D));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor mit PolyPolygon3D
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D::PolyPolygon3D(const PolyPolygon3D& rPolyPoly3D)
+/*N*/ {
+/*N*/ DBG_CTOR(PolyPolygon3D,NULL);
+/*N*/ pImpPolyPolygon3D = rPolyPoly3D.pImpPolyPolygon3D;
+/*N*/ pImpPolyPolygon3D->nRefCount++;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor mit SV-PolyPolygon
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D::PolyPolygon3D(const PolyPolygon& rPolyPoly, double fScale)
+/*N*/ {
+/*N*/ DBG_CTOR(PolyPolygon3D, NULL);
+/*N*/ pImpPolyPolygon3D = new ImpPolyPolygon3D;
+/*N*/ UINT16 nCnt = rPolyPoly.Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(
+/*N*/ new Polygon3D(rPolyPoly.GetObject(i), fScale), LIST_APPEND);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor mit XPolyPolygon
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D::PolyPolygon3D(const XPolyPolygon& rXPolyPoly, double fScale)
+/*N*/ {
+/*N*/ DBG_CTOR(PolyPolygon3D, NULL);
+/*N*/ pImpPolyPolygon3D = new ImpPolyPolygon3D;
+/*N*/ UINT16 nCnt = rXPolyPoly.Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(
+/*N*/ new Polygon3D(rXPolyPoly.GetObject(i), fScale), LIST_APPEND);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Closed-Status der Einzelpolygone korrigieren
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D::~PolyPolygon3D()
+/*N*/ {
+/*N*/ DBG_DTOR(PolyPolygon3D, NULL);
+/*N*/
+/*N*/ if( pImpPolyPolygon3D->nRefCount > 1 ) pImpPolyPolygon3D->nRefCount--;
+/*N*/ else delete pImpPolyPolygon3D;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Feststellen, ob ein Punkt innerhalb liegt
+|*
+\************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Scnittpunkt angegebene Linie mit Polygon
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Referenzzaehler pruefen und ggf. neuen Container erzeugen
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::CheckReference()
+/*N*/ {
+/*N*/ if( pImpPolyPolygon3D->nRefCount > 1 )
+/*N*/ {
+/*N*/ pImpPolyPolygon3D->nRefCount--;
+/*N*/ pImpPolyPolygon3D = new ImpPolyPolygon3D(*pImpPolyPolygon3D);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Polygon in die Liste einfuegen
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::Insert(const Polygon3D& rPoly3D, UINT16 nPos)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(new Polygon3D(rPoly3D), nPos);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* PolyPolygon in die Liste einfuegen
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::Insert(const PolyPolygon3D& rPolyPoly3D, UINT16 nPos)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ UINT16 nCnt = rPolyPoly3D.Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++)
+/*N*/ {
+/*N*/ Polygon3D* pPoly3D = new Polygon3D(rPolyPoly3D[i]);
+/*N*/ pImpPolyPolygon3D->aPoly3DList. Insert(pPoly3D, nPos);
+/*N*/
+/*N*/ if ( nPos != POLYPOLY3D_APPEND )
+/*N*/ nPos++;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Polygon aus der Liste entfernen
+|*
+\************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Polygon in der Liste ersetzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Referenz auf Polygon zurueckgeben, ggf. neues Polygon einfuegen
+|*
+\************************************************************************/
+
+/*N*/ const Polygon3D& PolyPolygon3D::GetObject(UINT16 nPos) const
+/*N*/ {
+/*N*/ Polygon3D* pPoly3D = pImpPolyPolygon3D->aPoly3DList.GetObject(nPos);
+/*N*/
+/*N*/ if ( pPoly3D == NULL )
+/*N*/ { // Wenn noch kein Polygon an der Position vorhanden, neu erzeugen
+/*N*/ pPoly3D = new Polygon3D;
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(pPoly3D, nPos);
+/*N*/ }
+/*N*/ return *pPoly3D;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Liste loeschen
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::Clear()
+/*N*/ {
+/*N*/ if ( pImpPolyPolygon3D->nRefCount > 1 )
+/*N*/ {
+/*?*/ pImpPolyPolygon3D->nRefCount--;
+/*?*/ pImpPolyPolygon3D = new ImpPolyPolygon3D();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Polygon3D* pPoly3D = pImpPolyPolygon3D->aPoly3DList.First();
+/*N*/
+/*N*/ while( pPoly3D )
+/*N*/ {
+/*N*/ delete pPoly3D;
+/*N*/ pPoly3D = pImpPolyPolygon3D->aPoly3DList.Next();
+/*N*/ }
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Clear();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Anzahl der Polygone zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 PolyPolygon3D::Count() const
+/*N*/ {
+/*N*/ return (UINT16)(pImpPolyPolygon3D->aPoly3DList.Count());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Arrayoperator
+|*
+\************************************************************************/
+
+/*N*/ Polygon3D& PolyPolygon3D::operator[](UINT16 nPos)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ Polygon3D* pPoly3D = pImpPolyPolygon3D->aPoly3DList.GetObject(nPos);
+/*N*/
+/*N*/ if ( pPoly3D == NULL )
+/*N*/ { // Wenn noch kein Polygon an der Position vorhanden, neu erzeugen
+/*N*/ pPoly3D = new Polygon3D;
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(pPoly3D, nPos);
+/*N*/ }
+/*N*/ return *pPoly3D;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon3D& PolyPolygon3D::operator=(const PolyPolygon3D& rPolyPoly3D)
+/*N*/ {
+/*N*/ rPolyPoly3D.pImpPolyPolygon3D->nRefCount++;
+/*N*/
+/*N*/ if( pImpPolyPolygon3D->nRefCount > 1 ) pImpPolyPolygon3D->nRefCount--;
+/*N*/ else delete pImpPolyPolygon3D;
+/*N*/
+/*N*/ pImpPolyPolygon3D = rPolyPoly3D.pImpPolyPolygon3D;
+/*N*/ return *this;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Gleichheitsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Ungleichheitsoperator
+|*
+\************************************************************************/
+
+/*N*/ BOOL PolyPolygon3D::operator!=(const PolyPolygon3D& rPolyPoly3D) const
+/*N*/ {
+/*N*/ if ( pImpPolyPolygon3D == rPolyPoly3D.pImpPolyPolygon3D )
+/*N*/ return FALSE;
+/*N*/ else
+/*N*/ return *pImpPolyPolygon3D != *rPolyPoly3D.pImpPolyPolygon3D;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* alle Polygone mit uebergebener Matrix transformieren
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::Transform(const Matrix4D& rTfMatrix)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ UINT16 nCnt = Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ pImpPolyPolygon3D->aPoly3DList.GetObject(i)->Transform(rTfMatrix);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Die Umlaufrichtungen ineinanderliegender Polygone so anpassen, dass
+|* sie wechseln; Ausserdem wird ggf. das Polygon mit der geometrisch
+|* betrachtet aeussersten Kontur an den Anfang der Liste verschoben
+|* werden, damit Normalenberechnungen immer anhand des ersten Polygons
+|* ausgefuehrt werden koennen.
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::SetDirections(const Vector3D& rNormal)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/
+/*N*/ UINT16 nCnt = Count();
+/*N*/ UINT16 nPoly;
+/*N*/ short nFirstPoly = -1;
+/*N*/
+/*N*/ if(nCnt)
+/*N*/ {
+/*N*/ for ( nPoly = 0; nPoly < nCnt; nPoly++ )
+/*N*/ {
+/*N*/ Polygon3D& rPoly3D = *pImpPolyPolygon3D->aPoly3DList.GetObject(nPoly);
+/*N*/ BOOL bFlip = !rPoly3D.IsClockwise(rNormal);
+/*N*/ short nDepth = 0;
+/*N*/ const Vector3D& rPos = rPoly3D[0];
+/*N*/
+/*N*/ // bestimmen, wie tief das aktuelle Polygon in den anderen
+/*N*/ // verschachtelt ist
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ {
+/*N*/ if ( i != nPoly &&
+/*N*/ pImpPolyPolygon3D->aPoly3DList.GetObject(i)->IsInside(rPos) )
+/*N*/ nDepth++;
+/*N*/ }
+/*N*/ // ungerade nDepth-Werte bedeuten: das Polygon ist ein "Loch"
+/*N*/ // in der aeusseren Kontur
+/*N*/ BOOL bHole = ((nDepth & 0x0001) == 1);
+/*N*/
+/*N*/ if ( (bFlip && !bHole) || (!bFlip && bHole) )
+/*N*/ rPoly3D.FlipDirection();
+/*N*/
+/*N*/ // Den Index des (geometrisch) aeussersten Polygons merken
+/*N*/ if ( nDepth == 0 && nFirstPoly == -1 )
+/*N*/ nFirstPoly = (short) nPoly;
+/*N*/ }
+/*N*/ // liegt das aeussere Polygon nicht am Anfang, wird es dahin verschoben
+/*N*/ if ( nFirstPoly > 0 )
+/*N*/ {
+/*N*/ Polygon3D* pOuter = pImpPolyPolygon3D->aPoly3DList.Remove(nFirstPoly);
+/*N*/ pImpPolyPolygon3D->aPoly3DList.Insert(pOuter, (ULONG) 0);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* in allen Polygonen doppelte aufeinanderfolgende Polygonpunkte
+|* entfernen; ein geschlossenes Polygon wird dabei ggf. "geoeffnet"
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::RemoveDoublePoints()
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ UINT16 nCnt = Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ pImpPolyPolygon3D->aPoly3DList.GetObject(i)->RemoveDoublePoints();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ein mittels GrowPoly() geschrumpftes PolyPolygon in eventuell
+|* entstandenen Selbstueberschneidungen in Eckpunkten ohne
+|* Punktreduzierung korrigieren
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::CorrectGrownPoly(const PolyPolygon3D& rPolyOrig)
+/*N*/ {
+/*N*/ if(Count() == rPolyOrig.Count())
+/*N*/ {
+/*N*/ for(UINT16 a=0;a<Count();a++)
+/*N*/ {
+/*N*/ const Polygon3D& rOrig = rPolyOrig[a];
+/*N*/ Polygon3D& rPoly = (*this)[a];
+/*N*/ UINT16 nPntCnt = rOrig.GetPointCount();
+/*N*/
+/*N*/ if(nPntCnt == rPoly.GetPointCount() && nPntCnt > 2)
+/*N*/ {
+/*N*/ UINT16 nNumDiff(0);
+/*N*/ UINT16 nDoneStart(0xffff);
+/*N*/
+/*N*/ // Testen auf Anzahl Aenderungen
+/*N*/ UINT16 b;
+/*N*/ for(b=0;b<nPntCnt;b++)
+/*N*/ {
+/*N*/ if(rOrig.GetPointOrientation(b) != rPoly.GetPointOrientation(b))
+/*N*/ {
+/*N*/ nNumDiff++;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(nDoneStart == 0xffff)
+/*N*/ {
+/*N*/ // eventuellen Startpunkt auf gleiche Orientierung legen
+/*N*/ nDoneStart = b;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(nNumDiff == nPntCnt)
+/*N*/ {
+/*N*/ // Komplett umgedreht, alles auf einen Punkt
+/*N*/ Vector3D aMiddle = rPoly.GetMiddle();
+/*N*/
+/*N*/ for(b=0;b<nPntCnt;b++)
+/*N*/ {
+/*N*/ rPoly[b] = aMiddle;
+/*N*/ }
+/*N*/ }
+/*N*/ else if(nNumDiff)
+/*N*/ {
+/*N*/ // es gibt welche, nDoneStart ist gesetzt. Erzeuge (und
+/*N*/ // setze) nDoneEnd
+/*N*/ UINT16 nDoneEnd(nDoneStart);
+/*N*/ UINT16 nStartLoop;
+/*N*/ BOOL bInLoop(FALSE);
+/*N*/
+/*N*/ // einen step mehr in der Schleife, um Loops abzuschliessen
+/*N*/ BOOL bFirstStep(TRUE);
+/*N*/
+/*N*/ while(nDoneEnd != nDoneStart || bFirstStep)
+/*N*/ {
+/*N*/ bFirstStep = FALSE;
+/*N*/
+/*N*/ // nCandidate ist Kandidat fuer Test
+/*N*/ UINT16 nCandidate = (nDoneEnd == nPntCnt-1) ? 0 : nDoneEnd+1;
+/*N*/
+/*N*/ if(rOrig.GetPointOrientation(nCandidate) == rPoly.GetPointOrientation(nCandidate))
+/*N*/ {
+/*N*/ // Orientierung ist gleich
+/*N*/ if(bInLoop)
+/*N*/ {
+/*N*/ // Punkte innerhalb bInLoop auf ihr Zentrum setzen
+/*N*/ Vector3D aMiddle;
+/*N*/ UINT16 nCounter(0);
+/*N*/ UINT16 nStart(nStartLoop);
+/*N*/
+/*N*/ while(nStart != nCandidate)
+/*N*/ {
+/*N*/ aMiddle += rPoly[nStart];
+/*N*/ nCounter++;
+/*N*/ nStart = (nStart == nPntCnt-1) ? 0 : nStart+1;
+/*N*/ }
+/*N*/
+/*N*/ // Mittelwert bilden
+/*N*/ aMiddle /= (double)nCounter;
+/*N*/
+/*N*/ // Punkte umsetzen
+/*N*/ nStart = nStartLoop;
+/*N*/ while(nStart != nCandidate)
+/*N*/ {
+/*N*/ rPoly[nStart] = aMiddle;
+/*N*/ nStart = (nStart == nPntCnt-1) ? 0 : nStart+1;
+/*N*/ }
+/*N*/
+/*N*/ // Loop beenden
+/*N*/ bInLoop = FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Orientierung unterschiedlich
+/*N*/ if(!bInLoop)
+/*N*/ {
+/*N*/ // Start eines Loop mit geaenderter Orientierung
+/*N*/ nStartLoop = nCandidate;
+/*N*/ bInLoop = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Weitergehen
+/*N*/ nDoneEnd = nCandidate;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ueberlappen sich das aktuelle und das angegebene PolyPolygon (in X/Y) ?
+|*
+\************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Remove all completely overlapping polygons
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator>>(SvStream& rIStream, PolyPolygon3D& rPolyPoly3D)
+/*N*/ {
+/*N*/ DBG_CHKOBJ(&rPolyPoly3D, PolyPolygon3D, NULL);
+/*N*/
+/*N*/ Polygon3D* pPoly3D;
+/*N*/
+/*N*/ // Anzahl der Polygone einlesen
+/*N*/ UINT16 nPolyCount;
+/*N*/ rIStream >> nPolyCount;
+/*N*/
+/*N*/ BOOL bTruncated = FALSE;
+/*N*/ // Gesamtanzahl der Punkte mitzaehlen
+/*N*/ ULONG nAllPointCount = 0;
+/*N*/
+/*N*/ if ( rPolyPoly3D.pImpPolyPolygon3D->nRefCount > 1 )
+/*?*/ rPolyPoly3D.pImpPolyPolygon3D->nRefCount--;
+/*N*/ else
+/*N*/ delete rPolyPoly3D.pImpPolyPolygon3D;
+/*N*/
+/*N*/ rPolyPoly3D.pImpPolyPolygon3D = new ImpPolyPolygon3D(nPolyCount);
+/*N*/
+/*N*/ while ( nPolyCount > 0 )
+/*N*/ {
+/*N*/ pPoly3D = new Polygon3D;
+/*N*/ rIStream >> *pPoly3D;
+/*N*/ nAllPointCount += pPoly3D->GetPointCount();
+/*N*/
+/*N*/ if ( !bTruncated )
+/*N*/ {
+/*N*/ if ( nAllPointCount > POLY3D_MAXPOINTS )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ rPolyPoly3D.pImpPolyPolygon3D->aPoly3DList.Insert(pPoly3D, LIST_APPEND);
+/*N*/ }
+/*N*/ else
+/*?*/ delete pPoly3D;
+/*N*/
+/*N*/ nPolyCount--;
+/*N*/ }
+/*N*/
+/*N*/ return rIStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator<<(SvStream& rOStream, const PolyPolygon3D& rPolyPoly3D)
+/*N*/ {
+/*N*/ DBG_CHKOBJ(&rPolyPoly3D, PolyPolygon3D, NULL);
+/*N*/
+/*N*/ // Anzahl der Polygone rausschreiben
+/*N*/ rOStream << rPolyPoly3D.Count();
+/*N*/
+/*N*/ // Die einzelnen Polygone ausgeben
+/*N*/ Polygon3D* pPoly3D = rPolyPoly3D.pImpPolyPolygon3D->aPoly3DList.First();
+/*N*/
+/*N*/ while( pPoly3D )
+/*N*/ {
+/*N*/ rOStream << *pPoly3D;
+/*N*/ pPoly3D = rPolyPoly3D.pImpPolyPolygon3D->aPoly3DList.Next();
+/*N*/ }
+/*N*/
+/*N*/ return rOStream;
+/*N*/ }
+
+/*N*/ Vector3D PolyPolygon3D::GetNormal() const
+/*N*/ {
+/*N*/ if(pImpPolyPolygon3D->aPoly3DList.Count())
+/*N*/ return (*this)[0].GetNormal();
+/*N*/ return Vector3D(0.0, 0.0, -1.0);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* die Umlaufrichtung des ersten Polygons umkehren
+|*
+\************************************************************************/
+
+/*N*/ void PolyPolygon3D::FlipDirections()
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ UINT16 nCnt = Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ pImpPolyPolygon3D->aPoly3DList.GetObject(i)->FlipDirection();
+/*N*/ }
+
+/*N*/ Vector3D PolyPolygon3D::GetMiddle() const
+/*N*/ {
+/*N*/ if(pImpPolyPolygon3D->aPoly3DList.Count())
+/*N*/ return (*this)[0].GetMiddle();
+/*N*/ return Vector3D();
+/*N*/ }
+
+/*N*/ BOOL PolyPolygon3D::IsClosed() const
+/*N*/ {
+/*N*/ BOOL bClosed = TRUE;
+/*N*/ UINT16 nCnt = Count();
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ if(!pImpPolyPolygon3D->aPoly3DList.GetObject(i)->IsClosed())
+/*N*/ bClosed = FALSE;
+/*N*/ return bClosed;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* export PolyPolygon
+|*
+\************************************************************************/
+
+/*N*/ PolyPolygon PolyPolygon3D::GetPolyPolygon() const
+/*N*/ {
+/*N*/ PolyPolygon aPolyPolygon;
+/*N*/ UINT16 nCnt = Count();
+/*N*/
+/*N*/ for(UINT16 i=0; i<nCnt;i++)
+/*N*/ aPolyPolygon.Insert((*this)[i].GetPolygon());
+/*N*/
+/*N*/ return(aPolyPolygon);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ausdehnung ermitteln
+|*
+\************************************************************************/
+
+/*N*/ Volume3D PolyPolygon3D::GetPolySize() const
+/*N*/ {
+/*N*/ UINT16 nCnt = Count();
+/*N*/ Volume3D aRetval;
+/*N*/ Volume3D aSubVolume;
+/*N*/
+/*N*/ aRetval.Reset();
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ {
+/*N*/ aSubVolume = (*this)[i].GetPolySize();
+/*N*/ aRetval.Union(aSubVolume);
+/*N*/ }
+/*N*/
+/*N*/ return aRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Flaeche des Polygons ermitteln
+|*
+\************************************************************************/
+
+/*N*/ double PolyPolygon3D::GetPolyArea() const
+/*N*/ {
+/*N*/ UINT16 nCnt = Count();
+/*N*/ double fRetval = 0.0;
+/*N*/
+/*N*/ // Einzelflaechen aufsummieren
+/*N*/ Vector3D aNormal = GetNormal();
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ {
+/*N*/ if((*this)[i].IsClockwise(aNormal))
+/*N*/ {
+/*N*/ fRetval += (*this)[i].GetPolyArea(aNormal);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ fRetval -= (*this)[i].GetPolyArea(aNormal);
+/*N*/ }
+/*N*/ }
+/*N*/ return fabs(fRetval);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Laenge des Polygons ermitteln
+|*
+\************************************************************************/
+
+/*N*/ double PolyPolygon3D::GetLength() const
+/*N*/ {
+/*N*/ UINT16 nCnt = Count();
+/*N*/ double fRetval = 0.0;
+/*N*/
+/*N*/ for ( UINT16 i = 0; i < nCnt; i++ )
+/*N*/ fRetval += (*this)[i].GetLength();
+/*N*/
+/*N*/ return fRetval;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_polygn3d.cxx b/binfilter/bf_svx/source/engine3d/svx_polygn3d.cxx
new file mode 100644
index 000000000000..a4333abec08f
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_polygn3d.cxx
@@ -0,0 +1,426 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "polygn3d.hxx"
+
+
+#include "globl3d.hxx"
+
+
+#include "e3dcmpt.hxx"
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dPolygonObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolygonObj::E3dPolygonObj(
+/*N*/ E3dDefaultAttributes& rDefault,
+/*N*/ const PolyPolygon3D& rPolyPoly3D,
+/*N*/ BOOL bLinOnly)
+/*N*/ : E3dCompoundObject(rDefault),
+/*N*/ bLineOnly(bLinOnly)
+/*N*/ {
+/*N*/ // Geometrie setzen
+/*N*/ SetPolyPolygon3D(rPolyPoly3D);
+/*N*/
+/*N*/ // Default-Normals erzeugen
+/*N*/ CreateDefaultNormals();
+/*N*/
+/*N*/ // Default-Texturkoordinaten erzeugen
+/*N*/ CreateDefaultTexture();
+/*N*/
+/*N*/ // Geometrie erzeugen
+/*N*/ CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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();
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Linien-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolygonObj::E3dPolygonObj(
+/*N*/ E3dDefaultAttributes& rDefault,
+/*N*/ const Vector3D& rP1, const Vector3D& rP2,
+/*N*/ BOOL bLinOnly)
+/*N*/ : E3dCompoundObject(rDefault),
+/*N*/ aPolyPoly3D(1),
+/*N*/ bLineOnly(bLinOnly)
+/*N*/ {
+/*N*/ Polygon3D aPoly3D(2);
+/*N*/ aPoly3D[0] = rP1;
+/*N*/ aPoly3D[1] = rP2;
+/*N*/ aPolyPoly3D.Insert(aPoly3D);
+/*N*/
+/*N*/ // Geometrie erzeugen
+/*N*/ CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolygonObj::E3dPolygonObj()
+/*N*/ : E3dCompoundObject()
+/*N*/ {
+/*N*/ // Keine Geometrie erzeugen
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Default-Normalen erzeugen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolygonObj::CreateDefaultNormals()
+/*N*/ {
+/*N*/ PolyPolygon3D aPolyNormals(aPolyPoly3D.Count());
+/*N*/
+/*N*/ // Komplettes PolyPolygon mit den Ebenennormalen anlegen
+/*N*/ for(UINT16 a=0;a<aPolyPoly3D.Count();a++)
+/*N*/ {
+/*N*/ // Quellpolygon finden
+/*N*/ const Polygon3D& rPolygon = aPolyPoly3D[a];
+/*N*/
+/*N*/ // Neues Polygon fuer Normalen anlegen
+/*N*/ Polygon3D aNormals(rPolygon.GetPointCount());
+/*N*/
+/*N*/ // Normale holen (und umdrehen)
+/*N*/ Vector3D aNormal = -rPolygon.GetNormal();
+/*N*/
+/*N*/ // Neues Polygon fuellen
+/*N*/ for(UINT16 b=0;b<rPolygon.GetPointCount();b++)
+/*N*/ aNormals[b] = aNormal;
+/*N*/
+/*N*/ // Neues Polygon in PolyPolygon einfuegen
+/*N*/ aPolyNormals.Insert(aNormals);
+/*N*/ }
+/*N*/
+/*N*/ // Default-Normalen setzen
+/*N*/ SetPolyNormals3D(aPolyNormals);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Default-Texturkoordinaten erzeugen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolygonObj::CreateDefaultTexture()
+/*N*/ {
+/*N*/ PolyPolygon3D aPolyTexture(aPolyPoly3D.Count());
+/*N*/
+/*N*/ // Komplettes PolyPolygon mit den Texturkoordinaten anlegen
+/*N*/ // Die Texturkoordinaten erstrecken sich ueber X,Y und Z
+/*N*/ // ueber die gesamten Extremwerte im Bereich 0.0 .. 1.0
+/*N*/ for(UINT16 a=0;a<aPolyPoly3D.Count();a++)
+/*N*/ {
+/*N*/ // Quellpolygon finden
+/*N*/ const Polygon3D& rPolygon = aPolyPoly3D[a];
+/*N*/
+/*N*/ // Gesamtgroesse des Objektes feststellen
+/*N*/ Volume3D aVolume = rPolygon.GetPolySize();
+/*N*/
+/*N*/ // Neues Polygon fuer Texturkoordinaten anlegen
+/*N*/ Polygon3D aTexture(rPolygon.GetPointCount());
+/*N*/
+/*N*/ // Normale holen
+/*N*/ Vector3D aNormal = rPolygon.GetNormal();
+/*N*/ aNormal.Abs();
+/*N*/
+/*N*/ // Entscheiden, welche Koordinaten als Source fuer das
+/*N*/ // Mapping benutzt werden sollen
+/*N*/ UINT16 nSourceMode = 0;
+/*N*/
+/*N*/ // Groessten Freiheitsgrad ermitteln
+/*N*/ if(!(aNormal.X() > aNormal.Y() && aNormal.X() > aNormal.Z()))
+/*N*/ {
+/*N*/ if(aNormal.Y() > aNormal.Z())
+/*N*/ {
+/*N*/ // Y ist am groessten, benutze X,Z als mapping
+/*N*/ nSourceMode = 1;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Z ist am groessten, benutze X,Y als mapping
+/*N*/ nSourceMode = 2;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Neues Polygon fuellen
+/*N*/ for(UINT16 b=0;b<rPolygon.GetPointCount();b++)
+/*N*/ {
+/*N*/ Vector3D& aTex = aTexture[b];
+/*N*/ const Vector3D& aPoly = rPolygon[b];
+/*N*/
+/*N*/ switch(nSourceMode)
+/*N*/ {
+/*N*/ case 0: // Quelle ist Y,Z
+/*N*/ if(aVolume.GetHeight())
+/*N*/ aTex.X() = (aPoly.Y() - aVolume.MinVec().Y()) / aVolume.GetHeight();
+/*N*/ else
+/*N*/ aTex.X() = 0.0;
+/*N*/
+/*N*/ if(aVolume.GetDepth())
+/*N*/ aTex.Y() = (aPoly.Z() - aVolume.MinVec().Z()) / aVolume.GetDepth();
+/*N*/ else
+/*N*/ aTex.Y() = 0.0;
+/*N*/ break;
+/*N*/
+/*N*/ case 1: // Quelle ist X,Z
+/*N*/ if(aVolume.GetWidth())
+/*N*/ aTex.X() = (aPoly.X() - aVolume.MinVec().X()) / aVolume.GetWidth();
+/*N*/ else
+/*N*/ aTex.X() = 0.0;
+/*N*/
+/*N*/ if(aVolume.GetDepth())
+/*N*/ aTex.Y() = (aPoly.Z() - aVolume.MinVec().Z()) / aVolume.GetDepth();
+/*N*/ else
+/*N*/ aTex.Y() = 0.0;
+/*N*/ break;
+/*N*/
+/*N*/ case 2: // Quelle ist X,Y
+/*N*/ if(aVolume.GetWidth())
+/*N*/ aTex.X() = (aPoly.X() - aVolume.MinVec().X()) / aVolume.GetWidth();
+/*N*/ else
+/*N*/ aTex.X() = 0.0;
+/*N*/
+/*N*/ if(aVolume.GetHeight())
+/*N*/ aTex.Y() = (aPoly.Y() - aVolume.MinVec().Y()) / aVolume.GetHeight();
+/*N*/ else
+/*N*/ aTex.Y() = 0.0;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Neues Polygon in PolyPolygon einfuegen
+/*N*/ aPolyTexture.Insert(aTexture);
+/*N*/ }
+/*N*/
+/*N*/ // Default-Texturkoordinaten setzen
+/*N*/ SetPolyTexture3D(aPolyTexture);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolygonObj::~E3dPolygonObj()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dPolygonObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_POLYGONOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Polygon setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolygonObj::SetPolyPolygon3D(const PolyPolygon3D& rNewPolyPoly3D)
+/*N*/ {
+/*N*/ if ( aPolyPoly3D != rNewPolyPoly3D )
+/*N*/ {
+/*N*/ // Neues PolyPolygon; kopieren
+/*N*/ aPolyPoly3D = rNewPolyPoly3D;
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dPolygonObj::SetPolyNormals3D(const PolyPolygon3D& rNewPolyNormals3D)
+/*N*/ {
+/*N*/ if ( aPolyNormals3D != rNewPolyNormals3D )
+/*N*/ {
+/*N*/ // Neue Normalen; kopieren
+/*N*/ aPolyNormals3D = rNewPolyNormals3D;
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dPolygonObj::SetPolyTexture3D(const PolyPolygon3D& rNewPolyTexture3D)
+/*N*/ {
+/*N*/ if ( aPolyTexture3D != rNewPolyTexture3D )
+/*N*/ {
+/*N*/ // Neue Texturkoordinaten; kopieren
+/*N*/ aPolyTexture3D = rNewPolyTexture3D;
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ bGeometryValid = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus 6 Polygonen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Give out simple line geometry
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolygonObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::WriteData(rOut);
+/*N*/
+/*N*/ E3dIOCompat aCompat(rOut, STREAM_WRITE, 1);
+/*N*/ rOut << BOOL(bLineOnly);
+/*N*/
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry();
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolygonObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ if(AreBytesLeft())
+/*N*/ {
+/*N*/ E3dIOCompat aIoCompat(rIn, STREAM_READ);
+/*N*/ if(aIoCompat.GetVersion() >= 1)
+/*N*/ {
+/*N*/ rIn >> bLineOnly;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Geometrie neu erzeugen, mit oder ohne E3dPolyObj's
+/*N*/ ReCreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* LineOnly setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolygonObj::SetLineOnly(BOOL bNew)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_polyob3d.cxx b/binfilter/bf_svx/source/engine3d/svx_polyob3d.cxx
new file mode 100644
index 000000000000..32581bcf4886
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_polyob3d.cxx
@@ -0,0 +1,666 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+
+#include "svdstr.hrc"
+
+#ifndef _INC_FLOAT
+#include <float.h>
+#endif
+
+#include "svdopath.hxx"
+
+
+
+
+
+#include "svdio.hxx"
+
+
+// FG: wegen der DEBUG-Ausgabe in Dateien (temporaer)
+#ifndef _INC_STDIO
+#include <stdio.h>
+#endif
+
+#include "globl3d.hxx"
+
+#include "polyob3d.hxx"
+
+#include "polysc3d.hxx"
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dPolyObj, E3dObject);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolyObj::E3dPolyObj(const PolyPolygon3D& rPolyPoly3D, FASTBOOL bDblSided,
+/*N*/ FASTBOOL bLight) :
+/*N*/ bDoubleSided(bDblSided),
+/*N*/ bBackSideVisible(FALSE),
+/*N*/ bLighted(bLight),
+/*N*/ bOwnAttrs (FALSE),
+/*N*/ bOwnStyle (FALSE),
+/*N*/ nObjectnumber (-1) // FG: 0 waere eine gueltige Objektnummer, naemlich die erste!
+/*N*/ {
+/*N*/ SetPolyPolygon3D(rPolyPoly3D);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*?*/ E3dPolyObj::E3dPolyObj(const PolyPolygon3D& rPolyPoly3D,
+/*?*/ const PolyPolygon3D& rPolyNormals3D, FASTBOOL bDblSided,
+/*?*/ FASTBOOL bLight) :
+/*?*/ bDoubleSided(bDblSided),
+/*?*/ bBackSideVisible(FALSE),
+/*?*/ bLighted(bLight),
+/*?*/ bOwnAttrs (FALSE),
+/*?*/ bOwnStyle (FALSE),
+/*?*/ nObjectnumber (-1) // FG: 0 waere eine gueltige Objektnummer, naemlich die erste!
+/*?*/ {
+/*?*/ SetPolyPolygon3D(rPolyPoly3D);
+/*?*/ SetPolyNormals3D(rPolyNormals3D);
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolyObj::E3dPolyObj(const PolyPolygon3D& rPolyPoly3D,
+/*N*/ const PolyPolygon3D& rPolyNormals3D,
+/*N*/ const PolyPolygon3D& rPolyTexture3D,
+/*N*/ FASTBOOL bDblSided,
+/*N*/ FASTBOOL bLight) :
+/*N*/ bDoubleSided(bDblSided),
+/*N*/ bBackSideVisible(FALSE),
+/*N*/ bLighted(bLight),
+/*N*/ bOwnAttrs (FALSE),
+/*N*/ bOwnStyle (FALSE),
+/*N*/ nObjectnumber (-1) // FG: 0 waere eine gueltige Objektnummer, naemlich die erste!
+/*N*/ {
+/*N*/ SetPolyPolygon3D(rPolyPoly3D);
+/*N*/ SetPolyNormals3D(rPolyNormals3D);
+/*N*/ SetPolyTexture3D(rPolyTexture3D);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Linien-Konstruktor
+|*
+\************************************************************************/
+
+/*?*/ E3dPolyObj::E3dPolyObj(const Vector3D& rP1, const Vector3D& rP2) :
+/*?*/ aPolyPoly3D(1),
+/*?*/ bDoubleSided(TRUE),
+/*?*/ bBackSideVisible(FALSE),
+/*?*/ bLighted(FALSE),
+/*?*/ bOwnAttrs (FALSE),
+/*?*/ bOwnStyle (FALSE),
+/*?*/ nObjectnumber (-1) // FG: 0 waere eine gueltige Objektnummer, naemlich die erste!
+/*?*/ {
+/*?*/ Polygon3D aPoly3D(2);
+/*?*/ aPoly3D[0] = rP1;
+/*?*/ aPoly3D[1] = rP2;
+/*?*/ aPolyPoly3D.Insert(aPoly3D);
+/*?*/ aLocalBoundVol.Union(rP1);
+/*?*/ aLocalBoundVol.Union(rP2);
+/*?*/ RecalcBoundVolume();
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolyObj::E3dPolyObj() :
+/*N*/ bDoubleSided(FALSE),
+/*N*/ bBackSideVisible(FALSE),
+/*N*/ bLighted(FALSE),
+/*N*/ bOwnAttrs (FALSE),
+/*N*/ bOwnStyle (FALSE),
+/*N*/ nObjectnumber (-1) // FG: 0 waere eine gueltige Objektnummer, naemlich die erste!
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dPolyObj::~E3dPolyObj()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dPolyObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_POLYOBJ_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Polygon setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::SetPolyPolygon3D(const PolyPolygon3D& rNewPolyPoly3D)
+/*N*/ {
+/*N*/ if ( aPolyPoly3D != rNewPolyPoly3D )
+/*N*/ {
+/*N*/ // Neues PolyPolygon; kopieren
+/*N*/ aPolyPoly3D = rNewPolyPoly3D;
+/*N*/
+/*N*/ // Normale berechnen und BoundVol fuellen
+/*N*/ aLocalBoundVol = Volume3D();
+/*N*/ aNormal = aPolyPoly3D.GetNormal();
+/*N*/
+/*N*/ // Teilpolygone einbeziehen
+/*N*/ for ( USHORT nPoly = 0; nPoly < aPolyPoly3D.Count(); nPoly++ )
+/*N*/ for ( USHORT i = 0; i < aPolyPoly3D[nPoly].GetPointCount(); i++ )
+/*N*/ aLocalBoundVol.Union(aPolyPoly3D[nPoly][i]);
+/*N*/
+/*N*/ bBoundVolValid = FALSE;
+/*N*/ StructureChanged(this);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dPolyObj::SetPolyNormals3D(const PolyPolygon3D& rNewPolyNormals3D)
+/*N*/ {
+/*N*/ if ( aPolyNormals3D != rNewPolyNormals3D )
+/*N*/ {
+/*N*/ // Neue Normalen; kopieren
+/*N*/ aPolyNormals3D = rNewPolyNormals3D;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dPolyObj::SetPolyTexture3D(const PolyPolygon3D& rNewPolyTexture3D)
+/*N*/ {
+/*N*/ if ( aPolyTexture3D != rNewPolyTexture3D )
+/*N*/ {
+/*N*/ // Neue Texturkoordinaten; kopieren
+/*N*/ aPolyTexture3D = rNewPolyTexture3D;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get BoundRect of Object
+|*
+\************************************************************************/
+
+/*N*/ const Rectangle& E3dPolyObj::GetBoundRect() const
+/*N*/ {
+/*N*/ return E3dObject::GetBoundRect();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* sichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::WriteData31(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ E3dObject::WriteData(rOut);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dPolyObj");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aPolyPoly3D;
+/*N*/ rOut << aNormal;
+/*N*/ rOut << BOOL(bDoubleSided);
+/*N*/ rOut << BOOL(bBackSideVisible);
+/*N*/ rOut << BOOL(bLighted);
+/*N*/
+/*N*/ rOut << (UINT32) bOwnAttrs;
+/*N*/ rOut << (UINT32) bOwnStyle;
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* sichern: zur 356 wurde das Fileformat freigegeben 11.2.1997 FG
+|*
+/*************************************************************************/
+
+/*N*/ void E3dPolyObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (rOut.GetVersion() < 3560) // FG: Zu dieser Version erfolgte die Umstellung
+/*N*/ {
+/*N*/ WriteData31(rOut);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dPolyObj");
+/*N*/ #endif
+/*N*/ {
+/*N*/ SdrDownCompat aCompat (rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("PolyPolygon3D");
+/*N*/ #endif
+/*N*/ rOut << aPolyPoly3D;
+/*N*/ }
+/*N*/ {
+/*N*/ SdrDownCompat aCompat (rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("PolyPolygon3D");
+/*N*/ #endif
+/*N*/ rOut << aNormal;
+/*N*/ }
+/*N*/ rOut << BOOL(bDoubleSided);
+/*N*/ rOut << BOOL(bBackSideVisible);
+/*N*/ rOut << BOOL(bLighted);
+/*N*/
+/*N*/ rOut << (UINT32) bOwnAttrs;
+/*N*/ rOut << (UINT32) bOwnStyle;
+/*N*/ rOut << (UINT32) nObjectnumber;
+/*N*/ // Falls das Objekt eigene Attribute hat, wird es rausgeschrieben
+/*N*/
+/*N*/ if (OwnAttrs() || OwnStyle())
+/*N*/ {
+/*N*/ E3dObject::WriteData(rOut);
+/*N*/ }
+/*N*/
+/*N*/ // Neue PolyPolygone schreiben fuer Normalen und Textur
+/*N*/ if(aPolyNormals3D.Count())
+/*N*/ {
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("PolyPolygon3D Normals");
+/*N*/ #endif
+/*N*/ rOut << aPolyNormals3D;
+/*N*/ }
+/*N*/ if(aPolyTexture3D.Count())
+/*N*/ {
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("PolyPolygon3D Texturkoordinaten");
+/*N*/ #endif
+/*N*/ rOut << aPolyTexture3D;
+/*N*/ }
+/*N*/ }
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ }
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::ReadData31(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ E3dObject::ReadData(rHead, rIn);
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dPolyObj");
+/*N*/ #endif
+/*N*/
+/*N*/ BOOL bTmp;
+/*N*/ UINT32 nTmp;
+/*N*/
+/*N*/ // wieviele Bytes werden fuer das Polygon gelesen ?
+/*N*/ long nFilePositionBefore = rIn.Tell ();
+/*N*/ rIn >> aPolyPoly3D;
+/*N*/ long nFilePositionAfter = rIn.Tell ();
+/*N*/
+/*N*/ // wenn anschliessend noch mehr Member gestreamt werden, so muss (!!!!) die
+/*N*/ // folgende Anzahl der Bytes angepasst werden, ansonsten geht das Lesen wieder
+/*N*/ // daneben !
+/*N*/ // Diese Werte werden weiter unten eingelesen.
+/*N*/ long nBytesToRead = sizeof (aNormal) + sizeof (bTmp) * 3 + sizeof (nTmp) * 2;
+/*N*/
+/*N*/ // wieviele Bytes wuerden denn nun gelesen werden ?
+/*N*/ // es kommen noch 4 Bytes hinzu, die vom SdrDownCompat fuer die Laenge belegt werden
+/*N*/ long nWouldRead = nFilePositionAfter - nFilePositionBefore + nBytesToRead + 4;
+/*N*/
+/*N*/ // und um wieviele liegen wir daneben ?
+/*N*/ long nBytesWrong = nWouldRead - aCompat.GetSubRecordSize();
+/*N*/
+/*N*/ // hoffentlich alles ok, sonst korrigiere die Fileposition
+/*N*/ if (nBytesWrong)
+/*N*/ {
+/*N*/ rIn.Seek (nFilePositionAfter - nBytesWrong);
+/*N*/ }
+/*N*/
+/*N*/ // so, jetzt kann der Rest unbeschadet gelesen werden.
+/*N*/ // aus den hier gelesenen Werten muss die Groesse nBytesToRead bestimmt werden.
+/*N*/ rIn >> aNormal;
+/*N*/ rIn >> bTmp; bDoubleSided = bTmp;
+/*N*/ rIn >> bTmp; bBackSideVisible = bTmp;
+/*N*/ rIn >> bTmp; bLighted = bTmp;
+/*N*/
+/*N*/ // Temporaer: Anzahl der Dreiecke aus der Triangulation
+/*N*/ rIn >> nTmp; bOwnAttrs = (BOOL) nTmp;
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft () == sizeof (UINT32)) rIn >> nTmp; bOwnStyle = (BOOL) nTmp;
+/*N*/
+/*N*/ SetPolyPolygon3D(aPolyPoly3D);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if ( rIn.GetError() != SVSTREAM_OK )
+/*N*/ return;
+/*N*/
+/*N*/ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+/*N*/ {
+/*N*/ ReadData31(rHead, rIn);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ BOOL bTmp;
+/*N*/ UINT32 nTmp;
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dPolyObj");
+/*N*/ #endif
+/*N*/
+/*N*/ {
+/*N*/ SdrDownCompat aCompatPolyPolygon (rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompatPolyPolygon.SetID("PolyPolygon3D");
+/*N*/ #endif
+/*N*/ rIn >> aPolyPoly3D;
+/*N*/ }
+/*N*/ {
+/*N*/ SdrDownCompat aCompatPolyPolygon (rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompatPolyPolygon.SetID("PolyPolygon3D");
+/*N*/ #endif
+/*N*/ rIn >> aNormal;
+/*N*/ }
+/*N*/
+/*N*/ rIn >> bTmp; bDoubleSided = bTmp;
+/*N*/ rIn >> bTmp; bBackSideVisible = bTmp;
+/*N*/ rIn >> bTmp; bLighted = bTmp;
+/*N*/
+/*N*/ // Temporaer: Anzahl der Dreiecke aus der Triangulation
+/*N*/ rIn >> nTmp; bOwnAttrs = (BOOL) nTmp;
+/*N*/ rIn >> nTmp; bOwnStyle = (BOOL) nTmp;
+/*N*/ rIn >> nObjectnumber;
+/*N*/
+/*N*/ // Nur falls das Objekt eigene Attribute oder einen eigenen
+/*N*/ // Stil besitzt wird es gelesen.
+/*N*/
+/*N*/ if (OwnAttrs() || OwnStyle())
+/*N*/ {
+/*N*/ E3dObject::ReadData(rHead, rIn);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // FG: Achtung fuer jedes 3d-Objekt muss eine Subliste existieren, auch wenn
+/*N*/ // sie keinen Eintrag hat, viele Programmstellen (GetBoundRect) fragen nicht
+/*N*/ // ab ob dieser Pointer NULL ist.
+/*N*/ pSub = new E3dObjList(NULL, NULL);
+/*N*/ pSub->SetOwnerObj(this);
+/*N*/ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+/*N*/ }
+/*N*/
+/*N*/ if(aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Normalen lesen
+/*N*/ rIn >> aPolyNormals3D;
+/*N*/ SetPolyNormals3D(aPolyNormals3D);
+/*N*/ }
+/*N*/
+/*N*/ if(aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Texturen lesen
+/*N*/ rIn >> aPolyTexture3D;
+/*N*/ SetPolyTexture3D(aPolyTexture3D);
+/*N*/ }
+/*N*/
+/*N*/ SetPolyPolygon3D(aPolyPoly3D);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Polygon.
+|* Es ist nur ein Displayobjekt vorhanden, welches ein (!) Polygon darstellt
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* erstelle neues GeoData-Objekt
+|*
+\************************************************************************/
+
+/*N*/ SdrObjGeoData *E3dPolyObj::NewGeoData() const
+/*N*/ {
+/*N*/ DBG_ASSERT(GetParentObj(), "3D-Polygone ohne Parent ?");
+/*N*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*N*/
+/*N*/ if (GetParentObj()->ISA (E3dObject))
+/*N*/ return GetParentObj()->E3dObject::NewGeoData ();
+/*N*/ else
+/*N*/ return E3dObject::NewGeoData ();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* uebergebe aktuelle werte an das GeoData-Objekt
+|*
+\************************************************************************/
+
+/*?*/ void E3dPolyObj::SaveGeoData(SdrObjGeoData& rGeo) const
+/*?*/ {
+/*?*/ DBG_ASSERT(GetParentObj(), "3D-Polygone ohne Parent ?");
+/*?*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*?*/
+/*?*/ if (GetParentObj()->ISA (E3dObject))
+/*?*/ GetParentObj()->E3dObject::SaveGeoData (rGeo);
+/*?*/ else
+/*?*/ E3dObject::SaveGeoData (rGeo);
+/*?*/ }
+
+/*************************************************************************
+|*
+|* uebernehme werte aus dem GeoData-Objekt
+|*
+\************************************************************************/
+
+/*?*/ void E3dPolyObj::RestGeoData(const SdrObjGeoData& rGeo)
+/*?*/ {
+/*?*/ DBG_ASSERT(GetParentObj(), "3D-Polygone ohne Parent ?");
+/*?*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*?*/
+/*?*/ if (GetParentObj()->ISA (E3dObject))
+/*?*/ GetParentObj()->E3dObject::RestGeoData (rGeo);
+/*?*/ else
+/*?*/ E3dObject::RestGeoData (rGeo);
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Page neu setzen. Normalerweise geht die Page an das Oberobjekt, wenn
+|* dieses Objekt von einer Factory erzeugt wurde, existiert noch kein
+|* Parent, also wird die Page selbst gesetzt.
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ if (GetParentObj())
+/*N*/ {
+/*N*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*N*/
+/*N*/ if (GetParentObj()->ISA (E3dObject))
+/*N*/ GetParentObj()->E3dObject::SetPage (pNewPage);
+/*N*/ SdrAttrObj::SetPage(pNewPage);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pPage = pNewPage;
+/*N*/ if (pPage)
+/*N*/ pModel = pPage->GetModel ();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrAttrObj::SetModel(pNewModel);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Layer abfragen. Da alle Unterobjekte auf demselben Layer liegen
+|* gibt es keinerlei Probleme
+|*
+\************************************************************************/
+
+/*?*/ SdrLayerID E3dPolyObj::GetLayer() const
+/*?*/ {
+/*?*/ DBG_ASSERT(GetParentObj(), "3D-Polygone ohne Parent ?");
+/*?*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*?*/
+/*?*/ if (GetParentObj()->ISA (E3dObject))
+/*?*/ return GetParentObj()->E3dObject::GetLayer ();
+/*?*/ else
+/*?*/ return SdrLayerID(nLayerID);
+/*?*/ }
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dPolyObj::NbcSetLayer(SdrLayerID nLayer)
+/*N*/ {
+/*N*/ DBG_ASSERT(GetParentObj(), "3D-Polygone ohne Parent ?");
+/*N*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*N*/
+/*N*/ if (GetParentObj()->ISA (E3dObject))
+/*N*/ GetParentObj()->SdrAttrObj::NbcSetLayer (nLayer);
+/*N*/ SdrAttrObj::NbcSetLayer(nLayer);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* StyleSheet abfragen
+|*
+\************************************************************************/
+
+/*N*/ SfxStyleSheet* E3dPolyObj::GetStyleSheet() const
+/*N*/ {
+/*N*/ DBG_ASSERT(GetParentObj(), "3D-Polygone ohne Parent ?");
+/*N*/ DBG_ASSERT(GetParentObj()->ISA(E3dScene) || GetParentObj()->ISA(E3dObject), "Parent eines 3D-Polygons ungültig");
+/*N*/
+/*N*/ if (bOwnStyle)
+/*N*/ return SdrAttrObj::GetStyleSheet();
+/*N*/ else
+/*N*/ return GetParentObj()->E3dObject::GetStyleSheet ();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* StyleSheet setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Bestimme die Anzahl der Punkte
+|*
+\************************************************************************/
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_polysc3d.cxx b/binfilter/bf_svx/source/engine3d/svx_polysc3d.cxx
new file mode 100644
index 000000000000..c36e2d1aa8ff
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_polysc3d.cxx
@@ -0,0 +1,135 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "xdef.hxx"
+
+
+
+
+
+
+
+
+
+
+
+
+#include "globl3d.hxx"
+
+#include "polysc3d.hxx"
+
+
+
+
+
+
+
+
+namespace binfilter {
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+/*N*/ TYPEINIT1(E3dPolyScene, E3dScene);
+
+/*N*/ E3dPolyScene::E3dPolyScene()
+/*N*/ : E3dScene()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dPolyScene::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return E3D_POLYSCENE_ID;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Die Kontur fuer TextToContour
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Objekt als Kontur in das Polygon einfuegen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Paint
+|*
+\************************************************************************/
+
+/*N*/ FASTBOOL E3dPolyScene::Paint(ExtOutputDevice& rOut,
+/*N*/ const SdrPaintInfoRec& rInfoRec) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* Geometrie zeichnen mit clipping Beruecksichtigung
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Zeichenroutine fuer 3D
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Schatten aller Objekte zeichnen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Verminderte Darstellungsqualitaet, zeichne als WireFrame OHNE renderer
+|*
+\************************************************************************/
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx b/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx
new file mode 100644
index 000000000000..6bb2090c2ef6
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx
@@ -0,0 +1,1447 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+#include "svdstr.hrc"
+
+#include "svditer.hxx"
+
+#include "svdio.hxx"
+
+#if defined( UNX ) || defined( ICC )
+#include <stdlib.h>
+#endif
+
+#include <bf_svtools/style.hxx>
+
+#include "plight3d.hxx"
+
+#include "dlight3d.hxx"
+
+#include "svdtrans.hxx"
+
+#include "svxids.hrc"
+
+#include <bf_svtools/whiter.hxx>
+
+#include "scene3d.hxx"
+
+namespace binfilter {
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+/*N*/ TYPEINIT1(E3dScene, E3dObject);
+
+/*************************************************************************
+|*
+|* E3dScene-Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dScene::E3dScene()
+/*N*/ : E3dObject(),
+/*N*/ aCamera(Vector3D(0,0,4), Vector3D()),
+/*N*/ bDoubleBuffered(FALSE),
+/*N*/ bClipping(FALSE),
+/*N*/ nSaveStatus (0),
+/*N*/ nRestStatus (0),
+/*N*/ bFitInSnapRect(TRUE),
+/*N*/ aPaintTime(),
+/*N*/ nDisplayQuality(255),
+/*N*/ bDrawOnlySelected(FALSE)
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ E3dDefaultAttributes aDefault;
+/*N*/ SetDefaultAttributes(aDefault);
+/*N*/ }
+
+/*N*/ void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+/*N*/ {
+/*N*/ // Fuer OS/2 die FP-Exceptions abschalten
+/*N*/ #if defined(OS2)
+/*N*/ #define SC_FPEXCEPTIONS_ON() _control87( MCW_EM, 0 )
+/*N*/ #define SC_FPEXCEPTIONS_OFF() _control87( MCW_EM, MCW_EM )
+/*N*/ SC_FPEXCEPTIONS_OFF();
+/*N*/ #endif
+/*N*/
+/*N*/ // Fuer WIN95/NT die FP-Exceptions abschalten
+/*N*/ #if defined(WNT) || defined(WIN)
+/*N*/ #define SC_FPEXCEPTIONS_ON() _control87( _MCW_EM, 0 )
+/*N*/ #define SC_FPEXCEPTIONS_OFF() _control87( _MCW_EM, _MCW_EM )
+/*N*/ SC_FPEXCEPTIONS_OFF();
+/*N*/ #endif
+/*N*/
+/*N*/ // Defaults setzen
+/*N*/
+/*N*/ // set defaults for LightGroup from ItemPool
+/*N*/ aLightGroup.SetModelTwoSide(GetTwoSidedLighting());
+/*N*/ aLightGroup.SetIntensity( GetLightColor1(), Base3DMaterialDiffuse, Base3DLight0);
+/*N*/ aLightGroup.SetIntensity( GetLightColor2(), Base3DMaterialDiffuse, Base3DLight1);
+/*N*/ aLightGroup.SetIntensity( GetLightColor3(), Base3DMaterialDiffuse, Base3DLight2);
+/*N*/ aLightGroup.SetIntensity( GetLightColor4(), Base3DMaterialDiffuse, Base3DLight3);
+/*N*/ aLightGroup.SetIntensity( GetLightColor5(), Base3DMaterialDiffuse, Base3DLight4);
+/*N*/ aLightGroup.SetIntensity( GetLightColor6(), Base3DMaterialDiffuse, Base3DLight5);
+/*N*/ aLightGroup.SetIntensity( GetLightColor7(), Base3DMaterialDiffuse, Base3DLight6);
+/*N*/ aLightGroup.SetIntensity( GetLightColor8(), Base3DMaterialDiffuse, Base3DLight7);
+/*N*/ aLightGroup.SetGlobalAmbientLight(GetGlobalAmbientColor());
+/*N*/ aLightGroup.Enable( GetLightOnOff1(), Base3DLight0);
+/*N*/ aLightGroup.Enable( GetLightOnOff2(), Base3DLight1);
+/*N*/ aLightGroup.Enable( GetLightOnOff3(), Base3DLight2);
+/*N*/ aLightGroup.Enable( GetLightOnOff4(), Base3DLight3);
+/*N*/ aLightGroup.Enable( GetLightOnOff5(), Base3DLight4);
+/*N*/ aLightGroup.Enable( GetLightOnOff6(), Base3DLight5);
+/*N*/ aLightGroup.Enable( GetLightOnOff7(), Base3DLight6);
+/*N*/ aLightGroup.Enable( GetLightOnOff8(), Base3DLight7);
+/*N*/ aLightGroup.SetDirection( GetLightDirection1(), Base3DLight0);
+/*N*/ aLightGroup.SetDirection( GetLightDirection2(), Base3DLight1);
+/*N*/ aLightGroup.SetDirection( GetLightDirection3(), Base3DLight2);
+/*N*/ aLightGroup.SetDirection( GetLightDirection4(), Base3DLight3);
+/*N*/ aLightGroup.SetDirection( GetLightDirection5(), Base3DLight4);
+/*N*/ aLightGroup.SetDirection( GetLightDirection6(), Base3DLight5);
+/*N*/ aLightGroup.SetDirection( GetLightDirection7(), Base3DLight6);
+/*N*/ aLightGroup.SetDirection( GetLightDirection8(), Base3DLight7);
+/*N*/
+/*N*/ bDither = rDefault.GetDefaultDither();
+/*N*/
+/*N*/ // Alte Werte initialisieren
+/*N*/ aCamera.SetViewWindow(-2, -2, 4, 4);
+/*N*/ aCameraSet.SetDeviceRectangle(-2, 2, -2, 2);
+/*N*/ aCamera.SetDeviceWindow(Rectangle(0, 0, 10, 10));
+/*N*/ Rectangle aRect(0, 0, 10, 10);
+/*N*/ aCameraSet.SetViewportRectangle(aRect);
+/*N*/ nSortingMode = E3D_SORT_FAST_SORTING | E3D_SORT_IN_PARENTS | E3D_SORT_TEST_LENGTH;
+/*N*/
+/*N*/ // set defaults for Camera from ItemPool
+/*N*/ aCamera.SetProjection(GetPerspective());
+/*N*/ Vector3D aActualPosition = aCamera.GetPosition();
+/*N*/ double fNew = GetDistance();
+/*N*/ if(fabs(fNew - aActualPosition.Z()) > 1.0)
+/*N*/ aCamera.SetPosition( Vector3D( aActualPosition.X(), aActualPosition.Y(), fNew) );
+/*N*/ fNew = GetFocalLength() / 100.0;
+/*N*/ aCamera.SetFocalLength(fNew);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dScene::~E3dScene()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetSnapRect
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SetRectsDirty();
+/*N*/ E3dObject::NbcSetSnapRect(rRect);
+/*N*/ aCamera.SetDeviceWindow(rRect);
+/*N*/ aCameraSet.SetViewportRectangle((Rectangle&)rRect);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objekt Resizen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::NbcResize(const Point& rRef, const Fraction& rXFact,
+/*N*/ const Fraction& rYFact)
+/*N*/ {
+/*N*/ Rectangle aNewSnapRect = GetSnapRect();
+/*N*/ ResizeRect(aNewSnapRect, rRef, rXFact, rYFact);
+/*N*/ NbcSetSnapRect(aNewSnapRect);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Neue Kamera setzen, und dabei die Szene und ggf. das BoundVolume
+|* als geaendert markieren
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::SetCamera(const Camera3D& rNewCamera)
+/*N*/ {
+/*N*/ // Alte Kamera setzen
+/*N*/ aCamera = rNewCamera;
+/*N*/ ImpSetSceneItemsFromCamera();
+/*N*/ SetRectsDirty();
+/*N*/
+/*N*/ // Neue Kamera aus alter fuellen
+/*N*/ Camera3D& rCam = (Camera3D&)GetCamera();
+/*N*/
+/*N*/ // Ratio abschalten
+/*N*/ if(rCam.GetAspectMapping() == AS_NO_MAPPING)
+/*N*/ GetCameraSet().SetRatio(0.0);
+/*N*/
+/*N*/ // Abbildungsgeometrie setzen
+/*N*/ Vector3D aVRP = rCam.GetViewPoint();
+/*N*/ Vector3D aVPN = aVRP - rCam.GetVRP();
+/*N*/ Vector3D aVUV = rCam.GetVUV();
+/*N*/
+/*N*/ // #91047# use SetViewportValues() to set VRP, VPN and VUV as vectors, too.
+/*N*/ // Else these values would not be exported/imported correctly.
+/*N*/ //GetCameraSet().SetOrientation(aVRP, aVPN, aVUV);
+/*N*/ GetCameraSet().SetViewportValues(aVRP, aVPN, aVUV);
+/*N*/
+/*N*/ // Perspektive setzen
+/*N*/ GetCameraSet().SetPerspective(rCam.GetProjection() == PR_PERSPECTIVE);
+/*N*/ GetCameraSet().SetViewportRectangle((Rectangle&)rCam.GetDeviceWindow());
+/*N*/
+/*N*/ // E3dLabel-Objekte muessen neu an die Projektion angepasst werden
+/*N*/ if ( aLabelList.Count() > 0 )
+/*N*/ {
+/*N*/ SetBoundVolInvalid();
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 3D-Objekt einfuegen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::NewObjectInserted(const E3dObject* p3DObj)
+/*N*/ {
+/*N*/ E3dObject::NewObjectInserted(p3DObj);
+/*N*/
+/*N*/ if ( p3DObj == this )
+/*N*/ return;
+/*N*/
+/*N*/ if ( p3DObj->ISA(E3dLabelObj) )
+/*N*/ {
+/*N*/ aLabelList.Insert((E3dLabelObj*) p3DObj, LIST_APPEND);
+/*N*/ }
+/*N*/
+/*N*/ // falls Unterobjekte vorhanden sind, auch diese pruefen
+/*N*/ if ( p3DObj->IsGroupObject() )
+/*N*/ {
+/*N*/ SdrObjListIter a3DIterator(*p3DObj, IM_DEEPWITHGROUPS);
+/*N*/
+/*N*/ while ( a3DIterator.IsMore() )
+/*N*/ {
+/*N*/ SdrObject* pObj = a3DIterator.Next();
+/*N*/
+/*N*/ if ( pObj->ISA(E3dLabelObj) )
+/*N*/ {
+/*N*/ aLabelList.Insert((E3dLabelObj*) pObj, LIST_APPEND);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Parent ueber Aenderung eines Childs informieren
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::StructureChanged(const E3dObject* p3DObj)
+/*N*/ {
+/*N*/ E3dObject::StructureChanged(p3DObj);
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Einpassen der Projektion aller Szenenobjekte in das
+|* umschliessende Rechteck
+|*
+\************************************************************************/
+
+/*N*/ Volume3D E3dScene::FitInSnapRect()
+/*N*/ {
+/*N*/ // Alter Kram
+/*N*/ Matrix4D aFullTrans = GetFullTransform();
+/*N*/ aCamera.FitViewToVolume(GetBoundVolume(), aFullTrans);
+/*N*/
+/*N*/ // Neuer Kram
+/*N*/ // Maximas holen in Augkoordinaten zwecks Z-Werten
+/*N*/ Volume3D aNewVol;
+/*N*/ Vector3D aTfVec;
+/*N*/ Vol3DPointIterator aIter(GetBoundVolume());
+/*N*/
+/*N*/ GetCameraSet().SetObjectTrans(aFullTrans);
+/*N*/ while ( aIter.Next(aTfVec) )
+/*N*/ {
+/*N*/ aTfVec = GetCameraSet().ObjectToEyeCoor(aTfVec);
+/*N*/ aNewVol.Union(aTfVec);
+/*N*/ }
+/*N*/
+/*N*/ // ... und merken
+/*N*/ double fZMin = -aNewVol.MaxVec().Z();
+/*N*/ double fZMax = -aNewVol.MinVec().Z();
+/*N*/
+/*N*/ // Jetzt XY-Werte projizieren auf Projektionsflaeche
+/*N*/ // in Device-Koordinaten
+/*N*/ Matrix4D aWorldToDevice = GetCameraSet().GetOrientation();
+/*N*/ if(aCamera.GetProjection() == PR_PERSPECTIVE)
+/*N*/ aWorldToDevice.Frustum(-1.0, 1.0, -1.0, 1.0, fZMin, fZMax);
+/*N*/ else
+/*N*/ aWorldToDevice.Ortho(-1.0, 1.0, -1.0, 1.0, fZMin, fZMax);
+/*N*/ aNewVol.Reset();
+/*N*/ aIter.Reset();
+/*N*/ while ( aIter.Next(aTfVec) )
+/*N*/ {
+/*N*/ aTfVec = GetCameraSet().ObjectToWorldCoor(aTfVec);
+/*N*/ aTfVec *= aWorldToDevice;
+/*N*/ aNewVol.Union(aTfVec);
+/*N*/ }
+/*N*/
+/*N*/ // Labels behandeln
+/*N*/ ULONG nLabelCnt = aLabelList.Count();
+/*N*/ if ( nLabelCnt > 0 )
+/*N*/ {
+/*N*/ // Vorlaeufige Projektion bestimmen und Transformation in
+/*N*/ // ViewKoordinaten bestimmen
+/*N*/ Matrix4D aMatWorldToView = GetCameraSet().GetOrientation();
+/*N*/ if(aCamera.GetProjection() == PR_PERSPECTIVE)
+/*N*/ aMatWorldToView.Frustum(aNewVol.MinVec().X(), aNewVol.MaxVec().X(),
+/*N*/ aNewVol.MinVec().Y(), aNewVol.MaxVec().Y(), fZMin, fZMax);
+/*N*/ else
+/*N*/ aMatWorldToView.Ortho(aNewVol.MinVec().X(), aNewVol.MaxVec().X(),
+/*N*/ aNewVol.MinVec().Y(), aNewVol.MaxVec().Y(), fZMin, fZMax);
+/*N*/
+/*N*/ // Logische Abmessungen der Szene holen
+/*N*/ Rectangle aSceneRect = GetSnapRect();
+/*N*/
+/*N*/ // Matrix DeviceToView aufbauen
+/*N*/ Vector3D aTranslate, aScale;
+/*N*/
+/*N*/ aTranslate[0] = (double)aSceneRect.Left() + (aSceneRect.GetWidth() / 2.0);
+/*N*/ aTranslate[1] = (double)aSceneRect.Top() + (aSceneRect.GetHeight() / 2.0);
+/*N*/ aTranslate[2] = ZBUFFER_DEPTH_RANGE / 2.0;
+/*N*/
+/*N*/ // Skalierung
+/*N*/ aScale[0] = (aSceneRect.GetWidth() - 1) / 2.0;
+/*N*/ aScale[1] = (aSceneRect.GetHeight() - 1) / -2.0;
+/*N*/ aScale[2] = ZBUFFER_DEPTH_RANGE / 2.0;
+/*N*/
+/*N*/ aMatWorldToView.Scale(aScale);
+/*N*/ aMatWorldToView.Translate(aTranslate);
+/*N*/
+/*N*/ // Inverse Matrix ViewToDevice aufbauen
+/*N*/ Matrix4D aMatViewToWorld(aMatWorldToView);
+/*N*/ aMatViewToWorld.Invert();
+/*N*/
+/*N*/ for (ULONG i = 0; i < nLabelCnt; i++)
+/*N*/ {
+/*N*/ E3dLabelObj* p3DObj = aLabelList.GetObject(i);
+/*N*/ const SdrObject* pObj = p3DObj->Get2DLabelObj();
+/*N*/
+/*N*/ // View- Abmessungen des Labels holen
+/*N*/ const Rectangle& rObjRect = pObj->GetLogicRect();
+/*N*/
+/*N*/ // Position des Objektes in Weltkoordinaten ermitteln
+/*N*/ Matrix4D aObjTrans = p3DObj->GetFullTransform();
+/*N*/ Vector3D aObjPos = aObjTrans * p3DObj->GetPosition();
+/*N*/
+/*N*/ // View-Position des Objektes feststellen
+/*N*/ // nach ViewKoordinaten
+/*N*/ aObjPos *= aMatWorldToView;
+/*N*/
+/*N*/ // Relative Position des Labels in View-Koordinaten
+/*N*/ Vector3D aRelPosOne(pObj->GetRelativePos(), aObjPos.Z());
+/*N*/ aRelPosOne.X() += aObjPos.X();
+/*N*/ aRelPosOne.Y() += aObjPos.Y();
+/*N*/ Vector3D aRelPosTwo(aRelPosOne);
+/*N*/ aRelPosTwo.X() += rObjRect.GetWidth();
+/*N*/ aRelPosTwo.Y() += rObjRect.GetHeight();
+/*N*/
+/*N*/ // Jetzt Eckpunkte in DeviceKoordinaten bestimmen und
+/*N*/ // den Abmessungen hinzufuegen
+/*N*/ aRelPosOne *= aMatViewToWorld;
+/*N*/ aRelPosOne *= aWorldToDevice;
+/*N*/ aNewVol.Union(aRelPosOne);
+/*N*/
+/*N*/ aRelPosTwo *= aMatViewToWorld;
+/*N*/ aRelPosTwo *= aWorldToDevice;
+/*N*/ aNewVol.Union(aRelPosTwo);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Z-Werte eintragen
+/*N*/ aNewVol.MinVec().Z() = fZMin;
+/*N*/ aNewVol.MaxVec().Z() = fZMax;
+/*N*/
+/*N*/ // Rueckgabewert setzen
+/*N*/ return aNewVol;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Uebergeordnetes Szenenobjekt bestimmen
+|*
+\************************************************************************/
+
+/*N*/ E3dScene* E3dScene::GetScene() const
+/*N*/ {
+/*N*/ if(GetParentObj())
+/*N*/ return GetParentObj()->GetScene();
+/*N*/ else
+/*N*/ return (E3dScene*)this;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* TransformationSet vorbereiten
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::InitTransformationSet()
+/*N*/ {
+/*N*/ Rectangle aBound(GetSnapRect());
+/*N*/
+/*N*/ // GeometricSet reset und mit pBase3D assoziieren
+/*N*/ B3dCamera& rSet = GetCameraSet();
+/*N*/
+/*N*/ // Transformation auf Weltkoordinaten holen
+/*N*/ Matrix4D mTransform = GetFullTransform();
+/*N*/ rSet.SetObjectTrans(mTransform);
+/*N*/
+/*N*/ // 3D Ausgabe vorbereiten, Maximas holen in DeviceKoordinaten
+/*N*/ Volume3D aVolume = FitInSnapRect();
+/*N*/
+/*N*/ // Maximas fuer Abbildung verwenden
+/*N*/ rSet.SetDeviceVolume(aVolume, FALSE);
+/*N*/ rSet.SetViewportRectangle(aBound);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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.
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion < 3830)
+/*N*/ {
+/*N*/ // Hier die Lichtobjekte erzeugen, um im alten Format schreiben zu koennen
+/*N*/ ((E3dScene*)(this))->CreateLightObjectsFromLightGroup();
+/*N*/ }
+/*N*/
+/*N*/ // Schreiben
+/*N*/ E3dObject::WriteData(rOut);
+/*N*/
+/*N*/ if(nVersion < 3830)
+/*N*/ {
+/*N*/ // Lichtobjekte wieder wegnehmen
+/*N*/ ((E3dScene*)(this))->RemoveLightObjects();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ #ifdef E3D_STREAMING
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("B3dLightGroup");
+/*N*/ #endif
+/*N*/ // LightGroup schreiben
+/*N*/ aLightGroup.WriteData(rOut);
+/*N*/
+/*N*/ #endif
+/*N*/ }
+/*N*/
+/*N*/ #ifdef E3D_STREAMING
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dScene");
+/*N*/ #endif
+/*N*/
+/*N*/ DBG_ASSERT (rOut.GetVersion(),"3d-Engine: Keine Version am Stream gesetzt!");
+/*N*/ if (rOut.GetVersion() < 3560) // FG: Das ist der Zeitpunkt der Umstellung
+/*N*/ {
+/*N*/ rOut << aCamera;
+/*N*/ }
+/*N*/ if (rOut.GetVersion() >= 3560)
+/*N*/ {
+/*N*/ aCamera.WriteData(rOut);
+/*N*/ }
+/*N*/
+/*N*/ rOut << BOOL(bDoubleBuffered);
+/*N*/ rOut << BOOL(bClipping);
+/*N*/ rOut << BOOL(bFitInSnapRect);
+/*N*/ rOut << nSortingMode;
+/*N*/
+/*N*/ // neu ab 377:
+/*N*/ Vector3D aPlaneDirection = GetShadowPlaneDirection();
+/*N*/ rOut << aPlaneDirection;
+/*N*/
+/*N*/ // neu ab 383:
+/*N*/ rOut << (BOOL)bDither;
+/*N*/
+/*N*/ // neu ab 384:
+/*N*/ sal_uInt16 nShadeMode = GetShadeMode();
+/*N*/ if(nShadeMode == 0)
+/*N*/ rOut << (sal_uInt16)Base3DFlat;
+/*N*/ else if(nShadeMode == 1)
+/*N*/ rOut << (sal_uInt16)Base3DPhong;
+/*N*/ else
+/*N*/ rOut << (sal_uInt16)Base3DSmooth;
+/*N*/ rOut << (BOOL)(nShadeMode > 2);
+/*N*/
+/*N*/ #endif
+/*N*/ #endif // #ifndef SVX_LIGHT
+/*N*/ }
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ E3dObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ if(CountNumberOfLights())
+/*N*/ {
+/*N*/ // An dieser Stelle die gelesenen Lampen ausmerzen
+/*N*/ // und in die neue Struktur ueberfuehren
+/*N*/ FillLightGroup();
+/*N*/ RemoveLightObjects();
+/*N*/ }
+/*N*/ long nVersion = rIn.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion >= 3830)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("B3dLightGroup");
+/*N*/ #endif
+/*N*/ if(aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // LightGroup lesen
+/*N*/ aLightGroup.ReadData(rIn);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dScene");
+/*N*/ #endif
+/*N*/ BOOL bTmp;
+/*N*/
+/*N*/ DBG_ASSERT (rIn.GetVersion(),"3d-Engine: Keine Version am Stream gesetzt!");
+/*N*/
+/*N*/ if ((rIn.GetVersion() < 3560) || (rHead.GetVersion() <= 12))
+/*N*/ {
+/*N*/ rIn >> aCamera;
+/*N*/ }
+/*N*/ if ((rIn.GetVersion() >= 3560) && (rHead.GetVersion() >= 13))
+/*N*/ {
+/*N*/ aCamera.ReadData(rHead, rIn);
+/*N*/ }
+/*N*/
+/*N*/ // Neue Kamera aus alter fuellen
+/*N*/ Camera3D& rCam = (Camera3D&)GetCamera();
+/*N*/
+/*N*/ // Ratio abschalten
+/*N*/ if(rCam.GetAspectMapping() == AS_NO_MAPPING)
+/*N*/ GetCameraSet().SetRatio(0.0);
+/*N*/
+/*N*/ // Abbildungsgeometrie setzen
+/*N*/ Vector3D aVRP = rCam.GetViewPoint();
+/*N*/ Vector3D aVPN = aVRP - rCam.GetVRP();
+/*N*/ Vector3D aVUV = rCam.GetVUV();
+/*N*/ GetCameraSet().SetOrientation(aVRP, aVPN, aVUV);
+/*N*/
+/*N*/ // Perspektive setzen
+/*N*/ GetCameraSet().SetPerspective(rCam.GetProjection() == PR_PERSPECTIVE);
+/*N*/ GetCameraSet().SetViewportRectangle((Rectangle&)rCam.GetDeviceWindow());
+/*N*/
+/*N*/ rIn >> bTmp; bDoubleBuffered = bTmp;
+/*N*/ rIn >> bTmp; bClipping = bTmp;
+/*N*/ rIn >> bTmp; bFitInSnapRect = bTmp;
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft() >= sizeof(UINT32))
+/*N*/ {
+/*N*/ rIn >> nSortingMode;
+/*N*/ }
+/*N*/
+/*N*/ // neu ab 377:
+/*N*/ if (aCompat.GetBytesLeft() >= sizeof(Vector3D))
+/*N*/ {
+/*N*/ Vector3D aShadowVec;
+/*N*/ rIn >> aShadowVec;
+/*N*/ SetShadowPlaneDirection(aShadowVec);
+/*N*/ }
+/*N*/
+/*N*/ // neu ab 383:
+/*N*/ if (aCompat.GetBytesLeft() >= sizeof(BOOL))
+/*N*/ {
+/*N*/ rIn >> bTmp; bDither = bTmp;
+/*N*/ }
+/*N*/
+/*N*/ // neu ab 384:
+/*N*/ if (aCompat.GetBytesLeft() >= sizeof(UINT16))
+/*N*/ {
+/*N*/ UINT16 nTmp;
+/*N*/ rIn >> nTmp;
+/*N*/ if(nTmp == (Base3DShadeModel)Base3DFlat)
+/*N*/ mpObjectItemSet->Put(Svx3DShadeModeItem(0));
+/*N*/ else if(nTmp == (Base3DShadeModel)Base3DPhong)
+/*N*/ mpObjectItemSet->Put(Svx3DShadeModeItem(1));
+/*N*/ else
+/*N*/ mpObjectItemSet->Put(Svx3DShadeModeItem(2));
+/*N*/ }
+/*N*/ if (aCompat.GetBytesLeft() >= sizeof(BOOL))
+/*N*/ {
+/*N*/ rIn >> bTmp;
+/*N*/ if(bTmp)
+/*N*/ mpObjectItemSet->Put(Svx3DShadeModeItem(3));
+/*N*/ }
+/*N*/
+/*N*/ // SnapRects der Objekte ungueltig
+/*N*/ SetRectsDirty();
+/*N*/
+/*N*/ // Transformationen initialisieren, damit bei RecalcSnapRect()
+/*N*/ // richtig gerechnet wird
+/*N*/ InitTransformationSet();
+/*N*/
+/*N*/ RebuildLists();
+/*N*/
+/*N*/ // set items from combined read objects like lightgroup and camera
+/*N*/ ImpSetLightItemsFromLightGroup();
+/*N*/ ImpSetSceneItemsFromCamera();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Einpassen der Objekte in umschliessendes Rechteck aus-/einschalten
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::FitSnapRectToBoundVol()
+/*N*/ {
+/*N*/ Vector3D aTfVec;
+/*N*/ Volume3D aFitVol;
+/*N*/
+/*N*/ SetBoundVolInvalid();
+/*N*/ Matrix4D aTransform = GetFullTransform() * aCamera.GetViewTransform();
+/*N*/ Vol3DPointIterator aIter(GetBoundVolume(), &aTransform);
+/*N*/ Rectangle aRect;
+/*N*/
+/*N*/ while ( aIter.Next(aTfVec) )
+/*N*/ {
+/*N*/ aCamera.DoProjection(aTfVec);
+/*N*/ aFitVol.Union(aTfVec);
+/*N*/ Vector3D aZwi = aCamera.MapToDevice(aTfVec);
+/*N*/ Point aP((long)aZwi.X(), (long)aZwi.Y());
+/*N*/ aRect.Union(Rectangle(aP, aP));
+/*N*/ }
+/*N*/ aCamera.SetViewWindow(aFitVol.MinVec().X(), aFitVol.MinVec().Y(),
+/*N*/ aFitVol.GetWidth(), aFitVol.GetHeight());
+/*N*/ SetSnapRect(aRect);
+/*N*/
+/*N*/ // Die SnapRects aller beteiligten Objekte muessen auf dieser
+/*N*/ // veraenderten Basis aufgebaut werden, invalidiere diese. Das
+/*N*/ // eigene kann auch invalidiert werden, da ein RecalcSnapRect
+/*N*/ // an einer Szene nur aus der Kamera liest
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Falls die Geometrie einer Szene sich ausgedehnt/vermindert hat,
+|* muss das Volume und das SnapRect angepasst werden
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::CorrectSceneDimensions()
+/*N*/ {
+/*N*/ // SnapRects der Objekte ungueltig
+/*N*/ SetRectsDirty();
+/*N*/
+/*N*/ // SnapRect anpassen, invalidiert auch die SnapRects
+/*N*/ // der enthaltenen Objekte
+/*N*/ FitSnapRectToBoundVol();
+/*N*/
+/*N*/ // Neues BoundVolume der Kamera holen
+/*N*/ Volume3D aVolume = FitInSnapRect();
+/*N*/
+/*N*/ // Neues BoundVolume an der Kamera setzen
+/*N*/ GetCameraSet().SetDeviceVolume(aVolume, FALSE);
+/*N*/
+/*N*/ // Danach noch die SnapRects der enthaltenen Objekte
+/*N*/ // invalidieren, um diese auf der neuen Grundlage berechnen
+/*N*/ // zu lassen (falls diese von FitInSnapRect() berechnet wurden)
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Licht- und Labelobjektlisten neu aufbauen (nach Laden, Zuweisung)
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::RebuildLists()
+/*N*/ {
+/*N*/ // zuerst loeschen
+/*N*/ aLabelList.Clear();
+/*N*/ SdrLayerID nLayerID = GetLayer();
+/*N*/
+/*N*/ SdrObjListIter a3DIterator(*pSub, IM_FLAT);
+/*N*/
+/*N*/ // dann alle Objekte in der Szene pruefen
+/*N*/ while ( a3DIterator.IsMore() )
+/*N*/ {
+/*N*/ E3dObject* p3DObj = (E3dObject*) a3DIterator.Next();
+/*N*/ p3DObj->NbcSetLayer(nLayerID);
+/*N*/ NewObjectInserted(p3DObj);
+/*N*/ }
+/*N*/
+/*N*/ }
+
+/*************************************************************************
+|*
+|* erstelle neues GeoData-Objekt
+|*
+\************************************************************************/
+
+/*N*/ SdrObjGeoData *E3dScene::NewGeoData() const
+/*N*/ {
+/*N*/ return new E3DSceneGeoData;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::SFX_NOTIFY(SfxBroadcaster &rBC,
+/*N*/ const TypeId &rBCType,
+/*N*/ const SfxHint &rHint,
+/*N*/ const TypeId &rHintType)
+/*N*/ {
+/*N*/ SetRectsDirty();
+/*N*/ E3dObject::SFX_NOTIFY(rBC, rBCType, rHint, rHintType);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Compounds brauchen Defaults
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::ForceDefaultAttr()
+/*N*/ {
+/*N*/ SdrAttrObj::ForceDefaultAttr();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ E3dObjList* pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/
+/*N*/ for ( ULONG i = 0; i < nObjCnt; i++ )
+/*?*/ pOL->GetObj(i)->NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+/*N*/
+/*N*/ StructureChanged(this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Attribute abfragen
+|*
+\************************************************************************/
+
+/*N*/ SfxStyleSheet* E3dScene::GetStyleSheet() const
+/*N*/ {
+/*N*/ E3dObjList *pOL = pSub;
+/*N*/ ULONG nObjCnt = pOL->GetObjCount();
+/*N*/ SfxStyleSheet *pRet = 0;
+/*N*/
+/*N*/ for ( ULONG i = 0; i < nObjCnt; i++ )
+/*N*/ {
+/*N*/ SfxStyleSheet *pSheet = pOL->GetObj(i)->GetStyleSheet();
+/*N*/
+/*N*/ if (!pRet)
+/*N*/ pRet = pSheet;
+/*N*/ else if (pSheet)
+/*N*/ {
+/*N*/ if(!pSheet->GetName().Equals(pRet->GetName()))
+/*N*/ return 0;
+/*N*/ }
+/*N*/ }
+/*N*/ return pRet;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Licht-Objekte rauswerfen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::RemoveLightObjects()
+/*N*/ {
+/*N*/ SdrObjList* pSubList = GetSubList();
+/*N*/ if(pSubList)
+/*N*/ {
+/*N*/ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+/*N*/ while ( a3DIterator.IsMore() )
+/*N*/ {
+/*N*/ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+/*N*/ if(pObj->ISA(E3dLight))
+/*N*/ {
+/*N*/ // Weg damit
+/*N*/ Remove3DObj(pObj);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Licht-Objekte erzeugen, um kompatibel zur 4.0
+|* speichern zu koennen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::CreateLightObjectsFromLightGroup()
+/*N*/ {
+/*N*/ if(aLightGroup.IsLightingEnabled())
+/*N*/ {
+/*N*/ // Global Ambient Light
+/*N*/ const Color& rAmbient = aLightGroup.GetGlobalAmbientLight();
+/*N*/ if(rAmbient != Color(COL_BLACK))
+/*N*/ Insert3DObj(new E3dLight(Vector3D(), rAmbient, 1.0));
+/*N*/
+/*N*/ // Andere Lichter
+/*N*/ for(UINT16 a=0;a<BASE3D_MAX_NUMBER_LIGHTS;a++)
+/*N*/ {
+/*N*/ B3dLight& rLight = aLightGroup.GetLightObject((Base3DLightNumber)(Base3DLight0 + a));
+/*N*/ if(rLight.IsEnabled())
+/*N*/ {
+/*N*/ if(rLight.IsDirectionalSource())
+/*N*/ {
+/*N*/ // erzeuge E3dDistantLight
+/*N*/ Insert3DObj(new E3dDistantLight(Vector3D(),
+/*N*/ rLight.GetPosition(),
+/*N*/ rLight.GetIntensity(Base3DMaterialDiffuse), 1.0));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // erzeuge E3dPointLight
+/*N*/ Insert3DObj(new E3dPointLight(rLight.GetPosition(),
+/*N*/ rLight.GetIntensity(Base3DMaterialDiffuse), 1.0));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Beleuchtung aus dem alten Beleuchtungsmodell uebernehmen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::FillLightGroup()
+/*N*/ {
+/*N*/ SdrObjList* pSubList = GetSubList();
+/*N*/ BOOL bLampFound = FALSE;
+/*N*/
+/*N*/ if(pSubList)
+/*N*/ {
+/*N*/ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+/*N*/ Base3DLightNumber eLight = Base3DLight0;
+/*N*/
+/*N*/ // AmbientLight aus
+/*N*/ aLightGroup.SetGlobalAmbientLight(Color(COL_BLACK));
+/*N*/
+/*N*/ while ( a3DIterator.IsMore() )
+/*N*/ {
+/*N*/ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+/*N*/ if(pObj->ISA(E3dLight) && eLight <= Base3DLight7)
+/*N*/ {
+/*N*/ E3dLight* pLight = (E3dLight*)pObj;
+/*N*/ bLampFound = TRUE;
+/*N*/
+/*N*/ // pLight in Base3D Konvention aktivieren
+/*N*/ if(pLight->IsOn())
+/*N*/ {
+/*?*/ if(pLight->ISA(E3dPointLight))
+/*?*/ {
+/*?*/ // ist ein E3dPointLight
+/*?*/ // Position, keine Richtung
+/*?*/ B3dColor aCol(pLight->GetColor().GetColor());
+/*?*/ aCol *= pLight->GetIntensity();
+/*?*/ aLightGroup.SetIntensity(aCol, Base3DMaterialDiffuse, eLight);
+/*?*/ aLightGroup.SetIntensity(Color(COL_WHITE), Base3DMaterialSpecular, eLight);
+/*?*/ Vector3D aPos = pLight->GetPosition();
+/*?*/ aLightGroup.SetPosition(aPos, eLight);
+/*?*/
+/*?*/ // Lichtquelle einschalten
+/*?*/ aLightGroup.Enable(TRUE, eLight);
+/*?*/
+/*?*/ // Naechstes Licht in Base3D
+/*?*/ eLight = (Base3DLightNumber)(eLight + 1);
+/*?*/ }
+/*N*/ else if(pLight->ISA(E3dDistantLight))
+/*N*/ {
+/*N*/ // ist ein E3dDistantLight
+/*N*/ // Richtung, keine Position
+/*N*/ B3dColor aCol(pLight->GetColor().GetColor());
+/*N*/ aCol *= pLight->GetIntensity();
+/*N*/ aLightGroup.SetIntensity(aCol, Base3DMaterialDiffuse, eLight);
+/*N*/ aLightGroup.SetIntensity(Color(COL_WHITE), Base3DMaterialSpecular, eLight);
+/*N*/ Vector3D aDir = ((E3dDistantLight *)pLight)->GetDirection();
+/*N*/ aLightGroup.SetDirection(aDir, eLight);
+/*N*/
+/*N*/ // Lichtquelle einschalten
+/*N*/ aLightGroup.Enable(TRUE, eLight);
+/*N*/
+/*N*/ // Naechstes Licht in Base3D
+/*N*/ eLight = (Base3DLightNumber)(eLight + 1);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // nur ein E3dLight, gibt ein
+/*N*/ // ambientes licht, auf globales aufaddieren
+/*N*/ B3dColor aCol(pLight->GetColor().GetColor());
+/*N*/ aCol *= pLight->GetIntensity();
+/*N*/ aCol += (const B3dColor &)(aLightGroup.GetGlobalAmbientLight());
+/*N*/ aLightGroup.SetGlobalAmbientLight(aCol);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Alle anderen Lichter ausschalten
+/*N*/ while(eLight <= Base3DLight7)
+/*N*/ {
+/*N*/ aLightGroup.Enable(FALSE, eLight);
+/*N*/ eLight = (Base3DLightNumber)(eLight + 1);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Beleuchtung einschalten, falls Lampen vorhanden
+/*N*/ aLightGroup.EnableLighting(bLampFound);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Lichter zaehlen
+|*
+\************************************************************************/
+
+/*N*/ UINT16 E3dScene::CountNumberOfLights()
+/*N*/ {
+/*N*/ UINT16 nNumLights = 0;
+/*N*/
+/*N*/ SdrObjList* pSubList = GetSubList();
+/*N*/ if(pSubList)
+/*N*/ {
+/*N*/ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+/*N*/ while ( a3DIterator.IsMore() )
+/*N*/ {
+/*N*/ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+/*N*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+/*N*/ if(pObj->ISA(E3dLight))
+/*N*/ {
+/*N*/ // Zaehlen...
+/*N*/ nNumLights++;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nNumLights;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SnapRect berechnen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::RecalcSnapRect()
+/*N*/ {
+/*N*/ E3dScene* pScene = GetScene();
+/*N*/ if(pScene == this)
+/*N*/ {
+/*N*/ // Szene wird als 2D-Objekt benutzt, nimm SnapRect aus der
+/*N*/ // 2D Bildschrimdarstellung
+/*N*/ Camera3D& rCam = (Camera3D&)pScene->GetCamera();
+/*N*/ maSnapRect = rCam.GetDeviceWindow();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Szene ist selbst Mitglied einer anderen Szene, hole das
+/*N*/ // SnapRect als zusammengesetztes Objekt
+/*N*/ E3dObject::RecalcSnapRect();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Attribute abfragen
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::ImpSetLightItemsFromLightGroup()
+/*N*/ {
+/*N*/ ImpForceItemSet();
+/*N*/
+/*N*/ // TwoSidedLighting
+/*N*/ mpObjectItemSet->Put(Svx3DTwoSidedLightingItem(aLightGroup.GetModelTwoSide()));
+/*N*/
+/*N*/ // LightColors
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor1Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight0)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor2Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight1)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor3Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight2)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor4Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight3)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor5Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight4)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor6Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight5)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor7Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight6)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightcolor8Item(aLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight7)));
+/*N*/
+/*N*/ // AmbientColor
+/*N*/ mpObjectItemSet->Put(Svx3DAmbientcolorItem(aLightGroup.GetGlobalAmbientLight()));
+/*N*/
+/*N*/ // LightOn
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff1Item(aLightGroup.IsEnabled(Base3DLight0)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff2Item(aLightGroup.IsEnabled(Base3DLight1)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff3Item(aLightGroup.IsEnabled(Base3DLight2)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff4Item(aLightGroup.IsEnabled(Base3DLight3)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff5Item(aLightGroup.IsEnabled(Base3DLight4)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff6Item(aLightGroup.IsEnabled(Base3DLight5)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff7Item(aLightGroup.IsEnabled(Base3DLight6)));
+/*N*/ mpObjectItemSet->Put(Svx3DLightOnOff8Item(aLightGroup.IsEnabled(Base3DLight7)));
+/*N*/
+/*N*/ // LightDirection
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection1Item(aLightGroup.GetDirection( Base3DLight0 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection2Item(aLightGroup.GetDirection( Base3DLight1 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection3Item(aLightGroup.GetDirection( Base3DLight2 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection4Item(aLightGroup.GetDirection( Base3DLight3 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection5Item(aLightGroup.GetDirection( Base3DLight4 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection6Item(aLightGroup.GetDirection( Base3DLight5 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection7Item(aLightGroup.GetDirection( Base3DLight6 )));
+/*N*/ mpObjectItemSet->Put(Svx3DLightDirection8Item(aLightGroup.GetDirection( Base3DLight7 )));
+/*N*/ }
+
+/*N*/ void E3dScene::ImpSetSceneItemsFromCamera()
+/*N*/ {
+/*N*/ ImpForceItemSet();
+/*N*/ Camera3D aSceneCam (GetCamera());
+/*N*/
+/*N*/ // ProjectionType
+/*N*/ mpObjectItemSet->Put(Svx3DPerspectiveItem((UINT16)aSceneCam.GetProjection()));
+/*N*/
+/*N*/ // CamPos
+/*N*/ mpObjectItemSet->Put(Svx3DDistanceItem((UINT32)(aSceneCam.GetPosition().Z() + 0.5)));
+/*N*/
+/*N*/ // FocalLength
+/*N*/ mpObjectItemSet->Put(Svx3DFocalLengthItem((UINT32)((aSceneCam.GetFocalLength() * 100.0) + 0.5)));
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ const SfxItemSet& E3dScene::GetItemSet() const
+/*N*/ {
+/*N*/ // prepare ItemSet
+/*N*/ if(mpObjectItemSet)
+/*N*/ {
+/*N*/ SfxItemSet aNew(*mpObjectItemSet->GetPool(), SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST);
+/*N*/ aNew.Put(*mpObjectItemSet);
+/*N*/ mpObjectItemSet->ClearItem();
+/*N*/ mpObjectItemSet->Put(aNew);
+/*N*/ }
+/*N*/ else
+/*N*/ ((E3dScene*)this)->ImpForceItemSet();
+/*N*/
+/*N*/ // collect all ItemSets in mpGroupItemSet
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = pSub->GetObj(a)->GetItemSet();
+/*N*/ SfxWhichIter aIter(rSet);
+/*N*/ sal_uInt16 nWhich(aIter.FirstWhich());
+/*N*/
+/*N*/ while(nWhich)
+/*N*/ {
+/*N*/ if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, FALSE))
+/*N*/ mpObjectItemSet->InvalidateItem(nWhich);
+/*N*/ else
+/*N*/ mpObjectItemSet->MergeValue(rSet.Get(nWhich), TRUE);
+/*N*/
+/*N*/ nWhich = aIter.NextWhich();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return *mpObjectItemSet;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ void E3dScene::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ // handle local value change
+/*N*/ if(!nWhich || (nWhich >= SDRATTR_3DSCENE_FIRST && nWhich <= SDRATTR_3DSCENE_LAST))
+/*N*/ SdrAttrObj::ItemChange(nWhich, pNewItem);
+/*N*/
+/*N*/ // ItemChange at all contained objects
+/*N*/ List aPostItemChangeList;
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+ sal_uInt32 a;
+/*N*/
+/*N*/ for( a=0; a < nCount; a++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pSub->GetObj(a);
+/*N*/ if(pObj->AllowItemChange(nWhich, pNewItem))
+/*N*/ {
+/*N*/ pObj->ItemChange(nWhich, pNewItem);
+/*N*/ aPostItemChangeList.Insert((void*)pObj, LIST_APPEND);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ for(a = 0; a < aPostItemChangeList.Count(); a++)
+/*N*/ {
+/*N*/ SdrObject* pObj = (SdrObject*)aPostItemChangeList.GetObject(a);
+/*N*/ pObj->PostItemChange(nWhich);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dScene::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ if(!nWhich || (nWhich >= SDRATTR_3DSCENE_FIRST && nWhich <= SDRATTR_3DSCENE_LAST))
+/*N*/ SdrAttrObj::PostItemChange(nWhich);
+/*N*/
+/*N*/ // local changes
+/*N*/ StructureChanged(this);
+/*N*/
+/*N*/ switch(nWhich)
+/*N*/ {
+/*N*/ case SDRATTR_3DSCENE_PERSPECTIVE :
+/*N*/ case SDRATTR_3DSCENE_DISTANCE :
+/*N*/ case SDRATTR_3DSCENE_FOCAL_LENGTH :
+/*N*/ {
+/*N*/ // #83387#, #83391#
+/*N*/ // one common function for the camera attributes
+/*N*/ // since SetCamera() sets all three back to the ItemSet
+/*N*/ Camera3D aSceneCam(GetCamera());
+/*N*/ BOOL bChange(FALSE);
+/*N*/
+/*N*/ // for SDRATTR_3DSCENE_PERSPECTIVE:
+/*N*/ if(aSceneCam.GetProjection() != GetPerspective())
+/*N*/ {
+/*N*/ aSceneCam.SetProjection(GetPerspective());
+/*N*/ bChange = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // for SDRATTR_3DSCENE_DISTANCE:
+/*N*/ Vector3D aActualPosition = aSceneCam.GetPosition();
+/*N*/ double fNew = GetDistance();
+/*N*/ if(fNew != aActualPosition.Z())
+/*N*/ {
+/*N*/ aSceneCam.SetPosition( Vector3D( aActualPosition.X(), aActualPosition.Y(), fNew) );
+/*N*/ bChange = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // for SDRATTR_3DSCENE_FOCAL_LENGTH:
+/*N*/ fNew = GetFocalLength() / 100.0;
+/*N*/ if(aSceneCam.GetFocalLength() != fNew)
+/*N*/ {
+/*N*/ aSceneCam.SetFocalLength(fNew);
+/*N*/ bChange = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // for all
+/*N*/ if(bChange)
+/*N*/ SetCamera(aSceneCam);
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_TWO_SIDED_LIGHTING :
+/*N*/ {
+/*N*/ aLightGroup.SetModelTwoSide(GetTwoSidedLighting());
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_1 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor1(), Base3DMaterialDiffuse, Base3DLight0);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_2 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor2(), Base3DMaterialDiffuse, Base3DLight1);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_3 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor3(), Base3DMaterialDiffuse, Base3DLight2);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_4 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor4(), Base3DMaterialDiffuse, Base3DLight3);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_5 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor5(), Base3DMaterialDiffuse, Base3DLight4);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_6 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor6(), Base3DMaterialDiffuse, Base3DLight5);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_7 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor7(), Base3DMaterialDiffuse, Base3DLight6);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTCOLOR_8 :
+/*N*/ {
+/*N*/ aLightGroup.SetIntensity( GetLightColor8(), Base3DMaterialDiffuse, Base3DLight7);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_AMBIENTCOLOR :
+/*N*/ {
+/*N*/ aLightGroup.SetGlobalAmbientLight(GetGlobalAmbientColor());
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_1 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff1(), Base3DLight0);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_2 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff2(), Base3DLight1);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_3 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff3(), Base3DLight2);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_4 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff4(), Base3DLight3);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_5 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff5(), Base3DLight4);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_6 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff6(), Base3DLight5);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_7 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff7(), Base3DLight6);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTON_8 :
+/*N*/ {
+/*N*/ aLightGroup.Enable( GetLightOnOff8(), Base3DLight7);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_1 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection1(), Base3DLight0);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_2 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection2(), Base3DLight1);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_3 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection3(), Base3DLight2);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_4 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection4(), Base3DLight3);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_5 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection5(), Base3DLight4);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_6 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection6(), Base3DLight5);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_7 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection7(), Base3DLight6);
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DSCENE_LIGHTDIRECTION_8 :
+/*N*/ {
+/*N*/ aLightGroup.SetDirection( GetLightDirection8(), Base3DLight7);
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet was changed, maybe user wants to react
+
+/*N*/ void E3dScene::ItemSetChanged( const SfxItemSet& rSet )
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dObject::ItemSetChanged( rSet );
+/*N*/
+/*N*/ // set at all contained objects
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ pSub->GetObj(a)->ItemSetChanged( rSet );
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void E3dScene::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dObject::PreSave();
+/*N*/
+/*N*/ // set at all contained objects
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ pSub->GetObj(a)->PreSave();
+/*N*/ }
+
+/*N*/ void E3dScene::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dObject::PostSave();
+/*N*/
+/*N*/ // set at all contained objects
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ pSub->GetObj(a)->PostSave();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ItemPool fuer dieses Objekt wechseln
+|*
+\************************************************************************/
+
+/*N*/ void E3dScene::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel )
+/*N*/ {
+/*N*/ if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dObject::MigrateItemPool(pSrcPool, pDestPool, pNewModel);
+/*N*/
+/*N*/ // own reaction, but only with outmost scene
+/*N*/ SdrObjList* pSubList = GetSubList();
+/*N*/ if(pSubList && GetScene() == this)
+/*N*/ {
+/*N*/ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+/*N*/ while ( a3DIterator.IsMore() )
+/*N*/ {
+/*?*/ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+/*?*/ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+/*?*/ pObj->MigrateItemPool(pSrcPool, pDestPool, pNewModel);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void E3dScene::SetShadowPlaneDirection(const Vector3D& rVec)
+/*N*/ {
+/*N*/ UINT16 nSceneShadowSlant = (UINT16)((atan2(rVec.Y(), rVec.Z()) / F_PI180) + 0.5);
+/*N*/ ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put(Svx3DShadowSlantItem(nSceneShadowSlant));
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_sphere3d.cxx b/binfilter/bf_svx/source/engine3d/svx_sphere3d.cxx
new file mode 100644
index 000000000000..25b261692555
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_sphere3d.cxx
@@ -0,0 +1,703 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdstr.hrc"
+
+#include "svdio.hxx"
+
+#include "svditer.hxx"
+
+#include "svdmodel.hxx"
+
+
+
+#include "polyob3d.hxx"
+
+#include "sphere3d.hxx"
+
+
+#include "svxids.hrc"
+
+namespace binfilter {
+
+/*N*/ TYPEINIT1(E3dSphereObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* 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.
+/*N*/ E3dSphereObj::E3dSphereObj(int dummy) // den Parameter braucht es um unterscheiden zu koennen, welcher
+/*N*/ { // der beiden Konstruktoren gemeint ist. Der obige halt per Default
+/*N*/ // Defaults setzen
+/*N*/ E3dDefaultAttributes aDefault;
+/*N*/ SetDefaultAttributes(aDefault);
+/*N*/ }
+
+/*N*/ void E3dSphereObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+/*N*/ {
+/*N*/ // Defaults setzen
+/*N*/ aCenter = rDefault.GetDefaultSphereCenter();
+/*N*/ aSize = rDefault.GetDefaultSphereSize();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Give out simple line geometry
+|*
+\************************************************************************/
+
+/*N*/ void E3dSphereObj::GetLineGeometry(PolyPolygon3D& rLinePolyPolygon) const
+/*N*/ {
+/*N*/ // add geometry describing polygons to rLinePolyPolygon
+/*N*/ sal_uInt16 nCntHor = (sal_uInt16)GetHorizontalSegments();
+/*N*/ sal_uInt16 nCntVer = (sal_uInt16)GetVerticalSegments();
+/*N*/ const Vector3D aRadius = aSize / 2;
+/*N*/ const double fHInc = (double)DEG2RAD(360) / nCntHor;
+/*N*/ const double fVInc = (double)DEG2RAD(180) / nCntVer;
+/*N*/ sal_uInt16 nCntHorPoly = nCntVer - 1;
+/*N*/ sal_uInt16 nIndHorPoly = rLinePolyPolygon.Count();
+/*N*/ sal_uInt16 a;
+/*N*/ double fHAng = 0.0;
+/*N*/
+/*N*/ for(a = 0; a < nCntHorPoly; a++)
+/*N*/ {
+/*N*/ Polygon3D aNewHor(nCntHor + 1);
+/*N*/ //aNewHor.SetClosed(TRUE);
+/*N*/ rLinePolyPolygon.Insert(aNewHor);
+/*N*/ }
+/*N*/
+/*N*/ for(sal_uInt16 nH(0); nH < nCntHor; nH++)
+/*N*/ {
+/*N*/ double fHSin = sin(fHAng);
+/*N*/ double fHCos = cos(fHAng);
+/*N*/ fHAng += fHInc;
+/*N*/ double fVAng = DEG2RAD(90);
+/*N*/ Polygon3D aNewVer(nCntVer + 1);
+/*N*/
+/*N*/ for(sal_uInt16 nV(0); nV <= nCntVer; nV++)
+/*N*/ {
+/*N*/ double fVSin = sin(fVAng);
+/*N*/ double fVCos = cos(fVAng);
+/*N*/ fVAng -= fVInc;
+/*N*/
+/*N*/ Vector3D aPos = aCenter;
+/*N*/ double fRx = aRadius.X() * fVCos;
+/*N*/ double fRz = aRadius.Z() * fVCos;
+/*N*/ aPos.X() += fRx * fHCos;
+/*N*/ aPos.Y() += aRadius.Y() * fVSin;
+/*N*/ aPos.Z() += fRz * fHSin;
+/*N*/
+/*N*/ if(nV == 0)
+/*N*/ {
+/*N*/ // top position, only interesting for vertical line
+/*N*/ aNewVer[0] = aPos;
+/*N*/ }
+/*N*/ else if(nV == nCntVer)
+/*N*/ {
+/*N*/ // bottom position, only interesting for vertical line
+/*N*/ aNewVer[nCntVer] = aPos;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // normal position, insert vertical
+/*N*/ aNewVer[nV] = aPos;
+/*N*/
+/*N*/ // insert horizontal
+/*N*/ rLinePolyPolygon[nIndHorPoly + (nV - 1)][nH] = aPos;
+/*N*/ if(!nH)
+/*N*/ rLinePolyPolygon[nIndHorPoly + (nV - 1)][nCntHor] = aPos;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ /// insert new vertical poly
+/*N*/ rLinePolyPolygon.Insert(aNewVer);
+/*N*/ }
+/*N*/
+/*N*/ // don't call parent
+/*N*/ // E3dCompoundObject::GetLineGeometry(rLinePolyPolygon);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dSphereObj::CreateGeometry()
+/*N*/ {
+/*N*/ Polygon3D aRect3D(4);
+/*N*/ Polygon3D aNormal3D(4);
+/*N*/ Polygon3D aTexture3D(4);
+/*N*/
+/*N*/ if ( GetHorizontalSegments() < 3 )
+/*N*/ mpObjectItemSet->Put(Svx3DHorizontalSegmentsItem(3));
+/*N*/
+/*N*/ if ( GetHorizontalSegments() > 100 )
+/*N*/ mpObjectItemSet->Put(Svx3DHorizontalSegmentsItem(100));
+/*N*/
+/*N*/ if ( GetVerticalSegments() < 2 )
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(2));
+/*N*/
+/*N*/ if ( GetVerticalSegments() > 100 )
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(100));
+/*N*/
+/*N*/ // Start der Geometrieerzeugung ankuendigen
+/*N*/ StartCreateGeometry();
+/*N*/
+/*N*/ Vector3D aRadius = aSize / 2;
+/*N*/ double fHSin1, fHSin2, fHCos1, fHCos2;
+/*N*/ double fHAng = 0;
+/*N*/ double fHInc = DEG2RAD(360) / GetHorizontalSegments();
+/*N*/ double fVInc = DEG2RAD(180) / GetVerticalSegments();
+/*N*/
+/*N*/ fHSin2 = 0.0; // sin(0)
+/*N*/ fHCos2 = 1.0; // cos(0)
+/*N*/ sal_uInt16 nUpperBound = (sal_uInt16)GetHorizontalSegments();
+/*N*/
+/*N*/ for (USHORT nH = 0; nH < nUpperBound; nH++)
+/*N*/ {
+/*N*/ fHAng += fHInc;
+/*N*/ fHSin1 = fHSin2;
+/*N*/ fHSin2 = sin(fHAng);
+/*N*/ fHCos1 = fHCos2;
+/*N*/ fHCos2 = cos(fHAng);
+/*N*/
+/*N*/ double fRx, fRz;
+/*N*/ double fVAng = DEG2RAD(90);
+/*N*/ double fVSin1, fVSin2, fVCos1, fVCos2;
+/*N*/ fVSin2 = 1.0; // sin(90)
+/*N*/ fVCos2 = 0.0; // cos(90)
+/*N*/ sal_uInt16 nUpperVert = (sal_uInt16)GetVerticalSegments();
+/*N*/
+/*N*/ for (USHORT nV = 0; nV < nUpperVert; nV++)
+/*N*/ {
+/*N*/ Vector3D aPos;
+/*N*/
+/*N*/ fVAng -= fVInc;
+/*N*/ fVSin1 = fVSin2;
+/*N*/ fVSin2 = sin(fVAng);
+/*N*/ fVCos1 = fVCos2;
+/*N*/ fVCos2 = cos(fVAng);
+/*N*/
+/*N*/ aPos = aCenter;
+/*N*/ fRx = aRadius.X() * fVCos1;
+/*N*/ fRz = aRadius.Z() * fVCos1;
+/*N*/ aPos.X() += fRx * fHCos1;
+/*N*/ aPos.Y() += aRadius.Y() * fVSin1;
+/*N*/ aPos.Z() += fRz * fHSin1;
+/*N*/ aRect3D[1] = aPos;
+/*N*/
+/*N*/ aPos.X() = aCenter.X() + fRx * fHCos2;
+/*N*/ aPos.Z() = aCenter.Z() + fRz * fHSin2;
+/*N*/ aRect3D[2] = aPos;
+/*N*/
+/*N*/ aPos = aCenter;
+/*N*/ fRx = aRadius.X() * fVCos2;
+/*N*/ fRz = aRadius.Z() * fVCos2;
+/*N*/ aPos.X() += fRx * fHCos1;
+/*N*/ aPos.Y() += aRadius.Y() * fVSin2;
+/*N*/ aPos.Z() += fRz * fHSin1;
+/*N*/ aRect3D[0] = aPos;
+/*N*/
+/*N*/ aPos.X() = aCenter.X() + fRx * fHCos2;
+/*N*/ aPos.Z() = aCenter.Z() + fRz * fHSin2;
+/*N*/ aRect3D[3] = aPos;
+/*N*/
+/*N*/ if(GetCreateTexture())
+/*N*/ {
+/*N*/ aTexture3D[1].X() =
+/*N*/ (double)(nUpperBound - (nH + 1)) / (double)nUpperBound;
+/*N*/ aTexture3D[1].Y() =
+/*N*/ (double)nV / (double)nUpperVert;
+/*N*/
+/*N*/ aTexture3D[2].X() =
+/*N*/ (double)((nUpperBound - (nH + 1)) - 1) / (double)nUpperBound;
+/*N*/ aTexture3D[2].Y() = aTexture3D[1].Y();
+/*N*/
+/*N*/ aTexture3D[3].X() = aTexture3D[2].X();
+/*N*/ aTexture3D[3].Y() =
+/*N*/ (double)(nV+1) / (double)nUpperVert;
+/*N*/
+/*N*/ aTexture3D[0].X() = aTexture3D[1].X();
+/*N*/ aTexture3D[0].Y() = aTexture3D[3].Y();
+/*N*/ }
+/*N*/
+/*N*/ if(GetCreateNormals())
+/*N*/ {
+/*N*/ aNormal3D = aRect3D;
+/*N*/ aNormal3D[0].Normalize();
+/*N*/ aNormal3D[1].Normalize();
+/*N*/ aNormal3D[2].Normalize();
+/*N*/ aNormal3D[3].Normalize();
+/*N*/
+/*N*/ if(GetCreateTexture())
+/*N*/ AddGeometry(aRect3D, aNormal3D, aTexture3D, FALSE);
+/*N*/ else
+/*N*/ AddGeometry(aRect3D, aNormal3D, FALSE);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ AddGeometry(aRect3D, FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::CreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus n Polygonen
+|*
+\************************************************************************/
+
+/*N*/ SdrObject *E3dSphereObj::DoConvertToPolyObj(BOOL bBezier) const
+/*N*/ {
+/*N*/ return NULL;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ void E3dSphereObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+/*N*/ }
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrAttrObj::WriteData(rOut);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dSphereObj");
+/*N*/ #endif
+/*N*/
+/*N*/ if (rOut.GetVersion() < 3560) // FG: kleiner als die Final Beta der Version 4.0
+/*N*/ {
+/*N*/ pSub->Save(rOut);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // [FG] Jetzt wird die Kindliste abgeklapptert, allerdings weiss ich im Gegensatz zu
+/*N*/ // Joe dass es nur E3dPolyObj - Kindobjekte sein koennen.
+/*N*/ // Jedes dieser Objekte frage ich ob es eigene Attribute enthaelt. Falls OwnStyle ()
+/*N*/ // true liefert, werde ich das Polygon nicht wegspeichern.
+/*N*/
+/*N*/ SdrObjListIter aIter(*pSub,IM_FLAT);
+/*N*/ while (aIter.IsMore()) {
+/*N*/ E3dPolyObj* pObj=(E3dPolyObj *) aIter.Next();
+/*N*/ if ((!pObj->IsNotPersistent()) && (pObj->OwnAttrs() || pObj->OwnStyle()))
+/*N*/ {
+/*N*/ rOut<<*pObj;
+/*N*/ }
+/*N*/ if (pSub->GetModel()!=NULL) pSub->GetModel()->IncProgress();
+/*N*/ }
+/*N*/ SdrIOHeader(rOut,STREAM_WRITE,SdrIOEndeID); // Endemarke
+/*N*/ }
+/*N*/
+/*N*/ // Daß hier gehört zum E3dObject (ohne Basisklassen);
+/*N*/ if (rOut.GetVersion() < 3560)
+/*N*/ {
+/*N*/ rOut << aLocalBoundVol;
+/*N*/
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ aMat3D = aTfMatrix;
+/*N*/ rOut << aMat3D;
+/*N*/
+/*N*/ rOut << nLogicalGroup;
+/*N*/ rOut << nObjTreeLevel;
+/*N*/ rOut << nPartOfParent;
+/*N*/ rOut << UINT16(eDragDetail);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ E3dObject::WriteOnlyOwnMembers(rOut);
+/*N*/ }
+/*N*/ // Das gehört zu E3dSphere
+/*N*/ rOut << GetHorizontalSegments();
+/*N*/
+/*N*/ rOut << GetVerticalSegments();
+/*N*/
+/*N*/ rOut << aCenter;
+/*N*/ rOut << aSize;
+/*N*/
+/*N*/ // Das hier ist ein Merkmal eines Compound-Objektes
+/*N*/ rOut << GetDoubleSided();
+/*N*/
+/*N*/ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+/*N*/ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+/*N*/ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+/*N*/ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+/*N*/ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+/*N*/ // E3dCompoundObject oder E3dObject aendern.
+/*N*/ rOut << GetDoubleSided();
+/*N*/
+/*N*/ rOut << BOOL(bCreateNormals);
+/*N*/ rOut << BOOL(bCreateTexture);
+/*N*/
+/*N*/ sal_uInt16 nVal = GetNormalsKind();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ nVal = GetTextureProjectionX();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ nVal = GetTextureProjectionY();
+/*N*/ rOut << BOOL(nVal > 0);
+/*N*/ rOut << BOOL(nVal > 1);
+/*N*/
+/*N*/ rOut << BOOL(GetShadow3D());
+/*N*/
+/*N*/ rOut << GetMaterialAmbientColor();
+/*N*/ rOut << GetMaterialColor();
+/*N*/ rOut << GetMaterialSpecular();
+/*N*/ rOut << GetMaterialEmission();
+/*N*/ rOut << GetMaterialSpecularIntensity();
+/*N*/
+/*N*/ aBackMaterial.WriteData(rOut);
+/*N*/
+/*N*/ rOut << (UINT16)GetTextureKind();
+/*N*/
+/*N*/ rOut << (UINT16)GetTextureMode();
+/*N*/
+/*N*/ rOut << BOOL(GetNormalsInvert());
+/*N*/
+/*N*/ // neu ab 534: (hat noch gefehlt)
+/*N*/ rOut << BOOL(GetTextureFilter());
+/*N*/
+/*N*/ if(nVersion < 3800)
+/*N*/ {
+/*N*/ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+/*N*/ ((E3dCompoundObject*)this)->ReCreateGeometry();
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dSphereObj::ReadData31(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dSphereObj");
+/*N*/ #endif
+/*N*/ // dann die Member
+/*N*/ UINT16 nTmp16;
+/*N*/ sal_Int32 nTmp32;
+/*N*/
+/*N*/ pSub->Load(rIn, *pPage);
+/*N*/ // FG: Die Daten des 3D-Objektes
+/*N*/ rIn >> aLocalBoundVol;
+/*N*/
+/*N*/ Old_Matrix3D aMat3D;
+/*N*/ rIn >> aMat3D;
+/*N*/ aTfMatrix = Matrix4D(aMat3D);
+/*N*/
+/*N*/ rIn >> nLogicalGroup;
+/*N*/ rIn >> nObjTreeLevel;
+/*N*/ rIn >> nPartOfParent;
+/*N*/ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+/*N*/ // FG: Die Daten der Kugel
+/*N*/
+/*N*/ rIn >> nTmp32;
+/*N*/ mpObjectItemSet->Put(Svx3DHorizontalSegmentsItem(nTmp32));
+/*N*/
+/*N*/ rIn >> nTmp32;
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(nTmp32));
+/*N*/
+/*N*/ rIn >> aCenter;
+/*N*/ rIn >> aSize;
+/*N*/
+/*N*/ bBoundVolValid = FALSE;
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ ReCreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+/*N*/ void E3dSphereObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // FG (10.2.97) Der Pointer ist ein Kunstgriff er wird in der ReadData-Routine erzeugt dort werden
+/*N*/ // die abgespeicherten attributierten Flaechen abgelegt. Danach wird eine Kugel mit Default-Paramtern
+/*N*/ // erzeugt und dann werden die per Default erzeugten einfach, falls noetig mit denen aus dieser Liste
+/*N*/ // ausgetauscht. Am Ende von ReadData wird die Liste wieder zerstoert.
+/*N*/ E3dObjList *pLoadedE3dPolyObjs;
+/*N*/
+/*N*/ if (ImpCheckSubRecords (rHead, rIn))
+/*N*/ {
+/*N*/ // leider kann das E3dLatheObj nicht auf E3dObject abgestuetzt werden,
+/*N*/ // da neue Member hinzugekommen sind und die Kompatibilitaet erhalten
+/*N*/ // bleiben muss.
+/*N*/ SdrAttrObj::ReadData(rHead, rIn);
+/*N*/ if ((rIn.GetVersion() < 3560) || (rHead.GetVersion() <= 12))
+/*N*/ {
+/*N*/ ReadData31(rHead, rIn);
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("E3dSphereObj");
+/*N*/ #endif
+/*N*/ // dann die Member
+/*N*/ BOOL bMyDoubleSided;
+/*N*/
+/*N*/ // [FG]: Es wird erstmal gelesen was da ist, ob es vollstaendig ist zeigt sich bei
+/*N*/ // dem Aufruf von CreateSphere, dort werden die fehlenden Flaechen einfach
+/*N*/ // erzeugt.
+/*N*/ pLoadedE3dPolyObjs = new E3dObjList(NULL, NULL);
+/*N*/ pLoadedE3dPolyObjs->SetOwnerObj(this);
+/*N*/ pLoadedE3dPolyObjs->SetListKind(SDROBJLIST_GROUPOBJ);
+/*N*/ pLoadedE3dPolyObjs->Load(rIn, *pPage);
+/*N*/ E3dObject::ReadOnlyOwnMembers(rHead, rIn);
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft ())
+/*N*/ {
+/*N*/ // neue Member
+/*N*/ sal_Int32 nTmp32;
+/*N*/
+/*N*/ rIn >> nTmp32;
+/*N*/ mpObjectItemSet->Put(Svx3DHorizontalSegmentsItem(nTmp32));
+/*N*/
+/*N*/ rIn >> nTmp32;
+/*N*/ mpObjectItemSet->Put(Svx3DVerticalSegmentsItem(nTmp32));
+/*N*/
+/*N*/ rIn >> aCenter;
+/*N*/ rIn >> aSize;
+/*N*/ if (aCompat.GetBytesLeft ())
+/*N*/ {
+/*N*/ rIn >> bMyDoubleSided;
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(bMyDoubleSided));
+/*N*/ }
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft())
+/*N*/ {
+/*N*/ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+/*N*/ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+/*N*/ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+/*N*/ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+/*N*/ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+/*N*/ // E3dCompoundObject oder E3dObject aendern.
+/*N*/ BOOL bTmp, bTmp2;
+/*N*/ sal_uInt16 nTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DDoubleSidedItem(bTmp));
+/*N*/
+/*N*/ rIn >> bTmp; bCreateNormals = bTmp;
+/*N*/ rIn >> bTmp; bCreateTexture = bTmp;
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DNormalsKindItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionXItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ rIn >> bTmp2;
+/*N*/ if(bTmp == FALSE && bTmp2 == FALSE)
+/*N*/ nTmp = 0;
+/*N*/ else if(bTmp == TRUE && bTmp2 == FALSE)
+/*N*/ nTmp = 1;
+/*N*/ else
+/*N*/ nTmp = 2;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureProjectionYItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DShadow3DItem(bTmp));
+/*N*/
+/*N*/ Color aCol;
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ SetMaterialAmbientColor(aCol);
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ // do NOT use, this is the old 3D-Color(!)
+/*N*/ // SetItem(XFillColorItem(String(), aCol));
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialSpecularItem(aCol));
+/*N*/
+/*N*/ rIn >> aCol;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialEmissionItem(aCol));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DMaterialSpecularIntensityItem(nTmp));
+/*N*/
+/*N*/ aBackMaterial.ReadData(rIn);
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureKindItem(nTmp));
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureModeItem(nTmp));
+/*N*/
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DNormalsInvertItem(bTmp));
+/*N*/
+/*N*/ }
+/*N*/
+/*N*/ // neu ab 534: (hat noch gefehlt)
+/*N*/ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+/*N*/ {
+/*N*/ BOOL bTmp;
+/*N*/ rIn >> bTmp;
+/*N*/ mpObjectItemSet->Put(Svx3DTextureFilterItem(bTmp));
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ DBG_ERROR("AW: Kugel laden: nicht vorgesehener Fall");
+/*N*/ }
+/*N*/ pLoadedE3dPolyObjs->Clear();
+/*N*/ delete pLoadedE3dPolyObjs;
+/*N*/ }
+/*N*/
+/*N*/ // Geometrie neu erzeugen
+/*N*/ ReCreateGeometry();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+/*N*/ void E3dSphereObj::SetCenter(const Vector3D& rNew)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void E3dSphereObj::SetSize(const Vector3D& rNew)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ void E3dSphereObj::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ E3dCompoundObject::PostItemChange(nWhich);
+/*N*/
+/*N*/ // local changes
+/*N*/ switch(nWhich)
+/*N*/ {
+/*N*/ case SDRATTR_3DOBJ_HORZ_SEGS:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRATTR_3DOBJ_VERT_SEGS:
+/*N*/ {
+/*N*/ bGeometryValid = FALSE;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+
+// EOF
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_svx3ditems.cxx b/binfilter/bf_svx/source/engine3d/svx_svx3ditems.cxx
new file mode 100644
index 000000000000..fb5c44d03631
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_svx3ditems.cxx
@@ -0,0 +1,531 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svx3ditems.hxx"
+
+#include <com/sun/star/drawing/NormalsKind.hpp>
+
+#include <com/sun/star/drawing/TextureProjectionMode.hpp>
+
+#include <com/sun/star/drawing/TextureKind.hpp>
+
+#include <com/sun/star/drawing/TextureMode.hpp>
+
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+
+#include <com/sun/star/drawing/ShadeMode.hpp>
+
+#include "xdef.hxx"
+
+namespace binfilter {
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+/*N*/ Svx3DPercentDiagonalItem::Svx3DPercentDiagonalItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DDepthItem::Svx3DDepthItem(sal_uInt32 nVal)
+/*N*/ : SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DHorizontalSegmentsItem::Svx3DHorizontalSegmentsItem(sal_uInt32 nVal)
+/*N*/ : SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DVerticalSegmentsItem::Svx3DVerticalSegmentsItem(sal_uInt32 nVal)
+/*N*/ : SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DEndAngleItem::Svx3DEndAngleItem(sal_uInt32 nVal)
+/*N*/ : SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DDoubleSidedItem::Svx3DDoubleSidedItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DNormalsKindItem::Svx3DNormalsKindItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DNormalsInvertItem::Svx3DNormalsInvertItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DTextureProjectionXItem::Svx3DTextureProjectionXItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DShadow3DItem::Svx3DShadow3DItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DMaterialColorItem::Svx3DMaterialColorItem(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_COLOR)
+/*N*/ {}
+
+/*N*/ Svx3DMaterialEmissionItem::Svx3DMaterialEmissionItem(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION)
+/*N*/ {}
+
+/*N*/ Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR)
+/*N*/ {}
+
+/*N*/ Svx3DMaterialSpecularIntensityItem::Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DTextureFilterItem::Svx3DTextureFilterItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DDistanceItem::Svx3DDistanceItem(sal_uInt32 nVal)
+/*N*/ : SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DFocalLengthItem::Svx3DFocalLengthItem(sal_uInt32 nVal)
+/*N*/ : SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DTwoSidedLightingItem::Svx3DTwoSidedLightingItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor1Item::Svx3DLightcolor1Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor2Item::Svx3DLightcolor2Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor3Item::Svx3DLightcolor3Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor4Item::Svx3DLightcolor4Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor5Item::Svx3DLightcolor5Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor6Item::Svx3DLightcolor6Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor7Item::Svx3DLightcolor7Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7)
+/*N*/ {}
+
+/*N*/ Svx3DLightcolor8Item::Svx3DLightcolor8Item(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8)
+/*N*/ {}
+
+/*N*/ Svx3DAmbientcolorItem::Svx3DAmbientcolorItem(const Color& rCol)
+/*N*/ : SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff1Item::Svx3DLightOnOff1Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff2Item::Svx3DLightOnOff2Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff3Item::Svx3DLightOnOff3Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff4Item::Svx3DLightOnOff4Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff5Item::Svx3DLightOnOff5Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff6Item::Svx3DLightOnOff6Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff7Item::Svx3DLightOnOff7Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal)
+/*N*/ {}
+
+/*N*/ Svx3DLightOnOff8Item::Svx3DLightOnOff8Item(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal)
+/*N*/ {}
+/*N*/
+/*N*/ Svx3DLightDirection1Item::Svx3DLightDirection1Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection2Item::Svx3DLightDirection2Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection3Item::Svx3DLightDirection3Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection4Item::Svx3DLightDirection4Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection5Item::Svx3DLightDirection5Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection6Item::Svx3DLightDirection6Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection7Item::Svx3DLightDirection7Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DLightDirection8Item::Svx3DLightDirection8Item(const Vector3D& rVec)
+/*N*/ : SvxVector3DItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec)
+/*N*/ {}
+
+/*N*/ Svx3DShadowSlantItem::Svx3DShadowSlantItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal)
+/*N*/ {}
+
+/*N*/ Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal)
+/*N*/ : SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal)
+/*N*/ {}
+
+//////////////////////////////////////////////////////////////////////////////
+// #107245#
+
+/*N*/ Svx3DSmoothNormalsItem::Svx3DSmoothNormalsItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal)
+/*N*/ {}
+
+/*N*/ sal_uInt16 Svx3DSmoothNormalsItem::GetVersion(sal_uInt16 nFileFormatVersion) const
+/*N*/ {
+/*N*/ return 1;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DSmoothNormalsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
+/*N*/ {
+/*N*/ SfxBoolItem* pRetval = new Svx3DSmoothNormalsItem();
+/*N*/
+/*N*/ if(nItemVersion > 0)
+/*N*/ {
+/*?*/ SfxBoolItem aBoolItem(Which(), rIn);
+/*?*/ pRetval->SetValue(aBoolItem.GetValue());
+/*N*/ }
+/*N*/
+/*N*/ return pRetval;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// #107245#
+
+/*N*/ Svx3DSmoothLidsItem::Svx3DSmoothLidsItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal)
+/*N*/ {}
+
+/*N*/ sal_uInt16 Svx3DSmoothLidsItem::GetVersion(sal_uInt16 nFileFormatVersion) const
+/*N*/ {
+/*N*/ return 1;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DSmoothLidsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
+/*N*/ {
+/*N*/ SfxBoolItem* pRetval = new Svx3DSmoothLidsItem();
+/*N*/
+/*N*/ if(nItemVersion > 0)
+/*N*/ {
+/*?*/ SfxBoolItem aBoolItem(Which(), rIn);
+/*?*/ pRetval->SetValue(aBoolItem.GetValue());
+/*N*/ }
+/*N*/
+/*N*/ return pRetval;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// #107245#
+
+/*N*/ Svx3DCharacterModeItem::Svx3DCharacterModeItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal)
+/*N*/ {}
+
+/*N*/ sal_uInt16 Svx3DCharacterModeItem::GetVersion(sal_uInt16 nFileFormatVersion) const
+/*N*/ {
+/*N*/ return 1;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DCharacterModeItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
+/*N*/ {
+/*N*/ SfxBoolItem* pRetval = new Svx3DCharacterModeItem();
+/*N*/
+/*N*/ if(nItemVersion > 0)
+/*N*/ {
+/*?*/ SfxBoolItem aBoolItem(Which(), rIn);
+/*?*/ pRetval->SetValue(aBoolItem.GetValue());
+/*N*/ }
+/*N*/
+/*N*/ return pRetval;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// #107245#
+
+/*N*/ Svx3DCloseFrontItem::Svx3DCloseFrontItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal)
+/*N*/ {}
+
+/*N*/ sal_uInt16 Svx3DCloseFrontItem::GetVersion(sal_uInt16 nFileFormatVersion) const
+/*N*/ {
+/*N*/ return 1;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DCloseFrontItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
+/*N*/ {
+/*N*/ SfxBoolItem* pRetval = new Svx3DCloseFrontItem();
+/*N*/
+/*N*/ if(nItemVersion > 0)
+/*N*/ {
+/*?*/ SfxBoolItem aBoolItem(Which(), rIn);
+/*?*/ pRetval->SetValue(aBoolItem.GetValue());
+/*N*/ }
+/*N*/
+/*N*/ return pRetval;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+// #107245#
+
+/*N*/ Svx3DCloseBackItem::Svx3DCloseBackItem(BOOL bVal)
+/*N*/ : SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal)
+/*N*/ {}
+
+/*N*/ sal_uInt16 Svx3DCloseBackItem::GetVersion(sal_uInt16 nFileFormatVersion) const
+/*N*/ {
+/*N*/ return 1;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DCloseBackItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) const
+/*N*/ {
+/*N*/ SfxBoolItem* pRetval = new Svx3DCloseBackItem();
+/*N*/
+/*N*/ if(nItemVersion > 0)
+/*N*/ {
+/*?*/ SfxBoolItem aBoolItem(Which(), rIn);
+/*?*/ pRetval->SetValue(aBoolItem.GetValue());
+/*N*/ }
+/*N*/
+/*N*/ return pRetval;
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+
+// Svx3DNormalsKindItem: use drawing::NormalsKind
+/*N*/ bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::NormalsKind)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::NormalsKind eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DNormalsKindItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DNormalsKindItem(*this);
+/*N*/ }
+
+// Svx3DTextureProjectionXItem: use drawing::TextureProjectionMode
+/*N*/ bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::TextureProjectionMode)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::TextureProjectionMode eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DTextureProjectionXItem(*this);
+/*N*/ }
+
+// Svx3DTextureProjectionYItem: use drawing::TextureProjectionMode
+/*N*/ bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::TextureProjectionMode)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::TextureProjectionMode eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DTextureProjectionYItem(*this);
+/*N*/ }
+
+// Svx3DTextureKindItem: use drawing::TextureKind
+/*N*/ bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::TextureKind)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::TextureKind eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DTextureKindItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DTextureKindItem(*this);
+/*N*/ }
+
+// Svx3DTextureModeItem: use drawing:TextureMode
+/*N*/ bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::TextureMode)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::TextureMode eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DTextureModeItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DTextureModeItem(*this);
+/*N*/ }
+
+// Svx3DPerspectiveItem: use drawing::ProjectionMode
+/*N*/ bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::ProjectionMode)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::ProjectionMode eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DPerspectiveItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DPerspectiveItem(*this);
+/*N*/ }
+
+// Svx3DShadeModeItem: use drawing::ShadeMode
+/*N*/ bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, BYTE nMemberId) const
+/*N*/ {
+/*N*/ rVal <<= (drawing::ShadeMode)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ drawing::ShadeMode eVar;
+/*N*/ if(!(rVal >>= eVar))
+/*N*/ return false;
+/*N*/ SetValue((sal_Int16)eVar);
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SfxPoolItem* Svx3DShadeModeItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new Svx3DShadeModeItem(*this);
+/*N*/ }
+
+// EOF
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_view3d.cxx b/binfilter/bf_svx/source/engine3d/svx_view3d.cxx
new file mode 100644
index 000000000000..7187b67b9e40
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_view3d.cxx
@@ -0,0 +1,249 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define ITEMID_COLOR 0
+
+
+
+
+
+
+
+
+
+
+
+#include "xoutx.hxx"
+
+#include <svxids.hrc>
+
+
+#include "xtable.hxx"
+
+
+#include "dialogs.hrc"
+
+
+
+
+
+
+
+
+
+
+#include "polysc3d.hxx"
+
+
+#include "view3d.hxx"
+
+
+
+
+
+
+
+namespace binfilter {
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+/*N*/ 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
+|*
+\************************************************************************/
+
+/*N*/ E3dView::E3dView(SdrModel* pModel, OutputDevice* pOut) :
+/*N*/ SdrView(pModel, pOut)
+/*N*/ {
+/*N*/ InitView ();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ E3dView::~E3dView ()
+/*N*/ {
+/*N*/ /*#90353#*/delete [] pMirrorPolygon;
+/*N*/ /*#90353#*/delete [] pMirroredPolygon;
+/*N*/ /*#90353#*/delete [] pMarkedObjs;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Klasse initialisieren
+|*
+\************************************************************************/
+
+/*N*/ void E3dView::InitView ()
+/*N*/ {
+/*N*/ eDragConstraint = E3DDRAG_CONSTR_XYZ;
+/*N*/ eDragDetail = E3DDETAIL_ONEBOX;
+/*N*/ b3dCreationActive = FALSE;
+/*N*/ pMirrorPolygon = 0;
+/*N*/ pMirroredPolygon = 0;
+/*N*/ nPolyCnt = 0;
+/*N*/ pMyPV = 0;
+/*N*/ pMarkedObjs = 0;
+/*N*/ fDefaultScaleX =
+/*N*/ fDefaultScaleY =
+/*N*/ fDefaultScaleZ = 1.0;
+/*N*/ fDefaultRotateX =
+/*N*/ fDefaultRotateY =
+/*N*/ fDefaultRotateZ = 0.0;
+/*N*/ fDefaultExtrusionDeepth = 1000; // old: 2000;
+/*N*/ fDefaultLightIntensity = 0.8; // old: 0.6;
+/*N*/ fDefaultAmbientIntensity = 0.4;
+/*N*/ nHDefaultSegments = 12;
+/*N*/ nVDefaultSegments = 12;
+/*N*/ aDefaultLightColor = RGB_Color(COL_WHITE);
+/*N*/ aDefaultAmbientColor = RGB_Color(COL_BLACK);
+/*N*/ aDefaultLightPos = Vector3D (1, 1, 1); // old: Vector3D (0, 0, 1);
+/*N*/ aDefaultLightPos.Normalize();
+/*N*/ bDoubleSided = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Zeige eine Hilfsfigur
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Verdecke eine Hilfsfigur
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Zeige eine Hilfsfigur
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Koennen die selektierten Objekte aufgebrochen werden?
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Selektierte Lathe-Objekte aufbrechen
+|*
+\************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Szenen mischen
+|*
+\************************************************************************/
+// Wird bisher noch nirgenswo (weder im Draw oder Chart) aufgerufen
+
+
+/*************************************************************************
+|*
+|* Possibilities, hauptsaechlich gruppieren/ungruppieren
+|*
+\************************************************************************/
+/*N*/ void E3dView::CheckPossibilities()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrView::CheckPossibilities();
+/*N*/
+/*N*/ // Weitere Flags bewerten
+/*N*/ if(bGroupPossible || bUnGroupPossible || bGrpEnterPossible)
+/*N*/ {
+/*?*/ 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;
+/*N*/ }
+
+// bGroupPossible
+// bCombinePossible
+// bUnGroupPossible
+// bGrpEnterPossible
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_viewpt3d.cxx b/binfilter/bf_svx/source/engine3d/svx_viewpt3d.cxx
new file mode 100644
index 000000000000..fe2ddfd87b85
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_viewpt3d.cxx
@@ -0,0 +1,565 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "viewpt3d.hxx"
+
+#include "volume3d.hxx"
+
+#include "svdio.hxx"
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+/*N*/ Viewport3D::Viewport3D() :
+/*N*/ aVRP(0, 0, 5),
+/*N*/ aVPN(0, 0, 1),
+/*N*/ aVUV(0, 1, 1),
+/*N*/ aPRP(0, 0, 2),
+/*N*/ fVPD(-3),
+/*N*/ aViewPoint (0, 0, 5000),
+/*N*/ fNearClipDist (0.0),
+/*N*/ fFarClipDist (0.0),
+/*N*/ fWRatio (1.0),
+/*N*/ fHRatio (1.0),
+/*N*/ eProjection(PR_PERSPECTIVE),
+/*N*/ eAspectMapping(AS_NO_MAPPING),
+/*N*/ bTfValid(0),
+/*N*/ // DeviceRect-Groesse < 0 -> ungueltig
+/*N*/ aDeviceRect(Point(0,0), Size(-1,-1))
+/*N*/ {
+/*N*/ aViewWin.X = -1; aViewWin.Y = -1;
+/*N*/ aViewWin.W = 2; aViewWin.H = 2;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* View-Transformationsmatrix berechnen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::MakeTransform(void)
+/*N*/ {
+/*N*/ if ( !bTfValid )
+/*N*/ {
+/*N*/ double fV, fXupVp, fYupVp;
+/*N*/ aViewPoint = aVRP + aVPN * aPRP.Z();
+/*N*/
+/*N*/ // auf Einheitsmatrix zuruecksetzen
+/*N*/ aViewTf.Identity();
+/*N*/
+/*N*/ // in den Ursprung verschieben
+/*N*/ aViewTf.Translate(-aVRP);
+/*N*/
+/*N*/ // fV = Laenge der Projektion von aVPN auf die yz-Ebene:
+/*N*/ fV = aVPN.GetYZLength();
+/*N*/
+/*N*/ if ( fV != 0 )
+/*N*/ aViewTf.RotateX(aVPN.Y() / fV, aVPN.Z() / fV);
+/*N*/
+/*N*/ aViewTf.RotateY(- aVPN.X(), fV);
+/*N*/ // X- und Y-Koordinaten des View Up Vektors in das (vorlaeufige)
+/*N*/ // View-Koordinatensytem umrechnen
+/*N*/ fXupVp = aViewTf[0][0] * aVUV[0] + aViewTf[0][1] * aVUV[1] + aViewTf[0][2] * aVUV[2];
+/*N*/ fYupVp = aViewTf[1][0] * aVUV[0] + aViewTf[1][1] * aVUV[1] + aViewTf[1][2] * aVUV[2];
+/*N*/ fV = sqrt(fXupVp * fXupVp + fYupVp * fYupVp);
+/*N*/ if ( fV != 0 )
+/*N*/ aViewTf.RotateZ(fXupVp / fV, fYupVp / fV);
+/*N*/
+/*N*/ aViewTf = Matrix4D(aViewTf);
+/*N*/ bTfValid = TRUE;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ViewWindow (in View-Koordinaten) setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetViewWindow(double fX, double fY, double fW, double fH)
+/*N*/ {
+/*N*/ aViewWin.X = fX;
+/*N*/ aViewWin.Y = fY;
+/*N*/ if ( fW > 0 ) aViewWin.W = fW;
+/*N*/ else aViewWin.W = 1.0;
+/*N*/ if ( fH > 0 ) aViewWin.H = fH;
+/*N*/ else aViewWin.H = 1.0;
+/*N*/
+/*N*/ fWRatio = aDeviceRect.GetWidth() / aViewWin.W;
+/*N*/ fHRatio = aDeviceRect.GetHeight() / aViewWin.H;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ViewWindow zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* View-Window genau um das mit rTransform transformierte Volumen legen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::FitViewToVolume(const Volume3D& rVolume, Matrix4D aTransform)
+/*N*/ {
+/*N*/ Vector3D aTfVec;
+/*N*/ Volume3D aFitVol;
+/*N*/
+/*N*/ aTransform *= GetViewTransform();
+/*N*/ Vol3DPointIterator aIter(rVolume, &aTransform);
+/*N*/
+/*N*/ while ( aIter.Next(aTfVec) )
+/*N*/ {
+/*N*/ DoProjection(aTfVec);
+/*N*/ aFitVol.Union(aTfVec);
+/*N*/ }
+/*N*/ SetViewWindow(aFitVol.MinVec().X(), aFitVol.MinVec().Y(),
+/*N*/ aFitVol.GetWidth(), aFitVol.GetHeight());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* DeviceWindow des Ausgabegeraetes setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetDeviceWindow(const Rectangle& rRect)
+/*N*/ {
+/*N*/ long nNewW = rRect.GetWidth();
+/*N*/ long nNewH = rRect.GetHeight();
+/*N*/ long nOldW = aDeviceRect.GetWidth();
+/*N*/ long nOldH = aDeviceRect.GetHeight();
+/*N*/
+/*N*/ switch ( eAspectMapping )
+/*N*/ {
+/*N*/ double fRatio, fTmp;
+/*N*/
+/*N*/ // Mapping, ohne die reale Groesse der Objekte im Device-Window
+/*N*/ // zu aendern
+/*N*/ case AS_HOLD_SIZE:
+/*N*/ // Wenn Device ungueltig (w, h = -1), zunaechst
+/*N*/ // View mit AsHoldX anpassen
+/*N*/ if ( nOldW > 0 && nOldH > 0 )
+/*N*/ {
+/*N*/ fRatio = (double) nNewW / nOldW;
+/*N*/ aViewWin.X *= fRatio;
+/*N*/ aViewWin.W *= fRatio;
+/*N*/ fRatio = (double) nNewH / nOldH;
+/*N*/ aViewWin.Y *= fRatio;
+/*N*/ aViewWin.H *= fRatio;
+/*N*/ break;
+/*N*/ }
+/*N*/ case AS_HOLD_X:
+/*N*/ // View-Hoehe an -Breite anpassen
+/*N*/ fRatio = (double) nNewH / nNewW;
+/*N*/ fTmp = aViewWin.H;
+/*N*/ aViewWin.H = aViewWin.W * fRatio;
+/*N*/ aViewWin.Y = aViewWin.Y * aViewWin.H / fTmp;
+/*N*/ break;
+/*N*/
+/*N*/ case AS_HOLD_Y:
+/*N*/ // View-Breite an -Hoehe anpassen
+/*N*/ fRatio = (double) nNewW / nNewH;
+/*N*/ fTmp = aViewWin.W;
+/*N*/ aViewWin.W = aViewWin.H * fRatio;
+/*N*/ aViewWin.X = aViewWin.X * aViewWin.W / fTmp;
+/*N*/ break;
+/*N*/ }
+/*N*/ fWRatio = nNewW / aViewWin.W;
+/*N*/ fHRatio = nNewH / aViewWin.H;
+/*N*/
+/*N*/ aDeviceRect = rRect;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Beobachterposition (PRP) in Weltkoordinaten zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ const Vector3D& Viewport3D::GetViewPoint()
+/*N*/ {
+/*N*/ MakeTransform();
+/*N*/
+/*N*/ return aViewPoint;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformationsmatrix zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ const Matrix4D& Viewport3D::GetViewTransform()
+/*N*/ {
+/*N*/ MakeTransform();
+/*N*/
+/*N*/ return aViewTf;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* uebergebenen Punkt transformieren
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* neuen Punkt transformiert zurueckgeben
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* 3D-Punkt auf Viewplane projizieren
+|*
+\************************************************************************/
+
+/*N*/ Vector3D& Viewport3D::DoProjection(Vector3D& rVec) const
+/*N*/ {
+/*N*/ if ( eProjection == PR_PERSPECTIVE )
+/*N*/ {
+/*N*/ double fPrDist = fVPD - aPRP.Z();
+/*N*/
+/*N*/ if ( aPRP.Z() == rVec.Z() )
+/*?*/ rVec.X() = rVec.Y() = 0;
+/*N*/ else
+/*N*/ {
+ // 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;
+*/
+/*N*/ fPrDist /= rVec.Z() - aPRP.Z();
+/*N*/ rVec.X() *= fPrDist;
+/*N*/ rVec.Y() *= fPrDist;
+/*N*/ }
+/*N*/ }
+/*N*/ return rVec;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 3D-Punkt auf Geraetekoordinaten mappen
+|*
+\************************************************************************/
+
+/*N*/ Vector3D Viewport3D::MapToDevice(const Vector3D& rVec) const
+/*N*/ {
+/*N*/ Vector3D aRetval;
+/*N*/
+/*N*/ // Y-Koordinate subtrahieren, da die Device-Y-Achse von oben
+/*N*/ // nach unten verlaeuft
+/*N*/ aRetval.X() = (double)aDeviceRect.Left() + ((rVec.X() - aViewWin.X) * fWRatio);
+/*N*/ aRetval.Y() = (double)aDeviceRect.Bottom() - ((rVec.Y() - aViewWin.Y) * fHRatio);
+/*N*/ aRetval.Z() = rVec.Z();
+/*N*/
+/*N*/ return aRetval;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 3D-Punkt auf Viewplane projizieren und auf Geraetekoordinaten mappen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Device-Werte fuer Breite und Hoehe des Vektors in View-Werte
+|* wandeln, abhaengig von der Projektion
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* View Reference Point setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetVRP(const Vector3D& rNewVRP)
+/*N*/ {
+/*N*/ aVRP = rNewVRP;
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* View Plane Normal setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetVPN(const Vector3D& rNewVPN)
+/*N*/ {
+/*N*/ aVPN = rNewVPN;
+/*N*/ aVPN.Normalize();
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* View Up Vector setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetVUV(const Vector3D& rNewVUV)
+/*N*/ {
+/*N*/ aVUV = rNewVUV;
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Center Of Projection setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetPRP(const Vector3D& rNewPRP)
+/*N*/ {
+/*N*/ aPRP = rNewPRP;
+/*N*/ aPRP.X() = 0;
+/*N*/ aPRP.Y() = 0;
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* View Plane Distance setzen
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::SetVPD(double fNewVPD)
+/*N*/ {
+/*N*/ fVPD = fNewVPD;
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Abstand der vorderen Clippingebene setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Abstand der hinteren Clippingebene setzen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Viewport3D (Version 3.1)
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::WriteData31(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ rOut << aVRP;
+/*N*/ rOut << aVPN;
+/*N*/ rOut << aVUV;
+/*N*/ rOut << aPRP;
+/*N*/ rOut << fVPD;
+/*N*/ rOut << fNearClipDist;
+/*N*/ rOut << fFarClipDist;
+/*N*/ rOut << UINT16(eProjection);
+/*N*/ rOut << UINT16(eAspectMapping);
+/*N*/ rOut << aDeviceRect;
+/*N*/ rOut << aViewWin.X;
+/*N*/ rOut << aViewWin.Y;
+/*N*/ rOut << aViewWin.W;
+/*N*/ rOut << aViewWin.H;
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Viewport3D ab File-Revision 13
+|* implementiert zum Hauptupdate 355 am 4.2.97 FG (freigegeben ab 356)
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (rOut.GetVersion() < 3560)
+/*N*/ {
+/*N*/ Viewport3D::WriteData31(rOut);
+/*N*/ return;
+/*N*/ }
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("Viewport3D");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aVRP;
+/*N*/ rOut << aVPN;
+/*N*/ rOut << aVUV;
+/*N*/ rOut << aPRP;
+/*N*/ rOut << fVPD;
+/*N*/ rOut << fNearClipDist;
+/*N*/ rOut << fFarClipDist;
+/*N*/ rOut << UINT16(eProjection);
+/*N*/ rOut << UINT16(eAspectMapping);
+/*N*/ rOut << aDeviceRect;
+/*N*/ rOut << aViewWin.X;
+/*N*/ rOut << aViewWin.Y;
+/*N*/ rOut << aViewWin.W;
+/*N*/ rOut << aViewWin.H;
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Viewport3D fuer die Version 3.1
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::ReadData31(SvStream& rIn)
+/*N*/ {
+/*N*/ UINT16 nTmp16;
+/*N*/
+/*N*/ rIn >> aVRP;
+/*N*/ rIn >> aVPN;
+/*N*/ rIn >> aVUV;
+/*N*/ rIn >> aPRP;
+/*N*/ rIn >> fVPD;
+/*N*/ rIn >> fNearClipDist;
+/*N*/ rIn >> fFarClipDist;
+/*N*/ rIn >> nTmp16; eProjection = ProjectionType(nTmp16);
+/*N*/ rIn >> nTmp16; eAspectMapping = AspectMapType(nTmp16);
+/*N*/ rIn >> aDeviceRect;
+/*N*/ rIn >> aViewWin.X;
+/*N*/ rIn >> aViewWin.Y;
+/*N*/ rIn >> aViewWin.W;
+/*N*/ rIn >> aViewWin.H;
+/*N*/
+/*N*/ // es gibt einige Docs mit zweifelhaften werten, daher wird die Dist auf 0 gesetzt
+/*N*/ if ((fNearClipDist <= 1e-100) || (fNearClipDist >= 1e100)) fNearClipDist = 0.0;
+/*N*/ if ((fFarClipDist <= 1e-100) || (fFarClipDist >= 1e100)) fFarClipDist = 0.0;
+/*N*/
+/*N*/ fWRatio = aDeviceRect.GetWidth() / aViewWin.W;
+/*N*/ fHRatio = aDeviceRect.GetHeight() / aViewWin.H;
+/*N*/
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ReadData-Methode fuer Viewport3D, gueltig fuer Filerevisionen ab 13
+|* eingecheckt ab Revision 355 am 4.2.97 (FG) (freigegeben ab 356)
+|*
+\************************************************************************/
+
+/*N*/ void Viewport3D::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+/*N*/ {
+/*N*/ Viewport3D::ReadData31 (rIn);
+/*N*/ return;
+/*N*/ }
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("Viewport3D");
+/*N*/ #endif
+/*N*/
+/*N*/ UINT16 nTmp16;
+/*N*/
+/*N*/ rIn >> aVRP;
+/*N*/ rIn >> aVPN;
+/*N*/ rIn >> aVUV;
+/*N*/ rIn >> aPRP;
+/*N*/ rIn >> fVPD;
+/*N*/ rIn >> fNearClipDist;
+/*N*/ rIn >> fFarClipDist;
+/*N*/ rIn >> nTmp16; eProjection = ProjectionType(nTmp16);
+/*N*/ rIn >> nTmp16; eAspectMapping = AspectMapType(nTmp16);
+/*N*/ rIn >> aDeviceRect;
+/*N*/ rIn >> aViewWin.X;
+/*N*/ rIn >> aViewWin.Y;
+/*N*/ rIn >> aViewWin.W;
+/*N*/ rIn >> aViewWin.H;
+/*N*/
+/*N*/ // es gibt einige Docs mit zweifelhaften werten, daher wird die Dist auf 0 gesetzt
+/*N*/ if ((fNearClipDist <= 1e-100) || (fNearClipDist >= 1e100)) fNearClipDist = 0.0;
+/*N*/ if ((fFarClipDist <= 1e-100) || (fFarClipDist >= 1e100)) fFarClipDist = 0.0;
+/*N*/
+/*N*/ fWRatio = aDeviceRect.GetWidth() / aViewWin.W;
+/*N*/ fHRatio = aDeviceRect.GetHeight() / aViewWin.H;
+/*N*/
+/*N*/ bTfValid = FALSE;
+/*N*/ }
+
+
+// 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
+|*
+\************************************************************************/
+
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ SvStream& operator<<(SvStream& rOStream, const Viewport3D& rViewpt)
+/*N*/ {
+/*N*/ rViewpt.WriteData31(rOStream);
+/*N*/ return rOStream;
+/*N*/ }
+/*N*/ #endif
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Viewport3D
+|*
+\************************************************************************/
+
+/*N*/ SvStream& operator>>(SvStream& rIStream, Viewport3D& rViewpt)
+/*N*/ {
+/*N*/ rViewpt.ReadData31(rIStream);
+/*N*/ return rIStream;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/engine3d/svx_volume3d.cxx b/binfilter/bf_svx/source/engine3d/svx_volume3d.cxx
new file mode 100644
index 000000000000..a6c4957c1fca
--- /dev/null
+++ b/binfilter/bf_svx/source/engine3d/svx_volume3d.cxx
@@ -0,0 +1,152 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "poly3d.hxx"
+
+
+#include <tools/debug.hxx>
+namespace binfilter {
+
+/*************************************************************************
+|*
+|* Konstruktor 1: |
+|* rPos: Zentrum oder minimale Koordinate links, unten, hinten |__
+|* (abhaengig von bPosIsCenter) /
+|*
+\************************************************************************/
+
+/*N*/ Volume3D::Volume3D(const Vector3D& rPos, const Vector3D& r3DSize, BOOL bPosIsCenter)
+/*N*/ : B3dVolume(rPos, r3DSize, bPosIsCenter)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Konstruktor 2 - leeres Volumen, Werte als ungueltig markieren
+|*
+\************************************************************************/
+
+/*N*/ Volume3D::Volume3D() : B3dVolume()
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Transformation des Volumens berechnen und als neues Volumen
+|* zurueckgeben
+|*
+\************************************************************************/
+
+/*N*/ Volume3D Volume3D::GetTransformVolume(const Matrix4D& rTfMatrix) const
+/*N*/ {
+/*N*/ Volume3D aTfVol;
+/*N*/
+/*N*/ if(IsValid())
+/*N*/ {
+/*N*/ Vector3D aTfVec;
+/*N*/ Vol3DPointIterator aIter(*this, &rTfMatrix);
+/*N*/
+/*N*/ while(aIter.Next(aTfVec))
+/*N*/ aTfVol.Union(aTfVec);
+/*N*/ }
+/*N*/ return aTfVol;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Drahtgitter-Linien fuer das Volumen berechnen und in rPoly3D ablegen
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Konstruktor des Point-Iterators
+|*
+\************************************************************************/
+
+/*N*/ Vol3DPointIterator::Vol3DPointIterator(const Volume3D& rVol, const Matrix4D* pTf)
+/*N*/ : rVolume(rVol),
+/*N*/ pTransform(pTf),
+/*N*/ nIndex(0)
+/*N*/ {
+/*N*/ DBG_ASSERT(rVol.IsValid(), "Vol3DPointIterator-Aufruf mit ungueltigem Volume3D!");
+/*N*/ a3DExtent = rVolume.aMaxVec - rVolume.aMinVec;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Gibt die einzelnen Punkte des (ggf. transformierten) Volumens zurueck
+|*
+|* 4---5 -> Reihenfolge der Punktausgabe (untransformiert)
+|* /| /|
+|* 7---6 |
+|* | 0-|-1
+|* |/ |/
+|* 3---2
+|*
+\************************************************************************/
+
+/*N*/ BOOL Vol3DPointIterator::Next(Vector3D& rVec)
+/*N*/ {
+/*N*/ if(nIndex > 7)
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rVec = rVolume.aMinVec;
+/*N*/
+/*N*/ if(nIndex >= 4)
+/*N*/ rVec.Y() += a3DExtent.Y();
+/*N*/
+/*N*/ switch(nIndex)
+/*N*/ {
+/*N*/ case 6:
+/*N*/ case 2: rVec.Z() += a3DExtent.Z();
+/*N*/ case 5:
+/*N*/ case 1: rVec.X() += a3DExtent.X();
+/*N*/ break;
+/*N*/ case 7:
+/*N*/ case 3: rVec.Z() += a3DExtent.Z();
+/*N*/ break;
+/*N*/ }
+/*N*/ nIndex++;
+/*N*/
+/*N*/ if(pTransform)
+/*N*/ rVec *= *pTransform;
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/makefile.mk b/binfilter/bf_svx/source/form/makefile.mk
new file mode 100644
index 000000000000..9dc029e66022
--- /dev/null
+++ b/binfilter/bf_svx/source/form/makefile.mk
@@ -0,0 +1,77 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_form
+
+NO_HIDS=TRUE
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+BMP_IN=$(BFPRJ)$/win$/res
+
+SRS1NAME=svx_form
+SRC1FILES= \
+ svx_fmexpl.src \
+ svx_filtnav.src \
+ svx_taborder.src \
+ svx_fmstring.src \
+ svx_tbxform.src \
+ svx_fmsearch.src
+
+
+SLOFILES = \
+ $(SLO)$/svx_fmpage.obj \
+ $(SLO)$/svx_fmmodel.obj \
+ $(SLO)$/svx_fmdpage.obj \
+ $(SLO)$/svx_fmobj.obj \
+ $(SLO)$/svx_fmobjfac.obj \
+ $(SLO)$/svx_fmimplids.obj \
+ $(SLO)$/svx_fmdmod.obj \
+ $(SLO)$/svx_ParseContext.obj \
+ $(SLO)$/svx_siimport.obj \
+ $(SLO)$/svx_fmtools.obj \
+ $(SLO)$/svx_fmpgeimp.obj
+
+.IF "$(OS)$(CPU)"=="SOLARISI"
+NOOPTFILES=$(SLO)$/svx_fmprop.obj
+.ENDIF
+
+.INCLUDE : target.mk
diff --git a/binfilter/bf_svx/source/form/svx_ParseContext.cxx b/binfilter/bf_svx/source/form/svx_ParseContext.cxx
new file mode 100644
index 000000000000..bc90a9534ab3
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_ParseContext.cxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "ParseContext.hxx"
+#include <tools/debug.hxx>
+#include "fmresids.hrc"
+#include "dialmgr.hxx"
+#include <vcl/svapp.hxx>
+#include <osl/mutex.hxx>
+
+#include <tools/shl.hxx>
+
+namespace binfilter {
+
+
+using namespace svxform;
+using namespace ::connectivity;
+//==========================================================================
+//= OSystemParseContext
+//==========================================================================
+/*N*/ DBG_NAME(OSystemParseContext)
+//-----------------------------------------------------------------------------
+/*N*/ OSystemParseContext::OSystemParseContext() : IParseContext()
+/*N*/ {
+/*N*/ DBG_CTOR(OSystemParseContext,NULL);
+/*N*/ SolarMutexGuard aGuard;
+/*N*/ m_aSQLInternationals = ByteString(SVX_RES(RID_STR_SVT_SQL_INTERNATIONAL),RTL_TEXTENCODING_ASCII_US);
+/*N*/ }
+
+//-----------------------------------------------------------------------------
+/*?*/ OSystemParseContext::~OSystemParseContext()
+/*?*/ {
+/*?*/ DBG_DTOR(OSystemParseContext,NULL);
+/*?*/ }
+
+//-----------------------------------------------------------------------------
+/*?*/ ::com::sun::star::lang::Locale OSystemParseContext::getPreferredLocale( ) const
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); ::com::sun::star::lang::Locale alocal; return alocal;//STRIP001
+/*?*/ //STRIP001 return SvtSysLocale().GetLocaleData().getLocale();
+/*?*/ }
+
+//-----------------------------------------------------------------------------
+/*?*/ ::rtl::OUString OSystemParseContext::getErrorMessage(ErrorCode _eCode) const
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); String astring; return astring;//STRIP001
+/*?*/ }
+
+//-----------------------------------------------------------------------------
+/*?*/ ::rtl::OString OSystemParseContext::getIntlKeywordAscii(InternationalKeyCode _eKey) const
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); ByteString aKeyword; return aKeyword;//STRIP001
+/*?*/ }
+
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+/*?*/ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const ::rtl::OString& rToken) const
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return KEY_NONE;//STRIP001
+/*?*/ }
+
+
+// =============================================================================
+// =============================================================================
+namespace
+{
+ // -----------------------------------------------------------------------------
+/*N*/ ::osl::Mutex& getSafteyMutex()
+/*N*/ {
+/*N*/ static ::osl::Mutex s_aSafety;
+/*N*/ return s_aSafety;
+/*N*/ }
+ // -----------------------------------------------------------------------------
+/*N*/ oslInterlockedCount& getCounter()
+/*N*/ {
+/*N*/ static oslInterlockedCount s_nCounter;
+/*N*/ return s_nCounter;
+/*N*/ }
+ // -----------------------------------------------------------------------------
+/*N*/ OSystemParseContext* getSharedContext(OSystemParseContext* _pContext = NULL,sal_Bool _bSet = sal_False)
+/*N*/ {
+/*N*/ static OSystemParseContext* s_pSharedContext = NULL;
+/*N*/ if ( _pContext && !s_pSharedContext || _bSet )
+/*N*/ s_pSharedContext = _pContext;
+/*N*/ return s_pSharedContext;
+ }
+ // -----------------------------------------------------------------------------
+}
+// -----------------------------------------------------------------------------
+/*N*/ OParseContextClient::OParseContextClient()
+/*N*/ {
+/*N*/ ::osl::MutexGuard aGuard( getSafteyMutex() );
+/*N*/ if ( 1 == osl_incrementInterlockedCount( &getCounter() ) )
+/*N*/ { // first instance
+/*N*/ getSharedContext( new OSystemParseContext );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+/*N*/ OParseContextClient::~OParseContextClient()
+/*N*/ {
+/*N*/ {
+/*N*/ ::osl::MutexGuard aGuard( getSafteyMutex() );
+/*N*/ if ( 0 == osl_decrementInterlockedCount( &getCounter() ) )
+/*N*/ delete getSharedContext(NULL,sal_True);
+/*N*/ }
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_filtnav.src b/binfilter/bf_svx/source/form/svx_filtnav.src
new file mode 100644
index 000000000000..7a879dd7aa52
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_filtnav.src
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include "svxids.hrc"
+#include "fmresids.hrc"
+Menu RID_FM_FILTER_MENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_DELETE ;
+ HelpID = SID_FM_DELETE ;
+ Text [ de ] = "~Löschen" ;
+ Text [ en-US ] = "~Delete" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "E~liminar";
+ Text[ ru ] = "Удалить";
+ Text[ el ] = "ΔιαγÏα~φή";
+ Text[ nl ] = "Wi~ssen";
+ Text[ fr ] = "~Supprimer";
+ Text[ es ] = "~Borrar";
+ Text[ fi ] = "~Poista";
+ Text[ ca ] = "~Suprimeix";
+ Text[ it ] = "~Elimina";
+ Text[ sk ] = "~Zmazať";
+ Text[ da ] = "Slet";
+ Text[ sv ] = "~Radera";
+ Text[ pl ] = "~Usuń";
+ Text[ pt-BR ] = "E~xcluir";
+ Text[ th ] = "~ลบ";
+ Text[ ja ] = "削除(~D)";
+ Text[ ko ] = "삭제(~D)";
+ Text[ zh-CN ] = "删除(~D)";
+ Text[ zh-TW ] = "刪除(~D)";
+ Text[ tr ] = "Sil";
+ Text[ hi-IN ] = "~मिटाओ";
+ Text[ ar ] = "حذÙ";
+ Text[ he ] = "‮מחיקה‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FILTER_EDIT ;
+ HelpID = SID_FM_FILTER_EDIT ;
+ Text [ de ] = "~Bearbeiten" ;
+ Text [ en-US ] = "~Edit" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Editar";
+ Text[ ru ] = "~Правка";
+ Text[ el ] = "~ΕπεξεÏγασία";
+ Text[ nl ] = "B~ewerken";
+ Text[ fr ] = "~Éditer";
+ Text[ es ] = "~Editar";
+ Text[ fi ] = "~Muokkaa";
+ Text[ ca ] = "~Edita";
+ Text[ it ] = "~Modifica";
+ Text[ sk ] = "~Upraviť";
+ Text[ da ] = "~Rediger";
+ Text[ sv ] = "~Redigera";
+ Text[ pl ] = "~Edytuj";
+ Text[ pt-BR ] = "~Editar";
+ Text[ th ] = "à¹~à¸à¹‰à¹„ข";
+ Text[ ja ] = "編集(~E)";
+ Text[ ko ] = "편집(~E)";
+ Text[ zh-CN ] = "编辑(~E)";
+ Text[ zh-TW ] = "編輯(~E)";
+ Text[ tr ] = "Düzenle";
+ Text[ hi-IN ] = "~संपादन";
+ Text[ ar ] = "~تحرير";
+ Text[ he ] = "‮עריכה‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FILTER_IS_NULL ;
+ HelpID = SID_FM_FILTER_IS_NULL ;
+ Text [ de ] = "~Ist Leer" ;
+ Text [ en-US ] = "~Is Null" ;
+ Text[ pt ] = "~Vazio";
+ Text[ ru ] = "~ПуÑто";
+ Text[ el ] = "Είνα~ι μηδενικός χαÏακτήÏας";
+ Text[ nl ] = "~Is leeg";
+ Text[ fr ] = "~Est vide";
+ Text[ es ] = "~Vacío";
+ Text[ fi ] = "~Ei päde";
+ Text[ ca ] = "~Buit";
+ Text[ it ] = "È ~vuoto";
+ Text[ sk ] = "~Je Null";
+ Text[ da ] = "Er tom";
+ Text[ sv ] = "~Är tom";
+ Text[ pl ] = "~Jest pusty";
+ Text[ pt-BR ] = "~É Vazio";
+ Text[ th ] = "เ~ป็น Null";
+ Text[ ja ] = "空白(~I)";
+ Text[ ko ] = "비어 있ìŒ(~I)";
+ Text[ zh-CN ] = "是空缺(~I)";
+ Text[ zh-TW ] = "是空缺(~I)";
+ Text[ tr ] = "BoÅŸ";
+ Text[ hi-IN ] = "Null है ~कà¥à¤¯à¤¾";
+ Text[ ar ] = "خالي";
+ Text[ he ] = "‮ריק‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FILTER_IS_NOT_NULL ;
+ HelpID = SID_FM_FILTER_IS_NOT_NULL ;
+ Text [ de ] = "~Ist nicht leer" ;
+ Text [ en-US ] = "I~s not Null" ;
+ Text[ pt ] = "~Não vazio";
+ Text[ ru ] = "~Ðе пуÑто";
+ Text[ el ] = "Δεν είνα~ι μηδενικός χαÏακτήÏας";
+ Text[ nl ] = "~Is niet leeg";
+ Text[ fr ] = "~N'est pas vide";
+ Text[ es ] = "~No Vacío";
+ Text[ fi ] = "~Pätee";
+ Text[ ca ] = "~No buit";
+ Text[ it ] = "~Non è vuoto";
+ Text[ sk ] = "~Nie je null";
+ Text[ da ] = "Er ikke tom";
+ Text[ sv ] = "~Är inte tom";
+ Text[ pl ] = "~Nie jest pusty";
+ Text[ pt-BR ] = "~Não é Vazio";
+ Text[ th ] = "ไ~ม่เป็น Null";
+ Text[ ja ] = "空白ã§ãªã„(~S)";
+ Text[ ko ] = "비어 있지 ì•ŠìŒ(~S)";
+ Text[ zh-CN ] = "ä¸æ˜¯ç©ºç¼º(~S)";
+ Text[ zh-TW ] = "ä¸æ˜¯ç©ºç¼º(~S)";
+ Text[ tr ] = "BoÅŸ deÄŸil";
+ Text[ hi-IN ] = "Null ~नहीं है कà¥à¤¯à¤¾";
+ Text[ ar ] = "غير خالي";
+ Text[ he ] = "â€®×œ× ×¨×™×§â€¬";
+ };
+ };
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/form/svx_fmdmod.cxx b/binfilter/bf_svx/source/form/svx_fmdmod.cxx
new file mode 100644
index 000000000000..717d9326add6
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmdmod.cxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "fmdmod.hxx"
+
+#include "fmservs.hxx"
+#include <fmobj.hxx>
+#include <unoshape.hxx>
+#include "fmglob.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+
+using namespace ::binfilter::svxform;//STRIP008 using namespace ::svxform;
+
+//-----------------------------------------------------------------------------
+/*N*/ ::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 )
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xRet;
+/*N*/ if ( ServiceSpecifier.indexOf( ::rtl::OUString::createFromAscii("com.sun.star.form.component.") ) == 0 )
+/*N*/ {
+/*?*/ xRet = ::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(ServiceSpecifier);
+/*N*/ }
+/*N*/ else if ( ServiceSpecifier == ::rtl::OUString( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ControlShape") ) )
+/*N*/ {
+/*N*/ SdrObject* pObj = new FmFormObj(OBJ_FM_CONTROL);
+/*N*/ xRet = *new SvxShapeControl(pObj);
+/*N*/ }
+/*N*/ if (!xRet.is())
+/*N*/ xRet = SvxUnoDrawMSFactory::createInstance(ServiceSpecifier);
+/*N*/ return xRet;
+/*N*/ }
+
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+
+/*
+// 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 = ::legacy_binfilters::getLegacyProcessServiceFactory()->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;
+}
+*/
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmdpage.cxx b/binfilter/bf_svx/source/form/svx_fmdpage.cxx
new file mode 100644
index 000000000000..5cfee33479e5
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmdpage.cxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "fmpage.hxx"
+
+#include "fmobj.hxx"
+
+#include "fmglob.hxx"
+
+#include "fmdpage.hxx"
+
+#include "unoshape.hxx"
+#include "fmimplids.hxx"
+namespace binfilter {
+
+/*N*/ DBG_NAME(SvxFmDrawPage)
+/*N*/ SvxFmDrawPage::SvxFmDrawPage( SdrPage* pInPage ) :
+/*N*/ SvxDrawPage( pInPage )
+/*N*/ {
+/*N*/ DBG_CTOR(SvxFmDrawPage,NULL);
+ /*N*/ m_pHoldImplIdHelper = new ::binfilter::form::OImplementationIdsRef(); //STRIP008 m_pHoldImplIdHelper = new ::form::OImplementationIdsRef();
+/*N*/ }
+
+/*N*/ SvxFmDrawPage::~SvxFmDrawPage() throw ()
+/*N*/ {
+/*N*/ delete m_pHoldImplIdHelper;
+/*N*/ DBG_DTOR(SvxFmDrawPage,NULL);
+/*N*/ }
+
+/*N*/ ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL SvxFmDrawPage::getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); ::com::sun::star::uno::Sequence< sal_Int8 > a; return a; //STRIP001
+/*N*/ }
+
+/*N*/ ::com::sun::star::uno::Any SAL_CALL SvxFmDrawPage::queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Any aRet = ::cppu::queryInterface(aType,
+/*N*/ static_cast< ::com::sun::star::form::XFormsSupplier*>(this));
+/*N*/ if(aRet.hasValue())
+/*N*/ return aRet;
+/*N*/
+/*N*/ return SvxDrawPage::queryAggregation(aType);
+/*N*/ }
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+/*N*/ SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xDescr ) throw ()
+/*N*/ {
+/*N*/ ::rtl::OUString aShapeType( xDescr->getShapeType() );
+/*N*/
+/*N*/ if (aShapeType == ::rtl::OUString::createFromAscii("com.sun.star.drawing.ShapeControl"))
+/*?*/ return new FmFormObj(OBJ_FM_CONTROL);
+/*N*/ else
+/*N*/ return SvxDrawPage::_CreateSdrObject( xDescr );
+/*N*/
+/*N*/ }
+
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > SvxFmDrawPage::_CreateShape( SdrObject *pObj ) const throw ()
+/*N*/ {
+/*N*/ if( FmFormInventor == pObj->GetObjInventor() )
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape = (SvxShape*)new SvxShapeControl( pObj );
+/*N*/ return xShape;
+/*N*/ }
+/*N*/ else
+/*N*/ return SvxDrawPage::_CreateShape( pObj );
+/*N*/ }
+
+// ::com::sun::star::form::XFormsSupplier
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL SvxFmDrawPage::getForms(void) throw( ::com::sun::star::uno::RuntimeException )
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xForms;
+/*N*/
+/*N*/ FmFormPage *pFmPage = PTR_CAST( FmFormPage, GetSdrPage() );
+/*N*/ if( pFmPage )
+/*N*/ xForms = pFmPage->GetForms();
+/*N*/
+/*N*/ return xForms;
+/*N*/ }
+
+// ::com::sun::star::lang::XServiceInfo
+/*N*/ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvxFmDrawPage::getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+/*N*/ {
+ /* TODO: DG? Irgendwelche Services?
+ ::com::sun::star::uno::Sequence aSeq( SvxDrawPage::getSupportedServiceNames() );
+ addToSequence( aSeq, 1, ::rtl::OUString::createFromAscii("stardiv.form.superservice?") );
+ return aSeq;
+ */
+/*N*/
+/*N*/ return SvxDrawPage::getSupportedServiceNames();
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmexpl.src b/binfilter/bf_svx/source/form/svx_fmexpl.src
new file mode 100644
index 000000000000..53f9d8f48c74
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmexpl.src
@@ -0,0 +1,945 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include "svxids.hrc"
+#include "fmresids.hrc"
+#include "fmexpl.hrc"
+#include "globlmn.hrc"
+Menu RID_FMEXPLORER_POPUPMENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_NEW ;
+ HelpID = SID_FM_NEW ;
+ Text [ de ] = "~Neu" ;
+ Text [ en-US ] = "~New" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_NEW_FORM ;
+ HelpID = SID_FM_NEW_FORM ;
+ Text [ de ] = "~Formular" ;
+ Text [ en-US ] = "Form" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Formulário";
+ Text[ ru ] = "~Форма";
+ Text[ el ] = "~ΦόÏμα";
+ Text[ nl ] = "~Formulier";
+ Text[ fr ] = "~Formulaire";
+ Text[ es ] = "~Formulario";
+ Text[ fi ] = "Lomake";
+ Text[ ca ] = "Formulari";
+ Text[ it ] = "Formulario";
+ Text[ sk ] = "Formulár";
+ Text[ da ] = "~Formular";
+ Text[ sv ] = "~Formulär";
+ Text[ pl ] = "Formularz";
+ Text[ pt-BR ] = "Formulário";
+ Text[ th ] = "à¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡";
+ Text[ ja ] = "フォーム";
+ Text[ ko ] = "ì–‘ì‹";
+ Text[ zh-CN ] = "表å•";
+ Text[ zh-TW ] = "表單";
+ Text[ tr ] = "Forum";
+ Text[ hi-IN ] = "फ़ॉरà¥à¤®";
+ Text[ ar ] = "استمارة";
+ Text[ he ] = "‮טופס‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_NEW_HIDDEN ;
+ HelpID = SID_FM_NEW_HIDDEN ;
+ Text [ de ] = "~verstecktes Control" ;
+ Text [ en-US ] = "Hidden Control" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Controlo o~culto";
+ Text[ ru ] = "Скрытый Ñлемент управлениÑ";
+ Text[ el ] = "ΚÏÏ…~φό στοιχείο ελέγχου";
+ Text[ nl ] = "~verborgen controle";
+ Text[ fr ] = "C~ontrôle masqué";
+ Text[ es ] = "~Control oculto";
+ Text[ fi ] = "Piilotettu ohjausobjekti";
+ Text[ ca ] = "Control ocult";
+ Text[ it ] = "Controllo nascosto";
+ Text[ sk ] = "Skrytý ovládací prvok";
+ Text[ da ] = "Skjult kontrol";
+ Text[ sv ] = "~Dold kontroll";
+ Text[ pl ] = "Ukryty formant";
+ Text[ pt-BR ] = "Controle oculto";
+ Text[ th ] = "ตัวควบคุมที่ซ่อน";
+ Text[ ja ] = "éš ã—コントロール";
+ Text[ ko ] = "숨겨진 컨트롤";
+ Text[ zh-CN ] = "éšå…¥çš„控制";
+ Text[ zh-TW ] = "隱入的控制項";
+ Text[ tr ] = "Gizli komut alanı";
+ Text[ hi-IN ] = "छिपा हà¥à¤† नियंतà¥à¤°à¤£";
+ Text[ ar ] = "عنصر تحكم مخÙÙŠ";
+ Text[ he ] = "‮פקד מוסתר‬";
+ };
+ };
+ };
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Novo";
+ Text[ ru ] = "Созд~ать";
+ Text[ el ] = "~ΔημιουÏγία";
+ Text[ nl ] = "~Nieuw";
+ Text[ fr ] = "Nouveau";
+ Text[ es ] = "N~uevo";
+ Text[ fi ] = "~Uusi";
+ Text[ ca ] = "~Nou";
+ Text[ it ] = "Nuovo";
+ Text[ sk ] = "~Nový";
+ Text[ da ] = "~Ny(t)";
+ Text[ sv ] = "~Nytt";
+ Text[ pl ] = "~Nowy";
+ Text[ pt-BR ] = "~Novo";
+ Text[ th ] = "ใ~หม่";
+ Text[ ja ] = "æ–°è¦ä½œæˆ(~N)";
+ Text[ ko ] = "새로 만들기(~N)";
+ Text[ zh-CN ] = "新建(~N)";
+ Text[ zh-TW ] = "開啟新檔(~N)";
+ Text[ tr ] = "~Yeni";
+ Text[ hi-IN ] = "~नया";
+ Text[ ar ] = "~جديد";
+ Text[ he ] = "‮חדש‬";
+ };
+ MenuItem
+ {
+ Text [ de ] = "Ersetzen durch";
+ Identifier = SID_FM_CHANGECONTROLTYPE ;
+ HelpID = SID_FM_CHANGECONTROLTYPE ;
+ Text [ en-US ] = "Replace with";
+ Text[ pt ] = "Substituir por";
+ Text[ ru ] = "Заменить на";
+ Text[ el ] = "Αντικατάσταση με";
+ Text[ nl ] = "Vervangen door";
+ Text[ fr ] = "Remplacer par";
+ Text[ es ] = "Reemplazar por";
+ Text[ fi ] = "Korvaa objektilla";
+ Text[ ca ] = "Reemplaça amb";
+ Text[ it ] = "Sostituisci con";
+ Text[ sk ] = "Nahradiť za";
+ Text[ da ] = "Erstat med";
+ Text[ sv ] = "Ersätt med";
+ Text[ pl ] = "Zamień na";
+ Text[ pt-BR ] = "Substituir por";
+ Text[ th ] = "à¹à¸—นที่ด้วย";
+ Text[ ja ] = "ç½®ãæ›ãˆ";
+ Text[ ko ] = "바꾸기";
+ Text[ zh-CN ] = "替æ¢æˆ";
+ Text[ zh-TW ] = "更替æˆ";
+ Text[ tr ] = "Åžununla deÄŸiÅŸtir...";
+ Text[ hi-IN ] = "से पà¥à¤°à¤¤à¤¿à¤¸à¥à¤¥à¤¾à¤ªà¤¿à¤¤ करो";
+ Text[ ar ] = "استبدال بـ";
+ Text[ he ] = "‮להחליף ב‬";
+ Text[ de ] = "Ersetzen durch";
+ };
+ MenuItem { ITEM_EDIT_CUT };
+ MenuItem { ITEM_EDIT_COPY };
+ MenuItem { ITEM_EDIT_PASTE };
+ MenuItem
+ {
+ Identifier = SID_FM_DELETE ;
+ HelpID = SID_FM_DELETE ;
+ Text [ de ] = "~Löschen" ;
+ Text [ en-US ] = "~Delete" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "E~liminar";
+ Text[ ru ] = "Удалить";
+ Text[ el ] = "ΔιαγÏα~φή";
+ Text[ nl ] = "Wi~ssen";
+ Text[ fr ] = "~Supprimer";
+ Text[ es ] = "~Borrar";
+ Text[ fi ] = "~Poista";
+ Text[ ca ] = "~Suprimeix";
+ Text[ it ] = "Elimina";
+ Text[ sk ] = "~Zmazať";
+ Text[ da ] = "~Slet";
+ Text[ sv ] = "~Radera";
+ Text[ pl ] = "~Usuń";
+ Text[ pt-BR ] = "E~xcluir";
+ Text[ th ] = "~ลบ";
+ Text[ ja ] = "削除(~D)";
+ Text[ ko ] = "삭제(~D)";
+ Text[ zh-CN ] = "删除(~D)";
+ Text[ zh-TW ] = "刪除(~D)";
+ Text[ tr ] = "Sil";
+ Text[ hi-IN ] = "~मिटाओ";
+ Text[ ar ] = "حذÙ";
+ Text[ he ] = "‮מחיקה‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_TAB_DIALOG ;
+ HelpID = SID_FM_TAB_DIALOG ;
+ Text [ de ] = "~Aktivierungsreihenfolge ..." ;
+ Text [ en-US ] = "Tab Order..." ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Sequência de ~activação...";
+ Text[ ru ] = "ПорÑдок активированиÑ";
+ Text[ el ] = "Σ~ειÏά ενεÏγοποίησης...";
+ Text[ nl ] = "Volgorde van a~ctivering";
+ Text[ fr ] = "Séquence d'activation ...";
+ Text[ es ] = "~Secuencia de activación...";
+ Text[ fi ] = "Sarkainjärjestys...";
+ Text[ ca ] = "Ordre de les pestanyes...";
+ Text[ it ] = "Sequenza di attivazione...";
+ Text[ sk ] = "Poradie aktivácie...";
+ Text[ da ] = "Aktiveringsrækkefølge...";
+ Text[ sv ] = "~Ordningsföljd för aktivering...";
+ Text[ pl ] = "Kolejność aktywacji...";
+ Text[ pt-BR ] = "Ordem da Tabulação...";
+ Text[ th ] = "ลำดับระยะà¸à¸±à¹‰à¸™...";
+ Text[ ja ] = "タブオーダー...";
+ Text[ ko ] = "활성화 순서...";
+ Text[ zh-CN ] = "è½®æ¢é¡ºåº...";
+ Text[ zh-TW ] = "å•Ÿå‹•é †åº...";
+ Text[ tr ] = "Etkinleştirme sırası...";
+ Text[ hi-IN ] = "टॉब कà¥à¤°à¤®...";
+ Text[ ar ] = "ترتيب التنشيط...";
+ Text[ he ] = "‮סדר הט×בי×‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_RENAME_OBJECT ;
+ HelpID = SID_FM_RENAME_OBJECT ;
+ Text [ de ] = "~Umbenennen" ;
+ Text [ en-US ] = "~Rename" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Mudar ~nome";
+ Text[ ru ] = "Переименовать";
+ Text[ el ] = "Μετονομασία";
+ Text[ nl ] = "~Naam wijzigen";
+ Text[ fr ] = "~Renommer";
+ Text[ es ] = "~Cambiar nombre";
+ Text[ fi ] = "~Nimeä uudelleen";
+ Text[ ca ] = "~Reanomena";
+ Text[ it ] = "Rinomina";
+ Text[ sk ] = "P~remenovať";
+ Text[ da ] = "Omdøb";
+ Text[ sv ] = "~Byt namn";
+ Text[ pl ] = "~Zmień nazwę";
+ Text[ pt-BR ] = "~Renomear";
+ Text[ th ] = "เ~ปลี่ยนชื่อ";
+ Text[ ja ] = "åå‰ã®å¤‰æ›´(~R)";
+ Text[ ko ] = "ì´ë¦„ 바꾸기(~R)";
+ Text[ zh-CN ] = "é‡å‘½å(~R)";
+ Text[ zh-TW ] = "é‡æ–°å‘½å(~R)";
+ Text[ tr ] = "Yeniden adlandır";
+ Text[ hi-IN ] = "~पà¥à¤¨à¤ƒ नाम दो";
+ Text[ ar ] = "إعادة تسمية";
+ Text[ he ] = "‮שינוי ש×‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_SHOW_PROPERTY_BROWSER ;
+ HelpID = SID_FM_SHOW_PROPERTY_BROWSER ;
+ Text [ de ] = "~Eigenschaften" ;
+ Text [ en-US ] = "Propert~ies" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Propriedades";
+ Text[ ru ] = "СвойÑтва";
+ Text[ el ] = "Ιδιότητ~ες";
+ Text[ nl ] = "~Eigenschappen";
+ Text[ fr ] = "~Propriétés";
+ Text[ es ] = "~Propiedades";
+ Text[ fi ] = "~Ominaisuudet";
+ Text[ ca ] = "Propie~tats";
+ Text[ it ] = "Proprietà";
+ Text[ sk ] = "Vlastnost~i";
+ Text[ da ] = "Egenskaber";
+ Text[ sv ] = "~Egenskaper";
+ Text[ pl ] = "~Właściwości";
+ Text[ pt-BR ] = "~Propriedades";
+ Text[ th ] = "คุณสม~บัติ";
+ Text[ ja ] = "プロパティ(~I)";
+ Text[ ko ] = "ë“±ë¡ ì •ë³´(~I)";
+ Text[ zh-CN ] = "属性(~I)";
+ Text[ zh-TW ] = "屬性(~I)";
+ Text[ tr ] = "Özellikler";
+ Text[ hi-IN ] = "वि~शेषतायें";
+ Text[ ar ] = "خصائص";
+ Text[ he ] = "‮מ×פייני×‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_OPEN_READONLY ;
+ HelpID = SID_FM_OPEN_READONLY ;
+ Text [ de ] = "Im Ent~wurfsmodus öffnen" ;
+ Text [ en-US ] = "Open in Design Mode" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Abrir no modo Es~boço";
+ Text[ ru ] = "Открыть в режиме проектированиÑ";
+ Text[ el ] = "Άνοιγμα σε κατάσταση σ~χεδιασμοÏ";
+ Text[ nl ] = "In ~ontwerpmodus openen";
+ Text[ fr ] = "Ouvrir en mode C~onception";
+ Text[ es ] = "~Abrir en modo diseño";
+ Text[ fi ] = "Avaa suunnittelutilassa";
+ Text[ ca ] = "Obre en mode disseny";
+ Text[ it ] = "Apri nel modo bozza";
+ Text[ sk ] = "Otvoriť v režime návrhu";
+ Text[ da ] = "Ã…bn i udkasttilstand";
+ Text[ sv ] = "Öppna i ~utkastläge";
+ Text[ pl ] = "Otwórz w trybie projektu";
+ Text[ pt-BR ] = "Abrir no Modo Esboço";
+ Text[ th ] = "เปิดในโหมดออà¸à¹à¸šà¸š";
+ Text[ ja ] = "デザインモードã§é–‹ã";
+ Text[ ko ] = "ë””ìžì¸ 모드ì—ì„œ 열기";
+ Text[ zh-CN ] = "用设计模å¼æ‰“å¼€";
+ Text[ zh-TW ] = "開啟設計模å¼";
+ Text[ tr ] = "Tasarım kipinde aç";
+ Text[ hi-IN ] = "डिसैनॠपà¥à¤°à¤•à¤¾à¤° में खोलो";
+ Text[ ar ] = "Ùتح ÙÙŠ وضع التصميم";
+ Text[ he ] = "‮פתיחה במצב עיצוב‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_AUTOCONTROLFOCUS ;
+ HelpID = SID_FM_AUTOCONTROLFOCUS ;
+ Text [ de ] = "Automatischer Kontrollelement-Fokus";
+ Text [ en-US ] = "Automatic Control Focus";
+ Text[ pt ] = "Foco automático de controlo";
+ Text[ ru ] = "ÐÐ²Ñ‚Ð¾Ñ„Ð¾ÐºÑƒÑ Ð´Ð»Ñ Ñлемента управлениÑ";
+ Text[ el ] = "Αυτόματη εστίαση στοιχείου ελέγχου";
+ Text[ nl ] = "Automatische controle focus";
+ Text[ fr ] = "Focalisation automatique sur l'élément de contrôle";
+ Text[ es ] = "Foco automático de control";
+ Text[ fi ] = "Automaattinen kohdistuksen ohjaus";
+ Text[ ca ] = "Focus automàtic de control";
+ Text[ it ] = "Punto focale automatico di controllo";
+ Text[ sk ] = "Automaticky zamerať ovládací prvok";
+ Text[ da ] = "Automatisk kontrolelement-fokus";
+ Text[ sv ] = "Automatisk fokus för kontrollelement";
+ Text[ pl ] = "Automatyczne ogniskowanie na formancie";
+ Text[ pt-BR ] = "Controle de Foco Automático";
+ Text[ th ] = "โฟà¸à¸±à¸ªà¸à¸²à¸£à¸„วบคุมอัตโนมัติ";
+ Text[ ja ] = "オートコントロールフォーカス";
+ Text[ ko ] = "ìžë™ ì´ˆì  ì»¨íŠ¸ë¡¤ ";
+ Text[ zh-CN ] = "自动对准控制å•å…ƒ";
+ Text[ zh-TW ] = "自動å°æº–控制項";
+ Text[ tr ] = "Otomatik odaklanma komutu";
+ Text[ hi-IN ] = "सà¥à¤µà¤šà¤¾à¤²à¤¿à¤¤ नियंतà¥à¤°à¤£ केनà¥à¤¦à¥à¤°à¤¿à¤­à¥‚त";
+ Text[ ar ] = "تركيز تلقائي لعنصر التحكم";
+ Text[ he ] = "‮בקרת מיקוד ×וטומטית‬";
+ };
+ };
+};
+
+Menu RID_FMSHELL_CONVERSIONMENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_EDIT ;
+ HelpID = SID_FM_CONVERTTO_EDIT ;
+ Text [ de ] = "~Textfeld" ;
+ Text [ en-US ] = "~Text Box";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Caixa de texto";
+ Text[ ru ] = "ТекÑтовое поле";
+ Text[ el ] = "Πεδίο ~κειμένου";
+ Text[ nl ] = "~Tekstveld";
+ Text[ fr ] = "Zone de ~texte";
+ Text[ es ] = "~Campo de texto";
+ Text[ fi ] = "~Tekstikehys";
+ Text[ ca ] = "Quadre de ~text";
+ Text[ it ] = "Campo di ~testo";
+ Text[ sk ] = "~Textové pole";
+ Text[ da ] = "Tekstfelt";
+ Text[ sv ] = "~Textfält";
+ Text[ pl ] = "Pole ~tekstowe";
+ Text[ pt-BR ] = "~Caixa de Texto";
+ Text[ th ] = "à¸à¸¥à¹ˆà¸­à¸‡~ข้อความ";
+ Text[ ja ] = "テキストボックス(~T)";
+ Text[ ko ] = "í…스트 í•„ë“œ(~T)";
+ Text[ zh-CN ] = "文本框(~T)";
+ Text[ zh-TW ] = "文字方塊(~T)";
+ Text[ tr ] = "Metin alanı";
+ Text[ hi-IN ] = "~टेकà¥à¤¸à¥à¤Ÿà¥ बॉकà¥à¤¸à¥";
+ Text[ ar ] = "حقل نص";
+ Text[ he ] = "‮תיבת טקסט‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_BUTTON ;
+ HelpID = SID_FM_CONVERTTO_BUTTON ;
+ Text [ de ] = "~Schältfläche" ;
+ Text [ en-US ] = "~Button";
+ Text[ pt ] = "~Botão";
+ Text[ ru ] = "Кнопка";
+ Text[ el ] = "Πεδίο επιλογή~ς";
+ Text[ nl ] = "~Knop";
+ Text[ fr ] = "~Bouton";
+ Text[ es ] = "~Botón";
+ Text[ fi ] = "~Painike";
+ Text[ ca ] = "~Botó";
+ Text[ it ] = "~Pulsante";
+ Text[ sk ] = "~TlaÄidlo";
+ Text[ da ] = "Knap";
+ Text[ sv ] = "~Kommandoknapp";
+ Text[ pl ] = "~Przycisk";
+ Text[ pt-BR ] = "~Botão";
+ Text[ th ] = "~ปุ่ม";
+ Text[ ja ] = "ボタン(~B)";
+ Text[ ko ] = "버튼(~B)";
+ Text[ zh-CN ] = "按钮(~B)";
+ Text[ zh-TW ] = "按鈕(~B)";
+ Text[ tr ] = "Düğme";
+ Text[ hi-IN ] = "~बटन";
+ Text[ ar ] = "زر ضغط";
+ Text[ he ] = "‮כפתור‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_FIXEDTEXT ;
+ HelpID = SID_FM_CONVERTTO_FIXEDTEXT ;
+ Text [ de ] = "~Beschriftungsfeld" ;
+ Text [ en-US ] = "La~bel field";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Campo de ~rótulo";
+ Text[ ru ] = "ÐадпиÑÑŒ";
+ Text[ el ] = "Πεδίο ε~πιγÏαφής";
+ Text[ nl ] = "~Titelveld";
+ Text[ fr ] = "~Champ d'étiquette";
+ Text[ es ] = "~Campo de etiqueta";
+ Text[ fi ] = "~Selitekenttä";
+ Text[ ca ] = "Cam~p d'etiqueta";
+ Text[ it ] = "Testo ~fisso";
+ Text[ sk ] = "~Popisné pole";
+ Text[ da ] = "Etiketfelt";
+ Text[ sv ] = "~Etikettfält";
+ Text[ pl ] = "Pole ~etykiety";
+ Text[ pt-BR ] = "~Campo de rótulo";
+ Text[ th ] = "ป้าย~ชื่อเขตข้อมูล";
+ Text[ ja ] = "ラベルフィールド(~B)";
+ Text[ ko ] = "ë ˆì´ë¸” í•„ë“œ(~B)";
+ Text[ zh-CN ] = "标签字段(~B)";
+ Text[ zh-TW ] = "標籤欄ä½(~B)";
+ Text[ tr ] = "Etiket alanı";
+ Text[ hi-IN ] = "लेबि~ल कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل عنونة";
+ Text[ he ] = "‮שדה תוית‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_GROUPBOX ;
+ HelpID = SID_FM_CONVERTTO_GROUPBOX ;
+ Text [ de ] = "~Gruppierungsrahmen" ;
+ Text [ en-US ] = "G~roup Box";
+ Text[ pt ] = "Campo de g~rupo";
+ Text[ ru ] = "Групповой блок";
+ Text[ el ] = "Πλαίσιο ~ομαδοποίησης";
+ Text[ nl ] = "~Groepskader";
+ Text[ fr ] = "Zone de ~groupe";
+ Text[ es ] = "~Marco de grupo";
+ Text[ fi ] = "~Ryhmittele ruudut";
+ Text[ ca ] = "Quadre de g~rup";
+ Text[ it ] = "Casella di ~gruppo";
+ Text[ sk ] = "Zo~skupenie";
+ Text[ da ] = "Gruppeboks";
+ Text[ sv ] = "~Grupperingsram";
+ Text[ pl ] = "Pole g~rupy:";
+ Text[ pt-BR ] = "Caixa de ~Grupo";
+ Text[ th ] = "จัด~à¸à¸¥à¸¸à¹ˆà¸¡à¸à¸¥à¹ˆà¸­à¸‡";
+ Text[ ja ] = "グループボックス(~R)";
+ Text[ ko ] = "그룹 ìƒìž(~R)";
+ Text[ zh-CN ] = "å°ç»„框(~R)";
+ Text[ zh-TW ] = "群組方塊(~R)";
+ Text[ tr ] = "Grup çerçevesi";
+ Text[ hi-IN ] = "~समूह बॉकà¥à¤¸à¥";
+ Text[ ar ] = "كادر تجميع";
+ Text[ he ] = "‮תיבת קבוצה‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_LISTBOX ;
+ HelpID = SID_FM_CONVERTTO_LISTBOX ;
+ Text [ de ] = "~Listenfeld" ;
+ Text [ en-US ] = "L~ist Box";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Caixa de ~listagem";
+ Text[ ru ] = "СпиÑок";
+ Text[ el ] = "Πεδίο ~λίστας";
+ Text[ nl ] = "Ke~uzelijst";
+ Text[ fr ] = "Zone de ~liste";
+ Text[ es ] = "L~istado";
+ Text[ fi ] = "~Luetteloruutu";
+ Text[ ca ] = "Quadre de ll~ista";
+ Text[ it ] = "~Casella di riepilogo";
+ Text[ sk ] = "Pole ~zoznamu";
+ Text[ da ] = "Rulleliste";
+ Text[ sv ] = "L~istruta";
+ Text[ pl ] = "Pole l~isty";
+ Text[ pt-BR ] = "Caixa de ~listagem";
+ Text[ th ] = "à¸à¸¥à¹ˆà¸­à¸‡à¸£à¸²~ยà¸à¸²à¸£";
+ Text[ ja ] = "リストボックス(~I)";
+ Text[ ko ] = "ëª©ë¡ í•„ë“œ(~I)";
+ Text[ zh-CN ] = "列表框(~I)";
+ Text[ zh-TW ] = "清單方塊(~I)";
+ Text[ tr ] = "Liste alanı";
+ Text[ hi-IN ] = "सू~ची बॉकà¥à¤¸à¥";
+ Text[ ar ] = "مربع قائمة";
+ Text[ he ] = "‮תיבת רשימה‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_CHECKBOX ;
+ HelpID = SID_FM_CONVERTTO_CHECKBOX ;
+ Text [ de ] = "~Markierfeld" ;
+ Text [ en-US ] = "~Check Box";
+ Text[ pt ] = "Caixa de ~verificação";
+ Text[ ru ] = "Флажок";
+ Text[ el ] = "Πεδίο σή~μανσης";
+ Text[ nl ] = "~Markeerveld";
+ Text[ fr ] = "~Case à cocher";
+ Text[ es ] = "~Casilla de verificación";
+ Text[ fi ] = "~Valintaruutu";
+ Text[ ca ] = "~Casella de verificació";
+ Text[ it ] = "Casella di controllo";
+ Text[ sk ] = "~ZaÅ¡krtávacie políÄko";
+ Text[ da ] = "Afkrydsningsfelt";
+ Text[ sv ] = "Kr~yssruta";
+ Text[ pl ] = "~Pole wyboru";
+ Text[ pt-BR ] = "~Caixa de verificação";
+ Text[ th ] = "à¸à¸¥à¹ˆà¸­à¸‡~à¸à¸²à¹€à¸„รื่องหมาย";
+ Text[ ja ] = "ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹(~C)";
+ Text[ ko ] = "확ì¸ëž€(~C)";
+ Text[ zh-CN ] = "å¤é€‰æ¡†(~C)";
+ Text[ zh-TW ] = "æ ¸å–方塊(~C)";
+ Text[ tr ] = "Seçme kutusu";
+ Text[ hi-IN ] = "चे~कॠबॉकà¥à¤¸à¥";
+ Text[ ar ] = "خانة اختيار";
+ Text[ he ] = "‮תיבת סימון‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_RADIOBUTTON ;
+ HelpID = SID_FM_CONVERTTO_RADIOBUTTON ;
+ Text [ de ] = "~Optionsfeld" ;
+ Text [ en-US ] = "~Radio Button";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "B~otão de opção";
+ Text[ ru ] = "~Кнопка выбора вариантов";
+ Text[ el ] = "Πεδί~ο επιλογών";
+ Text[ nl ] = "~Optieveld";
+ Text[ fr ] = "Bouton ~radio";
+ Text[ es ] = "~Campo de opción";
+ Text[ fi ] = "~Valintanappi";
+ Text[ ca ] = "~Camp d'opció";
+ Text[ it ] = "Pulsante di scelta";
+ Text[ sk ] = "P~repínaÄ";
+ Text[ da ] = "Alternativfelt";
+ Text[ sv ] = "~Alternativfält";
+ Text[ pl ] = "~Pole opcji";
+ Text[ pt-BR ] = "~Botão de Seleção";
+ Text[ th ] = "ปุ่ม~วิทยุ";
+ Text[ ja ] = "ラジオボタン(~R)";
+ Text[ ko ] = "옵션 필드(~R)";
+ Text[ zh-CN ] = "选项字段(~R)";
+ Text[ zh-TW ] = "é¸é …欄ä½(~R)";
+ Text[ tr ] = "Seçenek düğmesi";
+ Text[ hi-IN ] = "~रेडियो बटन";
+ Text[ ar ] = "زر خيار";
+ Text[ he ] = "‮כפתור רדיו‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_COMBOBOX ;
+ HelpID = SID_FM_CONVERTTO_COMBOBOX ;
+ Text [ de ] = "~Kombinationsfeld" ;
+ Text [ en-US ] = "Combo Bo~x";
+ Text[ pt ] = "Caixa de com~binação";
+ Text[ ru ] = "Поле Ñо ÑпиÑком";
+ Text[ el ] = "Πεδίο ~συνδυασμοÏ";
+ Text[ nl ] = "~Combinatieveld";
+ Text[ fr ] = "Zone ~combinée";
+ Text[ es ] = "Cu~adro combinado";
+ Text[ fi ] = "~Yhdistelmäruutu";
+ Text[ ca ] = "Q~uadre combinat";
+ Text[ it ] = "Casella com~binata";
+ Text[ sk ] = "~Kombinované pole";
+ Text[ da ] = "Kombinationsboks";
+ Text[ sv ] = "~Kombinationsfält";
+ Text[ pl ] = "Pole ~kombi";
+ Text[ pt-BR ] = "Cai~xa de Combinação";
+ Text[ th ] = "à¸à¸¥à¹ˆ~องคอมโบ้ ";
+ Text[ ja ] = "コンボボックス(~X)";
+ Text[ ko ] = "콤보 ìƒìž(~X)";
+ Text[ zh-CN ] = "组åˆæ¡†(~X)";
+ Text[ zh-TW ] = "組åˆæ–¹æ¡†(~X)";
+ Text[ tr ] = "Kombinasyon alanı";
+ Text[ hi-IN ] = "कॉमà¥à¤¬à¥‹ ~बॉकà¥à¤¸à¥";
+ Text[ ar ] = "مربع تحرير وسرد";
+ Text[ he ] = "‮תיבה משולבת‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_IMAGEBUTTON ;
+ HelpID = SID_FM_CONVERTTO_IMAGEBUTTON ;
+ Text [ de ] = "~Grafische Schaltfläche" ;
+ Text [ en-US ] = "I~mage Button";
+ Text[ pt ] = "Botão ~gráfico";
+ Text[ ru ] = "ГрафичеÑÐºÐ°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ°";
+ Text[ el ] = "~ΓÏαφικό πεδίο επιλογής";
+ Text[ nl ] = "~Afbeeldingenknop";
+ Text[ fr ] = "Bouton ~picto";
+ Text[ es ] = "Botón g~ráfico";
+ Text[ fi ] = "~Kuvapainike";
+ Text[ ca ] = "Botó g~ràfic";
+ Text[ it ] = "P~ulsante immagine";
+ Text[ sk ] = "~Obrázkové tlaÄidlo";
+ Text[ da ] = "Grafisk knap";
+ Text[ sv ] = "~Grafisk kommandoknapp";
+ Text[ pl ] = "~Przycisk obrazkowy";
+ Text[ pt-BR ] = "Botão de I~magem";
+ Text[ th ] = "ปุ่มรูปภา~พ";
+ Text[ ja ] = "イメージボタン(~M)";
+ Text[ ko ] = "ì´ë¯¸ì§€ 버튼(~M)";
+ Text[ zh-CN ] = "图形按钮(~M)";
+ Text[ zh-TW ] = "圖形按鈕(~M)";
+ Text[ tr ] = "Grafiksel düğme";
+ Text[ hi-IN ] = "चितà¥à¤° ब~टन";
+ Text[ ar ] = "Ù…Ùتاح مصوّر";
+ Text[ he ] = "‮כפתור צל×‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_FILECONTROL ;
+ HelpID = SID_FM_CONVERTTO_FILECONTROL ;
+ Text [ de ] = "~Dateiauswahl" ;
+ Text [ en-US ] = "~File Selection";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Selecção de ficheiro";
+ Text[ ru ] = "~Выбор файла";
+ Text[ el ] = "Επιλογή ~αÏχείου";
+ Text[ nl ] = "~Bestandselectie";
+ Text[ fr ] = "~Sélection de fichier";
+ Text[ es ] = "Selec~ción de archivo";
+ Text[ fi ] = "~Tiedoston valinta";
+ Text[ ca ] = "Selec~ció de fitxer";
+ Text[ it ] = "Scelta file";
+ Text[ sk ] = "Výber ~súboru";
+ Text[ da ] = "Filudvalg";
+ Text[ sv ] = "~Filurval";
+ Text[ pl ] = "Wybór ~plików";
+ Text[ pt-BR ] = "~Seleção de arquivo";
+ Text[ th ] = "เลือà¸à¹~ฟ้ม";
+ Text[ ja ] = "ファイルé¸æŠž(~F)";
+ Text[ ko ] = "íŒŒì¼ ì„ íƒ(~F)";
+ Text[ zh-CN ] = "选择文件(~F)";
+ Text[ zh-TW ] = "é¸æ“‡æª”案(~F)";
+ Text[ tr ] = "Dosya seçimi";
+ Text[ hi-IN ] = "~फाइल का चà¥à¤¨à¤¾à¤µ";
+ Text[ ar ] = "اختيار الملÙ";
+ Text[ he ] = "‮בחירת קובץ‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_DATE ;
+ HelpID = SID_FM_CONVERTTO_DATE ;
+ Text [ de ] = "D~atumsfeld" ;
+ Text [ en-US ] = "~Date Field";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Campo para d~ata";
+ Text[ ru ] = "Поле даты";
+ Text[ el ] = "Πεδίο ημεÏομηνί~ας";
+ Text[ nl ] = "~Datumveld";
+ Text[ fr ] = "Champ de ~date";
+ Text[ es ] = "Campo de ~fecha";
+ Text[ fi ] = "~Päivämääräkenttä";
+ Text[ ca ] = "Camp ~data";
+ Text[ it ] = "Campo ~data";
+ Text[ sk ] = "~Dátumové pole";
+ Text[ da ] = "Datofelt";
+ Text[ sv ] = "~Datumfält";
+ Text[ pl ] = "Pole ~daty";
+ Text[ pt-BR ] = "~Campo de Data";
+ Text[ th ] = "เขตข้อมูล~วันที่";
+ Text[ ja ] = "日付フィールド(~D)";
+ Text[ ko ] = "날짜 필드(~D)";
+ Text[ zh-CN ] = "日期字段(~D)";
+ Text[ zh-TW ] = "日期欄ä½(~D)";
+ Text[ tr ] = "Tarih alanı";
+ Text[ hi-IN ] = "~दिनांक कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل التاريخ";
+ Text[ he ] = "‮שדה ת×ריך‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_TIME ;
+ HelpID = SID_FM_CONVERTTO_TIME ;
+ Text [ de ] = "~Zeitfeld" ;
+ Text [ en-US ] = "Tim~e Field";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Campo ~horário";
+ Text[ ru ] = "Поле времени";
+ Text[ el ] = "Πεδίο ÏŽ~Ïας";
+ Text[ nl ] = "~Tijdveld";
+ Text[ fr ] = "Champ ~horaire";
+ Text[ es ] = "Campo ~horario";
+ Text[ fi ] = "~Aikakenttä";
+ Text[ ca ] = "Camp t~emps";
+ Text[ it ] = "Campo ~orario";
+ Text[ sk ] = "Č~asové pole";
+ Text[ da ] = "Klokkeslætsfelt";
+ Text[ sv ] = "~Tidsfält";
+ Text[ pl ] = "~Pol~e godziny";
+ Text[ pt-BR ] = "Campo de ~hora";
+ Text[ th ] = "เขตข้อมูลเว~ลา";
+ Text[ ja ] = "時刻フィールド(~E)";
+ Text[ ko ] = "시간 필드(~E)";
+ Text[ zh-CN ] = "时间字段(~E)";
+ Text[ zh-TW ] = "時間欄ä½(~E)";
+ Text[ tr ] = "Zaman alanı";
+ Text[ hi-IN ] = "सम~य कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل الوقت";
+ Text[ he ] = "‮שדה זמן‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_NUMERIC ;
+ HelpID = SID_FM_CONVERTTO_NUMERIC ;
+ Text [ de ] = "~Numerisches Feld" ;
+ Text [ en-US ] = "~Numerical Field";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "~Campo ~numérico";
+ Text[ ru ] = "ЧиÑловое поле";
+ Text[ el ] = "ΑÏι~θμητικό πεδίο";
+ Text[ nl ] = "~Numeriek veld";
+ Text[ fr ] = "Champ ~numérique";
+ Text[ es ] = "C~ampo numérico";
+ Text[ fi ] = "~Numeerinen kenttä";
+ Text[ ca ] = "C~amp numèric";
+ Text[ it ] = "Campo ~numerico";
+ Text[ sk ] = "Čísel~né pole";
+ Text[ da ] = "Numerisk felt";
+ Text[ sv ] = "~Numeriskt fält";
+ Text[ pl ] = "~Pole liczbowe";
+ Text[ pt-BR ] = "~Campo numérico";
+ Text[ th ] = "เขตข้อมูล~ตัวเลข";
+ Text[ ja ] = "数値フィールド(~N)";
+ Text[ ko ] = "ìˆ«ìž í•„ë“œ(~N)";
+ Text[ zh-CN ] = "数字字段(~N)";
+ Text[ zh-TW ] = "數字欄ä½(~N)";
+ Text[ tr ] = "Sayısal alan";
+ Text[ hi-IN ] = "~संखà¥à¤¯à¤¾ कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل رقمي";
+ Text[ he ] = "‮שדה מספרי‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_CURRENCY ;
+ HelpID = SID_FM_CONVERTTO_CURRENCY ;
+ Text [ de ] = "~Währungsfeld" ;
+ Text [ en-US ] = "C~urrency Field";
+ Text[ pt ] = "Campo para moe~da";
+ Text[ ru ] = "Денежное поле";
+ Text[ el ] = "Πε~δίο νομίσματος";
+ Text[ nl ] = "~Valutaveld";
+ Text[ fr ] = "Champ ~monétaire";
+ Text[ es ] = "Cam~po de moneda";
+ Text[ fi ] = "~Valuuttakenttä";
+ Text[ ca ] = "Camp m~oneda";
+ Text[ it ] = "Campo di ~valuta";
+ Text[ sk ] = "~Menové pole";
+ Text[ da ] = "Valutafelt";
+ Text[ sv ] = "V~alutafält";
+ Text[ pl ] = "Pole ~walutowe";
+ Text[ pt-BR ] = "~Campo Monetário";
+ Text[ th ] = "เขตข้อมูลส~à¸à¸¸à¸¥à¹€à¸‡à¸´à¸™";
+ Text[ ja ] = "通貨フィールド(~U)";
+ Text[ ko ] = "통화 필드(~U)";
+ Text[ zh-CN ] = "è´§å¸å­—段(~U)";
+ Text[ zh-TW ] = "貨幣欄ä½(~U)";
+ Text[ tr ] = "Para birimi alanı";
+ Text[ hi-IN ] = "~मà¥à¤¦à¥à¤°à¤¾ कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل العملة";
+ Text[ he ] = "‮שדה מטבע‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_PATTERN ;
+ HelpID = SID_FM_CONVERTTO_PATTERN ;
+ Text [ de ] = "Mask~iertes Feld" ;
+ Text [ en-US ] = "~Pattern Field";
+ Text[ pt ] = "~Campo mascarado";
+ Text[ ru ] = "Поле Ñ Ð¼Ð°Ñкой ввода";
+ Text[ el ] = "Καλ~υμμένο πεδίο";
+ Text[ nl ] = "~Patroonveld";
+ Text[ fr ] = "Champ ~masqué";
+ Text[ es ] = "Campo enmascarado";
+ Text[ fi ] = "~Kuviokenttä";
+ Text[ ca ] = "Camp s~eleccionat";
+ Text[ it ] = "Campo a ~maschera";
+ Text[ sk ] = "Pole ~vzorky";
+ Text[ da ] = "Maskeret felt";
+ Text[ sv ] = "~Maskerat fält";
+ Text[ pl ] = "~Pole wzorca";
+ Text[ pt-BR ] = "~Campo Padrão";
+ Text[ th ] = "เขตข้อมูล~ลวดลาย";
+ Text[ ja ] = "パターンフィールド(~P)";
+ Text[ ko ] = "패턴 필드(~P)";
+ Text[ zh-CN ] = "掩ç å­—段(~P)";
+ Text[ zh-TW ] = "é®ç½©æ¬„ä½(~P)";
+ Text[ tr ] = "MaskelenmiÅŸ alan";
+ Text[ hi-IN ] = "~नमूना कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل Ù…Ùقنَّع";
+ Text[ he ] = "‮שדה תבנית‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_IMAGECONTROL ;
+ HelpID = SID_FM_CONVERTTO_IMAGECONTROL ;
+ Text [ de ] = "G~rafisches Kontrollfeld" ;
+ Text [ en-US ] = "Ima~ge Control";
+ Text[ pt ] = "Controlo g~ráfico";
+ Text[ ru ] = "ГрафичеÑкий Ñлемент управлениÑ";
+ Text[ el ] = "Γ~Ïαφικό πεδίο ελέγχου";
+ Text[ nl ] = "Grafisch c~ontroleveld";
+ Text[ fr ] = "Contrôle ~picto";
+ Text[ es ] = "Control de ima~gen";
+ Text[ fi ] = "~Kuvan ohjaus";
+ Text[ ca ] = "Control d'imat~ge";
+ Text[ it ] = "Campo di controllo ~immagine";
+ Text[ sk ] = "Ovl~ádacie pole obrázku";
+ Text[ da ] = "Grafisk kontrolelement";
+ Text[ sv ] = "Gra~fiskt kontrollfält";
+ Text[ pl ] = "~Formant obrazkowy";
+ Text[ pt-BR ] = "Controle de ~imagem";
+ Text[ th ] = "ควบคุมภา~พ";
+ Text[ ja ] = "イメージコントロールフィールド(~G)";
+ Text[ ko ] = "ì´ë¯¸ì§€ 컨트롤(~G)";
+ Text[ zh-CN ] = "图å¼æŽ§åˆ¶(~G)";
+ Text[ zh-TW ] = "圖å¼æŽ§åˆ¶é …(~G)";
+ Text[ tr ] = "Grafiksel komut alanı";
+ Text[ hi-IN ] = "चितà¥à¤° नियंतà¥à¤°~ण";
+ Text[ ar ] = "عنصر تحكم رسومي";
+ Text[ he ] = "‮בקרת צל×‬";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_FORMATTED ;
+ HelpID = SID_FM_CONVERTTO_FORMATTED ;
+ Text [ de ] = "~Formatiertes Feld" ;
+ Text [ en-US ] = "Fo~rmatted Field";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Campo ~formatado";
+ Text[ ru ] = "Поле Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸ÐµÐ¼";
+ Text[ el ] = "ΜοÏ~φοποιημένο πεδίο";
+ Text[ nl ] = "Opge~maakt veld";
+ Text[ fr ] = "~Champ formaté";
+ Text[ es ] = "Campo for~mateado";
+ Text[ fi ] = "~Muotoiltu kenttä";
+ Text[ ca ] = "Camp fo~rmatat";
+ Text[ it ] = "Campo fo~rmattato";
+ Text[ sk ] = "Fo~rmátované pole";
+ Text[ da ] = "Formateret felt";
+ Text[ sv ] = "Fo~rmaterat fält";
+ Text[ pl ] = "Pole fo~rmatowane";
+ Text[ pt-BR ] = "Campo ~formatado";
+ Text[ th ] = "เขตข้อมูลà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹~บบ";
+ Text[ ja ] = "書å¼è¨­å®šã•ã‚ŒãŸãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰(~R)";
+ Text[ ko ] = "ì„œì‹ ìžˆëŠ” í•„ë“œ(~R)";
+ Text[ zh-CN ] = "æ ¼å¼åŒ–的字段(~R)";
+ Text[ zh-TW ] = "æ ¼å¼åŒ–的欄ä½(~R)";
+ Text[ tr ] = "Formatlı alan";
+ Text[ hi-IN ] = "रचना किया हà¥~आ कà¥à¤·à¥‡à¤¤à¥à¤°";
+ Text[ ar ] = "حقل Ù…Ùنسَّق";
+ Text[ he ] = "‮שדה מעוצב‬";
+ };
+ };
+};
+
+#define NAVIGATOR_IMAGEIDS \
+ 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 ; \
+ }; \
+ IdCount = 28
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/form/svx_fmimplids.cxx b/binfilter/bf_svx/source/form/svx_fmimplids.cxx
new file mode 100644
index 000000000000..af7be90fc8a4
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmimplids.cxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "fmimplids.hxx"
+namespace binfilter {
+
+/*N*/ IMPLEMENT_IMPLEMENTATIONID_HELPER_VSMALL(form, OImplementationIds)
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmmodel.cxx b/binfilter/bf_svx/source/form/svx_fmmodel.cxx
new file mode 100644
index 000000000000..18eb7c059e10
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmmodel.cxx
@@ -0,0 +1,386 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef SVX_LIGHT
+#include <bf_sfx2/objsh.hxx>
+#else
+class SfxObjectShell;
+#endif
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "fmmodel.hxx"
+
+#include "svdio.hxx"
+
+#include "fmpage.hxx"
+
+#include "svdobj.hxx"
+
+namespace binfilter {
+
+/*N*/ TYPEINIT1(FmFormModel, SdrModel);
+
+struct FmFormModelImplData
+{
+ XubString sNextPageId;
+ sal_Bool bOpenInDesignIsDefaulted;
+ sal_Bool bMovingPage;
+
+ FmFormModelImplData()
+ :bOpenInDesignIsDefaulted( sal_True )
+ ,bMovingPage( sal_False )
+ {
+ }
+};
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+/*N*/ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SvPersist* pPers)
+/*N*/ :SdrModel(rPath, pPool, pPers)
+/*N*/ ,pObjShell(0)
+/*N*/ ,bStreamingOldVersion(sal_False)
+/*N*/ ,m_pImpl(NULL)
+/*N*/ ,m_bOpenInDesignMode(sal_False)
+/*N*/ ,m_bAutoControlFocus(sal_False)
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ m_pImpl = new FmFormModelImplData;
+/*N*/ m_pImpl->sNextPageId = '0';
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+/*N*/ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SvPersist* pPers,
+/*N*/ FASTBOOL bUseExtColorTable)
+/*N*/ :SdrModel(rPath, pPool, pPers, bUseExtColorTable, LOADREFCOUNTS)
+/*N*/ ,pObjShell(0)
+/*N*/ ,bStreamingOldVersion(sal_False)
+/*N*/ ,m_bOpenInDesignMode(sal_False)
+/*N*/ ,m_bAutoControlFocus(sal_False)
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ m_pImpl = new FmFormModelImplData;
+/*N*/ m_pImpl->sNextPageId = '0';
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+/*N*/ FmFormModel::~FmFormModel()
+/*N*/ {
+/*N*/ SetObjectShell(NULL);
+/*N*/ delete m_pImpl;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Copy-Ctor
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* Operator=
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* Operator==
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Erzeugt eine neue Seite
+|*
+\************************************************************************/
+
+/*************************************************************************
+|*
+|* WriteData
+|*
+\************************************************************************/
+
+/*N*/ void FmFormModel::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/
+/*N*/ if( rOut.GetVersion() < SOFFICE_FILEFORMAT_50 )
+/*N*/ ((FmFormModel*)this)->bStreamingOldVersion = sal_True;
+/*N*/
+/*N*/ SdrModel::WriteData( rOut );
+/*N*/
+/*N*/ //////////////////////////////////////////////////////////////////////
+/*N*/ // Speichern der Option OpenInDesignMode
+/*N*/ if (!bStreamingOldVersion)
+/*N*/ {
+/*N*/ SdrDownCompat aModelFormatCompat(rOut,STREAM_WRITE);
+/*N*/
+/*N*/ sal_uInt8 nTemp = m_bOpenInDesignMode;
+/*N*/ rOut << nTemp;
+/*N*/
+/*N*/ nTemp = m_bAutoControlFocus;
+/*N*/ rOut << nTemp;
+/*N*/ }
+/*N*/
+/*N*/ ((FmFormModel*)this)->bStreamingOldVersion = sal_False;
+/*N*/
+/*N*/ #endif
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* ReadData
+|*
+\************************************************************************/
+/*N*/ void FmFormModel::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if( rIn.GetVersion() < SOFFICE_FILEFORMAT_50 )
+/*N*/ ((FmFormModel*)this)->bStreamingOldVersion = sal_True;
+/*N*/
+/*N*/ SdrModel::ReadData( rHead, rIn );
+/*N*/
+/*N*/ //////////////////////////////////////////////////////////////////////
+/*N*/ // Lesen der Option OpenInDesignMode
+/*N*/ if (!bStreamingOldVersion)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ);
+/*N*/ sal_uInt8 nTemp = 0;
+/*N*/ rIn >> nTemp;
+/*N*/
+/*N*/ implSetOpenInDesignMode( nTemp ? sal_True : sal_False, sal_True );
+/*N*/
+/*N*/ if (aCompat.GetBytesLeft())
+/*N*/ { // it is a version which already wrote the AutoControlFocus flag
+/*N*/ rIn >> nTemp;
+/*N*/ m_bAutoControlFocus = nTemp ? sal_True : sal_False;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ((FmFormModel*)this)->bStreamingOldVersion = sal_False;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* InsertPage
+|*
+\************************************************************************/
+/*N*/ void FmFormModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
+/*N*/ {
+/*?*/ SetObjectShell(pObjShell);
+/*N*/
+/*N*/ SdrModel::InsertPage( pPage, nPos );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( !m_pImpl->bMovingPage )
+/*N*/ {
+/*N*/ // this flag here is kind of a hack.
+/*N*/ // When a page is moved, the SdrModel::MovePage calls an InsertPage only, but
+/*N*/ // no preceding RemovePage. Thus, we (as a derivee) don't have a chance to see
+/*N*/ // that the page which is just being inserted is (in real) already a part of the
+/*N*/ // model. Especially, we do not have a change to notice that the UndoEnvironment
+/*N*/ // already _knows_ the forms we're just going to add below.
+/*N*/ //
+/*N*/ // The real solution to this would have been to fix SdrModel::MovePage, which
+/*N*/ // is buggy in it's current form (as it violates the semantics of InsertPage, which
+/*N*/ // is: insert a page which /currently is not part of any model/).
+/*N*/ // However, this change in the SdrModel is much too risky.
+/*N*/ //
+/*N*/ // Another solution to this would have been to track (in the UndoEnv) which pages
+/*N*/ // we know, and ignore any AddForms calls which are for such a page.
+/*N*/ // But I refuse to do this (much more) work to hack a bug in the SdrModel.
+/*N*/ //
+/*N*/ // I the decision is to do this "small hack" here (which I don't consider really
+/*N*/ // bad).
+/*N*/ //
+/*N*/ // 2002-01-10 - #i3235# - fs@openoffice.org
+/*N*/ //
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*************************************************************************
+|*
+|* MovePage
+|*
+\************************************************************************/
+/*?*/ void FmFormModel::MovePage( USHORT nPgNum, USHORT nNewPos )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*?*/ }
+
+/*************************************************************************
+|*
+|* RemovePage
+|*
+\************************************************************************/
+/*N*/ SdrPage* FmFormModel::RemovePage(sal_uInt16 nPgNum)
+/*N*/ {
+/*N*/ FmFormPage* pPage = (FmFormPage*)SdrModel::RemovePage(nPgNum);
+/*N*/
+/*N*/
+/*N*/ return pPage;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* InsertMasterPage
+|*
+\************************************************************************/
+/*N*/ void FmFormModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
+/*N*/ {
+/*N*/ SetObjectShell(pObjShell);
+/*N*/
+/*N*/ SdrModel::InsertMasterPage(pPage, nPos);
+/*N*/
+/*N*/ }
+
+/*************************************************************************
+|*
+|* RemoveMasterPage
+|*
+\************************************************************************/
+/*N*/ SdrPage* FmFormModel::RemoveMasterPage(sal_uInt16 nPgNum)
+/*N*/ {
+/*N*/ FmFormPage* pPage = (FmFormPage*)SdrModel::RemoveMasterPage(nPgNum);
+/*N*/
+/*N*/ return pPage;
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ SdrLayerID FmFormModel::GetControlExportLayerId( const SdrObject& rObj ) const
+/*N*/ {
+/*N*/ return rObj.GetLayer();
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ void FmFormModel::implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce )
+/*N*/ {
+/*N*/ if( ( _bOpenDesignMode != m_bOpenInDesignMode ) || _bForce )
+/*N*/ {
+/*N*/ m_bOpenInDesignMode = _bOpenDesignMode;
+/*N*/
+/*N*/ if ( pObjShell )
+/*N*/ pObjShell->SetModified( sal_True );
+/*N*/ }
+/*N*/ // no matter if we really did it or not - from now on, it does not count as defaulted anymore
+/*N*/ m_pImpl->bOpenInDesignIsDefaulted = sal_False;
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ void FmFormModel::SetOpenInDesignMode( sal_Bool bOpenDesignMode )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ implSetOpenInDesignMode( bOpenDesignMode, sal_False );
+/*N*/ #endif
+/*N*/ }
+
+#ifndef SVX_LIGHT
+//------------------------------------------------------------------------
+/*N*/ sal_Bool FmFormModel::OpenInDesignModeIsDefaulted( )
+/*N*/ {
+/*N*/ return m_pImpl->bOpenInDesignIsDefaulted;
+/*N*/ }
+#endif
+
+//------------------------------------------------------------------------
+/*N*/ void FmFormModel::SetAutoControlFocus( sal_Bool _bAutoControlFocus )
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( _bAutoControlFocus != m_bAutoControlFocus )
+/*N*/ {
+/*?*/ m_bAutoControlFocus = _bAutoControlFocus;
+/*?*/ pObjShell->SetModified( sal_True );
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ void FmFormModel::SetObjectShell( SfxObjectShell* pShell )
+/*N*/ {
+/*N*/ if (pShell == pObjShell)
+/*N*/ return;
+/*N*/
+/*N*/
+/*N*/ pObjShell = pShell;
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ XubString FmFormModel::GetUniquePageId()
+/*N*/ {
+/*N*/ XubString sReturn = m_pImpl->sNextPageId;
+/*N*/
+/*N*/ xub_Unicode aNextChar = m_pImpl->sNextPageId.GetChar(m_pImpl->sNextPageId.Len() - 1);
+/*N*/ sal_Bool bNeedNewChar = sal_False;
+/*N*/ switch (aNextChar)
+/*N*/ {
+/*N*/ case '9' : aNextChar = 'A'; break;
+/*N*/ case 'Z' : aNextChar = 'a'; break;
+/*N*/ case 'z' : aNextChar = '0'; bNeedNewChar = sal_True; break;
+/*N*/ default: ++aNextChar; break;
+/*N*/ }
+/*N*/ m_pImpl->sNextPageId.SetChar(m_pImpl->sNextPageId.Len() - 1, aNextChar);
+/*N*/ if (bNeedNewChar)
+/*N*/ m_pImpl->sNextPageId += '0';
+/*N*/
+/*N*/ return sReturn;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmobj.cxx b/binfilter/bf_svx/source/form/svx_fmobj.cxx
new file mode 100644
index 000000000000..228ff8a118e5
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmobj.cxx
@@ -0,0 +1,248 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+
+#include "fmobj.hxx"
+
+#include "fmprop.hrc"
+
+
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+
+
+
+#include "fmmodel.hxx"
+
+#include "fmtools.hxx"
+
+
+
+#include "fmresids.hrc"
+
+#include <fmview.hxx>
+
+#include "fmglob.hxx"
+
+#include "fmpgeimp.hxx"
+
+#include "fmpage.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+using namespace ::binfilter::svxform;//STRIP008 using namespace ::svxform;
+
+/*N*/ TYPEINIT1(FmFormObj, SdrUnoObj);
+/*N*/ DBG_NAME(FmFormObj)
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+/*N*/ FmFormObj::FmFormObj(sal_Int32 _nType)
+/*N*/ :SdrUnoObj(String(), sal_False)
+/*N*/ ,nEvent(0)
+/*N*/ ,pTempView(0)
+/*N*/ ,nPos(-1)
+/*N*/ ,m_nType(_nType)
+/*N*/ {
+/*N*/ DBG_CTOR(FmFormObj, NULL);
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ FmFormObj::~FmFormObj()
+/*N*/ {
+/*N*/ DBG_DTOR(FmFormObj, NULL);
+/*N*/ if (nEvent)
+/*?*/ Application::RemoveUserEvent(nEvent);
+/*N*/
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xHistory(m_xEnvironmentHistory, ::com::sun::star::uno::UNO_QUERY);
+/*N*/ if (xHistory.is())
+/*?*/ xHistory->dispose();
+/*N*/
+/*N*/ m_xEnvironmentHistory = NULL;
+/*N*/ m_aEventsHistory.realloc(0);
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ void FmFormObj::SetPage(SdrPage* _pNewPage)
+/*N*/ {
+/*N*/ FmFormPage* pNewFormPage = PTR_CAST(FmFormPage, _pNewPage);
+/*N*/ if (!pNewFormPage || (GetPage() == _pNewPage))
+/*N*/ { // 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,
+/*N*/ // me may want to remember our place within the old page. For this we could create a new m_pEnvironmentHistory to store it.
+/*N*/ // So the next SetPage with a valid new page would restore that environment within the new page.
+/*N*/ // But for the original Bug (#57300#) we don't need that, so I omit it here. Maybe this will be implemented later.
+/*N*/ SdrUnoObj::SetPage(_pNewPage);
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xNewParent;
+/*N*/ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor> aNewEvents;
+/*N*/
+/*N*/ // calc the new parent for my model (within the new page's forms hierarchy)
+/*N*/ // do we have a history ? (from :Clone)
+/*N*/ if (m_xEnvironmentHistory.is())
+/*N*/ {
+/*N*/ // the element in *m_pEnvironmentHistory which is equivalent to my new parent (which (perhaps) has to be created within _pNewPage->GetForms)
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*N*/ // is the right-most element in the tree.
+/*N*/ }
+/*N*/
+/*N*/ if (!xNewParent.is())
+/*N*/ {
+/*N*/ // are we a valid part of our current page forms ?
+/*N*/ FmFormPage* pOldFormPage = PTR_CAST(FmFormPage, GetPage());
+/*N*/ ::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 > ();
+/*N*/ if (xOldForms.is())
+/*N*/ {
+/*N*/ // 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
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xMeAsChild(GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // now set the page
+/*N*/ SdrUnoObj::SetPage(_pNewPage);
+/*N*/
+/*N*/ // place my model within the new parent container
+/*N*/ if (xNewParent.is())
+/*N*/ {
+/*?*/ ::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 !");
+/*?*/ }
+/*?*/
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // delete my history
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xHistory(m_xEnvironmentHistory, ::com::sun::star::uno::UNO_QUERY);
+/*N*/ if (xHistory.is())
+/*?*/ xHistory->dispose();
+/*N*/
+/*N*/ m_xEnvironmentHistory = NULL;
+/*N*/ m_aEventsHistory.realloc(0);
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ sal_uInt32 FmFormObj::GetObjInventor() const
+/*N*/ {
+/*N*/ if( GetModel() && ((FmFormModel*)GetModel())->IsStreamingOldVersion() )
+/*?*/ return SdrInventor;
+/*N*/ return FmFormInventor;
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ sal_uInt16 FmFormObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ if( GetModel() && ((FmFormModel*)GetModel())->IsStreamingOldVersion() )
+/*?*/ return OBJ_RECT;
+/*N*/ return OBJ_FM_CONTROL;
+/*N*/ }
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+/*N*/ void FmFormObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ FmFormModel* pModel = (FmFormModel*)GetModel();
+/*N*/ if( pModel && pModel->IsStreamingOldVersion() )
+/*N*/ {
+/*?*/ SdrLayerID nOld = GetLayer();
+/*?*/ ((FmFormObj*)this)->NbcSetLayer( pModel->GetControlExportLayerId( *this ) );
+/*?*/ SdrUnoObj::WriteData( rOut );
+/*?*/ ((FmFormObj*)this)->NbcSetLayer( nOld );
+/*?*/ return;
+/*N*/ }
+/*N*/ SdrUnoObj::WriteData(rOut);
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ void FmFormObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ SdrUnoObj::ReadData(rHead,rIn);
+/*N*/ }
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmobjfac.cxx b/binfilter/bf_svx/source/form/svx_fmobjfac.cxx
new file mode 100644
index 000000000000..b7d75a237e55
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmobjfac.cxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+
+
+
+#include "fmobjfac.hxx"
+
+#include "fmglob.hxx"
+
+#include "fmobj.hxx"
+
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+
+#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
+
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include "fmshimp.hxx"
+
+
+#include "svxids.hrc"
+
+
+#include "fmresids.hrc"
+
+
+
+#include "fmservs.hxx"
+
+
+
+#include "fmprop.hrc"
+
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::binfilter::svxform;//STRIP008 using namespace ::svxform;
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+/*N*/ FmFormObjFactory::FmFormObjFactory()
+/*N*/ {
+/*N*/ SdrObjFactory::InsertMakeObjectHdl(LINK(this, FmFormObjFactory, MakeObject));
+/*N*/
+/*N*/ // ImplSmartRegisterUnoServices();
+/*N*/
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+/*N*/ FmFormObjFactory::~FmFormObjFactory()
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* ::com::sun::star::form::Form-Objekte erzeugen
+|*
+\************************************************************************/
+
+/*N*/ IMPL_LINK(FmFormObjFactory, MakeObject, SdrObjFactory*, pObjFactory)
+/*N*/ {
+/*N*/ if (pObjFactory->nInventor == FmFormInventor)
+/*N*/ {
+/*N*/ switch (pObjFactory->nIdentifier)
+/*N*/ {
+/*N*/ case OBJ_FM_CONTROL: // allgemeines Object
+/*N*/ {
+/*N*/ pObjFactory->pNewObj = new FmFormObj(pObjFactory->nIdentifier);
+/*N*/ } break;
+/*?*/ default:
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");}//STRIP001 return 0;
+/*?*/ }
+/*?*/ }
+/*N*/
+/*N*/ return 0;
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmpage.cxx b/binfilter/bf_svx/source/form/svx_fmpage.cxx
new file mode 100644
index 000000000000..c5a227e82006
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmpage.cxx
@@ -0,0 +1,203 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define ENABLE_BYTESTRING_STREAM_OPERATORS
+
+#include "fmpage.hxx"
+
+
+
+#include "fmmodel.hxx"
+
+#ifndef SVX_LIGHT
+#endif
+
+#ifndef SVX_LIGHT
+#include "fmresids.hrc"
+#endif
+
+
+
+#ifndef SVX_LIGHT
+#include "fmpgeimp.hxx"
+#endif
+
+#include "svdio.hxx"
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+
+
+
+#ifndef SVX_LIGHT
+#include "fmprop.hrc"
+using namespace ::binfilter::svxform;//STRIP008 using namespace ::svxform;
+#endif
+
+namespace binfilter {
+
+
+/*N*/ TYPEINIT1(FmFormPage, SdrPage);
+
+//------------------------------------------------------------------
+/*N*/ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMasterPage)
+/*N*/ :SdrPage(rModel, bMasterPage)
+/*N*/ ,pBasic(_pBasic)
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ,pImpl(new FmFormPageImpl(this))
+/*N*/ #else
+/*N*/ ,pImpl(NULL)
+/*N*/ #endif
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------
+/*N*/ FmFormPage::~FmFormPage()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ delete pImpl;
+/*N*/ #endif
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ void FmFormPage::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ {
+/*N*/ {
+/*N*/ SdrDownCompat aVCCompat1( rOut, STREAM_WRITE );
+/*N*/ sal_uInt16 n = 0;
+/*N*/ rOut << n;
+/*N*/ }
+/*N*/ SdrPage::WriteData( rOut );
+/*N*/ SdrDownCompat aVCCompat2( rOut, STREAM_WRITE );
+/*N*/
+/*N*/ rOut << ByteString(aPageName, gsl_getSystemTextEncoding());
+/*N*/ rOut << (sal_uInt32)0x11051967;
+/*N*/ rOut << (sal_uInt32)0x19670511;
+/*N*/ sal_uInt16 nVer = 1;
+/*N*/ rOut << nVer;
+/*N*/ {
+/*N*/ SdrDownCompat aVCCompat3( rOut, STREAM_WRITE);
+/*N*/ sal_uInt32 nFormCount = 0;
+/*N*/ rOut << nFormCount;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // dont use the flag in that way: if (rOut.GetVersion() >= SOFFICE_FILEFORMAT_40)
+/*N*/ if (rOut.GetVersion() >= 3830)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ pImpl->WriteData(rOut);
+/*N*/ }
+/*N*/ #else
+/*N*/ DBG_ERROR( "FmFormPage::WriteData: not to be called in SVX_LIGHT version!" );
+/*N*/ #endif
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ void FmFormPage::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ {
+/*N*/ {
+/*N*/ SdrDownCompat aVCCompat1( rIn, STREAM_READ );
+/*N*/ }
+/*N*/ SdrPage::ReadData( rHead, rIn );
+/*N*/ {
+/*N*/ SdrDownCompat aVCCompat2( rIn, STREAM_READ );
+/*N*/ ByteString aByteStringName;
+/*N*/ rIn >> aByteStringName;
+/*N*/ aPageName = String(aByteStringName, gsl_getSystemTextEncoding());
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // dont use the flag in that way: if (rIn.GetVersion() >= SOFFICE_FILEFORMAT_40)
+/*N*/ if (rIn.GetVersion() >= 3830 && rHead.GetVersion() >=14)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ DBG_ASSERT( aCompat.GetBytesLeft(), "FmFormPage::ReadData: invalid file format!" );
+/*N*/ if ( aCompat.GetBytesLeft() )
+/*N*/ pImpl->ReadData(rHead, rIn);
+/*N*/ // some old (corrupted) versions between 511 and 554 wrote an empty block here - and some of these documents
+/*N*/ // are still out there
+/*N*/ // So we allow for such an empty block ...
+/*N*/ #endif
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ void FmFormPage::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrPage::SetModel( pNewModel );
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ SdrPage* FmFormPage::Clone() const
+/*N*/ {
+/*N*/ return new FmFormPage(*this);
+/*N*/ // hier fehlt noch ein kopieren der Objekte
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ void FmFormPage::InsertObject(SdrObject* pObj, ULONG nPos,
+/*N*/ const SdrInsertReason* pReason)
+/*N*/ {
+/*N*/ SdrPage::InsertObject( pObj, nPos, pReason );
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & FmFormPage::GetForms() const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ return pImpl->getForms();
+/*N*/ #else
+/*N*/ static ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > aRef;
+/*N*/ return aRef;
+/*N*/ #endif
+/*N*/ }
+
+//------------------------------------------------------------------
+/*N*/ SdrObject* FmFormPage::RemoveObject(ULONG nObjNum)
+/*N*/ {
+/*N*/ SdrObject* pObj = SdrPage::RemoveObject(nObjNum);
+/*N*/ return pObj;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmpgeimp.cxx b/binfilter/bf_svx/source/form/svx_fmpgeimp.cxx
new file mode 100644
index 000000000000..c04bba3cfdbd
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmpgeimp.cxx
@@ -0,0 +1,310 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _EXTERN_FORMLAYER_
+
+
+#include "svxerr.hxx"
+
+#include "fmpgeimp.hxx"
+
+
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/io/XMarkableStream.hpp>
+
+#include <bf_sfx2/objsh.hxx>
+
+#include "fmprop.hrc"
+#include "fmglob.hxx"
+
+#include "fmobj.hxx"
+#include "fmpage.hxx"
+#include "fmmodel.hxx"
+
+
+#include "svditer.hxx"
+
+#include "fmresids.hrc"
+
+#include <vcl/stdtext.hxx>
+
+
+#include <unotools/streamwrap.hxx>
+#include "dbtoolsclient.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx>
+
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::form;
+using namespace ::binfilter::svxform;
+
+/*N*/ DBG_NAME(FmFormPageImpl)
+//------------------------------------------------------------------------------
+/*N*/ FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage)
+/*N*/ :pPage(_pPage)
+/*N*/ ,m_bFirstActivation( sal_True )
+/*N*/ {
+/*N*/ DBG_CTOR(FmFormPageImpl,NULL);
+/*N*/ Init();
+/*N*/ }
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/*N*/ void FmFormPageImpl::Init()
+/*N*/ {
+/*N*/ if (pPage)
+/*N*/ {
+/*N*/ FmFormModel* pDrawModel = (FmFormModel*)pPage->GetModel();
+/*N*/ SfxObjectShell* pObjShell = pDrawModel->GetObjectShell();
+/*N*/ if( pObjShell )
+/*N*/ xModel = pObjShell->GetModel();
+/*N*/
+/*N*/ // get a unique page id from the model
+/*N*/ m_sPageId = pDrawModel->GetUniquePageId();
+/*N*/ }
+/*N*/
+/*N*/ static const ::rtl::OUString sFormsCollectionServiceName = ::rtl::OUString::createFromAscii("com.sun.star.form.Forms");
+/*N*/ xForms = Reference< ::com::sun::star::container::XNameContainer > (
+/*N*/ ::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(
+/*N*/ sFormsCollectionServiceName), ::com::sun::star::uno::UNO_QUERY);
+/*N*/ DBG_ASSERT(xForms.is(), "FmFormPageImpl::Init : could not create a forms collection !");
+/*N*/ if (!xForms.is())
+/*?*/ ShowServiceNotAvailableError(NULL, sFormsCollectionServiceName, sal_True);
+/*N*/
+/*N*/ Reference< ::com::sun::star::container::XChild > xAsChild(xForms, UNO_QUERY);
+/*N*/ if (xAsChild.is())
+/*N*/ xAsChild->setParent( xModel );
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ FmFormPageImpl::~FmFormPageImpl()
+/*N*/ {
+/*N*/ xCurrentForm = NULL;
+/*N*/
+/*N*/ ::comphelper::disposeComponent(xForms);
+/*N*/ DBG_DTOR(FmFormPageImpl,NULL);
+/*N*/ }
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+
+
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/*N*/ void FmFormPageImpl::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ // anlegen eines output streams fuer UNO
+/*N*/ Reference< ::com::sun::star::io::XActiveDataSource > xSource(::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), UNO_QUERY);
+/*N*/ Reference< ::com::sun::star::io::XOutputStream > xMarkOut(::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), UNO_QUERY);
+/*N*/ Reference< ::com::sun::star::io::XActiveDataSource > xMarkSource(xMarkOut, UNO_QUERY);
+/*N*/
+/*N*/ if (xSource.is())
+/*N*/ {
+/*N*/ xMarkSource->setOutputStream(new ::utl::OOutputStreamWrapper(rOut));
+/*N*/ xSource->setOutputStream(xMarkOut);
+/*N*/
+/*N*/ Reference< ::com::sun::star::io::XObjectOutputStream > xOutStrm(xSource, UNO_QUERY);
+/*N*/ try
+/*N*/ {
+/*N*/ write(xOutStrm);
+/*N*/ }
+/*N*/ catch(Exception&)
+/*N*/ {
+/*?*/ rOut.SetError( ERRCODE_CLASS_WRITE | ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_WARNING_MASK );
+/*N*/ }
+/*N*/
+/*N*/ xOutStrm->closeOutput();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // let's do a hack : in former versions we didn't use UNO-stream but SvStreams, so there was
+/*N*/ // no possibility that we couldn't write because of the lack of stream objects. Now, with UNO, this may happen
+/*N*/ // (as it happended here). But the read-methods of the older versions don't expect that (there is no flag in
+/*N*/ // the fileformat as it never was neccessary). To allow the old versions the read of the documents, we fake the
+/*N*/ // write : the first token usually written by our impl is an sal_Int32 giving the number of forms within the forms
+/*N*/ // 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 );
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void FmFormPageImpl::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // Abholen des InputStreams ueber uno
+/*N*/ Reference< ::com::sun::star::io::XActiveDataSink > xSink(::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), UNO_QUERY);
+/*N*/
+/*N*/ // creating the mark streams
+/*N*/ Reference< ::com::sun::star::io::XInputStream > xMarkIn(::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), UNO_QUERY);
+/*N*/ Reference< ::com::sun::star::io::XActiveDataSink > xMarkSink(xMarkIn, UNO_QUERY);
+/*N*/
+/*N*/ if (xSink.is())
+/*N*/ {
+/*N*/ ::utl::OInputStreamWrapper* pUnoStream = new ::utl::OInputStreamWrapper(rIn);
+/*N*/ xMarkSink->setInputStream(Reference< ::com::sun::star::io::XInputStream > (pUnoStream));
+/*N*/ xSink->setInputStream(xMarkIn);
+/*N*/
+/*N*/ // freigeben aller forms
+/*N*/ xCurrentForm = NULL;
+/*N*/
+/*N*/ if (xForms->hasElements())
+/*N*/ {
+/*?*/ ::comphelper::disposeComponent(xForms);
+/*?*/ Init();
+/*N*/ }
+/*N*/
+/*N*/ Reference< ::com::sun::star::io::XObjectInputStream > xInStrm(xSink,UNO_QUERY);
+/*N*/ try
+/*N*/ {
+/*N*/ read(xInStrm);
+/*N*/ }
+/*N*/ catch(Exception&)
+/*N*/ {
+/*?*/ rIn.SetError( ERRCODE_CLASS_READ | ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_WARNING_MASK );
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ xInStrm->closeInput();
+/*N*/ }
+/*N*/ else
+/*?*/ rIn.SetError( ERRCODE_CLASS_READ | ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_WARNING_MASK );
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void FmFormPageImpl::write(const Reference< ::com::sun::star::io::XObjectOutputStream > & xOutStrm) const
+/*N*/ {
+/*N*/ Reference< ::com::sun::star::io::XMarkableStream > xMarkStrm(xOutStrm, UNO_QUERY);
+/*N*/ if (!xMarkStrm.is())
+/*N*/ return; // exception
+/*N*/
+/*N*/ // sortieren der objectlist nach der Reihenfolge
+/*N*/ FmObjectList aList;
+/*N*/ fillList(aList, *pPage, sal_True);
+/*N*/
+/*N*/ // schreiben aller forms
+/*N*/ Reference< ::com::sun::star::io::XPersistObject > xAsPersist(xForms, UNO_QUERY);
+/*N*/ if (xAsPersist.is())
+/*N*/ xAsPersist->write(xOutStrm);
+/*N*/ // don't use the writeObject of the stream, as this wouldn't be compatible with older documents
+/*N*/
+/*N*/ // objectliste einfuegen
+/*N*/ sal_Int32 nLength = aList.Count();
+/*N*/
+/*N*/ // schreiben der laenge
+/*N*/ xOutStrm->writeLong(nLength);
+/*N*/
+/*N*/ for (sal_Int32 i = 0; i < nLength; i++)
+/*N*/ {
+/*N*/ // schreiben des Objects mit Marke
+/*N*/ // Marke um an den Anfang zu springen
+/*N*/ Reference< ::com::sun::star::io::XPersistObject > xObj(aList.GetObject(i)->GetUnoControlModel(), UNO_QUERY);
+/*N*/ if (xObj.is())
+/*N*/ {
+/*N*/ xOutStrm->writeObject(xObj);
+/*N*/ }
+/*N*/ else
+/*N*/ ;// exception
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void FmFormPageImpl::read(const Reference< ::com::sun::star::io::XObjectInputStream > & xInStrm)
+/*N*/ {
+/*N*/ Reference< ::com::sun::star::io::XMarkableStream > xMarkStrm(xInStrm, UNO_QUERY);
+/*N*/ if (!xMarkStrm.is())
+/*N*/ return; // exception
+/*N*/
+/*N*/ // sortieren der objectlist nach der Reihenfolge
+/*N*/ FmObjectList aList;
+/*N*/ fillList(aList, *pPage, sal_False);
+/*N*/
+/*N*/ // lesen aller forms
+/*N*/ Reference< ::com::sun::star::io::XPersistObject > xAsPersist(xForms, UNO_QUERY);
+/*N*/ if (xAsPersist.is())
+/*N*/ xAsPersist->read(xInStrm);
+/*N*/ // don't use the readObject of the stream, as this wouldn't be compatible with older documents
+/*N*/
+/*N*/ // Zuordnung der Formobjekte zu den FormComponents
+/*N*/ sal_Int32 nLength = xInStrm->readLong();
+/*N*/ DBG_ASSERT(nLength == (sal_Int32) aList.Count(), "Fehler beim Lesen der UnoModels");
+/*N*/ for (sal_Int32 i = 0; i < nLength; i++)
+/*N*/ {
+/*N*/ Reference< ::com::sun::star::awt::XControlModel > xRef(xInStrm->readObject(), UNO_QUERY);
+/*N*/ if (i < (sal_Int32)aList.Count())
+/*N*/ aList.GetObject(i)->SetUnoControlModel(xRef);
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void FmFormPageImpl::fillList(FmObjectList& rList, const SdrObjList& rObjList, sal_Bool bConnected) const
+/*N*/ {
+/*N*/ SdrObjListIter aIter(rObjList);
+/*N*/ while (aIter.IsMore())
+/*N*/ {
+/*N*/ SdrObject* pObj = aIter.Next();
+/*N*/ if (pObj && pObj->GetObjInventor() == FmFormInventor)
+/*N*/ {
+/*N*/ FmFormObj* pFormObj = PTR_CAST(FmFormObj, pObj);
+/*N*/ DBG_ASSERT(!bConnected || pFormObj->GetUnoControlModel().is(), "Controlshape ohne Control");
+/*N*/ if (!bConnected || pFormObj->GetUnoControlModel().is())
+/*N*/ rList.Insert(pFormObj, LIST_APPEND);
+/*N*/
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmprop.cxx b/binfilter/bf_svx/source/form/svx_fmprop.cxx
new file mode 100644
index 000000000000..07a874922392
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmprop.cxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define USE_PROPERTY_HELPER
+
+#include "fmprop.hrc"
+
+
+
+
+
+#include "fmresids.hrc"
+#include "fmhelp.hrc"
+
+namespace binfilter {
+
+/*?*/ namespace svxform
+/*?*/ {
+/*?*/ IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION, "ActiveConnection");
+/*?*/ } // namespace svxform
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_fmsearch.src b/binfilter/bf_svx/source/form/svx_fmsearch.src
new file mode 100644
index 000000000000..bf202a306197
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmsearch.src
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include "fmresids.hrc"
+#include "fmsearch.hrc"
+#include "fmhelp.hrc"
+
+
+
+
+ErrorBox RID_SVXERR_SEARCH_NORECORD
+{
+ Buttons = WB_OK;
+ Message [ de ] = "Es wurden keine Datensätze, die zu Ihren Angaben passen, gefunden !" ;
+ Message [ en-US ] = "No records corresponding to your data found!";
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Impossível encontrar registos de dados correspondentes às indicações fornecidas!";
+ Message[ ru ] = "Ðе найдено запиÑей, ÑоответÑтвующих вашему запроÑу!";
+ Message[ el ] = "Δεν βÏέθηκαν εγγÏαφές, οι οποίες να εκπληÏώνουν τα δεδομένα σας!";
+ Message[ nl ] = "Er zijn geen records gevonden die bij de vermelde gegevens passen!";
+ Message[ fr ] = "Aucun enregistrement trouvé qui corresponde à vos indications !";
+ Message[ es ] = "¡No se encontró ningún registro de datos adecuado a su información!";
+ Message[ fi ] = "Tietoja vastaavia tietueita ei löytynyt.";
+ Message[ ca ] = "No s'ha trobat cap registre que es correspongui a la vostra data!";
+ Message[ it ] = "Non sono stati trovati record di dati corrispondenti ai vostri dati!";
+ Message[ sk ] = "Neboli nájdené žiadne zodpovedajúce záznamy!";
+ Message[ da ] = "Der blev ikke fundet nogen dataposter, som svarer til dine angivelser!";
+ Message[ sv ] = "Inga dataposter som passar till dina uppgifter har hittats!";
+ Message[ pl ] = "Nie znaleziono żadnych rekordów odpowiadających wpisanym danym!";
+ Message[ pt-BR ] = "Não foi possível encontrar registros de dados correspondentes às indicações fornecidas!";
+ Message[ th ] = "ไม่มีระเบียนที่เป็นผลมาจาà¸à¸à¸²à¸£à¸žà¸šà¸‚้อมูลของคุณ!";
+ Message[ ja ] = "入力項目ã«è©²å½“ã™ã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。";
+ Message[ ko ] = "사용ìžì˜ ë°ì´í„°ì™€ 맞는 레코드를 찾지 못했습니다.";
+ Message[ zh-CN ] = "没有找到符åˆæ‚¨ç»™å®šçš„æ•°æ®æ¡ç›®ï¼";
+ Message[ zh-TW ] = "沒有找到符åˆæ‚¨æŒ‡å®šçš„資料æ¢ç›®ï¹—";
+ Message[ tr ] = "Girdiğiniz verilere uygun veri kümeleri bulunamadı!";
+ Message[ hi-IN ] = "आपके ड़ॉटा केलिठकोई उचित लेखा नहीं मिला!";
+ Message[ ar ] = "تعذر العثور على سجلات بيانات تتماشى مع بياناتك !";
+ Message[ he ] = "â€®×œ× ×ותרו רשומות מת×ימות לנתוני×!‬";
+};
+
+ErrorBox RID_SVXERR_SEARCH_GENERAL_ERROR
+{
+ Buttons = WB_OK;
+ Message [ de ] = "Es trat ein nicht näher bekannter Fehler auf. Die Suche konnte nicht beendet werden !" ;
+ Message [ en-US ] = "An unknown error occurred. The search could not be terminated!";
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "Surgiu um erro desconhecido. Impossível concluir a procura!";
+ Message[ ru ] = "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Ðевозможно закончить поиÑк!";
+ Message[ el ] = "ΠαÏουσιάστηκε άγνωστο σφάλμα. Η αναζήτηση δεν ήταν δυνατόν να ολοκληÏωθεί!";
+ Message[ nl ] = "Er is een onbekende fout opgetreden: De zoekactie kan niet worden beëindigd!";
+ Message[ fr ] = "Une erreur inconnue est survenue. La recherche n'a pas pu être terminée !";
+ Message[ es ] = "Ha ocurrido un error desconocido. La búsqueda no se pudo completar.";
+ Message[ fi ] = "Ilmeni tuntematon virhe. Hakua ei voitu suorittaa loppuun.";
+ Message[ ca ] = "S'ha produït un error desconegut. No s'ha pogut completar la cerca.";
+ Message[ it ] = "Impossibile terminare la ricerca. Si è verificato un errore non ben definito.";
+ Message[ sk ] = "Nastala neznáma chyba. Hľadanie nemožno ukonÄiÅ¥!";
+ Message[ da ] = "Der opstod en ukendt fejl. Det var ikke muligt at afslutte søgningen!";
+ Message[ sv ] = "Det har uppstått ett okänt fel. Det gick inte att avsluta sökningen!";
+ Message[ pl ] = "Wystąpił nieznany błąd. Nie można ukończyć wyszukiwania!";
+ Message[ pt-BR ] = "Ocorreu um erro desconhecido. Não foi possível concluir a pesquisa!";
+ Message[ th ] = "เà¸à¸´à¸”ข้อผิดพลาดที่ไม่รู้จัภไม่สามารถเลิà¸à¸à¸²à¸£à¸„้นหา!";
+ Message[ ja ] = "確èªã§ããªã„エラーãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚検索ã¯çµ‚了ã§ãã¾ã›ã‚“。";
+ Message[ ko ] = "ì•Œ 수 없는 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ê²€ìƒ‰ì„ ë§ˆì¹˜ì§€ 못했습니다.";
+ Message[ zh-CN ] = "出现一个ä¸æ˜Žçš„错误。无法结æŸæœå¯»å‘½ä»¤ï¼";
+ Message[ zh-TW ] = "出ç¾ä¸€å€‹ä¸æ˜Žçš„錯誤。無法çµæŸæœå°‹ï¼";
+ Message[ tr ] = "Ayrıntıları bilinmeyen bir hata oluştu. Arama işlemi tamamlanamadı!";
+ Message[ hi-IN ] = "à¤à¤• अजà¥à¤žà¤¾à¤¤ गलती घटित हà¥à¤† । खोज को समापà¥à¤¤ नहीं कर सकते है !";
+ Message[ ar ] = "حدث خطأ غير معروÙ. تعذر إنهاء البحث !";
+ Message[ he ] = "‮×רעה שגי××” ×œ× ×ž×•×›×¨×ª. ×œ× × ×™×ª×Ÿ ×œ×¡×™×™× ×ת החיפוש!‬";
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/form/svx_fmstring.src b/binfilter/bf_svx/source/form/svx_fmstring.src
new file mode 100644
index 000000000000..1894cc1b69b5
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmstring.src
@@ -0,0 +1,352 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include "fmresids.hrc"
+/* Strings fuer Uebersetzung */
+
+String RID_STR_NAME
+{
+ Text [ de ] = "Name" ;
+ Text [ en-US ] = "Name" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Nome";
+ Text[ ru ] = "ИмÑ";
+ Text[ el ] = "Όνομα";
+ Text[ nl ] = "Naam";
+ Text[ fr ] = "Nom";
+ Text[ es ] = "Nombre";
+ Text[ fi ] = "Nimi";
+ Text[ ca ] = "Nom";
+ Text[ it ] = "Nome";
+ Text[ sk ] = "Názov";
+ Text[ da ] = "Navn";
+ Text[ sv ] = "Namn";
+ Text[ pl ] = "Nazwa";
+ Text[ pt-BR ] = "Nome";
+ Text[ th ] = "ชื่อ";
+ Text[ ja ] = "åå‰";
+ Text[ ko ] = "ì´ë¦„";
+ Text[ zh-CN ] = "å称";
+ Text[ zh-TW ] = "å稱";
+ Text[ tr ] = "Ad";
+ Text[ hi-IN ] = "नामà¥";
+ Text[ ar ] = "الاسم";
+ Text[ he ] = "‮ש×‬";
+};
+
+String RID_STR_FORMS
+{
+ Text [ de ] = "Formulare" ;
+ Text [ en-US ] = "Forms" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Formulários";
+ Text[ ru ] = "Формы";
+ Text[ el ] = "ΦόÏμες";
+ Text[ nl ] = "Formulieren";
+ Text[ fr ] = "Formulaires";
+ Text[ es ] = "Formularios";
+ Text[ fi ] = "Lomakkeet";
+ Text[ ca ] = "Formularis";
+ Text[ it ] = "Formulari";
+ Text[ sk ] = "Formuláre";
+ Text[ da ] = "Formularer";
+ Text[ sv ] = "Formulär";
+ Text[ pl ] = "Formularze";
+ Text[ pt-BR ] = "Formulários";
+ Text[ th ] = "à¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡";
+ Text[ ja ] = "フォーム";
+ Text[ ko ] = "ì–‘ì‹";
+ Text[ zh-CN ] = "表å•";
+ Text[ zh-TW ] = "表單";
+ Text[ tr ] = "Formlar";
+ Text[ hi-IN ] = "फ़ॉरà¥à¤®";
+ Text[ ar ] = "استمارات";
+ Text[ he ] = "‮טפסי×‬";
+};
+
+String RID_STR_FORM
+{
+ Text [ de ] = "Formular" ;
+ Text [ en-US ] = "Form" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Formulário";
+ Text[ ru ] = "Форма";
+ Text[ el ] = "ΦόÏμα";
+ Text[ nl ] = "Formulier";
+ Text[ fr ] = "Formulaire";
+ Text[ es ] = "Formulario";
+ Text[ fi ] = "Lomake";
+ Text[ ca ] = "Formulari";
+ Text[ it ] = "Formulario";
+ Text[ sk ] = "Formulár";
+ Text[ da ] = "Formular";
+ Text[ sv ] = "Formulär";
+ Text[ pl ] = "Formularz";
+ Text[ pt-BR ] = "Formulário";
+ Text[ th ] = "à¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡";
+ Text[ ja ] = "フォーム";
+ Text[ ko ] = "ì–‘ì‹";
+ Text[ zh-CN ] = "表å•";
+ Text[ zh-TW ] = "表單";
+ Text[ tr ] = "Form";
+ Text[ hi-IN ] = "फ़ॉरà¥à¤®";
+ Text[ ar ] = "استمارة";
+ Text[ he ] = "‮טופס‬";
+};
+
+String RID_STR_FORMSHELL
+{
+ Text [ de ] = "Formular" ;
+ Text [ en-US ] = "Form" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Formulário";
+ Text[ ru ] = "Форма";
+ Text[ el ] = "ΦόÏμα";
+ Text[ nl ] = "Formulier";
+ Text[ fr ] = "Formulaire";
+ Text[ es ] = "Formulario";
+ Text[ fi ] = "Lomake";
+ Text[ ca ] = "Formulari";
+ Text[ it ] = "Formulario";
+ Text[ sk ] = "Formulár";
+ Text[ da ] = "Formular";
+ Text[ sv ] = "Formulär";
+ Text[ pl ] = "Formularz";
+ Text[ pt-BR ] = "Formulário";
+ Text[ th ] = "à¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡";
+ Text[ ja ] = "フォーム";
+ Text[ ko ] = "ì–‘ì‹";
+ Text[ zh-CN ] = "表å•";
+ Text[ zh-TW ] = "表單";
+ Text[ tr ] = "Forum";
+ Text[ hi-IN ] = "फ़ॉरà¥à¤®";
+ Text[ ar ] = "استمارة";
+ Text[ he ] = "‮טופס‬";
+};
+
+String RID_STR_CONTROL
+{
+ Text [ de ] = "Kontrollelement" ;
+ Text [ en-US ] = "Control" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Controlo";
+ Text[ ru ] = "Элемент управлениÑ";
+ Text[ el ] = "Στοιχείο ελέγχου";
+ Text[ nl ] = "Controle-element";
+ Text[ fr ] = "Élément de contrôle";
+ Text[ es ] = "Elemento de control";
+ Text[ fi ] = "Ohjausobjekti";
+ Text[ ca ] = "Control";
+ Text[ it ] = "Elemento di controllo";
+ Text[ sk ] = "Ovládací prvok";
+ Text[ da ] = "Kontrolelement";
+ Text[ sv ] = "Kontrollelement";
+ Text[ pl ] = "Formant";
+ Text[ pt-BR ] = "Controle";
+ Text[ th ] = "ควบคุม";
+ Text[ ja ] = "コントロールè¦ç´ ";
+ Text[ ko ] = "컨트롤";
+ Text[ zh-CN ] = "控制";
+ Text[ zh-TW ] = "控制項";
+ Text[ tr ] = "Komut alanı";
+ Text[ hi-IN ] = "नियंतà¥à¤°à¤£";
+ Text[ ar ] = "عنصر تحكم";
+ Text[ he ] = "‮פקד‬";
+};
+
+String RID_STR_FORM_FILTERED
+{
+ Text [ de ] = "(gefiltert)" ;
+ Text [ en-US ] = "(filtered)" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "(filtrado)";
+ Text[ ru ] = "(отфильтровано)";
+ Text[ el ] = "(φιλτÏαÏισμένα)";
+ Text[ nl ] = "(gefilterd)";
+ Text[ fr ] = "(filtré)";
+ Text[ es ] = "(filtrado)";
+ Text[ fi ] = "(suodatettu)";
+ Text[ ca ] = "(filtrat)";
+ Text[ it ] = "(filtrato)";
+ Text[ sk ] = "(filtrované)";
+ Text[ da ] = "(filtreret)";
+ Text[ sv ] = "(filtrerad)";
+ Text[ pl ] = "(przefiltrowane)";
+ Text[ pt-BR ] = "(filtrado)";
+ Text[ th ] = "(à¸à¸£à¸­à¸‡)";
+ Text[ ja ] = "(フィルタ済ã¿)";
+ Text[ ko ] = "(í•„í„°ë¨)";
+ Text[ zh-CN ] = "(å·²ç»ç­›é€‰è¿‡)";
+ Text[ zh-TW ] = "(已經篩é¸éŽ)";
+ Text[ tr ] = "(filtrelenmiÅŸ)";
+ Text[ hi-IN ] = "(फ़िलà¥à¤Ÿà¤° किया हà¥à¤†)";
+ Text[ ar ] = "(تم تصÙيته)";
+ Text[ he ] = "‮(מסונן)‬";
+};
+
+
+String RID_STR_SYNTAXERROR
+{
+ Text [ de ] = "Fehler bei der Analyse des Anfrageausdrucks" ;
+ Text [ en-US ] = "Syntax error in query expression" ;
+ Text[ pt ] = "Erro ao analisar a expressão de consulta.";
+ Text[ ru ] = "Ошибка ÑинтакÑиÑа в выражении запроÑа";
+ Text[ el ] = "Σφάλμα κατά την ανάλυση του οÏίσματος του εÏωτήματος";
+ Text[ nl ] = "Fout bij de analyse van queryafdruk";
+ Text[ fr ] = "Erreur dans l'analyse de l'expression de la requête";
+ Text[ es ] = "Ha ocurrido un error al analizar la expresión de la consulta";
+ Text[ fi ] = "Syntaksivirhe kyselylausekkeessa";
+ Text[ ca ] = "S'ha produït un error en analitzar l'expressió de consulta";
+ Text[ it ] = "Errore nell'analizzare dell'espressione di ricerca";
+ Text[ sk ] = "Syntaktická chyba v požiadavke";
+ Text[ da ] = "Fejl under analysen af forespørgseludtrykket";
+ Text[ sv ] = "Fel vid analys av frågeuttryck";
+ Text[ pl ] = "Błąd składni w wyrażeniu kwerendy";
+ Text[ pt-BR ] = "Erro de sintaxe na expressão da consulta.";
+ Text[ th ] = "ไวยà¸à¸£à¸“์ในคำอธิบายà¹à¸šà¸šà¸ªà¸­à¸šà¸–ามผิดพลาด";
+ Text[ ja ] = "クエリー言語分æžä¸­ã§ã®ã‚¨ãƒ©ãƒ¼";
+ Text[ ko ] = "ì§ˆì˜ í‘œí˜„ì‹ì„ 분ì„í•  ë•Œ 오류";
+ Text[ zh-CN ] = "查询语å¥å‡ºçŽ°è¯­æ³•é”™è¯¯ã€‚";
+ Text[ zh-TW ] = "在分解查詢語å¥æ™‚發生一個錯誤。";
+ Text[ tr ] = "Sorgu ifadesinde sözdizim hatası";
+ Text[ hi-IN ] = "जानकारी की वरà¥à¤£à¤¨ में सिनà¥à¤Ÿà¤¾à¤•à¥à¤¸ की गलती";
+ Text[ ar ] = "حدث خطأ أثناء تحليل عبارة الاستÙسار";
+ Text[ he ] = "Syntax error in query expression";
+};
+
+
+
+
+ // Events
+
+
+
+
+
+
+
+
+
+
+
+
+QueryBox RID_QRY_SAVEMODIFIED
+{
+ Buttons = WB_YES_NO_CANCEL ;
+ DefButton = WB_DEF_YES ;
+ Message [ de ] = "Der Inhalt des aktuellen Formulars wurde geändert.\nSollen die Änderungen gespeichert werden?" ;
+ Message [ en-US ] = "The content of the current form has been modified.\nDo you want to save your changes?" ;
+ Message [ x-comment ] = " ";
+ Message[ pt ] = "O conteúdo do formulário activo foi modificado.\nGuardar modificações?";
+ Message[ ru ] = "Содержание текущей формы изменено.\nСохранить изменениÑ?";
+ Message[ el ] = "Το πεÏιεχόμενο της Ï„Ïέχουσας φόÏμας έχει αλλάξει.\nΘέλετε να αποθηκευτοÏν οι αλλαγές;";
+ Message[ nl ] = "De inhoud van het huidige formulier is gewijzigd.\nWilt u de wijzigingen opslaan?";
+ Message[ fr ] = "Le contenu du formulaire actif a été modifié.\nVoulez-vous enregistrer les modifications ?";
+ Message[ es ] = "El contenido del formulario actual ha sido modificado.\n¿Desea guardar los cambios?";
+ Message[ fi ] = "Käsiteltävänä olevan lomakkeen sisältöä on muutettu.\nHaluatko tallentaa muutokset?";
+ Message[ ca ] = "S'ha modificat el contingut del formulari actual.\nVoleu desar els canvis?";
+ Message[ it ] = "Il contenuto dell'attuale formulario è stato cambiato.\nSalvare le modifiche?";
+ Message[ sk ] = "Obsah aktuálneho formulára bol zmenený.\nPrajete si uložiť zmeny?";
+ Message[ da ] = "Den aktuelle formulars indhold er blevet ændret.\nSkal ændringerne gemmes?";
+ Message[ sv ] = "Innehållet i det aktuella formuläret har ändrats.\nVill du spara ändringarna?";
+ Message[ pl ] = "Zawartość bieżącego formularza została zmieniona.\nCzy zapisać zmiany?";
+ Message[ pt-BR ] = "O conteúdo do formulário atual foi modificado.\nDeseja salvar estas modificações?";
+ Message[ th ] = "เนื้อหาของà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸–ูà¸à¸”ัดà¹à¸›à¸¥à¸‡à¹à¸à¹‰à¹„ขà¹à¸¥à¹‰à¸§\nคุณต้องà¸à¸²à¸£à¸šà¸±à¸™à¸—ึà¸à¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡à¸«à¸£à¸·à¸­à¹„ม่?";
+ Message[ ja ] = "ç¾åœ¨ã®å½¢å¼ã®å†…容ãŒå¤‰æ›´ã•ã‚Œã¦ã„ã¾ã™ã€‚\n変更をä¿å­˜ã—ã¾ã™ã‹ã€‚";
+ Message[ ko ] = "현재 ì–‘ì‹ì˜ ë‚´ìš©ì´ ë³€ê²½ë˜ì—ˆìŠµë‹ˆë‹¤.\n변경 ì‚¬í•­ì„ ì €ìž¥í•˜ê² ìŠµë‹ˆê¹Œ?";
+ Message[ zh-CN ] = "表å•çš„内容已ç»è¢«æ›´æ”¹ã€‚\n您è¦ä¿å­˜è¿™äº›æ›´æ”¹å—?";
+ Message[ zh-TW ] = "表單內容已經變更。\n您è¦å„²å­˜é€™äº›è®Šæ›´ï¼Ÿ";
+ Message[ tr ] = "Yürürlükteki formun içeriği değiştirildi.\nDeğişiklikleri kaydetmek istiyor musunuz?";
+ Message[ hi-IN ] = "वरà¥à¤¤à¤®à¤¾à¤¨ फॉरà¥à¤® की विषय को सà¥à¤§à¤¾à¤° किया है ।\nआप सà¥à¤§à¤¾à¤°à¥‹à¤‚ को संचित करना चाहते है?";
+ Message[ ar ] = "تم تغيير محتويات الاستمارة الحالية.\nهل تريد Ø­Ùظ التغييرات؟";
+ Message[ he ] = "‮תוכן הטופס הנוכחי עודכן.\n×”×× ×œ×©×ž×•×¨ ×ת השינוי×?‬";
+};
+
+String RID_STR_ERR_DELETERECORD
+{
+ Text [ de ] = "Fehler beim Löschen des aktuellen Datensatzes";
+ Text [ en-US ] = "Error deleting the current record";
+ Text[ pt ] = "Erro ao eliminar o registo de dados activo";
+ Text[ ru ] = "Ошибка ÑƒÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ¹ запиÑи";
+ Text[ el ] = "Σφάλμα κατά την διαγÏαφή της Ï„Ïέχουσας εγγÏαφής";
+ Text[ nl ] = "Fout bij wissen van huidige record";
+ Text[ fr ] = "Erreur lors de la suppression de l'enregistrement actif";
+ Text[ es ] = "Error al borrar el registro actual";
+ Text[ fi ] = "Virhe poistettaessa nykyistä tietuetta.";
+ Text[ ca ] = "S'ha produït un error en eliminar el registre actual de dades";
+ Text[ it ] = "Errore nel cancellare il record di dati attivo";
+ Text[ sk ] = "Chyba pri odstraňovaní aktuálneho záznamu";
+ Text[ da ] = "Fejl ved sletning af den aktuelle datapost";
+ Text[ sv ] = "Fel vid radering av den aktuella dataposten";
+ Text[ pl ] = "Błąd usuwania bieżącego rekordu";
+ Text[ pt-BR ] = "Ocorreu um erro ao excluir o registro atual";
+ Text[ th ] = "ลบระเบียนปัจจุบันผิดพลาด";
+ Text[ ja ] = "ç¾åœ¨ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã®å‰Šé™¤ã®éš›ã®ã‚¨ãƒ©ãƒ¼";
+ Text[ ko ] = "현재 레코드 삭제시 오류";
+ Text[ zh-CN ] = "在删除当å‰æ•°æ®æ¡ç›®æ—¶å‘生错误";
+ Text[ zh-TW ] = "在刪除資料æ¢ç›®æ™‚發生錯誤";
+ Text[ tr ] = "Yürürlükteki veri kümesini silme sırasında hata";
+ Text[ hi-IN ] = "वरà¥à¤¤à¤®à¤¾à¤¨ लेखा को मिटाने के समय गलती";
+ Text[ ar ] = "حدث خطأ أثناء حذ٠السجل الحالي";
+ Text[ he ] = "‮שגי××” במחיקת הרשומה הנוכחית‬";
+};
+String RID_STR_SVT_SQL_INTERNATIONAL
+{
+ Text [ de ] = "WIE;NICHT;LEER;WAHR;FALSCH;IST;ZWISCHEN;ODER;UND;Durchschnitt;Anzahl;Maximum;Minimum;Summe" ;
+ Text [ en-US ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Average;Count;Maximum;Minimum;Sum" ;
+ Text[ pt ] = "COMO;NÃO;VAZIO;VERDADEIRO;FALSO;É;ENTRE;OU;E;média;quantidade;máximo;mínimo;soma";
+ Text[ ru ] = "КÐК;ÐЕ;ПУСТО;ИСТИÐÐ;ЛОЖЬ;ЕСТЬ;МЕЖДУ;ИЛИ;И;Ñрднее;количеÑтво;макÑимум;минимум;Ñумма";
+ Text[ el ] = "ΟΠΩΣ;ΟΧΙ;ΚΕÎΟ;ΑΛΗΘΗΣ;ΛΑΘΟΣ;ΕΙÎΑΙ;ΜΕΤΑΞΥ;Ή;ΚΑΙ;Μέσος ÏŒÏος;Πλήθος;Μέγιστο;Ελάχιστο;ΆθÏοισμα";
+ Text[ nl ] = "ALS;NIET;LEEG;WAAR;ONWAAR;IS;TUSSEN;OF;EN;Gemiddelde;Aantal;Maximum;Minimum;Som";
+ Text[ fr ] = "COMME;PAS;VIDE;VRAI;FAUX;EST;ENTRE;OU;ET;Moyenne;Nombre;Maximum;Minimum;Somme";
+ Text[ es ] = "COMO;NO;VACIO;VERDADERO;FALSO;ES;ENTRE;O;Y;Promedio;Cantidad;Máximo;Mínimo;Suma";
+ Text[ fi ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Keskiarvo;Määrä;Enintään;Vähintään;Summa";
+ Text[ ca ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Promig;Recompte;Màxim;Mínim;Suma";
+ Text[ it ] = "COME;NON;VUOTO;VERO;FALSO;È;TRA;O;E;Media;Quantità;Massimo;Minimo;Somma";
+ Text[ sk ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Average;Count;Maximum;Minimum;Sum";
+ Text[ da ] = "SOM;IKKE;TOM;SAND;FALSK;ER;MELLEM;ELLER;OG;Gennemsnit;Antal;Maksimum;Minimum;Sum";
+ Text[ sv ] = "SOM;INTE;TOM;SANN;FALSK;ÄR;MELLAN;ELLER;OCH;Genomsnitt;Antal;Maximum;Minimum;Summa";
+ Text[ pl ] = "JAK;NIE;PUSTY;PRAWDA;FAÅSZ;JEST;POMIĘDZY;LUB;I;Åšrednia;Numer;Maksimum;Minimum;Suma";
+ Text[ pt-BR ] = "COMO;NÃO;VAZIO;VERDADEIRO;FALSO;É;ENTRE;OU;E;média;quantidade;máximo;mínimo;soma";
+ Text[ th ] = "เหมือน;ไม่;ว่าง;จริง;เท็จ;อยู่;ระหว่าง;หรือ;à¹à¸¥à¸°;เฉลี่ย;นับ;มาà¸à¸—ี่สุด;น้อยที่สุด;ผลรวม";
+ Text[ ja ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;å¹³å‡;æ•°;最大;最å°;åˆè¨ˆ";
+ Text[ ko ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;í‰ê· ;개수;최대;최소;합계";
+ Text[ zh-CN ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;å¹³å‡å€¼;æ•°ç›®;最大;最å°;总数";
+ Text[ zh-TW ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;å¹³å‡å€¼;數目;最大;最å°;總數";
+ Text[ tr ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Average;Count;Maximum;Minimum;Sum";
+ Text[ hi-IN ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Average;Count;Maximum;Minimum;Sum";
+ Text[ ar ] = "LIKE;NOT;EMPTY;TRUE;FALSE;IS;BETWEEN;OR;AND;Average;Count;Maximum;Minimum;Sum";
+ Text[ he ] = "‮כמו;ל×;ריק;×מת;שקר;;בין;×ו;ו;ממוצע;מספר;מירבי;מזערי;סיכו×‬";
+};
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/form/svx_fmtools.cxx b/binfilter/bf_svx/source/form/svx_fmtools.cxx
new file mode 100644
index 000000000000..3737782368ab
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_fmtools.cxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "fmtools.hxx"
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+/*N*/ sal_Int32 getElementPos(const uno::Reference< container::XIndexAccess>& xCont, const uno::Reference< uno::XInterface >& xElement)
+/*N*/ {
+/*N*/ sal_Int32 nIndex = -1;
+/*N*/ if (!xCont.is())
+/*N*/ return nIndex;
+/*N*/
+/*N*/ uno::Reference< uno::XInterface > xNormalized( xElement, uno::UNO_QUERY );
+/*N*/ DBG_ASSERT( xNormalized.is(), "getElementPos: invalid element!" );
+/*N*/ if ( xNormalized.is() )
+/*N*/ {
+/*N*/ // Feststellen an welcher Position sich das Kind befindet
+/*N*/ nIndex = xCont->getCount();
+/*N*/ while (nIndex--)
+/*N*/ {
+/*N*/ try
+/*N*/ {
+/*N*/ uno::Reference< uno::XInterface > xCurrent;
+/*N*/ xCont->getByIndex( nIndex ) >>= xCurrent;
+/*N*/ DBG_ASSERT( xCurrent.get() == uno::Reference< uno::XInterface >( xCurrent, uno::UNO_QUERY ).get(),
+/*N*/ "getElementPos: container element not normalized!" );
+/*N*/ if ( xNormalized.get() == xCurrent.get() )
+/*N*/ break;
+/*N*/ }
+/*N*/ catch(uno::Exception&)
+/*N*/ {
+/*N*/ DBG_ERROR( "getElementPos: caught an exception!" );
+/*N*/ }
+/*N*/
+/*N*/ }
+/*N*/ }
+/*N*/ return nIndex;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_siimport.cxx b/binfilter/bf_svx/source/form/svx_siimport.cxx
new file mode 100644
index 000000000000..2201923a2763
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_siimport.cxx
@@ -0,0 +1,159 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "siimport.hxx"
+
+#include "svdorect.hxx"
+
+#include "svdio.hxx"
+
+#include "svdmodel.hxx"
+
+#include "xflclit.hxx"
+
+#include "xlnclit.hxx"
+
+#include "xtable.hxx"
+namespace binfilter {
+
+
+//============================================================================
+// defines
+//============================================================================
+
+const UINT32 SiInventor = UINT32('S')*0x00000001+
+ UINT32('D')*0x00000100+
+ UINT32('V')*0x00010000+
+ UINT32('C')*0x01000000;
+
+#define OBJ_CHECKBOX ((UINT16)0)
+#define OBJ_RADIOBUTTON ((UINT16)1)
+#define OBJ_PUSHBUTTON ((UINT16)2)
+#define OBJ_SPINBUTTON ((UINT16)3)
+#define OBJ_FIXEDTEXT ((UINT16)4)
+#define OBJ_GROUPBOX ((UINT16)5)
+#define OBJ_LISTBOX ((UINT16)6)
+#define OBJ_COMBOBOX ((UINT16)7)
+#define OBJ_EDIT ((UINT16)8)
+#define OBJ_HSCROLLBAR ((UINT16)9)
+#define OBJ_VSCROLLBAR ((UINT16)10)
+
+#define OBJ_URLBUTTON ((UINT16)25)
+
+
+//============================================================================
+// SiImportRect
+//============================================================================
+
+class SiImportRect : public SdrRectObj
+{
+public:
+ SiImportRect();
+
+ virtual void ReadData(const SdrObjIOHeader& rHead, SvStream& rIn);
+};
+
+//----------------------------------------------------------------------------
+
+/*N*/ SiImportRect::SiImportRect() : SdrRectObj()
+/*N*/ {
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SiImportRect::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ // SdrRectObj ueberspringen!!!!
+/*N*/ SdrObject::ReadData( rHead, rIn );
+/*N*/ SdrDownCompat aCompat( rIn, STREAM_READ );
+/*N*/ aRect = aOutRect;
+/*N*/ SfxItemSet aSet(pModel->GetItemPool());
+/*N*/ aSet.Put(XFillStyleItem(XFILL_SOLID));
+/*N*/ aSet.Put(XFillColorItem(String(), RGB_Color(COL_LIGHTRED)));
+/*N*/ aSet.Put(XLineStyleItem(XLINE_SOLID));
+/*N*/ aSet.Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
+/*N*/
+/*N*/ SetItemSet(aSet);
+/*N*/
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+
+//============================================================================
+// SiImportFactory
+//============================================================================
+
+/*N*/ SiImportFactory::SiImportFactory()
+/*N*/ {
+/*N*/ SdrObjFactory::InsertMakeObjectHdl( LINK(this, SiImportFactory, MakeObject) );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SiImportFactory::~SiImportFactory()
+/*N*/ {
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ IMPL_LINK( SiImportFactory, MakeObject, SdrObjFactory *, pObjFactory )
+/*N*/ {
+/*N*/ if( pObjFactory->nInventor == SiInventor )
+/*N*/ {
+/*N*/ if( ((pObjFactory->nIdentifier >= OBJ_CHECKBOX) && (pObjFactory->nIdentifier <= OBJ_VSCROLLBAR)) ||
+/*N*/ pObjFactory->nIdentifier == OBJ_URLBUTTON )
+/*N*/ {
+/*N*/ switch( pObjFactory->nIdentifier )
+/*N*/ {
+/*N*/ case OBJ_CHECKBOX:
+/*N*/ case OBJ_RADIOBUTTON:
+/*N*/ case OBJ_PUSHBUTTON:
+/*N*/ case OBJ_SPINBUTTON:
+/*N*/ case OBJ_FIXEDTEXT:
+/*N*/ case OBJ_GROUPBOX:
+/*N*/ case OBJ_LISTBOX:
+/*N*/ case OBJ_COMBOBOX:
+/*N*/ case OBJ_EDIT:
+/*N*/ case OBJ_HSCROLLBAR:
+/*N*/ case OBJ_VSCROLLBAR:
+/*N*/ case OBJ_URLBUTTON:
+/*N*/ pObjFactory->pNewObj = new SiImportRect();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return 0;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/form/svx_taborder.src b/binfilter/bf_svx/source/form/svx_taborder.src
new file mode 100644
index 000000000000..7e161a3e5ead
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_taborder.src
@@ -0,0 +1,238 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include "fmresids.hrc"
+#include "taborder.hrc"
+#ifndef _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+
+ModalDialog RID_SVXDLG_TAB_ORDER
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 168 , 158 ) ;
+ Text [ de ] = "Aktivierungsreihenfolge" ;
+ Text [ en-US ] = "Tab Order" ;
+ Text [ x-comment ] = " ";
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ FixedText FT_CONTROLS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 90 , 8 ) ;
+ Text [ de ] = "Kontrollelemente" ;
+ Text [ en-US ] = "Controls" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Controlos";
+ Text[ ru ] = "Элементы управлениÑ";
+ Text[ el ] = "Στοιχεία ελέγχου";
+ Text[ nl ] = "Controle-elementen";
+ Text[ fr ] = "Éléments de contrôle";
+ Text[ es ] = "Elementos de control";
+ Text[ fi ] = "Ohjausobjektit";
+ Text[ ca ] = "Elements de control";
+ Text[ it ] = "Elementi di controllo";
+ Text[ sk ] = "Ovládacie prvky";
+ Text[ da ] = "Kontrolelementer";
+ Text[ sv ] = "Kontrollelement";
+ Text[ pl ] = "Formanty";
+ Text[ pt-BR ] = "Controles";
+ Text[ th ] = "ตัวควบคุม";
+ Text[ ja ] = "コントロールè¦ç´ ";
+ Text[ ko ] = "컨트롤 요소";
+ Text[ zh-CN ] = "控制å•å…ƒ";
+ Text[ zh-TW ] = "控制單元";
+ Text[ tr ] = "Kontroller";
+ Text[ hi-IN ] = "नियंतà¥à¤°à¤£";
+ Text[ ar ] = "عناصر تحكم";
+ Text[ he ] = "‮פקדי×‬";
+ };
+ Control CTRL_TREE
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 6, 14) ;
+ Size = MAP_APPFONT ( 90, 136 ) ;
+ TabStop = TRUE;
+ HelpId = HID_TABORDER_CONTROLS;
+ };
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 102 , 14 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 102 , 32 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 102 , 50 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton PB_MOVE_UP
+ {
+ Pos = MAP_APPFONT ( 102 , 100 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ de ] = "Index kleiner" ;
+ Text [ en-US ] = "Move Up" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Mover para cima";
+ Text[ ru ] = "ПеремеÑтить вверх";
+ Text[ el ] = "ΕυÏετήÏιο μικÏότεÏο";
+ Text[ nl ] = "Index kleiner";
+ Text[ fr ] = "Index plus petit";
+ Text[ es ] = "Hacia arriba";
+ Text[ fi ] = "Siirrä ylemmäs";
+ Text[ ca ] = "Mou cap amunt";
+ Text[ it ] = "Index minore";
+ Text[ sk ] = "Presunúť nahor";
+ Text[ da ] = "Indeks mindre";
+ Text[ sv ] = "Index mindre";
+ Text[ pl ] = "Przenieś w górę";
+ Text[ pt-BR ] = "Mover para cima";
+ Text[ th ] = "เลื่อนขึ้น";
+ Text[ ja ] = "上ã¸ç§»å‹•";
+ Text[ ko ] = "위로";
+ Text[ zh-CN ] = "上移";
+ Text[ zh-TW ] = "上移";
+ Text[ tr ] = "Yukarı taşı";
+ Text[ hi-IN ] = "सà¥à¤¥à¤¾à¤¨à¤¾à¤¨à¥à¤¤à¤° ऊपर";
+ Text[ ar ] = "تصغير الÙهرس";
+ Text[ he ] = "‮הזז למעלה‬";
+ };
+ PushButton PB_MOVE_DOWN
+ {
+ Pos = MAP_APPFONT ( 102 , 118 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ de ] = "Index größer" ;
+ Text [ en-US ] = "Move Down" ;
+ Text [ x-comment ] = "; RB: Funzioni formulario - Sequenza di attivazione";
+ Text[ pt ] = "Mover para baixo";
+ Text[ ru ] = "ПеремеÑтить вниз";
+ Text[ el ] = "Μετακίνηση κάτω";
+ Text[ nl ] = "Index groter";
+ Text[ fr ] = "Index plus grand";
+ Text[ es ] = "Hacia abajo";
+ Text[ fi ] = "Siirrä alemmas";
+ Text[ ca ] = "Mou cap avall";
+ Text[ it ] = "Index maggiore";
+ Text[ sk ] = "Presunúť dole";
+ Text[ da ] = "Indeks større";
+ Text[ sv ] = "Index större";
+ Text[ pl ] = "Przenieś w dół";
+ Text[ pt-BR ] = "Mover para baixo";
+ Text[ th ] = "เลื่อนลง";
+ Text[ ja ] = "下ã¸ç§»å‹•";
+ Text[ ko ] = "아래로";
+ Text[ zh-CN ] = "下移";
+ Text[ zh-TW ] = "下移";
+ Text[ tr ] = "Aşağı taşı";
+ Text[ hi-IN ] = "सà¥à¤¥à¤¾à¤¨à¤¾à¤¨à¥à¤¤à¤° नीचे";
+ Text[ ar ] = "تكبير الÙهرس";
+ Text[ he ] = "‮הזז למטה‬";
+ };
+ PushButton PB_AUTO_ORDER
+ {
+ Pos = MAP_APPFONT ( 102 , 136 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ de ] = "Auto Sortierung" ;
+ Text [ en-US ] = "Automatic Sort" ;
+ Text [ x-comment ] = "; RB: es handelt sich um eine Schaltfl?he. Deshalb mu?der Text nicht l?ger als der deutsche sein.";
+ Text[ pt ] = "Ordem autom.";
+ Text[ ru ] = "ÐвтоÑортировка";
+ Text[ el ] = "Αυτόματη Ταξινόμηση";
+ Text[ nl ] = "AutoSortering";
+ Text[ fr ] = "Tri automatique";
+ Text[ es ] = "Orden automático";
+ Text[ fi ] = "Automaattinen järjestys";
+ Text[ ca ] = "Ordre automàtic";
+ Text[ it ] = "Ordine autom.";
+ Text[ sk ] = "Automaticky zoradiť";
+ Text[ da ] = "Autosortering";
+ Text[ sv ] = "Autosortering";
+ Text[ pl ] = "Sortuj automatycznie";
+ Text[ pt-BR ] = "Ordenação Automática";
+ Text[ th ] = "เรียงอัตโนมัติ";
+ Text[ ja ] = "自動的ã«ä¸¦ã¹æ›¿ãˆ";
+ Text[ ko ] = "ìžë™ ì •ë ¬";
+ Text[ zh-CN ] = "自动排åº";
+ Text[ zh-TW ] = "自動排åº";
+ Text[ tr ] = "Otomatik sıralama";
+ Text[ hi-IN ] = "सà¥à¤µà¤šà¤¾à¤²à¤¿à¤¤ ढंग से सोरà¥à¤Ÿ";
+ Text[ ar ] = "Ùرز تلقائي";
+ Text[ he ] = "‮מיון ×וטומטי‬";
+ };
+ Text[ pt ] = "Sequência de activação";
+ Text[ ru ] = "ПорÑдок активированиÑ";
+ Text[ el ] = "ΣειÏά ενεÏγοποίησης";
+ Text[ nl ] = "Volgorde van activering";
+ Text[ fr ] = "Séquence d'activation";
+ Text[ es ] = "Secuencia de activación";
+ Text[ fi ] = "Sarkainjärjestys";
+ Text[ ca ] = "Ordre de les pestanyes";
+ Text[ it ] = "Sequenza di attivazione";
+ Text[ sk ] = "Poradie aktivácie";
+ Text[ da ] = "Aktiveringsrækkefølge";
+ Text[ sv ] = "Aktiveringsordningsföljd";
+ Text[ pl ] = "Kolejność aktywacji";
+ Text[ pt-BR ] = "Ordem da Tabulação";
+ Text[ th ] = "ลำดับระยะà¸à¸±à¹‰à¸™";
+ Text[ ja ] = "タブオーダー";
+ Text[ ko ] = "탭 순서";
+ Text[ zh-CN ] = "è½®æ¢é¡ºåº";
+ Text[ zh-TW ] = "å•Ÿå‹•é †åº";
+ Text[ tr ] = "Etkinleştirme sırası";
+ Text[ hi-IN ] = "टॉब कà¥à¤°à¤®";
+ Text[ ar ] = "ترتيب التنشيط";
+ Text[ he ] = "‮סדר ט×בי×‬";
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/form/svx_tbxform.src b/binfilter/bf_svx/source/form/svx_tbxform.src
new file mode 100644
index 000000000000..64bd0ceb90b9
--- /dev/null
+++ b/binfilter/bf_svx/source/form/svx_tbxform.src
@@ -0,0 +1,574 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+#include "svxids.hrc"
+#include "fmresids.hrc"
+#include "helpid.hrc"
+
+#define IMAGE_STDBTN_COLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; }
+
+String RID_SVXTBX_FORM_FILTER
+{
+ Text [ de ] = "Filterleiste" ;
+ Text [ en-US ] = "Filter bar" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Barra de filtros";
+ Text[ ru ] = "Панель фильтров";
+ Text[ el ] = "ΓÏαμμή φίλτÏου";
+ Text[ nl ] = "Filterbalk";
+ Text[ fr ] = "Barre de filtres";
+ Text[ es ] = "Barra de filtros";
+ Text[ fi ] = "Suodatusrivi";
+ Text[ ca ] = "Barra de filtre";
+ Text[ it ] = "Barra dei filtri";
+ Text[ sk ] = "Panel filtra";
+ Text[ da ] = "Filterlinje";
+ Text[ sv ] = "Filterlist";
+ Text[ pl ] = "Pasek filtru";
+ Text[ pt-BR ] = "Barra de filtros";
+ Text[ th ] = "à¹à¸–บตัวà¸à¸£à¸­à¸‡";
+ Text[ ja ] = "フィルタãƒãƒ¼";
+ Text[ ko ] = "í•„í„° ë„구모ìŒ";
+ Text[ zh-CN ] = "筛选æ ";
+ Text[ zh-TW ] = "篩é¸æ¬„";
+ Text[ tr ] = "Filtre çubuğu";
+ Text[ hi-IN ] = "फिलà¥à¤Ÿà¤° पटà¥à¤Ÿà¥€";
+ Text[ ar ] = "شريط الÙلتر";
+ Text[ he ] = "‮סרגל מסנני×‬";
+};
+
+ //------------------------------------------------------------------------
+ // Navigation bar
+ToolBox RID_SVXTBX_FORM_FILTER
+{
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ LineSpacing = TRUE ;
+ Text [ de ] = "Filterleiste" ;
+ Text [ en-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 [ x-comment ] = " ";
+ Text[ pt ] = "Barra de filtros";
+ Text[ ru ] = "Панель фильтров";
+ Text[ el ] = "ΓÏαμμή φίλτÏου";
+ Text[ nl ] = "Filterbalk";
+ Text[ fr ] = "Barre de filtres";
+ Text[ es ] = "Barra de filtros";
+ Text[ fi ] = "Suodatusrivi";
+ Text[ ca ] = "Barra de filtre";
+ Text[ it ] = "Barra dei filtri";
+ Text[ sk ] = "Panel filtra";
+ Text[ da ] = "Filterlinje";
+ Text[ sv ] = "Filterlist";
+ Text[ pl ] = "Pasek filtru";
+ Text[ pt-BR ] = "Barra de filtros";
+ Text[ th ] = "à¹à¸–บตัวà¸à¸£à¸­à¸‡";
+ Text[ ja ] = "フィルタãƒãƒ¼";
+ Text[ ko ] = "í•„í„° ë„구모ìŒ";
+ Text[ zh-CN ] = "筛选æ ";
+ Text[ zh-TW ] = "篩é¸æ¬„";
+ Text[ tr ] = "Filtre çubuğu";
+ Text[ hi-IN ] = "फिलà¥à¤Ÿà¤° पटà¥à¤Ÿà¥€";
+ Text[ ar ] = "شريط الÙلتر";
+ Text[ he ] = "‮סרגל מסנני×‬";
+};
+
+String RID_SVXTBX_FORM_NAVIGATION
+{
+ Text [ de ] = "Datenbankleiste" ;
+ Text [ en-US ] = "Database bar" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Barra de ferramentas da base de dados";
+ Text[ ru ] = "Панель базы данных";
+ Text[ el ] = "ΓÏαμμή βάσης δεδομένων";
+ Text[ nl ] = "Databasebalk";
+ Text[ fr ] = "Barre de base de données";
+ Text[ es ] = "Barra de base de datos";
+ Text[ fi ] = "Tietolähdetyökalurivi";
+ Text[ ca ] = "Barra de la base de dades";
+ Text[ it ] = "Barra degli strumenti per database";
+ Text[ sk ] = "Panel databázy";
+ Text[ da ] = "Databaselinje";
+ Text[ sv ] = "Databaslist";
+ Text[ pl ] = "Pasek bazy danych";
+ Text[ pt-BR ] = "Barra do banco de dados";
+ Text[ th ] = "à¹à¸–บà¸à¸²à¸™à¸‚้อมูล";
+ Text[ ja ] = "データベースãƒãƒ¼";
+ Text[ ko ] = "ë°ì´í„°ë² ì´ìŠ¤ ë„구모ìŒ";
+ Text[ zh-CN ] = "æ•°æ®åº“工具æ ";
+ Text[ zh-TW ] = "資料庫工具列";
+ Text[ tr ] = "Veritabanı çubuğu";
+ Text[ hi-IN ] = "लेखासंचय पटà¥à¤Ÿà¥€";
+ Text[ ar ] = "شريط قاعدة البيانات";
+ Text[ he ] = "‮סרגל מסד נתוני×‬";
+};
+
+ //------------------------------------------------------------------------
+ // Navigation bar
+ToolBox RID_SVXTBX_FORM_NAVIGATION
+{
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ LineSpacing = TRUE ;
+ Text [ de ] = "Datenbankleiste" ;
+ 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 [ en-US ] = "Database Bar" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Barra de base de dados";
+ Text[ ru ] = "Панель базы данных";
+ Text[ el ] = "ΓÏαμμή βάσης δεδομένων";
+ Text[ nl ] = "Databasebalk";
+ Text[ fr ] = "Barre de base de données";
+ Text[ es ] = "Barra de base de datos";
+ Text[ fi ] = "Tietolähdetyökalurivi";
+ Text[ ca ] = "Barra de la base de dades";
+ Text[ it ] = "Barra database";
+ Text[ sk ] = "Panel databázy";
+ Text[ da ] = "Databaselinje";
+ Text[ sv ] = "Databaslist";
+ Text[ pl ] = "Pasek bazy danych";
+ Text[ pt-BR ] = "Barra do Banco de Dados";
+ Text[ th ] = "à¹à¸–บà¸à¸²à¸™à¸‚้อมูล";
+ Text[ ja ] = "データベースãƒãƒ¼";
+ Text[ ko ] = "ë°ì´í„°ë² ì´ìŠ¤ ë„구모ìŒ";
+ Text[ zh-CN ] = "æ•°æ®åº“工具æ ";
+ Text[ zh-TW ] = "資料庫工具列";
+ Text[ tr ] = "Veritabanı çubuğu";
+ Text[ hi-IN ] = "लेखासंचय पटà¥à¤Ÿà¥€";
+ Text[ ar ] = "شريط قاعدة البيانات";
+ Text[ he ] = "‮סרגל מסד נתוני×‬";
+};
+
+ //------------------------------------------------------------------------
+ // Controller fuer controls
+FloatingWindow RID_SVXTBX_FORM
+{
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ HelpId = HID_SVXTBX_FORM;
+ Text [ de ] = "Formularfunktionen" ;
+ ToolBox TBX_FORM
+ {
+ SVLook = TRUE ;
+ LineCount = 2 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_SELECT ;
+ HelpID = SID_OBJECT_SELECT ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ 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 { 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_AUTOCONTROLFOCUS ;
+ HelpID = SID_FM_AUTOCONTROLFOCUS ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_USE_WIZARDS ;
+ HelpID = SID_FM_USE_WIZARDS ;
+ };
+ };
+ };
+ Text [ en-US ] = "Form Functions" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Funções de formulário";
+ Text[ ru ] = "Элементы ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ð¼Ð¸";
+ Text[ el ] = "ΛειτουÏγίες φόÏμας";
+ Text[ nl ] = "Formulierfuncties";
+ Text[ fr ] = "Fonctions de formulaire";
+ Text[ es ] = "Funciones del formulario";
+ Text[ fi ] = "Lomaketoiminnot";
+ Text[ ca ] = "Funcions del formulari";
+ Text[ it ] = "Funzioni formulario";
+ Text[ sk ] = "Funkcie formulára";
+ Text[ da ] = "Formularfunktioner";
+ Text[ sv ] = "Formulärfunktioner";
+ Text[ pl ] = "Funkcje formularza";
+ Text[ pt-BR ] = "Funções de Formulário";
+ Text[ th ] = "ฟังà¸à¹Œà¸Šà¸±à¹ˆà¸™à¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡";
+ Text[ ja ] = "フォームã®æ©Ÿèƒ½";
+ Text[ ko ] = "ì–‘ì‹ ê¸°ëŠ¥";
+ Text[ zh-CN ] = "表å•åŠŸèƒ½";
+ Text[ zh-TW ] = "表單功能";
+ Text[ tr ] = "Form iÅŸlevleri";
+ Text[ hi-IN ] = "फॉरà¥à¤®à¥ फंकà¥à¤¶à¤¨à¥à¤¸";
+ Text[ ar ] = "مهام الاستمارة";
+ Text[ he ] = "‮פונקציות טופס‬";
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/binfilter/bf_svx/source/inc/AccessibleStringWrap.hxx b/binfilter/bf_svx/source/inc/AccessibleStringWrap.hxx
new file mode 100644
index 000000000000..22943fe60919
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/AccessibleStringWrap.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _ACCESSIBLESTRINGWRAP_HXX
+#define _ACCESSIBLESTRINGWRAP_HXX
+
+#include <sal/types.h>
+
+#include <tools/string.hxx>
+class OutputDevice;
+class Rectangle;
+class Point;
+namespace binfilter {
+
+
+class SvxFont;
+
+//------------------------------------------------------------------------
+//
+// AccessibleStringWrap declaration
+//
+//------------------------------------------------------------------------
+
+class AccessibleStringWrap
+{
+public:
+
+ AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText ){DBG_BF_ASSERT(0, "STRIP");}//STRIP001 AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText );
+
+ sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ){DBG_BF_ASSERT(0, "STRIP"); return false;}//STRIP001 sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect );
+ sal_Int32 GetIndexAtPoint( const Point& rPoint ){DBG_BF_ASSERT(0, "STRIP"); return 0;}//STRIP001 sal_Int32 GetIndexAtPoint( const Point& rPoint );
+
+private:
+
+};
+
+}//end of namespace binfilter
+#endif /* _ACCESSIBLESTRINGWRAP_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/XPropertyTable.hxx b/binfilter/bf_svx/source/inc/XPropertyTable.hxx
new file mode 100644
index 000000000000..fc4823f158e0
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/XPropertyTable.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_XPROPERTYTABLE_HXX
+#define _SVX_XPROPERTYTABLE_HXX
+
+#include <com/sun/star/uno/XInterface.hpp>
+namespace binfilter {
+
+class XPropertyList;
+class XPropertyTable;
+
+com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxUnoXColorTable_createInstance( XPropertyTable* pTable ) throw();
+com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxUnoXLineEndTable_createInstance( XPropertyList* pList ) throw();
+com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxUnoXDashTable_createInstance( XPropertyList* pList ) throw();
+com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxUnoXHatchTable_createInstance( XPropertyList* pList ) throw();
+com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxUnoXGradientTable_createInstance( XPropertyList* pList ) throw();
+com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxUnoXBitmapTable_createInstance( XPropertyList* pList ) throw();
+
+}//end of namespace binfilter
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/dbtoolsclient.hxx b/binfilter/bf_svx/source/inc/dbtoolsclient.hxx
new file mode 100644
index 000000000000..9373e7c317ad
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/dbtoolsclient.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_DBTOOLSCLIENT_HXX
+#define SVX_DBTOOLSCLIENT_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include <osl/module.h>
+#include <tools/solar.h>
+namespace binfilter {
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+ //====================================================================
+ //= ODbtoolsClient
+ //====================================================================
+ /** base class for classes which want to use dbtools features with load-on-call
+ of the dbtools lib.
+ */
+ class ODbtoolsClient
+ {
+ private:
+ static ::osl::Mutex s_aMutex;
+ static sal_Int32 s_nClients;
+ static oslModule s_hDbtoolsModule;
+ static ::connectivity::simple::createDataAccessToolsFactoryFunction
+ s_pFactoryCreationFunc;
+ //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time)
+ mutable BOOL m_bCreateAlready;
+
+ private:
+ mutable ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory > m_xDataAccessFactory;
+
+ protected:
+ const ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory >&
+ getFactory() const { return m_xDataAccessFactory; }
+
+ protected:
+ ODbtoolsClient();
+ ~ODbtoolsClient();
+ //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time)
+
+ private:
+ };
+
+ //====================================================================
+ //= OStaticDataAccessTools
+ //====================================================================
+ class OStaticDataAccessTools : public ODbtoolsClient
+ {
+ protected:
+ mutable ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools;
+ //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time)
+ void create() const;
+
+ void checkIfLoaded() const;
+
+ public:
+ OStaticDataAccessTools();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getRowSetConnection(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet)
+ const SAL_THROW ( (::com::sun::star::uno::RuntimeException) );
+
+ // ------------------------------------------------
+
+ // ------------------------------------------------
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource(
+ const ::rtl::OUString& _rsRegisteredName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+ ) const;
+
+ // ------------------------------------------------
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT
+ @param _rxCursorSet the property set
+ */
+ sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
+
+ // ------------------------------------------------
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE
+ @param _rxCursorSet the property set
+ */
+ sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
+
+ // ------------------------------------------------
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE
+ @param _rxCursorSet the property set
+ */
+ sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
+
+ // ------------------------------------------------
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
+ getFieldsByCommandDescriptor(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rCommand,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxKeepFieldsAlive,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
+ ) SAL_THROW( ( ) );
+
+ // ------------------------------------------------
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getFieldNamesByCommandDescriptor(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rCommand,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
+ ) SAL_THROW( ( ) );
+ };
+//........................................................................
+} // namespace svxform
+//........................................................................
+
+}//end of namespace binfilter
+#endif // SVX_DBTOOLSCLIENT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/filtnav.hxx b/binfilter/bf_svx/source/inc/filtnav.hxx
new file mode 100644
index 000000000000..92db55348846
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/filtnav.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FILTNAV_HXX
+#define _SVX_FILTNAV_HXX
+
+
+
+
+
+
+
+
+#include <bf_sfx2/dockwin.hxx>
+
+
+
+
+
+
+
+namespace binfilter {
+
+class FmFormShell;
+
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+class FmFilterItem;
+class FmFilterItems;
+class FmFilterAdapter;
+
+//========================================================================
+// data structure for the filter model
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+// Item representing the forms and subforms
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+//========================================================================
+
+
+//====================================================================
+//= OFilterExchangeHelper
+//====================================================================
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+class FmFilterNavigatorWinMgr : public SfxChildWindow
+{
+public:
+ FmFilterNavigatorWinMgr( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo );
+ SFX_DECL_CHILDWINDOW( FmFilterNavigatorWinMgr );
+};
+
+//........................................................................
+} // namespace svxform
+//........................................................................
+
+}//end of namespace binfilter
+#endif // _SVX_FILTNAV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmPropBrw.hxx b/binfilter/bf_svx/source/inc/fmPropBrw.hxx
new file mode 100644
index 000000000000..f6bc43b656dd
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmPropBrw.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SVX_FMPROPBRW_HXX
+#define SVX_FMPROPBRW_HXX
+
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <bf_sfx2/childwin.hxx>
+namespace binfilter {
+
+//========================================================================
+class FmPropBrwMgr : public SfxChildWindow
+{
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
+ m_xUnoRepresentation;
+public:
+ FmPropBrwMgr(Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+ SFX_DECL_CHILDWINDOW(FmPropBrwMgr);
+};
+
+class FmPropControl;
+class SfxBindings;
+//========================================================================
+}//end of namespace binfilter
+#endif //SVX_FMPROPBRW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmcontr.hxx b/binfilter/bf_svx/source/inc/fmcontr.hxx
new file mode 100644
index 000000000000..1afb3734f9cc
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmcontr.hxx
@@ -0,0 +1,254 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMCONTR_HXX
+#define _SVX_FMCONTR_HXX
+
+#include <comphelper/stl_types.hxx>
+
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#include <com/sun/star/script/ScriptEvent.hpp>
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+namespace binfilter {
+
+typedef ::std::hash_multimap< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > , ::comphelper::UStringHash, ::comphelper::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();
+};
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMCONTR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmctrler.hxx b/binfilter/bf_svx/source/inc/fmctrler.hxx
new file mode 100644
index 000000000000..4011ffd33445
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmctrler.hxx
@@ -0,0 +1,405 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMCTRLER_HXX
+#define _SVX_FMCTRLER_HXX
+
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
+#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
+#include <com/sun/star/form/XResetListener.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/form/XConfirmDeleteBroadcaster.hpp>
+#include <com/sun/star/form/XLoadListener.hpp>
+#include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
+#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/util/XModeSelector.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#include <com/sun/star/awt/XItemListener.hpp>
+#include <com/sun/star/awt/XTextComponent.hpp>
+
+#include <vcl/timer.hxx>
+
+#include "fmtools.hxx"
+#include "sqlparserclient.hxx"
+
+#include <cppuhelper/compbase12.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/broadcasthelper.hxx>
+class Window;
+namespace binfilter {
+
+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;
+
+typedef ::cppu::WeakAggComponentImplHelper12< ::com::sun::star::form::XFormController
+ ,::com::sun::star::container::XChild
+ ,::com::sun::star::container::XIndexAccess // access of child contoller
+ ,::com::sun::star::container::XEnumerationAccess
+ ,::com::sun::star::awt::XFocusListener
+ ,::com::sun::star::form::XLoadListener
+ ,::com::sun::star::beans::XPropertyChangeListener
+ ,::com::sun::star::awt::XTextListener
+ ,::com::sun::star::awt::XItemListener
+ ,::com::sun::star::container::XContainerListener
+ ,::com::sun::star::util::XModifyListener
+ ,::com::sun::star::util::XModifyBroadcaster> FmXFormController_BASE1;
+
+typedef ::cppu::ImplHelper12< ::com::sun::star::util::XModeSelector
+ ,::com::sun::star::form::XConfirmDeleteListener
+ ,::com::sun::star::form::XConfirmDeleteBroadcaster
+ ,::com::sun::star::sdb::XSQLErrorListener
+ ,::com::sun::star::sdb::XSQLErrorBroadcaster
+ ,::com::sun::star::sdbc::XRowSetListener
+ ,::com::sun::star::sdb::XRowSetApproveListener
+ ,::com::sun::star::sdb::XRowSetApproveBroadcaster
+ ,::com::sun::star::form::XDatabaseParameterListener
+ ,::com::sun::star::form::XDatabaseParameterBroadcaster
+ ,::com::sun::star::lang::XServiceInfo
+ ,::com::sun::star::form::XResetListener> FmXFormController_BASE2;
+typedef ::cppu::ImplHelper2 < ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::frame::XDispatch
+ > FmXFormController_BASE3;
+
+//==================================================================
+// FmXFormController
+//==================================================================
+class FmXFormController : public ::comphelper::OBaseMutex
+ ,public FmXFormController_BASE1
+ ,public FmXFormController_BASE2
+ ,public FmXFormController_BASE3
+ ,public ::cppu::OPropertySetHelper
+ ,public FmDispatchInterceptor
+ ,public ::comphelper::OAggregationArrayUsageHelper< FmXFormController>
+ ,public ::binfilter::svxform::OSQLParserClient//STRIP008 ,public ::svxform::OSQLParserClient
+{
+ friend class FmXPageViewWinRec;
+
+ ::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;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ // 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;
+ ::binfilter::form::OImplementationIdsRef m_aHoldImplIdHelper;//STRIP008 ::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(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB,
+ 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 FmXFormController_BASE1::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() throw ();
+ virtual void SAL_CALL release() throw ();
+
+// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+ {
+ return ::binfilter::form::OImplementationIds::getImplementationId(getTypes());//STRIP008 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();
+
+// XDispatch
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& _rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
+
+// ::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 ) throw( ::com::sun::star::uno::Exception );
+ 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() throw( ::com::sun::star::uno::RuntimeException );
+ 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) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XLoadListener
+ virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ 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) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+
+// XFocusListener
+ virtual void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::beans::XPropertyChangeListener -> aenderung der stati
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
+
+// XTextListener -> modify setzen
+ virtual void SAL_CALL textChanged(const ::com::sun::star::awt::TextEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XItemListener -> modify setzen
+ virtual void SAL_CALL itemStateChanged(const ::com::sun::star::awt::ItemEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XModifyListener -> modify setzen
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XFormController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> SAL_CALL getCurrentControl(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
+
+// XTabController
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > SAL_CALL getControls(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel>& Model) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel> SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer>& Container) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> SAL_CALL getContainer() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL autoTabOrder() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL activateTabOrder() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL activateFirst() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL activateLast() 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 );
+
+// 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);
+
+ // comphelper::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;
+ }
+
+ 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 stopFiltering();
+ 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 removeBoundFieldListener();
+
+ void startFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
+ void stopFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
+
+ ::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 ,sal_Bool _bRemove = sal_True,sal_Bool _bOverWrite=sal_True) const;
+
+
+
+ sal_Bool isLocked() const {return m_bLocked;}
+
+ // returns m_pWindow or - if m_pWindow is NULL - the window of the currently set container
+
+ // create a new interceptor, register it on the given object
+ // 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();}
+
+ DECL_LINK( OnTimeout, void* );
+ DECL_LINK( OnLoad, void* );
+ DECL_LINK( OnToggleAutoFields, void* );
+ DECL_LINK( OnUpdateDispatchers, void* );
+};
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMCTRLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmexch.hxx b/binfilter/bf_svx/source/inc/fmexch.hxx
new file mode 100644
index 000000000000..0f8b6c8a998a
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmexch.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMEXCH_HXX
+#define _SVX_FMEXCH_HXX
+
+#include <comphelper/stl_types.hxx>
+
+#include <bf_svtools/transfer.hxx>
+
+class SvTreeListBox;
+namespace binfilter {
+
+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"))
+
+//========================================================================
+
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+ //====================================================================
+
+ DECLARE_STL_VECTOR( SvLBoxEntry*, ListBoxEntryArray );
+
+ //====================================================================
+ //= OLocalExchange
+ //====================================================================
+
+ //====================================================================
+ //= OLocalExchangeHelper
+ //====================================================================
+ /// a helper for navigator windows (SvTreeListBox'es) which allow DnD within themself
+ class OLocalExchangeHelper
+ {
+ protected:
+ Window* m_pDragSource;
+
+ public:
+ OLocalExchangeHelper( Window* _pDragSource );
+ ~OLocalExchangeHelper();
+
+ void prepareDrag( );
+
+ void startDrag( sal_Int8 nDragSourceActions );
+ void copyToClipboard( ) const;
+
+
+
+ protected:
+
+ protected:
+ void implReset();
+ };
+
+ //====================================================================
+ //= OControlTransferData
+ //====================================================================
+
+ //====================================================================
+
+ //====================================================================
+ //= OControlExchange
+ //====================================================================
+
+ //====================================================================
+ //= OControlExchangeHelper
+ //====================================================================
+/*N*/ class OControlExchangeHelper : public OLocalExchangeHelper
+/*N*/ {
+/*N*/ public:
+/*N*/ OControlExchangeHelper(Window* _pDragSource) : OLocalExchangeHelper(_pDragSource) { }
+/*N*/
+/*N*/
+/*N*/ protected:
+/*N*/ };
+
+ //====================================================================
+ //====================================================================
+
+//........................................................................
+} // namespace svxform
+//........................................................................
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmexpl.hrc b/binfilter/bf_svx/source/inc/fmexpl.hrc
new file mode 100644
index 000000000000..ce4d88ee5185
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmexpl.hrc
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _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/binfilter/bf_svx/source/inc/fmexpl.hxx b/binfilter/bf_svx/source/inc/fmexpl.hxx
new file mode 100644
index 000000000000..5196aad1df57
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmexpl.hxx
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMEXPL_HXX
+#define _SVX_FMEXPL_HXX
+
+
+
+
+
+
+
+#include <bf_sfx2/dockwin.hxx>
+
+
+
+
+
+
+
+
+
+
+
+
+#include "fmview.hxx"
+
+
+class SdrObjListIter;
+namespace binfilter {
+
+class FmFormShell;
+class SdrObject;
+class FmFormModel;
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+
+//========================================================================
+class FmNavViewMarksChanged : public SfxHint
+{
+ FmFormView* pView;
+public:
+ FmNavViewMarksChanged(FmFormView* pWhichView) { pView = pWhichView; }
+ virtual ~FmNavViewMarksChanged() {}
+
+};
+
+//========================================================================
+
+//========================================================================
+
+
+//========================================================================
+// FmNavRequestSelectHint - jemand teilt dem NavigatorTree mit, dass er bestimmte Eintraege selektieren soll
+
+
+
+//========================================================================
+
+
+//========================================================================
+
+
+//========================================================================
+//............................................................................
+namespace svxform
+{
+//............................................................................
+
+ //========================================================================
+ // class OFormComponentObserver
+ //========================================================================
+
+ //========================================================================
+ //= NavigatorTreeModel
+ //========================================================================
+
+ //========================================================================
+
+
+ //========================================================================
+
+ //========================================================================
+ class NavigatorFrameManager : public SfxChildWindow
+ {
+ public:
+ NavigatorFrameManager( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo );
+ SFX_DECL_CHILDWINDOW( NavigatorFrameManager );
+ };
+
+//............................................................................
+} // namespace svxform
+//............................................................................
+
+}//end of namespace binfilter
+#endif // _SVX_FMEXPL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmgroup.hxx b/binfilter/bf_svx/source/inc/fmgroup.hxx
new file mode 100644
index 000000000000..ca89bf4b4f67
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmgroup.hxx
@@ -0,0 +1,120 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMGROUP_HXX
+#define _SVX_FMGROUP_HXX
+
+#include "fmcpont.hxx"
+
+#include <dbform.hxx>
+namespace binfilter {
+
+DECLARE_LIST( FmCtrlModelList, XInterface* )//STRIP008 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;
+};
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMGROUP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmimplids.hxx b/binfilter/bf_svx/source/inc/fmimplids.hxx
new file mode 100644
index 000000000000..252edb14bd7a
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmimplids.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#define _FM_IMPLEMENTATION_IDS_HXX_
+
+#include <bf_svtools/idhelper.hxx>
+
+namespace binfilter {
+
+DECLARE_IMPLEMENTATIONID_HELPER_VSMALL(form, OImplementationIds)
+
+}//end of namespace binfilter
+#endif // _FM_IMPLEMENTATION_IDS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmobj.hxx b/binfilter/bf_svx/source/inc/fmobj.hxx
new file mode 100644
index 000000000000..3c217ae7b916
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmobj.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMOBJ_HXX
+#define _SVX_FMOBJ_HXX
+
+#include "svdouno.hxx"
+
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
+namespace binfilter {
+
+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;
+ sal_Int32 m_nType;
+
+public:
+ TYPEINFO();
+
+protected:
+ FmFormObj(sal_Int32 _nType);
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& GetParent() const {return xParent;}
+ 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;
+
+
+
+
+ /** returns the type of this form object. See fmglob.hxx
+ */
+ sal_Int32 getType() const;
+
+protected:
+ virtual void WriteData(SvStream& rOut) const;
+ virtual void ReadData(const SdrObjIOHeader& rHead, SvStream& rIn);
+
+ DECL_LINK(OnCreate, void* );
+};
+
+
+}//end of namespace binfilter
+#endif // _FM_FMOBJ_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmpgeimp.hxx b/binfilter/bf_svx/source/inc/fmpgeimp.hxx
new file mode 100644
index 000000000000..1c525d6d0190
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmpgeimp.hxx
@@ -0,0 +1,126 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMUNOPGE_HXX
+#define _SVX_FMUNOPGE_HXX
+
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+
+#include <tools/list.hxx>
+
+#include <comphelper/uno3.hxx>
+FORWARD_DECLARE_INTERFACE(io,XObjectOutputStream)
+FORWARD_DECLARE_INTERFACE(io,XObjectInputStream)
+FORWARD_DECLARE_INTERFACE(container,XIndexContainer)
+class SvStream;
+namespace binfilter {
+
+class SdrIOHeader;
+class FmFormObj;
+class FmFormPage;
+class SdrObject;
+
+//FORWARD_DECLARE_INTERFACE(uno,Reference)
+//STRIP008 FORWARD_DECLARE_INTERFACE(io,XObjectOutputStream)
+//STRIP008 FORWARD_DECLARE_INTERFACE(io,XObjectInputStream)
+//STRIP008 FORWARD_DECLARE_INTERFACE(container,XIndexContainer)
+
+class SdrObjList;
+
+DECLARE_LIST(FmObjectList, FmFormObj*)//STRIP008 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
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> xModel;
+ FmFormPage* pPage;
+ UniString m_sPageId;
+
+ sal_Bool m_bFirstActivation : 1;
+
+protected:
+ FmFormPageImpl(FmFormPage* _pPage);
+ FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl);
+ ~FmFormPageImpl();
+
+ void Init();
+
+public:
+ // nur wichtig fuer den DesignMode
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& getCurForm() {return xCurrentForm;}
+
+ // Defaults fuer ein Object setzen
+ // Eindeutigen Namen, Zuordnen zu einer Form falls noch nicht erfolgt
+
+ UniString GetPageId() const { return m_sPageId; }
+
+ // activation handling
+ inline sal_Bool hasEverBeenActivated( ) const { return !m_bFirstActivation; }
+ inline void setHasBeenActivated( ) { m_bFirstActivation = sal_False; }
+
+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;
+
+
+
+public:
+
+
+};
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMUNOPGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmprop.hrc b/binfilter/bf_svx/source/inc/fmprop.hrc
new file mode 100644
index 000000000000..d17908b7e3f6
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmprop.hrc
@@ -0,0 +1,372 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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
+ // free
+#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
+ // free
+#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
+ // free
+#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
+
+#define FM_ATTR_TEXTLINECOLOR (FM_ATTR_START +199) // sal_Int32
+#define FM_ATTR_FONTEMPHASISMARK (FM_ATTR_START +200) // sal_Int16
+#define FM_ATTR_FONTRELIEF (FM_ATTR_START +201) // sal_Int16
+
+namespace binfilter {
+namespace svxform
+{
+
+ 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_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);
+
+ DECLARE_CONSTASCII_USTRING(FM_PROP_TEXTLINECOLOR);
+ DECLARE_CONSTASCII_USTRING(FM_PROP_FONTEMPHASISMARK);
+ DECLARE_CONSTASCII_USTRING(FM_PROP_FONTRELIEF);
+
+} // namespace svxform
+}
+
+#endif // _SVX_FMPROP_HRC
+
diff --git a/binfilter/bf_svx/source/inc/fmresids.hrc b/binfilter/bf_svx/source/inc/fmresids.hrc
new file mode 100644
index 000000000000..10055b8f1458
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmresids.hrc
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMRESIDS_HRC
+#define _SVX_FMRESIDS_HRC
+
+// include -----------------------------------------------------------
+#include <bf_svtools/solar.hrc>
+
+// unnamed ressources -------------------------------------------------------
+// sub ressources .....................
+
+// ImageList-Id's -----------------------------------------------------------
+
+// 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)
+
+// 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)
+// --------- free id -----------------
+#define RID_SVXERR_SEARCH_NORECORD (RID_FORMS_START + 15)
+#define RID_SVXERR_SEARCH_GENERAL_ERROR (RID_FORMS_START + 16)
+
+// 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_FORM_FILTERED (RID_FORMS_START + 14)
+
+// Undo Strings
+
+// ErrorStrings
+
+#define RID_STR_NAME (RID_FORMS_START + 46)
+#define RID_STR_FORM (RID_FORMS_START + 72)
+#define RID_STR_FORMS (RID_FORMS_START + 84)
+
+
+ // free
+
+ // FREE
+
+
+#define RID_STR_CONTROL (RID_FORMS_START +197)
+
+
+
+#define RID_STR_SYNTAXERROR (RID_FORMS_START +218)
+
+
+ // free
+
+#define RID_STR_ERR_DELETERECORD (RID_FORMS_START +235)
+
+#define RID_STR_SVT_SQL_INTERNATIONAL (RID_FORMS_START +240)
+
+// ClassNames
+#define RID_CLASSNAMES_START (RID_FORMS_START + 300)
+
+
+
+// Events
+#define RID_STR_EVT_START (RID_FORMS_START +400)
+
+
+// Error-String-Id's -----------------------------------------------------------
+#define RID_ERR_START (RID_FORMS_START + 600)
+
+// Error-Id's -----------------------------------------------------------
+
+
+// Ueberlaufpruefung -----------------------------------------------------
+
+// Dialog-Id's
+#define ACTFRM_RID_END RID_SVX_DLG_LABELCONTROL
+#if ACTFRM_RID_END > RID_FORMS_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+
+#endif // _FM_FMPAGE_HXX
+
diff --git a/binfilter/bf_svx/source/inc/fmsearch.hrc b/binfilter/bf_svx/source/inc/fmsearch.hrc
new file mode 100644
index 000000000000..ebd5cd1c1983
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmsearch.hrc
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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 PB_SOUNDSLIKESETTINGS 3
+
+#define FL_SEARCHFOR 1
+#define FL_WHERE 2
+#define FL_OPTIONS 3
+#define FL_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
+#define CB_HALFFULLFORMS 8
+#define CB_SOUNDSLIKECJK 9
+
+#endif // _FMSEARCH_HRC
diff --git a/binfilter/bf_svx/source/inc/fmservs.hxx b/binfilter/bf_svx/source/inc/fmservs.hxx
new file mode 100644
index 000000000000..879243849563
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmservs.hxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMSERVS_HXX
+#define _SVX_FMSERVS_HXX
+
+#include "fmstatic.hxx"
+namespace binfilter {
+
+namespace svxform
+{
+
+ DECLARE_CONSTASCII_USTRING(FM_NUMBER_FORMATTER);
+
+ 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_GRID);
+ DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL);
+
+ DECLARE_CONSTASCII_USTRING(FM_FORM_CONTROLLER);
+ DECLARE_CONSTASCII_USTRING(SRV_SDB_CONNECTION);
+ DECLARE_CONSTASCII_USTRING(SRV_SDB_INTERACTION_HANDLER);
+
+ 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_GRIDCONTROL);
+
+ void ImplSmartRegisterUnoServices();
+
+} // namespace svxform
+
+}//end of namespace binfilter
+#endif // _SVX_FMSERVS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmshimp.hxx b/binfilter/bf_svx/source/inc/fmshimp.hxx
new file mode 100644
index 000000000000..0d7093bb6d90
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmshimp.hxx
@@ -0,0 +1,178 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMSHIMP_HXX
+#define _SVX_FMSHIMP_HXX
+
+
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/form/NavigationBarMode.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+
+
+
+#include "svdmark.hxx"
+
+#include "svxids.hrc"
+
+
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_BYTES
+#define _SVSTDARR_LONGS
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_USHORTS
+
+#include "fmsearch.hxx"
+#include <cppuhelper/compbase6.hxx>
+#include <unotools/configitem.hxx>
+#include "dbtoolsclient.hxx"
+
+#include <queue>
+namespace binfilter {
+
+SV_DECL_PTRARR(SdrObjArray, SdrObject*, 32, 16)//STRIP008 ;
+// 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( const Exception& ) { DBG_ERROR("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
+
+
+// flags for controlling the behaviour when calling loadForms
+#define FORMS_LOAD 0x0000 // default: simply load
+#define FORMS_SYNC 0x0000 // default: do in synchronous
+
+#define FORMS_UNLOAD 0x0001 // unload
+#define FORMS_RESET 0x0002 // reset after the load/unload
+#define FORMS_ASYNC 0x0004 // do this async
+
+// forward declarations
+class FmFormShell;
+
+
+//==============================================================================
+// 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
+
+//========================================================================
+// 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 FmFormPage;
+//========================================================================
+struct FmLoadAction
+{
+ FmFormPage* pPage;
+ sal_uInt32 nEventId;
+ sal_uInt16 nFlags;
+
+ FmLoadAction( ) : pPage( NULL ), nFlags( 0 ), nEventId( 0 ) { }
+ FmLoadAction( FmFormPage* _pPage, sal_uInt16 _nFlags, sal_uInt32 _nEventId )
+ :pPage( _pPage ), nFlags( _nFlags ), nEventId( _nEventId )
+ {
+ }
+};
+
+//========================================================================
+class SfxViewFrame;
+typedef ::cppu::WeakComponentImplHelper6< ::com::sun::star::sdbc::XRowSetListener,
+ ::com::sun::star::beans::XPropertyChangeListener,
+ ::com::sun::star::util::XModifyListener,
+ ::com::sun::star::container::XContainerListener,
+ ::com::sun::star::view::XSelectionChangeListener,
+ ::com::sun::star::form::XFormControllerListener> FmXFormShell_BD_BASE;
+
+//========================================================================
+class FmXFormShell_Base_Disambiguation : public FmXFormShell_BD_BASE
+{
+protected:
+ FmXFormShell_Base_Disambiguation( ::osl::Mutex& _rMutex );
+ virtual void SAL_CALL disposing();
+};
+
+//========================================================================
+typedef FmXFormShell_Base_Disambiguation FmXFormShell_BASE;
+typedef ::utl::ConfigItem FmXFormShell_CFGBASE;
+
+
+
+//------------------------------------------------------------------------------
+
+#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; \
+} \
+
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMSHIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmstatic.hxx b/binfilter/bf_svx/source/inc/fmstatic.hxx
new file mode 100644
index 000000000000..1dec2fc46c51
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmstatic.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _FM_STATIC_HXX_
+#define _FM_STATIC_HXX_
+#include <tools/string.hxx>
+namespace binfilter {
+
+struct ConstAsciiString
+{
+ const sal_Char* ascii;
+ sal_Int32 length;
+
+ inline operator const ::rtl::OUString () const;
+ inline operator const sal_Char* () const { return ascii; }
+
+ inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength);
+ inline ~ConstAsciiString();
+
+private:
+ mutable ::rtl::OUString* ustring;
+};
+
+//------------------------------------------------------------
+inline ConstAsciiString::ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength)
+ :ascii(_pAsciiZeroTerminated)
+ ,length(_nLength)
+ ,ustring(NULL)
+{
+}
+
+//------------------------------------------------------------
+inline ConstAsciiString::~ConstAsciiString()
+{
+ delete ustring;
+ ustring = NULL;
+}
+
+//------------------------------------------------------------
+inline ConstAsciiString::operator const ::rtl::OUString () const
+{
+ if (!ustring)
+ ustring = new ::rtl::OUString(ascii, length, RTL_TEXTENCODING_ASCII_US);
+ return *ustring;
+}
+
+#define DECLARE_CONSTASCII_USTRING(name) \
+ extern ConstAsciiString name
+
+#define IMPLEMENT_CONSTASCII_USTRING(name, asciivalue) \
+ ConstAsciiString name(asciivalue, sizeof(asciivalue) - 1)
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmtools.hxx b/binfilter/bf_svx/source/inc/fmtools.hxx
new file mode 100644
index 000000000000..7d415c17ef8b
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmtools.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMTOOLS_HXX
+#define _SVX_FMTOOLS_HXX
+
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/XInterceptorInfo.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+
+
+#ifndef _SVSTDARR_ULONGS
+#define _SVSTDARR_ULONGS
+#endif
+
+#include "fmprop.hrc"
+#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/compbase3.hxx>
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/component.hxx>
+
+#include "fmimplids.hxx"
+
+class Window;
+namespace binfilter {
+
+
+
+//==================================================================
+// allgemeine Typen
+//==================================================================
+// displaying a database exception for the user
+// display info about a simple ::com::sun::star::sdbc::SQLException
+// display info about chained SQLExceptions
+
+// StringConversion
+namespace svxform
+{
+ // modes for the XModeSelector
+ DECLARE_CONSTASCII_USTRING(DATA_MODE);
+ DECLARE_CONSTASCII_USTRING(FILTER_MODE);
+
+} // namespace svxform
+
+
+// Kopieren von Persistenten Objecten
+
+
+// Suchen in einer Indexliste nach einem Element
+
+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);
+
+
+
+
+// ===================================================================================================
+// = class CursorWrapper - eine Hilfsklasse, die parallel mit je einem ::com::sun::star::uno::Reference<XDatabaseUpdateCursor>,
+// XDatabaseBookmarkCursor und XDatabaseDirectCursor arbeitet
+// ===================================================================================================
+
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMTOOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmundo.hxx b/binfilter/bf_svx/source/inc/fmundo.hxx
new file mode 100644
index 000000000000..a8d9dabaa1d7
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmundo.hxx
@@ -0,0 +1,148 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMUNDO_HXX
+#define _SVX_FMUNDO_HXX
+
+
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/script/XScriptListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+
+
+
+
+#include "svdouno.hxx"
+
+#include <comphelper/uno3.hxx>
+FORWARD_DECLARE_INTERFACE(awt,XControl)
+FORWARD_DECLARE_INTERFACE(awt,XControlContainer)
+namespace binfilter {
+
+class FmFormModel;
+class FmFormObj;
+class SdrObject;
+class FmXFormView;
+
+//STRIP008 FORWARD_DECLARE_INTERFACE(awt,XControl)
+//STRIP008 FORWARD_DECLARE_INTERFACE(awt,XControlContainer)
+//FORWARD_DECLARE_INTERFACE(uno,Reference)
+
+//==================================================================
+// FmUndoPropertyAction
+//==================================================================
+
+//==================================================================
+// FmUndoContainerAction
+//==================================================================
+
+//==================================================================
+// FmUndoModelReplaceAction
+//==================================================================
+
+//========================================================================
+class FmXUndoEnvironment
+ : public ::cppu::WeakImplHelper3< ::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;
+
+
+
+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) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+
+// XScriptListener
+ virtual void SAL_CALL firing(const ::com::sun::star::script::ScriptEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL approveFiring(const ::com::sun::star::script::ScriptEvent& evt) throw(::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException);
+
+ 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();
+
+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);
+};
+
+
+}//end of namespace binfilter
+#endif //_SVX_FMUNDO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmurl.hxx b/binfilter/bf_svx/source/inc/fmurl.hxx
new file mode 100644
index 000000000000..77e1616b17b8
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmurl.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_FMURL_HXX
+#define _SVX_FMURL_HXX
+
+#include "fmstatic.hxx"
+namespace binfilter {
+
+namespace svxform
+{
+
+ 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);
+
+} // namespace svxform
+
+}//end of namespace binfilter
+#endif // _SVX_FMURL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/fmvwimp.hxx b/binfilter/bf_svx/source/inc/fmvwimp.hxx
new file mode 100644
index 000000000000..35c68b52f385
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/fmvwimp.hxx
@@ -0,0 +1,234 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_FMVWIMP_HXX
+#define _SVX_FMVWIMP_HXX
+
+#include <comphelper/stl_types.hxx>
+
+
+#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/form/XFormController.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <com/sun/star/sdb/SQLErrorEvent.hpp>
+#include <tools/link.hxx>
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <comphelper/uno3.hxx>
+
+#include "svdmark.hxx"
+FORWARD_DECLARE_INTERFACE(awt,XControl)
+FORWARD_DECLARE_INTERFACE(awt,XWindow)
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+FORWARD_DECLARE_INTERFACE(util,XNumberFormats)
+class Window;
+class OutputDevice;
+namespace binfilter {
+
+class SdrPageViewWinRec;
+class SdrPageView;
+class SdrObject;
+class FmFormObj;
+class FmFormModel;
+class FmFormShell;
+class FmFormView;
+
+//STRIP008 FORWARD_DECLARE_INTERFACE(awt,XControl)
+//STRIP008 FORWARD_DECLARE_INTERFACE(awt,XWindow)
+//STRIP008 FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+//STRIP008 FORWARD_DECLARE_INTERFACE(util,XNumberFormats)
+
+class FmXFormController;
+class FmXFormView;
+
+namespace svx {
+ class ODataAccessDescriptor;
+}
+
+//==================================================================
+// 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;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ FmXFormView* m_pViewImpl;
+ Window* m_pWindow;
+
+public:
+ FmXPageViewWinRec( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
+ const SdrPageViewWinRec*, FmXFormView* pView);
+ ~FmXPageViewWinRec();
+
+// UNO Anbindung
+
+// ::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);
+ ::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::WeakImplHelper3<
+ ::com::sun::star::form::XFormControllerListener,
+ ::com::sun::star::awt::XFocusListener,
+ ::com::sun::star::container::XContainerListener>
+{
+ friend class FmFormView;
+ friend class FmFormShell;
+ friend class FmXFormShell;
+ friend class FmXPageViewWinRec;
+ class ObjectRemoveListener;
+ friend class ObjectRemoveListener;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> m_xWindow;
+
+ FmFormObj* m_pMarkedGrid;
+ FmFormView* m_pView;
+ sal_uInt32 m_nActivationEvent;
+ sal_uInt32 m_nErrorMessageEvent; // event for an asynchronous error message. See also m_aAsyncError
+ sal_uInt32 m_nAutoFocusEvent; // event for asynchronously setting the focus to a control
+
+ ::com::sun::star::sdb::SQLErrorEvent
+ m_aAsyncError; // error event which is to be displayed asyn. See m_nErrorMessageEvent.
+
+ FmWinRecList m_aWinList; // to be filled in alive mode only
+
+ // Liste der markierten Object, dient zur Restauration beim Umschalten von Alive in DesignMode
+ SdrMarkList m_aMark;
+ ObjectRemoveListener* m_pWatchStoredList;
+
+ sal_Bool m_bFirstActivation : 1;
+
+
+
+ FmFormShell* GetFormShell() const;
+
+ void removeGridWindowListening();
+
+protected:
+ FmXFormView(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
+ FmFormView* _pView);
+ ~FmXFormView();
+
+ void saveMarkList( sal_Bool _bSmartUnmark = sal_True );
+ void restoreMarkList( SdrMarkList& _rRestoredMarkList );
+ void stopMarkListWatching();
+ void startMarkListWatching();
+
+ void notifyViewDying( );
+ // notifies this impl class that the anti-impl instance (m_pView) is going to die
+
+public:
+ // UNO Anbindung
+
+// ::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) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+
+// ::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);
+
+ // XFocusListener
+ virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+
+ FmFormView* getView() const {return m_pView;}
+ const FmWinRecList& getWindowList() const {return m_aWinList;}
+
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() { return m_xORB; }
+
+ // activation handling
+ inline sal_Bool hasEverBeenActivated( ) const { return !m_bFirstActivation; }
+ inline void setHasBeenActivated( ) { m_bFirstActivation = sal_False; }
+
+ void onFirstViewActivation( const FmFormModel* _pDocModel );
+
+private:
+ 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(sal_Bool bSync = sal_False);
+ void Deactivate(BOOL bDeactivateController = TRUE);
+
+
+
+ void ObjectRemovedInAliveMode(const SdrObject* pObject);
+
+ // asynchronously displays an error message. See also OnDelayedErrorMessage.
+ void displayAsyncErrorMessage( const ::com::sun::star::sdb::SQLErrorEvent& _rEvent );
+
+ // cancels all pending async events
+ void cancelEvents();
+
+ /// the the auto focus to the first (in terms of the tab order) control
+ DECL_LINK( OnActivate, void* );
+ DECL_LINK( OnAutoFocus, void* );
+ DECL_LINK( OnDelayedErrorMessage, void* );
+};
+
+
+
+}//end of namespace binfilter
+#endif // _SVX_FMVWIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/gridcell.hxx b/binfilter/bf_svx/source/inc/gridcell.hxx
new file mode 100644
index 000000000000..9563b2bc38b4
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/gridcell.hxx
@@ -0,0 +1,929 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_GRIDCELL_HXX
+#define _SVX_GRIDCELL_HXX
+
+#include "gridctrl.hxx"
+
+#include "fmtools.hxx"
+
+
+#include <com/sun/star/form/XBoundControl.hpp>
+#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/awt/XListBox.hpp>
+#include <com/sun/star/awt/TextAlign.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/XCheckBox.hpp>
+#include "sqlparserclient.hxx"
+class Edit;
+namespace binfilter {
+
+class DbCellControl;
+class FmXGridCell;
+
+//==================================================================
+// FmMutexHelper
+//==================================================================
+class FmMutexHelper
+{
+protected:
+ ::osl::Mutex m_aMutex;
+};
+
+//==================================================================
+// 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
+ CellControllerRef 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 CellControllerRef 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 CellControllerRef& 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
+:public ::binfilter::svxform::OStaticDataAccessTools//STRIP001 ,public ::svxform::OStaticDataAccessTools
+ ,public FmMutexHelper // _before_ the listener, so the listener is to be destroyed first!
+ ,public ::comphelper::OPropertyChangeListener
+{
+private:
+ ::comphelper::OPropertyChangeMultiplexer* m_pModelChangeBroadcaster;
+
+private:
+ sal_Bool m_bTransparent : 1;
+ sal_Bool m_bAlignedController : 1;
+ sal_Bool m_bAccessingValueProperty : 1;
+
+protected:
+ DbGridColumn& m_rColumn;
+ Window* m_pPainter;
+ Window* m_pWindow;
+
+protected:
+ // control transparency
+ inline sal_Bool isTransparent( ) const { return m_bTransparent; }
+ inline void setTransparent( sal_Bool _bSet ) { m_bTransparent = _bSet; }
+
+ // control alignment
+ inline void setAlignedController( sal_Bool _bAlign = sal_True ) { m_bAlignedController = _bAlign; }
+
+
+ /** determined whether or not the value property is locked
+ @see lockValueProperty
+ */
+ inline sal_Bool isValuePropertyLocked() const;
+
+ /** locks the listening at the value property.
+ <p>This means that every subsequent change now done on the value property of the model ("Text", or "Value",
+ or whatever) is then ignored.<br/>
+ This base class uses this setting in <method>Commit</method>.</p>
+ @precond
+ Value locking can't be nested
+ @see unlockValueProperty
+ */
+ inline void lockValueProperty();
+ /** unlocks the listening at the value property
+ @see lockValueProperty
+ */
+ inline void unlockValueProperty();
+
+protected:
+ // adds the given property to the list of properties which we listen for
+ void doPropertyListening( const ::rtl::OUString& _rPropertyName );
+
+ // called whenever a property which affects field settings in general is called
+ // you should overwrite this method for every property you add yourself as listener to
+ // with doPropertyListening
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+
+ // called by _propertyChanged if a property which denotes the column value has changed
+ void implValuePropertyChanged( );
+
+
+public:
+ DbCellControl(DbGridColumn& _rColumn, sal_Bool _bText = sal_True);
+ virtual ~DbCellControl();
+
+
+ Window* GetControl() const { return m_pWindow; }
+
+ // control alignment
+ inline sal_Bool isAlignedController() const { return m_bAlignedController; }
+ void AlignControl(sal_Int16 nAlignment);
+
+ void SetTextLineColor();
+ void SetTextLineColor(const Color& _rColor);
+
+ // Initialisieren bevor ein Control angezeigt wird
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor);
+ virtual CellControllerRef CreateController() const = 0;
+
+ // Schreiben des Wertes in das Model
+ sal_Bool Commit();
+
+ // 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;
+
+ void invalidatedController();
+
+ /** commits the content of the control (e.g. the text of an edit field) into the column model
+ (e.g. the "Text" property of the model).
+ <p>To be overwritten in derived classes.</p>
+ @see updateFromModel
+ */
+ virtual sal_Bool commitControl( ) = 0;
+
+ /** updates the current content of the control (e.g. the text of an edit field) from the column model
+ (e.g. the "Text" property of the model).
+ <p>To be overwritten in derived classes.</p>
+ @precond
+ NULL != _rxModel
+ @precond
+ NULL != m_pWindow
+
+ @see commitControl
+ */
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel ) = 0;
+
+protected:
+// OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+
+private:
+ void implDoPropertyListening( const ::rtl::OUString& _rPropertyName, sal_Bool _bWarnIfNotExistent = sal_True );
+
+ /// updates the "readonly" setting on m_pWindow, according to the respective property value in the given model
+ void implAdjustReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+
+ /// updates the "enabled" setting on m_pWindow, according to the respective property value in the given model
+ void implAdjustEnabled( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+//------------------------------------------------------------------
+inline sal_Bool DbCellControl::isValuePropertyLocked() const
+{
+ return m_bAccessingValueProperty;
+}
+
+//------------------------------------------------------------------
+inline void DbCellControl::lockValueProperty()
+{
+ OSL_ENSURE( !isValuePropertyLocked(), "DbCellControl::lockValueProperty: not to be nested!" );
+ m_bAccessingValueProperty = sal_True;
+}
+
+//------------------------------------------------------------------
+inline void DbCellControl::unlockValueProperty()
+{
+ OSL_ENSURE( isValuePropertyLocked(), "DbCellControl::lockValueProperty: not locked so far!" );
+ m_bAccessingValueProperty = sal_False;
+}
+
+//==================================================================
+/** a field which is bound to a column which supports the MaxTextLen property
+*/
+class DbLimitedLengthField : public DbCellControl
+{
+protected:
+ DbLimitedLengthField( DbGridColumn& _rColumn );
+
+protected:
+ // DbCellControl
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+class DbTextField : public DbLimitedLengthField
+{
+ 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 CellControllerRef CreateController() const;
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+};
+
+//==================================================================
+class DbFormattedField : public DbLimitedLengthField
+{
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xSupplier;
+ sal_Int16 m_nKeyType;
+
+
+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 CellControllerRef CreateController() const;
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+};
+
+//==================================================================
+class DbCheckBox : public DbCellControl
+{
+public:
+ DbCheckBox(DbGridColumn& _rColumn);
+ 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 CellControllerRef CreateController() const;
+ 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);
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+};
+
+//==================================================================
+class DbComboBox : public DbCellControl
+{
+ sal_Int16 m_nKeyType;
+
+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 CellControllerRef CreateController() const;
+
+ void SetList(const ::com::sun::star::uno::Any& rItems);
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+};
+
+//==================================================================
+class DbListBox :public DbCellControl
+{
+ sal_Bool m_bBound : 1;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aValueList;
+
+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 CellControllerRef CreateController() const;
+
+ void SetList(const ::com::sun::star::uno::Any& rItems);
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+};
+
+//==================================================================
+class DbPatternField : public DbCellControl
+{
+public:
+ DbPatternField(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 CellControllerRef CreateController() const;
+
+protected:
+ /// DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+class DbSpinField : public DbCellControl
+{
+private:
+ sal_Int16 m_nStandardAlign;
+
+protected:
+ DbSpinField( DbGridColumn& _rColumn, sal_Int16 _nStandardAlign = ::com::sun::star::awt::TextAlign::RIGHT );
+
+public:
+ virtual void Init( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxCursor );
+ virtual CellControllerRef CreateController() const;
+
+protected:
+ virtual SpinField* createField(
+ Window* _pParent,
+ WinBits _nFieldStyle,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
+ ) = 0;
+};
+
+//==================================================================
+class DbDateField : public DbSpinField
+{
+public:
+ DbDateField(DbGridColumn& _rColumn);
+ 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);
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ // DbSpinField
+ virtual SpinField* createField(
+ Window* _pParent,
+ WinBits _nFieldStyle,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
+ );
+
+ /// initializes everything which relates to the properties describing the numeric behaviour
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+class DbTimeField : public DbSpinField
+{
+public:
+ DbTimeField(DbGridColumn& _rColumn);
+ 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);
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ // DbSpinField
+ virtual SpinField* createField(
+ Window* _pParent,
+ WinBits _nFieldStyle,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
+ );
+
+ /// initializes everything which relates to the properties describing the numeric behaviour
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+class DbCurrencyField : public DbSpinField
+{
+ sal_Int16 m_nScale;
+
+public:
+ DbCurrencyField(DbGridColumn& _rColumn);
+ 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);
+
+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;
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ // DbSpinField
+ virtual SpinField* createField(
+ Window* _pParent,
+ WinBits _nFieldStyle,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
+ );
+
+ /// initializes everything which relates to the properties describing the numeric behaviour
+ virtual void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+class DbNumericField : public DbSpinField
+{
+public:
+ DbNumericField(DbGridColumn& _rColumn);
+ 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);
+
+protected:
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+ // DbSpinField
+ virtual SpinField* createField(
+ Window* _pParent,
+ WinBits _nFieldStyle,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
+ );
+
+ /// initializes everything which relates to the properties describing the numeric behaviour
+ void implAdjustGenericFieldSetting( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+};
+
+//==================================================================
+class DbFilterField
+ :public DbCellControl
+ ,public ::binfilter::svxform::OSQLParserClient//STRIP008 ,public ::svxform::OSQLParserClient
+{
+ ::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(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,DbGridColumn& _rColumn);
+ virtual ~DbFilterField();
+
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor);
+ virtual CellControllerRef CreateController() const;
+ virtual void Paint(OutputDevice& rDev, const Rectangle& rRect);
+ 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:
+
+ // DbCellControl
+ virtual sal_Bool commitControl( );
+ virtual void updateFromModel( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _rxModel );
+
+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;
+
+ virtual ~FmXGridCell();
+public:
+ TYPEINFO();
+ FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl);
+
+
+ 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);
+
+ void SetTextLineColor();
+ void SetTextLineColor(const Color& _rColor);
+
+// 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() throw (::com::sun::star::uno::RuntimeException) {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) throw (::com::sun::star::uno::RuntimeException) {return sal_False;}
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw (::com::sun::star::uno::RuntimeException) {return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > ();}
+ virtual void SAL_CALL setDesignMode(sal_Bool bOn) throw (::com::sun::star::uno::RuntimeException) {}
+ virtual sal_Bool SAL_CALL isDesignMode() throw (::com::sun::star::uno::RuntimeException) {return sal_False;}
+ virtual sal_Bool SAL_CALL isTransparent() throw (::com::sun::star::uno::RuntimeException) {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;
+
+ virtual ~FmXEditCell();
+public:
+ FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl);
+
+
+ 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;
+protected:
+ virtual ~FmXCheckBoxCell();
+public:
+ FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+
+
+// 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;
+protected:
+ virtual ~FmXListBoxCell();
+public:
+ FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+
+
+ 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;
+protected:
+ virtual ~FmXFilterCell();
+public:
+ TYPEINFO();
+ FmXFilterCell(DbGridColumn* pColumn = NULL, DbCellControl* pControl = NULL);
+
+
+ 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* );
+};
+
+}//end of namespace binfilter
+#endif // _SVX_GRIDCELL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/gridcols.hxx b/binfilter/bf_svx/source/inc/gridcols.hxx
new file mode 100644
index 000000000000..d06288915732
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/gridcols.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_GRIDCOLS_HXX
+#define _SVX_GRIDCOLS_HXX
+
+#include "fmstatic.hxx"
+namespace binfilter {
+
+namespace svxform
+{
+
+ // list of possible 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);
+
+} // namespace svxform
+
+
+// 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);
+
+
+}//end of namespace binfilter
+#endif // _SVX_GRIDCOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/multipro.hxx b/binfilter/bf_svx/source/inc/multipro.hxx
new file mode 100644
index 000000000000..af1d48483f79
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/multipro.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _MULTIPRO_HXX
+#define _MULTIPRO_HXX
+
+#include <com/sun/star/form/XFormComponent.hpp>
+#include <comphelper/composedprops.hxx>
+#include <svdmark.hxx>
+namespace binfilter {
+
+//.........................................................................
+namespace svxform
+{
+//.........................................................................
+
+ //==================================================================
+ // FmXMultiSet
+ //==================================================================
+ typedef ::comphelper::OComposedPropertySet FmXMultiSet_Base;
+ class FmXMultiSet
+ :public FmXMultiSet_Base
+ ,public ::com::sun::star::form::XFormComponent
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
+
+ public:
+ FmXMultiSet(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> > & _rPropertySets);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ // XChild
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw(::com::sun::star::uno::RuntimeException);
+ 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);
+
+ static FmXMultiSet* Create(const SdrMarkList& rMarkList);
+ };
+
+//.........................................................................
+} // namespace svxform
+//.........................................................................
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/mutxhelp.hxx b/binfilter/bf_svx/source/inc/mutxhelp.hxx
new file mode 100644
index 000000000000..86fc0a3b9e5a
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/mutxhelp.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_MUTXHELP_HXX
+#define _SVX_MUTXHELP_HXX
+
+#include <osl/mutex.hxx>
+namespace binfilter {
+
+class SvxMutexHelper
+{
+private:
+ ::osl::Mutex maMutex;
+
+public:
+ ::osl::Mutex& getMutex() { return maMutex; }
+};
+
+}//end of namespace binfilter
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/sdbdatacolumn.hxx b/binfilter/bf_svx/source/inc/sdbdatacolumn.hxx
new file mode 100644
index 000000000000..178dd169e5c7
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/sdbdatacolumn.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_FORM_SDBDATACOLUMN_HXX
+#define SVX_FORM_SDBDATACOLUMN_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sdb/XColumn.hpp>
+#include <com/sun/star/sdb/XColumnUpdate.hpp>
+#include <osl/diagnose.h>
+namespace binfilter {
+
+//..............................................................................
+namespace svxform
+{
+//..............................................................................
+
+ //==========================================================================
+ //= DataColumn - 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(); }
+ sal_Bool supportsUpdate() const { return m_xColumnUpdate.is(); }
+
+ DataColumn* operator ->() { return this; }
+ operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> () const{ return m_xColumn.get(); }
+
+ // 'conversions'
+ inline const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& getPropertySet() const
+ {
+ return m_xPropertySet;
+ }
+ inline const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>& getColumn() const
+ {
+ return m_xColumn;
+ }
+ inline const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumnUpdate>& getColumnUpdate() const
+ {
+ OSL_ENSURE(m_xColumnUpdate.is() , "DataColumn::getColumnUpdate: 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 );
+ };
+
+}
+#endif // SVX_FORM_SDBDATACOLUMN_HXX
+
+//..............................................................................
+}//end of namespace binfilter // namespace svxform
+//..............................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/showcols.hxx b/binfilter/bf_svx/source/inc/showcols.hxx
new file mode 100644
index 000000000000..90f37f344a3a
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/showcols.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_SHOWCOLS_HXX
+#define _SVX_SHOWCOLS_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/button.hxx>
+
+#include <com/sun/star/container/XIndexContainer.hpp>
+namespace binfilter {
+
+//==========================================================================
+// FmShowColsDialog
+//==========================================================================
+
+class FmShowColsDialog : public ModalDialog
+{
+ ListBox m_aList;
+ FixedText m_aLabel;
+ OKButton m_aOK;
+ CancelButton m_aCancel;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xColumns;
+
+public:
+ FmShowColsDialog( Window* pParent );
+ virtual ~FmShowColsDialog();
+
+ void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols);
+
+protected:
+ DECL_LINK( OnClickedOk, Button* );
+};
+
+}//end of namespace binfilter
+#endif // _SVX_SHOWCOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/sqlparserclient.hxx b/binfilter/bf_svx/source/inc/sqlparserclient.hxx
new file mode 100644
index 000000000000..1e0043c843c6
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/sqlparserclient.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_SQLPARSERCLIENT_HXX
+#define SVX_SQLPARSERCLIENT_HXX
+
+#include "dbtoolsclient.hxx"
+#include "ParseContext.hxx"
+namespace binfilter {
+
+//........................................................................
+namespace svxform
+{
+//........................................................................
+
+ //====================================================================
+ //= OSQLParserClient
+ //====================================================================
+ class OSQLParserClient : public ODbtoolsClient
+ ,public ::binfilter::svxform::OParseContextClient//STRIP008 ,public ::svxform::OParseContextClient
+ {
+ private:
+ //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time)
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+
+ protected:
+ mutable ::rtl::Reference< ::connectivity::simple::ISQLParser > m_xParser;
+
+ protected:
+ OSQLParserClient(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time)
+
+ protected:
+ };
+
+//........................................................................
+} // namespace svxform
+//........................................................................
+
+}//end of namespace binfilter
+#endif // SVX_SQLPARSERCLIENT_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/svdoimp.hxx b/binfilter/bf_svx/source/inc/svdoimp.hxx
new file mode 100644
index 000000000000..a182dd38ee06
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/svdoimp.hxx
@@ -0,0 +1,277 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_SVDOIMP_HXX
+#define _SVX_SVDOIMP_HXX
+
+#include <memory>
+#include <vector>
+
+#include <cppuhelper/weakref.hxx>
+
+#include <vcl/mapmod.hxx>
+
+#include <bf_svtools/lstner.hxx>
+
+#include <vcl/timer.hxx>
+
+#include "svdsob.hxx"
+
+#include "svdtypes.hxx" // fuer SdrLayerID
+
+#include "svdglue.hxx" // Klebepunkte
+
+#include "xdash.hxx"
+
+#include "xpoly.hxx"
+
+#include "poly3d.hxx"
+
+#include "xenum.hxx"
+class PolyPolygon;
+namespace binfilter {
+
+class SfxItemSet;
+class SdrObject;
+class ExtOutputDevice;
+class XFillAttrSetItem;
+class XLineAttrSetItem;
+class XPolyPolygon;
+class XPolygon;
+
+///////////////////////////////////////////////////////////////////////////////
+
+// #100127# Bracket filled shapes with a comment, if recording a Mtf
+class ImpGraphicFill
+{
+public:
+ ImpGraphicFill( const SdrObject& rObj, const ExtOutputDevice& rXOut, const SfxItemSet& rFillItemSet, bool bIsShadow=false );
+ ~ImpGraphicFill();
+
+private:
+ const SdrObject& mrObj;
+ const ExtOutputDevice& mrXOut;
+ bool mbCommentWritten;
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+// #104609# Extracted from XOutputDevice::ImpCalcBmpFillStartValues
+
+/** Calc offset and size for bitmap fill
+
+ This method calculates the size and the offset from the left, top
+ position of a shape in logical coordinates
+
+ @param rStartOffset
+ The offset from the left, top position of the output rectangle is returned
+
+ @param rBmpOutputSize
+ The output size of the bitmap is returned herein
+
+ @param rOutputRect
+ Specifies the output rectangle into which the bitmap should be tiled into
+
+ @param rOutputMapMode
+ Specifies the logical coordinate system the output rectangle is in
+
+ @param rFillBitmap
+ Specifies the bitmap to fill with
+
+ @param rBmpSize
+ The desired destination bitmap size. If null, size is taken from the bitmap
+
+ @param rBmpPerCent
+ Percentage of bitmap size, relative to the output rectangle
+
+ @param rBmpOffPerCent
+ Offset for bitmap tiling, in percentage relative to bitmap output size
+
+ @param bBmpLogSize
+ True when using the preferred bitmap size, False when using the percentage value
+
+ @param bBmpTile
+ True for tiling. False only paints one instance of the bitmap
+
+ @param bBmpStretch
+ True if bitmap should be stretched to output rect dimension
+
+ @param eBmpRectPoint
+ Position of the start point relative to the bitmap
+
+ */
+void ImpCalcBmpFillSizes( Size& rStartOffset,
+ Size& rBmpOutputSize,
+ const Rectangle& rOutputRect,
+ const MapMode& rOutputMapMode,
+ const Bitmap& rFillBitmap,
+ const Size& rBmpSize,
+ const Size& rBmpPerCent,
+ const Size& rBmpOffPerCent,
+ BOOL bBmpLogSize,
+ BOOL bBmpTile,
+ BOOL bBmpStretch,
+ RECT_POINT eBmpRectPoint );
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+class ImpLineStyleParameterPack
+{
+ OutputDevice* mpOut;
+ XDash aDash;
+
+ XLineJoint eLineJoint;
+ XLineStyle eLineStyle;
+
+ const XPolygon& rStartPolygon;
+ const XPolygon& rEndPolygon;
+
+ INT32 nLineWidth;
+ INT32 nStartWidth;
+ INT32 nEndWidth;
+
+ ::std::vector<double> aDotDashArray;
+ double fFullDashDotLen;
+ double fDegreeStepWidth;
+
+ BOOL bStartCentered;
+ BOOL bEndCentered;
+ BOOL bForceNoArrowsLeft;
+ BOOL bForceNoArrowsRight;
+ BOOL bForceHair;
+
+public:
+ ImpLineStyleParameterPack(const SfxItemSet& rSet,
+ BOOL bForceHair, OutputDevice* pOut);
+ ~ImpLineStyleParameterPack();
+
+ OutputDevice* GetOutDev() const { return mpOut; }
+ INT32 GetLineWidth() const { return nLineWidth; }
+ INT32 GetDisplayLineWidth() const { return bForceHair ? 0 : nLineWidth; }
+ XLineStyle GetLineStyle() const { return eLineStyle; }
+
+ INT32 GetStartWidth() const { return nStartWidth; }
+ INT32 GetDisplayStartWidth() const { return bForceHair ? 0 : nStartWidth; }
+ INT32 GetEndWidth() const { return nEndWidth; }
+ INT32 GetDisplayEndWidth() const { return bForceHair ? 0 : nEndWidth; }
+
+ const XPolygon& GetStartPolygon() const { return rStartPolygon; }
+ const XPolygon& GetEndPolygon() const { return rEndPolygon; }
+
+ double GetDegreeStepWidth() const { return fDegreeStepWidth; }
+
+ XLineJoint GetLineJoint() const { return eLineJoint; }
+ double GetLinejointMiterUpperBound() const { return 3.0; }
+
+ XDashStyle GetDashStyle() const { return aDash.GetDashStyle(); }
+ UINT16 GetDots() const { return aDash.GetDots(); }
+ UINT32 GetDotLen() const { return aDash.GetDotLen(); }
+ UINT16 GetDashes() const { return aDash.GetDashes(); }
+ UINT32 GetDashLen() const { return aDash.GetDashLen(); }
+ UINT32 GetDashDistance() const { return aDash.GetDistance(); }
+ double GetFullDashDotLen() const { return fFullDashDotLen; }
+ UINT16 GetFirstDashDotIndex(double fPos, double& rfDist) const;
+ UINT16 GetNextDashDotIndex(UINT16 nInd, double& rfDist) const;
+ ::std::vector< double > GetDotDash() const { return ::std::vector< double >(aDotDashArray); }
+
+ BOOL IsStartCentered() const { return bStartCentered; }
+ BOOL IsEndCentered() const { return bEndCentered; }
+
+ BOOL IsStartActive() const { return (!bForceNoArrowsLeft && GetStartPolygon().GetPointCount() && GetStartWidth()); }
+ BOOL IsEndActive() const { return (!bForceNoArrowsRight && GetEndPolygon().GetPointCount() && GetEndWidth()); }
+
+ void ForceNoArrowsLeft(BOOL bNew) { bForceNoArrowsLeft = bNew; }
+ void ForceNoArrowsRight(BOOL bNew) { bForceNoArrowsRight = bNew; }
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpLineGeometryCreator
+{
+ const ImpLineStyleParameterPack& mrLineAttr;
+ PolyPolygon3D& mrPolyPoly3D;
+ PolyPolygon3D& mrPolyLine3D;
+ BOOL mbLineDraft;
+
+ // private support functions
+ // help functions for line geometry creation
+ void ImpCreateLineGeometry(const Polygon3D& rSourcePoly);
+ double ImpCreateLineStartEnd(Polygon3D& rArrowPoly, const Polygon3D& rSourcePoly, BOOL bFront, double fWantedWidth, BOOL bCentered);
+ void ImpCreateSegmentsForLine(const Vector3D* pPrev, const Vector3D* pLeft, const Vector3D* pRight, const Vector3D* pNext, double fPolyPos);
+ void ImpCreateLineSegment(const Vector3D* pPrev, const Vector3D* pLeft, const Vector3D* pRight, const Vector3D* pNext);
+ double ImpSimpleFindCutPoint(const Vector3D& rEdge1Start, const Vector3D& rEdge1Delta, const Vector3D& rEdge2Start, const Vector3D& rEdge2Delta);
+
+public:
+ ImpLineGeometryCreator(const ImpLineStyleParameterPack& rAttr, PolyPolygon3D& rPoPo,
+ PolyPolygon3D& rPoLi, BOOL bIsLineDraft = FALSE)
+ : mrLineAttr(rAttr),
+ mrPolyPoly3D(rPoPo),
+ mrPolyLine3D(rPoLi),
+ mbLineDraft(bIsLineDraft)
+ {
+ }
+
+ void AddPolygon3D(const Polygon3D& rPoly) { ImpCreateLineGeometry(rPoly); }
+ const PolyPolygon3D& GetPolyPolygon3D() const { return mrPolyPoly3D; }
+ const PolyPolygon3D& GetPolyLines3D() const { return mrPolyLine3D; }
+ void Clear() { mrPolyPoly3D.Clear(); mrPolyLine3D.Clear(); }
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class SdrLineGeometry
+{
+ PolyPolygon3D maPolyPoly3D;
+ PolyPolygon3D maLinePoly3D;
+ ImpLineStyleParameterPack maLineAttr;
+ BOOL mbForceOnePixel;
+ BOOL mbForceTwoPixel;
+
+public:
+ SdrLineGeometry(const PolyPolygon3D& rPolyPoly, const PolyPolygon3D& rLinePoly,
+ const ImpLineStyleParameterPack& rLineAttr,
+ BOOL bForceOnePixel, BOOL bForceTwoPixel)
+ : maPolyPoly3D(rPolyPoly),
+ maLinePoly3D(rLinePoly),
+ maLineAttr(rLineAttr),
+ mbForceOnePixel(bForceOnePixel),
+ mbForceTwoPixel(bForceTwoPixel)
+ {}
+
+ PolyPolygon3D& GetPolyPoly3D() { return maPolyPoly3D; }
+ PolyPolygon3D& GetLinePoly3D() { return maLinePoly3D; }
+ ImpLineStyleParameterPack& GetLineAttr() { return maLineAttr; }
+ BOOL DoForceOnePixel() const { return mbForceOnePixel; }
+ BOOL DoForceTwoPixel() const { return mbForceTwoPixel; }
+};
+
+}//end of namespace binfilter
+#endif // _SVX_SVDOIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/svdoutlinercache.hxx b/binfilter/bf_svx/source/inc/svdoutlinercache.hxx
new file mode 100644
index 000000000000..3e85d1d69147
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/svdoutlinercache.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_SDROUTLINER_HXX
+#define _SVX_SDROUTLINER_HXX
+
+#include <sal/types.h>
+namespace binfilter {
+
+class SdrModel;
+class SdrOutliner;
+
+
+class SdrOutlinerCache
+{
+private:
+ SdrModel* mpModel;
+
+ SdrOutliner* mpModeOutline;
+ SdrOutliner* mpModeText;
+public:
+ SdrOutlinerCache( SdrModel* pModel );
+ ~SdrOutlinerCache();
+
+ SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
+ void disposeOutliner( SdrOutliner* pOutliner );
+};
+
+}//end of namespace binfilter
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/taborder.hrc b/binfilter/bf_svx/source/inc/taborder.hrc
new file mode 100644
index 000000000000..c654abf5daac
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/taborder.hrc
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define FT_CONTROLS 1
+
+#define LB_CONTROLS 1
+
+#define PB_MOVE_UP 1
+#define PB_MOVE_DOWN 2
+#define PB_AUTO_ORDER 3
+
+#define PB_OK 4
+#define PB_CANCEL 5
+#define PB_HELP 6
+
+#define CTRL_TREE 1
+
diff --git a/binfilter/bf_svx/source/inc/taborder.hxx b/binfilter/bf_svx/source/inc/taborder.hxx
new file mode 100644
index 000000000000..66571fb0e4cd
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/taborder.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_TABORDER_HXX
+#define _SVX_TABORDER_HXX
+
+#include <bf_svtools/svtreebx.hxx>
+
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#include <com/sun/star/awt/XControlContainer.hpp>
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/button.hxx>
+
+
+#include <vcl/fixed.hxx>
+
+
+#include "fmexch.hxx"
+
+class SdrModel;
+class ImageList;
+
+#include <comphelper/uno3.hxx>
+FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+namespace binfilter {
+//STRIP008 FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
+
+//========================================================================
+class FmOrderTreeListBox : public SvTreeListBox
+{
+protected:
+ ::binfilter::svxform::OControlExchangeHelper m_aFieldExchange;//STRIP008 ::svxform::OControlExchangeHelper m_aFieldExchange;
+
+public:
+ FmOrderTreeListBox( Window* pParent );
+ FmOrderTreeListBox( Window* pParent, const ResId& rResId );
+ virtual ~FmOrderTreeListBox();
+
+
+protected:
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+};
+
+
+//========================================================================
+class FmFormShell;
+class FmTabOrderDlg : public ModalDialog
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > xTempModel, // Model zum Bearbeiten der TabReihenfolge
+ xModel; // Model mit der zu veraendernden TabReihenfolge
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > xControlContainer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ SdrModel* pDrawModel;
+
+ FixedText aFT_Controls;
+ FmOrderTreeListBox aLB_Controls;
+
+ OKButton aPB_OK;
+ CancelButton aPB_CANCEL;
+ HelpButton aPB_HELP;
+
+ PushButton aPB_MoveUp;
+ PushButton aPB_MoveDown;
+ PushButton aPB_AutoOrder;
+
+ ImageList* pImageList;
+
+ DECL_LINK( MoveUpClickHdl, Button* );
+ DECL_LINK( MoveDownClickHdl, Button* );
+ DECL_LINK( AutoOrderClickHdl, Button* );
+ DECL_LINK( OKClickHdl, Button* );
+
+
+public:
+ FmTabOrderDlg( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
+ Window* pParent, FmFormShell* pShell );
+ virtual ~FmTabOrderDlg();
+
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/tabwin.hxx b/binfilter/bf_svx/source/inc/tabwin.hxx
new file mode 100644
index 000000000000..640ed4972879
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/tabwin.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_TABWIN_HXX
+#define _SVX_TABWIN_HXX
+
+#include <bf_sfx2/childwin.hxx>
+
+namespace binfilter {
+
+class FmFieldWin;
+
+class FmFormShell;
+
+class FmFieldWinMgr : public SfxChildWindow
+{
+public:
+ FmFieldWinMgr(Window *pParent, sal_uInt16 nId,
+ SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+ SFX_DECL_CHILDWINDOW(FmFieldWinMgr);
+};
+
+
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/tbxform.hxx b/binfilter/bf_svx/source/inc/tbxform.hxx
new file mode 100644
index 000000000000..f29922a52ff0
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/tbxform.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_TBXFORM_HXX
+#define _SVX_TBXFORM_HXX
+
+#include <bf_sfx2/tbxctrl.hxx>
+
+
+
+
+class FixedText;
+namespace binfilter {
+
+//========================================================================
+
+
+//========================================================================
+
+
+//========================================================================
+
+
+//========================================================================
+class SvxFmTbxCtlConfig : public SfxToolBoxControl
+{
+private:
+ UINT16 nLastSlot;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlConfig( USHORT nId, ToolBox& rTbx, SfxBindings& );
+ ~SvxFmTbxCtlConfig() {}
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+//========================================================================
+class SvxFmTbxCtlAbsRec : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlAbsRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+
+
+};
+
+//========================================================================
+class SvxFmTbxCtlRecText : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlRecText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+};
+
+//========================================================================
+class SvxFmTbxCtlRecFromText : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlRecFromText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+};
+
+//========================================================================
+class SvxFmTbxCtlRecTotal : public SfxToolBoxControl
+{
+ FixedText* pFixedText;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlRecTotal( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+};
+
+/*
+//========================================================================
+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 );
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/trace.hxx b/binfilter/bf_svx/source/inc/trace.hxx
new file mode 100644
index 000000000000..dc33b8623ef6
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/trace.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _TRACE_HXX_
+#define _TRACE_HXX_
+
+#if defined(DBG_UTIL) && defined(ENABLE_RANGE_TRACING)
+
+namespace binfilter {
+
+
+class Tracer
+{
+ ByteString m_sBlockDescription;
+
+ DECLARE_STL_STDKEY_MAP( ::oslThreadIdentifier, sal_Int32, MapThreadId2Int );
+ static MapThreadId2Int s_aThreadIndents;
+
+ static ::osl::Mutex 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); }
+
+}//end of namespace binfilter
+#else
+
+#define TRACE_RANGE(range_description) ;
+#define TRACE_RANGE_MESSAGE(message) ;
+#define TRACE_RANGE_MESSAGE1(message, param) ;
+
+#endif
+
+#endif // _TRACE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/unoedprx.hxx b/binfilter/bf_svx/source/inc/unoedprx.hxx
new file mode 100644
index 000000000000..dea4e651fbeb
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/unoedprx.hxx
@@ -0,0 +1,155 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNOEDPRX_HXX
+#define _SVX_UNOEDPRX_HXX
+
+#include <memory>
+
+#include <bf_svtools/brdcst.hxx>
+
+#include "unoedsrc.hxx"
+
+namespace binfilter {
+
+
+class SvxAccessibleTextAdapter : public SvxTextForwarder
+{
+public:
+ SvxAccessibleTextAdapter();
+ virtual ~SvxAccessibleTextAdapter();
+
+ virtual USHORT GetParagraphCount() const;
+ virtual USHORT GetTextLen( USHORT nParagraph ) const;
+ virtual String GetText( const ESelection& rSel ) const;
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const;
+ virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
+ virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const;
+
+ virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
+ virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const;
+
+ virtual void QuickInsertText( const String& rText, const ESelection& rSel );
+ virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
+ virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
+ virtual void QuickInsertLineBreak( const ESelection& rSel );
+
+ virtual SfxItemPool* GetPool() const;
+
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual BOOL IsValid() const;
+
+ virtual LanguageType GetLanguage( USHORT, USHORT ) const;
+ virtual USHORT GetFieldCount( USHORT nPara ) const;
+ virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
+ virtual EBulletInfo GetBulletInfo( USHORT nPara ) const;
+ virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const;
+ virtual Rectangle GetParaBounds( USHORT nPara ) const;
+ virtual MapMode GetMapMode() const;
+ virtual OutputDevice* GetRefDevice() const;
+ virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const;
+ virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const;
+ virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
+ virtual USHORT GetLineCount( USHORT nPara ) const;
+ virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
+ virtual sal_Bool Delete( const ESelection& );
+ virtual sal_Bool InsertText( const String&, const ESelection& );
+ virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
+ virtual USHORT GetDepth( USHORT nPara ) const;
+ virtual sal_Bool SetDepth( USHORT nPara, USHORT nNewDepth );
+
+ void SetForwarder( SvxTextForwarder& );
+ sal_Bool HaveTextBullet( USHORT nPara ) const;
+
+private:
+ SvxTextForwarder* mrTextForwarder;
+};
+
+class SvxAccessibleTextEditViewAdapter : public SvxEditViewForwarder
+{
+public:
+
+ SvxAccessibleTextEditViewAdapter();
+ virtual ~SvxAccessibleTextEditViewAdapter();
+
+ virtual BOOL IsValid() const;
+
+ virtual Rectangle GetVisArea() const;
+ virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
+ virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
+
+ virtual sal_Bool GetSelection( ESelection& rSelection ) const;
+ virtual sal_Bool SetSelection( const ESelection& rSelection );
+ virtual sal_Bool Copy();
+ virtual sal_Bool Cut();
+ virtual sal_Bool Paste();
+
+ void SetForwarder( SvxEditViewForwarder&, SvxAccessibleTextAdapter& );
+
+private:
+ SvxEditViewForwarder* mrViewForwarder;
+ SvxAccessibleTextAdapter* mrTextForwarder;
+};
+
+class SvxEditSourceAdapter : public SvxEditSource
+{
+public:
+ SvxEditSourceAdapter();
+ ~SvxEditSourceAdapter();
+
+ virtual SvxEditSource* Clone() const;
+ virtual SvxTextForwarder* GetTextForwarder();
+ SvxAccessibleTextAdapter* GetTextForwarderAdapter(); // covariant return types don't work on MSVC
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False );
+ SvxAccessibleTextEditViewAdapter* GetEditViewForwarderAdapter( sal_Bool bCreate = sal_False ); // covariant return types don't work on MSVC
+ virtual void UpdateData();
+ virtual SfxBroadcaster& GetBroadcaster() const;
+
+ void SetEditSource( ::std::auto_ptr< SvxEditSource > pAdaptee );
+
+private:
+ // declared, but not defined
+ SvxEditSourceAdapter( const SvxEditSourceAdapter& );
+ SvxEditSourceAdapter& operator= ( const SvxEditSourceAdapter& );
+
+ ::std::auto_ptr< SvxEditSource > mpAdaptee;
+
+ SvxAccessibleTextAdapter maTextAdapter;
+ SvxAccessibleTextEditViewAdapter maEditViewAdapter;
+
+ mutable SfxBroadcaster maDummyBroadcaster;
+
+ sal_Bool mbEditSourceValid;
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/unopolyhelper.hxx b/binfilter/bf_svx/source/inc/unopolyhelper.hxx
new file mode 100644
index 000000000000..489d7cb0d682
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/unopolyhelper.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNOPOLYHELPER_HXX
+#define _SVX_UNOPOLYHELPER_HXX
+
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+namespace binfilter {
+
+namespace com { namespace sun { namespace star { namespace drawing {
+ struct PolyPolygonBezierCoords;
+} } } }
+
+class XPolygon;
+
+/** convert a drawing::PolyPolygonBezierCoords to a XPolygon
+*/
+void SvxConvertPolyPolygonBezierToXPolygon( const ::com::sun::star::drawing::PolyPolygonBezierCoords* pSourcePolyPolygon, XPolygon& rNewPolygon )
+ throw( ::com::sun::star::lang::IllegalArgumentException );
+
+/** convert a XPolygon to a drawing::PolyPolygonBezierCoords
+*/
+void SvxConvertXPolygonToPolyPolygonBezier( const XPolygon& rPolygon, ::com::sun::star::drawing::PolyPolygonBezierCoords& rRetval )
+ throw();
+
+}//end of namespace binfilter
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/xmlxtexp.hxx b/binfilter/bf_svx/source/inc/xmlxtexp.hxx
new file mode 100644
index 000000000000..035e3a62b5cb
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/xmlxtexp.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_XMLXTEXP_HXX
+#define _SVX_XMLXTEXP_HXX
+
+#include "bf_xmloff/xmlexp.hxx"
+
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star {
+ namespace frame { class XModel; }
+ namespace uno { template<class X> class Reference; }
+ namespace uno { class XInterface; }
+ namespace container { class XNameContainer; }
+ namespace document { class XGraphicObjectResolver; }
+ namespace xml { namespace sax { class XDocumentHandler; } }
+} } }
+namespace binfilter {
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/inc/xmlxtimp.hxx b/binfilter/bf_svx/source/inc/xmlxtimp.hxx
new file mode 100644
index 000000000000..4810ee4ba308
--- /dev/null
+++ b/binfilter/bf_svx/source/inc/xmlxtimp.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_XMLXTIMP_HXX
+#define _SVX_XMLXTIMP_HXX
+
+#include <bf_xmloff/xmlimp.hxx>
+
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class X> class Reference; }
+ namespace uno { class XInterface; }
+ namespace document { class XGraphicObjectResolver; }
+ namespace container { class XNameContainer; }
+
+} } }
+namespace binfilter {
+
+class SvxXMLXTableImport : public SvXMLImport
+{
+public:
+ // #110680#
+ SvxXMLXTableImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & rTable,
+ ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver >& xGrfResolver);
+ virtual ~SvxXMLXTableImport() throw ();
+
+ static sal_Bool load( const ::rtl::OUString& rUrl, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xTable ) throw();
+protected:
+ virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & mrTable;
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/makefile.mk b/binfilter/bf_svx/source/items/makefile.mk
new file mode 100644
index 000000000000..7fd6452ecb55
--- /dev/null
+++ b/binfilter/bf_svx/source/items/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(BFPRJ)$/util$/svx_svxpch
+
+PRJNAME=binfilter
+TARGET=svx_items
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+SRS1NAME=svx_svxitems
+SRC1FILES = \
+ svx_svxerr.src \
+ svx_svxitems.src
+
+SLOFILES= \
+ $(SLO)$/svx_writingmodeitem.obj \
+ $(SLO)$/svx_frmitems.obj \
+ $(SLO)$/svx_paraitem.obj \
+ $(SLO)$/svx_textitem.obj \
+ $(SLO)$/svx_postattr.obj \
+ $(SLO)$/svx_flditem.obj \
+ $(SLO)$/svx_hlnkitem.obj \
+ $(SLO)$/svx_svxfont.obj \
+ $(SLO)$/svx_pageitem.obj \
+ $(SLO)$/svx_paperinf.obj \
+ $(SLO)$/svx_drawitem.obj \
+ $(SLO)$/svx_algitem.obj \
+ $(SLO)$/svx_rotmodit.obj \
+ $(SLO)$/svx_svxerr.obj \
+ $(SLO)$/svx_zoomitem.obj \
+ $(SLO)$/svx_chrtitem.obj \
+ $(SLO)$/svx_bulitem.obj \
+ $(SLO)$/svx_e3ditem.obj \
+ $(SLO)$/svx_numitem.obj \
+ $(SLO)$/svx_grfitem.obj \
+ $(SLO)$/svx_clipfmtitem.obj \
+ $(SLO)$/svx_xmlcnitm.obj
+
+EXCEPTIONSFILES= \
+ $(SLO)$/svx_paraitem.obj \
+ $(SLO)$/svx_frmitems.obj \
+ $(SLO)$/svx_numitem.obj\
+ $(SLO)$/svx_xmlcnitm.obj
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/items/svx_algitem.cxx b/binfilter/bf_svx/source/items/svx_algitem.cxx
new file mode 100644
index 000000000000..7adbd71dd515
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_algitem.cxx
@@ -0,0 +1,518 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#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>
+
+#include <com/sun/star/table/CellVertJustify.hpp>
+#include <com/sun/star/table/CellHoriJustify.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/table/CellOrientation.hpp>
+
+#include "algitem.hxx"
+namespace binfilter {
+
+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 -----------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxHorJustifyItem, SfxEnumItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxVerJustifyItem, SfxEnumItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxOrientationItem, SfxEnumItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxMarginItem, SfxPoolItem );
+
+// class SvxHorJustifyItem -----------------------------------------------
+
+/*N*/ SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxEnumItem( nId, eJustify )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ //------------------------------------------------------------------------
+
+/*N*/ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_HORJUST_HORJUST:
+/*N*/ {
+/*N*/ table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD;
+/*N*/ switch ( (SvxCellHorJustify)GetValue() )
+/*N*/ {
+/*N*/ case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break;
+/*N*/ case SVX_HOR_JUSTIFY_LEFT: eUno = table::CellHoriJustify_LEFT; break;
+/*N*/ case SVX_HOR_JUSTIFY_CENTER: eUno = table::CellHoriJustify_CENTER; break;
+/*N*/ case SVX_HOR_JUSTIFY_RIGHT: eUno = table::CellHoriJustify_RIGHT; break;
+/*N*/ case SVX_HOR_JUSTIFY_BLOCK: eUno = table::CellHoriJustify_BLOCK; break;
+/*?*/ case SVX_HOR_JUSTIFY_REPEAT: eUno = table::CellHoriJustify_REPEAT; break;
+/*N*/ }
+/*N*/ rVal <<= eUno;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_HORJUST_ADJUST:
+/*N*/ {
+/*N*/ // ParagraphAdjust values, as in SvxAdjustItem
+/*N*/ // (same value for ParaAdjust and ParaLastLineAdjust)
+/*N*/
+/*?*/ sal_Int16 nAdjust = style::ParagraphAdjust_LEFT;
+/*?*/ switch ( (SvxCellHorJustify)GetValue() )
+/*?*/ {
+/*?*/ // ParagraphAdjust_LEFT is used for STANDARD and REPEAT
+/*?*/ case SVX_HOR_JUSTIFY_STANDARD:
+/*?*/ case SVX_HOR_JUSTIFY_REPEAT:
+/*?*/ case SVX_HOR_JUSTIFY_LEFT: nAdjust = style::ParagraphAdjust_LEFT; break;
+/*?*/ case SVX_HOR_JUSTIFY_CENTER: nAdjust = style::ParagraphAdjust_CENTER; break;
+/*?*/ case SVX_HOR_JUSTIFY_RIGHT: nAdjust = style::ParagraphAdjust_RIGHT; break;
+/*?*/ case SVX_HOR_JUSTIFY_BLOCK: nAdjust = style::ParagraphAdjust_BLOCK; break;
+/*?*/ }
+/*?*/ rVal <<= nAdjust; // as sal_Int16
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+/*N*/ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_HORJUST_HORJUST:
+/*N*/ {
+/*N*/ table::CellHoriJustify eUno;
+/*N*/ if(!(rVal >>= eUno))
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ eUno = (table::CellHoriJustify)nValue;
+/*N*/ }
+/*N*/ SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+/*N*/ switch (eUno)
+/*N*/ {
+/*N*/ case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break;
+/*N*/ case table::CellHoriJustify_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break;
+/*N*/ case table::CellHoriJustify_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break;
+/*N*/ case table::CellHoriJustify_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break;
+/*N*/ case table::CellHoriJustify_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break;
+/*?*/ case table::CellHoriJustify_REPEAT: eSvx = SVX_HOR_JUSTIFY_REPEAT; break;
+/*N*/ }
+/*N*/ SetValue( eSvx );
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_HORJUST_ADJUST:
+/*N*/ {
+/*N*/ // property contains ParagraphAdjust values as sal_Int16
+/*N*/ sal_Int16 nVal;
+/*?*/ if(!(rVal >>= nVal))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+/*?*/ switch (nVal)
+/*?*/ {
+/*?*/ // STRETCH is treated as BLOCK
+/*?*/ case style::ParagraphAdjust_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break;
+/*?*/ case style::ParagraphAdjust_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break;
+/*?*/ case style::ParagraphAdjust_STRETCH:
+/*?*/ case style::ParagraphAdjust_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break;
+/*?*/ case style::ParagraphAdjust_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break;
+/*?*/ }
+/*?*/ SetValue( eSvx );
+/*N*/ }
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxHorJustifyItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const
+/*N*/ {
+/*N*/ USHORT nVal;
+/*N*/ rStream >> nVal;
+/*N*/ return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() );
+/*N*/ }
+//------------------------------------------------------------------------
+
+/*?*/ USHORT SvxHorJustifyItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_HOR_JUSTIFY_REPEAT + 1; // letzter Enum-Wert + 1
+/*?*/ }
+
+// class SvxVerJustifyItem -----------------------------------------------
+
+/*N*/ SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxEnumItem( nId, eJustify )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
+/*N*/ switch ( (SvxCellVerJustify)GetValue() )
+/*N*/ {
+/*N*/ case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
+/*N*/ case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break;
+/*N*/ case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break;
+/*N*/ case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
+/*N*/ }
+/*N*/ rVal <<= eUno;
+/*N*/ return sal_True;
+/*N*/ }
+
+/*N*/ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ table::CellVertJustify eUno;
+/*N*/ if(!(rVal >>= eUno))
+/*N*/ {
+/*?*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ eUno = (table::CellVertJustify)nValue;
+/*N*/ }
+/*N*/
+/*N*/ SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+/*N*/ switch (eUno)
+/*N*/ {
+/*N*/ case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break;
+/*N*/ case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
+/*N*/ case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break;
+/*N*/ case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
+/*N*/ }
+/*N*/ SetValue( eSvx );
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxVerJustifyItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const
+/*N*/ {
+/*N*/ USHORT nVal;
+/*N*/ rStream >> nVal;
+/*N*/ return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*?*/ USHORT SvxVerJustifyItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_VER_JUSTIFY_BOTTOM + 1; // letzter Enum-Wert + 1
+/*?*/ }
+
+// class SvxOrientationItem ----------------------------------------------
+
+/*N*/ SvxOrientationItem::SvxOrientationItem( const SvxCellOrientation eOrientation,
+/*N*/ const USHORT nId):
+/*N*/ SfxEnumItem( nId, eOrientation )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ bool SvxOrientationItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ table::CellOrientation eUno = table::CellOrientation_STANDARD;
+/*N*/ switch ( (SvxCellOrientation)GetValue() )
+/*N*/ {
+/*N*/ case SVX_ORIENTATION_STANDARD: eUno = table::CellOrientation_STANDARD; break;
+/*N*/ case SVX_ORIENTATION_TOPBOTTOM: eUno = table::CellOrientation_TOPBOTTOM; break;
+/*N*/ case SVX_ORIENTATION_BOTTOMTOP: eUno = table::CellOrientation_BOTTOMTOP; break;
+/*N*/ case SVX_ORIENTATION_STACKED: eUno = table::CellOrientation_STACKED; break;
+/*N*/ }
+/*N*/ rVal <<= eUno;
+/*N*/ return sal_True;
+/*N*/ }
+
+/*N*/ bool SvxOrientationItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ table::CellOrientation eOrient;
+/*N*/ if(!(rVal >>= eOrient))
+/*N*/ {
+/*?*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ eOrient = (table::CellOrientation)nValue;
+/*N*/ }
+/*N*/ SvxCellOrientation eSvx = SVX_ORIENTATION_STANDARD;
+/*N*/ switch (eOrient)
+/*N*/ {
+/*N*/ 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;
+/*N*/ case table::CellOrientation_STACKED: eSvx = SVX_ORIENTATION_STACKED; break;
+/*N*/ }
+/*N*/ SetValue( eSvx );
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxOrientationItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxOrientationItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxOrientationItem::Create( SvStream& rStream, USHORT ) const
+/*N*/ {
+/*N*/ USHORT nVal;
+/*N*/ rStream >> nVal;
+/*N*/ return new SvxOrientationItem( (SvxCellOrientation)nVal, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*?*/ USHORT SvxOrientationItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_ORIENTATION_STACKED + 1; // letzter Enum-Wert + 1
+/*?*/ }
+
+// class SvxMarginItem ---------------------------------------------------
+
+/*N*/ SvxMarginItem::SvxMarginItem( const USHORT nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ nLeftMargin ( 20 ),
+/*N*/ nTopMargin ( 20 ),
+/*N*/ nRightMargin ( 20 ),
+/*N*/ nBottomMargin( 20 )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxMarginItem::SvxMarginItem( sal_Int16 nLeft,
+/*N*/ sal_Int16 nTop,
+/*N*/ sal_Int16 nRight,
+/*N*/ sal_Int16 nBottom,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ nLeftMargin ( nLeft ),
+/*N*/ nTopMargin ( nTop ),
+/*N*/ nRightMargin ( nRight ),
+/*N*/ nBottomMargin( nBottom )
+/*N*/ {
+/*N*/ }
+
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxMarginItem::SvxMarginItem( const SvxMarginItem& rItem ) :
+/*N*/
+/*N*/ SfxPoolItem( rItem.Which() )
+/*N*/ {
+/*N*/ nLeftMargin = rItem.nLeftMargin;
+/*N*/ nTopMargin = rItem.nTopMargin;
+/*N*/ nRightMargin = rItem.nRightMargin;
+/*N*/ nBottomMargin = rItem.nBottomMargin;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ int SvxMarginItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*N*/
+/*N*/ return ( ( nLeftMargin == ( (SvxMarginItem&)rItem ).nLeftMargin ) &&
+/*N*/ ( nTopMargin == ( (SvxMarginItem&)rItem ).nTopMargin ) &&
+/*N*/ ( nRightMargin == ( (SvxMarginItem&)rItem ).nRightMargin ) &&
+/*N*/ ( nBottomMargin == ( (SvxMarginItem&)rItem ).nBottomMargin ) );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxMarginItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxMarginItem(*this);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxMarginItem::Create( SvStream& rStream, USHORT ) const
+/*N*/ {
+/*N*/ sal_Int16 nLeft;
+/*N*/ sal_Int16 nTop;
+/*N*/ sal_Int16 nRight;
+/*N*/ sal_Int16 nBottom;
+/*N*/ rStream >> nLeft;
+/*N*/ rStream >> nTop;
+/*N*/ rStream >> nRight;
+/*N*/ rStream >> nBottom;
+/*N*/ return new SvxMarginItem( nLeft, nTop, nRight, nBottom, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvStream& SvxMarginItem::Store( SvStream &rStream, USHORT nItemVersion) const
+/*N*/ {
+/*N*/ rStream << nLeftMargin;
+/*N*/ rStream << nTopMargin;
+/*N*/ rStream << nRightMargin;
+/*N*/ rStream << nBottomMargin;
+/*N*/ return rStream;
+/*N*/ }
+
+
+//------------------------------------------------------------------------
+
+/*N*/ bool SvxMarginItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ // jetzt alles signed
+/*N*/ case MID_MARGIN_L_MARGIN:
+/*N*/ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nLeftMargin) : nLeftMargin );
+/*N*/ break;
+/*N*/ case MID_MARGIN_R_MARGIN:
+/*N*/ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nRightMargin) : nRightMargin );
+/*N*/ break;
+/*N*/ case MID_MARGIN_UP_MARGIN:
+/*N*/ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nTopMargin) : nTopMargin );
+/*N*/ break;
+/*N*/ case MID_MARGIN_LO_MARGIN:
+/*N*/ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nBottomMargin) : nBottomMargin );
+/*N*/ break;
+/*N*/ default:
+/*N*/ DBG_ERROR("unknown MemberId");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ bool SvxMarginItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = ( ( nMemberId & CONVERT_TWIPS ) != 0 );
+/*N*/ long nMaxVal = bConvert ? TWIP_TO_MM100(SHRT_MAX) : SHRT_MAX; // Members sind sal_Int16
+/*N*/ sal_Int32 nVal;
+/*N*/ if(!(rVal >>= nVal) || (nVal > nMaxVal))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ switch ( nMemberId & ~CONVERT_TWIPS )
+/*N*/ {
+/*N*/ case MID_MARGIN_L_MARGIN:
+/*N*/ nLeftMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+/*N*/ break;
+/*N*/ case MID_MARGIN_R_MARGIN:
+/*N*/ nRightMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+/*N*/ break;
+/*N*/ case MID_MARGIN_UP_MARGIN:
+/*N*/ nTopMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+/*N*/ break;
+/*N*/ case MID_MARGIN_LO_MARGIN:
+/*N*/ nBottomMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+/*N*/ break;
+/*N*/ default:
+/*N*/ DBG_ERROR("unknown MemberId");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_bulitem.cxx b/binfilter/bf_svx/source/items/svx_bulitem.cxx
new file mode 100644
index 000000000000..f830d7ae509e
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_bulitem.cxx
@@ -0,0 +1,384 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <vcl/outdev.hxx>
+
+#define _SVX_BULITEM_CXX
+
+#include "bulitem.hxx"
+
+// #90477#
+#include <tools/tenccvt.hxx>
+namespace binfilter {
+
+#define BULITEM_VERSION ((USHORT)2)
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1(SvxBulletItem,SfxPoolItem);
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont )
+/*N*/ {
+/*N*/ USHORT nTemp;
+/*N*/
+/*N*/ rStream << rFont.GetColor();
+/*N*/ nTemp = (USHORT)rFont.GetFamily(); rStream << nTemp;
+/*N*/
+/*N*/ // #90477# nTemp = (USHORT)GetStoreCharSet( rFont.GetCharSet(), rStream.GetVersion() );
+/*N*/ nTemp = (USHORT)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion());
+/*N*/ rStream << nTemp;
+/*N*/
+/*N*/ nTemp = (USHORT)rFont.GetPitch(); rStream << nTemp;
+/*N*/ nTemp = (USHORT)rFont.GetAlign(); rStream << nTemp;
+/*N*/ nTemp = (USHORT)rFont.GetWeight(); rStream << nTemp;
+/*N*/ nTemp = (USHORT)rFont.GetUnderline(); rStream << nTemp;
+/*N*/ nTemp = (USHORT)rFont.GetStrikeout(); rStream << nTemp;
+/*N*/ nTemp = (USHORT)rFont.GetItalic(); rStream << nTemp;
+/*N*/
+/*N*/ // UNICODE: rStream << rFont.GetName();
+/*N*/ rStream.WriteByteString(rFont.GetName());
+/*N*/
+/*N*/ rStream << rFont.IsOutline();
+/*N*/ rStream << rFont.IsShadow();
+/*N*/ rStream << rFont.IsTransparent();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer )
+/*N*/ {
+/*N*/ Font aFont;
+/*N*/ Color aColor;
+/*N*/ rStream >> aColor; aFont.SetColor( aColor );
+/*N*/ USHORT nTemp;
+/*N*/ rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp);
+/*N*/
+/*N*/ // #90477#
+/*N*/ rStream >> nTemp;
+/*N*/ nTemp = (sal_uInt16)GetSOLoadTextEncoding((rtl_TextEncoding)nTemp, (sal_uInt16)rStream.GetVersion());
+/*N*/ aFont.SetCharSet((rtl_TextEncoding)nTemp);
+/*N*/
+/*N*/ rStream >> nTemp; aFont.SetPitch((FontPitch)nTemp);
+/*N*/ rStream >> nTemp; aFont.SetAlign((FontAlign)nTemp);
+/*N*/ rStream >> nTemp; aFont.SetWeight((FontWeight)nTemp);
+/*N*/ rStream >> nTemp; aFont.SetUnderline((FontUnderline)nTemp);
+/*N*/ rStream >> nTemp; aFont.SetStrikeout((FontStrikeout)nTemp);
+/*N*/ rStream >> nTemp; aFont.SetItalic((FontItalic)nTemp);
+/*N*/
+/*N*/ // UNICODE: rStream >> aName; aFont.SetName( aName );
+/*N*/ String aName;
+/*N*/ rStream.ReadByteString(aName);
+/*N*/ aFont.SetName( aName );
+/*N*/
+/*N*/ if( nVer == 1 )
+/*N*/ {
+/*N*/ long nHeight, nWidth;
+/*?*/ rStream >> nHeight; rStream >> nWidth; Size aSize( nWidth, nHeight );
+/*?*/ aFont.SetSize( aSize );
+/*N*/ }
+/*N*/
+/*N*/ BOOL bTemp;
+/*N*/ rStream >> bTemp; aFont.SetOutline( bTemp );
+/*N*/ rStream >> bTemp; aFont.SetShadow( bTemp );
+/*N*/ rStream >> bTemp; aFont.SetTransparent( bTemp );
+/*N*/ return aFont;
+/*N*/ }
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBulletItem::SvxBulletItem( USHORT nWhich ) : SfxPoolItem( nWhich )
+/*N*/ {
+/*N*/ SetDefaultFont_Impl();
+/*N*/ SetDefaults_Impl();
+/*N*/ nValidMask = 0xFFFF;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT nWhich ) :
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/ pGraphicObject( NULL )
+/*N*/ {
+/*N*/ rStrm >> nStyle;
+/*N*/
+/*N*/ if( nStyle != BS_BMP )
+/*N*/ aFont = CreateFont( rStrm, BULITEM_VERSION );
+/*N*/ else
+/*N*/ {
+/*N*/ // 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.IsEmpty() )
+/*?*/ {
+/*?*/ rStrm.Seek( nOldPos );
+/*?*/ nStyle = BS_NONE;
+/*?*/ }
+/*?*/ else
+/*?*/ pGraphicObject = new BfGraphicObject( aBmp );
+/*N*/ }
+/*N*/
+/*N*/ rStrm >> nWidth;
+/*N*/ rStrm >> nStart;
+/*N*/ rStrm >> nJustify;
+/*N*/
+/*N*/ char cTmpSymbol;
+/*N*/ rStrm >> cTmpSymbol;
+/*N*/ cSymbol = ByteString::ConvertToUnicode( cTmpSymbol, aFont.GetCharSet() );
+/*N*/
+/*N*/ rStrm >> nScale;
+/*N*/
+/*N*/ // UNICODE: rStrm >> aPrevText;
+/*N*/ rStrm.ReadByteString(aPrevText);
+/*N*/
+/*N*/ // UNICODE: rStrm >> aFollowText;
+/*N*/ rStrm.ReadByteString(aFollowText);
+/*N*/
+/*N*/ nValidMask = 0xFFFF;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBulletItem::SvxBulletItem( const SvxBulletItem& rItem) : SfxPoolItem( rItem )
+/*N*/ {
+/*N*/ aFont = rItem.aFont;
+/*N*/ pGraphicObject = ( rItem.pGraphicObject ? new BfGraphicObject( *rItem.pGraphicObject ) : NULL );
+/*N*/ aPrevText = rItem.aPrevText;
+/*N*/ aFollowText = rItem.aFollowText;
+/*N*/ nStart = rItem.nStart;
+/*N*/ nStyle = rItem.nStyle;
+/*N*/ nWidth = rItem.nWidth;
+/*N*/ nScale = rItem.nScale;
+/*N*/ cSymbol = rItem.cSymbol;
+/*N*/ nJustify = rItem.nJustify;
+/*N*/ nValidMask = rItem.nValidMask;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBulletItem::~SvxBulletItem()
+/*N*/ {
+/*N*/ if( pGraphicObject )
+/*?*/ delete pGraphicObject;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBulletItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxBulletItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, USHORT nVersion ) const
+/*N*/ {
+/*N*/ return new SvxBulletItem( rStrm, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBulletItem::SetDefaultFont_Impl()
+/*N*/ {
+/*N*/ aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 );
+/*N*/ aFont.SetAlign( ALIGN_BOTTOM);
+/*N*/ aFont.SetTransparent( TRUE );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBulletItem::SetDefaults_Impl()
+/*N*/ {
+/*N*/ pGraphicObject = NULL;
+/*N*/ nWidth = 1200; // 1.2cm
+/*N*/ nStart = 1;
+/*N*/ nStyle = BS_123;
+/*N*/ nJustify = BJ_HLEFT | BJ_VCENTER;
+/*N*/ cSymbol = sal_Unicode(' ');
+/*N*/ nScale = 75;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ USHORT SvxBulletItem::GetVersion( USHORT nVersion ) const
+/*N*/ {
+/*N*/ return BULITEM_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT(rItem.ISA(SvxBulletItem),"operator==Types not matching");
+/*N*/ const SvxBulletItem& rBullet = (const SvxBulletItem&)rItem;
+/*N*/ // ValidMask mitvergleichen, da sonst kein Putten in ein AttrSet moeglich,
+/*N*/ // wenn sich das Item nur in der ValidMask von einem existierenden unterscheidet.
+/*N*/ if( nValidMask != rBullet.nValidMask ||
+/*N*/ nStyle != rBullet.nStyle ||
+/*N*/ nScale != rBullet.nScale ||
+/*N*/ nJustify != rBullet.nJustify ||
+/*N*/ nWidth != rBullet.nWidth ||
+/*N*/ nStart != rBullet.nStart ||
+/*N*/ cSymbol != rBullet.cSymbol ||
+/*N*/ aPrevText != rBullet.aPrevText ||
+/*N*/ aFollowText != rBullet.aFollowText )
+/*N*/ return 0;
+/*N*/
+/*N*/ if( ( nStyle != BS_BMP ) && ( aFont != rBullet.aFont ) )
+/*N*/ return 0;
+/*N*/
+/*N*/ if( nStyle == BS_BMP )
+/*N*/ {
+/*?*/ if( ( pGraphicObject && !rBullet.pGraphicObject ) || ( !pGraphicObject && rBullet.pGraphicObject ) )
+/*?*/ return 0;
+/*?*/
+/*?*/ if( ( pGraphicObject && rBullet.pGraphicObject ) &&
+/*?*/ ( ( !(*pGraphicObject == *rBullet.pGraphicObject) ) ||
+/*?*/ ( pGraphicObject->GetPrefSize() != rBullet.pGraphicObject->GetPrefSize() ) ) )
+/*?*/ {
+/*?*/ return 0;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return 1;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ // Korrektur bei leerer Bitmap
+/*N*/ if( ( nStyle == BS_BMP ) &&
+/*N*/ ( !pGraphicObject || ( GRAPHIC_NONE == pGraphicObject->GetType() ) || ( GRAPHIC_DEFAULT == pGraphicObject->GetType() ) ) )
+/*N*/ {
+/*?*/ if( pGraphicObject )
+/*?*/ {
+/*?*/ delete( const_cast< SvxBulletItem* >( this )->pGraphicObject );
+/*?*/ const_cast< SvxBulletItem* >( this )->pGraphicObject = NULL;
+/*?*/ }
+/*?*/
+/*?*/ const_cast< SvxBulletItem* >( this )->nStyle = BS_NONE;
+/*N*/ }
+/*N*/
+/*N*/ rStrm << nStyle;
+/*N*/
+/*N*/ if( nStyle != BS_BMP )
+/*N*/ StoreFont( rStrm, aFont );
+/*N*/ else
+/*N*/ {
+/*?*/ ULONG nStart = rStrm.Tell();
+/*?*/
+/*?*/ // Kleine Vorab-Schaetzung der Groesse...
+/*?*/ USHORT nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1;
+/*?*/ const Bitmap aBmp( pGraphicObject->GetGraphic().GetBitmap() );
+/*?*/ ULONG nBytes = aBmp.GetSizeBytes();
+/*?*/ if ( nBytes < ULONG(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 );
+/*N*/ }
+/*N*/ rStrm << nWidth;
+/*N*/ rStrm << nStart;
+/*N*/ rStrm << nJustify;
+/*N*/ rStrm << (char)ByteString::ConvertFromUnicode( cSymbol, aFont.GetCharSet() );
+/*N*/ rStrm << nScale;
+/*N*/
+/*N*/ // UNICODE: rStrm << aPrevText;
+/*N*/ rStrm.WriteByteString(aPrevText);
+/*N*/
+/*N*/ // UNICODE: rStrm << aFollowText;
+/*N*/ rStrm.WriteByteString(aFollowText);
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_chrtitem.cxx b/binfilter/bf_svx/source/items/svx_chrtitem.cxx
new file mode 100644
index 000000000000..c2ff778f57ed
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_chrtitem.cxx
@@ -0,0 +1,376 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <tools/stream.hxx>
+#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 <bf_svtools/eitem.hxx>
+
+#include "chrtitem.hxx"
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxChartStyleItem, SfxEnumItem);
+/*N*/ TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem);
+/*N*/ TYPEINIT1(SvxChartLegendPosItem, SfxEnumItem);
+/*N*/ TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem);
+/*N*/ TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem);
+/*N*/ TYPEINIT1(SvxDoubleItem, SfxPoolItem);
+
+/*************************************************************************
+|*
+|* SvxChartStyleItem
+|*
+*************************************************************************/
+
+/*N*/ SvxChartStyleItem::SvxChartStyleItem(SvxChartStyle eStyle, USHORT nId) :
+/*N*/ SfxEnumItem(nId, eStyle)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartStyleItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new SvxChartStyleItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+/*************************************************************************
+|*
+|* SvxChartDataDescrItem
+|*
+*************************************************************************/
+
+/*N*/ SvxChartDataDescrItem::SvxChartDataDescrItem(SvxChartDataDescr eDataDescr,
+/*N*/ USHORT nId) :
+/*N*/ SfxEnumItem(nId, eDataDescr)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxChartDataDescrItem::SvxChartDataDescrItem(SvStream& rIn, USHORT nId) :
+/*N*/ SfxEnumItem(nId, rIn)
+/*N*/ {
+/*N*/ }
+
+/*N*/ // -----------------------------------------------------------------------
+/*N*/
+/*N*/ SfxPoolItem* SvxChartDataDescrItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new SvxChartDataDescrItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new SvxChartDataDescrItem(rIn, Which());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SvxChartLegendPosItem
+|*
+*************************************************************************/
+
+/*N*/ SvxChartLegendPosItem::SvxChartLegendPosItem(SvxChartLegendPos eLegendPos,
+/*N*/ USHORT nId) :
+/*N*/ SfxEnumItem(nId, eLegendPos)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxChartLegendPosItem::SvxChartLegendPosItem(SvStream& rIn, USHORT nId) :
+/*N*/ SfxEnumItem(nId, rIn)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartLegendPosItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new SvxChartLegendPosItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartLegendPosItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new SvxChartLegendPosItem(rIn, Which());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SvxChartTextOrderItem
+|*
+*************************************************************************/
+
+/*N*/ SvxChartTextOrderItem::SvxChartTextOrderItem(SvxChartTextOrder eOrder,
+/*N*/ USHORT nId) :
+/*N*/ SfxEnumItem(nId, eOrder)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxChartTextOrderItem::SvxChartTextOrderItem(SvStream& rIn, USHORT nId) :
+/*N*/ SfxEnumItem(nId, rIn)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartTextOrderItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new SvxChartTextOrderItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartTextOrderItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new SvxChartTextOrderItem(rIn, Which());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SvxChartTextOrientItem
+|*
+*************************************************************************/
+
+/*N*/ SvxChartTextOrientItem::SvxChartTextOrientItem(SvxChartTextOrient eOrient,
+/*N*/ USHORT nId) :
+/*N*/ SfxEnumItem(nId, eOrient)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxChartTextOrientItem::SvxChartTextOrientItem(SvStream& rIn, USHORT nId) :
+/*N*/ SfxEnumItem(nId, rIn)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartTextOrientItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new SvxChartTextOrientItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxChartTextOrientItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new SvxChartTextOrientItem(rIn, Which());
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SvxDoubleItem
+|*
+*************************************************************************/
+
+/*N*/ SvxDoubleItem::SvxDoubleItem(double fValue, USHORT nId) :
+/*N*/ SfxPoolItem(nId),
+/*N*/ fVal(fValue)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxDoubleItem::SvxDoubleItem(const SvxDoubleItem& rItem) :
+/*N*/ SfxPoolItem(rItem),
+/*N*/ fVal(rItem.fVal)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxDoubleItem::operator == (const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return (((SvxDoubleItem&)rItem).fVal == fVal);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxDoubleItem::Clone(SfxItemPool* Pool) const
+/*N*/ {
+/*N*/ return new SvxDoubleItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, USHORT nVersion) const
+/*N*/ {
+/*N*/ double fVal;
+/*N*/ rIn >> fVal;
+/*N*/ return new SvxDoubleItem(fVal, Which());
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxDoubleItem::Store(SvStream& rOut, USHORT nItemVersion) const
+/*N*/ {
+/*N*/ rOut << fVal;
+/*N*/ return rOut;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+
+
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxDoubleItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= fVal;
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxDoubleItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ return rVal >>= fVal;
+/*N*/ }
+
+
+
+/*************************************************************************
+|*
+|* SvxChartKindErrorItem
+|*
+*************************************************************************/
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*************************************************************************
+|*
+|* SvxChartIndicateItem
+|*
+*************************************************************************/
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*************************************************************************
+|*
+|* SvxChartRegressItem
+|*
+*************************************************************************/
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_clipfmtitem.cxx b/binfilter/bf_svx/source/items/svx_clipfmtitem.cxx
new file mode 100644
index 000000000000..d77890cfae3f
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_clipfmtitem.cxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_STRINGSDTOR
+
+#include <bf_svtools/svstdarr.hxx>
+#include <clipfmtitem.hxx>
+namespace binfilter {
+
+
+
+struct SvxClipboardFmtItem_Impl
+{
+ SvStringsDtor aFmtNms;
+ SvULongs aFmtIds;
+ static String sEmptyStr;
+
+ SvxClipboardFmtItem_Impl() : aFmtNms( 8, 8 ), aFmtIds( 8, 8 ) {}
+ SvxClipboardFmtItem_Impl( const SvxClipboardFmtItem_Impl& );
+};
+
+String SvxClipboardFmtItem_Impl::sEmptyStr;
+
+/*N*/ TYPEINIT1( SvxClipboardFmtItem, SfxPoolItem );
+
+/*N*/ SvxClipboardFmtItem_Impl::SvxClipboardFmtItem_Impl(
+/*N*/ const SvxClipboardFmtItem_Impl& rCpy )
+/*N*/ {
+/*N*/ aFmtIds.Insert( &rCpy.aFmtIds, 0 );
+/*N*/ for( USHORT n = 0, nEnd = rCpy.aFmtNms.Count(); n < nEnd; ++n )
+/*N*/ {
+/*N*/ String* pStr = rCpy.aFmtNms[ n ];
+/*N*/ if( pStr )
+/*N*/ pStr = new String( *pStr );
+/*N*/ aFmtNms.Insert( pStr, n );
+/*N*/ }
+/*N*/ }
+
+/*N*/ SvxClipboardFmtItem::SvxClipboardFmtItem( const SvxClipboardFmtItem& rCpy )
+/*N*/ : SfxPoolItem( rCpy.Which() ),
+/*N*/ pImpl( new SvxClipboardFmtItem_Impl( *rCpy.pImpl ) )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxClipboardFmtItem::~SvxClipboardFmtItem()
+/*N*/ {
+/*N*/ delete pImpl;
+/*N*/ }
+
+/*N*/ int SvxClipboardFmtItem::operator==( const SfxPoolItem& rComp ) const
+/*N*/ {
+/*N*/ int nRet = 0;
+/*N*/ const SvxClipboardFmtItem& rCmp = (SvxClipboardFmtItem&)rComp;
+/*N*/ if( rCmp.pImpl->aFmtNms.Count() == pImpl->aFmtNms.Count() )
+/*N*/ {
+/*N*/ nRet = 1;
+/*N*/ const String* pStr1, *pStr2;
+/*N*/ for( USHORT n = 0, nEnd = rCmp.pImpl->aFmtNms.Count(); n < nEnd; ++n )
+/*N*/ {
+/*N*/ if( pImpl->aFmtIds[ n ] != rCmp.pImpl->aFmtIds[ n ] ||
+/*N*/ ( (0 == ( pStr1 = pImpl->aFmtNms[ n ] )) ^
+/*N*/ (0 == ( pStr2 = rCmp.pImpl->aFmtNms[ n ] ) )) ||
+/*N*/ ( pStr1 && *pStr1 != *pStr2 ))
+/*N*/ {
+/*N*/ nRet = 0;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return nRet;
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxClipboardFmtItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxClipboardFmtItem( *this );
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_drawitem.cxx b/binfilter/bf_svx/source/items/svx_drawitem.cxx
new file mode 100644
index 000000000000..41141f0fc612
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_drawitem.cxx
@@ -0,0 +1,322 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#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 <bf_svtools/poolitem.hxx>
+
+#include "drawitem.hxx"
+namespace binfilter {
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxColorTableItem, SfxPoolItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxGradientListItem, SfxPoolItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxHatchListItem, SfxPoolItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxBitmapListItem, SfxPoolItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxDashListItem, SfxPoolItem );
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxLineEndListItem, SfxPoolItem );
+
+//==================================================================
+//
+// SvxColorTableItem
+//
+//==================================================================
+
+/*?*/ SvxColorTableItem::SvxColorTableItem()
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxColorTableItem::SvxColorTableItem( XColorTable* pTable, sal_uInt16 nW ) :
+/*N*/ SfxPoolItem( nW ),
+/*N*/ pColorTable( pTable )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxColorTableItem::SvxColorTableItem( const SvxColorTableItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pColorTable( rItem.pColorTable )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxColorTableItem::operator==( const SfxPoolItem& rItem ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxColorTableItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxColorTableItem( *this );
+/*N*/ }
+
+//==================================================================
+//
+// SvxGradientListItem
+//
+//==================================================================
+
+/*?*/ SvxGradientListItem::SvxGradientListItem()
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxGradientListItem::SvxGradientListItem( XGradientList* pList, sal_uInt16 nW ) :
+/*N*/ SfxPoolItem( nW ),
+/*N*/ pGradientList( pList )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxGradientListItem::SvxGradientListItem( const SvxGradientListItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pGradientList( rItem.pGradientList )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxGradientListItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxGradientListItem( *this );
+/*N*/ }
+
+//==================================================================
+//
+// SvxHatchListItem
+//
+//==================================================================
+
+/*?*/ SvxHatchListItem::SvxHatchListItem()
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxHatchListItem::SvxHatchListItem( XHatchList* pList, sal_uInt16 nW ) :
+/*N*/ SfxPoolItem( nW ),
+/*N*/ pHatchList( pList )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxHatchListItem::SvxHatchListItem( const SvxHatchListItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pHatchList( rItem.pHatchList )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxHatchListItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxHatchListItem( *this );
+/*N*/ }
+
+//==================================================================
+//
+// SvxBitmapListItem
+//
+//==================================================================
+
+/*?*/ SvxBitmapListItem::SvxBitmapListItem()
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBitmapListItem::SvxBitmapListItem( XBitmapList* pList, sal_uInt16 nW ) :
+/*N*/ SfxPoolItem( nW ),
+/*N*/ pBitmapList( pList )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBitmapListItem::SvxBitmapListItem( const SvxBitmapListItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pBitmapList( rItem.pBitmapList )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBitmapListItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxBitmapListItem( *this );
+/*N*/ }
+
+
+//==================================================================
+//
+// SvxDashListItem
+//
+//==================================================================
+
+/*?*/ SvxDashListItem::SvxDashListItem()
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxDashListItem::SvxDashListItem( XDashList* pList, sal_uInt16 nW ) :
+/*N*/ SfxPoolItem( nW ),
+/*N*/ pDashList( pList )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxDashListItem::SvxDashListItem( const SvxDashListItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pDashList( rItem.pDashList )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxDashListItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxDashListItem( *this );
+/*N*/ }
+
+//==================================================================
+//
+// SvxLineEndListItem
+//
+//==================================================================
+
+/*?*/ SvxLineEndListItem::SvxLineEndListItem()
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxLineEndListItem::SvxLineEndListItem( XLineEndList* pList, sal_uInt16 nW ) :
+/*N*/ SfxPoolItem( nW ),
+/*N*/ pLineEndList( pList )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxLineEndListItem::SvxLineEndListItem( const SvxLineEndListItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pLineEndList( rItem.pLineEndList )
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*N*/ return ( ( SvxLineEndListItem& ) rItem).pLineEndList == pLineEndList;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLineEndListItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxLineEndListItem( *this );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_e3ditem.cxx b/binfilter/bf_svx/source/items/svx_e3ditem.cxx
new file mode 100644
index 000000000000..ec2aea3ccf23
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_e3ditem.cxx
@@ -0,0 +1,155 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/drawing/Direction3D.hpp>
+#include <tools/stream.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "e3ditem.hxx"
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// STATIC DATA -----------------------------------------------------------
+
+/*N*/ DBG_NAME(SvxVector3DItem)
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxVector3DItem, SfxPoolItem);
+
+// -----------------------------------------------------------------------
+
+/*?*/ SvxVector3DItem::SvxVector3DItem()
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ DBG_CTOR(SvxVector3DItem, 0);
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxVector3DItem::SvxVector3DItem( USHORT nWhich, const Vector3D& rVal ) :
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/ aVal( rVal )
+/*N*/ {
+/*N*/ DBG_CTOR(SvxVector3DItem, 0);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxVector3DItem::SvxVector3DItem( const SvxVector3DItem& rItem ) :
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ aVal( rItem.aVal )
+/*N*/ {
+/*N*/ DBG_CTOR(SvxVector3DItem, 0);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxVector3DItem::operator==( const SfxPoolItem &rItem ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(SvxVector3DItem, 0);
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*N*/ return ((SvxVector3DItem&)rItem).aVal == aVal;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxVector3DItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(SvxVector3DItem, 0);
+/*N*/ return new SvxVector3DItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxVector3DItem::Create(SvStream &rStream, USHORT nVersion) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(SvxVector3DItem, 0);
+/*N*/ Vector3D aStr;
+/*N*/ rStream >> aStr;
+/*N*/ return new SvxVector3DItem(Which(), aStr);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxVector3DItem::Store(SvStream &rStream, USHORT nItemVersion) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(SvxVector3DItem, 0);
+/*N*/
+/*N*/ // ## if (nItemVersion)
+/*N*/ rStream << aVal;
+/*N*/
+/*N*/ return rStream;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxVector3DItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ drawing::Direction3D aDirection;
+/*N*/
+/*N*/ // Werte eintragen
+/*N*/ aDirection.DirectionX = aVal.X();
+/*N*/ aDirection.DirectionY = aVal.Y();
+/*N*/ aDirection.DirectionZ = aVal.Z();
+/*N*/
+/*N*/ rVal <<= aDirection;
+/*N*/ return( sal_True );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxVector3DItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ drawing::Direction3D aDirection;
+/*N*/ if(!(rVal >>= aDirection))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ aVal.X() = aDirection.DirectionX;
+/*N*/ aVal.Y() = aDirection.DirectionY;
+/*N*/ aVal.Z() = aDirection.DirectionZ;
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ USHORT SvxVector3DItem::GetVersion (USHORT nFileFormatVersion) const
+/*N*/ {
+/*N*/ return (nFileFormatVersion == SOFFICE_FILEFORMAT_31) ? USHRT_MAX : 0;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_flditem.cxx b/binfilter/bf_svx/source/items/svx_flditem.cxx
new file mode 100644
index 000000000000..ba88c096d3cd
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_flditem.cxx
@@ -0,0 +1,759 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <bf_svtools/zforlist.hxx>
+#include <tools/urlobj.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _SVX_FLDITEM_CXX
+
+#include <unotools/localfilehelper.hxx>
+
+#define ITEMID_FIELD 0
+
+#include <bf_svtools/poolitem.hxx>
+
+
+#include <bf_svx/itemdata.hxx>
+
+#include "flditem.hxx"
+#include "adritem.hxx"
+
+// #90477#
+#include <tools/tenccvt.hxx>
+#include "bf_so3/staticbaseurl.hxx"
+namespace binfilter {
+
+#define FRAME_MARKER (sal_uInt32)0x21981357
+#define CHARSET_MARKER (FRAME_MARKER+1)
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1( SvxFieldItem, SfxPoolItem );
+
+/*N*/ SV_IMPL_PERSIST1( SvxFieldData, SvPersistBase );
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldData::SvxFieldData()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldData::~SvxFieldData()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldData* SvxFieldData::Clone() const
+/*N*/ {
+/*N*/ return new SvxFieldData;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxFieldData::operator==( const SvxFieldData& rFld ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( Type() == rFld.Type(), "==: Verschiedene Typen" );
+/*N*/ return TRUE; // Basicklasse immer gleich.
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxFieldData::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxFieldData::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+
+/*?*/ MetaAction* SvxFieldData::createBeginComment() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 return new MetaCommentAction( "FIELD_SEQ_BEGIN" );
+/*?*/ }
+
+/*?*/ MetaAction* SvxFieldData::createEndComment() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP");return NULL;//STRIP001 return new MetaCommentAction( "FIELD_SEQ_END" );
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) :
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ pField = pFld; // gehoert direkt dem Item
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const USHORT nId ) :
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ pField = rField.Clone();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldItem::SvxFieldItem( const SvxFieldItem& rItem ) :
+/*N*/ SfxPoolItem ( rItem )
+/*N*/ {
+/*N*/ pField = rItem.GetField() ? rItem.GetField()->Clone() : 0;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldItem::~SvxFieldItem()
+/*N*/ {
+/*N*/ delete pField;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFieldItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxFieldItem(*this);
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const
+/*N*/ {
+/*N*/ SvxFieldData* pData = 0;
+/*N*/ SvPersistStream aPStrm( GetClassManager(), &rStrm );
+/*N*/ aPStrm >> pData;
+/*N*/
+/*N*/ if( aPStrm.IsEof() )
+/*?*/ aPStrm.SetError( SVSTREAM_GENERALERROR );
+/*N*/
+/*N*/ if ( aPStrm.GetError() == ERRCODE_IO_NOFACTORY )
+/*?*/ aPStrm.ResetError(); // Eigentlich einen Code, dass nicht alle Attr gelesen wurden...
+/*N*/
+/*N*/ return new SvxFieldItem( pData, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxFieldItem::Store( SvStream& rStrm, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( pField, "SvxFieldItem::Store: Feld?!" );
+/*N*/ SvPersistStream aPStrm( GetClassManager(), &rStrm );
+/*N*/ // Das ResetError in der obigen Create-Methode gab es in 3.1 noch nicht,
+/*N*/ // deshalb duerfen beim 3.x-Export neuere Items nicht gespeichert werden!
+/*N*/ if ( ( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_31 ) && pField &&
+/*N*/ pField->GetClassId() == 50 /* SdrMeasureField */ )
+/*N*/ {
+/*N*/ // SvxFieldData reicht nicht, weil auch nicht am ClassMgr angemeldet
+/*?*/ SvxURLField aDummyData;
+/*?*/ aPStrm << &aDummyData;
+/*N*/ }
+/*N*/ else
+/*N*/ aPStrm << pField;
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxFieldItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
+/*N*/
+/*N*/ const SvxFieldData* pOtherFld = ((const SvxFieldItem&)rItem).GetField();
+/*N*/ if ( !pField && !pOtherFld )
+/*N*/ return TRUE;
+/*N*/
+/*N*/ if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ return ( ( pField->Type() == pOtherFld->Type() )
+/*N*/ && ( *pField == *pOtherFld ) );
+/*N*/ }
+
+// =================================================================
+// Es folgen die Ableitungen von SvxFieldData...
+// =================================================================
+
+/*N*/ SV_IMPL_PERSIST1( SvxDateField, SvxFieldData );
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxDateField::SvxDateField()
+/*N*/ {
+/*N*/ nFixDate = Date().GetDate();
+/*N*/ eType = SVXDATETYPE_VAR;
+/*N*/ eFormat = SVXDATEFORMAT_STDSMALL;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxDateField::SvxDateField( const Date& rDate, SvxDateType eT, SvxDateFormat eF )
+/*N*/ {
+/*N*/ nFixDate = rDate.GetDate();
+/*N*/ eType = eT;
+/*N*/ eFormat = eF;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldData* SvxDateField::Clone() const
+/*N*/ {
+/*N*/ return new SvxDateField( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxDateField::operator==( const SvxFieldData& rOther ) const
+/*N*/ {
+/*N*/ if ( rOther.Type() != Type() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ const SvxDateField& rOtherFld = (const SvxDateField&) rOther;
+/*N*/ return ( ( nFixDate == rOtherFld.nFixDate ) &&
+/*N*/ ( eType == rOtherFld.eType ) &&
+/*N*/ ( eFormat == rOtherFld.eFormat ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxDateField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ USHORT nType, nFormat;
+/*N*/
+/*N*/ rStm >> nFixDate;
+/*N*/ rStm >> nType;
+/*N*/ rStm >> nFormat;
+/*N*/
+/*N*/ eType = (SvxDateType)nType;
+/*N*/ eFormat= (SvxDateFormat)nFormat;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxDateField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ rStm << nFixDate;
+/*N*/ rStm << (USHORT)eType;
+/*N*/ rStm << (USHORT)eFormat;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SV_IMPL_PERSIST1( SvxURLField, SvxFieldData );
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxURLField::SvxURLField()
+/*N*/ {
+/*N*/ eFormat = SVXURLFORMAT_URL;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxURLField::SvxURLField( const XubString& rURL, const XubString& rRepres, SvxURLFormat eFmt )
+/*N*/ : aURL( rURL ), aRepresentation( rRepres )
+/*N*/ {
+/*N*/ eFormat = eFmt;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFieldData* SvxURLField::Clone() const
+/*N*/ {
+/*N*/ return new SvxURLField( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxURLField::operator==( const SvxFieldData& rOther ) const
+/*N*/ {
+/*N*/ if ( rOther.Type() != Type() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ const SvxURLField& rOtherFld = (const SvxURLField&) rOther;
+/*N*/ return ( ( eFormat == rOtherFld.eFormat ) &&
+/*N*/ ( aURL == rOtherFld.aURL ) &&
+/*N*/ ( aRepresentation == rOtherFld.aRepresentation ) &&
+/*N*/ ( aTargetFrame == rOtherFld.aTargetFrame ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxURLField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ USHORT nFormat;
+/*N*/ sal_uInt32 nFrameMarker, nCharSetMarker;
+/*N*/ long nUlongSize = (long)sizeof(sal_uInt32);
+/*N*/ String aTmpURL;
+/*N*/
+/*N*/ rStm >> nFormat;
+/*N*/
+/*N*/ // UNICODE: rStm >> aTmpURL;
+/*N*/ rStm.ReadByteString(aTmpURL);
+/*N*/
+/*N*/ // UNICODE: rStm >> aRepresentation;
+/*N*/ // read to a temp string first, read text encoding and
+/*N*/ // convert later to stay compatible to fileformat
+/*N*/ ByteString aTempString;
+/*N*/ rtl_TextEncoding aTempEncoding = RTL_TEXTENCODING_MS_1252; // #101493# Init for old documents
+/*N*/ rStm.ReadByteString(aTempString);
+/*N*/
+/*N*/ rStm >> nFrameMarker;
+/*N*/ if ( nFrameMarker == FRAME_MARKER )
+/*N*/ {
+/*N*/ // UNICODE: rStm >> aTargetFrame;
+/*N*/ rStm.ReadByteString(aTargetFrame);
+/*N*/
+/*N*/ rStm >> nCharSetMarker;
+/*N*/ if ( nCharSetMarker == CHARSET_MARKER )
+/*N*/ {
+/*N*/ USHORT nCharSet;
+/*N*/ rStm >> nCharSet;
+/*N*/
+/*N*/ // remember encoding
+/*N*/ aTempEncoding = (rtl_TextEncoding)nCharSet;
+/*N*/ }
+/*N*/ else
+/*?*/ rStm.SeekRel( -nUlongSize );
+/*N*/ }
+/*N*/ else
+/*?*/ rStm.SeekRel( -nUlongSize );
+/*N*/
+/*N*/ // now build representation string due to known encoding
+/*N*/ aRepresentation = String(aTempString, aTempEncoding);
+/*N*/
+/*N*/ eFormat= (SvxURLFormat)nFormat;
+/*N*/
+/*N*/ // Relatives Speichern => Beim laden absolut machen.
+/*N*/ aURL = ::binfilter::StaticBaseUrl::RelToAbs( aTmpURL );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxURLField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ // Relatives Speichern der URL
+/*N*/ String aTmpURL = ::binfilter::StaticBaseUrl::AbsToRel( aURL );
+/*N*/
+/*N*/ rStm << (USHORT)eFormat;
+/*N*/
+/*N*/ // UNICODE: rStm << aTmpURL;
+/*N*/ rStm.WriteByteString(aTmpURL);
+/*N*/
+/*N*/ // UNICODE: rStm << aRepresentation;
+/*N*/ rStm.WriteByteString(aRepresentation);
+/*N*/
+/*N*/ rStm << FRAME_MARKER;
+/*N*/
+/*N*/ // UNICODE: rStm << aTargetFrame;
+/*N*/ rStm.WriteByteString(aTargetFrame);
+/*N*/
+/*N*/ rStm << CHARSET_MARKER;
+/*N*/
+/*N*/ // #90477# rStm << (USHORT)GetStoreCharSet(gsl_getSystemTextEncoding(), rStm.GetVersion());
+/*N*/ rStm << (USHORT)GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rStm.GetVersion());
+/*N*/ }
+
+
+// =================================================================
+// Die Felder, die aus Calc ausgebaut wurden:
+// =================================================================
+
+/*N*/ SV_IMPL_PERSIST1( SvxPageField, SvxFieldData );
+
+/*N*/ SvxFieldData* __EXPORT SvxPageField::Clone() const
+/*N*/ {
+/*N*/ return new SvxPageField; // leer
+/*N*/ }
+
+/*N*/ int __EXPORT SvxPageField::operator==( const SvxFieldData& rCmp ) const
+/*N*/ {
+/*N*/ return ( rCmp.Type() == TYPE(SvxPageField) );
+/*N*/ }
+
+/*N*/ void __EXPORT SvxPageField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT SvxPageField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+
+
+/*N*/ SV_IMPL_PERSIST1( SvxPagesField, SvxFieldData );
+
+/*N*/ SvxFieldData* __EXPORT SvxPagesField::Clone() const
+/*N*/ {
+/*N*/ return new SvxPagesField; // leer
+/*N*/ }
+
+/*N*/ int __EXPORT SvxPagesField::operator==( const SvxFieldData& rCmp ) const
+/*N*/ {
+/*N*/ return ( rCmp.Type() == TYPE(SvxPagesField) );
+/*N*/ }
+
+/*N*/ void __EXPORT SvxPagesField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT SvxPagesField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SV_IMPL_PERSIST1( SvxTimeField, SvxFieldData );
+
+/*N*/ SvxFieldData* __EXPORT SvxTimeField::Clone() const
+/*N*/ {
+/*N*/ return new SvxTimeField; // leer
+/*N*/ }
+
+/*N*/ int __EXPORT SvxTimeField::operator==( const SvxFieldData& rCmp ) const
+/*N*/ {
+/*N*/ return ( rCmp.Type() == TYPE(SvxTimeField) );
+/*N*/ }
+
+/*N*/ void __EXPORT SvxTimeField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT SvxTimeField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ SV_IMPL_PERSIST1( SvxFileField, SvxFieldData );
+
+/*N*/ SvxFieldData* __EXPORT SvxFileField::Clone() const
+/*N*/ {
+/*N*/ return new SvxFileField; // leer
+/*N*/ }
+
+/*N*/ int __EXPORT SvxFileField::operator==( const SvxFieldData& rCmp ) const
+/*N*/ {
+/*N*/ return ( rCmp.Type() == TYPE(SvxFileField) );
+/*N*/ }
+
+/*N*/ void __EXPORT SvxFileField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT SvxFileField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SV_IMPL_PERSIST1( SvxTableField, SvxFieldData );
+
+/*N*/ SvxFieldData* __EXPORT SvxTableField::Clone() const
+/*N*/ {
+/*N*/ return new SvxTableField; // leer
+/*N*/ }
+
+/*N*/ int __EXPORT SvxTableField::operator==( const SvxFieldData& rCmp ) const
+/*N*/ {
+/*N*/ return ( rCmp.Type() == TYPE(SvxTableField) );
+/*N*/ }
+
+/*N*/ void __EXPORT SvxTableField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+/*N*/ void __EXPORT SvxTableField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ }
+
+//----------------------------------------------------------------------------
+// SvxExtTimeField
+//----------------------------------------------------------------------------
+
+/*N*/ SV_IMPL_PERSIST1( SvxExtTimeField, SvxFieldData );
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxExtTimeField::SvxExtTimeField()
+/*N*/ {
+/*N*/ nFixTime = Time().GetTime();
+/*N*/ eType = SVXTIMETYPE_VAR;
+/*N*/ eFormat = SVXTIMEFORMAT_STANDARD;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxExtTimeField::SvxExtTimeField( const Time& rTime, SvxTimeType eT, SvxTimeFormat eF )
+/*N*/ {
+/*N*/ nFixTime = rTime.GetTime();
+/*N*/ eType = eT;
+/*N*/ eFormat = eF;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxFieldData* SvxExtTimeField::Clone() const
+/*N*/ {
+/*N*/ return new SvxExtTimeField( *this );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const
+/*N*/ {
+/*N*/ if ( rOther.Type() != Type() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ const SvxExtTimeField& rOtherFld = (const SvxExtTimeField&) rOther;
+/*N*/ return ( ( nFixTime == rOtherFld.nFixTime ) &&
+/*N*/ ( eType == rOtherFld.eType ) &&
+/*N*/ ( eFormat == rOtherFld.eFormat ) );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SvxExtTimeField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ USHORT nType, nFormat;
+/*N*/
+/*N*/ rStm >> nFixTime;
+/*N*/ rStm >> nType;
+/*N*/ rStm >> nFormat;
+/*N*/
+/*N*/ eType = (SvxTimeType) nType;
+/*N*/ eFormat= (SvxTimeFormat) nFormat;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SvxExtTimeField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ rStm << nFixTime;
+/*N*/ rStm << (USHORT) eType;
+/*N*/ rStm << (USHORT) eFormat;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// SvxExtFileField
+//----------------------------------------------------------------------------
+
+/*N*/ SV_IMPL_PERSIST1( SvxExtFileField, SvxFieldData );
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxExtFileField::SvxExtFileField()
+/*N*/ {
+/*N*/ eType = SVXFILETYPE_VAR;
+/*N*/ eFormat = SVXFILEFORMAT_FULLPATH;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxExtFileField::SvxExtFileField( const XubString& rStr, SvxFileType eT, SvxFileFormat eF )
+/*N*/ {
+/*N*/ aFile = rStr;
+/*N*/ eType = eT;
+/*N*/ eFormat = eF;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxFieldData* SvxExtFileField::Clone() const
+/*N*/ {
+/*N*/ return new SvxExtFileField( *this );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ int SvxExtFileField::operator==( const SvxFieldData& rOther ) const
+/*N*/ {
+/*N*/ if ( rOther.Type() != Type() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ const SvxExtFileField& rOtherFld = (const SvxExtFileField&) rOther;
+/*N*/ return ( ( aFile == rOtherFld.aFile ) &&
+/*N*/ ( eType == rOtherFld.eType ) &&
+/*N*/ ( eFormat == rOtherFld.eFormat ) );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SvxExtFileField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ USHORT nType, nFormat;
+/*N*/
+/*N*/ // UNICODE: rStm >> aFile;
+/*N*/ rStm.ReadByteString(aFile);
+/*N*/
+/*N*/ rStm >> nType;
+/*N*/ rStm >> nFormat;
+/*N*/
+/*N*/ eType = (SvxFileType) nType;
+/*N*/ eFormat= (SvxFileFormat) nFormat;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SvxExtFileField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ // UNICODE: rStm << aFile;
+/*N*/ rStm.WriteByteString(aFile);
+/*N*/
+/*N*/ rStm << (USHORT) eType;
+/*N*/ rStm << (USHORT) eFormat;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// SvxAuthorField
+//----------------------------------------------------------------------------
+
+/*N*/ SV_IMPL_PERSIST1( SvxAuthorField, SvxFieldData );
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxAuthorField::SvxAuthorField()
+/*N*/ {
+/*N*/ eType = SVXAUTHORTYPE_VAR;
+/*N*/ eFormat = SVXAUTHORFORMAT_FULLNAME;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxAuthorField::SvxAuthorField( const SvxAddressItem& rAdrItem,
+/*N*/ SvxAuthorType eT, SvxAuthorFormat eF )
+/*N*/ {
+/*N*/ aName = rAdrItem.GetName();
+/*N*/ aFirstName = rAdrItem.GetFirstName();
+/*N*/ aShortName = rAdrItem.GetShortName();
+/*N*/ eType = eT;
+/*N*/ eFormat = eF;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ SvxFieldData* SvxAuthorField::Clone() const
+/*N*/ {
+/*N*/ return new SvxAuthorField( *this );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ int SvxAuthorField::operator==( const SvxFieldData& rOther ) const
+/*N*/ {
+/*N*/ if ( rOther.Type() != Type() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ const SvxAuthorField& rOtherFld = (const SvxAuthorField&) rOther;
+/*N*/ return ( ( aName == rOtherFld.aName ) &&
+/*N*/ ( aFirstName == rOtherFld.aFirstName ) &&
+/*N*/ ( aShortName == rOtherFld.aShortName ) &&
+/*N*/ ( eType == rOtherFld.eType ) &&
+/*N*/ ( eFormat == rOtherFld.eFormat ) );
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SvxAuthorField::Load( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ USHORT nType, nFormat;
+/*N*/
+/*N*/ // UNICODE: rStm >> aName;
+/*N*/ rStm.ReadByteString(aName);
+/*N*/
+/*N*/ // UNICODE: rStm >> aFirstName;
+/*N*/ rStm.ReadByteString(aFirstName);
+/*N*/
+/*N*/ // UNICODE: rStm >> aShortName;
+/*N*/ rStm.ReadByteString(aShortName);
+/*N*/
+/*N*/ rStm >> nType;
+/*N*/ rStm >> nFormat;
+/*N*/
+/*N*/ eType = (SvxAuthorType) nType;
+/*N*/ eFormat= (SvxAuthorFormat) nFormat;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ void SvxAuthorField::Save( SvPersistStream & rStm )
+/*N*/ {
+/*N*/ // UNICODE: rStm << aName;
+/*N*/ rStm.WriteByteString(aName);
+/*N*/
+/*N*/ // UNICODE: rStm << aFirstName;
+/*N*/ rStm.WriteByteString(aFirstName);
+/*N*/
+/*N*/ // UNICODE: rStm << aShortName;
+/*N*/ rStm.WriteByteString(aShortName);
+/*N*/
+/*N*/ rStm << (USHORT) eType;
+/*N*/ rStm << (USHORT) eFormat;
+/*N*/ }
+
+//----------------------------------------------------------------------------
+
+/*N*/ XubString SvxAuthorField::GetFormatted() const
+/*N*/ {
+/*N*/ XubString aString;
+/*N*/
+/*N*/ switch( eFormat )
+/*N*/ {
+/*N*/ case SVXAUTHORFORMAT_FULLNAME:
+/*N*/ aString = aFirstName;
+/*N*/ aString += sal_Unicode(' ');
+/*N*/ aString += aName;
+/*N*/ break;
+/*N*/
+/*N*/ case SVXAUTHORFORMAT_NAME:
+/*N*/ aString = aName;
+/*N*/ break;
+/*N*/
+/*N*/ case SVXAUTHORFORMAT_FIRSTNAME:
+/*N*/ aString = aFirstName;
+/*N*/ break;
+/*N*/
+/*N*/ case SVXAUTHORFORMAT_SHORTNAME:
+/*N*/ aString = aShortName;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ return( aString );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_frmitems.cxx b/binfilter/bf_svx/source/items/svx_frmitems.cxx
new file mode 100644
index 000000000000..4403c1b67645
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_frmitems.cxx
@@ -0,0 +1,2882 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <com/sun/star/uno/Any.hxx>
+
+#include <com/sun/star/script/XTypeConverter.hpp>
+
+#include <limits.h>
+#include <comphelper/processfactory.hxx>
+
+#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
+#define ITEMID_FRAMEDIR 0
+
+#include <bf_goodies/graphicobject.hxx>
+#include <tools/urlobj.hxx>
+#ifndef SVX_LIGHT
+#include <bf_sfx2/docfile.hxx>
+#include <bf_sfx2/objsh.hxx>
+#endif // !SVX_LIGHT
+#include "bf_basic/sbx.hxx"
+#define GLOBALOVERFLOW3
+
+#define _SVX_FRMITEMS_CXX
+
+#include <bf_svtools/memberid.hrc>
+
+#include <bf_svtools/wallitem.hxx>
+#include <bf_svtools/cntwall.hxx>
+
+#include "rtl/ustring.hxx"
+#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 "frmdiritem.hxx"
+
+#include "itemtype.hxx"
+#include "dialmgr.hxx"
+#include "svxerr.hxx"
+#include "unoprnms.hxx"
+
+#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/table/CellVertJustify.hpp>
+#include <com/sun/star/table/ShadowLocation.hpp>
+#include <com/sun/star/table/TableBorder.hpp>
+#include <com/sun/star/table/ShadowFormat.hpp>
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#include <com/sun/star/table/CellContentType.hpp>
+#include <com/sun/star/table/TableOrientation.hpp>
+#include <com/sun/star/table/CellHoriJustify.hpp>
+#include <com/sun/star/util/SortField.hpp>
+#include <com/sun/star/util/SortFieldType.hpp>
+#include <com/sun/star/table/CellOrientation.hpp>
+#include <com/sun/star/table/CellAddress.hpp>
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#include <com/sun/star/style/BreakType.hpp>
+#include <com/sun/star/style/GraphicLocation.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Selection.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
+
+#include <comphelper/types.hxx>
+
+#include <unomid.hxx>
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+
+#include "bf_so3/staticbaseurl.hxx"
+namespace binfilter {
+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('%');
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPaperBinItem, SfxByteItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxSizeItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxLRSpaceItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxULSpaceItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPrintItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxOpaqueItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxProtectItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxBrushItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxShadowItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxBoxItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxBoxInfoItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxFmtBreakItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxFmtKeepItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxLineItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxFrameDirectionItem, SfxUInt16Item);
+
+
+// class SvxPaperBinItem ------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPaperBinItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxPaperBinItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxPaperBinItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPaperBinItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 nBin;
+/*N*/ rStrm >> nBin;
+/*N*/ return new SvxPaperBinItem( Which(), nBin );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// class SvxSizeItem -----------------------------------------------------
+
+/*N*/ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ aSize( rSize )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ awt::Size aTmp(aSize.Width(), aSize.Height());
+/*N*/ if( bConvert )
+/*N*/ {
+/*N*/ aTmp.Height = TWIP_TO_MM100(aTmp.Height);
+/*N*/ aTmp.Width = TWIP_TO_MM100(aTmp.Width);
+/*N*/ }
+/*N*/
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_SIZE_SIZE: rVal <<= aTmp; break;
+/*N*/ case MID_SIZE_WIDTH: rVal <<= aTmp.Width; break;
+/*N*/ case MID_SIZE_HEIGHT: rVal <<= aTmp.Height; break;
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_SIZE_SIZE:
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_SIZE_WIDTH:
+/*N*/ {
+/*N*/ sal_Int32 nVal;
+/*N*/ if(!(rVal >>= nVal ))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ aSize.Width() = bConvert ? MM100_TO_TWIP(nVal) : nVal;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_SIZE_HEIGHT:
+/*N*/ {
+/*N*/ sal_Int32 nVal;
+/*N*/ if(!(rVal >>= nVal))
+/*N*/ return sal_True;
+/*N*/
+/*N*/ aSize.Height() = bConvert ? MM100_TO_TWIP(nVal) : nVal;
+/*N*/ }
+/*N*/ break;
+/*N*/ default: DBG_ERROR("Wrong MemberId!");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxSizeItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return ( aSize == ( (SvxSizeItem&)rAttr ).GetSize() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxSizeItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxSizeItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << aSize.Width();
+/*N*/ rStrm << aSize.Height();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+/*N*/ SfxPoolItem* SvxSizeItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ long nWidth, nHeight;
+/*N*/ rStrm >> nWidth >> nHeight;
+/*N*/
+/*N*/ SvxSizeItem* pAttr = new SvxSizeItem( Which() );
+/*N*/ pAttr->SetSize(Size(nWidth, nHeight));
+/*N*/
+/*N*/ return pAttr;
+/*N*/ }
+
+// class SvxLRSpaceItem --------------------------------------------------
+
+/*N*/ SvxLRSpaceItem::SvxLRSpaceItem( const sal_uInt16 nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ nFirstLineOfst ( 0 ), nPropFirstLineOfst( 100 ),
+/*N*/ nTxtLeft ( 0 ),
+/*N*/ nLeftMargin ( 0 ), nPropLeftMargin( 100 ),
+/*N*/ nRightMargin ( 0 ), nPropRightMargin( 100 ),
+/*N*/ bBulletFI ( 0 ),
+/*N*/ bAutoFirst ( 0 )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxLRSpaceItem::SvxLRSpaceItem( const long nLeft, const long nRight,
+/*N*/ const long nTLeft, const short nOfset,
+/*N*/ const sal_uInt16 nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ nFirstLineOfst ( nOfset ), nPropFirstLineOfst( 100 ),
+/*N*/ nTxtLeft ( nTLeft ),
+/*N*/ nLeftMargin ( nLeft ), nPropLeftMargin( 100 ),
+/*N*/ nRightMargin ( nRight ), nPropRightMargin( 100 ),
+/*N*/ bBulletFI ( 0 ),
+/*N*/ bAutoFirst ( 0 )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ // jetzt alles signed
+/*N*/ case MID_L_MARGIN:
+/*N*/ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLeftMargin) : nLeftMargin);
+/*N*/ break;
+/*N*/
+/*N*/ case MID_TXT_LMARGIN :
+/*N*/ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nTxtLeft) : nTxtLeft);
+/*N*/ break;
+/*N*/ case MID_R_MARGIN:
+/*N*/ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nRightMargin) : nRightMargin);
+/*N*/ break;
+/*N*/ case MID_L_REL_MARGIN:
+/*N*/ rVal <<= (sal_Int16)nPropLeftMargin;
+/*N*/ break;
+/*N*/ case MID_R_REL_MARGIN:
+/*N*/ rVal <<= (sal_Int16)nPropRightMargin;
+/*N*/ break;
+/*N*/
+/*N*/ case MID_FIRST_LINE_INDENT:
+/*N*/ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nFirstLineOfst) : nFirstLineOfst);
+/*N*/ break;
+/*N*/
+/*N*/ case MID_FIRST_LINE_REL_INDENT:
+/*N*/ rVal <<= (sal_Int16)(nPropFirstLineOfst);
+/*N*/ break;
+/*N*/
+/*N*/ case MID_FIRST_AUTO:
+/*N*/ rVal = Bool2Any(IsAutoFirst());
+/*N*/ break;
+/*N*/
+/*N*/ default:
+/*N*/ bRet = sal_False;
+/*N*/ DBG_ERROR("unknown MemberId");
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Int32 nMaxVal = bConvert ? TWIP_TO_MM100(USHRT_MAX) : USHRT_MAX;
+/*N*/ sal_Int32 nVal;
+/*N*/ if( nMemberId != MID_FIRST_AUTO &&
+/*N*/ nMemberId != MID_L_REL_MARGIN && nMemberId != MID_R_REL_MARGIN)
+/*N*/ if(!(rVal >>= nVal))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_L_MARGIN:
+/*N*/ SetLeft((sal_Int32)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+/*N*/ break;
+/*N*/
+/*N*/ case MID_TXT_LMARGIN :
+/*N*/ SetTxtLeft((sal_Int32)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+/*N*/ break;
+/*N*/
+/*N*/ case MID_R_MARGIN:
+/*N*/ SetRight((sal_Int32) bConvert ? MM100_TO_TWIP(nVal) : nVal);
+/*N*/ break;
+/*N*/ case MID_L_REL_MARGIN:
+/*N*/ case MID_R_REL_MARGIN:
+/*N*/ {
+/*N*/ sal_Int32 nRel;
+/*N*/ if((rVal >>= nRel) && nRel >= 0 && nRel < USHRT_MAX)
+/*N*/ {
+/*N*/ if(MID_L_REL_MARGIN== nMemberId)
+/*N*/ nPropLeftMargin = (USHORT)nRel;
+/*N*/ else
+/*N*/ nPropRightMargin = (USHORT)nRel;
+/*N*/ }
+/*N*/ else
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FIRST_LINE_INDENT :
+/*N*/ SetTxtFirstLineOfst((short)(bConvert ? MM100_TO_TWIP(nVal) : nVal));
+/*N*/ break;
+/*N*/
+/*N*/ case MID_FIRST_LINE_REL_INDENT:
+/*?*/ SetPropTxtFirstLineOfst ( nVal );
+/*N*/ break;
+/*N*/
+/*N*/ case MID_FIRST_AUTO:
+/*N*/ SetAutoFirst( Any2Bool(rVal) );
+/*N*/ break;
+/*N*/
+/*N*/ default:
+/*N*/ DBG_ERROR("unknown MemberId");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+// nLeftMargin und nTxtLeft anpassen.
+
+/*N*/ void SvxLRSpaceItem::AdjustLeft()
+/*N*/ {
+/*N*/ if ( 0 > nFirstLineOfst )
+/*N*/ nLeftMargin = nTxtLeft + nFirstLineOfst;
+/*N*/ else
+/*N*/ nLeftMargin = nTxtLeft;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxLRSpaceItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return (
+/*N*/ nLeftMargin == ((SvxLRSpaceItem&)rAttr).GetLeft() &&
+/*N*/ nRightMargin == ((SvxLRSpaceItem&)rAttr).GetRight() &&
+/*N*/ nFirstLineOfst == ((SvxLRSpaceItem&)rAttr).GetTxtFirstLineOfst() &&
+/*N*/ nPropLeftMargin == ((SvxLRSpaceItem&)rAttr).GetPropLeft() &&
+/*N*/ nPropRightMargin == ((SvxLRSpaceItem&)rAttr).GetPropRight() &&
+/*N*/ nPropFirstLineOfst == ((SvxLRSpaceItem&)rAttr).GetPropTxtFirstLineOfst() &&
+/*N*/ bBulletFI == ((SvxLRSpaceItem&)rAttr).IsBulletFI() &&
+/*N*/ bAutoFirst == ((SvxLRSpaceItem&)rAttr).IsAutoFirst() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLRSpaceItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxLRSpaceItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+// 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
+
+/*N*/ SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ short nSaveFI = nFirstLineOfst;
+/*N*/ if ( IsBulletFI() )
+/*N*/ ((SvxLRSpaceItem*)this)->SetTxtFirstLineOfst( 0 ); // nLeftMargin wird mitmanipuliert, siehe Create()
+/*N*/
+/*N*/ sal_uInt16 nMargin = 0;
+/*N*/ if( nLeftMargin > 0 )
+/*N*/ nMargin = sal_uInt16( nLeftMargin );
+/*N*/ rStrm << nMargin;
+/*N*/ rStrm << nPropLeftMargin;
+/*N*/ if( nRightMargin > 0 )
+/*N*/ nMargin = sal_uInt16( nRightMargin );
+/*N*/ else
+/*N*/ nMargin = 0;
+/*N*/ rStrm << nMargin;
+/*N*/ rStrm << nPropRightMargin;
+/*N*/ rStrm << nFirstLineOfst;
+/*N*/ rStrm << nPropFirstLineOfst;
+/*N*/ if( nTxtLeft > 0 )
+/*N*/ nMargin = sal_uInt16( nTxtLeft );
+/*N*/ else
+/*N*/ nMargin = 0;
+/*N*/ rStrm << nMargin;
+/*N*/ if( nItemVersion >= LRSPACE_AUTOFIRST_VERSION )
+/*N*/ {
+/*N*/ sal_Int8 nAutoFirst = bAutoFirst ? 1 : 0;
+/*N*/ if( nItemVersion >= LRSPACE_NEGATIVE_VERSION &&
+/*N*/ ( nLeftMargin < 0 || nRightMargin < 0 || nTxtLeft < 0 ) )
+/*N*/ nAutoFirst |= 0x80;
+/*N*/ rStrm << nAutoFirst;
+/*N*/
+/*N*/ if ( IsBulletFI() )
+/*N*/ {
+/*N*/ // Ab 6.0 keine Magicnumber schreiben...
+/*N*/ DBG_ASSERT( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_50, "MT: Fileformat SvxLRSpaceItem aendern!" );
+/*N*/ rStrm << (sal_uInt32) BULLETLR_MARKER;
+/*N*/ rStrm << nSaveFI;
+/*N*/ }
+/*N*/ if( 0x80 & nAutoFirst )
+/*N*/ {
+/*N*/ rStrm << nLeftMargin;
+/*N*/ rStrm << nRightMargin;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( IsBulletFI() )
+/*N*/ ((SvxLRSpaceItem*)this)->SetTxtFirstLineOfst( nSaveFI );
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+/*N*/ {
+/*N*/ sal_uInt16 left, prpleft, right, prpright, prpfirstline, txtleft;
+/*N*/ short firstline;
+/*N*/ sal_Int8 autofirst = 0;
+/*N*/
+/*N*/ if ( nVersion >= LRSPACE_AUTOFIRST_VERSION )
+/*N*/ {
+/*N*/ rStrm >> left >> prpleft >> right >> prpright >> firstline >>
+/*N*/ prpfirstline >> txtleft >> autofirst;
+/*N*/
+/*N*/ sal_uInt32 nPos = rStrm.Tell();
+/*N*/ sal_uInt32 nMarker;
+/*N*/ rStrm >> nMarker;
+/*N*/ if ( nMarker == BULLETLR_MARKER )
+/*N*/ {
+/*N*/ rStrm >> firstline;
+/*N*/ if ( firstline < 0 )
+/*N*/ left += firstline; // s.u.: txtleft = ...
+/*N*/ }
+/*N*/ else
+/*N*/ rStrm.Seek( nPos );
+/*N*/ }
+/*N*/ else if ( nVersion == LRSPACE_TXTLEFT_VERSION )
+/*N*/ {
+/*N*/ rStrm >> left >> prpleft >> right >> prpright >> firstline >>
+/*N*/ prpfirstline >> txtleft;
+/*N*/ }
+/*N*/ else if ( nVersion == LRSPACE_16_VERSION )
+/*N*/ {
+/*N*/ rStrm >> left >> prpleft >> right >> prpright >> firstline >>
+/*N*/ prpfirstline;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ sal_Int8 nL, nR, nFL;
+/*?*/ rStrm >> left >> nL >> right >> nR >> firstline >> nFL;
+/*?*/ prpleft = (sal_uInt16)nL;
+/*?*/ prpright = (sal_uInt16)nR;
+/*?*/ prpfirstline = (sal_uInt16)nFL;
+/*N*/ }
+/*N*/
+/*N*/ txtleft = firstline >= 0 ? left : left - firstline;
+/*N*/ SvxLRSpaceItem* pAttr = new SvxLRSpaceItem( Which() );
+/*N*/
+/*N*/ pAttr->nLeftMargin = left;
+/*N*/ pAttr->nPropLeftMargin = prpleft;
+/*N*/ pAttr->nRightMargin = right;
+/*N*/ pAttr->nPropRightMargin = prpright;
+/*N*/ pAttr->nFirstLineOfst = firstline;
+/*N*/ pAttr->nPropFirstLineOfst = prpfirstline;
+/*N*/ pAttr->nTxtLeft = txtleft;
+/*N*/ pAttr->bAutoFirst = autofirst & 0x01;
+/*N*/ if( nVersion >= LRSPACE_NEGATIVE_VERSION && ( autofirst & 0x80 ) )
+/*N*/ {
+/*N*/ sal_Int32 nMargin;
+/*N*/ rStrm >> nMargin;
+/*N*/ pAttr->nLeftMargin = nMargin;
+/*N*/ pAttr->nTxtLeft = firstline >= 0 ? nMargin : nMargin - firstline;
+/*N*/ rStrm >> nMargin;
+/*N*/ pAttr->nRightMargin = nMargin;
+/*N*/ }
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxLRSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const
+/*N*/ {
+/*N*/ return (nFileVersion == SOFFICE_FILEFORMAT_31)
+/*N*/ ? LRSPACE_TXTLEFT_VERSION
+/*N*/ : LRSPACE_NEGATIVE_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// class SvxULSpaceItem --------------------------------------------------
+
+/*N*/ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ nUpper( 0 ), nPropUpper( 100 ),
+/*N*/ nLower( 0 ), nPropLower( 100 )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow,
+/*N*/ const sal_uInt16 nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ nUpper( nUp ), nPropUpper( 100 ),
+/*N*/ nLower( nLow ), nPropLower( 100 )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ // jetzt alles signed
+/*N*/ case MID_UP_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nUpper) : nUpper); break;
+/*N*/ case MID_LO_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLower) : nLower); break;
+/*N*/ case MID_UP_REL_MARGIN: rVal <<= (sal_Int16) nPropUpper; break;
+/*N*/ case MID_LO_REL_MARGIN: rVal <<= (sal_Int16) nPropLower; break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Int32 nVal;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_UP_MARGIN :
+/*N*/ if(!(rVal >>= nVal) || nVal < 0)
+/*N*/ return sal_False;
+/*N*/ SetUpper((sal_uInt16)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+/*N*/ break;
+/*N*/ case MID_LO_MARGIN :
+/*N*/ if(!(rVal >>= nVal) || nVal < 0)
+/*N*/ return sal_False;
+/*N*/ SetLower((sal_uInt16)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+/*N*/ break;
+/*N*/ case MID_UP_REL_MARGIN:
+/*N*/ case MID_LO_REL_MARGIN:
+/*N*/ {
+/*N*/ sal_Int32 nRel;
+/*?*/ if((rVal >>= nRel) && nRel > 1 )
+/*?*/ {
+/*?*/ if(MID_UP_REL_MARGIN == nMemberId)
+/*?*/ nPropUpper = nRel;
+/*?*/ else
+/*?*/ nPropLower = nRel;
+/*?*/ }
+/*?*/ else
+/*?*/ return FALSE;
+/*?*/ }
+/*?*/ break;
+/*N*/
+/*N*/
+/*N*/ default:
+/*N*/ DBG_ERROR("unknown MemberId");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxULSpaceItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return ( nUpper == ( (SvxULSpaceItem&)rAttr ).nUpper &&
+/*N*/ nLower == ( (SvxULSpaceItem&)rAttr ).nLower &&
+/*N*/ nPropUpper == ( (SvxULSpaceItem&)rAttr ).nPropUpper &&
+/*N*/ nPropLower == ( (SvxULSpaceItem&)rAttr ).nPropLower );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxULSpaceItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxULSpaceItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxULSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << GetUpper()
+/*N*/ << GetPropUpper()
+/*N*/ << GetLower()
+/*N*/ << GetPropLower();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxULSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+/*N*/ {
+/*N*/ sal_uInt16 upper, lower, nPL = 0, nPU = 0;
+/*N*/
+/*N*/ if ( nVersion == ULSPACE_16_VERSION )
+/*N*/ rStrm >> upper >> nPU >> lower >> nPL;
+/*N*/ else
+/*N*/ {
+/*?*/ sal_Int8 nU, nL;
+/*?*/ rStrm >> upper >> nU >> lower >> nL;
+/*?*/ nPL = (sal_uInt16)nL;
+/*?*/ nPU = (sal_uInt16)nU;
+/*N*/ }
+/*N*/
+/*N*/ SvxULSpaceItem* pAttr = new SvxULSpaceItem( Which() );
+/*N*/ pAttr->SetUpperValue( upper );
+/*N*/ pAttr->SetLowerValue( lower );
+/*N*/ pAttr->SetPropUpper( nPU );
+/*N*/ pAttr->SetPropLower( nPL );
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxULSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const
+/*N*/ {
+/*N*/ return ULSPACE_16_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+// class SvxPrintItem ----------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPrintItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxPrintItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxPrintItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPrintItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 bIsPrint;
+/*N*/ rStrm >> bIsPrint;
+/*N*/ return new SvxPrintItem( Which(), sal_Bool( bIsPrint != 0 ) );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxOpaqueItem ---------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxOpaqueItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxOpaqueItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxOpaqueItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxOpaqueItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 bIsOpaque;
+/*N*/ rStrm >> bIsOpaque;
+/*N*/ return new SvxOpaqueItem( Which(), sal_Bool( bIsOpaque != 0 ) );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxProtectItem --------------------------------------------------
+
+/*N*/ int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return ( bCntnt == ( (SvxProtectItem&)rAttr ).bCntnt &&
+/*N*/ bSize == ( (SvxProtectItem&)rAttr ).bSize &&
+/*N*/ bPos == ( (SvxProtectItem&)rAttr ).bPos );
+/*N*/ }
+
+/*-----------------16.03.98 12:42-------------------
+--------------------------------------------------*/
+/*N*/ bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bValue;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_PROTECT_CONTENT : bValue = bCntnt; break;
+/*N*/ case MID_PROTECT_SIZE : bValue = bSize; break;
+/*N*/ case MID_PROTECT_POSITION: bValue = bPos; break;
+/*N*/ default:
+/*N*/ DBG_ERROR("falsche MemberId");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ rVal = Bool2Any( bValue );
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------16.03.98 12:42-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bVal( Any2Bool(rVal) );
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_PROTECT_CONTENT : bCntnt = bVal; break;
+/*N*/ case MID_PROTECT_SIZE : bSize = bVal; break;
+/*N*/ case MID_PROTECT_POSITION: bPos = bVal; break;
+/*N*/ default:
+/*N*/ DBG_ERROR("falsche MemberId");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxProtectItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxProtectItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxProtectItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ sal_Int8 cProt = 0;
+/*N*/ if( IsPosProtected() ) cProt |= 0x01;
+/*N*/ if( IsSizeProtected() ) cProt |= 0x02;
+/*N*/ if( IsCntntProtected() ) cProt |= 0x04;
+/*N*/ rStrm << (sal_Int8) cProt;
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 cFlags;
+/*N*/ rStrm >> cFlags;
+/*N*/ SvxProtectItem* pAttr = new SvxProtectItem( Which() );
+/*N*/ pAttr->SetPosProtect( sal_Bool( ( cFlags & 0x01 ) != 0 ) );
+/*N*/ pAttr->SetSizeProtect( sal_Bool( ( cFlags & 0x02 ) != 0 ) );
+/*N*/ pAttr->SetCntntProtect( sal_Bool( ( cFlags & 0x04 ) != 0 ) );
+/*N*/ return pAttr;
+/*N*/ }
+
+// class SvxShadowItem ---------------------------------------------------
+
+/*N*/ SvxShadowItem::SvxShadowItem( const USHORT nId,
+/*N*/ const Color *pColor, const USHORT nW,
+/*N*/ const SvxShadowLocation eLoc ) :
+/*N*/ SfxEnumItemInterface( nId ),
+/*N*/ aShadowColor(COL_GRAY),
+/*N*/ nWidth ( nW ),
+/*N*/ eLocation ( eLoc )
+/*N*/ {
+/*N*/ if ( pColor )
+/*N*/ aShadowColor = *pColor;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ table::ShadowFormat aShadow;
+/*N*/ table::ShadowLocation eSet = table::ShadowLocation_NONE;
+/*N*/ switch( eLocation )
+/*N*/ {
+/*N*/ case SVX_SHADOW_TOPLEFT : eSet = table::ShadowLocation_TOP_LEFT ; break;
+/*N*/ case SVX_SHADOW_TOPRIGHT : eSet = table::ShadowLocation_TOP_RIGHT ; break;
+/*N*/ case SVX_SHADOW_BOTTOMLEFT : eSet = table::ShadowLocation_BOTTOM_LEFT ; break;
+/*N*/ case SVX_SHADOW_BOTTOMRIGHT: eSet = table::ShadowLocation_BOTTOM_RIGHT; break;
+/*N*/ }
+/*N*/ aShadow.Location = eSet;
+/*N*/ aShadow.ShadowWidth = bConvert ? TWIP_TO_MM100(nWidth) : nWidth;
+/*N*/ aShadow.IsTransparent = aShadowColor.GetTransparency() > 0;
+/*N*/ aShadow.Color = aShadowColor.GetRGBColor();
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*?*/ case MID_LOCATION: rVal <<= aShadow.Location; break;
+/*?*/ case MID_WIDTH: rVal <<= aShadow.ShadowWidth; break;
+/*?*/ case MID_TRANSPARENT: rVal <<= aShadow.IsTransparent; break;
+/*?*/ case MID_BG_COLOR: rVal <<= aShadow.Color; break;
+/*N*/ case 0: rVal <<= aShadow; break;
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ table::ShadowFormat aShadow;
+/*N*/ uno::Any aAny;
+/*N*/ bool bRet = QueryValue( aAny, bConvert ? CONVERT_TWIPS : 0 ) && ( aAny >>= aShadow );
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_LOCATION:
+/*N*/ {
+/*?*/ bRet = (rVal >>= aShadow.Location);
+/*?*/ if ( !bRet )
+/*?*/ {
+/*?*/ sal_Int16 nVal;
+/*?*/ bRet = (rVal >>= nVal);
+/*?*/ aShadow.Location = (table::ShadowLocation) nVal;
+/*?*/ }
+/*?*/
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_WIDTH: rVal >>= aShadow.ShadowWidth; break;
+/*?*/ case MID_TRANSPARENT: rVal >>= aShadow.IsTransparent; break;
+/*?*/ case MID_BG_COLOR: rVal >>= aShadow.Color; break;
+/*N*/ case 0: rVal >>= aShadow; break;
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ if ( bRet )
+/*N*/ {
+/*N*/ SvxShadowLocation eSet = SVX_SHADOW_NONE;
+/*N*/ switch( aShadow.Location )
+/*N*/ {
+/*N*/ case table::ShadowLocation_TOP_LEFT : eLocation = SVX_SHADOW_TOPLEFT; break;
+/*N*/ case table::ShadowLocation_TOP_RIGHT : eLocation = SVX_SHADOW_TOPRIGHT; break;
+/*N*/ case table::ShadowLocation_BOTTOM_LEFT : eLocation = SVX_SHADOW_BOTTOMLEFT ; break;
+/*N*/ case table::ShadowLocation_BOTTOM_RIGHT: eLocation = SVX_SHADOW_BOTTOMRIGHT; break;
+/*N*/ }
+/*N*/
+/*N*/ nWidth = bConvert ? MM100_TO_TWIP(aShadow.ShadowWidth) : aShadow.ShadowWidth;
+/*N*/ Color aSet(aShadow.Color);
+/*N*/ aSet.SetTransparency(aShadow.IsTransparent ? 0xff : 0);
+/*N*/ aShadowColor = aSet;
+/*N*/ }
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxShadowItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return ( ( aShadowColor == ( (SvxShadowItem&)rAttr ).aShadowColor ) &&
+/*N*/ ( nWidth == ( (SvxShadowItem&)rAttr ).GetWidth() ) &&
+/*N*/ ( eLocation == ( (SvxShadowItem&)rAttr ).GetLocation() ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxShadowItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxShadowItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxShadowItem::CalcShadowSpace( sal_uInt16 nShadow ) const
+/*N*/ {
+/*N*/ sal_uInt16 nSpace = 0;
+/*N*/
+/*N*/ switch ( nShadow )
+/*N*/ {
+/*N*/ case SHADOW_TOP:
+/*N*/ if ( eLocation == SVX_SHADOW_TOPLEFT ||
+/*N*/ eLocation == SVX_SHADOW_TOPRIGHT )
+/*N*/ nSpace = nWidth;
+/*N*/ break;
+/*N*/
+/*N*/ case SHADOW_BOTTOM:
+/*N*/ if ( eLocation == SVX_SHADOW_BOTTOMLEFT ||
+/*N*/ eLocation == SVX_SHADOW_BOTTOMRIGHT )
+/*N*/ nSpace = nWidth;
+/*N*/ break;
+/*N*/
+/*N*/ case SHADOW_LEFT:
+/*N*/ if ( eLocation == SVX_SHADOW_TOPLEFT ||
+/*N*/ eLocation == SVX_SHADOW_BOTTOMLEFT )
+/*N*/ nSpace = nWidth;
+/*N*/ break;
+/*N*/
+/*N*/ case SHADOW_RIGHT:
+/*N*/ if ( eLocation == SVX_SHADOW_TOPRIGHT ||
+/*N*/ eLocation == SVX_SHADOW_BOTTOMRIGHT )
+/*N*/ nSpace = nWidth;
+/*N*/ break;
+/*N*/
+/*N*/ default:
+/*N*/ DBG_ERROR( "wrong shadow" );
+/*N*/ }
+/*N*/ return nSpace;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8) GetLocation()
+/*N*/ << (sal_uInt16) GetWidth()
+/*N*/ << (sal_Bool)(aShadowColor.GetTransparency() > 0)
+/*N*/ << GetColor()
+/*N*/ << GetColor()
+/*N*/ << (sal_Int8)(aShadowColor.GetTransparency() > 0 ? 0 : 1); //BRUSH_NULL : BRUSH_SOLID
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxShadowItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 cLoc;
+/*N*/ sal_uInt16 nWidth;
+/*N*/ sal_Bool bTrans;
+/*N*/ Color aColor;
+/*N*/ Color aFillColor;
+/*N*/ sal_Int8 nStyle;
+/*N*/ rStrm >> cLoc >> nWidth
+/*N*/ >> bTrans >> aColor >> aFillColor >> nStyle;
+/*N*/ aColor.SetTransparency(bTrans ? 0xff : 0);
+/*N*/ return new SvxShadowItem( Which(), &aColor, nWidth, (SvxShadowLocation)cLoc );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxShadowItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_SHADOW_END; // SVX_SHADOW_BOTTOMRIGHT + 1
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxShadowItem::GetEnumValue() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return GetLocation();
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ void SvxShadowItem::SetEnumValue( sal_uInt16 nVal )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SetLocation( (const SvxShadowLocation)nVal );
+/*?*/ }
+
+// class SvxBorderLine --------------------------------------------------
+
+/*N*/ SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn,
+/*N*/ sal_uInt16 nDist ) :
+/*N*/
+/*N*/ nOutWidth( nOut ),
+/*N*/ nInWidth ( nIn ),
+/*N*/ nDistance( nDist )
+/*N*/
+/*N*/ {
+/*N*/ if ( pCol )
+/*N*/ aColor = *pCol;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_Bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const
+/*N*/ {
+/*N*/ return ( ( aColor == rCmp.GetColor() ) &&
+/*N*/ ( nInWidth == rCmp.GetInWidth() ) &&
+/*N*/ ( nOutWidth == rCmp.GetOutWidth() ) &&
+/*N*/ ( nDistance == rCmp.GetDistance() ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+// class SvxBoxItem ------------------------------------------------------
+
+/*N*/ SvxBoxItem::SvxBoxItem( const SvxBoxItem& rCpy ) :
+/*N*/
+/*N*/ SfxPoolItem ( rCpy ),
+/*N*/ nTopDist ( rCpy.nTopDist ),
+/*N*/ nBottomDist ( rCpy.nBottomDist ),
+/*N*/ nLeftDist ( rCpy.nLeftDist ),
+/*N*/ nRightDist ( rCpy.nRightDist )
+/*N*/
+/*N*/ {
+/*N*/ pTop = rCpy.GetTop() ? new SvxBorderLine( *rCpy.GetTop() ) : 0;
+/*N*/ pBottom = rCpy.GetBottom() ? new SvxBorderLine( *rCpy.GetBottom() ) : 0;
+/*N*/ pLeft = rCpy.GetLeft() ? new SvxBorderLine( *rCpy.GetLeft() ) : 0;
+/*N*/ pRight = rCpy.GetRight() ? new SvxBorderLine( *rCpy.GetRight() ) : 0;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBoxItem::SvxBoxItem( const sal_uInt16 nId ) :
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ pTop ( 0 ),
+/*N*/ pBottom ( 0 ),
+/*N*/ pLeft ( 0 ),
+/*N*/ pRight ( 0 ),
+/*N*/ nTopDist ( 0 ),
+/*N*/ nBottomDist ( 0 ),
+/*N*/ nLeftDist ( 0 ),
+/*N*/ nRightDist ( 0 )
+/*N*/
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBoxItem::~SvxBoxItem()
+/*N*/ {
+/*N*/ delete pTop;
+/*N*/ delete pBottom;
+/*N*/ delete pLeft;
+/*N*/ delete pRight;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBoxItem& SvxBoxItem::operator=( const SvxBoxItem& rBox )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return *this;//STRIP001
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ 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;
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxBoxItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return (
+/*N*/ ( nTopDist == ( (SvxBoxItem&)rAttr ).nTopDist ) &&
+/*N*/ ( nBottomDist == ( (SvxBoxItem&)rAttr ).nBottomDist ) &&
+/*N*/ ( nLeftDist == ( (SvxBoxItem&)rAttr ).nLeftDist ) &&
+/*N*/ ( nRightDist == ( (SvxBoxItem&)rAttr ).nRightDist ) &&
+/*N*/ CmpBrdLn( pTop, ( (SvxBoxItem&)rAttr ).GetTop() ) &&
+/*N*/ CmpBrdLn( pBottom, ( (SvxBoxItem&)rAttr ).GetBottom() ) &&
+/*N*/ CmpBrdLn( pLeft, ( (SvxBoxItem&)rAttr ).GetLeft() ) &&
+/*N*/ CmpBrdLn( pRight, ( (SvxBoxItem&)rAttr ).GetRight() ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine, sal_Bool bConvert)
+/*N*/ {
+/*N*/ table::BorderLine aLine;
+/*N*/ if(pLine)
+/*N*/ {
+/*N*/ aLine.Color = pLine->GetColor().GetColor() ;
+/*N*/ aLine.InnerLineWidth = bConvert ? TWIP_TO_MM100(pLine->GetInWidth() ): pLine->GetInWidth() ;
+/*N*/ aLine.OuterLineWidth = bConvert ? TWIP_TO_MM100(pLine->GetOutWidth()): pLine->GetOutWidth() ;
+/*N*/ aLine.LineDistance = bConvert ? TWIP_TO_MM100(pLine->GetDistance()): pLine->GetDistance() ;
+/*N*/ }
+/*N*/ else
+/*N*/ aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0;
+/*N*/ return aLine;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ table::BorderLine aRetLine;
+/*N*/ sal_uInt16 nDist;
+/*N*/ sal_Bool bDistMember = sal_False;
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bSerialize = sal_False;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_LEFT_BORDER:
+/*N*/ bSerialize = sal_True; // intentionally no break!
+/*N*/ case LEFT_BORDER:
+/*N*/ aRetLine = lcl_SvxLineToLine(GetLeft(), bConvert);
+/*N*/ break;
+/*N*/ case MID_RIGHT_BORDER:
+/*N*/ bSerialize = sal_True; // intentionally no break!
+/*N*/ case RIGHT_BORDER:
+/*N*/ aRetLine = lcl_SvxLineToLine(GetRight(), bConvert);
+/*N*/ break;
+/*N*/ case MID_BOTTOM_BORDER:
+/*N*/ bSerialize = sal_True; // intentionally no break!
+/*N*/ case BOTTOM_BORDER:
+/*N*/ aRetLine = lcl_SvxLineToLine(GetBottom(), bConvert);
+/*N*/ break;
+/*N*/ case MID_TOP_BORDER:
+/*N*/ bSerialize = sal_True; // intentionally no break!
+/*N*/ case TOP_BORDER:
+/*N*/ aRetLine = lcl_SvxLineToLine(GetTop(), bConvert);
+/*N*/ break;
+/*N*/ case BORDER_DISTANCE:
+/*?*/ nDist = GetDistance();
+/*?*/ bDistMember = sal_True;
+/*?*/ break;
+/*N*/ case TOP_BORDER_DISTANCE:
+/*N*/ nDist = nTopDist;
+/*N*/ bDistMember = sal_True;
+/*N*/ break;
+/*N*/ case BOTTOM_BORDER_DISTANCE:
+/*N*/ nDist = nBottomDist;
+/*N*/ bDistMember = sal_True;
+/*N*/ break;
+/*N*/ case LEFT_BORDER_DISTANCE:
+/*N*/ nDist = nLeftDist;
+/*N*/ bDistMember = sal_True;
+/*N*/ break;
+/*N*/ case RIGHT_BORDER_DISTANCE:
+/*N*/ nDist = nRightDist;
+/*N*/ bDistMember = sal_True;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( bDistMember )
+/*N*/ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nDist) : nDist);
+/*N*/ else
+/*N*/ {
+/*
+ if ( bSerialize )
+ {
+ ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4);
+ aSeq[0] <<= aRetLine.Color;
+ aSeq[1] <<= aRetLine.InnerLineWidth;
+ aSeq[2] <<= aRetLine.OuterLineWidth;
+ aSeq[3] <<= aRetLine.LineDistance;
+ rVal <<= aSeq;
+ }
+ else
+*/
+/*N*/ rVal <<= aRetLine;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ sal_Bool lcl_LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
+/*N*/ {
+/*N*/ rSvxLine.SetColor( Color(rLine.Color));
+/*N*/ rSvxLine.SetInWidth( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth );
+/*N*/ rSvxLine.SetOutWidth(bConvert ? MM100_TO_TWIP(rLine.OuterLineWidth) : rLine.OuterLineWidth );
+/*N*/ rSvxLine.SetDistance(bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance );
+/*N*/ sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ sal_uInt16 nLine = BOX_LINE_TOP;
+/*N*/ sal_Bool bDistMember = sal_False;
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case LEFT_BORDER_DISTANCE:
+/*N*/ bDistMember = sal_True;
+/*N*/ case LEFT_BORDER:
+/*N*/ case MID_LEFT_BORDER:
+/*N*/ nLine = BOX_LINE_LEFT;
+/*N*/ break;
+/*N*/ case RIGHT_BORDER_DISTANCE:
+/*N*/ bDistMember = sal_True;
+/*N*/ case RIGHT_BORDER:
+/*N*/ case MID_RIGHT_BORDER:
+/*N*/ nLine = BOX_LINE_RIGHT;
+/*N*/ break;
+/*N*/ case BOTTOM_BORDER_DISTANCE:
+/*N*/ bDistMember = sal_True;
+/*N*/ case BOTTOM_BORDER:
+/*N*/ case MID_BOTTOM_BORDER:
+/*N*/ nLine = BOX_LINE_BOTTOM;
+/*N*/ break;
+/*N*/ case TOP_BORDER_DISTANCE:
+/*N*/ bDistMember = sal_True;
+/*N*/ case TOP_BORDER:
+/*N*/ case MID_TOP_BORDER:
+/*N*/ nLine = BOX_LINE_TOP;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( bDistMember || nMemberId == BORDER_DISTANCE )
+/*N*/ {
+/*N*/ sal_Int32 nDist;
+/*N*/ if(!(rVal >>= nDist))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ if(nDist >= 0)
+/*N*/ {
+/*N*/ if( bConvert )
+/*N*/ nDist = MM100_TO_TWIP(nDist);
+/*N*/ if( nMemberId == BORDER_DISTANCE )
+/*?*/ SetDistance( nDist );
+/*N*/ else
+/*N*/ SetDistance( nDist, nLine );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ SvxBorderLine aLine;
+/*N*/ if( !rVal.hasValue() )
+/*N*/ return sal_False;
+/*N*/
+/*N*/ table::BorderLine aBorderLine;
+/*N*/ if( rVal >>= aBorderLine )
+/*N*/ {
+/*N*/ // usual struct
+/*N*/ }
+/*N*/ else if (rVal.getValueTypeClass() == uno::TypeClass_SEQUENCE )
+/*N*/ {
+/*N*/ // serialization for basic macro recording
+/*?*/ uno::Reference < script::XTypeConverter > xConverter
+/*?*/ ( ::legacy_binfilters::getLegacyProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")),
+/*?*/ uno::UNO_QUERY );
+/*?*/ uno::Sequence < uno::Any > aSeq;
+/*?*/ uno::Any aNew;
+/*?*/ try { aNew = xConverter->convertTo( rVal, ::getCppuType((const uno::Sequence < uno::Any >*)0) ); }
+/*?*/ catch (uno::Exception&) {}
+/*?*/
+/*?*/ aNew >>= aSeq;
+/*?*/ if ( aSeq.getLength() == 4 )
+/*?*/ {
+/*?*/ sal_Int32 nVal;
+/*?*/ if ( aSeq[0] >>= nVal )
+/*?*/ aBorderLine.Color = nVal;
+/*?*/ if ( aSeq[1] >>= nVal )
+/*?*/ aBorderLine.InnerLineWidth = (sal_Int16) nVal;
+/*?*/ if ( aSeq[2] >>= nVal )
+/*?*/ aBorderLine.OuterLineWidth = (sal_Int16) nVal;
+/*?*/ if ( aSeq[3] >>= nVal )
+/*?*/ aBorderLine.LineDistance = (sal_Int16) nVal;
+/*?*/ }
+/*?*/ else
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ else
+/*N*/ return sal_False;
+/*N*/
+/*N*/ sal_Bool bSet = lcl_LineToSvxLine(aBorderLine, aLine, bConvert);
+/*N*/ SetLine(bSet ? &aLine : 0, nLine);
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBoxItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxBoxItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_uInt16) GetDistance();
+/*N*/ const SvxBorderLine* pLine[ 4 ]; // top, left, right, bottom
+/*N*/ pLine[ 0 ] = GetTop();
+/*N*/ pLine[ 1 ] = GetLeft();
+/*N*/ pLine[ 2 ] = GetRight();
+/*N*/ pLine[ 3 ] = GetBottom();
+/*N*/
+/*N*/ for( int i = 0; i < 4; i++ )
+/*N*/ {
+/*N*/ const SvxBorderLine* l = pLine[ i ];
+/*N*/ if( l )
+/*N*/ {
+/*N*/ rStrm << (sal_Int8) i
+/*N*/ << l->GetColor()
+/*N*/ << (sal_uInt16) l->GetOutWidth()
+/*N*/ << (sal_uInt16) l->GetInWidth()
+/*N*/ << (sal_uInt16) l->GetDistance();
+/*N*/ }
+/*N*/ }
+/*N*/ sal_Int8 cLine = 4;
+/*N*/ if( nItemVersion >= BOX_4DISTS_VERSION &&
+/*N*/ !(nTopDist == nLeftDist &&
+/*N*/ nTopDist == nRightDist &&
+/*N*/ nTopDist == nBottomDist) )
+/*N*/ {
+/*?*/ cLine |= 0x10;
+/*N*/ }
+/*N*/
+/*N*/ rStrm << cLine;
+/*N*/
+/*N*/ if( nItemVersion >= BOX_4DISTS_VERSION && (cLine & 0x10) != 0 )
+/*N*/ {
+/*N*/ rStrm << (sal_uInt16)nTopDist
+/*N*/ << (sal_uInt16)nLeftDist
+/*N*/ << (sal_uInt16)nRightDist
+/*?*/ << (sal_uInt16)nBottomDist;
+/*N*/ }
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxBoxItem::GetVersion( sal_uInt16 nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxBoxItem: Gibt es ein neues Fileformat?" );
+/*N*/ return SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ? 0 : BOX_4DISTS_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
+/*N*/ {
+/*N*/ sal_uInt16 nDistance;
+/*N*/ rStrm >> nDistance;
+/*N*/ SvxBoxItem* pAttr = new SvxBoxItem( Which() );
+/*N*/
+/*N*/ sal_uInt16 aLineMap[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
+/*N*/ BOX_LINE_RIGHT, BOX_LINE_BOTTOM };
+/*N*/
+/*N*/ sal_Int8 cLine;
+/*N*/ while( sal_True )
+/*N*/ {
+/*N*/ rStrm >> cLine;
+/*N*/
+/*N*/ if( cLine > 3 )
+/*N*/ break;
+/*N*/ sal_uInt16 nOutline, nInline, nDistance;
+/*N*/ Color aColor;
+/*N*/ rStrm >> aColor >> nOutline >> nInline >> nDistance;
+/*N*/ SvxBorderLine aBorder( &aColor, nOutline, nInline, nDistance );
+/*N*/
+/*N*/ pAttr->SetLine( &aBorder, aLineMap[cLine] );
+/*N*/ }
+/*N*/
+/*N*/ if( nIVersion >= BOX_4DISTS_VERSION && (cLine&0x10) != 0 )
+/*N*/ {
+/*N*/ for( sal_uInt16 i=0; i < 4; i++ )
+/*N*/ {
+/*?*/ sal_uInt16 nDist;
+/*?*/ rStrm >> nDist;
+/*?*/ pAttr->SetDistance( nDist, aLineMap[i] );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pAttr->SetDistance( nDistance );
+/*N*/ }
+/*N*/
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBoxItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine )
+/*N*/ {
+/*N*/ SvxBorderLine* pTmp = pNew ? new SvxBorderLine( *pNew ) : 0;
+/*N*/
+/*N*/ switch ( nLine )
+/*N*/ {
+/*N*/ case BOX_LINE_TOP:
+/*N*/ delete pTop;
+/*N*/ pTop = pTmp;
+/*N*/ break;
+/*N*/ case BOX_LINE_BOTTOM:
+/*N*/ delete pBottom;
+/*N*/ pBottom = pTmp;
+/*N*/ break;
+/*N*/ case BOX_LINE_LEFT:
+/*N*/ delete pLeft;
+/*N*/ pLeft = pTmp;
+/*N*/ break;
+/*N*/ case BOX_LINE_RIGHT:
+/*N*/ delete pRight;
+/*N*/ pRight = pTmp;
+/*N*/ break;
+/*N*/ default:
+/*N*/ if ( pTmp )
+/*N*/ delete pTmp;
+/*N*/ DBG_ERROR( "wrong line" );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxBoxItem::GetDistance() const
+/*N*/ {
+/*N*/ // The smallest distance that is not 0 will be returned.
+/*N*/ sal_uInt16 nDist = nTopDist;
+/*N*/ if( nBottomDist && (!nDist || nBottomDist < nDist) )
+/*N*/ nDist = nBottomDist;
+/*N*/ if( nLeftDist && (!nDist || nLeftDist < nDist) )
+/*N*/ nDist = nLeftDist;
+/*N*/ if( nRightDist && (!nDist || nRightDist < nDist) )
+/*N*/ nDist = nRightDist;
+/*N*/
+/*N*/ return nDist;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxBoxItem::GetDistance( sal_uInt16 nLine ) const
+/*N*/ {
+/*N*/ sal_uInt16 nDist = 0;
+/*N*/ switch ( nLine )
+/*N*/ {
+/*N*/ case BOX_LINE_TOP:
+/*N*/ nDist = nTopDist;
+/*N*/ break;
+/*N*/ case BOX_LINE_BOTTOM:
+/*N*/ nDist = nBottomDist;
+/*N*/ break;
+/*N*/ case BOX_LINE_LEFT:
+/*N*/ nDist = nLeftDist;
+/*N*/ break;
+/*N*/ case BOX_LINE_RIGHT:
+/*N*/ nDist = nRightDist;
+/*N*/ break;
+/*N*/ default:
+/*N*/ DBG_ERROR( "wrong line" );
+/*N*/ }
+/*N*/
+/*N*/ return nDist;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBoxItem::SetDistance( sal_uInt16 nNew, sal_uInt16 nLine )
+/*N*/ {
+/*N*/ switch ( nLine )
+/*N*/ {
+/*N*/ case BOX_LINE_TOP:
+/*N*/ nTopDist = nNew;
+/*N*/ break;
+/*N*/ case BOX_LINE_BOTTOM:
+/*N*/ nBottomDist = nNew;
+/*N*/ break;
+/*N*/ case BOX_LINE_LEFT:
+/*N*/ nLeftDist = nNew;
+/*N*/ break;
+/*N*/ case BOX_LINE_RIGHT:
+/*N*/ nRightDist = nNew;
+/*N*/ break;
+/*N*/ default:
+/*N*/ DBG_ERROR( "wrong line" );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxBoxItem::CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine ) const
+/*N*/ {
+/*N*/ SvxBorderLine* pTmp = 0;
+/*N*/ sal_uInt16 nDist = 0;
+/*N*/ switch ( nLine )
+/*N*/ {
+/*N*/ case BOX_LINE_TOP:
+/*N*/ pTmp = pTop;
+/*N*/ nDist = nTopDist;
+/*N*/ break;
+/*N*/ case BOX_LINE_BOTTOM:
+/*N*/ pTmp = pBottom;
+/*N*/ nDist = nBottomDist;
+/*N*/ break;
+/*N*/ case BOX_LINE_LEFT:
+/*N*/ pTmp = pLeft;
+/*N*/ nDist = nLeftDist;
+/*N*/ break;
+/*N*/ case BOX_LINE_RIGHT:
+/*N*/ pTmp = pRight;
+/*N*/ nDist = nRightDist;
+/*N*/ break;
+/*N*/ default:
+/*N*/ DBG_ERROR( "wrong line" );
+/*N*/ }
+/*N*/
+/*N*/ if( pTmp )
+/*N*/ {
+/*N*/ nDist += pTmp->GetOutWidth();
+/*N*/ nDist += pTmp->GetInWidth();
+/*N*/ nDist += pTmp->GetDistance();
+/*N*/ }
+/*N*/ else if( !bIgnoreLine )
+/*N*/ nDist = 0;
+/*N*/ return nDist;
+/*N*/ }
+
+// class SvxBoxInfoItem --------------------------------------------------
+
+/*N*/ SvxBoxInfoItem::SvxBoxInfoItem( const sal_uInt16 nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ pHori ( 0 ),
+/*N*/ pVert ( 0 ),
+/*N*/ nDefDist( 0 )
+/*N*/
+/*N*/ {
+/*N*/ bTable = bDist = bMinDist = sal_False;
+/*N*/ ResetFlags();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCpy ) :
+/*N*/
+/*N*/ SfxPoolItem( rCpy )
+/*N*/
+/*N*/ {
+/*N*/ pHori = rCpy.GetHori() ? new SvxBorderLine( *rCpy.GetHori() ) : 0;
+/*N*/ pVert = rCpy.GetVert() ? new SvxBorderLine( *rCpy.GetVert() ) : 0;
+/*N*/ bTable = rCpy.IsTable();
+/*N*/ bDist = rCpy.IsDist();
+/*N*/ bMinDist = rCpy.IsMinDist();
+/*N*/ nValidFlags = rCpy.nValidFlags;
+/*N*/ nDefDist = rCpy.GetDefDist();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBoxInfoItem::~SvxBoxInfoItem()
+/*N*/ {
+/*N*/ delete pHori;
+/*N*/ delete pVert;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxBoxInfoItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ SvxBoxInfoItem& rBoxInfo = (SvxBoxInfoItem&)rAttr;
+/*N*/
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return ( bTable == rBoxInfo.IsTable()
+/*N*/ && bDist == rBoxInfo.IsDist()
+/*N*/ && bMinDist == rBoxInfo.IsMinDist()
+/*N*/ && nValidFlags == rBoxInfo.nValidFlags
+/*N*/ && nDefDist == rBoxInfo.GetDefDist()
+/*N*/ && CmpBrdLn( pHori, rBoxInfo.GetHori() )
+/*N*/ && CmpBrdLn( pVert, rBoxInfo.GetVert() )
+/*N*/ );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBoxInfoItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine )
+/*N*/ {
+/*N*/ SvxBorderLine* pTmp = pNew ? new SvxBorderLine( *pNew ) : 0;
+/*N*/
+/*N*/ if ( BOXINFO_LINE_HORI == nLine )
+/*N*/ {
+/*N*/ delete pHori;
+/*N*/ pHori = pTmp;
+/*N*/ }
+/*N*/ else if ( BOXINFO_LINE_VERT == nLine )
+/*N*/ {
+/*N*/ delete pVert;
+/*N*/ pVert = pTmp;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if ( pTmp )
+/*N*/ delete pTmp;
+/*N*/ DBG_ERROR( "wrong line" );
+/*N*/ }
+/*N*/ }
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBoxInfoItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxBoxInfoItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ sal_Int8 cFlags = 0;
+/*N*/
+/*N*/ if ( IsTable() )
+/*N*/ cFlags |= 0x01;
+/*N*/ if ( IsDist() )
+/*N*/ cFlags |= 0x02;
+/*N*/ if ( IsMinDist() )
+/*N*/ cFlags |= 0x04;
+/*N*/ rStrm << (sal_Int8) cFlags
+/*N*/ << (sal_uInt16) GetDefDist();
+/*N*/ const SvxBorderLine* pLine[ 2 ];
+/*N*/ pLine[ 0 ] = GetHori();
+/*N*/ pLine[ 1 ] = GetVert();
+/*N*/
+/*N*/ for( int i = 0; i < 2; i++ )
+/*N*/ {
+/*N*/ const SvxBorderLine* l = pLine[ i ];
+/*N*/ if( l )
+/*N*/ {
+/*N*/ rStrm << (char) i
+/*N*/ << l->GetColor()
+/*N*/ << (short) l->GetOutWidth()
+/*N*/ << (short) l->GetInWidth()
+/*?*/ << (short) l->GetDistance();
+/*N*/ }
+/*N*/ }
+/*N*/ rStrm << (char) 2;
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 cFlags;
+/*N*/ sal_uInt16 nDefDist;
+/*N*/ rStrm >> cFlags >> nDefDist;
+/*N*/
+/*N*/ SvxBoxInfoItem* pAttr = new SvxBoxInfoItem( Which() );
+/*N*/
+/*N*/ pAttr->SetTable ( ( cFlags & 0x01 ) != 0 );
+/*N*/ pAttr->SetDist ( ( cFlags & 0x02 ) != 0 );
+/*N*/ pAttr->SetMinDist( ( cFlags & 0x04 ) != 0 );
+/*N*/ pAttr->SetDefDist( nDefDist );
+/*N*/
+/*N*/ while( sal_True )
+/*N*/ {
+/*N*/ sal_Int8 cLine;
+/*N*/ rStrm >> cLine;
+/*N*/
+/*N*/ if( cLine > 1 )
+/*N*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBoxInfoItem::ResetFlags()
+/*N*/ {
+/*N*/ nValidFlags = 0x7F; // alles g"ultig au/ser Disable
+/*N*/ }
+
+
+// -----------------------------------------------------------------------
+
+
+// class SvxFmtBreakItem -------------------------------------------------
+
+/*N*/ int SvxFmtBreakItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "unequal types" );
+/*N*/
+/*N*/ return GetValue() == ( (SvxFmtBreakItem&)rAttr ).GetValue();
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ style::BreakType eBreak = style::BreakType_NONE;
+/*N*/ switch ( (SvxBreak)GetValue() )
+/*N*/ {
+/*N*/ case SVX_BREAK_COLUMN_BEFORE: eBreak = style::BreakType_COLUMN_BEFORE; break;
+/*N*/ case SVX_BREAK_COLUMN_AFTER: eBreak = style::BreakType_COLUMN_AFTER ; break;
+/*N*/ case SVX_BREAK_COLUMN_BOTH: eBreak = style::BreakType_COLUMN_BOTH ; break;
+/*N*/ case SVX_BREAK_PAGE_BEFORE: eBreak = style::BreakType_PAGE_BEFORE ; break;
+/*N*/ case SVX_BREAK_PAGE_AFTER: eBreak = style::BreakType_PAGE_AFTER ; break;
+/*N*/ case SVX_BREAK_PAGE_BOTH: eBreak = style::BreakType_PAGE_BOTH ; break;
+/*N*/ }
+/*N*/ rVal <<= eBreak;
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ style::BreakType nBreak;
+/*N*/
+/*N*/ if(!(rVal >>= nBreak))
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ nBreak = (style::BreakType) nValue;
+/*N*/ }
+/*N*/
+/*N*/ SvxBreak eBreak = SVX_BREAK_NONE;
+/*N*/ switch( nBreak )
+/*N*/ {
+/*N*/ 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;
+/*N*/ 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;
+/*N*/ }
+/*N*/ SetValue((sal_uInt16) eBreak);
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFmtBreakItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxFmtBreakItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxFmtBreakItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8)GetValue();
+/*N*/ if( FMTBREAK_NOAUTO > nItemVersion )
+/*N*/ rStrm << (sal_Int8)0x01;
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxFmtBreakItem::GetVersion( sal_uInt16 nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxFmtBreakItem: Gibt es ein neues Fileformat?" );
+/*N*/ return SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ? 0 : FMTBREAK_NOAUTO;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFmtBreakItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+/*N*/ {
+/*N*/ sal_Int8 eBreak, bDummy;
+/*N*/ rStrm >> eBreak;
+/*N*/ if( FMTBREAK_NOAUTO > nVersion )
+/*N*/ rStrm >> bDummy;
+/*N*/ return new SvxFmtBreakItem( (const SvxBreak)eBreak, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxFmtBreakItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_BREAK_END; // SVX_BREAK_PAGE_BOTH + 1
+/*?*/ }
+
+// class SvxFmtKeepItem -------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFmtKeepItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxFmtKeepItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxFmtKeepItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFmtKeepItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 bIsKeep;
+/*N*/ rStrm >> bIsKeep;
+/*N*/ return new SvxFmtKeepItem( sal_Bool( bIsKeep != 0 ), Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxLineItem ------------------------------------------------------
+
+/*?*/ SvxLineItem::SvxLineItem( const sal_uInt16 nId ) :
+/*?*/
+/*?*/ SfxPoolItem ( nId ),
+/*?*/
+/*?*/ pLine( NULL )
+/*?*/ {
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxLineItem::operator==( const SfxPoolItem& rAttr ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*?*/
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ SfxPoolItem* SvxLineItem::Clone( SfxItemPool* ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 return new SvxLineItem( *this );
+/*?*/ }
+
+
+// -----------------------------------------------------------------------
+
+#ifdef _MSC_VER
+#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:
+ BfGraphicObject* pGraphicObject;
+ sal_Int8 nGraphicTransparency; //contains a percentage value which is
+ //copied to the GraphicObject when necessary
+#ifndef SVX_LIGHT
+ SfxMediumRef xMedium;
+#endif
+ Link aDoneLink;
+
+ SvxBrushItem_Impl( BfGraphicObject* p ) : pGraphicObject( p ), nGraphicTransparency(0) {}
+};
+
+// 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)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); Graphic aResult; return aResult;//STRIP001 Graphic aResult;
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ CreateSvxBrushTabPage SvxBrushItemLink_Impl::GetBackgroundTabpageCreateFunc()
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 #ifndef SVX_LIGHT
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ GetSvxBrushTabPageRanges SvxBrushItemLink_Impl::GetBackgroundTabpageRanges()
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 #ifndef SVX_LIGHT
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBrushItem::InitSfxLink()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem( sal_uInt16 nWhich ) :
+/*N*/
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/
+/*N*/ aColor ( COL_TRANSPARENT ),
+/*N*/ pImpl ( new SvxBrushItem_Impl( 0 ) ),
+/*N*/ pStrLink ( NULL ),
+/*N*/ pStrFilter ( NULL ),
+/*N*/ eGraphicPos ( GPOS_NONE ),
+/*N*/ bLoadAgain ( sal_True )
+/*N*/
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem( const Color& rColor, sal_uInt16 nWhich) :
+/*N*/
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/
+/*N*/ aColor ( rColor ),
+/*N*/ pImpl ( new SvxBrushItem_Impl( 0 ) ),
+/*N*/ pStrLink ( NULL ),
+/*N*/ pStrFilter ( NULL ),
+/*N*/ eGraphicPos ( GPOS_NONE ),
+/*N*/ bLoadAgain ( sal_True )
+/*N*/
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem( const Graphic& rGraphic, SvxGraphicPosition ePos,
+/*N*/ sal_uInt16 nWhich ) :
+/*N*/
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/
+/*N*/ aColor ( COL_TRANSPARENT ),
+/*N*/ pImpl ( new SvxBrushItem_Impl( new BfGraphicObject( rGraphic ) ) ),
+/*N*/ pStrLink ( NULL ),
+/*N*/ pStrFilter ( NULL ),
+/*N*/ eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
+/*N*/ bLoadAgain ( sal_True )
+/*N*/
+/*N*/ {
+/*N*/ DBG_ASSERT( GPOS_NONE != ePos, "SvxBrushItem-Ctor with GPOS_NONE == ePos" );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem( const BfGraphicObject& rGraphicObj,
+/*N*/ SvxGraphicPosition ePos, sal_uInt16 nWhich ) :
+/*N*/
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/
+/*N*/ aColor ( COL_TRANSPARENT ),
+/*N*/ pImpl ( new SvxBrushItem_Impl( new BfGraphicObject( rGraphicObj ) ) ),
+/*N*/ pStrLink ( NULL ),
+/*N*/ pStrFilter ( NULL ),
+/*N*/ eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
+/*N*/ bLoadAgain ( sal_True )
+/*N*/
+/*N*/ {
+/*N*/ DBG_ASSERT( GPOS_NONE != ePos, "SvxBrushItem-Ctor with GPOS_NONE == ePos" );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem(
+/*N*/ const String& rLink, const String& rFilter,
+/*N*/ SvxGraphicPosition ePos, sal_uInt16 nWhich ) :
+/*N*/
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/
+/*N*/ aColor ( COL_TRANSPARENT ),
+/*N*/ pImpl ( new SvxBrushItem_Impl( NULL ) ),
+/*N*/ pStrLink ( new String( rLink ) ),
+/*N*/ pStrFilter ( new String( rFilter ) ),
+/*N*/ eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
+/*N*/ bLoadAgain ( sal_True )
+/*N*/
+/*N*/ {
+/*N*/ DBG_ASSERT( GPOS_NONE != ePos, "SvxBrushItem-Ctor with GPOS_NONE == ePos" );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion,
+/*N*/ sal_uInt16 nWhich ) :
+/*N*/
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/
+/*N*/ aColor ( COL_TRANSPARENT ),
+/*N*/ pImpl ( new SvxBrushItem_Impl( NULL ) ),
+/*N*/ pStrLink ( NULL ),
+/*N*/ pStrFilter ( NULL ),
+/*N*/ eGraphicPos ( GPOS_NONE )
+/*N*/
+/*N*/ {
+/*N*/ sal_Bool bTrans;
+/*N*/ Color aTempColor;
+/*N*/ Color aTempFillColor;
+/*N*/ sal_Int8 nStyle;
+/*N*/
+/*N*/ rStream >> bTrans;
+/*N*/ rStream >> aTempColor;
+/*N*/ rStream >> aTempFillColor;
+/*N*/ rStream >> nStyle;
+/*N*/
+/*N*/ switch ( nStyle )
+/*N*/ {
+/*N*/ case 8://BRUSH_25:
+/*N*/ {
+/*N*/ sal_uInt32 nRed = aTempColor.GetRed();
+/*N*/ sal_uInt32 nGreen = aTempColor.GetGreen();
+/*N*/ sal_uInt32 nBlue = aTempColor.GetBlue();
+/*N*/ nRed += (sal_uInt32)(aTempFillColor.GetRed())*2;
+/*N*/ nGreen += (sal_uInt32)(aTempFillColor.GetGreen())*2;
+/*N*/ nBlue += (sal_uInt32)(aTempFillColor.GetBlue())*2;
+/*N*/ aColor = Color( (sal_Int8)(nRed/3), (sal_Int8)(nGreen/3), (sal_Int8)(nBlue/3) );
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case 9://BRUSH_50:
+/*N*/ {
+/*N*/ sal_uInt32 nRed = aTempColor.GetRed();
+/*N*/ sal_uInt32 nGreen = aTempColor.GetGreen();
+/*N*/ sal_uInt32 nBlue = aTempColor.GetBlue();
+/*N*/ nRed += (sal_uInt32)(aTempFillColor.GetRed());
+/*N*/ nGreen += (sal_uInt32)(aTempFillColor.GetGreen());
+/*N*/ nBlue += (sal_uInt32)(aTempFillColor.GetBlue());
+/*N*/ aColor = Color( (sal_Int8)(nRed/2), (sal_Int8)(nGreen/2), (sal_Int8)(nBlue/2) );
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case 10://BRUSH_75:
+/*N*/ {
+/*N*/ sal_uInt32 nRed = aTempColor.GetRed()*2;
+/*N*/ sal_uInt32 nGreen = aTempColor.GetGreen()*2;
+/*N*/ sal_uInt32 nBlue = aTempColor.GetBlue()*2;
+/*N*/ nRed += (sal_uInt32)(aTempFillColor.GetRed());
+/*N*/ nGreen += (sal_uInt32)(aTempFillColor.GetGreen());
+/*N*/ nBlue += (sal_uInt32)(aTempFillColor.GetBlue());
+/*N*/ aColor = Color( (sal_Int8)(nRed/3), (sal_Int8)(nGreen/3), (sal_Int8)(nBlue/3) );
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case 0://BRUSH_NULL:
+/*N*/ aColor = Color( COL_TRANSPARENT );
+/*N*/ break;
+/*N*/
+/*N*/ default:
+/*N*/ aColor = aTempColor;
+/*N*/ }
+/*N*/
+/*N*/ if ( nVersion >= BRUSH_GRAPHIC_VERSION )
+/*N*/ {
+/*N*/ sal_uInt16 nDoLoad = 0;
+/*N*/ sal_Int8 nPos;
+/*N*/
+/*N*/ rStream >> nDoLoad;
+/*N*/
+/*N*/ if ( nDoLoad & LOAD_GRAPHIC )
+/*N*/ {
+/*N*/ Graphic aGraphic;
+/*N*/
+/*N*/ rStream >> aGraphic;
+/*N*/ pImpl->pGraphicObject = new BfGraphicObject( aGraphic );
+/*N*/
+/*N*/ if( SVSTREAM_FILEFORMAT_ERROR == rStream.GetError() )
+/*N*/ {
+/*?*/ rStream.ResetError();
+/*?*/ rStream.SetError( ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT|
+/*?*/ ERRCODE_WARNING_MASK );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( nDoLoad & LOAD_LINK )
+/*N*/ {
+/*N*/ String aRel;
+/*N*/ // UNICODE: rStream >> aRel;
+/*N*/ rStream.ReadByteString(aRel);
+/*N*/
+/*N*/ String aAbs = ::binfilter::StaticBaseUrl::RelToAbs( aRel );
+/*N*/ pStrLink = new String( aAbs );
+/*N*/ }
+/*N*/
+/*N*/ if ( nDoLoad & LOAD_FILTER )
+/*N*/ {
+/*N*/ pStrFilter = new String;
+/*N*/ // UNICODE: rStream >> *pStrFilter;
+/*N*/ rStream.ReadByteString(*pStrFilter);
+/*N*/ }
+/*N*/
+/*N*/ rStream >> nPos;
+/*N*/
+/*N*/ eGraphicPos = (SvxGraphicPosition)nPos;
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::SvxBrushItem( const SvxBrushItem& rItem ) :
+/*N*/
+/*N*/ SfxPoolItem( rItem.Which() ),
+/*N*/
+/*N*/ pImpl ( new SvxBrushItem_Impl( NULL ) ),
+/*N*/ pStrLink ( NULL ),
+/*N*/ pStrFilter ( NULL ),
+/*N*/ eGraphicPos ( GPOS_NONE ),
+/*N*/ bLoadAgain ( sal_True )
+/*N*/
+/*N*/ {
+/*N*/ *this = rItem;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem::~SvxBrushItem()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( pImpl->xMedium.Is() )
+/*?*/ pImpl->xMedium->SetDoneLink( Link() );
+/*N*/ #endif
+/*N*/ delete pImpl->pGraphicObject;
+/*N*/ delete pImpl;
+/*N*/ delete pStrLink;
+/*N*/ delete pStrFilter;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxBrushItem::GetVersion( sal_uInt16 nFileVersion ) const
+/*N*/ {
+/*N*/ return BRUSH_GRAPHIC_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*?*/ inline sal_Int8 lcl_PercentToTransparency(long nPercent)
+/*?*/ {
+/*?*/ //0xff must not be returned!
+/*?*/ return sal_Int8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0);
+/*?*/ }
+/*?*/ inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans)
+/*?*/ {
+/*?*/ return (nTrans * 100 + 127) / 254;
+/*?*/ }
+
+/*N*/ bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId)
+/*N*/ {
+/*N*/ case MID_BACK_COLOR:
+/*N*/ rVal <<= (sal_Int32)( aColor.GetColor() );
+/*N*/ break;
+/*N*/ case MID_BACK_COLOR_R_G_B:
+/*N*/ rVal <<= (sal_Int32)( aColor.GetRGBColor() );
+/*N*/ break;
+/*N*/ case MID_BACK_COLOR_TRANSPARENCY:
+/*N*/ rVal <<= lcl_TransparencyToPercent(aColor.GetTransparency());
+/*N*/ break;
+/*N*/ case MID_GRAPHIC_POSITION:
+/*N*/ rVal <<= (style::GraphicLocation)(sal_Int16)eGraphicPos;
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC:
+/*N*/ DBG_ERRORFILE( "not implemented" );
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_TRANSPARENT:
+/*N*/ rVal = Bool2Any( aColor.GetTransparency() == 0xff );
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_URL:
+/*N*/ {
+/*N*/ OUString sLink;
+/*N*/ if ( pStrLink )
+/*N*/ sLink = *pStrLink;
+/*N*/ else if( pImpl->pGraphicObject )
+/*N*/ {
+/*N*/ OUString sPrefix(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+/*N*/ String sId( pImpl->pGraphicObject->GetUniqueID(),
+/*N*/ RTL_TEXTENCODING_ASCII_US );
+/*N*/ sLink = sPrefix;
+/*N*/ sLink += OUString(sId);
+/*N*/ }
+/*N*/ rVal <<= sLink;
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_FILTER:
+/*N*/ {
+/*N*/ OUString sFilter;
+/*N*/ if ( pStrFilter )
+/*N*/ sFilter = *pStrFilter;
+/*N*/ rVal <<= sFilter;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_GRAPHIC_TRANSPARENCY :
+/*N*/ rVal <<= pImpl->nGraphicTransparency;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId)
+/*N*/ {
+/*N*/ case MID_BACK_COLOR:
+/*N*/ case MID_BACK_COLOR_R_G_B:
+/*N*/ {
+/*N*/ sal_Int32 nCol;
+/*N*/ if ( !( rVal >>= nCol ) )
+/*N*/ return sal_False;
+/*N*/ if(MID_BACK_COLOR_R_G_B == nMemberId)
+/*N*/ {
+/*N*/ nCol = COLORDATA_RGB( nCol );
+/*N*/ nCol += aColor.GetColor() & 0xff000000;
+/*N*/ }
+/*N*/ aColor = Color( nCol );
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_BACK_COLOR_TRANSPARENCY:
+/*N*/ {
+/*N*/ sal_Int32 nTrans;
+/*N*/ if ( !( rVal >>= nTrans ) || nTrans < 0 || nTrans > 100 )
+/*N*/ return sal_False;
+/*N*/ aColor.SetTransparency(lcl_PercentToTransparency(nTrans));
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_POSITION:
+/*N*/ {
+/*N*/ style::GraphicLocation eLocation;
+/*N*/ if ( !( rVal>>=eLocation ) )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*?*/ if ( !( rVal >>= nValue ) )
+/*?*/ return sal_False;
+/*?*/ eLocation = (style::GraphicLocation)nValue;
+/*N*/ }
+/*N*/ SetGraphicPos( (SvxGraphicPosition)(sal_uInt16)eLocation );
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC:
+/*N*/ DBG_ERRORFILE( "not implemented" );
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_TRANSPARENT:
+/*N*/ aColor.SetTransparency( Any2Bool( rVal ) ? 0xff : 0 );
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_URL:
+/*N*/ {
+/*N*/ if ( rVal.getValueType() == ::getCppuType( (OUString*)0 ) )
+/*N*/ {
+/*N*/ OUString sLink;
+/*N*/ rVal >>= sLink;
+/*N*/ if( 0 == sLink.compareToAscii( UNO_NAME_GRAPHOBJ_URLPKGPREFIX,
+/*N*/ sizeof(UNO_NAME_GRAPHOBJ_URLPKGPREFIX)-1 ) )
+/*N*/ {
+/*N*/ DBG_ERROR( "package urls aren't implemented" );
+/*N*/ }
+/*N*/ else if( 0 == sLink.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX,
+/*N*/ sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1 ) )
+/*N*/ {
+/*N*/ DELETEZ( pStrLink );
+/*N*/ String sTmp( sLink );
+/*N*/ ByteString sId( sTmp.Copy(
+/*N*/ sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1),
+/*N*/ RTL_TEXTENCODING_ASCII_US );
+/*N*/ BfGraphicObject *pOldGrfObj = pImpl->pGraphicObject;
+/*N*/ pImpl->pGraphicObject = new BfGraphicObject( sId );
+/*N*/ ApplyGraphicTransparency_Impl();
+/*N*/ delete pOldGrfObj;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ SetGraphicLink(sLink);
+/*N*/ }
+/*N*/ if ( sLink.getLength() && eGraphicPos == GPOS_NONE )
+/*N*/ eGraphicPos = GPOS_MM;
+/*N*/ else if( !sLink.getLength() )
+/*N*/ eGraphicPos = GPOS_NONE;
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case MID_GRAPHIC_FILTER:
+/*N*/ {
+/*N*/ if( rVal.getValueType() == ::getCppuType( (OUString*)0 ) )
+/*N*/ {
+/*N*/ OUString sLink;
+/*N*/ rVal >>= sLink;
+/*N*/ SetGraphicFilter( sLink );
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_GRAPHIC_TRANSPARENCY :
+/*N*/ {
+/*N*/ sal_Int32 nTmp;
+/*N*/ rVal >>= nTmp;
+/*N*/ if(nTmp >= 0 && nTmp <= 100)
+/*N*/ {
+/*N*/ pImpl->nGraphicTransparency = sal_Int8(nTmp);
+/*N*/ if(pImpl->pGraphicObject)
+/*N*/ ApplyGraphicTransparency_Impl();
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxBrushItem& SvxBrushItem::operator=( const SvxBrushItem& rItem )
+/*N*/ {
+/*N*/ aColor = rItem.aColor;
+/*N*/ eGraphicPos = rItem.eGraphicPos;
+/*N*/
+/*N*/ DELETEZ( pImpl->pGraphicObject );
+/*N*/ DELETEZ( pStrLink );
+/*N*/ DELETEZ( pStrFilter );
+/*N*/
+/*N*/ if ( GPOS_NONE != eGraphicPos )
+/*N*/ {
+/*N*/ if ( rItem.pStrLink )
+/*N*/ pStrLink = new String( *rItem.pStrLink );
+/*N*/ if ( rItem.pStrFilter )
+/*N*/ pStrFilter = new String( *rItem.pStrFilter );
+/*N*/ if ( rItem.pImpl->pGraphicObject )
+/*N*/ {
+/*N*/ pImpl->pGraphicObject = new BfGraphicObject( *rItem.pImpl->pGraphicObject );
+/*N*/ }
+/*N*/ }
+/*N*/ pImpl->nGraphicTransparency = rItem.pImpl->nGraphicTransparency;
+/*N*/ return *this;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ SvxBrushItem& rCmp = (SvxBrushItem&)rAttr;
+/*N*/ sal_Bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos &&
+/*N*/ pImpl->nGraphicTransparency == rCmp.pImpl->nGraphicTransparency);
+/*N*/
+/*N*/ if ( bEqual )
+/*N*/ {
+/*N*/ if ( GPOS_NONE != eGraphicPos )
+/*N*/ {
+/*N*/ if ( !rCmp.pStrLink )
+/*N*/ bEqual = !pStrLink;
+/*N*/ else
+/*N*/ bEqual = pStrLink && ( *pStrLink == *rCmp.pStrLink );
+/*N*/
+/*N*/ if ( bEqual )
+/*N*/ {
+/*N*/ if ( !rCmp.pStrFilter )
+/*N*/ bEqual = !pStrFilter;
+/*N*/ else
+/*N*/ bEqual = pStrFilter && ( *pStrFilter == *rCmp.pStrFilter );
+/*N*/ }
+/*N*/
+/*N*/ if ( bEqual && !rCmp.pStrLink )
+/*N*/ {
+/*N*/ if ( !rCmp.pImpl->pGraphicObject )
+/*?*/ bEqual = !pImpl->pGraphicObject;
+/*N*/ else
+/*N*/ bEqual = pImpl->pGraphicObject &&
+/*N*/ ( *pImpl->pGraphicObject == *rCmp.pImpl->pGraphicObject );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bEqual;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBrushItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxBrushItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBrushItem::Create( SvStream& rStream, sal_uInt16 nVersion ) const
+/*N*/ {
+/*N*/ return new SvxBrushItem( rStream, nVersion, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStream << (sal_Bool)sal_False;
+/*N*/ rStream << aColor;
+/*N*/ rStream << aColor;
+/*N*/ rStream << (sal_Int8)(aColor.GetTransparency() > 0 ? 0 : 1); //BRUSH_NULL : BRUSH_SOLID
+/*N*/
+/*N*/ sal_uInt16 nDoLoad = 0;
+/*N*/
+/*N*/ if ( pImpl->pGraphicObject && !pStrLink )
+/*N*/ nDoLoad |= LOAD_GRAPHIC;
+/*N*/ if ( pStrLink )
+/*N*/ nDoLoad |= LOAD_LINK;
+/*N*/ if ( pStrFilter )
+/*N*/ nDoLoad |= LOAD_FILTER;
+/*N*/ rStream << nDoLoad;
+/*N*/
+/*N*/ if ( pImpl->pGraphicObject && !pStrLink )
+/*N*/ rStream << pImpl->pGraphicObject->GetGraphic();
+/*N*/ if ( pStrLink )
+/*N*/ {
+/*N*/ String aRel = ::binfilter::StaticBaseUrl::AbsToRel( *pStrLink );
+/*N*/ // UNICODE: rStream << aRel;
+/*N*/ rStream.WriteByteString(aRel);
+/*N*/ }
+/*N*/ if ( pStrFilter )
+/*N*/ {
+/*N*/ // UNICODE: rStream << *pStrFilter;
+/*?*/ rStream.WriteByteString(*pStrFilter);
+/*N*/ }
+/*N*/ rStream << (sal_Int8)eGraphicPos;
+/*N*/ return rStream;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+// 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();
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ const BfGraphicObject* SvxBrushItem::GetGraphicObject( SfxObjectShell* pSh ) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( bLoadAgain && pStrLink && !pImpl->pGraphicObject && !pImpl->xMedium.Is() )
+/*N*/ // wenn Grafik schon geladen, als Cache benutzen
+/*N*/ {
+/*?*/ if( pSh && pSh->IsAbortingImport() )
+/*?*/ {
+/*?*/ SvxBrushItem* pThis = (SvxBrushItem*)this;
+/*?*/ pThis->bLoadAgain = sal_False;
+/*?*/ return 0;
+/*?*/ }
+/*?*/ //JP 29.6.2001: only with "valid" names - empty names now allowed
+/*?*/ if( pStrLink->Len() )
+/*?*/ {
+/*?*/ 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
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ pImpl->xMedium->DownLoad( );
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ #endif
+/*N*/ return pImpl->pGraphicObject;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ const Graphic* SvxBrushItem::GetGraphic( SfxObjectShell* pSh ) const
+/*N*/ {
+/*N*/ const BfGraphicObject* pGrafObj = GetGraphicObject( pSh );
+/*N*/ return( pGrafObj ? &( pGrafObj->GetGraphic() ) : NULL );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBrushItem::SetGraphicPos( SvxGraphicPosition eNew )
+/*N*/ {
+/*N*/ eGraphicPos = eNew;
+/*N*/
+/*N*/ if ( GPOS_NONE == eGraphicPos )
+/*N*/ {
+/*N*/ DELETEZ( pImpl->pGraphicObject );
+/*N*/ DELETEZ( pStrLink );
+/*N*/ DELETEZ( pStrFilter );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if ( !pImpl->pGraphicObject && !pStrLink )
+/*N*/ {
+/*N*/ pImpl->pGraphicObject = new BfGraphicObject; // dummy anlegen
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBrushItem::SetGraphic( const Graphic& rNew )
+/*N*/ {
+/*N*/ if ( !pStrLink )
+/*N*/ {
+/*N*/ if ( pImpl->pGraphicObject )
+/*N*/ pImpl->pGraphicObject->SetGraphic( rNew );
+/*N*/ else
+/*N*/ pImpl->pGraphicObject = new BfGraphicObject( rNew );
+/*N*/
+/*N*/ ApplyGraphicTransparency_Impl();
+/*N*/
+/*N*/ if ( GPOS_NONE == eGraphicPos )
+/*N*/ eGraphicPos = GPOS_MM; // None waere Brush, also Default: Mitte
+/*N*/ }
+/*N*/ else
+/*N*/ DBG_ERROR( "SetGraphic() on linked graphic! :-/" );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBrushItem::SetGraphicLink( const String& rNew )
+/*N*/ {
+/*N*/ if ( !rNew.Len() )
+/*N*/ DELETEZ( pStrLink );
+/*N*/ else
+/*N*/ {
+/*N*/ if ( pStrLink )
+/*N*/ *pStrLink = rNew;
+/*N*/ else
+/*N*/ pStrLink = new String( rNew );
+/*N*/
+/*N*/ DELETEZ( pImpl->pGraphicObject );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxBrushItem::SetGraphicFilter( const String& rNew )
+/*N*/ {
+/*N*/ if ( !rNew.Len() )
+/*N*/ DELETEZ( pStrFilter );
+/*N*/ else
+/*N*/ {
+/*?*/ if ( pStrFilter )
+/*?*/ *pStrFilter = rNew;
+/*?*/ else
+/*?*/ pStrFilter = new String( rNew );
+/*N*/ }
+/*N*/ }
+
+#ifdef _MSC_VER
+#pragma optimize ( "", on )
+#endif
+/* -----------------------------16.08.2002 09:18------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ void SvxBrushItem::ApplyGraphicTransparency_Impl()
+/*N*/ {
+/*N*/ DBG_ASSERT(pImpl->pGraphicObject, "no GraphicObject available" );
+/*N*/ if(pImpl->pGraphicObject)
+/*N*/ {
+/*N*/ BfGraphicAttr aAttr(pImpl->pGraphicObject->GetAttr());
+/*N*/ aAttr.SetTransparency(lcl_PercentToTransparency(
+/*N*/ pImpl->nGraphicTransparency));
+/*N*/ pImpl->pGraphicObject->SetAttr(aAttr);
+/*N*/ }
+/*N*/ }
+// class SvxFrameDirectionItem ----------------------------------------------
+
+/*N*/ SvxFrameDirectionItem::SvxFrameDirectionItem( SvxFrameDirection nValue ,
+/*N*/ USHORT nWhich )
+/*N*/ : SfxUInt16Item( nWhich, nValue )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxFrameDirectionItem::~SvxFrameDirectionItem()
+/*N*/ {
+/*N*/ }
+
+/*N*/ int SvxFrameDirectionItem::operator==( const SfxPoolItem& rCmp ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rCmp), "unequal types" );
+/*N*/
+/*N*/ return GetValue() == ((SvxFrameDirectionItem&)rCmp).GetValue();
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxFrameDirectionItem( *this );
+/*N*/ }
+
+SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, USHORT /*nVer*/ ) const
+{
+ sal_uInt16 nValue;
+ rStrm >> nValue;
+ return new SvxFrameDirectionItem( (SvxFrameDirection)nValue, Which() );
+}
+
+/*N*/ SvStream& SvxFrameDirectionItem::Store( SvStream & rStrm, USHORT nIVer ) const
+/*N*/ {
+/*N*/ sal_uInt16 nValue = GetValue();
+/*N*/ rStrm << nValue;
+/*N*/ return rStrm;
+/*N*/ }
+
+/*N*/ USHORT SvxFrameDirectionItem::GetVersion( USHORT nFVer ) const
+/*N*/ {
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+
+/*N*/ bool SvxFrameDirectionItem::PutValue( const ::com::sun::star::uno::Any& rVal,
+/*N*/ BYTE )
+/*N*/ {
+/*N*/ sal_Int16 nVal;
+/*N*/ sal_Bool bRet = ( rVal >>= nVal );
+/*N*/ if( bRet )
+/*N*/ {
+/*N*/ // translate WritingDirection2 constants into SvxFrameDirection
+/*N*/ switch( nVal )
+/*N*/ {
+/*N*/ case text::WritingMode2::LR_TB:
+/*N*/ SetValue( FRMDIR_HORI_LEFT_TOP );
+/*N*/ break;
+/*N*/ case text::WritingMode2::RL_TB:
+/*?*/ SetValue( FRMDIR_HORI_RIGHT_TOP );
+/*?*/ break;
+/*?*/ case text::WritingMode2::TB_RL:
+/*?*/ SetValue( FRMDIR_VERT_TOP_RIGHT );
+/*?*/ break;
+/*?*/ case text::WritingMode2::TB_LR:
+/*?*/ SetValue( FRMDIR_VERT_TOP_LEFT );
+/*?*/ break;
+/*?*/ case text::WritingMode2::PAGE:
+/*?*/ SetValue( FRMDIR_ENVIRONMENT );
+/*?*/ break;
+/*?*/ default:
+/*?*/ bRet = sal_False;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ bool SvxFrameDirectionItem::QueryValue( ::com::sun::star::uno::Any& rVal,
+/*N*/ BYTE ) const
+/*N*/ {
+/*N*/ // translate SvxFrameDirection into WritingDirection2
+/*N*/ sal_Int16 nVal;
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/ switch( GetValue() )
+/*N*/ {
+/*N*/ case FRMDIR_HORI_LEFT_TOP:
+/*N*/ nVal = text::WritingMode2::LR_TB;
+/*N*/ break;
+/*?*/ case FRMDIR_HORI_RIGHT_TOP:
+/*?*/ nVal = text::WritingMode2::RL_TB;
+/*?*/ break;
+/*?*/ case FRMDIR_VERT_TOP_RIGHT:
+/*?*/ nVal = text::WritingMode2::TB_RL;
+/*?*/ break;
+/*?*/ case FRMDIR_VERT_TOP_LEFT:
+/*?*/ nVal = text::WritingMode2::TB_LR;
+/*?*/ break;
+/*?*/ case FRMDIR_ENVIRONMENT:
+/*?*/ nVal = text::WritingMode2::PAGE;
+/*?*/ break;
+/*?*/ default:
+/*?*/ DBG_ERROR("Unknown SvxFrameDirection value!");
+/*?*/ bRet = sal_False;
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ // return value + error state
+/*N*/ if( bRet )
+/*N*/ {
+/*N*/ rVal <<= nVal;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_grfitem.cxx b/binfilter/bf_svx/source/items/svx_grfitem.cxx
new file mode 100644
index 000000000000..6401ecec5541
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_grfitem.cxx
@@ -0,0 +1,175 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define ITEMID_GRF_CROP 0
+
+#include <tools/stream.hxx>
+#include <grfcrop.hxx>
+#include <com/sun/star/text/GraphicCrop.hpp>
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+#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))
+//TYPEINIT1_AUTOFACTORY( SvxGrfCrop, SfxPoolItem )
+
+/******************************************************************************
+ * Implementierung class SwCropGrf
+ ******************************************************************************/
+
+/*N*/ SvxGrfCrop::SvxGrfCrop( USHORT nItemId )
+/*N*/ : SfxPoolItem( nItemId ),
+/*N*/ nLeft( 0 ), nRight( 0 ), nTop( 0 ), nBottom( 0 )
+/*N*/ {}
+
+/*N*/ SvxGrfCrop::SvxGrfCrop( sal_Int32 nL, sal_Int32 nR,
+/*N*/ sal_Int32 nT, sal_Int32 nB, USHORT nItemId )
+/*N*/ : SfxPoolItem( nItemId ),
+/*N*/ nLeft( nL ), nRight( nR ), nTop( nT ), nBottom( nB )
+/*N*/ {}
+
+/*N*/ SvxGrfCrop::~SvxGrfCrop()
+/*N*/ {
+/*N*/ }
+
+/*N*/ int SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "not equal attributes" );
+/*N*/ return nLeft == ((const SvxGrfCrop&)rAttr).GetLeft() &&
+/*N*/ nRight == ((const SvxGrfCrop&)rAttr).GetRight() &&
+/*N*/ nTop == ((const SvxGrfCrop&)rAttr).GetTop() &&
+/*N*/ nBottom == ((const SvxGrfCrop&)rAttr).GetBottom();
+/*N*/ }
+
+/*
+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;
+}
+*/
+
+/*N*/ SfxPoolItem* SvxGrfCrop::Create( SvStream& rStrm, USHORT nVersion ) const
+/*N*/ {
+/*N*/ INT32 top, left, right, bottom;
+/*N*/ rStrm >> top >> left >> right >> bottom;
+/*N*/
+/*N*/ if( GRFCROP_VERSION_SWDEFAULT == nVersion )
+/*N*/ top = -top, bottom = -bottom, left = -left, right = -right;
+/*N*/
+/*N*/ SvxGrfCrop* pNew = (SvxGrfCrop*)Clone();
+/*N*/ pNew->SetLeft( left );
+/*N*/ pNew->SetRight( right );
+/*N*/ pNew->SetTop( top );
+/*N*/ pNew->SetBottom( bottom );
+/*N*/ return pNew;
+/*N*/ }
+
+
+/*N*/ SvStream& SvxGrfCrop::Store( SvStream& rStrm, USHORT nVersion ) const
+/*N*/ {
+/*N*/ INT32 left = GetLeft(), right = GetRight(),
+/*N*/ top = GetTop(), bottom = GetBottom();
+/*N*/ if( GRFCROP_VERSION_SWDEFAULT == nVersion )
+/*N*/ top = -top, bottom = -bottom, left = -left, right = -right;
+/*N*/
+/*N*/ rStrm << top << left << right << bottom;
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+
+
+/*N*/ bool SvxGrfCrop::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ text::GraphicCrop aRet;
+/*N*/ aRet.Left = nLeft;
+/*N*/ aRet.Right = nRight;
+/*N*/ aRet.Top = nTop;
+/*N*/ aRet.Bottom = nBottom;
+/*N*/
+/*N*/ if( bConvert )
+/*N*/ {
+/*N*/ aRet.Right = TWIP_TO_MM100(aRet.Right );
+/*N*/ aRet.Top = TWIP_TO_MM100(aRet.Top );
+/*N*/ aRet.Left = TWIP_TO_MM100(aRet.Left );
+/*N*/ aRet.Bottom = TWIP_TO_MM100(aRet.Bottom);
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ rVal <<= aRet;
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool SvxGrfCrop::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ text::GraphicCrop aVal;
+/*N*/
+/*N*/ if(!(rVal >>= aVal))
+/*N*/ return false;
+/*N*/ if( bConvert )
+/*N*/ {
+/*N*/ aVal.Right = MM100_TO_TWIP(aVal.Right );
+/*N*/ aVal.Top = MM100_TO_TWIP(aVal.Top );
+/*N*/ aVal.Left = MM100_TO_TWIP(aVal.Left );
+/*N*/ aVal.Bottom = MM100_TO_TWIP(aVal.Bottom);
+/*N*/ }
+/*N*/
+/*N*/ nLeft = aVal.Left ;
+/*N*/ nRight = aVal.Right ;
+/*N*/ nTop = aVal.Top ;
+/*N*/ nBottom = aVal.Bottom;
+/*N*/ return true;
+/*N*/ }
+
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_hlnkitem.cxx b/binfilter/bf_svx/source/items/svx_hlnkitem.cxx
new file mode 100644
index 000000000000..ff27a68d0c12
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_hlnkitem.cxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _SVX_HLNKITEM_CXX
+
+#include <svxids.hrc>
+#include <bf_svtools/memberid.hrc>
+
+#include "hlnkitem.hxx"
+
+namespace binfilter {
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxHyperlinkItem, SfxPoolItem);
+
+// class SvxHyperlinkItem ------------------------------------------------
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+#define HYPERLINKFF_MARKER 0x599401FE
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+/*?*/ SfxPoolItem* SvxHyperlinkItem::Clone( SfxItemPool* ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 return new SvxHyperlinkItem( *this );
+/*?*/ }
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+/*?*/ int SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 //STRIP001 DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+/*?*/ }
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_numitem.cxx b/binfilter/bf_svx/source/items/svx_numitem.cxx
new file mode 100644
index 000000000000..59918281b322
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_numitem.cxx
@@ -0,0 +1,937 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+#include <numitem.hxx>
+
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+#include <brshitem.hxx>
+#include <vcl/font.hxx>
+#include <svxids.hrc>
+#include <numdef.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
+#include <unolingu.hxx>
+#include <com/sun/star/text/XNumberingFormatter.hpp>
+#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <comphelper/processfactory.hxx>
+
+#include "unonrule.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+
+#define MM100_TO_TWIP(MM100) ((MM100*72L+63L)/127L)
+
+#define DEF_WRITER_LSPACE 500 //Standardeinrueckung
+#define DEF_DRAW_LSPACE 800 //Standardeinrueckung
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::style;
+
+sal_Int32 SvxNumberType::nRefCount = 0;
+::com::sun::star::uno::Reference< ::com::sun::star::text::XNumberingFormatter> SvxNumberType::xFormatter = 0;
+/* -----------------------------22.02.01 14:24--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SvxNumberType::SvxNumberType(sal_Int16 nType) :
+/*N*/ nNumType(nType),
+/*N*/ bShowSymbol(sal_True)
+/*N*/ {
+/*N*/ if(!xFormatter.is())
+/*N*/ {
+/*N*/ try
+/*N*/ {
+/*N*/ Reference< XMultiServiceFactory > xMSF = ::legacy_binfilters::getLegacyProcessServiceFactory();
+/*N*/ Reference < XInterface > xI = xMSF->createInstance(
+/*N*/ ::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) );
+/*N*/ Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY);
+/*N*/ DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
+/*N*/ xFormatter = Reference<XNumberingFormatter> (xRet, UNO_QUERY);
+/*N*/ }
+/*N*/ catch(Exception& )
+/*N*/ {
+/*N*/ }
+/*N*/ }
+/*N*/ nRefCount++;
+/*N*/ }
+/* -----------------------------22.02.01 14:31--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SvxNumberType::SvxNumberType(const SvxNumberType& rType) :
+/*N*/ nNumType(rType.nNumType),
+/*N*/ bShowSymbol(rType.bShowSymbol)
+/*N*/ {
+/*N*/ nRefCount++;
+/*N*/ }
+/* -----------------------------22.02.01 14:24--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SvxNumberType::~SvxNumberType()
+/*N*/ {
+/*N*/ if(!--nRefCount)
+/*N*/ xFormatter = 0;
+/*N*/ }
+/* -----------------------------22.02.01 11:09--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ String SvxNumberType::GetNumStr( ULONG nNo ) const
+/*N*/ {
+/*N*/ LanguageType eLang = Application::GetSettings().GetLanguage();
+/*N*/ Locale aLocale = SvxCreateLocale(eLang);
+/*N*/ return GetNumStr( nNo, aLocale );
+/*N*/ }
+/* -----------------28.10.98 15:56-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const
+/*N*/ {
+/*N*/ String aTmpStr;
+/*N*/ if(!xFormatter.is())
+/*N*/ return aTmpStr;
+/*N*/
+/*N*/ if(bShowSymbol)
+/*N*/ {
+/*N*/ switch(nNumType)
+/*N*/ {
+/*N*/ case NumberingType::CHAR_SPECIAL:
+/*N*/ case NumberingType::BITMAP:
+/*N*/ break;
+/*N*/ default:
+/*N*/ {
+/*N*/ //#95525# '0' allowed for ARABIC numberings
+/*N*/ if(NumberingType::ARABIC == nNumType && 0 == nNo )
+/*N*/ aTmpStr = '0';
+/*N*/ else
+/*N*/ {
+/*N*/ Sequence< PropertyValue > aProperties(2);
+/*N*/ PropertyValue* pValues = aProperties.getArray();
+/*N*/ pValues[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingType"));
+/*N*/ pValues[0].Value <<= nNumType;
+/*N*/ pValues[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value"));
+/*N*/ pValues[1].Value <<= (sal_Int32)nNo;
+/*N*/
+/*N*/ try
+/*N*/ {
+/*N*/ aTmpStr = xFormatter->makeNumberingString( aProperties, rLocale );
+/*N*/ }
+/*N*/ catch(Exception&)
+/*N*/ {
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return aTmpStr;
+/*N*/ }
+/* -----------------27.10.98 10:33-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumberFormat::SvxNumberFormat(sal_Int16 eType) :
+/*N*/ SvxNumberType(eType),
+/*N*/ eNumAdjust(SVX_ADJUST_LEFT),
+/*N*/ nInclUpperLevels(0),
+/*N*/ nStart(1),
+/*N*/ cBullet(SVX_DEF_BULLET),
+/*N*/ nFirstLineOffset(0),
+/*N*/ nAbsLSpace(0),
+/*N*/ nLSpace(0),
+/*N*/ nCharTextDistance(0),
+/*N*/ pGraphicBrush(0),
+/*N*/ eVertOrient(SVX_VERT_NONE),
+/*N*/ nBulletRelSize(100),
+/*N*/ nBulletColor(COL_BLACK),
+/*N*/ pBulletFont(0)
+/*N*/ {
+/*N*/ }
+/* -----------------27.10.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumberFormat::SvxNumberFormat(const SvxNumberFormat& rFormat) :
+/*N*/ SvxNumberType(rFormat),
+/*N*/ pGraphicBrush(0),
+/*N*/ pBulletFont(0)
+/*N*/ {
+/*N*/ *this = rFormat;
+/*N*/ }
+/* -----------------27.10.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumberFormat::~SvxNumberFormat()
+/*N*/ {
+/*N*/ delete pGraphicBrush;
+/*N*/ delete pBulletFont;
+/*N*/ }
+/* -----------------08.12.98 11:14-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
+/*N*/ {
+/*N*/ USHORT nVersion;
+/*N*/ rStream >> nVersion;
+/*N*/
+/*N*/ USHORT nUSHORT;
+/*N*/ rStream >> nUSHORT;
+/*N*/ SetNumberingType((sal_Int16)nUSHORT);
+/*N*/ rStream >> nUSHORT;
+/*N*/ eNumAdjust = (SvxAdjust)nUSHORT;
+/*N*/ rStream >> nUSHORT;
+/*N*/ nInclUpperLevels = (BYTE)nUSHORT;
+/*N*/ rStream >> nUSHORT;
+/*N*/ nStart = nUSHORT;
+/*N*/ rStream >> nUSHORT;
+/*N*/ cBullet = nUSHORT;
+/*N*/
+/*N*/ short nShort;
+/*N*/ rStream >> nShort;
+/*N*/ nFirstLineOffset = nShort;
+/*N*/ rStream >> nShort;
+/*N*/ nAbsLSpace = nShort;
+/*N*/ rStream >> nShort;
+/*N*/ nLSpace = nShort;
+/*N*/
+/*N*/ rStream >> nShort;
+/*N*/ nCharTextDistance = nShort;
+/*N*/ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+/*N*/ rStream.ReadByteString(sPrefix, eEnc);
+/*N*/ rStream.ReadByteString(sSuffix, eEnc);
+/*N*/ rStream.ReadByteString(sCharStyleName, eEnc);
+/*N*/ rStream >> nUSHORT;
+/*N*/ if(nUSHORT)
+/*N*/ {
+/*?*/ SvxBrushItem aHelper;
+/*?*/ pGraphicBrush = (SvxBrushItem*) aHelper.Create( rStream, BRUSH_GRAPHIC_VERSION );
+/*N*/ }
+/*N*/ else
+/*N*/ pGraphicBrush = 0;
+/*N*/
+/*N*/ rStream >> nUSHORT;
+/*N*/ eVertOrient = (SvxFrameVertOrient)nUSHORT;
+/*N*/
+/*N*/ rStream >> nUSHORT;
+/*N*/ if(nUSHORT)
+/*N*/ {
+/*N*/ pBulletFont = new Font;
+/*N*/ rStream >> *pBulletFont;
+/*N*/ if(!pBulletFont->GetCharSet())
+/*N*/ pBulletFont->SetCharSet(rStream.GetStreamCharSet());
+/*N*/ }
+/*N*/ else
+/*N*/ pBulletFont = 0;
+/*N*/ rStream >> aGraphicSize;
+/*N*/
+/*N*/ rStream >> nBulletColor;
+/*N*/ rStream >> nUSHORT;
+/*N*/ nBulletRelSize = nUSHORT;
+/*N*/ rStream >> nUSHORT;
+/*N*/ SetShowSymbol((BOOL)nUSHORT);
+/*N*/
+/*N*/ if( nVersion < NUMITEM_VERSION_03 )
+/*N*/ cBullet = ByteString::ConvertToUnicode( cBullet,
+/*N*/ (pBulletFont&&pBulletFont->GetCharSet()) ? pBulletFont->GetCharSet()
+/*N*/ : RTL_TEXTENCODING_SYMBOL );
+/*N*/ if(pBulletFont)
+/*N*/ {
+/*N*/ BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
+/*N*/ if(bConvertBulletFont)
+/*N*/ {
+/*N*/
+/*N*/ FontToSubsFontConverter pConverter =
+/*N*/ CreateFontToSubsFontConverter(pBulletFont->GetName(),
+/*N*/ FONTTOSUBSFONT_IMPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
+/*N*/ if(pConverter)
+/*N*/ {
+/*N*/ cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
+/*N*/ String sFontName = GetFontToSubsFontName(pConverter);
+/*N*/ pBulletFont->SetName(sFontName);
+/*N*/ DestroyFontToSubsFontConverter(pConverter);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/* -----------------08.12.98 11:14-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverter)
+/*N*/ {
+/*N*/ if(pConverter && pBulletFont)
+/*N*/ {
+/*N*/ cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
+/*N*/ String sFontName = GetFontToSubsFontName(pConverter);
+/*N*/ pBulletFont->SetName(sFontName);
+/*N*/ }
+/*N*/
+/*N*/ rStream << (USHORT)NUMITEM_VERSION_03;
+/*N*/
+/*N*/ rStream << (USHORT)GetNumberingType();
+/*N*/ rStream << (USHORT)eNumAdjust;
+/*N*/ rStream << (USHORT)nInclUpperLevels;
+/*N*/ rStream << nStart;
+/*N*/ rStream << (USHORT)cBullet;
+/*N*/
+/*N*/ rStream << nFirstLineOffset;
+/*N*/ rStream << nAbsLSpace;
+/*N*/ rStream << nLSpace;
+/*N*/
+/*N*/ rStream << nCharTextDistance;
+/*N*/ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+/*N*/ rStream.WriteByteString(sPrefix, eEnc);
+/*N*/ rStream.WriteByteString(sSuffix, eEnc);
+/*N*/ rStream.WriteByteString(sCharStyleName, eEnc);
+/*N*/ if(pGraphicBrush)
+/*N*/ {
+/*?*/ 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);
+/*N*/ }
+/*N*/ else
+/*N*/ rStream << (USHORT)0;
+/*N*/
+/*N*/ rStream << (USHORT)eVertOrient;
+/*N*/ if(pBulletFont)
+/*N*/ {
+/*N*/ rStream << (USHORT)1;
+/*N*/ rStream << *pBulletFont;
+/*N*/ }
+/*N*/ else
+/*N*/ rStream << (USHORT)0;
+/*N*/ rStream << aGraphicSize;
+/*N*/
+/*N*/ Color nTempColor = nBulletColor;
+/*N*/ if(COL_AUTO == nBulletColor.GetColor())
+/*N*/ nTempColor = COL_BLACK;
+/*N*/ rStream << nTempColor;
+/*N*/ rStream << nBulletRelSize;
+/*N*/ rStream << (USHORT)IsShowSymbol();
+/*N*/ return rStream;
+/*N*/ }
+/* -----------------------------23.02.01 11:10--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
+/*N*/ {
+/*N*/ SetNumberingType(rFormat.GetNumberingType());
+/*N*/ eNumAdjust = rFormat.eNumAdjust ;
+/*N*/ nInclUpperLevels = rFormat.nInclUpperLevels ;
+/*N*/ nStart = rFormat.nStart ;
+/*N*/ cBullet = rFormat.cBullet ;
+/*N*/ nFirstLineOffset = rFormat.nFirstLineOffset;
+/*N*/ nAbsLSpace = rFormat.nAbsLSpace ;
+/*N*/ nLSpace = rFormat.nLSpace ;
+/*N*/ nCharTextDistance = rFormat.nCharTextDistance ;
+/*N*/ eVertOrient = rFormat.eVertOrient ;
+/*N*/ sPrefix = rFormat.sPrefix ;
+/*N*/ sSuffix = rFormat.sSuffix ;
+/*N*/ aGraphicSize = rFormat.aGraphicSize ;
+/*N*/ nBulletColor = rFormat.nBulletColor ;
+/*N*/ nBulletRelSize = rFormat.nBulletRelSize;
+/*N*/ SetShowSymbol(rFormat.IsShowSymbol());
+/*N*/ sCharStyleName = rFormat.sCharStyleName;
+/*N*/ DELETEZ(pGraphicBrush);
+/*N*/ if(rFormat.pGraphicBrush)
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ pGraphicBrush = new SvxBrushItem(*rFormat.pGraphicBrush);
+/*N*/ }
+/*N*/ DELETEZ(pBulletFont);
+/*N*/ if(rFormat.pBulletFont)
+/*N*/ pBulletFont = new Font(*rFormat.pBulletFont);
+/*N*/ return *this;
+/*N*/ }
+/* -----------------27.10.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
+/*N*/ {
+/*N*/ if( GetNumberingType() != rFormat.GetNumberingType() ||
+/*N*/ eNumAdjust != rFormat.eNumAdjust ||
+/*N*/ nInclUpperLevels != rFormat.nInclUpperLevels ||
+/*N*/ nStart != rFormat.nStart ||
+/*N*/ cBullet != rFormat.cBullet ||
+/*N*/ nFirstLineOffset != rFormat.nFirstLineOffset ||
+/*N*/ nAbsLSpace != rFormat.nAbsLSpace ||
+/*N*/ nLSpace != rFormat.nLSpace ||
+/*N*/ nCharTextDistance != rFormat.nCharTextDistance ||
+/*N*/ eVertOrient != rFormat.eVertOrient ||
+/*N*/ sPrefix != rFormat.sPrefix ||
+/*N*/ sSuffix != rFormat.sSuffix ||
+/*N*/ aGraphicSize != rFormat.aGraphicSize ||
+/*N*/ nBulletColor != rFormat.nBulletColor ||
+/*N*/ nBulletRelSize != rFormat.nBulletRelSize ||
+/*N*/ IsShowSymbol() != rFormat.IsShowSymbol() ||
+/*N*/ sCharStyleName != rFormat.sCharStyleName
+/*N*/ )
+/*N*/ return FALSE;
+/*N*/ if(pGraphicBrush && !rFormat.pGraphicBrush ||
+/*N*/ !pGraphicBrush && rFormat.pGraphicBrush ||
+/*N*/ pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush )
+/*N*/ return FALSE;
+/*N*/ if(pBulletFont && !rFormat.pBulletFont ||
+/*N*/ !pBulletFont && rFormat.pBulletFont ||
+/*N*/ pBulletFont && *pBulletFont != *rFormat.pBulletFont)
+/*N*/ return FALSE;
+/*N*/ return TRUE;
+/*N*/ }
+/* -----------------28.10.98 09:53-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
+/*N*/ const Size* pSize, const SvxFrameVertOrient* pOrient)
+/*N*/ {
+/*N*/ if(!pBrushItem)
+/*N*/ {
+/*N*/ delete pGraphicBrush;
+/*N*/ pGraphicBrush = 0;
+/*N*/ }
+/*N*/ else if(!pGraphicBrush || pGraphicBrush && !(*pBrushItem == *pGraphicBrush))
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ delete pGraphicBrush;
+/*N*/ }
+/*N*/
+/*N*/ if(pOrient)
+/*N*/ eVertOrient = *pOrient;
+/*N*/ else
+/*?*/ eVertOrient = SVX_VERT_NONE;
+/*N*/ if(pSize)
+/*N*/ aGraphicSize = *pSize;
+/*N*/ else
+/*?*/ aGraphicSize.Width() = aGraphicSize.Height() = 0;
+/*N*/ }
+/* -----------------28.10.98 09:59-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------------------22.02.01 15:55--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/* -----------------------------22.02.01 15:55--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SvxFrameVertOrient SvxNumberFormat::GetVertOrient() const
+/*N*/ {
+/*N*/ return eVertOrient;
+/*N*/ }
+/* -----------------28.10.98 09:59-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ void SvxNumberFormat::SetBulletFont(const Font* pFont)
+/*N*/ {
+/*N*/ delete pBulletFont;
+/*N*/ pBulletFont = pFont ? new Font(*pFont): 0;
+/*N*/ }
+
+/* -----------------28.10.98 10:03-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------------------02.07.01 15:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+
+/* -----------------28.10.98 10:38-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------28.10.98 15:57-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper )
+/*N*/ {
+/*N*/ nNo %= 4000; // mehr kann nicht dargestellt werden
+/*N*/ // i, ii, iii, iv, v, vi, vii, vii, viii, ix
+/*N*/ // (Dummy),1000,500,100,50,10,5,1
+/*N*/ const char *cRomanArr = bUpper
+/*N*/ ? "MDCLXVI--" // +2 Dummy-Eintraege !!
+/*N*/ : "mdclxvi--"; // +2 Dummy-Eintraege !!
+/*N*/
+/*N*/ String sRet;
+/*N*/ USHORT nMask = 1000;
+/*N*/ while( nMask )
+/*N*/ {
+/*N*/ BYTE nZahl = BYTE(nNo / nMask);
+/*N*/ BYTE nDiff = 1;
+/*N*/ nNo %= nMask;
+/*N*/
+/*N*/ if( 5 < nZahl )
+/*N*/ {
+/*N*/ if( nZahl < 9 )
+/*N*/ sRet += sal_Unicode(*(cRomanArr-1));
+/*N*/ ++nDiff;
+/*N*/ nZahl -= 5;
+/*N*/ }
+/*N*/ switch( nZahl )
+/*N*/ {
+/*N*/ case 3: { sRet += sal_Unicode(*cRomanArr); }
+/*N*/ case 2: { sRet += sal_Unicode(*cRomanArr); }
+/*N*/ case 1: { sRet += sal_Unicode(*cRomanArr); }
+/*N*/ break;
+/*N*/
+/*N*/ case 4: {
+/*N*/ sRet += sal_Unicode(*cRomanArr);
+/*N*/ sRet += sal_Unicode(*(cRomanArr-nDiff));
+/*N*/ }
+/*N*/ break;
+/*N*/ case 5: { sRet += sal_Unicode(*(cRomanArr-nDiff)); }
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ nMask /= 10; // zur naechsten Dekade
+/*N*/ cRomanArr += 2;
+/*N*/ }
+/*N*/ return sRet;
+/*N*/ }
+#ifdef OLD_NUMBER_FORMATTING
+/*?*/ 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) );
+/*?*/ }
+#endif //OLD_NUMBER_FORMATTING
+/* -----------------------------22.02.01 13:31--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ const String& SvxNumberFormat::GetCharFmtName()const
+/*N*/ {
+/*N*/ return sCharStyleName;
+/*N*/ }
+/* -----------------27.10.98 10:38-------------------
+ *
+ * --------------------------------------------------*/
+sal_Int32 SvxNumRule::nRefCount = 0;
+static SvxNumberFormat* pStdNumFmt = 0;
+static SvxNumberFormat* pStdOutlineNumFmt = 0;
+/*N*/ SvxNumRule::SvxNumRule(ULONG nFeatures, USHORT nLevels, BOOL bCont, SvxNumRuleType eType) :
+/*N*/ nLevelCount(nLevels),
+/*N*/ nFeatureFlags(nFeatures),
+/*N*/ bContinuousNumbering(bCont),
+/*N*/ eNumberingType(eType)
+/*N*/ {
+/*N*/ ++nRefCount;
+/*N*/ LanguageType eLang = Application::GetSettings().GetLanguage();
+/*N*/ aLocale = SvxCreateLocale(eLang);
+/*N*/ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+/*N*/ {
+/*N*/ if(i < nLevels)
+/*N*/ {
+/*N*/ aFmts[i] = new SvxNumberFormat(SVX_NUM_CHARS_UPPER_LETTER);
+/*N*/ //daran wird zwischen writer und draw unterschieden
+/*N*/ if(nFeatures & NUM_CONTINUOUS)
+/*N*/ {
+/*N*/ aFmts[i]->SetLSpace( MM100_TO_TWIP(DEF_WRITER_LSPACE) );
+/*N*/ aFmts[i]->SetAbsLSpace( MM100_TO_TWIP(DEF_WRITER_LSPACE * (i+1)) );
+/*N*/ aFmts[i]->SetFirstLineOffset(MM100_TO_TWIP(-DEF_WRITER_LSPACE));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aFmts[i]->SetLSpace( DEF_DRAW_LSPACE );
+/*N*/ aFmts[i]->SetAbsLSpace( DEF_DRAW_LSPACE * (i) );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ aFmts[i] = 0;
+/*N*/ aFmtsSet[i] = FALSE;
+/*N*/ }
+/*N*/ }
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumRule::SvxNumRule(const SvxNumRule& rCopy)
+/*N*/ {
+/*N*/ ++nRefCount;
+/*N*/ aLocale = rCopy.aLocale;
+/*N*/ nLevelCount = rCopy.nLevelCount ;
+/*N*/ nFeatureFlags = rCopy.nFeatureFlags ;
+/*N*/ bContinuousNumbering = rCopy.bContinuousNumbering;
+/*N*/ eNumberingType = rCopy.eNumberingType;
+/*N*/ memset( aFmts, 0, sizeof( aFmts ));
+/*N*/ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+/*N*/ {
+/*N*/ if(rCopy.aFmts[i])
+/*N*/ aFmts[i] = new SvxNumberFormat(*rCopy.aFmts[i]);
+/*N*/ else
+/*N*/ aFmts[i] = 0;
+/*N*/ aFmtsSet[i] = rCopy.aFmtsSet[i];
+/*N*/ }
+/*N*/ }
+/* -----------------08.12.98 11:07-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumRule::SvxNumRule(SvStream &rStream)
+/*N*/ {
+/*N*/ ++nRefCount;
+/*N*/ LanguageType eLang = Application::GetSettings().GetLanguage();
+/*N*/ aLocale = SvxCreateLocale(eLang);
+/*N*/ USHORT nVersion;
+/*N*/ USHORT nTemp;
+/*N*/ rStream >> nVersion;
+/*N*/ rStream >> nLevelCount;
+/*N*/ rStream >> nTemp;
+/*N*/ nFeatureFlags = nTemp;
+/*N*/ rStream >> nTemp;
+/*N*/ bContinuousNumbering = (BOOL)nTemp;
+/*N*/ rStream >> nTemp;
+/*N*/ eNumberingType = (SvxNumRuleType)nTemp;
+/*N*/ memset( aFmts, 0, sizeof( aFmts ));
+/*N*/
+/*N*/ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+/*N*/ {
+/*N*/ USHORT nSet;
+/*N*/ rStream >> nSet;
+/*N*/ if(nSet)
+/*N*/ aFmts[i] = new SvxNumberFormat(rStream);
+/*N*/ else
+/*N*/ aFmts[i] = 0;
+/*N*/ aFmtsSet[i] = aFmts[i] ? TRUE : FALSE;
+/*N*/ }
+/*N*/ if(NUMITEM_VERSION_02 <= nVersion)
+/*N*/ {
+/*N*/ USHORT nShort;
+/*N*/ rStream >> nShort;
+/*N*/ nFeatureFlags = nShort;
+/*N*/ }
+/*N*/ }
+
+/* -----------------08.12.98 11:07-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvStream& SvxNumRule::Store(SvStream &rStream)
+/*N*/ {
+/*N*/ rStream<<(USHORT)NUMITEM_VERSION_03;
+/*N*/ rStream<<nLevelCount;
+/*N*/ //first save of nFeatureFlags for old versions
+/*N*/ rStream<<(USHORT)nFeatureFlags;
+/*N*/ rStream<<(USHORT)bContinuousNumbering;
+/*N*/ rStream<<(USHORT)eNumberingType;
+/*N*/
+/*N*/ FontToSubsFontConverter pConverter = 0;
+/*N*/ BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
+/*N*/ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+/*N*/ {
+/*N*/ if(aFmts[i])
+/*N*/ {
+/*N*/ rStream << USHORT(1);
+/*N*/ if(bConvertBulletFont && aFmts[i]->GetBulletFont())
+/*N*/ {
+/*N*/ if(!pConverter)
+/*N*/ pConverter =
+/*N*/ CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetName(),
+/*N*/ FONTTOSUBSFONT_EXPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
+/*N*/ }
+/*N*/ aFmts[i]->Store(rStream, pConverter);
+/*N*/ }
+/*N*/ else
+/*N*/ rStream << USHORT(0);
+/*N*/ }
+/*N*/ //second save of nFeatureFlags for new versions
+/*N*/ rStream<<(USHORT)nFeatureFlags;
+/*N*/ if(pConverter)
+/*N*/ DestroyFontToSubsFontConverter(pConverter);
+/*N*/
+/*N*/ return rStream;
+/*N*/ }
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumRule::~SvxNumRule()
+/*N*/ {
+/*N*/ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+/*N*/ delete aFmts[i];
+/*N*/ if(!--nRefCount)
+/*N*/ {
+/*N*/ DELETEZ(pStdNumFmt);
+/*N*/ DELETEZ(pStdOutlineNumFmt);
+/*N*/ }
+/*N*/ }
+/* -----------------29.10.98 16:07-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ int SvxNumRule::operator==( const SvxNumRule& rCopy) const
+/*N*/ {
+/*N*/ if(nLevelCount != rCopy.nLevelCount ||
+/*N*/ nFeatureFlags != rCopy.nFeatureFlags ||
+/*N*/ bContinuousNumbering != rCopy.bContinuousNumbering ||
+/*N*/ eNumberingType != rCopy.eNumberingType)
+/*N*/ return FALSE;
+/*N*/ for(USHORT i = 0; i < nLevelCount; i++)
+/*N*/ {
+/*N*/ if( aFmtsSet[i] != rCopy.aFmtsSet[i] ||
+/*N*/ !aFmts[i] && rCopy.aFmts[i] ||
+/*N*/ aFmts[i] && !rCopy.aFmts[i] ||
+/*N*/ aFmts[i] && *aFmts[i] != *rCopy.aFmts[i] )
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ return TRUE;
+/*N*/ }
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const
+/*N*/ {
+/*N*/ DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" );
+/*N*/ return aFmtsSet[nLevel] ? aFmts[nLevel] : 0;
+/*N*/ }
+/* -----------------02.11.98 09:10-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const
+/*N*/ {
+/*N*/ if(!pStdNumFmt)
+/*N*/ {
+/*N*/ pStdNumFmt = new SvxNumberFormat(SVX_NUM_ARABIC);
+/*N*/ pStdOutlineNumFmt = new SvxNumberFormat(SVX_NUM_NUMBER_NONE);
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" );
+/*N*/ return aFmts[nLevel] ?
+/*N*/ *aFmts[nLevel] : eNumberingType == SVX_RULETYPE_NUMBERING ?
+/*N*/ *pStdNumFmt : *pStdOutlineNumFmt;
+/*N*/ }
+
+/* -----------------29.10.98 09:08-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid )
+/*N*/ {
+/*N*/ if( !aFmtsSet[i] || !(rNumFmt == *Get( i )) )
+/*N*/ {
+/*N*/ delete aFmts[ i ];
+/*N*/ aFmts[ i ] = new SvxNumberFormat( rNumFmt );
+/*N*/ aFmtsSet[i] = bIsValid;
+/*N*/ // bInvalidRuleFlag = TRUE;
+/*N*/ }
+/*N*/ }
+/* -----------------30.10.98 12:44-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------28.10.98 15:38-------------------
+ *
+ * --------------------------------------------------*/
+/* -----------------18.08.99 10:18-------------------
+ Description: changes linked to embedded bitmaps
+ --------------------------------------------------*/
+/*N*/ BOOL SvxNumRule::UnLinkGraphics()
+/*N*/ {
+/*N*/ BOOL bRet = FALSE;
+/*N*/ for(USHORT i = 0; i < GetLevelCount(); i++)
+/*N*/ {
+/*N*/ SvxNumberFormat aFmt(GetLevel(i));
+/*N*/ const SvxBrushItem* pBrush = aFmt.GetBrush();
+/*N*/ const String* pLinkStr;
+/*N*/ const Graphic* pGraphic;
+/*N*/ if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
+/*N*/ {
+/*N*/ if(pBrush &&
+/*N*/ 0 != (pLinkStr = pBrush->GetGraphicLink()) &&
+/*N*/ pLinkStr->Len() &&
+/*N*/ 0 !=(pGraphic = pBrush->GetGraphic()))
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ SvxBrushItem aTempItem(*pBrush);
+/*N*/ }
+/*N*/ }
+/*N*/ else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumberingType())
+/*N*/ aFmt.SetNumberingType(SVX_NUM_BITMAP);
+/*N*/ SetLevel(i, aFmt);
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) :
+/*N*/ SfxPoolItem(SID_ATTR_NUMBERING_RULE),
+/*N*/ pNumRule(new SvxNumRule(rRule))
+/*N*/ {
+/*N*/ }
+
+/*-----------------23.11.98 10:36-------------------
+ MT: Das sind ja sehr sinnige Kommentare...
+--------------------------------------------------*/
+/*N*/ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ) :
+/*N*/ SfxPoolItem(nWhich),
+/*N*/ pNumRule(new SvxNumRule(rRule))
+/*N*/ {
+/*N*/ }
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem& rCopy) :
+/*N*/ SfxPoolItem(rCopy.Which())
+/*N*/ {
+/*N*/ pNumRule = new SvxNumRule(*rCopy.pNumRule);
+/*N*/ }
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumBulletItem::~SvxNumBulletItem()
+/*N*/ {
+/*N*/ delete pNumRule;
+/*N*/ }
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ int SvxNumBulletItem::operator==( const SfxPoolItem& rCopy) const
+/*N*/ {
+/*N*/ return *pNumRule == *((SvxNumBulletItem&)rCopy).pNumRule;
+/*N*/ }
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxNumBulletItem(*this);
+/*N*/ }
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SfxPoolItem* SvxNumBulletItem::Create(SvStream &rStream, USHORT) const
+/*N*/ {
+/*N*/ SvxNumRule aRule(rStream);
+/*N*/ return new SvxNumBulletItem(aRule, Which() );
+/*N*/ }
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT nItemVersion )const
+/*N*/ {
+/*N*/ pNumRule->Store(rStream);
+/*N*/ return rStream;
+/*N*/ }
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ USHORT SvxNumBulletItem::GetVersion( USHORT nFileVersion ) const
+/*N*/ {
+/*N*/ return NUMITEM_VERSION_03;
+/*N*/ }
+
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+
+
+/*N*/ bool SvxNumBulletItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ uno::Reference< container::XIndexReplace > xRule;
+/*N*/ if( rVal >>= xRule )
+/*N*/ {
+/*N*/ try
+/*N*/ {
+/*N*/ SvxNumRule* pNewRule = new SvxNumRule( SvxGetNumRule( xRule ) );
+/*N*/ if( pNewRule->GetLevelCount() != pNumRule->GetLevelCount() ||
+/*N*/ pNewRule->GetNumRuleType() != pNumRule->GetNumRuleType() )
+/*N*/ {
+/*N*/ SvxNumRule* pConverted = SvxConvertNumRule( pNewRule, pNumRule->GetLevelCount(), pNumRule->GetNumRuleType() );
+/*N*/ delete pNewRule;
+/*N*/ pNewRule = pConverted;
+/*N*/ }
+/*N*/ delete pNumRule;
+/*N*/ pNumRule = pNewRule;
+/*N*/ return sal_True;
+/*N*/ }
+/*N*/ catch(lang::IllegalArgumentException&)
+/*N*/ {
+/*N*/ }
+/*N*/ }
+/*N*/ return sal_False;
+/*N*/ }
+
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+/*N*/ SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevels, SvxNumRuleType eType )
+/*N*/ {
+/*N*/ const USHORT nSrcLevels = pRule->GetLevelCount();
+/*N*/ SvxNumRule* pNewRule = new SvxNumRule( pRule->GetFeatureFlags(), nLevels, pRule->IsContinuousNumbering(), eType );
+/*N*/
+/*N*/ // move all levels one level up if the destination is a presentation numbering and the source is not
+/*N*/ const sal_Bool bConvertUp = pRule->GetNumRuleType() != SVX_RULETYPE_PRESENTATION_NUMBERING &&
+/*N*/ eType == SVX_RULETYPE_PRESENTATION_NUMBERING;
+/*N*/
+/*N*/ // move all levels one level down if the source is a presentation numbering and the destination is not
+/*N*/ const sal_Bool bConvertDown = pRule->GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING &&
+/*N*/ eType != SVX_RULETYPE_PRESENTATION_NUMBERING;
+/*N*/
+/*N*/ USHORT nSrcLevel = bConvertDown ? 1 : 0;
+/*N*/ USHORT nDstLevel = bConvertUp ? 1 : 0;
+/*N*/ for( ; (nDstLevel < nLevels) && (nSrcLevel < nSrcLevels); nSrcLevel++, nDstLevel++ )
+/*N*/ pNewRule->SetLevel( nDstLevel, pRule->GetLevel( nSrcLevel ) );
+/*N*/
+/*N*/ return pNewRule;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_pageitem.cxx b/binfilter/bf_svx/source/items/svx_pageitem.cxx
new file mode 100644
index 000000000000..45c630eb64fa
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_pageitem.cxx
@@ -0,0 +1,278 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <tools/stream.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+// Erstmal definieren, damit die Klassendeklarionen angezogen werden.
+#define ITEMID_PAGE 0
+#define ITEMID_SETITEM 0
+
+#include <bf_svtools/poolitem.hxx>
+
+#include "pageitem.hxx"
+#include "itemtype.hxx"
+#include <unomid.hxx>
+
+#include <com/sun/star/style/PageStyleLayout.hpp>
+
+#include <bf_svtools/itemset.hxx>
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// STATIC DATA -----------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY( SvxPageItem, SfxPoolItem );
+
+/*--------------------------------------------------------------------
+ Beschreibung: Konstruktor
+ --------------------------------------------------------------------*/
+
+/*N*/ SvxPageItem::SvxPageItem( const USHORT nId ) : SfxPoolItem( nId ),
+/*N*/
+/*N*/ eNumType ( SVX_ARABIC ),
+/*N*/ bLandscape ( sal_False ),
+/*N*/ eUse ( SVX_PAGE_ALL )
+/*N*/ {
+/*N*/ }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Copy-Konstruktor
+ --------------------------------------------------------------------*/
+
+/*N*/ SvxPageItem::SvxPageItem( const SvxPageItem& rItem )
+/*N*/ : SfxPoolItem( rItem )
+/*N*/ {
+/*N*/ eNumType = rItem.eNumType;
+/*N*/ bLandscape = rItem.bLandscape;
+/*N*/ eUse = rItem.eUse;
+/*N*/ }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Clonen
+ --------------------------------------------------------------------*/
+
+/*N*/ SfxPoolItem* SvxPageItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxPageItem( *this );
+/*N*/ }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Abfrage auf Gleichheit
+ --------------------------------------------------------------------*/
+
+/*N*/ int SvxPageItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/ const SvxPageItem& rItem = (SvxPageItem&)rAttr;
+/*N*/ return ( eNumType == rItem.eNumType &&
+/*N*/ bLandscape == rItem.bLandscape &&
+/*N*/ eUse == rItem.eUse );
+/*N*/ }
+
+/*?*/ 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();
+/*?*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+/*N*/ bool SvxPageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_PAGE_NUMTYPE:
+/*N*/ {
+/*N*/ //! die Konstanten sind nicht mehr in den IDLs ?!?
+/*N*/ rVal <<= (sal_Int16)( eNumType );
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_PAGE_ORIENTATION:
+/*N*/ //Landscape= sal_True
+/*N*/ rVal = Bool2Any(bLandscape);
+/*N*/ break;
+/*N*/ case MID_PAGE_LAYOUT :
+/*N*/ {
+/*N*/ style::PageStyleLayout eRet;
+/*N*/ switch(eUse & 0x0f)
+/*N*/ {
+/*N*/ case SVX_PAGE_LEFT : eRet = style::PageStyleLayout_LEFT; break;
+/*N*/ case SVX_PAGE_RIGHT : eRet = style::PageStyleLayout_RIGHT; break;
+/*N*/ case SVX_PAGE_ALL : eRet = style::PageStyleLayout_ALL; break;
+/*N*/ case SVX_PAGE_MIRROR: eRet = style::PageStyleLayout_MIRRORED; break;
+/*N*/ default:
+/*N*/ DBG_ERROR("was fuer ein Layout ist das?");
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ rVal <<= eRet;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+//------------------------------------------------------------------------
+/*N*/ bool SvxPageItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_PAGE_NUMTYPE:
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ if(!(rVal >>= nValue))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ eNumType = (SvxNumType)nValue;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_PAGE_ORIENTATION:
+/*N*/ bLandscape = Any2Bool(rVal);
+/*N*/ break;
+/*N*/ case MID_PAGE_LAYOUT :
+/*N*/ {
+/*N*/ style::PageStyleLayout eLayout;
+/*N*/ if(!(rVal >>= eLayout))
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ eLayout = (style::PageStyleLayout)nValue;
+/*N*/ }
+/*N*/ eUse &= 0xfff0;
+/*N*/ switch( eLayout )
+/*N*/ {
+/*N*/ case style::PageStyleLayout_LEFT : eUse |= SVX_PAGE_LEFT ; break;
+/*N*/ case style::PageStyleLayout_RIGHT : eUse |= SVX_PAGE_RIGHT; break;
+/*?*/ case style::PageStyleLayout_ALL : eUse |= SVX_PAGE_ALL ; break;
+/*N*/ case style::PageStyleLayout_MIRRORED: eUse |= SVX_PAGE_MIRROR;break;
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPageItem::Create( SvStream& rStream, USHORT ) const
+/*N*/ {
+/*N*/ XubString sStr;
+/*N*/ BYTE eType;
+/*N*/ sal_Bool bLand;
+/*N*/ USHORT nUse;
+/*N*/
+/*N*/ // UNICODE: rStream >> sStr;
+/*N*/ rStream.ReadByteString( sStr );
+/*N*/
+/*N*/ rStream >> eType;
+/*N*/ rStream >> bLand;
+/*N*/ rStream >> nUse;
+/*N*/
+/*N*/ SvxPageItem* pPage = new SvxPageItem( Which() );
+/*N*/ pPage->SetDescName( sStr );
+/*N*/ pPage->SetNumType( (SvxNumType)eType );
+/*N*/ pPage->SetLandscape( bLand );
+/*N*/ pPage->SetPageUsage( nUse );
+/*N*/ return pPage;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvStream& SvxPageItem::Store( SvStream &rStrm, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ // UNICODE: rStrm << aDescName;
+/*N*/ rStrm.WriteByteString(aDescName);
+/*N*/
+/*N*/ rStrm << (BYTE)eNumType << bLandscape << eUse;
+/*N*/ return rStrm;
+/*N*/ }
+
+/*--------------------------------------------------------------------
+ Beschreibung: HeaderFooterSet
+ --------------------------------------------------------------------*/
+
+/*N*/ SvxSetItem::SvxSetItem( const USHORT nId, const SfxItemSet& rSet ) :
+/*N*/
+/*N*/ SfxSetItem( nId, rSet )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxSetItem::SvxSetItem( const SvxSetItem& rItem ) :
+/*N*/
+/*N*/ SfxSetItem( rItem )
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ SfxPoolItem* SvxSetItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxSetItem(*this);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ SfxPoolItem* SvxSetItem::Create(SvStream &rStrm, USHORT nVersion) const
+/*N*/ {
+/*N*/ SfxItemSet* pSet = new SfxItemSet( *GetItemSet().GetPool(),
+/*N*/ GetItemSet().GetRanges() );
+/*N*/
+/*N*/ pSet->Load( rStrm );
+/*N*/
+/*N*/ return new SvxSetItem( Which(), *pSet );
+/*N*/ }
+
+/*N*/ SvStream& SvxSetItem::Store(SvStream &rStrm, USHORT nItemVersion) const
+/*N*/ {
+/*N*/ GetItemSet().Store( rStrm, nItemVersion );
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_paperinf.cxx b/binfilter/bf_svx/source/items/svx_paperinf.cxx
new file mode 100644
index 000000000000..bf0e181a4a33
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_paperinf.cxx
@@ -0,0 +1,179 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <limits.h>
+
+#include <sal/macros.h>
+#include "dialogs.hrc"
+#include "paperinf.hxx"
+namespace binfilter {
+
+#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
+ Size(lJISB4Width, lJISB4Height), // B4 (JIS)
+ Size(lJISB5Width, lJISB5Height), // B5 (JIS)
+ Size(lJISB6Width, lJISB6Height) // B6 (JIS)
+};
+
+static const int nTabSize = SAL_N_ELEMENTS(aDinTab);
+
+// -----------------------------------------------------------------------
+
+/*N*/ long TwipsTo100thMM( long nIn )
+/*N*/ {
+/*N*/ long nRet = OutputDevice::LogicToLogic( nIn, MAP_TWIP, MAP_100TH_MM );
+/*N*/ long nTmp = nRet % 10;
+/*N*/
+/*N*/ if ( nTmp )
+/*N*/ nRet += 10 - nTmp;
+/*N*/ return nRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ Size ConvertTo100thMM( Size& rSize )
+/*N*/ {
+/*N*/ // Convert form TWIPS to 100TH_MM
+/*N*/ long nW = TwipsTo100thMM( rSize.Width() );
+/*N*/ long nH = TwipsTo100thMM( rSize.Height() );
+/*N*/
+/*N*/ rSize.Width() = nW;
+/*N*/ rSize.Height() = nH;
+/*N*/ return rSize;
+/*N*/ }
+
+/*--------------------------------------------------------------------
+ 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).
+------------------------------------------------------------------------*/
+
+/*N*/ Size SvxPaperInfo::GetPaperSize( SvxPaper ePaper, MapUnit eUnit )
+/*N*/ {
+/*N*/ DBG_ASSERT( ePaper < nTabSize, "Tabelle der Papiergroessen ueberindiziert" );
+/*N*/ DBG_ASSERT( eUnit == MAP_TWIP || eUnit == MAP_100TH_MM, "this MapUnit not supported" );
+/*N*/ Size aSize = aDinTab[ePaper]; // in Twips
+/*N*/
+/*N*/ if ( eUnit == MAP_100TH_MM )
+/*N*/ ConvertTo100thMM( aSize );
+/*N*/ return aSize;
+/*N*/ }
+
+/*------------------------------------------------------------------------
+ Beschreibung: Papiergroesse der Druckers liefern, aligned auf
+ die eigenen Groessen.
+ Falls kein Printer im System eingestellt ist,
+ wird DIN A4 Portrait als Defaultpapiergroesse geliefert.
+------------------------------------------------------------------------*/
+
+/*N*/ Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter )
+/*N*/ {
+/*N*/ if ( !IsValidPrinter(pPrinter) )
+/*?*/ return GetPaperSize( SVX_PAPER_A4 );
+/*N*/ const SvxPaper ePaper = (SvxPaper)(pPrinter->GetPaper() + SVX_PAPER_OFFSET);
+/*N*/
+/*N*/ if ( ePaper == SVX_PAPER_USER )
+/*N*/ {
+/*N*/ // Orientation nicht beruecksichtigen, da durch SV bereits
+/*N*/ // die richtigen Masze eingestellt worden sind.
+/*N*/ Size aPaperSize = pPrinter->GetPaperSize();
+/*N*/ const Size aInvalidSize;
+/*N*/
+/*N*/ if ( aPaperSize == aInvalidSize )
+/*?*/ return GetPaperSize(SVX_PAPER_A4);
+/*N*/ MapMode aMap1 = pPrinter->GetMapMode();
+/*N*/ MapMode aMap2;
+/*N*/
+/*N*/ if ( aMap1 == aMap2 )
+/*N*/ aPaperSize =
+/*N*/ pPrinter->PixelToLogic( aPaperSize, MapMode( MAP_TWIP ) );
+/*N*/ return aPaperSize;
+/*N*/ }
+/*N*/
+/*N*/ const Orientation eOrient = pPrinter->GetOrientation();
+/*N*/ Size aSize( GetPaperSize( ePaper ) );
+/*N*/ // bei Landscape die Seiten tauschen, ist bei SV schon geschehen
+/*N*/ if ( eOrient == ORIENTATION_LANDSCAPE )
+/*?*/ Swap( aSize );
+/*N*/ return aSize;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_paraitem.cxx b/binfilter/bf_svx/source/items/svx_paraitem.cxx
new file mode 100644
index 000000000000..0baea01ff9c5
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_paraitem.cxx
@@ -0,0 +1,1244 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <com/sun/star/style/TabStop.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/processfactory.hxx>
+#include <bf_svtools/syslocale.hxx>
+
+#include <comphelper/types.hxx>
+
+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
+#define ITEMID_SCRIPTSPACE 0
+#define ITEMID_HANGINGPUNCTUATION 0
+#define ITEMID_FORBIDDENRULE 0
+#define ITEMID_PARAVERTALIGN 0
+#define ITEMID_PARAGRID 0
+
+#include <tools/rtti.hxx>
+#include "bf_basic/sbx.hxx"
+#define GLOBALOVERFLOW3
+
+#define _SVX_PARAITEM_CXX
+
+#include <bf_svtools/itempool.hxx>
+
+#include <bf_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"
+#include "scriptspaceitem.hxx"
+#include "hngpnctitem.hxx"
+#include "forbiddenruleitem.hxx"
+#include "paravertalignitem.hxx"
+#include "pgrditem.hxx"
+
+
+#include "rtl/ustring.hxx"
+
+#include <unomid.hxx>
+
+#include "itemtype.hxx"
+#include "dialmgr.hxx"
+#include "paperinf.hxx"
+
+#include <vcl/svapp.hxx>
+
+#include <algorithm>
+namespace binfilter {
+
+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 -----------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxLineSpacingItem, SfxPoolItem );
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxAdjustItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxWidowsItem, SfxByteItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxOrphansItem, SfxByteItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxHyphenZoneItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxTabStopItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxFmtSplitItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPageModelItem, SfxStringItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxScriptSpaceItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxHangingPunctuationItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxForbiddenRuleItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxParaVertAlignItem, SfxUInt16Item);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxParaGridItem, SfxBoolItem);
+
+/*N*/ SV_IMPL_VARARR_SORT( SvxTabStopArr, SvxTabStop )
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId )
+/*N*/ : SfxEnumItemInterface( nId )
+/*N*/ {
+/*N*/ nPropLineSpace = 100;
+/*N*/ nInterLineSpace = 0;
+/*N*/ nLineHeight = nHeight;
+/*N*/ eLineSpace = SVX_LINE_SPACE_AUTO;
+/*N*/ eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ const SvxLineSpacingItem& rLineSpace = (const SvxLineSpacingItem&)rAttr;
+/*N*/ return (
+/*N*/ // Gleiche Linespacing Rule?
+/*N*/ (eLineSpace == rLineSpace.eLineSpace)
+/*N*/ // Bei maximalem und minimalem Linespacing muss das Mass
+/*N*/ // uebereinstimmen.
+/*N*/ && (eLineSpace == SVX_LINE_SPACE_AUTO ||
+/*N*/ nLineHeight == rLineSpace.nLineHeight)
+/*N*/ // Gleiche Interlinespacing Rule?
+/*N*/ && ( eInterLineSpace == rLineSpace.eInterLineSpace )
+/*N*/ // Entweder proportional oder draufaddieren eingestellt.
+/*N*/ && (( eInterLineSpace == SVX_INTER_LINE_SPACE_OFF)
+/*N*/ || (eInterLineSpace == SVX_INTER_LINE_SPACE_PROP
+/*N*/ && nPropLineSpace == rLineSpace.nPropLineSpace)
+/*N*/ || (eInterLineSpace == SVX_INTER_LINE_SPACE_FIX
+/*N*/ && (nInterLineSpace == rLineSpace.nInterLineSpace)))) ?
+/*N*/ 1 : 0;
+/*N*/ }
+
+/*-----------------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)
+
+--------------------------------------------------*/
+/*N*/ bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ style::LineSpacing aLSp;
+/*N*/ switch( eLineSpace )
+/*N*/ {
+/*N*/ case SVX_LINE_SPACE_AUTO:
+/*N*/ if(eInterLineSpace == SVX_INTER_LINE_SPACE_FIX)
+/*N*/ {
+/*?*/ aLSp.Mode = style::LineSpacingMode::LEADING;
+/*?*/ aLSp.Height = nInterLineSpace;
+/*N*/ }
+/*N*/ else if(eInterLineSpace == SVX_INTER_LINE_SPACE_OFF)
+/*N*/ {
+/*N*/ aLSp.Mode = style::LineSpacingMode::PROP;
+/*N*/ aLSp.Height = 100;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aLSp.Mode = style::LineSpacingMode::PROP;
+/*N*/ aLSp.Height = nPropLineSpace;
+/*N*/ }
+/*N*/ break;
+/*N*/ case SVX_LINE_SPACE_FIX :
+/*N*/ case SVX_LINE_SPACE_MIN :
+/*N*/ aLSp.Mode = eLineSpace == SVX_LINE_SPACE_FIX ? style::LineSpacingMode::FIX : style::LineSpacingMode::MINIMUM;
+/*N*/ aLSp.Height = ( bConvert ? (short)TWIP_TO_MM100(nLineHeight) : nLineHeight );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*?*/ case 0 : rVal <<= aLSp; break;
+/*?*/ case MID_LINESPACE : rVal <<= aLSp.Mode; break;
+/*?*/ case MID_HEIGHT : rVal <<= aLSp.Height; break;
+/*?*/ default: DBG_ERROR("Wrong MemberId!"); break;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------18.03.98 16:32-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ // fill with current data
+/*N*/ style::LineSpacing aLSp;
+/*N*/ uno::Any aAny;
+/*N*/ sal_Bool bRet = QueryValue( aAny, bConvert ? CONVERT_TWIPS : 0 ) && ( aAny >>= aLSp );
+/*N*/
+/*N*/ // get new data
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case 0 : bRet = (rVal >>= aLSp); break;
+/*?*/ case MID_LINESPACE : bRet = (rVal >>= aLSp.Mode); break;
+/*?*/ case MID_HEIGHT : bRet = (rVal >>= aLSp.Height); break;
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); break;
+/*N*/ }
+/*N*/
+/*N*/ if( bRet )
+/*N*/ {
+/*N*/ nLineHeight = aLSp.Height;
+/*N*/ switch( aLSp.Mode )
+/*N*/ {
+/*N*/ case style::LineSpacingMode::LEADING:
+/*N*/ {
+/*?*/ eInterLineSpace = SVX_INTER_LINE_SPACE_FIX;
+/*?*/ eLineSpace = SVX_LINE_SPACE_AUTO;
+/*?*/ nInterLineSpace = aLSp.Height;
+/*N*/ }
+/*N*/ break;
+/*N*/ case style::LineSpacingMode::PROP:
+/*N*/ {
+/*N*/ eLineSpace = SVX_LINE_SPACE_AUTO;
+/*N*/ nPropLineSpace = (sal_Int8)std::min(aLSp.Height, (short)0xFF);
+/*N*/ if(100 == aLSp.Height)
+/*N*/ eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+/*N*/ else
+/*N*/ eInterLineSpace = SVX_INTER_LINE_SPACE_PROP;
+/*N*/ }
+/*N*/ break;
+/*N*/ case style::LineSpacingMode::FIX:
+/*N*/ case style::LineSpacingMode::MINIMUM:
+/*N*/ {
+/*N*/ eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+/*N*/ eLineSpace = aLSp.Mode == style::LineSpacingMode::FIX ? SVX_LINE_SPACE_FIX : SVX_LINE_SPACE_MIN;
+/*N*/ nLineHeight = aLSp.Height;
+/*N*/ if(bConvert)
+/*N*/ nLineHeight = (USHORT)MM100_TO_TWIP(nLineHeight);
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLineSpacingItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxLineSpacingItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const
+/*N*/ {
+/*N*/ sal_Int8 nPropSpace;
+/*N*/ short nInterSpace;
+/*N*/ sal_uInt16 nHeight;
+/*N*/ sal_Int8 nRule, nInterRule;
+/*N*/
+/*N*/ rStrm >> nPropSpace
+/*N*/ >> nInterSpace
+/*N*/ >> nHeight
+/*N*/ >> nRule
+/*N*/ >> nInterRule;
+/*N*/
+/*N*/ SvxLineSpacingItem* pAttr = new SvxLineSpacingItem( nHeight, Which() );
+/*N*/ pAttr->SetInterLineSpace( nInterSpace );
+/*N*/ pAttr->SetPropLineSpace( nPropSpace );
+/*N*/ pAttr->GetLineSpaceRule() = (SvxLineSpace)nRule;
+/*N*/ pAttr->GetInterLineSpaceRule() = (SvxInterLineSpace)nInterRule;
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8) GetPropLineSpace()
+/*N*/ << (short) GetInterLineSpace()
+/*N*/ << (sal_uInt16) GetLineHeight()
+/*N*/ << (sal_Int8) GetLineSpaceRule()
+/*N*/ << (sal_Int8) GetInterLineSpaceRule();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxLineSpacingItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return SVX_LINESPACE_END;//STRIP001 /*?*/ return SVX_LINESPACE_END; // SVX_LINESPACE_TWO_LINES + 1
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ XubString SvxLineSpacingItem::GetValueTextByPos( sal_uInt16 nPos ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); XubString aText;//STRIP001 //STRIP001 //! Strings demnaechst aus Resource laden
+/*?*/ return aText;
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxLineSpacingItem::GetEnumValue() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 //STRIP001 sal_uInt16 nVal;
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ void SvxLineSpacingItem::SetEnumValue( sal_uInt16 nVal )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 //STRIP001 switch ( nVal )
+/*?*/ }
+
+// class SvxAdjustItem ---------------------------------------------------
+
+/*N*/ SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId )
+/*N*/ : SfxEnumItemInterface( nId ),
+/*N*/ bOneBlock( sal_False ), bLastCenter( sal_False ), bLastBlock( sal_False )
+/*N*/ {
+/*N*/ SetAdjust( eAdjst );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return( ( GetAdjust() == ((SvxAdjustItem&)rAttr).GetAdjust() &&
+/*N*/ bOneBlock == ((SvxAdjustItem&)rAttr).bOneBlock &&
+/*N*/ bLastCenter == ((SvxAdjustItem&)rAttr).bLastCenter &&
+/*N*/ bLastBlock == ((SvxAdjustItem&)rAttr).bLastBlock )
+/*N*/ ? 1 : 0 );
+/*N*/ }
+
+/*-----------------18.03.98 16:15-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_PARA_ADJUST : rVal <<= (sal_Int16)GetAdjust(); break;
+/*N*/ case MID_LAST_LINE_ADJUST : rVal <<= (sal_Int16)GetLastBlock(); break;
+/*N*/ case MID_EXPAND_SINGLE :
+/*N*/ {
+/*N*/ sal_Bool bValue = bOneBlock;
+/*N*/ rVal.setValue( &bValue, ::getCppuBooleanType() );
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------18.03.98 16:15-------------------
+
+--------------------------------------------------*/
+
+/*N*/ bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_PARA_ADJUST :
+/*N*/ case MID_LAST_LINE_ADJUST :
+/*N*/ {
+/*N*/ sal_Int32 eVal = - 1;
+/*N*/ try
+/*N*/ {
+/*N*/ eVal = ::comphelper::getEnumAsINT32(rVal);
+/*N*/ }
+/*N*/ catch(...) {}
+/*N*/ if(eVal >= 0 && eVal <= 4)
+/*N*/ {
+/*N*/ if(MID_LAST_LINE_ADJUST == nMemberId &&
+/*N*/ eVal != SVX_ADJUST_LEFT &&
+/*N*/ eVal != SVX_ADJUST_BLOCK &&
+/*N*/ eVal != SVX_ADJUST_CENTER)
+/*N*/ return FALSE;
+/*N*/ if(eVal < (sal_uInt16)SVX_ADJUST_END)
+/*N*/ nMemberId == MID_PARA_ADJUST ?
+/*N*/ SetAdjust((SvxAdjust)eVal) :
+/*N*/ SetLastBlock((SvxAdjust)eVal);
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_EXPAND_SINGLE :
+/*N*/ bOneBlock = Any2Bool(rVal);
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxAdjustItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxAdjustItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxAdjustItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_ADJUST_END; // SVX_ADJUST_BLOCKLINE + 1
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ sal_uInt16 SvxAdjustItem::GetEnumValue() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return GetAdjust();
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxAdjustItem::SetEnumValue( sal_uInt16 nVal )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxAdjustItem::GetVersion( sal_uInt16 nFileVersion ) const
+/*N*/ {
+/*N*/ return (nFileVersion == SOFFICE_FILEFORMAT_31)
+/*N*/ ? 0 : ADJUST_LASTBLOCK_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxAdjustItem::Create(SvStream& rStrm, sal_uInt16 nVersion) const
+/*N*/ {
+/*N*/ char eAdjustment;
+/*N*/ rStrm >> eAdjustment;
+/*N*/ SvxAdjustItem *pRet = new SvxAdjustItem( (SvxAdjust)eAdjustment, Which() );
+/*N*/ if( nVersion >= ADJUST_LASTBLOCK_VERSION )
+/*N*/ {
+/*N*/ sal_Int8 nFlags;
+/*N*/ rStrm >> nFlags;
+/*N*/ pRet->bOneBlock = 0 != (nFlags & 0x0001);
+/*N*/ pRet->bLastCenter = 0 != (nFlags & 0x0002);
+/*N*/ pRet->bLastBlock = 0 != (nFlags & 0x0004);
+/*N*/ }
+/*N*/ return pRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (char)GetAdjust();
+/*N*/ if ( nItemVersion >= ADJUST_LASTBLOCK_VERSION )
+/*N*/ {
+/*N*/ sal_Int8 nFlags = 0;
+/*N*/ if ( bOneBlock )
+/*N*/ nFlags |= 0x0001;
+/*N*/ if ( bLastCenter )
+/*N*/ nFlags |= 0x0002;
+/*N*/ if ( bLastBlock )
+/*N*/ nFlags |= 0x0004;
+/*N*/ rStrm << (sal_Int8) nFlags;
+/*N*/ }
+/*N*/ return rStrm;
+/*N*/ }
+
+// class SvxWidowsItem ---------------------------------------------------
+
+/*N*/ SvxWidowsItem::SvxWidowsItem(const BYTE nL, const USHORT nId ) :
+/*N*/ SfxByteItem( nId, nL )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxWidowsItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxWidowsItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxWidowsItem::Create(SvStream& rStrm, sal_uInt16) const
+/*N*/ {
+/*N*/ sal_Int8 nLines;
+/*N*/ rStrm >> nLines;
+/*N*/ return new SvxWidowsItem( nLines, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// class SvxOrphansItem --------------------------------------------------
+
+/*N*/ SvxOrphansItem::SvxOrphansItem(const BYTE nL, const USHORT nId ) :
+/*N*/ SfxByteItem( nId, nL )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxOrphansItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxOrphansItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxOrphansItem::Create(SvStream& rStrm, sal_uInt16) const
+/*N*/ {
+/*N*/ sal_Int8 nLines;
+/*N*/ rStrm >> nLines;
+/*N*/ return new SvxOrphansItem( nLines, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// class SvxHyphenZoneItem -----------------------------------------------
+
+/*N*/ SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId ) :
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ bHyphen = bHyph;
+/*N*/ bPageEnd = sal_True;
+/*N*/ nMinLead = nMinTrail = 0;
+/*N*/ nMaxHyphens = 255;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_IS_HYPHEN:
+/*N*/ rVal = Bool2Any(bHyphen);
+/*N*/ break;
+/*N*/ case MID_HYPHEN_MIN_LEAD:
+/*N*/ rVal <<= (sal_Int16)nMinLead;
+/*N*/ break;
+/*N*/ case MID_HYPHEN_MIN_TRAIL:
+/*N*/ rVal <<= (sal_Int16)nMinTrail;
+/*N*/ break;
+/*N*/ case MID_HYPHEN_MAX_HYPHENS:
+/*N*/ rVal <<= (sal_Int16)nMaxHyphens;
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Int16 nNewVal = 0;
+/*N*/
+/*N*/ if( nMemberId != MID_IS_HYPHEN )
+/*N*/ if(!(rVal >>= nNewVal))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_IS_HYPHEN:
+/*N*/ bHyphen = Any2Bool(rVal);
+/*N*/ break;
+/*N*/ case MID_HYPHEN_MIN_LEAD:
+/*N*/ nMinLead = (BYTE)nNewVal;
+/*N*/ break;
+/*N*/ case MID_HYPHEN_MIN_TRAIL:
+/*N*/ nMinTrail = (BYTE)nNewVal;
+/*N*/ break;
+/*N*/ case MID_HYPHEN_MAX_HYPHENS:
+/*N*/ nMaxHyphens = (BYTE)nNewVal;
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxHyphenZoneItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return ( (((SvxHyphenZoneItem&)rAttr).bHyphen == bHyphen)
+/*N*/ && (((SvxHyphenZoneItem&)rAttr).bPageEnd == bPageEnd)
+/*N*/ && (((SvxHyphenZoneItem&)rAttr).nMinLead == nMinLead)
+/*N*/ && (((SvxHyphenZoneItem&)rAttr).nMinTrail == nMinTrail)
+/*N*/ && (((SvxHyphenZoneItem&)rAttr).nMaxHyphens == nMaxHyphens) );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxHyphenZoneItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxHyphenZoneItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxHyphenZoneItem::Create(SvStream& rStrm, sal_uInt16) const
+/*N*/ {
+/*N*/ sal_Int8 bHyphen, bHyphenPageEnd;
+/*N*/ sal_Int8 nMinLead, nMinTrail, nMaxHyphens;
+/*N*/ rStrm >> bHyphen >> bHyphenPageEnd >> nMinLead >> nMinTrail >> nMaxHyphens;
+/*N*/ SvxHyphenZoneItem* pAttr = new SvxHyphenZoneItem( sal_False, Which() );
+/*N*/ pAttr->SetHyphen( sal_Bool( bHyphen != 0 ) );
+/*N*/ pAttr->SetPageEnd( sal_Bool( bHyphenPageEnd != 0 ) );
+/*N*/ pAttr->GetMinLead() = nMinLead;
+/*N*/ pAttr->GetMinTrail() = nMinTrail;
+/*N*/ pAttr->GetMaxHyphens() = nMaxHyphens;
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxHyphenZoneItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8) IsHyphen()
+/*N*/ << (sal_Int8) IsPageEnd()
+/*N*/ << (sal_Int8) GetMinLead()
+/*N*/ << (sal_Int8) GetMinTrail()
+/*N*/ << (sal_Int8) GetMaxHyphens();
+/*N*/ return rStrm;
+/*N*/ }
+
+// class SvxTabStop ------------------------------------------------------
+
+/*N*/ SvxTabStop::SvxTabStop()
+/*N*/ {
+/*N*/ nTabPos = 0;
+/*N*/ eAdjustment = SVX_TAB_ADJUST_LEFT;
+/*N*/ cDecimal = SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0);
+/*N*/ cFill = cDfltFillChar;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxTabStop::SvxTabStop( const long nPos, const SvxTabAdjust eAdjst,
+/*N*/ const sal_Unicode cDec, const sal_Unicode cFil )
+/*N*/ {
+/*N*/ nTabPos = nPos;
+/*N*/ eAdjustment = eAdjst;
+/*N*/ cDecimal = ( cDfltDecimalChar == cDec ) ? SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0) : cDec;
+/*N*/ cFill = cFil;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// class SvxTabStopItem --------------------------------------------------
+
+/*N*/ SvxTabStopItem::SvxTabStopItem( sal_uInt16 nWhich ) :
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/ SvxTabStopArr( sal_Int8(SVX_TAB_DEFCOUNT) )
+/*N*/ {
+/*N*/ const sal_uInt16 nTabs = SVX_TAB_DEFCOUNT, nDist = SVX_TAB_DEFDIST;
+/*N*/ const SvxTabAdjust eAdjst= SVX_TAB_ADJUST_DEFAULT;
+/*N*/
+/*N*/ for (sal_uInt16 i = 0; i < nTabs; ++i)
+/*N*/ {
+/*N*/ SvxTabStop * pTab = new SvxTabStop( (i + 1) * nDist, eAdjst );
+/*N*/ SvxTabStopArr::Insert( pTab, 1 );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxTabStopItem::SvxTabStopItem( const sal_uInt16 nTabs,
+/*N*/ const sal_uInt16 nDist,
+/*N*/ const SvxTabAdjust eAdjst,
+/*N*/ sal_uInt16 nWhich ) :
+/*N*/ SfxPoolItem( nWhich ),
+/*N*/ SvxTabStopArr( sal_Int8(nTabs) )
+/*N*/ {
+/*N*/ for ( sal_uInt16 i = 0; i < nTabs; ++i )
+/*N*/ {
+/*N*/ SvxTabStop * pTab = new SvxTabStop( (i + 1) * nDist, eAdjst );
+/*N*/ SvxTabStopArr::Insert( pTab, 1 );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxTabStopItem::SvxTabStopItem( const SvxTabStopItem& rTSI ) :
+/*N*/ SfxPoolItem( rTSI.Which() ),
+/*N*/ SvxTabStopArr( (sal_Int8)rTSI.Count() )
+/*N*/ {
+/*N*/ SvxTabStopArr::Insert( &rTSI );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_uInt16 SvxTabStopItem::GetPos( const SvxTabStop& rTab ) const
+/*N*/ {
+/*N*/ sal_uInt16 nFound;
+/*N*/ return Seek_Entry( rTab, &nFound ) ? nFound : SVX_TAB_NOTFOUND;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+
+/*
+ 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-------------------
+
+--------------------------------------------------*/
+
+/*N*/ bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_TABSTOPS:
+/*N*/ {
+/*N*/ sal_uInt16 nCount = Count();
+/*N*/ uno::Sequence< style::TabStop> aSeq(nCount);
+/*N*/ style::TabStop* pArr = aSeq.getArray();
+/*N*/ for(sal_uInt16 i = 0; i < nCount; i++)
+/*N*/ {
+/*N*/ const SvxTabStop& rTab = *(GetStart() + i);
+/*N*/ pArr[i].Position = bConvert ? TWIP_TO_MM100(rTab.GetTabPos()) : rTab.GetTabPos();
+/*N*/ switch(rTab.GetAdjustment())
+/*N*/ {
+/*N*/ case SVX_TAB_ADJUST_LEFT : pArr[i].Alignment = style::TabAlign_LEFT; break;
+/*N*/ case SVX_TAB_ADJUST_RIGHT : pArr[i].Alignment = style::TabAlign_RIGHT; break;
+/*N*/ case SVX_TAB_ADJUST_DECIMAL: pArr[i].Alignment = style::TabAlign_DECIMAL; break;
+/*N*/ case SVX_TAB_ADJUST_CENTER : pArr[i].Alignment = style::TabAlign_CENTER; break;
+/*N*/ default: //SVX_TAB_ADJUST_DEFAULT
+/*N*/ pArr[i].Alignment = style::TabAlign_DEFAULT;
+/*N*/
+/*N*/ }
+/*N*/ pArr[i].DecimalChar = rTab.GetDecimal();
+/*N*/ pArr[i].FillChar = rTab.GetFill();
+/*N*/ }
+/*N*/ rVal <<= aSeq;
+/*N*/ break;
+/*N*/ }
+/*N*/ case MID_STD_TAB:
+/*N*/ {
+/*N*/ const SvxTabStop &rTab = *(GetStart());
+/*N*/ rVal <<= bConvert ? TWIP_TO_MM100(rTab.GetTabPos()) : rTab.GetTabPos();
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------19.03.98 08:50-------------------
+
+--------------------------------------------------*/
+
+/*N*/ bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_TABSTOPS:
+/*N*/ {
+/*N*/ uno::Sequence< style::TabStop> aSeq;
+/*N*/ if(!(rVal >>= aSeq))
+/*N*/ {
+/*?*/ uno::Sequence < uno::Sequence < uno::Any > > aAnySeq;
+/*?*/ if (!(rVal >>= aAnySeq))
+/*?*/ return sal_False;
+/*?*/ sal_Int32 nLength = aAnySeq.getLength();
+/*?*/ aSeq.realloc( nLength );
+/*?*/ for ( sal_Int32 n=0; n<nLength; n++ )
+/*?*/ {
+/*?*/ uno::Sequence < uno::Any >& rAnySeq = aAnySeq[n];
+/*?*/ if ( rAnySeq.getLength() == 4 )
+/*?*/ {
+/*?*/ if (!(rAnySeq[0] >>= aSeq[n].Position)) return sal_False;
+/*?*/ if (!(rAnySeq[1] >>= aSeq[n].Alignment))
+/*?*/ {
+/*?*/ sal_Int32 nVal;
+/*?*/ if (rAnySeq[1] >>= nVal)
+/*?*/ aSeq[n].Alignment = (::com::sun::star::style::TabAlign) nVal;
+/*?*/ else
+/*?*/ return sal_False;
+/*?*/ }
+/*?*/ if (!(rAnySeq[2] >>= aSeq[n].DecimalChar))
+/*?*/ {
+/*?*/ ::rtl::OUString aVal;
+/*?*/ if ( (rAnySeq[2] >>= aVal) && aVal.getLength() == 1 )
+/*?*/ aSeq[n].DecimalChar = aVal.toChar();
+/*?*/ else
+/*?*/ return sal_False;
+/*?*/ }
+/*?*/ if (!(rAnySeq[3] >>= aSeq[n].FillChar))
+/*?*/ {
+/*?*/ ::rtl::OUString aVal;
+/*?*/ if ( (rAnySeq[3] >>= aVal) && aVal.getLength() == 1 )
+/*?*/ aSeq[n].FillChar = aVal.toChar();
+/*?*/ else
+/*?*/ return sal_False;
+/*?*/ }
+/*?*/ }
+/*?*/ else
+/*?*/ return sal_False;
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ SvxTabStopArr::Remove( 0, Count() );
+/*N*/ const style::TabStop* pArr = aSeq.getConstArray();
+/*N*/ const sal_uInt16 nCount = (sal_uInt16)aSeq.getLength();
+/*N*/ for(sal_uInt16 i = 0; i < nCount ; i++)
+/*N*/ {
+/*N*/ SvxTabAdjust eAdjust = SVX_TAB_ADJUST_DEFAULT;
+/*N*/ switch(pArr[i].Alignment)
+/*N*/ {
+/*N*/ case style::TabAlign_LEFT : eAdjust = SVX_TAB_ADJUST_LEFT; break;
+/*N*/ case style::TabAlign_CENTER : eAdjust = SVX_TAB_ADJUST_CENTER; break;
+/*N*/ case style::TabAlign_RIGHT : eAdjust = SVX_TAB_ADJUST_RIGHT; break;
+/*N*/ case style::TabAlign_DECIMAL: eAdjust = SVX_TAB_ADJUST_DECIMAL; break;
+/*N*/ }
+/*N*/ sal_Unicode cFill = pArr[i].FillChar;
+/*N*/ sal_Unicode cDecimal = pArr[i].DecimalChar;
+/*N*/ SvxTabStop aTab( bConvert ? MM100_TO_TWIP(pArr[i].Position) : pArr[i].Position,
+/*N*/ eAdjust,
+/*N*/ cDecimal,
+/*N*/ cFill );
+/*N*/ Insert(aTab);
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ case MID_STD_TAB:
+/*N*/ {
+/*N*/ sal_Int32 nNewPos;
+/*N*/ if (!(rVal >>= nNewPos) )
+/*N*/ return sal_False;
+/*N*/ const SvxTabStop& rTab = *(GetStart());
+/*N*/ SvxTabStop aNewTab ( bConvert ? MM100_TO_TWIP ( nNewPos ) : nNewPos,
+/*N*/ rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() );
+/*N*/ Remove ( 0 );
+/*N*/ Insert( aNewTab );
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxTabStopItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ const SvxTabStopItem& rTSI = (SvxTabStopItem&)rAttr;
+/*N*/
+/*N*/ if ( Count() != rTSI.Count() )
+/*N*/ return 0;
+/*N*/
+/*N*/ for ( sal_uInt16 i = 0; i < Count(); ++i )
+/*N*/ if( !(*this)[i].IsEqual( rTSI[i] ) )
+/*N*/ return 0;
+/*N*/ return 1;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxTabStopItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxTabStopItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxTabStopItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 nTabs;
+/*N*/ rStrm >> nTabs;
+/*N*/ SvxTabStopItem* pAttr =
+/*N*/ new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_DEFAULT, Which() );
+/*N*/
+/*N*/ for ( sal_Int8 i = 0; i < nTabs; i++ )
+/*N*/ {
+/*N*/ long nPos;
+/*N*/ sal_Int8 eAdjust;
+/*N*/ unsigned char cDecimal, cFill;
+/*N*/ rStrm >> nPos >> eAdjust >> cDecimal >> cFill;
+/*N*/ if( !i || SVX_TAB_ADJUST_DEFAULT != eAdjust )
+/*N*/ pAttr->Insert( SvxTabStop
+/*N*/ ( nPos, (SvxTabAdjust)eAdjust, sal_Unicode(cDecimal), sal_Unicode(cFill) ) );
+/*N*/ }
+/*N*/ return pAttr;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ //MA 05. Sep. 96: Default-Tabs werden nur noch fuer das default-Attr
+/*N*/ //expandiert. Fuer vollstaendige Rueckwaertskompatibilitaet (<=304)
+/*N*/ //muessten alle Tabs expandiert werden, dass blaeht aber das File u.U.
+/*N*/ //enorm auf.
+/*N*/ //Alles nur SWG!
+/*N*/
+/*N*/ const SfxItemPool *pPool = SfxItemPool::GetStoringPool();
+/*N*/ const FASTBOOL bStoreDefTabs = pPool
+/*N*/ && pPool->GetName().EqualsAscii("SWG")
+/*N*/ && binfilter::IsDefaultItem( this );
+/*N*/
+/*N*/ const short nTabs = Count();
+/*N*/ sal_uInt16 nCount = 0, nDefDist;
+/*N*/ long nNew;
+/*N*/
+/*N*/ if( bStoreDefTabs )
+/*N*/ {
+/*N*/ const SvxTabStopItem& rDefTab = (const SvxTabStopItem &)
+/*N*/ pPool->GetDefaultItem( pPool->GetWhich( SID_ATTR_TABSTOP, sal_False ) );
+/*N*/ nDefDist = sal_uInt16( rDefTab.GetStart()->GetTabPos() );
+/*N*/ const long nPos = nTabs > 0 ? (*this)[nTabs-1].GetTabPos() : 0;
+/*N*/ nCount = (sal_uInt16)(nPos / nDefDist);
+/*N*/ nNew = (nCount + 1) * nDefDist;
+/*N*/
+/*N*/ if( nNew <= nPos + 50 )
+/*N*/ nNew += nDefDist;
+/*N*/
+/*N*/ nCount = nNew < lA3Width ? ( lA3Width - nNew ) / nDefDist + 1 : 0;
+/*N*/ }
+/*N*/
+/*N*/ rStrm << (sal_Int8) ( nTabs + nCount );
+/*N*/ for ( short i = 0; i < nTabs; i++ )
+/*N*/ {
+/*N*/ const SvxTabStop& rTab = (*this)[ i ];
+/*N*/ rStrm << (long) rTab.GetTabPos()
+/*N*/ << (sal_Int8) rTab.GetAdjustment()
+/*N*/ << (unsigned char) rTab.GetDecimal()
+/*N*/ << (unsigned char) rTab.GetFill();
+/*N*/ }
+/*N*/
+/*N*/ if ( bStoreDefTabs )
+/*N*/ for( ; nCount; --nCount )
+/*N*/ {
+/*N*/ SvxTabStop aSwTabStop(nNew, SVX_TAB_ADJUST_DEFAULT);
+/*N*/ rStrm << (long) aSwTabStop.GetTabPos()
+/*N*/ << (sal_Int8) aSwTabStop.GetAdjustment()
+/*N*/ << (unsigned char) aSwTabStop.GetDecimal()
+/*N*/ << (unsigned char) aSwTabStop.GetFill();
+/*N*/ nNew += nDefDist;
+/*N*/ }
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ sal_Bool SvxTabStopItem::Insert( const SvxTabStop& rTab )
+/*N*/ {
+/*N*/ sal_uInt16 nTabPos = GetPos(rTab);
+/*N*/ if(SVX_TAB_NOTFOUND != nTabPos )
+/*?*/ Remove(nTabPos);
+/*N*/ return SvxTabStopArr::Insert( rTab );
+/*N*/ }
+// -----------------------------------------------------------------------
+
+
+
+// class SvxFmtSplitItem -------------------------------------------------
+/*N*/ SvxFmtSplitItem::~SvxFmtSplitItem()
+/*N*/ {
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ SfxPoolItem* SvxFmtSplitItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxFmtSplitItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxFmtSplitItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Int8)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/
+/*N*/ SfxPoolItem* SvxFmtSplitItem::Create( SvStream& rStrm, sal_uInt16 ) const
+/*N*/ {
+/*N*/ sal_Int8 bIsSplit;
+/*N*/ rStrm >> bIsSplit;
+/*N*/ return new SvxFmtSplitItem( sal_Bool( bIsSplit != 0 ), Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// --------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxScriptSpaceItem::SvxScriptSpaceItem( sal_Bool bOn, const sal_uInt16 nId )
+/*N*/ : SfxBoolItem( nId, bOn )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxScriptSpaceItem( GetValue(), Which() );
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, USHORT) const
+/*N*/ {
+/*N*/ sal_Bool bFlag;
+/*N*/ rStrm >> bFlag;
+/*N*/ return new SvxScriptSpaceItem( bFlag, Which() );
+/*N*/ }
+
+/*N*/ USHORT SvxScriptSpaceItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxTwoLinesItem: Gibt es ein neues Fileformat?" );
+/*N*/
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxHangingPunctuationItem::SvxHangingPunctuationItem(
+/*N*/ sal_Bool bOn, const sal_uInt16 nId )
+/*N*/ : SfxBoolItem( nId, bOn )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxHangingPunctuationItem( GetValue(), Which() );
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, USHORT) const
+/*N*/ {
+/*N*/ sal_Bool nValue;
+/*N*/ rStrm >> nValue;
+/*N*/ return new SvxHangingPunctuationItem( nValue, Which() );
+/*N*/ }
+
+/*N*/ USHORT SvxHangingPunctuationItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxHangingPunctuationItem: Gibt es ein neues Fileformat?" );
+/*N*/
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvxForbiddenRuleItem::SvxForbiddenRuleItem(
+/*N*/ sal_Bool bOn, const sal_uInt16 nId )
+/*N*/ : SfxBoolItem( nId, bOn )
+/*N*/ {
+/*N*/ }
+/* -----------------------------29.11.00 11:23--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxForbiddenRuleItem( GetValue(), Which() );
+/*N*/ }
+/* -----------------------------29.11.00 11:23--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const
+/*N*/ {
+/*N*/ sal_Bool nValue;
+/*N*/ rStrm >> nValue;
+/*N*/ return new SvxForbiddenRuleItem( nValue, Which() );
+/*N*/ }
+/* -----------------------------29.11.00 11:23--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxForbiddenRuleItem: Gibt es ein neues Fileformat?" );
+/*N*/
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+/* -----------------------------29.11.00 11:23--------------------------------
+
+ ---------------------------------------------------------------------------*/
+
+/*************************************************************************
+|* class SvxParaVertAlignItem
+*************************************************************************/
+
+/*N*/ SvxParaVertAlignItem::SvxParaVertAlignItem( sal_uInt16 nValue,
+/*N*/ const sal_uInt16 nW )
+/*N*/ : SfxUInt16Item( nW, nValue )
+/*N*/ {
+/*N*/ }
+
+
+
+
+/*N*/ USHORT SvxParaVertAlignItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+
+
+
+
+
+/*N*/ SvxParaGridItem::SvxParaGridItem( sal_Bool bOn, const sal_uInt16 nId )
+/*N*/ : SfxBoolItem( nId, bOn )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, USHORT) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+/*N*/ USHORT SvxParaGridItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxParaGridItem: Gibt es ein neues Fileformat?" );
+/*N*/
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+/*N*/ SfxItemPresentation SvxParaGridItem::GetPresentation(
+/*N*/ SfxItemPresentation ePres,
+/*N*/ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+/*N*/ String &rText, const ::IntlWrapper* pIntl ) const
+/*N*/ {
+/*?*/ switch( ePres )
+/*?*/ {
+/*?*/ case SFX_ITEM_PRESENTATION_NONE:
+/*?*/ rText.Erase();
+/*?*/ break;
+/*?*/ case SFX_ITEM_PRESENTATION_NAMELESS:
+/*?*/ case SFX_ITEM_PRESENTATION_COMPLETE:
+/*?*/ {
+/*?*/ rText = GetValue() ?
+/*?*/ SVX_RESSTR( RID_SVXITEMS_PARASNAPTOGRID_ON ) :
+/*?*/ SVX_RESSTR( RID_SVXITEMS_PARASNAPTOGRID_OFF );
+/*?*/
+/*?*/ return ePres;
+/*?*/ }
+/*?*/ break;
+/*?*/ }
+/*?*/ return SFX_ITEM_PRESENTATION_NONE;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_postattr.cxx b/binfilter/bf_svx/source/items/svx_postattr.cxx
new file mode 100644
index 000000000000..ea61ba54dbe5
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_postattr.cxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _SVX_POSTATTR_CXX
+#define ITEMID_AUTHOR 0
+#define ITEMID_DATE 0
+#define ITEMID_TEXT 0
+
+#include <bf_svtools/stritem.hxx>
+
+#include "postattr.hxx"
+namespace binfilter {
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPostItAuthorItem, SfxStringItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPostItDateItem, SfxStringItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPostItTextItem, SfxStringItem);
+
+// class SvxPostItAuthorItem ---------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// class SvxPostItDateItem -----------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// class SvxPostItTextItem -----------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_rotmodit.cxx b/binfilter/bf_svx/source/items/svx_rotmodit.cxx
new file mode 100644
index 000000000000..223044642da6
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_rotmodit.cxx
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/stream.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <com/sun/star/table/CellVertJustify.hpp>
+
+#include "rotmodit.hxx"
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// STATIC DATA -----------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxRotateModeItem, SfxEnumItem);
+
+
+//-----------------------------------------------------------------------
+// SvxRotateModeItem - Ausrichtung bei gedrehtem Text
+//-----------------------------------------------------------------------
+
+/*N*/ SvxRotateModeItem::SvxRotateModeItem( SvxRotateMode eMode, USHORT nWhich )
+/*N*/ : SfxEnumItem( nWhich, eMode )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxRotateModeItem::SvxRotateModeItem( const SvxRotateModeItem& rItem )
+/*N*/ : SfxEnumItem( rItem )
+/*N*/ {
+/*N*/ }
+
+/*N*/ __EXPORT SvxRotateModeItem::~SvxRotateModeItem()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SfxPoolItem* __EXPORT SvxRotateModeItem::Create( SvStream& rStream, USHORT ) const
+/*N*/ {
+/*N*/ USHORT nVal;
+/*N*/ rStream >> nVal;
+/*N*/ return new SvxRotateModeItem( (SvxRotateMode) nVal,Which() );
+/*N*/ }
+
+
+
+/*?*/ USHORT __EXPORT SvxRotateModeItem::GetValueCount() const
+/*?*/ {
+/*?*/ return 4; // STANDARD, TOP, CENTER, BOTTOM
+/*?*/ }
+
+/*N*/ SfxPoolItem* __EXPORT SvxRotateModeItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxRotateModeItem( *this );
+/*N*/ }
+
+/*N*/ USHORT __EXPORT SvxRotateModeItem::GetVersion( USHORT nFileVersion ) const
+/*N*/ {
+/*N*/ return 0;
+/*N*/ }
+
+// QueryValue/PutValue: Der ::com::sun::star::table::CellVertJustify enum wird mitbenutzt...
+
+/*N*/ bool SvxRotateModeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
+/*N*/ switch ( (SvxRotateMode)GetValue() )
+/*N*/ {
+/*N*/ case SVX_ROTATE_MODE_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
+/*N*/ case SVX_ROTATE_MODE_TOP: eUno = table::CellVertJustify_TOP; break;
+/*N*/ case SVX_ROTATE_MODE_CENTER: eUno = table::CellVertJustify_CENTER; break;
+/*N*/ case SVX_ROTATE_MODE_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
+/*N*/ }
+/*N*/ rVal <<= eUno;
+/*N*/ return sal_True;
+/*N*/ }
+
+/*N*/ bool SvxRotateModeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ table::CellVertJustify eUno;
+/*N*/ if(!(rVal >>= eUno))
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ eUno = (table::CellVertJustify)nValue;
+/*N*/ }
+/*N*/
+/*N*/ SvxRotateMode eSvx = SVX_ROTATE_MODE_STANDARD;
+/*N*/ switch (eUno)
+/*N*/ {
+/*N*/ 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;
+/*N*/ case table::CellVertJustify_BOTTOM: eSvx = SVX_ROTATE_MODE_BOTTOM; break;
+/*N*/ }
+/*N*/ SetValue( eSvx );
+/*N*/ return sal_True;
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_svxerr.cxx b/binfilter/bf_svx/source/items/svx_svxerr.cxx
new file mode 100644
index 000000000000..e8f745ef8ebb
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_svxerr.cxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <tools/shl.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "svxerr.hxx"
+#include "dialmgr.hxx"
+
+#include "dialogs.hrc"
+namespace binfilter {
+
+/*N*/ SvxErrorHandler::SvxErrorHandler() :
+/*N*/
+/*N*/ SfxErrorHandler(
+/*N*/ RID_SVXERRCODE, ERRCODE_AREA_SVX, ERRCODE_AREA_SVX_END, &DIALOG_MGR() )
+/*N*/ {
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_svxerr.src b/binfilter/bf_svx/source/items/svx_svxerr.src
new file mode 100644
index 000000000000..f3ba72956426
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_svxerr.src
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+ // include ---------------------------------------------------------------
+#define __RSC
+
+#ifndef _ERRCODE_HXX
+#include <tools/errcode.hxx>
+#endif
+
+#include "svxerr.hxx"
+#include "dialogs.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // Error-Context ---------------------------------------------------------
+Resource RID_SVXERRCTX
+{
+};
+ // Error-Code ------------------------------------------------------------
+Resource RID_SVXERRCODE
+{
+ String ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT&ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Eine unverknüpfte Grafik konnte nicht geladen werden" ;
+ Text [ en-US ] = "An unlinked graphic could not be loaded";
+ Text[ pt ] = "Foi impossível carregar uma imagem não ligada.";
+ Text[ ru ] = "Ðевозможно загрузить неÑвÑзанные графичеÑкие объекты";
+ Text[ el ] = "Δεν ήταν δυνατόν να φοÏτωθεί κάποιο γÏαφικό χωÏίς σÏνδεση";
+ Text[ nl ] = "Niet-gekoppelde afbeelding kan niet worden geladen";
+ Text[ fr ] = "Une image (non liée) n'a pas pu être chargée.";
+ Text[ es ] = "No se pudo cargar una imagen no vinculada";
+ Text[ fi ] = "Linkittämätöntä kuvaa ei voitu ladata";
+ Text[ ca ] = "No s'ha pogut carregar la imatge no enllaçada";
+ Text[ it ] = "Non è stato possibile caricare un'immagine non collegata";
+ Text[ sk ] = "Nie je možné naÄítaÅ¥ nepripojený obrázok";
+ Text[ da ] = "Det var ikke muligt at indlæse en ikke-kædet grafik";
+ Text[ sv ] = "Ett grafikobjekt utan länk kunde inte laddas";
+ Text[ pl ] = "Nie można załadować niepołączonej grafiki";
+ Text[ pt-BR ] = "Não foi possível carregar uma figura não vinculada.";
+ Text[ th ] = "ไม่สามารถโหลดà¸à¸£à¸²à¸Ÿà¸´à¸„ที่ไม่เชื่อมโยงได้";
+ Text[ ja ] = "リンクã•ã‚Œã¦ã„ãªã„図ã¯èª­ã¿è¾¼ã¿ã§ãã¾ã›ã‚“";
+ Text[ ko ] = "ì—°ê²°ë˜ì§€ ì•Šì€ ê·¸ëž˜í”½ì€ ë¡œë“œí•˜ì§€ 못했습니다.";
+ Text[ zh-CN ] = "无法装入一个尚未链接的图形";
+ Text[ zh-TW ] = "無法載入一個尚未連çµçš„圖形";
+ Text[ tr ] = "Bağlantı oluşturulmamış bir grafik yüklenemedi";
+ Text[ hi-IN ] = "लिंक हटाया हà¥à¤† सà¥à¤šà¤¿à¤¤à¥à¤° को लोड नहीं कर सकते है";
+ Text[ ar ] = "تعذر تحميل إحدى الصور الغير مرتبطة";
+ Text[ he ] = "â€®×œ× × ×™×ª×Ÿ לטעון ×¢×¦× ×’×¨×¤×™ שקישורו נותק‬";
+ };
+ String (ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_CLASS_READ) & ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Die Formular-Schicht wurden nicht geladen, da notwendige IO-Services (stardiv.uno.io.*) nicht instantiiert werden konnten";
+ Text [ en-US ] = "The form layer wasn't loaded as the required IO-services (stardiv.uno.io.*) could not be instantiated";
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Impossível carregar a camada do formulário: foi impossível instanciar os serviços IO (stardiv.uno.io.*) necessários";
+ Text[ ru ] = "Ðе загружен Ñлой формы, так как не удалоÑÑŒ Ñоздать ÑкземплÑÑ€ Ñлужбы IO (stardiv.uno.io.*).";
+ Text[ el ] = "Δεν φοÏτώθηκε η στÏώση της φόÏμας, επειδή δεν ήταν δυνατόν να γίνει ενημέÏωση κάποιων απαιτουμένων υπηÏεσιών εισόδου - εξόδου (stardiv.uno.io.*).";
+ Text[ nl ] = "Formulierniveau kan niet worden geladen omdat noodzakelijke io--services (stardiv.uno.io.*) niet kunnen worden geïnitieerd.";
+ Text[ fr ] = "La couche de formulaire n'a pas été chargée : impossible d'instancier les services IO (stardiv.uno.io.*) requis.";
+ Text[ es ] = "No se cargó la capa de formulario porque no se pudieron instanciar servicios IO necesarios (stardiv.uno.io.*)";
+ Text[ fi ] = "Lomakekerrosta ei ladattu, koska vaadittujen IO-palveluiden (stardiv.uno.io.*) käyttö ei onnistunut";
+ Text[ ca ] = "La capa del formulari no estava carregada quan no s'han pogut instanciar els serveis IO (stardiv.uno.io.*) necessaris";
+ Text[ it ] = "Lo strato del formulario non è stato caricato poichè stato possibile creare i servizi IO (strdiv.uno.io.*) necessari.";
+ Text[ sk ] = "Vrstva formulára nebola naÄítaná, pretože nie je možné vytvoriÅ¥ požadované IO služby (stardiv.uno.io.*).";
+ Text[ da ] = "Formularlaget blev ikke indlæst, fordi det ikke var muligt at instantiere den krævede IO-service (stardiv.uno.io.*).";
+ Text[ sv ] = "Formulärskiktet laddades inte eftersom nödvändig IO-service (stardiv.uno.io.*) inte kunde instantieras.";
+ Text[ pl ] = "Warstwa formularza nie została załadowana, ponieważ nie można utworzyć instancji wymaganych usług we-wy (stardiv.uno.io.*)";
+ Text[ pt-BR ] = "Não foi possível carregar a camada do formulário pois não foi possível instanciar os serviços IO (stardiv.uno.io.*) necessários.";
+ Text[ th ] = "ไม่ได้โหลดระดับของà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡à¹€à¸›à¹‡à¸™ IO-services (stardiv.uno.io.*) อย่างที่ต้องà¸à¸²à¸£à¹„ม่สามารถถูà¸à¹à¸ªà¸”งให้เห็นตัวอย่าง";
+ Text[ ja ] = "IOサービス(stardiv.uno.io.*)ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ããªã‹ã£ãŸãŸã‚ã€ãƒ•ã‚©ãƒ¼ãƒ å±¤ã¯èª­ã¿è¾¼ã¾ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚";
+ Text[ ko ] = "필요한 IO 서비스(stardiv.uno.io.*)ì˜ ì¸ìŠ¤í„´ìŠ¤ë¥¼ ìƒì„±í•˜ì§€ 못했으므로 ì–‘ì‹ ê³„ì¸µì´ ë¡œë“œë˜ì§€ 않았습니다.";
+ Text[ zh-CN ] = "因为无法安装需è¦çš„ IO æœåŠ¡(stardiv.uno.io.*),所以ä¸èƒ½è£…入表å•åˆ†å±‚ä¿¡æ¯";
+ Text[ zh-TW ] = "因為沒有安è£å¿…è¦çš„ IO æœå‹™(stardiv.uno.io.*)而無法載入表單層次。";
+ Text[ tr ] = "Gerekli IO hizmetleri (stardiv.uno.io.*) başlatılamadığı için, form düzeyi yüklenemedi.";
+ Text[ hi-IN ] = "आवशà¥à¤¯à¤• IO-सेवों (stardiv.uno.io.*) को पà¥à¤°à¤¾à¤°à¤‚भ नहीं करने के कारण फ़ॉरà¥à¤® का परत को लोड नहीं कर सकते है ";
+ Text[ ar ] = "لم يتم تحميل طبقة الاستمارة، إذ تعذر إنشاء خدمات IO اللازمة (stardiv.uno.io.*)";
+ Text[ he ] = "â€®×œ× × ×™×ª×Ÿ להפעיל ×ת שירתי הקלט\\פלט ×”× ×“×¨×©×™× (stardiv.uno.io.*) ולכן רובד ×”×˜×¤×¡×™× ×œ× × ×˜×¢×Ÿ.‬";
+ };
+ String (ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_CLASS_WRITE) & ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Die Formular-Schicht wurden nicht geschrieben, da notwendige IO-Services (stardiv.uno.io.*) nicht instantiiert werden konnten";
+ Text [ en-US ] = "The form layer wasn't written as the required IO services (stardiv.uno.io.*) could not be instantiated";
+ Text[ pt ] = "Impossível escrever a camada do formulário: foi impossível instanciar os serviços IO (stardiv.uno.io.*) necessários.";
+ Text[ ru ] = "Ðе запиÑан Ñлой формы, так как не удалоÑÑŒ Ñоздать ÑкземплÑÑ€ Ñлужбы IO (stardiv.uno.io.*).";
+ Text[ el ] = "Δεν φοÏτώθηκε η στÏώση της φόÏμας, επειδή δεν ήταν δυνατόν να γίνει ενημέÏωση κάποιων απαιτουμένων υπηÏεσιών εισόδου - εξόδου (stardiv.uno.io.*).";
+ Text[ nl ] = "Formulierniveau is niet geschreven omdat noodzakelijke io-services (stardiv.uno.io.*) niet kunnen worden geïnitieerd.";
+ Text[ fr ] = "La couche de formulaire n'a pas été écrite : impossible d'instancier les services IO (stardiv.uno.io.*) requis.";
+ Text[ es ] = "No se pudo escribir la capa de formulario porque no se pudieron instanciar servicios IO necesarios (stardiv.uno.io.*)";
+ Text[ fi ] = "Lomakekerrosta ei kirjoitettu, koska vaadittujen IO-palveluiden (stardiv.uno.io.*) käyttö ei onnistunut";
+ Text[ ca ] = "La capa del formulari no estava escrita quan no s'han pogut instanciar els serveis IO (stardiv.uno.io.*) necessaris";
+ Text[ it ] = "Lo strato del formulario non è stato scritto perché non non è stato possibile creare i servizi IO (stardiv.uno.io.*) necessari.";
+ Text[ sk ] = "Vrstva formulára nebola zapísaná, pretože nie je možné vytvoriť požadované IO služby (stardiv.uno.io.*).";
+ Text[ da ] = "Formularlaget blev ikke skrevet, fordi det ikke var muligt at instantiere den krævede IO-service (stardiv.uno.io.*).";
+ Text[ sv ] = "Formulärskiktet skrevs inte eftersom nödvändig IO-service (stardiv.uno.io.*) inte kunde instantieras";
+ Text[ pl ] = "Warstwa formularza nie została zapisana, ponieważ nie można utworzyć instancji wymaganych usług we-wy (stardiv.uno.io.*)";
+ Text[ pt-BR ] = "Não foi possível gravar a camada do formulário pois não foi possível instanciar os serviços IO (stardiv.uno.io.*) necessários.";
+ Text[ th ] = "ไม่สามารถเขียนระดับของà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡à¹€à¸›à¹‡à¸™ IO services (stardiv.uno.io.*) อย่างที่ต้องà¸à¸²à¸£à¹„ม่สามารถถูà¸à¹à¸ªà¸”งให้เห็นตัวอย่าง";
+ Text[ ja ] = "IOサービス(stardiv.uno.io.*)ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã§ããªã‹ã£ãŸãŸã‚ã€ãƒ•ã‚©ãƒ¼ãƒ å±¤ã¯æ›¸ãã“ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚";
+ Text[ ko ] = "필요한 IO 서비스(stardiv.uno.io.*)ì˜ ì¸ìŠ¤í„´ìŠ¤ë¥¼ ìƒì„±í•˜ì§€ 못했으므로 ì–‘ì‹ ê³„ì¸µì´ ìž‘ì„±ë˜ì§€ 않았습니다.";
+ Text[ zh-CN ] = "因为无法安装需è¦çš„ IO æœåŠ¡(stardiv.uno.io.*),所以ä¸èƒ½å†™å…¥è¡¨å•åˆ†å±‚ä¿¡æ¯";
+ Text[ zh-TW ] = "因為沒有安è£å¿…è¦çš„ IO æœå‹™(stardiv.uno.io.*)而無法寫入表單層次。";
+ Text[ tr ] = "Gerekli IO hizmetleri (stardiv.uno.io.*) başlatılamadığı için, form düzeyi yazılamadı.";
+ Text[ hi-IN ] = "आवशà¥à¤¯à¤• IO-सवों (stardiv.uno.io.*) को पà¥à¤°à¤¾à¤°à¤‚भ नहीं करने के कारण फ़ॉरà¥à¤® का परत को लिख नहीं सकते है";
+ Text[ ar ] = "لم يتم كتابة طبقة الاستمارة، إذ تعذر إنشاء خدمات IO اللازمة (stardiv.uno.io.*)";
+ Text[ he ] = "â€®×œ× × ×™×ª×Ÿ להפעיל ×ת שירתי הקלט\\פלט ×”× ×“×¨×©×™× (stardiv.uno.io.*) ולכן רובד ×”×˜×¤×¡×™× ×œ× × ×›×ª×‘.‬";
+ };
+ String (ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_CLASS_READ) & ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Beim Lesen der Formular-Controls trat ein Fehler auf. Die Formular-Schicht wurde nicht geladen";
+ Text [ en-US ] = "An error occurred while reading the form controls. The form layer has not been loaded";
+ Text[ pt ] = "Ocorreu um erro na leitura dos controlos do formulário. Foi impossível carregar a camada do formulário.";
+ Text[ ru ] = "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñлементов ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ñ‹. Ðе загружен Ñлой формы";
+ Text[ el ] = "Κατά την ανάγνωση των στοιχείων ελέγχου της φόÏμας παÏουσιάστηκε ένα σφάλμα. Η στÏώση της φόÏμας δεν φοÏτώθηκε.";
+ Text[ nl ] = "Fout bij lezen van formulier-controls. Formulierniveau is niet geladen.";
+ Text[ fr ] = "Une erreur est survenue lors de la lecture des contrôles de formulaire. La couche de formulaire n'a pas été chargée.";
+ Text[ es ] = "Ha ocurrido un error al leer los controles de formulario. No se cargó la capa de formulario.";
+ Text[ fi ] = "Lomakkeen ohjausobjekteja luettaessa ilmeni virhe. Lomakekerrosta ei ole ladattu";
+ Text[ ca ] = "Hi ha hagut un error en llegir els controls del formulari. No s'ha pogut carregar la capa del formulari";
+ Text[ it ] = "Si è verificato un errore nella lettura del formulario Controls. Lo strato del formulario non è stato caricato";
+ Text[ sk ] = "Nastala chyba pri naÄítavaní formulárových prvkov. Vrstva formulára nebola naÄítaná.";
+ Text[ da ] = "Der opstod en fejl under læsning af formular-kontrolelementerne. Formularlaget blev ikke indlæst.";
+ Text[ sv ] = "Det uppstod ett fel vid läsning av formulär-controls. Formulärskiktet laddades inte";
+ Text[ pl ] = "Wystąpił błąd podczas odczytu formantów formularza. Warstwa formularza nie została załadowana";
+ Text[ pt-BR ] = "Ocorreu um erro na leitura dos controles do formulário. Não foi possível carregar a camada do formulário.";
+ Text[ th ] = "เà¸à¸´à¸”ความผิดพลาดขณะอ่านตัวควบคุมà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡ ระดับของà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡à¸¢à¸±à¸‡à¹„ม่ได้ถูà¸à¹‚หลด";
+ Text[ ja ] = "フォーム層ã®èª­ã¿å–り中ã«ã‚¨ãƒ©ãƒ¼ç™ºç”Ÿã€‚ã“ã®ãƒ•ã‚©ãƒ¼ãƒ å±¤ã¯èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã›ã‚“。";
+ Text[ ko ] = "ì–‘ì‹ ì»¨íŠ¸ë¡¤ì„ ì½ì„ ë•Œ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ì–‘ì‹ ê³„ì¸µì´ ë¡œë“œë˜ì§€ 않았습니다.";
+ Text[ zh-CN ] = "在读å–表å•æŽ§åˆ¶åŒºæ—¶å‘生一个错误。无法装入表å•åˆ†å±‚ä¿¡æ¯ã€‚";
+ Text[ zh-TW ] = "在讀å–表單控制項時發生錯誤。無法載入表單層次。";
+ Text[ tr ] = "Form komut öğeleri okunurken bir hata oluştu. Form düzeyi yüklenemedi.";
+ Text[ hi-IN ] = "फ़ॉरà¥à¤® नियंतà¥à¤°à¤£à¥‹à¤‚ को पढ़ने के समय गलती घटित हà¥à¤† । फ़ॉरà¥à¤® का परत को लोड़ नहीं कर सकते है";
+ Text[ ar ] = "حدث خطأ أثناء قراءة عناصر تحكم الاستمارة. لم يتم تحميل طبقة الاستمارة";
+ Text[ he ] = "‮×רעה שגי××” בעת קרי×ת פקדי ×”×˜×¤×¡×™× ×•×œ×›×Ÿ רובד ×”×˜×¤×¡×™× ×œ× × ×˜×¢×Ÿ.‬";
+ };
+ String (ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_CLASS_WRITE) & ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Beim Schreiben der Formular-Controls trat ein Fehler auf. Die Formular-Schicht wurde nicht gespeichert";
+ Text [ en-US ] = "An error occurred while writing the form controls. The form layer has not been saved";
+ Text[ pt ] = "Ocorreu um erro ao escrever os controlos do formulário. Foi impossível guardar a camada do formulário.";
+ Text[ ru ] = "Ошибка запиÑи Ñлементов ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ñ‹. Ðе Ñохранен Ñлой формы";
+ Text[ el ] = "Κατά την εγγÏαφή των στοιχείων ελέγχου της φόÏμας παÏουσιάστηκε ένα σφάλμα. Η στÏώση της φόÏμας δεν φοÏτώθηκε.";
+ Text[ nl ] = "Fout bij schrijven van formulier-controls. Formulierniveau is niet opgeslagen.";
+ Text[ fr ] = "Une erreur est survenue lors de l'écriture des contrôles de formulaire. La couche de formulaire n'a pas été enregistrée.";
+ Text[ es ] = "Ha ocurrido un error al escribir los controles de formulario. No se guardó la capa de formulario.";
+ Text[ fi ] = "Lomakkeen ohjausobjekteja kirjoitettaessa ilmeni virhe. Lomakekerrosta ei ole tallennettu";
+ Text[ ca ] = "Hi ha hagut un error en llegir els controls del formulari. No s'ha pogut desar la capa del formulari";
+ Text[ it ] = "Si è verificato un errore durante la compilazione del formulario controls. Lo strato del formulario non è stato salvato.";
+ Text[ sk ] = "Nastala chyba pri zapisovaní formulárových prvkov. Vrstva formulára nebola uložená.";
+ Text[ da ] = "Der opstod en fejl under skrivning af formular-kontrolelementerne. Formularlaget blev ikke gemt.";
+ Text[ sv ] = "Det uppstod ett fel vid skrivning av formulär-controls. Formulärskiktet sparades inte";
+ Text[ pl ] = "Wystąpił błąd podczas zapisu formantów formularza. Warstwa formularza nie została zapisana";
+ Text[ pt-BR ] = "Ocorreu um erro ao gravar os controles do formulário. Não foi possível salvar a camada do formulário.";
+ Text[ th ] = "เà¸à¸´à¸”ความผิดพลาดขณะเขียนตัวควบคุมà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡ ระดับของà¹à¸šà¸šà¸Ÿà¸­à¸£à¹Œà¸¡à¸¢à¸±à¸‡à¹„ม่ได้ถูà¸à¸šà¸±à¸™à¸—ึà¸";
+ Text[ ja ] = "フォーム層ã®æ›¸ãè¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ç™ºç”Ÿã€‚フォーム層ã¯ä¿å­˜ã•ã‚Œã¦ã„ã¾ã›ã‚“。";
+ Text[ ko ] = "ì–‘ì‹ ì»¨íŠ¸ë¡¤ì„ ê¸°ë¡í•  ë•Œ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ì–‘ì‹ ê³„ì¸µì´ ì €ìž¥ë˜ì§€ 않았습니다.";
+ Text[ zh-CN ] = "在写入表å•æŽ§åˆ¶åŒºæ—¶å‘生一个错误。无法存盘表å•åˆ†å±‚ä¿¡æ¯ã€‚";
+ Text[ zh-TW ] = "在寫入表單控制項時發生一個錯誤。沒有儲存表單層次。";
+ Text[ tr ] = "Form komut öğeleri yazılırken bir hata oluştu. Form düzeyi kaydedilemedi.";
+ Text[ hi-IN ] = "फ़ॉरà¥à¤® नियंतà¥à¤°à¤£à¥‹à¤‚ को लिखने के समय गलती घटित हà¥à¤† । फ़ॉरà¥à¤® का परत को संचित नहीं कर सकते है";
+ Text[ ar ] = "حدث خطأ أثناء كتابة عناصر تحكم الاستمارة. لم يتم Ø­Ùظ طبقة الاستمارة";
+ Text[ he ] = "‮×רעה שגי××” בעת כתיבת פקדי ×”×˜×¤×¡×™× ×•×œ×›×Ÿ רובד ×”×˜×¤×¡×™× ×œ× × ×©×ž×¨.‬";
+ };
+ String (ERRCODE_SVX_BULLETITEM_NOBULLET | ERRCODE_CLASS_READ) & ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Beim Lesen eines Bullets trat ein Fehler auf. Es konnten nicht alle Bullets geladen werden";
+ Text [ en-US ] = "An error occurred while reading one of the bullets. Not all of the bullets were loaded.";
+ Text[ pt ] = "Surgiu um erro durante a leitura de uma marca. Foi impossível carregá-las todas.";
+ Text[ ru ] = "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¼Ð°Ñ€ÐºÐµÑ€Ð°. Ðе удаетÑÑ Ð·Ð°Ð³Ñ€ÑƒÐ·Ð¸Ñ‚ÑŒ вÑе маркеры.";
+ Text[ el ] = "ΠαÏουσιάστηκε σφάλμα κατά την ανάγνωση μιας από τις κουκίδες. Δεν φοÏτώθηκαν όλες οι κουκίδες.";
+ Text[ nl ] = "Fout bij laden van opsommingsteken. Niet alle tekens kunnen worden geladen.";
+ Text[ fr ] = "Une erreur s'est produite pendant la lecture d'une puce. Certaines puces n'ont pas pu être chargées.";
+ Text[ es ] = "Ha ocurrido un error al leer una viñeta. No se pudieron cargar todas las viñetas.";
+ Text[ fi ] = "Luettelomerkkiä luettaessa on ilmennyt virhe. Kaikkia luettelomerkkejä ei ladattu.";
+ Text[ ca ] = "Hi ha hagut un error en llegir un pic. No s'han pogut carregar tots el pics.";
+ Text[ it ] = "Durante la lettura di un bullet si è verificato un errore. Non è stato possibile caricare tutti i bullet.";
+ Text[ sk ] = "Nastala chyba pri naÄítavaní jednej z odrážok. Nie vÅ¡etky odrážky boli naÄítané.";
+ Text[ da ] = "Der opstod en fejl ved læsning af et punkttegn. Det var ikke muligt at indlæse alle punkttegn.";
+ Text[ sv ] = "Det uppstod ett fel vid läsning av en punkt. Det gick inte att ladda alla punkter";
+ Text[ pl ] = "Wystąpił błąd podczas odczytu wypunktowania. Nie można załadować wszystkich wypunktowań.";
+ Text[ pt-BR ] = "Ocorreu um erro durante a leitura de uma das marcas. Não foi possível carregar todas elas.";
+ Text[ th ] = "เà¸à¸´à¸”ความผิดพลาดขณะอ่านหนึ่งในสัà¸à¸¥à¸±à¸à¸©à¸“์à¹à¸ªà¸”งหัวข้อย่อย ไม่ทั้งหมดของสัà¸à¸¥à¸±à¸à¸©à¸“์à¹à¸ªà¸”งหัวข้อย่อยถูà¸à¹‚หลด";
+ Text[ ja ] = "箇æ¡æ›¸ãを読ã¿è¾¼ã‚€ã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚ã™ã¹ã¦ã®ç®‡æ¡æ›¸ãã¯èª­ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚";
+ Text[ ko ] = "글머리 기호를 ì½ëŠ” 중 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 글머리 기호를 ëª¨ë‘ ë¡œë“œí•˜ì§€ 못했습니다.";
+ Text[ zh-CN ] = "在读å–一个项目符å·æ—¶å‘生错误。无法装入全部的项目符å·ã€‚";
+ Text[ zh-TW ] = "在讀å–一個項目符號時發生錯誤。無法載入所有的項目符號。";
+ Text[ tr ] = "Madde işaretleri okunurken hata oluştu. Bu nedenle tüm madde işaretleri yüklenemedi.";
+ Text[ hi-IN ] = "किसी à¤à¤• बà¥à¤²à¥à¤²à¥‡à¤Ÿà¥à¤¸ को पढ़ने के समय गलती घटित हà¥à¤† । सब बà¥à¤²à¥à¤²à¥‡à¤Ÿà¥‹à¤‚ को लोड़ नहीं कर सकते है ।";
+ Text[ ar ] = "حدث خطأ أثناء قراءة إحدى علامات التعداد. تعذر تحميل كل علامات التعداد.";
+ Text[ he ] = "‮×רעה שגי××” בעת קרי×ת ×חד מנקודות הכותרה (bullets). ×œ× ×›×œ הנקודות נטענו.‬";
+ };
+
+
+ String ERRCODE_SVX_VBASIC_STORAGE_EXIST & ERRCODE_RES_MASK
+ {
+ Text [ de ] = "Der im Dokument enthaltene originale VBA Basic Code wird nicht gespeichert." ;
+ Text [ en-US ] = "The original VBA Basic Code contained in the document will not be saved.";
+ Text[ pt ] = "O código VBA original contido no documento não será guardado.";
+ Text[ ru ] = "СодержащийÑÑ Ð² документе иÑходный код VBA Basic Ñохранен не будет.";
+ Text[ el ] = "Δεν θα γίνει αποθήκευση του Î±Ï…Î¸ÎµÎ½Ï„Î¹ÎºÎ¿Ï VBA basic code που πεÏιέχεται στο έγγÏαφο.";
+ Text[ nl ] = "De originele VBA Basic-code in dit document wordt niet opgeslagen.";
+ Text[ fr ] = "Le code VBA basic d'origine contenu dans le document ne sera pas enregistré.";
+ Text[ es ] = "No se guardará el Basic Code VBA incluido en el documento.";
+ Text[ fi ] = "Asiakirjan alkuperäistä VBA-peruskoodia ei tallenneta.";
+ Text[ ca ] = "No es desarà el Basic Code VBA inclós en el document.";
+ Text[ it ] = "Non è possibile salvare il codice VBA Basic contenuto nel documeto.";
+ Text[ sk ] = "Kód VBA Basic pôvodne obsiahnutý v dokumente nebude uložený.";
+ Text[ da ] = "Den originale VBA Basic Code, som er indeholdt i dokumentet, gemmes ikke.";
+ Text[ sv ] = "Original-VBA-Basic-koden som finns i dokumentet sparas inte.";
+ Text[ pl ] = "Zawarty w dokumencie oryginalny kod VBA nie zostanie zapisany.";
+ Text[ pt-BR ] = "O código BASIC VBA original contido no documento não será salvo.";
+ Text[ th ] = "มีต้นฉบับ VBA Basic Code ในเอà¸à¸ªà¸²à¸£à¸—ี่จะไม่ถูà¸à¸šà¸±à¸™à¸—ึà¸";
+ Text[ ja ] = "ドキュメントã«å«ã¾ã‚Œã¦ã„るオリジナル㮠VBA Basic Code ã¯ä¿å­˜ã•ã‚Œã¾ã›ã‚“。";
+ Text[ ko ] = "ë¬¸ì„œì— í¬í•¨ë˜ì–´ 있는 ì›ëž˜ VBA Basic Code는 저장ë˜ì§€ 않습니다.";
+ Text[ zh-CN ] = "ä¸ä¼šå­˜ç›˜æ–‡æ¡£ä¸­å«æœ‰çš„æºVBA Basic Code。";
+ Text[ zh-TW ] = "文件å«æœ‰çš„æº VBA basic 碼ä¸æœƒè¢«å„²å­˜ã€‚";
+ Text[ tr ] = "Belgede bulunan ilk VBA basic kodu kaydedilmeyecek.";
+ Text[ hi-IN ] = "लेखपतà¥à¤° का यथारà¥à¤¥ VBA Basic Code को संचित नहीं कर सकते है ।";
+ Text[ ar ] = "لن يتم Ø­Ùظ الـ VBA Basic Codeالأصلي الموجود ÙÙŠ المستند.";
+ Text[ he ] = "‮קוד הבייסיק ×” VBA המקורי שבמסמך ×œ× ×™×©×ž×¨.‬";
+ };
+};
+ // ********************************************************************** EOF
diff --git a/binfilter/bf_svx/source/items/svx_svxfont.cxx b/binfilter/bf_svx/source/items/svx_svxfont.cxx
new file mode 100644
index 000000000000..dd9e4796edea
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_svxfont.cxx
@@ -0,0 +1,429 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ----------------------------------------------------------------
+
+#include <vcl/print.hxx>
+#include <unotools/charclass.hxx>
+#include <unolingu.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define ITEMID_ESCAPEMENT 0
+
+#define _SVX_SVXFONT_CXX
+
+#include "svxfont.hxx"
+namespace binfilter {
+
+// Minimum: Prozentwert fuers kernen
+#define MINKERNPERCENT 5
+
+// prop. Groesse der Kleinbuchstaben bei Kapitaelchen
+#define KAPITAELCHENPROP 80
+
+#ifndef REDUCEDSVXFONT
+ const sal_Unicode CH_BLANK = sal_Unicode(' '); // ' ' Leerzeichen
+ static sal_Char __READONLY_DATA sDoubleSpace[] = " ";
+#endif
+
+/*************************************************************************
+ * class SvxFont
+ *************************************************************************/
+
+/*N*/ SvxFont::SvxFont()
+/*N*/ {
+/*N*/ nKern = nEsc = 0;
+/*N*/ nPropr = 100;
+/*N*/ eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+/*N*/ eLang = LANGUAGE_SYSTEM;
+/*N*/ }
+
+/*N*/ SvxFont::SvxFont( const Font &rFont )
+/*N*/ : Font( rFont )
+/*N*/ {
+/*N*/ nKern = nEsc = 0;
+/*N*/ nPropr = 100;
+/*N*/ eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+/*N*/ eLang = LANGUAGE_SYSTEM;
+/*N*/ }
+
+/*************************************************************************
+ * class SvxFont: Copy-Ctor
+ *************************************************************************/
+
+/*N*/ SvxFont::SvxFont( const SvxFont &rFont )
+/*N*/ : Font( rFont )
+/*N*/ {
+/*N*/ nKern = rFont.GetFixKerning();
+/*N*/ nEsc = rFont.GetEscapement();
+/*N*/ nPropr = rFont.GetPropr();
+/*N*/ eCaseMap = rFont.GetCaseMap();
+/*N*/ eLang = rFont.GetLanguage();
+/*N*/ }
+
+/*************************************************************************
+ * static SvxFont::DrawArrow
+ *************************************************************************/
+
+
+/*************************************************************************
+ * SvxFont::CalcCaseMap
+ *************************************************************************/
+
+/*N*/ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
+/*N*/ {
+/*N*/ if( !IsCaseMap() || !rTxt.Len() ) return rTxt;
+/*N*/ XubString aTxt( rTxt );
+/*N*/ // Ich muss mir noch die Sprache besorgen
+/*N*/ const LanguageType eLng = LANGUAGE_DONTKNOW == eLang
+/*N*/ ? LANGUAGE_SYSTEM : eLang;
+/*N*/
+/*N*/ CharClass aCharClass( SvxCreateLocale( eLng ) );
+/*N*/
+/*N*/ switch( eCaseMap )
+/*N*/ {
+/*N*/ case SVX_CASEMAP_KAPITAELCHEN:
+/*N*/ case SVX_CASEMAP_VERSALIEN:
+/*N*/ {
+/*N*/ aCharClass.toUpper( aTxt );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case SVX_CASEMAP_GEMEINE:
+/*N*/ {
+/*?*/ aCharClass.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 )
+/*?*/ {
+/*?*/ String aTemp( aTxt.GetChar( i ) );
+/*?*/ aCharClass.toUpper( aTemp );
+/*?*/ aTxt.Replace( i, 1, aTemp );
+/*?*/ }
+/*?*/ bBlank = FALSE;
+/*?*/ }
+/*?*/ }
+/*?*/ break;
+/*?*/ }
+/*?*/ default:
+/*?*/ {
+/*?*/ DBG_ASSERT(!this, "SvxFont::CaseMapTxt: unknown casemap");
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ return aTxt;
+/*N*/ }
+
+/*************************************************************************
+ * 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)
+ { }
+
+
+ inline OutputDevice *GetOut() { return pOut; }
+ inline const XubString &GetTxt() const { return rTxt; }
+ xub_StrLen GetIdx() const { return nIdx; }
+ xub_StrLen GetLen() const { return nLen; }
+};
+
+
+
+
+/*************************************************************************
+ * SvxFont::DoOnCapitals() const
+ * zerlegt den String in Gross- und Kleinbuchstaben und ruft jeweils die
+ * Methode SvxDoCapitals::Do( ) auf.
+ *************************************************************************/
+
+
+/**************************************************************************
+ * SvxFont::SetPhysFont()
+ *************************************************************************/
+
+/*N*/ void SvxFont::SetPhysFont( OutputDevice *pOut ) const
+/*N*/ {
+/*N*/ const Font& rCurrentFont = pOut->GetFont();
+/*N*/ if ( nPropr == 100 )
+/*N*/ {
+/*N*/ if ( !rCurrentFont.IsSameInstance( *this ) )
+/*N*/ pOut->SetFont( *this );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Font aNewFont( *this );
+/*N*/ Size aSize( aNewFont.GetSize() );
+/*N*/ aNewFont.SetSize( Size( aSize.Width() * nPropr / 100L,
+/*N*/ aSize.Height() * nPropr / 100L ) );
+/*N*/ if ( !rCurrentFont.IsSameInstance( aNewFont ) )
+/*N*/ pOut->SetFont( aNewFont );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+ * SvxFont::ChgPhysFont()
+ *************************************************************************/
+
+
+/*************************************************************************
+ * SvxFont::GetPhysTxtSize()
+ *************************************************************************/
+
+
+/*N*/ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt )
+/*N*/ {
+/*N*/ if ( !IsCaseMap() && !IsKern() )
+/*N*/ return Size( pOut->GetTextWidth( rTxt ), pOut->GetTextHeight() );
+/*N*/
+/*?*/ 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;
+/*N*/ }
+
+/*N*/ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt,
+/*N*/ const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray ) const
+/*N*/ {
+/*N*/ if ( !IsCaseMap() && !IsKern() )
+/*N*/ return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ),
+/*N*/ pOut->GetTextHeight() );
+/*N*/
+/*N*/ Size aTxtSize;
+/*N*/ aTxtSize.setHeight( pOut->GetTextHeight() );
+/*N*/ if ( !IsCaseMap() )
+/*N*/ aTxtSize.setWidth( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ) );
+/*N*/ else
+/*?*/ aTxtSize.setWidth( pOut->GetTextArray( CalcCaseMap( rTxt ),
+/*?*/ pDXArray, nIdx, nLen ) );
+/*N*/
+/*N*/ if( IsKern() && ( nLen > 1 ) )
+/*N*/ {
+/*N*/ aTxtSize.Width() += ( ( nLen-1 ) * long( nKern ) );
+/*N*/
+/*N*/ if ( pDXArray )
+/*N*/ {
+/*N*/ for ( xub_StrLen i = 0; i < nLen; i++ )
+/*N*/ pDXArray[i] += ( (i+1) * long( nKern ) );
+/*N*/ // Der letzte ist um ein nKern zu gross:
+/*N*/ pDXArray[nLen-1] -= nKern;
+/*N*/ }
+/*N*/ }
+/*N*/ return aTxtSize;
+/*N*/ }
+
+/*************************************************************************
+ * SvxFont::GetTxtSize()
+ *************************************************************************/
+
+
+/*************************************************************************
+ * SvxFont::DrawText()
+ *************************************************************************/
+
+
+/*N*/ void SvxFont::QuickDrawText( OutputDevice *pOut,
+/*N*/ const Point &rPos, const XubString &rTxt,
+/*N*/ const xub_StrLen nIdx, const xub_StrLen nLen, const sal_Int32* pDXArray ) const
+/*N*/ {
+/*N*/ // Font muss ins OutputDevice selektiert sein...
+/*N*/ if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
+/*N*/ {
+/*N*/ pOut->DrawTextArray( rPos, rTxt, pDXArray, nIdx, nLen );
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*?*/ Point aPos( rPos );
+/*?*/
+/*?*/ if ( nEsc )
+/*?*/ {
+/*?*/ long nDiff = GetSize().Height();
+/*?*/ nDiff *= nEsc;
+/*?*/ nDiff /= 100;
+/*?*/
+/*?*/ if ( !IsVertical() )
+/*?*/ aPos.Y() -= nDiff;
+/*?*/ else
+/*?*/ aPos.X() += nDiff;
+/*?*/ }
+/*?*/
+/*?*/ if( IsCapital() )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ DBG_ASSERT( !pDXArray, "DrawCapital nicht fuer TextArray!" );
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if ( IsKern() && !pDXArray )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ Size aSize = GetPhysTxtSize( pOut, rTxt, nIdx, nLen );
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if ( !IsCaseMap() )
+/*?*/ pOut->DrawTextArray( aPos, rTxt, pDXArray, nIdx, nLen );
+/*?*/ else
+/*?*/ pOut->DrawTextArray( aPos, CalcCaseMap( rTxt ), pDXArray, nIdx, nLen );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFont& SvxFont::operator=( const Font& rFont )
+/*N*/ {
+/*N*/ Font::operator=( rFont );
+/*N*/ return *this;
+/*N*/ }
+
+/*N*/ SvxFont& SvxFont::operator=( const SvxFont& rFont )
+/*N*/ {
+/*N*/ Font::operator=( rFont );
+/*N*/ eLang = rFont.eLang;
+/*N*/ eCaseMap = rFont.eCaseMap;
+/*N*/ nEsc = rFont.nEsc;
+/*N*/ nPropr = rFont.nPropr;
+/*N*/ nKern = rFont.nKern;
+/*N*/ return *this;
+/*N*/ }
+
+
+/*************************************************************************
+ * 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 )
+ { }
+
+
+ inline const Size &GetSize() const { return aTxtSize; };
+};
+
+
+/*************************************************************************
+ * SvxFont::GetCapitalSize()
+ * berechnet TxtSize, wenn Kapitaelchen eingestellt sind.
+ *************************************************************************/
+
+
+/*************************************************************************
+ * 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 )
+ { }
+};
+
+
+
+
+/*************************************************************************
+ * SvxFont::DrawCapital() gibt Kapitaelchen aus.
+ *************************************************************************/
+
+
+#endif // !REDUCEDSVXFONT
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_svxitems.src b/binfilter/bf_svx/source/items/svx_svxitems.src
new file mode 100644
index 000000000000..4e59ac678fd0
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_svxitems.src
@@ -0,0 +1,501 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+ // include ------------------------------------------------------------------
+#include "svxitems.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // Value-Strings ------------------------------------------------------------
+String RID_SVXITEMS_TRUE
+{
+ Text [ de ] = "Wahr" ;
+ Text [ en-US ] = "True" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Verdadeiro";
+ Text[ ru ] = "ИСТИÐÐ";
+ Text[ el ] = "Αληθής";
+ Text[ nl ] = "Waar";
+ Text[ fr ] = "Vrai";
+ Text[ es ] = "Verdadero";
+ Text[ fi ] = "Tosi";
+ Text[ ca ] = "Cert";
+ Text[ it ] = "Vero";
+ Text[ sk ] = "Pravda";
+ Text[ da ] = "Sand";
+ Text[ sv ] = "Sant";
+ Text[ pl ] = "Prawda";
+ Text[ pt-BR ] = "Verdadeiro";
+ Text[ th ] = "จริง";
+ Text[ ja ] = "真(TRUE)";
+ Text[ ko ] = "TRUE";
+ Text[ zh-CN ] = "真";
+ Text[ zh-TW ] = "真";
+ Text[ tr ] = "DoÄŸru";
+ Text[ hi-IN ] = "सतà¥à¤¯";
+ Text[ ar ] = "حقيقي";
+ Text[ he ] = "‮×מת‬";
+};
+String RID_SVXITEMS_FALSE
+{
+ Text [ de ] = "Falsch" ;
+ Text [ en-US ] = "False" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Falso";
+ Text[ ru ] = "ЛОЖЬ";
+ Text[ el ] = "Λάθος";
+ Text[ nl ] = "Fout";
+ Text[ fr ] = "Faux";
+ Text[ es ] = "Falso";
+ Text[ fi ] = "Epätosi";
+ Text[ ca ] = "Fals";
+ Text[ it ] = "Falso";
+ Text[ sk ] = "Nepravda";
+ Text[ da ] = "Falsk";
+ Text[ sv ] = "Falsk";
+ Text[ pl ] = "FAÅSZ";
+ Text[ pt-BR ] = "Falso";
+ Text[ th ] = "เท็จ";
+ Text[ ja ] = "å½(FALSE)";
+ Text[ ko ] = "FALSE";
+ Text[ zh-CN ] = "错误";
+ Text[ zh-TW ] = "錯誤";
+ Text[ tr ] = "Yanlış";
+ Text[ hi-IN ] = "असतà¥à¤¯";
+ Text[ ar ] = "خطأ";
+ Text[ he ] = "‮שקר‬";
+};
+ // Extras -------------------------------------------------------------------
+ // SvxSearchItem ------------------------------------------------------------
+ // Kommando
+
+ // Vorlagen
+
+ // Zellen-Typ
+
+ // Applikation
+
+ // enum SvxBreak ------------------------------------------------------------
+
+ // enum SvxShadowLocation ---------------------------------------------------
+
+ // enum BrushStyle ----------------------------------------------------------
+
+ // enum ColorName -----------------------------------------------------------
+
+ // enum FontWeight -------------------------------------------------------
+
+ // enum FontUnderline ----------------------------------------------------
+ // enum FontStrikeout ----------------------------------------------------
+ // enum CASEMAP ----------------------------------------------------------
+ // enum ESCAPEMENT -------------------------------------------------------
+ // enum SvxAdjust -----------------------------------------------------------
+ // DB-Server-Connect --------------------------------------------------------
+ // enum SvxTabAdjust --------------------------------------------------------
+ // Typ-Namen der SlotIds ----------------------------------------------------
+ // GetValueText von BoolItems
+
+String RID_SVXITEMS_PAGE_USAGE_LEFT
+{
+ Text [ de ] = "Links" ;
+ Text [ en-US ] = "Left" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Esquerda";
+ Text[ ru ] = "Слева";
+ Text[ el ] = "ΑÏιστεÏά";
+ Text[ nl ] = "Links";
+ Text[ fr ] = "Gauche";
+ Text[ es ] = "Izquierda";
+ Text[ fi ] = "Vasen";
+ Text[ ca ] = "Esquerra";
+ Text[ it ] = "Sinistra";
+ Text[ sk ] = "Vľavo";
+ Text[ da ] = "Venstre";
+ Text[ sv ] = "Vänster";
+ Text[ pl ] = "Z lewej";
+ Text[ pt-BR ] = "Esquerda";
+ Text[ th ] = "ซ้าย";
+ Text[ ja ] = "å·¦";
+ Text[ ko ] = "왼쪽";
+ Text[ zh-CN ] = "å‘å·¦";
+ Text[ zh-TW ] = "å‘å·¦";
+ Text[ tr ] = "Sol";
+ Text[ hi-IN ] = "बायाà¤";
+ Text[ ar ] = "يسار";
+ Text[ he ] = "‮שמ×ל‬";
+};
+String RID_SVXITEMS_PAGE_USAGE_RIGHT
+{
+ Text [ de ] = "Rechts" ;
+ Text [ en-US ] = "Right" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Direita";
+ Text[ ru ] = "Справа";
+ Text[ el ] = "Δεξιά";
+ Text[ nl ] = "Rechts";
+ Text[ fr ] = "Droite";
+ Text[ es ] = "Derecha";
+ Text[ fi ] = "Oikea";
+ Text[ ca ] = "Dreta";
+ Text[ it ] = "Destra";
+ Text[ sk ] = "Vpravo";
+ Text[ da ] = "Højre";
+ Text[ sv ] = "Höger";
+ Text[ pl ] = "Z prawej";
+ Text[ pt-BR ] = "Direita";
+ Text[ th ] = "ขวา";
+ Text[ ja ] = "å³";
+ Text[ ko ] = "오른쪽";
+ Text[ zh-CN ] = "å‘å³";
+ Text[ zh-TW ] = "å‘å³";
+ Text[ tr ] = "SaÄŸ";
+ Text[ hi-IN ] = "दाहिना";
+ Text[ ar ] = "يمين";
+ Text[ he ] = "‮ימין‬";
+};
+String RID_SVXITEMS_PAGE_USAGE_ALL
+{
+ Text [ de ] = "Alle" ;
+ Text [ en-US ] = "All" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Tudo";
+ Text[ ru ] = "Ð’Ñе";
+ Text[ el ] = "Όλα";
+ Text[ nl ] = "Alle";
+ Text[ fr ] = "Toutes les pages";
+ Text[ es ] = "Todo";
+ Text[ fi ] = "Kaikki";
+ Text[ ca ] = "Tot";
+ Text[ it ] = "Tutto";
+ Text[ sk ] = "VÅ¡etko";
+ Text[ da ] = "Alle";
+ Text[ sv ] = "Alla";
+ Text[ pl ] = "Wszystko";
+ Text[ pt-BR ] = "Tudo";
+ Text[ th ] = "ทั้งหมด";
+ Text[ ja ] = "ã™ã¹ã¦";
+ Text[ ko ] = "모ë‘";
+ Text[ zh-CN ] = "全部";
+ Text[ zh-TW ] = "全部";
+ Text[ tr ] = "Tümü";
+ Text[ hi-IN ] = "सब";
+ Text[ ar ] = "الكل";
+ Text[ he ] = "‮הכל‬";
+};
+String RID_SVXITEMS_PAGE_USAGE_MIRROR
+{
+ Text [ de ] = "Gespiegelt" ;
+ Text [ en-US ] = "Mirrored" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Invertido";
+ Text[ ru ] = "Отраженные";
+ Text[ el ] = "Με κατοπτÏισμό";
+ Text[ nl ] = "Gespiegeld";
+ Text[ fr ] = "Pages en vis-à-vis";
+ Text[ es ] = "Reflejado";
+ Text[ fi ] = "Peilattu";
+ Text[ ca ] = "Replicat";
+ Text[ it ] = "Rispecchiato";
+ Text[ sk ] = "Zrkadlené";
+ Text[ da ] = "Spejlvendt";
+ Text[ sv ] = "Spegelvänt";
+ Text[ pl ] = "Odbicie lustrzane";
+ Text[ pt-BR ] = "Refletido";
+ Text[ th ] = "ส่อง";
+ Text[ ja ] = "å·¦å³å¯¾ç§°";
+ Text[ ko ] = "대칭";
+ Text[ zh-CN ] = "翻转的";
+ Text[ zh-TW ] = "翻轉的";
+ Text[ tr ] = "Yansıma";
+ Text[ hi-IN ] = "दरà¥à¤ªà¤£ किया हà¥à¤†";
+ Text[ ar ] = "منعكس";
+ Text[ he ] = "‮משוכפל‬";
+};
+
+
+
+
+String RID_SVXITEMS_TWOLINES_OFF
+{
+ Text [ de ] = "Doppelzeilig aus";
+ Text [ en-US ] = "Double-lined off";
+ Text[ pt ] = "Desactivar linhas duplas";
+ Text[ ru ] = "Выкл. двухÑтрочный";
+ Text[ el ] = "ΔίγÏαμμη γÏαφή απενεÏγοποιημένη";
+ Text[ nl ] = "Tweeregelig uit";
+ Text[ fr ] = "'Deux lignes en une' désactivé";
+ Text[ es ] = "Desactivar líneas dobles";
+ Text[ fi ] = "Kaksoisviiva poissa käytöstä";
+ Text[ ca ] = "Desactiva línies dobles";
+ Text[ it ] = "Disattiva 'A due righe'";
+ Text[ sk ] = "Dvojité riadky vypnuté";
+ Text[ da ] = "Dobbelt fra";
+ Text[ sv ] = "Dubbla rader av";
+ Text[ pl ] = "Podwójne wiersze wyłączone";
+ Text[ pt-BR ] = "Linhas duplas desativadas";
+ Text[ th ] = "ขีดเส้นปิดคู่";
+ Text[ ja ] = "2行使ㄠオフ";
+ Text[ ko ] = "ë‘줄 í•´ì œ";
+ Text[ zh-CN ] = "ä¸ä½¿ç”¨åŒè¡Œ";
+ Text[ zh-TW ] = "ä¸ä½¿ç”¨é›™è¡Œ";
+ Text[ tr ] = "Çift Çizgili Kapalı";
+ Text[ hi-IN ] = "दà¥à¤µà¤¿à¤—à¥à¤£à¤¿à¤¤ रेखा बंद";
+ Text[ ar ] = "Two lines off";
+ Text[ he ] = "‮ריווח כפול בין שורות מכובה‬";
+};
+String RID_SVXITEMS_TWOLINES
+{
+ Text [ de ] = "Doppelzeilig";
+ Text [ en-US ] = "Double-lined";
+ Text[ pt ] = "Linhas duplas";
+ Text[ ru ] = "ДвухÑтрочный";
+ Text[ el ] = "ΔίγÏαμμη γÏαφή";
+ Text[ nl ] = "Tweeregelig";
+ Text[ fr ] = "Deux lignes en une";
+ Text[ es ] = "Líneas dobles";
+ Text[ fi ] = "Kaksoisviiva";
+ Text[ ca ] = "Dues línies";
+ Text[ it ] = "A due righe";
+ Text[ sk ] = "Dvojité riadky";
+ Text[ da ] = "Dobbelt";
+ Text[ sv ] = "Dubbla rader";
+ Text[ pl ] = "Podwójne wiersze";
+ Text[ pt-BR ] = "Linhas duplas";
+ Text[ th ] = "ขีดเส้นคู่";
+ Text[ ja ] = "2行使ã„";
+ Text[ ko ] = "ë‘줄";
+ Text[ zh-CN ] = "åŒè¡Œ";
+ Text[ zh-TW ] = "雙行";
+ Text[ tr ] = "Çift Çizgili";
+ Text[ hi-IN ] = "दà¥à¤µà¤¿à¤—à¥à¤£à¤¿à¤¤ रेखा";
+ Text[ ar ] = "سطرين";
+ Text[ he ] = "‮ריווח כפול בין שורות מופעל‬";
+};
+
+
+
+String RID_SVXITEMS_CHARROTATE_OFF
+{
+ Text [ de ] = "keine gedrehten Zeichen";
+ Text [ en-US ] = "No rotated characters";
+ Text[ pt ] = "Sem rotação de caracteres";
+ Text[ ru ] = "Без перевернутых Ñимволов";
+ Text[ el ] = "ΧωÏίς πεÏιστÏοφή χαÏακτήÏων";
+ Text[ nl ] = "geen gedraaide tekens";
+ Text[ fr ] = "Sans rotation des caractères";
+ Text[ es ] = "Sin rotación de caracteres";
+ Text[ fi ] = "Ei kierrettyjä merkkejä";
+ Text[ ca ] = "Sense caràcters canviats";
+ Text[ it ] = "Senza rotazione carattere";
+ Text[ sk ] = "Bez otoÄených znakov";
+ Text[ da ] = "ingen roterede tegn";
+ Text[ sv ] = "Inga roterade tecken";
+ Text[ pl ] = "bez obróconych znaków";
+ Text[ pt-BR ] = "Caracteres sem rotação";
+ Text[ th ] = "ตัวอัà¸à¸‚ระที่ไม่หมุน";
+ Text[ ja ] = "文字を回転ã—ãªã„";
+ Text[ ko ] = "íšŒì „ëœ ë¬¸ìž ì•„ë‹˜";
+ Text[ zh-CN ] = "字符ä¸æ—‹è½¬";
+ Text[ zh-TW ] = "å­—å…ƒä¸æ—‹è½‰";
+ Text[ tr ] = "Döndürülmüş karakterler yok";
+ Text[ hi-IN ] = "घà¥à¤®à¤¾à¤¯à¤¾ हà¥à¤† अकà¥à¤·à¤°à¥‡à¤‚ नहीं";
+ Text[ ar ] = "بدون استدارة أحرÙ";
+ Text[ he ] = "â€®×œ×œ× ×ª×•×™× ×ž×¡×•×‘×‘×™×‬";
+};
+String RID_SVXITEMS_CHARROTATE
+{
+ Text [ de ] = "Zeichen um $(ARG1)° gedreht";
+ Text [ en-US ] = "Character rotated by $(ARG1)°";
+ Text[ pt ] = "Rotação de caracteres: $(ARG1)°";
+ Text[ ru ] = "Повернуть Ñимволы на $(ARG1)°";
+ Text[ el ] = "ΠεÏιστÏοφή χαÏακτήÏων από $(ARG1)°";
+ Text[ nl ] = "teken $(ARG1)° gedraaid";
+ Text[ fr ] = "Rotation des caractères : $(ARG1)°";
+ Text[ es ] = "Carácter rodado en $(ARG1)°";
+ Text[ fi ] = "Merkkiä kierretty $(ARG1)°";
+ Text[ ca ] = "Caràcter rodat en $(ARG1)°";
+ Text[ it ] = "Carattere rotato di $(ARG1)°";
+ Text[ sk ] = "Znak otoÄený o $(ARG1)°";
+ Text[ da ] = "Tegn roteret med $(ARG1)°";
+ Text[ sv ] = "Tecken roterat med $(ARG1)°";
+ Text[ pl ] = "Znaki obrócone o $(ARG1)°";
+ Text[ pt-BR ] = "Caracter girado em $(ARG1)?";
+ Text[ th ] = "ตัวอัà¸à¸‚ระหมุนโดย $(ARG1)à¸";
+ Text[ ja ] = "文字を $(ARG1)ー 回転";
+ Text[ ko ] = "$(ARG1)?íšŒì „ëœ ë¬¸ìž";
+ Text[ zh-CN ] = "字符旋转 $(ARG1)";
+ Text[ zh-TW ] = "字元旋轉 $(ARG1)°";
+ Text[ tr ] = "Karakter $(ARG1)° çevrildi";
+ Text[ hi-IN ] = "अकà¥à¤·à¤° को $(ARG1)° से घà¥à¤®à¤¾à¤¯à¤¾";
+ Text[ ar ] = "استدارة الأحر٠بمقدار $(ARG1)°";
+ Text[ he ] = "‮תו מסובב ב $(ARG1)°‬";
+};
+String RID_SVXITEMS_CHARROTATE_FITLINE
+{
+ Text [ de ] = " an Zeile anpassen";
+ Text [ en-US ] = "Fit to line";
+ Text[ pt ] = "Ajustar à linha";
+ Text[ ru ] = "СоглаÑовать Ñо Ñтрокой";
+ Text[ el ] = "ΠÏοσαÏμογή στη γÏαμμή";
+ Text[ nl ] = "aanpassen aan regel";
+ Text[ fr ] = " Adapter à la ligne";
+ Text[ es ] = "Ajustar a la línea";
+ Text[ fi ] = "Sovita riville";
+ Text[ ca ] = "ajustar a fila";
+ Text[ it ] = "Adatta alla riga";
+ Text[ sk ] = "Prispôsobiť riadku";
+ Text[ da ] = " tilpas til linje";
+ Text[ sv ] = " Anpassa till rad";
+ Text[ pl ] = "Dopasuj do wiersza";
+ Text[ pt-BR ] = " Ajustar à linha";
+ Text[ th ] = "จัดพอดีบรรทัด";
+ Text[ ja ] = "è¡Œã«åˆã‚ã›ã‚‹";
+ Text[ ko ] = "ì¤„ì— ë§žì¶¤";
+ Text[ zh-CN ] = "和行对é½";
+ Text[ zh-TW ] = "和行å°é½Š";
+ Text[ tr ] = "Satıra uydur";
+ Text[ hi-IN ] = "रेखा केलिठयोगà¥à¤¯";
+ Text[ ar ] = "ملاءمة للسطر";
+ Text[ he ] = "‮הת×מה לשורה‬";
+};
+
+String RID_SVXITEMS_RELIEF_NONE
+{
+ Text [ de ] = "Kein Relief" ;
+ Text [ en-US ] = "No relief";
+ Text[ pt ] = "Sem relevo";
+ Text[ ru ] = "Без рельефа";
+ Text[ el ] = "ΧωÏίς ανάγλυφο";
+ Text[ nl ] = "Geen reliëf";
+ Text[ fr ] = "Sans relief";
+ Text[ es ] = "Sin relieve";
+ Text[ fi ] = "Ei korkokuvaa";
+ Text[ ca ] = "Sense relleu";
+ Text[ it ] = "Senza rilievo";
+ Text[ sk ] = "Bez reliéfu";
+ Text[ da ] = "Intet relief";
+ Text[ sv ] = "Ingen relief";
+ Text[ pl ] = "Bez reliefu";
+ Text[ pt-BR ] = "Sem relevo";
+ Text[ th ] = "ไม่นูน";
+ Text[ ja ] = "æµ®ã出ã—ãªã—";
+ Text[ ko ] = "ì–‘ê° ì—†ìŒ";
+ Text[ zh-CN ] = "无浮雕效果";
+ Text[ zh-TW ] = "無浮雕效果";
+ Text[ tr ] = "Rölyef yok";
+ Text[ hi-IN ] = "सहायता नहीं";
+ Text[ ar ] = "بدون نقش";
+ Text[ he ] = "â€®×œ×œ× ×”×‘×œ×˜×”â€¬";
+};
+String RID_SVXITEMS_RELIEF_ENGRAVED
+{
+ Text [ de ] = "Gravur";
+ Text [ en-US ] = "Engraved";
+ Text[ pt ] = "Gravado";
+ Text[ ru ] = "Гравировка";
+ Text[ el ] = "ΧαÏαγμένο";
+ Text[ nl ] = "Gravure";
+ Text[ fr ] = "Empreinte";
+ Text[ es ] = "Grabado";
+ Text[ fi ] = "Kaiverrettu";
+ Text[ ca ] = "Gravat";
+ Text[ it ] = "Incisione";
+ Text[ sk ] = "Rytina";
+ Text[ da ] = "Indgraveret";
+ Text[ sv ] = "Gravyr";
+ Text[ pl ] = "Grawerowane";
+ Text[ pt-BR ] = "Entalhado";
+ Text[ th ] = "รอยจารึà¸";
+ Text[ ja ] = "æµ®ã彫り";
+ Text[ ko ] = "오목 효과";
+ Text[ zh-CN ] = "雕刻";
+ Text[ zh-TW ] = "雕刻";
+ Text[ tr ] = "Kazınmış";
+ Text[ hi-IN ] = "खोदा हà¥à¤†";
+ Text[ ar ] = "Ø­Ùر";
+ Text[ he ] = "‮חרוט‬";
+};
+
+
+String RID_SVXITEMS_PARASNAPTOGRID_ON
+{
+ Text [ de ] = "Absatz wird am Textraster gefangen (wenn aktiviert)";
+ Text [ en-US ] = "Paragraph snaps to text grid (if active)";
+ Text[ pt ] = "paragraph snap to grid";
+ Text[ ru ] = "Параграф привÑзан к Ñетке текÑта (еÑли активно)";
+ Text[ el ] = "ΠÏοσκόλληση παÏαγÏάφου στο πλέγμα κειμένου (αν είναι ενεÏγοποιημένο)";
+ Text[ nl ] = "Alinea wordt aan tekstraster gevangen (indien geactiveerd)";
+ Text[ fr ] = "Capture du paragraphe à la grille du texte (si activée)";
+ Text[ es ] = "Utilizar la cuadrícula en el párrafo (si ésta está activada) ";
+ Text[ fi ] = "Kappaleen kohdistus tekstiruudukkoon (jos käytössä)";
+ Text[ ca ] = "Paragraph snaps to text grid (if active)";
+ Text[ it ] = "Cattura il paragrafo alla griglia di testo (se attivata)";
+ Text[ sk ] = "Odstavec zachytávať na textový mriežku (ak aktívna)";
+ Text[ da ] = "Afstanden måles ved tekstgitteret (ved aktivering)";
+ Text[ sv ] = "Stycke fästs mot textraster (om det är aktiverat)";
+ Text[ pl ] = "Akapity są przyciągane do siatki tekstu (jeśli aktywna)";
+ Text[ pt-BR ] = "O parágrafo se encaixa na grade do texto (se ativada)";
+ Text[ th ] = "Paragraph snaps to text grid (if active)";
+ Text[ ja ] = "段è½ã‚’文字罫線ã§ä½ç½®åˆã‚ã›(オンã®ã¨ã)";
+ Text[ ko ] = "단ë½ì„ í…스트 그리드로 맞춤(활성시)";
+ Text[ zh-CN ] = "段è½å’Œç¨¿çº¸æ ¼çº¿å¯¹é½(如使用稿纸)";
+ Text[ zh-TW ] = "段è½å’Œç¨¿ç´™æ ¼ç·šå°é½Š (如使用稿紙)";
+ Text[ tr ] = "Paragraph snaps to text grid (if active)";
+ Text[ hi-IN ] = "Paragraph snaps to text grid (if active)";
+ Text[ ar ] = "paragraph snap to grid";
+ Text[ he ] = "‮פסקה מתמקמת על קודקוד רשת (במידה והרשת מופעלת)‬";
+};
+
+String RID_SVXITEMS_PARASNAPTOGRID_OFF
+{
+ Text [ de ] = "Absatz wird nicht am Textraster gefangen";
+ Text [ en-US ] = "Paragraph does not snap to text grid";
+ Text[ pt ] = "paragraph does not snap to grid";
+ Text[ ru ] = "Параграф не привÑзан к Ñетке текÑта";
+ Text[ el ] = "ΧωÏίς Ï€Ïοσκόλληση παÏαγÏάφου στο πλέγμα κειμένου";
+ Text[ nl ] = "Alinea wordt niet aan tekstraster gevangen";
+ Text[ fr ] = "Pas de capture du paragraphe à la grille du texte";
+ Text[ es ] = "No utilizar la cuadrícula en el párrafo";
+ Text[ fi ] = "Kappale ei kohdistu tekstiruudukkoon";
+ Text[ ca ] = "Paragraph does not snap to text grid";
+ Text[ it ] = "Non cattura il paragrafo alla griglia di testo";
+ Text[ sk ] = "Odstavec nezachytávať na textový mriežku";
+ Text[ da ] = "Afstanden måles ikke ved tekstgitteret";
+ Text[ sv ] = "Stycke fästs inte mot textraster";
+ Text[ pl ] = "Akapit nie jest przyciÄ…gany do siatki tekstu";
+ Text[ pt-BR ] = "O parágrafo não se encaixa na grade do texto";
+ Text[ th ] = "Paragraph does not snap to text grid";
+ Text[ ja ] = "段è½ã‚’文字罫線ã§ä½ç½®åˆã‚ã›ã—ãªã„";
+ Text[ ko ] = "단ë½ì„ í…스트 그리드로 맞추지 ì•ŠìŒ";
+ Text[ zh-CN ] = "段è½ä¸å’Œç¨¿çº¸æ ¼çº¿å¯¹é½";
+ Text[ zh-TW ] = "段è½ä¸å’Œç¨¿ç´™æ ¼ç·šå°é½Š";
+ Text[ tr ] = "Paragraph does not snap to text grid";
+ Text[ hi-IN ] = "Paragraph does not snap to text grid";
+ Text[ ar ] = "paragraph does not snap to grid";
+ Text[ he ] = "â€®×ž×™×§×•× ×¤×¡×§×” חופשי (××£ ×× ×”×¨×©×ª מופעלת)‬";
+};
+
+ // ********************************************************************** EOF
diff --git a/binfilter/bf_svx/source/items/svx_textitem.cxx b/binfilter/bf_svx/source/items/svx_textitem.cxx
new file mode 100644
index 000000000000..173b14727fc9
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_textitem.cxx
@@ -0,0 +1,2621 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/stream.hxx>
+#include <toolkit/unohlp.hxx>
+#include <math.h>
+#include <rtl/math.hxx>
+
+#include <eeitem.hxx>
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#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_EMPHASISMARK 0
+#define ITEMID_TWOLINES 0
+#define ITEMID_CHARROTATE 0
+#define ITEMID_CHARSCALE_W 0
+#define ITEMID_CHARRELIEF 0
+
+
+#define GLOBALOVERFLOW3
+
+
+#include <bf_svtools/memberid.hrc>
+#include "svxids.hrc"
+#include "svxitems.hrc"
+
+#include "rtl/ustring.hxx"
+#include <i18npool/mslangid.hxx>
+#include <bf_svtools/itemset.hxx>
+#include <bf_svtools/itempool.hxx>
+
+#include <com/sun/star/style/CaseMap.hpp>
+#include <com/sun/star/awt/XFont.hpp>
+#include <com/sun/star/text/FontEmphasis.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+
+
+
+#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 "cscoitem.hxx"
+#include "kernitem.hxx"
+#include "cmapitem.hxx"
+#include "escpitem.hxx"
+#include "langitem.hxx"
+#include "nlbkitem.hxx"
+#include "nhypitem.hxx"
+#include "blnkitem.hxx"
+#include "emphitem.hxx"
+#include "twolinesitem.hxx"
+#include "scripttypeitem.hxx"
+#include "charrotateitem.hxx"
+#include "charscaleitem.hxx"
+#include "charreliefitem.hxx"
+#include "itemtype.hxx"
+#include "dlgutil.hxx"
+
+// #90477#
+#include <tools/tenccvt.hxx>
+namespace binfilter {
+
+#define STORE_UNICODE_MAGIC_MARKER 0xFE331188
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::text;
+
+// 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))
+
+BOOL SvxFontItem::bEnableStoreUnicodeNames = FALSE;
+
+// STATIC DATA -----------------------------------------------------------
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1(SvxFontListItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxFontItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPostureItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxWeightItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxFontHeightItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxUnderlineItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxCrossedOutItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxShadowedItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxAutoKernItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxWordLineModeItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxContourItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxPropSizeItem, SfxUInt16Item);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxColorItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxCharSetColorItem, SvxColorItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxKerningItem, SfxInt16Item);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxCaseMapItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxEscapementItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxLanguageItem, SfxEnumItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxNoLinebreakItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxNoHyphenItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxBlinkItem, SfxBoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxEmphasisMarkItem, SfxUInt16Item);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxTwoLinesItem, SfxPoolItem);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxCharRotateItem, SfxUInt16Item);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxCharScaleWidthItem, SfxUInt16Item);
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxCharReliefItem, SfxEnumItem);
+
+
+/*N*/ TYPEINIT1(SvxScriptSetItem, SfxSetItem );
+
+
+// class SvxFontListItem -------------------------------------------------
+
+/*N*/ SvxFontListItem::SvxFontListItem( const FontList* pFontLst,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxPoolItem( nId ),
+/*N*/ pFontList( pFontLst )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFontListItem::SvxFontListItem( const SvxFontListItem& rItem ) :
+/*N*/
+/*N*/ SfxPoolItem( rItem ),
+/*N*/ pFontList( rItem.GetFontList() )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFontListItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxFontListItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ int SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*?*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxFontItem -----------------------------------------------------
+
+/*N*/ SvxFontItem::SvxFontItem( const USHORT nId ) :
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ eFamily = FAMILY_SWISS;
+/*N*/ ePitch = PITCH_VARIABLE;
+/*N*/ eTextEncoding = RTL_TEXTENCODING_DONTKNOW;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
+/*N*/ const XubString& aStName, const FontPitch eFontPitch,
+/*N*/ const rtl_TextEncoding eFontTextEncoding, const USHORT nId ) :
+/*N*/
+/*N*/ SfxPoolItem( nId ),
+/*N*/
+/*N*/ aFamilyName(aName),
+/*N*/ aStyleName(aStName)
+/*N*/ {
+/*N*/ eFamily = eFam;
+/*N*/ ePitch = eFontPitch;
+/*N*/ eTextEncoding = eFontTextEncoding;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_FONT_FAMILY_NAME :
+/*N*/ rVal <<= OUString(aFamilyName.GetBuffer());
+/*N*/ break;
+/*N*/ case MID_FONT_STYLE_NAME:
+/*N*/ rVal <<= OUString(aStyleName.GetBuffer());
+/*N*/ break;
+/*N*/ case MID_FONT_FAMILY : rVal <<= (sal_Int16)(eFamily); break;
+/*N*/ case MID_FONT_CHAR_SET : rVal <<= (sal_Int16)(eTextEncoding); break;
+/*N*/ case MID_FONT_PITCH : rVal <<= (sal_Int16)(ePitch); break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_FONT_FAMILY_NAME :
+/*N*/ {
+/*N*/ OUString aStr;
+/*N*/ if(!(rVal >>= aStr))
+/*N*/ return sal_False;
+/*N*/ aFamilyName = aStr.getStr();
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONT_STYLE_NAME:
+/*N*/ {
+/*N*/ OUString aStr;
+/*N*/ if(!(rVal >>= aStr))
+/*N*/ return sal_False;
+/*N*/ aStyleName = aStr.getStr();
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONT_FAMILY :
+/*N*/ {
+/*N*/ sal_Int16 nFamily;
+/*N*/ if(!(rVal >>= nFamily))
+/*N*/ return sal_False;
+/*N*/ eFamily = (FontFamily)nFamily;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONT_CHAR_SET :
+/*N*/ {
+/*N*/ sal_Int16 nSet;
+/*N*/ if(!(rVal >>= nSet))
+/*N*/ return sal_False;
+/*N*/ eTextEncoding = (rtl_TextEncoding)nSet;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONT_PITCH :
+/*N*/ {
+/*N*/ sal_Int16 nPitch;
+/*N*/ if(!(rVal >>= nPitch))
+/*N*/ return sal_False;
+/*N*/ ePitch = (FontPitch)nPitch;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxFontItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ const SvxFontItem& rItem = (const SvxFontItem&)rAttr;
+/*N*/
+/*N*/ int bRet = ( eFamily == rItem.eFamily &&
+/*N*/ aFamilyName == rItem.aFamilyName &&
+/*N*/ aStyleName == rItem.aStyleName );
+/*N*/
+/*N*/ if ( bRet )
+/*N*/ {
+/*N*/ if ( ePitch != rItem.ePitch || eTextEncoding != rItem.eTextEncoding )
+/*N*/ {
+/*N*/ bRet = sal_False;
+/*N*/ DBG_WARNING( "FontItem::operator==(): nur Pitch oder rtl_TextEncoding unterschiedlich" );
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFontItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxFontItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ BOOL bToBats =
+/*N*/ GetFamilyName().EqualsAscii( "StarSymbol", 0, sizeof("StarSymbol")-1 ) ||
+/*N*/ GetFamilyName().EqualsAscii( "OpenSymbol", 0, sizeof("OpenSymbol")-1 );
+/*N*/
+/*N*/ // #90477# rStrm << (BYTE) GetFamily()
+/*N*/ // << (BYTE) GetPitch()
+/*N*/ // << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) );
+/*N*/ rStrm << (BYTE) GetFamily() << (BYTE) GetPitch()
+/*N*/ << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()));
+/*N*/
+/*N*/ String aStoreFamilyName( GetFamilyName() );
+/*N*/ if( bToBats )
+/*N*/ aStoreFamilyName = String( "StarBats", sizeof("StarBats")-1, RTL_TEXTENCODING_ASCII_US );
+/*N*/ rStrm.WriteByteString(aStoreFamilyName);
+/*N*/ rStrm.WriteByteString(GetStyleName());
+/*N*/
+/*N*/ // #96441# Kach for EditEngine, only set while creating clipboard stream.
+/*N*/ if ( bEnableStoreUnicodeNames )
+/*N*/ {
+/*N*/ sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
+/*N*/ rStrm << nMagic;
+/*N*/ rStrm.WriteByteString( aStoreFamilyName, RTL_TEXTENCODING_UNICODE );
+/*N*/ rStrm.WriteByteString( GetStyleName(), RTL_TEXTENCODING_UNICODE );
+/*N*/ }
+/*N*/
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE eFamily, eFontPitch, eFontTextEncoding;
+/*N*/ String aName, aStyle;
+/*N*/ rStrm >> eFamily;
+/*N*/ rStrm >> eFontPitch;
+/*N*/ rStrm >> eFontTextEncoding;
+/*N*/
+/*N*/ // UNICODE: rStrm >> aName;
+/*N*/ rStrm.ReadByteString(aName);
+/*N*/
+/*N*/ // UNICODE: rStrm >> aStyle;
+/*N*/ rStrm.ReadByteString(aStyle);
+/*N*/
+/*N*/ // Task 91008/90471: set the "correct" textencoding
+/*N*/ eFontTextEncoding = (BYTE)GetSOLoadTextEncoding( eFontTextEncoding, (USHORT)rStrm.GetVersion() );
+/*N*/
+/*N*/ // irgendwann wandelte sich der StarBats vom ANSI- zum SYMBOL-Font
+/*N*/ if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") )
+/*N*/ eFontTextEncoding = RTL_TEXTENCODING_SYMBOL;
+/*N*/
+/*N*/ // Check if we have stored unicode
+/*N*/ ULONG nStreamPos = rStrm.Tell();
+/*N*/ sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
+/*N*/ rStrm >> nMagic;
+/*N*/ if ( nMagic == STORE_UNICODE_MAGIC_MARKER )
+/*N*/ {
+/*N*/ rStrm.ReadByteString( aName, RTL_TEXTENCODING_UNICODE );
+/*N*/ rStrm.ReadByteString( aStyle, RTL_TEXTENCODING_UNICODE );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rStrm.Seek( nStreamPos );
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/
+/*N*/ return new SvxFontItem( (FontFamily)eFamily, aName, aStyle,
+/*N*/ (FontPitch)eFontPitch, (rtl_TextEncoding)eFontTextEncoding, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxPostureItem --------------------------------------------------
+
+/*N*/ SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) :
+/*N*/ SfxEnumItem( nId, ePosture )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPostureItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxPostureItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ USHORT SvxPostureItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 /*?*/ return ITALIC_NORMAL + 1; // auch ITALIC_NONE geh"ort dazu
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxPostureItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nPosture;
+/*N*/ rStrm >> nPosture;
+/*N*/ return new SvxPostureItem( (const FontItalic)nPosture, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+
+/*-----------------13.03.98 14:28-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_ITALIC:
+/*?*/ rVal = Bool2Any(GetBoolValue());
+/*N*/ break;
+/*N*/ case MID_POSTURE:
+/*N*/ rVal <<= (awt::FontSlant)GetValue(); // Werte von awt::FontSlant und FontItalic sind gleich
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------13.03.98 14:28-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_ITALIC:
+/*?*/ SetBoolValue(Any2Bool(rVal));
+/*N*/ break;
+/*N*/ case MID_POSTURE:
+/*N*/ {
+/*?*/ awt::FontSlant eSlant;
+/*?*/ if(!(rVal >>= eSlant))
+/*?*/ {
+/*?*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ eSlant = (awt::FontSlant)nValue;
+/*N*/ }
+/*N*/ SetValue((USHORT)eSlant);
+/*N*/ }
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxPostureItem::HasBoolValue() const
+/*N*/ {
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_Bool SvxPostureItem::GetBoolValue() const
+/*N*/ {
+/*N*/ return ( (FontItalic)GetValue() >= ITALIC_OBLIQUE );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// class SvxWeightItem ---------------------------------------------------
+
+/*N*/ SvxWeightItem::SvxWeightItem( const FontWeight eWght, const USHORT nId ) :
+/*N*/ SfxEnumItem( nId, eWght )
+/*N*/ {
+/*N*/ }
+
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxWeightItem::HasBoolValue() const
+/*N*/ {
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_Bool SvxWeightItem::GetBoolValue() const
+/*N*/ {
+/*N*/ return (FontWeight)GetValue() >= WEIGHT_BOLD;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ USHORT SvxWeightItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return WEIGHT_BLACK; // WEIGHT_DONTKNOW geh"ort nicht dazu
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxWeightItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxWeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nWeight;
+/*N*/ rStrm >> nWeight;
+/*N*/ return new SvxWeightItem( (FontWeight)nWeight, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*-----------------13.03.98 14:18-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_BOLD :
+/*?*/ rVal = Bool2Any(GetBoolValue());
+/*N*/ break;
+/*N*/ case MID_WEIGHT:
+/*N*/ {
+/*N*/ rVal <<= (float)( VCLUnoHelper::ConvertFontWeight( (FontWeight)GetValue() ) );
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------13.03.98 14:18-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_BOLD :
+/*?*/ SetBoolValue(Any2Bool(rVal));
+/*N*/ break;
+/*N*/ case MID_WEIGHT:
+/*N*/ {
+/*N*/ double fValue;
+/*N*/ if(!(rVal >>= fValue))
+/*N*/ {
+/*?*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ fValue = (float)nValue;
+/*N*/ }
+/*N*/ SetValue( VCLUnoHelper::ConvertFontWeight((float)fValue) );
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// class SvxFontHeightItem -----------------------------------------------
+
+/*N*/ SvxFontHeightItem::SvxFontHeightItem( const ULONG nSz,
+/*N*/ const USHORT nPrp,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ SetHeight( nSz,nPrp ); // mit den Prozenten rechnen
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxFontHeightItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (USHORT)GetHeight();
+/*N*/
+/*N*/ if( FONTHEIGHT_UNIT_VERSION <= nItemVersion )
+/*N*/ rStrm << GetProp() << (USHORT)GetPropUnit();
+/*N*/ else
+/*N*/ {
+/*N*/ // JP 30.06.98: beim Export in alte Versionen geht die relative
+/*N*/ // Angabe verloren, wenn es keine Prozentuale ist
+/*N*/ USHORT nProp = GetProp();
+/*N*/ if( SFX_MAPUNIT_RELATIVE != GetPropUnit() )
+/*N*/ nProp = 100;
+/*N*/ rStrm << nProp;
+/*N*/ }
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
+/*N*/ USHORT nVersion ) const
+/*N*/ {
+/*N*/ USHORT nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE;
+/*N*/
+/*N*/ rStrm >> nsize;
+/*N*/
+/*N*/ if( FONTHEIGHT_16_VERSION <= nVersion )
+/*N*/ rStrm >> nprop;
+/*N*/ else
+/*N*/ {
+/*?*/ BYTE nP;
+/*?*/ rStrm >> nP;
+/*?*/ nprop = (USHORT)nP;
+/*N*/ }
+/*N*/
+/*N*/ if( FONTHEIGHT_UNIT_VERSION <= nVersion )
+/*N*/ rStrm >> nPropUnit;
+/*N*/
+/*N*/ SvxFontHeightItem* pItem = new SvxFontHeightItem( nsize, 100, Which() );
+/*N*/ pItem->SetProp( nprop, (SfxMapUnit)nPropUnit );
+/*N*/ return pItem;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*N*/ return GetHeight() == ((SvxFontHeightItem&)rItem).GetHeight() &&
+/*N*/ GetProp() == ((SvxFontHeightItem&)rItem).GetProp() &&
+/*N*/ GetPropUnit() == ((SvxFontHeightItem&)rItem).GetPropUnit();
+/*N*/ }
+
+/*-----------------13.03.98 14:53-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ // In StarOne sind im uno::Any immer 1/100mm. Ueber die MemberId wird
+/*N*/ // gesteuert, ob der Wert im Item 1/100mm oder Twips sind.
+/*N*/
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_FONTHEIGHT:
+/*N*/ {
+/*N*/ // Point (also Twips) sind gefragt,
+/*N*/ // also umrechnen, wenn CONVERT_TWIPS nicht gesetzt ist
+/*N*/ if( bConvert )
+/*N*/ {
+/*N*/ long nTwips = bConvert ? nHeight : MM100_TO_TWIP(nHeight);
+/*N*/ rVal <<= (float)( nTwips / 20.0 );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ double fPoints = MM100_TO_TWIP((long)nHeight) / 20.0;
+/*N*/ float fRoundPoints =
+/*N*/ static_cast<float>(::rtl::math::round(fPoints, 1));
+/*N*/ rVal <<= fRoundPoints;
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONTHEIGHT_PROP:
+/*N*/ rVal <<= (sal_Int16)(SFX_MAPUNIT_RELATIVE == ePropUnit ? nProp : 100);
+/*N*/ break;
+/*N*/ case MID_FONTHEIGHT_DIFF:
+/*N*/ {
+/*N*/ float fRet = (float)(short)nProp;
+/*N*/ switch( ePropUnit )
+/*N*/ {
+/*N*/ case SFX_MAPUNIT_RELATIVE:
+/*N*/ fRet = 0.;
+/*N*/ break;
+/*N*/ case SFX_MAPUNIT_100TH_MM:
+/*?*/ fRet = MM100_TO_TWIP(fRet);
+/*?*/ fRet /= 20.;
+/*?*/ break;
+/*?*/ case SFX_MAPUNIT_POINT:
+/*?*/
+/*?*/ break;
+/*?*/ case SFX_MAPUNIT_TWIP:
+/*?*/ fRet /= 20.;
+/*N*/ break;
+/*N*/ }
+/*N*/ rVal <<= fRet;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/* -----------------01.07.98 13:43-------------------
+ * Relative Abweichung aus der Hoehe herausrechnen
+ * --------------------------------------------------*/
+/*N*/ sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUnit eProp, sal_Bool bCoreInTwip)
+/*N*/ {
+/*N*/ sal_uInt32 nRet = nHeight;
+/*N*/ short nDiff = 0;
+/*N*/ switch( eProp )
+/*N*/ {
+/*N*/ case SFX_MAPUNIT_RELATIVE:
+/*N*/ nRet *= 100;
+/*N*/ nRet /= nProp;
+/*N*/ break;
+/*N*/ case SFX_MAPUNIT_POINT:
+/*N*/ {
+/*?*/ short nTemp = (short)nProp;
+/*?*/ 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);
+/*N*/ break;
+/*N*/ }
+/*N*/ nRet -= nDiff;
+/*N*/
+/*N*/ return nRet;
+/*N*/ }
+
+/*-----------------13.03.98 14:53-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_FONTHEIGHT:
+/*N*/ {
+/*N*/ ePropUnit = SFX_MAPUNIT_RELATIVE;
+/*N*/ nProp = 100;
+/*N*/ double fPoint;
+/*N*/ if(!(rVal >>= fPoint))
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/ fPoint = (float)nValue;
+/*N*/ }
+/*N*/ if(fPoint < 0. || fPoint > 10000.)
+/*N*/ return sal_False;
+/*N*/
+/*N*/ nHeight = (long)( fPoint * 20.0 + 0.5 ); // Twips
+/*N*/ if (!bConvert)
+/*N*/ nHeight = TWIP_TO_MM100(nHeight); // umrechnen, wenn das Item 1/100mm enthaelt
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONTHEIGHT_PROP:
+/*N*/ {
+/*N*/ sal_Int16 nNew;
+/*N*/ if(!(rVal >>= nNew))
+/*N*/ return sal_True;
+/*N*/
+/*N*/ nHeight = lcl_GetRealHeight_Impl(nHeight, nProp, ePropUnit, bConvert);
+/*N*/
+/*N*/ nHeight *= nNew;
+/*N*/ nHeight /= 100;
+/*N*/ nProp = nNew;
+/*N*/ ePropUnit = SFX_MAPUNIT_RELATIVE;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_FONTHEIGHT_DIFF:
+/*N*/ {
+/*?*/ 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_Int16 nCoreDiffValue = (sal_Int16)(fValue * 20.);
+/*?*/ nHeight += bConvert ? nCoreDiffValue : TWIP_TO_MM100(nCoreDiffValue);
+/*?*/ nProp = (sal_uInt16)((sal_Int16)fValue);
+/*?*/ ePropUnit = SFX_MAPUNIT_POINT;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ USHORT SvxFontHeightItem::GetVersion(USHORT nFileVersion) const
+/*N*/ {
+/*N*/ return (nFileVersion <= SOFFICE_FILEFORMAT_40)
+/*N*/ ? FONTHEIGHT_16_VERSION
+/*N*/ : FONTHEIGHT_UNIT_VERSION;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*N*/ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp,
+/*N*/ SfxMapUnit eUnit )
+/*N*/ {
+/*N*/ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( SFX_MAPUNIT_RELATIVE != eUnit )
+nHeight = nNewHeight + ::binfilter::ItemToControl( (short)nNewProp, eUnit,//STRIP008 /*N*/ nHeight = nNewHeight + ::ItemToControl( (short)nNewProp, eUnit,
+/*N*/ SFX_FUNIT_TWIP );
+/*N*/ else
+/*N*/ #endif // !SVX_LIGHT
+/*N*/ if( 100 != nNewProp )
+/*N*/ nHeight = sal_uInt32(( nNewHeight * nNewProp ) / 100 );
+/*N*/ else
+/*N*/ nHeight = nNewHeight;
+/*N*/
+/*N*/ nProp = nNewProp;
+/*N*/ ePropUnit = eUnit;
+/*N*/ }
+
+// class SvxUnderlineItem ------------------------------------------------
+
+/*N*/ SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+/*N*/ : SfxEnumItem( nId, eSt ), mColor( COL_TRANSPARENT )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxUnderlineItem::HasBoolValue() const
+/*N*/ {
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ sal_Bool SvxUnderlineItem::GetBoolValue() const
+/*N*/ {
+/*N*/ return (FontUnderline)GetValue() != UNDERLINE_NONE;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ SvxUnderlineItem* pNew = new SvxUnderlineItem( *this );
+/*N*/ pNew->SetColor( GetColor() );
+/*N*/ return pNew;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ USHORT SvxUnderlineItem::GetValueCount() const
+/*N*/ {
+/*N*/ return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxUnderlineItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nState;
+/*N*/ rStrm >> nState;
+/*N*/ return new SvxUnderlineItem( (FontUnderline)nState, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*-----------------13.03.98 16:25-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxUnderlineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_UNDERLINED:
+/*?*/ rVal = Bool2Any(GetBoolValue());
+/*?*/ break;
+/*N*/ case MID_UNDERLINE:
+/*N*/ rVal <<= (sal_Int16)(GetValue());
+/*N*/ break;
+/*N*/ case MID_UL_COLOR:
+/*N*/ rVal <<= (sal_Int32)( mColor.GetColor() );
+/*N*/ break;
+/*N*/ case MID_UL_HASCOLOR:
+/*N*/ rVal = Bool2Any( !mColor.GetTransparency() );
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/
+/*N*/ }
+/*-----------------13.03.98 16:28-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_UNDERLINED:
+/*?*/ SetBoolValue(Any2Bool(rVal));
+/*N*/ break;
+/*N*/ case MID_UNDERLINE:
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ if(!(rVal >>= nValue))
+/*N*/ bRet = sal_False;
+/*N*/ else
+/*N*/ SetValue((sal_Int16)nValue);
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_UL_COLOR:
+/*N*/ {
+/*?*/ sal_Int32 nCol;
+/*?*/ if( !( rVal >>= nCol ) )
+/*?*/ bRet = sal_False;
+/*?*/ else
+/*?*/ {
+/*?*/ // Keep transparence, because it contains the information
+/*?*/ // whether the font color or the stored color should be used
+/*?*/ sal_uInt8 nTrans = mColor.GetTransparency();
+/*?*/ mColor = Color( nCol );
+/*?*/ mColor.SetTransparency( nTrans );
+/*?*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_UL_HASCOLOR:
+/*N*/ mColor.SetTransparency( Any2Bool( rVal ) ? 0 : 0xff );
+/*N*/ break;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ int SvxUnderlineItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*N*/ return SfxEnumItem::operator==( rItem ) &&
+/*N*/ GetColor() == ((SvxUnderlineItem&)rItem).GetColor();
+/*N*/ }
+
+// class SvxCrossedOutItem -----------------------------------------------
+
+/*N*/ SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const USHORT nId )
+/*N*/ : SfxEnumItem( nId, eSt )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ USHORT SvxCrossedOutItem::GetValueCount() const
+/*N*/ {
+/*N*/ return STRIKEOUT_DOUBLE + 1; // auch STRIKEOUT_NONE geh"ort dazu
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxCrossedOutItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE eCross;
+/*N*/ rStrm >> eCross;
+/*N*/ return new SvxCrossedOutItem( (FontStrikeout)eCross, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*-----------------13.03.98 16:28-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_CROSSED_OUT:
+/*?*/ rVal = Bool2Any(GetBoolValue());
+/*N*/ break;
+/*N*/ case MID_CROSS_OUT:
+/*N*/ rVal <<= (sal_Int16)(GetValue());
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------13.03.98 16:29-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_CROSSED_OUT:
+/*?*/ SetBoolValue(Any2Bool(rVal));
+/*N*/ break;
+/*N*/ case MID_CROSS_OUT:
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ if(!(rVal >>= nValue))
+/*N*/ return sal_False;
+/*N*/ SetValue((sal_Int16)nValue);
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+// class SvxShadowedItem -------------------------------------------------
+
+/*N*/ SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const USHORT nId ) :
+/*N*/ SfxBoolItem( nId, bShadowed )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxShadowedItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxShadowedItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nState;
+/*N*/ rStrm >> nState;
+/*N*/ return new SvxShadowedItem( nState, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxAutoKernItem -------------------------------------------------
+
+/*N*/ SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const USHORT nId ) :
+/*N*/ SfxBoolItem( nId, bAutoKern )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxAutoKernItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxAutoKernItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nState;
+/*N*/ rStrm >> nState;
+/*N*/ return new SvxAutoKernItem( nState, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxWordLineModeItem ---------------------------------------------
+
+/*N*/ SvxWordLineModeItem::SvxWordLineModeItem( const sal_Bool bWordLineMode,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxBoolItem( nId, bWordLineMode )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxWordLineModeItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxWordLineModeItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Bool) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ sal_Bool bValue;
+/*N*/ rStrm >> bValue;
+/*N*/ return new SvxWordLineModeItem( bValue, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxContourItem --------------------------------------------------
+
+/*N*/ SvxContourItem::SvxContourItem( const sal_Bool bContoured, const USHORT nId ) :
+/*N*/ SfxBoolItem( nId, bContoured )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxContourItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxContourItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_Bool) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ sal_Bool bValue;
+/*N*/ rStrm >> bValue;
+/*N*/ return new SvxContourItem( bValue, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxPropSizeItem -------------------------------------------------
+
+/*N*/ SvxPropSizeItem::SvxPropSizeItem( const USHORT nPercent, const USHORT nId ) :
+/*N*/ SfxUInt16Item( nId, nPercent )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxPropSizeItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ USHORT nSize;
+/*N*/ rStrm >> nSize;
+/*N*/ return new SvxPropSizeItem( nSize, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxColorItem ----------------------------------------------------
+
+/*N*/ SvxColorItem::SvxColorItem( const USHORT nId ) :
+/*N*/ SfxPoolItem( nId ),
+/*N*/ mColor( COL_BLACK )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) :
+/*N*/ SfxPoolItem( nId ),
+/*N*/ mColor( rCol )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxColorItem::SvxColorItem( SvStream &rStrm, const USHORT nId ) :
+/*N*/ SfxPoolItem( nId )
+/*N*/ {
+/*N*/ Color aColor;
+/*N*/ rStrm >> aColor;
+/*N*/ mColor = aColor;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxColorItem::SvxColorItem( const SvxColorItem &rCopy ) :
+/*N*/ SfxPoolItem( rCopy ),
+/*N*/ mColor( rCopy.mColor )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxColorItem::~SvxColorItem()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ USHORT SvxColorItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxColorItem: Gibt es ein neues Fileformat?" );
+/*N*/ return SOFFICE_FILEFORMAT_50 >= nFFVer ? VERSION_USEAUTOCOLOR : 0;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return mColor == ( (const SvxColorItem&)rAttr ).mColor;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)(mColor.GetColor());
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nColor;
+/*N*/ if(!(rVal >>= nColor))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ mColor.SetColor( nColor );
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxColorItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ if( VERSION_USEAUTOCOLOR == nItemVersion &&
+/*N*/ COL_AUTO == mColor.GetColor() )
+/*N*/ rStrm << Color( COL_BLACK );
+/*N*/ else
+/*N*/ rStrm << mColor;
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new SvxColorItem( rStrm, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ void SvxColorItem::SetValue( const Color& rNewCol )
+/*N*/ {
+/*N*/ mColor = rNewCol;
+/*N*/ }
+
+// class SvxCharSetColorItem ---------------------------------------------
+
+/*N*/ SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) :
+/*N*/ SvxColorItem( nId ),
+/*N*/
+/*N*/ eFrom( RTL_TEXTENCODING_DONTKNOW )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxCharSetColorItem::SvxCharSetColorItem( const Color& rCol,
+/*N*/ const rtl_TextEncoding eFrom,
+/*N*/ const USHORT nId ) :
+/*N*/ SvxColorItem( rCol, nId ),
+/*N*/
+/*N*/ eFrom( eFrom )
+/*N*/ {
+/*N*/ }
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxCharSetColorItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ // #90477# rStrm << (BYTE) GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() )
+/*N*/ // << GetValue();
+/*N*/ rStrm << (BYTE)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())
+/*N*/ << GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE cSet;
+/*N*/ Color aColor;
+/*N*/ rStrm >> cSet >> aColor;
+/*N*/ return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// class SvxKerningItem --------------------------------------------------
+
+/*N*/ SvxKerningItem::SvxKerningItem( const short nKern, const USHORT nId ) :
+/*N*/ SfxInt16Item( nId, nKern )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxKerningItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxKerningItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxKerningItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (short) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ short nValue;
+/*N*/ rStrm >> nValue;
+/*N*/ return new SvxKerningItem( nValue, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/* -----------------------------19.02.01 12:21--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Int16 nVal = GetValue();
+/*N*/ if(nMemberId & CONVERT_TWIPS)
+/*N*/ nVal = (sal_Int16)TWIP_TO_MM100(nVal);
+/*N*/ rVal <<= nVal;
+/*N*/ return sal_True;
+/*N*/ }
+// -----------------------------------------------------------------------
+/*N*/ bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+/*N*/ {
+/*N*/ sal_Int16 nVal;
+/*N*/ if(!(rVal >>= nVal))
+/*N*/ return sal_False;
+/*N*/ if(nMemberId & CONVERT_TWIPS)
+/*N*/ nVal = (sal_Int16)MM100_TO_TWIP(nVal);
+/*N*/ SetValue(nVal);
+/*N*/ return sal_True;
+/*N*/ }
+
+// class SvxCaseMapItem --------------------------------------------------
+
+/*N*/ SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const USHORT nId ) :
+/*N*/ SfxEnumItem( nId, eMap )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ USHORT SvxCaseMapItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_CASEMAP_END; // SVX_CASEMAP_KAPITAELCHEN + 1
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxCaseMapItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxCaseMapItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE cMap;
+/*N*/ rStrm >> cMap;
+/*N*/ return new SvxCaseMapItem( (const SvxCaseMap)cMap, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+/*-----------------13.03.98 16:29-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Int16 nRet = style::CaseMap::NONE;
+/*N*/ switch( GetValue() )
+/*N*/ {
+/*N*/ // case SVX_CASEMAP_NOT_MAPPED : nRet = style::CaseMap::NONE ; break;
+/*N*/ case SVX_CASEMAP_VERSALIEN : nRet = style::CaseMap::UPPERCASE; break;
+/*?*/ case SVX_CASEMAP_GEMEINE : nRet = style::CaseMap::LOWERCASE; break;
+/*N*/ case SVX_CASEMAP_TITEL : nRet = style::CaseMap::TITLE ; break;
+/*N*/ case SVX_CASEMAP_KAPITAELCHEN: nRet = style::CaseMap::SMALLCAPS; break;
+/*N*/ }
+/*N*/ rVal <<= (sal_Int16)(nRet);
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------13.03.98 16:29-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_uInt16 nVal;
+/*N*/ if(!(rVal >>= nVal))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ switch( nVal )
+/*N*/ {
+/*N*/ case style::CaseMap::NONE : nVal = SVX_CASEMAP_NOT_MAPPED ; break;
+/*N*/ case style::CaseMap::UPPERCASE: nVal = SVX_CASEMAP_VERSALIEN ; break;
+/*?*/ case style::CaseMap::LOWERCASE: nVal = SVX_CASEMAP_GEMEINE ; break;
+/*N*/ case style::CaseMap::TITLE : nVal = SVX_CASEMAP_TITEL ; break;
+/*N*/ case style::CaseMap::SMALLCAPS: nVal = SVX_CASEMAP_KAPITAELCHEN; break;
+/*N*/ }
+/*N*/ SetValue(nVal);
+/*N*/ return sal_True;
+/*N*/ }
+
+// class SvxEscapementItem -----------------------------------------------
+
+/*N*/ SvxEscapementItem::SvxEscapementItem( const USHORT nId ) :
+/*N*/ SfxEnumItemInterface( nId ),
+/*N*/
+/*N*/ nEsc ( 0 ),
+/*N*/ nProp ( 100 )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxEscapementItem::SvxEscapementItem( const short nEsc,
+/*N*/ const BYTE nProp,
+/*N*/ const USHORT nId ) :
+/*N*/ SfxEnumItemInterface( nId ),
+/*N*/ nEsc ( nEsc ),
+/*N*/ nProp ( nProp )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxEscapementItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ return( nEsc == ((SvxEscapementItem&)rAttr).nEsc &&
+/*N*/ nProp == ((SvxEscapementItem&)rAttr).nProp );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxEscapementItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxEscapementItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ short nEsc = GetEsc();
+/*N*/ if( SOFFICE_FILEFORMAT_31 == rStrm.GetVersion() )
+/*N*/ {
+/*N*/ if( DFLT_ESC_AUTO_SUPER == nEsc )
+/*N*/ nEsc = DFLT_ESC_SUPER;
+/*N*/ else if( DFLT_ESC_AUTO_SUB == nEsc )
+/*N*/ nEsc = DFLT_ESC_SUB;
+/*N*/ }
+/*N*/ rStrm << (BYTE) GetProp()
+/*N*/ << (short) nEsc;
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nProp;
+/*N*/ short nEsc;
+/*N*/ rStrm >> nProp >> nEsc;
+/*N*/ return new SvxEscapementItem( nEsc, nProp, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ USHORT SvxEscapementItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return SVX_ESCAPEMENT_END; // SVX_ESCAPEMENT_SUBSCRIPT + 1
+/*?*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*?*/ USHORT SvxEscapementItem::GetEnumValue() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 //STRIP001 if ( nEsc < 0 )
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ void SvxEscapementItem::SetEnumValue( USHORT nVal )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SetEscapement( (const SvxEscapement)nVal );
+/*?*/ }
+
+/*-----------------13.03.98 17:05-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_ESC:
+/*N*/ rVal <<= (sal_Int16)(nEsc);
+/*N*/ break;
+/*N*/ case MID_ESC_HEIGHT:
+/*N*/ rVal <<= (sal_Int8)(nProp);
+/*N*/ break;
+/*N*/ case MID_AUTO_ESC:
+/*?*/ rVal = Bool2Any(DFLT_ESC_AUTO_SUB == nEsc || DFLT_ESC_AUTO_SUPER == nEsc);
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------13.03.98 17:05-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_ESC:
+/*N*/ {
+/*N*/ sal_Int16 nVal;
+/*N*/ if( (rVal >>= nVal) && (Abs(nVal) <= 101))
+/*N*/ nEsc = nVal;
+/*N*/ else
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_ESC_HEIGHT:
+/*N*/ {
+/*N*/ sal_Int8 nVal;
+/*N*/ if( (rVal >>= nVal) && (nVal <= 100))
+/*N*/ nProp = nVal;
+/*N*/ else
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_AUTO_ESC:
+/*N*/ {
+/*?*/ 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;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// class SvxLanguageItem -------------------------------------------------
+
+/*N*/ SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const USHORT nId )
+/*N*/ : SfxEnumItem( nId , eLang )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*?*/ USHORT SvxLanguageItem::GetValueCount() const
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 return LANGUAGE_COUNT; // aus tlintl.hxx
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxLanguageItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxLanguageItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (USHORT) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ USHORT nValue;
+/*N*/ rStrm >> nValue;
+/*N*/ return new SvxLanguageItem( (LanguageType)nValue, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*-----------------14.03.98 14:13-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_LANG_INT: // for basic conversions!
+/*?*/ rVal <<= (sal_Int16)(GetValue());
+/*N*/ break;
+/*N*/ case MID_LANG_LOCALE:
+/*N*/ lang::Locale aRet( MsLangId::convertLanguageToLocale( GetValue() ));
+/*N*/ rVal <<= aRet;
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+/*-----------------14.03.98 14:13-------------------
+
+--------------------------------------------------*/
+/*N*/ bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch(nMemberId)
+/*N*/ {
+/*N*/ case MID_LANG_INT: // for basic conversions!
+/*N*/ {
+/*?*/ sal_Int32 nValue;
+/*?*/ if(!(rVal >>= nValue))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ SetValue((sal_Int16)nValue);
+/*N*/ }
+/*N*/ break;
+/*N*/ case MID_LANG_LOCALE:
+/*N*/ {
+/*N*/ lang::Locale aLocale;
+/*N*/ if(!(rVal >>= aLocale))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ if (aLocale.Language.getLength() || aLocale.Country.getLength())
+/*N*/ SetValue(MsLangId::convertIsoNamesToLanguage( aLocale.Language, aLocale.Country ));
+/*N*/ else
+/*N*/ SetValue(LANGUAGE_NONE);
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+// class SvxNoLinebreakItem ----------------------------------------------
+/*N*/ SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const USHORT nId ) :
+/*N*/ SfxBoolItem( nId, bBreak )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// class SvxNoHyphenItem -------------------------------------------------
+
+/*N*/ SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const USHORT nId ) :
+/*N*/ SfxBoolItem( nId , bHyphen )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+/*
+ * Dummy-Item fuer ToolBox-Controls:
+ *
+ */
+
+// -----------------------------------------------------------------------
+// class SvxLineColorItem (== SvxColorItem)
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// class SvxBlinkItem -------------------------------------------------
+
+
+/*N*/ SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const USHORT nId ) :
+/*N*/ SfxBoolItem( nId, bBlink )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxBlinkItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxBlinkItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (BYTE) GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, USHORT) const
+/*N*/ {
+/*N*/ BYTE nState;
+/*N*/ rStrm >> nState;
+/*N*/ return new SvxBlinkItem( nState, Which() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// class SvxEmphaisMarkItem ---------------------------------------------------
+
+/*N*/ SvxEmphasisMarkItem::SvxEmphasisMarkItem( const FontEmphasisMark nValue,
+/*N*/ const USHORT nId )
+/*N*/ : SfxUInt16Item( nId, nValue )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxEmphasisMarkItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm,
+/*N*/ USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ rStrm << (sal_uInt16)GetValue();
+/*N*/ return rStrm;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, USHORT ) const
+/*N*/ {
+/*N*/ sal_uInt16 nValue;
+/*N*/ rStrm >> nValue;
+/*N*/ return new SvxEmphasisMarkItem( (FontEmphasisMark)nValue, Which() );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_EMPHASIS:
+/*N*/ {
+/*N*/ sal_Int16 nValue = GetValue();
+/*N*/ sal_Int16 nRet = 0;
+/*N*/ switch(nValue & EMPHASISMARK_STYLE)
+/*N*/ {
+/*N*/ case EMPHASISMARK_NONE : nRet = FontEmphasis::NONE; break;
+/*?*/ case EMPHASISMARK_DOT : nRet = FontEmphasis::DOT_ABOVE; break;
+/*?*/ case EMPHASISMARK_CIRCLE : nRet = FontEmphasis::CIRCLE_ABOVE; break;
+/*?*/ case EMPHASISMARK_DISC : nRet = FontEmphasis::DISK_ABOVE; break;
+/*?*/ case EMPHASISMARK_ACCENT : nRet = FontEmphasis::ACCENT_ABOVE; break;
+/*N*/ }
+/*N*/ if(nRet && nValue & EMPHASISMARK_POS_BELOW)
+/*N*/ nRet += 10;
+/*N*/ rVal <<= nRet;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return sal_True;
+/*N*/ }
+
+/*N*/ bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_EMPHASIS:
+/*N*/ {
+/*N*/ sal_Int32 nValue = -1;
+/*N*/ rVal >>= nValue;
+/*N*/ switch(nValue)
+/*N*/ {
+/*N*/ case FontEmphasis::NONE : nValue = EMPHASISMARK_NONE; break;
+/*?*/ case FontEmphasis::DOT_ABOVE : nValue = EMPHASISMARK_DOT|EMPHASISMARK_POS_ABOVE; break;
+/*?*/ case FontEmphasis::CIRCLE_ABOVE: nValue = EMPHASISMARK_CIRCLE|EMPHASISMARK_POS_ABOVE; break;
+/*?*/ case FontEmphasis::DISK_ABOVE : nValue = EMPHASISMARK_DISC|EMPHASISMARK_POS_ABOVE; break;
+/*?*/ case FontEmphasis::ACCENT_ABOVE: nValue = EMPHASISMARK_ACCENT|EMPHASISMARK_POS_ABOVE; break;
+/*?*/ case FontEmphasis::DOT_BELOW : nValue = EMPHASISMARK_DOT|EMPHASISMARK_POS_BELOW; break;
+/*?*/ case FontEmphasis::CIRCLE_BELOW: nValue = EMPHASISMARK_CIRCLE|EMPHASISMARK_POS_BELOW; break;
+/*?*/ case FontEmphasis::DISK_BELOW : nValue = EMPHASISMARK_DISC|EMPHASISMARK_POS_BELOW; break;
+/*?*/ case FontEmphasis::ACCENT_BELOW: nValue = EMPHASISMARK_ACCENT|EMPHASISMARK_POS_BELOW; break;
+/*?*/ default: return sal_False;
+/*N*/ }
+/*N*/ SetValue( (sal_Int16)nValue );
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ USHORT SvxEmphasisMarkItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxEmphasisMarkItem: Gibt es ein neues Fileformat?" );
+/*N*/
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+
+/*************************************************************************
+|* class SvxTwoLinesItem
+*************************************************************************/
+
+/*N*/ SvxTwoLinesItem::SvxTwoLinesItem( sal_Bool bFlag, sal_Unicode nStartBracket,
+/*N*/ sal_Unicode nEndBracket, sal_uInt16 nW )
+/*N*/ : SfxPoolItem( nW ),
+/*N*/ bOn( bFlag ), cStartBracket( nStartBracket ), cEndBracket( nEndBracket )
+/*N*/ {
+/*N*/ }
+
+/*NBFF*/ SvxTwoLinesItem::SvxTwoLinesItem( const SvxTwoLinesItem& rAttr )
+/*NBFF*/ : SfxPoolItem( rAttr.Which() ),
+/*NBFF*/ bOn( rAttr.bOn ), cStartBracket( rAttr.cStartBracket ),
+/*NBFF*/ cEndBracket( rAttr.cEndBracket )
+/*NBFF*/ {
+/*NBFF*/ }
+
+/*N*/ SvxTwoLinesItem::~SvxTwoLinesItem()
+/*N*/ {
+/*N*/ }
+
+/*?*/ int SvxTwoLinesItem::operator==( const SfxPoolItem& rAttr ) const
+/*?*/ {
+/*NFFF*/ DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "not equal attribute types" );
+/*NBFF*/ return bOn == ((SvxTwoLinesItem&)rAttr).bOn &&
+/*NBFF*/ cStartBracket == ((SvxTwoLinesItem&)rAttr).cStartBracket &&
+/*NBFF*/ cEndBracket == ((SvxTwoLinesItem&)rAttr).cEndBracket;
+/*?*/ }
+
+/*?*/ SfxPoolItem* SvxTwoLinesItem::Clone( SfxItemPool* ) const
+/*?*/ {
+/*NBFF*/ return new SvxTwoLinesItem( *this );
+/*?*/ }
+
+/*NBFF*/ bool SvxTwoLinesItem::QueryValue( ::com::sun::star::uno::Any& rVal,
+/*NBFF*/ BYTE nMemberId ) const
+/*NBFF*/ {
+/*NBFF*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*NBFF*/ nMemberId &= ~CONVERT_TWIPS;
+/*NBFF*/ sal_Bool bRet = sal_True;
+/*NBFF*/ switch( nMemberId )
+/*NBFF*/ {
+/*NBFF*/ case MID_TWOLINES:
+/*NBFF*/ rVal = Bool2Any( bOn );
+/*NBFF*/ break;
+/*NBFF*/ case MID_START_BRACKET:
+/*NBFF*/ {
+/*NBFF*/ OUString s;
+/*NBFF*/ if( cStartBracket )
+/*NBFF*/ s = OUString( cStartBracket );
+/*NBFF*/ rVal <<= s;
+/*NBFF*/ }
+/*NBFF*/ break;
+/*NBFF*/ case MID_END_BRACKET:
+/*NBFF*/ {
+/*NBFF*/ OUString s;
+/*NBFF*/ if( cEndBracket )
+/*NBFF*/ s = OUString( cEndBracket );
+/*NBFF*/ rVal <<= s;
+/*NBFF*/ }
+/*NBFF*/ break;
+/*NBFF*/ default:
+/*NBFF*/ bRet = sal_False;
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ return bRet;
+/*NBFF*/ }
+
+/*NBFF*/ bool SvxTwoLinesItem::PutValue( const ::com::sun::star::uno::Any& rVal,
+/*NBFF*/ BYTE nMemberId )
+/*NBFF*/ {
+/*NBFF*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*NBFF*/ nMemberId &= ~CONVERT_TWIPS;
+/*NBFF*/ sal_Bool bRet = sal_False;
+/*NBFF*/ OUString s;
+/*NBFF*/ switch( nMemberId )
+/*NBFF*/ {
+/*NBFF*/ case MID_TWOLINES:
+/*NBFF*/ bOn = Any2Bool( rVal );
+/*NBFF*/ bRet = sal_True;
+/*NBFF*/ break;
+/*NBFF*/ case MID_START_BRACKET:
+/*NBFF*/ if( rVal >>= s )
+/*NBFF*/ {
+/*NBFF*/ cStartBracket = s.getLength() ? s[ 0 ] : 0;
+/*NBFF*/ bRet = sal_True;
+/*NBFF*/ }
+/*NBFF*/ break;
+/*NBFF*/ case MID_END_BRACKET:
+/*NBFF*/ if( rVal >>= s )
+/*NBFF*/ {
+/*NBFF*/ cEndBracket = s.getLength() ? s[ 0 ] : 0;
+/*NBFF*/ bRet = sal_True;
+/*NBFF*/ }
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ return bRet;
+/*NBFF*/ }
+
+/*NBFF*/ SfxItemPresentation SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres,
+/*NBFF*/ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+/*NBFF*/ String &rText, const ::IntlWrapper* pIntl ) const
+/*NBFF*/ {
+/*NBFF*/ switch( ePres )
+/*NBFF*/ {
+/*NBFF*/ case SFX_ITEM_PRESENTATION_NONE:
+/*NBFF*/ rText.Erase();
+/*NBFF*/ break;
+/*NBFF*/ case SFX_ITEM_PRESENTATION_NAMELESS:
+/*NBFF*/ case SFX_ITEM_PRESENTATION_COMPLETE:
+/*NBFF*/ {
+/*NBFF*/ if( !GetValue() )
+/*NBFF*/ rText = SVX_RESSTR( RID_SVXITEMS_TWOLINES_OFF );
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ rText = SVX_RESSTR( RID_SVXITEMS_TWOLINES );
+/*NBFF*/ if( GetStartBracket() )
+/*NBFF*/ rText.Insert( GetStartBracket(), 0 );
+/*NBFF*/ if( GetEndBracket() )
+/*NBFF*/ rText += GetEndBracket();
+/*NBFF*/ }
+/*NBFF*/ return ePres;
+/*NBFF*/ }
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ return SFX_ITEM_PRESENTATION_NONE;
+/*NBFF*/ }
+
+
+/*NBFF*/ SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, USHORT nVer) const
+/*NBFF*/ {
+/*NBFF*/ sal_Bool bOn;
+/*NBFF*/ sal_Unicode cStart, cEnd;
+/*NBFF*/ rStrm >> bOn >> cStart >> cEnd;
+/*NBFF*/ return new SvxTwoLinesItem( bOn, cStart, cEnd, Which() );
+/*NBFF*/ }
+
+/*NBFF*/ SvStream& SvxTwoLinesItem::Store(SvStream & rStrm, USHORT nIVer) const
+/*NBFF*/ {
+/*NBFF*/ rStrm << GetValue() << GetStartBracket() << GetEndBracket();
+/*NBFF*/ return rStrm;
+/*NBFF*/ }
+
+/*N*/ USHORT SvxTwoLinesItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_40==nFFVer ||
+/*N*/ SOFFICE_FILEFORMAT_50==nFFVer,
+/*N*/ "SvxTwoLinesItem: Gibt es ein neues Fileformat?" );
+/*N*/
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+
+/*************************************************************************
+|* class SvxCharRotateItem
+*************************************************************************/
+
+/*N*/ SvxCharRotateItem::SvxCharRotateItem( sal_uInt16 nValue,
+/*N*/ sal_Bool bFitIntoLine,
+/*N*/ const sal_uInt16 nW )
+/*N*/ : SfxUInt16Item( nW, nValue ), bFitToLine( bFitIntoLine )
+/*N*/ {
+/*N*/ }
+
+/*NBFF*/ SfxPoolItem* SvxCharRotateItem::Clone( SfxItemPool* ) const
+/*NBFF*/ {
+/*NBFF*/ return new SvxCharRotateItem( GetValue(), IsFitToLine(), Which() );
+/*NBFF*/ }
+
+/*NBFF*/ SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, USHORT ) const
+/*NBFF*/ {
+/*NBFF*/ sal_uInt16 nVal;
+/*NBFF*/ sal_Bool b;
+/*NBFF*/ rStrm >> nVal >> b;
+/*NBFF*/ return new SvxCharRotateItem( nVal, b, Which() );
+/*NBFF*/ }
+
+/*NBFF*/ SvStream& SvxCharRotateItem::Store( SvStream & rStrm, USHORT ) const
+/*NBFF*/ {
+/*NBFF*/ sal_Bool bFlag = IsFitToLine();
+/*NBFF*/ rStrm << GetValue() << bFlag;
+/*NBFF*/ return rStrm;
+/*NBFF*/ }
+
+/*N*/ USHORT SvxCharRotateItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+/*NBFF*/ SfxItemPresentation SvxCharRotateItem::GetPresentation(
+/*NBFF*/ SfxItemPresentation ePres,
+/*NBFF*/ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+/*NBFF*/ String &rText, const ::IntlWrapper* ) const
+/*NBFF*/ {
+/*NBFF*/ switch( ePres )
+/*NBFF*/ {
+/*NBFF*/ case SFX_ITEM_PRESENTATION_NONE:
+/*NBFF*/ rText.Erase();
+/*NBFF*/ break;
+/*NBFF*/ case SFX_ITEM_PRESENTATION_NAMELESS:
+/*NBFF*/ case SFX_ITEM_PRESENTATION_COMPLETE:
+/*NBFF*/ {
+/*NBFF*/ if( !GetValue() )
+/*NBFF*/ rText = SVX_RESSTR( RID_SVXITEMS_CHARROTATE_OFF );
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ rText = SVX_RESSTR( RID_SVXITEMS_CHARROTATE );
+/*NBFF*/ rText.SearchAndReplaceAscii( "$(ARG1)",
+/*NBFF*/ String::CreateFromInt32( GetValue() / 10 ));
+/*NBFF*/ if( IsFitToLine() )
+/*NBFF*/ rText += SVX_RESSTR( RID_SVXITEMS_CHARROTATE_FITLINE );
+/*NBFF*/ }
+/*NBFF*/ return ePres;
+/*NBFF*/ }
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ return SFX_ITEM_PRESENTATION_NONE;
+/*NBFF*/ }
+
+/*NBFF*/ bool SvxCharRotateItem::QueryValue( ::com::sun::star::uno::Any& rVal,
+/*NBFF*/ BYTE nMemberId ) const
+/*NBFF*/ {
+/*NBFF*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*NBFF*/ nMemberId &= ~CONVERT_TWIPS;
+/*NBFF*/ sal_Bool bRet = sal_True;
+/*NBFF*/ switch( nMemberId )
+/*NBFF*/ {
+/*NBFF*/ case MID_ROTATE:
+/*NBFF*/ rVal <<= (sal_Int16)GetValue();
+/*NBFF*/ break;
+/*NBFF*/ case MID_FITTOLINE:
+/*NBFF*/ rVal = Bool2Any( IsFitToLine() );
+/*NBFF*/ break;
+/*NBFF*/ default:
+/*NBFF*/ bRet = sal_False;
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ return bRet;
+/*NBFF*/ }
+
+/*NBFF*/ bool SvxCharRotateItem::PutValue( const ::com::sun::star::uno::Any& rVal,
+/*NBFF*/ BYTE nMemberId )
+/*NBFF*/ {
+/*NBFF*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*NBFF*/ nMemberId &= ~CONVERT_TWIPS;
+/*NBFF*/ sal_Bool bRet = sal_True;
+/*NBFF*/ sal_Int16 nVal;
+/*NBFF*/ switch( nMemberId )
+/*NBFF*/ {
+/*NBFF*/ case MID_ROTATE:
+/*NBFF*/ rVal >>= nVal;
+/*NBFF*/ if(!nVal || 900 == nVal || 2700 == nVal)
+/*NBFF*/ SetValue( (USHORT)nVal );
+/*NBFF*/ else
+/*NBFF*/ bRet = sal_False;
+/*NBFF*/ break;
+/*NBFF*/
+/*NBFF*/ case MID_FITTOLINE:
+/*NBFF*/ SetFitToLine( Any2Bool( rVal ) );
+/*NBFF*/ break;
+/*NBFF*/ default:
+/*NBFF*/ bRet = sal_False;
+/*NBFF*/ }
+/*NBFF*/ return bRet;
+/*NBFF*/ }
+
+/*NBFF*/ int SvxCharRotateItem::operator==( const SfxPoolItem& rItem ) const
+/*NBFF*/ {
+/*NBFF*/ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+/*NBFF*/ return SfxUInt16Item::operator==( rItem ) &&
+/*NBFF*/ IsFitToLine() == ((const SvxCharRotateItem&)rItem).IsFitToLine();
+/*NBFF*/ }
+
+
+/*************************************************************************
+|* class SvxCharScaleItem
+*************************************************************************/
+
+/*N*/ SvxCharScaleWidthItem::SvxCharScaleWidthItem( sal_uInt16 nValue,
+/*N*/ const sal_uInt16 nW )
+/*N*/ : SfxUInt16Item( nW, nValue )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const
+/*N*/ {
+/*N*/ return new SvxCharScaleWidthItem( GetValue(), Which() );
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const
+/*N*/ {
+/*N*/ sal_uInt16 nVal;
+/*N*/ rStrm >> nVal;
+/*N*/ SvxCharScaleWidthItem* pItem = new SvxCharScaleWidthItem( nVal, Which() );
+/*N*/
+/*N*/ if ( Which() == EE_CHAR_FONTWIDTH )
+/*N*/ {
+/*N*/ // #87271#: Was a SvxFontWidthItem in 5.2
+/*N*/ // USHORT nFixWidth, USHORT nPropWidth.
+/*N*/ // nFixWidth has never been used...
+/*N*/ rStrm >> nVal;
+/*N*/ USHORT nTest;
+/*N*/ rStrm >> nTest;
+/*N*/ if ( nTest == 0x1234 )
+/*N*/ pItem->SetValue( nVal );
+/*N*/ else
+/*N*/ rStrm.SeekRel( -2*(long)sizeof(sal_uInt16) );
+/*N*/ }
+/*N*/
+/*N*/ return pItem;
+/*N*/ }
+
+/*N*/ SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, USHORT nVer ) const
+/*N*/ {
+/*N*/ SvStream& rRet = SfxUInt16Item::Store( rStream, nVer );
+/*N*/ if ( Which() == EE_CHAR_FONTWIDTH )
+/*N*/ {
+/*N*/ // see comment in Create()....
+/*N*/ rRet.SeekRel( -1*(long)sizeof(USHORT) );
+/*N*/ rRet << (USHORT)0;
+/*N*/ rRet << GetValue();
+/*N*/ // Really ugly, but not a problem for reading the doc in 5.2
+/*N*/ rRet << (USHORT)0x1234;
+/*N*/ }
+/*N*/ return rRet;
+/*N*/ }
+
+
+/*N*/ USHORT SvxCharScaleWidthItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+
+/*N*/ bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
+/*N*/ // where we still want this to be a sal_Int16
+/*N*/ sal_Int16 nValue;
+/*N*/ if (rVal >>= nValue)
+/*N*/ {
+/*N*/ SetValue( (UINT16) nValue );
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/
+/*N*/ DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" );
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
+/*N*/ // where we still want this to be a sal_Int16
+/*N*/ rVal <<= (sal_Int16)GetValue();
+/*N*/ return TRUE;
+/*N*/ }
+
+/*************************************************************************
+|* class SvxCharReliefItem
+*************************************************************************/
+
+/*N*/ SvxCharReliefItem::SvxCharReliefItem( FontRelief eValue,
+/*N*/ const sal_uInt16 nId )
+/*N*/ : SfxEnumItem( nId, eValue )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxCharReliefItem( *this );
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, USHORT) const
+/*N*/ {
+/*N*/ sal_uInt16 nVal;
+/*N*/ rStrm >> nVal;
+/*N*/ return new SvxCharReliefItem( (FontRelief)nVal, Which() );
+/*N*/ }
+
+/*N*/ SvStream& SvxCharReliefItem::Store(SvStream & rStrm, USHORT nIVer) const
+/*N*/ {
+/*N*/ sal_uInt16 nVal = GetValue();
+/*N*/ rStrm << nVal;
+/*N*/ return rStrm;
+/*N*/ }
+
+/*N*/ USHORT SvxCharReliefItem::GetVersion( USHORT nFFVer ) const
+/*N*/ {
+/*N*/ return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0;
+/*N*/ }
+
+/*N*/ String SvxCharReliefItem::GetValueTextByPos( USHORT nPos ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE,
+/*N*/ "enum overflow" );
+/*N*/ return String( SVX_RES( RID_SVXITEMS_RELIEF_BEGIN + nPos ));
+/*N*/ }
+
+/*N*/ USHORT SvxCharReliefItem::GetValueCount() const
+/*N*/ {
+/*N*/ return RID_SVXITEMS_RELIEF_ENGRAVED - RID_SVXITEMS_RELIEF_NONE;
+/*N*/ }
+
+/*N*/ SfxItemPresentation SvxCharReliefItem::GetPresentation
+/*N*/ (
+/*N*/ SfxItemPresentation ePres,
+/*N*/ SfxMapUnit eCoreUnit,
+/*N*/ SfxMapUnit ePresUnit,
+/*N*/ XubString& rText, const ::IntlWrapper *pIntl
+/*N*/ ) const
+/*N*/ {
+/*?*/ SfxItemPresentation eRet = ePres;
+/*?*/ switch( ePres )
+/*?*/ {
+/*?*/ case SFX_ITEM_PRESENTATION_NONE:
+/*?*/ rText.Erase();
+/*?*/ break;
+/*?*/
+/*?*/ case SFX_ITEM_PRESENTATION_NAMELESS:
+/*?*/ case SFX_ITEM_PRESENTATION_COMPLETE:
+/*?*/ rText = GetValueTextByPos( GetValue() );
+/*?*/ break;
+/*?*/
+/*?*/ default:
+/*?*/ eRet = SFX_ITEM_PRESENTATION_NONE;
+/*?*/ }
+/*?*/ return eRet;
+/*N*/ }
+
+/*N*/ bool SvxCharReliefItem::PutValue( const ::com::sun::star::uno::Any& rVal,
+/*N*/ BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_RELIEF:
+/*N*/ {
+/*N*/ sal_Int16 nVal = -1;
+/*N*/ rVal >>= nVal;
+/*N*/ if(nVal >= 0 && nVal <= RELIEF_ENGRAVED)
+/*N*/ SetValue( (FontRelief)nVal );
+/*N*/ else
+/*N*/ bRet = sal_False;
+/*N*/ }
+/*N*/ break;
+/*N*/ default:
+/*N*/ bRet = sal_False;
+/*N*/ break;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ bool SvxCharReliefItem::QueryValue( ::com::sun::star::uno::Any& rVal,
+/*N*/ BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/ switch( nMemberId )
+/*N*/ {
+/*N*/ case MID_RELIEF:
+/*N*/ rVal <<= (sal_Int16)GetValue();
+/*N*/ break;
+/*N*/ default:
+/*N*/ bRet = sal_False;
+/*N*/ break;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*************************************************************************
+|* class SvxScriptTypeItemItem
+*************************************************************************/
+
+
+/*************************************************************************
+|* class SvxScriptSetItem
+*************************************************************************/
+
+/*N*/ SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxScriptSetItem::Create( SvStream &, USHORT ) const
+/*N*/ {
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rComplex )
+/*N*/ {
+/*N*/ const USHORT nItemCnt = 3;
+/*N*/
+/*N*/ static struct
+/*N*/ {
+/*N*/ USHORT nFontType;
+/*N*/ USHORT nLanguage;
+/*N*/ }
+/*N*/ aOutTypeArr[ nItemCnt ] =
+/*N*/ {
+/*N*/ { DEFAULTFONT_LATIN_TEXT, LANGUAGE_ENGLISH_US },
+/*N*/ { DEFAULTFONT_CJK_TEXT, LANGUAGE_ENGLISH_US },
+/*N*/ { DEFAULTFONT_CTL_TEXT, LANGUAGE_ARABIC_SAUDI_ARABIA }
+/*N*/ };
+/*N*/
+/*N*/ SvxFontItem* aItemArr[ nItemCnt ] = { &rLatin, &rAsian, &rComplex };
+/*N*/
+/*N*/ for ( USHORT n = 0; n < nItemCnt; ++n )
+/*N*/ {
+/*N*/ Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType,
+/*N*/ aOutTypeArr[ n ].nLanguage,
+/*N*/ DEFAULTFONT_FLAGS_ONLYONE, 0 ) );
+/*N*/ SvxFontItem* pItem = aItemArr[ n ];
+/*N*/ pItem->GetFamily() = aFont.GetFamily();
+/*N*/ pItem->GetFamilyName() = aFont.GetName();
+/*N*/ pItem->GetStyleName().Erase();
+/*N*/ pItem->GetPitch() = aFont.GetPitch();
+/*N*/ pItem->GetCharSet() = aFont.GetCharSet();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ USHORT GetI18NScriptTypeOfLanguage( USHORT nLang )
+/*N*/ {
+/*N*/ return GetI18NScriptType( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) );
+/*N*/ }
+
+/*N*/ USHORT GetItemScriptType( short nI18NType )
+/*N*/ {
+/*N*/ switch ( nI18NType )
+/*N*/ {
+/*N*/ case i18n::ScriptType::LATIN: return SCRIPTTYPE_LATIN;
+/*?*/ case i18n::ScriptType::ASIAN: return SCRIPTTYPE_ASIAN;
+/*?*/ case i18n::ScriptType::COMPLEX: return SCRIPTTYPE_COMPLEX;
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ short GetI18NScriptType( USHORT nItemType )
+/*N*/ {
+/*N*/ switch ( nItemType )
+/*N*/ {
+/*N*/ case SCRIPTTYPE_LATIN: return i18n::ScriptType::LATIN;
+/*?*/ case SCRIPTTYPE_ASIAN: return i18n::ScriptType::ASIAN;
+/*?*/ case SCRIPTTYPE_COMPLEX: return i18n::ScriptType::COMPLEX;
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_writingmodeitem.cxx b/binfilter/bf_svx/source/items/svx_writingmodeitem.cxx
new file mode 100644
index 000000000000..c42f9dba7526
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_writingmodeitem.cxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+
+#include <bf_svx/xdef.hxx>
+
+#include "writingmodeitem.hxx"
+
+
+#include "svxitems.hrc"
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+
+// class SvxWritingModeItem -------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxWritingModeItem, SfxUInt16Item);
+
+/*N*/ SvxWritingModeItem::SvxWritingModeItem( WritingMode eValue, USHORT nWhich )
+/*N*/ : SfxUInt16Item( nWhich, (sal_uInt16)eValue )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxWritingModeItem::~SvxWritingModeItem()
+/*N*/ {
+/*N*/ }
+
+/*N*/ int SvxWritingModeItem::operator==( const SfxPoolItem& rCmp ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rCmp), "unequal types" );
+/*N*/
+/*N*/ return GetValue() == ((SvxWritingModeItem&)rCmp).GetValue();
+/*N*/ }
+
+/*N*/ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const
+/*N*/ {
+/*N*/ return new SvxWritingModeItem( *this );
+/*N*/ }
+
+
+
+/*N*/ USHORT SvxWritingModeItem::GetVersion( USHORT nFVer ) const
+/*N*/ {
+/*N*/ return USHRT_MAX;
+/*N*/ }
+
+
+
+/*N*/ bool SvxWritingModeItem::QueryValue( ::com::sun::star::uno::Any& rVal,
+/*N*/ BYTE ) const
+/*N*/ {
+/*N*/ rVal <<= (WritingMode)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ SvxWritingModeItem& SvxWritingModeItem::operator=( const SvxWritingModeItem& rItem )
+/*N*/ {
+/*N*/ SetValue( rItem.GetValue() );
+/*N*/ return *this;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx b/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
new file mode 100644
index 000000000000..17cdb6493815
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_xmlcnitm.cxx
@@ -0,0 +1,236 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/xml/AttributeData.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+
+#include <bf_xmloff/xmlcnimp.hxx>
+#include <bf_xmloff/unoatrcn.hxx>
+#include "xmlcnitm.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml;
+
+using rtl::OUString;
+
+// ------------------------------------------------------------------------
+
+/*N*/ TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem);
+
+/*N*/ SvXMLAttrContainerItem::SvXMLAttrContainerItem( USHORT nWhich ) :
+/*N*/ SfxPoolItem( nWhich )
+/*N*/ {
+/*N*/ pImpl = new SvXMLAttrContainerData;
+/*N*/ }
+
+/*N*/ SvXMLAttrContainerItem::SvXMLAttrContainerItem(
+/*N*/ const SvXMLAttrContainerItem& rItem ) :
+/*N*/ SfxPoolItem( rItem )
+/*N*/ {
+/*N*/ pImpl = new SvXMLAttrContainerData( *rItem.pImpl );
+/*N*/ }
+
+/*N*/ SvXMLAttrContainerItem::~SvXMLAttrContainerItem()
+/*N*/ {
+/*N*/ delete pImpl;
+/*N*/ }
+
+/*N*/ int SvXMLAttrContainerItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( rItem.ISA(SvXMLAttrContainerItem),
+/*N*/ "SvXMLAttrContainerItem::operator ==(): Bad type");
+/*N*/ return *pImpl == *((const SvXMLAttrContainerItem&)rItem).pImpl;
+/*N*/ }
+
+
+
+/*N*/ USHORT SvXMLAttrContainerItem::GetVersion( USHORT nFileFormatVersion ) const
+/*N*/ {
+/*N*/ // This item should never be stored
+/*N*/ return USHRT_MAX;
+/*N*/ }
+
+/*N*/ bool SvXMLAttrContainerItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ Reference<XNameContainer> xContainer =
+/*N*/ new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl ) );
+/*N*/
+/*N*/ rVal.setValue( &xContainer, ::getCppuType((Reference<XNameContainer>*)0) );
+/*N*/ return true;
+/*N*/ }
+/*N*/ bool SvXMLAttrContainerItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*NBFF*/{
+/*NBFF*/ Reference<XInterface> xRef;
+/*NBFF*/ SvUnoAttributeContainer* pContainer = NULL;
+/*NBFF*/
+/*NBFF*/ if( rVal.getValue() != NULL && rVal.getValueType().getTypeClass() == TypeClass_INTERFACE )
+/*NBFF*/ {
+/*NBFF*/ xRef = *(Reference<XInterface>*)rVal.getValue();
+/*NBFF*/ Reference<XUnoTunnel> xTunnel(xRef, UNO_QUERY);
+/*NBFF*/ if( xTunnel.is() )
+/*NBFF*/ pContainer = (SvUnoAttributeContainer*)xTunnel->getSomething(SvUnoAttributeContainer::getUnoTunnelId());
+/*NBFF*/ }
+/*NBFF*/
+/*NBFF*/ if( pContainer )
+/*NBFF*/ {
+/*NBFF*/ delete pImpl;
+/*NBFF*/ pImpl = new SvXMLAttrContainerData( * pContainer->GetContainerImpl() );
+/*NBFF*/ }
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ SvXMLAttrContainerData* pNewImpl = new SvXMLAttrContainerData;
+/*NBFF*/
+/*NBFF*/ try
+/*NBFF*/ {
+/*NBFF*/ Reference<XNameContainer> xContainer( xRef, UNO_QUERY );
+/*NBFF*/ if( !xContainer.is() )
+/*NBFF*/ return false;
+/*NBFF*/
+/*NBFF*/ const Sequence< OUString > aNameSequence( xContainer->getElementNames() );
+/*NBFF*/ const OUString* pNames = aNameSequence.getConstArray();
+/*NBFF*/ const INT32 nCount = aNameSequence.getLength();
+/*NBFF*/ Any aAny;
+/*NBFF*/ AttributeData* pData;
+/*NBFF*/
+/*NBFF*/ INT32 nAttr; for( nAttr = 0; nAttr < nCount; nAttr++ )
+/*NBFF*/ {
+/*NBFF*/ const OUString aName( *pNames++ );
+/*NBFF*/
+/*NBFF*/ aAny = xContainer->getByName( aName );
+/*NBFF*/ if( aAny.getValue() == NULL || aAny.getValueType() != ::getCppuType((AttributeData*)0) )
+/*NBFF*/ return false;
+/*NBFF*/
+/*NBFF*/ pData = (AttributeData*)aAny.getValue();
+/*NBFF*/ USHORT pos = aName.indexOf( sal_Unicode(':') );
+/*NBFF*/ if( pos != -1 )
+/*NBFF*/ {
+/*NBFF*/ const OUString aPrefix( aName.copy( 0, pos ));
+/*NBFF*/ const OUString aLName( aName.copy( pos+1 ));
+/*NBFF*/
+/*NBFF*/ if( pData->Namespace.getLength() == 0 )
+/*NBFF*/ {
+/*NBFF*/ if( !pNewImpl->AddAttr( aPrefix, aLName, pData->Value ) )
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ if( !pNewImpl->AddAttr( aPrefix, pData->Namespace, aLName, pData->Value ) )
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ if( !pNewImpl->AddAttr( aName, pData->Value ) )
+/*NBFF*/ break;
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/
+/*NBFF*/ if( nAttr == nCount )
+/*NBFF*/ {
+/*NBFF*/ delete pImpl;
+/*NBFF*/ pImpl = pNewImpl;
+/*NBFF*/ return false;
+/*NBFF*/ }
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ delete pNewImpl;
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/ catch(...)
+/*NBFF*/ {
+/*NBFF*/ delete pNewImpl;
+/*NBFF*/ return false;
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/ return true;
+/*N*/ }
+
+
+/*N*/ BOOL SvXMLAttrContainerItem::AddAttr( const OUString& rLName,
+/*N*/ const OUString& rValue )
+/*N*/ {
+/*N*/ return pImpl->AddAttr( rLName, rValue );
+/*N*/ }
+
+/*N*/ BOOL SvXMLAttrContainerItem::AddAttr( const OUString& rPrefix,
+/*N*/ const OUString& rNamespace, const OUString& rLName,
+/*N*/ const OUString& rValue )
+/*N*/ {
+/*N*/ return pImpl->AddAttr( rPrefix, rNamespace, rLName, rValue );
+/*N*/ }
+
+/*N*/ USHORT SvXMLAttrContainerItem::GetAttrCount() const
+/*N*/ {
+/*N*/ return (USHORT)pImpl->GetAttrCount();
+/*N*/ }
+
+/*N*/ OUString SvXMLAttrContainerItem::GetAttrNamespace( USHORT i ) const
+/*N*/ {
+/*N*/ return pImpl->GetAttrNamespace( i );
+/*N*/ }
+
+/*N*/ OUString SvXMLAttrContainerItem::GetAttrPrefix( USHORT i ) const
+/*N*/ {
+/*N*/ return pImpl->GetAttrPrefix( i );
+/*N*/ }
+
+/*N*/ const OUString& SvXMLAttrContainerItem::GetAttrLName( USHORT i ) const
+/*N*/ {
+/*N*/ return pImpl->GetAttrLName( i );
+/*N*/ }
+
+/*N*/ const OUString& SvXMLAttrContainerItem::GetAttrValue( USHORT i ) const
+/*N*/ {
+/*N*/ return pImpl->GetAttrValue( i );
+/*N*/ }
+
+
+/*N*/ USHORT SvXMLAttrContainerItem::GetFirstNamespaceIndex() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001
+/*N*/ }
+
+/*N*/ USHORT SvXMLAttrContainerItem::GetNextNamespaceIndex( USHORT nIdx ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001
+/*N*/ }
+
+/*N*/ const OUString& SvXMLAttrContainerItem::GetNamespace( USHORT i ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return OUString::createFromAscii (""); //STRIP001
+/*N*/ }
+
+/*N*/ const OUString& SvXMLAttrContainerItem::GetPrefix( USHORT i ) const
+/*N*/ {
+/*N*/ DBG_BF_ASSERT(0, "STRIP"); return ::rtl::OUString::createFromAscii ("");//STRIP001 /*N*/ return pImpl->GetPrefix( i );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/items/svx_zoomitem.cxx b/binfilter/bf_svx/source/items/svx_zoomitem.cxx
new file mode 100644
index 000000000000..a1b89b551aa1
--- /dev/null
+++ b/binfilter/bf_svx/source/items/svx_zoomitem.cxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "zoomitem.hxx"
+namespace binfilter {
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(SvxZoomItem,SfxUInt16Item);
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxZoomItem::SvxZoomItem
+/*N*/ (
+/*N*/ SvxZoomType eZoomType,
+/*N*/ sal_uInt16 nVal,
+/*N*/ sal_uInt16 nWhich
+/*N*/ )
+/*N*/ : SfxUInt16Item( nWhich, nVal ),
+/*N*/ nValueSet( SVX_ZOOM_ENABLE_ALL ),
+/*N*/ eType( eZoomType )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxZoomItem::SvxZoomItem( const SvxZoomItem& rOrig )
+/*N*/ : SfxUInt16Item( rOrig.Which(), rOrig.GetValue() ),
+/*N*/ nValueSet( rOrig.GetValueSet() ),
+/*N*/ eType( rOrig.GetType() )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxZoomItem::~SvxZoomItem()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* SvxZoomItem::Clone( SfxItemPool *pPool ) const
+/*N*/ {
+/*N*/ return new SvxZoomItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ int SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const
+/*N*/ {
+/*N*/ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+/*N*/
+/*N*/ SvxZoomItem& rItem = (SvxZoomItem&)rAttr;
+/*N*/
+/*N*/ return ( GetValue() == rItem.GetValue() &&
+/*N*/ nValueSet == rItem.GetValueSet() &&
+/*N*/ eType == rItem.GetType() );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/options/makefile.mk b/binfilter/bf_svx/source/options/makefile.mk
new file mode 100644
index 000000000000..a225b140f3df
--- /dev/null
+++ b/binfilter/bf_svx/source/options/makefile.mk
@@ -0,0 +1,60 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(BFPRJ)$/util\svx_svxpch
+
+PRJNAME=binfilter
+TARGET=svx_options
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+CFLAGS+=-DDG_DLL
+
+# --- Files --------------------------------------------------------
+
+SLOFILES=\
+ $(SLO)$/svx_asiancfg.obj \
+ $(SLO)$/svx_adritem.obj \
+ $(SLO)$/svx_optgrid.obj
+
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/options/svx_adritem.cxx b/binfilter/bf_svx/source/options/svx_adritem.cxx
new file mode 100644
index 000000000000..aece28e2fcf7
--- /dev/null
+++ b/binfilter/bf_svx/source/options/svx_adritem.cxx
@@ -0,0 +1,206 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <bf_svtools/useroptions.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "adritem.hxx"
+#include "svxids.hrc"
+namespace binfilter {
+
+#define INVALID_TOKEN ((USHORT)0xFFFF)
+
+// -----------------------------------------------------------------------
+
+/*?*/ String ConvertToStore_Impl( const String& rText )
+/*?*/ {
+/*?*/ String sRet;
+/*?*/ USHORT i = 0;
+/*?*/
+/*?*/ while ( i < rText.Len() )
+/*?*/ {
+/*?*/ if ( rText.GetChar(i) == '\\' || rText.GetChar(i) == '#' )
+/*?*/ sRet += '\\';
+/*?*/ sRet += rText.GetChar(i++);
+/*?*/ }
+/*?*/ return sRet;
+/*?*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ TYPEINIT1(SvxAddressItem, SfxStringItem);
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxAddressItem::SvxAddressItem( USHORT nWhich ) :
+/*N*/
+/*N*/ SfxStringItem( nWhich, String() )
+/*N*/
+/*N*/ {
+/*N*/ SvtUserOptions aUserOpt;
+/*N*/
+/*N*/ aName = aUserOpt.GetLastName();
+/*N*/ aFirstName = aUserOpt.GetFirstName();
+/*N*/ aShortName = aUserOpt.GetID();
+/*N*/
+/*N*/ SetToken( POS_COMPANY, aUserOpt.GetCompany() );
+/*N*/ SetToken( POS_STREET, aUserOpt.GetStreet() );
+/*N*/ SetToken( POS_CITY, aUserOpt.GetCity() );
+/*N*/ SetToken( POS_STATE, aUserOpt.GetState() );
+/*N*/ SetToken( POS_PLZ, aUserOpt.GetZip() );
+/*N*/ SetToken( POS_COUNTRY, aUserOpt.GetCountry() );
+/*N*/ SetToken( POS_POSITION, aUserOpt.GetPosition() );
+/*N*/ SetToken( POS_TITLE, aUserOpt.GetTitle() );
+/*N*/ SetToken( POS_TEL_PRIVATE, aUserOpt.GetTelephoneHome() );
+/*N*/ SetToken( POS_TEL_COMPANY, aUserOpt.GetTelephoneWork() );
+/*N*/ SetToken( POS_FAX, aUserOpt.GetFax() );
+/*N*/ SetToken( POS_EMAIL, aUserOpt.GetEmail() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxAddressItem::SvxAddressItem( const SvxAddressItem& rItem ) :
+/*N*/
+/*N*/ SfxStringItem( rItem.Which(), rItem.GetValue() ),
+/*N*/
+/*N*/ aName ( rItem.aName ),
+/*N*/ aFirstName ( rItem.aFirstName ),
+/*N*/ aShortName ( rItem.aShortName )
+/*N*/
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ SvxAddressItem::SvxAddressItem( const String &rAdress,
+/*N*/ const String &rShortName,
+/*N*/ const String &rFirstName,
+/*N*/ const String &rName,
+/*N*/ USHORT nWhich ) :
+/*N*/
+/*N*/ SfxStringItem( nWhich, rAdress ),
+/*N*/
+/*N*/ aName ( rName ),
+/*N*/ aFirstName ( rFirstName ),
+/*N*/ aShortName ( rShortName )
+/*N*/
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ BOOL SvxAddressItem::SetToken( USHORT nPos, const String &rVal )
+/*N*/ {
+/*N*/ // nach dem 'nPos'-ten Token suchen
+/*N*/ String aAdress( GetValue() );
+/*N*/ USHORT nStart, nEnd = 0;
+/*N*/ for ( USHORT nNo = 0; nNo <= nPos; ++nNo )
+/*N*/ {
+/*N*/ // End-'#' finden
+/*N*/ for ( nStart = nEnd;
+/*N*/ nEnd < aAdress.Len() && aAdress.GetChar(nEnd) != '#';
+/*N*/ ++nEnd )
+/*N*/ if ( aAdress.GetChar(nEnd) == '\\' )
+/*N*/ ++nEnd;
+/*N*/
+/*N*/ // aAdress[nEnd] == '#' oder am Ende, also eine Position weiter gehen
+/*N*/ ++nEnd;
+/*N*/
+/*N*/ // ggf. fehlende '#' auff"ullen
+/*N*/ if ( nNo < nPos && nEnd >= aAdress.Len() )
+/*N*/ aAdress += '#';
+/*N*/ }
+/*N*/
+/*N*/ // gefunden
+/*N*/ aAdress.Erase( nStart, nEnd-nStart-1 );
+/*N*/ aAdress.Insert( ::binfilter::ConvertToStore_Impl( rVal ), nStart );
+/*N*/ SetValue( aAdress );
+/*N*/ return TRUE;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ String SvxAddressItem::GetToken( USHORT nPos ) const
+/*N*/ {
+/*N*/ String sRet, sEmpty;
+/*N*/ const String &rAdress = GetValue();
+/*N*/ USHORT i = 0, nTxt = 0;
+/*N*/
+/*N*/ while ( i < rAdress.Len() )
+/*N*/ {
+/*N*/ while ( i < rAdress.Len() && rAdress.GetChar(i) != '#' )
+/*N*/ {
+/*N*/ if ( rAdress.GetChar(i) == '\\' )
+/*N*/ i++;
+/*N*/ sRet += rAdress.GetChar(i++);
+/*N*/ }
+/*N*/
+/*N*/ // rAdress[i] == '#' oder am Ende, also eine Position weiter gehen
+/*N*/ i++;
+/*N*/
+/*N*/ if ( nPos == nTxt )
+/*N*/ return sRet;
+/*N*/ else if ( i >= rAdress.Len() )
+/*N*/ return sEmpty;
+/*N*/ else
+/*N*/ {
+/*N*/ sRet.Erase();
+/*N*/ nTxt++;
+/*N*/ }
+/*N*/ }
+/*N*/ return sEmpty;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/options/svx_asiancfg.cxx b/binfilter/bf_svx/source/options/svx_asiancfg.cxx
new file mode 100644
index 000000000000..f3a10595cd90
--- /dev/null
+++ b/binfilter/bf_svx/source/options/svx_asiancfg.cxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <asiancfg.hxx>
+#include <bf_svtools/svarray.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <tools/debug.hxx>
+namespace binfilter {
+
+//-----------------------------------------------------------------------------
+using namespace utl;
+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::lang;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+/*N*/ const sal_Char sStartEndCharacters[] = "StartEndCharacters";
+/*N*/ const sal_Char sStartCharacters[] = "StartCharacters";
+/*N*/ const sal_Char sEndCharacters[] = "EndCharacters";
+
+//-----------------------------------------------------------------------------
+/*N*/ struct SvxForbiddenStruct_Impl
+/*N*/ {
+/*N*/ Locale aLocale;
+/*N*/ OUString sStartChars;
+/*N*/ OUString sEndChars;
+/*N*/ };
+//-----------------------------------------------------------------------------
+/*N*/ typedef SvxForbiddenStruct_Impl* SvxForbiddenStruct_ImplPtr;
+/*N*/ SV_DECL_PTRARR_DEL(SvxForbiddenStructArr, SvxForbiddenStruct_ImplPtr, 2, 2)//STRIP008 ;
+/*N*/ SV_IMPL_PTRARR(SvxForbiddenStructArr, SvxForbiddenStruct_ImplPtr);
+//-----------------------------------------------------------------------------
+/*N*/ struct SvxAsianConfig_Impl
+/*N*/ {
+/*N*/ sal_Bool bKerningWesternTextOnly;
+/*N*/ sal_Int16 nCharDistanceCompression;
+/*N*/
+/*N*/ SvxForbiddenStructArr aForbiddenArr;
+/*N*/
+/*N*/ SvxAsianConfig_Impl() :
+/*N*/ bKerningWesternTextOnly(sal_True),
+/*N*/ nCharDistanceCompression(0) {}
+/*N*/ };
+/* -----------------------------16.01.01 15:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ Sequence<OUString> lcl_GetPropertyNames()
+/*N*/ {
+/*N*/ Sequence<OUString> aNames(2);
+/*N*/ OUString* pNames = aNames.getArray();
+/*N*/ pNames[0] = C2U("IsKerningWesternTextOnly");
+/*N*/ pNames[1] = C2U("CompressCharacterDistance");
+/*N*/ return aNames;;
+/*N*/ }
+// ---------------------------------------------------------------------------
+/*N*/ SvxAsianConfig::SvxAsianConfig(sal_Bool bEnableNotify) :
+/*N*/ ::utl::ConfigItem(C2U("Office.Common/AsianLayout")),
+/*N*/ pImpl(new SvxAsianConfig_Impl)
+/*N*/ {
+/*N*/ if(bEnableNotify)
+/*N*/ EnableNotification(lcl_GetPropertyNames());
+/*N*/ Load();
+/*N*/ }
+/* -----------------------------16.01.01 15:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ SvxAsianConfig::~SvxAsianConfig()
+/*N*/ {
+/*N*/ delete pImpl;
+/*N*/ }
+/* -----------------------------17.01.01 09:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ void SvxAsianConfig::Load()
+/*N*/ {
+/*N*/ Sequence<Any> aValues = GetProperties(lcl_GetPropertyNames());
+/*N*/ const Any* pValues = aValues.getConstArray();
+/*N*/ if(pValues[0].hasValue())
+/*N*/ pImpl->bKerningWesternTextOnly = *(sal_Bool*) pValues[0].getValue();
+/*N*/ pValues[1] >>= pImpl->nCharDistanceCompression;
+/*N*/
+/*N*/ pImpl->aForbiddenArr.DeleteAndDestroy(0, pImpl->aForbiddenArr.Count());
+/*N*/ OUString sPropPrefix(C2U(sStartEndCharacters));
+/*N*/ Sequence<OUString> aNodes = GetNodeNames(sPropPrefix);
+/*N*/
+/*N*/ Sequence<OUString> aPropNames(aNodes.getLength() * 2);
+/*N*/ OUString* pNames = aPropNames.getArray();
+/*N*/ sal_Int32 nName = 0;
+/*N*/ sPropPrefix += C2U("/");
+/*N*/ sal_Int32 nNode;
+/*N*/ const OUString* pNodes = aNodes.getConstArray();
+/*N*/ for(nNode = 0; nNode < aNodes.getLength(); nNode++)
+/*N*/ {
+/*?*/ OUString sStart(sPropPrefix);
+/*?*/ sStart += pNodes[nNode];
+/*?*/ sStart += C2U("/");
+/*?*/ pNames[nName] = sStart; pNames[nName++] += C2U("StartCharacters");
+/*?*/ pNames[nName] = sStart; pNames[nName++] += C2U("EndCharacters");
+/*N*/ }
+/*N*/ Sequence<Any> aNodeValues = GetProperties(aPropNames);
+/*N*/ const Any* pNodeValues = aNodeValues.getConstArray();
+/*N*/ nName = 0;
+/*N*/ for(nNode = 0; nNode < aNodes.getLength(); nNode++)
+/*N*/ {
+/*?*/ SvxForbiddenStruct_ImplPtr pInsert = new SvxForbiddenStruct_Impl;
+/*?*/ pInsert->aLocale.Language = pNodes[nNode].copy(0, 2);
+/*?*/ DBG_ASSERT(pInsert->aLocale.Language.getLength(), "illegal language");
+/*?*/ pInsert->aLocale.Country = pNodes[nNode].copy(3, 2);
+/*?*/
+/*?*/ pNodeValues[nName++] >>= pInsert->sStartChars;
+/*?*/ pNodeValues[nName++] >>= pInsert->sEndChars;
+/*?*/ pImpl->aForbiddenArr.Insert(pInsert, pImpl->aForbiddenArr.Count());
+/*N*/ }
+/*N*/ }
+/* -----------------------------16.01.01 15:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ sal_Bool SvxAsianConfig::IsKerningWesternTextOnly() const
+/*N*/ {
+/*N*/ return pImpl->bKerningWesternTextOnly;
+/*N*/ }
+/* -----------------------------16.01.01 15:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ sal_Int16 SvxAsianConfig::GetCharDistanceCompression() const
+/*N*/ {
+/*N*/ return pImpl->nCharDistanceCompression;
+/*N*/ }
+/* -----------------------------16.01.01 15:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+/*N*/ uno::Sequence<lang::Locale> SvxAsianConfig::GetStartEndCharLocales()
+/*N*/ {
+/*N*/ Sequence<Locale> aRet(pImpl->aForbiddenArr.Count());
+/*N*/ Locale* pRet = aRet.getArray();
+/*N*/ for(sal_uInt16 i = 0; i < pImpl->aForbiddenArr.Count(); i++)
+/*N*/ {
+/*?*/ pRet[i] = pImpl->aForbiddenArr[i]->aLocale;
+/*N*/ }
+/*N*/ return aRet;
+/*N*/ }
+
+void SvxAsianConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ) {}
+void SvxAsianConfig::Commit() {}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/options/svx_optdll.cxx b/binfilter/bf_svx/source/options/svx_optdll.cxx
new file mode 100644
index 000000000000..75f7fbf0933e
--- /dev/null
+++ b/binfilter/bf_svx/source/options/svx_optdll.cxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef WIN
+#include <tools/svwin.h>
+#include <vcl/sysdep.hxx>
+#endif
+namespace binfilter {
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#ifdef WIN
+
+/***************************************************************************
+|*
+|* LibMain()
+|*
+|* Beschreibung Initialisierungsfunktion der DLL
+|* Ersterstellung TH 05.05.93
+|* Letzte Aenderung PB 04.09.96
+|*
+***************************************************************************/
+
+extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
+{
+ if ( nHeap )
+ UnlockData( 0 );
+ return TRUE;
+}
+
+/***************************************************************************
+|*
+|* WEP()
+|*
+|* Beschreibung DLL-Deinitialisierung
+|* Ersterstellung TH 05.05.93
+|* Letzte Aenderung TH 05.05.93
+|*
+***************************************************************************/
+
+extern "C" int CALLBACK WEP( int )
+{
+ return 1;
+}
+
+//==========================================================================
+
+#endif
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/options/svx_optgrid.cxx b/binfilter/bf_svx/source/options/svx_optgrid.cxx
new file mode 100644
index 000000000000..3a5e52999d39
--- /dev/null
+++ b/binfilter/bf_svx/source/options/svx_optgrid.cxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#define _SVX_OPTGRID_CXX
+
+#include "svxids.hrc"
+#include "optgrid.hxx"
+#include "dialogs.hrc"
+namespace binfilter {
+
+/*--------------------------------------------------------------------
+ Beschreibung: Rastereinstellungen Ctor
+ --------------------------------------------------------------------*/
+
+/*N*/ SvxOptionsGrid::SvxOptionsGrid() :
+/*N*/ nFldDrawX ( 100 ),
+/*N*/ nFldDivisionX ( 0 ),
+/*N*/ nFldDrawY ( 100 ),
+/*N*/ nFldDivisionY ( 0 ),
+/*N*/ nFldSnapX ( 100 ),
+/*N*/ nFldSnapY ( 100 ),
+/*N*/ bUseGridsnap ( 0 ),
+/*N*/ bSynchronize ( 1 ),
+/*N*/ bGridVisible ( 0 ),
+/*N*/ bEqualGrid ( 1 )
+/*N*/ {
+/*N*/ }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Rastereinstellungen Dtor
+ --------------------------------------------------------------------*/
+
+/*N*/ SvxOptionsGrid::~SvxOptionsGrid()
+/*N*/ {
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/makefile.mk b/binfilter/bf_svx/source/outliner/makefile.mk
new file mode 100644
index 000000000000..2f7acb483916
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/makefile.mk
@@ -0,0 +1,62 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_outliner
+
+NO_HIDS=TRUE
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=outl_pch
+PROJECTPCHSOURCE=svx_outl_pch
+
+
+# --- Settings -----------------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Allgemein ----------------------------------------------------------
+
+SLOFILES= \
+ $(SLO)$/svx_outliner.obj \
+ $(SLO)$/svx_outlin2.obj \
+ $(SLO)$/svx_paralist.obj \
+ $(SLO)$/svx_outlvw.obj \
+ $(SLO)$/svx_outleeng.obj \
+ $(SLO)$/svx_outlobj.obj
+
+SRS1NAME=$(TARGET)
+SRC1FILES= svx_outliner.src
+
+.INCLUDE : target.mk
diff --git a/binfilter/bf_svx/source/outliner/outl_pch.hxx b/binfilter/bf_svx/source/outliner/outl_pch.hxx
new file mode 100644
index 000000000000..0b8358a79bed
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/outl_pch.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define ITEMID_FONTHEIGHT 0
+#define ITEMID_ADJUST 0
+#define ITEMID_LINESPACING 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_BRUSH 0
+#define ITEMID_FIELD 0
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/outleeng.hxx b/binfilter/bf_svx/source/outliner/outleeng.hxx
new file mode 100644
index 000000000000..67fa5506c033
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/outleeng.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _OUTLEENG_HXX
+#define _OUTLEENG_HXX
+
+#include <outliner.hxx>
+#include <editeng.hxx>
+namespace binfilter {
+
+typedef EENotify* EENotifyPtr;
+SV_DECL_PTRARR_DEL( NotifyList, EENotifyPtr, 1, 1 )//STRIP008 ;
+
+class OutlinerEditEng : public EditEngine
+{
+ Outliner* pOwner;
+
+public:
+ OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool );
+ ~OutlinerEditEng();
+
+
+ virtual void ParagraphInserted( USHORT nNewParagraph );
+ virtual void ParagraphDeleted( USHORT nDeletedParagraph );
+
+ // #101498#
+ virtual void DrawingText(const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft);
+
+ virtual void ParaAttribsChanged( USHORT nPara );
+ virtual void ParagraphHeightChanged( USHORT nPara );
+ virtual XubString GetUndoComment( USHORT nUndoId ) const;
+
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor );
+
+ virtual Rectangle GetBulletArea( USHORT nPara );
+
+ // belongs into class Outliner, move there before incompatible update!
+ Link aOutlinerNotifyHdl;
+ NotifyList aNotifyCache;
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/outliner.hrc b/binfilter/bf_svx/source/outliner/outliner.hrc
new file mode 100644
index 000000000000..5658cc058cf2
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/outliner.hrc
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _OUTLINER_HRC
+#define _OUTLINER_HRC
+
+#ifndef _SOLAR_HRC
+#include <bf_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_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/binfilter/bf_svx/source/outliner/paralist.hxx b/binfilter/bf_svx/source/outliner/paralist.hxx
new file mode 100644
index 000000000000..645fb23533f6
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/paralist.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _PARALIST_HXX
+#define _PARALIST_HXX
+
+//STRIP008 class Paragraph;
+
+#include <tools/list.hxx>
+
+#include <tools/link.hxx>
+namespace binfilter {
+class Paragraph;
+
+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 ); }
+
+ void Insert( Paragraph* pPara, ULONG nAbsPos = LIST_APPEND ) { List::Insert( pPara, nAbsPos ); }
+ void Remove( ULONG nPara ) { List::Remove( nPara ); }
+
+
+/*NBFF*/ Paragraph* GetParent( Paragraph* pParagraph, USHORT& rRelPos ) const;
+
+
+ void SetVisibleStateChangedHdl( const Link& rLink ) { aVisibleStateChangedHdl = rLink; }
+ Link GetVisibleStateChangedHdl() const { return aVisibleStateChangedHdl; }
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/svx_outleeng.cxx b/binfilter/bf_svx/source/outliner/svx_outleeng.cxx
new file mode 100644
index 000000000000..d07fea2db1a6
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_outleeng.cxx
@@ -0,0 +1,151 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#define _OUTLINER_CXX
+#include <outleeng.hxx>
+#include <paralist.hxx>
+#include <outliner.hrc>
+
+
+
+#include "eerdll.hxx"
+
+namespace binfilter {
+
+/*N*/ OutlinerEditEng::OutlinerEditEng( Outliner* pEngOwner, SfxItemPool* pPool )
+/*N*/ : EditEngine( pPool )
+/*N*/ {
+/*N*/ pOwner = pEngOwner;
+/*N*/ }
+
+/*N*/ OutlinerEditEng::~OutlinerEditEng()
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ Rectangle OutlinerEditEng::GetBulletArea( USHORT nPara )
+/*N*/ {
+/*N*/ Rectangle aBulletArea = Rectangle( Point(), Point() );
+/*N*/ if ( nPara < pOwner->pParaList->GetParagraphCount() )
+/*N*/ {
+/*N*/ if ( pOwner->ImplHasBullet( nPara ) )
+/*N*/ aBulletArea = pOwner->ImpCalcBulletArea( nPara, FALSE, FALSE );
+/*N*/ }
+/*N*/ return aBulletArea;
+/*N*/ }
+
+/*N*/ void OutlinerEditEng::ParagraphInserted( USHORT nNewParagraph )
+/*N*/ {
+/*N*/ pOwner->ParagraphInserted( nNewParagraph );
+/*N*/
+/*N*/ EditEngine::ParagraphInserted( nNewParagraph );
+/*N*/ }
+
+/*N*/ void OutlinerEditEng::ParagraphDeleted( USHORT nDeletedParagraph )
+/*N*/ {
+/*N*/ pOwner->ParagraphDeleted( nDeletedParagraph );
+/*N*/
+/*N*/ EditEngine::ParagraphDeleted( nDeletedParagraph );
+/*N*/ }
+
+
+/*N*/ void OutlinerEditEng::ParaAttribsChanged( USHORT nPara )
+/*N*/ {
+/*N*/ pOwner->ParaAttribsChanged( nPara );
+/*N*/ }
+
+/*N*/ void OutlinerEditEng::ParagraphHeightChanged( USHORT nPara )
+/*N*/ {
+/*N*/ pOwner->ParagraphHeightChanged( nPara );
+/*N*/
+/*N*/ EditEngine::ParagraphHeightChanged( nPara );
+/*N*/ }
+
+
+/*N*/ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ switch( nUndoId )
+/*N*/ {
+/*N*/ case OLUNDO_DEPTH:
+/*?*/ return XubString( EditResId( RID_OUTLUNDO_DEPTH ));
+/*N*/
+/*N*/ case OLUNDO_EXPAND:
+/*?*/ return XubString( EditResId( RID_OUTLUNDO_EXPAND ));
+/*N*/
+/*N*/ case OLUNDO_COLLAPSE:
+/*?*/ return XubString( EditResId( RID_OUTLUNDO_COLLAPSE ));
+/*N*/
+/*N*/ case OLUNDO_ATTR:
+/*N*/ return XubString( EditResId( RID_OUTLUNDO_ATTR ));
+/*N*/
+/*N*/ case OLUNDO_INSERT:
+/*?*/ return XubString( EditResId( RID_OUTLUNDO_INSERT ));
+/*N*/
+/*N*/ default:
+/*N*/ return EditEngine::GetUndoComment( nUndoId );
+/*N*/ }
+/*N*/ #else // SVX_LIGHT
+/*N*/ XubString aString;
+/*N*/ return aString;
+/*N*/ #endif
+/*N*/ }
+
+// #101498#
+/*N*/ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft)
+/*N*/ {
+/*N*/ if ( nIndex == 0 )
+/*N*/ {
+/*N*/ // Dann das Bullet 'malen', dort wird bStrippingPortions ausgewertet
+/*N*/ // und Outliner::DrawingText gerufen
+/*N*/
+/*N*/ // DrawingText liefert die BaseLine, DrawBullet braucht Top().
+/*N*/ Point aCorrectedPos( rStartPos );
+/*N*/ aCorrectedPos.Y() = GetDocPosTopLeft( nPara ).Y();
+/*N*/ aCorrectedPos.Y() += GetFirstLineOffset( nPara );
+/*N*/ pOwner->PaintBullet( nPara, aCorrectedPos, Point(), 0, GetRefDevice() );
+/*N*/ }
+/*N*/
+/*N*/ // #101498#
+/*N*/ pOwner->DrawingText(rStartPos,rText,nTextStart,nTextLen,pDXArray,rFont,nPara,nIndex,nRightToLeft);
+/*N*/ }
+
+
+
+/*N*/ XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+/*N*/ {
+/*N*/ return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/svx_outlin2.cxx b/binfilter/bf_svx/source/outliner/svx_outlin2.cxx
new file mode 100644
index 000000000000..261ec162d141
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_outlin2.cxx
@@ -0,0 +1,461 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+
+
+#include <forbiddencharacterstable.hxx>
+
+#define _OUTLINER_CXX
+
+#include <outleeng.hxx>
+namespace binfilter {
+
+DBG_NAMEEX(Outliner)//STRIP008
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::linguistic2;
+
+ // =====================================================================
+// ====================== Einfache Durchreicher =======================
+// ======================================================================
+
+/*N*/ void Outliner::SetUpdateMode( BOOL bUpdate )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetUpdateMode( bUpdate );
+/*N*/ }
+
+
+/*N*/ BOOL Outliner::GetUpdateMode() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetUpdateMode();
+/*N*/ }
+
+/*N*/ const SfxItemSet& Outliner::GetEmptyItemSet() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetEmptyItemSet();
+/*N*/ }
+
+/*N*/ void Outliner::EnableUndo( BOOL bEnable )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->EnableUndo( bEnable );
+/*N*/ }
+
+/*N*/ BOOL Outliner::IsUndoEnabled() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->IsUndoEnabled();
+/*N*/ }
+
+/*N*/ MapMode Outliner::GetRefMapMode() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetRefMapMode();
+/*N*/ }
+
+/*N*/ void Outliner::SetRefMapMode( const MapMode& rMMode )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetRefMapMode( rMMode );
+/*N*/ }
+
+/*N*/ void Outliner::SetBackgroundColor( const Color& rColor )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetBackgroundColor( rColor );
+/*N*/ }
+
+
+
+
+
+/*N*/ ULONG Outliner::GetTextHeight() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetTextHeight();
+/*N*/ }
+
+
+
+/*N*/ void Outliner::SetNotifyHdl( const Link& rLink )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->aOutlinerNotifyHdl = rLink;
+/*N*/
+/*N*/ if ( rLink.IsSet() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 pEditEngine->SetNotifyHdl( LINK( this, Outliner, EditEngineNotifyHdl ) );
+/*N*/ else
+/*N*/ pEditEngine->SetNotifyHdl( Link() );
+/*N*/
+/*N*/ }
+
+
+
+
+/*N*/ void Outliner::SetDefTab( USHORT nTab )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetDefTab( nTab );
+/*N*/ }
+
+
+
+/*N*/ BOOL Outliner::UpdateFields()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->UpdateFields();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+/*N*/ void Outliner::SetPaperSize( const Size& rSize )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetPaperSize( rSize );
+/*N*/ }
+
+/*N*/ const Size& Outliner::GetPaperSize() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetPaperSize();
+/*N*/ }
+
+
+
+/*N*/ void Outliner::ClearPolygon()
+/*N*/ {
+/*N*/ DBG_CHKTHIS( Outliner, 0 );
+/*N*/ pEditEngine->ClearPolygon();
+/*N*/ }
+
+
+
+/*N*/ void Outliner::SetMinAutoPaperSize( const Size& rSz )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetMinAutoPaperSize( rSz );
+/*N*/ }
+
+
+/*N*/ void Outliner::SetMaxAutoPaperSize( const Size& rSz )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetMaxAutoPaperSize( rSz );
+/*N*/ }
+
+
+
+
+/*N*/ Size Outliner::CalcTextSize()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return Size(pEditEngine->CalcTextWidth(),pEditEngine->GetTextHeight());
+/*N*/ }
+
+
+/*N*/ void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetStyleSheetPool( pSPool );
+/*N*/ }
+
+/*N*/ SfxStyleSheetPool* Outliner::GetStyleSheetPool()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetStyleSheetPool();
+/*N*/ }
+
+/*N*/ SfxStyleSheet* Outliner::GetStyleSheet( ULONG nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetStyleSheet( (USHORT)nPara );
+/*N*/ }
+
+/*N*/ void Outliner::SetControlWord( ULONG nWord )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetControlWord( nWord );
+/*N*/ }
+
+/*N*/ ULONG Outliner::GetControlWord() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetControlWord();
+/*N*/ }
+
+/*N*/ void Outliner::SetAsianCompressionMode( USHORT n )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetAsianCompressionMode( n );
+/*N*/ }
+
+
+/*N*/ void Outliner::SetKernAsianPunctuation( BOOL b )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetKernAsianPunctuation( b );
+/*N*/ }
+
+
+/*N*/ void Outliner::UndoActionStart( USHORT nId )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->UndoActionStart( nId );
+/*N*/ }
+
+/*N*/ void Outliner::UndoActionEnd( USHORT nId )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->UndoActionEnd( nId );
+/*N*/ }
+
+
+/*N*/ BOOL Outliner::IsInUndo()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->IsInUndo();
+/*N*/ }
+
+/*N*/ ULONG Outliner::GetLineCount( ULONG nParagraph ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetLineCount( (USHORT)nParagraph );
+/*N*/ }
+
+/*N*/ USHORT Outliner::GetLineLen( ULONG nParagraph, USHORT nLine ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetLineLen( (USHORT)nParagraph, nLine );
+/*N*/ }
+
+/*?*/ ULONG Outliner::GetLineHeight( ULONG nParagraph, ULONG nLine )
+/*?*/ {
+/*?*/ DBG_CHKTHIS(Outliner,0);
+/*?*/ return pEditEngine->GetLineHeight( (USHORT)nParagraph, (USHORT)nLine );
+/*?*/ }
+
+/*N*/ void Outliner::QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->QuickRemoveCharAttribs( nPara, nWhich );
+/*N*/ }
+
+
+
+/*N*/ void Outliner::SetDefaultLanguage( LanguageType eLang )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetDefaultLanguage( eLang );
+/*N*/ }
+
+
+
+
+
+/*N*/ void Outliner::SetEditTextObjectPool( SfxItemPool* pPool )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetEditTextObjectPool( pPool );
+/*N*/ }
+
+/*N*/ SfxItemPool* Outliner::GetEditTextObjectPool() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetEditTextObjectPool();
+/*N*/ }
+
+/*N*/ void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetForbiddenCharsTable( xForbiddenChars );
+/*N*/ }
+
+/*N*/ OutputDevice* Outliner::GetRefDevice() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetRefDevice();
+/*N*/ }
+
+
+/*N*/ ULONG Outliner::GetTextHeight( ULONG nParagraph ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetTextHeight((USHORT)nParagraph );
+/*N*/ }
+
+/*N*/ Point Outliner::GetDocPos( const Point& rPaperPos ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetDocPos( rPaperPos );
+/*N*/ }
+
+/*N*/ Point Outliner::GetDocPosTopLeft( ULONG nParagraph )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetDocPosTopLeft( (USHORT)nParagraph );
+/*N*/ }
+
+/*N*/ BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder )
+/*N*/ {
+/*N*/ return IsTextPos( rPaperPos, nBorder, NULL );
+/*N*/ }
+
+/*N*/ BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBullet )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ if ( pbBullet)
+/*N*/ *pbBullet = FALSE;
+/*N*/ BOOL bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder );
+/*N*/ if ( !bTextPos )
+/*N*/ {
+/*N*/ Point aDocPos = GetDocPos( rPaperPos );
+/*N*/ USHORT nPara = pEditEngine->FindParagraph( aDocPos.Y() );
+/*N*/ if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) )
+/*N*/ {
+/*?*/ Rectangle aBulArea = ImpCalcBulletArea( nPara, TRUE, TRUE );
+/*?*/ if ( aBulArea.IsInside( rPaperPos ) )
+/*?*/ {
+/*?*/ bTextPos = TRUE;
+/*?*/ if ( pbBullet)
+/*?*/ *pbBullet = TRUE;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bTextPos;
+/*N*/ }
+
+/*N*/ void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->QuickSetAttribs( rSet, rSel );
+/*N*/ }
+
+/*N*/ void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel )
+/*N*/ {
+/*N*/ bFirstParaIsEmpty = FALSE;
+/*N*/ pEditEngine->QuickInsertText( rText, rSel );
+/*N*/ }
+
+/*N*/ void Outliner::QuickDelete( const ESelection& rSel )
+/*N*/ {
+/*N*/ bFirstParaIsEmpty = FALSE;
+/*N*/ pEditEngine->QuickDelete( rSel );
+/*N*/ }
+
+/*N*/ void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ bFirstParaIsEmpty = FALSE;
+/*N*/ pEditEngine->QuickInsertField( rFld, rSel );
+/*N*/ }
+
+/*N*/ void Outliner::QuickInsertLineBreak( const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ bFirstParaIsEmpty = FALSE;
+/*N*/ pEditEngine->QuickInsertLineBreak( rSel );
+/*N*/ }
+
+/*N*/ void Outliner::QuickFormatDoc( BOOL bFull )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->QuickFormatDoc( bFull );
+/*N*/ }
+
+/*N*/ void Outliner::SetGlobalCharStretching( USHORT nX, USHORT nY )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetGlobalCharStretching( nX, nY );
+/*N*/ }
+
+/*N*/ void Outliner::EraseVirtualDevice()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->EraseVirtualDevice();
+/*N*/ }
+
+/*N*/ BOOL Outliner::ShouldCreateBigTextObject() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->ShouldCreateBigTextObject();
+/*N*/ }
+
+/*N*/ void Outliner::SetVertical( BOOL b )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetVertical( b );
+/*N*/ }
+
+/*N*/ BOOL Outliner::IsVertical() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->IsVertical();
+/*N*/ }
+
+
+
+/*N*/ USHORT Outliner::GetScriptType( const ESelection& rSelection ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetScriptType( rSelection );
+/*N*/ }
+
+/*N*/ LanguageType Outliner::GetLanguage( USHORT nPara, USHORT nPos ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetLanguage( nPara, nPos );
+/*N*/ }
+
+
+
+
+
+/*N*/ BOOL Outliner::IsForceAutoColor() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->IsForceAutoColor();
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/svx_outliner.cxx b/binfilter/bf_svx/source/outliner/svx_outliner.cxx
new file mode 100644
index 000000000000..ea91b0a6ff8f
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_outliner.cxx
@@ -0,0 +1,1257 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#include <bf_svtools/style.hxx>
+#include <vcl/wrkwin.hxx>
+
+#define _OUTLINER_CXX
+#include <paralist.hxx>
+#include <outlobj.hxx>
+#include <outleeng.hxx>
+#include <editstat.hxx>
+#include <scripttypeitem.hxx>
+
+#include <vcl/metric.hxx>
+
+#include <numitem.hxx>
+
+#include <bf_goodies/graphicobject.hxx>
+
+#include <brshitem.hxx>
+
+// #101498# calculate if it's RTL or not
+#include <unicode/ubidi.h>
+
+#include "lrspitem.hxx"
+
+#include <bf_svtools/undo.hxx>
+
+namespace binfilter {
+
+/*N*/ #define DEFAULT_SCALE 75
+
+/*N*/ static const USHORT nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen
+/*N*/ static const USHORT nDefBulletIndent = 800;
+/*N*/ static const USHORT nDefBulletWidth = 700;
+/*N*/ static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
+/*N*/ static const USHORT pDefBulletWidths[nDefStyles] = { 1000, 850, 700 };
+
+/*N*/ USHORT lcl_ImplGetDefBulletWidth( USHORT nDepth )
+/*N*/ {
+/*N*/ return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth;
+/*N*/ }
+
+/*N*/ USHORT lcl_ImplGetDefBulletIndent( USHORT nDepth )
+/*N*/ {
+/*N*/ USHORT nI = 0;
+/*N*/ for ( USHORT n = 0; n <= nDepth; n++ )
+/*N*/ nI += ( n < nDefStyles ) ? pDefBulletIndents[n] : nDefBulletIndent;
+/*N*/ return nI;
+/*N*/ }
+
+/*N*/ SvxLRSpaceItem lcl_ImplGetDefLRSpaceItem( USHORT nDepth, MapUnit eMapUnit )
+/*N*/ {
+/*N*/ SvxLRSpaceItem aLRSpace( EE_PARA_OUTLLRSPACE );
+/*N*/
+/*N*/ long nWidth = OutputDevice::LogicToLogic( (long) lcl_ImplGetDefBulletWidth( nDepth ), MAP_100TH_MM, eMapUnit );
+/*N*/ long nIndent = OutputDevice::LogicToLogic( (long) lcl_ImplGetDefBulletIndent( nDepth ), MAP_100TH_MM, eMapUnit );
+/*N*/ aLRSpace.SetTxtLeft( (USHORT) nIndent );
+/*N*/ aLRSpace.SetTxtFirstLineOfst( - (short)nWidth );
+/*N*/
+/*N*/ return aLRSpace;
+/*N*/ }
+
+ // ----------------------------------------------------------------------
+// Outliner
+// ----------------------------------------------------------------------
+/*N*/ DBG_NAME(Outliner)
+
+/*N*/ void Outliner::ImplCheckDepth( USHORT& rnDepth ) const
+/*N*/ {
+/*N*/ if( rnDepth < nMinDepth )
+/*N*/ rnDepth = nMinDepth;
+/*N*/ else if( rnDepth > nMaxDepth )
+/*N*/ rnDepth = nMaxDepth;
+/*N*/ }
+
+/*N*/ Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, USHORT nDepth)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+
+/*N*/ void Outliner::ParagraphInserted( USHORT nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ if ( bBlockInsCallback )
+/*N*/ return;
+/*N*/
+/*N*/ if( bPasting || pEditEngine->IsInUndo() )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 Paragraph* pPara = new Paragraph( 0xffff );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ USHORT nDepth = 0;
+/*N*/ if ( nPara )
+/*N*/ nDepth = pParaList->GetParagraph( nPara-1 )->GetDepth();
+/*N*/
+/*N*/ Paragraph* pPara = new Paragraph( nDepth );
+/*N*/ pParaList->Insert( pPara, nPara );
+/*N*/
+/*N*/ if( !pEditEngine->IsInUndo() )
+/*N*/ {
+/*N*/ ImplCalcBulletText( nPara, TRUE, FALSE );
+/*N*/ pHdlParagraph = pPara;
+/*N*/ ParagraphInsertedHdl();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::ParagraphDeleted( USHORT nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ if ( bBlockInsCallback || ( nPara == EE_PARA_ALL ) )
+/*N*/ return;
+/*N*/
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ USHORT nDepth = pPara->GetDepth();
+/*N*/
+/*N*/ if( !pEditEngine->IsInUndo() )
+/*N*/ {
+/*N*/ pHdlParagraph = pPara;
+/*N*/ ParagraphRemovingHdl();
+/*N*/ }
+/*N*/
+/*N*/ pParaList->Remove( nPara );
+/*N*/ delete pPara;
+/*N*/
+/*N*/ if( !pEditEngine->IsInUndo() && !bPasting )
+/*N*/ {
+/*N*/ pPara = pParaList->GetParagraph( nPara );
+/*N*/ if ( pPara && ( pPara->GetDepth() > nDepth ) )
+/*N*/ {
+/*?*/ ImplCalcBulletText( nPara, TRUE, FALSE );
+/*?*/ // naechsten auf gleicher Ebene suchen...
+/*?*/ while ( pPara && pPara->GetDepth() > nDepth )
+/*?*/ pPara = pParaList->GetParagraph( ++nPara );
+/*N*/ }
+/*N*/
+/*N*/ if ( pPara && ( pPara->GetDepth() == nDepth ) )
+/*?*/ ImplCalcBulletText( nPara, TRUE, FALSE );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::Init( USHORT nMode )
+/*N*/ {
+/*N*/ nOutlinerMode = nMode;
+/*N*/
+/*N*/ Clear();
+/*N*/
+/*N*/ ULONG nCtrl = pEditEngine->GetControlWord();
+/*N*/ nCtrl &= ~(EE_CNTRL_OUTLINER|EE_CNTRL_OUTLINER2);
+/*N*/
+/*N*/ switch ( ImplGetOutlinerMode() )
+/*N*/ {
+/*N*/ case OUTLINERMODE_TEXTOBJECT:
+/*N*/ {
+/*N*/ SetMinDepth( 0 );
+/*N*/ SetMaxDepth( 9 );
+/*N*/ }
+/*N*/ break;
+/*N*/ case OUTLINERMODE_TITLEOBJECT:
+/*N*/ {
+/*N*/ SetMinDepth( 0 );
+/*N*/ SetMaxDepth( 9 );
+/*N*/ }
+/*N*/ break;
+/*N*/ case OUTLINERMODE_OUTLINEOBJECT:
+/*N*/ {
+/*N*/ SetMinDepth( 1 );
+/*N*/ SetMaxDepth( 9 );
+/*N*/ nCtrl |= EE_CNTRL_OUTLINER2;
+/*N*/ }
+/*N*/ break;
+/*N*/ case OUTLINERMODE_OUTLINEVIEW:
+/*N*/ {
+/*?*/ SetMinDepth( 0 );
+/*?*/ SetMaxDepth( 9 );
+/*?*/ nCtrl |= EE_CNTRL_OUTLINER;
+/*N*/ }
+/*N*/ break;
+/*N*/ default: DBG_ERROR( "Outliner::Init - Invalid Mode!" );
+/*N*/ }
+/*N*/
+/*N*/ pEditEngine->SetControlWord( nCtrl );
+/*N*/
+/*N*/ ImplInitDepth( 0, GetMinDepth(), FALSE );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ GetUndoManager().Clear();
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void Outliner::SetMinDepth( USHORT nDepth, BOOL bCheckParagraphs )
+/*N*/ {
+/*N*/ if( nMinDepth != nDepth )
+/*N*/ {
+/*N*/ nMinDepth = nDepth;
+/*N*/
+/*N*/ if( bCheckParagraphs && nMinDepth )
+/*N*/ {
+/*?*/ // 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 );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::SetMaxDepth( USHORT nDepth, BOOL bCheckParagraphs )
+/*N*/ {
+/*N*/ if( nMaxDepth != nDepth )
+/*N*/ {
+/*?*/ nMaxDepth = Min( nDepth, (USHORT)(SVX_MAX_NUM-1) );
+/*?*/
+/*?*/ 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 );
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ USHORT Outliner::GetDepth( USHORT nPara ) const
+/*N*/ {
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ DBG_ASSERT( pPara, "Outliner::GetDepth - Paragraph not found!" );
+/*N*/ return pPara ? pPara->GetDepth() : 0;
+/*N*/ }
+
+/*N*/ void Outliner::SetDepth( Paragraph* pPara, USHORT nNewDepth )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ ImplCheckDepth( nNewDepth );
+/*N*/
+/*N*/ if ( nNewDepth != pPara->GetDepth() )
+/*N*/ {
+/*N*/ nDepthChangedHdlPrevDepth = pPara->GetDepth();
+/*N*/ pHdlParagraph = pPara;
+/*N*/
+/*N*/ ImplInitDepth( (USHORT) GetAbsPos( pPara ), nNewDepth, TRUE );
+/*N*/
+/*N*/ DepthChangedHdl();
+/*N*/ }
+/*N*/ }
+
+/*N*/ OutlinerParaObject* Outliner::CreateParaObject( USHORT nStartPara, USHORT nCount ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ if ( ( nStartPara + nCount ) > pParaList->GetParagraphCount() )
+/*N*/ nCount = pParaList->GetParagraphCount() - nStartPara;
+/*N*/
+/*N*/ if( !nCount )
+/*N*/ return NULL;
+/*N*/
+/*N*/ OutlinerParaObject* pPObj = new OutlinerParaObject( nCount );
+/*N*/ pPObj->pText = pEditEngine->CreateTextObject( nStartPara, nCount );
+/*N*/ pPObj->SetOutlinerMode( GetMode() );
+/*N*/ pPObj->bIsEditDoc = ( ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) ? TRUE : FALSE;
+/*N*/
+/*N*/ USHORT nLastPara = nStartPara + nCount - 1;
+/*N*/ for ( USHORT nPara = nStartPara; nPara <= nLastPara; nPara++ )
+/*N*/ pPObj->pDepthArr[ nPara-nStartPara] = GetDepth( nPara );
+/*N*/
+/*N*/ return pPObj;
+/*N*/ }
+
+/*N*/ void Outliner::SetText( const XubString& rText, Paragraph* pPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ DBG_ASSERT(pPara,"SetText:No Para");
+/*N*/
+/*N*/ BOOL bUpdate = pEditEngine->GetUpdateMode();
+/*N*/ pEditEngine->SetUpdateMode( FALSE );
+/*N*/ ImplBlockInsertionCallbacks( TRUE );
+/*N*/
+/*N*/ USHORT nPara = (USHORT)pParaList->GetAbsPos( pPara );
+/*N*/
+/*N*/ if( !rText.Len() )
+/*N*/ {
+/*N*/ pEditEngine->SetText( nPara, rText );
+/*N*/ ImplInitDepth( nPara, pPara->GetDepth(), FALSE );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ XubString aText( rText );
+/*N*/ aText.ConvertLineEnd( LINEEND_LF );
+/*N*/
+/*N*/ if( aText.GetChar( aText.Len()-1 ) == '\x0A' )
+/*?*/ aText.Erase( aText.Len()-1, 1 ); // letzten Umbruch loeschen
+/*N*/
+/*N*/ USHORT nCount = aText.GetTokenCount( '\x0A' );
+/*N*/ USHORT nPos = 0;
+/*N*/ USHORT nInsPos = nPara+1;
+/*N*/ while( nCount > nPos )
+/*N*/ {
+/*N*/ XubString aStr = aText.GetToken( nPos, '\x0A' );
+/*N*/
+/*N*/ USHORT nCurDepth;
+/*N*/ if( nPos )
+/*N*/ {
+/*N*/ pPara = new Paragraph( 0 );
+/*N*/ nCurDepth = 0;
+/*N*/ }
+/*N*/ else
+/*N*/ nCurDepth = pPara->GetDepth();
+/*N*/
+/*N*/ // Im Outliner-Modus die Tabulatoren filtern und die
+/*N*/ // Einrueckung ueber ein LRSpaceItem einstellen
+/*N*/ // Im EditEngine-Modus ueber Maltes Tabulatoren einruecken
+/*N*/ if( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ||
+/*N*/ ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) )
+/*N*/ {
+/*N*/ // Tabs raus
+/*N*/ USHORT nTabs = 0;
+/*N*/ while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) )
+/*N*/ nTabs++;
+/*N*/ if ( nTabs )
+/*N*/ aStr.Erase( 0, nTabs );
+/*N*/
+/*N*/ // Tiefe beibehalten ? (siehe Outliner::Insert)
+/*N*/ if( !(pPara->nFlags & PARAFLAG_HOLDDEPTH) )
+/*N*/ {
+/*N*/ nCurDepth = nTabs;
+/*N*/ ImplCheckDepth( nCurDepth );
+/*N*/ pPara->SetDepth( nCurDepth );
+/*N*/ pPara->nFlags &= (~PARAFLAG_HOLDDEPTH);
+/*N*/ }
+/*N*/ }
+/*N*/ if( nPos ) // nicht mit dem ersten Absatz
+/*N*/ {
+/*N*/ pParaList->Insert( pPara, nInsPos );
+/*N*/ pEditEngine->InsertParagraph( nInsPos, aStr );
+/*N*/ pHdlParagraph = pPara;
+/*N*/ ParagraphInsertedHdl();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nInsPos--;
+/*N*/ pEditEngine->SetText( nInsPos, aStr );
+/*N*/ }
+/*N*/ ImplInitDepth( nInsPos, nCurDepth, FALSE );
+/*N*/ nInsPos++;
+/*N*/ nPos++;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"SetText failed!");
+/*N*/ bFirstParaIsEmpty = FALSE;
+/*N*/ ImplBlockInsertionCallbacks( FALSE );
+/*N*/ pEditEngine->SetUpdateMode( bUpdate );
+/*N*/ }
+
+// pView == 0 -> Tabulatoren nicht beachten
+
+
+/*N*/ void Outliner::SetText( const OutlinerParaObject& rPObj )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ BOOL bUpdate = pEditEngine->GetUpdateMode();
+/*N*/ pEditEngine->SetUpdateMode( FALSE );
+/*N*/
+/*N*/ BOOL bUndo = pEditEngine->IsUndoEnabled();
+/*N*/ EnableUndo( FALSE );
+/*N*/
+/*N*/ Init( rPObj.GetOutlinerMode() );
+/*N*/
+/*N*/ ImplBlockInsertionCallbacks( TRUE );
+/*N*/ pEditEngine->SetText( *(rPObj.pText) );
+/*N*/ bFirstParaIsEmpty = FALSE;
+/*N*/
+/*N*/ pParaList->Clear( TRUE );
+/*N*/ for( USHORT nCurPara = 0; nCurPara < rPObj.nCount; nCurPara++ )
+/*N*/ {
+/*N*/ USHORT nDepth = rPObj.pDepthArr[ nCurPara ];
+/*N*/ ImplCheckDepth( nDepth );
+/*N*/ Paragraph* pPara = new Paragraph( nDepth );
+/*N*/ pParaList->Insert( pPara, LIST_APPEND );
+/*N*/ ImplCheckNumBulletItem( nCurPara );
+/*N*/ }
+/*N*/
+/*N*/ ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()-1) );
+/*N*/
+/*N*/ EnableUndo( bUndo );
+/*N*/ ImplBlockInsertionCallbacks( FALSE );
+/*N*/ pEditEngine->SetUpdateMode( bUpdate );
+/*N*/
+/*N*/ DBG_ASSERT( pParaList->GetParagraphCount()==rPObj.Count(),"SetText failed");
+/*N*/ DBG_ASSERT( pEditEngine->GetParagraphCount()==rPObj.Count(),"SetText failed");
+/*N*/ }
+
+/*N*/ XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ if ( !aCalcFieldValueHdl.IsSet() )
+/*N*/ return String( ' ' );
+/*N*/
+/*N*/ EditFieldInfo aFldInfo( this, rField, nPara, nPos );
+/*N*/ // Die FldColor ist mit COL_LIGHTGRAY voreingestellt.
+/*N*/ if ( rpFldColor )
+/*N*/ aFldInfo.SetFldColor( *rpFldColor );
+/*N*/
+/*N*/ aCalcFieldValueHdl.Call( &aFldInfo );
+/*N*/ if ( aFldInfo.GetTxtColor() )
+/*N*/ {
+/*N*/ delete rpTxtColor;
+/*N*/ rpTxtColor = new Color( *aFldInfo.GetTxtColor() );
+/*N*/ }
+/*N*/
+/*N*/ delete rpFldColor;
+/*N*/ rpFldColor = aFldInfo.GetFldColor() ? new Color( *aFldInfo.GetFldColor() ) : 0;
+/*N*/
+/*N*/ return aFldInfo.GetRepresentation();
+/*N*/ }
+
+/*N*/ void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle );
+/*N*/
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ pPara->nFlags |= PARAFLAG_SETBULLETTEXT;
+/*N*/
+/*N*/ ImplCheckNumBulletItem( (USHORT) nPara );
+/*N*/ }
+
+
+/*N*/ void Outliner::ImplCheckNumBulletItem( USHORT nPara )
+/*N*/ {
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/
+/*N*/ // Wenn es ein SvxNumBulletItem gibt, ueberschreibt dieses die
+/*N*/ // Einstellungen von BulletItem und LRSpaceItem.
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ if ( pFmt )
+/*N*/ {
+/*N*/ SvxLRSpaceItem aNewLRSpace( EE_PARA_LRSPACE );
+/*N*/ aNewLRSpace.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
+/*N*/ aNewLRSpace.SetTxtLeft( pFmt->GetAbsLSpace() );
+/*N*/ if ( pEditEngine->HasParaAttrib( nPara, EE_PARA_LRSPACE ) )
+/*N*/ {
+/*N*/ const SvxLRSpaceItem& rOldLRSpace = (const SvxLRSpaceItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_LRSPACE );
+/*N*/ aNewLRSpace.SetRight( rOldLRSpace.GetRight() );
+/*N*/ }
+/*N*/ SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
+/*N*/ aAttrs.Put( aNewLRSpace);
+/*N*/ pPara->aBulSize.Width() = -1;
+/*N*/ pEditEngine->SetParaAttribs( nPara, aAttrs );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ DBG_ASSERT( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) || ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ), "SetLevelDependendStyleSheet: Wrong Mode!" );
+/*N*/
+/*N*/ SfxStyleSheet* pStyle = pLevelStyle;
+/*N*/ if ( !pStyle )
+/*N*/ pStyle = GetStyleSheet( nPara );
+/*N*/
+/*N*/ if ( pStyle )
+/*N*/ {
+/*N*/ String aNewStyleSheetName( pStyle->GetName() );
+/*N*/ aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
+/*N*/ aNewStyleSheetName += String::CreateFromInt32( GetDepth( nPara ) );
+/*N*/ SfxStyleSheet* pNewStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( aNewStyleSheetName, pStyle->GetFamily() );
+/*N*/ DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
+/*N*/ if ( pNewStyle && ( pNewStyle != GetStyleSheet( nPara ) ) )
+/*N*/ {
+/*N*/ SfxItemSet aOldAttrs( GetParaAttribs( nPara ) );
+/*N*/ SetStyleSheet( nPara, pNewStyle );
+/*N*/ if ( aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ SfxItemSet aAttrs( GetParaAttribs( nPara ) );
+/*N*/ aAttrs.Put( aOldAttrs.Get( EE_PARA_NUMBULLET ) );
+/*N*/ SetParaAttribs( nPara, aAttrs );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::ImplInitDepth( USHORT nPara, USHORT nDepth, BOOL bCreateUndo, BOOL bUndoAction )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ DBG_ASSERT( ( nDepth >= nMinDepth ) && ( nDepth <= nMaxDepth ), "ImplInitDepth - Depth is invalid!" );
+/*N*/
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ USHORT nOldDepth = pPara->GetDepth();
+/*N*/ pPara->SetDepth( nDepth );
+/*N*/
+/*N*/ // Bei IsInUndo brauchen Attribute und Style nicht eingestellt werden,
+/*N*/ // dort werden die alten Werte durch die EditEngine restauriert.
+/*N*/
+/*N*/ if( !IsInUndo() )
+/*N*/ {
+/*N*/ BOOL bUpdate = pEditEngine->GetUpdateMode();
+/*N*/ pEditEngine->SetUpdateMode( FALSE );
+/*N*/
+/*N*/ BOOL bUndo = bCreateUndo && IsUndoEnabled();
+/*N*/ if ( bUndo && bUndoAction )
+/*?*/ UndoActionStart( OLUNDO_DEPTH );
+/*N*/
+/*N*/ SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
+/*N*/ aAttrs.Put( SfxUInt16Item( EE_PARA_OUTLLEVEL, nDepth ) );
+/*N*/ // MT: OUTLLRSPACE immer default, sollte mal irgendwie eingestellt werden...
+/*N*/ aAttrs.Put( lcl_ImplGetDefLRSpaceItem( nDepth, GetRefMapMode().GetMapUnit() ) );
+/*N*/ pEditEngine->SetParaAttribs( nPara, aAttrs );
+/*N*/ ImplCheckNumBulletItem( nPara );
+/*N*/ ImplCalcBulletText( nPara, FALSE, FALSE );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if ( bUndo )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 InsertUndo( new OutlinerUndoChangeDepth( this, nPara, nOldDepth, nDepth ) );
+/*N*/ }
+/*N*/ #endif
+/*N*/
+/*N*/ pEditEngine->SetUpdateMode( bUpdate );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::SetParaAttribs( ULONG nPara, const SfxItemSet& rSet, bool bApiCall /* = false */ )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ if( pPara )
+/*N*/ {
+/*N*/ if ( !pEditEngine->IsInUndo() && pEditEngine->IsUndoEnabled() )
+/*N*/ UndoActionStart( OLUNDO_ATTR );
+/*N*/
+/*N*/ BOOL bLRSpaceChanged =
+/*N*/ ( rSet.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON ) &&
+/*N*/ ( !(rSet.Get( EE_PARA_LRSPACE ) == pEditEngine->GetParaAttrib( (USHORT)nPara, EE_PARA_LRSPACE ) ) );
+/*N*/
+/*N*/ pEditEngine->SetParaAttribs( (USHORT)nPara, rSet );
+/*N*/
+/*N*/ if( bLRSpaceChanged )
+/*N*/ {
+/*N*/ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&)pEditEngine->GetParaAttrib( (USHORT)nPara, EE_PARA_NUMBULLET );
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ const USHORT nDepth = pPara->GetDepth();
+/*N*/ if ( rNumBullet.GetNumRule()->GetLevelCount() > nDepth )
+/*N*/ {
+/*N*/ SvxNumBulletItem* pNewNumBullet = (SvxNumBulletItem*) rNumBullet.Clone();
+/*N*/ EditEngine::ImportBulletItem( *pNewNumBullet, nDepth, NULL, (SvxLRSpaceItem*)&rSet.Get( EE_PARA_LRSPACE ) );
+/*N*/ SfxItemSet aAttribs( rSet );
+/*N*/ aAttribs.Put( *pNewNumBullet );
+/*N*/ pEditEngine->SetParaAttribs( (USHORT)nPara, aAttribs );
+/*N*/ delete pNewNumBullet;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ImplCheckNumBulletItem( (USHORT)nPara );
+/*N*/ ImplCheckParagraphs( (USHORT)nPara, (USHORT)nPara );
+/*N*/
+/*N*/ if ( !pEditEngine->IsInUndo() && pEditEngine->IsUndoEnabled() )
+/*N*/ UndoActionEnd( OLUNDO_ATTR );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
+/*N*/ {
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" );
+/*N*/
+/*N*/ Font aStdFont; //#107508#
+/*N*/ if ( !pEditEngine->IsFlatMode() )
+/*N*/ {
+/*N*/ ESelection aSel( nPara, 0, nPara, 0 );
+/*N*/ aStdFont = EditEngine::CreateFontFromItemSet( pEditEngine->GetAttribs( aSel ), GetScriptType( aSel ) );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP");//STRIP001 aStdFont = pEditEngine->GetStandardFont( nPara );
+/*N*/ }
+/*N*/
+/*N*/ Font aBulletFont;
+/*N*/ if ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL )
+/*N*/ {
+/*N*/ aBulletFont = *pFmt->GetBulletFont();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aBulletFont = aStdFont;
+/*?*/ aBulletFont.SetUnderline( UNDERLINE_NONE );
+/*?*/ aBulletFont.SetStrikeout( STRIKEOUT_NONE );
+/*?*/ aBulletFont.SetEmphasisMark( EMPHASISMARK_NONE );
+/*?*/ aBulletFont.SetRelief( RELIEF_NONE );
+/*N*/ }
+/*N*/
+/*N*/ // #107508# Use original scale...
+/*N*/ USHORT nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize();
+/*N*/ ULONG nScaledLineHeight = aStdFont.GetSize().Height();
+/*N*/ nScaledLineHeight *= nScale*10;
+/*N*/ nScaledLineHeight /= 1000;
+/*N*/
+/*N*/ aBulletFont.SetAlign( ALIGN_BOTTOM );
+/*N*/ aBulletFont.SetSize( Size( 0, nScaledLineHeight ) );
+/*N*/ BOOL bVertical = IsVertical();
+/*N*/ aBulletFont.SetVertical( bVertical );
+/*N*/ aBulletFont.SetOrientation( bVertical ? 2700 : 0 );
+/*N*/
+/*N*/ Color aColor( COL_AUTO );
+/*N*/ if( !pEditEngine->IsFlatMode() && !( pEditEngine->GetControlWord() & EE_CNTRL_NOCOLORS ) )
+/*N*/ {
+/*N*/ aColor = pFmt->GetBulletColor();
+/*N*/ }
+/*N*/
+/*N*/ if ( ( aColor == COL_AUTO ) || ( IsForceAutoColor() ) )
+/*N*/ aColor = pEditEngine->GetAutoColor();
+/*N*/
+/*N*/ aBulletFont.SetColor( aColor );
+/*N*/ return aBulletFont;
+/*N*/ }
+
+/*N*/ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
+/*N*/ const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ if ( ImplHasBullet( nPara ) )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 BOOL bVertical = IsVertical();
+/*N*/ }
+/*N*/ }
+
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ SfxUndoManager& Outliner::GetUndoManager()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetUndoManager();
+/*N*/ }
+/*N*/ #endif
+
+
+/*N*/ Outliner::Outliner( SfxItemPool* pPool, USHORT nMode )
+/*N*/ {
+/*N*/ DBG_CTOR( Outliner, 0 );
+/*N*/
+/*N*/ bStrippingPortions = FALSE;
+/*N*/ bPasting = FALSE;
+/*N*/
+/*N*/ nFirstPage = 1;
+/*N*/ bBlockInsCallback = FALSE;
+/*N*/
+/*N*/ nMinDepth = 0;
+/*N*/ nMaxDepth = 9;
+/*N*/
+/*N*/ pOverwriteLevel0Bullet = NULL;
+/*N*/
+/*N*/ pParaList = new ParagraphList;
+/*N*/ pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) );
+/*N*/ Paragraph* pPara = new Paragraph( 0 );
+/*N*/ pParaList->Insert( pPara, LIST_APPEND );
+/*N*/ bFirstParaIsEmpty = TRUE;
+/*N*/
+/*N*/ pEditEngine = new OutlinerEditEng( this, pPool );
+/*N*/ pEditEngine->SetBeginMovingParagraphsHdl( LINK( this, Outliner, BeginMovingParagraphsHdl ) );
+/*N*/ pEditEngine->SetEndMovingParagraphsHdl( LINK( this, Outliner, EndMovingParagraphsHdl ) );
+/*N*/ pEditEngine->SetBeginPasteOrDropHdl( LINK( this, Outliner, BeginPasteOrDropHdl ) );
+/*N*/ pEditEngine->SetEndPasteOrDropHdl( LINK( this, Outliner, EndPasteOrDropHdl ) );
+/*N*/
+/*N*/ Init( nMode );
+/*N*/ }
+
+/*N*/ Outliner::~Outliner()
+/*N*/ {
+/*N*/ DBG_DTOR(Outliner,0);
+/*N*/
+/*N*/ pParaList->Clear( TRUE );
+/*N*/ delete pParaList;
+/*N*/ delete pOverwriteLevel0Bullet;
+/*N*/ delete pEditEngine;
+/*N*/ }
+
+/*N*/ void Outliner::ParagraphInsertedHdl()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ aParaInsertedHdl.Call( this );
+/*N*/ }
+
+
+/*N*/ void Outliner::ParagraphRemovingHdl()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ aParaRemovingHdl.Call( this );
+/*N*/ }
+
+
+/*N*/ void Outliner::DepthChangedHdl()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ aDepthChangedHdl.Call( this );
+/*N*/ }
+
+
+/*N*/ ULONG Outliner::GetAbsPos( Paragraph* pPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ DBG_ASSERT(pPara,"GetAbsPos:No Para");
+/*N*/ return pParaList->GetAbsPos( pPara );
+/*N*/ }
+
+/*N*/ void Outliner::ParagraphHeightChanged( USHORT )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ // MT: Kann wohl weg...
+/*N*/ }
+
+/*N*/ ULONG Outliner::GetParagraphCount() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pParaList->GetParagraphCount();
+/*N*/ }
+
+/*N*/ Paragraph* Outliner::GetParagraph( ULONG nAbsPos ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pParaList->GetParagraph( nAbsPos );
+/*N*/ }
+
+
+/*N*/ BOOL Outliner::ImplHasBullet( USHORT nPara ) const
+/*N*/ {
+/*N*/ const SfxUInt16Item& rBulletState = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
+/*N*/ BOOL bBullet = rBulletState.GetValue() ? TRUE : FALSE;
+/*N*/ if ( !pParaList->GetParagraph( nPara )->GetDepth() && ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) )
+/*N*/ {
+/*N*/ // Im Gliederungsmodus immer ein Bullet auf Ebene 0!
+/*N*/ bBullet = TRUE;
+/*N*/ }
+/*N*/ else if ( bBullet )
+/*N*/ {
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ if ( !pFmt || ( pFmt->GetNumberingType() == SVX_NUM_NUMBER_NONE ) )
+/*N*/ bBullet = FALSE;
+/*N*/ }
+/*N*/ return bBullet;
+/*N*/ }
+
+/*N*/ const SvxNumberFormat* Outliner::ImplGetBullet( USHORT nPara ) const
+/*N*/ {
+/*N*/ const SvxNumberFormat* pFmt = NULL;
+/*N*/
+/*N*/ USHORT nDepth = pParaList->GetParagraph( nPara )->GetDepth();
+/*N*/
+/*N*/ if ( !nDepth && pOverwriteLevel0Bullet )
+/*N*/ {
+/*N*/ pFmt = pOverwriteLevel0Bullet;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+/*N*/ if ( rNumBullet.GetNumRule()->GetLevelCount() > nDepth )
+/*N*/ pFmt = rNumBullet.GetNumRule()->Get( nDepth );
+/*N*/ }
+/*N*/
+/*N*/ return pFmt;
+/*N*/ }
+
+/*N*/ Size Outliner::ImplGetBulletSize( USHORT nPara )
+/*N*/ {
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/
+/*N*/ if( pPara->aBulSize.Width() == -1 )
+/*N*/ {
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ DBG_ASSERT( pFmt, "ImplGetBulletSize - no Bullet!" );
+/*N*/
+/*N*/ if ( pFmt->GetNumberingType() == SVX_NUM_NUMBER_NONE )
+/*N*/ {
+/*?*/ pPara->aBulSize = Size( 0, 0 );
+/*N*/ }
+/*N*/ else if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
+/*N*/ {
+/*N*/ String aBulletText = ImplGetBulletText( nPara );
+/*N*/ OutputDevice* pRefDev = pEditEngine->GetRefDevice();
+/*N*/ Font aBulletFont( ImpCalcBulletFont( nPara ) );
+/*N*/ Font aRefFont( pRefDev->GetFont());
+/*N*/ pRefDev->SetFont( aBulletFont );
+/*N*/ pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText );
+/*N*/ pPara->aBulSize.Height() = pRefDev->GetTextHeight();
+/*N*/ pRefDev->SetFont( aRefFont );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ pPara->aBulSize = OutputDevice::LogicToLogic( pFmt->GetGraphicSize(), MAP_100TH_MM, pEditEngine->GetRefDevice()->GetMapMode() );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return pPara->aBulSize;
+/*N*/ }
+
+/*N*/ void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ DBG_CHKTHIS( Outliner, 0 );
+/*N*/
+/*N*/ // Sicherstellen dass es ein Bullet und ein LR-Space gibt.
+/*N*/
+/*N*/ for ( USHORT n = nStart; n <= nEnd; n++ )
+/*N*/ {
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( n );
+/*N*/ BOOL bHasLRSpace = pEditEngine->HasParaAttrib( n, EE_PARA_OUTLLRSPACE );
+/*N*/ BOOL bHasLevel = pEditEngine->HasParaAttrib( n, EE_PARA_OUTLLEVEL );
+/*N*/ if ( !bHasLRSpace || !bHasLevel )
+/*N*/ {
+/*N*/ SfxItemSet aAttrs( pEditEngine->GetParaAttribs( n ) );
+/*N*/
+/*N*/ // MT 05/00: Default-Item muss erstmal richtig sein => Dann koennen diese ganzen komischen Defaults weg!!!
+/*N*/ // const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( n, EE_PARA_NUMBULLET );
+/*N*/ // const SvxNumberFormat* pFmt = NULL;
+/*N*/ // if ( ( rNumBullet.GetNumRule()->GetLevelCount() > pPara->GetDepth() ) &&
+/*N*/ // ( ( pFtm = rNumBullet.GetNumRule()->Get( pPara->GetDepth() ) != NULL ) )
+/*N*/ // {
+/*N*/ // }
+/*N*/ if ( !bHasLRSpace )
+/*N*/ {
+/*N*/ SvxLRSpaceItem aLRSpaceItem = lcl_ImplGetDefLRSpaceItem( pPara->GetDepth(), GetRefMapMode().GetMapUnit() );
+/*N*/ aAttrs.Put( aLRSpaceItem );
+/*N*/ }
+/*N*/ if ( !bHasLevel )
+/*N*/ {
+/*N*/ SfxUInt16Item aLevelItem( EE_PARA_OUTLLEVEL, pPara->GetDepth() );
+/*N*/ aAttrs.Put( aLevelItem );
+/*N*/ }
+/*N*/ pEditEngine->SetParaAttribs( n, aAttrs );
+/*N*/ }
+/*N*/
+/*N*/ pPara->Invalidate();
+/*N*/ ImplCalcBulletText( n, FALSE, FALSE );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::SetRefDevice( OutputDevice* pRefDev )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ pEditEngine->SetRefDevice( pRefDev );
+/*N*/ for ( USHORT n = (USHORT) pParaList->GetParagraphCount(); n; )
+/*N*/ {
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( --n );
+/*N*/ pPara->Invalidate();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::ParaAttribsChanged( USHORT nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ // Der Outliner hat kein eigenes Undo, wenn Absaetz getrennt/verschmolzen werden.
+/*N*/ // Beim ParagraphInserted ist das Attribut EE_PARA_OUTLLEVEL
+/*N*/ // ggf. noch nicht eingestellt, dies wird aber benoetigt um die Tiefe
+/*N*/ // des Absatzes zu bestimmen.
+/*N*/
+/*N*/ if( pEditEngine->IsInUndo() )
+/*N*/ {
+/*?*/ 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 );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos )
+/*N*/ {
+/*N*/ // Bullet-Bereich innerhalb des Absatzes...
+/*N*/ Rectangle aBulletArea;
+/*N*/
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ if ( pFmt )
+/*N*/ {
+/*N*/ Point aTopLeft;
+/*N*/ Size aBulletSize( ImplGetBulletSize( nPara ) );
+/*N*/
+/*N*/ BOOL bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0;
+/*N*/
+/*N*/ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
+/*N*/ aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst();
+/*N*/
+/*N*/
+/*N*/ long nBulletWidth = Max( (long) -rLR.GetTxtFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
+/*N*/ if ( nBulletWidth < aBulletSize.Width() ) // Bullet macht sich Platz
+/*N*/ nBulletWidth = aBulletSize.Width();
+/*N*/
+/*N*/ if ( bAdjust && !bOutlineMode )
+/*N*/ {{DBG_BF_ASSERT(0, "STRIP");}//STRIP001
+/*N*/ }
+/*N*/
+/*N*/ // Vertikal:
+/*N*/ ParagraphInfos aInfos = pEditEngine->GetParagraphInfos( nPara );
+/*N*/ if ( aInfos.bValid )
+/*N*/ {
+/*?*/ aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ // #91076# nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
+/*?*/ aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight
+/*?*/ + aInfos.nFirstLineTextHeight / 2
+/*?*/ - aBulletSize.Height() / 2;
+/*?*/ // ggf. lieber auf der Baseline ausgeben...
+/*?*/ if( ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) )
+/*?*/ {
+/*?*/ 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.nFirstLineMaxAscent;
+/*?*/ aTopLeft.Y() -= aMetric.GetAscent();
+/*?*/ pRefDev->SetFont( aOldFont );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Horizontal:
+/*N*/ if( pFmt->GetNumAdjust() == SVX_ADJUST_RIGHT )
+/*N*/ {
+/*?*/ aTopLeft.X() += nBulletWidth - aBulletSize.Width();
+/*N*/ }
+/*N*/ else if( pFmt->GetNumAdjust() == SVX_ADJUST_CENTER )
+/*N*/ {
+/*?*/ aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
+/*N*/ }
+/*N*/
+/*N*/ if ( aTopLeft.X() < 0 ) // dann draengeln
+/*?*/ aTopLeft.X() = 0;
+/*N*/
+/*N*/ aBulletArea = Rectangle( aTopLeft, aBulletSize );
+/*N*/ }
+/*N*/ if ( bReturnPaperPos )
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 Size aBulletSize( aBulletArea.GetSize() );
+/*N*/ }
+/*N*/ return aBulletArea;
+/*N*/ }
+
+
+
+/*N*/ EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
+/*N*/ {
+/*N*/ EBulletInfo aInfo;
+/*N*/
+/*N*/ aInfo.nParagraph = nPara;
+/*N*/ aInfo.bVisible = ImplHasBullet( nPara );
+/*N*/
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0;
+/*N*/
+/*N*/ if( pFmt )
+/*N*/ {
+/*N*/ if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
+/*N*/ {
+/*N*/ aInfo.aText = ImplGetBulletText( nPara );
+/*N*/
+/*N*/ if( pFmt->GetBulletFont() )
+/*N*/ aInfo.aFont = *pFmt->GetBulletFont();
+/*N*/ }
+/*N*/ else if ( pFmt->GetBrush()->GetGraphicObject() )
+/*N*/ {
+/*N*/ aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( aInfo.bVisible )
+/*N*/ {
+/*N*/ aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE );
+/*N*/ }
+/*N*/
+/*N*/ return aInfo;
+/*N*/ }
+
+/*N*/ XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ XubString aText;
+/*N*/ USHORT nStartPara = (USHORT) pParaList->GetAbsPos( pParagraph );
+/*N*/ for ( USHORT n = 0; n < nCount; n++ )
+/*N*/ {
+/*N*/ aText += pEditEngine->GetText( nStartPara + n );
+/*N*/ if ( (n+1) < (USHORT)nCount )
+/*N*/ aText += '\n';
+/*N*/ }
+/*N*/ return aText;
+/*N*/ }
+
+
+/*N*/ void Outliner::StripPortions()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ bStrippingPortions = TRUE;
+/*N*/ pEditEngine->StripPortions();
+/*N*/ bStrippingPortions = FALSE;
+/*N*/ }
+
+// #101498#
+/*N*/ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft)
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ // #101498#
+/*N*/ DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, nRightToLeft);
+/*N*/
+/*N*/ aDrawPortionHdl.Call( &aInfo );
+/*N*/ }
+
+
+
+/*N*/ SfxItemSet Outliner::GetParaAttribs( ULONG nPara )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/ return pEditEngine->GetParaAttribs( (USHORT)nPara );
+/*N*/ }
+
+/*N*/ IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ IMPL_LINK( Outliner, BeginMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ IMPL_LINK( Outliner, BeginPasteOrDropHdl, PasteOrDropInfos*, pInfos )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ IMPL_LINK( Outliner, EndPasteOrDropHdl, PasteOrDropInfos*, pInfos )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ void Outliner::ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ USHORT nRelPos = 0xFFFF;
+/*N*/
+/*N*/ while ( pPara )
+/*N*/ {
+/*N*/ XubString aBulletText;
+/*N*/ const SvxNumberFormat* pFmt = ImplGetBullet( nPara );
+/*N*/ if( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) )
+/*N*/ {
+/*N*/ aBulletText += pFmt->GetPrefix();
+/*N*/ if( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL )
+/*N*/ {
+/*N*/ aBulletText += pFmt->GetBulletChar();
+/*N*/ }
+/*N*/ else if( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE )
+/*N*/ {
+/*?*/ if ( nRelPos == 0xFFFF )
+/*NBFF*/ pParaList->GetParent( pPara, nRelPos );
+/*?*/ USHORT nNumber = nRelPos + pFmt->GetStart();
+/*?*/ aBulletText += pFmt->GetNumStr( nNumber );
+/*N*/ }
+/*N*/ aBulletText += pFmt->GetSuffix();
+/*N*/ }
+/*N*/
+/*N*/ if( aBulletText != pPara->GetText() )
+/*N*/ pPara->SetText( aBulletText );
+/*N*/
+/*N*/ pPara->nFlags &= (~PARAFLAG_SETBULLETTEXT);
+/*N*/
+/*N*/ if ( bRecalcLevel )
+/*N*/ {
+/*N*/ if ( nRelPos != 0xFFFF )
+/*N*/ nRelPos++;
+/*N*/
+/*N*/ USHORT nDepth = pPara->GetDepth();
+/*N*/ pPara = pParaList->GetParagraph( ++nPara );
+/*N*/ if ( !bRecalcChilds )
+/*N*/ {
+/*N*/ while ( pPara && ( pPara->GetDepth() > nDepth ) )
+/*?*/ pPara = pParaList->GetParagraph( ++nPara );
+/*N*/ }
+/*N*/
+/*N*/ if ( pPara && ( pPara->GetDepth() < nDepth ) )
+/*?*/ pPara = NULL;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pPara = NULL;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void Outliner::Clear()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(Outliner,0);
+/*N*/
+/*N*/ if( !bFirstParaIsEmpty )
+/*N*/ {
+/*N*/ ImplBlockInsertionCallbacks( TRUE );
+/*N*/ pEditEngine->Clear();
+/*N*/ pParaList->Clear( TRUE );
+/*N*/ pParaList->Insert( new Paragraph( nMinDepth ), LIST_APPEND );
+/*N*/ bFirstParaIsEmpty = TRUE;
+/*N*/ ImplBlockInsertionCallbacks( FALSE );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pParaList->GetParagraph( 0 )->SetDepth( nMinDepth );
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ String Outliner::ImplGetBulletText( USHORT nPara )
+/*N*/ {
+/*N*/ Paragraph* pPara = pParaList->GetParagraph( nPara );
+/*N*/ // MT: Optimierung mal wieder aktivieren...
+/*N*/ // if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
+/*N*/ ImplCalcBulletText( nPara, FALSE, FALSE );
+/*N*/ return pPara->GetText();
+/*N*/ }
+
+// this is needed for StarOffice Api
+/*N*/ void Outliner::SetLevelDependendStyleSheet( USHORT nPara )
+/*N*/ {
+/*N*/ SfxItemSet aOldAttrs( pEditEngine->GetParaAttribs( nPara ) );
+/*N*/ ImplSetLevelDependendStyleSheet( nPara );
+/*N*/ pEditEngine->SetParaAttribs( nPara, aOldAttrs );
+/*N*/ }
+
+/*N*/ SV_IMPL_PTRARR( NotifyList, EENotifyPtr );
+
+/*N*/ void Outliner::ImplBlockInsertionCallbacks( BOOL b )
+/*N*/ {
+/*N*/ if ( b )
+/*N*/ {
+/*N*/ bBlockInsCallback++;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ DBG_ASSERT( bBlockInsCallback, "ImplBlockInsertionCallbacks ?!" );
+/*N*/ bBlockInsCallback--;
+/*N*/ if ( !bBlockInsCallback )
+/*N*/ {
+/*N*/ // Call blocked notify events...
+/*N*/ while ( pEditEngine->aNotifyCache.Count() )
+/*N*/ {
+/*?*/ EENotify* pNotify = pEditEngine->aNotifyCache[0];
+/*?*/ // Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler...
+/*?*/ pEditEngine->aNotifyCache.Remove( 0 );
+/*?*/ pEditEngine->aOutlinerNotifyHdl.Call( pNotify );
+/*?*/ delete pNotify;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ sal_Bool DrawPortionInfo::IsRTL() const
+/*N*/ {
+/*N*/ if(0xFF == mnBiDiLevel)
+/*N*/ {
+/*?*/ // Use Bidi functions from icu 2.0 to calculate if this portion
+/*?*/ // is RTL or not.
+/*?*/ UErrorCode nError(U_ZERO_ERROR);
+/*?*/ UBiDi* pBidi = ubidi_openSized(rText.Len(), 0, &nError);
+/*?*/ nError = U_ZERO_ERROR;
+/*?*/
+/*?*/ // I do not have this info here. Is it necessary? I'll have to ask MT.
+/*?*/ const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
+/*?*/
+/*?*/ ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(rText.GetBuffer()), rText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW
+/*?*/ nError = U_ZERO_ERROR;
+/*?*/
+/*?*/ sal_Int32 nCount(ubidi_countRuns(pBidi, &nError));
+/*?*/
+/*?*/ int32_t nStart(0);
+/*?*/ int32_t nEnd;
+/*?*/ UBiDiLevel nCurrDir;
+/*?*/
+/*?*/ ubidi_getLogicalRun(pBidi, nStart, &nEnd, &nCurrDir);
+/*?*/
+/*?*/ ubidi_close(pBidi);
+/*?*/
+/*?*/ // remember on-demand calculated state
+/*?*/ ((DrawPortionInfo*)this)->mnBiDiLevel = nCurrDir;
+/*N*/ }
+/*N*/
+/*N*/ return (1 == (mnBiDiLevel % 2));
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/svx_outliner.src b/binfilter/bf_svx/source/outliner/svx_outliner.src
new file mode 100644
index 000000000000..efe4cdc3c76d
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_outliner.src
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include <outliner.hrc>
+
+
+String RID_OUTLUNDO_DEPTH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Einrücken : Einr³cken */
+ /* ### ACHTUNG: Neuer Text in Resource? Einrücken : Einr³cken */
+ Text [ de ] = "Einrücken" ;
+ Text [ en-US ] = "Indent" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Avançar";
+ Text[ ru ] = "ОтÑтуп";
+ Text[ el ] = "Εσοχή";
+ Text[ nl ] = "Inspringing";
+ Text[ fr ] = "Mettre en retrait";
+ Text[ es ] = "Sangría";
+ Text[ fi ] = "Sisennä";
+ Text[ ca ] = "Sagnat";
+ Text[ it ] = "Rientra";
+ Text[ sk ] = "Odsadenie";
+ Text[ da ] = "Indryk";
+ Text[ sv ] = "Dra in";
+ Text[ pl ] = "Wcięcie";
+ Text[ pt-BR ] = "Recuo";
+ Text[ th ] = "ระยะเยื้อง";
+ Text[ ja ] = "インデント";
+ Text[ ko ] = "들여쓰기";
+ Text[ zh-CN ] = "缩进";
+ Text[ zh-TW ] = "縮排";
+ Text[ tr ] = "Girinti";
+ Text[ hi-IN ] = "इनà¥à¤¡à¥‡à¤¨à¥à¤Ÿ";
+ Text[ ar ] = "إزاحة";
+ Text[ he ] = "‮כניסה‬";
+};
+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 [ de ] = "Unterabsätze zeigen" ;
+ Text [ en-US ] = "Show subpoints" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Mostrar subparágrafos";
+ Text[ ru ] = "Развернуть подабзацы";
+ Text[ el ] = "Εμφάνιση υποπαÏαγÏάφων";
+ Text[ nl ] = "Subalinea's weergeven";
+ Text[ fr ] = "Afficher les sous-paragraphes";
+ Text[ es ] = "Mostrar subpárrafos";
+ Text[ fi ] = "Näytä alipisteet";
+ Text[ ca ] = "Mostra els subpunts";
+ Text[ it ] = "Mostra i sottoparagrafi";
+ Text[ sk ] = "Zobraziť podbody";
+ Text[ da ] = "Vis underafsnit";
+ Text[ sv ] = "Visa understycken";
+ Text[ pl ] = "Pokaż podpunkty";
+ Text[ pt-BR ] = "Mostrar sub pontos";
+ Text[ th ] = "à¹à¸ªà¸”งจุดย่อย";
+ Text[ ja ] = "下ä½æ®µè½ã®è¡¨ç¤º";
+ Text[ ko ] = "하위 ë‹¨ë½ í‘œì‹œ";
+ Text[ zh-CN ] = "显示分段è½";
+ Text[ zh-TW ] = "顯示分段è½";
+ Text[ tr ] = "Alt bölümleri göster";
+ Text[ hi-IN ] = "अधीनबिनà¥à¤¦à¥à¤“ं को दिखाओ";
+ Text[ ar ] = "إظهار الÙقرات الÙرعية";
+ Text[ he ] = "‮הצגת תת נקודות‬";
+};
+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 [ de ] = "Unterabsätze verstecken" ;
+ Text [ en-US ] = "Collapse" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Ocultar subparágrafos";
+ Text[ ru ] = "Свернуть подабзацы";
+ Text[ el ] = "ΑπόκÏυψη υποπαÏαγÏάφων";
+ Text[ nl ] = "Subalinea's verbergen";
+ Text[ fr ] = "Masquer les sous-paragraphes";
+ Text[ es ] = "Ocultar subpárrafos";
+ Text[ fi ] = "Pienennä";
+ Text[ ca ] = "Redueix";
+ Text[ it ] = "Nascondi i sottoparagrafi";
+ Text[ sk ] = "SkryÅ¥ vÅ¡etky súÄasti";
+ Text[ da ] = "Skjul underafsnit";
+ Text[ sv ] = "Dölj understycken";
+ Text[ pl ] = "Zwiń akapity podrzędne";
+ Text[ pt-BR ] = "Contrair";
+ Text[ th ] = "ยุบ";
+ Text[ ja ] = "下ä½æ®µè½ã®éžè¡¨ç¤º";
+ Text[ ko ] = "하위 ë‹¨ë½ ìˆ¨ê¸°ê¸°";
+ Text[ zh-CN ] = "éšå…¥åˆ†æ®µè½";
+ Text[ zh-TW ] = "隱入分段è½";
+ Text[ tr ] = "Alt bölümleri gizle";
+ Text[ hi-IN ] = "दबाओ";
+ Text[ ar ] = "اختÙاء الÙقرات الÙرعية";
+ Text[ he ] = "‮כיווץ‬";
+};
+String RID_OUTLUNDO_ATTR
+{
+ Text [ de ] = "Attribute anwenden" ;
+ Text [ en-US ] = "Apply attributes" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Aplicar atributos";
+ Text[ ru ] = "Применить атрибуты";
+ Text[ el ] = "ΕφαÏμογή ιδιοτήτων";
+ Text[ nl ] = "Attributen toepassen";
+ Text[ fr ] = "Appliquer les attributs";
+ Text[ es ] = "Aplicar atributos";
+ Text[ fi ] = "Käytä määritteitä";
+ Text[ ca ] = "Aplica els atributs";
+ Text[ it ] = "Applica attributi";
+ Text[ sk ] = "Použiť atribúty";
+ Text[ da ] = "Anvend attributter";
+ Text[ sv ] = "Använd attribut";
+ Text[ pl ] = "Zastosuj atrybuty";
+ Text[ pt-BR ] = "Aplicar atributos";
+ Text[ th ] = "ใช้คุณลัà¸à¸©à¸“ะ";
+ Text[ ja ] = "属性ã®é©ç”¨";
+ Text[ ko ] = "ì†ì„± ì ìš©";
+ Text[ zh-CN ] = "使用属性";
+ Text[ zh-TW ] = "使用屬性";
+ Text[ tr ] = "Öznitelikleri uygula";
+ Text[ hi-IN ] = "à¤à¤Ÿà¥à¤°à¤¿à¤¬à¥à¤¯à¥‚टà¥à¤¸ लागू करो";
+ Text[ ar ] = "استخدام السمات";
+ Text[ he ] = "â€®×™×™×©×•× ×ª×›×•× ×•×ªâ€¬";
+};
+String RID_OUTLUNDO_INSERT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
+ Text [ de ] = "Einfügen" ;
+ Text [ en-US ] = "Insert" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Inserir";
+ Text[ ru ] = "Ð’Ñтавить";
+ Text[ el ] = "Εισαγωγή";
+ Text[ nl ] = "Invoegen";
+ Text[ fr ] = "Insérer";
+ Text[ es ] = "Insertar";
+ Text[ fi ] = "Lisää";
+ Text[ ca ] = "Insereix";
+ Text[ it ] = "Inserisci";
+ Text[ sk ] = "Vložiť";
+ Text[ da ] = "Indsæt";
+ Text[ sv ] = "Infoga";
+ Text[ pl ] = "Wstaw";
+ Text[ pt-BR ] = "Inserir";
+ Text[ th ] = "à¹à¸—รà¸";
+ Text[ ja ] = "挿入";
+ Text[ ko ] = "삽입";
+ Text[ zh-CN ] = "æ’å…¥";
+ Text[ zh-TW ] = "æ’å…¥";
+ Text[ tr ] = "Ekle";
+ Text[ hi-IN ] = "जोड़ो";
+ Text[ ar ] = "إدراج";
+ Text[ he ] = "‮הוספה‬";
+};
diff --git a/binfilter/bf_svx/source/outliner/svx_outlobj.cxx b/binfilter/bf_svx/source/outliner/svx_outlobj.cxx
new file mode 100644
index 000000000000..e8dadee291b4
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_outlobj.cxx
@@ -0,0 +1,258 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+#define _OUTLINER_CXX
+#include <outlobj.hxx>
+#include <outleeng.hxx>
+
+#include <editobj.hxx>
+
+
+
+
+namespace binfilter {
+
+/*N*/ DBG_NAME(OutlinerParaObject)
+
+/*N*/ OutlinerParaObject::OutlinerParaObject( USHORT nParaCount )
+/*N*/ {
+/*N*/ DBG_CTOR(OutlinerParaObject,0);
+/*N*/
+/*N*/ bIsEditDoc = TRUE;
+/*N*/ pDepthArr = new USHORT[ nParaCount ];
+/*N*/ nCount = (ULONG)nParaCount;
+/*N*/ }
+
+/*N*/ OutlinerParaObject::OutlinerParaObject( const OutlinerParaObject& rObj )
+/*N*/ {
+/*N*/ DBG_CTOR(OutlinerParaObject,0);
+/*N*/
+/*N*/ bIsEditDoc = rObj.bIsEditDoc;
+/*N*/ nCount = rObj.nCount;
+/*N*/ pDepthArr = new USHORT[ (USHORT)nCount ];
+/*N*/ memcpy( pDepthArr, rObj.pDepthArr, (size_t)(sizeof(USHORT)*nCount) );
+/*N*/ pText = rObj.pText->Clone();
+/*N*/ }
+
+
+/*N*/ OutlinerParaObject::~OutlinerParaObject()
+/*N*/ {
+/*N*/ DBG_DTOR(OutlinerParaObject,0);
+/*N*/
+/*N*/ delete pText;
+/*N*/ delete[] pDepthArr;
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::ClearPortionInfo()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerParaObject,0);
+/*N*/ pText->ClearPortionInfo();
+/*N*/ }
+
+/*N*/ OutlinerParaObject* OutlinerParaObject::Clone() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerParaObject,0);
+/*N*/ OutlinerParaObject* pObj = new OutlinerParaObject(*this);
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerParaObject,0);
+/*N*/ pText->ChangeStyleSheetName( eFamily, rOldName, rNewName );
+/*N*/ }
+
+/*N*/ BOOL OutlinerParaObject::ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerParaObject,0);
+/*N*/ return pText->ChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily );
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::Store(SvStream& rStream ) const
+/*N*/ {
+/*N*/ rStream << nCount;
+/*N*/ rStream << (sal_uInt32) 0x42345678;
+/*N*/ pText->Store( rStream );
+/*N*/
+/*N*/ for( USHORT nPos=0; nPos < nCount; nPos++ )
+/*N*/ rStream << pDepthArr[ nPos ];
+/*N*/
+/*N*/ rStream << bIsEditDoc;
+/*N*/ }
+
+/*N*/ OutlinerParaObject* OutlinerParaObject::Create( SvStream& rStream, SfxItemPool* pTextObjectPool )
+/*N*/ {
+/*N*/ OutlinerParaObject* pPObj = NULL;
+/*N*/ USHORT nVersion = 0;
+/*N*/
+/*N*/ sal_uInt32 nCount;
+/*N*/ rStream >> nCount;
+/*N*/
+/*N*/ sal_uInt32 nSyncRef;
+/*N*/ rStream >> nSyncRef;
+/*N*/ if( nSyncRef == 0x12345678 )
+/*N*/ nVersion = 1;
+/*N*/ else if( nSyncRef == 0x22345678 )
+/*N*/ nVersion = 2;
+/*N*/ else if( nSyncRef == 0x32345678 )
+/*N*/ nVersion = 3;
+/*N*/ else if ( nSyncRef == 0x42345678 )
+/*N*/ nVersion = 4;
+/*N*/
+/*N*/ if ( nVersion )
+/*N*/ {
+/*N*/ pPObj = new OutlinerParaObject( (USHORT)nCount );
+/*N*/ if( nVersion <= 3 )
+/*N*/ {
+/*N*/ EditTextObject* pAllText = 0;
+/*N*/ USHORT nCurPara = 0;
+/*N*/ while ( nCount )
+/*N*/ {
+/*N*/ EditTextObject* pText = EditTextObject::Create( rStream, NULL );
+/*N*/ DBG_ASSERT(pText,"CreateEditTextObject failed");
+/*N*/ sal_uInt32 nSync = 0;
+/*N*/ rStream >> nSync;
+/*N*/ DBG_ASSERT(nSync==nSyncRef,"Stream out of sync");
+/*N*/ USHORT nDepth;
+/*N*/ rStream >> nDepth;
+/*N*/ Paragraph* pPara = new Paragraph( nDepth );
+/*N*/ if( nVersion == 1 )
+/*N*/ {
+/*?*/ // 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;
+/*N*/ }
+/*N*/ pPara->bVisible = TRUE;
+/*N*/ if( !pAllText )
+/*N*/ pAllText = pText;
+/*N*/ else
+/*N*/ {
+/*N*/ pAllText->Insert( *pText, 0xffff );
+/*N*/ delete pText;
+/*N*/ }
+/*N*/ pPObj->pDepthArr[ nCurPara ] = pPara->GetDepth();
+/*N*/ delete pPara;
+/*N*/ nCount--;
+/*N*/ nCurPara++;
+/*N*/ if( nCount )
+/*N*/ {
+/*N*/ sal_uInt32 nSync = 0;
+/*N*/ rStream >> nSync;
+/*N*/ DBG_ASSERT(nSync==nSyncRef,"Stream out of sync");
+/*N*/ }
+/*N*/ }
+/*N*/ if( nVersion == 3 )
+/*N*/ rStream >> pPObj->bIsEditDoc;
+/*N*/ pPObj->pText = pAllText;
+/*N*/ }
+/*N*/ else // nVersion >= 4
+/*N*/ {
+/*N*/ pPObj->pText = EditTextObject::Create( rStream, pTextObjectPool );
+/*N*/ for( USHORT nCur=0; nCur < nCount; nCur++ )
+/*N*/ rStream >> pPObj->pDepthArr[ nCur ];
+/*N*/ rStream >> pPObj->bIsEditDoc;
+/*N*/
+/*N*/ if ( pPObj->pText->GetVersion() < 501 )
+/*N*/ pPObj->pText->AdjustImportedLRSpaceItems( pPObj->bIsEditDoc );
+/*N*/
+/*N*/ // MT: Bei der naechsten Version mal eine Recordlaenge einfuehren!
+/*N*/ }
+/*N*/ }
+/*N*/ return pPObj;
+/*N*/ }
+
+/*N*/ USHORT OutlinerParaObject::GetOutlinerMode() const
+/*N*/ {
+/*N*/ return pText->GetUserType();
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::SetOutlinerMode( USHORT n )
+/*N*/ {
+/*N*/ pText->SetUserType( n );
+/*N*/ }
+
+
+
+
+/*N*/ void OutlinerParaObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+/*N*/ {
+/*N*/ pText->MergeParaAttribs( rAttribs, nStart, nEnd );
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::PrepareStore( SfxStyleSheetPool* pStyleSheetPool )
+/*N*/ {
+/*N*/ pText->PrepareStore( pStyleSheetPool );
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::FinishStore()
+/*N*/ {
+/*N*/ pText->FinishStore();
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool )
+/*N*/ {
+/*N*/ pText->FinishLoad( pStyleSheetPool );
+/*N*/ }
+
+/*N*/ void OutlinerParaObject::SetVertical( BOOL bVertical )
+/*N*/ {
+/*N*/ pText->SetVertical( bVertical );
+/*N*/ }
+
+/*N*/ BOOL OutlinerParaObject::IsVertical() const
+/*N*/ {
+/*N*/ return pText->IsVertical();
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/svx_outlvw.cxx b/binfilter/bf_svx/source/outliner/svx_outlvw.cxx
new file mode 100644
index 000000000000..c1c851641c7d
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_outlvw.cxx
@@ -0,0 +1,201 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+
+#define _OUTLINER_CXX
+#include <outleeng.hxx>
+
+
+
+
+
+
+
+
+
+
+#include "editview.hxx"
+
+namespace binfilter {
+
+
+// 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 */
+
+/*N*/ DBG_NAME(OutlinerView)
+
+/*N*/ OutlinerView::~OutlinerView()
+/*N*/ {
+/*N*/ DBG_DTOR(OutlinerView,0);
+/*N*/ delete pEditView;
+/*N*/ }
+
+
+/*N*/ Rectangle OutlinerView::GetVisArea() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerView,0);
+/*N*/ return pEditView->GetVisArea();
+/*N*/ }
+
+
+
+// MT 05/00: Wofuer dies ImpXXXScroll, sollte das nicht die EditEngine machen???
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void OutlinerView::Cut()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void OutlinerView::Paste()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+
+
+ // =====================================================================
+// ====================== Einfache Durchreicher =======================
+// ======================================================================
+
+
+
+
+
+/*N*/ void OutlinerView::SetSelection( const ESelection& rSel )
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerView,0);
+/*N*/ pEditView->SetSelection( rSel );
+/*N*/ }
+
+
+/*N*/ Window* OutlinerView::GetWindow() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerView,0);
+/*N*/ return pEditView->GetWindow();
+/*N*/ }
+
+
+
+
+/*N*/ Rectangle OutlinerView::GetOutputArea() const
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerView,0);
+/*N*/ return pEditView->GetOutputArea();
+/*N*/ }
+
+/*N*/ ESelection OutlinerView::GetSelection()
+/*N*/ {
+/*N*/ DBG_CHKTHIS(OutlinerView,0);
+/*N*/ return pEditView->GetSelection();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void OutlinerView::Copy()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/outliner/svx_paralist.cxx b/binfilter/bf_svx/source/outliner/svx_paralist.cxx
new file mode 100644
index 000000000000..19f81cffa9e0
--- /dev/null
+++ b/binfilter/bf_svx/source/outliner/svx_paralist.cxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <paralist.hxx>
+#include <outliner.hxx> // nur wegen Paragraph, muss geaendert werden!
+#include <numdef.hxx>
+namespace binfilter {
+
+/*N*/ DBG_NAME(Paragraph)
+
+/*N*/ Paragraph::Paragraph( USHORT nDDepth )
+/*N*/ : aBulSize( -1, -1)
+/*N*/ {
+/*N*/ DBG_CTOR( Paragraph, 0 );
+/*N*/
+/*N*/ DBG_ASSERT( ( nDDepth < SVX_MAX_NUM ) || ( nDDepth == 0xFFFF ), "Paragraph-CTOR: nDepth invalid!" );
+/*N*/
+/*N*/ nDepth = nDDepth;
+/*N*/ nFlags = 0;
+/*N*/ bVisible = TRUE;
+/*N*/ }
+
+
+/*N*/ Paragraph::~Paragraph()
+/*N*/ {
+/*N*/ DBG_DTOR( Paragraph, 0 );
+/*N*/ }
+
+/*N*/ void ParagraphList::Clear( BOOL bDestroyParagraphs )
+/*N*/ {
+/*N*/ if ( bDestroyParagraphs )
+/*N*/ {
+/*N*/ for ( ULONG n = GetParagraphCount(); n; )
+/*N*/ {
+/*N*/ Paragraph* pPara = GetParagraph( --n );
+/*N*/ delete pPara;
+/*N*/ }
+/*N*/ }
+/*N*/ List::Clear();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+/*NBFF*/ Paragraph* ParagraphList::GetParent( Paragraph* pParagraph, USHORT& rRelPos ) const
+/*NBFF*/ {
+/*NBFF*/ rRelPos = 0;
+/*NBFF*/ ULONG n = GetAbsPos( pParagraph );
+/*NBFF*/ Paragraph* pPrev = GetParagraph( --n );
+/*NBFF*/ while ( pPrev && ( pPrev->GetDepth() >= pParagraph->GetDepth() ) )
+/*NBFF*/ {
+/*NBFF*/ if ( pPrev->GetDepth() == pParagraph->GetDepth() )
+/*NBFF*/ rRelPos++;
+/*NBFF*/ pPrev = GetParagraph( --n );
+/*NBFF*/ }
+/*NBFF*/
+/*NBFF*/ return pPrev;
+/*NBFF*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/makefile.mk b/binfilter/bf_svx/source/svdraw/makefile.mk
new file mode 100644
index 000000000000..2b8c3988e897
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/makefile.mk
@@ -0,0 +1,124 @@
+#*************************************************************************#
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_svdraw
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+SLOFILES=\
+ $(SLO)$/svx_svdoutlinercache.obj \
+ $(SLO)$/svx_dialdll.obj \
+ $(SLO)$/svx_svdattr.obj \
+ $(SLO)$/svx_svdcrtv.obj \
+ $(SLO)$/svx_svddrag.obj \
+ $(SLO)$/svx_svddrgv.obj \
+ $(SLO)$/svx_svdedtv.obj \
+ $(SLO)$/svx_svdedtv2.obj \
+ $(SLO)$/svx_svdedxv.obj \
+ $(SLO)$/svx_svdetc.obj \
+ $(SLO)$/svx_svdglev.obj \
+ $(SLO)$/svx_svdglue.obj \
+ $(SLO)$/svx_svdhdl.obj \
+ $(SLO)$/svx_svdhlpln.obj \
+ $(SLO)$/svx_svdio.obj \
+ $(SLO)$/svx_svditer.obj \
+ $(SLO)$/svx_svdlayer.obj \
+ $(SLO)$/svx_svdmark.obj \
+ $(SLO)$/svx_svdmodel.obj \
+ $(SLO)$/svx_svdmrkv.obj \
+ $(SLO)$/svx_svdmrkv1.obj \
+ $(SLO)$/svx_svdoattr.obj \
+ $(SLO)$/svx_svdobj.obj \
+ $(SLO)$/svx_impgrfll.obj \
+ $(SLO)$/svx_svdocapt.obj \
+ $(SLO)$/svx_svdocirc.obj \
+ $(SLO)$/svx_svdoedge.obj \
+ $(SLO)$/svx_svdograf.obj \
+ $(SLO)$/svx_svdogrp.obj \
+ $(SLO)$/svx_svdomeas.obj \
+ $(SLO)$/svx_svdoole2.obj \
+ $(SLO)$/svx_svdopage.obj \
+ $(SLO)$/svx_svdopath.obj \
+ $(SLO)$/svx_svdorect.obj \
+ $(SLO)$/svx_svdotext.obj \
+ $(SLO)$/svx_svdotxat.obj \
+ $(SLO)$/svx_svdotxed.obj \
+ $(SLO)$/svx_svdotxfl.obj \
+ $(SLO)$/svx_svdotxln.obj \
+ $(SLO)$/svx_svdotxtr.obj \
+ $(SLO)$/svx_svdouno.obj \
+ $(SLO)$/svx_svdoutl.obj \
+ $(SLO)$/svx_svdovirt.obj \
+ $(SLO)$/svx_svdpage.obj \
+ $(SLO)$/svx_svdpagv.obj \
+ $(SLO)$/svx_svdpntv.obj \
+ $(SLO)$/svx_svdpoev.obj \
+ $(SLO)$/svx_svdsnpv.obj \
+ $(SLO)$/svx_svdsuro.obj \
+ $(SLO)$/svx_svdtouch.obj \
+ $(SLO)$/svx_svdtrans.obj \
+ $(SLO)$/svx_svdtxhdl.obj \
+ $(SLO)$/svx_svdundo.obj \
+ $(SLO)$/svx_svdview.obj \
+ $(SLO)$/svx_svdviter.obj \
+ $(SLO)$/svx_svdvmark.obj \
+ $(SLO)$/svx_svdxcgv.obj
+
+.IF "$(OS)$(CPU)"=="LINUXI"
+NOOPTFILES=$(SLO)$/svx_svdattr.obj
+.ENDIF
+
+EXCEPTIONSFILES= \
+ $(SLO)$/svx_svdhdl.obj \
+ $(SLO)$/svx_svdmrkv.obj \
+ $(SLO)$/svx_svdogrp.obj \
+ $(SLO)$/svx_svdotxln.obj \
+ $(SLO)$/svx_svdouno.obj \
+ $(SLO)$/svx_svdfppt.obj \
+ $(SLO)$/svx_svdmodel.obj \
+ $(SLO)$/svx_svdpagv.obj
+
+SRS1NAME=svx_svdstr
+SRC1FILES= \
+ svx_svdstr.src
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/svdraw/svditext.hxx b/binfilter/bf_svx/source/svdraw/svditext.hxx
new file mode 100644
index 000000000000..cef96da12999
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svditext.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVDITEXT_HXX
+#define _SVDITEXT_HXX
+
+// SvxItem-Mapping. Wird benoetigt um die SvxItem-Header erfolgreich zu includen
+
+namespace binfilter {
+
+// textitem.hxx editdata.hxx
+#define ITEMID_COLOR EE_CHAR_COLOR
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
+#define ITEMID_CHARSCALE_W 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
+
+}//end of namespace binfilter
+#endif // _SVDITEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx b/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx
new file mode 100644
index 000000000000..3b86745f72fb
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svdtxhdl.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVDTXHDL_HXX
+#define _SVDTXHDL_HXX
+
+#include <vcl/virdev.hxx>
+
+
+namespace binfilter {
+
+//************************************************************
+// 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
+ // #101498#
+ //Polygon aPoly;
+ //long nTextWidth;
+ ULONG nParagraph;
+ BOOL bToLastPoint;
+ BOOL bDraw;
+ void* mpRecordPortions;
+
+private:
+ // #101498#
+ void SortedAddFormTextRecordPortion(DrawPortionInfo* pInfo);
+ void DrawFormTextRecordPortions(Polygon aPoly);
+ void ClearFormTextRecordPortions();
+ sal_uInt32 GetFormTextPortionsLength(OutputDevice* pOut);
+
+public:
+ ImpTextPortionHandler(SdrOutliner& rOutln, const SdrTextObj& rTxtObj);
+
+ void DrawTextToPath(ExtOutputDevice& rXOut, FASTBOOL bDrawEffect=TRUE);
+
+ // wird von DrawTextToPath() gesetzt:
+ const Rectangle& GetFormTextBoundRect() { return aFormTextBoundRect; }
+
+
+ // #101498#
+ DECL_LINK(FormTextRecordPortionHdl, DrawPortionInfo*);
+ //DECL_LINK(FormTextWidthHdl,DrawPortionInfo*);
+ //DECL_LINK(FormTextDrawHdl,DrawPortionInfo*);
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+}//end of namespace binfilter
+#endif //_SVDTXHDL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_dialdll.cxx b/binfilter/bf_svx/source/svdraw/svx_dialdll.cxx
new file mode 100644
index 000000000000..e7b78baa4f4b
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_dialdll.cxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <bf_svtools/solar.hrc>
+#include "dialdll.hxx"
+#include "dialmgr.hxx"
+#define ITEMID_BRUSH 1
+#include "brshitem.hxx"
+
+
+#include <vcl/svapp.hxx>
+
+
+
+#include <bf_svtools/filter.hxx>
+
+#include <bf_svtools/wallitem.hxx>
+namespace binfilter {
+
+// struct DialogsResMgr --------------------------------------------------
+/*N*/ DialogsResMgr::DialogsResMgr()
+/*N*/ : pResMgr(0),
+/*N*/ pGrapicFilter(0)
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ByteString aName( "bf_svx" ); //STRIP005
+/*N*/ #else
+/*N*/ ByteString aName( "bf_svl" ); //STRIP005
+/*N*/ #endif
+/*N*/ pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILocale() );
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ DialogsResMgr::~DialogsResMgr()
+/*N*/ {
+/*N*/ delete pGrapicFilter;
+/*N*/ delete pResMgr;
+/*N*/ }
+
+// class SvxDialogDll ----------------------------------------------------
+/*N*/ SvxDialogDll::SvxDialogDll()
+/*N*/ {
+/*N*/ DBG_ASSERT( !(*GetAppData(BF_SHL_SVX)), "Ctor, but pointer not null" );
+/*N*/
+/*N*/ (*(DialogsResMgr**)GetAppData(BF_SHL_SVX)) = new DialogsResMgr;
+/*N*/ SvxBrushItem::InitSfxLink(); // OV,30.06.1998
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ SvxDialogDll::~SvxDialogDll()
+/*N*/ {
+/*N*/ DBG_ASSERT( (*GetAppData(BF_SHL_SVX)), "Dtor, pointer == null" );
+/*N*/
+/*N*/ delete (*(DialogsResMgr**)GetAppData(BF_SHL_SVX));
+/*N*/ (*(DialogsResMgr**)GetAppData(BF_SHL_SVX)) = 0;
+/*N*/ delete SfxBrushItemLink::Get();
+/*N*/ (*(SfxBrushItemLink**)GetAppData(SHL_BRUSHITEM)) = 0;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_impgrfll.cxx b/binfilter/bf_svx/source/svdraw/svx_impgrfll.cxx
new file mode 100644
index 000000000000..26b161e69a21
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_impgrfll.cxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+
+
+#include <vcl/metaact.hxx>
+
+
+
+#include "svdobj.hxx"
+
+#include "xdef.hxx"
+
+#include "xattr.hxx"
+#include "xoutx.hxx"
+
+#include "svdoimp.hxx"
+#include "svdattr.hxx"
+namespace binfilter {
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// #100127# Bracket filled output with a comment, if recording a Mtf
+/*N*/ ImpGraphicFill::ImpGraphicFill( const SdrObject& rObj,
+/*N*/ const ExtOutputDevice& rXOut,
+/*N*/ const SfxItemSet& rFillItemSet,
+/*N*/ bool bIsShadow ) :
+/*N*/ mrObj( rObj ),
+/*N*/ mrXOut( rXOut ),
+/*N*/ mbCommentWritten( false )
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = rObj.GetItemSet();
+/*N*/ XFillStyle eFillStyle( ITEMVALUE( rFillItemSet, XATTR_FILLSTYLE, XFillStyleItem ) );
+/*N*/ XGradient aGradient( ITEMVALUE( rFillItemSet, XATTR_FILLGRADIENT, XFillGradientItem ) );
+/*N*/ XHatch aHatch( ITEMVALUE( rFillItemSet, XATTR_FILLHATCH, XFillHatchItem ) );
+/*N*/
+/*N*/ sal_Int32 nDX( ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue() );
+/*N*/ sal_Int32 nDY( ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue() );
+/*N*/
+/*N*/ GDIMetaFile* pMtf=NULL;
+/*N*/ if( eFillStyle != XFILL_NONE &&
+/*N*/ (pMtf=mrXOut.GetOutDev()->GetConnectMetaFile()) )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*?*/ }
+/*N*/ }
+
+// #100127# Bracket filled output with a comment, if recording a Mtf
+/*N*/ ImpGraphicFill::~ImpGraphicFill()
+/*N*/ {
+/*N*/ GDIMetaFile* pMtf=NULL;
+/*N*/ if( mbCommentWritten &&
+/*N*/ (pMtf=mrXOut.GetOutDev()->GetConnectMetaFile()) )
+/*N*/ {
+/*?*/ pMtf->AddAction( new MetaCommentAction( "XPATHFILL_SEQ_END" ) );
+/*N*/ }
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////////
+
+// #104609# Extracted from XOutputDevice::ImpCalcBmpFillStartValues
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdattr.cxx b/binfilter/bf_svx/source/svdraw/svx_svdattr.cxx
new file mode 100644
index 000000000000..091ce7a18d73
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdattr.cxx
@@ -0,0 +1,1456 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define ITEMID_GRF_CROP 0
+
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/TextAnimationKind.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/drawing/TextAnimationDirection.hpp>
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#include <com/sun/star/drawing/MeasureKind.hpp>
+#include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
+#include <com/sun/star/drawing/MeasureTextVertPos.hpp>
+#include <com/sun/star/drawing/CircleKind.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <unotools/intlwrapper.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <vcl/svapp.hxx>
+
+#include "xdef.hxx"
+
+#include "svdattr.hxx"
+#include "svdattrx.hxx"
+#include "svdpool.hxx"
+
+#include <bf_svtools/solar.hrc>
+
+#include "xmlcnitm.hxx"
+
+#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 "sdgcpitm.hxx"
+#include "adjitem.hxx"
+#include "writingmodeitem.hxx"
+
+#include <tools/bigint.hxx>
+
+#include <tools/stream.hxx>
+
+#include <xtxasit.hxx>
+#include <xfillit0.hxx>
+#include <xflclit.hxx>
+#include <xlineit0.hxx>
+
+#include <svx3ditems.hxx>
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+
+namespace binfilter {
+
+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)
+{
+ 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;
+#ifndef SVX_LIGHT
+ ppPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SvXMLAttrContainerItem( SDRATTR_XMLATTRIBUTES );
+#else
+ // no need to have alien attributes persistent in the player
+ ppPoolDefaults[SDRATTR_XMLATTRIBUTES -SDRATTR_START]=new SfxVoidItem( SDRATTR_XMLATTRIBUTES );
+#endif // #ifndef SVX_LIGHT
+ for (i=SDRATTR_RESERVE15; 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();
+ ppPoolDefaults[SDRATTR_MEASUREDECIMALPLACES -SDRATTR_START]=new SdrMeasureDecimalPlacesItem();
+ for (i=SDRATTR_MEASURERESERVE05; 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;
+ ppPoolDefaults[SDRATTR_TEXTDIRECTION -SDRATTR_START]=new SvxWritingModeItem;
+
+ for (i=SDRATTR_NOTPERSISTRESERVE2; 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;
+ ppPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem;
+ for( i = SDRATTR_GRAFRESERVE3; i <= SDRATTR_GRAFRESERVE6; i++ )
+ ppPoolDefaults[ i - SDRATTR_START ] = new SfxVoidItem( i );
+ ppPoolDefaults[ SDRATTRSET_GRAF - SDRATTR_START ] = new SdrGrafSetItem( pMaster );
+ pItemInfos[SDRATTR_GRAFCROP-SDRATTR_START]._nSID=SID_ATTR_GRAF_CROP;
+
+ // 3D Object Attr (28092000 AW)
+ ppPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new Svx3DPercentDiagonalItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new Svx3DBackscaleItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new Svx3DDepthItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new Svx3DHorizontalSegmentsItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new Svx3DVerticalSegmentsItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new Svx3DEndAngleItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new Svx3DDoubleSidedItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new Svx3DNormalsInvertItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new Svx3DShadow3DItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new Svx3DMaterialColorItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new Svx3DMaterialEmissionItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new Svx3DMaterialSpecularItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new Svx3DMaterialSpecularIntensityItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new Svx3DTextureFilterItem;
+
+ // #107245# Add new items for 3d objects
+ ppPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_NORMALS - SDRATTR_START ] = new Svx3DSmoothNormalsItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_SMOOTH_LIDS - SDRATTR_START ] = new Svx3DSmoothLidsItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_CHARACTER_MODE - SDRATTR_START ] = new Svx3DCharacterModeItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_CLOSE_FRONT - SDRATTR_START ] = new Svx3DCloseFrontItem;
+ ppPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem;
+
+ // #107245# Start with SDRATTR_3DOBJ_RESERVED_06 now
+ for( i = SDRATTR_3DOBJ_RESERVED_06; i <= SDRATTR_3DOBJ_RESERVED_20; i++ )
+ ppPoolDefaults[ i - SDRATTR_START ] = new SfxVoidItem( i );
+
+ // 3D Scene Attr (28092000 AW)
+ ppPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem;
+ ppPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new Svx3DDistanceItem;
+ ppPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new Svx3DFocalLengthItem;
+ ppPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new Svx3DTwoSidedLightingItem;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new Svx3DLightcolor1Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new Svx3DLightcolor2Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new Svx3DLightcolor3Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new Svx3DLightcolor4Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new Svx3DLightcolor5Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new Svx3DLightcolor6Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new Svx3DLightcolor7Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new Svx3DLightcolor8Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new Svx3DAmbientcolorItem;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new Svx3DLightOnOff1Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new Svx3DLightOnOff2Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new Svx3DLightOnOff3Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_4 - SDRATTR_START ] = new Svx3DLightOnOff4Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_5 - SDRATTR_START ] = new Svx3DLightOnOff5Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new Svx3DLightOnOff6Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new Svx3DLightOnOff7Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new Svx3DLightOnOff8Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new Svx3DLightDirection1Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new Svx3DLightDirection2Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new Svx3DLightDirection3Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new Svx3DLightDirection4Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new Svx3DLightDirection5Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new Svx3DLightDirection6Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new Svx3DLightDirection7Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new Svx3DLightDirection8Item;
+ ppPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new Svx3DShadowSlantItem;
+ ppPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem;
+
+ for( i = SDRATTR_3DSCENE_RESERVED_01; i <= SDRATTR_3DSCENE_RESERVED_20; i++ )
+ ppPoolDefaults[ i - SDRATTR_START ] = new SfxVoidItem( i );
+
+ ////////////////////////////////
+#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 += ByteString::CreateFromInt32( nNum );
+ aStr += "Which=";
+ aStr += ByteString::CreateFromInt32( 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);
+ }
+}
+
+/*************************************************************************
+|*
+|* 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++) {
+ SetRefCount(*ppPoolDefaults[i],0);
+ delete ppPoolDefaults[i];
+ ppPoolDefaults[i]=NULL;
+ }
+ }
+ // Vor dem zerstoeren die Pools ggf. voneinander trennen
+ SetSecondaryPool(NULL);
+}
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+// 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;
+}
+
+
+
+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);
+
+
+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);
+}
+
+
+
+#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);
+}
+
+
+
+#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);
+}
+
+
+#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);
+}
+
+
+#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);
+}
+
+
+
+
+#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; }
+
+
+
+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; }
+
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// 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; }
+
+
+bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue();
+ rVal <<= eFS;
+
+ return true;
+}
+
+bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextFitToSizeType eFS;
+ if(!(rVal >>= eFS))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+
+ eFS = (drawing::TextFitToSizeType) nEnum;
+ }
+
+ SetValue( (SdrFitToSizeType)eFS );
+
+ return 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; }
+
+
+
+bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextVerticalAdjust)GetValue();
+ return true;
+}
+
+bool SdrTextVertAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextVerticalAdjust eAdj;
+ if(!(rVal >>= eAdj))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+
+ eAdj = (drawing::TextVerticalAdjust)nEnum;
+ }
+
+ SetValue( (SdrTextVertAdjust)eAdj );
+
+ return 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
+{DBG_BF_ASSERT(0, "STRIP");XubString a; return a; //STRIP001
+}
+
+
+bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextHorizontalAdjust)GetValue();
+ return sal_True;
+}
+
+bool SdrTextHorzAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextHorizontalAdjust eAdj;
+ if(!(rVal >>= eAdj))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+
+ eAdj = (drawing::TextHorizontalAdjust)nEnum;
+ }
+
+ SetValue( (SdrTextHorzAdjust)eAdj );
+
+ return 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; }
+
+
+
+bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextAnimationKind)GetValue();
+ return true;
+}
+
+bool SdrTextAniKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextAnimationKind eKind;
+ if(!(rVal >>= eKind))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+ eKind = (drawing::TextAnimationKind)nEnum;
+ }
+
+ SetValue( (SdrTextAniKind)eKind );
+
+ return 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; }
+
+
+
+bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextAnimationDirection)GetValue();
+ return true;
+}
+
+bool SdrTextAniDirectionItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextAnimationDirection eDir;
+ if(!(rVal >>= eDir))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+
+ eDir = (drawing::TextAnimationDirection)nEnum;
+ }
+
+ SetValue( (SdrTextAniDirection)eDir );
+
+ return 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); }
+
+
+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); }
+
+
+
+
+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++ )
+ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+ }
+ }
+}
+
+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++ )
+ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+ }
+ }
+ }
+ return bRet;
+}
+
+
+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++ )
+ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 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++ )
+ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+ }
+ return pItem;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrAutoShapeAdjustmentItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+
+sal_uInt16 SdrAutoShapeAdjustmentItem::GetVersion( sal_uInt16 nFileFormatVersion ) const
+{
+ return 1;
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// 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; }
+
+
+
+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 true;
+}
+
+bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::ConnectorType eCT;
+ if(!(rVal >>= eCT))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+
+ eCT = (drawing::ConnectorType)nEnum;
+ }
+
+ 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 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; }
+
+
+
+
+
+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; }
+
+
+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; }
+
+
+
+
+
+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; }
+
+
+
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// 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; }
+
+
+bool SdrCircKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::CircleKind eKind;
+ if(!(rVal >>= eKind))
+ {
+ sal_Int32 nEnum;
+ if(!(rVal >>= nEnum))
+ return false;
+
+ eKind = (drawing::CircleKind)nEnum;
+ }
+
+ SetValue( (SdrCircKind)eKind );
+ return 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 );
+
+#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 );
+}
+
+bool SdrGrafGamma100Item::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= ((double)GetValue()) / 100.0;
+ return true;
+}
+
+bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ double nGamma;
+ if(!(rVal >>= nGamma))
+ return false;
+
+ SetValue( (UINT32)(nGamma * 100.0 ) );
+ return 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;
+}
+
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafCropItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafCropItem, SvxGrfCrop );
+
+SfxPoolItem* SdrGrafCropItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafCropItem( *this );
+}
+
+SfxPoolItem* SdrGrafCropItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return( ( 0 == nVer ) ? Clone( NULL ) : SvxGrfCrop::Create( rIn, nVer ) );
+}
+
+USHORT SdrGrafCropItem::GetVersion( USHORT nFileVersion ) const
+{
+ // GRFCROP_VERSION_MOVETOSVX is 1
+ return GRFCROP_VERSION_MOVETOSVX;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdcrtv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdcrtv.cxx
new file mode 100644
index 000000000000..a2f11ad09761
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdcrtv.cxx
@@ -0,0 +1,284 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdcrtv.hxx"
+#include "svdio.hxx"
+#include "svdvmark.hxx"
+
+
+namespace binfilter {
+
+#define XOR_CREATE_PEN PEN_SOLID
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ class ImpSdrConnectMarker: public SdrViewUserMarker
+/*N*/ {
+/*N*/ const SdrObject* pAktObj;
+/*N*/ const SdrPageView* pAktPV;
+/*N*/
+
+/*N*/ public:
+/*N*/ ImpSdrConnectMarker(SdrCreateView* pView): SdrViewUserMarker(pView),pAktObj(NULL),pAktPV(NULL) {}
+/*N*/ ~ImpSdrConnectMarker() {}
+/*N*/ void SetTargetObject(const SdrObject* pObj);
+/*N*/ }; // svdvmark
+
+
+/*N*/ void ImpSdrConnectMarker::SetTargetObject(const SdrObject* pObj)
+/*N*/ {
+/*N*/ if (pAktObj!=pObj) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@ @@@@@ @@@@ @@@@@@ @@ @@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrCreateView::ImpClearVars()
+/*N*/ {
+/*N*/ nAktInvent=SdrInventor;
+/*N*/ nAktIdent=OBJ_NONE;
+/*N*/ pCurrentLibObj=NULL;
+/*N*/ bCurrentLibObjMoveNoResize=FALSE;
+/*N*/ bCurrentLibObjSetDefAttr=FALSE;
+/*N*/ bCurrentLibObjSetDefLayer=FALSE;
+/*N*/ pLibObjDragMeth=NULL;
+/*N*/ pAktCreate=NULL;
+/*N*/ pCreatePV=NULL;
+/*N*/ bAutoTextEdit=FALSE;
+/*N*/ b1stPointAsCenter=FALSE;
+/*N*/ aAktCreatePointer=Pointer(POINTER_CROSS);
+/*N*/ bUseIncompatiblePathCreateInterface=FALSE;
+/*N*/ bAutoClosePolys=TRUE;
+/*N*/ nAutoCloseDistPix=5;
+/*N*/ nFreeHandMinDistPix=10;
+/*N*/
+/*N*/ pConnectMarker=new ImpSdrConnectMarker(this);
+/*N*/ pConnectMarker->SetLineWidth(2);
+/*N*/ pConnectMarker->SetAnimateDelay(500);
+/*N*/ pConnectMarker->SetAnimateCount(3);
+/*N*/ pConnectMarker->SetAnimateSpeed(100);
+/*N*/ pConnectMarker->SetAnimateToggle(TRUE);
+/*N*/ }
+
+/*N*/ void SdrCreateView::ImpMakeCreateAttr()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrCreateView::SdrCreateView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrDragView(pModel1,pOut)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ ImpMakeCreateAttr();
+/*N*/ }
+
+/*N*/ SdrCreateView::~SdrCreateView()
+/*N*/ {
+/*N*/ delete pConnectMarker;
+/*N*/ delete pCurrentLibObj;
+/*N*/ delete pAktCreate;
+/*N*/ }
+
+
+/*N*/ BOOL SdrCreateView::IsAction() const
+/*N*/ {
+/*N*/ return SdrDragView::IsAction() || pAktCreate!=NULL;
+/*N*/ }
+
+
+
+
+/*N*/ void SdrCreateView::BrkAction()
+/*N*/ {
+/*N*/ SdrDragView::BrkAction();
+/*N*/ BrkCreateObj();
+/*N*/ }
+
+
+/*N*/ void SdrCreateView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+/*N*/ {
+/*N*/ SdrDragView::ToggleShownXor(pOut,pRegion);
+/*N*/ if (pAktCreate!=NULL && aDragStat.IsShown()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrCreateView::CheckEdgeMode()
+/*N*/ {
+/*N*/ UINT32 nInv=nAktInvent;
+/*N*/ UINT16 nIdn=nAktIdent;
+/*N*/ if (pAktCreate!=NULL) {
+/*?*/ nInv=pAktCreate->GetObjInventor();
+/*?*/ nIdn=pAktCreate->GetObjIdentifier();
+/*?*/ // wird vom EdgeObj gemanaged
+/*?*/ if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return FALSE;
+/*N*/ }
+/*N*/ if (!IsCreateMode() || nAktInvent!=SdrInventor || nAktIdent!=OBJ_EDGE || pCurrentLibObj!=NULL) {
+/*?*/ if (pConnectMarker->IsVisible()) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 pConnectMarker->Hide();
+/*N*/ pConnectMarker->SetTargetObject(NULL);
+/*N*/ return FALSE;
+/*N*/ } else {
+/*N*/ // TRUE heisst: MouseMove soll Connect checken
+/*?*/ return !IsAction();
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ BOOL SdrCreateView::IsTextTool() const
+/*N*/ {
+/*N*/ return eEditMode==SDREDITMODE_CREATE && pCurrentLibObj==NULL && nAktInvent==SdrInventor && (nAktIdent==OBJ_TEXT || nAktIdent==OBJ_TEXTEXT || nAktIdent==OBJ_TITLETEXT || nAktIdent==OBJ_OUTLINETEXT);
+/*N*/ }
+
+/*N*/ BOOL SdrCreateView::IsEdgeTool() const
+/*N*/ {
+/*N*/ return eEditMode==SDREDITMODE_CREATE && pCurrentLibObj==NULL && nAktInvent==SdrInventor && (nAktIdent==OBJ_EDGE);
+/*N*/ }
+
+
+/*N*/ void SdrCreateView::SetCurrentObj(UINT16 nIdent, UINT32 nInvent)
+/*N*/ {
+/*N*/ if (pCurrentLibObj!=NULL) {
+/*?*/ delete pCurrentLibObj;
+/*?*/ pCurrentLibObj=NULL;
+/*N*/ }
+/*N*/ if (nAktInvent!=nInvent || nAktIdent!=nIdent) {
+/*N*/ nAktInvent=nInvent;
+/*N*/ nAktIdent=nIdent;
+/*N*/ SdrObject* pObj = SdrObjFactory::MakeNewObject(nInvent,nIdent,NULL,NULL);
+/*N*/
+/*N*/ if(pObj)
+/*N*/ {
+/*N*/ // Auf pers. Wunsch von Marco:
+/*N*/ // Mauszeiger bei Textwerkzeug immer I-Beam. Fadenkreuz
+/*N*/ // mit kleinem I-Beam erst bai MouseButtonDown
+/*N*/ if(IsTextTool())
+/*N*/ {
+/*N*/ // #81944# AW: Here the correct pointer needs to be used
+/*N*/ // if the default is set to vertical writing
+/*?*/ aAktCreatePointer = POINTER_TEXT;
+/*N*/ }
+/*N*/ else
+/*N*/ aAktCreatePointer = pObj->GetCreatePointer();
+/*N*/
+/*N*/ delete pObj;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aAktCreatePointer = Pointer(POINTER_CROSS);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ CheckEdgeMode();
+/*N*/ ImpSetGlueVisible3(IsEdgeTool());
+/*N*/ }
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrCreateView::BrkCreateObj()
+/*N*/ {
+/*N*/ if (pAktCreate!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrCreateView::WriteRecords(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrDragView::WriteRecords(rOut);
+/*N*/ {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCROBJECT);
+/*N*/ rOut<<nAktInvent;
+/*N*/ rOut<<nAktIdent;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCRFLAGS);
+/*N*/ rOut<<BOOL(b1stPointAsCenter);
+/*N*/ } {
+/*N*/ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWTEXTEDIT);
+/*N*/ rOut<<BOOL(bQuickTextEditMode);
+/*N*/ } {
+/*N*/ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWMACRO);
+/*N*/ rOut<<BOOL(bMacroMode);
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrCreateView::ReadRecord(const SdrIOHeader& rViewHead,
+/*N*/ const SdrNamedSubRecord& rSubHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (rSubHead.GetInventor()==SdrInventor) {
+/*N*/ bRet=TRUE;
+/*N*/ switch (rSubHead.GetIdentifier()) {
+/*N*/ case SDRIORECNAME_VIEWCROBJECT: {
+/*N*/ UINT32 nInvent;
+/*N*/ UINT16 nIdent;
+/*N*/ rIn>>nInvent;
+/*N*/ rIn>>nIdent;
+/*N*/ SetCurrentObj(nIdent,nInvent);
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWCRFLAGS: {
+/*N*/ BOOL bTmp; rIn>>bTmp; b1stPointAsCenter=bTmp;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWTEXTEDIT: {
+/*N*/ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+/*N*/ BOOL bTmp; rIn>>bTmp; bQuickTextEditMode=bTmp;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWMACRO: {
+/*N*/ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+/*N*/ BOOL bTmp; rIn>>bTmp; bMacroMode=bTmp;
+/*N*/ } break;
+/*N*/ default: bRet=FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bRet) bRet=SdrDragView::ReadRecord(rViewHead,rSubHead,rIn);
+/*N*/ return bRet;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svddrag.cxx b/binfilter/bf_svx/source/svdraw/svx_svddrag.cxx
new file mode 100644
index 000000000000..792fc67ca456
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svddrag.cxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svddrag.hxx"
+namespace binfilter {
+
+/*N*/ void SdrDragStat::Clear(FASTBOOL bLeaveOne)
+/*N*/ {
+/*N*/ void* pP=aPnts.First();
+/*N*/ while (pP!=NULL) {
+/*N*/ delete (Point*)pP;
+/*N*/ pP=aPnts.Next();
+/*N*/ }
+/*N*/ if (pUser!=NULL) delete pUser;
+/*N*/ pUser=NULL;
+/*N*/ aPnts.Clear();
+/*N*/ if (bLeaveOne) {
+/*N*/ aPnts.Insert(new Point,CONTAINER_APPEND);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrDragStat::Reset()
+/*N*/ {
+/*N*/ pView=NULL;
+/*N*/ pPageView=NULL;
+/*N*/ bShown=FALSE;
+/*N*/ nMinMov=1;
+/*N*/ bMinMoved=FALSE;
+/*N*/ bHorFixed=FALSE;
+/*N*/ bVerFixed=FALSE;
+/*N*/ bWantNoSnap=FALSE;
+/*N*/ pHdl=NULL;
+/*N*/ bOrtho4=FALSE;
+/*N*/ bOrtho8=FALSE;
+/*N*/ pDragMethod=NULL;
+/*N*/ bEndDragChangesAttributes=FALSE;
+/*N*/ bEndDragChangesGeoAndAttributes=FALSE;
+/*N*/ bMouseIsUp=FALSE;
+/*N*/ Clear(TRUE);
+/*N*/ aActionRect=Rectangle();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svddrgv.cxx b/binfilter/bf_svx/source/svdraw/svx_svddrgv.cxx
new file mode 100644
index 000000000000..78a1ee9ec675
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svddrgv.cxx
@@ -0,0 +1,223 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svddrgv.hxx"
+#include "svdio.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+namespace binfilter {
+
+#define XOR_DRAG_PEN PEN_DOT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@@@ @@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@ @@ @@@@@ @@@@@@ @@ @@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrDragView::ImpClearVars()
+/*N*/ {
+/*N*/ bFramDrag=FALSE;
+/*N*/ eDragMode=SDRDRAG_MOVE;
+/*N*/ bDragLimit=FALSE;
+/*N*/ bMarkedHitMovesAlways=FALSE;
+/*N*/ eDragHdl=HDL_MOVE;
+/*N*/ pDragHdl=NULL;
+/*N*/ bDragHdl=FALSE;
+/*N*/ bDragSpecial=FALSE;
+/*N*/ pDragBla=NULL;
+/*N*/ bDragStripes=FALSE;
+/*N*/ bNoDragHdl=TRUE;
+/*N*/ bMirrRefDragObj=TRUE;
+/*N*/ bSolidDragging=FALSE;
+/*N*/ bSolidDrgNow=FALSE;
+/*N*/ bSolidDrgChk=FALSE;
+/*N*/ bDragWithCopy=FALSE;
+/*N*/ pInsPointUndo=NULL;
+/*N*/ bInsAfter=FALSE;
+/*N*/ bInsGluePoint=FALSE;
+/*N*/ bInsObjPointMode=FALSE;
+/*N*/ bInsGluePointMode=FALSE;
+/*N*/ nDragXorPolyLimit=100;
+/*N*/ nDragXorPointLimit=500;
+/*N*/ bNoDragXorPolys=FALSE;
+/*N*/ bAutoVertexCon=TRUE;
+/*N*/ bAutoCornerCon=FALSE;
+/*N*/ bRubberEdgeDragging=TRUE;
+/*N*/ nRubberEdgeDraggingLimit=100;
+/*N*/ bDetailedEdgeDragging=TRUE;
+/*N*/ nDetailedEdgeDraggingLimit=10;
+/*N*/ bResizeAtCenter=FALSE;
+/*N*/ bCrookAtCenter=FALSE;
+/*N*/ bMouseHideWhileDraggingPoints=FALSE;
+/*N*/ }
+
+/*N*/ void SdrDragView::ImpMakeDragAttr()
+/*N*/ {
+/*N*/ ImpDelDragAttr();
+/*N*/ }
+
+/*N*/ SdrDragView::SdrDragView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrExchangeView(pModel1,pOut)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ ImpMakeDragAttr();
+/*N*/ }
+
+/*N*/ SdrDragView::~SdrDragView()
+/*N*/ {
+/*N*/ ImpDelDragAttr();
+/*N*/ }
+
+/*N*/ void SdrDragView::ImpDelDragAttr()
+/*N*/ {
+/*N*/ }
+
+/*N*/ BOOL SdrDragView::IsAction() const
+/*N*/ {
+/*N*/ return SdrExchangeView::IsAction() || pDragBla!=NULL;
+/*N*/ }
+
+
+
+
+/*N*/ void SdrDragView::BrkAction()
+/*N*/ {
+/*N*/ SdrExchangeView::BrkAction();
+/*N*/ BrkDragObj();
+//STRIP012/*N*/ RefreshAllIAOManagers();
+/*N*/ }
+
+
+/*N*/ void SdrDragView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+/*N*/ {
+/*N*/ SdrExchangeView::ToggleShownXor(pOut,pRegion);
+ if (pDragBla!=NULL && aDragStat.IsShown() &&
+ 1 )//STRIP001 //STRIP001 (!IS_TYPE(SdrDragMovHdl,pDragBla)) { // das ist ein Hack !!!!!!!!!!
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 DrawDragObj(pOut,TRUE);
+/*N*/ }
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ void SdrDragView::BrkDragObj()
+/*N*/ {
+/*N*/ if (pDragBla!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrDragView::SetNoDragXorPolys(BOOL bOn)
+/*N*/ {
+/*N*/ if (IsNoDragXorPolys()!=bOn) {
+/*N*/ BOOL bDragging=pDragBla!=NULL;
+/*N*/ BOOL bShown=bDragging && aDragStat.IsShown();
+/*N*/ if (bShown) {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 HideDragObj(pDragWin);
+/*N*/ bNoDragXorPolys=bOn;
+/*N*/ if (bDragging) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ if (bShown) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 ShowDragObj(pDragWin);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrDragView::SetDragStripes(BOOL bOn)
+/*N*/ {
+/*N*/ if (pDragBla!=NULL && aDragStat.IsShown()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ } else {
+/*N*/ bDragStripes=bOn;
+/*N*/ }
+/*N*/ }
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrDragView::WriteRecords(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrExchangeView::WriteRecords(rOut);
+/*N*/ {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWDRAGSTRIPES);
+/*N*/ rOut<<(BOOL)bDragStripes;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWDRAGHIDEHDL);
+/*N*/ rOut<<(BOOL)bNoDragHdl;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWOBJHITMOVES);
+/*N*/ rOut<<(BOOL)bMarkedHitMovesAlways;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWMIRRDRAGOBJ);
+/*N*/ rOut<<(BOOL)bMirrRefDragObj;
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrDragView::ReadRecord(const SdrIOHeader& rViewHead,
+/*N*/ const SdrNamedSubRecord& rSubHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (rSubHead.GetInventor()==SdrInventor) {
+/*N*/ bRet=TRUE;
+/*N*/ switch (rSubHead.GetIdentifier()) {
+/*N*/ case SDRIORECNAME_VIEWDRAGSTRIPES: {
+/*N*/ BOOL bZwi; rIn >> bZwi; bDragStripes = bZwi;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWDRAGHIDEHDL: {
+/*N*/ BOOL bZwi; rIn >> bZwi; bNoDragHdl = bZwi;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWOBJHITMOVES: {
+/*N*/ BOOL bZwi; rIn >> bZwi; bMarkedHitMovesAlways = bZwi;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWMIRRDRAGOBJ: {
+/*N*/ BOOL bZwi; rIn >> bZwi; bMirrRefDragObj = bZwi;
+/*N*/ } break;
+/*N*/ default: bRet=FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bRet) bRet=SdrExchangeView::ReadRecord(rViewHead,rSubHead,rIn);
+/*N*/ return bRet;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdedtv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdedtv.cxx
new file mode 100644
index 000000000000..e9221e2ab5ff
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdedtv.cxx
@@ -0,0 +1,207 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdpoev.hxx" // fuer die PolyPossiblities
+#include "svdstr.hrc" // Namen aus der Resource
+
+// #i13033#
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrEditView::ImpResetPossibilityFlags()
+/*N*/ {
+/*N*/ bReadOnly =FALSE;
+/*N*/
+/*N*/ bGroupPossible =FALSE;
+/*N*/ bUnGroupPossible =FALSE;
+/*N*/ bGrpEnterPossible =FALSE;
+/*N*/ bDeletePossible =FALSE;
+/*N*/ bToTopPossible =FALSE;
+/*N*/ bToBtmPossible =FALSE;
+/*N*/ bReverseOrderPossible =FALSE;
+/*N*/
+/*N*/ bImportMtfPossible =FALSE;
+/*N*/ bCombinePossible =FALSE;
+/*N*/ bDismantlePossible =FALSE;
+/*N*/ bCombineNoPolyPolyPossible =FALSE;
+/*N*/ bDismantleMakeLinesPossible=FALSE;
+/*N*/ bOrthoDesiredOnMarked =FALSE;
+/*N*/
+/*N*/ bMoreThanOneNotMovable =FALSE;
+/*N*/ bOneOrMoreMovable =FALSE;
+/*N*/ bMoreThanOneNoMovRot =FALSE;
+/*N*/ bContortionPossible =FALSE;
+/*N*/ bAllPolys =FALSE;
+/*N*/ bOneOrMorePolys =FALSE;
+/*N*/ bMoveAllowed =FALSE;
+/*N*/ bResizeFreeAllowed =FALSE;
+/*N*/ bResizePropAllowed =FALSE;
+/*N*/ bRotateFreeAllowed =FALSE;
+/*N*/ bRotate90Allowed =FALSE;
+/*N*/ bMirrorFreeAllowed =FALSE;
+/*N*/ bMirror45Allowed =FALSE;
+/*N*/ bMirror90Allowed =FALSE;
+/*N*/ bTransparenceAllowed =FALSE;
+/*N*/ bGradientAllowed =FALSE;
+/*N*/ bShearAllowed =FALSE;
+/*N*/ bEdgeRadiusAllowed =FALSE;
+/*N*/ bCanConvToPath =FALSE;
+/*N*/ bCanConvToPoly =FALSE;
+/*N*/ bCanConvToContour =FALSE;
+/*N*/ bCanConvToPathLineToArea=FALSE;
+/*N*/ bCanConvToPolyLineToArea=FALSE;
+/*N*/ bMoveProtect =FALSE;
+/*N*/ bResizeProtect =FALSE;
+/*N*/ }
+
+/*N*/ void SdrEditView::ImpClearVars()
+/*N*/ {
+/*N*/ ImpResetPossibilityFlags();
+/*N*/ bPossibilitiesDirty=TRUE; // << war von Purify angemeckert
+/*N*/ bCombineError=FALSE;
+/*N*/ bBundleVirtObj=FALSE;
+/*N*/ }
+
+/*N*/ SdrEditView::SdrEditView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrMarkView(pModel1,pOut)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ }
+
+/*N*/ SdrEditView::~SdrEditView()
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+} //namespace binfilter
+namespace binfilter {//STRIP009
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// #### ### #### #### # #### # # # ##### # ##### ####
+// # # # # # # # # # # # # # # # #
+// #### # # ### ### # #### # # # # # #### ###
+// # # # # # # # # # # # # # # #
+// # ### #### #### # #### # #### # # # ##### ####
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrEditView::MarkListHasChanged()
+/*N*/ {
+/*N*/ SdrMarkView::MarkListHasChanged();
+/*N*/ bPossibilitiesDirty=TRUE;
+/*N*/ }
+
+/*N*/ void SdrEditView::ModelHasChanged()
+/*N*/ {
+/*N*/ SdrMarkView::ModelHasChanged();
+/*N*/ bPossibilitiesDirty=TRUE;
+/*N*/ }
+
+/*N*/ void SdrEditView::CheckPossibilities()
+/*N*/ {
+/*N*/ if (bSomeObjChgdFlag) bPossibilitiesDirty=TRUE;
+/*N*/
+/*N*/ if(bSomeObjChgdFlag)
+/*N*/ {
+/*N*/ // This call IS necessary to correct the MarkList, in which
+/*N*/ // no longer to the model belonging objects still can reside.
+/*N*/ // These ones nned to be removed.
+/*N*/ CheckMarked();
+/*N*/ }
+/*N*/
+/*N*/ if (bPossibilitiesDirty) {
+/*N*/ ImpResetPossibilityFlags();
+/*N*/ aMark.ForceSort();
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ if (nMarkAnz!=0) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ ImpCheckToTopBtmPossible();
+/*N*/ ((SdrPolyEditView*)this)->ImpCheckPolyPossibilities();
+/*N*/ bPossibilitiesDirty=FALSE;
+/*N*/
+/*N*/ if (bReadOnly) {
+/*?*/ BOOL bMerker1=bGrpEnterPossible;
+/*?*/ ImpResetPossibilityFlags();
+/*?*/ bReadOnly=TRUE;
+/*?*/ bGrpEnterPossible=bMerker1;
+/*N*/ }
+/*N*/ 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;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef WIN
+
+
+
+
+ // nur nach dem 1. BegUndo oder vor dem letzten EndUndo:
+
+#endif
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdedtv2.cxx b/binfilter/bf_svx/source/svdraw/svx_svdedtv2.cxx
new file mode 100644
index 000000000000..6319bae5a4b8
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdedtv2.cxx
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdedtv.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+
+
+
+
+
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrEditView::ImpCheckToTopBtmPossible()
+/*N*/ {
+/*N*/ ULONG nAnz=aMark.GetMarkCount();
+/*N*/ if (nAnz==0) return;
+/*?*/ if (nAnz==1) { DBG_BF_ASSERT(0, "STRIP"); //STRIP001 // Sonderbehandlung fuer Einzelmarkierung
+/*N*/ } else {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 // Mehrfachselektion
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// #### #### ### # # ####
+// # # # # # # # # #
+// # ## #### # # # # ####
+// # # # # # # # # #
+// #### # # ### ### #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// # # # # #### #### ### # # ####
+// # # ## # # # # # # # # # #
+// # # # # # # ## #### # # # # ####
+// # # # ## # # # # # # # # #
+// ### # # #### # # ### ### #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrEditView::UnGroupMarked()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// ### ### # # # # ##### #### ##### ##### ### #### ### # # #
+// # # # # ## # # # # # # # # # # # # # # # # #
+// # # # # # # # # #### #### # # # # #### # # # #
+// # # # # # ## # # # # # # # # # # # # # #
+// ### ### # # # ##### # # # # ### # ### #### #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// # # ##### ##### ### ##### # # ##### # # # #### ### #### #####
+// ## ## # # # # # # # # # ## ## # # # # # # #
+// # # # #### # ##### ### # # #### ### # # # # #### # # #### #
+// # # # # # # # # # # # # # # # # # # #
+// # # ##### # # # # # #### ##### # # # # ### # # #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdedxv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdedxv.cxx
new file mode 100644
index 000000000000..b2a6770fe75d
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdedxv.cxx
@@ -0,0 +1,189 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "svdedxv.hxx"
+#include <bf_svtools/solar.hrc>
+#include <string.h>
+#include "svditext.hxx"
+#include "svdoutl.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+
+
+
+// #98988#
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrObjEditView::ImpClearVars()
+/*N*/ {
+/*N*/ bQuickTextEditMode=TRUE;
+/*N*/ bMacroMode=TRUE;
+/*N*/ pTextEditObj=NULL;
+/*N*/ pTextEditOutliner=NULL;
+/*N*/ pTextEditOutlinerView=NULL;
+/*N*/ pTextEditPV=NULL;
+/*N*/ pTextEditWin=NULL;
+/*N*/ pTextEditCursorMerker=NULL;
+/*N*/ pEditPara=NULL;
+/*N*/ bTextEditNewObj=FALSE;
+/*N*/ bMacroDown=FALSE;
+/*N*/ pMacroObj=NULL;
+/*N*/ pMacroPV=NULL;
+/*N*/ pMacroWin=NULL;
+/*N*/ nMacroTol=0;
+/*N*/ bTextEditDontDelete=FALSE;
+/*N*/ bTextEditOnlyOneView=FALSE;
+/*N*/ }
+
+/*N*/ SdrObjEditView::SdrObjEditView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrGlueEditView(pModel1,pOut)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ }
+
+/*N*/ SdrObjEditView::~SdrObjEditView()
+/*N*/ {
+/*N*/ pTextEditWin = NULL; // Damit es in EndTextEdit kein ShowCursor gibt
+/*N*/ if (IsTextEdit()){DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 EndTextEdit();
+/*N*/ if (pTextEditOutliner!=NULL) {
+/*?*/ delete pTextEditOutliner;
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ BOOL SdrObjEditView::IsAction() const
+/*N*/ {
+/*N*/ return IsMacroObj() || SdrGlueEditView::IsAction();
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObjEditView::BrkAction()
+/*N*/ {
+/*N*/ BrkMacroObj();
+/*N*/ SdrGlueEditView::BrkAction();
+/*N*/ }
+
+
+/*N*/ void __EXPORT SdrObjEditView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ SdrGlueEditView::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ // Printerwechsel waerend des Editierens
+/*N*/ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+/*N*/ 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#
+/*?*/ DBG_BF_ASSERT(0, "STRIP");
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjEditView::ModelHasChanged()
+/*N*/ {
+/*N*/ SdrGlueEditView::ModelHasChanged();
+/*N*/ if (IsTextEdit() && !pTextEditObj->IsInserted()) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 EndTextEdit(); // Objekt geloescht
+/*N*/ // TextEditObj geaendert?
+/*N*/ if (IsTextEdit()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@@ @@@@@ @@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@@@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+/*N*/ BOOL SdrObjEditView::BegTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
+/*N*/ SdrOutliner* pGivenOutliner, OutlinerView* pGivenOutlinerView,
+/*N*/ BOOL bDontDeleteOutliner, BOOL bOnlyOneView)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001
+/*N*/ }
+
+/*N*/ SdrEndTextEditKind SdrObjEditView::EndTextEdit(BOOL bDontDeleteReally)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");SdrEndTextEditKind eRet=SDRENDTEXTEDIT_UNCHANGED; return eRet; //STRIP001
+/*N*/ }
+
+/*N*/ void SdrObjEditView::DelWin(OutputDevice* pWin1)
+/*N*/ {
+/*N*/ SdrGlueEditView::DelWin(pWin1);
+/*N*/ if (pTextEditObj!=NULL && !bTextEditOnlyOneView && pWin1->GetOutDevType()==OUTDEV_WINDOW) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 for (ULONG i=pTextEditOutliner->GetViewCount(); i>0;) {
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@@@ @@@@ @@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@
+// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@
+// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@
+// @@@@@@@ @@@@@@ @@ @@@@@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@@@
+// @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@@ @@@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+/*N*/ void SdrObjEditView::BrkMacroObj()
+/*N*/ {
+/*N*/ if (pMacroObj!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdetc.cxx b/binfilter/bf_svx/source/svdraw/svx_svdetc.cxx
new file mode 100644
index 000000000000..affb6e9fdda2
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdetc.cxx
@@ -0,0 +1,632 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "forbiddencharacterstable.hxx"
+
+#include "svdetc.hxx"
+#include "svditext.hxx"
+#include "svdstr.hrc"
+#include "svdviter.hxx"
+#include "svdview.hxx"
+#include "svdoutl.hxx"
+
+#include <vcl/bmpacc.hxx>
+
+#include <eeitem.hxx>
+
+
+
+#include <bf_svtools/cacheoptions.hxx>
+
+
+
+
+
+
+
+
+#include "xflclit.hxx"
+
+#include "xflhtit.hxx"
+
+#include "xbtmpit.hxx"
+
+#include "xflgrit.hxx"
+
+#include "svdoole2.hxx"
+
+
+
+#include <bf_svtools/syslocale.hxx>
+
+// #97870#
+#include "xflbckit.hxx"
+
+#include <bf_goodies/b3dcolor.hxx>
+
+namespace binfilter {
+
+/******************************************************************************
+* Globale Daten der DrawingEngine
+******************************************************************************/
+
+/*N*/ SdrGlobalData::SdrGlobalData() :
+/*N*/ pOutliner(NULL),
+/*N*/ pDefaults(NULL),
+/*N*/ pResMgr(NULL),
+/*N*/ pStrCache(NULL),
+/*N*/ nExchangeFormat(0)
+/*N*/ {
+/*N*/ pSysLocale = new SvtSysLocale;
+/*N*/ pCharClass = pSysLocale->GetCharClassPtr();
+/*N*/ pLocaleData = pSysLocale->GetLocaleDataPtr();
+/*N*/ }
+
+/*N*/ SdrGlobalData::~SdrGlobalData()
+/*N*/ {
+/*N*/ delete pOutliner;
+/*N*/ delete pDefaults;
+/*N*/ delete pResMgr;
+/*N*/ delete [] pStrCache;
+/*N*/ //! do NOT delete pCharClass and pLocaleData
+/*N*/ delete pSysLocale;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ OLEObjCache::OLEObjCache()
+/*N*/ : Container( 0 )
+/*N*/ {
+/*N*/ SvtCacheOptions aCacheOptions;
+/*N*/
+/*N*/ nSize = aCacheOptions.GetDrawingEngineOLE_Objects();
+/*N*/ pTimer = new AutoTimer();
+/*N*/ Link aLink = LINK(this, OLEObjCache, UnloadCheckHdl);
+/*N*/
+/*N*/ pTimer->SetTimeoutHdl(aLink);
+/*N*/ pTimer->SetTimeout(20000);
+/*N*/ pTimer->Start();
+/*N*/
+/*N*/ aLink.Call(pTimer);
+/*N*/ }
+
+/*N*/ OLEObjCache::~OLEObjCache()
+/*N*/ {
+/*N*/ pTimer->Stop();
+/*N*/ delete pTimer;
+/*N*/ // Kein Unload notwendig, da zu diesem Zeitpunkt
+/*N*/ // die Objekte nicht mehr vorhanden sind
+/*N*/ }
+
+
+/*N*/ void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
+/*N*/ {
+/*N*/ if (nSize <= Count())
+/*N*/ {
+/*?*/ // 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);
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Objekt ggf. entfernen und an erster Position einfuegen
+/*N*/ Remove(pObj);
+/*N*/ Insert(pObj, (ULONG) 0L);
+/*N*/ }
+
+/*N*/ void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
+/*N*/ {
+/*N*/ UnloadObj( (SdrOle2Obj*) Remove(pObj) );
+/*N*/ }
+
+/*N*/ BOOL OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
+/*N*/ {
+/*N*/ BOOL bUnloaded = FALSE;
+/*N*/
+/*N*/ if (pObj)
+/*N*/ {
+/*N*/ BOOL bVisible = FALSE;
+/*N*/ SdrViewIter aIter(pObj);
+/*N*/ SdrView* pView = aIter.FirstView();
+/*N*/
+/*N*/ while (!bVisible && pView!=NULL)
+/*N*/ {
+/*?*/ bVisible = !pView->IsGrafDraft();
+/*?*/
+/*?*/ if (!bVisible)
+/*?*/ pView = aIter.NextView();
+/*N*/ }
+/*N*/
+/*N*/ if (!bVisible)
+/*N*/ bUnloaded = pObj->Unload();
+/*N*/ }
+/*N*/
+/*N*/ return bUnloaded;
+/*N*/ }
+
+/*N*/ IMPL_LINK(OLEObjCache, UnloadCheckHdl, AutoTimer*, pTim)
+/*N*/ {
+/*N*/ if (nSize <= Count())
+/*N*/ {
+/*?*/ // 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);
+/*?*/ }
+/*?*/ }
+/*N*/
+/*N*/ return 0;
+/*N*/ }
+
+
+
+/*N*/ void ContainerSorter::DoSort(ULONG a, ULONG b) const
+/*N*/ {
+/*N*/ ULONG nAnz=rCont.Count();
+/*N*/ if (b>nAnz) b=nAnz;
+/*N*/ if (b>0) b--;
+/*N*/ if (a<b) ImpSubSort(a,b);
+/*N*/ }
+
+
+/*?*/ 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 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; }
+/*?*/ };
+
+/*N*/ ImpSdrHdcMerk::ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode, FASTBOOL bAutoMerk):
+/*N*/ pFarbMerk(NULL),
+/*N*/ pClipMerk(NULL),
+/*N*/ pLineColorMerk(NULL),
+/*N*/ nMode(nNewMode)
+/*N*/ {
+/*N*/ if (bAutoMerk) Save(rOut);
+/*N*/ }
+
+/*N*/ ImpSdrHdcMerk::~ImpSdrHdcMerk()
+/*N*/ {
+/*N*/ if (pFarbMerk!=NULL) delete pFarbMerk;
+/*N*/ if (pClipMerk!=NULL) delete pClipMerk;
+/*N*/ if (pLineColorMerk !=NULL) delete pLineColorMerk;
+/*N*/ }
+
+/*N*/ void ImpSdrHdcMerk::Save(const OutputDevice& rOut)
+/*N*/ {
+/*N*/ if (pFarbMerk!=NULL)
+/*N*/ {
+/*N*/ delete pFarbMerk;
+/*N*/ pFarbMerk=NULL;
+/*N*/ }
+/*N*/ if (pClipMerk!=NULL)
+/*N*/ {
+/*N*/ delete pClipMerk;
+/*N*/ pClipMerk=NULL;
+/*N*/ }
+/*N*/ if (pLineColorMerk !=NULL)
+/*N*/ {
+/*N*/ delete pLineColorMerk ;
+/*N*/ pLineColorMerk =NULL;
+/*N*/ }
+/*N*/ if ((nMode & SDRHDC_SAVECLIPPING) ==SDRHDC_SAVECLIPPING)
+/*N*/ pClipMerk=new ImpClipMerk(rOut);
+/*N*/
+/*N*/ USHORT nCol=nMode & SDRHDC_SAVEPENANDBRUSHANDFONT;
+/*N*/
+/*N*/ if (nCol==SDRHDC_SAVEPEN)
+/*N*/ pLineColorMerk=new Color( rOut.GetLineColor() );
+/*N*/ else if (nCol==SDRHDC_SAVEPENANDBRUSHANDFONT)
+/*N*/ pFarbMerk=new ImpColorMerk(rOut);
+/*N*/ else if (nCol!=0)
+/*N*/ pFarbMerk=new ImpColorMerk(rOut,nCol);
+/*N*/ }
+
+/*N*/ void ImpSdrHdcMerk::Restore(OutputDevice& rOut, USHORT nMask) const
+/*N*/ {
+/*N*/ nMask&=nMode; // nur restaurieren, was auch gesichert wurde
+/*N*/
+/*N*/ if ((nMask & SDRHDC_SAVECLIPPING) ==SDRHDC_SAVECLIPPING && pClipMerk!=NULL)
+/*N*/ pClipMerk->Restore(rOut);
+/*N*/
+/*N*/ USHORT nCol=nMask & SDRHDC_SAVEPENANDBRUSHANDFONT;
+/*N*/
+/*N*/ if (nCol==SDRHDC_SAVEPEN)
+/*N*/ {
+/*N*/ if (pLineColorMerk!=NULL)
+/*N*/ rOut.SetLineColor(*pLineColorMerk);
+/*N*/ else if (pFarbMerk!=NULL)
+/*N*/ rOut.SetLineColor( pFarbMerk->GetLineColor() );
+/*N*/ } else if (nCol!=0 && pFarbMerk!=NULL)
+/*N*/ pFarbMerk->Restore(rOut,nCol);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrLinkList::Clear()
+/*N*/ {
+/*N*/ unsigned nAnz=GetLinkCount();
+/*N*/ for (unsigned i=0; i<nAnz; i++) {
+/*N*/ delete (Link*)aList.GetObject(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+/*N*/ unsigned SdrLinkList::FindEntry(const Link& rLink) const
+/*N*/ {
+/*N*/ unsigned nAnz=GetLinkCount();
+/*N*/ for (unsigned i=0; i<nAnz; i++) {
+/*N*/ if (GetLink(i)==rLink) return i;
+/*N*/ }
+/*N*/ return 0xFFFF;
+/*N*/ }
+
+/*N*/ void SdrLinkList::InsertLink(const Link& rLink, unsigned nPos)
+/*N*/ {
+/*N*/ unsigned nFnd=FindEntry(rLink);
+/*N*/ if (nFnd==0xFFFF) {
+/*N*/ if (rLink.IsSet()) {
+/*N*/ aList.Insert(new Link(rLink),nPos);
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrLinkList::InsertLink(): Versuch, einen nicht gesetzten Link einzufuegen");
+/*N*/ }
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrLinkList::InsertLink(): Link schon vorhanden");
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ void SdrLinkList::RemoveLink(const Link& rLink)
+/*N*/ {
+/*N*/ unsigned nFnd=FindEntry(rLink);
+/*N*/ if (nFnd!=0xFFFF) {
+/*N*/ Link* pLink=(Link*)aList.Remove(nFnd);
+/*N*/ delete pLink;
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrLinkList::RemoveLink(): Link nicht gefunden");
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// #98988# Re-implement GetDraftFillColor(...)
+
+/*N*/ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
+/*N*/ {
+/*N*/ XFillStyle eFill=((XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE)).GetValue();
+/*N*/ FASTBOOL bRetval(FALSE);
+/*N*/
+/*N*/ switch(eFill)
+/*N*/ {
+/*N*/ case XFILL_SOLID:
+/*N*/ {
+/*N*/ rCol = ((XFillColorItem&)rSet.Get(XATTR_FILLCOLOR)).GetValue();
+/*N*/ bRetval = TRUE;
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ case XFILL_HATCH:
+/*N*/ {
+/*?*/ Color aCol1(((XFillHatchItem&)rSet.Get(XATTR_FILLHATCH)).GetValue().GetColor());
+/*?*/ Color aCol2(COL_WHITE);
+/*?*/
+/*?*/ // #97870# when hatch background is activated, use object fill color as hatch color
+/*?*/ sal_Bool bFillHatchBackground = ((const XFillBackgroundItem&)(rSet.Get(XATTR_FILLBACKGROUND))).GetValue();
+/*?*/ if(bFillHatchBackground)
+/*?*/ {
+/*?*/ aCol2 = ((const XFillColorItem&)(rSet.Get(XATTR_FILLCOLOR))).GetValue();
+/*?*/ }
+/*?*/
+/*?*/ ((B3dColor&)rCol).CalcMiddle(aCol1, aCol2);
+/*?*/ bRetval = TRUE;
+/*?*/
+/*?*/ break;
+/*N*/ }
+/*N*/ case XFILL_GRADIENT: {
+/*N*/ const XGradient& rGrad=((XFillGradientItem&)rSet.Get(XATTR_FILLGRADIENT)).GetValue();
+/*N*/ Color aCol1(rGrad.GetStartColor());
+/*N*/ Color aCol2(rGrad.GetEndColor());
+/*N*/ ((B3dColor&)rCol).CalcMiddle(aCol1, aCol2);
+/*N*/ bRetval = TRUE;
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ case XFILL_BITMAP:
+/*N*/ {
+/*?*/ const Bitmap& rBitmap = ((XFillBitmapItem&)rSet.Get(XATTR_FILLBITMAP)).GetValue().GetBitmap();
+/*?*/ const Size aSize(rBitmap.GetSizePixel());
+/*?*/ const sal_uInt32 nWidth = aSize.Width();
+/*?*/ const sal_uInt32 nHeight = aSize.Height();
+/*?*/ Bitmap aBitmap(rBitmap);
+/*?*/ BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess();
+/*?*/
+/*?*/ if(pAccess && nWidth > 0 && nHeight > 0)
+/*?*/ {
+/*?*/ sal_uInt32 nRt(0L);
+/*?*/ sal_uInt32 nGn(0L);
+/*?*/ sal_uInt32 nBl(0L);
+/*?*/ const sal_uInt32 nMaxSteps(8L);
+/*?*/ const sal_uInt32 nXStep((nWidth > nMaxSteps) ? nWidth / nMaxSteps : 1L);
+/*?*/ const sal_uInt32 nYStep((nHeight > nMaxSteps) ? nHeight / nMaxSteps : 1L);
+/*?*/ sal_uInt32 nAnz(0L);
+/*?*/
+/*?*/ for(sal_uInt32 nY(0L); nY < nHeight; nY += nYStep)
+/*?*/ {
+/*?*/ for(sal_uInt32 nX(0L); nX < nWidth; nX += nXStep)
+/*?*/ {
+/*?*/ const BitmapColor& rCol = (pAccess->HasPalette())
+/*?*/ ? pAccess->GetPaletteColor((BYTE)pAccess->GetPixel(nY, nX))
+/*?*/ : pAccess->GetPixel(nY, nX);
+/*?*/
+/*?*/ nRt += rCol.GetRed();
+/*?*/ nGn += rCol.GetGreen();
+/*?*/ nBl += rCol.GetBlue();
+/*?*/ nAnz++;
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ nRt /= nAnz;
+/*?*/ nGn /= nAnz;
+/*?*/ nBl /= nAnz;
+/*?*/
+/*?*/ rCol = Color(UINT8(nRt), UINT8(nGn), UINT8(nBl));
+/*?*/
+/*?*/ bRetval = TRUE;
+/*?*/ }
+/*?*/
+/*?*/ if(pAccess)
+/*?*/ {
+/*?*/ aBitmap.ReleaseAccess(pAccess);
+/*?*/ }
+/*?*/
+/*?*/ break;
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bRetval;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrEngineDefaults::SdrEngineDefaults():
+/*N*/ aFontName( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ).GetName() ),
+/*N*/ eFontFamily(FAMILY_ROMAN),
+/*N*/ aFontColor(COL_AUTO),
+/*N*/ nFontHeight(847), // 847/100mm = ca. 24 Point
+/*N*/ eMapUnit(MAP_100TH_MM),
+/*N*/ aMapFraction(1,1)
+/*N*/ {
+/*N*/ }
+/*N*/
+/*N*/ SdrEngineDefaults& SdrEngineDefaults::GetDefaults()
+/*N*/ {
+/*N*/ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+/*N*/ if (rGlobalData.pDefaults==NULL) {
+/*N*/ rGlobalData.pDefaults=new SdrEngineDefaults;
+/*N*/ }
+/*N*/ return *rGlobalData.pDefaults;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrOutliner* SdrMakeOutliner( USHORT nOutlinerMode, SdrModel* pModel )
+/*N*/ {
+/*N*/ 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);
+*/
+
+/*N*/ SfxItemPool* pPool = &pModel->GetItemPool();
+/*N*/ SdrOutliner* pOutl = new SdrOutliner( pPool, nOutlinerMode );
+/*N*/ pOutl->SetEditTextObjectPool( pPool );
+/*N*/ pOutl->SetStyleSheetPool( (SfxStyleSheetPool*) pModel->GetStyleSheetPool() );
+/*N*/ pOutl->SetDefTab( pModel->GetDefaultTabulator() );
+/*N*/ pOutl->SetForbiddenCharsTable( pModel->GetForbiddenCharsTable() );
+/*N*/ pOutl->SetAsianCompressionMode( pModel->GetCharCompressType() );
+/*N*/ pOutl->SetKernAsianPunctuation( pModel->IsKernAsianPunctuation() );
+/*N*/
+/*N*/ return pOutl;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ SdrLinkList& ImpGetUserMakeObjHdl()
+/*N*/ {
+/*N*/ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+/*N*/ return rGlobalData.aUserMakeObjHdl;
+/*N*/ }
+
+/*N*/ SdrLinkList& ImpGetUserMakeObjUserDataHdl()
+/*N*/ {
+/*N*/ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+/*N*/ return rGlobalData.aUserMakeObjUserDataHdl;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ ResMgr* ImpGetResMgr()
+/*N*/ {
+/*N*/ SdrGlobalData& rGlobalData = GetSdrGlobalData();
+/*N*/
+/*N*/ if(!rGlobalData.pResMgr)
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ByteString aName("bf_svx"); //STRIP005
+/*N*/ #else
+/*N*/ ByteString aName("bf_svl"); //STRIP005
+/*N*/ #endif
+/*N*/ rGlobalData.pResMgr =
+/*N*/ ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILocale() );
+/*N*/ }
+/*N*/
+/*N*/ return rGlobalData.pResMgr;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdglev.cxx b/binfilter/bf_svx/source/svdraw/svx_svdglev.cxx
new file mode 100644
index 000000000000..f7b7c32caabb
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdglev.cxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdglev.hxx"
+#include <math.h>
+
+#include "svdstr.hrc" // Namen aus der Resource
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrGlueEditView::ImpClearVars()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrGlueEditView::SdrGlueEditView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrPolyEditView(pModel1,pOut)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ }
+
+/*N*/ SdrGlueEditView::~SdrGlueEditView()
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdglue.cxx b/binfilter/bf_svx/source/svdraw/svx_svdglue.cxx
new file mode 100644
index 000000000000..c8f74c55777d
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdglue.cxx
@@ -0,0 +1,225 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "svdobj.hxx"
+#include "svdio.hxx"
+#include "svdtrans.hxx"
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
+/*N*/ {
+/*N*/ if (bReallyAbsolute) return aPos;
+/*N*/ Rectangle aSnap(rObj.GetSnapRect());
+/*N*/ Rectangle aBound(rObj.GetSnapRect());
+/*N*/ Point aPt(aPos);
+/*N*/
+/*N*/ Point aOfs(aSnap.Center());
+/*N*/ switch (GetHorzAlign()) {
+/*?*/ case SDRHORZALIGN_LEFT : aOfs.X()=aSnap.Left(); break;
+/*?*/ case SDRHORZALIGN_RIGHT : aOfs.X()=aSnap.Right(); break;
+/*N*/ }
+/*N*/ switch (GetVertAlign()) {
+/*?*/ case SDRVERTALIGN_TOP : aOfs.Y()=aSnap.Top(); break;
+/*?*/ case SDRVERTALIGN_BOTTOM: aOfs.Y()=aSnap.Bottom(); break;
+/*N*/ }
+/*N*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ aPt+=aOfs;
+/*N*/ // Und nun auf's BoundRect des Objekts begrenzen
+/*N*/ if (aPt.X()<aBound.Left ()) aPt.X()=aBound.Left ();
+/*N*/ if (aPt.X()>aBound.Right ()) aPt.X()=aBound.Right ();
+/*N*/ if (aPt.Y()<aBound.Top ()) aPt.Y()=aBound.Top ();
+/*N*/ if (aPt.Y()>aBound.Bottom()) aPt.Y()=aBound.Bottom();
+/*N*/ return aPt;
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*?*/ 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;
+/*?*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrGluePointList::Clear()
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ delete GetObject(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+
+// 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.
+/*N*/ USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP)
+/*N*/ {
+/*N*/ SdrGluePoint* pGP=new SdrGluePoint(rGP);
+/*N*/ USHORT nId=pGP->GetId();
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ USHORT nInsPos=nAnz;
+/*N*/ USHORT nLastId=nAnz!=0 ? GetObject(nAnz-1)->GetId() : 0;
+/*N*/ DBG_ASSERT(nLastId>=nAnz,"SdrGluePointList::Insert(): nLastId<nAnz");
+/*N*/ FASTBOOL bHole=nLastId>nAnz;
+/*N*/ if (nId<=nLastId) {
+/*N*/ if (!bHole || nId==0) {
+/*N*/ nId=nLastId+1;
+/*N*/ } else {
+/*N*/ FASTBOOL bBrk=FALSE;
+/*N*/ for (USHORT nNum=0; nNum<nAnz && !bBrk; nNum++) {
+/*N*/ const SdrGluePoint* pGP=GetObject(nNum);
+/*N*/ USHORT nTmpId=pGP->GetId();
+/*N*/ if (nTmpId==nId) {
+/*N*/ nId=nLastId+1; // bereits vorhanden
+/*N*/ bBrk=TRUE;
+/*N*/ }
+/*N*/ if (nTmpId>nId) {
+/*N*/ nInsPos=nNum; // Hier einfuegen (einsortieren)
+/*N*/ bBrk=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ pGP->SetId(nId);
+/*N*/ }
+/*N*/ aList.Insert(pGP,nInsPos);
+/*N*/ return nInsPos;
+/*N*/ }
+
+
+
+/*N*/ USHORT SdrGluePointList::FindGluePoint(USHORT nId) const
+/*N*/ {
+/*N*/ // Hier noch einen optimaleren Suchalgorithmus implementieren.
+/*N*/ // Die Liste sollte stets sortiert sein!!!!
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ USHORT nRet=SDRGLUEPOINT_NOTFOUND;
+/*N*/ for (USHORT nNum=0; nNum<nAnz && nRet==SDRGLUEPOINT_NOTFOUND; nNum++) {
+/*N*/ const SdrGluePoint* pGP=GetObject(nNum);
+/*N*/ if (pGP->GetId()==nId) nRet=nNum;
+/*N*/ }
+/*N*/ return nRet;
+/*N*/ }
+
+
+
+
+
+
+
+/*?*/ 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;
+/*?*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdhdl.cxx b/binfilter/bf_svx/source/svdraw/svx_svdhdl.cxx
new file mode 100644
index 000000000000..e71b4839c2c8
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdhdl.cxx
@@ -0,0 +1,177 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdetc.hxx"
+#include "svdmrkv.hxx"
+
+
+
+
+
+
+
+#include "svdstr.hrc"
+
+
+// #105678#
+namespace binfilter {
+
+/*N*/ SdrHdl::~SdrHdl()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ class ImpSdrHdlListSorter: public ContainerSorter {
+/*N*/ public:
+/*N*/ ImpSdrHdlListSorter(Container& rNewCont): ContainerSorter(rNewCont) {}
+/*N*/ virtual int Compare(const void* pElem1, const void* pElem2) const;
+/*N*/ };
+
+/*N*/ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// #97016# II
+
+/*N*/ class ImplHdlListData
+/*N*/ {
+/*N*/ public:
+/*N*/ sal_uInt32 mnFocusIndex;
+/*N*/ SdrMarkView* pView;
+/*N*/
+/*N*/ ImplHdlListData(SdrMarkView* pV): mnFocusIndex(CONTAINER_ENTRY_NOTFOUND), pView(pV) {}
+/*N*/ };
+
+
+// #105678# Help struct for re-sorting handles
+struct ImplHdlAndIndex
+{
+ SdrHdl* mpHdl;
+ sal_uInt32 mnIndex;
+};
+
+// #105678# Help method for sorting handles taking care of OrdNums, keeping order in
+// single objects and re-sorting polygon handles intuitively
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// #97016# II
+
+
+/*N*/ SdrHdl* SdrHdlList::GetFocusHdl() const
+/*N*/ {
+/*N*/ if(pImpl->mnFocusIndex != CONTAINER_ENTRY_NOTFOUND && pImpl->mnFocusIndex < GetHdlCount())
+/*?*/ return GetHdl(pImpl->mnFocusIndex);
+/*N*/ else
+/*?*/ return 0L;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrHdlList::SdrHdlList(SdrMarkView* pV)
+/*N*/ : aList(1024,32,32),
+/*N*/ pImpl(new ImplHdlListData(pV))
+/*N*/ //#97016# II
+/*N*/ //pView(pV)
+/*N*/ {
+/*N*/ nHdlSize = 3;
+/*N*/ bRotateShear = FALSE;
+/*N*/ bMoveOutside = FALSE;
+/*N*/ bDistortShear = FALSE;
+/*N*/ bFineHandles = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ SdrHdlList::~SdrHdlList()
+/*N*/ {
+/*N*/ Clear();
+/*N*/ //#97016# II
+/*N*/ delete pImpl;
+/*N*/ }
+
+
+
+/*N*/ void SdrHdlList::SetRotateShear(BOOL bOn)
+/*N*/ {
+/*N*/ bRotateShear = bOn;
+/*N*/ }
+
+/*N*/ void SdrHdlList::SetDistortShear(BOOL bOn)
+/*N*/ {
+/*N*/ bDistortShear = bOn;
+/*N*/ }
+
+/*N*/ void SdrHdlList::SetFineHdl(BOOL bOn)
+/*N*/ {
+/*N*/ if(bFineHandles != bOn)
+/*N*/ {
+/*N*/ // remember new state
+/*N*/ bFineHandles = bOn;
+/*N*/
+/*N*/ // propagate change to IAOs
+/*N*/ for(UINT32 i=0; i<GetHdlCount(); i++)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrHdlList::Clear()
+/*N*/ {
+/*N*/ for (ULONG i=0; i<GetHdlCount(); i++)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/
+/*N*/ // immediately remove from display
+//STRIP012/*N*/ if(pImpl->pView)
+//STRIP012/*N*/ pImpl->pView->RefreshAllIAOManagers();
+/*N*/
+/*N*/ bRotateShear=FALSE;
+/*N*/ bDistortShear=FALSE;
+/*N*/ }
+
+/*N*/ void SdrHdlList::Sort()
+/*N*/ {
+/*N*/ // #97016# II: remember current focused handle
+/*N*/ SdrHdl* pPrev = GetFocusHdl();
+/*N*/
+/*N*/ ImpSdrHdlListSorter aSort(aList);
+/*N*/ aSort.DoSort();
+
+ // #97016# II: get now and compare
+/*N*/ SdrHdl* pNow = GetFocusHdl();
+/*N*/
+/*N*/ if(pPrev != pNow)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdhlpln.cxx b/binfilter/bf_svx/source/svdraw/svx_svdhlpln.cxx
new file mode 100644
index 000000000000..df59f5eed3b0
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdhlpln.cxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdhlpln.hxx"
+#include "svdio.hxx"
+
+
+
+#include <vcl/window.hxx>
+
+namespace binfilter {
+
+/*?*/ SvStream& operator<<(SvStream& rOut, const SdrHelpLine& rHL)
+/*?*/ {
+/*?*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOHlpLID);
+/*?*/ rOut<<UINT16(rHL.eKind);
+/*?*/ rOut<<rHL.aPos;
+/*?*/ return rOut;
+/*?*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrHelpLine& rHL)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ UINT16 nDum;
+/*N*/ rIn>>nDum;
+/*N*/ rHL.eKind=(SdrHelpLineKind)nDum;
+/*N*/ rIn>>rHL.aPos;
+/*N*/ return rIn;
+/*N*/ }
+
+/*N*/ void SdrHelpLineList::Clear()
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ delete GetObject(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+/*N*/ void SdrHelpLineList::operator=(const SdrHelpLineList& rSrcList)
+/*N*/ {
+/*N*/ Clear();
+/*N*/ USHORT nAnz=rSrcList.GetCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ Insert(rSrcList[i]);
+/*N*/ }
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrHelpLineList& rHLL)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOHLstID);
+/*N*/ USHORT nAnz=rHLL.GetCount();
+/*N*/ rOut<<nAnz;
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ rOut<<rHLL[i];
+/*N*/ }
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrHelpLineList& rHLL)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ rHLL.Clear();
+/*N*/ USHORT nAnz;
+/*N*/ rIn>>nAnz;
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ SdrHelpLine* pHL=new SdrHelpLine;
+/*N*/ rIn>>*pHL;
+/*N*/ rHLL.aList.Insert(pHL,CONTAINER_APPEND);
+/*N*/ }
+/*N*/ return rIn;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdio.cxx b/binfilter/bf_svx/source/svdraw/svx_svdio.cxx
new file mode 100644
index 000000000000..0eaf4a73bf1c
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdio.cxx
@@ -0,0 +1,647 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+
+#include "svdio.hxx"
+#include "svdobj.hxx"
+#include <osl/endian.h>
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ SdrIOHeader::SdrIOHeader(SvStream& rNewStream, UINT16 nNewMode, const char cID[2],
+/*N*/ BOOL bAutoOpen)
+/*N*/ : rStream(rNewStream)
+/*N*/ {
+/*N*/ nFilePos = 0;
+/*N*/ nMode = nNewMode;
+/*N*/ bOpen = FALSE;
+/*N*/ bClosed = FALSE;
+/*N*/ bLookAhead = FALSE;
+/*N*/ SetID(cID);
+/*N*/ nVersion = nAktSdrFileVersion;
+/*N*/ nBlkSize = 0;
+/*N*/ SetMagic();
+/*N*/
+/*N*/ if(bAutoOpen)
+/*N*/ {
+/*N*/ OpenRecord();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrIOHeader::~SdrIOHeader()
+/*N*/ {
+/*N*/ if(bOpen && !bClosed && !bLookAhead)
+/*N*/ CloseRecord();
+/*N*/ }
+
+/*N*/ void SdrIOHeader::OpenRecord()
+/*N*/ {
+/*N*/ if(rStream.GetError())
+/*?*/ return;
+/*N*/
+/*N*/ DBG_ASSERT(!bClosed,"SdrIOHeader::OpenRecord(): Record ist bereits geschlossen.");
+/*N*/ DBG_ASSERT(!bOpen,"SdrIOHeader::OpenRecord(): Record ist bereits geoeffnet.");
+/*N*/
+/*N*/ // Fileposition des Records merken
+/*N*/ nFilePos = rStream.Tell();
+/*N*/
+/*N*/ if(nMode==STREAM_READ)
+/*N*/ {
+/*N*/ // RecordHeader lesen
+/*N*/ Read();
+/*N*/ }
+/*N*/ else if(nMode == STREAM_WRITE)
+/*N*/ {
+/*N*/ // Platz fuer RecordHeader schaffen
+/*N*/ Write();
+/*N*/ }
+/*N*/ else
+/*N*/ DBG_ERROR("SdrIOHeader::OpenRecord(): Falscher StreamMode angegeben.");
+/*N*/
+/*N*/ bOpen = TRUE;
+/*N*/
+/*N*/ // Endemarke wird sofort geschlossen.
+/*N*/ if(IsEnde() && !bLookAhead)
+/*N*/ CloseRecord();
+/*N*/
+/*N*/ if(bLookAhead)
+/*N*/ rStream.Seek(nFilePos);
+/*N*/ }
+
+/*N*/ void SdrIOHeader::CloseRecord()
+/*N*/ {
+/*N*/ if(rStream.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ if(bLookAhead)
+/*N*/ {
+/*?*/ rStream.Seek(nFilePos);
+/*?*/ DBG_ERROR("SdrIOHeader::CloseRecord(): CloseRecord im Modus LookAhead.");
+/*?*/ return;
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT(!bClosed,"SdrIOHeader::CloseRecord(): Record ist bereits geschlossen.");
+/*N*/ DBG_ASSERT(bOpen || bClosed,"SdrIOHeader::CloseRecord(): Record ist noch nicht geoeffnet.");
+/*N*/
+/*N*/ UINT32 nAktPos(rStream.Tell());
+/*N*/
+/*N*/ if(nMode == STREAM_READ)
+/*N*/ {
+/*N*/ UINT32 nReadAnz(nAktPos - nFilePos);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ ImpCheckRecordIntegrity();
+/*N*/ #endif
+/*N*/
+/*N*/ if(nReadAnz != nBlkSize)
+/*N*/ {
+/*N*/ // FilePos korregieren
+/*N*/ rStream.Seek(nFilePos + nBlkSize);
+/*N*/ }
+/*N*/ }
+/*N*/ else if(nMode == STREAM_WRITE)
+/*N*/ {
+/*N*/ // Groesse dieses Records (inkl. der Header)
+/*N*/ nBlkSize = nAktPos - nFilePos;
+/*N*/ // an den Anfang des Records
+/*N*/ rStream.Seek(nFilePos);
+/*N*/ // Header rausschreiben.
+/*N*/ Write();
+/*N*/ // und die FilePos restaurieren.
+/*N*/ rStream.Seek(nAktPos);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ ImpCheckRecordIntegrity();
+/*N*/ #endif
+/*N*/ }
+/*N*/ else
+/*N*/ DBG_ERROR("SdrIOHeader::CloseRecord(): Falscher StreamMode angegeben.");
+/*N*/
+/*N*/ bOpen = FALSE;
+/*N*/ bClosed = TRUE;
+/*N*/ }
+
+/*N*/ void SdrIOHeader::Write()
+/*N*/ {
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nVersion=SWAPSHORT(nVersion);
+/*N*/ nBlkSize=SWAPLONG (nBlkSize);
+/*N*/ #endif
+/*N*/
+/*N*/ rStream.Write(cMagic, 4);
+/*N*/
+/*N*/ if(!IsEnde())
+/*N*/ {
+/*N*/ rStream.Write((char*)&nVersion, 2);
+/*N*/ rStream.Write((char*)&nBlkSize, 4);
+/*N*/ }
+/*N*/
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nVersion=SWAPSHORT(nVersion);
+/*N*/ nBlkSize=SWAPLONG (nBlkSize);
+/*N*/ #endif
+/*N*/ }
+
+
+/*N*/ void SdrIOHeader::Read()
+/*N*/ {
+/*N*/ rStream.Read(cMagic, 4);
+/*N*/
+/*N*/ if(!IsEnde())
+/*N*/ {
+/*N*/ rStream.Read((char*)&nVersion, 2);
+/*N*/ rStream.Read((char*)&nBlkSize, 4);
+/*N*/
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nVersion=SWAPSHORT(nVersion);
+/*N*/ nBlkSize=SWAPLONG (nBlkSize);
+/*N*/ #endif
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nBlkSize = 4;
+/*N*/ }
+/*N*/ }
+
+/*N*/ UINT32 SdrIOHeader::GetBytesLeft() const
+/*N*/ {
+/*N*/ if(nMode == STREAM_READ)
+/*N*/ {
+/*N*/ UINT32 nAktPos(rStream.Tell());
+/*N*/ UINT32 nReadAnz(nAktPos - nFilePos);
+/*N*/
+/*N*/ if(nReadAnz <= nBlkSize)
+/*N*/ return nBlkSize - nReadAnz;
+/*N*/ else
+/*N*/ // Fehler, zuviel gelesen!
+/*N*/ return 0;
+/*N*/ }
+/*N*/ else
+/*?*/ return 0;
+/*N*/ }
+
+#ifdef DBG_UTIL
+
+/*N*/ void SdrIOHeader::ImpGetRecordName(ByteString& rStr, INT32 nSubRecCount,
+/*N*/ INT32 nSubRecReadCount) const
+/*N*/ {
+/*N*/ rStr = "CheckRecordIntegrity (ID=";
+/*N*/ rStr += cMagic[0];
+/*N*/ rStr += cMagic[1];
+/*N*/ rStr += cHdrID[0];
+/*N*/ rStr += cHdrID[1];
+/*N*/ rStr += ')';
+/*N*/
+/*N*/ if(nSubRecCount != -1)
+/*N*/ {
+/*N*/ rStr += " (";
+/*N*/
+/*N*/ if(nSubRecReadCount != -1)
+/*N*/ {
+/*N*/ rStr += ByteString::CreateFromInt32( nSubRecReadCount );
+/*N*/ rStr += " von ";
+/*N*/ rStr += ByteString::CreateFromInt32( nSubRecCount );
+/*N*/ rStr += " Records gelesen)";
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rStr += ByteString::CreateFromInt32( nSubRecCount );
+/*N*/ rStr += " Records)";
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrIOHeader::ImpHasSubRecords() const
+/*N*/ {
+/*N*/ // nicht jeder Record hat SubRecords
+/*N*/ return IsID(SdrIOModlID) ||
+/*N*/ IsID(SdrIOPageID) ||
+/*N*/ IsID(SdrIOMaPgID) ||
+/*N*/ IsID(SdrIODObjID);
+/*N*/ }
+
+// Testet die Integritaet eines Records. Innerhalb eines Records
+// muessen alle Daten in Subrecords (SdrDownCompat) untergebracht sein.
+
+/*N*/ void SdrIOHeader::ImpCheckRecordIntegrity()
+/*N*/ {
+/*N*/ UINT32 nFilePos0(rStream.Tell());
+/*N*/
+/*N*/ if(IsMagic() && ImpHasSubRecords())
+/*N*/ {
+/*N*/ // nicht jeder Record hat SubRecords
+/*N*/ // Seek an den Recordanfang
+/*N*/ rStream.Seek(nFilePos);
+/*N*/ Read();
+/*N*/
+/*N*/ // Anzahl der vorhandenen SubRecords
+/*N*/ UINT32 nHasSubRecCount(0);
+/*N*/ // Anzahl der SubRecords bis nFilePos0
+/*N*/ UINT32 nReadSubRecCount(0);
+/*N*/ UINT32 nAktFilePos(rStream.Tell());
+/*N*/ BOOL bFilePos0Hit(nAktFilePos == nFilePos0);
+/*N*/
+/*N*/ while(!rStream.GetError() && !rStream.IsEof() && nAktFilePos < nFilePos + nBlkSize)
+/*N*/ {
+/*N*/ UINT32 nSubRecSiz;
+/*N*/
+/*N*/ nHasSubRecCount++;
+/*N*/ rStream >> nSubRecSiz;
+/*N*/ nAktFilePos += nSubRecSiz;
+/*N*/ rStream.Seek(nAktFilePos);
+/*N*/
+/*N*/ if(nAktFilePos <= nFilePos0)
+/*N*/ nReadSubRecCount++;
+/*N*/
+/*N*/ if(nAktFilePos == nFilePos0)
+/*N*/ // Aha, nFilePos0 ist ok.
+/*N*/ bFilePos0Hit = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ ByteString aStr;
+/*N*/
+/*N*/ if(nAktFilePos != nFilePos+nBlkSize)
+/*N*/ aStr += "- SubRecord-Strukturfehler.\n";
+/*N*/
+/*N*/ if(nFilePos0 > nAktFilePos)
+/*N*/ {
+/*?*/ UINT32 nToMuch(nFilePos0 - nAktFilePos);
+/*?*/
+/*?*/ aStr += "- ";
+/*?*/
+/*?*/ if(nToMuch == 1)
+/*?*/ aStr += "1 Byte";
+/*?*/ else
+/*?*/ {
+/*?*/ aStr += ByteString::CreateFromInt32( nToMuch );
+/*?*/ aStr += " Bytes";
+/*?*/ }
+/*?*/
+/*?*/ aStr += " zuviel gelesen.\n";
+/*N*/ }
+
+/*N*/ if(!bFilePos0Hit)
+/*N*/ aStr += "- Aktuelle Fileposition liegt nicht am Ende eines SubRecords.\n";
+/*N*/
+/*N*/ if(aStr.Len())
+/*N*/ {
+/*?*/ ByteString aStr2;
+/*?*/
+/*?*/ aStr.Insert(":\n", 0);
+/*?*/ ImpGetRecordName(aStr2, nHasSubRecCount, nReadSubRecCount);
+/*?*/ aStr.Insert(aStr2, 0);
+/*?*/ DBG_ERROR(aStr.GetBuffer());
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // keine SubRecords vorhanden, also nur FilePos pruefen
+/*N*/ if(nFilePos0 > nFilePos + nBlkSize)
+/*N*/ {
+/*?*/ ByteString aStr;
+/*?*/ UINT32 nToMuch(nFilePos0 - nFilePos+nBlkSize);
+/*?*/
+/*?*/ ImpGetRecordName(aStr);
+/*?*/ aStr += ":\nAus dem Record wurde";
+/*?*/
+/*?*/ if(nToMuch == 1)
+/*?*/ aStr += "1 Byte";
+/*?*/ else
+/*?*/ {
+/*?*/ aStr += "n ";
+/*?*/ aStr += ByteString::CreateFromInt32( nToMuch );
+/*?*/ aStr += " Bytes";
+/*?*/ }
+/*?*/
+/*?*/ aStr += " zuviel gelesen. FilePos wird korregiert";
+/*?*/
+/*?*/ DBG_ERROR(aStr.GetBuffer());
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Fileposition restaurieren
+/*N*/ rStream.Seek(nFilePos0);
+/*N*/ }
+#endif
+
+/*N*/ SdrIOHeaderLookAhead::SdrIOHeaderLookAhead(SvStream& rNewStream, BOOL bAutoOpen)
+/*N*/ : SdrIOHeader(rNewStream, STREAM_READ, SdrIOEndeID, FALSE)
+/*N*/ {
+/*N*/ bLookAhead = TRUE;
+/*N*/
+/*N*/ if(bAutoOpen)
+/*N*/ {
+/*N*/ OpenRecord();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObjIOHeader::SdrObjIOHeader(SvStream& rNewStream, UINT16 nNewMode,
+/*N*/ const SdrObject* pNewObj, BOOL bAutoOpen)
+/*N*/ : SdrIOHeader(rNewStream, nNewMode, SdrIODObjID, FALSE),
+/*N*/ pObj(pNewObj)
+/*N*/ {
+/*N*/ if(pNewObj)
+/*N*/ {
+/*N*/ nInventor = pNewObj->GetObjInventor();
+/*N*/ nIdentifier = pNewObj->GetObjIdentifier();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nInventor = 0;
+/*N*/ nIdentifier = 0;
+/*N*/ }
+/*N*/
+/*N*/ if(bAutoOpen)
+/*N*/ {
+/*N*/ OpenRecord();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObjIOHeader::~SdrObjIOHeader()
+/*N*/ {
+/*N*/ if(bOpen && !bClosed && !bLookAhead)
+/*N*/ CloseRecord();
+/*N*/ }
+
+/*N*/ void SdrObjIOHeader::Write()
+/*N*/ {
+/*N*/ SdrIOHeader::Write();
+/*N*/
+/*N*/ if(!IsEnde())
+/*N*/ {
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nInventor = SWAPLONG(nInventor);
+/*N*/ nIdentifier = SWAPSHORT(nIdentifier);
+/*N*/ #endif
+/*N*/ rStream.Write((char*)&nInventor, 4);
+/*N*/ rStream.Write((char*)&nIdentifier, 2);
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nInventor = SWAPLONG(nInventor);
+/*N*/ nIdentifier = SWAPSHORT(nIdentifier);
+/*N*/ #endif
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjIOHeader::Read()
+/*N*/ {
+/*N*/ SdrIOHeader::Read();
+/*N*/
+/*N*/ if(!IsEnde())
+/*N*/ {
+/*N*/ rStream.Read((char*)&nInventor, 4);
+/*N*/ rStream.Read((char*)&nIdentifier, 2);
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nInventor = SWAPLONG(nInventor);
+/*N*/ nIdentifier = SWAPSHORT(nIdentifier);
+/*N*/ #endif
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObjIOHeaderLookAhead::SdrObjIOHeaderLookAhead(SvStream& rNewStream,
+/*N*/ BOOL bAutoOpen)
+/*N*/ : SdrObjIOHeader(rNewStream, STREAM_READ, NULL, FALSE)
+/*N*/ {
+/*N*/ bLookAhead = TRUE;
+/*N*/
+/*N*/ if(bAutoOpen)
+/*N*/ {
+/*N*/ OpenRecord();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrDownCompat::SdrDownCompat(SvStream& rNewStream, UINT16 nNewMode, BOOL bAutoOpen)
+/*N*/ : rStream(rNewStream),
+/*N*/ nSubRecSiz(0),
+/*N*/ nSubRecPos(0),
+/*N*/ nMode(nNewMode),
+/*N*/ bOpen(FALSE),
+/*N*/ bClosed(FALSE),
+/*N*/ pRecId(NULL)
+/*N*/ {
+/*N*/ if(bAutoOpen)
+/*N*/ OpenSubRecord();
+/*N*/ }
+
+/*N*/ SdrDownCompat::~SdrDownCompat()
+/*N*/ {
+/*N*/ if(!bClosed)
+/*N*/ CloseSubRecord();
+/*N*/ }
+
+/*N*/ void SdrDownCompat::Read()
+/*N*/ {
+/*N*/ // Subrecordgroesse auslesen
+/*N*/ rStream >> nSubRecSiz;
+/*N*/ }
+
+/*N*/ void SdrDownCompat::Write()
+/*N*/ {
+/*N*/ // Platz fuer Groessenangabe schaffen
+/*N*/ rStream << nSubRecSiz;
+/*N*/ }
+
+/*N*/ void SdrDownCompat::OpenSubRecord()
+/*N*/ {
+/*N*/ if(rStream.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ DBG_ASSERT(!bClosed,"SdrDownCompat::OpenSubRecord(): Record ist bereits geschlossen.");
+/*N*/ DBG_ASSERT(!bOpen,"SdrDownCompat::OpenSubRecord(): Record ist bereits geoeffnet.");
+/*N*/
+/*N*/ // Fileposition des Records merken
+/*N*/ nSubRecPos = rStream.Tell();
+/*N*/
+/*N*/ if(nMode == STREAM_READ)
+/*N*/ {
+/*N*/ // Subrecordgroesse auslesen
+/*N*/ Read();
+/*N*/ }
+/*N*/ else if(nMode == STREAM_WRITE)
+/*N*/ {
+/*N*/ // Platz fuer Groessenangabe schaffen
+/*N*/ Write();
+/*N*/ }
+/*N*/ else
+/*N*/ DBG_ERROR("SdrDownCompat::OpenSubRecord(): Falscher StreamMode angegeben.");
+/*N*/
+/*N*/ bOpen = TRUE;
+/*N*/ }
+
+/*N*/ void SdrDownCompat::CloseSubRecord()
+/*N*/ {
+/*N*/ if(rStream.GetError())
+/*?*/ return;
+/*N*/
+/*N*/ DBG_ASSERT(!bClosed,"SdrDownCompat::CloseSubRecord(): Record ist bereits geschlossen.");
+/*N*/ DBG_ASSERT(bOpen || bClosed,"SdrDownCompat::CloseSubRecord(): Record ist noch nicht geoeffnet.");
+/*N*/
+/*N*/ UINT32 nAktPos(rStream.Tell());
+/*N*/
+/*N*/ if(nMode == STREAM_READ)
+/*N*/ {
+/*N*/ UINT32 nReadAnz(nAktPos - nSubRecPos);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ if(nReadAnz > nSubRecSiz)
+/*N*/ {
+/*?*/ ByteString aErrMsg("SdrDownCompat::CloseSubRecord(), ");
+/*?*/
+/*?*/ aErrMsg += "RedordID";
+/*?*/
+/*?*/ if(!pRecId)
+/*?*/ aErrMsg += " unbekannt";
+/*?*/ else
+/*?*/ {
+/*?*/ aErrMsg += '=';
+/*?*/ aErrMsg += pRecId;
+/*?*/ }
+/*?*/
+/*?*/ aErrMsg += ":\nAus dem Record wurde";
+/*?*/
+/*?*/ UINT32 nToMuch(nReadAnz - nSubRecSiz);
+/*?*/
+/*?*/ if(nToMuch == 1)
+/*?*/ aErrMsg += " 1 Byte";
+/*?*/ else
+/*?*/ {
+/*?*/ aErrMsg += "n ";
+/*?*/ aErrMsg += ByteString::CreateFromInt32( nToMuch );
+/*?*/ aErrMsg += " Bytes";
+/*?*/ }
+/*?*/
+/*?*/ aErrMsg += " zuviel gelesen, FilePos korregiert.";
+/*?*/
+/*?*/ DBG_ERROR(aErrMsg.GetBuffer());
+/*N*/ }
+#endif
+
+/*N*/ if(nReadAnz != nSubRecSiz)
+/*N*/ {
+/*N*/ // den Rest ueberspringen
+/*N*/ rStream.Seek(nSubRecPos + nSubRecSiz);
+/*N*/ }
+/*N*/ }
+/*N*/ else if(nMode == STREAM_WRITE)
+/*N*/ {
+/*N*/ // Groesse dieses SubRecords (inkl. der Groessenangabe selbst)
+/*N*/ nSubRecSiz = nAktPos - nSubRecPos;
+/*N*/
+/*N*/ // an den Anfang des Records
+/*N*/ rStream.Seek(nSubRecPos);
+/*N*/ // rausschreiben.
+/*N*/ Write();
+/*N*/ // und die FilePos restaurieren.
+/*N*/ rStream.Seek(nAktPos);
+/*N*/ }
+/*N*/ else
+/*N*/ DBG_ERROR("SdrDownCompat::CloseSubRecord(): Falscher StreamMode angegeben.");
+/*N*/
+/*N*/ bOpen = FALSE;
+/*N*/ bClosed = TRUE;
+/*N*/ }
+
+/*N*/ UINT32 SdrDownCompat::GetBytesLeft() const
+/*N*/ {
+/*N*/ if(nMode == STREAM_READ)
+/*N*/ {
+/*N*/ UINT32 nAktPos(rStream.Tell());
+/*N*/ UINT32 nReadAnz(nAktPos - nSubRecPos);
+/*N*/
+/*N*/ if(nReadAnz <= nSubRecSiz)
+/*N*/ return nSubRecSiz - nReadAnz;
+/*N*/ else
+/*N*/ // Fehler, zuviel gelesen!
+/*N*/ return 0;
+/*N*/ }
+/*N*/ else
+/*N*/ return 0;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrNamedSubRecord::SdrNamedSubRecord(SvStream& rNewStream, UINT16 nNewMode,
+/*N*/ UINT32 nNewInventor, UINT16 nNewIdentifier,
+/*N*/ BOOL bAutoOpen)
+/*N*/ : SdrDownCompat(rNewStream, nNewMode, FALSE),
+/*N*/ nInventor(nNewInventor),
+/*N*/ nIdentifier(nNewIdentifier)
+/*N*/ {
+/*N*/ DBG_ASSERT(nNewMode==STREAM_READ || (nNewInventor!=0xFFFF && nNewInventor!=0xFFFF),
+/*N*/ "SdrNamedSubRecord: bei Write muss Inventor und Identifier angegeben werden");
+/*N*/
+/*N*/ if(bAutoOpen)
+/*N*/ OpenSubRecord();
+/*N*/ }
+
+/*N*/ void SdrNamedSubRecord::Read()
+/*N*/ {
+/*N*/ SdrDownCompat::Read();
+/*N*/
+/*N*/ rStream.Read((char*)&nInventor, 4);
+/*N*/ rStream.Read((char*)&nIdentifier, 2);
+/*N*/
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nIdentifier = SWAPSHORT(nIdentifier);
+/*N*/ nInventor = SWAPLONG(nInventor);
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void SdrNamedSubRecord::Write()
+/*N*/ {
+/*N*/ SdrDownCompat::Write();
+/*N*/
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nIdentifier = SWAPSHORT(nIdentifier);
+/*N*/ nInventor = SWAPLONG(nInventor);
+/*N*/ #endif
+/*N*/
+/*N*/ rStream.Write((char*)&nInventor, 4);
+/*N*/ rStream.Write((char*)&nIdentifier, 2);
+/*N*/
+/*N*/ #ifdef OSL_BIGENDIAN
+/*N*/ nIdentifier = SWAPSHORT(nIdentifier);
+/*N*/ nInventor = SWAPLONG(nInventor);
+/*N*/ #endif
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svditer.cxx b/binfilter/bf_svx/source/svdraw/svx_svditer.cxx
new file mode 100644
index 000000000000..864df0bb150e
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svditer.cxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svditer.hxx"
+
+
+
+// #99190#
+#include "scene3d.hxx"
+namespace binfilter {
+
+/*N*/ SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode, BOOL bReverse)
+/*N*/ : maObjList(1024, 64, 64),
+/*N*/ mnIndex(0L),
+/*N*/ mbReverse(bReverse)
+/*N*/ {
+/*N*/ ImpProcessObjectList(rObjList, eMode);
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ SdrObjListIter::SdrObjListIter(const SdrObject& rGroup, SdrIterMode eMode, BOOL bReverse)
+/*N*/ : maObjList(1024, 64, 64),
+/*N*/ mnIndex(0L),
+/*N*/ mbReverse(bReverse)
+/*N*/ {
+/*N*/ ImpProcessObjectList(*rGroup.GetSubList(), eMode);
+/*N*/ Reset();
+/*N*/ }
+
+/*N*/ void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode)
+/*N*/ {
+/*N*/ for(sal_uInt32 a(0L); a < rObjList.GetObjCount(); a++)
+/*N*/ {
+/*N*/ SdrObject* pObj = rObjList.GetObj(a);
+/*N*/ sal_Bool bIsGroup(pObj->IsGroupObject());
+/*N*/
+/*N*/ // #99190# 3D objects are no group objects, IsGroupObject()
+/*N*/ // only tests if pSub is not null ptr :-(
+/*N*/ if(bIsGroup && pObj->ISA(E3dObject) && !pObj->ISA(E3dScene))
+/*N*/ bIsGroup = sal_False;
+/*N*/
+/*N*/ if(eMode != IM_DEEPNOGROUPS || !bIsGroup)
+/*N*/ maObjList.Insert(pObj, LIST_APPEND);
+/*N*/
+/*N*/ if(bIsGroup && eMode != IM_FLAT)
+/*N*/ ImpProcessObjectList(*pObj->GetSubList(), eMode);
+/*N*/ }
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx b/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx
new file mode 100644
index 000000000000..86e077e25057
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdlayer.cxx
@@ -0,0 +1,387 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "svdlayer.hxx"
+#include "svdio.hxx"
+#include "svdmodel.hxx" // fuer Broadcasting
+#include "svdstr.hrc" // Namen aus der Resource
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SetOfByte
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ FASTBOOL SetOfByte::IsEmpty() const
+/*N*/ {
+/*N*/ for (USHORT i=0; i<32; i++) {
+/*N*/ if (aData[i]!=0) return FALSE;
+/*N*/ }
+/*N*/ return TRUE;
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void SetOfByte::operator&=(const SetOfByte& r2ndSet)
+/*N*/ {
+/*N*/ for (unsigned i=0; i<32; i++) {
+/*N*/ aData[i]&=r2ndSet.aData[i];
+/*N*/ }
+/*N*/ }
+
+
+/** initialize this set with a uno sequence of sal_Int8
+*/
+/*N*/ void SetOfByte::PutValue( const ::com::sun::star::uno::Any & rAny )
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
+/*N*/ if( rAny >>= aSeq )
+/*N*/ {
+/*N*/ sal_Int16 nCount = (sal_Int16)aSeq.getLength();
+/*N*/ if( nCount > 32 )
+/*N*/ nCount = 32;
+/*N*/
+/*N*/ sal_Int16 nIndex;
+/*N*/ for( nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ aData[nIndex] = static_cast<BYTE>(aSeq[nIndex]);
+/*N*/ }
+/*N*/
+/*N*/ for( ; nIndex < 32; nIndex++ )
+/*N*/ {
+/*N*/ aData[nIndex] = 0;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/** returns a uno sequence of sal_Int8
+*/
+/*N*/ void SetOfByte::QueryValue( ::com::sun::star::uno::Any & rAny ) const
+/*N*/ {
+/*N*/ sal_Int16 nNumBytesSet = 0;
+/*N*/ sal_Int16 nIndex;
+/*N*/ for( nIndex = 31; nIndex >= 00; nIndex-- )
+/*N*/ {
+/*N*/ if( 0 != aData[nIndex] )
+/*N*/ {
+/*N*/ nNumBytesSet = nIndex + 1;
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( nNumBytesSet );
+/*N*/
+/*N*/ for( nIndex = 0; nIndex < nNumBytesSet; nIndex++ )
+/*N*/ {
+/*N*/ aSeq[nIndex] = static_cast<sal_Int8>(aData[nIndex]);
+/*N*/ }
+/*N*/
+/*N*/ rAny <<= aSeq;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SdrLayer
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ void SdrLayer::SetName(const XubString& rNewName)
+/*N*/ {
+/*N*/ if(!rNewName.Equals(aName))
+/*N*/ {
+/*N*/ aName = rNewName;
+/*N*/ nType = 0; // Userdefined
+/*N*/
+/*N*/ if(pModel)
+/*N*/ {
+/*N*/ SdrHint aHint(HINT_LAYERCHG);
+/*N*/
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ pModel->SetChanged();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrLayer& rLayer)
+/*N*/ {
+/*N*/ if(rIn.GetError())
+/*?*/ return rIn;
+/*N*/
+/*N*/ SdrIOHeader aHead(rIn, STREAM_READ);
+/*N*/
+/*N*/ rIn >> rLayer.nID;
+/*N*/
+/*N*/ // UNICODE: rIn >> rLayer.aName;
+/*N*/ rIn.ReadByteString(rLayer.aName);
+/*N*/
+/*N*/ if(aHead.GetVersion() >= 1)
+/*N*/ {
+/*N*/ // Das Standardlayerflag kam direkt nach der Betalieferung dazu
+/*N*/ rIn >> rLayer.nType;
+/*N*/
+/*N*/ if(rLayer.nType == 1)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(aHead.GetVersion() <= 12)
+/*N*/ {
+/*N*/ // nType war lange Zeit nicht initiallisiert!
+/*N*/ if(rLayer.nType > 1)
+/*N*/ rLayer.nType = 0;
+/*N*/ }
+/*N*/
+/*N*/ return rIn;
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrLayer& rLayer)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut, STREAM_WRITE, SdrIOLayrID);
+/*N*/
+/*N*/ rOut << rLayer.nID;
+/*N*/
+/*N*/ // UNICODE: rOut << rLayer.aName;
+/*N*/ rOut.WriteByteString(rLayer.aName);
+/*N*/
+/*N*/ rOut << rLayer.nType;
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SdrLayerSet
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+/*?*/ 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
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent):
+/*N*/ aLayer(1024,16,16),
+/*N*/ aLSets(1024,16,16),
+/*N*/ pModel(NULL)
+/*N*/ {
+/*N*/ sal_Char aTextControls[] = "Controls";
+/*N*/ aControlLayerName = String(aTextControls, sizeof(aTextControls-1));
+/*N*/ pParent=pNewParent;
+/*N*/ }
+
+/*?*/ 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;
+/*?*/ }
+
+/*N*/ SdrLayerAdmin::~SdrLayerAdmin()
+/*N*/ {
+/*N*/ ClearLayer();
+/*N*/ ClearLayerSets();
+/*N*/ }
+
+/*N*/ void SdrLayerAdmin::ClearLayer()
+/*N*/ {
+/*N*/ SdrLayer* pL;
+/*N*/ pL=(SdrLayer*)aLayer.First();
+/*N*/ while (pL!=NULL) {
+/*N*/ delete pL;
+/*N*/ pL=(SdrLayer*)aLayer.Next();
+/*N*/ }
+/*N*/ aLayer.Clear();
+/*N*/ }
+
+/*N*/ void SdrLayerAdmin::ClearLayerSets()
+/*N*/ {
+/*N*/ SdrLayerSet* pL;
+/*N*/ pL=(SdrLayerSet*)aLSets.First();
+/*N*/ while (pL!=NULL) {
+/*?*/ delete pL;
+/*?*/ pL=(SdrLayerSet*)aLSets.Next();
+/*N*/ }
+/*N*/ aLSets.Clear();
+/*N*/ }
+
+
+
+/*N*/ void SdrLayerAdmin::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ if (pNewModel!=pModel) {
+/*N*/ pModel=pNewModel;
+/*N*/ USHORT nAnz=GetLayerCount();
+/*N*/ USHORT i;
+/*N*/ for (i=0; i<nAnz; i++) {
+/*?*/ GetLayer(i)->SetModel(pNewModel);
+/*N*/ }
+/*N*/ nAnz=GetLayerSetCount();
+/*N*/ for (i=0; i<nAnz; i++) {
+/*?*/ GetLayerSet(i)->SetModel(pNewModel);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrLayerAdmin::Broadcast(FASTBOOL bLayerSet) const
+/*N*/ {
+/*N*/ if (pModel!=NULL) {
+/*N*/ SdrHint aHint(bLayerSet ? HINT_LAYERSETORDERCHG : HINT_LAYERORDERCHG);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ pModel->SetChanged();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrLayer* SdrLayerAdmin::NewLayer(const XubString& rName, USHORT nPos)
+/*N*/ {
+/*N*/ SdrLayerID nID=GetUniqueLayerID();
+/*N*/ SdrLayer* pLay=new SdrLayer(nID,rName);
+/*N*/ pLay->SetModel(pModel);
+/*N*/ aLayer.Insert(pLay,nPos);
+/*N*/ Broadcast(FALSE);
+/*N*/ return pLay;
+/*N*/ }
+
+
+
+
+
+/*N*/ const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, FASTBOOL bInherited) const
+/*N*/ {
+/*N*/ UINT16 i(0);
+/*N*/ const SdrLayer* pLay = NULL;
+/*N*/
+/*N*/ while(i < GetLayerCount() && !pLay)
+/*N*/ {
+/*N*/ if(rName.Equals(GetLayer(i)->GetName()))
+/*N*/ pLay = GetLayer(i);
+/*N*/ else
+/*N*/ i++;
+/*N*/ }
+/*N*/
+/*N*/ if(!pLay && pParent)
+/*N*/ {
+/*N*/ pLay = pParent->GetLayer(rName, TRUE);
+/*N*/ }
+/*N*/
+/*N*/ return pLay;
+/*N*/ }
+
+/*N*/ SdrLayerID SdrLayerAdmin::GetLayerID(const XubString& rName, FASTBOOL bInherited) const
+/*N*/ {
+/*N*/ SdrLayerID nRet=SDRLAYER_NOTFOUND;
+/*N*/ const SdrLayer* pLay=GetLayer(rName,bInherited);
+/*N*/ if (pLay!=NULL) nRet=pLay->GetID();
+/*N*/ return nRet;
+/*N*/ }
+
+/*N*/ const SdrLayer* SdrLayerAdmin::GetLayerPerID(USHORT nID) const
+/*N*/ {
+/*N*/ USHORT i=0;
+/*N*/ const SdrLayer* pLay=NULL;
+/*N*/ while (i<GetLayerCount() && pLay==NULL) {
+/*N*/ if (nID==GetLayer(i)->GetID()) pLay=GetLayer(i);
+/*N*/ else i++;
+/*N*/ }
+/*N*/ return pLay;
+/*N*/ }
+
+// Globale LayerID's beginnen mit 0 aufsteigend.
+// Lokale LayerID's beginnen mit 254 absteigend.
+// 255 ist reserviert fuer SDRLAYER_NOTFOUND
+
+/*N*/ SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const
+/*N*/ {
+/*N*/ SetOfByte aSet;
+/*N*/ sal_Bool bDown = (pParent == NULL);
+/*N*/ sal_Int32 j;
+/*N*/ for (j=0; j<GetLayerCount(); j++)
+/*N*/ {
+/*N*/ aSet.Set(GetLayer(j)->GetID());
+/*N*/ }
+/*N*/ SdrLayerID i;
+/*N*/ if (!bDown)
+/*N*/ {
+/*N*/ i=254;
+/*N*/ while (i && aSet.IsSet(BYTE(i)))
+/*N*/ --i;
+/*N*/ if (i == 0)
+/*N*/ i=254;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ i=0;
+/*N*/ while (i<=254 && aSet.IsSet(BYTE(i)))
+/*N*/ i++;
+/*N*/ if (i>254)
+/*N*/ i=0;
+/*N*/ }
+/*N*/ return i;
+/*N*/ }
+
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmark.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmark.cxx
new file mode 100644
index 000000000000..be4fbbff9bdf
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdmark.cxx
@@ -0,0 +1,212 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdmark.hxx"
+#include "svdorect.hxx" // GetMarkDescription
+#include "svdstr.hrc" // Namen aus der Resource
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMarkList::ForceSort()
+/*N*/ {
+/*N*/ if (!bSorted) {
+/*N*/ bSorted=TRUE;
+/*N*/ ULONG nAnz=aList.Count();
+/*N*/ if (nAnz>1) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMarkList::Clear()
+/*N*/ {
+/*N*/ for (ULONG i=0; i<GetMarkCount(); i++) {
+/*?*/ SdrMark* pMark=GetMark(i);
+/*?*/ delete pMark;
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ SetNameDirty();
+/*N*/ }
+
+/*N*/ void SdrMarkList::operator=(const SdrMarkList& rLst)
+/*N*/ {
+/*N*/ Clear();
+/*N*/ for (ULONG i=0; i<rLst.GetMarkCount(); i++) {
+/*?*/ SdrMark* pMark=rLst.GetMark(i);
+/*?*/ SdrMark* pNeuMark=new SdrMark(*pMark);
+/*?*/ aList.Insert(pNeuMark,CONTAINER_APPEND);
+/*N*/ }
+/*N*/ aMarkName=rLst.aMarkName;
+/*N*/ bNameOk=rLst.bNameOk;
+/*N*/ aPointName=rLst.aPointName;
+/*N*/ bPointNameOk=rLst.bPointNameOk;
+/*N*/ aGluePointName=rLst.aGluePointName;
+/*N*/ bGluePointNameOk=rLst.bGluePointNameOk;
+/*N*/ bSorted=rLst.bSorted;
+/*N*/ }
+
+/*N*/ ULONG SdrMarkList::FindObject(const SdrObject* pObj)
+/*N*/ {
+ // #109658#
+ //
+ // Since relying on OrdNums is not allowed for the selection because objects in the
+ // selection may not be inserted in a list if they are e.g. modified ATM, i changed
+ // this loop to just look if the object pointer is in the selection.
+ //
+ // Problem is that GetOrdNum() which is const, internally casts no non-const and
+ // hardly sets the OrdNum member of the object (nOrdNum) to 0 (ZERO) if the object
+ // is not inserted in a object list.
+ // Since this may be by purpose and necessary somewhere else i decided that it is
+ // less dangerous to change this method then changing SdrObject::GetOrdNum().
+/*N*/ if(pObj && aList.Count())
+/*N*/ {
+/*N*/ for(sal_uInt32 a(0L); a < aList.Count(); a++)
+/*N*/ {
+/*N*/ if(((SdrMark*)(aList.GetObject(a)))->GetObj() == pObj)
+/*N*/ {
+/*N*/ return a;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return CONTAINER_ENTRY_NOTFOUND;
+
+ /*
+ 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;
+ */
+/*N*/ }
+
+/*N*/ void SdrMarkList::InsertEntry(const SdrMark& rMark, FASTBOOL bChkSort)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+
+
+/*N*/ FASTBOOL SdrMarkList::DeletePageView(const SdrPageView& rPV)
+/*N*/ {
+/*N*/ FASTBOOL bChgd=FALSE;
+/*N*/ for (ULONG i=GetMarkCount(); i>0;) {
+/*?*/ i--;
+/*?*/ SdrMark* pMark=GetMark(i);
+/*?*/ if (pMark->GetPageView()==&rPV) {
+/*?*/ aList.Remove(i);
+/*?*/ delete pMark;
+/*?*/ SetNameDirty();
+/*?*/ bChgd=TRUE;
+/*?*/ }
+/*N*/ }
+/*N*/ return bChgd;
+/*N*/ }
+
+
+
+
+
+
+/*N*/ FASTBOOL SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const
+/*N*/ {
+/*N*/ FASTBOOL bFnd=FALSE;
+/*N*/ Rectangle aR;
+/*N*/
+/*N*/ 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;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ return bFnd;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const
+/*N*/ {
+/*N*/ FASTBOOL bFnd=FALSE;
+/*N*/
+/*N*/ 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;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ return bFnd;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
new file mode 100644
index 000000000000..09353c0de3f5
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx
@@ -0,0 +1,2245 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <rtl/logfile.hxx>
+
+#include "svdmodel.hxx"
+
+
+#include <bf_svtools/whiter.hxx>
+
+#include "xit.hxx"
+
+#include <xdef.hxx>
+
+#include "xbtmpit.hxx"
+#include "xlndsit.hxx"
+#include "xlnedit.hxx"
+#include "xflftrit.hxx"
+#include "xflhtit.hxx"
+#include "xlnstit.hxx"
+
+
+#include "editeng.hxx" // Fuer EditEngine::CreatePool()
+
+#include "xtable.hxx"
+
+#include "svditer.hxx"
+#include "svdio.hxx"
+#include "svdpage.hxx"
+#include "svdundo.hxx"
+#include "svdpool.hxx"
+#include "svdetc.hxx"
+#include "svdoutl.hxx"
+#include "svdoole2.hxx"
+#include "svdstr.hrc" // Objektname
+#include "svdoutlinercache.hxx"
+
+#include <eeitemid.hxx>
+
+#ifndef SVX_LIGHT
+#include "asiancfg.hxx"
+#endif
+
+#include "eeitem.hxx"
+
+#include "fontitem.hxx"
+
+#include "colritem.hxx"
+
+#include "fhgtitem.hxx"
+
+#include <bf_svtools/style.hxx>
+
+#include <tools/bigint.hxx>
+
+
+
+
+#include "forbiddencharacterstable.hxx"
+
+#include <bf_so3/persist.hxx>
+
+#include <bf_svtools/zforlist.hxx>
+
+
+// #90477#
+#include <tools/tenccvt.hxx>
+
+
+// #95114#
+#include <vcl/svapp.hxx>
+
+#include <osl/endian.h>
+
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrModelInfo::SdrModelInfo(FASTBOOL bInit):
+/*N*/ aCreationDate(Date(0),Time(0)),
+/*N*/ aLastWriteDate(Date(0),Time(0)),
+/*N*/ aLastReadDate(Date(0),Time(0)),
+/*N*/ aLastPrintDate(Date(0),Time(0)),
+/*N*/ eCreationCharSet(RTL_TEXTENCODING_DONTKNOW),
+/*N*/ eLastWriteCharSet(RTL_TEXTENCODING_DONTKNOW),
+/*N*/ eLastReadCharSet(RTL_TEXTENCODING_DONTKNOW)
+/*N*/ {
+/*N*/ if (bInit)
+/*N*/ {
+/*N*/ aCreationDate = DateTime();
+/*N*/ eCreationCharSet = gsl_getSystemTextEncoding();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrModelInfo& rModInfo)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrModelInfo");
+/*N*/ #endif
+/*N*/ rOut<<UINT32(rModInfo.aCreationDate.GetDate());
+/*N*/ rOut<<UINT32(rModInfo.aCreationDate.GetTime());
+/*N*/
+/*N*/ // #90477# rOut<<UINT8( GetStoreCharSet( rModInfo.eCreationCharSet ) );
+/*N*/ rOut << UINT8(GetSOStoreTextEncoding(rModInfo.eCreationCharSet, (sal_uInt16)rOut.GetVersion()));
+/*N*/
+ /* 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
+
+
+ */
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eCreationGUI);
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eCreationCPU);
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eCreationSys);
+/*N*/
+/*N*/ rOut<<UINT32(rModInfo.aLastWriteDate.GetDate());
+/*N*/ rOut<<UINT32(rModInfo.aLastWriteDate.GetTime());
+/*N*/
+/*N*/ // #90477# rOut<<UINT8( GetStoreCharSet( rModInfo.eLastWriteCharSet ) );
+/*N*/ rOut << UINT8(GetSOStoreTextEncoding(rModInfo.eLastWriteCharSet, (sal_uInt16)rOut.GetVersion()));
+/*N*/
+/*N*/ // see comment above
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastWriteGUI);
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastWriteCPU);
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastWriteSys);
+/*N*/
+/*N*/ rOut<<UINT32(rModInfo.aLastReadDate.GetDate());
+/*N*/ rOut<<UINT32(rModInfo.aLastReadDate.GetTime());
+/*N*/
+/*N*/ // #90477# rOut<<UINT8( GetStoreCharSet( rModInfo.eLastReadCharSet ) );
+/*N*/ rOut << UINT8(GetSOStoreTextEncoding(rModInfo.eLastReadCharSet, (sal_uInt16)rOut.GetVersion()));
+/*N*/
+/*N*/ // see comment above
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastReadGUI);
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastReadCPU);
+/*N*/ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastReadSys);
+/*N*/
+/*N*/ rOut<<UINT32(rModInfo.aLastPrintDate.GetDate());
+/*N*/ rOut<<UINT32(rModInfo.aLastPrintDate.GetTime());
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrModelInfo& rModInfo)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrModelInfo");
+/*N*/ #endif
+/*N*/ UINT8 n8;
+/*N*/ UINT32 n32;
+/*N*/ rIn>>n32; rModInfo.aCreationDate.SetDate(n32);
+/*N*/ rIn>>n32; rModInfo.aCreationDate.SetTime(n32);
+/*N*/
+/*N*/ // #90477# rIn>>n8; rModInfo.eCreationCharSet=rtl_TextEncoding(n8);
+/*N*/ rIn >> n8;
+/*N*/ n8 = (UINT8)GetSOLoadTextEncoding((rtl_TextEncoding)n8, (sal_uInt16)rIn.GetVersion());
+/*N*/ rModInfo.eCreationCharSet = rtl_TextEncoding(n8);
+/*N*/
+ /* 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
+
+
+ */
+/*N*/ rIn>>n8; // rModInfo.eCreationGUI=GUIType(n8);
+/*N*/ rIn>>n8; // rModInfo.eCreationCPU=CPUType(n8);
+/*N*/ rIn>>n8; // rModInfo.eCreationSys=SystemType(n8);
+/*N*/ rIn>>n32; rModInfo.aLastWriteDate.SetDate(n32);
+/*N*/ rIn>>n32; rModInfo.aLastWriteDate.SetTime(n32);
+/*N*/
+/*N*/ // #90477# rIn>>n8; rModInfo.eLastWriteCharSet=rtl_TextEncoding(n8);
+/*N*/ rIn >> n8;
+/*N*/ n8 = (UINT8)GetSOLoadTextEncoding((rtl_TextEncoding)n8, (sal_uInt16)rIn.GetVersion());
+/*N*/ rModInfo.eLastWriteCharSet = rtl_TextEncoding(n8);
+/*N*/
+/*N*/ // see comment above
+/*N*/ rIn>>n8; // rModInfo.eLastWriteGUI=GUIType(n8);
+/*N*/ rIn>>n8; // rModInfo.eLastWriteCPU=CPUType(n8);
+/*N*/ rIn>>n8; // rModInfo.eLastWriteSys=SystemType(n8);
+/*N*/
+/*N*/ rIn>>n32; rModInfo.aLastReadDate.SetDate(n32);
+/*N*/ rIn>>n32; rModInfo.aLastReadDate.SetTime(n32);
+/*N*/
+/*N*/ // #90477# rIn>>n8; rModInfo.eLastReadCharSet=rtl_TextEncoding(n8);
+/*N*/ rIn >> n8;
+/*N*/ n8 = (UINT8)GetSOLoadTextEncoding((rtl_TextEncoding)n8, (sal_uInt16)rIn.GetVersion());
+/*N*/ rModInfo.eLastReadCharSet = rtl_TextEncoding(n8);
+/*N*/
+/*N*/ // see comment above
+/*N*/ rIn>>n8; // rModInfo.eLastReadGUI=GUIType(n8);
+/*N*/ rIn>>n8; // rModInfo.eLastReadCPU=CPUType(n8);
+/*N*/ rIn>>n8; // rModInfo.eLastReadSys=SystemType(n8);
+/*N*/
+/*N*/ rIn>>n32; rModInfo.aLastPrintDate.SetDate(n32);
+/*N*/ rIn>>n32; rModInfo.aLastPrintDate.SetTime(n32);
+/*N*/
+/*N*/ return rIn;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ DBG_NAME(SdrModel)
+/*N*/ TYPEINIT1(SdrModel,SfxBroadcaster);
+
+/*N*/ void SdrModel::ImpCtor(SfxItemPool* pPool, SvPersist* pPers,
+/*N*/ FASTBOOL bUseExtColorTable, FASTBOOL bLoadRefCounts)
+/*N*/ {
+/*N*/ mbInDestruction=false;
+/*N*/ aObjUnit=SdrEngineDefaults::GetMapFraction();
+/*N*/ eObjUnit=SdrEngineDefaults::GetMapUnit();
+/*N*/ eUIUnit=FUNIT_MM;
+/*N*/ aUIScale=Fraction(1,1);
+/*N*/ nUIUnitKomma=0;
+/*N*/ bUIOnlyKomma=FALSE;
+/*N*/ pLayerAdmin=NULL;
+/*N*/ pItemPool=pPool;
+/*N*/ bMyPool=FALSE;
+/*N*/ pPersist=pPers;
+/*N*/ pDrawOutliner=NULL;
+/*N*/ pHitTestOutliner=NULL;
+/*N*/ pRefOutDev=NULL;
+/*N*/ nProgressAkt=0;
+/*N*/ nProgressMax=0;
+/*N*/ nProgressOfs=0;
+/*N*/ pStyleSheetPool=NULL;
+/*N*/ pDefaultStyleSheet=NULL;
+/*N*/ pLinkManager=NULL;
+/*N*/ pLoadedModel=NULL;
+/*N*/ pUndoStack=NULL;
+/*N*/ pRedoStack=NULL;
+/*N*/ pAktPaintPV=NULL;
+/*N*/ nMaxUndoCount=16;
+/*N*/ pAktUndoGroup=NULL;
+/*N*/ nUndoLevel=0;
+/*N*/ nProgressPercent=0;
+/*N*/ nLoadVersion=0;
+/*N*/ bExtColorTable=FALSE;
+/*N*/ bChanged=FALSE;
+/*N*/ bInfoChanged=FALSE;
+/*N*/ bPagNumsDirty=FALSE;
+/*N*/ bMPgNumsDirty=FALSE;
+/*N*/ bPageNotValid=FALSE;
+/*N*/ bSavePortable=FALSE;
+/*N*/ bSaveCompressed=FALSE;
+/*N*/ bSaveNative=FALSE;
+/*N*/ bSwapGraphics=FALSE;
+/*N*/ nSwapGraphicsMode=SDR_SWAPGRAPHICSMODE_DEFAULT;
+/*N*/ bSaveOLEPreview=FALSE;
+/*N*/ bPasteResize=FALSE;
+/*N*/ bNoBitmapCaching=FALSE;
+/*N*/ bLoading=FALSE;
+/*N*/ bStreamingSdrModel=FALSE;
+/*N*/ bReadOnly=FALSE;
+/*N*/ nStreamCompressMode=COMPRESSMODE_NONE;
+/*N*/ nStreamNumberFormat=NUMBERFORMAT_INT_BIGENDIAN;
+/*N*/ nDefaultTabulator=0;
+/*N*/ pColorTable=NULL;
+/*N*/ pDashList=NULL;
+/*N*/ pLineEndList=NULL;
+/*N*/ pHatchList=NULL;
+/*N*/ pGradientList=NULL;
+/*N*/ pBitmapList=NULL;
+/*N*/ mpNumberFormatter = NULL;
+/*N*/ bTransparentTextFrames=FALSE;
+/*N*/ bStarDrawPreviewMode = FALSE;
+/*N*/ nStarDrawPreviewMasterPageNum = SDRPAGE_NOTFOUND;
+/*N*/ pModelStorage = NULL;
+/*N*/ mpForbiddenCharactersTable = NULL;
+/*N*/ mbModelLocked = FALSE;
+/*N*/ mpOutlinerCache = NULL;
+/*N*/ mbKernAsianPunctuation = sal_False;
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ SvxAsianConfig aAsian;
+/*N*/ mnCharCompressType = aAsian.GetCharDistanceCompression();
+/*N*/ #else
+/*N*/ mnCharCompressType = 0;
+/*N*/ #endif
+/*N*/
+/*N*/ #ifdef OSL_LITENDIAN
+/*N*/ nStreamNumberFormat=NUMBERFORMAT_INT_LITTLEENDIAN;
+/*N*/ #endif
+/*N*/ bExtColorTable=bUseExtColorTable;
+/*N*/
+/*N*/ if ( pPool == NULL )
+/*N*/ {
+/*N*/ pItemPool=new SdrItemPool(SDRATTR_START, SDRATTR_END, bLoadRefCounts);
+/*N*/ // Der Outliner hat keinen eigenen Pool, deshalb den der EditEngine
+/*N*/ SfxItemPool* pOutlPool=EditEngine::CreatePool( bLoadRefCounts );
+/*N*/ // OutlinerPool als SecondaryPool des SdrPool
+/*N*/ pItemPool->SetSecondaryPool(pOutlPool);
+/*N*/ // Merken, dass ich mir die beiden Pools selbst gemacht habe
+/*N*/ bMyPool=TRUE;
+/*N*/ }
+/*N*/ pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+/*N*/
+/*N*/ // SJ: #95129# using static SdrEngineDefaults only if default SvxFontHeight item is not available
+/*N*/ const SfxPoolItem* pPoolItem = pItemPool->GetPoolDefaultItem( ITEMID_FONTHEIGHT );
+/*N*/ if ( pPoolItem )
+/*N*/ nDefTextHgt = ((SvxFontHeightItem*)pPoolItem)->GetHeight();
+/*N*/ else
+/*N*/ nDefTextHgt = SdrEngineDefaults::GetFontHeight();
+/*N*/
+/*N*/ SetTextDefaults();
+/*N*/ pLayerAdmin=new SdrLayerAdmin;
+/*N*/ pLayerAdmin->SetModel(this);
+/*N*/ ImpSetUIUnit();
+/*N*/
+/*N*/ // den DrawOutliner OnDemand erzeugen geht noch nicht, weil ich den Pool
+/*N*/ // sonst nicht kriege (erst ab 302!)
+/*N*/ pDrawOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
+/*N*/ ImpSetOutlinerDefaults(pDrawOutliner, TRUE);
+/*N*/
+/*N*/ pHitTestOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
+/*N*/ ImpSetOutlinerDefaults(pHitTestOutliner, TRUE);
+/*N*/
+/*N*/ ImpCreateTables();
+/*N*/ }
+
+/*N*/ SdrModel::SdrModel(SfxItemPool* pPool, SvPersist* pPers, INT32 bLoadRefCounts):
+/*N*/ aInfo(TRUE),
+/*N*/ aPages(1024,32,32),
+/*N*/ aMaPag(1024,32,32)
+/*N*/ {
+/*N*/ #ifdef TIMELOG
+/*N*/ RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
+/*N*/ #endif
+/*N*/
+/*N*/ DBG_CTOR(SdrModel,NULL);
+/*N*/ ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts);
+/*N*/ }
+
+/*N*/ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, SvPersist* pPers, INT32 bLoadRefCounts):
+/*N*/ aInfo(TRUE),
+/*N*/ aPages(1024,32,32),
+/*N*/ aMaPag(1024,32,32),
+/*N*/ aTablePath(rPath)
+/*N*/ {
+/*N*/ #ifdef TIMELOG
+/*N*/ RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
+/*N*/ #endif
+/*N*/
+/*N*/ DBG_CTOR(SdrModel,NULL);
+/*N*/ ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts);
+/*N*/ }
+
+/*N*/ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, SvPersist* pPers, FASTBOOL bUseExtColorTable, INT32 bLoadRefCounts):
+/*N*/ aInfo(TRUE),
+/*N*/ aPages(1024,32,32),
+/*N*/ aMaPag(1024,32,32),
+/*N*/ aTablePath(rPath)
+/*N*/ {
+/*N*/ #ifdef TIMELOG
+/*N*/ RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
+/*N*/ #endif
+/*N*/
+/*N*/ DBG_CTOR(SdrModel,NULL);
+/*N*/ ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
+/*N*/ }
+
+/*N*/ SdrModel::SdrModel(const SdrModel& rSrcModel):
+/*N*/ aPages(1024,32,32),
+/*N*/ aMaPag(1024,32,32)
+/*N*/ {
+/*N*/ #ifdef TIMELOG
+/*N*/ RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::SdrModel(...)" );
+/*N*/ #endif
+/*N*/
+/*N*/ // noch nicht implementiert
+/*N*/ DBG_ERROR("SdrModel::CopyCtor() ist noch nicht implementiert");
+/*N*/ }
+
+/*N*/ SdrModel::~SdrModel()
+/*N*/ {
+/*N*/ #ifdef TIMELOG
+/*N*/ RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "svx", "aw93748", "SdrModel::~SdrModel(...)" );
+/*N*/ #endif
+/*N*/
+/*N*/ DBG_DTOR(SdrModel,NULL);
+/*N*/
+/*N*/ mbInDestruction = true;
+/*N*/
+/*N*/ Broadcast(SdrHint(HINT_MODELCLEARED));
+/*N*/
+/*N*/ delete mpOutlinerCache;
+/*N*/
+/*N*/ ClearUndoBuffer();
+/*N*/ #ifdef DBG_UTIL
+/*N*/ if(pAktUndoGroup)
+/*N*/ {
+/*?*/ ByteString aStr("Im Dtor des SdrModel steht noch ein offenes Undo rum: \"");
+/*?*/
+/*?*/ aStr += ByteString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding());
+/*?*/ aStr += '\"';
+/*?*/
+/*?*/ DBG_ERROR(aStr.GetBuffer());
+/*N*/ }
+/*N*/ #endif
+/*N*/ if (pAktUndoGroup!=NULL) delete pAktUndoGroup;
+/*N*/ Clear();
+/*N*/ delete pLayerAdmin;
+/*N*/
+/*N*/ // Den DrawOutliner erst nach dem ItemPool loeschen, da
+/*N*/ // der ItemPool Items des DrawOutliners referenziert !!! (<- das war mal)
+/*N*/ // Wg. Problem bei Malte Reihenfolge wieder umgestellt.
+/*N*/ // Loeschen des Outliners vor dem loeschen des ItemPools
+/*N*/ delete pHitTestOutliner;
+/*N*/ delete pDrawOutliner;
+/*N*/
+/*N*/ // StyleSheetPool loeschen, abgeleitete Klassen sollten dies nicht tun,
+/*N*/ // da die DrawingEngine moeglicherweise im Destruktor noch auf den
+/*N*/ // StyleSheetPool zugreifen muss (SB)
+/*N*/ delete pStyleSheetPool;
+/*N*/
+/*N*/ if (bMyPool) { // Pools loeschen, falls es meine sind
+/*N*/ SfxItemPool* pOutlPool=pItemPool->GetSecondaryPool();
+/*N*/ delete pItemPool;
+/*N*/ // Der OutlinerPool muss nach dem ItemPool plattgemacht werden, da der
+/*N*/ // ItemPool SetItems enthaelt die ihrerseits Items des OutlinerPools
+/*N*/ // referenzieren (Joe)
+/*N*/ delete pOutlPool;
+/*N*/ }
+/*N*/
+/*N*/ if( mpForbiddenCharactersTable )
+/*N*/ mpForbiddenCharactersTable->release();
+/*N*/
+/*N*/ delete pLoadedModel;
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ // Tabellen, Listen und Paletten loeschen
+/*N*/ if (!bExtColorTable) delete pColorTable;
+/*N*/ delete pDashList;
+/*N*/ delete pLineEndList;
+/*N*/ delete pHatchList;
+/*N*/ delete pGradientList;
+/*N*/ delete pBitmapList;
+/*N*/ #endif
+/*N*/
+/*N*/ if(mpNumberFormatter)
+/*?*/ delete mpNumberFormatter;
+/*N*/ }
+
+/*N*/ bool SdrModel::IsInDestruction() const
+/*N*/ {
+/*N*/ return mbInDestruction;
+/*N*/ }
+
+
+// noch nicht implementiert:
+
+
+/*N*/ void SdrModel::SetSwapGraphics( FASTBOOL bSwap )
+/*N*/ {
+/*N*/ bSwapGraphics = bSwap;
+/*N*/ }
+
+/*?*/ FASTBOOL SdrModel::IsReadOnly() const
+/*?*/ {
+/*?*/ return bReadOnly;
+/*?*/ }
+
+/*?*/ void SdrModel::SetReadOnly(FASTBOOL bYes)
+/*?*/ {
+/*?*/ bReadOnly=bYes;
+/*?*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrModel::DoProgress(ULONG nVal)
+/*N*/ {
+/*N*/ if (aIOProgressLink.IsSet()) {
+/*N*/ if (nVal==0) { // Anfang
+/*N*/ USHORT nVal=0;
+/*N*/ aIOProgressLink.Call(&nVal);
+/*N*/ nProgressPercent=0;
+/*N*/ nProgressAkt=0;
+/*N*/ } else if (nVal==0xFFFFFFFF) { // Ende
+/*N*/ USHORT nVal=100;
+/*N*/ aIOProgressLink.Call(&nVal);
+/*N*/ nProgressPercent=100;
+/*N*/ nProgressAkt=nProgressMax;
+/*N*/ } else if (nVal!=nProgressAkt && nProgressMax!=0) { // dazwischen
+/*N*/ USHORT nPercent;
+/*N*/ if (nVal>nProgressOfs) nVal-=nProgressOfs; else nVal=0;
+/*N*/ if (nVal>nProgressMax) nVal=nProgressMax;
+/*N*/ if (nVal<=0x00FFFFFF) nPercent=USHORT(nVal*100/nProgressMax);
+/*N*/ else {
+/*?*/ ULONG nBla=nProgressMax/100; // Weil sonst Ueberlauf!
+/*?*/ nPercent=USHORT(nVal/=nBla);
+/*N*/ }
+/*N*/ if (nPercent==0) nPercent=1;
+/*N*/ if (nPercent>99) nPercent=99;
+/*N*/ if (nPercent>nProgressPercent) {
+/*N*/ aIOProgressLink.Call(&nPercent);
+/*N*/ nProgressPercent=nPercent;
+/*N*/ }
+/*N*/ if (nVal>nProgressAkt) {
+/*N*/ nProgressAkt=nVal;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetMaxUndoActionCount(ULONG nAnz)
+/*N*/ {
+/*N*/ if (nAnz<1) nAnz=1;
+/*N*/ nMaxUndoCount=nAnz;
+/*N*/ if (pUndoStack!=NULL) {
+/*?*/ while (pUndoStack->Count()>nMaxUndoCount) {
+/*?*/ delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count());
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::ClearUndoBuffer()
+/*N*/ {
+/*N*/ if (pUndoStack!=NULL) {
+/*?*/ while (pUndoStack->Count()!=0) {
+/*?*/ delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count()-1);
+/*?*/ }
+/*?*/ delete pUndoStack;
+/*?*/ pUndoStack=NULL;
+/*N*/ }
+/*N*/ if (pRedoStack!=NULL) {
+/*?*/ while (pRedoStack->Count()!=0) {
+/*?*/ delete (SfxUndoAction*) pRedoStack->Remove(pRedoStack->Count()-1);
+/*?*/ }
+/*?*/ delete pRedoStack;
+/*?*/ pRedoStack=NULL;
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrModel::AddUndo(SdrUndoAction* pUndo)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrModel::ImpCreateTables()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ // der Writer hat seinen eigenen ColorTable
+/*N*/ if (!bExtColorTable) pColorTable=new XColorTable(aTablePath,(XOutdevItemPool*)pItemPool);
+/*N*/ pDashList =new XDashList (aTablePath,(XOutdevItemPool*)pItemPool);
+/*N*/ pLineEndList =new XLineEndList (aTablePath,(XOutdevItemPool*)pItemPool);
+/*N*/ pHatchList =new XHatchList (aTablePath,(XOutdevItemPool*)pItemPool);
+/*N*/ pGradientList=new XGradientList(aTablePath,(XOutdevItemPool*)pItemPool);
+/*N*/ pBitmapList =new XBitmapList (aTablePath,(XOutdevItemPool*)pItemPool);
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void SdrModel::Clear()
+/*N*/ {
+/*N*/ mbInDestruction = true;
+/*N*/
+/*N*/ sal_Int32 i;
+/*N*/ // delete all drawing pages
+/*N*/ sal_Int32 nAnz=GetPageCount();
+/*N*/ for (i=nAnz-1; i>=0; i--)
+/*N*/ {
+/*N*/ DeletePage( (USHORT)i );
+/*N*/ }
+/*N*/ aPages.Clear();
+/*N*/
+/*N*/ // delete all Masterpages
+/*N*/ nAnz=GetMasterPageCount();
+/*N*/ for(i=nAnz-1; i>=0; i--)
+/*N*/ {
+/*N*/ DeleteMasterPage( (USHORT)i );
+/*N*/ }
+/*N*/ aMaPag.Clear();
+/*N*/
+/*N*/ pLayerAdmin->ClearLayer();
+/*N*/ pLayerAdmin->ClearLayerSets();
+/*N*/ //SetChanged();
+/*N*/ }
+
+/*N*/ SdrModel* SdrModel::AllocModel() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ SdrModel* pModel=new SdrModel;
+/*N*/ return pModel;
+/*N*/ }
+
+/*N*/ SdrPage* SdrModel::AllocPage(FASTBOOL bMasterPage)
+/*N*/ {
+/*N*/ return new SdrPage(*this,bMasterPage);
+/*N*/ }
+
+
+/*N*/ void SdrModel::DisposeLoadedModels()
+/*N*/ {
+/*N*/ delete pLoadedModel;
+/*N*/ pLoadedModel = NULL;
+/*N*/ aLoadedModelFN = String();
+/*N*/ }
+
+/*N*/ void SdrModel::SetTextDefaults() const
+/*N*/ {
+/*N*/ SetTextDefaults( pItemPool, nDefTextHgt );
+/*N*/ }
+
+
+/*N*/ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, ULONG nDefTextHgt )
+/*N*/ {
+/*N*/ // #95114# set application-language specific dynamic pool language defaults
+/*N*/ SvxFontItem aSvxFontItem;
+/*N*/ SvxFontItem aSvxFontItemCJK(EE_CHAR_FONTINFO_CJK);
+/*N*/ SvxFontItem aSvxFontItemCTL(EE_CHAR_FONTINFO_CTL);
+/*N*/ sal_uInt16 nLanguage(Application::GetSettings().GetLanguage());
+/*N*/
+/*N*/ // get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default
+/*N*/ Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
+/*N*/ aSvxFontItem.GetFamily() = aFont.GetFamily();
+/*N*/ aSvxFontItem.GetFamilyName() = aFont.GetName();
+/*N*/ aSvxFontItem.GetStyleName().Erase();
+/*N*/ aSvxFontItem.GetPitch() = aFont.GetPitch();
+/*N*/ aSvxFontItem.GetCharSet() = aFont.GetCharSet();
+/*N*/ pItemPool->SetPoolDefaultItem(aSvxFontItem);
+/*N*/
+/*N*/ // get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
+/*N*/ Font aFontCJK(OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
+/*N*/ aSvxFontItemCJK.GetFamily() = aFontCJK.GetFamily();
+/*N*/ aSvxFontItemCJK.GetFamilyName() = aFontCJK.GetName();
+/*N*/ aSvxFontItemCJK.GetStyleName().Erase();
+/*N*/ aSvxFontItemCJK.GetPitch() = aFontCJK.GetPitch();
+/*N*/ aSvxFontItemCJK.GetCharSet() = aFontCJK.GetCharSet();
+/*N*/ pItemPool->SetPoolDefaultItem(aSvxFontItemCJK);
+/*N*/
+/*N*/ // get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
+/*N*/ Font aFontCTL(OutputDevice::GetDefaultFont(DEFAULTFONT_CTL_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
+/*N*/ aSvxFontItemCTL.GetFamily() = aFontCTL.GetFamily();
+/*N*/ aSvxFontItemCTL.GetFamilyName() = aFontCTL.GetName();
+/*N*/ aSvxFontItemCTL.GetStyleName().Erase();
+/*N*/ aSvxFontItemCTL.GetPitch() = aFontCTL.GetPitch();
+/*N*/ aSvxFontItemCTL.GetCharSet() = aFontCTL.GetCharSet();
+/*N*/ pItemPool->SetPoolDefaultItem(aSvxFontItemCTL);
+/*N*/
+/*N*/ // set dynamic FontHeight defaults
+/*N*/ pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT ) );
+/*N*/ pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT_CJK ) );
+/*N*/ pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt, 100, EE_CHAR_FONTHEIGHT_CTL ) );
+/*N*/
+/*N*/ // set FontColor defaults
+/*N*/ pItemPool->SetPoolDefaultItem( SvxColorItem(SdrEngineDefaults::GetFontColor()) );
+/*N*/ }
+
+/*N*/ SdrOutliner& SdrModel::GetDrawOutliner(const SdrTextObj* pObj) const
+/*N*/ {
+/*N*/ pDrawOutliner->SetTextObj(pObj);
+/*N*/ return *pDrawOutliner;
+/*N*/ }
+
+
+/*N*/ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, BOOL bInit )
+/*N*/ {
+ /**************************************************************************
+ * Initialisierung der Outliner fuer Textausgabe und HitTest
+ **************************************************************************/
+/*N*/ if( bInit )
+/*N*/ {
+/*N*/ pOutliner->EraseVirtualDevice();
+/*N*/ pOutliner->SetUpdateMode(FALSE);
+/*N*/ pOutliner->SetEditTextObjectPool(pItemPool);
+/*N*/ pOutliner->SetDefTab(nDefaultTabulator);
+/*N*/ }
+
+/*N*/ pOutliner->SetRefDevice(GetRefDevice());
+/*N*/ pOutliner->SetForbiddenCharsTable(GetForbiddenCharsTable());
+/*N*/ pOutliner->SetAsianCompressionMode( mnCharCompressType );
+/*N*/ pOutliner->SetKernAsianPunctuation( IsKernAsianPunctuation() );
+/*N*/
+/*N*/ if ( !GetRefDevice() )
+/*N*/ {
+/*N*/ MapMode aMapMode(eObjUnit, Point(0,0), aObjUnit, aObjUnit);
+/*N*/ pOutliner->SetRefMapMode(aMapMode);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetRefDevice(OutputDevice* pDev)
+/*N*/ {
+/*N*/ pRefOutDev=pDev;
+/*N*/ ImpSetOutlinerDefaults( pDrawOutliner );
+/*N*/ ImpSetOutlinerDefaults( pHitTestOutliner );
+/*N*/ RefDeviceChanged();
+/*N*/ }
+
+/*N*/ void SdrModel::ImpReformatAllTextObjects()
+/*N*/ {
+/*N*/ if( isLocked() )
+/*N*/ return;
+/*N*/
+/*N*/ USHORT nAnz=GetMasterPageCount();
+/*N*/ USHORT nNum;
+/*N*/ for (nNum=0; nNum<nAnz; nNum++) {
+/*N*/ GetMasterPage(nNum)->ReformatAllTextObjects();
+/*N*/ }
+/*N*/ nAnz=GetPageCount();
+/*N*/ for (nNum=0; nNum<nAnz; nNum++) {
+/*N*/ GetPage(nNum)->ReformatAllTextObjects();
+/*N*/ }
+/*N*/ }
+
+/** #103122#
+ steps over all available pages and sends notify messages to
+ all edge objects that are connected to other objects so that
+ they may reposition itselfs
+*/
+/*N*/ void SdrModel::ImpReformatAllEdgeObjects()
+/*N*/ {
+/*N*/ if( isLocked() )
+/*N*/ return;
+/*N*/
+/*N*/ sal_uInt16 nAnz=GetMasterPageCount();
+/*N*/ sal_uInt16 nNum;
+/*N*/ for (nNum=0; nNum<nAnz; nNum++)
+/*N*/ {
+/*N*/ GetMasterPage(nNum)->ReformatAllEdgeObjects();
+/*N*/ }
+/*N*/ nAnz=GetPageCount();
+/*N*/ for (nNum=0; nNum<nAnz; nNum++)
+/*N*/ {
+/*N*/ GetPage(nNum)->ReformatAllEdgeObjects();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SvStream* SdrModel::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const
+/*N*/ {
+/*N*/ return NULL;
+/*N*/ }
+
+// Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
+
+
+/*N*/ void SdrModel::RefDeviceChanged()
+/*N*/ {
+/*N*/ Broadcast(SdrHint(HINT_REFDEVICECHG));
+/*N*/ ImpReformatAllTextObjects();
+/*N*/ }
+/*N*/
+/*N*/ void SdrModel::SetDefaultFontHeight(ULONG nVal)
+/*N*/ {
+/*N*/ if (nVal!=nDefTextHgt) {
+/*?*/ nDefTextHgt=nVal;
+/*?*/ Broadcast(SdrHint(HINT_DEFFONTHGTCHG));
+/*?*/ ImpReformatAllTextObjects();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetDefaultTabulator(USHORT nVal)
+/*N*/ {
+/*N*/ if (nDefaultTabulator!=nVal) {
+/*N*/ nDefaultTabulator=nVal;
+/*N*/ Outliner& rOutliner=GetDrawOutliner();
+/*N*/ rOutliner.SetDefTab(nVal);
+/*N*/ Broadcast(SdrHint(HINT_DEFAULTTABCHG));
+/*N*/ ImpReformatAllTextObjects();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::ImpSetUIUnit()
+/*N*/ {
+/*N*/ if (aUIScale.GetNumerator()==0 || aUIScale.GetDenominator()==0) aUIScale=Fraction(1,1);
+/*N*/ FASTBOOL bMapInch=IsInch(eObjUnit);
+/*N*/ FASTBOOL bMapMetr=IsMetric(eObjUnit);
+/*N*/ FASTBOOL bUIInch=IsInch(eUIUnit);
+/*N*/ FASTBOOL bUIMetr=IsMetric(eUIUnit);
+/*N*/ nUIUnitKomma=0;
+/*N*/ long nMul=1;
+/*N*/ long nDiv=1;
+/*N*/
+/*N*/ // Zunaechst normalisieren auf m bzw. "
+/*N*/ switch (eObjUnit) {
+/*N*/ case MAP_100TH_MM : nUIUnitKomma+=5; break;
+/*N*/ case MAP_10TH_MM : nUIUnitKomma+=4; break;
+/*N*/ case MAP_MM : nUIUnitKomma+=3; break;
+/*N*/ case MAP_CM : nUIUnitKomma+=2; break;
+/*N*/ case MAP_1000TH_INCH: nUIUnitKomma+=3; break;
+/*N*/ case MAP_100TH_INCH : nUIUnitKomma+=2; break;
+/*N*/ case MAP_10TH_INCH : nUIUnitKomma+=1; break;
+/*N*/ case MAP_INCH : nUIUnitKomma+=0; break;
+/*N*/ case MAP_POINT : nDiv=72; break; // 1Pt = 1/72"
+/*N*/ case MAP_TWIP : nDiv=144; nUIUnitKomma++; break; // 1Twip = 1/1440"
+/*N*/ case MAP_PIXEL : break;
+/*N*/ case MAP_SYSFONT : break;
+/*N*/ case MAP_APPFONT : break;
+/*N*/ case MAP_RELATIVE : break;
+/*N*/ } // switch
+/*N*/
+/*N*/ // 1 mile = 8 furlong = 63.360" = 1.609.344,0mm
+/*N*/ // 1 furlong = 10 chains = 7.920" = 201.168,0mm
+/*N*/ // 1 chain = 4 poles = 792" = 20.116,8mm
+/*N*/ // 1 pole = 5 1/2 yd = 198" = 5.029,2mm
+/*N*/ // 1 yd = 3 ft = 36" = 914,4mm
+/*N*/ // 1 ft = 12 " = 1" = 304,8mm
+/*N*/ switch (eUIUnit) {
+/*N*/ case FUNIT_NONE : break;
+/*N*/ // Metrisch
+/*N*/ case FUNIT_100TH_MM: nUIUnitKomma-=5; break;
+/*N*/ case FUNIT_MM : nUIUnitKomma-=3; break;
+/*N*/ case FUNIT_CM : nUIUnitKomma-=2; break;
+/*N*/ case FUNIT_M : nUIUnitKomma+=0; break;
+/*N*/ case FUNIT_KM : nUIUnitKomma+=3; break;
+/*N*/ // Inch
+/*N*/ case FUNIT_TWIP : nMul=144; nUIUnitKomma--; break; // 1Twip = 1/1440"
+/*N*/ case FUNIT_POINT : nMul=72; break; // 1Pt = 1/72"
+/*N*/ case FUNIT_PICA : nMul=6; break; // 1Pica = 1/6" ?
+/*N*/ case FUNIT_INCH : break; // 1" = 1"
+/*N*/ case FUNIT_FOOT : nDiv*=12; break; // 1Ft = 12"
+/*N*/ case FUNIT_MILE : nDiv*=6336; nUIUnitKomma++; break; // 1mile = 63360"
+/*N*/ // sonstiges
+/*N*/ case FUNIT_CUSTOM : break;
+/*N*/ case FUNIT_PERCENT: nUIUnitKomma+=2; break;
+/*N*/ } // switch
+/*N*/
+/*N*/ if (bMapInch && bUIMetr) {
+/*N*/ nUIUnitKomma+=4;
+/*N*/ nMul*=254;
+/*N*/ }
+/*N*/ if (bMapMetr && bUIInch) {
+/*N*/ nUIUnitKomma-=4;
+/*N*/ nDiv*=254;
+/*N*/ }
+/*N*/
+/*N*/ // Temporaere Fraction zum Kuerzen
+/*N*/ Fraction aTempFract(nMul,nDiv);
+/*N*/ nMul=aTempFract.GetNumerator();
+/*N*/ nDiv=aTempFract.GetDenominator();
+/*N*/ // Nun mit dem eingestellten Masstab verknuepfen
+/*N*/ BigInt nBigMul(nMul);
+/*N*/ BigInt nBigDiv(nDiv);
+/*N*/ BigInt nBig1000(1000);
+/*N*/ nBigMul*=aUIScale.GetDenominator();
+/*N*/ nBigDiv*=aUIScale.GetNumerator();
+/*N*/ while (nBigMul>nBig1000) {
+/*N*/ nUIUnitKomma--;
+/*N*/ nBigMul/=10;
+/*N*/ }
+/*N*/ while (nBigDiv>nBig1000) {
+/*N*/ nUIUnitKomma++;
+/*N*/ nBigDiv/=10;
+/*N*/ }
+/*N*/ nMul=long(nBigMul);
+/*N*/ nDiv=long(nBigDiv);
+/*N*/ switch ((short)nMul) {
+/*N*/ case 10: nMul=1; nUIUnitKomma--; break;
+/*N*/ case 100: nMul=1; nUIUnitKomma-=2; break;
+/*N*/ case 1000: nMul=1; nUIUnitKomma-=3; break;
+/*N*/ } // switch
+/*N*/ switch ((short)nDiv) {
+/*N*/ case 10: nDiv=1; nUIUnitKomma++; break;
+/*N*/ case 100: nDiv=1; nUIUnitKomma+=2; break;
+/*N*/ case 1000: nDiv=1; nUIUnitKomma+=3; break;
+/*N*/ } // switch
+/*N*/ aUIUnitFact=Fraction(nMul,nDiv);
+/*N*/ bUIOnlyKomma=nMul==nDiv;
+/*N*/ TakeUnitStr(eUIUnit,aUIUnitStr);
+/*N*/ }
+
+
+/*N*/ void SdrModel::SetScaleUnit(MapUnit eMap)
+/*N*/ {
+/*N*/ if (eObjUnit!=eMap) {
+/*N*/ eObjUnit=eMap;
+/*N*/ pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+/*N*/ ImpSetUIUnit();
+/*N*/ ImpSetOutlinerDefaults( pDrawOutliner );
+/*N*/ ImpSetOutlinerDefaults( pHitTestOutliner );
+/*N*/ ImpReformatAllTextObjects(); // #40424#
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetScaleFraction(const Fraction& rFrac)
+/*N*/ {
+/*N*/ if (aObjUnit!=rFrac) {
+/*?*/ aObjUnit=rFrac;
+/*?*/ ImpSetUIUnit();
+/*?*/ ImpSetOutlinerDefaults( pDrawOutliner );
+/*?*/ ImpSetOutlinerDefaults( pHitTestOutliner );
+/*?*/ ImpReformatAllTextObjects(); // #40424#
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetUIUnit(FieldUnit eUnit)
+/*N*/ {
+/*N*/ if (eUIUnit!=eUnit) {
+/*?*/ eUIUnit=eUnit;
+/*?*/ ImpSetUIUnit();
+/*?*/ ImpReformatAllTextObjects(); // #40424#
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetUIScale(const Fraction& rScale)
+/*N*/ {
+/*N*/ if (aUIScale!=rScale) {
+/*?*/ aUIScale=rScale;
+/*?*/ ImpSetUIUnit();
+/*?*/ ImpReformatAllTextObjects(); // #40424#
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetUIUnit(FieldUnit eUnit, const Fraction& rScale)
+/*N*/ {
+/*N*/ if (eUIUnit!=eUnit || aUIScale!=rScale) {
+/*N*/ eUIUnit=eUnit;
+/*N*/ aUIScale=rScale;
+/*N*/ ImpSetUIUnit();
+/*N*/ ImpReformatAllTextObjects(); // #40424#
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) const
+/*N*/ {
+/*N*/ switch(eUnit)
+/*N*/ {
+/*N*/ default:
+/*N*/ case FUNIT_NONE :
+/*N*/ case FUNIT_CUSTOM :
+/*N*/ {
+/*?*/ rStr = String();
+/*?*/ break;
+/*N*/ }
+/*N*/ case FUNIT_100TH_MM:
+/*?*/ {
+/*?*/ sal_Char aText[] = "/100mm";
+/*?*/ rStr = UniString(aText, sizeof(aText-1));
+/*?*/ break;
+/*N*/ }
+/*N*/ case FUNIT_MM :
+/*N*/ {
+/*N*/ sal_Char aText[] = "mm";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_CM :
+/*N*/ {
+/*N*/ sal_Char aText[] = "cm";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_M :
+/*N*/ {
+/*N*/ rStr = String();
+/*N*/ rStr += sal_Unicode('m');
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_KM :
+/*N*/ {
+/*N*/ sal_Char aText[] = "km";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_TWIP :
+/*N*/ {
+/*N*/ sal_Char aText[] = "twip";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_POINT :
+/*N*/ {
+/*N*/ sal_Char aText[] = "pt";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_PICA :
+/*N*/ {
+/*N*/ sal_Char aText[] = "pica";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_INCH :
+/*N*/ {
+/*N*/ rStr = String();
+/*N*/ rStr += sal_Unicode('"');
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_FOOT :
+/*N*/ {
+/*N*/ sal_Char aText[] = "ft";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_MILE :
+/*N*/ {
+/*N*/ sal_Char aText[] = "mile(s)";
+/*N*/ rStr = UniString(aText, sizeof(aText-1));
+/*N*/ break;
+/*N*/ }
+/*N*/ case FUNIT_PERCENT:
+/*N*/ {
+/*N*/ rStr = String();
+/*N*/ rStr += sal_Unicode('%');
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*?*/ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars, sal_Int32 nNumDigits) const
+/*?*/ {
+/*?*/ if(!bUIOnlyKomma)
+/*?*/ nVal = (nVal * aUIUnitFact.GetNumerator()) / aUIUnitFact.GetDenominator();
+/*?*/
+/*?*/ BOOL bNeg(nVal < 0);
+/*?*/
+/*?*/ if(bNeg)
+/*?*/ nVal = -nVal;
+/*?*/
+/*?*/ SvtSysLocale aSysLoc;
+/*?*/ const LocaleDataWrapper& rLoc = aSysLoc.GetLocaleData();
+/*?*/ sal_Int32 nKomma(nUIUnitKomma);
+/*?*/ if( -1 == nNumDigits )
+/*?*/ nNumDigits = rLoc.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;
+/*?*/ }
+/*?*/
+/*?*/ // #83257# the second condition needs to be <= since inside this loop
+/*?*/ // also the leading zero is inserted.
+/*?*/ if(nKomma > 0 && rStr.Len() <= nKomma)
+/*?*/ {
+/*?*/ // Fuer Komma evtl. vorne Nullen dran
+/*?*/ sal_Int32 nAnz(nKomma - rStr.Len());
+/*?*/
+/*?*/ if(nAnz >= 0 && rLoc.isNumLeadingZero())
+/*?*/ nAnz++;
+/*?*/
+/*?*/ for(sal_Int32 i=0; i<nAnz; i++)
+/*?*/ rStr.Insert(sal_Unicode('0'), 0);
+/*?*/ }
+/*?*/
+/*?*/ sal_Unicode cDec( rLoc.getNumDecimalSep().GetChar(0) );
+/*?*/
+/*?*/ // KommaChar einfuegen
+/*?*/ sal_Int32 nVorKomma(rStr.Len() - nKomma);
+/*?*/
+/*?*/ if(nKomma > 0)
+/*?*/ rStr.Insert(cDec, (xub_StrLen) nVorKomma);
+/*?*/
+/*?*/ if(!rLoc.isNumTrailingZeros())
+/*?*/ {
+/*?*/ while(rStr.Len() && rStr.GetChar(rStr.Len() - 1) == sal_Unicode('0'))
+/*?*/ rStr.Erase(rStr.Len() - 1);
+/*?*/
+/*?*/ if(rStr.Len() && rStr.GetChar(rStr.Len() - 1) == cDec)
+/*?*/ rStr.Erase(rStr.Len() - 1);
+/*?*/ }
+/*?*/
+/*?*/ // ggf. Trennpunkte bei jedem Tausender einfuegen
+/*?*/ if( nVorKomma > 3 )
+/*?*/ {
+/*?*/ String aThoSep( rLoc.getNumThousandSep() );
+/*?*/ if ( aThoSep.Len() > 0 )
+/*?*/ {
+/*?*/ sal_Unicode cTho( aThoSep.GetChar(0) );
+/*?*/ sal_Int32 i(nVorKomma - 3);
+/*?*/
+/*?*/ while(i > 0) // #78311#
+/*?*/ {
+/*?*/ rStr.Insert(cTho, (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;
+/*?*/ }
+
+
+
+/*N*/ void SdrModel::SetChanged(FASTBOOL bFlg)
+/*N*/ {
+/*N*/ bChanged=bFlg;
+/*N*/ }
+
+/*N*/ void SdrModel::RecalcPageNums(FASTBOOL bMaster)
+/*N*/ {
+/*N*/ Container& rPL=*(bMaster ? &aMaPag : &aPages);
+/*N*/ USHORT nAnz=USHORT(rPL.Count());
+/*N*/ USHORT i;
+/*N*/ for (i=0; i<nAnz; i++) {
+/*N*/ SdrPage* pPg=(SdrPage*)(rPL.GetObject(i));
+/*N*/ pPg->SetPageNum(i);
+/*N*/ }
+/*N*/ if (bMaster) bMPgNumsDirty=FALSE;
+/*N*/ else bPagNumsDirty=FALSE;
+/*N*/ }
+
+/*N*/ void SdrModel::InsertPage(SdrPage* pPage, USHORT nPos)
+/*N*/ {
+/*N*/ USHORT nAnz=GetPageCount();
+/*N*/ if (nPos>nAnz) nPos=nAnz;
+/*N*/ aPages.Insert(pPage,nPos);
+/*N*/ pPage->SetInserted(TRUE);
+/*N*/ pPage->SetPageNum(nPos);
+/*N*/ pPage->SetModel(this);
+/*N*/ if (nPos<nAnz) bPagNumsDirty=TRUE;
+/*N*/ SetChanged();
+/*N*/ SdrHint aHint(HINT_PAGEORDERCHG);
+/*N*/ aHint.SetPage(pPage);
+/*N*/ Broadcast(aHint);
+/*N*/ }
+
+/*N*/ void SdrModel::DeletePage(USHORT nPgNum)
+/*N*/ {
+/*N*/ SdrPage* pPg=RemovePage(nPgNum);
+/*N*/ delete pPg;
+/*N*/ }
+
+/*N*/ SdrPage* SdrModel::RemovePage(USHORT nPgNum)
+/*N*/ {
+/*N*/ SdrPage* pPg=(SdrPage*)aPages.Remove(nPgNum);
+/*N*/ if (pPg!=NULL) {
+/*N*/ pPg->SetInserted(FALSE);
+/*N*/ }
+/*N*/ bPagNumsDirty=TRUE;
+/*N*/ SetChanged();
+/*N*/ SdrHint aHint(HINT_PAGEORDERCHG);
+/*N*/ aHint.SetPage(pPg);
+/*N*/ Broadcast(aHint);
+/*N*/ return pPg;
+/*N*/ }
+
+
+/*N*/ void SdrModel::InsertMasterPage(SdrPage* pPage, USHORT nPos)
+/*N*/ {
+/*N*/ USHORT nAnz=GetMasterPageCount();
+/*N*/ if (nPos>nAnz) nPos=nAnz;
+/*N*/ aMaPag.Insert(pPage,nPos);
+/*N*/ pPage->SetInserted(TRUE);
+/*N*/ pPage->SetPageNum(nPos);
+/*N*/ pPage->SetModel(this);
+/*N*/ if (nPos<nAnz) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ SetChanged();
+/*N*/ SdrHint aHint(HINT_PAGEORDERCHG);
+/*N*/ aHint.SetPage(pPage);
+/*N*/ Broadcast(aHint);
+/*N*/ }
+
+/*N*/ void SdrModel::DeleteMasterPage(USHORT nPgNum)
+/*N*/ {
+/*N*/ SdrPage* pPg=RemoveMasterPage(nPgNum);
+/*N*/ if (pPg!=NULL) delete pPg;
+/*N*/ }
+
+/*N*/ SdrPage* SdrModel::RemoveMasterPage(USHORT nPgNum)
+/*N*/ {
+/*N*/ SdrPage* pRetPg=(SdrPage*)aMaPag.Remove(nPgNum);
+/*N*/ // Nun die Verweise der normalen Zeichenseiten auf die entfernte MasterPage loeschen
+/*N*/ // und Verweise auf dahinterliegende Masterpages anpassen.
+/*N*/ USHORT nPageAnz=GetPageCount();
+/*N*/ for (USHORT np=0; np<nPageAnz; np++) {
+/*N*/ GetPage(np)->ImpMasterPageRemoved(nPgNum);
+/*N*/ }
+/*N*/ if (pRetPg!=NULL) {
+/*N*/ pRetPg->SetInserted(FALSE);
+/*N*/ }
+/*N*/ bMPgNumsDirty=TRUE;
+/*N*/ SetChanged();
+/*N*/ SdrHint aHint(HINT_PAGEORDERCHG);
+/*N*/ aHint.SetPage(pRetPg);
+/*N*/ Broadcast(aHint);
+/*N*/ return pRetPg;
+/*N*/ }
+
+/*N*/ void SdrModel::MoveMasterPage(USHORT nPgNum, USHORT nNewPos)
+/*N*/ {
+/*N*/ SdrPage* pPg=(SdrPage*)aMaPag.Remove(nPgNum);
+/*N*/ if (pPg!=NULL) {
+/*N*/ pPg->SetInserted(FALSE);
+/*N*/ aMaPag.Insert(pPg,nNewPos);
+/*N*/ // Anpassen der MasterPageDescriptoren
+/*N*/ USHORT nPageAnz=GetPageCount();
+/*N*/ for (USHORT np=0; np<nPageAnz; np++) {
+/*N*/ GetPage(np)->ImpMasterPageMoved(nPgNum,nNewPos);
+/*N*/ }
+/*N*/ }
+/*N*/ bMPgNumsDirty=TRUE;
+/*N*/ SetChanged();
+/*N*/ SdrHint aHint(HINT_PAGEORDERCHG);
+/*N*/ aHint.SetPage(pPg);
+/*N*/ Broadcast(aHint);
+/*N*/ }
+
+/*N*/ void SdrModel::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ const sal_uInt32 nOldCompressMode = nStreamCompressMode;
+/*N*/ sal_uInt32 nNewCompressMode = nStreamCompressMode;
+/*N*/
+/*N*/ if( SOFFICE_FILEFORMAT_40 <= rOut.GetVersion() )
+/*N*/ {
+/*N*/ if( IsSaveCompressed() )
+/*N*/ nNewCompressMode |= COMPRESSMODE_ZBITMAP;
+/*N*/
+/*N*/ if( IsSaveNative() )
+/*N*/ nNewCompressMode |= COMPRESSMODE_NATIVE;
+/*N*/ }
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrModel");
+/*N*/ #endif
+/*N*/
+/*N*/ // damit ich meine eigenen SubRecords erkenne (ab V11)
+/*N*/ rOut.Write(SdrIOJoeMagic, 4);
+/*N*/
+/*N*/ {
+/*N*/ // Focus fuer aModelMiscCompat
+/*N*/ // ab V11 eingepackt
+/*N*/ SdrDownCompat aModelMiscCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aModelMiscCompat.SetID("SdrModel(Miscellaneous)");
+/*N*/ #endif
+/*N*/
+/*N*/ // ModelInfo muss hier ganz am Anfang stehen!
+/*N*/ ((SdrModel*)this)->aInfo.aLastWriteDate = DateTime();
+/*N*/ rtl_TextEncoding eOutCharSet = rOut.GetStreamCharSet();
+/*N*/ if(eOutCharSet == ((rtl_TextEncoding)9) /* == RTL_TEXTENCODING_SYSTEM */ )
+/*?*/ eOutCharSet = gsl_getSystemTextEncoding();
+/*N*/
+/*N*/ // #90477# ((SdrModel*)this)->aInfo.eLastWriteCharSet = GetStoreCharSet(eOutCharSet);
+/*N*/ ((SdrModel*)this)->aInfo.eLastWriteCharSet = GetSOStoreTextEncoding(eOutCharSet, (sal_uInt16)rOut.GetVersion());
+/*N*/
+/*N*/ // UNICODE: set the target charset on the stream to access it as parameter
+/*N*/ // in all streaming operations for UniString->ByteString conversions
+/*N*/ rOut.SetStreamCharSet(aInfo.eLastWriteCharSet);
+/*N*/
+ /* 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();
+ */
+/*N*/
+/*N*/ if(aReadDate.IsValid())
+/*N*/ {
+/*N*/ ((SdrModel*)this)->aInfo.aLastReadDate = aReadDate;
+/*N*/
+/*N*/ // ((SdrModel*)this)->aInfo.eLastReadCharSet = GetStoreCharSet(gsl_getSystemTextEncoding());
+/*N*/ ((SdrModel*)this)->aInfo.eLastReadCharSet = GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rOut.GetVersion());
+/*N*/
+ /* 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();
+ */
+/*N*/ }
+/*N*/ rOut << aInfo; // DateiInfo rausschreiben (ab V11)
+/*N*/
+/*N*/ { // ein Bereich fuer Statistik reservieren (V11) (kommt spaeter vielleicht mal dazu)
+/*N*/ SdrDownCompat aModelStatisticCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aModelStatisticCompat.SetID("SdrModel(Statistic)");
+/*N*/ #endif
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ // ab V11
+/*N*/ SdrDownCompat aModelFormatCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aModelFormatCompat.SetID("SdrModel(Format)");
+/*N*/ #endif
+/*N*/
+/*N*/ // ab V11
+/*N*/ rOut << nNewCompressMode;
+/*N*/
+/*N*/ // ab V11
+/*N*/ rOut << UINT16(rOut.GetNumberFormatInt());
+/*N*/
+/*N*/ rOut.SetCompressMode( (sal_uInt16)nNewCompressMode);
+/*N*/ // CompressMode erst an dieser Stelle setzen, damit konform zu ReadData()
+/*N*/ }
+/*N*/
+/*N*/ rOut << INT32(aObjUnit.GetNumerator());
+/*N*/ rOut << INT32(aObjUnit.GetDenominator());
+/*N*/ rOut << UINT16(eObjUnit);
+/*N*/ // Komprimiert ?
+/*N*/ rOut << UINT16(0);
+/*N*/ // Nur eine DummyPage, jedoch mit relevanten Objekten?
+/*N*/ rOut << UINT8(bPageNotValid);
+/*N*/ // Reserve DummyByte
+/*N*/ rOut << UINT8(0);
+/*N*/
+/*N*/ // Tabellen-, Listen- und Palettennamen schreiben
+/*N*/ // rOut<<INT16(::GetSystemCharSet()); seit V11 hier kein CharSet mehr
+/*N*/ XubString aEmptyStr;
+/*N*/
+/*N*/ if(bExtColorTable)
+/*N*/ {
+/*N*/ // der Writer hat seinen eigenen ColorTable
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pColorTable && !pColorTable->GetName().Equals(pszStandard))
+/*N*/ {
+/*N*/ // UNICODE: rOut << pColorTable->GetName();
+/*N*/ rOut.WriteByteString(pColorTable->GetName());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(pDashList && !pDashList->GetName().Equals(pszStandard))
+/*N*/ {
+/*N*/ // UNICODE: rOut<<pDashList->GetName();
+/*N*/ rOut.WriteByteString(pDashList->GetName());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/
+/*N*/ if(pLineEndList && !pLineEndList->GetName().Equals(pszStandard))
+/*N*/ {
+/*N*/ // UNICODE: rOut<<pLineEndList->GetName();
+/*N*/ rOut.WriteByteString(pLineEndList->GetName());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/
+/*N*/ if(pHatchList && !pHatchList->GetName().Equals(pszStandard))
+/*N*/ {
+/*N*/ // UNICODE: rOut<<pHatchList->GetName();
+/*N*/ rOut.WriteByteString(pHatchList->GetName());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/
+/*N*/ if(pGradientList && !pGradientList->GetName().Equals(pszStandard))
+/*N*/ {
+/*N*/ // UNICODE: rOut<<pGradientList->GetName();
+/*N*/ rOut.WriteByteString(pGradientList->GetName());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/
+/*N*/ if(pBitmapList && !pBitmapList->GetName().Equals(pszStandard))
+/*N*/ {
+/*N*/ // UNICODE: rOut<<pBitmapList->GetName();
+/*N*/ rOut.WriteByteString(pBitmapList->GetName());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << aEmptyStr;
+/*N*/ rOut.WriteByteString(aEmptyStr);
+/*N*/ }
+/*N*/
+/*N*/ // ab 09-02-1996
+/*N*/ rOut << INT32(aUIScale.GetNumerator());
+/*N*/ rOut << INT32(aUIScale.GetDenominator());
+/*N*/ rOut << UINT16(eUIUnit);
+/*N*/
+/*N*/ // ab 09-04-1997 fuer #37710#
+/*N*/ rOut << INT32(nDefTextHgt);
+/*N*/ rOut << INT32(nDefaultTabulator);
+/*N*/
+/*N*/ // StarDraw-Preview: Nummer der MasterPage der ersten Standard-Seite
+/*N*/ if(GetPageCount() >= 3 && GetPage(1)->GetMasterPageCount())
+/*N*/ {
+/*N*/ ((SdrModel*)this)->nStarDrawPreviewMasterPageNum =
+/*N*/ GetPage(1)->GetMasterPageNum(0);
+/*N*/ }
+/*N*/ rOut << nStarDrawPreviewMasterPageNum;
+/*N*/ }
+/*N*/
+/*N*/ UINT16 i;
+/*N*/
+/*N*/ for(i=0; i < GetLayerAdmin().GetLayerCount(); i++)
+/*N*/ {
+/*N*/ rOut << *GetLayerAdmin().GetLayer(i);
+/*N*/ }
+/*N*/
+/*N*/ for(i=0; i < GetLayerAdmin().GetLayerSetCount(); i++)
+/*N*/ {
+/*?*/ rOut << *GetLayerAdmin().GetLayerSet(i);
+/*N*/ }
+/*N*/
+/*N*/ for(i=0; i < GetMasterPageCount(); i++)
+/*N*/ {
+/*N*/ const SdrPage* pPg = GetMasterPage(i);
+/*N*/ rOut << *pPg;
+/*N*/ }
+/*N*/
+/*N*/ for(i=0; i < GetPageCount(); i++)
+/*N*/ {
+/*N*/ const SdrPage* pPg = GetPage(i);
+/*N*/ rOut << *pPg;
+/*N*/ }
+/*N*/
+/*N*/ // Endemarke
+/*N*/ SdrIOHeader(rOut, STREAM_WRITE, SdrIOEndeID);
+/*N*/ }
+
+/*N*/ void SdrModel::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if(rIn.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrModel");
+/*N*/ #endif
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 11)
+/*N*/ {
+/*N*/ // damit ich meine eigenen SubRecords erkenne (ab V11)
+/*N*/ char cMagic[4];
+/*N*/ if(rIn.Read(cMagic, 4) != 4 || memcmp(cMagic, SdrIOJoeMagic, 4))
+/*N*/ {
+/*N*/ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
+/*N*/ return;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DoProgress(rIn.Tell());
+/*N*/
+/*N*/ {
+/*N*/ // Focus fuer aModelMiscCompat
+/*N*/ SdrDownCompat* pModelMiscCompat = NULL;
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 11)
+/*N*/ {
+/*N*/ // MiscellaneousData ab V11 eingepackt
+/*N*/ // MiscellaneousData ist alles von Recordbeginn bis
+/*N*/ // zum Anfang der Pages, Layer, ...
+/*N*/ pModelMiscCompat = new SdrDownCompat(rIn, STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ pModelMiscCompat->SetID("SdrModel(Miscellaneous)");
+/*N*/ #endif
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 11)
+/*N*/ {
+/*N*/ // ModelInfo ab V11
+/*N*/ // DateiInfo lesen
+/*N*/ rIn >> aInfo;
+/*N*/
+/*N*/ // StreamCharSet setzen, damit Strings beim
+/*N*/ // Lesen automatisch konvertiert werden
+/*N*/ rIn.SetStreamCharSet(aInfo.eLastWriteCharSet);
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 11)
+/*N*/ {
+/*N*/ // reserviert fuer Statistik
+/*N*/ SdrDownCompat aModelStatisticCompat(rIn, STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aModelStatisticCompat.SetID("SdrModel(Statistik)");
+/*N*/ #endif
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 11)
+/*N*/ {
+/*N*/ // Info ueber Dateiformat
+/*N*/ SdrDownCompat aModelFormatCompat(rIn,STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aModelFormatCompat.SetID("SdrModel(Format)");
+/*N*/ #endif
+/*N*/
+/*N*/ if(aModelFormatCompat.GetBytesLeft() >= 4)
+/*N*/ {
+/*N*/ rIn >> nStreamCompressMode;
+/*N*/ rIn >> nStreamNumberFormat;
+/*N*/ rIn.SetCompressMode(nStreamCompressMode);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ INT32 nNum,nDen;
+/*N*/ UINT16 nTmp;
+/*N*/ UINT8 nTmp8;
+/*N*/
+/*N*/ rIn >> nNum;
+/*N*/ rIn >> nDen;
+/*N*/
+/*N*/ aObjUnit = Fraction(nNum,nDen);
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/
+/*N*/ eObjUnit = MapUnit(nTmp);
+/*N*/
+/*N*/ // Komprimiert ?
+/*N*/ rIn >> nTmp;
+/*N*/
+/*N*/ //rIn.nJoeDummy=(nTmp==1);
+/*N*/ rIn >> nTmp8;
+/*N*/
+/*N*/ bPageNotValid = (nTmp == 1);
+/*N*/
+/*N*/ rIn >> nTmp8; // Reserve DummyByte
+/*N*/
+/*N*/ BOOL bExtFiles(rHead.GetVersion() >= 1);
+/*N*/
+/*N*/ if(bExtFiles)
+/*N*/ {
+/*N*/ // Tabellen-, Listen- und Palettennamen lesen
+/*N*/ XubString aName;
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ {
+/*N*/ // vor V11 gab's noch keine ModelInfo, deshalb CharSet von hier
+/*N*/ // und rein zufaellig gab's genau bis inkl. zur V10
+/*N*/ // an dieser Stelle einen CharSet
+/*N*/ INT16 nCharSet;
+/*N*/
+/*N*/ // #90477# rIn >> nCharSet;
+/*N*/ rIn >> nCharSet;
+/*N*/ nCharSet = (INT16)GetSOLoadTextEncoding((rtl_TextEncoding)nCharSet, (sal_uInt16)rIn.GetVersion());
+/*N*/
+/*N*/ // StreamCharSet setzen, damit Strings beim
+/*N*/ // Lesen automatisch konvertiert werden
+/*N*/ // #90477# rIn.SetStreamCharSet(rtl_TextEncoding(nCharSet));
+/*N*/ rIn.SetStreamCharSet(GetSOLoadTextEncoding(rtl_TextEncoding(nCharSet), (sal_uInt16)rIn.GetVersion()));
+/*N*/ }
+/*N*/
+/*N*/ // Tabellen- und Listennamen lesen (Tabellen/Listen existieren schon) // SOH!!!
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ if(!bExtColorTable)
+/*N*/ {
+/*N*/ // der Writer hat seinen eigenen ColorTable
+/*N*/ if(!aName.Len())
+/*N*/ aName = pszStandard;
+/*N*/
+/*N*/ if(pColorTable)
+/*N*/ pColorTable->SetName(aName);
+/*N*/ }
+/*N*/
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ if(!aName.Len())
+/*N*/ aName = pszStandard;
+/*N*/ if(pDashList)
+/*N*/ pDashList->SetName(aName);
+/*N*/
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ if(!aName.Len())
+/*N*/ aName = pszStandard;
+/*N*/ if(pLineEndList)
+/*N*/ pLineEndList->SetName(aName);
+/*N*/
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ if(!aName.Len())
+/*N*/ aName = pszStandard;
+/*N*/ if(pHatchList)
+/*N*/ pHatchList->SetName(aName);
+/*N*/
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ if(!aName.Len())
+/*N*/ aName = pszStandard;
+/*N*/ if(pGradientList)
+/*N*/ pGradientList->SetName(aName);
+/*N*/
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ if(!aName.Len())
+/*N*/ aName = pszStandard;
+/*N*/ if(pBitmapList)
+/*N*/ pBitmapList->SetName(aName);
+/*N*/
+/*N*/ // Wenn gewuenscht kann hier SetDirty() an den Tabellen gesetzt werden, ist m.M. nach aber ueberfluessig ! SOH.
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Ansonsten altes Format: Listen und Tables sind embedded
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*?*/ ByteString aMsg("Das Format dieser Datei ist noch von April '95 (Version ");
+/*?*/ aMsg += ByteString::CreateFromInt32( 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;
+/*N*/ }
+/*N*/
+/*N*/ // UIUnit wird ab V12 gestreamt
+/*N*/ if(rHead.GetVersion() >= 12 && pModelMiscCompat->GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ rIn >> nNum;
+/*N*/ rIn >> nDen;
+/*N*/
+/*N*/ aUIScale = Fraction(nNum, nDen);
+/*N*/
+/*N*/ rIn >> nTmp;
+/*N*/
+/*N*/ eUIUnit = FieldUnit(nTmp);
+/*N*/ }
+/*N*/
+/*N*/ // ab 09-04-1997 fuer #37710#: Text in Dafaultgroesse vom Writer ins Draw und umgekehrt
+/*N*/ if(rHead.GetVersion() >= 13 && pModelMiscCompat->GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ rIn >> nNum;
+/*N*/ nDefTextHgt = nNum;
+/*N*/
+/*N*/ rIn >> nNum;
+/*N*/ nDefaultTabulator = (UINT16)nNum;
+/*N*/
+/*N*/ Outliner& rOutliner = GetDrawOutliner();
+/*N*/ rOutliner.SetDefTab(nDefaultTabulator);
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 14 && pModelMiscCompat->GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ // StarDraw-Preview: Nummer der MasterPage der ersten Standard-Seite
+/*N*/ rIn >> nStarDrawPreviewMasterPageNum;
+/*N*/ }
+/*N*/
+/*N*/ if(pModelMiscCompat)
+/*N*/ {
+/*N*/ delete pModelMiscCompat;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DoProgress(rIn.Tell());
+/*N*/ //SdrIOHeader aHead;
+/*N*/
+/*N*/ // Seiten, Layer und LayerSets einlesen
+/*N*/ BOOL bEnde(FALSE);
+/*N*/ UINT16 nMasterPageNum(0);
+/*N*/ BOOL bAllPagesLoaded(TRUE);
+/*N*/
+/*N*/ while(!rIn.GetError() && !rIn.IsEof() && !bEnde)
+/*N*/ {
+/*N*/ SdrIOHeaderLookAhead aHead(rIn);
+/*N*/ //ULONG nPos0=rIn.Tell();
+/*N*/ //rIn>>aHead;
+/*N*/
+/*N*/ if(!aHead.IsMagic())
+/*N*/ {
+/*N*/ // Format-Fehler
+/*N*/ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
+/*N*/ return;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(!aHead.IsEnde())
+/*N*/ {
+/*N*/ //rIn.Seek(nPos0); // Die Headers wollen alle selbst lesen
+/*N*/ if(aHead.IsID(SdrIOPageID))
+/*N*/ {
+/*N*/ if(!bStarDrawPreviewMode || GetPageCount() < 3)
+/*N*/ {
+/*N*/ // Page lesen
+/*N*/ SdrPage* pPg = AllocPage(FALSE);
+/*N*/
+/*N*/ rIn >> *pPg;
+/*N*/ InsertPage(pPg);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bAllPagesLoaded = FALSE;
+/*N*/ aHead.SkipRecord();
+/*N*/ }
+/*N*/ }
+/*N*/ else if(aHead.IsID(SdrIOMaPgID))
+/*N*/ {
+/*N*/ if(!bStarDrawPreviewMode
+/*N*/ || nStarDrawPreviewMasterPageNum == SDRPAGE_NOTFOUND
+/*N*/ || nMasterPageNum == 0
+/*N*/ || nMasterPageNum <= nStarDrawPreviewMasterPageNum
+/*N*/ || nMasterPageNum <= nStarDrawPreviewMasterPageNum + 1)
+/*N*/ {
+/*N*/ // Im StarDrawPreviewMode Standard und Notizseite lesen!
+/*N*/ // MasterPage lesen
+/*N*/ SdrPage* pPg = AllocPage(TRUE);
+/*N*/
+/*N*/ rIn >> *pPg;
+/*N*/ InsertMasterPage(pPg);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bAllPagesLoaded = FALSE;
+/*N*/ aHead.SkipRecord();
+/*N*/ }
+/*N*/
+/*N*/ nMasterPageNum++;
+/*N*/ }
+/*N*/ else if(aHead.IsID(SdrIOLayrID))
+/*N*/ {
+/*N*/ //SdrLayer* pLay=GetLayer().NewLayer("");
+/*N*/ // Layerdefinition lesen
+/*N*/ SdrLayer* pLay = new SdrLayer;
+/*N*/
+/*N*/ rIn >> *pLay;
+/*N*/ GetLayerAdmin().InsertLayer(pLay);
+/*N*/ }
+/*N*/ else if(aHead.IsID(SdrIOLSetID))
+/*N*/ {
+/*N*/ //SdrLayerSet* pSet=GetLayer().NewLayerSet("");
+/*N*/ SdrLayerSet* pSet = new SdrLayerSet; // Layersetdefinition lesen
+/*N*/
+/*N*/ rIn >> *pSet;
+/*N*/ GetLayerAdmin().InsertLayerSet(pSet);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // aha, das wil keiner. Also ueberlesen.
+/*N*/ aHead.SkipRecord();
+/*N*/ //rIn.Seek(nPos0+aHead.nBlkSize);
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bEnde = TRUE;
+/*N*/
+/*N*/ // Endemarke weglesen
+/*N*/ aHead.SkipRecord();
+/*N*/ }
+/*N*/ }
+/*N*/ DoProgress(rIn.Tell());
+/*N*/ }
+/*N*/
+/*N*/ if(bStarDrawPreviewMode && bAllPagesLoaded)
+/*N*/ {
+/*N*/ // Obwohl StarDrawPreviewMode wurden doch alle Seiten geladen,
+/*N*/ // um dieses kenntlich zu machen, wird das Flag zurueckgesetzt
+/*N*/ bStarDrawPreviewMode = FALSE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::AfterRead()
+/*N*/ {
+/*N*/ // alle MasterPages und alle Pages durchlaufen
+/*N*/ UINT16 nCnt(GetMasterPageCount());
+/*N*/ UINT16 i;
+/*N*/
+/*N*/ for(i=0; i < nCnt; i++)
+/*N*/ {
+/*N*/ GetMasterPage(i)->AfterRead();
+/*N*/ }
+/*N*/
+/*N*/ nCnt = GetPageCount();
+/*N*/
+/*N*/ for(i=0; i < nCnt; i++)
+/*N*/ {
+/*N*/ GetPage(i)->AfterRead();
+/*N*/ }
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ // Investigation of bMyPool to check if it's allowed to delete the OLE objects.
+/*N*/ // If bMyPool == FALSE it's not allowed (Writer)
+/*N*/ if( pPersist && bMyPool )
+/*N*/ {
+/*N*/ SvInfoObjectMemberList* pList = (SvInfoObjectMemberList*) pPersist->GetObjectList();
+/*N*/
+/*N*/ if( pList )
+/*N*/ {
+/*N*/ SvInfoObjectRef pInfo = pList->First();
+/*N*/ while( pInfo.Is() )
+/*N*/ {
+/*N*/ BOOL bFound = FALSE;
+/*N*/ String aName = pInfo->GetObjName();
+/*N*/
+/*N*/ nCnt = GetPageCount();
+/*N*/ UINT16 a; for( a = 0; a < nCnt && !bFound; a++ )
+/*N*/ {
+/*N*/ // Pages
+/*N*/ SdrObjListIter aIter( *GetPage(a) );
+/*N*/ while( !bFound && aIter.IsMore() )
+/*N*/ {
+/*N*/ SdrObject* pObj = aIter.Next();
+/*N*/ if( pObj->ISA(SdrOle2Obj) )
+/*N*/ {
+/*N*/ if( aName == static_cast< SdrOle2Obj* >( pObj )->GetPersistName() )
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ nCnt = GetMasterPageCount();
+/*N*/ for( a = 0; a < nCnt && !bFound; a++ )
+/*N*/ {
+/*N*/ // MasterPages
+/*N*/ SdrObjListIter aIter( *GetMasterPage(a) );
+/*N*/ while( !bFound && aIter.IsMore() )
+/*N*/ {
+/*N*/ SdrObject* pObj = aIter.Next();
+/*N*/ if( pObj->ISA(SdrOle2Obj) )
+/*N*/ {
+/*N*/ if( aName == static_cast< SdrOle2Obj* >( pObj )->GetPersistName() )
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bFound )
+/*N*/ pInfo->SetDeleted(TRUE);
+/*N*/
+/*N*/ pInfo = pList->Next();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ ULONG SdrModel::ImpCountAllSteamComponents() const
+/*N*/ {
+/*N*/ UINT32 nCnt(0);
+/*N*/ UINT16 nAnz(GetMasterPageCount());
+/*N*/ UINT16 nNum;
+/*N*/
+/*N*/ for(nNum = 0; nNum < nAnz; nNum++)
+/*N*/ {
+/*N*/ nCnt += GetMasterPage(nNum)->CountAllObjects();
+/*N*/ }
+/*N*/
+/*N*/ nAnz = GetPageCount();
+/*N*/
+/*N*/ for(nNum = 0; nNum < nAnz; nNum++)
+/*N*/ {
+/*N*/ nCnt += GetPage(nNum)->CountAllObjects();
+/*N*/ }
+/*N*/
+/*N*/ return nCnt;
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrModel& rMod)
+/*N*/ {
+/*N*/ ((SdrModel*)&rMod)->nProgressOfs=0;
+/*N*/ ((SdrModel*)&rMod)->nProgressMax=rMod.ImpCountAllSteamComponents(); // Hier passenden Wert einsetzen
+/*N*/ ((SdrModel*)&rMod)->DoProgress(0);
+/*N*/ ULONG nPos0=rOut.Tell();
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOModlID);
+/*N*/ USHORT nCompressMerk=rOut.GetCompressMode(); // Der CompressMode wird von SdrModel::ReadData() gesetzt
+/*N*/ rMod.WriteData(rOut);
+/*N*/ rOut.SetCompressMode(nCompressMerk); // CompressMode wieder restaurieren
+/*N*/ ((SdrModel*)&rMod)->DoProgress(0xFFFFFFFF);
+/*N*/ ((SdrModel*)&rMod)->Broadcast(SdrHint(HINT_MODELSAVED)); // #43095#
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrModel& rMod)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ rMod.aReadDate=DateTime(); // Zeitpunkt des Lesens merken
+/*N*/ rMod.nProgressOfs=rIn.Tell();
+/*N*/ rMod.nProgressMax=0xFFFFFFFF; // Vorlaeufiger Wert
+/*N*/ rMod.DoProgress(0);
+/*N*/ rMod.Clear();
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ rMod.nLoadVersion=aHead.GetVersion();
+/*N*/ if (!aHead.IsMagic()) {
+/*?*/ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR); // Format-Fehler
+/*?*/ return rIn;
+/*N*/ }
+/*N*/ if (aHead.GetMajorVersion()>nAktSdrFileMajorVersion) {
+/*?*/ rIn.SetError(SVSTREAM_WRONGVERSION); // Datei zu neu / Programm zu alt
+/*?*/ return rIn;
+/*N*/ }
+/*N*/ rMod.nProgressMax=aHead.GetBlockSize();
+/*N*/ rMod.DoProgress(rIn.Tell());
+/*N*/ rMod.bLoading=TRUE;
+/*N*/ rtl_TextEncoding eStreamCharSetMerker=rIn.GetStreamCharSet(); // Der StreamCharSet wird von SdrModel::ReadData() gesetzt
+/*N*/ USHORT nCompressMerk=rIn.GetCompressMode(); // Der CompressMode wird von SdrModel::ReadData() gesetzt
+/*N*/ rMod.ReadData(aHead,rIn);
+/*N*/ rIn.SetCompressMode(nCompressMerk); // CompressMode wieder restaurieren
+/*N*/
+/*N*/ rIn.SetStreamCharSet(eStreamCharSetMerker); // StreamCharSet wieder restaurieren
+/*N*/
+/*N*/ rMod.bLoading=FALSE;
+/*N*/ rMod.DoProgress(rIn.Tell());
+/*N*/ rMod.AfterRead();
+/*N*/ rMod.DisposeLoadedModels();
+/*N*/
+/*N*/ rMod.ImpSetUIUnit(); // weil ggf. neues Scaling eingelesen
+/*N*/ rMod.DoProgress(0xFFFFFFFF);
+/*N*/ return rIn;
+/*N*/ }
+
+/*N*/ void SdrModel::PreSave()
+/*N*/ {
+/*N*/ sal_uInt16 nCnt(GetMasterPageCount());
+/*N*/
+/*N*/ sal_uInt16 a; for(a=0; a < nCnt; a++)
+/*N*/ {
+/*N*/ // MasterPages
+/*N*/ const SdrPage& rPage = *GetMasterPage(a);
+/*N*/ SdrObject* pObj = rPage.GetBackgroundObj();
+/*N*/ if( pObj )
+/*?*/ pObj->PreSave();
+/*N*/
+/*N*/ for(sal_uInt32 b(0); b < rPage.GetObjCount(); b++)
+/*N*/ rPage.GetObj(b)->PreSave();
+/*N*/ }
+/*N*/
+/*N*/ nCnt = GetPageCount();
+/*N*/ for(a = 0; a < nCnt; a++)
+/*N*/ {
+/*N*/ // Pages
+/*N*/ const SdrPage& rPage = *GetPage(a);
+/*N*/ SdrObject* pObj = rPage.GetBackgroundObj();
+/*N*/ if( pObj )
+/*N*/ pObj->PreSave();
+/*N*/
+/*N*/ for(sal_uInt32 b(0); b < rPage.GetObjCount(); b++)
+/*N*/ rPage.GetObj(b)->PreSave();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::PostSave()
+/*N*/ {
+/*N*/ sal_uInt16 nCnt(GetMasterPageCount());
+/*N*/
+/*N*/ sal_uInt16 a; for(a=0; a < nCnt; a++)
+/*N*/ {
+/*N*/ // MasterPages
+/*N*/ const SdrPage& rPage = *GetMasterPage(a);
+/*N*/ SdrObject* pObj = rPage.GetBackgroundObj();
+/*N*/ if( pObj )
+/*?*/ pObj->PostSave();
+/*N*/
+/*N*/ for(sal_uInt32 b(0); b < rPage.GetObjCount(); b++)
+/*N*/ rPage.GetObj(b)->PostSave();
+/*N*/ }
+/*N*/
+/*N*/ nCnt = GetPageCount();
+/*N*/ for(a = 0; a < nCnt; a++)
+/*N*/ {
+/*N*/ // Pages
+/*N*/ const SdrPage& rPage = *GetPage(a);
+/*N*/ SdrObject* pObj = rPage.GetBackgroundObj();
+/*N*/ if( pObj )
+/*N*/ pObj->PostSave();
+/*N*/
+/*N*/ for(sal_uInt32 b(0); b < rPage.GetObjCount(); b++)
+/*N*/ rPage.GetObj(b)->PostSave();
+/*N*/ }
+/*N*/ }
+
+/*N*/ uno::Reference< uno::XInterface > SdrModel::getUnoModel()
+/*N*/ {
+/*N*/ // try weak reference first
+/*N*/ uno::Reference< uno::XInterface > xModel( mxUnoModel );
+/*N*/
+/*N*/ if( !xModel.is() )
+/*N*/ {
+/*N*/ // create one
+/*N*/ xModel = createUnoModel();
+/*N*/
+/*N*/ mxUnoModel = xModel;
+/*N*/ }
+/*N*/
+/*N*/ return xModel;
+/*N*/
+/*N*/ }
+
+/*?*/ uno::Reference< uno::XInterface > SdrModel::createUnoModel()
+/*?*/ {
+/*?*/ DBG_ERROR( "SdrModel::createUnoModel() - base implementation should not be called!" );
+/*?*/ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt;
+/*?*/ return xInt;
+/*?*/ }
+
+/*N*/ void SdrModel::setLock( BOOL bLock )
+/*N*/ {
+/*N*/ if( mbModelLocked != bLock )
+/*N*/ {
+/*N*/ mbModelLocked = bLock;
+/*N*/ if( sal_False == bLock )
+/*N*/ {
+/*N*/ // ReformatAllTextObjects(); #103122# due to a typo in the above if, this code was never
+/*N*/ // executed, so I remove it until we discover that we need it here
+/*N*/ ImpReformatAllEdgeObjects(); // #103122#
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModel )
+/*N*/ {
+/*N*/ if( pSourceSet && pDestSet && (pSourceSet != pDestSet ) )
+/*N*/ {
+/*N*/ if( pNewModel == NULL )
+/*N*/ pNewModel = this;
+/*N*/
+/*N*/ SfxWhichIter aWhichIter(*pSourceSet);
+/*N*/ sal_uInt16 nWhich(aWhichIter.FirstWhich());
+/*N*/ const SfxPoolItem *pPoolItem;
+/*N*/
+/*N*/ while(nWhich)
+/*N*/ {
+/*N*/ if(SFX_ITEM_SET == pSourceSet->GetItemState(nWhich, FALSE, &pPoolItem))
+/*N*/ {
+/*N*/ const SfxPoolItem* pItem = pPoolItem;
+/*N*/
+/*N*/ switch( nWhich )
+/*N*/ {
+/*N*/ case XATTR_FILLBITMAP:
+/*N*/ pItem = ((XFillBitmapItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ case XATTR_LINEDASH:
+/*N*/ pItem = ((XLineDashItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ case XATTR_LINESTART:
+/*N*/ pItem = ((XLineStartItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ case XATTR_LINEEND:
+/*N*/ pItem = ((XLineEndItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ case XATTR_FILLGRADIENT:
+/*N*/ pItem = ((XFillGradientItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ case XATTR_FILLFLOATTRANSPARENCE:
+/*N*/ // #85953# allow all kinds of XFillFloatTransparenceItem to be set
+/*N*/ pItem = ((XFillFloatTransparenceItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ case XATTR_FILLHATCH:
+/*N*/ pItem = ((XFillHatchItem*)pItem)->checkForUniqueItem( pNewModel );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ // set item
+/*N*/ if( pItem )
+/*N*/ {
+/*N*/ pDestSet->Put(*pItem);
+/*N*/
+/*N*/ // delete item if it was a generated one
+/*N*/ if( pItem != pPoolItem)
+/*N*/ delete (SfxPoolItem*)pItem;
+/*N*/ }
+/*N*/ }
+/*N*/ nWhich = aWhichIter.NextWhich();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrModel::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars )
+/*N*/ {
+/*N*/ if( mpForbiddenCharactersTable )
+/*N*/ mpForbiddenCharactersTable->release();
+/*N*/
+/*N*/ mpForbiddenCharactersTable = xForbiddenChars.get();
+/*N*/
+/*N*/ if( mpForbiddenCharactersTable )
+/*N*/ mpForbiddenCharactersTable->acquire();
+/*N*/
+/*N*/ ImpSetOutlinerDefaults( pDrawOutliner );
+/*N*/ ImpSetOutlinerDefaults( pHitTestOutliner );
+/*N*/ }
+
+/*N*/ rtl::Reference<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const
+/*N*/ {
+/*N*/ return mpForbiddenCharactersTable;
+/*N*/ }
+
+/*N*/ void SdrModel::SetCharCompressType( UINT16 nType )
+/*N*/ {
+/*N*/ if( nType != mnCharCompressType )
+/*N*/ {
+/*?*/ mnCharCompressType = nType;
+/*?*/ ImpSetOutlinerDefaults( pDrawOutliner );
+/*?*/ ImpSetOutlinerDefaults( pHitTestOutliner );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::SetKernAsianPunctuation( sal_Bool bEnabled )
+/*N*/ {
+/*N*/ if( mbKernAsianPunctuation != bEnabled )
+/*N*/ {
+/*?*/ mbKernAsianPunctuation = bEnabled;
+/*?*/ ImpSetOutlinerDefaults( pDrawOutliner );
+/*?*/ ImpSetOutlinerDefaults( pHitTestOutliner );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrModel::ReformatAllTextObjects()
+/*N*/ {
+/*N*/ ImpReformatAllTextObjects();
+/*N*/ }
+
+
+/*N*/ SdrOutliner* SdrModel::createOutliner( USHORT nOutlinerMode )
+/*N*/ {
+/*N*/ if( NULL == mpOutlinerCache )
+/*N*/ mpOutlinerCache = new SdrOutlinerCache(this);
+/*N*/
+/*N*/ return mpOutlinerCache->createOutliner( nOutlinerMode );
+/*N*/ }
+
+/*N*/ void SdrModel::disposeOutliner( SdrOutliner* pOutliner )
+/*N*/ {
+/*N*/ if( mpOutlinerCache )
+/*N*/ {
+/*N*/ mpOutlinerCache->disposeOutliner( pOutliner );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ delete pOutliner;
+/*N*/ }
+/*N*/ }
+
+/*?*/ SvxNumType SdrModel::GetPageNumType() const
+/*?*/ {
+/*?*/ return SVX_ARABIC;
+/*?*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrHint,SfxHint);
+
+/*N*/ SdrHint::SdrHint(const SdrPage& rNewPage)
+/*N*/ {
+/*N*/ aRect=Rectangle(0,0,rNewPage.GetWdt(),rNewPage.GetHgt());
+/*N*/ pPage=&rNewPage;
+/*N*/ pObj=NULL;
+/*N*/ pObjList=&rNewPage;
+/*N*/ bNeedRepaint=TRUE;
+/*N*/ eHint=HINT_PAGECHG;
+/*N*/ }
+
+/*N*/ SdrHint::SdrHint(const SdrObject& rNewObj)
+/*N*/ {
+/*N*/ aRect=rNewObj.GetBoundRect();
+/*N*/ pPage=rNewObj.GetPage();
+/*N*/ pObj=&rNewObj;
+/*N*/ pObjList=rNewObj.GetObjList();
+/*N*/ bNeedRepaint=TRUE;
+/*N*/ eHint=HINT_OBJCHG;
+/*N*/ }
+/*N*/
+/*N*/ SdrHint::SdrHint(const SdrObject& rNewObj, const Rectangle& rRect)
+/*N*/ {
+/*N*/ aRect = rRect;
+/*N*/ pPage = rNewObj.GetPage();
+/*N*/ pObj = &rNewObj;
+/*N*/ pObjList = rNewObj.GetObjList();
+/*N*/ bNeedRepaint = TRUE;
+/*N*/ eHint = HINT_OBJCHG;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmrkv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmrkv.cxx
new file mode 100644
index 000000000000..19dd17c5cf14
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdmrkv.cxx
@@ -0,0 +1,901 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdview.hxx"
+#include "svdpagv.hxx"
+#include "svdio.hxx"
+#include "svdoole2.hxx"
+
+
+#include "svdstr.hrc"
+
+// #105722#
+#include "svdopath.hxx"
+
+// #i13033#
+#include "scene3d.hxx"
+
+// OD 30.06.2003 #108784#
+#include <svdovirt.hxx>
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@
+// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@@@@ @@@@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMarkView::ImpClearVars()
+/*N*/ {
+/*N*/ eDragMode=SDRDRAG_MOVE;
+/*N*/ bHdlShown=FALSE;
+/*N*/ bRefHdlShownOnly=FALSE;
+/*N*/ eEditMode=SDREDITMODE_EDIT;
+/*N*/ eEditMode0=SDREDITMODE_EDIT;
+/*N*/ bDesignMode=FALSE;
+/*N*/ bMarking=FALSE;
+/*N*/ bMarkingPoints=FALSE;
+/*N*/ bMarkingGluePoints=FALSE;
+/*N*/ bUnmarking=FALSE;
+/*N*/ pMarkedObj=NULL;
+/*N*/ pMarkedPV=NULL;
+/*N*/ bForceFrameHandles=FALSE;
+/*N*/ bPlusHdlAlways=FALSE;
+/*N*/ nFrameHandlesLimit=50;
+/*N*/ nSpecialCnt=0;
+/*N*/ bInsPolyPoint=FALSE;
+/*N*/ nInsPointNum=0;
+/*N*/ bEdgesOfMarkedNodesDirty=FALSE;
+/*N*/ bMarkedObjRectDirty=FALSE;
+/*N*/ bMarkedPointsRectsDirty=FALSE;
+/*N*/ bHdlHidden=FALSE;
+/*N*/ bMrkPntDirty=FALSE;
+/*N*/ bMarkHdlWhenTextEdit=FALSE;
+/*N*/ // bSolidHdlBackgroundInvalid=FALSE;
+/*N*/ bMarkableObjCountDirty=FALSE; // noch nicht implementiert
+/*N*/ nMarkableObjCount=0; // noch nicht implementiert
+/*N*/ }
+
+/*N*/ SdrMarkView::SdrMarkView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrSnapView(pModel1,pOut),
+/*N*/ aHdl(this)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ StartListening(*pModel1);
+/*N*/ }
+
+/*N*/ void __EXPORT SdrMarkView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+/*N*/ if (pSdrHint!=NULL) {
+/*N*/ SdrHintKind eKind=pSdrHint->GetKind();
+/*N*/ if (eKind==HINT_OBJLISTCLEARED) {
+/*N*/ USHORT nAnz=GetPageViewCount();
+/*N*/ BOOL bMLChgd=FALSE;
+/*N*/ for (USHORT nv=0; nv<nAnz; nv++) {
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ if (pPV->GetObjList()==pSdrHint->GetObjList()) {
+/*?*/ aMark.DeletePageView(*pPV);
+/*?*/ bMLChgd=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (bMLChgd) MarkListHasChanged();
+/*N*/ }
+/*N*/ if (eKind==HINT_OBJCHG || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED)
+/*N*/ {
+/*N*/ if(bHdlShown
+/*N*/ // #75438# do not hide handles if no repaint will be triggered
+/*N*/ // since the repaint will show handles again later
+/*N*/ && pSdrHint->IsNeedRepaint())
+/*N*/ {
+/*N*/ HideMarkHdl(NULL);
+/*N*/ }
+/*N*/
+/*N*/ bMarkedObjRectDirty=TRUE;
+/*N*/ bMarkedPointsRectsDirty=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ SdrSnapView::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ }
+
+/*N*/ void SdrMarkView::ModelHasChanged()
+/*N*/ {
+/*N*/ SdrPaintView::ModelHasChanged();
+/*N*/ aMark.SetNameDirty();
+/*N*/ bMarkedObjRectDirty=TRUE;
+/*N*/ bMarkedPointsRectsDirty=TRUE;
+/*N*/ // Es sind beispielsweise Obj markiert und aMark ist Sorted.
+/*N*/ // In einer anderen View 2 wird die ObjOrder veraendert
+/*N*/ // (z.B. MovToTop()). Dann ist Neusortieren der MarkList erforderlich.
+/*N*/ aMark.SetUnsorted();
+/*N*/ aMark.ForceSort();
+/*N*/ bMrkPntDirty=TRUE;
+/*N*/ UndirtyMrkPnt();
+/*N*/ SdrView* pV=(SdrView*)this;
+/*N*/ if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) { // an dieser Stelle habe ich ein ziemliches Problem !!!
+/*N*/ 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);
+// }
+// }
+// }
+ }
+/*N*/ }
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ BOOL SdrMarkView::IsAction() const
+/*N*/ {
+/*N*/ return SdrSnapView::IsAction() || bMarking || bMarkingPoints || bMarkingGluePoints;
+/*N*/ }
+
+
+
+
+/*N*/ void SdrMarkView::BrkAction()
+/*N*/ {
+/*N*/ SdrSnapView::BrkAction();
+/*N*/ BrkMarkObj();
+/*N*/ BrkMarkPoints();
+/*N*/ BrkMarkGluePoints();
+/*N*/ }
+
+
+/*N*/ void SdrMarkView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+/*N*/ {
+/*N*/ SdrSnapView::ToggleShownXor(pOut,pRegion);
+/*N*/ if ((bMarking || bMarkingPoints || bMarkingGluePoints) && aDragStat.IsShown()) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 DrawMarkObjOrPoints(pOut);
+/*N*/ }
+// if (bHdlShown) {
+// DrawMarkHdl(pOut,FALSE);
+// } else if (bRefHdlShownOnly) {
+// DrawMarkHdl(pOut,BOOL(2)); HACK(nur die Ref-Hdls painten)
+// }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMarkView::ClearPageViews()
+/*N*/ {
+/*N*/ UnmarkAllObj();
+/*N*/ SdrSnapView::ClearPageViews();
+/*N*/ }
+
+/*N*/ void SdrMarkView::HidePage(SdrPageView* pPV)
+/*N*/ {
+/*N*/ if(pPV)
+/*N*/ {
+/*N*/ // break all creation actions when hiding page (#75081#)
+/*N*/ BrkAction();
+/*N*/
+/*N*/ BOOL bVis(IsMarkHdlShown());
+/*N*/
+/*N*/ if(bVis)
+/*?*/ HideMarkHdl(NULL);
+/*N*/
+/*N*/ // Alle Markierungen dieser Seite verwerfen
+/*N*/ BOOL bMrkChg(aMark.DeletePageView(*pPV));
+/*N*/ SdrSnapView::HidePage(pPV);
+/*N*/
+/*N*/ if(bMrkChg)
+/*N*/ {
+/*?*/ MarkListHasChanged();
+/*?*/ AdjustMarkHdl();
+/*N*/ }
+/*N*/
+/*N*/ if(bVis)
+/*N*/ ShowMarkHdl(NULL);
+/*N*/ }
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+/*N*/ void SdrMarkView::BrkMarkObj()
+/*N*/ {
+/*N*/ if (bMarking) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+/*N*/ void SdrMarkView::BrkMarkPoints()
+/*N*/ {
+/*N*/ if (bMarkingPoints) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+/*N*/ void SdrMarkView::BrkMarkGluePoints()
+/*N*/ {
+/*N*/ if (bMarkingGluePoints) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//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);
+//}
+
+/*N*/ void SdrMarkView::ImpShowMarkHdl(OutputDevice* pOut, const Region* pRegion, BOOL bNoRefHdl)
+/*N*/ {
+// if (IsSolidMarkHdl())
+/*N*/ bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+/*N*/ 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);
+/*N*/ bRefHdlShownOnly=FALSE;
+/*N*/ bHdlShown=TRUE;
+
+ // refresh IAOs
+// RefreshAllIAOManagers();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMarkView::ShowMarkHdl(OutputDevice* pOut, BOOL bNoRefHdl)
+/*N*/ {
+// if (IsSolidMarkHdl())
+/*N*/ bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+/*N*/ ImpShowMarkHdl(pOut,NULL,bNoRefHdl);
+
+ // refresh IAOs
+//STRIP012/*N*/ RefreshAllIAOManagers();
+/*N*/ }
+
+
+/*N*/ void SdrMarkView::HideMarkHdl(OutputDevice* pOut, BOOL bNoRefHdl)
+/*N*/ {
+// if (IsSolidMarkHdl())
+/*N*/ bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+/*N*/ if (bHdlShown) {
+/*N*/ 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);
+// }
+// }
+// }
+// }
+// }
+// }
+/*N*/ }
+/*N*/ bRefHdlShownOnly=bNoRefHdl;
+/*N*/ bHdlShown=FALSE;
+/*N*/ }
+// bSolidHdlBackgroundInvalid=FALSE;
+
+ // refresh IAOs
+// RefreshAllIAOManagers();
+/*N*/ }
+
+/*N*/ void SdrMarkView::SetMarkHdlHidden(BOOL bOn)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ BOOL SdrMarkView::ImpIsFrameHandles() const
+/*N*/ {
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ BOOL bFrmHdl=nMarkAnz>nFrameHandlesLimit || bForceFrameHandles;
+/*N*/ BOOL bStdDrag=eDragMode==SDRDRAG_MOVE;
+/*N*/ if (nMarkAnz==1 && bStdDrag && bFrmHdl) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ 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();
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ if (!bFrmHdl) {
+/*N*/ // FrameHandles, wenn wenigstens 1 Obj kein SpecialDrag kann
+/*N*/ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bFrmHdl; nMarkNum++) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ return bFrmHdl;
+/*N*/ }
+
+/*N*/ void SdrMarkView::SetMarkHandles()
+/*N*/ {
+/*N*/ // #105722# remember old focus handle values to search for it again
+/*N*/ const SdrHdl* pSaveOldFocusHdl = aHdl.GetFocusHdl();
+/*N*/ sal_Bool bSaveOldFocus(sal_False);
+/*N*/ sal_uInt16 nSavePolyNum, nSavePointNum;
+/*N*/ SdrHdlKind eSaveKind;
+/*N*/ SdrObject* pSaveObj;
+/*N*/
+/*N*/ if(pSaveOldFocusHdl
+/*N*/ && pSaveOldFocusHdl->GetObj()
+/*N*/ && pSaveOldFocusHdl->GetObj()->ISA(SdrPathObj)
+/*N*/ && (pSaveOldFocusHdl->GetKind() == HDL_POLY || pSaveOldFocusHdl->GetKind() == HDL_BWGT))
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");
+/*N*/ }
+/*N*/
+/*N*/ aHdl.Clear();
+/*N*/ aHdl.SetRotateShear(eDragMode==SDRDRAG_ROTATE);
+/*N*/ aHdl.SetDistortShear(eDragMode==SDRDRAG_SHEAR);
+/*N*/ pMarkedObj=NULL;
+/*N*/ pMarkedPV=NULL;
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ BOOL bStdDrag=eDragMode==SDRDRAG_MOVE;
+/*N*/ if (nMarkAnz==1) {
+/*?*/ pMarkedObj=aMark.GetMark(0)->GetObj();
+/*N*/ }
+/*N*/ BOOL bFrmHdl=ImpIsFrameHandles();
+/*N*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (bFrmHdl) {
+/*N*/ Rectangle aRect(GetMarkedObjRect());
+/*N*/ if (!aRect.IsEmpty()) { // sonst nix gefunden
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 BOOL bWdt0=aRect.Left()==aRect.Right();
+/*N*/ }
+/*N*/ } else {
+/*N*/ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 const SdrMark* pM=aMark.GetMark(nMarkNum);
+/*N*/ } // for nMarkNum
+/*N*/ } // if bFrmHdl else
+/*N*/ // GluePoint-Handles
+/*N*/ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+ // Drehpunkt/Spiegelachse
+/*N*/ AddDragModeHdl(eDragMode);
+/*N*/
+/*N*/ // add custom handles (used by other apps, e.g. AnchorPos)
+/*N*/ AddCustomHdl();
+/*N*/
+/*N*/ // sort handles
+/*N*/ aHdl.Sort();
+/*N*/
+/*N*/ // #105722# try to restore focus handle index from remembered values
+/*N*/ if(bSaveOldFocus)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMarkView::AddCustomHdl()
+/*N*/ {
+/*N*/ // add custom handles (used by other apps, e.g. AnchorPos)
+/*N*/ }
+
+/*N*/ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
+/*N*/ {
+/*N*/ switch(eMode)
+/*N*/ {
+/*?*/ case SDRDRAG_ROTATE:
+/*?*/ {
+/*?*/ // add rotation center
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SdrHdl* pHdl = new SdrHdl(aRef1, HDL_REF1);
+/*?*/
+/*?*/
+/*?*/ break;
+/*?*/ }
+/*?*/ case SDRDRAG_MIRROR:
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/
+/*?*/ break;
+/*?*/ }
+/*?*/ case SDRDRAG_TRANSPARENCE:
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ break;
+/*?*/ }
+/*?*/ case SDRDRAG_GRADIENT:
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void SdrMarkView::CheckMarked()
+/*N*/ {
+/*N*/ for (ULONG nm=aMark.GetMarkCount(); nm>0;) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+ // #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();
+
+ // #97995# at least reset the remembered BoundRect to prevent handle
+ // generation if bForceFrameHandles is TRUE.
+/*N*/ bMarkedObjRectDirty = TRUE;
+/*N*/ }
+
+/*N*/ void SdrMarkView::SetMarkRects()
+/*N*/ {
+/*N*/ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ pPV->SetHasMarkedObj(aMark.TakeSnapRect(pPV,pPV->MarkSnap()));
+/*N*/ aMark.TakeBoundRect(pPV,pPV->MarkBound());
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMarkView::SetFrameHandles(BOOL bOn)
+/*N*/ {
+/*N*/ if (bOn!=bForceFrameHandles) {
+/*N*/ BOOL bOld=ImpIsFrameHandles();
+/*N*/ bForceFrameHandles=bOn;
+/*N*/ BOOL bNew=ImpIsFrameHandles();
+/*N*/ if (bNew!=bOld) {
+/*N*/ AdjustMarkHdl(TRUE);
+/*N*/ MarkListHasChanged();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ BOOL SdrMarkView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
+/*N*/ {
+/*N*/ if (pObj)
+/*N*/ {
+/*N*/ if (pObj->IsMarkProtect() ||
+/*N*/ (!bDesignMode && pObj->IsUnoObj()))
+/*N*/ {
+/*N*/ // Objekt nicht selektierbar oder
+/*N*/ // SdrUnoObj nicht im DesignMode
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ return pPV!=NULL ? pPV->IsObjMarkable(pObj) : TRUE;
+/*N*/ }
+
+/*N*/ void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, BOOL bUnmark, BOOL bImpNoSetMarkHdl)
+/*N*/ {
+/*N*/ if (pObj!=NULL && pPV!=NULL && IsObjMarkable(pObj, pPV)) {
+/*N*/ BrkAction();
+/*N*/ if (!bUnmark) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ } else {
+/*N*/ ULONG nPos=aMark.FindObject(pObj);
+/*N*/ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bImpNoSetMarkHdl) {
+/*N*/ MarkListHasChanged();
+/*N*/ AdjustMarkHdl(TRUE);
+/*N*/ // if (!IsSolidMarkHdl() || !bSomeObjChgdFlag) {
+/*N*/ if (!bSomeObjChgdFlag) {
+/*N*/ // ShowMarkHdl kommt sonst mit dem AfterPaintTimer
+/*N*/ ShowMarkHdl(NULL);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMarkView::SetSolidMarkHdl(BOOL bOn)
+/*N*/ {
+/*N*/ if (bOn!=aHdl.IsFineHdl()) {
+/*N*/ BOOL bMerk=IsMarkHdlShown();
+/*N*/ if (bMerk) HideMarkHdl(NULL);
+/*N*/ aHdl.SetFineHdl(bOn);
+/*N*/ if (bMerk) ShowMarkHdl(NULL);
+/*N*/ }
+/*N*/ }
+
+/*N*/ #define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */
+/*N*/ SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
+/*N*/ {
+/*N*/ if ((nOptions & SDRSEARCH_IMPISMASTER) !=0 && pObj->IsNotVisibleAsMaster()) {
+/*N*/ return NULL;
+/*N*/ }
+/*N*/ BOOL bCheckIfMarkable=(nOptions & SDRSEARCH_TESTMARKABLE)!=0;
+/*N*/ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
+/*N*/ BOOL bDeep=(nOptions & SDRSEARCH_DEEP)!=0;
+/*N*/ BOOL bOLE=pObj->ISA(SdrOle2Obj);
+/*N*/ SdrObject* pRet=NULL;
+/*N*/ Point aPnt1(rPnt-pPV->GetOffset()); // rPnt auf PageView transformieren
+/*N*/ Rectangle aRect(pObj->GetBoundRect());
+/*N*/ USHORT nTol2=nTol;
+/*N*/ // Doppelte Tolezanz fuer ein an dieser View im TextEdit befindliches Objekt
+/*N*/ if (bOLE || pObj==((SdrObjEditView*)this)->GetTextEditObject()) nTol2*=2;
+/*N*/ aRect.Left ()-=nTol2; // Einmal Toleranz drauf fuer alle Objekte
+/*N*/ aRect.Top ()-=nTol2;
+/*N*/ aRect.Right ()+=nTol2;
+/*N*/ aRect.Bottom()+=nTol2;
+/*N*/ if (aRect.IsInside(aPnt1)) {
+/*N*/ if ((!bCheckIfMarkable || IsObjMarkable(pObj,pPV))) {
+/*N*/ SdrObjList* pOL=pObj->GetSubList();
+/*N*/ if (pOL!=NULL && pOL->GetObjCount()!=0) {
+/*N*/ SdrObject* pTmpObj;
+/*N*/ // OD 30.06.2003 #108784# - adjustment hit point for virtual
+/*N*/ // objects.
+/*N*/ Point aPnt( rPnt );
+/*N*/ if ( pObj->ISA(SdrVirtObj) )
+/*N*/ {
+/*N*/ Point aOffset = static_cast<SdrVirtObj*>(pObj)->GetOffset();
+/*N*/ aPnt.Move( -aOffset.X(), -aOffset.Y() );
+/*N*/ }
+/*N*/ pRet=ImpCheckObjHit(aPnt,nTol,pOL,pPV,nOptions,pMVisLay,pTmpObj);
+/*N*/ } else {
+/*N*/ SdrLayerID nLay=pObj->GetLayer();
+/*N*/ if (pPV->GetVisibleLayers().IsSet(nLay) &&
+/*N*/ (pMVisLay==NULL || pMVisLay->IsSet(nLay)))
+/*N*/ {
+/*N*/ pRet=pObj->CheckHit(aPnt1,nTol2,&pPV->GetVisibleLayers());
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bDeep && pRet!=NULL) pRet=pObj;
+/*N*/ return pRet;
+/*N*/ }
+
+/*N*/ SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
+/*N*/ {
+/*N*/ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
+/*N*/ SdrObject* pRet=NULL;
+/*N*/ rpRootObj=NULL;
+/*N*/ if (pOL!=NULL) {
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ ULONG nObjNum=bBack ? 0 : nObjAnz;
+/*N*/ while (pRet==NULL && (bBack ? nObjNum<nObjAnz : nObjNum>0)) {
+/*N*/ if (!bBack) nObjNum--;
+/*N*/ SdrObject* pObj=pOL->GetObj(nObjNum);
+/*N*/ pRet=ImpCheckObjHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
+/*N*/ if (pRet!=NULL) rpRootObj=pObj;
+/*N*/ if (bBack) nObjNum++;
+/*N*/ }
+/*N*/ }
+/*N*/ return pRet;
+/*N*/ }
+
+/*N*/ void SdrMarkView::UnmarkAllObj(SdrPageView* pPV)
+/*N*/ {
+/*N*/ 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
+/*?*/ }
+/*N*/ }
+
+
+/*N*/ void SdrMarkView::AdjustMarkHdl(BOOL bRestraintPaint)
+/*N*/ {
+/*N*/ BOOL bVis=bHdlShown;
+/*N*/ if (bVis) HideMarkHdl(NULL);
+/*N*/ CheckMarked();
+/*N*/ SetMarkRects();
+/*N*/ SetMarkHandles();
+/*N*/ if(bRestraintPaint && bVis)
+/*N*/ {
+/*?*/ ShowMarkHdl(NULL);
+/*N*/
+/*N*/ // refresh IAOs
+//STRIP012/*N*/ //--/ RefreshAllIAOManagers();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ const Rectangle& SdrMarkView::GetMarkedObjRect() const
+/*N*/ {
+/*N*/ if (bMarkedObjRectDirty) {
+/*N*/ ((SdrMarkView*)this)->bMarkedObjRectDirty=FALSE;
+/*N*/ Rectangle aRect;
+/*N*/ 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);
+/*N*/ }
+/*N*/ ((SdrMarkView*)this)->aMarkedObjRect=aRect;
+/*N*/ }
+/*N*/ return aMarkedObjRect;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// #i13033#
+// Helper method for building the transitive hull of all selected
+// objects
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMarkView::MarkListHasChanged()
+/*N*/ {
+/*N*/ aMark.SetNameDirty();
+/*N*/ bEdgesOfMarkedNodesDirty=TRUE;
+/*N*/ aEdgesOfMarkedNodes.Clear();
+/*N*/ aMarkedEdgesOfMarkedNodes.Clear();
+/*N*/
+/*N*/ // #i13033#
+/*N*/ // Forget transitive hull of complete selection
+/*N*/ maAllMarkedObjects.Clear();
+/*N*/
+/*N*/ bMarkedObjRectDirty=TRUE;
+/*N*/ bMarkedPointsRectsDirty=TRUE;
+/*N*/ #ifndef SVX_LIGHT
+/*?*/ if (pItemBrowser!=NULL) DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pItemBrowser->SetDirty();
+/*N*/ #endif
+/*N*/ BOOL bOneEdgeMarked=FALSE;
+/*N*/ if (aMark.GetMarkCount()==1) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ ImpSetGlueVisible4(bOneEdgeMarked);
+/*N*/ }
+/*N*/
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMarkView::WriteRecords(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrSnapView::WriteRecords(rOut);
+/*N*/ {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWDRAGMODE);
+/*N*/ rOut<<BOOL(eEditMode==SDREDITMODE_EDIT); // wg. Kompatibilitaet
+/*N*/ rOut<<USHORT(eDragMode);
+/*N*/ rOut<<aRef1;
+/*N*/ rOut<<aRef2;
+/*N*/ rOut<<BOOL(bForceFrameHandles);
+/*N*/ rOut<<BOOL(bPlusHdlAlways);
+/*N*/ rOut<<BOOL(eEditMode==SDREDITMODE_GLUEPOINTEDIT); // wg. Kompatibilitaet
+/*N*/ rOut<<USHORT(eEditMode);
+/*N*/ rOut<<BOOL(bMarkHdlWhenTextEdit);
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCROOKCENTER);
+/*N*/ rOut<<aLastCrookCenter;
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrMarkView::ReadRecord(const SdrIOHeader& rViewHead,
+/*N*/ const SdrNamedSubRecord& rSubHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (rSubHead.GetInventor()==SdrInventor) {
+/*N*/ bRet=TRUE;
+/*N*/ switch (rSubHead.GetIdentifier()) {
+/*N*/ case SDRIORECNAME_VIEWDRAGMODE: {
+/*N*/ eEditMode=SDREDITMODE_EDIT;
+/*N*/ BOOL bTmpBool;
+/*N*/ USHORT nTmpUShort;
+/*N*/ rIn>>bTmpBool; if (!bTmpBool) eEditMode=SDREDITMODE_CREATE; // wg. Kompatibilitaet
+/*N*/ USHORT nDragMode;
+/*N*/ rIn>>nDragMode;
+/*N*/ eDragMode=SdrDragMode(nDragMode);
+/*N*/ rIn>>aRef1;
+/*N*/ rIn>>aRef2;
+/*N*/ rIn>>bTmpBool; bForceFrameHandles=bTmpBool;
+/*N*/ rIn>>bTmpBool; bPlusHdlAlways=bTmpBool;
+/*N*/ if (rSubHead.GetBytesLeft()!=0) {
+/*N*/ rIn>>bTmpBool;
+/*N*/ if (bTmpBool) eEditMode=SDREDITMODE_GLUEPOINTEDIT; // wg. Kompatibilitaet
+/*N*/ }
+/*N*/ if (rSubHead.GetBytesLeft()!=0) {
+/*N*/ rIn>>nTmpUShort;
+/*N*/ eEditMode=(SdrViewEditMode)nTmpUShort;
+/*N*/ }
+/*N*/ bGlueVisible2=eEditMode==SDREDITMODE_GLUEPOINTEDIT;
+/*N*/ if (rSubHead.GetBytesLeft()!=0) {
+/*N*/ rIn>>bTmpBool;
+/*N*/ bMarkHdlWhenTextEdit=bTmpBool;
+/*N*/ }
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWCROOKCENTER: {
+/*N*/ rIn>>aLastCrookCenter;
+/*N*/ } break;
+/*N*/ default: bRet=FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bRet) bRet=SdrSnapView::ReadRecord(rViewHead,rSubHead,rIn);
+/*N*/ return bRet;
+/*N*/ }
+
+
+
+/*N*/ void SdrMarkView::SetDesignMode(BOOL bOn)
+/*N*/ {
+/*N*/ if (bDesignMode != bOn)
+/*N*/ {
+/*N*/ bDesignMode = bOn;
+/*N*/ // Setzen des Modes fuer alle Controls
+/*N*/ USHORT nAnz = GetPageViewCount();
+/*N*/ for (USHORT nv = 0; nv<nAnz; nv++)
+/*N*/ {
+/*N*/ SdrPageView* pPV = GetPageViewPvNum(nv);
+/*N*/ const SdrPageViewWinList& rWinList = pPV->GetWinList();
+/*N*/ for (ULONG i = 0; i < rWinList.GetCount(); i++)
+/*N*/ {
+/*N*/ const SdrPageViewWinRec& rWR = rWinList[ (USHORT) i];
+/*N*/ const SdrUnoControlList& rControlList = rWR.GetControlList();
+/*N*/
+/*N*/ for(UINT32 j = 0; j < rControlList.GetCount(); j++)
+/*N*/ {
+/*?*/ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl = rControlList[ (USHORT) j].GetControl();
+/*?*/ DBG_ASSERT( xControl.is(), "SdrMarkView::SetDesignMode: no control at this position!" );
+/*?*/ if ( xControl.is() )
+/*?*/ xControl->setDesignMode(bOn);
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// 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.
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmrkv1.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmrkv1.cxx
new file mode 100644
index 000000000000..3cf65344a180
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdmrkv1.cxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdmrkv.hxx"
+namespace binfilter {
+
+/*N*/ BOOL SdrMarkView::HasMarkedPoints() const
+/*N*/ {
+/*N*/ ForceUndirtyMrkPnt();
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (!ImpIsFrameHandles()) {
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ if (nMarkAnz<=nFrameHandlesLimit) {
+/*N*/ 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;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ void SdrMarkView::SetPlusHandlesAlwaysVisible(BOOL bOn)
+/*N*/ { // HandlePaint optimieren !!!!!!!
+/*N*/ ForceUndirtyMrkPnt();
+/*N*/ if (bOn!=bPlusHdlAlways) {
+/*?*/ BOOL bVis=IsMarkHdlShown();
+/*?*/ if (bVis) HideMarkHdl(NULL);
+/*?*/ bPlusHdlAlways=bOn;
+/*?*/ SetMarkHandles();
+/*?*/ if (bVis) ShowMarkHdl(NULL);
+/*?*/ MarkListHasChanged();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ImpSetPointsRects() ist fuer PolyPoints und GluePoints!
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// UndirtyMrkPnt() ist fuer PolyPoints und GluePoints!
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMarkView::UndirtyMrkPnt() const
+/*N*/ {
+/*N*/ BOOL bChg=FALSE;
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ if (bChg) ((SdrMarkView*)this)->bMarkedPointsRectsDirty=TRUE;
+/*N*/ ((SdrMarkView*)this)->bMrkPntDirty=FALSE;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+/*N*/ BOOL SdrMarkView::HasMarkedGluePoints() const
+/*N*/ {
+/*N*/ ForceUndirtyMrkPnt();
+/*N*/ BOOL bRet=FALSE;
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ 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;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+
+/*N*/ BOOL SdrMarkView::MarkGluePoints(const Rectangle* pRect, BOOL bUnmark)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoattr.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoattr.cxx
new file mode 100644
index 000000000000..9fa4811a2937
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoattr.cxx
@@ -0,0 +1,1049 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "xpool.hxx"
+#include "svdio.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdpool.hxx"
+#include "svdocapt.hxx"
+
+#include <bf_svtools/smplhint.hxx>
+
+#include "xlnstwit.hxx"
+
+#include "xlnedwit.hxx"
+
+#include <eeitemid.hxx>
+
+#include "eeitem.hxx"
+
+#include <xlnstcit.hxx>
+
+#include <xlnwtit.hxx>
+
+
+#include <bf_svtools/style.hxx>
+
+#include <bf_svtools/whiter.hxx>
+
+
+#include <xflclit.hxx>
+
+
+#include <xfltrit.hxx>
+
+#include <xlnedcit.hxx>
+
+#include <adjitem.hxx>
+
+#include "xflbckit.hxx"
+
+
+#include "xbtmpit.hxx"
+#include "xlndsit.hxx"
+#include "xlnedit.hxx"
+#include "xflftrit.hxx"
+#include "xflhtit.hxx"
+#include "xlnstit.hxx"
+#include "xoutx.hxx"
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrAttrObj,SdrObject);
+
+/*N*/ SdrAttrObj::SdrAttrObj()
+/*N*/ : mpStyleSheet(NULL),
+/*N*/ mpObjectItemSet(NULL)
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrAttrObj::~SdrAttrObj()
+/*N*/ {
+/*N*/ ImpDeleteItemSet();
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ImpDeleteItemSet()
+/*N*/ {
+/*N*/ if(mpObjectItemSet)
+/*N*/ {
+/*N*/ if(GetStyleSheet())
+/*N*/ RemoveStyleSheet();
+/*N*/
+/*N*/ delete mpObjectItemSet;
+/*N*/ mpObjectItemSet = 0L;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ImpForceItemSet()
+/*N*/ {
+/*N*/ if(!mpObjectItemSet)
+/*N*/ {
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/ mpObjectItemSet = CreateNewItemSet(*pPool);
+/*N*/ ForceDefaultAttr();
+/*N*/ }
+/*N*/ }
+
+/*N*/ const Rectangle& SdrAttrObj::GetSnapRect() const
+/*N*/ {
+/*N*/ if(bSnapRectDirty)
+/*N*/ {
+/*N*/ ((SdrAttrObj*)this)->RecalcSnapRect();
+/*N*/ ((SdrAttrObj*)this)->bSnapRectDirty = FALSE;
+/*N*/ }
+/*N*/ return maSnapRect;
+/*N*/ }
+
+/*N*/ void SdrAttrObj::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::operator=(rObj);
+/*N*/
+/*N*/ SdrAttrObj* pAO = PTR_CAST(SdrAttrObj, (SdrObject*)&rObj);
+/*N*/ if(pAO)
+/*N*/ {
+/*N*/ ImpDeleteItemSet();
+/*N*/
+/*N*/ if(pAO->mpObjectItemSet)
+/*N*/ mpObjectItemSet = pAO->mpObjectItemSet->Clone(TRUE);
+/*N*/
+/*N*/ if(pAO->GetStyleSheet())
+/*?*/ AddStyleSheet(pAO->GetStyleSheet(), TRUE);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if(rIn.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrObject::ReadData(rHead, rIn);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrAttrObj");
+/*N*/ #endif
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ sal_uInt16 nSetID;
+/*N*/
+/*N*/ // #89025# if mpObjectItemSet is set and contains items, it is because of ForceDefaultAttr()
+/*N*/ // and the items need to be deleted.
+/*N*/ if(mpObjectItemSet && mpObjectItemSet->Count())
+/*N*/ mpObjectItemSet->ClearItem(0);
+/*N*/
+/*N*/ // Do this initialization AFTER the above fix
+/*N*/ SfxItemSet aNewSet(GetItemSet());
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ { sal_uInt16 nWhichDum; rIn >> nWhichDum; }
+/*N*/ nSetID = XATTRSET_LINE;
+/*N*/ const XLineAttrSetItem* pLineAttr = (const XLineAttrSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pLineAttr)
+/*N*/ aNewSet.Put(pLineAttr->GetItemSet());
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ { sal_uInt16 nWhichDum; rIn >> nWhichDum; }
+/*N*/ nSetID = XATTRSET_FILL;
+/*N*/ const XFillAttrSetItem* pFillAttr = (const XFillAttrSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pFillAttr)
+/*N*/ aNewSet.Put(pFillAttr->GetItemSet());
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ { sal_uInt16 nWhichDum; rIn >> nWhichDum; }
+/*N*/ nSetID = XATTRSET_TEXT;
+/*N*/ const XTextAttrSetItem* pTextAttr = (const XTextAttrSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pTextAttr)
+/*N*/ aNewSet.Put(pTextAttr->GetItemSet());
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ { sal_uInt16 nWhichDum; rIn >> nWhichDum; }
+/*N*/ nSetID = SDRATTRSET_SHADOW;
+/*N*/ const SdrShadowSetItem* pShadAttr = (const SdrShadowSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pShadAttr)
+/*N*/ aNewSet.Put(pShadAttr->GetItemSet());
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 5)
+/*N*/ {
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ { sal_uInt16 nWhichDum; rIn >> nWhichDum; }
+/*N*/ nSetID = SDRATTRSET_OUTLINER;
+/*N*/ const SdrOutlinerSetItem* pOutlAttr = (const SdrOutlinerSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pOutlAttr)
+/*N*/ aNewSet.Put(pOutlAttr->GetItemSet());
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 6)
+/*N*/ {
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ { sal_uInt16 nWhichDum; rIn >> nWhichDum; }
+/*N*/ nSetID = SDRATTRSET_MISC;
+/*N*/ const SdrMiscSetItem* pMiscAttr = (const SdrMiscSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pMiscAttr)
+/*N*/ aNewSet.Put(pMiscAttr->GetItemSet());
+/*N*/ }
+/*N*/
+/*N*/ SetItemSet(aNewSet);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // an den Surrogaten und ggf. auch Whiches vorbeiseeken
+/*N*/ // ganz zu anfang waren es 4 SetItems
+/*N*/ sal_uInt16 nAnz(4);
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 5)
+/*N*/ nAnz++;
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 6)
+/*N*/ nAnz++;
+/*N*/
+/*N*/ nAnz *= sizeof(sal_uInt16);
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11)
+/*N*/ nAnz *= 2;
+/*N*/
+/*N*/ rIn.SeekRel(nAnz);
+/*N*/ }
+/*N*/
+/*N*/ // TextToContour: altes Format(Flag) in neues Format(Item) wandeln
+/*N*/ if(rHead.GetVersion() <= 4 && pPool)
+/*N*/ {
+/*?*/ SetItem(XFormTextStyleItem(XFT_NONE));
+/*N*/ }
+/*N*/
+ // Fuer die StyleSheetgeschichte gehoert eigentlich auch noch eine
+ // Versionsabfrage hierher.
+ // Name und Familie des StyleSheet einlesen, in Pointer auf StyleSheet
+ // umwandeln lassen (SB)
+/*N*/ XubString aStyleSheetName;
+/*N*/ SfxStyleFamily eFamily;
+/*N*/ sal_uInt16 nRead;
+/*N*/
+/*N*/ // UNICODE: rIn>>aStyleSheetName;
+/*N*/ rIn.ReadByteString(aStyleSheetName);
+/*N*/
+/*N*/ if(aStyleSheetName.Len())
+/*N*/ {
+/*N*/ rIn >> nRead;
+/*N*/ eFamily = (SfxStyleFamily)(int)nRead;
+/*N*/
+/*N*/ // ab Version 1 wird der CharacterSet gelesen, ab V11 nicht mehr
+/*N*/ if(rHead.GetVersion() > 0 && rHead.GetVersion() < 11)
+/*N*/ {
+/*N*/ sal_Int16 nCharSet;
+/*N*/ rIn >> nCharSet;
+/*N*/ //aStyleSheetName.Convert((CharSet)nCharSet);
+/*N*/ // nicht mehr noetig, da ab Vers 11 der CharSet bereits am
+/*N*/ // Stream gesetzt wird.
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT(pModel, "SdrAttrObj::ReadData(): pModel=NULL, StyleSheet kann nicht gesetzt werden!");
+/*N*/ if(pModel)
+/*N*/ {
+/*N*/ SfxStyleSheetBasePool *pPool = pModel->GetStyleSheetPool();
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ SfxStyleSheet *pTmpStyleSheet = (SfxStyleSheet*)pPool->Find(aStyleSheetName, eFamily);
+/*N*/ DBG_ASSERT(pTmpStyleSheet, "SdrAttrObj::ReadData(): StyleSheet nicht gefunden");
+/*N*/
+/*N*/ if(pTmpStyleSheet)
+/*N*/ AddStyleSheet(pTmpStyleSheet, TRUE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrAttrObj::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::PreSave();
+/*N*/
+/*N*/ // prepare SetItems for storage
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/ const SfxItemSet* pParent = GetStyleSheet() ? &GetStyleSheet()->GetItemSet() : 0L;
+/*N*/
+/*N*/ XLineAttrSetItem aLineAttr(rSet.GetPool());
+/*N*/ aLineAttr.GetItemSet().Put(rSet);
+/*N*/ aLineAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aLineAttr);
+/*N*/
+/*N*/ XFillAttrSetItem aFillAttr(rSet.GetPool());
+/*N*/ aFillAttr.GetItemSet().Put(rSet);
+/*N*/ aFillAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aFillAttr);
+/*N*/
+/*N*/ XTextAttrSetItem aTextAttr(rSet.GetPool());
+/*N*/ aTextAttr.GetItemSet().Put(rSet);
+/*N*/ aTextAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aTextAttr);
+/*N*/
+/*N*/ SdrShadowSetItem aShadAttr(rSet.GetPool());
+/*N*/ aShadAttr.GetItemSet().Put(rSet);
+/*N*/ aShadAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aShadAttr);
+/*N*/
+/*N*/ SdrOutlinerSetItem aOutlAttr(rSet.GetPool());
+/*N*/ aOutlAttr.GetItemSet().Put(rSet);
+/*N*/ aOutlAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aOutlAttr);
+/*N*/
+/*N*/ SdrMiscSetItem aMiscAttr(rSet.GetPool());
+/*N*/ aMiscAttr.GetItemSet().Put(rSet);
+/*N*/ aMiscAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aMiscAttr);
+/*N*/ }
+
+/*N*/ void SdrAttrObj::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::PostSave();
+/*N*/
+/*N*/ // remove SetItems from local itemset
+/*N*/ ((SdrAttrObj*)this)->ImpForceItemSet();
+/*N*/ mpObjectItemSet->ClearItem(XATTRSET_LINE);
+/*N*/ mpObjectItemSet->ClearItem(XATTRSET_FILL);
+/*N*/ mpObjectItemSet->ClearItem(XATTRSET_TEXT);
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_SHADOW);
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_OUTLINER);
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_MISC);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrAttrObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::WriteData(rOut);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrAttrObj");
+/*N*/ #endif
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(XATTRSET_LINE));
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(XATTRSET_FILL));
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(XATTRSET_TEXT));
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_SHADOW));
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_OUTLINER));
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_MISC));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*?*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*?*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*?*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*?*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*?*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*N*/ }
+
+ // StyleSheet-Pointer als Name, Familie abspeichern
+ // wenn kein StyleSheet vorhanden: leeren String speichern
+/*N*/ if(GetStyleSheet())
+/*N*/ {
+/*N*/ // UNICODE: rOut << pStyleSheet->GetName();
+/*N*/ rOut.WriteByteString(GetStyleSheet()->GetName());
+/*N*/ rOut << (sal_uInt16)(int)(GetStyleSheet()->GetFamily());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // UNICODE: rOut << String();
+/*N*/ rOut.WriteByteString(String());
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrAttrObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrModel* pOldModel = pModel;
+/*N*/
+/*N*/ // test for correct pool in ItemSet; move to new pool if necessary
+/*N*/ if(pNewModel && mpObjectItemSet && mpObjectItemSet->GetPool() != &pNewModel->GetItemPool())
+/*N*/ MigrateItemPool(mpObjectItemSet->GetPool(), &pNewModel->GetItemPool(), pNewModel);
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrObject::SetModel(pNewModel);
+/*N*/
+/*N*/ if(pOldModel != pNewModel && pNewModel && !pNewModel->IsLoading())
+/*N*/ {
+/*N*/
+/*N*/ // fuer ein bereits "lebendes" Model die Attribute von einem Pool in den anderen schieben
+/*N*/ if(pOldModel)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/
+/*N*/ // Jedes Objekt bekommt initial den DefaultStyleSheet
+/*N*/ // des Model, falls noch kein StyleSheet gesetzt.
+/*N*/ if(mpObjectItemSet && !GetStyleSheet() && pModel && !pModel->IsLoading())
+/*N*/ NbcSetStyleSheet(pModel->GetDefaultStyleSheet(), TRUE);
+
+/* this code was removed because NbcSetStyleSheet called with TRUE does not
+ alter the hard attributes. So they don't need to be restored, a useless
+ process that cost us up to 20% for xml import. Also there is a memory
+ leek with aSet.Put( *pItem->Clone() );
+ {
+ SfxStyleSheet* pDefSS = pModel->GetDefaultStyleSheet();
+
+ if(pDefSS)
+ {
+ SfxItemPool* pPool = GetItemPool();
+ if ( pPool )
+ {
+ // Take hard attributes
+ SfxItemSet aSet(*pPool,
+ SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,
+ SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
+ EE_ITEMS_START,EE_ITEMS_END,
+ 0,0);
+
+ const SfxItemSet& rItemSet = GetItemSet();
+
+ SfxWhichIter aIter( rItemSet );
+ sal_uInt16 nWhich( aIter.FirstWhich() );
+ const SfxPoolItem* pItem = NULL;
+
+ while( nWhich )
+ {
+ if( SFX_ITEM_SET == rItemSet.GetItemState( nWhich, FALSE, &pItem ) )
+ aSet.Put( *pItem->Clone() );
+ nWhich = aIter.NextWhich();
+ }
+ // Set the StyleSheet
+ NbcSetStyleSheet(pDefSS, TRUE);
+
+ // Set the hard attributes
+ SetItemSet( aSet );
+ }
+ else
+ NbcSetStyleSheet(pDefSS, TRUE);
+ }
+ }
+*/
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ForceDefaultAttr()
+/*N*/ {
+/*N*/ SdrTextObj* pText = PTR_CAST(SdrTextObj, this);
+/*N*/ BOOL bTextFrame(pText && pText->IsTextFrame());
+/*N*/
+/*N*/ ImpForceItemSet();
+/*N*/ if(bTextFrame)
+/*N*/ {
+/*N*/ SdrCaptionObj* pCapt = PTR_CAST(SdrCaptionObj, this);
+/*N*/ BOOL bCaption(pCapt != 0L);
+/*N*/
+/*N*/ if(!bCaption)
+/*N*/ mpObjectItemSet->Put(XLineStyleItem(XLINE_NONE));
+/*N*/
+/*N*/ mpObjectItemSet->Put(XFillColorItem(String(), Color(COL_WHITE)));
+/*N*/ mpObjectItemSet->Put(XFillStyleItem(XFILL_NONE));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ mpObjectItemSet->Put(SvxAdjustItem(SVX_ADJUST_CENTER));
+/*N*/ mpObjectItemSet->Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
+/*N*/ mpObjectItemSet->Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ const SfxItemSet& SdrAttrObj::GetItemSet() const
+/*N*/ {
+/*N*/ ((SdrAttrObj*)this)->ImpForceItemSet();
+/*N*/ return *mpObjectItemSet;
+/*N*/ }
+
+/*N*/ SfxItemSet* SdrAttrObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// syntactical sugar for ItemSet accesses
+
+/*N*/ const SfxItemSet& SdrAttrObj::GetUnmergedItemSet() const
+/*N*/ {
+/*N*/ return SdrAttrObj::GetItemSet();
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ if(pNewItem)
+/*N*/ {
+/*N*/ const SfxPoolItem* pItem = pNewItem;
+/*N*/
+/*N*/ switch( nWhich )
+/*N*/ {
+/*N*/ case XATTR_FILLBITMAP:
+/*N*/ pItem = ((XFillBitmapItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ case XATTR_LINEDASH:
+/*N*/ pItem = ((XLineDashItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ case XATTR_LINESTART:
+/*N*/ pItem = ((XLineStartItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ case XATTR_LINEEND:
+/*N*/ pItem = ((XLineEndItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ case XATTR_FILLGRADIENT:
+/*N*/ pItem = ((XFillGradientItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ case XATTR_FILLFLOATTRANSPARENCE:
+/*N*/ // #85953# allow all kinds of XFillFloatTransparenceItem to be set
+/*N*/ pItem = ((XFillFloatTransparenceItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ case XATTR_FILLHATCH:
+/*N*/ pItem = ((XFillHatchItem*)pItem)->checkForUniqueItem( pModel );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ // set item
+/*N*/ if( pItem )
+/*N*/ {
+/*N*/ ((SdrAttrObj*)this)->ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put(*pItem);
+/*N*/
+/*N*/ // delete item if it was a generated one
+/*N*/ if( pItem != pNewItem)
+/*N*/ delete (SfxPoolItem*)pItem;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // clear item
+/*N*/ if(mpObjectItemSet)
+/*N*/ {
+/*N*/ mpObjectItemSet->ClearItem(nWhich);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::ItemSetChanged(rSet);
+/*N*/
+/*N*/ // own modifications
+/*N*/ bBoundRectDirty = TRUE;
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ SetChanged();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void __EXPORT SdrAttrObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
+/*N*/ const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ SfxSimpleHint *pSimple = PTR_CAST(SfxSimpleHint, &rHint);
+/*N*/ BOOL bDataChg(pSimple && SFX_HINT_DATACHANGED == pSimple->GetId());
+/*N*/ SfxStyleSheetHint *pStyleHint = PTR_CAST(SfxStyleSheetHint, &rHint);
+/*N*/ BOOL bDying(pStyleHint
+/*N*/ && pStyleHint->GetStyleSheet() == GetStyleSheet()
+/*N*/ && ( SFX_STYLESHEET_INDESTRUCTION == pStyleHint->GetHint() ||
+/*N*/ SFX_STYLESHEET_ERASED == pStyleHint->GetHint() ));
+/*N*/
+/*N*/ if(bDataChg || bDying)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0;
+/*N*/
+/*N*/ if(pUserCall)
+/*N*/ aBoundRect0 = GetBoundRect();
+/*N*/
+/*N*/ SfxStyleSheet* pNewStSh = NULL;
+/*N*/ BOOL bBoundRectDirty0 = bBoundRectDirty;
+/*N*/
+/*N*/ if(bDying)
+/*N*/ {
+/*N*/ // wenn es einen Parent gibt, wird jetzt der genommen
+/*N*/ if(pModel && HAS_BASE(SfxStyleSheet, GetStyleSheet()))
+/*N*/ {
+/*N*/ // Sonst ist pStyleSheet schon zu weit weggestorben
+/*N*/ pNewStSh = (SfxStyleSheet*)pModel->GetStyleSheetPool()->Find(
+/*N*/ GetStyleSheet()->GetParent(), GetStyleSheet()->GetFamily());
+/*N*/ }
+/*N*/
+/*N*/ // wenn es keinen Parent gibt, nehmen wir die Standardvorlage
+/*N*/ if(!pNewStSh && pModel)
+/*N*/ pNewStSh = pModel->GetDefaultStyleSheet();
+/*N*/
+/*N*/ // alten StyleSheet vor SendRepaintBroadcast entfernen #42276#
+/*N*/ RemoveStyleSheet(); // setzt bBoundRectDirty=TRUE
+/*N*/ }
+/*N*/
+/*N*/ if(!bBoundRectDirty0)
+/*N*/ {
+/*N*/ bBoundRectDirty = FALSE; // fuer Broadcast mit dem alten Rect
+/*N*/
+/*N*/ if(pPage && pPage->IsInserted())
+/*N*/ SendRepaintBroadcast(); // Erstmal mit dem alten Rect
+/*N*/
+/*N*/ bBoundRectDirty = TRUE;
+/*N*/ SetRectsDirty(TRUE); // Durch Vorlagenloeschung evtl. andere Linienbreite
+/*N*/ }
+/*N*/
+/*N*/ if(pNewStSh && !bDying)
+/*N*/ AddStyleSheet(pNewStSh, TRUE);
+/*N*/
+/*N*/ if(pPage && pPage->IsInserted())
+/*N*/ SendRepaintBroadcast();
+/*N*/
+/*N*/ SendUserCall(SDRUSERCALL_CHGATTR, aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ SfxStyleSheet* SdrAttrObj::GetStyleSheet() const
+/*N*/ {
+/*N*/ return mpStyleSheet;
+/*N*/ }
+
+/*N*/ void SdrAttrObj::RemoveStyleSheet()
+/*N*/ {
+/*N*/ // Typ checken, weil bei dying sich der Typ abbaut (bis zum Broadcaster runter)
+/*N*/ if(GetStyleSheet() && HAS_BASE(SfxStyleSheet, mpStyleSheet))
+/*N*/ {
+/*N*/ EndListening(*mpStyleSheet);
+/*N*/ EndListening(mpStyleSheet->GetPool());
+/*N*/
+/*N*/ // das ItemSet der Vorlage ist jetzt nicht mehr Parent der
+/*N*/ // eigenen ItemSets
+/*N*/ if(mpObjectItemSet)
+/*N*/ mpObjectItemSet->SetParent(NULL);
+/*N*/
+/*N*/ bBoundRectDirty = TRUE;
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ }
+/*N*/ mpStyleSheet = NULL;
+/*N*/ }
+
+/*N*/ void SdrAttrObj::AddStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ // old StyleSheet is deleted
+/*N*/ DBG_ASSERT(!mpStyleSheet, "Old style sheet not deleted before setting new one (?)");
+/*N*/
+/*N*/ if(pNewStyleSheet)
+/*N*/ {
+/*N*/ mpStyleSheet = pNewStyleSheet;
+/*N*/
+/*N*/ // ItemSet is needed here, force it
+/*N*/ ImpForceItemSet();
+/*N*/
+/*N*/ // als Listener anmelden
+/*N*/ StartListening(pNewStyleSheet->GetPool());
+/*N*/ StartListening(*pNewStyleSheet);
+/*N*/
+/*N*/ // harte Attributierung dort loeschen, wo was in der Vorlage steht
+/*N*/ if(!bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ const SfxItemSet& rStyle = pNewStyleSheet->GetItemSet();
+/*N*/ SfxWhichIter aIter(rStyle);
+/*N*/ sal_uInt16 nWhich = aIter.FirstWhich();
+/*N*/
+/*N*/ while(nWhich)
+/*N*/ {
+/*N*/ if(SFX_ITEM_SET == rStyle.GetItemState(nWhich))
+/*N*/ mpObjectItemSet->ClearItem(nWhich);
+/*N*/ nWhich = aIter.NextWhich();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // set new stylesheet as parent
+/*N*/ mpObjectItemSet->SetParent(&pNewStyleSheet->GetItemSet());
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrAttrObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ RemoveStyleSheet();
+/*N*/ AddStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+/*N*/ bBoundRectDirty = TRUE;
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ }
+
+/*N*/ void SdrAttrObj::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0;
+/*N*/
+/*N*/ if(pUserCall)
+/*N*/ aBoundRect0 = GetBoundRect();
+/*N*/
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_CHGATTR, aBoundRect0);
+/*N*/ }
+
+/*N*/ INT32 SdrAttrObj::ImpGetLineWdt() const
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ XLineStyle eLine = ((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+/*N*/
+/*N*/ if(XLINE_NONE == eLine)
+/*N*/ return 0; // Garkeine Linie da.
+/*N*/
+/*N*/ sal_Int32 nWdt = ((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+/*N*/
+/*N*/ return nWdt;
+/*N*/ }
+
+/*N*/ INT32 SdrAttrObj::ImpGetLineEndAdd() const
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ BOOL bStartSet(TRUE);
+/*N*/ BOOL bEndSet(TRUE);
+/*N*/
+/*N*/ if(SFX_ITEM_DONTCARE != rSet.GetItemState(XATTR_LINESTART))
+/*N*/ {
+/*N*/ String aStr(((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetName());
+/*N*/ if(!aStr.Len())
+/*N*/ bStartSet = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ if(rSet.GetItemState(XATTR_LINEEND) != SFX_ITEM_DONTCARE)
+/*N*/ {
+/*N*/ String aStr(((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetName());
+/*N*/ if(!aStr.Len())
+/*N*/ bEndSet = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ BOOL bLineEndSet = bStartSet || bEndSet;
+/*N*/ XLineStyle eLine = ((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+/*N*/
+/*N*/ if(XLINE_NONE == eLine)
+/*N*/ return 0; // Garkeine Linie da.
+/*N*/
+/*N*/ // Strichstaerke
+/*N*/ sal_Int32 nLineWdt = ((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+/*N*/ sal_Int32 nSttWdt = ((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+/*N*/
+/*N*/ if(nSttWdt < 0)
+/*N*/ nSttWdt = -nLineWdt * nSttWdt / 100;
+/*N*/
+/*N*/ if(!bLineEndSet)
+/*N*/ nSttWdt = 0;
+
+/*N*/ BOOL bSttCenter = ((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+/*N*/ sal_Int32 nSttHgt = 0;
+/*N*/
+/*N*/ if(bSttCenter)
+/*N*/ {
+/*N*/ // Linienende steht um die Haelfe ueber
+/*N*/ XPolygon aSttPoly(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue());
+/*N*/ nSttHgt = XOutputDevice::InitLineStartEnd(aSttPoly, nSttWdt, bSttCenter);
+/*N*/ // InitLineStartEnd liefert bei bCenter=TRUE die halbe Hoehe
+/*N*/ }
+/*N*/
+/*N*/ nSttWdt++;
+/*N*/ nSttWdt /= 2;
+/*N*/
+/*N*/ // Lieber etwas mehr, dafuer keine Wurzel ziehen
+/*N*/ sal_Int32 nSttAdd = Max(nSttWdt, nSttHgt);
+/*N*/ nSttAdd *= 3;
+/*N*/ nSttAdd /= 2;
+/*N*/
+/*N*/ sal_Int32 nEndWdt = ((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+/*N*/
+/*N*/ if(nEndWdt < 0)
+/*N*/ nEndWdt = -nLineWdt * nEndWdt / 100; // <0 = relativ
+/*N*/
+/*N*/ if(!bLineEndSet)
+/*N*/ nEndWdt = 0;
+/*N*/
+/*N*/ BOOL bEndCenter = ((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+/*N*/ sal_Int32 nEndHgt = 0;
+/*N*/
+/*N*/ if(bEndCenter)
+/*N*/ {
+/*N*/ // Linienende steht um die Haelfe ueber
+/*N*/ XPolygon aEndPoly(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue());
+/*N*/ nEndHgt = XOutputDevice::InitLineStartEnd(aEndPoly, nEndWdt, bEndCenter);
+/*N*/ // InitLineStartEnd liefert bei bCenter=TRUE die halbe Hoehe
+/*N*/ }
+/*N*/
+/*N*/ nEndWdt++;
+/*N*/ nEndWdt /= 2;
+/*N*/
+/*N*/ // Lieber etwas mehr, dafuer keine Wurzel ziehen
+/*N*/ sal_Int32 nEndAdd = Max(nEndWdt, nEndHgt);
+/*N*/ nEndAdd *= 3;
+/*N*/ nEndAdd /= 2;
+/*N*/
+/*N*/ return Max(nSttAdd, nEndAdd);
+/*N*/ }
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ FASTBOOL SdrAttrObj::ImpGetShadowDist(sal_Int32& nXDist, sal_Int32& nYDist) const
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/
+/*N*/ nXDist = 0L;
+/*N*/ nYDist = 0L;
+/*N*/
+/*N*/ BOOL bShadOn = ((SdrShadowItem&)(rSet.Get(SDRATTR_SHADOW))).GetValue();
+/*N*/ if(bShadOn)
+/*N*/ {
+/*N*/ nXDist = ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+/*N*/ nYDist = ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void SdrAttrObj::ImpAddShadowToBoundRect()
+/*N*/ {
+/*N*/ sal_Int32 nXDist;
+/*N*/ sal_Int32 nYDist;
+/*N*/
+/*N*/ if(ImpGetShadowDist(nXDist, nYDist))
+/*N*/ {
+/*N*/ if(nXDist > 0)
+/*N*/ aOutRect.Right() += nXDist;
+/*N*/ else
+/*?*/ aOutRect.Left() += nXDist;
+/*N*/
+/*N*/ if(nYDist > 0)
+/*N*/ aOutRect.Bottom() += nYDist;
+/*N*/ else
+/*?*/ aOutRect.Top() += nYDist;
+/*N*/ }
+/*N*/ }
+
+/*N*/ FASTBOOL SdrAttrObj::ImpSetShadowAttributes( const SfxItemSet& rSet, SfxItemSet& rShadowSet ) const
+/*N*/ {
+/*N*/ BOOL bShadOn=((SdrShadowItem&)(rSet.Get(SDRATTR_SHADOW))).GetValue();
+/*N*/
+/*N*/ 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);
+// }
+
+// #103692# Caller must now handle noFill case
+// if(!bNoFill)
+// {
+
+/*?*/ const SdrShadowColorItem& rShadColItem = ((const SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR)));
+/*?*/ Color aShadCol(rShadColItem.GetValue());
+/*?*/ sal_uInt16 nTransp = ((const SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
+/*?*/ XFillStyle eStyle = ((const XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue();
+/*?*/ BOOL bFillBackground = ((const XFillBackgroundItem&)(rSet.Get(XATTR_FILLBACKGROUND))).GetValue();
+/*?*/
+/*?*/ if(eStyle==XFILL_HATCH && !bFillBackground)
+/*?*/ {
+/*?*/ // #41666#
+/*?*/ XHatch aHatch = ((XFillHatchItem&)(rSet.Get(XATTR_FILLHATCH))).GetValue();
+/*?*/ aHatch.SetColor(aShadCol);
+/*?*/ rShadowSet.Put(XFillHatchItem(String(), aHatch));
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if(eStyle != XFILL_NONE && eStyle != XFILL_SOLID)
+/*?*/ {
+/*?*/ // also fuer Gradient und Bitmap
+/*?*/ rShadowSet.Put(XFillStyleItem(XFILL_SOLID));
+/*?*/ }
+/*?*/
+/*?*/ rShadowSet.Put(XFillColorItem(String(),aShadCol));
+/*?*/
+/*?*/ // #92183# set XFillTransparenceItem only when no FloatTransparence is used,
+/*?*/ // else the OutDev will use the wrong method
+/*?*/ if(nTransp)
+/*?*/ {
+/*?*/ const XFillFloatTransparenceItem& rFillFloatTransparence =
+/*?*/ (const XFillFloatTransparenceItem&)rSet.Get(XATTR_FILLFLOATTRANSPARENCE);
+/*?*/ if(!rFillFloatTransparence.IsEnabled())
+/*?*/ rShadowSet.Put(XFillTransparenceItem(nTransp));
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ return TRUE;
+/*N*/ }
+/*N*/
+/*N*/ return FALSE;
+/*N*/ }
+
+// ItemPool fuer dieses Objekt wechseln
+/*N*/ void SdrAttrObj::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
+/*N*/ {
+/*N*/ if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::MigrateItemPool(pSrcPool, pDestPool, pNewModel);
+/*N*/
+/*N*/ if(mpObjectItemSet)
+/*N*/ {
+/*N*/ // migrate ItemSet to new pool. Scaling is NOT necessary
+/*N*/ // because this functionality is used by UNDO only. Thus
+/*N*/ // objects and ItemSets would be moved back to their original
+/*N*/ // pool before usage.
+/*N*/
+/*N*/ SfxItemSet* pOldSet = mpObjectItemSet;
+/*N*/ SfxStyleSheet* pStySheet = GetStyleSheet();
+/*N*/
+/*N*/ if(GetStyleSheet())
+/*?*/ RemoveStyleSheet();
+/*N*/
+/*N*/ mpObjectItemSet = CreateNewItemSet(*pDestPool);
+/*N*/
+/*N*/ GetModel()->MigrateItemSet( pOldSet, mpObjectItemSet, pNewModel );
+/*N*/
+/*N*/ // set stylesheet (if used)
+/*N*/ if(pStySheet)
+/*?*/ AddStyleSheet(pStySheet, TRUE);
+/*N*/
+/*N*/ delete pOldSet;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrAttrObj::HasFill() const
+/*N*/ {
+/*N*/ return (!bClosedObj) ? FALSE
+/*N*/ : ((XFillStyleItem&)(GetItem(XATTR_FILLSTYLE))).GetValue()!=XFILL_NONE;
+/*N*/ }
+
+/*N*/ BOOL SdrAttrObj::HasLine() const
+/*N*/ {
+/*N*/ return ((XLineStyleItem&)(GetItem(XATTR_LINESTYLE))).GetValue()!=XLINE_NONE;
+/*N*/ }
+
+// #94547# Have to re-activate more performant, but corrected version.
+// This is necessary since SetItemSet() of the old implementation calls
+// ItemSetChanged() which replaces in textobjects all text items which
+// is wrong behaviour for BurnInStyleSheet.
+
+// #91695# back to corrected old version. Have to check new version again for later builds.
+//void SdrAttrObj::BurnInStyleSheetAttributes( BOOL bPseudoSheetsOnly )
+//{
+// SfxItemPool* pPool = GetItemPool();
+// if ( pPool && mpStyleSheet )
+// {
+// // Get StyleSheet attributes
+// SfxItemSet aSet(*pPool,
+// SDRATTR_START, SDRATTR_NOTPERSIST_FIRST-1,
+// SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
+// EE_ITEMS_START,EE_ITEMS_END,
+// 0,0);
+//
+// SfxWhichIter aIter( mpStyleSheet->GetItemSet() );
+// sal_uInt16 nWhich( aIter.FirstWhich() );
+// const SfxPoolItem* pItem = NULL;
+//
+// while( nWhich )
+// {
+// if( SFX_ITEM_SET == mpStyleSheet->GetItemSet().GetItemState(nWhich, TRUE, &pItem) )
+// aSet.Put( *pItem );
+//
+// nWhich = aIter.NextWhich();
+// }
+//
+// SfxWhichIter aHardAttrIter( GetItemSet() );
+// nWhich = aHardAttrIter.FirstWhich();
+//
+// while( nWhich )
+// {
+// if( SFX_ITEM_SET == GetItemSet().GetItemState(nWhich, FALSE, &pItem) )
+// aSet.Put( *pItem );
+//
+// nWhich = aHardAttrIter.NextWhich();
+// }
+//
+// // Set StyleSheet attributes as hard attributes
+// SetItemSet( aSet );
+// }
+//}
+
+/*
+void SdrAttrObj::BurnInStyleSheetAttributes( BOOL bPseudoSheetsOnly )
+{
+ // #89025# Added more performant implementation
+ if(mpStyleSheet)
+ {
+ const SfxItemSet& rSet = mpStyleSheet->GetItemSet();
+ SfxWhichIter aIter(rSet);
+ sal_uInt16 nWhich(aIter.FirstWhich());
+ const SfxPoolItem *pItem = NULL;
+
+ ImpForceItemSet();
+ const SfxItemSet* pParentSet = mpObjectItemSet->GetParent();
+ if(pParentSet != 0L)
+ mpObjectItemSet->SetParent(0L);
+
+ while(nWhich)
+ {
+ if(SFX_ITEM_SET == rSet.GetItemState(nWhich, TRUE, &pItem))
+ mpObjectItemSet->Put(*pItem);
+ nWhich = aIter.NextWhich();
+ }
+
+ if(pParentSet != 0L)
+ mpObjectItemSet->SetParent(pParentSet);
+ }
+}
+*/
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdobj.cxx b/binfilter/bf_svx/source/svdraw/svx_svdobj.cxx
new file mode 100644
index 000000000000..c9e8ca6e6a1f
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdobj.cxx
@@ -0,0 +1,3442 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <vcl/cvtsvm.hxx>
+#include <tools/line.hxx>
+#include <vector>
+#include "svdetc.hxx"
+#include "svdio.hxx"
+#include "svdpage.hxx"
+#include "svdovirt.hxx" // Fuer Add/Del Ref
+#include "svdview.hxx" // fuer Dragging (Ortho abfragen)
+#include "svdstr.hrc" // Objektname
+#include "svdogrp.hxx" // Factory
+#include "svdopath.hxx" // Factory
+#include "svdocirc.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 "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 "svditer.hxx"
+#include "xlntrit.hxx"
+#include "xlinjoit.hxx"
+#include "unopage.hxx"
+#include "eeitem.hxx"
+
+#include "svdpool.hxx"
+
+#include "editeng.hxx"
+
+#include <vcl/salbtype.hxx> // FRound
+
+#include <bf_svtools/whiter.hxx>
+
+// #97849#
+#include "fmmodel.hxx"
+
+#include <bf_sfx2/objsh.hxx>
+
+#include <bf_sfx2/docfac.hxx>
+
+#include "rectenum.hxx"
+
+#include "svdoimp.hxx"
+
+#include <vcl/graphictools.hxx>
+
+
+#include "xoutx.hxx"
+
+#include <bf_goodies/matrix3d.hxx>
+
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+// #104018# replace macros above with type-detecting methods
+inline double ImplTwipsToMM(double fVal) { return (fVal * (127.0 / 72.0)); }
+inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT0(SdrObjUserCall);
+
+/*N*/ SdrObjUserCall::~SdrObjUserCall()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObjUserCall::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect)
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT0(SdrObjUserData);
+
+
+
+
+/*N*/ SdrObjUserData::~SdrObjUserData()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObjUserData::WriteData(SvStream& rOut)
+/*N*/ {
+/*N*/ rOut<<nInventor;
+/*N*/ rOut<<nIdentifier;
+/*N*/ rOut<<nVersion;
+/*N*/ }
+
+/*N*/ void SdrObjUserData::ReadData(SvStream& rIn)
+/*N*/ {
+/*N*/ //Inventor und Identifier wurden bereits von Aufrufer gelesen,
+/*N*/ //sonst haette er mich ja nicht erzeugen koennen (kein SeekBack!).
+/*N*/ rIn>>nVersion; // Miniatur-Versionsverwaltung.
+/*N*/ }
+
+/*N*/ void SdrObjUserData::AfterRead()
+/*N*/ {
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObjUserData::HasMacro(const SdrObject* pObj) const
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void SdrObjUserDataList::Clear()
+/*N*/ {
+/*N*/ USHORT nAnz=GetUserDataCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ delete GetUserData(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ DBG_NAME(SdrObjGeoData)
+
+/*N*/ SdrObjGeoData::SdrObjGeoData():
+/*N*/ pGPL(NULL),
+/*N*/ bMovProt(FALSE),
+/*N*/ bSizProt(FALSE),
+/*N*/ bNoPrint(FALSE),
+/*N*/ bClosedObj(FALSE),
+/*N*/ nLayerId(0)
+/*N*/ {
+/*N*/ DBG_CTOR(SdrObjGeoData,NULL);
+/*N*/ }
+
+/*N*/ SdrObjGeoData::~SdrObjGeoData()
+/*N*/ {
+/*N*/ DBG_DTOR(SdrObjGeoData,NULL);
+/*N*/ delete pGPL;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT0(SdrObjPlusData);
+
+/*N*/ SdrObjPlusData::SdrObjPlusData():
+/*N*/ pBroadcast(NULL),
+/*N*/ pUserDataList(NULL),
+/*N*/ pGluePoints(NULL),
+///*N*/ pAnimator(NULL),
+/*N*/ pAutoTimer(NULL)
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrObjPlusData::~SdrObjPlusData()
+/*N*/ {
+/*N*/ if (pBroadcast !=NULL) delete pBroadcast;
+/*N*/ if (pUserDataList!=NULL) delete pUserDataList;
+/*N*/ if (pGluePoints !=NULL) delete pGluePoints;
+///*N*/ if (pAnimator !=NULL) delete pAnimator;
+/*N*/ if (pAutoTimer !=NULL) delete pAutoTimer;
+/*N*/ }
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+static double SMALLEST_DASH_WIDTH(26.95);
+
+/*N*/ ImpLineStyleParameterPack::ImpLineStyleParameterPack(const SfxItemSet& rSet,
+/*N*/ BOOL _bForceHair, OutputDevice* pOut)
+/*N*/ : mpOut(pOut),
+/*N*/ rStartPolygon(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue()),
+/*N*/ rEndPolygon(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue()),
+/*N*/ bForceNoArrowsLeft(FALSE),
+/*N*/ bForceNoArrowsRight(FALSE),
+/*N*/ bForceHair(_bForceHair)
+/*N*/ {
+/*N*/ // #i12227# now storing the real line width, not corrected by
+/*N*/ // bForceHair. This is done within the GetDisplay*Width accessors,
+/*N*/ // and preserves the true value for the Get*Width accessors.
+/*N*/ nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+/*N*/ eLineStyle = (XLineStyle)((const XLineStyleItem&)rSet.Get(XATTR_LINESTYLE)).GetValue();
+/*N*/
+/*N*/ nStartWidth = ((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+/*N*/ if(nStartWidth < 0)
+/*N*/ nStartWidth = -nLineWidth * nStartWidth / 100;
+/*N*/
+/*N*/ nEndWidth = ((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+/*N*/ if(nEndWidth < 0)
+/*N*/ nEndWidth = -nLineWidth * nEndWidth / 100;
+/*N*/
+/*N*/ bStartCentered = ((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+/*N*/ bEndCentered = ((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+/*N*/
+/*N*/ fDegreeStepWidth = 10.0;
+/*N*/ eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
+/*N*/
+/*N*/ aDash = ((const XLineDashItem&)(rSet.Get(XATTR_LINEDASH))).GetValue();
+/*N*/
+/*N*/ // fill local dash info
+/*N*/ UINT16 nNumDotDashArray = (GetDots() + GetDashes()) * 2;
+/*N*/ aDotDashArray.resize( nNumDotDashArray, 0.0 );
+/*N*/ UINT16 a;
+/*N*/ UINT16 nIns = 0;
+/*N*/ double fDashDotDistance = (double)GetDashDistance();
+/*N*/ double fSingleDashLen = (double)GetDashLen();
+/*N*/ double fSingleDotLen = (double)GetDotLen();
+/*N*/ double fLineWidth = (double)GetDisplayLineWidth();
+/*N*/
+/*N*/ if(GetDashStyle() == XDASH_RECTRELATIVE || GetDashStyle() == XDASH_ROUNDRELATIVE)
+/*?*/ {
+/*?*/ if(GetDisplayLineWidth())
+/*?*/ {
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // smallest dot size compare value
+/*N*/ double fDotCompVal(GetDisplayLineWidth() ? fLineWidth : SMALLEST_DASH_WIDTH);
+/*N*/
+/*N*/ // absolute values
+/*N*/ if(GetDashes())
+/*N*/ {
+/*N*/ if(GetDashLen())
+/*N*/ {
+/*N*/ // is a dash
+/*N*/ if(fSingleDashLen < SMALLEST_DASH_WIDTH)
+/*N*/ fSingleDashLen = SMALLEST_DASH_WIDTH;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // is a dot
+/*?*/ if(fSingleDashLen < fDotCompVal)
+/*?*/ fSingleDashLen = fDotCompVal;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(GetDots())
+/*N*/ {
+/*N*/ if(GetDotLen())
+/*N*/ {
+/*N*/ // is a dash
+/*N*/ if(fSingleDotLen < SMALLEST_DASH_WIDTH)
+/*N*/ fSingleDotLen = SMALLEST_DASH_WIDTH;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // is a dot
+/*?*/ if(fSingleDotLen < fDotCompVal)
+/*?*/ fSingleDotLen = fDotCompVal;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(GetDashes() || GetDots())
+/*N*/ {
+/*N*/ if(GetDashDistance())
+/*N*/ {
+/*N*/ // dash as distance
+/*N*/ if(fDashDotDistance < SMALLEST_DASH_WIDTH)
+/*N*/ fDashDotDistance = SMALLEST_DASH_WIDTH;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // dot as distance
+/*?*/ if(fDashDotDistance < fDotCompVal)
+/*?*/ fDashDotDistance = fDotCompVal;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ fFullDashDotLen = 0.0;
+/*N*/
+/*N*/ for(a=0;a<GetDots();a++)
+/*N*/ {
+/*N*/ aDotDashArray[nIns++] = fSingleDotLen;
+/*N*/ fFullDashDotLen += fSingleDotLen;
+/*N*/ aDotDashArray[nIns++] = fDashDotDistance;
+/*N*/ fFullDashDotLen += fDashDotDistance;
+/*N*/ }
+/*N*/
+/*N*/ for(a=0;a<GetDashes();a++)
+/*N*/ {
+/*N*/ aDotDashArray[nIns++] = fSingleDashLen;
+/*N*/ fFullDashDotLen += fSingleDashLen;
+/*N*/ aDotDashArray[nIns++] = fDashDotDistance;
+/*N*/ fFullDashDotLen += fDashDotDistance;
+/*N*/ }
+/*N*/ }
+
+/*N*/ ImpLineStyleParameterPack::~ImpLineStyleParameterPack()
+/*N*/ {
+/*N*/ }
+
+/*N*/ UINT16 ImpLineStyleParameterPack::GetFirstDashDotIndex(double fPos, double& rfDist) const
+/*N*/ {
+/*N*/ double fIndPos = fPos - (fFullDashDotLen * (double)((UINT32)(fPos / fFullDashDotLen)));
+/*N*/ UINT16 nPos = 0;
+/*N*/
+/*N*/ while(fIndPos && fIndPos - aDotDashArray[nPos] > -SMALL_DVALUE)
+/*N*/ {
+/*N*/ fIndPos -= aDotDashArray[nPos];
+/*N*/ nPos = (static_cast< size_t >(nPos + 1) == aDotDashArray.size()) ? 0 : nPos + 1;
+/*N*/ }
+/*N*/
+/*N*/ rfDist = aDotDashArray[nPos] - fIndPos;
+/*N*/ nPos = (static_cast< size_t >(nPos + 1) == aDotDashArray.size()) ? 0 : nPos + 1;
+/*N*/
+/*N*/ return nPos;
+/*N*/ }
+
+/*N*/ UINT16 ImpLineStyleParameterPack::GetNextDashDotIndex(UINT16 nPos, double& rfDist) const
+/*N*/ {
+/*N*/ rfDist = aDotDashArray[nPos];
+/*N*/ nPos = (static_cast< size_t >(nPos + 1) == aDotDashArray.size()) ? 0 : nPos + 1;
+/*N*/ return nPos;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ double ImpLineGeometryCreator::ImpSimpleFindCutPoint(
+/*N*/ const Vector3D& rEdge1Start, const Vector3D& rEdge1Delta,
+/*N*/ const Vector3D& rEdge2Start, const Vector3D& rEdge2Delta)
+/*N*/ {
+/*N*/ double fZwi = (rEdge1Delta.X() * rEdge2Delta.Y()) - (rEdge1Delta.Y() * rEdge2Delta.X());
+/*N*/ double fRetval = 0.0;
+/*N*/
+/*N*/ if(fabs(fZwi) > SMALL_DVALUE)
+/*N*/ {
+/*N*/ fRetval = (rEdge2Delta.Y() * (rEdge2Start.X() - rEdge1Start.X())
+/*N*/ + rEdge2Delta.X() * (rEdge1Start.Y() - rEdge2Start.Y())) / fZwi;
+/*N*/ }
+/*N*/ return fRetval;
+/*N*/ }
+
+/*N*/ void ImpLineGeometryCreator::ImpCreateLineSegment(const Vector3D* pPrev, const Vector3D* pLeft, const Vector3D* pRight, const Vector3D* pNext)
+/*N*/ {
+/*N*/ if(mrLineAttr.GetDisplayLineWidth())
+/*N*/ {
+/*N*/ double fHalfLineWidth((double)mrLineAttr.GetDisplayLineWidth() / 2.0);
+/*N*/ Vector3D aEdge = *pRight - *pLeft;
+/*N*/
+/*N*/ // #78972#
+/*N*/ Vector3D aPerpend(-aEdge.Y(), aEdge.X(), 0.0);
+/*N*/ aPerpend.Normalize();
+/*N*/
+/*N*/ XLineJoint eJoint = mrLineAttr.GetLineJoint();
+/*N*/
+/*N*/ // joints need eventually not be done
+/*N*/ if((eJoint == XLINEJOINT_MIDDLE || eJoint == XLINEJOINT_MITER) && (!pPrev && !pNext))
+/*N*/ eJoint = XLINEJOINT_NONE;
+/*N*/
+/*N*/ switch(eJoint)
+/*N*/ {
+/*?*/ 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;
+/*?*/
+/*?*/ // #78972#
+/*?*/ aPerpendLeft = Vector3D(-aPerpendLeft.Y(), aPerpendLeft.X(), 0.0);
+/*?*/ aPerpendLeft.Normalize();
+/*?*/ }
+/*?*/
+/*?*/ if(pNext)
+/*?*/ {
+/*?*/ aPerpendRight = *pNext - *pRight;
+/*?*/
+/*?*/ // #78972#
+/*?*/ aPerpendRight = Vector3D(-aPerpendRight.Y(), aPerpendRight.X(), 0.0);
+/*?*/ aPerpendRight.Normalize();
+/*?*/ }
+/*?*/
+/*?*/ 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;
+/*?*/ }
+/*N*/ case XLINEJOINT_BEVEL: // join edges with line
+/*N*/ default: // #73428# case XLINEJOINT_ROUND: // create arc
+/*N*/ {
+/*N*/ Vector3D aPerpendRight(aPerpend);
+/*N*/ BOOL bCreateSimplePart(TRUE);
+/*N*/
+/*N*/ if(pNext)
+/*N*/ {
+/*N*/ aPerpendRight = *pNext - *pRight;
+/*N*/
+/*N*/ // #78972#
+/*N*/ aPerpendRight = Vector3D(-aPerpendRight.Y(), aPerpendRight.X(), 0.0);
+/*N*/ aPerpendRight.Normalize();
+/*N*/
+/*N*/ double fAngle = atan2(aPerpend.Y(), aPerpend.X());
+/*N*/ double fRightAngle = atan2(aPerpendRight.Y(), aPerpendRight.X());
+/*N*/ double fAngleDiff = fAngle - fRightAngle;
+/*N*/ double fDegreeStepWidth = mrLineAttr.GetDegreeStepWidth() * F_PI180;
+/*N*/
+/*N*/ // go to range [0.0..2*F_PI[
+/*N*/ while(fAngleDiff < 0.0)
+/*N*/ fAngleDiff += (F_PI * 2.0);
+/*N*/ while(fAngleDiff >= (F_PI * 2.0))
+/*N*/ fAngleDiff -= (F_PI * 2.0);
+/*N*/
+/*N*/ if((fAngleDiff > fDegreeStepWidth) && (fAngleDiff < ((F_PI * 2.0) - fDegreeStepWidth)))
+/*N*/ {
+/*N*/ bCreateSimplePart = FALSE;
+/*N*/ aPerpend *= fHalfLineWidth;
+/*N*/ aPerpendRight *= fHalfLineWidth;
+/*N*/
+/*N*/ 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);
+/*?*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ BOOL bUseLowerSide(fAngleDiff > F_PI);
+/*N*/ UINT16 nSegments;
+/*N*/
+/*N*/ if(bUseLowerSide)
+/*N*/ {
+/*?*/ fAngleDiff = (F_PI * 2.0) - fAngleDiff;
+/*?*/ nSegments = (UINT16)(fAngleDiff / fDegreeStepWidth);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nSegments = (UINT16)(fAngleDiff / fDegreeStepWidth);
+/*N*/ }
+/*N*/
+/*N*/ UINT16 nPolyPoints(pPrev ? 7 : 6);
+/*N*/ Polygon3D aNewPoly(nPolyPoints + nSegments);
+/*N*/
+/*N*/ aNewPoly[0] = *pLeft + aPerpend;
+/*N*/ aNewPoly[1] = *pRight + aPerpend;
+/*N*/ aNewPoly[4 + nSegments] = *pRight - aPerpend;
+/*N*/ aNewPoly[5 + nSegments] = *pLeft - aPerpend;
+/*N*/
+/*N*/ if(pPrev)
+/*N*/ aNewPoly[6 + nSegments] = *pLeft;
+/*N*/
+/*N*/ fAngleDiff /= (double)(nSegments + 1);
+/*N*/
+/*N*/ if(bUseLowerSide)
+/*N*/ {
+/*N*/ // 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),
+/*?*/ pRight->Z()); // #78972#
+/*?*/ aNewPoly[4 + a] = aNewPos;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // upper side
+/*N*/ aNewPoly[2 + nSegments] = *pRight + aPerpendRight;
+/*N*/ aNewPoly[3 + nSegments] = *pRight;
+/*N*/
+/*N*/ for(UINT16 a=0;a<nSegments;a++)
+/*N*/ {
+/*N*/ double fDegree = fAngle - (double)a * fAngleDiff;
+/*N*/ Vector3D aNewPos(
+/*N*/ pRight->X() + (cos(fDegree) * fHalfLineWidth),
+/*N*/ pRight->Y() + (sin(fDegree) * fHalfLineWidth),
+/*N*/ pRight->Z()); // #78972#
+/*N*/ aNewPoly[2 + a] = aNewPos;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ aNewPoly.SetClosed(TRUE);
+/*N*/ mrPolyPoly3D.Insert(aNewPoly);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(bCreateSimplePart)
+/*N*/ {
+/*N*/ // angle smaller DegreeStepWidth, create simple segment
+/*N*/ UINT16 nNumPnt(4);
+/*N*/
+/*N*/ if(pPrev)
+/*N*/ nNumPnt++;
+/*N*/
+/*N*/ if(pNext)
+/*N*/ nNumPnt++;
+/*N*/
+/*N*/ Polygon3D aNewPoly(nNumPnt);
+/*N*/
+/*N*/ aPerpend *= fHalfLineWidth;
+/*N*/ aPerpendRight *= fHalfLineWidth;
+/*N*/ nNumPnt = 0;
+/*N*/
+/*N*/ if(pPrev)
+/*N*/ aNewPoly[nNumPnt++] = *pLeft;
+/*N*/
+/*N*/ aNewPoly[nNumPnt++] = *pLeft + aPerpend;
+/*N*/ aNewPoly[nNumPnt++] = *pRight + aPerpendRight;
+/*N*/
+/*N*/ if(pNext)
+/*N*/ aNewPoly[nNumPnt++] = *pRight;
+/*N*/
+/*N*/ aNewPoly[nNumPnt++] = *pRight - aPerpendRight;
+/*N*/ aNewPoly[nNumPnt++] = *pLeft - aPerpend;
+/*N*/
+/*N*/ aNewPoly.SetClosed(TRUE);
+/*N*/ mrPolyPoly3D.Insert(aNewPoly);
+/*N*/ }
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ case XLINEJOINT_MITER: // extend till cut
+/*?*/ {
+/*?*/ Polygon3D aNewPoly(4);
+/*?*/ aPerpend *= fHalfLineWidth;
+/*?*/ BOOL bLeftSolved(FALSE);
+/*?*/ BOOL bRightSolved(FALSE);
+/*?*/
+/*?*/ if(pPrev)
+/*?*/ {
+/*?*/ Vector3D aLeftVec(*pLeft - *pPrev);
+/*?*/
+/*?*/ // #78972#
+/*?*/ Vector3D aPerpendLeft(-aLeftVec.Y(), aLeftVec.X(), 0.0);
+/*?*/ aPerpendLeft.Normalize();
+/*?*/
+/*?*/ 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;
+/*?*/
+/*?*/ // #78972#
+/*?*/ aPerpendRight = Vector3D(-aPerpendRight.Y(), aPerpendRight.X(), 0.0);
+/*?*/ aPerpendRight.Normalize();
+/*?*/
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ Polygon3D aNewPoly(2);
+/*?*/
+/*?*/ aNewPoly[0] = *pLeft;
+/*?*/ aNewPoly[1] = *pRight;
+/*?*/
+/*?*/ aNewPoly.SetClosed(FALSE);
+/*?*/ mrPolyLine3D.Insert(aNewPoly);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpLineGeometryCreator::ImpCreateSegmentsForLine(const Vector3D* pPrev, const Vector3D* pLeft, const Vector3D* pRight, const Vector3D* pNext, double fPolyPos)
+/*N*/ {
+/*N*/ Vector3D aEdge(*pRight - *pLeft);
+/*N*/ double fLen = aEdge.GetLength();
+/*N*/ double fPos = 0.0;
+/*N*/ double fDist;
+/*N*/ BOOL bFirst(TRUE);
+/*N*/ BOOL bLast(FALSE);
+/*N*/ UINT16 nInd = mrLineAttr.GetFirstDashDotIndex(fPolyPos, fDist);
+/*N*/
+/*N*/ do {
+/*N*/ // nInd right edge, fDist to it
+/*N*/ if((nInd % 2) && fDist > SMALL_DVALUE)
+/*N*/ {
+/*N*/ // left is fpos, get right
+/*N*/ double fRight = fPos + fDist;
+/*N*/
+/*N*/ if(fRight > fLen)
+/*N*/ {
+/*N*/ fRight = fLen;
+/*N*/ bLast = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // create segment from fPos to fRight
+/*N*/ Vector3D aLeft(*pLeft);
+/*N*/ Vector3D aRight(*pRight);
+/*N*/
+/*N*/ if(!bFirst)
+/*N*/ aLeft.CalcInBetween(*pLeft, *pRight, fPos / fLen);
+/*N*/ if(!bLast)
+/*N*/ aRight.CalcInBetween(*pLeft, *pRight, fRight / fLen);
+/*N*/
+/*N*/ ImpCreateLineSegment(bFirst ? pPrev : 0L, &aLeft, &aRight, bLast ? pNext : 0L);
+/*N*/ }
+/*N*/
+/*N*/ bFirst = FALSE;
+/*N*/ fPos += fDist;
+/*N*/ nInd = mrLineAttr.GetNextDashDotIndex(nInd, fDist);
+/*N*/ } while(fPos < fLen);
+/*N*/ }
+
+/*N*/ double ImpLineGeometryCreator::ImpCreateLineStartEnd(Polygon3D& rArrowPoly, const Polygon3D& rSourcePoly, BOOL bFront, double fWantedWidth, BOOL bCentered)
+/*N*/ {
+/*N*/ double fRetval(0.0);
+/*N*/ double fOffset(0.0);
+/*N*/ Volume3D aPolySize(rArrowPoly.GetPolySize());
+/*N*/ double fScaleValue(fWantedWidth / aPolySize.GetWidth());
+/*N*/ Matrix4D aTrans;
+/*N*/ Vector3D aCenter;
+/*N*/
+/*N*/ if(bCentered)
+/*N*/ {
+/*N*/ aCenter = Vector3D(
+/*N*/ (aPolySize.MinVec().X() + aPolySize.MaxVec().X()) / 2.0,
+/*N*/ (aPolySize.MinVec().Y() + aPolySize.MaxVec().Y()) / 2.0, 0.0);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aCenter = Vector3D(rArrowPoly.GetMiddle());
+/*N*/ }
+/*N*/
+/*N*/ aTrans.Translate(-aCenter);
+/*N*/ aTrans.Scale(fScaleValue, fScaleValue, fScaleValue);
+/*N*/
+/*N*/ if(bCentered)
+/*N*/ {
+/*N*/ Vector3D aLowerCenter(aCenter.X(), aPolySize.MinVec().Y(), 0.0);
+/*N*/
+/*N*/ aLowerCenter *= aTrans;
+/*N*/ aCenter *= aTrans;
+/*N*/ fOffset = (aCenter - aLowerCenter).GetLength();
+/*N*/ fRetval = fOffset / 2.0;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Vector3D aLowerCenter(aCenter.X(), aPolySize.MinVec().Y(), 0.0);
+/*N*/ Vector3D aUpperCenter(aCenter.X(), aPolySize.MaxVec().Y(), 0.0);
+/*N*/
+/*N*/ aUpperCenter *= aTrans;
+/*N*/ aLowerCenter *= aTrans;
+/*N*/ fOffset = (aUpperCenter - aLowerCenter).GetLength();
+/*N*/ fRetval = fOffset * 0.8;
+/*N*/ }
+/*N*/
+/*N*/ Vector3D aHead = (bFront) ? rSourcePoly[0] : rSourcePoly[rSourcePoly.GetPointCount() - 1];
+/*N*/ Vector3D aTail = (bFront) ? rSourcePoly[1] : rSourcePoly[rSourcePoly.GetPointCount() - 2];
+/*N*/
+/*N*/ if(fOffset != 0.0)
+/*N*/ {
+/*N*/ if(!bFront)
+/*N*/ fOffset = rSourcePoly.GetLength() - fOffset;
+/*N*/ aTail = rSourcePoly.GetPosition(fOffset);
+/*N*/ }
+/*N*/
+/*N*/ Vector3D aDirection = aHead - aTail;
+/*N*/ aDirection.Normalize();
+/*N*/ double fRotation = atan2(aDirection.Y(), aDirection.X()) - (90.0 * F_PI180);
+/*N*/
+/*N*/ aTrans.RotateZ(fRotation);
+/*N*/ aTrans.Translate(aHead);
+/*N*/
+/*N*/ if(!bCentered)
+/*N*/ {
+/*N*/ Vector3D aUpperCenter(aCenter.X(), aPolySize.MaxVec().Y(), 0.0);
+/*N*/
+/*N*/ aUpperCenter *= aTrans;
+/*N*/ aCenter *= aTrans;
+/*N*/ aTrans.Translate(aCenter - aUpperCenter);
+/*N*/ }
+/*N*/
+/*N*/ rArrowPoly.Transform(aTrans);
+/*N*/ rArrowPoly.SetClosed(TRUE);
+/*N*/
+/*N*/ return fRetval;
+/*N*/ }
+
+/*N*/ void ImpLineGeometryCreator::ImpCreateLineGeometry(const Polygon3D& rSourcePoly)
+/*N*/ {
+/*N*/ UINT16 nPntCnt = rSourcePoly.GetPointCount();
+/*N*/
+/*N*/ if(nPntCnt > 1)
+/*N*/ {
+/*N*/ BOOL bClosed = rSourcePoly.IsClosed();
+/*N*/ UINT16 nCount = nPntCnt;
+/*N*/ Polygon3D aPoly = rSourcePoly;
+/*N*/
+/*N*/ if(!bClosed)
+/*N*/ {
+/*N*/ nCount = nPntCnt-1;
+/*N*/ double fPolyLength = rSourcePoly.GetLength();
+/*N*/ double fStart = 0.0;
+/*N*/ double fEnd = fPolyLength;
+/*N*/
+/*N*/ if(mrLineAttr.IsStartActive())
+/*N*/ {
+/*?*/ // 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);
+/*N*/ }
+/*N*/
+/*N*/ if(mrLineAttr.IsEndActive())
+/*N*/ {
+/*?*/ // 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);
+/*N*/ }
+/*N*/
+/*N*/ if(fStart != 0.0 || fEnd != fPolyLength)
+/*N*/ {
+/*?*/ // 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;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(nCount)
+/*N*/ {
+/*N*/ if(!mrLineAttr.GetDisplayLineWidth()
+/*N*/ && (mbLineDraft || mrLineAttr.GetLineStyle() == XLINE_SOLID))
+/*N*/ {
+/*N*/ // LineWidth zero, solid line -> add directly to linePoly
+/*N*/ mrPolyLine3D.Insert(aPoly);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ const Vector3D* pPrev = NULL;
+/*N*/ const Vector3D* pLeft = NULL;
+/*N*/ const Vector3D* pRight = NULL;
+/*N*/ const Vector3D* pNext = NULL;
+/*N*/ double fPolyPos = 0.0;
+/*N*/
+/*N*/ for(UINT16 a=0;a<nCount;a++)
+/*N*/ {
+/*N*/ BOOL bStart(!a);
+/*N*/ BOOL bEnd(a+1 == nCount);
+/*N*/
+/*N*/ // get left, right positions
+/*N*/ pLeft = &aPoly[a];
+/*N*/
+/*N*/ // get length
+/*N*/ if(bClosed)
+/*N*/ {
+/*N*/ pRight = &aPoly[(a+1) % nCount];
+/*N*/ pPrev = &aPoly[(a+nCount-1) % nCount];
+/*N*/ pNext = &aPoly[(a+2) % nCount];
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ pRight = &aPoly[a+1];
+/*?*/
+/*?*/ if(bStart)
+/*?*/ {
+/*?*/ pPrev = NULL;
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ pPrev = &aPoly[a-1];
+/*?*/ }
+/*?*/
+/*?*/ if(bEnd)
+/*?*/ {
+/*?*/ pNext = NULL;
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ pNext = &aPoly[a+2];
+/*?*/ }
+/*N*/ }
+
+ // positions are in pPrev, pLeft, pRight and pNext.
+/*N*/ if(!mbLineDraft && mrLineAttr.GetLineStyle() == XLINE_DASH)
+/*?*/ ImpCreateSegmentsForLine(pPrev, pLeft, pRight, pNext, fPolyPos);
+/*N*/ else
+/*?*/ ImpCreateLineSegment(pPrev, pLeft, pRight, pNext);
+/*N*/
+/*N*/ // increment PolyPos
+/*N*/ Vector3D aEdge = *pRight - *pLeft;
+/*N*/ fPolyPos += aEdge.GetLength();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// class to remember broadcast start positions
+
+/*N*/ SdrBroadcastItemChange::SdrBroadcastItemChange(const SdrObject& rObj)
+/*N*/ {
+/*N*/ if(rObj.ISA(SdrObjGroup))
+/*N*/ {
+/*N*/ SdrObjListIter aIter((const SdrObjGroup&)rObj, IM_DEEPNOGROUPS);
+/*N*/ mpData = new List();
+/*N*/
+/*N*/ while(aIter.IsMore())
+/*N*/ {
+/*N*/ SdrObject* pObj = aIter.Next();
+/*N*/ if(pObj)
+/*N*/ ((List*)mpData)->Insert(new Rectangle(pObj->GetBoundRect()), LIST_APPEND);
+/*N*/ }
+/*N*/
+/*N*/ mnCount = ((List*)mpData)->Count();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ mnCount = 1;
+/*N*/ mpData = new Rectangle(rObj.GetBoundRect());
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrBroadcastItemChange::~SdrBroadcastItemChange()
+/*N*/ {
+/*N*/ if(mnCount > 1)
+/*N*/ {
+/*N*/ for(sal_uInt32 a(0); a < mnCount;a++)
+/*N*/ delete ((Rectangle*)((List*)mpData)->GetObject(a));
+/*N*/ delete ((List*)mpData);
+/*N*/ }
+/*N*/ else
+/*N*/ delete ((Rectangle*)mpData);
+/*N*/ }
+
+/*N*/ const Rectangle& SdrBroadcastItemChange::GetRectangle(sal_uInt32 nIndex) const
+/*N*/ {
+/*N*/ if(mnCount > 1)
+/*N*/ return *((Rectangle*)((List*)mpData)->GetObject(nIndex));
+/*N*/ else
+/*N*/ return *((Rectangle*)mpData);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@@@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ DBG_NAME(SdrObject)
+/*N*/ TYPEINIT1(SdrObject,SfxListener);
+
+/*N*/ SdrObject::SdrObject():
+/*N*/ pObjList(NULL),
+/*N*/ pPage(NULL),
+/*N*/ pModel(NULL),
+/*N*/ pUserCall(NULL),
+/*N*/ pPlusData(NULL),
+/*N*/ nOrdNum(0),
+/*N*/ nLayerId(0)
+/*N*/ {
+/*N*/ DBG_CTOR(SdrObject,NULL);
+/*N*/ bVirtObj =FALSE;
+/*N*/ bBoundRectDirty =TRUE;
+/*N*/ bSnapRectDirty =TRUE;
+/*N*/ bNetLock =FALSE;
+/*N*/ bInserted =FALSE;
+/*N*/ bGrouped =FALSE;
+/*N*/ bMovProt =FALSE;
+/*N*/ bSizProt =FALSE;
+/*N*/ bNoPrint =FALSE;
+/*N*/ bEmptyPresObj =FALSE;
+/*N*/ bNotPersistent =FALSE;
+/*N*/ bNeedColorRestore=FALSE;
+/*N*/ bNotVisibleAsMaster=FALSE;
+/*N*/ bClosedObj =FALSE;
+/*N*/ bWriterFlyFrame =FALSE;
+/*N*/ bNotMasterCachable=FALSE;
+/*N*/ bIsEdge=FALSE;
+/*N*/ bIs3DObj=FALSE;
+/*N*/ bMarkProt=FALSE;
+/*N*/ bIsUnoObj=FALSE;
+/*N*/ }
+
+/*N*/ SdrObject::~SdrObject()
+/*N*/ {
+/*N*/ uno::Reference< lang::XComponent > xShape( mxUnoShape, uno::UNO_QUERY );
+/*N*/ if( xShape.is() )
+/*N*/ xShape->dispose();
+/*N*/
+/*N*/ DBG_DTOR(SdrObject,NULL);
+/*N*/ SendUserCall(SDRUSERCALL_DELETE,GetBoundRect());
+/*N*/ if (pPlusData!=NULL) delete pPlusData;
+/*N*/ }
+
+/*N*/ SdrObjPlusData* SdrObject::NewPlusData() const
+/*N*/ {
+/*N*/ return new SdrObjPlusData;
+/*N*/ }
+
+/*N*/ void SdrObject::SetRectsDirty(FASTBOOL bNotMyself)
+/*N*/ {
+/*N*/ if (!bNotMyself) {
+/*N*/ bBoundRectDirty=TRUE;
+/*N*/ bSnapRectDirty=TRUE;
+/*N*/ }
+/*N*/ if (pObjList!=NULL) {
+/*N*/ pObjList->SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ if(pNewModel && pPage)
+/*N*/ {
+/*N*/ if(pPage->GetModel() != pNewModel)
+/*N*/ {
+/*N*/ pPage = NULL;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ pModel = pNewModel;
+/*N*/ }
+
+/*N*/ void SdrObject::SetObjList(SdrObjList* pNewObjList)
+/*N*/ {
+/*N*/ pObjList=pNewObjList;
+/*N*/ }
+
+/*N*/ void SdrObject::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ pPage=pNewPage;
+/*N*/ if (pPage!=NULL) {
+/*N*/ SdrModel* pMod=pPage->GetModel();
+/*N*/ if (pMod!=pModel && pMod!=NULL) {
+/*N*/ SetModel(pMod);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// init global static itempool
+/*N*/ SdrItemPool* SdrObject::mpGlobalItemPool = NULL;
+/*N*/
+/*N*/ SdrItemPool* SdrObject::GetGlobalDrawObjectItemPool()
+/*N*/ {
+/*N*/ if(!mpGlobalItemPool)
+/*N*/ {
+/*N*/ mpGlobalItemPool = new SdrItemPool(SDRATTR_START, SDRATTR_END);
+/*N*/ SfxItemPool* pGlobalOutlPool = EditEngine::CreatePool();
+/*N*/ mpGlobalItemPool->SetSecondaryPool(pGlobalOutlPool);
+/*N*/ mpGlobalItemPool->SetDefaultMetric((SfxMapUnit)SdrEngineDefaults::GetMapUnit());
+/*N*/ mpGlobalItemPool->FreezeIdRanges();
+/*N*/ }
+/*N*/
+/*N*/ return mpGlobalItemPool;
+/*N*/ }
+
+
+/*N*/ SdrItemPool* SdrObject::GetItemPool() const
+/*N*/ {
+/*N*/ if(pModel)
+/*N*/ return (SdrItemPool*)(&pModel->GetItemPool());
+/*N*/
+/*N*/ // use a static global default pool
+/*N*/ return SdrObject::GetGlobalDrawObjectItemPool();
+/*N*/ }
+
+/*N*/ UINT32 SdrObject::GetObjInventor() const
+/*N*/ {
+/*N*/ return SdrInventor;
+/*N*/ }
+
+/*N*/ UINT16 SdrObject::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16(OBJ_NONE);
+/*N*/ }
+
+
+/*N*/ SdrLayerID SdrObject::GetLayer() const
+/*N*/ {
+/*N*/ return SdrLayerID(nLayerId);
+/*N*/ }
+
+/*N*/ void SdrObject::GetLayer(SetOfByte& rSet) const
+/*N*/ {
+/*N*/ rSet.Set((BYTE)nLayerId);
+/*N*/ SdrObjList* pOL=GetSubList();
+/*N*/ if (pOL!=NULL) {
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+/*N*/ pOL->GetObj(nObjNum)->GetLayer(rSet);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetLayer(SdrLayerID nLayer)
+/*N*/ {
+/*N*/ nLayerId=nLayer;
+/*N*/ }
+
+/*N*/ void SdrObject::SetLayer(SdrLayerID nLayer)
+/*N*/ {
+/*N*/ NbcSetLayer(nLayer);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+/*N*/ void SdrObject::AddListener(SfxListener& rListener)
+/*N*/ {
+/*N*/ ImpForcePlusData();
+/*N*/ if (pPlusData->pBroadcast==NULL) pPlusData->pBroadcast=new SfxBroadcaster;
+/*N*/ rListener.StartListening(*pPlusData->pBroadcast);
+/*N*/ }
+
+/*N*/ void SdrObject::RemoveListener(SfxListener& rListener)
+/*N*/ {
+/*N*/ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
+/*N*/ rListener.EndListening(*pPlusData->pBroadcast);
+/*N*/ if (!pPlusData->pBroadcast->HasListeners()) {
+/*N*/ delete pPlusData->pBroadcast;
+/*N*/ pPlusData->pBroadcast=NULL;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::AddReference(SdrVirtObj& rVrtObj)
+/*N*/ {
+/*N*/ AddListener(rVrtObj);
+/*N*/ }
+
+/*N*/ void SdrObject::DelReference(SdrVirtObj& rVrtObj)
+/*N*/ {
+/*N*/ RemoveListener(rVrtObj);
+/*N*/ }
+
+
+
+
+
+
+/*N*/ SdrObjList* SdrObject::GetSubList() const
+/*N*/ {
+/*N*/ return NULL;
+/*N*/ }
+
+/*N*/ SdrObject* SdrObject::GetUpGroup() const
+/*N*/ {
+/*N*/ return pObjList!=NULL ? pObjList->GetOwnerObj() : NULL;
+/*N*/ }
+
+
+/*N*/ void SdrObject::SetName(const XubString& rStr)
+/*NBFF*/ {
+/*NBFF*/ if(rStr.Len())
+/*NBFF*/ {
+/*NBFF*/ ImpForcePlusData();
+/*NBFF*/ pPlusData->aObjName = rStr;
+/*NBFF*/ }
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ if(pPlusData)
+/*NBFF*/ {
+/*NBFF*/ pPlusData->aObjName = rStr;
+/*NBFF*/ }
+/*NBFF*/ }
+/*N*/ }
+
+/*N*/ XubString SdrObject::GetName() const
+/*N*/ {
+/*N*/ SdrObjPlusData* pPlus=pPlusData;
+/*N*/ if (pPlus!=NULL) {
+/*N*/ return pPlus->aObjName;
+/*N*/ }
+/*N*/ return String();
+/*N*/ }
+
+// support for HTMLName
+
+// support for HTMLName
+
+/*N*/ UINT32 SdrObject::GetOrdNum() const
+/*N*/ {
+/*N*/ if (pObjList!=NULL) {
+/*N*/ if (pObjList->IsObjOrdNumsDirty()) {
+/*N*/ pObjList->RecalcObjOrdNums();
+/*N*/ }
+/*N*/ } else ((SdrObject*)this)->nOrdNum=0;
+/*N*/ return nOrdNum;
+/*N*/ }
+
+/*N*/ const Rectangle& SdrObject::GetBoundRect() const
+/*N*/ {
+/*N*/ if (bBoundRectDirty) {
+/*N*/ ((SdrObject*)this)->RecalcBoundRect();
+/*N*/ ((SdrObject*)this)->bBoundRectDirty=FALSE;
+/*N*/ }
+/*N*/ return aOutRect;
+/*N*/ }
+
+/*N*/ void SdrObject::RecalcBoundRect()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObject::SendRepaintBroadcast(const Rectangle& rRect) const
+/*N*/ {
+/*N*/ if( pModel && pModel->isLocked() )
+/*N*/ return;
+/*N*/
+/*N*/ BOOL bBrd(pPlusData && pPlusData->pBroadcast);
+/*N*/ BOOL bPnt(bInserted && pModel);
+/*N*/
+/*N*/ if(bPnt || bBrd)
+/*N*/ {
+/*N*/ SdrHint aHint(*this, rRect);
+/*N*/
+/*N*/ if(bBrd)
+/*?*/ pPlusData->pBroadcast->Broadcast(aHint);
+/*N*/
+/*N*/ if(bPnt)
+/*N*/ pModel->Broadcast(aHint);
+/*N*/
+/*N*/ // alle Animationen wegen Obj-Aenderung neustarten
+/*N*/ RestartAnimation(NULL);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::SendRepaintBroadcast(BOOL bNoPaintNeeded) const
+/*N*/ {
+/*N*/ if( pModel && pModel->isLocked() )
+/*N*/ return;
+/*N*/
+/*N*/ BOOL bBrd(pPlusData && pPlusData->pBroadcast);
+/*N*/ BOOL bPnt(bInserted && pModel);
+/*N*/
+/*N*/ if(bPnt || bBrd)
+/*N*/ {
+/*N*/ SdrHint aHint(*this);
+/*N*/ aHint.SetNeedRepaint(!bNoPaintNeeded);
+/*N*/
+/*N*/ if(bBrd)
+/*N*/ pPlusData->pBroadcast->Broadcast(aHint);
+/*N*/
+/*N*/ if(bPnt)
+/*N*/ pModel->Broadcast(aHint);
+/*N*/
+/*N*/ // alle Animationen wegen Obj-Aenderung neustarten
+/*N*/ RestartAnimation(NULL);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::SetChanged()
+/*N*/ {
+/*N*/ if (bInserted && pModel!=NULL) pModel->SetChanged();
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObject::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& /*rInfoRec*/) const
+/*N*/ {
+/*N*/ Color aRedColor( COL_RED );
+/*N*/ Color aYellowColor( COL_YELLOW );
+/*N*/ rXOut.OverrideLineColor( aRedColor );
+/*N*/ rXOut.OverrideFillColor( aYellowColor );
+/*N*/ rXOut.DrawRect(GetBoundRect());
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ ::std::auto_ptr< SdrLineGeometry > SdrObject::CreateLinePoly( OutputDevice& rOut,
+/*N*/ BOOL bForceOnePixel,
+/*N*/ BOOL bForceTwoPixel,
+/*N*/ BOOL bIsLineDraft ) const
+/*N*/ {
+/*N*/ PolyPolygon3D aPolyPoly3D;
+/*N*/ PolyPolygon3D aLinePoly3D;
+/*N*/
+/*N*/ // get XOR Poly as base
+/*N*/ XPolyPolygon aTmpPolyPolygon;
+/*N*/ TakeXorPoly(aTmpPolyPolygon, TRUE);
+/*N*/
+/*N*/ // get ImpLineStyleParameterPack
+/*N*/ ImpLineStyleParameterPack aLineAttr(GetItemSet(), bForceOnePixel || bForceTwoPixel || bIsLineDraft, &rOut);
+/*N*/ ImpLineGeometryCreator aLineCreator(aLineAttr, aPolyPoly3D, aLinePoly3D, bIsLineDraft);
+/*N*/
+/*N*/ // compute single lines
+/*N*/ for(UINT16 a=0;a<aTmpPolyPolygon.Count();a++)
+/*N*/ {
+/*N*/ // expand splines into polygons and convert to double
+/*N*/ Polygon3D aPoly3D(XOutCreatePolygon(aTmpPolyPolygon[a], &rOut));
+/*N*/ aPoly3D.RemoveDoublePoints();
+/*N*/
+/*N*/ // convert line to single Polygons; make sure the part
+/*N*/ // polygons are all clockwise oriented
+/*N*/ aLineCreator.AddPolygon3D(aPoly3D);
+/*N*/ }
+/*N*/
+/*N*/ if(aPolyPoly3D.Count() || aLinePoly3D.Count())
+/*N*/ return ::std::auto_ptr< SdrLineGeometry > (new SdrLineGeometry(aPolyPoly3D, aLinePoly3D,
+/*N*/ aLineAttr, bForceOnePixel, bForceTwoPixel));
+/*N*/ else
+/*?*/ return ::std::auto_ptr< SdrLineGeometry > (NULL);
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+//#define TEST_SKELETON
+#ifdef TEST_SKELETON
+
+static OutputDevice* pImpTestOut = 0L;
+
+class ImpSkeleton;
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+#endif
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+/*N*/ ::std::auto_ptr< SdrLineGeometry > SdrObject::ImpPrepareLineGeometry( ExtOutputDevice& rXOut, const SfxItemSet& rSet,
+/*N*/ BOOL bIsLineDraft) const
+/*N*/ {
+/*N*/ XLineStyle eXLS = (XLineStyle)((const XLineStyleItem&)rSet.Get(XATTR_LINESTYLE)).GetValue();
+/*N*/ if(eXLS != XLINE_NONE)
+/*N*/ {
+/*N*/ // need to force single point line?
+/*N*/ INT32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+/*N*/ Size aSize(nLineWidth, nLineWidth);
+/*N*/ aSize = rXOut.GetOutDev()->LogicToPixel(aSize);
+/*N*/ BOOL bForceOnePixel(aSize.Width() <= 1 || aSize.Height() <= 1);
+/*N*/ BOOL bForceTwoPixel(!bForceOnePixel && (aSize.Width() <= 2 || aSize.Height() <= 2));
+/*N*/
+/*N*/ // no force to two pixel when connected to MetaFile, so that not
+/*N*/ // four lines instead of one is recorded (e.g.)
+/*N*/ if(bForceTwoPixel && rXOut.GetOutDev()->GetConnectMetaFile())
+/*N*/ bForceTwoPixel = FALSE;
+/*N*/
+/*N*/ // #78210# switch off bForceTwoPixel when line draft mode
+/*N*/ if(bForceTwoPixel && bIsLineDraft)
+/*N*/ {
+/*N*/ bForceTwoPixel = FALSE;
+/*N*/ bForceOnePixel = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // create line geometry
+/*N*/ return CreateLinePoly(*rXOut.GetOutDev(),
+/*N*/ bForceOnePixel, bForceTwoPixel, bIsLineDraft);
+/*N*/ }
+/*N*/
+/*N*/ return ::std::auto_ptr< SdrLineGeometry > (0L);
+/*N*/ }
+
+
+/*N*/ void SdrObject::ImpDrawColorLineGeometry(
+/*N*/ ExtOutputDevice& rXOut, const SfxItemSet& rSet, SdrLineGeometry& rLineGeometry) const
+/*N*/ {
+/*N*/ Color aColor = ((XLineColorItem&)rSet.Get(XATTR_LINECOLOR)).GetValue();
+/*N*/ sal_uInt16 nTrans = ((const XLineTransparenceItem&)(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue();
+/*N*/
+/*N*/ // draw the line geometry
+/*N*/ ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
+/*N*/ }
+
+/*N*/ void SdrObject::ImpDrawLineGeometry( ExtOutputDevice& rXOut,
+/*N*/ Color& rColor,
+/*N*/ sal_uInt16 nTransparence,
+/*N*/ SdrLineGeometry& rLineGeometry,
+/*N*/ sal_Int32 nDX,
+/*N*/ sal_Int32 nDY ) const
+/*N*/ {
+/*N*/ Color aLineColor( rColor );
+/*N*/
+/*N*/ // #72796# black/white option active?
+/*N*/ const UINT32 nOldDrawMode(rXOut.GetOutDev()->GetDrawMode());
+/*N*/
+/*N*/ // #72796# if yes, force to DRAWMODE_BLACKFILL for these are LINES to be drawn as polygons
+/*N*/ if( ( nOldDrawMode & DRAWMODE_WHITEFILL ) && ( nOldDrawMode & DRAWMODE_BLACKLINE ) )
+/*N*/ {
+/*?*/ aLineColor = Color( COL_BLACK );
+/*?*/ rXOut.GetOutDev()->SetDrawMode( nOldDrawMode & (~DRAWMODE_WHITEFILL) );
+/*N*/ }
+/*N*/ else if( ( nOldDrawMode & DRAWMODE_SETTINGSFILL ) && ( nOldDrawMode & DRAWMODE_SETTINGSLINE ) )
+/*N*/ {
+/*?*/ ColorConfig aColorConfig;
+/*?*/ aLineColor = Color( aColorConfig.GetColorValue( FONTCOLOR ).nColor );
+/*?*/ rXOut.GetOutDev()->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) );
+/*N*/ }
+/*N*/
+/*N*/ // #103692# Hold local copy of geometry
+/*N*/ PolyPolygon3D aPolyPoly = rLineGeometry.GetPolyPoly3D();
+/*N*/ PolyPolygon3D aLinePoly = rLineGeometry.GetLinePoly3D();
+/*N*/
+/*N*/ // #103692# Offset geometry (extracted from SdrObject::ImpDrawShadowLineGeometry)
+/*N*/ if( nDX || nDY )
+/*N*/ {
+/*?*/ // transformation necessary
+/*?*/ Matrix4D aTrans;
+/*?*/
+/*?*/ aTrans.Translate((double)nDX, -(double)nDY, 0.0);
+/*?*/ aPolyPoly.Transform(aTrans);
+/*?*/ aLinePoly.Transform(aTrans);
+/*N*/ }
+/*N*/
+/*N*/ // #100127# Bracket output with a comment, if recording a Mtf
+/*N*/ GDIMetaFile* pMtf=NULL;
+/*N*/ bool bMtfCommentWritten( false );
+/*N*/ if( (pMtf=rXOut.GetOutDev()->GetConnectMetaFile()) )
+/*N*/ {
+/*N*/ XPolyPolygon aPolyPoly;
+/*N*/ TakeXorPoly(aPolyPoly, TRUE);
+/*N*/
+/*N*/ // #103692# Offset original geometry, too
+/*N*/ if( nDX || nDY )
+/*N*/ {
+/*?*/ // transformation necessary
+/*?*/ aPolyPoly.Move( nDX, nDY );
+/*N*/ }
+/*N*/
+/*N*/ // for geometries with more than one polygon, dashing, arrows
+/*N*/ // etc. become ambiguous (e.g. measure objects have no arrows
+/*N*/ // on the end line), thus refrain from writing the comment
+/*N*/ // here.
+/*N*/ if( aPolyPoly.Count() == 1 )
+/*N*/ {
+/*N*/ // add completely superfluous color action (gets overwritten
+/*N*/ // below), to store our line color reliably
+/*N*/ rXOut.GetOutDev()->SetLineColor(aLineColor);
+/*N*/
+/*N*/ const ImpLineStyleParameterPack& rLineParameters = rLineGeometry.GetLineAttr();
+/*N*/
+/*N*/ XPolygon aStartPoly( rLineParameters.GetStartPolygon() );
+/*N*/ XPolygon aEndPoly( rLineParameters.GetEndPolygon() );
+/*N*/
+/*N*/ // scale arrows to specified stroke width
+/*N*/ if( aStartPoly.GetPointCount() )
+/*?*/ {
+/*?*/ Rectangle aBounds( aStartPoly.GetBoundRect() );
+/*?*/
+/*?*/ // mirror and translate to origin
+/*?*/ aStartPoly.Scale(-1,-1);
+/*?*/ aStartPoly.Translate( Point(aBounds.GetWidth() / 2, aBounds.GetHeight()) );
+/*?*/
+/*?*/ if( aBounds.GetWidth() )
+/*?*/ {
+/*?*/ // #104527# Avoid division by zero. If rLineParameters.GetLineWidth
+/*?*/ // is zero this is a hairline which can be handled as 1.0.
+/*?*/ double fLineWidth(rLineParameters.GetLineWidth() ? (double)rLineParameters.GetLineWidth() : 1.0);
+/*?*/
+/*?*/ double fScale( (double)rLineParameters.GetStartWidth() / fLineWidth *
+/*?*/ (double)SvtGraphicStroke::normalizedArrowWidth / (double)aBounds.GetWidth() );
+/*?*/ aStartPoly.Scale( fScale, fScale );
+/*?*/ }
+/*?*/
+/*?*/ if( rLineParameters.IsStartCentered() )
+/*?*/ aStartPoly.Translate( Point(0, -aStartPoly.GetBoundRect().GetHeight() / 2) );
+/*?*/ }
+/*N*/ if( aEndPoly.GetPointCount() )
+/*?*/ {
+/*?*/ Rectangle aBounds( aEndPoly.GetBoundRect() );
+/*?*/
+/*?*/ // mirror and translate to origin
+/*?*/ aEndPoly.Scale(-1,-1);
+/*?*/ aEndPoly.Translate( Point(aBounds.GetWidth() / 2, aBounds.GetHeight()) );
+/*?*/
+/*?*/ if( aBounds.GetWidth() )
+/*?*/ {
+/*?*/ // #104527# Avoid division by zero. If rLineParameters.GetLineWidth
+/*?*/ // is zero this is a hairline which we can be handled as 1.0.
+/*?*/ double fLineWidth(rLineParameters.GetLineWidth() ? (double)rLineParameters.GetLineWidth() : 1.0);
+/*?*/
+/*?*/ double fScale( (double)rLineParameters.GetEndWidth() / fLineWidth *
+/*?*/ (double)SvtGraphicStroke::normalizedArrowWidth / (double)aBounds.GetWidth() );
+/*?*/ aEndPoly.Scale( fScale, fScale );
+/*?*/ }
+/*?*/
+/*?*/ if( rLineParameters.IsEndCentered() )
+/*?*/ aEndPoly.Translate( Point(0, -aEndPoly.GetBoundRect().GetHeight() / 2) );
+/*?*/ }
+/*N*/
+/*N*/ SvtGraphicStroke aStroke( XOutCreatePolygonBezier( aPolyPoly[0], rXOut.GetOutDev() ),
+/*N*/ XOutCreatePolygonBezier( aStartPoly, rXOut.GetOutDev() ),
+/*N*/ XOutCreatePolygonBezier( aEndPoly, rXOut.GetOutDev() ),
+/*N*/ nTransparence / 100.0,
+/*N*/ rLineParameters.GetLineWidth(),
+/*N*/ SvtGraphicStroke::capButt,
+/*N*/ SvtGraphicStroke::joinRound,
+/*N*/ rLineParameters.GetLinejointMiterUpperBound(),
+/*N*/ rLineParameters.GetLineStyle() == XLINE_DASH ? rLineParameters.GetDotDash() : SvtGraphicStroke::DashArray() );
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ ::rtl::OString aStr( aStroke.toString() );
+/*N*/ #endif
+/*N*/
+/*N*/ SvMemoryStream aMemStm;
+/*N*/
+/*N*/ aMemStm << aStroke;
+/*N*/
+/*N*/ pMtf->AddAction( new MetaCommentAction( "XPATHSTROKE_SEQ_BEGIN", 0,
+/*N*/ static_cast<const BYTE*>(aMemStm.GetData()),
+/*N*/ aMemStm.Seek( STREAM_SEEK_TO_END ) ) );
+/*N*/ bMtfCommentWritten = true;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ 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(aPolyPoly.Count())
+/*?*/ aVolume.Union(aPolyPoly.GetPolySize());
+/*?*/ if(aLinePoly.Count())
+/*?*/ aVolume.Union(aLinePoly.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(aLineColor);
+/*?*/ aVDev.SetFillColor(aLineColor);
+/*?*/ aVDev.SetFont(rXOut.GetOutDev()->GetFont());
+/*?*/ aVDev.SetDrawMode(rXOut.GetOutDev()->GetDrawMode());
+/*?*/ aVDev.SetRefPoint(rXOut.GetOutDev()->GetRefPoint());
+/*?*/
+/*?*/ // create output
+/*?*/ if(aPolyPoly.Count())
+/*?*/ {
+/*?*/ PolyPolygon aVCLPolyPoly = aPolyPoly.GetPolyPolygon();
+/*?*/
+/*?*/ for(UINT16 a=0;a<aVCLPolyPoly.Count();a++)
+/*?*/ aMetaFile.AddAction(new MetaPolygonAction(aVCLPolyPoly[a]));
+/*?*/ }
+/*?*/
+/*?*/ if(aLinePoly.Count())
+/*?*/ {
+/*?*/ PolyPolygon aVCLLinePoly = aLinePoly.GetPolyPolygon();
+/*?*/
+/*?*/ if(rLineGeometry.DoForceTwoPixel())
+/*?*/ {
+/*?*/ UINT16 a;
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
+/*?*/
+/*?*/ aVCLLinePoly.Move(aSizeSinglePixel.Width() - 1, 0);
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
+/*?*/
+/*?*/ aVCLLinePoly.Move(0, aSizeSinglePixel.Height() - 1);
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
+/*?*/
+/*?*/ aVCLLinePoly.Move(-aSizeSinglePixel.Width() - 1, 0);
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ for(UINT16 a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[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);
+/*?*/ }
+/*?*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // no transparence, simple output
+/*N*/ if(aPolyPoly.Count())
+/*N*/ {
+/*N*/ PolyPolygon aVCLPolyPoly = aPolyPoly.GetPolyPolygon();
+/*N*/
+/*N*/ rXOut.GetOutDev()->SetLineColor();
+/*N*/ rXOut.GetOutDev()->SetFillColor(aLineColor);
+/*N*/
+/*N*/ for(UINT16 a=0;a<aVCLPolyPoly.Count();a++)
+/*N*/ rXOut.GetOutDev()->DrawPolygon(aVCLPolyPoly[a]);
+/*N*/ }
+/*N*/
+/*N*/ if(aLinePoly.Count())
+/*N*/ {
+/*N*/ PolyPolygon aVCLLinePoly = aLinePoly.GetPolyPolygon();
+/*N*/
+/*N*/ rXOut.GetOutDev()->SetLineColor(aLineColor);
+/*N*/ rXOut.GetOutDev()->SetFillColor();
+/*N*/
+/*N*/ if(rLineGeometry.DoForceTwoPixel())
+/*?*/ {
+/*?*/ PolyPolygon aPolyPolyPixel( rXOut.GetOutDev()->LogicToPixel(aVCLLinePoly) );
+/*?*/ BOOL bWasEnabled = rXOut.GetOutDev()->IsMapModeEnabled();
+/*?*/ rXOut.GetOutDev()->EnableMapMode(FALSE);
+/*?*/ UINT16 a;
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+/*?*/
+/*?*/ aPolyPolyPixel.Move(1,0);
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+/*?*/
+/*?*/ aPolyPolyPixel.Move(0,1);
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+/*?*/
+/*?*/ aPolyPolyPixel.Move(-1,0);
+/*?*/
+/*?*/ for(a=0;a<aVCLLinePoly.Count();a++)
+/*?*/ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+/*?*/
+/*?*/ rXOut.GetOutDev()->EnableMapMode(bWasEnabled);
+/*?*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ for( UINT16 a = 0; a < aVCLLinePoly.Count(); a++ )
+/*N*/ {
+/*N*/ const Polygon& rPoly = aVCLLinePoly[ a ];
+/*N*/ BOOL bDrawn = FALSE;
+/*N*/
+/*N*/ if( rPoly.GetSize() == 2 )
+/*N*/ {
+/*N*/ if ( !rXOut.GetOutDev()->GetConnectMetaFile() )
+/*N*/ {
+/*?*/ const Line aLine( rXOut.GetOutDev()->LogicToPixel( rPoly[ 0 ] ),
+/*?*/ rXOut.GetOutDev()->LogicToPixel( rPoly[ 1 ] ) );
+/*?*/
+/*?*/ if( aLine.GetLength() > 16000 )
+/*?*/ {
+/*?*/ Point aPoint;
+/*?*/ Rectangle aOutRect( aPoint, rXOut.GetOutDev()->GetOutputSizePixel() );
+/*?*/ Line aIntersection;
+/*?*/
+/*?*/ if( aLine.Intersection( aOutRect, aIntersection ) )
+/*?*/ {
+/*?*/ rXOut.GetOutDev()->DrawLine( rXOut.GetOutDev()->PixelToLogic( aIntersection.GetStart() ),
+/*?*/ rXOut.GetOutDev()->PixelToLogic( aIntersection.GetEnd() ) );
+/*?*/ }
+/*?*/ bDrawn = TRUE;
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ if( !bDrawn )
+/*N*/ rXOut.GetOutDev()->DrawPolyLine( rPoly );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // #100127# Bracket output with a comment, if recording a Mtf
+/*N*/ if( bMtfCommentWritten && pMtf )
+/*N*/ pMtf->AddAction( new MetaCommentAction( "XPATHSTROKE_SEQ_END" ) );
+/*N*/
+/*N*/ rXOut.GetOutDev()->SetDrawMode( nOldDrawMode );
+/*N*/ }
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ SdrObject* SdrObject::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+/*N*/ SdrObject* SdrObject::Clone() const
+/*N*/ {
+/*N*/ SdrObject* pObj=SdrObjFactory::MakeNewObject(GetObjInventor(),GetObjIdentifier(),NULL);
+/*N*/ if (pObj!=NULL) {
+/*N*/ pObj->pModel=pModel;
+/*N*/ pObj->pPage=pPage;
+/*N*/ *pObj=*this;
+/*N*/ }
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ SdrObject* SdrObject::Clone(SdrPage* pNewPage, SdrModel* pNewModel) const
+/*N*/ {
+/*N*/ SdrObject* pObj=SdrObjFactory::MakeNewObject(GetObjInventor(),GetObjIdentifier(),NULL);
+/*N*/ if (pObj!=NULL) {
+/*N*/ pObj->pModel=pNewModel;
+/*N*/ pObj->pPage=pNewPage;
+/*N*/ *pObj=*this;
+/*N*/ }
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ void SdrObject::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ pModel =rObj.pModel;
+/*N*/ aOutRect=rObj.GetBoundRect();
+/*N*/ nLayerId=rObj.GetLayer();
+/*N*/ aAnchor =rObj.aAnchor;
+/*N*/ bVirtObj=rObj.bVirtObj;
+/*N*/ bSizProt=rObj.bSizProt;
+/*N*/ bMovProt=rObj.bMovProt;
+/*N*/ bNoPrint=rObj.bNoPrint;
+/*N*/ bMarkProt=rObj.bMarkProt;
+/*N*/ //EmptyPresObj wird nicht kopiert: nun doch! (25-07-1995, Joe)
+/*N*/ bEmptyPresObj =rObj.bEmptyPresObj;
+/*N*/ //NotVisibleAsMaster wird nicht kopiert: nun doch! (25-07-1995, Joe)
+/*N*/ bNotVisibleAsMaster=rObj.bNotVisibleAsMaster;
+/*N*/
+/*N*/ bBoundRectDirty=rObj.bBoundRectDirty;
+/*N*/ bSnapRectDirty=TRUE; //rObj.bSnapRectDirty;
+/*N*/ bNotMasterCachable=rObj.bNotMasterCachable;
+/*N*/ if (pPlusData!=NULL) { delete pPlusData; pPlusData=NULL; }
+/*N*/ if (rObj.pPlusData!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void SdrObject::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL /*bDetail*/) const
+/*N*/ {
+/*N*/ rPoly=XPolyPolygon(XPolygon(GetBoundRect()));
+/*N*/ }
+
+/*N*/ void SdrObject::TakeContour( XPolyPolygon& rPoly ) const
+/*N*/ {
+/*N*/ VirtualDevice aBlackHole;
+/*N*/ GDIMetaFile aMtf;
+/*N*/ SdrPaintInfoRec aPaintInfo;
+/*N*/ XPolygon aXPoly;
+/*N*/
+/*N*/ aBlackHole.EnableOutput( FALSE );
+/*N*/ aBlackHole.SetDrawMode( DRAWMODE_NOFILL );
+/*N*/
+/*N*/ ExtOutputDevice aXOut( &aBlackHole );
+/*N*/ SdrObject* pClone = Clone();
+/*N*/
+/*N*/ if(pClone && ISA(SdrEdgeObj))
+/*N*/ {
+/*N*/ // #102344# Flat cloned SdrEdgeObj, copy connections to original object(s).
+/*N*/ // This is deleted later at delete pClone.
+/*N*/ SdrObject* pLeft = ((SdrEdgeObj*)this)->GetConnectedNode(TRUE);
+/*N*/ SdrObject* pRight = ((SdrEdgeObj*)this)->GetConnectedNode(FALSE);
+/*N*/
+/*N*/ if(pLeft)
+/*N*/ {
+/*N*/ pClone->ConnectToNode(TRUE, pLeft);
+/*N*/ }
+/*N*/
+/*N*/ if(pRight)
+/*N*/ {
+/*N*/ pClone->ConnectToNode(FALSE, pRight);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ pClone->SetItem(XLineStyleItem(XLINE_SOLID));
+/*N*/ pClone->SetItem(XLineColorItem(String(), Color(COL_BLACK)));
+/*N*/ pClone->SetItem(XFillStyleItem(XFILL_NONE));
+/*N*/
+/*N*/ aMtf.Record( &aBlackHole );
+/*N*/ aPaintInfo.nPaintMode = SDRPAINTMODE_DRAFTTEXT | SDRPAINTMODE_DRAFTGRAF;
+/*N*/ pClone->Paint( aXOut, aPaintInfo );
+/*N*/ delete pClone;
+/*N*/ aMtf.Stop();
+/*N*/ aMtf.WindStart();
+/*N*/ rPoly.Clear();
+/*N*/
+/*N*/ for( ULONG nActionNum = 0, nActionAnz = aMtf.GetActionCount(); nActionNum < nActionAnz; nActionNum++ )
+/*N*/ {
+/*N*/ const MetaAction& rAct = *aMtf.GetAction( nActionNum );
+/*N*/ BOOL bXPoly = FALSE;
+/*N*/
+/*N*/ switch( rAct.GetType() )
+/*N*/ {
+/*?*/ 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;
+/*?*/
+/*N*/ case META_POLYGON_ACTION:
+/*N*/ {
+/*N*/ const Polygon& rPoly = ( (const MetaPolygonAction&) rAct ).GetPolygon();
+/*N*/
+/*N*/ if( rPoly.GetSize() > 2 )
+/*N*/ {
+/*N*/ aXPoly = rPoly;
+/*N*/ bXPoly = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*?*/ case META_POLYPOLYGON_ACTION:
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ break;
+/*?*/
+/*N*/ case META_POLYLINE_ACTION:
+/*N*/ {
+/*N*/ const Polygon& rPoly = ( (const MetaPolyLineAction&) rAct ).GetPolygon();
+/*N*/
+/*N*/ if( rPoly.GetSize() > 1 )
+/*N*/ {
+/*N*/ aXPoly = rPoly;
+/*N*/ bXPoly = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case META_LINE_ACTION:
+/*N*/ {
+/*N*/ aXPoly = XPolygon( 2 );
+/*N*/ aXPoly[ 0 ] = ( (const MetaLineAction&) rAct ).GetStartPoint();
+/*N*/ aXPoly[ 1 ] = ( (const MetaLineAction&) rAct ).GetEndPoint();
+/*N*/ bXPoly = TRUE;
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ default:
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( bXPoly )
+/*N*/ rPoly.Insert( aXPoly );
+/*N*/ }
+/*N*/
+/*N*/ // if we only have the outline of the object, we have _no_ contouir
+/*N*/ if( rPoly.Count() == 1 )
+/*N*/ rPoly.Clear();
+/*N*/ }
+
+/*?*/ void SdrObject::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+/*?*/ {
+/*?*/ }
+
+// Handles
+
+
+
+
+
+
+// Drag
+
+
+
+
+
+
+
+
+
+// Create
+
+
+
+
+
+
+/*N*/ Pointer SdrObject::GetCreatePointer() const
+/*N*/ {
+/*N*/ return Pointer(POINTER_CROSS);
+/*N*/ }
+
+// Transformationen
+/*N*/ void SdrObject::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ MoveRect(aOutRect,rSiz);
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*N*/ void SdrObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+/*N*/ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+/*N*/ if (bXMirr || bYMirr) {
+/*N*/ Point aRef1(GetSnapRect().Center());
+/*N*/ if (bXMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.Y()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ if (bYMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.X()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ }
+/*N*/ ResizeRect(aOutRect,rRef,xFact,yFact);
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*N*/ void SdrObject::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ SetGlueReallyAbsolute(TRUE);
+/*N*/ aOutRect.Move(-rRef.X(),-rRef.Y());
+/*N*/ Rectangle R(aOutRect);
+/*N*/ if (sn==1.0 && cs==0.0) { // 90?
+/*N*/ aOutRect.Left() =-R.Bottom();
+/*N*/ aOutRect.Right() =-R.Top();
+/*N*/ aOutRect.Top() =R.Left();
+/*N*/ aOutRect.Bottom()=R.Right();
+/*N*/ } else if (sn==0.0 && cs==-1.0) { // 180?
+/*N*/ aOutRect.Left() =-R.Right();
+/*N*/ aOutRect.Right() =-R.Left();
+/*N*/ aOutRect.Top() =-R.Bottom();
+/*N*/ aOutRect.Bottom()=-R.Top();
+/*N*/ } else if (sn==-1.0 && cs==0.0) { // 270?
+/*N*/ aOutRect.Left() =R.Top();
+/*N*/ aOutRect.Right() =R.Bottom();
+/*N*/ aOutRect.Top() =-R.Right();
+/*N*/ aOutRect.Bottom()=-R.Left();
+/*N*/ }
+/*N*/ aOutRect.Move(rRef.X(),rRef.Y());
+/*N*/ aOutRect.Justify(); // Sicherheitshalber
+/*N*/ SetRectsDirty();
+/*N*/ NbcRotateGluePoints(rRef,nWink,sn,cs);
+/*N*/ SetGlueReallyAbsolute(FALSE);
+/*N*/ }
+
+/*N*/ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
+/*N*/ {
+/*N*/ SetGlueReallyAbsolute(TRUE);
+/*N*/ aOutRect.Move(-rRef1.X(),-rRef1.Y());
+/*N*/ Rectangle R(aOutRect);
+/*N*/ long dx=rRef2.X()-rRef1.X();
+/*N*/ long dy=rRef2.Y()-rRef1.Y();
+/*N*/ if (dx==0) { // Vertikale Achse
+/*N*/ aOutRect.Left() =-R.Right();
+/*N*/ aOutRect.Right()=-R.Left();
+/*N*/ } else if (dy==0) { // Horizontale Achse
+/*N*/ aOutRect.Top() =-R.Bottom();
+/*N*/ aOutRect.Bottom()=-R.Top();
+/*N*/ } else if (dx==dy) { /* 45 Grad Achse \ */
+/*N*/ aOutRect.Left() =R.Top();
+/*N*/ aOutRect.Right() =R.Bottom();
+/*N*/ aOutRect.Top() =R.Left();
+/*N*/ aOutRect.Bottom()=R.Right();
+/*N*/ } else if (dx==-dy) { // 45 Grad Achse /
+/*N*/ aOutRect.Left() =-R.Bottom();
+/*N*/ aOutRect.Right() =-R.Top();
+/*N*/ aOutRect.Top() =-R.Right();
+/*N*/ aOutRect.Bottom()=-R.Left();
+/*N*/ }
+/*N*/ aOutRect.Move(rRef1.X(),rRef1.Y());
+/*N*/ aOutRect.Justify(); // Sicherheitshalber
+/*N*/ SetRectsDirty();
+/*N*/ NbcMirrorGluePoints(rRef1,rRef2);
+/*N*/ SetGlueReallyAbsolute(FALSE);
+/*N*/ }
+
+/*N*/ void SdrObject::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ SetGlueReallyAbsolute(TRUE);
+/*N*/ NbcShearGluePoints(rRef,nWink,tn,bVShear);
+/*N*/ SetGlueReallyAbsolute(FALSE);
+/*N*/ }
+
+/*N*/ void SdrObject::Move(const Size& rSiz)
+/*N*/ {
+/*N*/ if (rSiz.Width()!=0 || rSiz.Height()!=0) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcMove(rSiz);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcResize(rRef,xFact,yFact);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::Rotate(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ if (nWink!=0) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcRotate(rRef,nWink,sn,cs);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObject::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ if (nWink!=0) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcShear(rRef,nWink,tn,bVShear);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetRelativePos(const Point& rPnt)
+/*N*/ {
+/*N*/ Point aRelPos0(GetSnapRect().TopLeft()-aAnchor);
+/*N*/ Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
+/*N*/ NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+/*N*/ }
+
+/*N*/ void SdrObject::SetRelativePos(const Point& rPnt)
+/*N*/ {
+/*N*/ if (rPnt!=GetRelativePos()) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetRelativePos(rPnt);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ Point SdrObject::GetRelativePos() const
+/*N*/ {
+/*N*/ return GetSnapRect().TopLeft()-aAnchor;
+/*N*/ }
+/*N*/
+/*N*/ void SdrObject::NbcSetAnchorPos(const Point& rPnt)
+/*N*/ {
+/*N*/ Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
+/*N*/ aAnchor=rPnt;
+/*N*/ NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+/*N*/ }
+/*N*/
+/*N*/ void SdrObject::SetAnchorPos(const Point& rPnt)
+/*N*/ {
+/*N*/ if (rPnt!=aAnchor) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetAnchorPos(rPnt);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ const Point& SdrObject::GetAnchorPos() const
+/*N*/ {
+/*N*/ return aAnchor;
+/*N*/ }
+
+/*N*/ void SdrObject::RecalcSnapRect()
+/*N*/ {
+/*N*/ }
+
+/*N*/ const Rectangle& SdrObject::GetSnapRect() const
+/*N*/ {
+/*N*/ return aOutRect;
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ aOutRect=rRect;
+/*N*/ }
+
+/*N*/ const Rectangle& SdrObject::GetLogicRect() const
+/*N*/ {
+/*N*/ return GetSnapRect();
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ NbcSetSnapRect(rRect);
+/*N*/ }
+
+/*N*/ void SdrObject::SetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetSnapRect(rRect);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+
+/*N*/ void SdrObject::SetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetLogicRect(rRect);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+
+/*N*/ long SdrObject::GetRotateAngle() const
+/*N*/ {
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ long SdrObject::GetShearAngle(FASTBOOL bVertical) const
+/*N*/ {
+/*N*/ return 0;
+/*N*/ }
+
+
+
+/*N*/ FASTBOOL SdrObject::IsPolyObj() const
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+
+/*?*/ USHORT SdrObject::GetPointCount() const
+/*?*/ {
+/*?*/ return 0;
+/*?*/ }
+
+/*?*/ const Point& SdrObject::GetPoint(USHORT i) const
+/*?*/ {
+/*?*/ return *((Point*)NULL);
+/*?*/ }
+
+/*N*/ void SdrObject::SetPoint(const Point& rPnt, USHORT i)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetPoint(rPnt,i);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetPoint(const Point& rPnt, USHORT i)
+/*N*/ {
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ FASTBOOL SdrObject::HasTextEdit() const
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ SdrObject* SdrObject::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ return CheckHit(rPnt,nTol,pVisiLayer);
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObject::BegTextEdit(SdrOutliner& rOutl)
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void SdrObject::EndTextEdit(SdrOutliner& rOutl)
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObject::SetOutlinerParaObject(OutlinerParaObject* pTextObject)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetOutlinerParaObject(pTextObject);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ if (GetBoundRect()!=aBoundRect0) {
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
+/*N*/ {
+/*N*/ }
+
+/*N*/ OutlinerParaObject* SdrObject::GetOutlinerParaObject() const
+/*N*/ {
+/*N*/ return NULL;
+/*N*/ }
+
+/*N*/ void SdrObject::NbcReformatText()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObject::ReformatText()
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcReformatText();
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ if (GetBoundRect()!=aBoundRect0) {
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObject::RestartAnimation(SdrPageView* pPageView) const
+/*N*/ {
+/*N*/ }
+
+/*N*/ #define Imp2ndKennung (0x434F4D43)
+/*N*/ SdrObjUserData* SdrObject::ImpGetMacroUserData() const
+/*N*/ {
+/*N*/ SdrObjUserData* pData=NULL;
+/*N*/ USHORT nAnz=GetUserDataCount();
+/*N*/ for (USHORT nNum=nAnz; nNum>0 && pData==NULL;) {
+/*N*/ nNum--;
+/*N*/ pData=GetUserData(nNum);
+/*N*/ if (!pData->HasMacro(this)) pData=NULL;
+/*N*/ }
+/*N*/ return pData;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObject::HasMacro() const
+/*N*/ {
+/*N*/ SdrObjUserData* pData=ImpGetMacroUserData();
+/*N*/ return pData!=NULL ? pData->HasMacro(this) : FALSE;
+/*N*/ }
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObjGeoData* SdrObject::NewGeoData() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+/*N*/ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {
+/*N*/ rGeo.aBoundRect =GetBoundRect();
+/*N*/ rGeo.aAnchor =aAnchor ;
+/*N*/ rGeo.bMovProt =bMovProt ;
+/*N*/ rGeo.bSizProt =bSizProt ;
+/*N*/ rGeo.bNoPrint =bNoPrint ;
+/*N*/ rGeo.bClosedObj =bClosedObj ;
+/*N*/ rGeo.nLayerId =nLayerId ;
+/*N*/
+/*N*/ // Benutzerdefinierte Klebepunkte
+/*N*/ if (pPlusData!=NULL && pPlusData->pGluePoints!=NULL) {
+/*?*/ if (rGeo.pGPL!=NULL) {
+/*?*/ *rGeo.pGPL=*pPlusData->pGluePoints;
+/*?*/ } else {
+/*?*/ rGeo.pGPL=new SdrGluePointList(*pPlusData->pGluePoints);
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (rGeo.pGPL!=NULL) {
+/*?*/ delete rGeo.pGPL;
+/*?*/ rGeo.pGPL=NULL;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ SdrObjGeoData* SdrObject::GetGeoData() const
+/*N*/ {
+/*N*/ SdrObjGeoData* pGeo=NewGeoData();
+/*N*/ SaveGeoData(*pGeo);
+/*N*/ return pGeo;
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ SfxItemSet* SdrObject::mpEmptyItemSet = 0L;
+/*N*/ const SfxItemSet& SdrObject::GetItemSet() const
+/*N*/ {
+/*N*/ if(!mpEmptyItemSet)
+/*N*/ mpEmptyItemSet = ((SdrObject*)this)->CreateNewItemSet((SfxItemPool&)(*GetItemPool()));
+/*N*/ DBG_ASSERT(mpEmptyItemSet, "Could not create an SfxItemSet(!)");
+/*N*/ DBG_ASSERT(FALSE,"SdrObject::GetItemSet() should never be called, SdrObject has no Items");
+/*N*/ return *mpEmptyItemSet;
+/*N*/ }
+
+/*N*/ SfxItemSet* SdrObject::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // Basic implementation; Basic object has NO attributes
+/*N*/ DBG_ASSERT(FALSE,"SdrObject::CreateNewItemSet() should never be called, SdrObject has no Items");
+/*N*/ return new SfxItemSet(rPool, SDRATTR_START, SDRATTR_END);
+/*N*/ }
+
+/*N*/ void SdrObject::SetItem( const SfxPoolItem& rItem )
+/*N*/ {
+/*N*/ sal_uInt16 nWhichID(rItem.Which());
+/*N*/
+/*N*/ if(AllowItemChange(nWhichID, &rItem))
+/*N*/ {
+/*N*/ ItemChange(nWhichID, &rItem);
+/*N*/ PostItemChange(nWhichID);
+/*N*/
+/*N*/ SfxItemSet aSet( *GetItemPool(), nWhichID, nWhichID, 0 );
+/*N*/ aSet.Put( rItem );
+/*N*/ ItemSetChanged( aSet );
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::ClearItem( const sal_uInt16 nWhich )
+/*N*/ {
+/*N*/ if(AllowItemChange(nWhich))
+/*N*/ {
+/*N*/ ItemChange(nWhich);
+/*N*/ PostItemChange(nWhich);
+/*N*/
+/*N*/ SfxItemSet aSet( *GetItemPool(), nWhich, nWhich, 0 );
+/*N*/ ItemSetChanged( aSet );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ void SdrObject::SetItemSet( const SfxItemSet& rSet )
+/*N*/ {
+/*N*/ SfxWhichIter aWhichIter(rSet);
+/*N*/ sal_uInt16 nWhich(aWhichIter.FirstWhich());
+/*N*/ const SfxPoolItem *pPoolItem;
+/*N*/ std::vector< sal_uInt16 > aPostItemChangeList;
+/*N*/ BOOL bDidChange(FALSE);
+/*N*/ SfxItemSet aSet( *GetItemPool(), SDRATTR_START, EE_ITEMS_END, 0 );
+/*N*/
+/*N*/ while(nWhich)
+/*N*/ {
+/*N*/ if(SFX_ITEM_SET == rSet.GetItemState(nWhich, FALSE, &pPoolItem))
+/*N*/ {
+/*N*/ if(AllowItemChange(nWhich, pPoolItem))
+/*N*/ {
+/*N*/ bDidChange = TRUE;
+/*N*/ ItemChange(nWhich, pPoolItem);
+/*N*/ aPostItemChangeList.push_back( nWhich );
+/*N*/ aSet.Put( *pPoolItem );
+/*N*/ }
+/*N*/ }
+/*N*/ nWhich = aWhichIter.NextWhich();
+/*N*/ }
+/*N*/
+/*N*/ if(bDidChange)
+/*N*/ {
+/*N*/ std::vector< sal_uInt16 >::iterator aIter = aPostItemChangeList.begin();
+/*N*/ const std::vector< sal_uInt16 >::iterator aEnd = aPostItemChangeList.end();
+/*N*/ while( aIter != aEnd )
+/*N*/ {
+/*N*/ PostItemChange((*aIter));
+/*N*/ aIter++;
+/*N*/ }
+/*N*/
+/*N*/ ItemSetChanged( aSet );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/ // ItemSet was changed, maybe user wants to react
+/*N*/
+/*N*/ void SdrObject::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ }
+/*N*/
+/*N*/ void SdrObject::BroadcastItemChange(const SdrBroadcastItemChange& rChange)
+/*N*/ {
+/*N*/ sal_uInt32 nCount(rChange.GetRectangleCount());
+/*N*/
+/*N*/ sal_uInt32 a; for(a=0; a < nCount; a++)
+/*N*/ SendRepaintBroadcast(rChange.GetRectangle(a));
+/*N*/
+/*N*/ if(ISA(SdrObjGroup))
+/*N*/ {
+/*N*/ SdrObjListIter aIter(*((SdrObjGroup*)this), IM_DEEPNOGROUPS);
+/*N*/ while(aIter.IsMore())
+/*N*/ {
+/*N*/ SdrObject* pObj = aIter.Next();
+/*N*/ SendRepaintBroadcast(pObj->GetBoundRect());
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ SendRepaintBroadcast(GetBoundRect());
+/*N*/
+/*N*/ for(a = 0; a < nCount; a++)
+/*N*/ SendUserCall(SDRUSERCALL_CHGATTR, rChange.GetRectangle(a));
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// syntactical sugar for ItemSet accesses
+
+
+
+/*N*/ void SdrObject::SetItemSetAndBroadcast(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ SdrBroadcastItemChange aC(*this);
+/*N*/ SetItemSet(rSet);
+/*N*/ BroadcastItemChange(aC);
+/*N*/ }
+
+/*N*/ const SfxPoolItem& SdrObject::GetItem(const sal_uInt16 nWhich) const
+/*N*/ {
+/*N*/ return GetItemSet().Get(nWhich);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ BOOL SdrObject::AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem) const
+/*N*/ {
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ void SdrObject::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ DBG_ASSERT(FALSE,"SdrObject::ItemChange() should never be called, SdrObject has no Items");
+/*N*/ }
+
+/*N*/ void SdrObject::PostItemChange(const sal_uInt16 nWhich)
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrObject::PreSave()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObject::PostSave()
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+
+/*N*/ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ SfxStyleSheet* SdrObject::GetStyleSheet() const
+/*N*/ {
+/*N*/ // Das hier ist ein Hack:
+/*N*/ return NULL;
+/*N*/ }
+
+/*N*/ void SdrObject::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ }
+
+// Das Broadcasting beim Setzen der Attribute wird vom AttrObj gemanagt
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ FASTBOOL SdrObject::IsNode() const
+/*N*/ {
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ SdrGluePoint SdrObject::GetVertexGluePoint(USHORT nPosNum) const
+/*N*/ {
+/*N*/ Rectangle aR(GetBoundRect());
+/*N*/ Point aPt;
+/*N*/ switch (nPosNum) {
+/*N*/ case 0 : aPt=aR.TopCenter(); break;
+/*N*/ case 1 : aPt=aR.RightCenter(); break;
+/*N*/ case 2 : aPt=aR.BottomCenter(); break;
+/*N*/ case 3 : aPt=aR.LeftCenter(); break;
+/*N*/ }
+/*N*/ aPt-=GetSnapRect().Center();
+/*N*/ SdrGluePoint aGP(aPt);
+/*N*/ aGP.SetPercent(FALSE);
+/*N*/ return aGP;
+/*N*/ }
+
+
+
+/*N*/ SdrGluePointList* SdrObject::GetGluePointList()
+/*N*/ {
+/*N*/ if (pPlusData!=NULL) return pPlusData->pGluePoints;
+/*N*/ return NULL;
+/*N*/ }
+
+/*N*/ SdrGluePointList* SdrObject::ForceGluePointList()
+/*N*/ {
+/*N*/ ImpForcePlusData();
+/*N*/ if (pPlusData->pGluePoints==NULL) {
+/*N*/ pPlusData->pGluePoints=new SdrGluePointList;
+/*N*/ }
+/*N*/ return pPlusData->pGluePoints;
+/*N*/ }
+
+/*N*/ void SdrObject::SetGlueReallyAbsolute(FASTBOOL bOn)
+/*N*/ {
+/*N*/ // erst Const-Aufruf um zu sehen, ob
+/*N*/ // ueberhaupt Klebepunkte da sind
+/*N*/ // const-Aufruf erzwingen!
+/*N*/ if (GetGluePointList()!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::NbcRotateGluePoints(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ // erst Const-Aufruf um zu sehen, ob
+/*N*/ // ueberhaupt Klebepunkte da sind
+/*N*/ // const-Aufruf erzwingen!
+/*N*/ if (GetGluePointList()!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2)
+/*N*/ {
+/*N*/ // erst Const-Aufruf um zu sehen, ob
+/*N*/ // ueberhaupt Klebepunkte da sind
+/*N*/ // const-Aufruf erzwingen!
+/*N*/ if (GetGluePointList()!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ // erst Const-Aufruf um zu sehen, ob
+/*N*/ // ueberhaupt Klebepunkte da sind
+/*N*/ // const-Aufruf erzwingen!
+/*N*/ if (GetGluePointList()!=NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObject::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj)
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrObject::DisconnectFromNode(FASTBOOL bTail1)
+/*N*/ {
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+// convert this path object to contour object, even when it is a group
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObject* SdrObject::ConvertToPolyObj(BOOL bBezier, BOOL bLineToArea) const
+/*N*/ {
+/*N*/ SdrObject* pRet = DoConvertToPolyObj(bBezier);
+/*N*/
+/*N*/ if(pRet && bLineToArea)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/
+/*N*/ return pRet;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObject* SdrObject::DoConvertToPolyObj(BOOL bBezier) const
+/*N*/ {
+/*N*/ return NULL;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Streams
+
+/*N*/ void SdrObject::AfterRead()
+/*N*/ {
+/*N*/ USHORT nAnz=GetUserDataCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ GetUserData(i)->AfterRead();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrObject");
+/*N*/ #endif
+/*N*/ rIn>>aOutRect;
+/*N*/ rIn>>nLayerId;
+/*N*/ rIn>>aAnchor;
+
+ // #97849# when in a Draw/Impress binary import the anchor pos is set it's an error.
+ // So, when could figure out that a Draw/Impress is running, correct that position
+ // to (0,0). Anchor is not used but with 6.0 and XML no longer ignored in Draw/Impress
+ // so this correction needs to be made for objects with that error. These could
+ // be created when copying back anchor based draw objects from Calc or Writer to
+ // Draw/Impress, this did not reset the anchor position.
+/*N*/ if((aAnchor.X() || aAnchor.Y()) && GetModel() && GetModel()->ISA(FmFormModel))
+/*N*/ {
+/*N*/ // find out which application is running
+/*N*/ SfxObjectShell* pObjectShell = ((FmFormModel*)GetModel())->GetObjectShell();
+/*N*/ if(pObjectShell)
+/*N*/ {
+ SfxObjectFactory& rFac = pObjectShell->GetFactory();
+ if ( rFac.GetShortName() &&
+ ( strcmp(rFac.GetShortName(), "sdraw") == 0 ||
+ strcmp(rFac.GetShortName(), "simpress") == 0 ) )
+/*N*/ {
+/*N*/ // it's a draw/Impress, reset anchor pos hard
+/*N*/ aAnchor = Point(0, 0);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ BOOL bTemp;
+/*N*/ rIn>>bTemp; bMovProt=bTemp;
+/*N*/ rIn>>bTemp; bSizProt=bTemp;
+/*N*/ rIn>>bTemp; bNoPrint=bTemp;
+/*N*/ rIn>>bTemp; bMarkProt=bTemp; // war ganz frueher mal bTextToContour
+/*N*/ rIn>>bTemp; bEmptyPresObj=bTemp;
+/*N*/ if (rHead.GetVersion()>=4) {
+/*N*/ rIn>>bTemp; bNotVisibleAsMaster=bTemp;
+/*N*/ }
+/*N*/ if (rHead.GetVersion()>=11) { // ab V11 sind Connectors in DownCompat gefasst (mit Flag davor)
+/*N*/ rIn>>bTemp;
+/*N*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ } else {
+/*N*/ Polygon aTmpPoly;
+/*N*/ rIn>>aTmpPoly; // aConnectors; ehemals Konnektoren
+/*N*/ }
+/*N*/
+/*N*/ if (pPlusData!=NULL && pPlusData->pUserDataList!=NULL) {
+/*N*/ delete pPlusData->pUserDataList;
+/*N*/ pPlusData->pUserDataList=NULL;
+/*N*/ }
+/*N*/ FASTBOOL bReadUserDataList=FALSE;
+/*N*/ SdrDownCompat* pUserDataListCompat=NULL;
+/*N*/ if (rHead.GetVersion()>=11) { // ab V11 ist die UserDataList in DownCompat gefasst (mit Flag davor)
+/*N*/ rIn>>bTemp;
+/*N*/ bReadUserDataList=bTemp;
+/*N*/ if (bTemp) {
+/*N*/ pUserDataListCompat=new SdrDownCompat(rIn,STREAM_READ); // Record fuer UserDataList oeffnen
+/*N*/ #ifdef DBG_UTIL
+/*N*/ pUserDataListCompat->SetID("SdrObject(UserDataList)");
+/*N*/ #endif
+/*N*/ }
+/*N*/ } else {
+/*N*/ bReadUserDataList=TRUE;
+/*N*/ }
+/*N*/ if (bReadUserDataList) {
+/*N*/ USHORT nUserDataAnz;
+/*N*/ rIn>>nUserDataAnz;
+/*N*/ if (nUserDataAnz!=0) {
+/*N*/ ImpForcePlusData();
+/*N*/ pPlusData->pUserDataList=new SdrObjUserDataList;
+/*N*/ for (USHORT i=0; i<nUserDataAnz; i++) {
+/*N*/ SdrDownCompat* pUserDataCompat=NULL;
+/*N*/ if (rHead.GetVersion()>=11) { // ab V11 sind UserData in DownCompat gefasst
+/*N*/ //SdrDownCompat aUserDataCompat(rIn,STREAM_READ); // Record fuer UserData oeffnen (seit V11)
+/*N*/ pUserDataCompat=new SdrDownCompat(rIn,STREAM_READ); // Record fuer UserData oeffnen (seit V11)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ pUserDataCompat->SetID("SdrObject(UserData)");
+/*N*/ #endif
+/*N*/ }
+/*N*/ UINT32 nInvent;
+/*N*/ UINT16 nIdent;
+/*N*/ rIn>>nInvent;
+/*N*/ rIn>>nIdent;
+/*N*/ SdrObjUserData* pData=SdrObjFactory::MakeNewObjUserData(nInvent,nIdent,this);
+/*N*/ if (pData!=NULL)
+/*N*/ {
+/*N*/ pData->ReadData(rIn);
+/*N*/ pPlusData->pUserDataList->InsertUserData(pData);
+/*N*/ } else {
+/*N*/ // Wenn UserDataFactory nicht gesetzt ist, kann auch keiner
+/*N*/ // etwas mit diesen Daten anfangen; durch Compat werden sie
+/*N*/ // eh ueberlesen, daher ist diese Assertion überflüssig (KA)
+/*N*/ // DBG_ERROR("SdrObject::ReadData(): ObjFactory kann UserData nicht erzeugen");
+/*N*/ }
+/*N*/ if (pUserDataCompat!=NULL) { // Aha, UserData war eingepackt. Record nun schliessen
+/*N*/ delete pUserDataCompat;
+/*N*/ pUserDataCompat=NULL;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (pUserDataListCompat!=NULL) { // Aha, UserDataList war eingepackt. Record nun schliessen
+/*N*/ delete pUserDataListCompat;
+/*N*/ pUserDataListCompat=NULL;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrObject");
+/*N*/ #endif
+/*N*/ rOut<<GetBoundRect();
+/*N*/ rOut<<nLayerId;
+/*N*/ rOut<<aAnchor;
+/*N*/ BOOL bTemp;
+/*N*/ bTemp=bMovProt; rOut<<bTemp;
+/*N*/ bTemp=bSizProt; rOut<<bTemp;
+/*N*/ bTemp=bNoPrint; rOut<<bTemp;
+/*N*/ bTemp=bMarkProt; rOut<<bTemp;
+/*N*/ bTemp=bEmptyPresObj; rOut<<bTemp;
+/*N*/ bTemp=bNotVisibleAsMaster; rOut<<bTemp;
+/*N*/
+/*N*/ // Konnektoren
+/*N*/ bTemp=pPlusData!=NULL && pPlusData->pGluePoints!=NULL && pPlusData->pGluePoints->GetCount()!=0;
+/*N*/ rOut<<bTemp; // Flag fuer GluePointList vorhanden
+/*N*/ if (bTemp) {
+/*?*/ SdrDownCompat aConnectorsCompat(rOut,STREAM_WRITE); // ab V11 Konnektoren einpacken
+/*N*/ #ifdef DBG_UTIL
+/*?*/ aConnectorsCompat.SetID("SdrObject(Klebepunkte)");
+/*N*/ #endif
+/*?*/ rOut<<*pPlusData->pGluePoints;
+/*N*/ }
+
+ // UserData
+/*N*/ USHORT nUserDataAnz=GetUserDataCount();
+/*N*/ bTemp=nUserDataAnz!=0;
+/*N*/ rOut<<bTemp;
+/*N*/ if (bTemp) {
+/*N*/ SdrDownCompat aUserDataListCompat(rOut,STREAM_WRITE); // Record fuer UserDataList oeffnen (seit V11)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aUserDataListCompat.SetID("SdrObject(UserDataList)");
+/*N*/ #endif
+/*N*/ rOut<<nUserDataAnz;
+/*N*/ for (USHORT i=0; i<nUserDataAnz; i++) {
+/*N*/ SdrDownCompat aUserDataCompat(rOut,STREAM_WRITE); // Record fuer UserData oeffnen (seit V11)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aUserDataCompat.SetID("SdrObject(UserData)");
+/*N*/ #endif
+/*N*/ pPlusData->pUserDataList->GetUserData(i)->WriteData(rOut);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrObject& rObj)
+/*N*/ {
+/*N*/ DBG_ASSERT(!rObj.IsNotPersistent(),"operator>>(SdrObject): Ein nicht persistentes Zeichenobjekts wird gestreamt");
+/*N*/ SdrObjIOHeader aHead(rIn,STREAM_READ,&rObj);
+/*N*/ rObj.ReadData(aHead,rIn);
+/*N*/ return rIn;
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrObject& rObj)
+/*N*/ {
+/*N*/ DBG_ASSERT(!rObj.IsNotPersistent(),"operator<<(SdrObject): Ein nicht persistentes Zeichenobjekts wird gestreamt");
+/*N*/ SdrObjIOHeader aHead(rOut,STREAM_WRITE,&rObj);
+/*N*/
+/*N*/ if(rObj.ISA(SdrVirtObj))
+/*N*/ {
+/*N*/ // #108784#
+/*N*/ // force to write a naked SdrObj
+/*N*/ aHead.nIdentifier = OBJ_NONE;
+/*N*/ rObj.SdrObject::WriteData(rOut);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rObj.WriteData(rOut);
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrObject::SetInserted(FASTBOOL bIns)
+/*N*/ {
+/*N*/ if (bIns!=bInserted) {
+/*N*/ bInserted=bIns;
+/*N*/ Rectangle aBoundRect0(GetBoundRect());
+/*N*/ if (bIns) SendUserCall(SDRUSERCALL_INSERTED,aBoundRect0);
+/*N*/ else SendUserCall(SDRUSERCALL_REMOVED,aBoundRect0);
+/*N*/
+/*N*/ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) { // #42522#
+/*N*/ SdrHint aHint(*this);
+/*N*/ aHint.SetKind(bIns?HINT_OBJINSERTED:HINT_OBJREMOVED);
+/*N*/ pPlusData->pBroadcast->Broadcast(aHint);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::SetMoveProtect(FASTBOOL bProt)
+/*N*/ {
+/*N*/ bMovProt=bProt;
+/*N*/ SetChanged();
+/*N*/ if (bInserted && pModel!=NULL) {
+/*N*/ SdrHint aHint(*this);
+/*N*/ aHint.SetNeedRepaint(FALSE);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::SetResizeProtect(FASTBOOL bProt)
+/*N*/ {
+/*N*/ bSizProt=bProt;
+/*N*/ SetChanged();
+/*N*/ if (bInserted && pModel!=NULL) {
+/*N*/ SdrHint aHint(*this);
+/*N*/ aHint.SetNeedRepaint(FALSE);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObject::SetPrintable(FASTBOOL bPrn)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ USHORT SdrObject::GetUserDataCount() const
+/*N*/ {
+/*N*/ if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return 0;
+/*N*/ return pPlusData->pUserDataList->GetUserDataCount();
+/*N*/ }
+
+/*N*/ SdrObjUserData* SdrObject::GetUserData(USHORT nNum) const
+/*N*/ {
+/*N*/ if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return NULL;
+/*N*/ return pPlusData->pUserDataList->GetUserData(nNum);
+/*N*/ }
+/*N*/
+/*N*/ void SdrObject::InsertUserData(SdrObjUserData* pData, USHORT nPos)
+/*N*/ {
+/*N*/ if (pData!=NULL) {
+/*N*/ ImpForcePlusData();
+/*N*/ if (pPlusData->pUserDataList==NULL) pPlusData->pUserDataList=new SdrObjUserDataList;
+/*N*/ pPlusData->pUserDataList->InsertUserData(pData,nPos);
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrObject::InsertUserData(): pData ist NULL-Pointer");
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect)
+/*N*/ {
+/*N*/ SdrObjGroup* pGroup = NULL;
+/*N*/
+/*N*/ if( pObjList && pObjList->GetListKind() == SDROBJLIST_GROUPOBJ )
+/*N*/ pGroup = (SdrObjGroup*) pObjList->GetOwnerObj();
+/*N*/
+/*N*/ if ( pUserCall )
+/*N*/ {
+/*N*/ // UserCall ausfuehren
+/*N*/ pUserCall->Changed( *this, eUserCall, rBoundRect );
+/*N*/ }
+/*N*/
+/*N*/ while( pGroup )
+/*N*/ {
+/*N*/ // Gruppe benachrichtigen
+/*N*/ if( pGroup->GetUserCall() )
+/*N*/ {
+/*N*/ SdrUserCallType eChildUserType = SDRUSERCALL_CHILD_CHGATTR;
+/*N*/
+/*N*/ switch( eUserCall )
+/*N*/ {
+/*N*/ case SDRUSERCALL_MOVEONLY:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_MOVEONLY;
+/*N*/ break;
+/*N*/
+/*N*/ case SDRUSERCALL_RESIZE:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_RESIZE;
+/*N*/ break;
+/*N*/
+/*N*/ case SDRUSERCALL_CHGATTR:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_CHGATTR;
+/*N*/ break;
+/*N*/
+/*N*/ case SDRUSERCALL_DELETE:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_DELETE;
+/*N*/ break;
+/*N*/
+/*N*/ case SDRUSERCALL_COPY:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_COPY;
+/*N*/ break;
+/*N*/
+/*N*/ case SDRUSERCALL_INSERTED:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_INSERTED;
+/*N*/ break;
+/*N*/
+/*N*/ case SDRUSERCALL_REMOVED:
+/*N*/ eChildUserType = SDRUSERCALL_CHILD_REMOVED;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ pGroup->GetUserCall()->Changed( *this, eChildUserType, rBoundRect );
+/*N*/ }
+/*N*/
+/*N*/ if( pGroup->GetObjList() &&
+/*N*/ pGroup->GetObjList()->GetListKind() == SDROBJLIST_GROUPOBJ &&
+/*N*/ pGroup != (SdrObjGroup*) pObjList->GetOwnerObj() )
+/*N*/ pGroup = (SdrObjGroup*) pObjList->GetOwnerObj();
+/*N*/ else
+/*N*/ pGroup = NULL;
+/*N*/ }
+/*N*/ }
+
+// ItemPool fuer dieses Objekt wechseln
+/*N*/ void SdrObject::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
+/*N*/ {
+/*N*/ // Hier passiert erst was in SdrAttrObj und in SdrObjGroup
+/*N*/ }
+
+
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SdrObject::getUnoShape()
+/*N*/ {
+/*N*/ // try weak reference first
+/*N*/ uno::Reference< uno::XInterface > xShape( mxUnoShape );
+/*N*/
+/*N*/ if( !xShape.is() && pPage )
+/*N*/ {
+/*N*/ uno::Reference< uno::XInterface > xPage( pPage->getUnoPage() );
+/*N*/ if( xPage.is() )
+/*N*/ {
+/*N*/ SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation(xPage);
+/*N*/ if( pDrawPage )
+/*N*/ {
+/*N*/ // create one
+/*N*/ xShape = pDrawPage->_CreateShape( this );
+/*N*/ mxUnoShape = xShape;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return xShape;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// transformation interface for StarOfficeAPI. This implements support for
+// homogen 3x3 matrices containing the transformation of the SdrObject. At the
+// moment it contains a shearX, rotation and translation, but for setting all linear
+// transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
+// with the base geometry and returns TRUE. Otherwise it returns FALSE.
+/*N*/ BOOL SdrObject::TRGetBaseGeometry(Matrix3D& rMat, XPolyPolygon& rPolyPolygon) const
+/*N*/ {
+/*N*/ // any kind of SdrObject, just use SnapRect
+/*N*/ Rectangle aRectangle(GetSnapRect());
+/*N*/
+/*N*/ // convert to transformation values
+/*N*/ Vector2D aScale((double)aRectangle.GetWidth(), (double)aRectangle.GetHeight());
+/*N*/ Vector2D aTranslate((double)aRectangle.Left(), (double)aRectangle.Top());
+/*N*/
+/*N*/ // position maybe relative to anchorpos, convert
+/*N*/ if( pModel->IsWriter() )
+/*N*/ {
+/*?*/ if(GetAnchorPos().X() != 0 || GetAnchorPos().Y() != 0)
+/*?*/ aTranslate -= Vector2D(GetAnchorPos().X(), GetAnchorPos().Y());
+/*N*/ }
+
+ // force MapUnit to 100th mm
+/*N*/ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+/*N*/ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+/*N*/ {
+/*N*/ switch(eMapUnit)
+/*N*/ {
+/*?*/ case SFX_MAPUNIT_TWIP :
+/*?*/ {
+/*?*/ // postion
+/*?*/ // #104018#
+/*?*/ aTranslate.X() = ImplTwipsToMM(aTranslate.X());
+/*?*/ aTranslate.Y() = ImplTwipsToMM(aTranslate.Y());
+/*?*/
+/*?*/ // size
+/*?*/ // #104018#
+/*?*/ aScale.X() = ImplTwipsToMM(aScale.X());
+/*?*/ aScale.Y() = ImplTwipsToMM(aScale.Y());
+/*?*/
+/*?*/ break;
+/*?*/ }
+/*?*/ default:
+/*?*/ {
+/*?*/ DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!");
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+ // build matrix
+/*N*/ rMat.Identity();
+/*N*/ if(aScale.X() != 1.0 || aScale.Y() != 1.0)
+/*N*/ rMat.Scale(aScale.X(), aScale.Y());
+/*N*/ if(aTranslate.X() != 0.0 || aTranslate.Y() != 0.0)
+/*N*/ rMat.Translate(aTranslate.X(), aTranslate.Y());
+/*N*/
+/*N*/ return FALSE;
+/*N*/ }
+
+// sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+// If it's an SdrPathObj it will use the provided geometry information. The Polygon has
+// to use (0,0) as upper left and will be scaled to the given size in the matrix.
+/*N*/ void SdrObject::TRSetBaseGeometry(const Matrix3D& rMat, const XPolyPolygon& rPolyPolygon)
+/*N*/ {
+/*N*/ // break up matrix
+/*N*/ Vector2D aScale, aTranslate;
+/*N*/ double fShear, fRotate;
+/*N*/ rMat.DecomposeAndCorrect(aScale, fShear, fRotate, aTranslate);
+/*N*/
+/*N*/ // force metric to pool metric
+/*N*/ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+/*N*/ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+/*N*/ {
+/*N*/ switch(eMapUnit)
+/*?*/ {
+/*?*/ case SFX_MAPUNIT_TWIP :
+/*?*/ {
+/*?*/ // position
+/*?*/ // #104018#
+/*?*/ aTranslate.X() = ImplMMToTwips(aTranslate.X());
+/*?*/ aTranslate.Y() = ImplMMToTwips(aTranslate.Y());
+/*?*/
+/*?*/ // size
+/*?*/ // #104018#
+/*?*/ aScale.X() = ImplMMToTwips(aScale.X());
+/*?*/ aScale.Y() = ImplMMToTwips(aScale.Y());
+/*?*/
+/*?*/ break;
+/*?*/ }
+/*?*/ default:
+/*?*/ {
+/*?*/ DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!");
+/*?*/ }
+/*?*/ }
+/*N*/ }
+
+ // if anchor is used, make position relative to it
+/*N*/ if( pModel->IsWriter() )
+/*N*/ {
+/*?*/ if(GetAnchorPos().X() != 0 || GetAnchorPos().Y() != 0)
+/*?*/ aTranslate -= Vector2D(GetAnchorPos().X(), GetAnchorPos().Y());
+/*N*/ }
+/*N*/
+/*N*/ // build BaseRect
+/*N*/ Point aPoint(FRound(aTranslate.X()), FRound(aTranslate.Y()));
+/*N*/ Rectangle aBaseRect(aPoint, Size(FRound(aScale.X()), FRound(aScale.Y())));
+/*N*/
+/*N*/ // set BaseRect
+/*N*/ SetSnapRect(aBaseRect);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@@@ @@@@@@ @@ @@ @@ @@ @@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@ @@ @@ @@@@ @@ @@@@ @@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObject* SdrObjFactory::MakeNewObject(UINT32 nInvent, UINT16 nIdent, SdrPage* pPage, SdrModel* pModel)
+/*N*/ {
+/*N*/ if(pModel == NULL && pPage != NULL)
+/*N*/ pModel = pPage->GetModel();
+/*N*/ SdrObject* pObj = NULL;
+/*N*/
+/*N*/ if(nInvent == SdrInventor)
+/*N*/ {
+/*N*/ switch (nIdent)
+/*N*/ {
+/*N*/ case USHORT(OBJ_NONE ): pObj=new SdrObject; break;
+/*N*/ case USHORT(OBJ_GRUP ): pObj=new SdrObjGroup; break;
+/*N*/ case USHORT(OBJ_LINE ): pObj=new SdrPathObj(OBJ_LINE ); break;
+/*N*/ case USHORT(OBJ_POLY ): pObj=new SdrPathObj(OBJ_POLY ); break;
+/*N*/ case USHORT(OBJ_PLIN ): pObj=new SdrPathObj(OBJ_PLIN ); break;
+/*N*/ case USHORT(OBJ_PATHLINE ): pObj=new SdrPathObj(OBJ_PATHLINE ); break;
+/*N*/ case USHORT(OBJ_PATHFILL ): pObj=new SdrPathObj(OBJ_PATHFILL ); break;
+/*N*/ case USHORT(OBJ_FREELINE ): pObj=new SdrPathObj(OBJ_FREELINE ); break;
+/*N*/ 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;
+/*N*/ case USHORT(OBJ_EDGE ): pObj=new SdrEdgeObj; break;
+/*N*/ case USHORT(OBJ_RECT ): pObj=new SdrRectObj; break;
+/*N*/ case USHORT(OBJ_CIRC ): pObj=new SdrCircObj(OBJ_CIRC ); break;
+/*N*/ case USHORT(OBJ_SECT ): pObj=new SdrCircObj(OBJ_SECT ); break;
+/*N*/ case USHORT(OBJ_CARC ): pObj=new SdrCircObj(OBJ_CARC ); break;
+/*N*/ case USHORT(OBJ_CCUT ): pObj=new SdrCircObj(OBJ_CCUT ); break;
+/*N*/ case USHORT(OBJ_TEXT ): pObj=new SdrRectObj(OBJ_TEXT ); break;
+/*?*/ case USHORT(OBJ_TEXTEXT ): pObj=new SdrRectObj(OBJ_TEXTEXT ); break;
+/*N*/ case USHORT(OBJ_TITLETEXT ): pObj=new SdrRectObj(OBJ_TITLETEXT ); break;
+/*N*/ case USHORT(OBJ_OUTLINETEXT): pObj=new SdrRectObj(OBJ_OUTLINETEXT); break;
+/*N*/ case USHORT(OBJ_MEASURE ): pObj=new SdrMeasureObj; break;
+/*N*/ case USHORT(OBJ_GRAF ): pObj=new SdrGrafObj; break;
+/*N*/ case USHORT(OBJ_OLE2 ): pObj=new SdrOle2Obj; break;
+/*?*/ case USHORT(OBJ_FRAME ): pObj=new SdrOle2Obj(TRUE); break;
+/*N*/ case USHORT(OBJ_CAPTION ): pObj=new SdrCaptionObj; break;
+/*N*/ case USHORT(OBJ_PAGE ): pObj=new SdrPageObj; break;
+/*?*/ case USHORT(OBJ_UNO ): pObj=new SdrUnoObj(String()); break;
+/*N*/ }
+/*N*/ }
+
+/*N*/ if(pObj == NULL)
+/*N*/ {
+/*N*/ SdrObjFactory* pFact=new SdrObjFactory(nInvent,nIdent,pPage,pModel);
+/*N*/ SdrLinkList& rLL=ImpGetUserMakeObjHdl();
+/*N*/ unsigned nAnz=rLL.GetLinkCount();
+/*N*/ unsigned i=0;
+/*N*/ while (i<nAnz && pObj==NULL) {
+/*N*/ rLL.GetLink(i).Call((void*)pFact);
+/*N*/ pObj=pFact->pNewObj;
+/*N*/ i++;
+/*N*/ }
+/*N*/ delete pFact;
+/*N*/ }
+/*N*/
+/*N*/ if(pObj == NULL)
+/*N*/ {
+/*N*/ // Na wenn's denn keiner will ...
+/*N*/ }
+/*N*/
+/*N*/ if(pObj != NULL)
+/*N*/ {
+/*N*/ if(pPage != NULL)
+/*N*/ pObj->SetPage(pPage);
+/*N*/ else if(pModel != NULL)
+/*?*/ pObj->SetModel(pModel);
+/*N*/ }
+/*N*/
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ SdrObjUserData* SdrObjFactory::MakeNewObjUserData(UINT32 nInvent, UINT16 nIdent, SdrObject* pObj1)
+/*N*/ {
+/*N*/ SdrObjUserData* pData=NULL;
+/*N*/ if (nInvent==SdrInventor) {
+/*N*/ switch (nIdent) {
+/*?*/ case USHORT(SDRUSERDATA_OBJGROUPLINK): pData=new ImpSdrObjGroupLinkUserData(pObj1); break;
+/*?*/ case USHORT(SDRUSERDATA_OBJTEXTLINK) : pData=new ImpSdrObjTextLinkUserData((SdrTextObj*)pObj1); break;
+/*N*/ }
+/*N*/ }
+/*N*/ if (pData==NULL) {
+/*N*/ SdrObjFactory aFact(nInvent,nIdent,pObj1);
+/*N*/ SdrLinkList& rLL=ImpGetUserMakeObjUserDataHdl();
+/*N*/ unsigned nAnz=rLL.GetLinkCount();
+/*N*/ unsigned i=0;
+/*N*/ while (i<nAnz && pData==NULL) {
+/*N*/ rLL.GetLink(i).Call((void*)&aFact);
+/*N*/ pData=aFact.pNewData;
+/*N*/ i++;
+/*N*/ }
+/*N*/ }
+/*N*/ return pData;
+/*N*/ }
+
+/*N*/ void SdrObjFactory::InsertMakeObjectHdl(const Link& rLink)
+/*N*/ {
+/*N*/ SdrLinkList& rLL=ImpGetUserMakeObjHdl();
+/*N*/ rLL.InsertLink(rLink);
+/*N*/ }
+
+/*N*/ void SdrObjFactory::RemoveMakeObjectHdl(const Link& rLink)
+/*N*/ {
+/*N*/ SdrLinkList& rLL=ImpGetUserMakeObjHdl();
+/*N*/ rLL.RemoveLink(rLink);
+/*N*/ }
+
+/*N*/ void SdrObjFactory::InsertMakeUserDataHdl(const Link& rLink)
+/*N*/ {
+/*N*/ SdrLinkList& rLL=ImpGetUserMakeObjUserDataHdl();
+/*N*/ rLL.InsertLink(rLink);
+/*N*/ }
+
+/*N*/ void SdrObjFactory::RemoveMakeUserDataHdl(const Link& rLink)
+/*N*/ {
+/*N*/ SdrLinkList& rLL=ImpGetUserMakeObjUserDataHdl();
+/*N*/ rLL.RemoveLink(rLink);
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdocapt.cxx b/binfilter/bf_svx/source/svdraw/svx_svdocapt.cxx
new file mode 100644
index 000000000000..e95f62029831
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdocapt.cxx
@@ -0,0 +1,543 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/bigint.hxx>
+
+
+#include <bf_svtools/style.hxx>
+
+#include "svdocapt.hxx"
+#include "svdattrx.hxx"
+#include "svdpool.hxx"
+#include "svdio.hxx"
+#include "svdstr.hrc" // Objektname
+
+
+
+
+#include "eeitem.hxx"
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ enum EscDir {LKS,RTS,OBN,UNT};
+
+/*N*/ class ImpCaptParams
+/*N*/ {
+/*N*/ public:
+/*N*/ SdrCaptionType eType;
+/*N*/ long nAngle;
+/*N*/ long nGap;
+/*N*/ long nEscRel;
+/*N*/ long nEscAbs;
+/*N*/ long nLineLen;
+/*N*/ SdrCaptionEscDir eEscDir;
+/*N*/ FASTBOOL bFitLineLen;
+/*N*/ FASTBOOL bEscRel;
+/*N*/ FASTBOOL bFixedAngle;
+/*N*/
+/*N*/ public:
+/*N*/ ImpCaptParams()
+/*N*/ {
+/*N*/ eType =SDRCAPT_TYPE3;
+/*N*/ bFixedAngle=FALSE;
+/*N*/ nAngle =4500;
+/*N*/ nGap =0;
+/*N*/ eEscDir =SDRCAPT_ESCHORIZONTAL;
+/*N*/ bEscRel =TRUE;
+/*N*/ nEscRel =5000;
+/*N*/ nEscAbs =0;
+/*N*/ nLineLen =0;
+/*N*/ bFitLineLen=TRUE;
+/*N*/ }
+/*N*/ void CalcEscPos(const Point& rTail, const Rectangle& rRect, Point& rPt, EscDir& rDir) const;
+/*N*/ };
+
+/*N*/ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Point& rPt, EscDir& rDir) const
+/*N*/ {
+/*N*/ Point aTl(rTailPt); // lokal kopieren wg. Performance
+/*N*/ long nX,nY;
+/*N*/ if (bEscRel) {
+/*N*/ nX=rRect.Right()-rRect.Left();
+/*N*/ nX=BigMulDiv(nX,nEscRel,10000);
+/*N*/ nY=rRect.Bottom()-rRect.Top();
+/*N*/ nY=BigMulDiv(nY,nEscRel,10000);
+/*N*/ } else {
+/*N*/ nX=nEscAbs;
+/*N*/ nY=nEscAbs;
+/*N*/ }
+/*N*/ nX+=rRect.Left();
+/*N*/ nY+=rRect.Top();
+/*N*/ Point aBestPt;
+/*N*/ EscDir eBestDir=LKS;
+/*N*/ FASTBOOL bTryH=eEscDir==SDRCAPT_ESCBESTFIT;
+/*N*/ if (!bTryH) {
+/*N*/ if (eType!=SDRCAPT_TYPE1) {
+/*N*/ bTryH=eEscDir==SDRCAPT_ESCHORIZONTAL;
+/*N*/ } else {
+/*N*/ bTryH=eEscDir==SDRCAPT_ESCVERTICAL;
+/*N*/ }
+/*N*/ }
+/*N*/ FASTBOOL bTryV=eEscDir==SDRCAPT_ESCBESTFIT;
+/*N*/ if (!bTryV) {
+/*N*/ if (eType!=SDRCAPT_TYPE1) {
+/*N*/ bTryV=eEscDir==SDRCAPT_ESCVERTICAL;
+/*N*/ } else {
+/*N*/ bTryV=eEscDir==SDRCAPT_ESCHORIZONTAL;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (bTryH) {
+/*N*/ Point aLft(rRect.Left()-nGap,nY);
+/*N*/ Point aRgt(rRect.Right()+nGap,nY);
+/*N*/ FASTBOOL bLft=(aTl.X()-aLft.X()<aRgt.X()-aTl.X());
+/*N*/ if (bLft) {
+/*N*/ eBestDir=LKS;
+/*N*/ aBestPt=aLft;
+/*N*/ } else {
+/*N*/ eBestDir=RTS;
+/*N*/ aBestPt=aRgt;
+/*N*/ }
+/*N*/ }
+/*N*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ rPt=aBestPt;
+/*N*/ rDir=eBestDir;
+/*N*/ }
+
+/*N*/ TYPEINIT1(SdrCaptionObj,SdrRectObj);
+
+/*N*/ SdrCaptionObj::SdrCaptionObj():
+/*N*/ SdrRectObj(OBJ_TEXT),
+/*N*/ aTailPoly(3), // Default Groesse: 3 Punkte = 2 Linien
+/*N*/ mbSpecialTextBoxShadow(FALSE)
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrCaptionObj::~SdrCaptionObj()
+/*N*/ {
+/*N*/ }
+
+
+
+/*N*/ UINT16 SdrCaptionObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16(OBJ_CAPTION);
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::RecalcBoundRect()
+/*N*/ {
+/*N*/ aOutRect=GetSnapRect();
+/*N*/ long nLineWdt=ImpGetLineWdt();
+/*N*/ nLineWdt++; nLineWdt/=2;
+/*N*/ long nLEndWdt=ImpGetLineEndAdd();
+/*N*/ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+/*N*/ if (nLineWdt!=0) {
+/*N*/ aOutRect.Left ()-=nLineWdt;
+/*N*/ aOutRect.Top ()-=nLineWdt;
+/*N*/ aOutRect.Right ()+=nLineWdt;
+/*N*/ aOutRect.Bottom()+=nLineWdt;
+/*N*/ }
+/*N*/ ImpAddShadowToBoundRect();
+/*N*/ ImpAddTextToBoundRect();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrCaptionObj::ImpGetCaptParams(ImpCaptParams& rPara) const
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ rPara.eType =((SdrCaptionTypeItem&) (rSet.Get(SDRATTR_CAPTIONTYPE ))).GetValue();
+/*N*/ rPara.bFixedAngle=((SdrCaptionFixedAngleItem&)(rSet.Get(SDRATTR_CAPTIONANGLE ))).GetValue();
+/*N*/ rPara.nAngle =((SdrCaptionAngleItem&) (rSet.Get(SDRATTR_CAPTIONFIXEDANGLE))).GetValue();
+/*N*/ rPara.nGap =((SdrCaptionGapItem&) (rSet.Get(SDRATTR_CAPTIONGAP ))).GetValue();
+/*N*/ rPara.eEscDir =((SdrCaptionEscDirItem&) (rSet.Get(SDRATTR_CAPTIONESCDIR ))).GetValue();
+/*N*/ rPara.bEscRel =((SdrCaptionEscIsRelItem&) (rSet.Get(SDRATTR_CAPTIONESCISREL ))).GetValue();
+/*N*/ rPara.nEscRel =((SdrCaptionEscRelItem&) (rSet.Get(SDRATTR_CAPTIONESCREL ))).GetValue();
+/*N*/ rPara.nEscAbs =((SdrCaptionEscAbsItem&) (rSet.Get(SDRATTR_CAPTIONESCABS ))).GetValue();
+/*N*/ rPara.nLineLen =((SdrCaptionLineLenItem&) (rSet.Get(SDRATTR_CAPTIONLINELEN ))).GetValue();
+/*N*/ rPara.bFitLineLen=((SdrCaptionFitLineLenItem&)(rSet.Get(SDRATTR_CAPTIONFITLINELEN))).GetValue();
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::ImpRecalcTail()
+/*N*/ {
+/*N*/ ImpCaptParams aPara;
+/*N*/ ImpGetCaptParams(aPara);
+/*N*/ ImpCalcTail(aPara,aTailPoly,aRect);
+/*N*/ SetRectsDirty();
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+
+
+/*N*/ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+/*N*/ { // Gap/EscDir/EscPos/Angle/LineLen
+/*N*/ Polygon aPol(3);
+/*N*/ Point aTl(rPoly[0]);
+/*N*/ aPol[0]=aTl;
+/*N*/
+/*N*/ EscDir eEscDir;
+/*N*/ Point aEscPos;
+/*N*/ rPara.CalcEscPos(aTl,rRect,aEscPos,eEscDir);
+/*N*/ aPol[1]=aEscPos;
+/*N*/ aPol[2]=aEscPos;
+/*N*/
+/*N*/ if (eEscDir==LKS || eEscDir==RTS) {
+/*N*/ if (rPara.bFitLineLen) {
+/*N*/ aPol[1].X()=(aTl.X()+aEscPos.X())/2;
+/*N*/ } else {
+/*N*/ if (eEscDir==LKS) aPol[1].X()-=rPara.nLineLen;
+/*N*/ else aPol[1].X()+=rPara.nLineLen;
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (rPara.bFitLineLen) {
+/*N*/ aPol[1].Y()=(aTl.Y()+aEscPos.Y())/2;
+/*N*/ } else {
+/*N*/ if (eEscDir==OBN) aPol[1].Y()-=rPara.nLineLen;
+/*N*/ else aPol[1].Y()+=rPara.nLineLen;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!rPara.bFixedAngle) {
+/*N*/ // fehlende Implementation
+/*N*/ }
+/*N*/ rPoly=aPol;
+/*N*/ }
+
+
+/*N*/ void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+/*N*/ {
+/*N*/ switch (rPara.eType) {
+/*?*/ case SDRCAPT_TYPE1: DBG_BF_ASSERT(0, "STRIP"); break;//STRIP001 ImpCalcTail1(rPara,rPoly,rRect); break;
+/*?*/ case SDRCAPT_TYPE2: DBG_BF_ASSERT(0, "STRIP"); break;//STRIP001 ImpCalcTail2(rPara,rPoly,rRect); break;
+/*N*/ case SDRCAPT_TYPE3: ImpCalcTail3(rPara,rPoly,rRect); break;
+/*?*/ case SDRCAPT_TYPE4: DBG_BF_ASSERT(0, "STRIP"); break;//STRIP001 ImpCalcTail4(rPara,rPoly,rRect); break;
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+/*N*/ void SdrCaptionObj::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ SdrRectObj::NbcMove(rSiz);
+/*N*/ MovePoly(aTailPoly,rSiz);
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrRectObj::NbcResize(rRef,xFact,yFact);
+/*N*/ ResizePoly(aTailPoly,rRef,xFact,yFact);
+/*N*/ ImpRecalcTail();
+/*N*/ }
+
+
+
+/*N*/ void SdrCaptionObj::NbcSetAnchorPos(const Point& rPnt)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetAnchorPos(rPnt);
+/*N*/ // !!!!! fehlende Impl.
+/*N*/ }
+
+/*N*/ const Point& SdrCaptionObj::GetAnchorPos() const
+/*N*/ {
+/*N*/ // !!!!! fehlende Impl.
+/*N*/ return SdrRectObj::GetAnchorPos();
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ SdrRectObj::RecalcSnapRect();
+/*N*/ maSnapRect.Union(aTailPoly.GetBoundRect());
+/*N*/ // !!!!! fehlende Impl.
+/*N*/ }
+
+/*N*/ const Rectangle& SdrCaptionObj::GetSnapRect() const
+/*N*/ {
+/*N*/ return SdrRectObj::GetSnapRect();
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ // #109587#
+/*N*/ //
+/*N*/ // The new SnapRect contains the tail BoundRect, see
+/*N*/ // RecalcSnapRect() above. Thus, the new to-be-setted
+/*N*/ // SnapRect needs to be 'cleared' from that tail offsets
+/*N*/ // before setting it as new SnapRect at the SdrRectObj.
+/*N*/ //
+/*N*/ // As base for 'clearing' the old text rect is taken from aRect
+/*N*/ // using GetLogicRect(), see below. Second the outer tail point
+/*N*/ // wich expanded that rect. Since the other end of the
+/*N*/ // connection polygon always resides at one edge of the text rect
+/*N*/ // this is sufficient information.
+/*N*/ Rectangle aNewSnapRect(rRect);
+/*N*/ const Rectangle aOriginalTextRect(GetLogicRect());
+/*N*/ const Point aTailPoint = GetTailPos();
+/*N*/
+/*N*/ // #109992#
+/*N*/ // This compares only make sense when aOriginalTextRect and the
+/*N*/ // aTailPoint contain useful data. Thus, test it before usage.
+/*N*/ if(!aOriginalTextRect.IsEmpty())
+/*N*/ {
+/*N*/ if(aTailPoint.X() < aOriginalTextRect.Left())
+/*N*/ {
+/*N*/ const sal_Int32 nDist = aOriginalTextRect.Left() - aTailPoint.X();
+/*N*/ aNewSnapRect.Left() = aNewSnapRect.Left() + nDist;
+/*N*/ }
+/*N*/ else if(aTailPoint.X() > aOriginalTextRect.Right())
+/*N*/ {
+/*N*/ const sal_Int32 nDist = aTailPoint.X() - aOriginalTextRect.Right();
+/*N*/ aNewSnapRect.Right() = aNewSnapRect.Right() - nDist;
+/*N*/ }
+/*N*/
+/*N*/ if(aTailPoint.Y() < aOriginalTextRect.Top())
+/*N*/ {
+/*N*/ const sal_Int32 nDist = aOriginalTextRect.Top() - aTailPoint.Y();
+/*N*/ aNewSnapRect.Top() = aNewSnapRect.Top() + nDist;
+/*N*/ }
+/*N*/ else if(aTailPoint.Y() > aOriginalTextRect.Bottom())
+/*N*/ {
+/*N*/ const sal_Int32 nDist = aTailPoint.Y() - aOriginalTextRect.Bottom();
+/*N*/ aNewSnapRect.Bottom() = aNewSnapRect.Bottom() - nDist;
+/*N*/ }
+/*N*/
+/*N*/ // make sure rectangle is correctly defined
+/*N*/ ImpJustifyRect(aNewSnapRect);
+/*N*/
+/*N*/ // #86616#
+/*N*/ SdrRectObj::NbcSetSnapRect(aNewSnapRect);
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ const Point& SdrCaptionObj::GetTailPos() const
+/*N*/ {
+/*N*/ return aTailPoly[0];
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::SetTailPos(const Point& rPos)
+/*N*/ {
+/*N*/ if (aTailPoly.GetSize()==0 || aTailPoly[0]!=rPos) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetTailPos(rPos);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrCaptionObj::NbcSetTailPos(const Point& rPos)
+/*N*/ {
+/*N*/ aTailPoly[0]=rPos;
+/*N*/ ImpRecalcTail();
+/*N*/ }
+
+
+
+/*N*/ void SdrCaptionObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrRectObj::SetModel(pNewModel);
+/*N*/ ImpRecalcTail();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ SfxItemSet* SdrCaptionObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+/*N*/
+/*N*/ // caption attributes
+/*N*/ SDRATTR_CAPTION_FIRST, SDRATTRSET_CAPTION,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+/*N*/ void SdrCaptionObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // local changes
+/*N*/ ImpRecalcTail();
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrRectObj::ItemSetChanged(rSet);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrCaptionObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ ImpRecalcTail();
+/*N*/ }
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*?*/ void SdrCaptionObj::PreSave()
+/*?*/ {
+/*?*/ // call parent
+/*?*/ SdrRectObj::PreSave();
+/*?*/
+/*?*/ // prepare SetItems for storage
+/*?*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*?*/ const SfxItemSet* pParent = GetStyleSheet() ? &GetStyleSheet()->GetItemSet() : 0L;
+/*?*/ SdrCaptionSetItem aCaptAttr(rSet.GetPool());
+/*?*/ aCaptAttr.GetItemSet().Put(rSet);
+/*?*/ aCaptAttr.GetItemSet().SetParent(pParent);
+/*?*/ mpObjectItemSet->Put(aCaptAttr);
+/*?*/ }
+
+/*?*/ void SdrCaptionObj::PostSave()
+/*?*/ {
+/*?*/ // call parent
+/*?*/ SdrRectObj::PostSave();
+/*?*/
+/*?*/ // remove SetItems from local itemset
+/*?*/ mpObjectItemSet->ClearItem(SDRATTRSET_CAPTION);
+/*?*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*?*/ 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)
+/*?*/ {
+/*?*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*?*/
+/*?*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_CAPTION));
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ rOut << UINT16(SFX_ITEMS_NULL);
+/*?*/ }
+/*?*/ }
+
+/*N*/ void SdrCaptionObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if(rIn.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ SdrRectObj::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrCaptionObj");
+/*N*/ #endif
+/*N*/
+/*N*/ rIn >> aTailPoly;
+/*N*/
+/*N*/ if(rHead.GetVersion() < 11) { sal_uInt16 nWhichDum; rIn >> nWhichDum; } // ab V11 keine WhichId mehr
+/*N*/
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ sal_uInt16 nSetID = SDRATTRSET_CAPTION;
+/*N*/ const SdrCaptionSetItem* pCaptAttr = (const SdrCaptionSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pCaptAttr)
+/*N*/ SetItemSet(pCaptAttr->GetItemSet());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nSuroDum;
+/*N*/ rIn >> nSuroDum;
+/*N*/ }
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdocirc.cxx b/binfilter/bf_svx/source/svdraw/svx_svdocirc.cxx
new file mode 100644
index 000000000000..d8382ec524c1
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdocirc.cxx
@@ -0,0 +1,907 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <bf_svtools/style.hxx>
+
+
+#include <xlnwtit.hxx>
+
+#include <xlnedwit.hxx>
+
+#include <xlnstwit.hxx>
+
+#include <xlnstit.hxx>
+
+#include <xlnedit.hxx>
+
+#include "svdocirc.hxx"
+#include <math.h>
+#include "svdpool.hxx"
+#include "svdattrx.hxx"
+#include "svdio.hxx"
+#include "svdstr.hrc" // Objektname
+
+#include "eeitem.hxx"
+
+#include "rectenum.hxx"
+
+#include "svdoimp.hxx"
+
+#include "xoutx.hxx"
+
+namespace binfilter {
+
+/*N*/ void SetWinkPnt(const Rectangle& rR, long nWink, Point& rPnt)
+/*N*/ {
+/*N*/ Point aCenter(rR.Center());
+/*N*/ long nWdt=rR.Right()-rR.Left();
+/*N*/ long nHgt=rR.Bottom()-rR.Top();
+/*N*/ long nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2;
+/*N*/ double a;
+/*N*/ a=nWink*nPi180;
+/*N*/ rPnt=Point(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad));
+/*N*/ if (nWdt==0) rPnt.X()=0;
+/*N*/ if (nHgt==0) rPnt.Y()=0;
+/*N*/ if (nWdt!=nHgt) {
+/*N*/ if (nWdt>nHgt) {
+/*N*/ if (nWdt!=0) {
+/*N*/ // eventuelle Ueberlaeufe bei sehr grossen Objekten abfangen (Bug 23384)
+/*N*/ if (Abs(nHgt)>32767 || Abs(rPnt.Y())>32767) {
+/*N*/ rPnt.Y()=BigMulDiv(rPnt.Y(),nHgt,nWdt);
+/*N*/ } else {
+/*N*/ rPnt.Y()=rPnt.Y()*nHgt/nWdt;
+/*N*/ }
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (nHgt!=0) {
+/*N*/ // eventuelle Ueberlaeufe bei sehr grossen Objekten abfangen (Bug 23384)
+/*N*/ if (Abs(nWdt)>32767 || Abs(rPnt.X())>32767) {
+/*N*/ rPnt.X()=BigMulDiv(rPnt.X(),nWdt,nHgt);
+/*N*/ } else {
+/*N*/ rPnt.X()=rPnt.X()*nWdt/nHgt;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ rPnt+=aCenter;
+/*N*/ }
+
+/*N*/ TYPEINIT1(SdrCircObj,SdrRectObj);
+
+/*N*/ SdrCircObj::SdrCircObj(SdrObjKind eNewKind)
+/*N*/ {
+/*N*/ nStartWink=0;
+/*N*/ nEndWink=36000;
+/*N*/ eKind=eNewKind;
+/*N*/ bClosedObj=eNewKind!=OBJ_CARC;
+/*N*/ }
+
+/*N*/ SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect):
+/*N*/ SdrRectObj(rRect)
+/*N*/ {
+/*N*/ nStartWink=0;
+/*N*/ nEndWink=36000;
+/*N*/ eKind=eNewKind;
+/*N*/ bClosedObj=eNewKind!=OBJ_CARC;
+/*N*/ }
+
+/*N*/ SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink):
+/*N*/ SdrRectObj(rRect)
+/*N*/ {
+/*N*/ long nWinkDif=nNewEndWink-nNewStartWink;
+/*N*/ nStartWink=NormAngle360(nNewStartWink);
+/*N*/ nEndWink=NormAngle360(nNewEndWink);
+/*N*/ if (nWinkDif==36000) nEndWink+=nWinkDif; // Vollkreis
+/*N*/ eKind=eNewKind;
+/*N*/ bClosedObj=eNewKind!=OBJ_CARC;
+/*N*/ }
+/*N*/
+/*N*/ SdrCircObj::~SdrCircObj()
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ UINT16 SdrCircObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16(eKind);
+/*N*/ }
+
+/*N*/ FASTBOOL SdrCircObj::PaintNeedsXPoly() const
+/*N*/ {
+/*N*/ // XPoly ist notwendig fuer alle gedrehten Ellipsenobjekte,
+/*N*/ // fuer alle Kreis- und Ellipsenabschnitte
+/*N*/ // und wenn nicht WIN dann (erstmal) auch fuer Kreis-/Ellipsenausschnitte
+/*N*/ // und Kreis-/Ellipsenboegen (wg. Genauigkeit)
+/*N*/ FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || eKind==OBJ_CCUT;
+/*N*/ #ifndef WIN
+/*N*/ // Wenn nicht Win, dann fuer alle ausser Vollkreis (erstmal!!!)
+/*N*/ if (eKind!=OBJ_CIRC) bNeed=TRUE;
+/*N*/ #endif
+/*N*/
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ if(!bNeed)
+/*N*/ {
+/*N*/ // XPoly ist notwendig fuer alles was nicht LineSolid oder LineNone ist
+/*N*/ XLineStyle eLine = ((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+/*N*/ bNeed = eLine != XLINE_NONE && eLine != XLINE_SOLID;
+/*N*/
+/*N*/ // XPoly ist notwendig fuer dicke Linien
+/*N*/ if(!bNeed && eLine != XLINE_NONE)
+/*N*/ bNeed = ((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue() != 0;
+/*N*/
+/*N*/ // XPoly ist notwendig fuer Kreisboegen mit Linienenden
+/*N*/ if(!bNeed && eKind == OBJ_CARC)
+/*N*/ {
+/*N*/ // 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;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // XPoly ist notwendig, wenn Fill !=None und !=Solid
+/*N*/ if(!bNeed && eKind != OBJ_CARC)
+/*N*/ {
+/*N*/ XFillStyle eFill=((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue();
+/*N*/ bNeed = eFill != XFILL_NONE && eFill != XFILL_SOLID;
+/*N*/ }
+/*N*/
+/*N*/ if(!bNeed && eKind != OBJ_CIRC && nStartWink == nEndWink)
+/*N*/ bNeed=TRUE; // Weil sonst Vollkreis gemalt wird
+/*N*/
+/*N*/ return bNeed;
+/*N*/ }
+
+/*N*/ XPolygon SdrCircObj::ImpCalcXPoly(const Rectangle& rRect1, long nStart, long nEnd, FASTBOOL bContour) const
+/*N*/ {
+/*N*/ bContour=TRUE; // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+/*N*/ long rx=rRect1.GetWidth()/2; // Da GetWidth()/GetHeight() jeweils 1
+/*N*/ long ry=rRect1.GetHeight()/2; // draufaddieren wird korrekt gerundet.
+/*N*/ long a=0,e=3600;
+/*N*/ if (eKind!=OBJ_CIRC) {
+/*N*/ a=nStart/10;
+/*N*/ e=nEnd/10;
+/*N*/ if (bContour) {
+/*N*/ // Drehrichtung umkehren, damit Richtungssinn genauso wie Rechteck
+/*N*/ rx=-rx;
+/*N*/ a=1800-a; if (a<0) a+=3600;
+/*N*/ e=1800-e; if (e<0) e+=3600;
+/*N*/ long nTmp=a;
+/*N*/ a=e;
+/*N*/ e=nTmp;
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (bContour) {
+/*N*/ long nTmp=rx;
+/*N*/ rx=ry;
+/*N*/ ry=nTmp;
+/*N*/ // und auch noch die Drehrichtung aendern
+/*N*/ ry=-ry;
+/*N*/ }
+/*N*/ }
+/*N*/ ((SdrCircObj*)this)->bXPolyIsLine=eKind==OBJ_CARC;
+/*N*/ FASTBOOL bClose=eKind==OBJ_CIRC /*|| eKind==OBJ_SECT*/;
+/*N*/ XPolygon aXPoly(rRect1.Center(),rx,ry,USHORT(a),USHORT(e),bClose);
+/*N*/ 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();
+/*?*/ }
+/*N*/ }
+/*N*/ if (eKind==OBJ_SECT) { // Der Sektor soll Start/Ende im Zentrum haben
+/*N*/ // Polygon um einen Punkt rotieren (Punkte im Array verschieben)
+/*N*/ unsigned nPointAnz=aXPoly.GetPointCount();
+/*N*/ aXPoly.Insert(0,rRect1.Center(),XPOLY_NORMAL);
+/*N*/ aXPoly[aXPoly.GetPointCount()]=rRect1.Center();
+/*N*/ }
+/*N*/ // Der Kreis soll Anfang und Ende im unteren Scheitelpunkt haben!
+/*N*/ if (bContour && eKind==OBJ_CIRC) RotateXPoly(aXPoly,rRect1.Center(),-1.0,0.0);
+/*N*/ // Die Winkelangaben beziehen sich immer auf die linke obere Ecke von !aRect!
+/*N*/ if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan);
+/*N*/ if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ return aXPoly;
+/*N*/ }
+
+/*N*/ void SdrCircObj::RecalcXPoly()
+/*N*/ {
+/*N*/ pXPoly=new XPolygon(ImpCalcXPoly(aRect,nStartWink,nEndWink));
+/*N*/ }
+
+/*N*/ void SdrCircObj::RecalcBoundRect()
+/*N*/ {
+/*N*/ SetWinkPnt(aRect,nStartWink,aPnt1);
+/*N*/ SetWinkPnt(aRect,nEndWink,aPnt2);
+/*N*/ bBoundRectDirty=FALSE;
+/*N*/ aOutRect=GetSnapRect();
+/*N*/ long nLineWdt=ImpGetLineWdt();
+/*N*/ nLineWdt++; nLineWdt/=2;
+/*N*/ if (nLineWdt!=0) {
+/*N*/ long nWink=nEndWink-nStartWink;
+/*N*/ if (nWink<0) nWink+=36000;
+/*N*/ if (eKind==OBJ_SECT && nWink<18000) nLineWdt*=2; // doppelt, wegen evtl. spitzen Ecken
+/*N*/ if (eKind==OBJ_CCUT && nWink<18000) nLineWdt*=2; // doppelt, wegen evtl. spitzen Ecken
+/*N*/ }
+/*N*/ if (eKind==OBJ_CARC) { // ggf. Linienenden beruecksichtigen
+/*N*/ long nLEndWdt=ImpGetLineEndAdd();
+/*N*/ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+/*N*/ }
+/*N*/ if (nLineWdt!=0) {
+/*N*/ aOutRect.Left ()-=nLineWdt;
+/*N*/ aOutRect.Top ()-=nLineWdt;
+/*N*/ aOutRect.Right ()+=nLineWdt;
+/*N*/ aOutRect.Bottom()+=nLineWdt;
+/*N*/ }
+/*N*/ ImpAddShadowToBoundRect();
+/*N*/ ImpAddTextToBoundRect();
+/*N*/ }
+
+/*N*/ FASTBOOL SdrCircObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+/*N*/ {
+/*N*/ // Hidden objects on masterpages, draw nothing
+/*N*/ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+/*N*/ return TRUE;
+/*N*/
+/*N*/ BOOL bHideContour(IsHideContour());
+/*N*/ BOOL bIsLineDraft(0 != (rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTLINE));
+/*N*/ BOOL bIsFillDraft(0 != (rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTFILL));
+/*N*/
+/*N*/ // prepare ItemSet of this object
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/
+/*N*/ // perepare ItemSet to avoid old XOut line drawing
+/*N*/ SfxItemSet aEmptySet(*rSet.GetPool());
+/*N*/ aEmptySet.Put(XLineStyleItem(XLINE_NONE));
+/*N*/ aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+/*N*/
+/*N*/ // #103692# prepare ItemSet for shadow fill attributes
+/*N*/ SfxItemSet aShadowSet(rSet);
+/*N*/
+/*N*/ // prepare line geometry
+/*N*/ ::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
+/*N*/
+/*N*/ // Shadows
+/*N*/ if(!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
+/*N*/ {
+/*?*/ if( eKind==OBJ_CARC || bIsFillDraft )
+/*?*/ rXOut.SetFillAttr(aEmptySet);
+/*?*/ else
+/*?*/ rXOut.SetFillAttr(aShadowSet);
+/*?*/
+/*?*/ UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+/*?*/ UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+/*?*/
+/*?*/ // avoid shadow line drawing in XOut
+/*?*/ rXOut.SetLineAttr(aEmptySet);
+/*?*/
+/*?*/ if (PaintNeedsXPoly())
+/*?*/ {
+/*?*/ if( !bXPolyIsLine )
+/*?*/ {
+/*?*/ XPolygon aX(GetXPoly()); // In dieser Reihenfolge, damit bXPolyIsLine gueltig ist.
+/*?*/ aX.Move(nXDist,nYDist);
+/*?*/
+/*?*/ // #100127# Output original geometry for metafiles
+/*?*/ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
+/*?*/
+/*?*/ rXOut.DrawXPolygon(aX);
+/*?*/ }
+/*?*/ } else {
+/*?*/ // #100127# Output original geometry for metafiles
+/*?*/ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
+/*?*/
+/*?*/ 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.get() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ // draw the line geometry
+/*?*/ }
+/*N*/ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+/*N*/ rXOut.SetLineAttr(aEmptySet);
+/*N*/
+/*N*/ rXOut.SetFillAttr( bIsFillDraft ? aEmptySet : rSet );
+/*N*/
+/*N*/ if (!bHideContour) {
+/*N*/ if (PaintNeedsXPoly())
+/*N*/ {
+/*?*/ if( !bXPolyIsLine )
+/*?*/ {
+/*?*/ const XPolygon& rXP=GetXPoly(); // In dieser Reihenfolge, damit bXPolyIsLine gueltig ist.
+/*?*/
+/*?*/ // #100127# Output original geometry for metafiles
+/*?*/ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft ? aEmptySet : rSet );
+/*?*/
+/*?*/ rXOut.DrawXPolygon(rXP);
+/*N*/ }
+/*N*/ } else {
+/*N*/ // #100127# Output original geometry for metafiles
+/*N*/ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft ? aEmptySet : rSet );
+/*N*/
+/*N*/ if (eKind==OBJ_CIRC) {
+/*N*/ rXOut.DrawEllipse(aRect);
+/*N*/ } 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;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+ // Own line drawing
+/*N*/ if(!bHideContour && pLineGeometry.get() )
+/*N*/ {
+/*N*/ // draw the line geometry
+/*N*/ ImpDrawColorLineGeometry(rXOut, rSet, *pLineGeometry);
+/*N*/ }
+/*N*/
+/*N*/ FASTBOOL bOk=TRUE;
+/*N*/ if (HasText()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/
+/*N*/ return bOk;
+/*N*/ }
+
+
+
+
+/*N*/ void SdrCircObj::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ SdrRectObj::operator=(rObj);
+/*N*/
+/*N*/ nStartWink = ((SdrCircObj&)rObj).nStartWink;
+/*N*/ nEndWink = ((SdrCircObj&)rObj).nEndWink;
+/*N*/ aPnt1 = ((SdrCircObj&)rObj).aPnt1;
+/*N*/ aPnt2 = ((SdrCircObj&)rObj).aPnt2;
+/*N*/ }
+
+/*N*/ void SdrCircObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+/*N*/ {
+/*N*/ XPolygon aP(ImpCalcXPoly(aRect,nStartWink,nEndWink));
+/*N*/ if (!bXPolyIsLine) { // Polygon schliessen
+/*N*/ USHORT n=aP.GetPointCount();
+/*N*/ Point aPnt(aP[0]);
+/*N*/ aP[n]=aPnt;
+/*N*/ }
+/*N*/ rPoly=XPolyPolygon(aP);
+/*N*/ }
+
+/*N*/ void SdrCircObj::TakeContour(XPolyPolygon& rPoly) const
+/*N*/ {
+/*N*/ // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+/*N*/ SdrRectObj::TakeContour(rPoly);
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrCircObj::NbcMove(const Size& aSiz)
+/*N*/ {
+/*N*/ MoveRect(aRect,aSiz);
+/*N*/ MoveRect(aOutRect,aSiz);
+/*N*/ MoveRect(maSnapRect,aSiz);
+/*N*/ MovePoint(aPnt1,aSiz);
+/*N*/ MovePoint(aPnt2,aSiz);
+/*N*/ SetXPolyDirty();
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ }
+
+/*N*/ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ long nWink0=aGeo.nDrehWink;
+/*N*/ FASTBOOL bNoShearRota=(aGeo.nDrehWink==0 && aGeo.nShearWink==0);
+/*N*/ SdrTextObj::NbcResize(rRef,xFact,yFact);
+/*N*/ bNoShearRota|=(aGeo.nDrehWink==0 && aGeo.nShearWink==0);
+/*N*/ if (eKind!=OBJ_CIRC) {
+/*N*/ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+/*N*/ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+/*N*/ if (bXMirr || bYMirr) {
+/*N*/ // bei bXMirr!=bYMirr muessten eigentlich noch die beiden
+/*N*/ // Linienende vertauscht werden. Das ist jedoch mal wieder
+/*N*/ // schlecht (wg. zwangslaeufiger harter Formatierung).
+/*N*/ // Alternativ koennte ein bMirrored-Flag eingefuehrt werden
+/*N*/ // (Vielleicht ja mal grundsaetzlich, auch fuer gepiegelten Text, ...).
+/*N*/ long nS0=nStartWink;
+/*N*/ long nE0=nEndWink;
+/*N*/ if (bNoShearRota) {
+/*N*/ // Das RectObj spiegelt bei VMirror bereits durch durch 180deg Drehung.
+/*N*/ if (! (bXMirr && bYMirr)) {
+/*N*/ long nTmp=nS0;
+/*N*/ nS0=18000-nE0;
+/*N*/ nE0=18000-nTmp;
+/*N*/ }
+/*N*/ } else { // Spiegeln fuer verzerrte Ellipsen
+/*N*/ if (bXMirr!=bYMirr) {
+/*N*/ nS0+=nWink0;
+/*N*/ nE0+=nWink0;
+/*N*/ if (bXMirr) {
+/*N*/ long nTmp=nS0;
+/*N*/ nS0=18000-nE0;
+/*N*/ nE0=18000-nTmp;
+/*N*/ }
+/*N*/ if (bYMirr) {
+/*N*/ long nTmp=nS0;
+/*N*/ nS0=-nE0;
+/*N*/ nE0=-nTmp;
+/*N*/ }
+/*N*/ nS0-=aGeo.nDrehWink;
+/*N*/ nE0-=aGeo.nDrehWink;
+/*N*/ }
+/*N*/ }
+/*N*/ long nWinkDif=nE0-nS0;
+/*N*/ nStartWink=NormAngle360(nS0);
+/*N*/ nEndWink =NormAngle360(nE0);
+/*N*/ if (nWinkDif==36000) nEndWink+=nWinkDif; // Vollkreis
+/*N*/ }
+/*N*/ }
+/*N*/ SetXPolyDirty();
+/*N*/ ImpSetCircInfoToAttr();
+/*N*/ }
+
+/*N*/ void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+/*N*/ SetXPolyDirty();
+/*N*/ ImpSetCircInfoToAttr();
+/*N*/ }
+
+
+
+
+
+/*N*/ void Union(Rectangle& rR, const Point& rP)
+/*N*/ {
+/*N*/ if (rP.X()<rR.Left ()) rR.Left ()=rP.X();
+/*N*/ if (rP.X()>rR.Right ()) rR.Right ()=rP.X();
+/*N*/ if (rP.Y()<rR.Top ()) rR.Top ()=rP.Y();
+/*N*/ if (rP.Y()>rR.Bottom()) rR.Bottom()=rP.Y();
+/*N*/ }
+
+/*N*/ void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ rRect=aRect;
+/*N*/ if (eKind!=OBJ_CIRC) {
+/*N*/ SetWinkPnt(rRect,nStartWink,((SdrCircObj*)(this))->aPnt1);
+/*N*/ SetWinkPnt(rRect,nEndWink ,((SdrCircObj*)(this))->aPnt2);
+/*N*/ long a=nStartWink;
+/*N*/ long e=nEndWink;
+/*N*/ rRect.Left ()=aRect.Right();
+/*N*/ rRect.Right ()=aRect.Left();
+/*N*/ rRect.Top ()=aRect.Bottom();
+/*N*/ rRect.Bottom()=aRect.Top();
+/*N*/ Union(rRect,aPnt1);
+/*N*/ Union(rRect,aPnt2);
+/*N*/ if ((a<=18000 && e>=18000) || (a>e && (a<=18000 || e>=18000))) {
+/*N*/ Union(rRect,aRect.LeftCenter());
+/*N*/ }
+/*N*/ if ((a<=27000 && e>=27000) || (a>e && (a<=27000 || e>=27000))) {
+/*N*/ Union(rRect,aRect.BottomCenter());
+/*N*/ }
+/*N*/ if (a>e) {
+/*N*/ Union(rRect,aRect.RightCenter());
+/*N*/ }
+/*N*/ if ((a<=9000 && e>=9000) || (a>e && (a<=9000 || e>=9000))) {
+/*N*/ Union(rRect,aRect.TopCenter());
+/*N*/ }
+/*N*/ if (eKind==OBJ_SECT) {
+/*N*/ Union(rRect,aRect.Center());
+/*N*/ }
+/*N*/ 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());
+/*N*/ }
+/*N*/ }
+/*N*/ if (aGeo.nShearWink!=0) {
+/*N*/ long nDst=Round((rRect.Bottom()-rRect.Top())*aGeo.nTan);
+/*N*/ 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;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrCircObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ if (PaintNeedsXPoly()) {
+/*N*/ maSnapRect=GetXPoly().GetBoundRect();
+/*N*/ } else {
+/*N*/ TakeUnrotatedSnapRect(maSnapRect);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ 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(maSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0));
+/*?*/ NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top()));
+/*N*/ } else {
+/*N*/ aRect=rRect;
+/*N*/ ImpJustifyRect(aRect);
+/*N*/ }
+/*N*/ SetRectsDirty();
+/*N*/ SetXPolyDirty();
+/*N*/ ImpSetCircInfoToAttr();
+/*N*/ }
+
+
+
+/*N*/ void __EXPORT SdrCircObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ SetXPolyDirty();
+/*N*/ SdrRectObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ ImpSetAttrToCircInfo();
+/*N*/ }
+
+/*N*/ void SdrCircObj::ForceDefaultAttr()
+/*N*/ {
+/*N*/ SdrCircKind eKindA = SDRCIRC_FULL;
+/*N*/
+/*N*/ if(eKind == OBJ_SECT)
+/*N*/ eKindA = SDRCIRC_SECT;
+/*N*/ else if(eKind == OBJ_CARC)
+/*N*/ eKindA = SDRCIRC_ARC;
+/*N*/ else if(eKind == OBJ_CCUT)
+/*N*/ eKindA = SDRCIRC_CUT;
+/*N*/
+/*N*/ if(eKindA != SDRCIRC_FULL)
+/*N*/ {
+/*N*/ ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put(SdrCircKindItem(eKindA));
+/*N*/
+/*N*/ if(nStartWink)
+/*N*/ mpObjectItemSet->Put(SdrCircStartAngleItem(nStartWink));
+/*N*/
+/*N*/ if(nEndWink != 36000)
+/*N*/ mpObjectItemSet->Put(SdrCircEndAngleItem(nEndWink));
+/*N*/ }
+/*N*/
+/*N*/ // call parent, after SetItem(SdrCircKindItem())
+/*N*/ // because ForceDefaultAttr() will call
+/*N*/ // ImpSetAttrToCircInfo() which needs a correct
+/*N*/ // SdrCircKindItem
+/*N*/ SdrRectObj::ForceDefaultAttr();
+/*N*/
+/*N*/ }
+
+/*N*/ void SdrCircObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ SetXPolyDirty();
+/*N*/ SdrRectObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ ImpSetAttrToCircInfo();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ SfxItemSet* SdrCircObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+/*N*/
+/*N*/ // circle attributes
+/*N*/ SDRATTR_CIRC_FIRST, SDRATTRSET_CIRC,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+/*N*/ void SdrCircObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // local changes
+/*N*/ SetXPolyDirty();
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrRectObj::ItemSetChanged(rSet);
+/*N*/
+/*N*/ // local changes
+/*N*/ ImpSetAttrToCircInfo();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrCircObj::ImpSetAttrToCircInfo()
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ SdrCircKind eNewKindA = ((SdrCircKindItem&)rSet.Get(SDRATTR_CIRCKIND)).GetValue();
+/*N*/ SdrObjKind eNewKind = eKind;
+/*N*/
+/*N*/ if(eNewKindA == SDRCIRC_FULL)
+/*N*/ eNewKind = OBJ_CIRC;
+/*N*/ else if(eNewKindA == SDRCIRC_SECT)
+/*N*/ eNewKind = OBJ_SECT;
+/*N*/ else if(eNewKindA == SDRCIRC_ARC)
+/*N*/ eNewKind = OBJ_CARC;
+/*N*/ else if(eNewKindA == SDRCIRC_CUT)
+/*N*/ eNewKind = OBJ_CCUT;
+/*N*/
+/*N*/ sal_Int32 nNewStart = ((SdrCircStartAngleItem&)rSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue();
+/*N*/ sal_Int32 nNewEnd = ((SdrCircEndAngleItem&)rSet.Get(SDRATTR_CIRCENDANGLE)).GetValue();
+/*N*/
+/*N*/ BOOL bKindChg = eKind != eNewKind;
+/*N*/ BOOL bWinkChg = nNewStart != nStartWink || nNewEnd != nEndWink;
+/*N*/
+/*N*/ if(bKindChg || bWinkChg)
+/*N*/ {
+/*N*/ eKind = eNewKind;
+/*N*/ nStartWink = nNewStart;
+/*N*/ nEndWink = nNewEnd;
+/*N*/
+/*N*/ if(bKindChg || (eKind != OBJ_CIRC && bWinkChg))
+/*N*/ {
+/*N*/ SetXPolyDirty();
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrCircObj::ImpSetCircInfoToAttr()
+/*N*/ {
+/*N*/ SdrCircKind eNewKindA = SDRCIRC_FULL;
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/
+/*N*/ if(eKind == OBJ_SECT)
+/*N*/ eNewKindA = SDRCIRC_SECT;
+/*N*/ else if(eKind == OBJ_CARC)
+/*N*/ eNewKindA = SDRCIRC_ARC;
+/*N*/ else if(eKind == OBJ_CCUT)
+/*N*/ eNewKindA = SDRCIRC_CUT;
+/*N*/
+/*N*/ SdrCircKind eOldKindA = ((SdrCircKindItem&)rSet.Get(SDRATTR_CIRCKIND)).GetValue();
+/*N*/ sal_Int32 nOldStartWink = ((SdrCircStartAngleItem&)rSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue();
+/*N*/ sal_Int32 nOldEndWink = ((SdrCircEndAngleItem&)rSet.Get(SDRATTR_CIRCENDANGLE)).GetValue();
+/*N*/
+/*N*/ if(eNewKindA != eOldKindA || nStartWink != nOldStartWink || nEndWink != nOldEndWink)
+/*N*/ {
+/*N*/ // #81921# since SetItem() implicitly calls ImpSetAttrToCircInfo()
+/*N*/ // setting the item directly is necessary here.
+/*?*/ ImpForceItemSet();
+/*?*/
+/*?*/ if(eNewKindA != eOldKindA)
+/*?*/ mpObjectItemSet->Put(SdrCircKindItem(eNewKindA));
+/*?*/
+/*?*/ if(nStartWink != nOldStartWink)
+/*?*/ mpObjectItemSet->Put(SdrCircStartAngleItem(nStartWink));
+/*?*/
+/*?*/ if(nEndWink != nOldEndWink)
+/*?*/ mpObjectItemSet->Put(SdrCircEndAngleItem(nEndWink));
+/*?*/
+/*?*/ SetXPolyDirty();
+/*?*/ ImpSetAttrToCircInfo();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObject* SdrCircObj::DoConvertToPolyObj(BOOL bBezier) const
+/*N*/ {
+/*N*/ XPolygon aXP(ImpCalcXPoly(aRect,nStartWink,nEndWink));
+/*N*/ SdrObjKind ePathKind=OBJ_PATHFILL;
+/*N*/ FASTBOOL bFill=TRUE;
+/*N*/ if (eKind==OBJ_CARC) bFill=FALSE;
+/*N*/ SdrObject* pRet=ImpConvertMakeObj(XPolyPolygon(aXP),bFill,bBezier);
+/*N*/ pRet=ImpConvertAddText(pRet,bBezier);
+/*N*/ return pRet;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrCircObj::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrRectObj::PreSave();
+/*N*/
+/*N*/ // prepare SetItems for storage
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/ const SfxItemSet* pParent = GetStyleSheet() ? &GetStyleSheet()->GetItemSet() : 0L;
+/*N*/ SdrCircSetItem aCircAttr(rSet.GetPool());
+/*N*/ aCircAttr.GetItemSet().Put(rSet);
+/*N*/ aCircAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aCircAttr);
+/*N*/ }
+
+/*N*/ void SdrCircObj::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrRectObj::PostSave();
+/*N*/
+/*N*/ // remove SetItems from local itemset
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_CIRC);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrCircObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrRectObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrCircObj");
+/*N*/ #endif
+/*N*/
+/*N*/ if(eKind != OBJ_CIRC)
+/*N*/ {
+/*N*/ rOut << nStartWink;
+/*N*/ rOut << nEndWink;
+/*N*/ }
+/*N*/
+/*N*/ SfxItemPool* pPool=GetItemPool();
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_CIRC));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rOut << UINT16(SFX_ITEMS_NULL);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrCircObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if(rIn.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ // #91764# remember eKind, it will be deleted during SdrRectObj::ReadData(...)
+/*N*/ // but needs to be known to decide to jump over angles or not. Deletion happens
+/*N*/ // cause of fix #89025# wich is necessary, too.
+/*N*/ SdrObjKind eRememberedKind = eKind;
+/*N*/
+/*N*/ SdrRectObj::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrCircObj");
+/*N*/ #endif
+/*N*/
+/*N*/ // #92309# at once restore the remembered eKind here.
+/*N*/ eKind = eRememberedKind;
+/*N*/
+/*N*/ // #91764# use remembered eKind here
+/*N*/ if(eRememberedKind != OBJ_CIRC)
+/*N*/ {
+/*N*/ rIn >> nStartWink;
+/*N*/ rIn >> nEndWink;
+/*N*/ }
+/*N*/
+/*N*/ if(aCompat.GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ sal_uInt16 nSetID = SDRATTRSET_CIRC;
+/*N*/ const SdrCircSetItem* pCircAttr = (const SdrCircSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pCircAttr)
+/*N*/ SetItemSet(pCircAttr->GetItemSet());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nSuroDum;
+/*N*/ rIn >> nSuroDum;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // create pCircAttr for old Objects to let ImpSetCircInfoToAttr() do it's work
+/*N*/ SdrCircKind eKindA(SDRCIRC_FULL);
+/*N*/
+/*N*/ if(eKind == OBJ_SECT)
+/*N*/ eKindA = SDRCIRC_SECT;
+/*N*/ else if(eKind == OBJ_CARC)
+/*N*/ eKindA = SDRCIRC_ARC;
+/*N*/ else if(eKind == OBJ_CCUT)
+/*N*/ eKindA = SDRCIRC_CUT;
+/*N*/
+/*N*/ if(eKindA != SDRCIRC_FULL)
+/*N*/ {
+/*N*/ mpObjectItemSet->Put(SdrCircKindItem(eKindA));
+/*N*/
+/*N*/ if(nStartWink)
+/*N*/ mpObjectItemSet->Put(SdrCircStartAngleItem(nStartWink));
+/*N*/
+/*N*/ if(nEndWink != 36000)
+/*N*/ mpObjectItemSet->Put(SdrCircEndAngleItem(nEndWink));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx
new file mode 100644
index 000000000000..10ffc7abf759
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoedge.cxx
@@ -0,0 +1,1947 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "xpool.hxx"
+#include "svdattrx.hxx"
+#include "svdpool.hxx"
+#include "svddrgv.hxx"
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdsuro.hxx"
+#include "svdstr.hrc" // Objektname
+
+#include <bf_svtools/style.hxx>
+
+
+#include "eeitem.hxx"
+
+#include "rectenum.hxx"
+
+
+#include "xoutx.hxx"
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObjConnection::~SdrObjConnection()
+/*N*/ {
+/*N*/ if (pSuro!=NULL) delete pSuro;
+/*N*/ }
+
+/*N*/ void SdrObjConnection::ResetVars()
+/*N*/ {
+/*N*/ pSuro=NULL;
+/*N*/ pObj=NULL;
+/*N*/ nConId=0;
+/*N*/ nXDist=0;
+/*N*/ nYDist=0;
+/*N*/ bBestConn=TRUE;
+/*N*/ bBestVertex=TRUE;
+/*N*/ bXDistOvr=FALSE;
+/*N*/ bYDistOvr=FALSE;
+/*N*/ bAutoVertex=FALSE;
+/*N*/ bAutoCorner=FALSE;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsPos) const
+/*N*/ {
+/*N*/ FASTBOOL bRet=FALSE;
+/*N*/ if (pObj!=NULL) { // Ein Obj muss schon angedockt sein!
+/*N*/ if (bAutoVertex) {
+/*N*/ rGP=pObj->GetVertexGluePoint(nConId);
+/*N*/ bRet=TRUE;
+/*N*/ } else if (bAutoCorner) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ } else {
+/*?*/ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+/*N*/ if (pGPL!=NULL) {
+/*?*/ USHORT nNum=pGPL->FindGluePoint(nConId);
+/*?*/ if (nNum!=SDRGLUEPOINT_NOTFOUND) {
+/*?*/ rGP=(*pGPL)[nNum];
+/*?*/ bRet=TRUE;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (bRet && bSetAbsPos) {
+/*N*/ Point aPt(rGP.GetAbsolutePos(*pObj));
+/*N*/ aPt+=aObjOfs;
+/*N*/ rGP.SetPos(aPt);
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ void SdrObjConnection::Write(SvStream& rOut, const SdrObject* pEdgeObj) const
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOConnID); // ab V11 eingepackt
+/*N*/ SdrObjSurrogate aSuro(pObj,pEdgeObj);
+/*N*/ rOut<<aSuro;
+/*N*/ rOut<<nConId;
+/*N*/ rOut<<nXDist;
+/*N*/ rOut<<nYDist;
+/*N*/ BOOL bTmp;
+/*N*/ bTmp=bBestConn; rOut<<bTmp;
+/*N*/ bTmp=bBestVertex; rOut<<bTmp;
+/*N*/ bTmp=bXDistOvr; rOut<<bTmp;
+/*N*/ bTmp=bYDistOvr; rOut<<bTmp;
+/*N*/ bTmp=bAutoVertex; rOut<<bTmp;
+/*N*/ bTmp=bAutoCorner; rOut<<bTmp;
+/*N*/ UINT32 nReserve=0;
+/*N*/ rOut<<nReserve;
+/*N*/ rOut<<nReserve;
+/*N*/ }
+
+/*N*/ void SdrObjConnection::Read(SvStream& rIn, const SdrObject* pEdgeObj)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ,SdrIOConnID); // ab V11 eingepackt
+/*N*/ pSuro=new SdrObjSurrogate(*pEdgeObj,rIn);
+/*N*/ BOOL bBit;
+/*N*/ rIn>>nConId;
+/*N*/ rIn>>nXDist;
+/*N*/ rIn>>nYDist;
+/*N*/ rIn>>bBit; bBestConn =bBit;
+/*N*/ rIn>>bBit; bBestVertex=bBit;
+/*N*/ rIn>>bBit; bXDistOvr =bBit;
+/*N*/ rIn>>bBit; bYDistOvr =bBit;
+/*N*/ rIn>>bBit; bAutoVertex=bBit;
+/*N*/ rIn>>bBit; bAutoCorner=bBit;
+/*N*/ UINT32 nReserve;
+/*N*/ rIn>>nReserve;
+/*N*/ rIn>>nReserve;
+/*N*/ }
+
+/*N*/ void SdrObjConnection::ReadTilV10(SvStream& rIn, const SdrObject* pEdgeObj)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ pSuro=new SdrObjSurrogate(*pEdgeObj,rIn);
+/*N*/ BOOL bBit;
+/*N*/ rIn>>nConId;
+/*N*/ rIn>>nXDist;
+/*N*/ rIn>>nYDist;
+/*N*/ rIn>>bBit; bBestConn =bBit;
+/*N*/ rIn>>bBit; bBestVertex=bBit;
+/*N*/ rIn>>bBit; bXDistOvr =bBit;
+/*N*/ rIn>>bBit; bYDistOvr =bBit;
+/*N*/ rIn>>bBit; bAutoVertex=bBit;
+/*N*/ rIn>>bBit; bAutoCorner=bBit;
+/*N*/ UINT32 nReserve;
+/*N*/ rIn>>nReserve;
+/*N*/ rIn>>nReserve;
+/*N*/ }
+
+/*N*/ void SdrObjConnection::AfterRead(const SdrObject* pEdgeObj)
+/*N*/ {
+/*N*/ if (pSuro!=NULL) {
+/*N*/ pObj=pSuro->GetObject();
+/*N*/ delete pSuro;
+/*N*/ pSuro=NULL;
+/*N*/ }
+/*N*/ }
+
+/*N*/ Point& SdrEdgeInfoRec::ImpGetLineVersatzPoint(SdrEdgeLineCode eLineCode)
+/*N*/ {
+/*N*/ switch (eLineCode) {
+/*N*/ case OBJ1LINE2 : return aObj1Line2;
+/*?*/ case OBJ1LINE3 : return aObj1Line3;
+/*N*/ case OBJ2LINE2 : return aObj2Line2;
+/*?*/ case OBJ2LINE3 : return aObj2Line3;
+/*N*/ case MIDDLELINE: return aMiddleLine;
+/*N*/ } // switch
+/*N*/ return aMiddleLine;
+/*N*/ }
+
+/*N*/ USHORT SdrEdgeInfoRec::ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+/*N*/ {
+/*N*/ switch (eLineCode) {
+/*N*/ case OBJ1LINE2 : return 1;
+/*N*/ case OBJ1LINE3 : return 2;
+/*N*/ case OBJ2LINE2 : return rXP.GetPointCount()-3;
+/*N*/ case OBJ2LINE3 : return rXP.GetPointCount()-4;
+/*N*/ case MIDDLELINE: return nMiddleLine;
+/*N*/ } // switch
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+/*N*/ {
+/*N*/ USHORT nIdx=ImpGetPolyIdx(eLineCode,rXP);
+/*N*/ FASTBOOL bHorz=nAngle1==0 || nAngle1==18000;
+/*N*/ if (eLineCode==OBJ2LINE2 || eLineCode==OBJ2LINE3) {
+/*N*/ nIdx=rXP.GetPointCount()-nIdx; // #36314#
+/*N*/ bHorz=nAngle2==0 || nAngle2==18000; // #52000#
+/*N*/ }
+/*N*/ if ((nIdx & 1)==1) bHorz=!bHorz;
+/*N*/ return bHorz;
+/*N*/ }
+
+/*N*/ void SdrEdgeInfoRec::ImpSetLineVersatz(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal)
+/*N*/ {
+/*N*/ Point& rPt=ImpGetLineVersatzPoint(eLineCode);
+/*N*/ if (ImpIsHorzLine(eLineCode,rXP)) rPt.Y()=nVal;
+/*N*/ else rPt.X()=nVal;
+/*N*/ }
+
+/*N*/ long SdrEdgeInfoRec::ImpGetLineVersatz(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+/*N*/ {
+/*N*/ const Point& rPt=ImpGetLineVersatzPoint(eLineCode);
+/*N*/ if (ImpIsHorzLine(eLineCode,rXP)) return rPt.Y();
+/*N*/ else return rPt.X();
+/*N*/ }
+/*N*/
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrEdgeInfoRec& rEI)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrEdgeInfoRec");
+/*N*/ #endif
+/*N*/ rOut<<rEI.aObj1Line2;
+/*N*/ rOut<<rEI.aObj1Line3;
+/*N*/ rOut<<rEI.aObj2Line2;
+/*N*/ rOut<<rEI.aObj2Line3;
+/*N*/ rOut<<rEI.aMiddleLine;
+/*N*/ rOut<<rEI.nAngle1;
+/*N*/ rOut<<rEI.nAngle2;
+/*N*/ rOut<<rEI.nObj1Lines;
+/*N*/ rOut<<rEI.nObj2Lines;
+/*N*/ rOut<<rEI.nMiddleLine;
+/*N*/ rOut<<rEI.cOrthoForm;
+/*N*/ return rOut;
+/*N*/ }
+/*N*/
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrEdgeInfoRec& rEI)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrEdgeInfoRec");
+/*N*/ #endif
+/*N*/ rIn>>rEI.aObj1Line2;
+/*N*/ rIn>>rEI.aObj1Line3;
+/*N*/ rIn>>rEI.aObj2Line2;
+/*N*/ rIn>>rEI.aObj2Line3;
+/*N*/ rIn>>rEI.aMiddleLine;
+/*N*/ rIn>>rEI.nAngle1;
+/*N*/ rIn>>rEI.nAngle2;
+/*N*/ rIn>>rEI.nObj1Lines;
+/*N*/ rIn>>rEI.nObj2Lines;
+/*N*/ rIn>>rEI.nMiddleLine;
+/*N*/ rIn>>rEI.cOrthoForm;
+/*N*/ return rIn;
+/*N*/ }
+/*N*/
+/*N*/ ////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/
+/*N*/ TYPEINIT1(SdrEdgeObj,SdrTextObj);
+/*N*/
+/*N*/ SdrEdgeObj::SdrEdgeObj():
+/*N*/ SdrTextObj()
+/*N*/ {
+/*N*/ bClosedObj=FALSE;
+/*N*/ bIsEdge=TRUE;
+/*N*/ bEdgeTrackDirty=FALSE;
+/*N*/ nNotifyingCount=0;
+/*N*/ pEdgeTrack=new XPolygon;
+/*N*/
+/*N*/ // #109007#
+/*N*/ // Default is to allow default connects
+/*N*/ mbSuppressDefaultConnect = (FASTBOOL)sal_False;
+/*N*/ }
+/*N*/
+/*N*/ SdrEdgeObj::~SdrEdgeObj()
+/*N*/ {
+/*N*/ DisconnectFromNode(TRUE);
+/*N*/ DisconnectFromNode(FALSE);
+/*N*/ delete pEdgeTrack;
+/*N*/ }
+/*N*/
+/*N*/ ////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/ // ItemSet access
+/*N*/
+/*N*/ SfxItemSet* SdrEdgeObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+/*N*/
+/*N*/ // edge attributes
+/*N*/ SDRATTR_EDGE_FIRST, SDRATTRSET_EDGE,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+/*N*/
+/*N*/ ////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/ // private support routines for ItemSet access
+/*N*/ void SdrEdgeObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::ItemSetChanged(rSet);
+/*N*/
+/*N*/ // local changes
+/*N*/ ImpSetAttrToEdgeInfo();
+/*N*/ }
+/*N*/
+/*N*/ ////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/
+/*N*/ void SdrEdgeObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ SdrTextObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ ImpSetAttrToEdgeInfo(); // Werte vom Pool nach aEdgeInfo kopieren
+/*N*/ }
+/*N*/
+/*N*/ void SdrEdgeObj::ImpSetAttrToEdgeInfo()
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ SdrEdgeKind eKind = ((SdrEdgeKindItem&)(rSet.Get(SDRATTR_EDGEKIND))).GetValue();
+/*N*/ sal_Int32 nVal1 = ((SdrEdgeLine1DeltaItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
+/*N*/ sal_Int32 nVal2 = ((SdrEdgeLine2DeltaItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
+/*N*/ sal_Int32 nVal3 = ((SdrEdgeLine3DeltaItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
+/*N*/
+/*N*/ if(eKind == SDREDGE_ORTHOLINES || eKind == SDREDGE_BEZIER)
+/*N*/ {
+/*N*/ sal_Int32 nVals[3] = { nVal1, nVal2, nVal3 };
+/*N*/ sal_uInt16 n = 0;
+/*N*/
+/*N*/ if(aEdgeInfo.nObj1Lines >= 2 && n < 3)
+/*N*/ {
+/*?*/ aEdgeInfo.ImpSetLineVersatz(OBJ1LINE2, *pEdgeTrack, nVals[n]);
+/*?*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nObj1Lines >= 3 && n < 3)
+/*N*/ {
+/*?*/ aEdgeInfo.ImpSetLineVersatz(OBJ1LINE3, *pEdgeTrack, nVals[n]);
+/*?*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nMiddleLine != 0xFFFF && n < 3)
+/*N*/ {
+/*N*/ aEdgeInfo.ImpSetLineVersatz(MIDDLELINE, *pEdgeTrack, nVals[n]);
+/*N*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nObj2Lines >= 3 && n < 3)
+/*N*/ {
+/*?*/ aEdgeInfo.ImpSetLineVersatz(OBJ2LINE3, *pEdgeTrack, nVals[n]);
+/*?*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nObj2Lines >= 2 && n < 3)
+/*N*/ {
+/*?*/ aEdgeInfo.ImpSetLineVersatz(OBJ2LINE2, *pEdgeTrack, nVals[n]);
+/*?*/ n++;
+/*N*/ }
+/*N*/ }
+/*N*/ else if(eKind == SDREDGE_THREELINES)
+/*N*/ {
+/*?*/ BOOL bHor1 = aEdgeInfo.nAngle1 == 0 || aEdgeInfo.nAngle1 == 18000;
+/*?*/ BOOL 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;
+/*?*/ }
+/*N*/ }
+
+ // #84649#
+/*N*/ bEdgeTrackDirty = TRUE;
+/*N*/ }
+
+/*N*/ void SdrEdgeObj::ImpSetEdgeInfoToAttr()
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ SdrEdgeKind eKind = ((SdrEdgeKindItem&)(rSet.Get(SDRATTR_EDGEKIND))).GetValue();
+/*N*/ sal_Int32 nValAnz = ((SdrEdgeLineDeltaAnzItem&)rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
+/*N*/ sal_Int32 nVal1 = ((SdrEdgeLine1DeltaItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
+/*N*/ sal_Int32 nVal2 = ((SdrEdgeLine2DeltaItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
+/*N*/ sal_Int32 nVal3 = ((SdrEdgeLine3DeltaItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
+/*N*/ sal_Int32 nVals[3] = { nVal1, nVal2, nVal3 };
+/*N*/ sal_uInt16 n = 0;
+/*N*/
+/*N*/ if(eKind == SDREDGE_ORTHOLINES || eKind == SDREDGE_BEZIER)
+/*N*/ {
+/*N*/ if(aEdgeInfo.nObj1Lines >= 2 && n < 3)
+/*N*/ {
+/*?*/ nVals[n] = aEdgeInfo.ImpGetLineVersatz(OBJ1LINE2, *pEdgeTrack);
+/*?*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nObj1Lines >= 3 && n < 3)
+/*N*/ {
+/*N*/ nVals[n] = aEdgeInfo.ImpGetLineVersatz(OBJ1LINE3, *pEdgeTrack);
+/*N*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nMiddleLine != 0xFFFF && n < 3)
+/*N*/ {
+/*?*/ nVals[n] = aEdgeInfo.ImpGetLineVersatz(MIDDLELINE, *pEdgeTrack);
+/*?*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nObj2Lines >= 3 && n < 3)
+/*N*/ {
+/*N*/ nVals[n] = aEdgeInfo.ImpGetLineVersatz(OBJ2LINE3, *pEdgeTrack);
+/*N*/ n++;
+/*N*/ }
+/*N*/
+/*N*/ if(aEdgeInfo.nObj2Lines >= 2 && n < 3)
+/*N*/ {
+/*N*/ nVals[n] = aEdgeInfo.ImpGetLineVersatz(OBJ2LINE2, *pEdgeTrack);
+/*N*/ n++;
+/*N*/ }
+/*N*/ }
+/*N*/ else if(eKind == SDREDGE_THREELINES)
+/*N*/ {
+/*?*/ BOOL bHor1 = aEdgeInfo.nAngle1 == 0 || aEdgeInfo.nAngle1 == 18000;
+/*?*/ BOOL 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();
+/*N*/ }
+/*N*/
+/*N*/ if(n != nValAnz || nVals[0] != nVal1 || nVals[1] != nVal2 || nVals[2] != nVal3)
+/*N*/ {
+/*N*/ // #75371# Here no more notifying is necessary, just local changes are OK.
+/*N*/ ImpForceItemSet();
+/*N*/
+/*N*/ if(n != nValAnz)
+/*?*/ mpObjectItemSet->Put(SdrEdgeLineDeltaAnzItem(n));
+/*N*/
+/*N*/ if(nVals[0] != nVal1)
+/*?*/ mpObjectItemSet->Put(SdrEdgeLine1DeltaItem(nVals[0]));
+/*N*/
+/*N*/ if(nVals[1] != nVal2)
+/*?*/ mpObjectItemSet->Put(SdrEdgeLine2DeltaItem(nVals[1]));
+/*N*/
+/*N*/ if(nVals[2] != nVal3)
+/*?*/ mpObjectItemSet->Put(SdrEdgeLine3DeltaItem(nVals[2]));
+/*N*/
+/*N*/ if(n < 3)
+/*N*/ mpObjectItemSet->ClearItem(SDRATTR_EDGELINE3DELTA);
+/*N*/
+/*N*/ if(n < 2)
+/*N*/ mpObjectItemSet->ClearItem(SDRATTR_EDGELINE2DELTA);
+/*N*/
+/*N*/ if(n < 1)
+/*N*/ mpObjectItemSet->ClearItem(SDRATTR_EDGELINE1DELTA);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ UINT16 SdrEdgeObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16(OBJ_EDGE);
+/*N*/ }
+/*N*/
+/*N*/ const Rectangle& SdrEdgeObj::GetBoundRect() const
+/*N*/ {
+/*N*/ if (bEdgeTrackDirty) {
+/*N*/ ((SdrEdgeObj*)this)->ImpRecalcEdgeTrack();
+/*N*/ }
+/*N*/ return SdrTextObj::GetBoundRect();
+/*N*/ }
+/*N*/
+/*N*/ const Rectangle& SdrEdgeObj::GetSnapRect() const
+/*N*/ {
+/*N*/ if (bEdgeTrackDirty) {
+/*N*/ ((SdrEdgeObj*)this)->ImpRecalcEdgeTrack();
+/*N*/ }
+/*N*/ return SdrTextObj::GetSnapRect();
+/*N*/ }
+/*N*/
+/*N*/ void SdrEdgeObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ maSnapRect=pEdgeTrack->GetBoundRect();
+/*N*/ }
+/*N*/
+/*N*/ void SdrEdgeObj::RecalcBoundRect()
+/*N*/ {
+/*N*/ aOutRect=GetSnapRect();
+/*N*/ long nLineWdt=ImpGetLineWdt();
+/*N*/ // Linienenden beruecksichtigen
+/*N*/ long nLEndWdt=ImpGetLineEndAdd();
+/*N*/ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+/*N*/ if (nLineWdt!=0) {
+/*N*/ aOutRect.Left ()-=nLineWdt;
+/*N*/ aOutRect.Top ()-=nLineWdt;
+/*N*/ aOutRect.Right ()+=nLineWdt;
+/*N*/ aOutRect.Bottom()+=nLineWdt;
+/*N*/ }
+/*N*/ ImpAddShadowToBoundRect();
+/*N*/ ImpAddTextToBoundRect();
+/*N*/ }
+
+/*N*/ void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ rRect=GetSnapRect();
+/*N*/ }
+
+
+/*N*/ SdrObject* SdrEdgeObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+/*N*/ INT32 nMyTol=nTol;
+/*N*/
+/*N*/ INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
+/*N*/ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
+/*N*/ Rectangle aR(rPnt,rPnt);
+/*N*/ aR.Left() -=nMyTol;
+/*N*/ aR.Right() +=nMyTol;
+/*N*/ aR.Top() -=nMyTol;
+/*N*/ aR.Bottom()+=nMyTol;
+/*N*/
+/*N*/ FASTBOOL bHit=FALSE;
+/*N*/
+/*N*/ Polygon aPoly=XOutCreatePolygon(*pEdgeTrack,NULL);
+/*N*/ bHit=IsRectTouchesLine(aPoly,aR);
+/*N*/ if (!bHit && HasText()) bHit=SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+/*N*/ return bHit ? (SdrObject*)this : NULL;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrEdgeObj::IsNode() const
+/*N*/ {
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ SdrGluePoint SdrEdgeObj::GetVertexGluePoint(USHORT nNum) const
+/*N*/ {
+/*N*/ Point aPt;
+/*N*/ USHORT nPntAnz=pEdgeTrack->GetPointCount();
+/*N*/ if (nPntAnz>0) {
+/*N*/ Point aOfs(GetSnapRect().Center());
+/*N*/ if (nNum==2 && GetConnectedNode(TRUE)==NULL) aPt=(*pEdgeTrack)[0];
+/*N*/ else if (nNum==3 && GetConnectedNode(FALSE)==NULL) aPt=(*pEdgeTrack)[nPntAnz-1];
+/*N*/ else {
+/*N*/ if ((nPntAnz & 1) ==1) {
+/*N*/ aPt=(*pEdgeTrack)[nPntAnz/2];
+/*N*/ } else {
+/*N*/ Point aPt1((*pEdgeTrack)[nPntAnz/2-1]);
+/*N*/ Point aPt2((*pEdgeTrack)[nPntAnz/2]);
+/*N*/ aPt1+=aPt2;
+/*N*/ aPt1.X()/=2;
+/*N*/ aPt1.Y()/=2;
+/*N*/ aPt=aPt1;
+/*N*/ }
+/*N*/ }
+/*N*/ aPt-=aOfs;
+/*N*/ }
+/*N*/ SdrGluePoint aGP(aPt);
+/*N*/ aGP.SetPercent(FALSE);
+/*N*/ return aGP;
+/*N*/ }
+
+
+
+
+
+/*N*/ void SdrEdgeObj::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj)
+/*N*/ {
+/*N*/ SdrObjConnection& rCon=GetConnection(bTail1);
+/*N*/ DisconnectFromNode(bTail1);
+/*N*/ if (pObj!=NULL) {
+/*N*/ pObj->AddListener(*this);
+/*N*/ rCon.pObj=pObj;
+/*N*/ bEdgeTrackDirty=TRUE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrEdgeObj::DisconnectFromNode(FASTBOOL bTail1)
+/*N*/ {
+/*N*/ SdrObjConnection& rCon=GetConnection(bTail1);
+/*N*/ if (rCon.pObj!=NULL) {
+/*?*/ rCon.pObj->RemoveListener(*this);
+/*?*/ rCon.pObj=NULL;
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObject* SdrEdgeObj::GetConnectedNode(FASTBOOL bTail1) const
+/*N*/ {
+/*N*/ SdrObject* pObj=GetConnection(bTail1).pObj;
+/*N*/ if (pObj!=NULL && (pObj->GetPage()!=pPage || !pObj->IsInserted())) pObj=NULL;
+/*N*/ return pObj;
+/*N*/ }
+
+
+/*N*/ void SdrEdgeObj::ImpSetTailPoint(FASTBOOL bTail1, const Point& rPt)
+/*N*/ {
+/*N*/ USHORT nPtAnz=pEdgeTrack->GetPointCount();
+/*N*/ if (nPtAnz==0) {
+/*?*/ (*pEdgeTrack)[0]=rPt;
+/*?*/ (*pEdgeTrack)[1]=rPt;
+/*N*/ } else if (nPtAnz==1) {
+/*?*/ if (!bTail1) (*pEdgeTrack)[1]=rPt;
+/*?*/ else { (*pEdgeTrack)[1]=(*pEdgeTrack)[0]; (*pEdgeTrack)[0]=rPt; }
+/*N*/ } else {
+/*?*/ if (!bTail1) (*pEdgeTrack)[USHORT(nPtAnz-1)]=rPt;
+/*?*/ else (*pEdgeTrack)[0]=rPt;
+/*N*/ }
+/*N*/ ImpRecalcEdgeTrack();
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+
+/*N*/ void SdrEdgeObj::ImpRecalcEdgeTrack()
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=aOutRect; // war vorher =GetBoundRect() #36431#
+/*N*/ SetRectsDirty();
+/*N*/ if (!bEdgeTrackDirty) SendRepaintBroadcast();
+/*N*/ *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
+/*N*/ ImpSetEdgeInfoToAttr(); // Die Werte aus aEdgeInfo in den Pool kopieren
+/*N*/ bEdgeTrackDirty=FALSE;
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+
+/*N*/ USHORT SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const
+/*N*/ {
+/*N*/ if (pObj==NULL) return SDRESC_ALL;
+/*N*/ Rectangle aR(pObj->GetSnapRect());
+/*N*/ long dxl=rPt.X()-aR.Left();
+/*N*/ long dyo=rPt.Y()-aR.Top();
+/*N*/ long dxr=aR.Right()-rPt.X();
+/*N*/ long dyu=aR.Bottom()-rPt.Y();
+/*N*/ FASTBOOL bxMitt=Abs(dxl-dxr)<2;
+/*N*/ FASTBOOL byMitt=Abs(dyo-dyu)<2;
+/*N*/ long dx=Min(dxl,dxr);
+/*N*/ long dy=Min(dyo,dyu);
+/*N*/ FASTBOOL bDiag=Abs(dx-dy)<2;
+/*N*/ if (bxMitt && byMitt) return SDRESC_ALL; // In der Mitte
+/*N*/ 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;
+/*N*/ }
+/*N*/ if (dx<dy) { // waagerecht
+/*N*/ if (bxMitt) return SDRESC_HORZ;
+/*N*/ if (dxl<dxr) return SDRESC_LEFT;
+/*N*/ else return SDRESC_RIGHT;
+/*N*/ } else { // senkrecht
+/*N*/ if (byMitt) return SDRESC_VERT;
+/*N*/ if (dyo<dyu) return SDRESC_TOP;
+/*N*/ else return SDRESC_BOTTOM;
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) const
+/*N*/ {
+/*N*/ XPolygon aXP;
+/*N*/ aXP.Insert(XPOLY_APPEND,rStPt,XPOLY_NORMAL);
+/*N*/ FASTBOOL bRts=nEscAngle==0;
+/*N*/ FASTBOOL bObn=nEscAngle==9000;
+/*N*/ FASTBOOL bLks=nEscAngle==18000;
+/*N*/ FASTBOOL bUnt=nEscAngle==27000;
+/*N*/ FASTBOOL bHor=bLks || bRts;
+/*N*/ FASTBOOL bVer=bObn || bUnt;
+/*N*/
+/*N*/ Point aP1(rStPt); // erstmal den Pflichtabstand
+/*N*/ if (bLks) aP1.X()=rRect.Left();
+/*N*/ if (bRts) aP1.X()=rRect.Right();
+/*N*/ if (bObn) aP1.Y()=rRect.Top();
+/*N*/ if (bUnt) aP1.Y()=rRect.Bottom();
+/*N*/
+/*N*/ FASTBOOL bFinish=FALSE;
+/*N*/ if (!bFinish) {
+/*N*/ Point aP2(aP1); // Und nun den Pflichtabstand ggf. bis auf Meetinghoehe erweitern
+/*N*/ if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X();
+/*N*/ if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X();
+/*N*/ if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y();
+/*N*/ if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y();
+/*N*/ aXP.Insert(XPOLY_APPEND,aP2,XPOLY_NORMAL);
+/*N*/
+/*N*/ Point aP3(aP2);
+/*N*/ if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // Aussenrum
+/*N*/ if (rMeeting.Y()<aP2.Y()) {
+/*N*/ aP3.Y()=rRect.Top();
+/*N*/ if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y();
+/*N*/ } else {
+/*N*/ aP3.Y()=rRect.Bottom();
+/*N*/ if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y();
+/*N*/ }
+/*N*/ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+/*N*/ if (aP3.Y()!=rMeeting.Y()) {
+/*N*/ aP3.X()=rMeeting.X();
+/*N*/ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+/*N*/ }
+/*N*/ }
+/*N*/ if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // Aussenrum
+/*N*/ if (rMeeting.X()<aP2.X()) {
+/*N*/ aP3.X()=rRect.Left();
+/*N*/ if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X();
+/*N*/ } else {
+/*N*/ aP3.X()=rRect.Right();
+/*N*/ if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X();
+/*N*/ }
+/*N*/ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+/*N*/ if (aP3.X()!=rMeeting.X()) {
+/*N*/ aP3.Y()=rMeeting.Y();
+/*N*/ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ #ifdef DBG_UTIL
+/*N*/ if (aXP.GetPointCount()>4) {
+/*N*/ DBG_ERROR("SdrEdgeObj::ImpCalcObjToCenter(): Polygon hat mehr als 4 Punkte!");
+/*N*/ }
+/*N*/ #endif
+/*N*/ return aXP;
+/*N*/ }
+
+/*N*/ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const
+/*N*/ {
+/*N*/ Point aPt1,aPt2;
+/*N*/ SdrGluePoint aGP1,aGP2;
+/*N*/ USHORT nEsc1=SDRESC_ALL,nEsc2=SDRESC_ALL;
+/*N*/ Rectangle aBoundRect1;
+/*N*/ Rectangle aBoundRect2;
+/*N*/ Rectangle aBewareRect1;
+/*N*/ Rectangle aBewareRect2;
+/*N*/ // Erstmal die alten Endpunkte wiederholen
+/*N*/ if (rTrack0.GetPointCount()!=0) {
+/*N*/ aPt1=rTrack0[0];
+/*N*/ USHORT nSiz=rTrack0.GetPointCount();
+/*N*/ nSiz--;
+/*N*/ aPt2=rTrack0[nSiz];
+/*N*/ } else {
+/*?*/ if (!aOutRect.IsEmpty()) {
+/*?*/ aPt1=aOutRect.TopLeft();
+/*?*/ aPt2=aOutRect.BottomRight();
+/*?*/ }
+/*N*/ }
+/*N*/ FASTBOOL bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage && rCon1.pObj->IsInserted();
+/*N*/ FASTBOOL bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage && rCon2.pObj->IsInserted();
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/
+/*N*/ if (bCon1) {
+/*N*/ if (rCon1.pObj==(SdrObject*)this) { // sicherheitshalber Abfragen #44515#
+/*?*/ aBoundRect1=aOutRect;
+/*N*/ } else {
+/*N*/ aBoundRect1=rCon1.pObj->GetBoundRect();
+/*N*/ }
+/*N*/ aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y());
+/*N*/ aBewareRect1=aBoundRect1;
+/*N*/
+/*N*/ sal_Int32 nH = ((SdrEdgeNode1HorzDistItem&)rSet.Get(SDRATTR_EDGENODE1HORZDIST)).GetValue();
+/*N*/ sal_Int32 nV = ((SdrEdgeNode1VertDistItem&)rSet.Get(SDRATTR_EDGENODE1VERTDIST)).GetValue();
+/*N*/
+/*N*/ aBewareRect1.Left()-=nH;
+/*N*/ aBewareRect1.Right()+=nH;
+/*N*/ aBewareRect1.Top()-=nV;
+/*N*/ aBewareRect1.Bottom()+=nV;
+/*N*/ } else {
+/*N*/ aBoundRect1=Rectangle(aPt1,aPt1);
+/*N*/ aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y());
+/*N*/ aBewareRect1=aBoundRect1;
+/*N*/ }
+/*N*/ if (bCon2) {
+/*N*/ if (rCon2.pObj==(SdrObject*)this) { // sicherheitshalber Abfragen #44515#
+/*N*/ aBoundRect2=aOutRect;
+/*N*/ } else {
+/*N*/ aBoundRect2=rCon2.pObj->GetBoundRect();
+/*N*/ }
+/*N*/ aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y());
+/*N*/ aBewareRect2=aBoundRect2;
+/*N*/
+/*N*/ sal_Int32 nH = ((SdrEdgeNode2HorzDistItem&)rSet.Get(SDRATTR_EDGENODE2HORZDIST)).GetValue();
+/*N*/ sal_Int32 nV = ((SdrEdgeNode2VertDistItem&)rSet.Get(SDRATTR_EDGENODE2VERTDIST)).GetValue();
+/*N*/
+/*N*/ aBewareRect2.Left()-=nH;
+/*N*/ aBewareRect2.Right()+=nH;
+/*N*/ aBewareRect2.Top()-=nV;
+/*N*/ aBewareRect2.Bottom()+=nV;
+/*N*/ } else {
+/*N*/ aBoundRect2=Rectangle(aPt2,aPt2);
+/*N*/ aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y());
+/*N*/ aBewareRect2=aBoundRect2;
+/*N*/ }
+/*N*/ XPolygon aBestXP;
+/*N*/ ULONG nBestQual=0xFFFFFFFF;
+/*N*/ SdrEdgeInfoRec aBestInfo;
+/*N*/ FASTBOOL bAuto1=bCon1 && rCon1.bBestVertex;
+/*N*/ FASTBOOL bAuto2=bCon2 && rCon2.bBestVertex;
+/*N*/ if (bAuto1) rCon1.bAutoVertex=TRUE;
+/*N*/ if (bAuto2) rCon2.bAutoVertex=TRUE;
+/*N*/ USHORT nBestAuto1=0;
+/*N*/ USHORT nBestAuto2=0;
+/*N*/ USHORT nAnz1=bAuto1 ? 4 : 1;
+/*N*/ USHORT nAnz2=bAuto2 ? 4 : 1;
+/*N*/ for (USHORT nNum1=0; nNum1<nAnz1; nNum1++) {
+/*N*/ if (bAuto1) rCon1.nConId=nNum1;
+/*N*/ if (bCon1 && rCon1.TakeGluePoint(aGP1,TRUE)) {
+/*N*/ aPt1=aGP1.GetPos();
+/*N*/ nEsc1=aGP1.GetEscDir();
+/*N*/ if (nEsc1==SDRESC_SMART) nEsc1=ImpCalcEscAngle(rCon1.pObj,aPt1-rCon1.aObjOfs);
+/*N*/ }
+/*N*/ for (USHORT nNum2=0; nNum2<nAnz2; nNum2++) {
+/*N*/ if (bAuto2) rCon2.nConId=nNum2;
+/*N*/ if (bCon2 && rCon2.TakeGluePoint(aGP2,TRUE)) {
+/*N*/ aPt2=aGP2.GetPos();
+/*N*/ nEsc2=aGP2.GetEscDir();
+/*N*/ if (nEsc2==SDRESC_SMART) nEsc2=ImpCalcEscAngle(rCon2.pObj,aPt2-rCon2.aObjOfs);
+/*N*/ }
+/*N*/ for (long nA1=0; nA1<36000; nA1+=9000) {
+/*N*/ USHORT nE1=nA1==0 ? SDRESC_RIGHT : nA1==9000 ? SDRESC_TOP : nA1==18000 ? SDRESC_LEFT : nA1==27000 ? SDRESC_BOTTOM : 0;
+/*N*/ for (long nA2=0; nA2<36000; nA2+=9000) {
+/*N*/ USHORT nE2=nA2==0 ? SDRESC_RIGHT : nA2==9000 ? SDRESC_TOP : nA2==18000 ? SDRESC_LEFT : nA2==27000 ? SDRESC_BOTTOM : 0;
+/*N*/ if ((nEsc1&nE1)!=0 && (nEsc2&nE2)!=0) {
+/*N*/ ULONG nQual=0;
+/*N*/ SdrEdgeInfoRec aInfo;
+/*N*/ if (pInfo!=NULL) aInfo=*pInfo;
+/*N*/ XPolygon aXP(ImpCalcEdgeTrack(aPt1,nA1,aBoundRect1,aBewareRect1,aPt2,nA2,aBoundRect2,aBewareRect2,&nQual,&aInfo));
+/*N*/ if (nQual<nBestQual) {
+/*N*/ aBestXP=aXP;
+/*N*/ nBestQual=nQual;
+/*N*/ aBestInfo=aInfo;
+/*N*/ nBestAuto1=nNum1;
+/*N*/ nBestAuto2=nNum2;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (bAuto1) rCon1.nConId=nBestAuto1;
+/*N*/ if (bAuto2) rCon2.nConId=nBestAuto2;
+/*N*/ if (pInfo!=NULL) *pInfo=aBestInfo;
+/*N*/ return aBestXP;
+/*N*/ }
+
+/*N*/ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1,
+/*N*/ const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2,
+/*N*/ ULONG* pnQuality, SdrEdgeInfoRec* pInfo) const
+/*N*/ {
+/*N*/ SdrEdgeKind eKind=((SdrEdgeKindItem&)(GetItem(SDRATTR_EDGEKIND))).GetValue();
+/*N*/ FASTBOOL bRts1=nAngle1==0;
+/*N*/ FASTBOOL bObn1=nAngle1==9000;
+/*N*/ FASTBOOL bLks1=nAngle1==18000;
+/*N*/ FASTBOOL bUnt1=nAngle1==27000;
+/*N*/ FASTBOOL bHor1=bLks1 || bRts1;
+/*N*/ FASTBOOL bVer1=bObn1 || bUnt1;
+/*N*/ FASTBOOL bRts2=nAngle2==0;
+/*N*/ FASTBOOL bObn2=nAngle2==9000;
+/*N*/ FASTBOOL bLks2=nAngle2==18000;
+/*N*/ FASTBOOL bUnt2=nAngle2==27000;
+/*N*/ FASTBOOL bHor2=bLks2 || bRts2;
+/*N*/ FASTBOOL bVer2=bObn2 || bUnt2;
+/*N*/ FASTBOOL bInfo=pInfo!=NULL;
+/*N*/ if (bInfo) {
+/*N*/ pInfo->cOrthoForm=0;
+/*N*/ pInfo->nAngle1=nAngle1;
+/*N*/ pInfo->nAngle2=nAngle2;
+/*N*/ pInfo->nObj1Lines=1;
+/*N*/ pInfo->nObj2Lines=1;
+/*N*/ pInfo->nMiddleLine=0xFFFF;
+/*N*/ }
+/*N*/ Point aPt1(rPt1);
+/*N*/ Point aPt2(rPt2);
+/*N*/ Rectangle aBoundRect1 (rBoundRect1 );
+/*N*/ Rectangle aBoundRect2 (rBoundRect2 );
+/*N*/ Rectangle aBewareRect1(rBewareRect1);
+/*N*/ Rectangle aBewareRect2(rBewareRect2);
+/*N*/ Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2);
+/*N*/ FASTBOOL bMeetingXMid=TRUE;
+/*N*/ FASTBOOL bMeetingYMid=TRUE;
+/*N*/ 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;
+/*N*/ } 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;
+/*N*/ }
+/*N*/ USHORT nIntersections=0;
+/*N*/ FASTBOOL bForceMeeting=FALSE; // Muss die Linie durch den MeetingPoint laufen?
+/*N*/ {
+/*N*/ Point aC1(aBewareRect1.Center());
+/*N*/ Point aC2(aBewareRect2.Center());
+/*N*/ if (aBewareRect1.Left()<=aBewareRect2.Right() && aBewareRect1.Right()>=aBewareRect2.Left()) {
+/*N*/ // Ueberschneidung auf der X-Achse
+/*N*/ long n1=Max(aBewareRect1.Left(),aBewareRect2.Left());
+/*N*/ long n2=Min(aBewareRect1.Right(),aBewareRect2.Right());
+/*N*/ aMeeting.X()=(n1+n2+1)/2;
+/*N*/ } else {
+/*N*/ // Ansonsten den Mittelpunkt des Freiraums
+/*N*/ if (aC1.X()<aC2.X()) {
+/*N*/ aMeeting.X()=(aBewareRect1.Right()+aBewareRect2.Left()+1)/2;
+/*N*/ } else {
+/*N*/ aMeeting.X()=(aBewareRect1.Left()+aBewareRect2.Right()+1)/2;
+/*N*/ }
+/*N*/ }
+/*N*/ if (aBewareRect1.Top()<=aBewareRect2.Bottom() && aBewareRect1.Bottom()>=aBewareRect2.Top()) {
+/*N*/ // Ueberschneidung auf der Y-Achse
+/*N*/ long n1=Max(aBewareRect1.Top(),aBewareRect2.Top());
+/*N*/ long n2=Min(aBewareRect1.Bottom(),aBewareRect2.Bottom());
+/*N*/ aMeeting.Y()=(n1+n2+1)/2;
+/*N*/ } else {
+/*N*/ // Ansonsten den Mittelpunkt des Freiraums
+/*N*/ if (aC1.Y()<aC2.Y()) {
+/*N*/ aMeeting.Y()=(aBewareRect1.Bottom()+aBewareRect2.Top()+1)/2;
+/*N*/ } else {
+/*N*/ aMeeting.Y()=(aBewareRect1.Top()+aBewareRect2.Bottom()+1)/2;
+/*N*/ }
+/*N*/ }
+/*N*/ // Im Prinzip gibt es 3 zu unterscheidene Faelle:
+/*N*/ // 1. Beide in die selbe Richtung
+/*N*/ // 2. Beide in genau entgegengesetzte Richtungen
+/*N*/ // 3. Einer waagerecht und der andere senkrecht
+/*N*/ long nXMin=Min(aBewareRect1.Left(),aBewareRect2.Left());
+/*N*/ long nXMax=Max(aBewareRect1.Right(),aBewareRect2.Right());
+/*N*/ long nYMin=Min(aBewareRect1.Top(),aBewareRect2.Top());
+/*N*/ long nYMax=Max(aBewareRect1.Bottom(),aBewareRect2.Bottom());
+/*N*/ FASTBOOL bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() &&
+/*N*/ aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom();
+/*N*/ FASTBOOL bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() &&
+/*N*/ aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom();
+/*N*/ unsigned nMainCase=3;
+/*N*/ if (nAngle1==nAngle2) nMainCase=1;
+/*N*/ else if ((bHor1 && bHor2) || (bVer1 && bVer2)) nMainCase=2;
+/*N*/ if (nMainCase==1) { // Fall 1: Beide in eine Richtung moeglich.
+/*N*/ if (bVer1) aMeeting.X()=(aPt1.X()+aPt2.X()+1)/2; // ist hier besser, als der
+/*N*/ if (bHor1) aMeeting.Y()=(aPt1.Y()+aPt2.Y()+1)/2; // Mittelpunkt des Freiraums
+/*N*/ // bX1Ok bedeutet, dass die Vertikale, die aus Obj1 austritt, keinen Konflikt mit Obj2 bildet, ...
+/*N*/ FASTBOOL bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right();
+/*N*/ FASTBOOL bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right();
+/*N*/ FASTBOOL bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom();
+/*N*/ FASTBOOL bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom();
+/*N*/ if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) {
+/*N*/ aMeeting.X()=nXMin;
+/*N*/ bMeetingXMid=FALSE;
+/*N*/ }
+/*N*/ if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) {
+/*N*/ aMeeting.X()=nXMax;
+/*N*/ bMeetingXMid=FALSE;
+/*N*/ }
+/*N*/ if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) {
+/*N*/ aMeeting.Y()=nYMin;
+/*N*/ bMeetingYMid=FALSE;
+/*N*/ }
+/*N*/ if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) {
+/*N*/ aMeeting.Y()=nYMax;
+/*N*/ bMeetingYMid=FALSE;
+/*N*/ }
+/*N*/ } else if (nMainCase==2) {
+/*N*/ // Fall 2:
+/*N*/ bForceMeeting=TRUE;
+/*N*/ if (bHor1) { // beide waagerecht
+/*N*/ // 9 Moeglichkeiten: ???
+/*N*/ // 2.1 Gegenueber, Ueberschneidung ???
+/*N*/ // nur auf der Y-Achse ???
+/*N*/ // 2.2, 2.3 Gegenueber, vertikal versetzt. ??? ???
+/*N*/ // Ueberschneidung weder auf der ??? ???
+/*N*/ // X- noch auf der Y-Achse ??? ???
+/*N*/ // 2.4, 2.5 Untereinander, ??? ???
+/*N*/ // Ueberschneidung ??? ???
+/*N*/ // nur auf X-Achse ??? ???
+/*N*/ // 2.6, 2.7 Gegeneinander, vertikal versetzt. ??? ???
+/*N*/ // Ueberschneidung weder auf der ??? ???
+/*N*/ // X- noch auf der Y-Achse. ??? ???
+/*N*/ // 2.8 Gegeneinander. ???
+/*N*/ // Ueberschneidung nur ???
+/*N*/ // auf der Y-Achse. ???
+/*N*/ // 2.9 Die BewareRects der Objekte ueberschneiden
+/*N*/ // sich auf X- und Y-Achse.
+/*N*/ // Die Faelle gelten entsprechend umgesetzt auch fuer
+/*N*/ // senkrechte Linienaustritte.
+/*N*/ // Die Faelle 2.1-2.7 werden mir dem Default-Meeting ausreichend
+/*N*/ // gut behandelt. Spezielle MeetingPoints werden hier also nur
+/*N*/ // fuer 2.8 und 2.9 bestimmt.
+/*N*/
+/*N*/ // Normalisierung. aR1 soll der nach rechts und
+/*N*/ // aR2 der nach links austretende sein.
+/*N*/ Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2);
+/*N*/ Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1);
+/*N*/ Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2);
+/*N*/ Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1);
+/*N*/ if (aBewR1.Bottom()>aBewR2.Top() && aBewR1.Top()<aBewR2.Bottom()) {
+/*N*/ // Ueberschneidung auf der Y-Achse. Faelle 2.1, 2.8, 2.9
+/*N*/ if (aBewR1.Right()>aBewR2.Left()) {
+/*N*/ // Faelle 2.8, 2.9
+/*N*/ // Fall 2.8 ist immer Aussenrumlauf (bDirect=FALSE).
+/*N*/ // Fall 2.9 kann auch Direktverbindung sein (bei geringer
+/*N*/ // Ueberschneidung der BewareRects ohne Ueberschneidung der
+/*N*/ // Boundrects wenn die Linienaustritte sonst das BewareRect
+/*N*/ // des jeweils anderen Objekts verletzen wuerden.
+/*N*/ FASTBOOL bCase29Direct=FALSE;
+/*N*/ FASTBOOL bCase29=aBewR1.Right()>aBewR2.Left();
+/*N*/ 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())) {
+/*N*/ bCase29Direct=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bCase29Direct) {
+/*N*/ FASTBOOL bObenLang=Abs(nYMin-aMeeting.Y())<=Abs(nYMax-aMeeting.Y());
+/*N*/ if (bObenLang) {
+/*N*/ aMeeting.Y()=nYMin;
+/*N*/ } else {
+/*?*/ aMeeting.Y()=nYMax;
+/*N*/ }
+/*N*/ bMeetingYMid=FALSE;
+/*N*/ if (bCase29) {
+/*N*/ // und nun noch dafuer sorgen, dass das
+/*N*/ // umzingelte Obj nicht durchquert wird
+/*N*/ if (aBewR1.Center().Y()<aBewR2.Center().Y() != bObenLang) {
+/*N*/ aMeeting.X()=aBewR2.Right();
+/*N*/ } else {
+/*N*/ aMeeting.X()=aBewR1.Left();
+/*N*/ }
+/*N*/ bMeetingXMid=FALSE;
+/*N*/ }
+/*N*/ } else {
+/*N*/ // Direkte Verbindung (3-Linien Z-Verbindung), da
+/*N*/ // 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
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ } else if (bVer1) { // beide senkrecht
+/*N*/ Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2);
+/*N*/ Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1);
+/*N*/ Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2);
+/*N*/ Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1);
+/*N*/ if (aBewR1.Right()>aBewR2.Left() && aBewR1.Left()<aBewR2.Right()) {
+/*N*/ // Ueberschneidung auf der Y-Achse. Faelle 2.1, 2.8, 2.9
+/*N*/ if (aBewR1.Bottom()>aBewR2.Top()) {
+/*N*/ // Faelle 2.8, 2.9
+/*N*/ // Fall 2.8 ist immer Aussenrumlauf (bDirect=FALSE).
+/*N*/ // Fall 2.9 kann auch Direktverbindung sein (bei geringer
+/*N*/ // Ueberschneidung der BewareRects ohne Ueberschneidung der
+/*N*/ // Boundrects wenn die Linienaustritte sonst das BewareRect
+/*N*/ // des jeweils anderen Objekts verletzen wuerden.
+/*N*/ FASTBOOL bCase29Direct=FALSE;
+/*N*/ FASTBOOL bCase29=aBewR1.Bottom()>aBewR2.Top();
+/*N*/ if (aBndR1.Bottom()<=aBndR2.Top()) { // Fall 2.9 und keine Boundrectueberschneidung
+/*N*/ if ((aPt1.X()>aBewareRect2.Left() && aPt1.X()<aBewareRect2.Right()) ||
+/*N*/ (aPt2.X()>aBewareRect1.Left() && aPt2.X()<aBewareRect1.Right())) {
+/*N*/ bCase29Direct=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bCase29Direct) {
+/*N*/ FASTBOOL bLinksLang=Abs(nXMin-aMeeting.X())<=Abs(nXMax-aMeeting.X());
+/*N*/ if (bLinksLang) {
+/*N*/ aMeeting.X()=nXMin;
+/*N*/ } else {
+/*N*/ aMeeting.X()=nXMax;
+/*N*/ }
+/*N*/ bMeetingXMid=FALSE;
+/*N*/ if (bCase29) {
+/*N*/ // und nun noch dafuer sorgen, dass das
+/*N*/ // umzingelte Obj nicht durchquert wird
+/*N*/ if (aBewR1.Center().X()<aBewR2.Center().X() != bLinksLang) {
+/*N*/ aMeeting.Y()=aBewR2.Bottom();
+/*N*/ } else {
+/*N*/ aMeeting.Y()=aBewR1.Top();
+/*N*/ }
+/*N*/ bMeetingYMid=FALSE;
+/*N*/ }
+/*N*/ } else {
+/*N*/ // Direkte Verbindung (3-Linien Z-Verbindung), da
+/*N*/ // Verletzung der BewareRects unvermeidlich ist.
+/*N*/ // Via Dreisatz werden die BewareRects nun verkleinert.
+/*N*/ long nWant1=aBewR1.Bottom()-aBndR1.Bottom(); // Abstand bei Obj1
+/*N*/ long nWant2=aBndR2.Top()-aBewR2.Top(); // Abstand bei Obj2
+/*N*/ long nSpace=aBndR2.Top()-aBndR1.Bottom(); // verfuegbarer Platz
+/*N*/ long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
+/*N*/ long nGet2=nSpace-nGet1;
+/*N*/ if (bUnt1) { // Normalisierung zurueckwandeln
+/*?*/ aBewareRect1.Bottom()+=nGet1-nWant1;
+/*?*/ aBewareRect2.Top()-=nGet2-nWant2;
+/*N*/ } else {
+/*N*/ aBewareRect2.Bottom()+=nGet1-nWant1;
+/*N*/ aBewareRect1.Top()-=nGet2-nWant2;
+/*N*/ }
+/*N*/ nIntersections++; // Qualitaet herabsetzen
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ } else if (nMainCase==3) { // Fall 3: Einer waagerecht und der andere senkrecht. Sehr viele Fallunterscheidungen
+/*N*/ // Kleine Legende: ?????-> Ohne Ueberschneidung, maximal Beruehrung.
+/*N*/ // ?????-> Ueberschneidung
+/*N*/ // ?????-> Selbe Hoehe
+/*N*/ // ?????-> Ueberschneidung
+/*N*/ // ?????-> Ohne Ueberschneidung, maximal Beruehrung.
+/*N*/ // Linienaustritte links ? rechts ? oben ?und unten ?
+/*N*/ // Insgesamt sind 96 Konstellationen moeglich, wobei einige nicht einmal
+/*N*/ // eindeutig einem Fall und damit einer Behandlungsmethode zugeordnet werden
+/*N*/ // koennen.
+/*N*/ // 3.1: Hierzu moegen alle Konstellationen zaehlen, die durch den
+/*N*/ // Default-MeetingPoint zufriedenstellend abgedeckt sind (20+12).
+/*N*/ // ????? ????? Diese 12 ????? ????? ????? ?????
+/*N*/ // ????? ????? Konstel. ????? ????? ????? ?????
+/*N*/ // ????? ????? jedoch ????? ????? ????? ?????
+/*N*/ // ????? ????? nur zum ????? ????? ????? ?????
+/*N*/ // ????? ????? Teil: ????? ????? ????? ?????
+/*N*/ // Letztere 16 Faelle scheiden aus, sobald sich die Objekte offen
+/*N*/ // gegenueberstehen (siehe Fall 3.2).
+/*N*/ // 3.2: Die Objekte stehen sich offen gegenueber und somit ist eine
+/*N*/ // Verbindung mit lediglich 2 Linien moeglich (4+20).
+/*N*/ // Dieser Fall hat 1. Prioritaet.
+/*N*/ // ????? ????? Diese 20 ????? ????? ????? ?????
+/*N*/ // ????? ????? Konstel. ????? ????? ????? ?????
+/*N*/ // ????? ????? jedoch ????? ????? ????? ?????
+/*N*/ // ????? ????? nur zum ????? ????? ????? ?????
+/*N*/ // ????? ????? Teil: ????? ????? ????? ?????
+/*N*/ // 3.3: Die Linienaustritte zeigen vom anderen Objekt weg bzw. hinter
+/*N*/ // dessen Ruecken vorbei (52+4).
+/*N*/ // ????? ????? ????? ????? Diese 4 ????? ?????
+/*N*/ // ????? ????? ????? ????? Konstel. ????? ?????
+/*N*/ // ????? ????? ????? ????? jedoch ????? ?????
+/*N*/ // ????? ????? ????? ????? nur zum ????? ?????
+/*N*/ // ????? ????? ????? ????? Teil: ????? ?????
+/*N*/
+/*N*/ // Fall 3.2
+/*N*/ Rectangle aTmpR1(aBewareRect1);
+/*N*/ Rectangle aTmpR2(aBewareRect2);
+/*N*/ if (bBewareOverlap) {
+/*N*/ // Ueberschneidung der BewareRects: BoundRects fuer Check auf Fall 3.2 verwenden.
+/*N*/ aTmpR1=aBoundRect1;
+/*N*/ aTmpR2=aBoundRect2;
+/*N*/ }
+/*N*/ if ((((bRts1 && aTmpR1.Right ()<=aPt2.X()) || (bLks1 && aTmpR1.Left()>=aPt2.X())) &&
+/*N*/ ((bUnt2 && aTmpR2.Bottom()<=aPt1.Y()) || (bObn2 && aTmpR2.Top ()>=aPt1.Y()))) ||
+/*N*/ (((bRts2 && aTmpR2.Right ()<=aPt1.X()) || (bLks2 && aTmpR2.Left()>=aPt1.X())) &&
+/*N*/ ((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) {
+/*N*/ // Fall 3.2 trifft zu: Verbindung mit lediglich 2 Linien
+/*N*/ bForceMeeting=TRUE;
+/*N*/ bMeetingXMid=FALSE;
+/*N*/ bMeetingYMid=FALSE;
+/*N*/ if (bHor1) {
+/*N*/ aMeeting.X()=aPt2.X();
+/*N*/ aMeeting.Y()=aPt1.Y();
+/*N*/ } else {
+/*N*/ aMeeting.X()=aPt1.X();
+/*N*/ aMeeting.Y()=aPt2.Y();
+/*N*/ }
+/*N*/ // Falls Ueberschneidung der BewareRects:
+/*N*/ aBewareRect1=aTmpR1;
+/*N*/ aBewareRect2=aTmpR2;
+/*N*/ } else if ((((bRts1 && aBewareRect1.Right ()>aBewareRect2.Left ()) ||
+/*N*/ (bLks1 && aBewareRect1.Left ()<aBewareRect2.Right ())) &&
+/*N*/ ((bUnt2 && aBewareRect2.Bottom()>aBewareRect1.Top ()) ||
+/*N*/ (bObn2 && aBewareRect2.Top ()<aBewareRect1.Bottom()))) ||
+/*N*/ (((bRts2 && aBewareRect2.Right ()>aBewareRect1.Left ()) ||
+/*N*/ (bLks2 && aBewareRect2.Left ()<aBewareRect1.Right ())) &&
+/*N*/ ((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top ()) ||
+/*N*/ (bObn1 && aBewareRect1.Top ()<aBewareRect2.Bottom())))) {
+/*N*/ // Fall 3.3
+/*N*/ bForceMeeting=TRUE;
+/*N*/ if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid=FALSE; }
+/*N*/ if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid=FALSE; }
+/*N*/ if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid=FALSE; }
+/*N*/ if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid=FALSE; }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ XPolygon aXP1(ImpCalcObjToCenter(aPt1,nAngle1,aBewareRect1,aMeeting));
+/*N*/ XPolygon aXP2(ImpCalcObjToCenter(aPt2,nAngle2,aBewareRect2,aMeeting));
+/*N*/ USHORT nXP1Anz=aXP1.GetPointCount();
+/*N*/ USHORT nXP2Anz=aXP2.GetPointCount();
+/*N*/ if (bInfo) {
+/*N*/ pInfo->nObj1Lines=nXP1Anz; if (nXP1Anz>1) pInfo->nObj1Lines--;
+/*N*/ pInfo->nObj2Lines=nXP2Anz; if (nXP2Anz>1) pInfo->nObj2Lines--;
+/*N*/ }
+/*N*/ Point aEP1(aXP1[nXP1Anz-1]);
+/*N*/ Point aEP2(aXP2[nXP2Anz-1]);
+/*N*/ FASTBOOL bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y();
+/*N*/ FASTBOOL bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal?
+/*N*/ FASTBOOL bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal?
+/*N*/ if (aEP1==aEP2 && (bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X())) {
+/*N*/ // Sonderbehandlung fuer 'I'-Verbinder
+/*N*/ nXP1Anz--; aXP1.Remove(nXP1Anz,1);
+/*N*/ nXP2Anz--; aXP2.Remove(nXP2Anz,1);
+/*N*/ bMeetingXMid=FALSE;
+/*N*/ bMeetingYMid=FALSE;
+/*N*/ }
+/*N*/ if (bInsMeetingPoint) {
+/*N*/ aXP1.Insert(XPOLY_APPEND,aMeeting,XPOLY_NORMAL);
+/*N*/ if (bInfo) {
+/*N*/ // Durch einfuegen des MeetingPoints kommen 2 weitere Linie hinzu.
+/*N*/ // Evtl. wird eine von diesen die Mittellinie.
+/*N*/ if (pInfo->nObj1Lines==pInfo->nObj2Lines) {
+/*N*/ pInfo->nObj1Lines++;
+/*N*/ pInfo->nObj2Lines++;
+/*N*/ } else {
+/*N*/ if (pInfo->nObj1Lines>pInfo->nObj2Lines) {
+/*N*/ pInfo->nObj2Lines++;
+/*N*/ pInfo->nMiddleLine=nXP1Anz-1;
+/*N*/ } else {
+/*N*/ pInfo->nObj1Lines++;
+/*N*/ pInfo->nMiddleLine=nXP1Anz;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ } else if (bInfo && aEP1!=aEP2 && nXP1Anz+nXP2Anz>=4) {
+/*N*/ // Durch Verbinden der beiden Enden kommt eine weitere Linie hinzu.
+/*N*/ // Dies wird die Mittellinie.
+/*N*/ pInfo->nMiddleLine=nXP1Anz-1;
+/*N*/ }
+/*N*/ USHORT nNum=aXP2.GetPointCount();
+/*N*/ if (aXP1[nXP1Anz-1]==aXP2[nXP2Anz-1] && nXP1Anz>1 && nXP2Anz>1) nNum--;
+/*N*/ while (nNum>0) {
+/*N*/ nNum--;
+/*N*/ aXP1.Insert(XPOLY_APPEND,aXP2[nNum],XPOLY_NORMAL);
+/*N*/ }
+/*N*/ USHORT nPntAnz=aXP1.GetPointCount();
+/*N*/ char cForm=0;
+/*N*/ if (bInfo || pnQuality!=NULL) {
+/*N*/ cForm='?';
+/*N*/ if (nPntAnz==2) cForm='I';
+/*N*/ else if (nPntAnz==3) cForm='L';
+/*N*/ else if (nPntAnz==4) { // Z oder U
+/*N*/ if (nAngle1==nAngle2) cForm='U';
+/*N*/ else cForm='Z';
+/*N*/ } else if (nPntAnz==4) { // ?? ??
+/*N*/ // ... -? -?
+/*N*/ } else if (nPntAnz==6) { // S oder C oder ...
+/*N*/ if (nAngle1!=nAngle2) {
+/*N*/ // Fuer Typ S hat Linie2 dieselbe Richtung wie Linie4.
+/*N*/ // Bei Typ C sind die beiden genau entgegengesetzt.
+/*N*/ Point aP1(aXP1[1]);
+/*N*/ Point aP2(aXP1[2]);
+/*N*/ Point aP3(aXP1[3]);
+/*N*/ Point aP4(aXP1[4]);
+/*N*/ if (aP1.Y()==aP2.Y()) { // beide Linien Horz
+/*N*/ if (aP1.X()<aP2.X()==aP3.X()<aP4.X()) cForm='S';
+/*N*/ else cForm='C';
+/*N*/ } else { // sonst beide Linien Vert
+/*N*/ if (aP1.Y()<aP2.Y()==aP3.Y()<aP4.Y()) cForm='S';
+/*N*/ else cForm='C';
+/*N*/ }
+/*N*/ } else cForm='4'; // sonst der 3. Fall mit 5 Linien
+/*N*/ } else cForm='?'; //
+/*N*/ // Weitere Formen:
+/*N*/ if (bInfo) {
+/*N*/ pInfo->cOrthoForm=cForm;
+/*N*/ if (cForm=='I' || cForm=='L' || cForm=='Z' || cForm=='U') {
+/*N*/ pInfo->nObj1Lines=1;
+/*N*/ pInfo->nObj2Lines=1;
+/*N*/ if (cForm=='Z' || cForm=='U') {
+/*N*/ pInfo->nMiddleLine=1;
+/*N*/ } else {
+/*N*/ pInfo->nMiddleLine=0xFFFF;
+/*N*/ }
+/*N*/ } else if (cForm=='S' || cForm=='C') {
+/*N*/ pInfo->nObj1Lines=2;
+/*N*/ pInfo->nObj2Lines=2;
+/*N*/ pInfo->nMiddleLine=2;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (pnQuality!=NULL) {
+/*N*/ ULONG nQual=0;
+/*N*/ ULONG nQual0=nQual; // Ueberlaeufe vorbeugen
+/*N*/ FASTBOOL bOverflow=FALSE;
+/*N*/ Point aPt0(aXP1[0]);
+/*N*/ for (USHORT nPntNum=1; nPntNum<nPntAnz; nPntNum++) {
+/*N*/ Point aPt1(aXP1[nPntNum]);
+/*N*/ nQual+=Abs(aPt1.X()-aPt0.X())+Abs(aPt1.Y()-aPt0.Y());
+/*N*/ if (nQual<nQual0) bOverflow=TRUE;
+/*N*/ nQual0=nQual;
+/*N*/ aPt0=aPt1;
+/*N*/ }
+/*N*/
+/*N*/ USHORT nTmp=nPntAnz;
+/*N*/ if (cForm=='Z') {
+/*N*/ nTmp=2; // Z-Form hat gute Qualitaet (nTmp=2 statt 4)
+/*N*/ ULONG n1=Abs(aXP1[1].X()-aXP1[0].X())+Abs(aXP1[1].Y()-aXP1[0].Y());
+/*N*/ ULONG n2=Abs(aXP1[2].X()-aXP1[1].X())+Abs(aXP1[2].Y()-aXP1[1].Y());
+/*N*/ ULONG n3=Abs(aXP1[3].X()-aXP1[2].X())+Abs(aXP1[3].Y()-aXP1[2].Y());
+/*N*/ // fuer moeglichst gleichlange Linien sorgen
+/*N*/ ULONG nBesser=0;
+/*N*/ n1+=n3;
+/*N*/ n3=n2/4;
+/*N*/ if (n1>=n2) nBesser=6;
+/*N*/ else if (n1>=3*n3) nBesser=4;
+/*N*/ else if (n1>=2*n3) nBesser=2;
+/*N*/ if (aXP1[0].Y()!=aXP1[1].Y()) nBesser++; // Senkrechte Startlinie kriegt auch noch einen Pluspunkt (fuer H/V-Prio)
+/*N*/ if (nQual>nBesser) nQual-=nBesser; else nQual=0;
+/*N*/ }
+/*N*/ if (nTmp>=3) {
+/*N*/ nQual0=nQual;
+/*N*/ nQual+=(ULONG)nTmp*0x01000000;
+/*N*/ if (nQual<nQual0 || nTmp>15) bOverflow=TRUE;
+/*N*/ }
+/*N*/ if (nPntAnz>=2) { // Austrittswinkel nochmal pruefen
+/*N*/ Point aP1(aXP1[1]); aP1-=aXP1[0];
+/*N*/ Point aP2(aXP1[nPntAnz-2]); aP2-=aXP1[nPntAnz-1];
+/*N*/ long nAng1=0; if (aP1.X()<0) nAng1=18000; if (aP1.Y()>0) nAng1=27000;
+/*N*/ if (aP1.Y()<0) nAng1=9000; if (aP1.X()!=0 && aP1.Y()!=0) nAng1=1; // Schraeg!?!
+/*N*/ long nAng2=0; if (aP2.X()<0) nAng2=18000; if (aP2.Y()>0) nAng2=27000;
+/*N*/ if (aP2.Y()<0) nAng2=9000; if (aP2.X()!=0 && aP2.Y()!=0) nAng2=1; // Schraeg!?!
+/*N*/ if (nAng1!=nAngle1) nIntersections++;
+/*N*/ if (nAng2!=nAngle2) nIntersections++;
+/*N*/ }
+/*N*/
+/*N*/ // Fuer den Qualitaetscheck wieder die Original-Rects verwenden und
+/*N*/ // gleichzeitig checken, ob eins fuer die Edge-Berechnung verkleinert
+/*N*/ // wurde (z.B. Fall 2.9)
+/*N*/ aBewareRect1=rBewareRect1;
+/*N*/ aBewareRect2=rBewareRect2;
+/*N*/
+/*N*/ for (USHORT i=0; i<nPntAnz; i++) {
+/*N*/ Point aPt1(aXP1[i]);
+/*N*/ FASTBOOL b1=aPt1.X()>aBewareRect1.Left() && aPt1.X()<aBewareRect1.Right() &&
+/*N*/ aPt1.Y()>aBewareRect1.Top() && aPt1.Y()<aBewareRect1.Bottom();
+/*N*/ FASTBOOL b2=aPt1.X()>aBewareRect2.Left() && aPt1.X()<aBewareRect2.Right() &&
+/*N*/ aPt1.Y()>aBewareRect2.Top() && aPt1.Y()<aBewareRect2.Bottom();
+/*N*/ USHORT nInt0=nIntersections;
+/*N*/ if (i==0 || i==nPntAnz-1) {
+/*N*/ if (b1 && b2) nIntersections++;
+/*N*/ } else {
+/*N*/ if (b1) nIntersections++;
+/*N*/ if (b2) nIntersections++;
+/*N*/ }
+/*N*/ // und nun noch auf Ueberschneidungen checken
+/*N*/ if (i>0 && nInt0==nIntersections) {
+/*N*/ if (aPt0.Y()==aPt1.Y()) { // Horizontale Linie
+/*N*/ if (aPt0.Y()>aBewareRect1.Top() && aPt0.Y()<aBewareRect1.Bottom() &&
+/*N*/ ((aPt0.X()<=aBewareRect1.Left() && aPt1.X()>=aBewareRect1.Right()) ||
+/*N*/ (aPt1.X()<=aBewareRect1.Left() && aPt0.X()>=aBewareRect1.Right()))) nIntersections++;
+/*N*/ if (aPt0.Y()>aBewareRect2.Top() && aPt0.Y()<aBewareRect2.Bottom() &&
+/*N*/ ((aPt0.X()<=aBewareRect2.Left() && aPt1.X()>=aBewareRect2.Right()) ||
+/*N*/ (aPt1.X()<=aBewareRect2.Left() && aPt0.X()>=aBewareRect2.Right()))) nIntersections++;
+/*N*/ } else { // Vertikale Linie
+/*N*/ if (aPt0.X()>aBewareRect1.Left() && aPt0.X()<aBewareRect1.Right() &&
+/*N*/ ((aPt0.Y()<=aBewareRect1.Top() && aPt1.Y()>=aBewareRect1.Bottom()) ||
+/*N*/ (aPt1.Y()<=aBewareRect1.Top() && aPt0.Y()>=aBewareRect1.Bottom()))) nIntersections++;
+/*N*/ if (aPt0.X()>aBewareRect2.Left() && aPt0.X()<aBewareRect2.Right() &&
+/*N*/ ((aPt0.Y()<=aBewareRect2.Top() && aPt1.Y()>=aBewareRect2.Bottom()) ||
+/*N*/ (aPt1.Y()<=aBewareRect2.Top() && aPt0.Y()>=aBewareRect2.Bottom()))) nIntersections++;
+/*N*/ }
+/*N*/ }
+/*N*/ aPt0=aPt1;
+/*N*/ }
+/*N*/ if (nPntAnz<=1) nIntersections++;
+/*N*/ nQual0=nQual;
+/*N*/ nQual+=(ULONG)nIntersections*0x10000000;
+/*N*/ if (nQual<nQual0 || nIntersections>15) bOverflow=TRUE;
+/*N*/
+/*N*/ if (bOverflow || nQual==0xFFFFFFFF) nQual=0xFFFFFFFE;
+/*N*/ *pnQuality=nQual;
+/*N*/ }
+/*N*/ if (bInfo) { // nun die Linienversaetze auf aXP1 anwenden
+/*N*/ if (pInfo->nMiddleLine!=0xFFFF) {
+/*N*/ USHORT nIdx=pInfo->ImpGetPolyIdx(MIDDLELINE,aXP1);
+/*N*/ if (pInfo->ImpIsHorzLine(MIDDLELINE,aXP1)) {
+/*N*/ aXP1[nIdx].Y()+=pInfo->aMiddleLine.Y();
+/*N*/ aXP1[nIdx+1].Y()+=pInfo->aMiddleLine.Y();
+/*N*/ } else {
+/*N*/ aXP1[nIdx].X()+=pInfo->aMiddleLine.X();
+/*N*/ aXP1[nIdx+1].X()+=pInfo->aMiddleLine.X();
+/*N*/ }
+/*N*/ }
+/*N*/ if (pInfo->nObj1Lines>=2) {
+/*N*/ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ1LINE2,aXP1);
+/*N*/ if (pInfo->ImpIsHorzLine(OBJ1LINE2,aXP1)) {
+/*N*/ aXP1[nIdx].Y()+=pInfo->aObj1Line2.Y();
+/*N*/ aXP1[nIdx+1].Y()+=pInfo->aObj1Line2.Y();
+/*N*/ } else {
+/*N*/ aXP1[nIdx].X()+=pInfo->aObj1Line2.X();
+/*N*/ aXP1[nIdx+1].X()+=pInfo->aObj1Line2.X();
+/*N*/ }
+/*N*/ }
+/*N*/ if (pInfo->nObj1Lines>=3) {
+/*N*/ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ1LINE3,aXP1);
+/*N*/ if (pInfo->ImpIsHorzLine(OBJ1LINE3,aXP1)) {
+/*N*/ aXP1[nIdx].Y()+=pInfo->aObj1Line3.Y();
+/*N*/ aXP1[nIdx+1].Y()+=pInfo->aObj1Line3.Y();
+/*N*/ } else {
+/*N*/ aXP1[nIdx].X()+=pInfo->aObj1Line3.X();
+/*N*/ aXP1[nIdx+1].X()+=pInfo->aObj1Line3.X();
+/*N*/ }
+/*N*/ }
+/*N*/ if (pInfo->nObj2Lines>=2) {
+/*N*/ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ2LINE2,aXP1);
+/*N*/ if (pInfo->ImpIsHorzLine(OBJ2LINE2,aXP1)) {
+/*N*/ aXP1[nIdx].Y()+=pInfo->aObj2Line2.Y();
+/*N*/ aXP1[nIdx+1].Y()+=pInfo->aObj2Line2.Y();
+/*N*/ } else {
+/*N*/ aXP1[nIdx].X()+=pInfo->aObj2Line2.X();
+/*N*/ aXP1[nIdx+1].X()+=pInfo->aObj2Line2.X();
+/*N*/ }
+/*N*/ }
+/*N*/ if (pInfo->nObj2Lines>=3) {
+/*N*/ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ2LINE3,aXP1);
+/*N*/ if (pInfo->ImpIsHorzLine(OBJ2LINE3,aXP1)) {
+/*N*/ aXP1[nIdx].Y()+=pInfo->aObj2Line3.Y();
+/*N*/ aXP1[nIdx+1].Y()+=pInfo->aObj2Line3.Y();
+/*N*/ } else {
+/*N*/ aXP1[nIdx].X()+=pInfo->aObj2Line3.X();
+/*N*/ aXP1[nIdx+1].X()+=pInfo->aObj2Line3.X();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ // Nun mache ich ggf. aus dem Verbinder eine Bezierkurve
+/*N*/ 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]
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ return aXP1;
+/*N*/ }
+
+/*
+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
+*/
+
+/*N*/ void __EXPORT SdrEdgeObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId&, const SfxHint& rHint, const TypeId&)
+/*N*/ {
+/*N*/ SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint);
+/*N*/ ULONG nId=pSimple==0 ? 0 : pSimple->GetId();
+/*N*/ FASTBOOL bDataChg=nId==SFX_HINT_DATACHANGED;
+/*N*/ FASTBOOL bDying=nId==SFX_HINT_DYING;
+/*N*/ FASTBOOL bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC;
+/*N*/ FASTBOOL bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC;
+/*N*/ if (bDying && (bObj1 || bObj2)) {
+/*N*/ // #35605# Dying vorher abfangen, damit AttrObj nicht
+/*N*/ // wg. vermeintlicher Vorlagenaenderung rumbroadcastet
+/*N*/ if (bObj1) aCon1.pObj=NULL;
+/*N*/ if (bObj2) aCon2.pObj=NULL;
+/*N*/ return; // Und mehr braucht hier nicht getan werden.
+/*N*/ }
+/*N*/ SdrTextObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ if (nNotifyingCount==0) { // Hier nun auch ein VerriegelungsFlag
+/*N*/ ((SdrEdgeObj*)this)->nNotifyingCount++;
+/*N*/ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+/*N*/ if (bDataChg) { // StyleSheet geaendert
+/*N*/ ImpSetAttrToEdgeInfo(); // Werte bei Vorlagenaenderung vom Pool nach aEdgeInfo kopieren
+/*N*/ }
+/*N*/ if (bDataChg ||
+/*N*/ (bObj1 && aCon1.pObj->GetPage()==pPage) ||
+/*N*/ (bObj2 && aCon2.pObj->GetPage()==pPage) ||
+/*N*/ (pSdrHint && pSdrHint->GetKind()==HINT_OBJREMOVED))
+/*N*/ {
+/*N*/ // Broadcasting nur, wenn auf der selben Page
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ if (!bEdgeTrackDirty) SendRepaintBroadcast();
+/*N*/ bEdgeTrackDirty=TRUE;
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ ((SdrEdgeObj*)this)->nNotifyingCount--;
+/*N*/ }
+/*N*/ }
+
+/** updates edges that are connected to the edges of this object
+ as if the connected objects send a repaint broadcast
+ #103122#
+*/
+/*N*/ void SdrEdgeObj::Reformat()
+/*N*/ {
+/*N*/ if( NULL != aCon1.pObj )
+/*N*/ {
+/*N*/ SfxSimpleHint aHint( SFX_HINT_DATACHANGED );
+/*N*/ SFX_NOTIFY( *const_cast<SfxBroadcaster*>(aCon1.pObj->GetBroadcaster()), NULL, aHint, NULL );
+/*N*/ }
+/*N*/
+/*N*/ if( NULL != aCon2.pObj )
+/*N*/ {
+/*N*/ SfxSimpleHint aHint( SFX_HINT_DATACHANGED );
+/*N*/ SFX_NOTIFY( *const_cast<SfxBroadcaster*>(aCon2.pObj->GetBroadcaster()), NULL, aHint, NULL );
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ Rectangle aOld(GetSnapRect());
+/*N*/ long nMulX = rRect.Right() - rRect.Left();
+/*N*/ long nDivX = aOld.Right() - aOld.Left();
+/*N*/ long nMulY = rRect.Bottom() - rRect.Top();
+/*N*/ long nDivY = aOld.Bottom() - aOld.Top();
+/*N*/ if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
+/*N*/ if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
+/*N*/ Fraction aX(nMulX, nDivX);
+/*N*/ Fraction aY(nMulY, nDivY);
+/*N*/ NbcResize(aOld.TopLeft(), aX, aY);
+/*N*/ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+/*N*/ }
+
+/*N*/ void SdrEdgeObj::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ SdrTextObj::NbcMove(rSiz);
+/*N*/ MoveXPoly(*pEdgeTrack,rSiz);
+/*N*/ }
+
+/*N*/ void SdrEdgeObj::NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact)
+/*N*/ {
+/*N*/ SdrTextObj::NbcResize(rRefPnt,aXFact,aXFact);
+/*N*/ ResizeXPoly(*pEdgeTrack,rRefPnt,aXFact,aYFact);
+/*N*/
+/*N*/ // #75371# if resize is not from paste, forget user distances
+/*N*/ if(!GetModel()->IsPasteResize())
+/*N*/ {
+/*N*/ // #75735#
+/*N*/ aEdgeInfo.aObj1Line2 = Point();
+/*N*/ aEdgeInfo.aObj1Line3 = Point();
+/*N*/ aEdgeInfo.aObj2Line2 = Point();
+/*N*/ aEdgeInfo.aObj2Line3 = Point();
+/*N*/ aEdgeInfo.aMiddleLine = Point();
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+/*N*/ void SdrEdgeObj::NbcSetPoint(const Point& rPnt, USHORT i)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ // ToDo: Umconnekten fehlt noch
+/*N*/ }
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrEdgeObj::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::PreSave();
+/*N*/
+/*N*/ // prepare SetItems for storage
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/ const SfxItemSet* pParent = GetStyleSheet() ? &GetStyleSheet()->GetItemSet() : 0L;
+/*N*/ SdrEdgeSetItem aEdgeAttr(rSet.GetPool());
+/*N*/ aEdgeAttr.GetItemSet().Put(rSet);
+/*N*/ aEdgeAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aEdgeAttr);
+/*N*/ }
+
+/*N*/ void SdrEdgeObj::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::PostSave();
+/*N*/
+/*N*/ // remove SetItems from local itemset
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_EDGE);
+/*N*/ }
+/*N*/
+/*N*/ ////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/
+/*N*/ void SdrEdgeObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrTextObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrEdgeObj");
+/*N*/ #endif
+/*N*/
+/*N*/ {
+/*N*/ SdrDownCompat aTrackCompat(rOut,STREAM_WRITE); // ab V11 eingepackt
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aTrackCompat.SetID("SdrEdgeObj(EdgeTrack)");
+/*N*/ #endif
+/*N*/ rOut << *pEdgeTrack;
+/*N*/ }
+/*N*/
+/*N*/ aCon1.Write(rOut, this); // Die Connections haben
+/*N*/ aCon2.Write(rOut, this); // ihren eigenen Header
+/*N*/
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_EDGE));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rOut << UINT16(SFX_ITEMS_NULL);
+/*N*/ }
+/*N*/
+/*N*/ rOut << aEdgeInfo;
+/*N*/ }
+/*N*/
+/*N*/ void SdrEdgeObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrTextObj::ReadData(rHead,rIn);
+/*N*/ if (rHead.GetVersion()<2) { // frueher war EdgeObj von PathObj abgeleitet
+/*N*/ DBG_ERROR("SdrEdgeObj::ReadData(): Dateiversion<2 wird nicht mehr unterstuetzt");
+/*N*/ rIn.SetError(SVSTREAM_WRONGVERSION); // Format-Fehler, File zu alt
+/*N*/ return;
+/*N*/ }
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrEdgeObj");
+/*N*/ #endif
+/*N*/ if (rHead.GetVersion()>=11) { // ab V11 ist alles eingepackt
+/*N*/ {
+/*N*/ SdrDownCompat aTrackCompat(rIn,STREAM_READ); // ab V11 eingepackt
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aTrackCompat.SetID("SdrEdgeObj(EdgeTrack)");
+/*N*/ #endif
+/*N*/ rIn>>*pEdgeTrack;
+/*N*/ }
+/*N*/ aCon1.Read(rIn,this); // Die Connections haben
+/*N*/ aCon2.Read(rIn,this); // ihren eigenen Header.
+/*N*/ } else {
+/*N*/ rIn>>*pEdgeTrack;
+/*N*/ if (rHead.GetBytesLeft()>0) { // Aha, da ist noch mehr (Verbindungsdaten)
+/*N*/ aCon1.ReadTilV10(rIn,this); // Import der
+/*N*/ aCon2.ReadTilV10(rIn,this); // Connections
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(aCompat.GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ // ab 10-08-1996 (noch Vers 12) Items fuer Verbinder
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ sal_uInt16 nSetID = SDRATTRSET_EDGE;
+/*N*/ const SdrEdgeSetItem* pEdgeAttr = (const SdrEdgeSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pEdgeAttr)
+/*N*/ SetItemSet(pEdgeAttr->GetItemSet());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nSuroDum;
+/*N*/ rIn >> nSuroDum;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(aCompat.GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ // ab 14-01-1997 (noch Vers 12) EdgeInfoRec
+/*N*/ rIn >> aEdgeInfo;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ void SdrEdgeObj::AfterRead()
+/*N*/ {
+/*N*/ SdrTextObj::AfterRead();
+/*N*/ aCon1.AfterRead(this);
+/*N*/ aCon2.AfterRead(this);
+/*N*/ if (aCon1.pObj!=NULL) aCon1.pObj->AddListener(*this);
+/*N*/ if (aCon2.pObj!=NULL) aCon2.pObj->AddListener(*this);
+/*N*/
+/*N*/ // #84026# always recalculate edgetrack after load
+/*N*/ bEdgeTrackDirty=TRUE;
+/*N*/ }
+/*N*/
+/*N*/ Point SdrEdgeObj::GetTailPoint( BOOL bTail ) const
+/*N*/ {
+/*N*/ if( pEdgeTrack && pEdgeTrack->GetPointCount()!=0)
+/*N*/ {
+/*N*/ const XPolygon& rTrack0 = *pEdgeTrack;
+/*N*/ if(bTail)
+/*N*/ {
+/*N*/ return rTrack0[0];
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ const USHORT nSiz = rTrack0.GetPointCount() - 1;
+/*N*/ return rTrack0[nSiz];
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(bTail)
+/*N*/ return aOutRect.TopLeft();
+/*N*/ else
+/*N*/ return aOutRect.BottomRight();
+/*N*/ }
+/*N*/
+/*N*/ }
+/*N*/
+/*N*/ void SdrEdgeObj::SetTailPoint( BOOL bTail, const Point& rPt )
+/*N*/ {
+/*N*/ ImpSetTailPoint( bTail, rPt );
+/*N*/ SetChanged();
+/*N*/ }
+
+/** this method is used by the api to set a glue point for a connection
+ nId == -1 : The best default point is automaticly choosen
+ 0 <= nId <= 3 : One of the default points is choosen
+ nId >= 4 : A user defined glue point is choosen
+*/
+/*N*/ void SdrEdgeObj::setGluePointIndex( sal_Bool bTail, sal_Int32 nIndex /* = -1 */ )
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/
+/*N*/ SdrObjConnection& rConn1 = GetConnection( bTail );
+/*N*/
+/*N*/ rConn1.SetAutoVertex( nIndex >= 0 && nIndex <= 3 );
+/*N*/ rConn1.SetBestConnection( nIndex < 0 );
+/*N*/ rConn1.SetBestVertex( nIndex < 0 );
+/*N*/
+/*N*/ if( nIndex > 3 )
+/*N*/ {
+/*N*/ nIndex -= 4;
+/*N*/ // for user defined glue points we have
+/*N*/ // to get the id for this index first
+/*N*/ const SdrGluePointList* pList = rConn1.GetObject() ? rConn1.GetObject()->GetGluePointList() : NULL;
+/*N*/ if( pList == NULL || SDRGLUEPOINT_NOTFOUND == pList->FindGluePoint((sal_uInt16)nIndex) )
+/*N*/ return;
+/*N*/ }
+/*N*/ else if( nIndex < 0 )
+/*N*/ {
+/*N*/ nIndex = 0;
+/*N*/ }
+/*N*/
+/*N*/ rConn1.SetConnectorId( (USHORT)nIndex );
+/*N*/
+/*N*/ SetChanged();
+/*N*/ SetRectsDirty();
+/*N*/ ImpRecalcEdgeTrack();
+/*N*/ bEdgeTrackDirty=TRUE;
+/*N*/ }
+
+/** this method is used by the api to return a glue point id for a connection.
+ See setGluePointId for possible return values */
+/*N*/ sal_Int32 SdrEdgeObj::getGluePointIndex( sal_Bool bTail )
+/*N*/ {
+/*N*/ SdrObjConnection& rConn1 = GetConnection( bTail );
+/*N*/ sal_Int32 nId = -1;
+/*N*/ if( !rConn1.IsBestConnection() )
+/*N*/ {
+/*N*/ nId = rConn1.GetConnectorId();
+/*N*/ if( !rConn1.IsAutoVertex() )
+/*N*/ nId += 4;
+/*N*/ }
+/*N*/ return nId;
+/*N*/ }
+
+// #102344# Implementation was missing; edge track needs to be invalidated additionally.
+/*N*/ void SdrEdgeObj::NbcSetAnchorPos(const Point& rPnt)
+/*N*/ {
+/*N*/ // call parent functionality
+/*N*/ SdrTextObj::NbcSetAnchorPos(rPnt);
+/*N*/
+/*N*/ // Additionally, invalidate edge track
+/*N*/ bEdgeTrackDirty = TRUE;
+/*N*/ }
+
+// eof
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdograf.cxx b/binfilter/bf_svx/source/svdraw/svx_svdograf.cxx
new file mode 100644
index 000000000000..8719c2399d04
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdograf.cxx
@@ -0,0 +1,1606 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _ANIMATION
+#define ITEMID_GRF_CROP 0
+
+#ifndef SVX_LIGHT
+#include <bf_so3/lnkbase.hxx>
+#else
+#endif
+
+#include <math.h>
+#include <vcl/salbtype.hxx>
+#include <sot/formats.hxx>
+#include <bf_so3/svstor.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/localfilehelper.hxx>
+#include <bf_svtools/style.hxx>
+#include <bf_svtools/urihelper.hxx>
+#include "linkmgr.hxx"
+#include "svdio.hxx"
+#include "svdglob.hxx"
+#include "svdstr.hrc"
+#include "svdpool.hxx"
+#include "svdpagv.hxx"
+#include "svdviter.hxx"
+#include "svdview.hxx"
+#include "impgrf.hxx"
+#include "svdograf.hxx"
+#include "sdgcpitm.hxx"
+
+#include "eeitem.hxx"
+
+#include "xoutx.hxx"
+
+#include "bf_so3/staticbaseurl.hxx"
+namespace binfilter {
+
+// -----------
+// - Defines -
+// -----------
+
+#define GRAFSTREAMPOS_INVALID 0xffffffff
+
+#ifndef SVX_LIGHT
+
+// ------------------
+// - SdrGraphicLink -
+// ------------------
+
+/*N*/ class SdrGraphicLink : public ::binfilter::SvBaseLink
+/*N*/ {
+/*N*/ SdrGrafObj* pGrafObj;
+/*N*/
+/*N*/ public:
+/*N*/ SdrGraphicLink(SdrGrafObj* pObj);
+/*N*/ virtual ~SdrGraphicLink();
+/*N*/
+/*N*/ virtual void Closed();
+/*N*/ virtual void DataChanged( const String& rMimeType,
+/*N*/ const ::com::sun::star::uno::Any & rValue );
+/*N*/
+/*N*/ BOOL Connect() { return 0 != GetRealObject(); }
+/*N*/ void UpdateSynchron();
+/*N*/ };
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj):
+/*N*/ ::binfilter::SvBaseLink( ::binfilter::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ),
+/*N*/ pGrafObj(pObj)
+/*N*/ {
+/*N*/ SetSynchron( FALSE );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrGraphicLink::~SdrGraphicLink()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGraphicLink::DataChanged( const String& rMimeType,
+/*N*/ const ::com::sun::star::uno::Any & rValue )
+/*N*/ {
+/*N*/ SdrModel* pModel = pGrafObj ? pGrafObj->GetModel() : 0;
+/*N*/ SvxLinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
+/*N*/
+/*N*/ if( pLinkManager && rValue.hasValue() )
+/*N*/ {
+/*N*/ pLinkManager->GetDisplayNames( this, 0, &pGrafObj->aFileName, 0, &pGrafObj->aFilterName );
+/*N*/
+/*N*/ Graphic aGraphic;
+/*N*/ if( SvxLinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic ))
+/*N*/ {
+/*?*/ GraphicType eOldGraphicType = pGrafObj->GetGraphicType(); // kein Hereinswappen
+/*?*/ BOOL bIsChanged = pModel->IsChanged();
+/*?*/
+/*?*/ pGrafObj->SetGraphic( aGraphic );
+/*?*/ if( GRAPHIC_NONE != eOldGraphicType )
+/*?*/ pGrafObj->SetChanged();
+/*?*/ else
+/*?*/ pModel->SetChanged( bIsChanged );
+/*N*/ }
+/*N*/ else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) !=
+/*N*/ SvxLinkManager::RegisterStatusInfoId() )
+/*?*/ pGrafObj->SendRepaintBroadcast();
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGraphicLink::Closed()
+/*N*/ {
+/*N*/ // Die Verbindung wird aufgehoben; pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
+/*N*/ pGrafObj->ForceSwapIn();
+/*N*/ pGrafObj->pGraphicLink=NULL;
+/*N*/ pGrafObj->ReleaseGraphicLink();
+/*N*/ SvBaseLink::Closed();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGraphicLink::UpdateSynchron()
+/*N*/ {
+/*N*/ if( GetObj() )
+/*N*/ {
+/*N*/ String aMimeType( SotExchange::GetFormatMimeType( GetContentType() ));
+/*N*/ ::com::sun::star::uno::Any aValue;
+/*N*/ GetObj()->GetData( aValue, aMimeType, TRUE );
+/*N*/ DataChanged( aMimeType, aValue );
+/*N*/ }
+/*N*/ }
+
+#else
+
+/*?*/ GraphicFilter* SVX_LIGHT_pGrapicFilter = NULL;
+/*?*/
+/*?*/ GraphicFilter* GetGrfFilter()
+/*?*/ {
+/*?*/ if( !SVX_LIGHT_pGrapicFilter )
+/*?*/ {
+/*?*/ const SvtPathOptions aPathOptions;
+/*?*/
+/*?*/ SVX_LIGHT_pGrapicFilter = new GraphicFilter( FALSE );
+/*?*/ SVX_LIGHT_pGrapicFilter->SetFilterPath( aPathOptions.GetFilterPath() );
+/*?*/ }
+/*?*/
+/*?*/ return SVX_LIGHT_pGrapicFilter;
+/*?*/ }
+
+
+#endif // SVX_LIGHT
+
+// --------------
+// - SdrGrafObj -
+// --------------
+
+/*N*/ TYPEINIT1(SdrGrafObj,SdrRectObj);
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrGrafObj::SdrGrafObj():
+/*N*/ bMirrored ( FALSE ),
+/*N*/ pGraphicLink ( NULL )
+/*N*/ {
+/*N*/ pGraphic = new BfGraphicObject;
+/*N*/ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), 20000 );
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/ bNoShear = TRUE;
+/*N*/ bCopyToPoolOnAfterRead = FALSE;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ SdrGrafObj::SdrGrafObj( const Graphic& rGrf ):
+/*?*/ bMirrored ( FALSE ),
+/*?*/ pGraphicLink ( NULL )
+/*?*/ {
+/*?*/ pGraphic = new BfGraphicObject( rGrf );
+/*?*/ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), 20000 );
+/*?*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*?*/ bNoShear = TRUE;
+/*?*/ bCopyToPoolOnAfterRead = FALSE;
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrGrafObj::~SdrGrafObj()
+/*N*/ {
+/*N*/ delete pGraphic;
+/*N*/ ImpLinkAbmeldung();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetGraphicObject( const BfGraphicObject& rGrfObj )
+/*N*/ {
+/*N*/ *pGraphic = rGrfObj;
+/*N*/ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), 20000 );
+/*N*/ pGraphic->SetUserData();
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ const BfGraphicObject& SdrGrafObj::GetGraphicObject() const
+/*N*/ {
+/*N*/ ForceSwapIn();
+/*N*/ return *pGraphic;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+/*N*/ {
+/*N*/ pGraphic->SetGraphic( rGrf );
+/*N*/ pGraphic->SetUserData();
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ const Graphic& SdrGrafObj::GetGraphic() const
+/*N*/ {
+/*N*/ ForceSwapIn();
+/*N*/ return pGraphic->GetGraphic();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ GraphicType SdrGrafObj::GetGraphicType() const
+/*N*/ {
+/*N*/ return pGraphic->GetType();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetGrafStreamURL( const String& rGraphicStreamURL )
+/*N*/ {
+/*N*/ if( !rGraphicStreamURL.Len() )
+/*N*/ {
+/*N*/ pGraphic->SetUserData();
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/ }
+/*N*/ else if( pModel->IsSwapGraphics() )
+/*N*/ {
+/*N*/ pGraphic->SetUserData( rGraphicStreamURL );
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/
+/*N*/ // set state of graphic object to 'swapped out'
+/*N*/ if( pGraphic->GetType() == GRAPHIC_NONE )
+/*?*/ pGraphic->SetSwapState();
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ String SdrGrafObj::GetGrafStreamURL() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); String aString; return aString;//STRIP001
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetName(const XubString& rStr)
+/*N*/ {
+/*N*/ aName = rStr;
+/*N*/ SetChanged();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ XubString SdrGrafObj::GetName() const
+/*N*/ {
+/*N*/ return aName;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ForceSwapIn() const
+/*N*/ {
+/*N*/ pGraphic->FireSwapInRequest();
+/*N*/
+/*N*/ if( pGraphic->IsSwappedOut() ||
+/*N*/ ( pGraphic->GetType() == GRAPHIC_NONE ) ||
+/*N*/ ( pGraphic->GetType() == GRAPHIC_DEFAULT ) )
+/*N*/ {
+/*N*/ Graphic aDefaultGraphic;
+/*N*/ aDefaultGraphic.SetDefaultType();
+/*N*/ pGraphic->SetGraphic( aDefaultGraphic );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ForceSwapOut() const
+/*N*/ {
+/*N*/ pGraphic->FireSwapOutRequest();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ImpLinkAnmeldung()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/
+/*N*/ SvxLinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+/*N*/
+/*N*/ if( pLinkManager != NULL && pGraphicLink == NULL )
+/*N*/ {
+/*N*/ if( aFileName.Len() )
+/*N*/ {
+/*N*/ pGraphicLink = new SdrGraphicLink( this );
+/*N*/ pLinkManager->InsertFileLink( *pGraphicLink, OBJECT_CLIENT_GRF, aFileName, ( aFilterName.Len() ? &aFilterName : NULL ), NULL );
+/*N*/ pGraphicLink->Connect();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ #endif // SVX_LIGHT
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ImpLinkAbmeldung()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/
+/*N*/ SvxLinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+/*N*/
+/*N*/ if( pLinkManager != NULL && pGraphicLink!=NULL)
+/*N*/ {
+/*?*/ // Bei Remove wird *pGraphicLink implizit deleted
+/*?*/ pLinkManager->Remove( pGraphicLink );
+/*?*/ pGraphicLink=NULL;
+/*N*/ }
+/*N*/
+/*N*/ #endif // SVX_LIGHT
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetGraphicLink( const String& rFileName, const String& rFilterName )
+/*N*/ {
+/*N*/ ImpLinkAbmeldung();
+/*N*/ aFileName = rFileName;
+/*N*/ aFilterName = rFilterName;
+/*N*/ ImpLinkAnmeldung();
+/*N*/ pGraphic->SetUserData();
+/*N*/
+/*N*/ // #92205# A linked graphic is per definition swapped out (has to be loaded)
+/*N*/ pGraphic->SetSwapState();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ReleaseGraphicLink()
+/*N*/ {
+/*N*/ ImpLinkAbmeldung();
+/*N*/ aFileName = String();
+/*N*/ aFilterName = String();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ UINT16 SdrGrafObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16( OBJ_GRAF );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ sal_Bool SdrGrafObj::ImpUpdateGraphicLink() const
+/*N*/ {
+/*N*/ sal_Bool bRet = sal_False;
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( pGraphicLink )
+/*N*/ {
+/*N*/ BOOL bIsChanged = pModel->IsChanged();
+/*N*/ pGraphicLink->UpdateSynchron();
+/*N*/ pModel->SetChanged( bIsChanged );
+/*N*/
+/*N*/ bRet = sal_True;
+/*N*/ }
+/*N*/ #else
+/*N*/ if( aFileName.Len() )
+/*N*/ {
+/*N*/ // #92205# Load linked graphics for player
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aFileName, STREAM_READ | STREAM_SHARE_DENYNONE );
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ {
+/*N*/ Graphic aGraphic;
+/*N*/ GraphicFilter* pFilter = GetGrfFilter();
+/*N*/ USHORT nError = pFilter->ImportGraphic( aGraphic, aFileName, *pIStm );
+/*N*/
+/*N*/ pGraphic->SetGraphic( aGraphic );
+/*N*/
+/*N*/ delete pIStm;
+/*N*/ }
+/*N*/
+/*N*/ bRet = sal_True;
+/*N*/ }
+/*N*/ #endif
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+// Liefert FALSE, wenn die Pres-Bitmap zu gross ist
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ImpPaintReplacement(OutputDevice* pOutDev, const XubString& rText, const Bitmap* pBmp, FASTBOOL bFill) const
+/*N*/ {
+/*N*/ Size aPixelSize( 1, 1 );
+/*N*/ Size aBmpSize;
+/*N*/
+/*N*/ aPixelSize = Application::GetDefaultDevice()->PixelToLogic( aPixelSize, pOutDev->GetMapMode() );
+/*N*/
+/*N*/ if( bFill )
+/*N*/ {
+/*?*/ pOutDev->SetLineColor();
+/*?*/ pOutDev->SetFillColor( COL_LIGHTGRAY );
+/*N*/ }
+/*N*/
+/*N*/ Rectangle aRect1( aRect );
+/*N*/ Rectangle aRect2( aRect1 );
+/*N*/ Rectangle aTextRect( aRect1 );
+/*N*/ Point aTopLeft( aRect1.TopLeft() );
+/*N*/ Point aBmpPos( aTopLeft );
+/*N*/
+/*N*/ aRect2.Left() += aPixelSize.Width();
+/*N*/ aRect2.Top() += aPixelSize.Height();
+/*N*/ aRect2.Right() -= aPixelSize.Width();
+/*N*/ aRect2.Bottom() -= aPixelSize.Height();
+/*N*/
+/*N*/ if( pBmp != NULL )
+/*N*/ {
+/*N*/ aBmpSize = Size( Application::GetDefaultDevice()->PixelToLogic( pBmp->GetSizePixel(), pOutDev->GetMapMode() ) );
+/*N*/
+/*N*/ long nRectWdt = aTextRect.Right() - aTextRect.Left();
+/*N*/ long nRectHgt = aTextRect.Bottom() - aTextRect.Top();
+/*N*/ long nBmpWdt = aBmpSize.Width();
+/*N*/ long nBmpHgt = aBmpSize.Height();
+/*N*/ long nMinWdt = nBmpWdt;
+/*N*/ long nMinHgt = nBmpHgt;
+/*N*/ BOOL bText = rText.Len() > 0;
+/*N*/
+/*N*/ if( bText )
+/*N*/ {
+/*N*/ nMinWdt= 2 * nBmpWdt + 5 * aPixelSize.Width();
+/*N*/ nMinHgt= 2 * nBmpHgt + 5 * aPixelSize.Height();
+/*N*/ }
+/*N*/
+/*N*/ if( nRectWdt < nMinWdt || nRectHgt < nMinHgt )
+/*N*/ pBmp=NULL;
+/*N*/ else
+/*N*/ {
+/*N*/ aTextRect.Left() += nBmpWdt;
+/*N*/
+/*N*/ if( bText )
+/*N*/ aTextRect.Left() += 5 * aPixelSize.Width();
+/*N*/ }
+/*N*/
+/*N*/ aBmpPos.X() += 2 * aPixelSize.Width();
+/*N*/ aBmpPos.Y() += 2 * aPixelSize.Height();
+/*N*/
+/*N*/ if( aGeo.nDrehWink != 0 )
+/*N*/ {
+/*N*/ Point aRef( aBmpPos.X() - aBmpSize.Width() / 2 + 2 * aPixelSize.Width(),
+/*N*/ aBmpPos.Y() - aBmpSize.Height() / 2 + 2 * aPixelSize.Height() );
+/*N*/ double nSin = sin( aGeo.nDrehWink * nPi180 );
+/*N*/ double nCos = cos( aGeo.nDrehWink * nPi180 );
+/*N*/
+/*N*/ RotatePoint( aBmpPos, aRef, nSin, nCos );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( aGeo.nDrehWink == 0 && aGeo.nShearWink == 0 )
+/*N*/ {
+/*N*/ const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
+/*N*/
+/*N*/ if( bFill )
+/*N*/ pOutDev->DrawRect( aRect );
+/*N*/
+/*N*/ if( pBmp!=NULL )
+/*N*/ pOutDev->DrawBitmap( aBmpPos, aBmpSize, *pBmp );
+/*N*/
+/*N*/ pOutDev->SetFillColor();
+/*N*/ pOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
+/*N*/ pOutDev->DrawLine( aRect1.TopLeft(), aRect1.TopRight() );
+/*N*/ pOutDev->DrawLine( aRect1.TopLeft(), aRect1.BottomLeft() );
+/*N*/
+/*N*/ pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
+/*N*/ pOutDev->DrawLine( aRect1.TopRight(), aRect1.BottomRight() );
+/*N*/ pOutDev->DrawLine( aRect1.BottomLeft(), aRect1.BottomRight() );
+/*N*/
+/*N*/ pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
+/*N*/ pOutDev->DrawLine( aRect2.TopLeft(), aRect2.TopRight() );
+/*N*/ pOutDev->DrawLine( aRect2.TopLeft(), aRect2.BottomLeft() );
+/*N*/
+/*N*/ pOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
+/*N*/ pOutDev->DrawLine( aRect2.TopRight(), aRect2.BottomRight() );
+/*N*/ pOutDev->DrawLine( aRect2.BottomLeft(), aRect2.BottomRight() );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Polygon aPoly1( Rect2Poly( aRect1, aGeo ) );
+/*N*/ Polygon aPoly2(5);
+/*N*/
+/*N*/ aPoly2[0] = aRect2.TopLeft();
+/*N*/ aPoly2[1] = aRect2.TopRight();
+/*N*/ aPoly2[2] = aRect2.BottomRight();
+/*N*/ aPoly2[3] = aRect2.BottomLeft();
+/*N*/ aPoly2[4] = aRect2.TopLeft();
+/*N*/
+/*N*/ if( aGeo.nShearWink != 0 )
+/*?*/ ShearPoly( aPoly2, aTopLeft, aGeo.nTan );
+/*N*/
+/*N*/ if( aGeo.nDrehWink != 0 )
+/*N*/ RotatePoly( aPoly2, aTopLeft, aGeo.nSin, aGeo.nCos );
+/*N*/
+/*N*/ if( bFill )
+/*?*/ pOutDev->DrawPolygon( aPoly1 );
+/*N*/
+/*N*/ if( pBmp != NULL )
+/*N*/ pOutDev->DrawBitmap( aBmpPos, aBmpSize, *pBmp );
+/*N*/
+/*N*/ pOutDev->SetFillColor();
+/*N*/
+/*N*/ const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
+/*N*/ Color a3DLightColor( rStyleSettings.GetLightColor() );
+/*N*/ Color a3DShadowColor( rStyleSettings.GetShadowColor() );
+/*N*/ long nHWink=NormAngle360( aGeo.nDrehWink );
+/*N*/ long nVWink=NormAngle360( aGeo.nDrehWink-aGeo.nShearWink );
+/*N*/ FASTBOOL bHorzChg=nHWink>13500 && nHWink<=31500;
+/*N*/ FASTBOOL bVertChg=nVWink>4500 && nVWink<=22500;
+/*N*/
+/*N*/ pOutDev->SetLineColor( bHorzChg ? a3DShadowColor : a3DLightColor);
+/*N*/ pOutDev->DrawLine( aPoly2[0], aPoly2[1] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bHorzChg ? a3DLightColor : a3DShadowColor);
+/*N*/ pOutDev->DrawLine( aPoly2[2], aPoly2[3] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bVertChg ? a3DLightColor : a3DShadowColor);
+/*N*/ pOutDev->DrawLine( aPoly2[1], aPoly2[2] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bVertChg ? a3DShadowColor : a3DLightColor);
+/*N*/ pOutDev->DrawLine( aPoly2[3], aPoly2[4] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bHorzChg ? a3DLightColor : a3DShadowColor);
+/*N*/ pOutDev->DrawLine( aPoly1[0], aPoly1[1] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bHorzChg ? a3DShadowColor : a3DLightColor);
+/*N*/ pOutDev->DrawLine( aPoly1[2], aPoly1[3] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bVertChg ? a3DShadowColor : a3DLightColor);
+/*N*/ pOutDev->DrawLine( aPoly1[1], aPoly1[2] );
+/*N*/
+/*N*/ pOutDev->SetLineColor( bVertChg ? a3DLightColor : a3DShadowColor);
+/*N*/ pOutDev->DrawLine( aPoly1[3], aPoly1[4] );
+/*N*/ }
+/*N*/
+/*N*/ XubString aNam( rText );
+/*N*/
+/*N*/ if( aNam.Len() )
+/*N*/ {
+/*?*/ Size aOutSize( aTextRect.GetWidth() - 6 * aPixelSize.Width(),
+/*?*/ aTextRect.GetHeight() - 6 * aPixelSize.Height() );
+/*?*/
+/*?*/ if( aOutSize.Width() >= ( 4 * aPixelSize.Width() ) ||
+/*?*/ aOutSize.Height() >= ( 4 * aPixelSize.Height() ) )
+/*?*/ {
+/*?*/ Point aOutPos( aTextRect.Left() + 3 * aPixelSize.Width(),
+/*?*/ aTextRect.Top() + 3 * aPixelSize.Height() );
+/*?*/ long nMaxOutY = aOutPos.Y() + aOutSize.Height();
+/*?*/ Font aFontMerk( pOutDev->GetFont() );
+/*?*/ Font aFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ) );
+/*?*/
+/*?*/ aFont.SetColor( COL_LIGHTRED );
+/*?*/ aFont.SetTransparent( TRUE );
+/*?*/ aFont.SetOrientation( USHORT( NormAngle360( aGeo.nDrehWink ) / 10 ) );
+/*?*/
+/*?*/ if( IsLinkedGraphic() )
+/*?*/ aFont.SetUnderline( UNDERLINE_SINGLE );
+/*?*/
+/*?*/ Size aFontSize( 0, ( aGeo.nDrehWink % 9000 == 0 ? 12 : 14 ) * aPixelSize.Height() );
+/*?*/
+/*?*/ 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 );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ FASTBOOL SdrGrafObj::Paint( ExtOutputDevice& rOut, const SdrPaintInfoRec& rInfoRec ) const
+/*N*/ {
+/*N*/ // Hidden objects on masterpages, draw nothing
+/*N*/ if( ( ( rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE ) && bNotVisibleAsMaster ) ||
+/*N*/ ( ( OUTDEV_PRINTER == rOut.GetOutDev()->GetOutDevType() ) && bEmptyPresObj ) )
+/*N*/ {
+/*?*/ return TRUE;
+/*N*/ }
+/*N*/
+/*N*/ FASTBOOL bDraft = ( 0 != ( rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTGRAF ) );
+/*N*/ FASTBOOL bSwappedOut = pGraphic->IsSwappedOut() || ( pGraphic->GetType() == GRAPHIC_NONE );
+/*N*/ FASTBOOL bLoading = FALSE;
+/*N*/ OutputDevice* pOutDev = rOut.GetOutDev();
+/*N*/ GDIMetaFile* pRecMetaFile = pOutDev->GetConnectMetaFile();
+/*N*/ FASTBOOL bMtfRecording = ( pRecMetaFile && pRecMetaFile->IsRecord() && !pRecMetaFile->IsPause() );
+/*N*/ const SdrView* pView = ( rInfoRec.pPV ? &rInfoRec.pPV->GetView() : NULL );
+/*N*/
+/*N*/ if( bSwappedOut && !bDraft )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ if( pGraphic->IsSwappedOut() || ( pGraphic->GetType() == GRAPHIC_NONE ) || ( pGraphic->GetType() == GRAPHIC_DEFAULT ) )
+/*?*/ bDraft=TRUE;
+/*N*/
+/*N*/ long nDrehWink = aGeo.nDrehWink, nShearWink = aGeo.nShearWink;
+/*N*/ FASTBOOL bRotate = ( nDrehWink != 0 && nDrehWink != 18000 );
+/*N*/ FASTBOOL bShear = ( nShearWink != 0 );
+/*N*/ FASTBOOL bRota180 = nDrehWink == 18000;
+/*N*/ USHORT nMirrorCase = ( bRota180 ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ) ); // 4 | 3 H&V gespiegelt | nur Vertikal
+/*N*/ FASTBOOL bHMirr = ( ( 2 == nMirrorCase ) || ( 4 == nMirrorCase ) ); // ---+--- ---------------+-----------------
+/*N*/ FASTBOOL bVMirr = ( ( 3 == nMirrorCase ) || ( 4 == nMirrorCase ) ); // 2 | 1 nur Horizontal | nicht gespiegelt
+/*N*/
+/*N*/ if( !bEmptyPresObj && !bDraft )
+/*N*/ {
+/*?*/ Point aLogPos( aRect.TopLeft() );
+/*?*/ Size aLogSize( pOutDev->PixelToLogic( pOutDev->LogicToPixel( aRect ).GetSize() ) );
+/*?*/ BfGraphicAttr aAttr( aGrafInfo );
+/*?*/ const ULONG nGraphicManagerDrawMode = ( pView ? pView->GetGraphicManagerDrawMode() : GRFMGR_DRAW_STANDARD );
+/*?*/
+/*?*/ aAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) );
+/*?*/
+/*?*/ if( bRota180 )
+/*?*/ {
+/*?*/ aLogPos.X() -= ( aLogSize.Width() - 1L );
+/*?*/ aLogPos.Y() -= ( aLogSize.Height() - 1L );
+/*?*/ }
+/*?*/
+/*?*/ bool bDidPaint( false );
+/*?*/
+/*?*/ if( pGraphic->GetType() == GRAPHIC_BITMAP )
+/*?*/ {
+/*?*/ if( pGraphic->IsAnimated() )
+/*?*/ {
+/*?*/ SdrAnimationMode eAnimMode = SDR_ANIMATION_ANIMATE;
+/*?*/ FASTBOOL bEnable = TRUE;
+/*?*/
+/*?*/ if( pView )
+/*?*/ {
+/*?*/ eAnimMode= pView->GetAnimationMode();
+/*?*/ bEnable = ( eAnimMode != SDR_ANIMATION_DISABLE );
+/*?*/
+/*?*/ if( bEnable )
+/*?*/ {{DBG_BF_ASSERT(0, "STRIP"); }//STRIP001
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ if( bEnable )
+/*?*/ {
+/*?*/ if( eAnimMode == SDR_ANIMATION_ANIMATE )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ else if( eAnimMode == SDR_ANIMATION_DONT_ANIMATE )
+/*?*/ pGraphic->Draw( pOutDev, aLogPos, aLogSize, &aAttr, nGraphicManagerDrawMode );
+/*?*/
+/*?*/ bDidPaint = true;
+/*?*/ }
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if( bRotate && !bRota180 )
+/*?*/ aAttr.SetRotation( nDrehWink / 10 );
+/*?*/
+/*?*/ pGraphic->Draw( pOutDev, aLogPos, aLogSize, &aAttr, nGraphicManagerDrawMode );
+/*?*/ bDidPaint = true;
+/*?*/ }
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ // MetaFiles
+/*?*/ const ULONG nOldDrawMode = pOutDev->GetDrawMode();
+/*?*/
+/*?*/ // 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 );
+/*?*/ }
+/*?*/
+/*?*/ if( bRotate && !bRota180 )
+/*?*/ aAttr.SetRotation( nDrehWink / 10 );
+/*?*/
+/*?*/ pGraphic->Draw( pOutDev, aLogPos, aLogSize, &aAttr, nGraphicManagerDrawMode );
+/*?*/ pOutDev->SetDrawMode( nOldDrawMode );
+/*?*/
+/*?*/ bDidPaint = true;
+/*?*/ }
+/*?*/
+/*?*/ // #110290# Remove the SdrGraphObj from the list of objects to be removed on
+/*?*/ // page switch. This is permissible, as the Draw above reenabled the swapout
+/*?*/ // timer.
+/*?*/ // #110573# Occasionally, the view is NULL (e.g. previews in impress and calc)
+/*?*/ if( bDidPaint && pView )
+/*?*/ ( (SdrView*) pView )->ImpAsyncPaintDone( this );
+/*N*/ }
+
+ // auch GRAPHIC_NONE oder SwappedOut( AsyncSwap )
+/*N*/ if( ( bEmptyPresObj || bDraft ) && ( !bDraft || !( rInfoRec.nPaintMode & SDRPAINTMODE_HIDEDRAFTGRAF ) ) )
+/*N*/ {
+/*N*/ XubString aText;
+/*N*/ Bitmap* pBmp = NULL;
+/*N*/ FASTBOOL bFill = FALSE;
+/*N*/
+/*N*/ if( bEmptyPresObj )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 bFill = !ImpPaintEmptyPres( pOutDev );
+/*N*/
+/*N*/ // und nun noch einen grauen Rahmen drum herum, Text rein, ...
+/*N*/ if( !bEmptyPresObj )
+/*N*/ {
+/*N*/ aText = aFileName;
+/*N*/
+/*N*/ if(!aText.Len())
+/*N*/ {
+/*N*/ aText = aName;
+/*N*/
+/*N*/ if( bLoading )
+/*N*/ {
+/*?*/ aText.AppendAscii(" ...");
+/*?*/ //FASTBOOL bNoName=aText.Len()==0;
+/*?*/ //if (!bNoName) aText.Insert(' ',0);
+/*?*/ //else aText.Insert("...",0);
+/*?*/ //aText.Insert("Loading",0);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ pBmp = new Bitmap( ResId ( BMAP_GrafikEi, *ImpGetResMgr() ) );
+/*N*/ #endif
+/*N*/ }
+/*N*/
+/*N*/ ImpPaintReplacement( pOutDev, aText, pBmp, bFill );
+/*N*/ delete pBmp;
+/*N*/ }
+/*N*/
+/*N*/ if( OUTDEV_PRINTER == pOutDev->GetOutDevType() )
+/*?*/ ForceSwapOut();
+/*N*/
+/*N*/ return( HasText() ? SdrTextObj::Paint( rOut, rInfoRec ) : TRUE );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrObject* SdrGrafObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ return ImpCheckHit( rPnt, nTol, pVisiLayer, TRUE );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::operator=( const SdrObject& rObj )
+/*N*/ {
+/*N*/ SdrRectObj::operator=( rObj );
+/*N*/
+/*N*/ const SdrGrafObj& rGraf = (SdrGrafObj&) rObj;
+/*N*/
+/*N*/ pGraphic->SetGraphic( rGraf.GetGraphic() );
+/*N*/ aCropRect = rGraf.aCropRect;
+/*N*/ aFileName = rGraf.aFileName;
+/*N*/ aFilterName = rGraf.aFilterName;
+/*N*/ aName = rGraf.aName;
+/*N*/ bMirrored = rGraf.bMirrored;
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( rGraf.pGraphicLink != NULL)
+/*N*/ #else
+/*N*/ if( rGraf.aFileName.Len() )
+/*N*/ #endif
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 SetGraphicLink( aFileName, aFilterName );
+/*N*/
+/*N*/ ImpSetAttrToGrafInfo();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrRectObj::NbcResize( rRef, xFact, yFact );
+/*N*/
+/*N*/ FASTBOOL bMirrX = xFact.GetNumerator() < 0;
+/*N*/ FASTBOOL bMirrY = yFact.GetNumerator() < 0;
+/*N*/
+/*N*/ if( bMirrX != bMirrY )
+/*?*/ bMirrored = !bMirrored;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ SdrRectObj::NbcRotate(rRef,nWink,sn,cs);
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetSnapRect(rRect);
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::NbcSetLogicRect( const Rectangle& rRect)
+/*N*/ {
+/*N*/ FASTBOOL bChg=rRect.GetSize()!=aRect.GetSize();
+/*N*/ SdrRectObj::NbcSetLogicRect(rRect);
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrObjGeoData* SdrGrafObj::NewGeoData() const
+/*N*/ {
+/*N*/ return new SdrGrafObjGeoData;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {
+/*N*/ SdrRectObj::SaveGeoData(rGeo);
+/*N*/ SdrGrafObjGeoData& rGGeo=(SdrGrafObjGeoData&)rGeo;
+/*N*/ rGGeo.bMirrored=bMirrored;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetPage( SdrPage* pNewPage )
+/*N*/ {
+/*N*/ FASTBOOL bRemove = pNewPage == NULL && pPage != NULL;
+/*N*/ FASTBOOL bInsert = pNewPage != NULL && pPage == NULL;
+/*N*/
+/*N*/ if( bRemove )
+/*N*/ {
+/*N*/ // hier kein SwapIn noetig, weil wenn nicht geladen, dann auch nicht animiert.
+/*N*/ if( pGraphic->IsAnimated())
+/*?*/ pGraphic->StopAnimation();
+/*N*/
+/*N*/ if( pGraphicLink != NULL )
+/*?*/ ImpLinkAbmeldung();
+/*N*/ }
+/*N*/
+/*N*/ SdrRectObj::SetPage( pNewPage );
+/*N*/
+/*N*/ if(aFileName.Len() && bInsert)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 ImpLinkAnmeldung();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SetModel( SdrModel* pNewModel )
+/*N*/ {
+/*N*/ FASTBOOL bChg = pNewModel != pModel;
+/*N*/
+/*N*/ if( bChg )
+/*N*/ {
+/*N*/ if( ( GRAFSTREAMPOS_INVALID != nGrafStreamPos ) || pGraphic->HasUserData() )
+/*N*/ {
+/*?*/ ForceSwapIn();
+/*?*/ pGraphic->SetUserData();
+/*?*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/ }
+/*N*/
+/*N*/ if( pGraphicLink != NULL )
+/*?*/ ImpLinkAbmeldung();
+/*N*/ }
+
+ // Model umsetzen
+/*N*/ SdrRectObj::SetModel(pNewModel);
+/*N*/
+/*N*/ if( bChg && aFileName.Len() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 ImpLinkAnmeldung();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrGrafObj::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrRectObj::PreSave();
+/*N*/
+/*N*/ // prepare SetItems for storage
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/ const SfxItemSet* pParent = GetStyleSheet() ? &GetStyleSheet()->GetItemSet() : 0L;
+/*N*/ SdrGrafSetItem aGrafAttr(rSet.GetPool());
+/*N*/ aGrafAttr.GetItemSet().Put(rSet);
+/*N*/ aGrafAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aGrafAttr);
+/*N*/ }
+
+/*N*/ void SdrGrafObj::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrRectObj::PostSave();
+/*N*/
+/*N*/ // remove SetItems from local itemset
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_GRAF);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrGrafObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ ForceSwapIn();
+/*N*/ SdrRectObj::WriteData( rOut );
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat( rOut, STREAM_WRITE );
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID( "SdrGrafObj" );
+/*N*/ #endif
+/*N*/
+/*N*/ GraphicType eType( pGraphic->GetType() );
+/*N*/ BOOL bHasGraphic( !aFileName.Len() && eType != GRAPHIC_NONE );
+/*N*/
+/*N*/ // dieses Flag wird ab V11 rausgeschrieben
+/*N*/ rOut << bHasGraphic;
+/*N*/
+/*N*/ if(bHasGraphic)
+/*N*/ {
+/*N*/ // Graphik ist nicht gelinkt: ggf. komprimiert speichern:
+/*N*/ // seit V11 eingapackt
+/*N*/ SdrDownCompat aGrafCompat(rOut, STREAM_WRITE);
+/*N*/ BOOL bZCompr(pModel && pModel->IsSaveCompressed() && eType == GRAPHIC_BITMAP);
+/*N*/ BOOL bNCompr(pModel && pModel->IsSaveNative());
+/*N*/ const UINT16 nOldComprMode(rOut.GetCompressMode());
+/*N*/ UINT16 nNewComprMode(nOldComprMode);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aGrafCompat.SetID( "SdrGrafObj(Graphic)" );
+/*N*/ #endif
+/*N*/
+/*N*/ if(pModel->IsSwapGraphics() && (pModel->GetSwapGraphicsMode() & SDR_SWAPGRAPHICSMODE_DOC))
+/*N*/ {
+/*N*/ ((SdrGrafObj*)this)->pGraphic->SetUserData();
+/*N*/ ((SdrGrafObj*)this)->nGrafStreamPos = rOut.Tell();
+/*N*/ }
+/*N*/
+/*N*/ if(bZCompr)
+/*N*/ nNewComprMode |= COMPRESSMODE_ZBITMAP;
+/*N*/
+/*N*/ if(bNCompr)
+/*N*/ nNewComprMode |= COMPRESSMODE_NATIVE;
+/*N*/
+/*N*/ rOut.SetCompressMode( nNewComprMode );
+/*N*/ rOut << pGraphic->GetGraphic();
+/*N*/ rOut.SetCompressMode( nOldComprMode );
+/*N*/ }
+/*N*/
+/*N*/ rOut << aCropRect;
+/*N*/ rOut << BOOL(bMirrored);
+/*N*/
+/*N*/ rOut.WriteByteString(aName);
+/*N*/
+/*N*/ String aRelFileName;
+/*N*/
+/*N*/ if( aFileName.Len() )
+/*N*/ {
+/*?*/ aRelFileName = ::binfilter::StaticBaseUrl::AbsToRel( aFileName,
+/*?*/ INetURLObject::WAS_ENCODED,
+/*?*/ INetURLObject::DECODE_UNAMBIGUOUS );
+/*N*/ }
+/*N*/
+/*N*/ rOut.WriteByteString( aRelFileName );
+/*N*/
+/*N*/ // UNICODE: rOut << aFilterName;
+/*N*/ rOut.WriteByteString(aFilterName);
+/*N*/
+/*N*/ // ab V11
+/*N*/ rOut << (BOOL)( aFileName.Len() != 0 );
+/*N*/
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_GRAF));
+/*N*/ }
+/*N*/ else
+/*?*/ rOut << UINT16( SFX_ITEMS_NULL );
+/*N*/
+/*N*/ ForceSwapOut();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ReadDataTilV10( const SdrObjIOHeader& rHead, SvStream& rIn )
+/*N*/ {
+/*N*/ Graphic aGraphic;
+/*N*/
+/*N*/ // Import von allem mit Version <= 10
+/*N*/ rIn >> aGraphic;
+/*N*/
+/*N*/ ULONG nError = rIn.GetError();
+/*N*/
+/*N*/ // Ist die Graphik defekt, oder wurde nur eine leere Graphik eingelesen? (was bei gelinkten Graphiken der Fall ist)
+/*N*/ if( nError != 0)
+/*?*/ rIn.ResetError();
+/*N*/
+/*N*/ if( rHead.GetVersion() >= 6)
+/*N*/ rIn >> aCropRect;
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 8)
+/*N*/ {
+/*N*/ // UNICODE: rIn>>aFileName;
+/*N*/ rIn.ReadByteString(aFileName);
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 9)
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aFilterName;
+/*N*/ rIn.ReadByteString(aFilterName);
+/*N*/ }
+/*N*/ else
+/*?*/ aFilterName = String( RTL_CONSTASCII_USTRINGPARAM( "BMP - MS Windows" ) );
+/*N*/
+/*N*/ if( aFileName.Len() )
+/*N*/ {
+/*?*/ #ifndef SVX_LIGHT
+/*?*/ String aFileURLStr;
+/*?*/
+/*?*/ if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aFileName, aFileURLStr ) )
+/*?*/ {
+/*?*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aFileURLStr, STREAM_READ | STREAM_SHARE_DENYNONE );
+/*?*/
+/*?*/ if( pIStm )
+/*?*/ {
+/*?*/ GraphicFilter* pFilter = GetGrfFilter();
+/*?*/ USHORT nError = pFilter->ImportGraphic( aGraphic, aFileURLStr, *pIStm );
+/*?*/
+/*?*/ SetGraphicLink( aFileURLStr, aFilterName );
+/*?*/
+/*?*/ delete pIStm;
+/*?*/ }
+/*?*/ }
+/*?*/ #else
+/*?*/ DBG_ERROR("SdrGrafObj::ReadDataTilV10(): SVX_LIGHT kann keine Graphic-Links");
+/*?*/ #endif
+/*N*/ }
+/*N*/ else if( nError != 0 )
+/*?*/ rIn.SetError(nError);
+/*N*/
+/*N*/
+/*N*/ if( !rIn.GetError() )
+/*N*/ pGraphic->SetGraphic( aGraphic );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ #ifdef _MSC_VER
+/*N*/ #pragma optimize ("",off)
+/*N*/ #endif
+
+/*N*/ void SdrGrafObj::ReadData( const SdrObjIOHeader& rHead, SvStream& rIn )
+/*N*/ {
+/*N*/ if( rIn.GetError() )
+/*?*/ return;
+/*N*/
+/*N*/ SdrRectObj::ReadData( rHead, rIn );
+/*N*/
+/*N*/ SdrDownCompat aCompat( rIn, STREAM_READ );
+/*N*/ FASTBOOL bDelayedLoad = ( pModel != NULL ) && pModel->IsSwapGraphics();
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrGrafObj");
+/*N*/ #endif
+/*N*/
+/*N*/ pGraphic->SetUserData();
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/
+/*N*/ if( rHead.GetVersion() < 11 )
+/*N*/ ReadDataTilV10( rHead, rIn );
+/*N*/ else
+/*N*/ {
+/*N*/ String aFileNameRel;
+/*N*/ BOOL bHasGraphic;
+/*N*/ BOOL bTmp;
+/*N*/ BOOL bGraphicLink;
+/*N*/
+/*N*/ rIn >> bHasGraphic;
+/*N*/
+/*N*/ if( bHasGraphic )
+/*N*/ {
+/*N*/ SdrDownCompat aGrafCompat( rIn,STREAM_READ );
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aGrafCompat.SetID("SdrGrafObj(Graphic)");
+/*N*/ #endif
+/*N*/
+/*N*/ nGrafStreamPos = rIn.Tell();
+/*N*/
+/*N*/ if( !bDelayedLoad )
+/*N*/ {
+/*?*/ Graphic aGraphic;
+/*?*/ rIn >> aGraphic;
+/*?*/ pGraphic->SetGraphic( aGraphic );
+/*N*/ }
+/*N*/ else
+/*N*/ pGraphic->SetSwapState();
+/*N*/
+/*N*/ // Ist die Grafik defekt, oder wurde nur eine leere Graphik eingelesen?
+/*N*/ // Daran soll mein Read jedoch nicht scheitern.
+/*N*/ if( rIn.GetError() != 0 )
+/*?*/ rIn.ResetError();
+/*N*/ }
+/*N*/
+/*N*/ rIn >> aCropRect;
+/*N*/ rIn >> bTmp; bMirrored = bTmp;
+/*N*/
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ // #85414# since there seems to be some documents wich have an illegal
+/*N*/ // character inside the name of a graphic object we have to fix this
+/*N*/ // here on load time or it will crash our xml later.
+/*N*/ const xub_StrLen nLen = aName.Len();
+/*N*/ for( xub_StrLen nIndex = 0; nIndex < nLen; nIndex++ )
+/*N*/ {
+/*N*/ if( aName.GetChar( nIndex ) < ' ' )
+/*?*/ aName.SetChar( nIndex, '?' );
+/*N*/ }
+/*N*/
+/*N*/ rIn.ReadByteString(aFileNameRel);
+/*N*/
+/*N*/ if( aFileNameRel.Len() )
+/*N*/ {
+/*N*/ aFileName = ::binfilter::StaticBaseUrl::SmartRelToAbs( aFileNameRel, FALSE,
+/*N*/ INetURLObject::WAS_ENCODED,
+/*N*/ INetURLObject::DECODE_UNAMBIGUOUS );
+/*N*/ }
+/*N*/ else
+/*N*/ aFileName.Erase();
+/*N*/
+/*N*/ // UNICODE: rIn >> aFilterName;
+/*N*/ rIn.ReadByteString(aFilterName);
+/*N*/
+/*N*/ rIn >> bGraphicLink; // auch dieses Flag ist neu in V11
+/*N*/
+/*N*/ if( aCompat.GetBytesLeft() > 0 )
+/*N*/ {
+/*N*/ SfxItemPool* pPool = GetItemPool();
+/*N*/
+/*N*/ if( pPool )
+/*N*/ {
+/*N*/ sal_uInt16 nSetID = SDRATTRSET_GRAF;
+/*N*/ const SdrGrafSetItem* pGrafAttr = (const SdrGrafSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pGrafAttr)
+/*N*/ SetItemSet(pGrafAttr->GetItemSet());
+/*N*/ ImpSetAttrToGrafInfo();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ UINT16 nSuroDummy;
+/*?*/ rIn >> nSuroDummy;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ bCopyToPoolOnAfterRead = TRUE;
+/*N*/
+/*N*/ if( bGraphicLink && aFileName.Len() )
+/*N*/ {
+/*?*/ SetGraphicLink( aFileName, aFilterName );
+/*?*/
+/*?*/ if( !bDelayedLoad )
+/*?*/ ImpUpdateGraphicLink();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ #ifdef _MSC_VER
+/*N*/ #pragma optimize ("",on)
+/*N*/ #endif
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::RestartAnimation(SdrPageView* pPageView) const
+/*N*/ {
+/*N*/ // ToDo: hier noch entsprechend implementieren wie im TextObj
+/*N*/ SdrRectObj::RestartAnimation( pPageView );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::AfterRead()
+/*N*/ {
+/*N*/ SdrRectObj::AfterRead();
+/*N*/
+/*N*/ if( bCopyToPoolOnAfterRead )
+/*N*/ {
+/*N*/ ImpSetGrafInfoToAttr();
+/*N*/ bCopyToPoolOnAfterRead = FALSE;
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+/*N*/ const SfxHint& rHint, const TypeId& rHintType )
+/*N*/ {
+/*N*/ SetXPolyDirty();
+/*N*/ SdrRectObj::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
+/*N*/ ImpSetAttrToGrafInfo();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ForceDefaultAttr()
+/*N*/ {
+/*N*/ SdrRectObj::ForceDefaultAttr();
+/*N*/
+/*N*/ ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put( SdrGrafLuminanceItem( 0 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafContrastItem( 0 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafRedItem( 0 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafGreenItem( 0 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafBlueItem( 0 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafGamma100Item( 100 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafTransparenceItem( 0 ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafInvertItem( FALSE ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafModeItem( GRAPHICDRAWMODE_STANDARD ) );
+/*N*/ mpObjectItemSet->Put( SdrGrafCropItem( 0, 0, 0, 0 ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::NbcSetStyleSheet( SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr )
+/*N*/ {
+/*N*/ SetXPolyDirty();
+/*N*/ SdrRectObj::NbcSetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr );
+/*N*/ ImpSetAttrToGrafInfo();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+// ItemSet access
+
+/*N*/ SfxItemSet* SdrGrafObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+/*N*/
+/*N*/ // graf attributes
+/*N*/ SDRATTR_GRAF_FIRST, SDRATTRSET_GRAF,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+/*N*/ void SdrGrafObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // local changes
+/*N*/ SetXPolyDirty();
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrRectObj::ItemSetChanged(rSet);
+/*N*/
+/*N*/ // local changes
+/*N*/ ImpSetAttrToGrafInfo();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ImpSetAttrToGrafInfo()
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ const sal_uInt16 nTrans = ( (SdrGrafTransparenceItem&) rSet.Get( SDRATTR_GRAFTRANSPARENCE ) ).GetValue();
+/*N*/ const SdrGrafCropItem& rCrop = (const SdrGrafCropItem&) rSet.Get( SDRATTR_GRAFCROP );
+/*N*/
+/*N*/ aGrafInfo.SetLuminance( ( (SdrGrafLuminanceItem&) rSet.Get( SDRATTR_GRAFLUMINANCE ) ).GetValue() );
+/*N*/ aGrafInfo.SetContrast( ( (SdrGrafContrastItem&) rSet.Get( SDRATTR_GRAFCONTRAST ) ).GetValue() );
+/*N*/ aGrafInfo.SetChannelR( ( (SdrGrafRedItem&) rSet.Get( SDRATTR_GRAFRED ) ).GetValue() );
+/*N*/ aGrafInfo.SetChannelG( ( (SdrGrafGreenItem&) rSet.Get( SDRATTR_GRAFGREEN ) ).GetValue() );
+/*N*/ aGrafInfo.SetChannelB( ( (SdrGrafBlueItem&) rSet.Get( SDRATTR_GRAFBLUE ) ).GetValue() );
+/*N*/ aGrafInfo.SetGamma( ( (SdrGrafGamma100Item&) rSet.Get( SDRATTR_GRAFGAMMA ) ).GetValue() * 0.01 );
+/*N*/ aGrafInfo.SetTransparency( (BYTE) FRound( Min( nTrans, (USHORT) 100 ) * 2.55 ) );
+/*N*/ aGrafInfo.SetInvert( ( (SdrGrafInvertItem&) rSet.Get( SDRATTR_GRAFINVERT ) ).GetValue() );
+/*N*/ aGrafInfo.SetDrawMode( ( (SdrGrafModeItem&) rSet.Get( SDRATTR_GRAFMODE ) ).GetValue() );
+/*N*/ aGrafInfo.SetCrop( rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom() );
+/*N*/
+/*N*/ SetXPolyDirty();
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::ImpSetGrafInfoToAttr()
+/*N*/ {
+/*N*/ SetItem( SdrGrafLuminanceItem( aGrafInfo.GetLuminance() ) );
+/*N*/ SetItem( SdrGrafContrastItem( aGrafInfo.GetContrast() ) );
+/*N*/ SetItem( SdrGrafRedItem( aGrafInfo.GetChannelR() ) );
+/*N*/ SetItem( SdrGrafGreenItem( aGrafInfo.GetChannelG() ) );
+/*N*/ SetItem( SdrGrafBlueItem( aGrafInfo.GetChannelB() ) );
+/*N*/ SetItem( SdrGrafGamma100Item( FRound( aGrafInfo.GetGamma() * 100.0 ) ) );
+/*N*/ SetItem( SdrGrafTransparenceItem( (USHORT) FRound( aGrafInfo.GetTransparency() / 2.55 ) ) );
+/*N*/ SetItem( SdrGrafInvertItem( aGrafInfo.IsInvert() ) );
+/*N*/ SetItem( SdrGrafModeItem( aGrafInfo.GetDrawMode() ) );
+/*N*/ SetItem( SdrGrafCropItem( aGrafInfo.GetLeftCrop(), aGrafInfo.GetTopCrop(), aGrafInfo.GetRightCrop(), aGrafInfo.GetBottomCrop() ) );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly )
+/*N*/ {
+/*N*/ Size aSize;
+/*N*/ Size aMaxSize( rMaxRect.GetSize() );
+/*N*/ if ( pGraphic->GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+/*N*/ aSize = Application::GetDefaultDevice()->PixelToLogic( pGraphic->GetPrefSize(), MAP_100TH_MM );
+/*N*/ else
+/*N*/ aSize = OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
+/*N*/ pGraphic->GetPrefMapMode(),
+/*N*/ MapMode( MAP_100TH_MM ) );
+/*N*/
+/*N*/ if( aSize.Height() != 0 && aSize.Width() != 0 )
+/*N*/ {
+/*N*/ Point aPos( rMaxRect.TopLeft() );
+/*N*/
+/*N*/ // Falls Grafik zu gross, wird die Grafik
+/*N*/ // in die Seite eingepasst
+/*N*/ if ( (!bShrinkOnly ||
+/*N*/ ( aSize.Height() > aMaxSize.Height() ) ||
+/*N*/ ( aSize.Width() > aMaxSize.Width() ) )&&
+/*N*/ aSize.Height() && aMaxSize.Height() )
+/*N*/ {
+/*N*/ float fGrfWH = (float)aSize.Width() /
+/*N*/ (float)aSize.Height();
+/*N*/ float fWinWH = (float)aMaxSize.Width() /
+/*N*/ (float)aMaxSize.Height();
+/*N*/
+/*N*/ // Grafik an Pagesize anpassen (skaliert)
+/*N*/ if ( fGrfWH < fWinWH )
+/*N*/ {
+/*N*/ aSize.Width() = (long)(aMaxSize.Height() * fGrfWH);
+/*N*/ aSize.Height()= aMaxSize.Height();
+/*N*/ }
+/*N*/ else if ( fGrfWH > 0.F )
+/*N*/ {
+/*N*/ aSize.Width() = aMaxSize.Width();
+/*N*/ aSize.Height()= (long)(aMaxSize.Width() / fGrfWH);
+/*N*/ }
+/*N*/
+/*N*/ aPos = rMaxRect.Center();
+/*N*/ }
+/*N*/
+/*N*/ if( bShrinkOnly )
+/*N*/ aPos = aRect.TopLeft();
+/*N*/
+/*N*/ aPos.X() -= aSize.Width() / 2;
+/*N*/ aPos.Y() -= aSize.Height() / 2;
+/*N*/ SetLogicRect( Rectangle( aPos, aSize ) );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ IMPL_LINK( SdrGrafObj, ImpSwapHdl, BfGraphicObject*, pO )
+/*N*/ {
+/*N*/ SvStream* pRet = GRFMGR_AUTOSWAPSTREAM_NONE;
+/*N*/
+/*N*/ if( pO->IsInSwapOut() )
+/*N*/ {
+/*N*/ if( pModel != NULL && pModel->IsSwapGraphics() && pGraphic->GetSizeBytes() > 20480 )
+/*N*/ {
+/*N*/ SdrViewIter aIter( this );
+/*N*/ SdrView* pView = aIter.FirstView();
+/*N*/ BOOL bVisible = FALSE;
+/*N*/
+/*N*/ while( !bVisible && pView )
+/*N*/ {
+/*N*/ bVisible = !pView->IsGrafDraft();
+/*N*/
+/*N*/ if( !bVisible )
+/*?*/ pView = aIter.NextView();
+/*N*/ }
+/*N*/
+/*N*/ if( !bVisible )
+/*N*/ {
+/*N*/ const ULONG nSwapMode = pModel->GetSwapGraphicsMode();
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( ( ( GRAFSTREAMPOS_INVALID != nGrafStreamPos ) || pGraphic->HasUserData() || pGraphicLink ) &&
+/*N*/ ( nSwapMode & SDR_SWAPGRAPHICSMODE_PURGE ) )
+/*N*/ #else
+/*N*/ if( ( ( GRAFSTREAMPOS_INVALID != nGrafStreamPos ) || pGraphic->HasUserData() || aFileName.Len() ) &&
+/*N*/ ( nSwapMode & SDR_SWAPGRAPHICSMODE_PURGE ) )
+/*N*/ #endif
+/*N*/ {
+/*N*/ pRet = NULL;
+/*N*/ }
+/*N*/ else if( nSwapMode & SDR_SWAPGRAPHICSMODE_TEMP )
+/*N*/ {
+/*N*/ pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
+/*N*/ pGraphic->SetUserData();
+/*N*/ nGrafStreamPos = GRAFSTREAMPOS_INVALID;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else if( pO->IsInSwapIn() )
+/*N*/ {
+/*N*/ // kann aus dem original Doc-Stream nachgeladen werden...
+/*N*/ if( pModel != NULL )
+/*N*/ {
+/*N*/ if( ( GRAFSTREAMPOS_INVALID != nGrafStreamPos ) || pGraphic->HasUserData() )
+/*N*/ {
+/*N*/ SdrDocumentStreamInfo aStreamInfo;
+/*N*/
+/*N*/ aStreamInfo.mbDeleteAfterUse = FALSE;
+/*N*/ aStreamInfo.maUserData = pGraphic->GetUserData();
+/*N*/ aStreamInfo.mpStorageRef = NULL;
+/*N*/
+/*N*/ SvStream* pStream = pModel->GetDocumentStream( aStreamInfo );
+/*N*/
+/*N*/ if( pStream != NULL )
+/*N*/ {
+/*N*/ Graphic aGraphic;
+/*N*/
+/*N*/ if( pGraphic->HasUserData() )
+/*N*/ {
+/*?*/ if( !GetGrfFilter()->ImportGraphic( aGraphic, String(), *pStream ) )
+/*?*/ {
+/*?*/ const String aUserData( pGraphic->GetUserData() );
+/*?*/
+/*?*/ pGraphic->SetGraphic( aGraphic );
+/*?*/ pGraphic->SetUserData( aUserData );
+/*?*/ pRet = GRFMGR_AUTOSWAPSTREAM_LOADED;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pStream->Seek( nGrafStreamPos );
+/*N*/ *pStream >> aGraphic;
+/*N*/ pGraphic->SetGraphic( aGraphic );
+/*N*/
+/*N*/ if( !pStream->GetError() )
+/*N*/ pRet = GRFMGR_AUTOSWAPSTREAM_LOADED;
+/*N*/ }
+/*N*/
+/*N*/ pStream->ResetError();
+/*N*/
+/*N*/ if( aStreamInfo.mbDeleteAfterUse || aStreamInfo.mpStorageRef )
+/*N*/ {
+/*N*/ delete pStream;
+/*N*/ delete aStreamInfo.mpStorageRef;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else if( !ImpUpdateGraphicLink() )
+/*N*/ {
+/*?*/ pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ pRet = GRFMGR_AUTOSWAPSTREAM_LOADED;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*?*/ pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
+/*N*/ }
+/*N*/
+/*N*/ return (long)(void*) pRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx b/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx
new file mode 100644
index 000000000000..732c7b42a02f
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx
@@ -0,0 +1,1030 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#include "svdogrp.hxx"
+
+#ifndef SVX_LIGHT
+#endif
+
+
+#include <bf_svtools/urihelper.hxx>
+
+#include "xpool.hxx"
+
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svditer.hxx"
+#include "svdio.hxx"
+#include "svdoedge.hxx" // #32383# Die Verbinder nach Move nochmal anbroadcasten
+#include "svdstr.hrc" // Objektname
+
+
+#include "svxids.hrc"
+
+#include <bf_svtools/whiter.hxx>
+#include "xoutx.hxx"
+#include "bf_so3/staticbaseurl.hxx"
+namespace binfilter {
+
+#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.
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+// Closed() wird gerufen, wenn die Verknüpfung geloesst wird.
+
+
+
+
+#endif // SVX_LIGHT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@
+// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@ @@ @@ @@@@@@ @@ @@@@@@
+// @@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@ @@ @@ @@ @@@@ @@@@@ @@@@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(ImpSdrObjGroupLinkUserData,SdrObjUserData);
+
+
+/*N*/ ImpSdrObjGroupLinkUserData::ImpSdrObjGroupLinkUserData(SdrObject* pObj1):
+/*N*/ SdrObjUserData(SdrInventor,SDRUSERDATA_OBJGROUPLINK,0),
+/*N*/ pObj(pObj1),
+/*N*/ nDrehWink0(0),
+/*N*/ nShearWink0(0),
+/*N*/ pLink(NULL),
+/*N*/ nObjNum(0),
+/*N*/ nPageNum(0),
+/*N*/ bMasterPage(FALSE),
+/*N*/ bOrigPos(FALSE),
+/*N*/ bOrigSize(FALSE),
+/*N*/ bOrigRotate(FALSE),
+/*N*/ bOrigShear(FALSE)
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ ImpSdrObjGroupLinkUserData::~ImpSdrObjGroupLinkUserData()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 delete pLink;
+/*N*/ #endif
+/*N*/ }
+
+
+/*N*/ SdrObjUserData* ImpSdrObjGroupLinkUserData::Clone(SdrObject* pObj1) const
+/*N*/ {
+/*N*/ ImpSdrObjGroupLinkUserData* pData=new ImpSdrObjGroupLinkUserData(pObj1);
+/*N*/ pData->aFileName =aFileName;
+/*N*/ pData->aObjName =aObjName;
+/*N*/ pData->aFileDate0 =aFileDate0;
+/*N*/ pData->aSnapRect0 =aSnapRect0;
+/*N*/ pData->nDrehWink0 =nDrehWink0;
+/*N*/ pData->nShearWink0=nShearWink0;
+/*N*/ pData->nObjNum =nObjNum;
+/*N*/ pData->nPageNum =nPageNum;
+/*N*/ pData->bMasterPage=bMasterPage;
+/*N*/ pData->bOrigPos =bOrigPos;
+/*N*/ pData->bOrigSize =bOrigSize;
+/*N*/ pData->bOrigRotate=bOrigRotate;
+/*N*/ pData->bOrigShear =bOrigShear;
+/*N*/ pData->pLink=NULL;
+/*N*/ //pObj1->ImpLinkAnmeldung();
+/*N*/ return pData;
+/*N*/ }
+
+
+/*N*/ void ImpSdrObjGroupLinkUserData::WriteData(SvStream& rOut)
+/*N*/ {
+/*N*/ SdrObjUserData::WriteData(rOut);
+/*N*/
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("ImpSdrObjGroupLinkUserData");
+/*N*/ #endif
+/*N*/
+/*N*/ String aRelFileName;
+/*N*/
+/*N*/ if( aFileName.Len() )
+/*N*/ {
+/*N*/ aRelFileName = ::binfilter::StaticBaseUrl::AbsToRel( aFileName,
+/*N*/ INetURLObject::WAS_ENCODED,
+/*N*/ INetURLObject::DECODE_UNAMBIGUOUS );
+/*N*/ }
+/*N*/
+/*N*/ rOut.WriteByteString( aRelFileName );
+/*N*/
+/*N*/ // UNICODE: rOut << aObjName;
+/*N*/ rOut.WriteByteString(aObjName);
+/*N*/
+/*N*/ rOut << UINT32(aFileDate0.GetDate());
+/*N*/ rOut << UINT32(aFileDate0.GetTime());
+/*N*/ rOut << aSnapRect0;
+/*N*/ rOut << nDrehWink0;
+/*N*/ rOut << nShearWink0;
+/*N*/ rOut << BOOL(bMasterPage);
+/*N*/ rOut << nPageNum;
+/*N*/ rOut << nObjNum;
+/*N*/ rOut << BOOL(bOrigPos);
+/*N*/ rOut << BOOL(bOrigSize);
+/*N*/ rOut << BOOL(bOrigRotate);
+/*N*/ rOut << BOOL(bOrigShear);
+/*N*/ }
+
+/*N*/ void ImpSdrObjGroupLinkUserData::ReadData(SvStream& rIn)
+/*N*/ {
+/*N*/ SdrObjUserData::ReadData(rIn);
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("ImpSdrObjGroupLinkUserData");
+/*N*/ #endif
+/*N*/
+/*N*/ BOOL bTmp;
+/*N*/ UINT32 nTmp32;
+/*N*/ String aFileNameRel;
+/*N*/
+/*N*/ rIn.ReadByteString(aFileNameRel);
+/*N*/
+/*N*/ if( aFileNameRel.Len() )
+/*N*/ {
+/*N*/ aFileName = ::binfilter::StaticBaseUrl::SmartRelToAbs( aFileNameRel, FALSE,
+/*N*/ INetURLObject::WAS_ENCODED,
+/*N*/ INetURLObject::DECODE_UNAMBIGUOUS );
+/*N*/ }
+/*N*/ else
+/*N*/ aFileName.Erase();
+/*N*/
+/*N*/ // UNICODE: rIn >> aObjName;
+/*N*/ rIn.ReadByteString(aObjName);
+/*N*/
+/*N*/ rIn >> nTmp32; aFileDate0.SetDate(nTmp32);
+/*N*/ rIn >> nTmp32; aFileDate0.SetTime(nTmp32);
+/*N*/ rIn >> aSnapRect0;
+/*N*/ rIn >> nDrehWink0;
+/*N*/ rIn >> nShearWink0;
+/*N*/ rIn >> bTmp; bMasterPage=bTmp;
+/*N*/ rIn >> nPageNum;
+/*N*/ rIn >> nObjNum;
+/*N*/ rIn >> bTmp; bOrigPos =bTmp;
+/*N*/ rIn >> bTmp; bOrigSize =bTmp;
+/*N*/ rIn >> bTmp; bOrigRotate=bTmp;
+/*N*/ rIn >> bTmp; bOrigShear =bTmp;
+/*N*/ }
+
+
+/*N*/ void ImpSdrObjGroupLinkUserData::AfterRead()
+/*N*/ {
+/*N*/ if (pObj!=NULL) {
+/*N*/ ((SdrObjGroup*)pObj)->ImpLinkAnmeldung();
+/*N*/ // lt. Anweisung von MB kein automatisches Reload mehr
+/*N*/ //((SdrObjGroup*)pObj)->ReloadLinkedGroup();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@ @@@@@ @@@@ @@ @@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@ @@ @@@@ @@@@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrObjGroup,SdrObject);
+
+
+/*N*/ SdrObjGroup::SdrObjGroup()
+/*N*/ {
+/*N*/ pSub=new SdrObjList(NULL,NULL);
+/*N*/ pSub->SetOwnerObj(this);
+/*N*/ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+/*N*/ bRefPoint=FALSE;
+/*N*/ nDrehWink=0;
+/*N*/ nShearWink=0;
+/*N*/ bClosedObj=FALSE;
+/*N*/ mpGroupItemSet = NULL;
+/*N*/ }
+
+
+/*N*/ SdrObjGroup::~SdrObjGroup()
+/*N*/ {
+/*N*/ ReleaseGroupLink();
+/*N*/ delete pSub;
+/*N*/ if(mpGroupItemSet)
+/*?*/ delete mpGroupItemSet;
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObjGroup::ReleaseGroupLink()
+/*N*/ {
+/*N*/ ImpLinkAbmeldung();
+/*N*/ USHORT nAnz=GetUserDataCount();
+/*N*/ for (USHORT nNum=nAnz; nNum>0;) {
+/*N*/ nNum--;
+/*N*/ SdrObjUserData* pData=GetUserData(nNum);
+/*N*/ if (pData->GetInventor()==SdrInventor && pData->GetId()==SDRUSERDATA_OBJGROUPLINK) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ ImpSdrObjGroupLinkUserData* SdrObjGroup::GetLinkUserData() const
+/*N*/ {
+/*N*/ ImpSdrObjGroupLinkUserData* pData=NULL;
+/*N*/ USHORT nAnz=GetUserDataCount();
+/*N*/ for (USHORT nNum=nAnz; nNum>0 && pData==NULL;) {
+/*N*/ nNum--;
+/*N*/ pData=(ImpSdrObjGroupLinkUserData*)GetUserData(nNum);
+/*N*/ if (pData->GetInventor()!=SdrInventor || pData->GetId()!=SDRUSERDATA_OBJGROUPLINK) {
+/*N*/ pData=NULL;
+/*N*/ }
+/*N*/ }
+/*N*/ return pData;
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void SdrObjGroup::ImpLinkAnmeldung()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::ImpLinkAbmeldung()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ImpSdrObjGroupLinkUserData* pData=GetLinkUserData();
+/*N*/ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+/*N*/ if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // Nicht 2x Abmelden
+/*N*/ // Bei Remove wird *pLink implizit deleted
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pLinkManager->Remove( pData->pLink );
+/*N*/ }
+/*N*/ #endif // SVX_LIGHT
+/*N*/ }
+
+
+
+
+/*N*/ UINT16 SdrObjGroup::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16(OBJ_GRUP);
+/*N*/ }
+
+
+/*N*/ SdrLayerID SdrObjGroup::GetLayer() const
+/*N*/ {
+/*N*/ FASTBOOL b1st=TRUE;
+/*N*/ SdrLayerID nLay=SdrLayerID(nLayerId);
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {
+/*N*/ SdrLayerID nLay1=pOL->GetObj(i)->GetLayer();
+/*N*/ if (b1st) { nLay=nLay1; b1st=FALSE; }
+/*N*/ else if (nLay1!=nLay) return 0;
+/*N*/ }
+/*N*/ return nLay;
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::NbcSetLayer(SdrLayerID nLayer)
+/*N*/ {
+/*N*/ SdrObject::NbcSetLayer(nLayer);
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {
+/*N*/ pOL->GetObj(i)->NbcSetLayer(nLayer);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::SetObjList(SdrObjList* pNewObjList)
+/*N*/ {
+/*N*/ SdrObject::SetObjList(pNewObjList);
+/*N*/ pSub->SetUpList(pNewObjList);
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ FASTBOOL bLinked=IsLinkedGroup();
+/*N*/ FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL;
+/*N*/ FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL;
+/*N*/
+/*N*/ if (bLinked && bRemove) {
+/*?*/ ImpLinkAbmeldung();
+/*N*/ }
+/*N*/
+/*N*/ SdrObject::SetPage(pNewPage);
+/*N*/ pSub->SetPage(pNewPage);
+/*N*/
+/*N*/ if (bLinked && bInsert) {
+/*?*/ ImpLinkAnmeldung();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ FASTBOOL bLinked=IsLinkedGroup();
+/*N*/ FASTBOOL bChg=pNewModel!=pModel;
+/*N*/ if (bLinked && bChg) {
+/*N*/ ImpLinkAbmeldung();
+/*N*/ }
+/*N*/
+/*N*/ SdrObject::SetModel(pNewModel);
+/*N*/ pSub->SetModel(pNewModel);
+/*N*/
+/*N*/ if (bLinked && bChg) {
+/*?*/ ImpLinkAnmeldung();
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+/*N*/ SdrObjList* SdrObjGroup::GetSubList() const
+/*N*/ {
+/*N*/ return pSub;
+/*N*/ }
+
+
+
+/*N*/ void SdrObjGroup::SetName(const XubString& rStr)
+/*N*/ {
+/*N*/ aName=rStr; SetChanged();
+/*N*/ }
+
+
+/*N*/ XubString SdrObjGroup::GetName() const
+/*N*/ {
+/*N*/ return aName;
+/*N*/ }
+
+
+/*N*/ const Rectangle& SdrObjGroup::GetBoundRect() const
+/*N*/ {
+/*N*/ if (pSub->GetObjCount()!=0) {
+/*N*/ // hier auch das aOutRect=AllObjSnapRect setzen, da GetSnapRect zu selten gerufen wird.
+/*N*/ ((SdrObjGroup*)this)->aOutRect=pSub->GetAllObjSnapRect();
+/*N*/ return pSub->GetAllObjBoundRect();
+/*N*/ } else {
+/*N*/ return aOutRect;
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ const Rectangle& SdrObjGroup::GetSnapRect() const
+/*N*/ {
+/*N*/ if (pSub->GetObjCount()!=0) {
+/*N*/ ((SdrObjGroup*)this)->aOutRect=pSub->GetAllObjSnapRect();
+/*N*/ }
+/*N*/ return aOutRect;
+/*N*/ }
+
+
+/*N*/ FASTBOOL SdrObjGroup::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+/*N*/ {
+/*N*/ FASTBOOL bOk=TRUE;
+/*N*/ if (pSub->GetObjCount()!=0) {
+/*N*/ bOk=pSub->Paint(rXOut,rInfoRec);
+/*N*/ } else { // ansonsten ist es eine leere Gruppe
+/*?*/ if (!rInfoRec.bPrinter && rInfoRec.aPaintLayer.IsSet(nLayerId)) {
+/*?*/ OutputDevice* pOutDev=rXOut.GetOutDev();
+/*?*/ pOutDev->SetFillColor();
+/*?*/ pOutDev->SetLineColor(COL_LIGHTGRAY);
+/*?*/ pOutDev->DrawRect(aOutRect);
+/*N*/ }
+/*N*/ }
+/*N*/ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ return bOk;
+/*N*/ }
+
+
+
+/*SdrObject* SdrObjGroup::Clone() const
+{
+ SdrObjGroup* pObj=new SdrObjGroup();
+ if (pObj!=NULL) {
+ *pObj=*this;
+ }
+ return pObj;
+}*/
+
+
+/*N*/ void SdrObjGroup::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ if (rObj.IsGroupObject()) {
+/*N*/ SdrObject::operator=(rObj);
+/*N*/ pSub->CopyObjects(*rObj.GetSubList());
+/*N*/ nDrehWink =((SdrObjGroup&)rObj).nDrehWink;
+/*N*/ nShearWink =((SdrObjGroup&)rObj).nShearWink;
+/*N*/ aName =((SdrObjGroup&)rObj).aName;
+/*N*/ aRefPoint =((SdrObjGroup&)rObj).aRefPoint;
+/*N*/ bRefPoint =((SdrObjGroup&)rObj).bRefPoint;
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+/*N*/ void SdrObjGroup::RecalcSnapRect()
+/*N*/ {
+/*N*/ // nicht erforderlich, da die Rects von der SubList verwendet werden.
+/*N*/ }
+
+
+/*N*/ void MergePoly(XPolyPolygon& rDst, const XPolyPolygon& rSrc)
+/*N*/ {
+/*N*/ USHORT nAnz=rSrc.Count();
+/*N*/ USHORT i;
+/*N*/ for (i=0; i<nAnz; i++) {
+/*N*/ rDst.Insert(rSrc.GetObject(i));
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+/*N*/ {
+/*N*/ rPoly.Clear();
+/*N*/ ULONG nAnz=pSub->GetObjCount();
+/*N*/ ULONG i=0;
+/*N*/ while (i<nAnz) {
+/*N*/ SdrObject* pObj=pSub->GetObj(i);
+/*N*/ XPolyPolygon aPP;
+/*N*/ pObj->TakeXorPoly(aPP,bDetail);
+/*N*/ MergePoly(rPoly,aPP);
+/*N*/ i++;
+/*N*/ }
+/*N*/ if (rPoly.Count()==0) {
+/*?*/ rPoly.Insert(XPolygon(aOutRect));
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+/*N*/ long SdrObjGroup::GetRotateAngle() const
+/*N*/ {
+/*N*/ return nDrehWink;
+/*N*/ }
+
+
+/*N*/ long SdrObjGroup::GetShearAngle(FASTBOOL bVertical) const
+/*N*/ {
+/*N*/ return nShearWink;
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ Rectangle aOld(GetSnapRect());
+/*N*/ long nMulX=rRect.Right()-rRect.Left();
+/*N*/ long nDivX=aOld.Right()-aOld.Left();
+/*N*/ long nMulY=rRect.Bottom()-rRect.Top();
+/*N*/ long nDivY=aOld.Bottom()-aOld.Top();
+/*N*/ if (nDivX==0) { nMulX=1; nDivX=1; }
+/*N*/ if (nDivY==0) { nMulY=1; nDivY=1; }
+/*N*/ if (nMulX!=nDivX || nMulY!=nDivY) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) {
+/*N*/ NbcMove(Size(rRect.Left()-aOld.Left(),rRect.Top()-aOld.Top()));
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ NbcSetSnapRect(rRect);
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ MovePoint(aRefPoint,rSiz);
+/*N*/ if (pSub->GetObjCount()!=0) {
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ pObj->NbcMove(rSiz);
+/*N*/ }
+/*N*/ } else {
+/*?*/ MoveRect(aOutRect,rSiz);
+/*?*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+/*N*/ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+/*N*/ if (bXMirr || bYMirr) {
+/*N*/ Point aRef1(GetSnapRect().Center());
+/*N*/ if (bXMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.Y()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ if (bYMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.X()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ }
+/*N*/ ResizePoint(aRefPoint,rRef,xFact,yFact);
+/*N*/ if (pSub->GetObjCount()!=0) {
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ pObj->NbcResize(rRef,xFact,yFact);
+/*N*/ }
+/*N*/ } else {
+/*N*/ ResizeRect(aOutRect,rRef,xFact,yFact);
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+/*N*/ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt)
+/*N*/ {
+/*N*/ aAnchor=rPnt;
+/*N*/ Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
+/*N*/ MovePoint(aRefPoint,aSiz);
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ pObj->NbcSetAnchorPos(rPnt);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::SetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ Rectangle aOld(GetSnapRect());
+/*N*/ long nMulX=rRect.Right()-rRect.Left();
+/*N*/ long nDivX=aOld.Right()-aOld.Left();
+/*N*/ long nMulY=rRect.Bottom()-rRect.Top();
+/*N*/ long nDivY=aOld.Bottom()-aOld.Top();
+/*N*/ if (nDivX==0) { nMulX=1; nDivX=1; }
+/*N*/ if (nDivY==0) { nMulY=1; nDivY=1; }
+/*N*/ if (nMulX!=nDivX || nMulY!=nDivY) {
+/*N*/ Fraction aX(nMulX,nDivX);
+/*N*/ Fraction aY(nMulY,nDivY);
+/*N*/ Resize(aOld.TopLeft(),aX,aY);
+/*N*/ }
+/*N*/ if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) {
+/*?*/ Move(Size(rRect.Left()-aOld.Left(),rRect.Top()-aOld.Top()));
+/*N*/ }
+/*N*/ SendRepaintBroadcast(TRUE);
+/*N*/ SetChanged();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObjGroup::Move(const Size& rSiz)
+/*N*/ {
+/*N*/ if (rSiz.Width()!=0 || rSiz.Height()!=0) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ MovePoint(aRefPoint,rSiz);
+/*N*/ if (pSub->GetObjCount()!=0) {
+/*N*/ // #32383# Erst die Verbinder verschieben, dann den Rest
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ ULONG i;
+/*N*/ for (i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ if (pObj->IsEdgeObj()) pObj->Move(rSiz);
+/*N*/ }
+/*N*/ for (i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ if (!pObj->IsEdgeObj()) pObj->Move(rSiz);
+/*N*/ }
+/*N*/ SendRepaintBroadcast(TRUE);
+/*N*/ } else {
+/*N*/ SendRepaintBroadcast();
+/*N*/ MoveRect(aOutRect,rSiz);
+/*N*/ SetRectsDirty();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ SetChanged();
+/*N*/ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
+/*N*/ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+/*N*/ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+/*N*/ if (bXMirr || bYMirr) {
+/*N*/ Point aRef1(GetSnapRect().Center());
+/*N*/ if (bXMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.Y()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ if (bYMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.X()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ }
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ ResizePoint(aRefPoint,rRef,xFact,yFact);
+/*N*/ 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);
+/*N*/ } else {
+/*N*/ SendRepaintBroadcast();
+/*N*/ ResizeRect(aOutRect,rRef,xFact,yFact);
+/*N*/ SetRectsDirty();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ SetChanged();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+/*N*/ void SdrObjGroup::SetAnchorPos(const Point& rPnt)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ FASTBOOL bChg=aAnchor!=rPnt;
+/*N*/ aAnchor=rPnt;
+/*N*/ Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
+/*N*/ MovePoint(aRefPoint,aSiz);
+/*N*/ // #32383# Erst die Verbinder verschieben, dann den Rest
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ ULONG i;
+/*N*/ for (i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ if (pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
+/*N*/ }
+/*N*/ for (i=0; i<nObjAnz; i++) {
+/*N*/ SdrObject* pObj=pOL->GetObj(i);
+/*N*/ if (!pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
+/*N*/ }
+/*N*/ if (bChg) {
+/*N*/ SendRepaintBroadcast(TRUE);
+/*N*/ SetChanged();
+/*N*/ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+/*N*/ void SdrObjGroup::SetRelativePos(const Point& rPnt)
+/*N*/ {
+/*N*/ Point aRelPos0(GetSnapRect().TopLeft()-aAnchor);
+/*N*/ Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
+/*N*/ if (aSiz.Width()!=0 || aSiz.Height()!=0) Move(aSiz); // Der ruft auch das SetRectsDirty() und Broadcast, ...
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ const SfxItemSet& SdrObjGroup::GetItemSet() const
+/*N*/ {
+/*N*/ // prepare ItemSet
+/*N*/ if(mpGroupItemSet)
+/*N*/ mpGroupItemSet->ClearItem();
+/*N*/ else
+/*N*/ {
+/*N*/ ((SdrObjGroup*)this)->mpGroupItemSet =
+/*N*/ ((SdrObjGroup*)this)->CreateNewItemSet((SfxItemPool&)(*GetItemPool()));
+/*N*/ DBG_ASSERT(mpGroupItemSet, "Could not create an SfxItemSet(!)");
+/*N*/ }
+/*N*/
+/*N*/ // collect all ItemSets in mpGroupItemSet
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = pSub->GetObj(a)->GetItemSet();
+/*N*/ SfxWhichIter aIter(rSet);
+/*N*/ sal_uInt16 nWhich(aIter.FirstWhich());
+/*N*/
+/*N*/ while(nWhich)
+/*N*/ {
+/*N*/ if(SFX_ITEM_DONTCARE == rSet.GetItemState(nWhich, FALSE))
+/*N*/ mpGroupItemSet->InvalidateItem(nWhich);
+/*N*/ else
+/*N*/ mpGroupItemSet->MergeValue(rSet.Get(nWhich), TRUE);
+/*N*/
+/*N*/ nWhich = aIter.NextWhich();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return *mpGroupItemSet;
+/*N*/ }
+
+/*N*/ SfxItemSet* SdrObjGroup::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items
+/*N*/ return new SfxItemSet(rPool, SDRATTR_START, SDRATTR_END);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ void SdrObjGroup::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ if(!IsLinkedGroup())
+/*N*/ {
+/*N*/ // ItemChange at all contained objects
+/*N*/ List aPostItemChangeList;
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/
+/*N*/ sal_uInt32 a; for(a = 0; a < nCount; a++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pSub->GetObj(a);
+/*N*/ if(pObj->AllowItemChange(nWhich, pNewItem))
+/*N*/ {
+/*N*/ pObj->ItemChange(nWhich, pNewItem);
+/*N*/ aPostItemChangeList.Insert((void*)pObj, LIST_APPEND);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ for(a = 0; a < aPostItemChangeList.Count(); a++)
+/*N*/ {
+/*N*/ SdrObject* pObj = (SdrObject*)aPostItemChangeList.GetObject(a);
+/*N*/ pObj->PostItemChange(nWhich);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet was changed, maybe user wants to react
+
+/*N*/ void SdrObjGroup::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ if(!IsLinkedGroup())
+/*N*/ {
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ pSub->GetObj(a)->ItemSetChanged(rSet);
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrObjGroup::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::PreSave();
+/*N*/
+/*N*/ if(!IsLinkedGroup())
+/*N*/ {
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ pSub->GetObj(a)->PreSave();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjGroup::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrObject::PostSave();
+/*N*/
+/*N*/ if(!IsLinkedGroup())
+/*N*/ {
+/*N*/ sal_uInt32 nCount(pSub->GetObjCount());
+/*N*/ for(sal_uInt32 a(0); a < nCount; a++)
+/*N*/ pSub->GetObj(a)->PostSave();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SfxStyleSheet* SdrObjGroup::GetStyleSheet() const
+/*N*/ {
+/*N*/ // Hier mit 'nem Iterator. Es koennte sonst passieren dass ein
+/*N*/ // verschachteltes Gruppenobjekt wegen DontCare NULL liefert.
+/*N*/ // Das koennte ich dann nicht unterscheiden von NotSet.
+/*N*/ SfxStyleSheet* pRet=NULL;
+/*N*/ FASTBOOL b1st=TRUE;
+/*N*/ SdrObjListIter aIter(*this,IM_DEEPNOGROUPS);
+/*N*/ while (aIter.IsMore()) {
+/*N*/ SdrObject* pObj=aIter.Next();
+/*N*/ if (b1st) {
+/*N*/ b1st=FALSE;
+/*N*/ pRet=pObj->GetStyleSheet(); // Der Erste
+/*N*/ } else {
+/*N*/ if (pObj->GetStyleSheet()!=pRet) return NULL; // Unterschiedlich!
+/*N*/ }
+/*N*/ }
+/*N*/ // Wenn hier angekommen, sind alle gleich.
+/*N*/ return pRet;
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ if (!IsLinkedGroup()) {
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {
+/*N*/ pOL->GetObj(i)->NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ if (!IsLinkedGroup()) {
+/*N*/ SdrObjList* pOL=pSub;
+/*N*/ ULONG nObjAnz=pOL->GetObjCount();
+/*N*/ for (ULONG i=0; i<nObjAnz; i++) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObjGroup::ReformatText()
+/*N*/ {
+/*N*/ pSub->ReformatAllTextObjects();
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObjGroup::RestartAnimation(SdrPageView* pPageView) const
+/*N*/ {
+/*N*/ pSub->RestartAllAnimations(pPageView);
+/*N*/ }
+
+
+
+
+/*N*/ void SdrObjGroup::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrObject::WriteData(rOut);
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrObjGroup");
+/*N*/ #endif
+/*N*/
+/*N*/ // UNICODE: rOut << aName;
+/*N*/ rOut.WriteByteString(aName);
+/*N*/
+/*N*/ UINT8 nTemp = bRefPoint; rOut << nTemp;
+/*N*/ rOut << aRefPoint;
+/*N*/ pSub->Save(rOut);
+/*N*/ rOut << INT32(nDrehWink);
+/*N*/ rOut << INT32(nShearWink);
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if(rIn.GetError())
+/*N*/ return;
+/*N*/
+/*N*/ SdrObject::ReadData(rHead, rIn);
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrObjGroup");
+/*N*/ #endif
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ UINT8 nTemp; rIn >> nTemp; bRefPoint = nTemp;
+/*N*/ rIn >> aRefPoint;
+/*N*/ pSub->Load(rIn, *pPage);
+/*N*/
+/*N*/ if(rHead.GetVersion() >= 2)
+/*N*/ {
+/*N*/ INT32 n32;
+/*N*/
+/*N*/ rIn >> n32; nDrehWink = n32;
+/*N*/ rIn >> n32; nShearWink = n32;
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrObjGroup::AfterRead()
+/*N*/ {
+/*N*/ SdrObject::AfterRead();
+/*N*/ pSub->AfterRead();
+/*N*/
+/*N*/ // #80049# as fix for errors after #69055#
+/*N*/ if(aAnchor.X() || aAnchor.Y())
+/*N*/ NbcSetAnchorPos(aAnchor);
+/*N*/ }
+
+// ItemPool fuer dieses Objekt wechseln
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdomeas.cxx b/binfilter/bf_svx/source/svdraw/svx_svdomeas.cxx
new file mode 100644
index 000000000000..1ba74b2622c1
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdomeas.cxx
@@ -0,0 +1,1012 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdomeas.hxx"
+#include <math.h>
+#include "xoutx.hxx"
+#include "svdoutl.hxx"
+#include "svdpool.hxx"
+#include "svdattrx.hxx"
+#include "svdio.hxx"
+#include "svdview.hxx"
+#include "svdstr.hrc" // Objektname
+
+#include <bf_svtools/style.hxx>
+
+
+
+#include "xlnstit.hxx"
+
+#include "xlnstwit.hxx"
+
+#include "xlnedit.hxx"
+
+#include "xlnwtit.hxx"
+
+#include "xlnedwit.hxx"
+
+#include "xlnstcit.hxx"
+
+#include "xlnedcit.hxx"
+
+
+
+#include <editobj.hxx>
+
+
+#include "itemdata.hxx"
+
+#include "svdfield.hxx"
+
+
+#include <bf_svtools/syslocale.hxx>
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SV_IMPL_PERSIST1(SdrMeasureField,SvxFieldData);
+/*N*/
+/*N*/ __EXPORT SdrMeasureField::~SdrMeasureField()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxFieldData* __EXPORT SdrMeasureField::Clone() const
+/*N*/ {
+/*N*/ return new SdrMeasureField(*this);
+/*N*/ }
+
+/*N*/ int __EXPORT SdrMeasureField::operator==(const SvxFieldData& rSrc) const
+/*N*/ {
+/*N*/ return eMeasureFieldKind==((SdrMeasureField&)rSrc).GetMeasureFieldKind();
+/*N*/ }
+
+/*N*/ void __EXPORT SdrMeasureField::Load(SvPersistStream& rIn)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrMeasureField");
+/*N*/ #endif
+/*N*/ UINT16 nFieldKind;
+/*N*/ rIn>>nFieldKind;
+/*N*/ eMeasureFieldKind=(SdrMeasureFieldKind)nFieldKind;
+/*N*/ }
+
+/*N*/ void __EXPORT SdrMeasureField::Save(SvPersistStream& rOut)
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrMeasureField");
+/*N*/ #endif
+/*N*/ rOut<<(UINT16)eMeasureFieldKind;
+/*N*/ }
+
+/*?*/ 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);
+/*?*/
+/*?*/ const SfxItemSet& rSet = rObj.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();
+/*?*/ sal_Int16 nNumDigits = ((SdrMeasureDecimalPlacesItem&)rSet.Get(SDRATTR_MEASUREDECIMALPLACES)).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, nNumDigits);
+/*?*/
+/*?*/ if(!aFact.IsValid())
+/*?*/ {
+/*?*/ rStr = String();
+/*?*/ rStr += sal_Unicode('?');
+/*?*/ }
+/*?*/
+/*?*/ sal_Unicode cDec(SvtSysLocale().GetLocaleData().getNumDecimalSep().GetChar(0));
+/*?*/
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+
+/*N*/ TYPEINIT1(SdrMeasureObj,SdrTextObj);
+
+/*N*/ void SdrMeasureObj::ForceDefaultAttr()
+/*N*/ {
+/*N*/ SdrTextObj::ForceDefaultAttr();
+/*N*/
+/*N*/ //#71958# by default, the show units Bool-Item is set as hard
+/*N*/ // attribute to TRUE to aviod confusion when copying SdrMeasureObj's
+/*N*/ // from one application to another
+/*N*/ ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put(SdrMeasureShowUnitItem(TRUE));
+/*N*/
+/*N*/ XPolygon aXP(4); // []
+/*N*/ aXP[0] = Point(100,0); // 0,4__[]__2,4
+/*N*/ aXP[1] = Point(200,400); // \ /
+/*N*/ aXP[2] = Point(0,400); // \ /
+/*N*/ aXP[3] = Point(100,0); // \/1,0
+/*N*/
+/*N*/ mpObjectItemSet->Put(XLineStartItem(String(), aXP));
+/*N*/ mpObjectItemSet->Put(XLineStartWidthItem(200));
+/*N*/ mpObjectItemSet->Put(XLineEndItem(String(), aXP));
+/*N*/ mpObjectItemSet->Put(XLineEndWidthItem(200));
+/*N*/ mpObjectItemSet->Put(XLineStyleItem(XLINE_SOLID));
+/*N*/ }
+
+/*N*/ SdrMeasureObj::SdrMeasureObj():
+/*N*/ bTextDirty(FALSE)
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrMeasureObj::SdrMeasureObj(const Point& rPt1, const Point& rPt2):
+/*N*/ aPt1(rPt1),
+/*N*/ aPt2(rPt2),
+/*N*/ bTextDirty(FALSE)
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrMeasureObj::~SdrMeasureObj()
+/*N*/ {
+/*N*/ }
+
+
+/*N*/ UINT16 SdrMeasureObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return (UINT16)OBJ_MEASURE;
+/*N*/ }
+
+/*N*/ struct ImpMeasureRec
+/*N*/ {
+/*N*/ Point aPt1;
+/*N*/ Point aPt2;
+/*N*/ SdrMeasureKind eKind;
+/*N*/ SdrMeasureTextHPos eWantTextHPos;
+/*N*/ SdrMeasureTextVPos eWantTextVPos;
+/*N*/ long nLineDist;
+/*N*/ long nHelplineOverhang;
+/*N*/ long nHelplineDist;
+/*N*/ long nHelpline1Len;
+/*N*/ long nHelpline2Len;
+/*N*/ FASTBOOL bBelowRefEdge;
+/*N*/ FASTBOOL bTextRota90;
+/*N*/ FASTBOOL bTextUpsideDown;
+/*N*/ long nMeasureOverhang;
+/*N*/ FieldUnit eMeasureUnit;
+/*N*/ Fraction aMeasureScale;
+/*N*/ FASTBOOL bShowUnit;
+/*N*/ String aFormatString;
+/*N*/ FASTBOOL bTextAutoAngle;
+/*N*/ long nTextAutoAngleView;
+/*N*/ FASTBOOL bTextIsFixedAngle;
+/*N*/ long nTextFixedAngle;
+/*N*/ };
+/*N*/
+/*N*/ struct ImpLineRec
+/*N*/ {
+/*N*/ Point aP1;
+/*N*/ Point aP2;
+/*N*/ };
+/*N*/
+/*N*/ struct ImpMeasurePoly
+/*N*/ {
+/*N*/ ImpLineRec aMainline1; // die mit dem 1. Pfeil
+/*N*/ ImpLineRec aMainline2; // die mit dem 2. Pfeil
+/*N*/ ImpLineRec aMainline3; // die dazwischen
+/*N*/ ImpLineRec aHelpline1;
+/*N*/ ImpLineRec aHelpline2;
+/*N*/ Rectangle aTextRect;
+/*N*/ Size aTextSize;
+/*N*/ long nLineLen;
+/*N*/ long nLineWink;
+/*N*/ long nTextWink;
+/*N*/ long nHlpWink;
+/*N*/ double nLineSin;
+/*N*/ double nLineCos;
+/*N*/ double nHlpSin;
+/*N*/ double nHlpCos;
+/*N*/ USHORT nMainlineAnz;
+/*N*/ SdrMeasureTextHPos eUsedTextHPos;
+/*N*/ SdrMeasureTextVPos eUsedTextVPos;
+/*N*/ long nLineWdt2; // Halbe Strichstaerke
+/*N*/ long nArrow1Len; // Laenge des 1. Pfeils. Bei Center nur die Haelfte
+/*N*/ long nArrow2Len; // Laenge des 2. Pfeils. Bei Center nur die Haelfte
+/*N*/ long nArrow1Wdt; // Breite des 1. Pfeils
+/*N*/ long nArrow2Wdt; // Breite des 2. Pfeils
+/*N*/ long nShortLineLen; // Linienlaenge, wenn PfeileAussen
+/*N*/ FASTBOOL bArrow1Center; // Pfeil 1 zentriert?
+/*N*/ FASTBOOL bArrow2Center; // Pfeil 2 zentriert?
+/*N*/ FASTBOOL bAutoUpsideDown; // UpsideDown durch Automatik
+/*N*/ FASTBOOL bPfeileAussen;
+/*N*/ FASTBOOL bBreakedLine;
+/*N*/ };
+
+/*N*/ void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const
+/*N*/ {
+/*N*/ rRec.aPt1 = aPt1;
+/*N*/ rRec.aPt2 = aPt2;
+/*N*/
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ rRec.eKind =((SdrMeasureKindItem& )rSet.Get(SDRATTR_MEASUREKIND )).GetValue();
+/*N*/ rRec.eWantTextHPos =((SdrMeasureTextHPosItem& )rSet.Get(SDRATTR_MEASURETEXTHPOS )).GetValue();
+/*N*/ rRec.eWantTextVPos =((SdrMeasureTextVPosItem& )rSet.Get(SDRATTR_MEASURETEXTVPOS )).GetValue();
+/*N*/ rRec.nLineDist =((SdrMeasureLineDistItem& )rSet.Get(SDRATTR_MEASURELINEDIST )).GetValue();
+/*N*/ rRec.nHelplineOverhang=((SdrMeasureHelplineOverhangItem&)rSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue();
+/*N*/ rRec.nHelplineDist =((SdrMeasureHelplineDistItem& )rSet.Get(SDRATTR_MEASUREHELPLINEDIST )).GetValue();
+/*N*/ rRec.nHelpline1Len =((SdrMeasureHelpline1LenItem& )rSet.Get(SDRATTR_MEASUREHELPLINE1LEN )).GetValue();
+/*N*/ rRec.nHelpline2Len =((SdrMeasureHelpline2LenItem& )rSet.Get(SDRATTR_MEASUREHELPLINE2LEN )).GetValue();
+/*N*/ rRec.bBelowRefEdge =((SdrMeasureBelowRefEdgeItem& )rSet.Get(SDRATTR_MEASUREBELOWREFEDGE )).GetValue();
+/*N*/ rRec.bTextRota90 =((SdrMeasureTextRota90Item& )rSet.Get(SDRATTR_MEASURETEXTROTA90 )).GetValue();
+/*N*/ rRec.bTextUpsideDown =((SdrMeasureTextUpsideDownItem& )rSet.Get(SDRATTR_MEASURETEXTUPSIDEDOWN )).GetValue();
+/*N*/ rRec.nMeasureOverhang =((SdrMeasureOverhangItem& )rSet.Get(SDRATTR_MEASUREOVERHANG )).GetValue();
+/*N*/ rRec.eMeasureUnit =((SdrMeasureUnitItem& )rSet.Get(SDRATTR_MEASUREUNIT )).GetValue();
+/*N*/ rRec.aMeasureScale =((SdrMeasureScaleItem& )rSet.Get(SDRATTR_MEASURESCALE )).GetValue();
+/*N*/ rRec.bShowUnit =((SdrMeasureShowUnitItem& )rSet.Get(SDRATTR_MEASURESHOWUNIT )).GetValue();
+/*N*/ rRec.aFormatString =((SdrMeasureFormatStringItem& )rSet.Get(SDRATTR_MEASUREFORMATSTRING )).GetValue();
+/*N*/ rRec.bTextAutoAngle =((SdrMeasureTextAutoAngleItem& )rSet.Get(SDRATTR_MEASURETEXTAUTOANGLE )).GetValue();
+/*N*/ rRec.nTextAutoAngleView=((SdrMeasureTextAutoAngleViewItem&)rSet.Get(SDRATTR_MEASURETEXTAUTOANGLEVIEW)).GetValue();
+/*N*/ rRec.bTextIsFixedAngle =((SdrMeasureTextIsFixedAngleItem& )rSet.Get(SDRATTR_MEASURETEXTISFIXEDANGLE )).GetValue();
+/*N*/ rRec.nTextFixedAngle =((SdrMeasureTextFixedAngleItem& )rSet.Get(SDRATTR_MEASURETEXTFIXEDANGLE )).GetValue();
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol) const
+/*N*/ {
+/*N*/ Point aP1(rRec.aPt1);
+/*N*/ Point aP2(rRec.aPt2);
+/*N*/ Point aDelt(aP2); aDelt-=aP1;
+/*N*/
+/*N*/ rPol.aTextSize=GetTextSize();
+/*N*/ rPol.nLineLen=GetLen(aDelt);
+/*N*/
+/*N*/ rPol.nLineWdt2=0;
+/*N*/ long nArrow1Len=0; FASTBOOL bArrow1Center=FALSE;
+/*N*/ long nArrow2Len=0; FASTBOOL bArrow2Center=FALSE;
+/*N*/ long nArrow1Wdt=0;
+/*N*/ long nArrow2Wdt=0;
+/*N*/ rPol.nArrow1Wdt=0;
+/*N*/ rPol.nArrow2Wdt=0;
+/*N*/ long nArrowNeed=0;
+/*N*/ long nShortLen=0;
+/*N*/ FASTBOOL bPfeileAussen=FALSE;
+/*N*/
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ sal_Int32 nLineWdt = ((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); // Strichstaerke
+/*N*/ rPol.nLineWdt2 = (nLineWdt + 1) / 2;
+/*N*/
+/*N*/ nArrow1Wdt = ((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+/*N*/ if(nArrow1Wdt < 0)
+/*N*/ nArrow1Wdt = -nLineWdt * nArrow1Wdt / 100; // <0 = relativ
+/*N*/
+/*N*/ nArrow2Wdt = ((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+/*N*/ if(nArrow2Wdt < 0)
+/*N*/ nArrow2Wdt = -nLineWdt * nArrow2Wdt / 100; // <0 = relativ
+/*N*/
+/*N*/ XPolygon aPol1(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue());
+/*N*/ XPolygon aPol2(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue());
+/*N*/ bArrow1Center = ((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+/*N*/ bArrow2Center = ((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+/*N*/ nArrow1Len = XOutputDevice::InitLineStartEnd(aPol1, nArrow1Wdt, bArrow1Center) - 1;
+/*N*/ nArrow2Len = XOutputDevice::InitLineStartEnd(aPol2, nArrow2Wdt, bArrow2Center) - 1;
+/*N*/
+/*N*/ // nArrowLen ist bei bCenter bereits halbiert
+/*N*/ // Bei 2 Pfeilen a 4mm ist unter 10mm Schluss.
+/*N*/ nArrowNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2;
+/*N*/ if (rPol.nLineLen<nArrowNeed) bPfeileAussen=TRUE;
+/*N*/ nShortLen=(nArrow1Len+nArrow1Wdt + nArrow2Len+nArrow2Wdt) /2;
+/*N*/
+/*N*/ rPol.eUsedTextHPos=rRec.eWantTextHPos;
+/*N*/ rPol.eUsedTextVPos=rRec.eWantTextVPos;
+/*N*/ if (rPol.eUsedTextVPos==SDRMEASURE_TEXTVAUTO) rPol.eUsedTextVPos=SDRMEASURE_ABOVE;
+/*N*/ FASTBOOL bBrkLine=rPol.eUsedTextVPos==SDRMEASURETEXT_BREAKEDLINE;
+/*N*/ if (rPol.eUsedTextVPos==SDRMEASURETEXT_VERTICALCENTERED) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 if (pOutlinerParaObject!=NULL && pOutlinerParaObject->GetTextObject().GetParagraphCount()==1) {
+/*N*/ }
+/*N*/ rPol.bBreakedLine=bBrkLine;
+/*N*/ if (rPol.eUsedTextHPos==SDRMEASURE_TEXTHAUTO) { // bei zu breitem Text diesen eventuell nach aussen schieben
+/*N*/ FASTBOOL bOutside=FALSE;
+/*N*/ long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
+/*N*/ if (nNeedSiz>rPol.nLineLen) bOutside=TRUE; // Text passt nicht in die Mitte
+/*N*/ if (bBrkLine) {
+/*N*/ if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen
+/*N*/ } else {
+/*N*/ long nSmallNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2/4;
+/*N*/ if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen
+/*N*/ }
+/*N*/ rPol.eUsedTextHPos=bOutside ? SDRMEASURE_TEXTLEFTOUTSIDE : SDRMEASURE_TEXTINSIDE;
+/*N*/ }
+/*N*/ if (rPol.eUsedTextHPos!=SDRMEASURE_TEXTINSIDE) bPfeileAussen=TRUE;
+/*N*/ rPol.nArrow1Wdt=nArrow1Wdt;
+/*N*/ rPol.nArrow2Wdt=nArrow2Wdt;
+/*N*/ rPol.nShortLineLen=nShortLen;
+/*N*/ rPol.bPfeileAussen=bPfeileAussen;
+/*N*/ rPol.nArrow1Len=nArrow1Len;
+/*N*/ rPol.bArrow1Center=bArrow1Center;
+/*N*/ rPol.nArrow2Len=nArrow2Len;
+/*N*/ rPol.bArrow2Center=bArrow2Center;
+/*N*/
+/*N*/ rPol.nLineWink=GetAngle(aDelt);
+/*N*/ double a=rPol.nLineWink*nPi180;
+/*N*/ double nLineSin=sin(a);
+/*N*/ double nLineCos=cos(a);
+/*N*/ rPol.nLineSin=nLineSin;
+/*N*/ rPol.nLineCos=nLineCos;
+/*N*/
+/*N*/ rPol.nTextWink=rPol.nLineWink;
+/*N*/ if (rRec.bTextRota90) rPol.nTextWink+=9000;
+/*N*/
+/*N*/ rPol.bAutoUpsideDown=FALSE;
+/*N*/ if (rRec.bTextAutoAngle) {
+/*N*/ long nTmpWink=NormAngle360(rPol.nTextWink-rRec.nTextAutoAngleView);
+/*N*/ if (nTmpWink>=18000) {
+/*N*/ rPol.nTextWink+=18000;
+/*N*/ rPol.bAutoUpsideDown=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (rRec.bTextUpsideDown) rPol.nTextWink+=18000;
+/*N*/ rPol.nTextWink=NormAngle360(rPol.nTextWink);
+/*N*/ rPol.nHlpWink=rPol.nLineWink+9000;
+/*N*/ if (rRec.bBelowRefEdge) rPol.nHlpWink+=18000;
+/*N*/ rPol.nHlpWink=NormAngle360(rPol.nHlpWink);
+/*N*/ double nHlpSin=nLineCos;
+/*N*/ double nHlpCos=-nLineSin;
+/*N*/ if (rRec.bBelowRefEdge) {
+/*N*/ nHlpSin=-nHlpSin;
+/*N*/ nHlpCos=-nHlpCos;
+/*N*/ }
+/*N*/ rPol.nHlpSin=nHlpSin;
+/*N*/ rPol.nHlpCos=nHlpCos;
+/*N*/
+/*N*/ long nLineDist=rRec.nLineDist;
+/*N*/ long nOverhang=rRec.nHelplineOverhang;
+/*N*/ long nHelplineDist=rRec.nHelplineDist;
+/*N*/
+/*N*/ long dx= Round(nLineDist*nHlpCos);
+/*N*/ long dy=-Round(nLineDist*nHlpSin);
+/*N*/ long dxh1a= Round((nHelplineDist-rRec.nHelpline1Len)*nHlpCos);
+/*N*/ long dyh1a=-Round((nHelplineDist-rRec.nHelpline1Len)*nHlpSin);
+/*N*/ long dxh1b= Round((nHelplineDist-rRec.nHelpline2Len)*nHlpCos);
+/*N*/ long dyh1b=-Round((nHelplineDist-rRec.nHelpline2Len)*nHlpSin);
+/*N*/ long dxh2= Round((nLineDist+nOverhang)*nHlpCos);
+/*N*/ long dyh2=-Round((nLineDist+nOverhang)*nHlpSin);
+/*N*/
+/*N*/ // Masshilfslinie 1
+/*N*/ rPol.aHelpline1.aP1=Point(aP1.X()+dxh1a,aP1.Y()+dyh1a);
+/*N*/ rPol.aHelpline1.aP2=Point(aP1.X()+dxh2,aP1.Y()+dyh2);
+/*N*/
+/*N*/ // Masshilfslinie 2
+/*N*/ rPol.aHelpline2.aP1=Point(aP2.X()+dxh1b,aP2.Y()+dyh1b);
+/*N*/ rPol.aHelpline2.aP2=Point(aP2.X()+dxh2,aP2.Y()+dyh2);
+/*N*/
+/*N*/ // Masslinie(n)
+/*N*/ Point aMainlinePt1(aP1.X()+dx,aP1.Y()+dy);
+/*N*/ Point aMainlinePt2(aP2.X()+dx,aP2.Y()+dy);
+/*N*/ if (!bPfeileAussen) {
+/*N*/ rPol.aMainline1.aP1=aMainlinePt1;
+/*N*/ rPol.aMainline1.aP2=aMainlinePt2;
+/*N*/ rPol.aMainline2=rPol.aMainline1;
+/*N*/ rPol.aMainline3=rPol.aMainline1;
+/*N*/ rPol.nMainlineAnz=1;
+/*N*/ 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);
+/*N*/ }
+/*N*/ } else {
+/*N*/ long nLen1=nShortLen; // Pfeilbreite als Linienlaenge ausserhalb des Pfeils
+/*N*/ long nLen2=nShortLen;
+/*N*/ long nTextWdt=rRec.bTextRota90 ? rPol.aTextSize.Height() : rPol.aTextSize.Width();
+/*N*/ if (!bBrkLine) {
+/*N*/ if (rPol.eUsedTextHPos==SDRMEASURE_TEXTLEFTOUTSIDE) nLen1=nArrow1Len+nTextWdt;
+/*N*/ if (rPol.eUsedTextHPos==SDRMEASURE_TEXTRIGHTOUTSIDE) nLen2=nArrow2Len+nTextWdt;
+/*N*/ }
+/*N*/ rPol.aMainline1.aP1=aMainlinePt1;
+/*N*/ rPol.aMainline1.aP2=aMainlinePt1; rPol.aMainline1.aP2.X()-=nLen1; RotatePoint(rPol.aMainline1.aP2,aMainlinePt1,nLineSin,nLineCos);
+/*N*/ rPol.aMainline2.aP1=aMainlinePt2; rPol.aMainline2.aP1.X()+=nLen2; RotatePoint(rPol.aMainline2.aP1,aMainlinePt2,nLineSin,nLineCos);
+/*N*/ rPol.aMainline2.aP2=aMainlinePt2;
+/*N*/ rPol.aMainline3.aP1=aMainlinePt1;
+/*N*/ rPol.aMainline3.aP2=aMainlinePt2;
+/*N*/ rPol.nMainlineAnz=3;
+/*N*/ if (bBrkLine && rPol.eUsedTextHPos==SDRMEASURE_TEXTINSIDE) rPol.nMainlineAnz=2;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol, XPolyPolygon& rXPP) const
+/*N*/ {
+/*N*/ rXPP.Clear();
+/*N*/ XPolygon aXP(2);
+/*N*/ aXP[0]=rPol.aMainline1.aP1;
+/*N*/ aXP[1]=rPol.aMainline1.aP2;
+/*N*/ rXPP.Insert(aXP);
+/*N*/ if (rPol.nMainlineAnz>1) {
+/*N*/ aXP[0]=rPol.aMainline2.aP1;
+/*N*/ aXP[1]=rPol.aMainline2.aP2;
+/*N*/ rXPP.Insert(aXP);
+/*N*/ }
+/*N*/ if (rPol.nMainlineAnz>2) {
+/*N*/ aXP[0]=rPol.aMainline3.aP1;
+/*N*/ aXP[1]=rPol.aMainline3.aP2;
+/*N*/ rXPP.Insert(aXP);
+/*N*/ }
+/*N*/ aXP[0]=rPol.aHelpline1.aP1;
+/*N*/ aXP[1]=rPol.aHelpline1.aP2;
+/*N*/ rXPP.Insert(aXP);
+/*N*/ aXP[0]=rPol.aHelpline2.aP1;
+/*N*/ aXP[1]=rPol.aHelpline2.aP2;
+/*N*/ rXPP.Insert(aXP);
+/*N*/ }
+
+
+/*N*/ FASTBOOL SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+/*N*/ FASTBOOL bEdit,
+/*N*/ Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const
+/*N*/ {
+/*N*/ const SvxFieldData* pField=rField.GetField();
+/*N*/ SdrMeasureField* pMeasureField=PTR_CAST(SdrMeasureField,pField);
+/*N*/ if (pMeasureField!=NULL) {
+/*N*/ pMeasureField->TakeRepresentation(*this,rRet);
+/*N*/ if (rpFldColor!=NULL) {
+/*?*/ if (!bEdit)
+/*?*/ {
+/*?*/ delete rpFldColor;
+/*?*/ rpFldColor=NULL;
+/*?*/ }
+/*N*/ }
+/*N*/ return TRUE;
+/*N*/ } else {
+/*?*/ return SdrTextObj::CalcFieldValue(rField,nPara,nPos,bEdit,rpTxtColor,rpFldColor,rRet);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::UndirtyText() const
+/*N*/ {
+/*N*/ if (bTextDirty) {
+/*N*/ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+/*N*/ if (pOutlinerParaObject==NULL) {
+/*N*/ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS)),ESelection(0,0));
+/*N*/ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_VALUE)),ESelection(0,1));
+/*N*/ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_UNIT)),ESelection(0,2));
+/*N*/ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS)),ESelection(0,3));
+/*N*/
+/*N*/ if(GetStyleSheet())
+/*N*/ rOutliner.SetStyleSheet(0, GetStyleSheet());
+/*N*/
+/*N*/ rOutliner.SetParaAttribs(0, GetItemSet());
+/*N*/
+/*N*/ // casting auf nonconst
+/*N*/ ((SdrMeasureObj*)this)->pOutlinerParaObject=rOutliner.CreateParaObject();
+/*N*/ } else {
+/*N*/ rOutliner.SetText(*pOutlinerParaObject);
+/*N*/ }
+/*N*/ rOutliner.SetUpdateMode(TRUE);
+/*N*/ rOutliner.UpdateFields();
+/*N*/ Size aSiz(rOutliner.CalcTextSize());
+/*N*/ rOutliner.Clear();
+/*N*/ // 3x casting auf nonconst
+/*N*/ ((SdrMeasureObj*)this)->aTextSize=aSiz;
+/*N*/ ((SdrMeasureObj*)this)->bTextSizeDirty=FALSE;
+/*N*/ ((SdrMeasureObj*)this)->bTextDirty=FALSE;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ if (bTextDirty) UndirtyText();
+/*N*/ ImpMeasureRec aRec;
+/*N*/ ImpMeasurePoly aMPol;
+/*N*/ ImpTakeAttr(aRec);
+/*N*/ ImpCalcGeometrics(aRec,aMPol);
+/*N*/
+/*N*/ // TextSize ermitteln inkl. Textrahmenabstaende
+/*N*/ Size aTextSize(aMPol.aTextSize);
+/*N*/ if (aTextSize.Width()<1) aTextSize.Width()=1;
+/*N*/ if (aTextSize.Height()<1) aTextSize.Height()=1;
+/*N*/ aTextSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
+/*N*/ aTextSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
+/*N*/
+/*N*/ Point aPt1(aMPol.aMainline1.aP1);
+/*N*/ long nLen=aMPol.nLineLen;
+/*N*/ long nLWdt=aMPol.nLineWdt2;
+/*N*/ long nArr1Len=aMPol.nArrow1Len;
+/*N*/ long nArr2Len=aMPol.nArrow2Len;
+/*N*/ if (aMPol.bBreakedLine) {
+/*N*/ // Bei Unterbrochener Linie und Outside muss der Text nicht neben den
+/*N*/ // Pfeil sondern neben die Linie an dem Pfeil plaziert werden
+/*?*/ nArr1Len=aMPol.nShortLineLen+aMPol.nArrow1Wdt/4;
+/*?*/ nArr2Len=aMPol.nShortLineLen+aMPol.nArrow2Wdt/4;
+/*N*/ }
+/*N*/
+/*N*/ Point aTextPos;
+/*N*/ FASTBOOL bRota90=aRec.bTextRota90;
+/*N*/ FASTBOOL bUpsideDown=aRec.bTextUpsideDown!=aMPol.bAutoUpsideDown;
+/*N*/ FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge;
+/*N*/ SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos;
+/*N*/ SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos;
+/*N*/ if (!bRota90) {
+/*N*/ switch (eMH) {
+/*N*/ case SDRMEASURE_TEXTLEFTOUTSIDE: aTextPos.X()=aPt1.X()-aTextSize.Width()-nArr1Len-nLWdt; break;
+/*N*/ case SDRMEASURE_TEXTRIGHTOUTSIDE: aTextPos.X()=aPt1.X()+nLen+nArr2Len+nLWdt; break;
+/*N*/ default: aTextPos.X()=aPt1.X(); aTextSize.Width()=nLen;
+/*N*/ }
+/*N*/ switch (eMV) {
+/*N*/ case SDRMEASURETEXT_VERTICALCENTERED:
+/*N*/ case SDRMEASURETEXT_BREAKEDLINE: aTextPos.Y()=aPt1.Y()-aTextSize.Height()/2; break;
+/*N*/ case SDRMEASURE_BELOW: {
+/*N*/ if (!bUpsideDown) aTextPos.Y()=aPt1.Y()+nLWdt;
+/*N*/ else aTextPos.Y()=aPt1.Y()-aTextSize.Height()-nLWdt;
+/*N*/ } break;
+/*N*/ default: {
+/*N*/ if (!bUpsideDown) aTextPos.Y()=aPt1.Y()-aTextSize.Height()-nLWdt;
+/*N*/ else aTextPos.Y()=aPt1.Y()+nLWdt;
+/*N*/ }
+/*N*/ }
+/*N*/ if (bUpsideDown) {
+/*N*/ aTextPos.X()+=aTextSize.Width();
+/*N*/ aTextPos.Y()+=aTextSize.Height();
+/*N*/ }
+/*N*/ } else { // also wenn bTextRota90==TRUE
+/*N*/ switch (eMH) {
+/*N*/ case SDRMEASURE_TEXTLEFTOUTSIDE: aTextPos.X()=aPt1.X()-aTextSize.Height()-nArr1Len; break;
+/*N*/ case SDRMEASURE_TEXTRIGHTOUTSIDE: aTextPos.X()=aPt1.X()+nLen+nArr2Len; break;
+/*N*/ default: aTextPos.X()=aPt1.X(); aTextSize.Height()=nLen;
+/*N*/ }
+/*N*/ switch (eMV) {
+/*N*/ case SDRMEASURETEXT_VERTICALCENTERED:
+/*N*/ case SDRMEASURETEXT_BREAKEDLINE: aTextPos.Y()=aPt1.Y()+aTextSize.Width()/2; break;
+/*N*/ case SDRMEASURE_BELOW: {
+/*N*/ if (!bBelowRefEdge) aTextPos.Y()=aPt1.Y()+aTextSize.Width()+nLWdt;
+/*N*/ else aTextPos.Y()=aPt1.Y()-nLWdt;
+/*N*/ } break;
+/*N*/ default: {
+/*N*/ if (!bBelowRefEdge) aTextPos.Y()=aPt1.Y()-nLWdt;
+/*N*/ else aTextPos.Y()=aPt1.Y()+aTextSize.Width()+nLWdt;
+/*N*/ }
+/*N*/ }
+/*N*/ if (bUpsideDown) {
+/*N*/ aTextPos.X()+=aTextSize.Height();
+/*N*/ aTextPos.Y()-=aTextSize.Width();
+/*N*/ }
+/*N*/ }
+/*N*/ if (aMPol.nTextWink!=aGeo.nDrehWink) {
+/*N*/ ((SdrMeasureObj*)this)->aGeo.nDrehWink=aMPol.nTextWink;
+/*N*/ ((SdrMeasureObj*)this)->aGeo.RecalcSinCos();
+/*N*/ }
+/*N*/ RotatePoint(aTextPos,aPt1,aMPol.nLineSin,aMPol.nLineCos);
+/*N*/ aTextSize.Width()++; aTextSize.Height()++; // wg. des komischen Verhaltens beim Rect-Ctor
+/*N*/ rRect=Rectangle(aTextPos,aTextSize);
+/*N*/ rRect.Justify();
+/*N*/ ((SdrMeasureObj*)this)->aRect=rRect;
+/*N*/
+/*N*/ if (aMPol.nTextWink!=aGeo.nDrehWink) {
+/*N*/ ((SdrMeasureObj*)this)->aGeo.nDrehWink=aMPol.nTextWink;
+/*N*/ ((SdrMeasureObj*)this)->aGeo.RecalcSinCos();
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrMeasureObj::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ SdrTextObj::NbcMove(rSiz);
+/*N*/ MovePoint(aPt1,rSiz);
+/*N*/ MovePoint(aPt2,rSiz);
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrTextObj::NbcResize(rRef,xFact,yFact);
+/*N*/ ResizePoint(aPt1,rRef,xFact,yFact);
+/*N*/ ResizePoint(aPt2,rRef,xFact,yFact);
+/*N*/ SetTextDirty();
+/*N*/ }
+
+
+
+
+
+
+/*N*/ long SdrMeasureObj::GetRotateAngle() const
+/*N*/ {
+/*N*/ return GetAngle(aPt2-aPt1);
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::RecalcBoundRect()
+/*N*/ {
+/*N*/ if (bTextDirty) UndirtyText();
+/*N*/ ImpMeasureRec aRec;
+/*N*/ ImpMeasurePoly aMPol;
+/*N*/ ImpTakeAttr(aRec);
+/*N*/ ImpCalcGeometrics(aRec,aMPol);
+/*N*/ XPolyPolygon aXPP;
+/*N*/ ImpCalcXPoly(aMPol,aXPP);
+/*N*/ aOutRect=aXPP.GetBoundRect();
+/*N*/
+/*N*/ // Strichstaerke und Linienenden drauftun
+/*N*/ long nLineWdt=ImpGetLineWdt();
+/*N*/ long nLEndWdt=ImpGetLineEndAdd();
+/*N*/ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+/*N*/ if (nLineWdt!=0) {
+/*N*/ aOutRect.Left ()-=nLineWdt;
+/*N*/ aOutRect.Top ()-=nLineWdt;
+/*N*/ aOutRect.Right ()+=nLineWdt;
+/*N*/ aOutRect.Bottom()+=nLineWdt;
+/*N*/ }
+/*N*/
+/*N*/ // AW 10082000 taken out, seems not to be necessary...
+/*N*/ // Rectangle aTempRect;
+/*N*/ // TakeUnrotatedSnapRect(aTempRect); // Damit aRect gesetzt ist
+/*N*/ ImpAddShadowToBoundRect();
+/*N*/ ImpAddTextToBoundRect();
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ // !!!!! nur zu Testzwecken !!!!!
+/*N*/ //maSnapRect=Rectangle(aPt1,aPt2);
+/*N*/ //maSnapRect.Justify();
+/*N*/
+/*N*/ // #94520# Added correct implementation here.
+/*N*/ ImpMeasureRec aRec;
+/*N*/ ImpMeasurePoly aMPol;
+/*N*/ XPolyPolygon aXPP;
+/*N*/
+/*N*/ ImpTakeAttr(aRec);
+/*N*/ ImpCalcGeometrics(aRec, aMPol);
+/*N*/ ImpCalcXPoly(aMPol, aXPP);
+/*N*/ maSnapRect = aXPP.GetBoundRect();
+/*N*/ }
+
+
+
+
+
+/*N*/ const Point& SdrMeasureObj::GetPoint(USHORT i) const
+/*N*/ {
+/*N*/ return i==0 ? aPt1 : aPt2;
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::NbcSetPoint(const Point& rPnt, USHORT i)
+/*N*/ {
+/*N*/ if (i==0) aPt1=rPnt;
+/*N*/ if (i==1) aPt2=rPnt;
+/*N*/ SetRectsDirty();
+/*N*/ SetTextDirty();
+/*N*/ }
+
+
+
+
+
+
+/*N*/ FASTBOOL SdrMeasureObj::BegTextEdit(SdrOutliner& rOutl)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");return FALSE; //STRIP001
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::EndTextEdit(SdrOutliner& rOutl)
+/*N*/ {
+/*N*/ SdrTextObj::EndTextEdit(rOutl);
+/*N*/ }
+
+/*N*/ const Size& SdrMeasureObj::GetTextSize() const
+/*N*/ {
+/*N*/ if (bTextDirty) UndirtyText();
+/*N*/ return SdrTextObj::GetTextSize();
+/*N*/ }
+
+/*N*/ OutlinerParaObject* SdrMeasureObj::GetOutlinerParaObject() const
+/*N*/ {
+/*N*/ if (bTextDirty) UndirtyText();
+/*N*/ return pOutlinerParaObject;
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
+/*N*/ {
+/*N*/ SdrTextObj::NbcSetOutlinerParaObject(pTextObject);
+/*N*/ if (pOutlinerParaObject==NULL) SetTextDirty(); // Text neu berechnen!
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText,
+/*N*/ Rectangle* pAnchorRect, BOOL bLineWidth ) const
+/*N*/ {
+/*N*/ if (bTextDirty) UndirtyText();
+/*N*/ SdrTextObj::TakeTextRect( rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth );
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
+/*N*/ {
+/*N*/ if (bTextDirty) UndirtyText();
+/*N*/ SdrTextObj::TakeTextAnchorRect(rAnchorRect);
+/*N*/ }
+
+
+
+
+/*N*/ void __EXPORT SdrMeasureObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ 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();
+/*?*/ }
+/*N*/ }
+/*N*/ SdrTextObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ SetTextDirty();
+/*N*/ SdrTextObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ SfxItemSet* SdrMeasureObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ // include ALL items, 2D and 3D
+/*N*/ return new SfxItemSet(rPool,
+/*N*/ // ranges from SdrAttrObj
+/*N*/ SDRATTR_START, SDRATTRSET_SHADOW,
+/*N*/ SDRATTRSET_OUTLINER, SDRATTRSET_MISC,
+/*N*/ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+/*N*/
+/*N*/ // measure attributes
+/*N*/ SDRATTR_MEASURE_FIRST, SDRATTRSET_MEASURE,
+/*N*/
+/*N*/ // outliner and end
+/*N*/ EE_ITEMS_START, EE_ITEMS_END,
+/*N*/ 0, 0);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+/*N*/ void SdrMeasureObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::ItemSetChanged(rSet);
+/*N*/
+/*N*/ // local changes
+/*N*/ SetTextDirty();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrMeasureObj::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::PreSave();
+/*N*/
+/*N*/ // prepare SetItems for storage
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/ const SfxItemSet* pParent = GetStyleSheet() ? &GetStyleSheet()->GetItemSet() : 0L;
+/*N*/ SdrMeasureSetItem aMeasAttr(rSet.GetPool());
+/*N*/ aMeasAttr.GetItemSet().Put(rSet);
+/*N*/ aMeasAttr.GetItemSet().SetParent(pParent);
+/*N*/ mpObjectItemSet->Put(aMeasAttr);
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::PostSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::PostSave();
+/*N*/
+/*N*/ // remove SetItems from local itemset
+/*N*/ mpObjectItemSet->ClearItem(SDRATTRSET_MEASURE);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMeasureObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ UndirtyText();
+/*N*/
+/*N*/ SdrTextObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrMeasureObj");
+/*N*/ #endif
+/*N*/
+/*N*/ rOut << aPt1;
+/*N*/ rOut << aPt2;
+/*N*/ rOut << BOOL(FALSE); // bTextOverwritten wg. Kompatibilitaet. Gibt's nicht mehr.
+/*N*/
+/*N*/ SfxItemPool* pPool=GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetUnmergedItemSet();
+/*N*/
+/*N*/ pPool->StoreSurrogate(rOut, &rSet.Get(SDRATTRSET_MEASURE));
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rOut << sal_uInt16(SFX_ITEMS_NULL);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrMeasureObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrTextObj::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrMeasureObj");
+/*N*/ #endif
+/*N*/ rIn>>aPt1;
+/*N*/ rIn>>aPt2;
+/*N*/ BOOL bTextOverwrittenTmp;
+/*N*/ rIn>>bTextOverwrittenTmp;
+/*N*/ SfxItemPool* pPool=GetItemPool();
+/*N*/
+/*N*/ if(pPool)
+/*N*/ {
+/*N*/ sal_uInt16 nSetID = SDRATTRSET_MEASURE;
+/*N*/ const SdrMeasureSetItem* pMeasAttr = (const SdrMeasureSetItem*)pPool->LoadSurrogate(rIn, nSetID, 0);
+/*N*/ if(pMeasAttr)
+/*N*/ SetItemSet(pMeasAttr->GetItemSet());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_uInt16 nSuroDum;
+/*N*/ rIn >> nSuroDum;
+/*N*/ }
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx
new file mode 100644
index 000000000000..dc40cbf0cd52
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoole2.cxx
@@ -0,0 +1,902 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+
+
+#include <bf_sfx2/interno.hxx>
+#include <comphelper/classids.hxx>
+
+
+
+
+#include "svdoole2.hxx"
+#include <bf_svtools/solar.hrc>
+
+#include "svdio.hxx"
+#include "svdstr.hrc" // Objektname
+#include "svdetc.hxx"
+#include "svdview.hxx"
+#include "unomlstr.hxx"
+#include <bf_so3/client.hxx>
+
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
+#define SO2_DECL_SVINPLACEOBJECT_DEFINED
+SO2_DECL_REF(SvInPlaceObject)
+#endif
+
+/*N*/ class SdrOle2ObjImpl
+/*N*/ {
+/*N*/ public:
+/*N*/ GDIMetaFile* pMetaFile; // Metafile fuer GetMtf kopieren und merken
+/*N*/ BfGraphicObject* pGraphicObject;
+/*N*/ String aPersistName; // name of object in persist
+/*N*/
+/*N*/ // #107645#
+/*N*/ // New local var to avoid repeated loading if load of OLE2 fails
+/*N*/ sal_Bool mbLoadingOLEObjectFailed;
+/*N*/
+/*N*/ bool mbConnected;
+/*N*/
+/*N*/ };
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// Predicate determining whether the given OLE is an internal math
+// object
+/*N*/ static bool ImplIsMathObj( const SvInPlaceObjectRef& rObjRef )
+/*N*/ {
+/*N*/ if( !rObjRef.Is() )
+/*N*/ return false;
+/*N*/
+/*N*/ SvGlobalName aClassName( rObjRef->GetClassName() );
+/*N*/
+/*N*/ if( aClassName == SvGlobalName(BF_SO3_SM_CLASSID_30) ||
+/*N*/ aClassName == SvGlobalName(BF_SO3_SM_CLASSID_40) ||
+/*N*/ aClassName == SvGlobalName(BF_SO3_SM_CLASSID_50) ||
+/*N*/ aClassName == SvGlobalName(BF_SO3_SM_CLASSID_60) ||
+/*N*/ aClassName == SvGlobalName(BF_SO3_SM_CLASSID) )
+/*N*/ {
+/*N*/ return true;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ return false;
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ TYPEINIT1(SdrOle2Obj,SdrRectObj);
+/*N*/
+/*N*/ SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_)
+/*N*/ {
+/*N*/ bInDestruction = FALSE;
+/*N*/ Init();
+/*N*/
+/*N*/ ppObjRef=new SvInPlaceObjectRef;
+/*N*/ bFrame=bFrame_;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, FASTBOOL bFrame_):
+/*N*/ SdrRectObj(rNewRect)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::Init()
+/*N*/ {
+/*N*/ mpImpl = new SdrOle2ObjImpl;
+/*N*/ pModifyListener = NULL;
+/*N*/ pGraphic=NULL;
+/*N*/ mpImpl->pMetaFile=NULL;
+/*N*/ mpImpl->pGraphicObject=NULL;
+/*N*/
+/*N*/ // #107645#
+/*N*/ // init to start situation, loading did not fail
+/*N*/ mpImpl->mbLoadingOLEObjectFailed = sal_False;
+/*N*/
+/*N*/ mpImpl->mbConnected = false;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrOle2Obj::~SdrOle2Obj()
+/*N*/ {
+/*N*/ bInDestruction = TRUE;
+/*N*/ // Aus Cache entfernen
+/*N*/ GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
+/*N*/
+/*N*/ SvInPlaceObjectRef aRef( *ppObjRef );
+/*N*/
+/*N*/ Disconnect();
+/*N*/
+/*N*/ if(pModel && aRef.Is())
+/*N*/ {
+/*N*/ SvPersist* pPers=pModel->GetPersist();
+/*N*/ if(pPers!=NULL)
+/*N*/ {
+/*?*/ pPers->Remove(aRef);
+/*N*/ }
+/*N*/ }
+/*N*/ aRef.Clear();
+/*N*/
+/*N*/ delete ppObjRef;
+/*N*/
+/*N*/ if(pGraphic!=NULL)
+/*?*/ delete pGraphic;
+/*N*/
+/*N*/ if(mpImpl->pMetaFile!=NULL)
+/*?*/ delete mpImpl->pMetaFile;
+/*N*/
+/*N*/ if(mpImpl->pGraphicObject!=NULL)
+/*?*/ delete mpImpl->pGraphicObject;
+/*N*/
+/*N*/ if(pModifyListener)
+/*N*/ {
+/*N*/ pModifyListener->invalidate();
+/*N*/ pModifyListener->release();
+/*N*/ pModifyListener = NULL;
+/*N*/ }
+/*N*/ delete mpImpl;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::SetGraphic(const Graphic* pGrf)
+/*N*/ {
+/*N*/ if ( pGraphic )
+/*N*/ {
+/*?*/ delete pGraphic;
+/*?*/ pGraphic = NULL;
+/*?*/ delete mpImpl->pGraphicObject;
+/*?*/ mpImpl->pGraphicObject = NULL;
+/*N*/ }
+/*N*/
+/*N*/ if (pGrf!=NULL)
+/*N*/ {
+/*?*/ pGraphic = new Graphic(*pGrf);
+/*?*/ mpImpl->pGraphicObject = new BfGraphicObject( *pGraphic );
+/*N*/ }
+/*N*/
+/*N*/ if ( ppObjRef->Is() && pGrf )
+/*?*/ SendRepaintBroadcast();
+/*N*/
+/*N*/ SetChanged();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ FASTBOOL SdrOle2Obj::IsEmpty() const
+/*N*/ {
+/*N*/ return !ppObjRef->Is();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::Connect()
+/*N*/ {
+/*N*/ if(pModel && mpImpl->aPersistName.Len())
+/*N*/ {
+/*N*/ SvPersist* pPers=pModel->GetPersist();
+/*N*/ if (pPers!=NULL)
+/*N*/ {
+/*N*/ SvInfoObjectRef xIObj;
+/*N*/ SvInfoObject* pInfo = pPers->Find(mpImpl->aPersistName);
+/*N*/
+/*N*/ if (!pInfo)
+/*N*/ {
+/*?*/ if ( !ppObjRef->Is() )
+/*?*/ GetObjRef(); // try to load inplace object
+/*?*/
+/*?*/ xIObj = pInfo = new SvEmbeddedInfoObject(*ppObjRef,mpImpl->aPersistName);
+/*N*/ }
+/*N*/
+/*N*/ if ( !pPers->HasObject(mpImpl->aPersistName) )
+/*N*/ {
+/*?*/ pPers->Move(pInfo, mpImpl->aPersistName);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pInfo->SetDeleted(FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // In Cache einfuegen
+/*N*/ GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
+/*N*/ }
+/*N*/
+/*N*/ if ( ppObjRef->Is() && (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
+/*N*/ {
+/*N*/ if (pModel && pModel->GetRefDevice() &&
+/*N*/ pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+/*N*/ {
+/*?*/ // Kein RefDevice oder RefDevice kein Printer
+/*?*/ BOOL bModified = (*ppObjRef)->IsModified();
+/*?*/ Printer* pPrinter = (Printer*) pModel->GetRefDevice();
+/*?*/ (*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
+/*?*/ (*ppObjRef)->SetModified( bModified );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !IsEmpty() )
+/*N*/ {
+/*?*/ // 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 );
+/*?*/ }
+/*?*/
+/*?*/ mpImpl->mbConnected = true;
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::Disconnect()
+/*N*/ {
+/*N*/ if( !mpImpl->mbConnected )
+/*N*/ return;
+/*N*/
+/*N*/ if( !IsEmpty() && mpImpl->aPersistName.Len() )
+/*N*/ {
+/*N*/ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+/*N*/ if( xBC.is() && pModifyListener )
+/*N*/ {
+/*N*/ uno::Reference< util::XModifyListener > xListener( pModifyListener );
+/*N*/ xBC->removeModifyListener( xListener );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (pModel && mpImpl->aPersistName.Len() )
+/*N*/ {
+/*N*/ if( pModel->IsInDestruction() )
+/*N*/ {
+/*N*/ *ppObjRef = NULL;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ SvPersist* pPers = pModel->GetPersist();
+/*N*/
+/*N*/ if (pPers)
+/*N*/ {
+/*N*/ SvInfoObject* pInfo = pPers->Find(mpImpl->aPersistName);
+/*N*/
+/*N*/ if (pInfo)
+/*N*/ {
+/*N*/ pInfo->SetDeleted(TRUE);
+/*N*/ pInfo->SetObj(0);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( ppObjRef->Is() )
+/*N*/ (*ppObjRef)->DoClose();
+/*N*/ }
+/*N*/
+/*N*/ // Aus Cache entfernen
+/*N*/ GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
+/*N*/
+/*N*/ if ( ppObjRef->Is() )
+/*N*/ ppObjRef->Clear();
+/*N*/ }
+/*N*/
+/*N*/ mpImpl->mbConnected = false;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ FASTBOOL bChg = pNewModel!=pModel;
+/*N*/
+/*N*/ if( bChg )
+/*N*/ Disconnect(); // mit dem alten Namen
+/*N*/
+/*N*/ if( pModel && pNewModel )
+/*N*/ {
+/*?*/ SvPersist* pDestPers = pNewModel->GetPersist();
+/*?*/ SvPersist* pSrcPers = pModel->GetPersist();
+/*?*/
+/*?*/ if( pDestPers && pSrcPers && ( pDestPers != pSrcPers ) )
+/*?*/ {
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 ImpCopyObject( *pSrcPers, *pDestPers, mpImpl->aPersistName );
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ SdrRectObj::SetModel( pNewModel );
+/*N*/
+/*N*/ if( bChg )
+/*N*/ Connect();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL;
+/*N*/ FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL;
+/*N*/
+/*N*/ if (bRemove) Disconnect();
+/*N*/
+/*N*/ SdrRectObj::SetPage(pNewPage);
+/*N*/
+/*N*/ if (bInsert) Connect();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::SetObjRef(const SvInPlaceObjectRef& rNewObjRef)
+/*N*/ {
+/*N*/ if( rNewObjRef == *ppObjRef )
+/*N*/ return;
+/*N*/
+/*N*/ Disconnect();
+/*N*/
+/*N*/ *ppObjRef=rNewObjRef;
+/*N*/
+/*N*/ SvInPlaceObjectRef& rIPRef = *ppObjRef;
+/*N*/
+/*N*/ if (rIPRef.Is() &&
+/*N*/ (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_NOTRESIZEABLE) )
+/*N*/ {
+/*N*/ SetResizeProtect(TRUE);
+/*N*/ }
+/*N*/
+/*N*/ // #108759# For math objects, set closed state to transparent
+/*N*/ if( ImplIsMathObj( *ppObjRef ) )
+/*N*/ SetClosedObj( false );
+/*N*/
+/*N*/ Connect();
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::SetClosedObj( bool bIsClosed )
+/*N*/ {
+/*N*/ // #108759# Allow changes to the closed state of OLE objects
+/*N*/ bClosedObj = bIsClosed;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ XubString SdrOle2Obj::GetName() const
+/*N*/ {
+/*N*/ return aName;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::SetPersistName( const String& rPersistName )
+/*N*/ {
+/*N*/ mpImpl->aPersistName = rPersistName;
+/*N*/ SetChanged();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ String SdrOle2Obj::GetPersistName() const
+/*N*/ {
+/*N*/ return mpImpl->aPersistName;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ UINT16 SdrOle2Obj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return bFrame ? UINT16(OBJ_FRAME) : UINT16(OBJ_OLE2);
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SdrObject* SdrOle2Obj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ return ImpCheckHit(rPnt,nTol,pVisiLayer,TRUE,TRUE);
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*NBFF*/ void SdrOle2Obj::ImpSetVisAreaSize()
+/*NBFF*/ {
+/*NBFF*/ GetObjRef(); // try to load inplace object
+/*NBFF*/ SvInPlaceObjectRef& rIPRef=*ppObjRef;
+/*NBFF*/
+/*NBFF*/ if (rIPRef.Is())
+/*NBFF*/ {
+/*NBFF*/ if (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_SERVERRESIZE)
+/*NBFF*/ {
+/*NBFF*/ // Server resized selbst (StarChart)
+/*NBFF*/ // Neue VisArea setzen
+/*NBFF*/ Rectangle aVisArea = OutputDevice::LogicToLogic( aRect,
+/*NBFF*/ pModel->GetScaleUnit(), rIPRef->GetMapUnit() );
+/*NBFF*/ rIPRef->SetVisArea(aVisArea);
+/*NBFF*/
+/*NBFF*/ // Wurde die VisArea akzeptiert?
+/*NBFF*/ Rectangle aAcceptedVisArea(rIPRef->GetVisArea());
+/*NBFF*/
+/*NBFF*/ if (aVisArea.GetSize() != aAcceptedVisArea.GetSize())
+/*NBFF*/ {
+/*NBFF*/ // VisArea wurde nicht akzeptiert -> korrigieren
+/*NBFF*/ aRect.SetSize(OutputDevice::LogicToLogic( aAcceptedVisArea.GetSize(),
+/*NBFF*/ rIPRef->GetMapUnit(), pModel->GetScaleUnit()));
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/ else
+/*NBFF*/ {
+/*NBFF*/ ///**********************************************************************
+/*NBFF*/ //* Nun wird nicht mehr die VisArea gesetzt, sondern es erfolgt eine
+/*NBFF*/ //* Skalierung
+/*NBFF*/ //**********************************************************************/
+/*NBFF*/ SvEmbeddedClient* pClient = (*ppObjRef)->GetClient();
+/*NBFF*/
+/*NBFF*/ if (pClient)
+/*NBFF*/ {
+/*NBFF*/ SvClientData* pData = pClient->GetClientData();
+/*NBFF*/ Size aObjAreaSize = rIPRef->GetVisArea().GetSize();
+/*NBFF*/ aObjAreaSize = OutputDevice::LogicToLogic( aObjAreaSize,
+/*NBFF*/ rIPRef->GetMapUnit(),
+/*NBFF*/ pModel->GetScaleUnit() );
+/*NBFF*/
+/*NBFF*/ Size aSize = aRect.GetSize();
+/*NBFF*/ Fraction aScaleWidth (aSize.Width(), aObjAreaSize.Width() );
+/*NBFF*/ Fraction aScaleHeight(aSize.Height(), aObjAreaSize.Height() );
+/*NBFF*/ // Nun auf 10 Binaerstellen kuerzen
+/*NBFF*/ Kuerzen(aScaleHeight, 10);
+/*NBFF*/ Kuerzen(aScaleWidth, 10);
+/*NBFF*/
+/*NBFF*/ pData->SetSizeScale(aScaleWidth, aScaleHeight);
+/*NBFF*/
+/*NBFF*/ Rectangle aScaleRect(aRect.TopLeft(), aObjAreaSize);
+/*NBFF*/ pData->SetObjArea(aScaleRect);
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/ }
+/*NBFF*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrRectObj::NbcResize(rRef,xFact,yFact);
+/*N*/ 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();
+/*N*/ }
+/*N*/ if( (NULL == pModel) || !pModel->isLocked() )
+/*NBFF*/ ImpSetVisAreaSize();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetSnapRect(rRect);
+/*N*/ if( (NULL == pModel) || !pModel->isLocked() )
+/*NBFF*/ ImpSetVisAreaSize();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetLogicRect(rRect);
+/*N*/ if( (NULL == pModel) || !pModel->isLocked() )
+/*NBFF*/ ImpSetVisAreaSize();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ FASTBOOL SdrOle2Obj::HasGDIMetaFile() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ const GDIMetaFile* SdrOle2Obj::GetGDIMetaFile() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");return NULL; //STRIP001
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrRectObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrOle2Obj");
+/*N*/ #endif
+/*N*/
+/*N*/ // UNICODE: rOut<<mpImpl->aPersistName;
+/*N*/ rOut.WriteByteString(mpImpl->aPersistName);
+/*N*/
+/*N*/ // UNICODE: rOut<<aProgName;
+/*N*/ rOut.WriteByteString(aProgName);
+/*N*/
+/*N*/ GetObjRef();
+/*N*/ BOOL bObjRefValid=ppObjRef->Is();
+/*N*/ rOut<<bObjRefValid;
+/*N*/ BOOL bPreview = FALSE;
+/*N*/ if( !IsEmptyPresObj() && pModel && pModel->IsSaveOLEPreview() )
+/*N*/ bPreview = TRUE;
+/*N*/
+/*N*/ if( bPreview )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ BOOL bHasGraphic=pGraphic!=NULL;
+
+ // #i27418# If there actually is no graphic, do not write one. This will lead
+ // to loading an empty bitmap in older OOo versions which sets an error code at
+ // the stream -> load breaks.
+ if(bHasGraphic)
+ {
+ if(GRAPHIC_NONE == pGraphic->GetType())
+ {
+ bHasGraphic = false;
+ }
+ }
+
+/*N*/ rOut<<bHasGraphic;
+/*N*/ if (bHasGraphic)
+/*N*/ {
+/*?*/ SdrDownCompat aGrafCompat(rOut,STREAM_WRITE); // ab V11 eingepackt
+/*?*/ #ifdef DBG_UTIL
+/*?*/ aGrafCompat.SetID("SdrOle2Obj(Graphic)");
+/*?*/ #endif
+/*?*/ rOut<<*pGraphic;
+/*N*/ }
+/*N*/
+/*N*/ if( bPreview )
+/*?*/ ( (SdrOle2Obj*) this )->SetGraphic( NULL ); // remove preview graphic
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ rIn.SetError( 0 );
+/*N*/
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrRectObj::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrOle2Obj");
+/*N*/ #endif
+/*N*/
+/*N*/ // UNICODE: rIn >> mpImpl->aPersistName;
+/*N*/ rIn.ReadByteString(mpImpl->aPersistName);
+/*N*/
+/*N*/ // UNICODE: rIn >> aProgName;
+/*N*/ rIn.ReadByteString(aProgName);
+/*N*/
+/*N*/ BOOL bObjRefValid;
+/*N*/ rIn>>bObjRefValid;
+/*N*/
+/*N*/ BOOL bHasGraphic;
+/*N*/ rIn>>bHasGraphic;
+/*N*/ if (bHasGraphic)
+/*N*/ {
+/*?*/ if(pGraphic==NULL)
+/*?*/ pGraphic=new Graphic;
+/*?*/
+
+ // #i27418# Remember stream position to decide if something was read
+ const sal_Size nFilePosition(rIn.Tell());
+
+/*?*/ 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;
+/*?*/
+
+ // #i27418# If 4 bytes were read but an error is set, it was tried to read an empty
+ // bitmap into the Graphic. This a follow-up error from previously wrong saves.
+ // Reset error code here, it's not really an error but leads to a crash in SO7
+ if(0L != rIn.GetError() && (nFilePosition + 4L) == rIn.Tell())
+ {
+ rIn.ResetError();
+ }
+
+/*?*/ if( mpImpl->pGraphicObject )
+/*?*/ delete mpImpl->pGraphicObject;
+/*?*/
+/*?*/ mpImpl->pGraphicObject = new BfGraphicObject( *pGraphic );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SdrOle2Obj::NbcMove(const Size& rSize)
+/*N*/ {
+/*N*/ SdrRectObj::NbcMove(rSize);
+/*N*/ if( (NULL == pModel) || !pModel->isLocked() )
+/*NBFF*/ ImpSetVisAreaSize();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ BOOL SdrOle2Obj::Unload()
+/*N*/ {
+/*N*/ BOOL bUnloaded = FALSE;
+/*N*/
+/*N*/ if( ppObjRef && ppObjRef->Is() )
+/*N*/ {
+/*N*/ //Nicht notwendig im Doc DTor (MM)
+/*N*/ ULONG nRefCount = (*ppObjRef)->GetRefCount();
+/*N*/ // prevent Unload if there are external references
+/*N*/ if( nRefCount > 2 )
+/*N*/ return FALSE;
+/*N*/ DBG_ASSERT( nRefCount == 2, "Wrong RefCount for unload" );
+/*N*/ }
+/*N*/ else
+/*N*/ bUnloaded = TRUE;
+/*N*/
+/*N*/ if (pModel && ppObjRef && ppObjRef->Is() &&
+/*N*/ SVOBJ_MISCSTATUS_ALWAYSACTIVATE != (*ppObjRef)->GetMiscStatus() &&
+/*N*/ 1 < (*ppObjRef)->GetRefCount() &&
+/*N*/ !(*ppObjRef)->IsModified() &&
+/*N*/ !(*ppObjRef)->GetProtocol().IsInPlaceActive() )
+/*N*/ {
+/*N*/ SvPersist* pPersist = pModel->GetPersist();
+/*N*/
+/*N*/ if (pPersist)
+/*N*/ {
+/*N*/ SvPersist* pO = *ppObjRef;
+/*N*/ if( pO->IsModified() )
+/*N*/ {
+/*?*/ pO->DoSave();
+/*?*/ pO->DoSaveCompleted();
+/*N*/ }
+/*N*/ ppObjRef->Clear();
+/*N*/ if (pPersist->Unload(pO))
+/*N*/ bUnloaded = TRUE;
+/*N*/ else
+/*?*/ *ppObjRef = pO;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bUnloaded;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ const SvInPlaceObjectRef& SdrOle2Obj::GetObjRef() const
+/*N*/ {
+/*N*/ if ( !ppObjRef->Is() && pModel && pModel->GetPersist() && !pModel->GetPersist()->IsHandsOff() )
+/*N*/ {
+/*N*/ // #107645#
+/*N*/ // Only try loading if it did not wrent wrong up to now
+/*N*/ if(!mpImpl->mbLoadingOLEObjectFailed)
+/*N*/ {
+/*N*/ // Objekt laden
+/*N*/ (*ppObjRef) = &( pModel->GetPersist()->GetObject( mpImpl->aPersistName ) );
+/*N*/
+/*N*/ // #107645#
+/*N*/ // If loading of OLE object failed, remember that to not invoke a endless
+/*N*/ // loop trying to load it again and again.
+/*N*/ if(!ppObjRef->Is())
+/*N*/ {
+/*N*/ mpImpl->mbLoadingOLEObjectFailed = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ // #108759# For math objects, set closed state to transparent
+/*N*/ if( ImplIsMathObj( *ppObjRef ) )
+/*N*/ const_cast<SdrOle2Obj*>(this)->SetClosedObj( false );
+/*N*/ }
+/*N*/
+/*N*/ if ( ppObjRef->Is() )
+/*N*/ {
+/*N*/ if( !IsEmptyPresObj() )
+/*N*/ {
+/*N*/ // #75637# remember modified status of model
+/*N*/ BOOL bWasChanged(pModel ? pModel->IsChanged() : FALSE);
+/*N*/
+/*N*/ // perhaps preview not valid anymore
+/*N*/ // #75637# This line changes the modified state of the model
+/*N*/ ( (SdrOle2Obj*) this )->SetGraphic( NULL );
+/*N*/
+/*N*/ // #75637# if status was not set before, force it back
+/*N*/ // to not set, so that SetGraphic(0L) above does not
+/*N*/ // set the modified state of the model.
+/*N*/ if(!bWasChanged && pModel && pModel->IsChanged())
+/*N*/ pModel->SetChanged(FALSE);
+/*N*/ }
+/*N*/
+/*N*/ if ( (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
+/*N*/ {
+/*N*/ if (pModel && pModel->GetRefDevice() &&
+/*N*/ pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+/*N*/ {
+/*N*/ if(!bInDestruction)
+/*N*/ {
+/*N*/ // prevent SetModified (don't want no update here)
+/*N*/ sal_Bool bWasEnabled = (*ppObjRef)->IsEnableSetModified();
+/*N*/ if ( bWasEnabled )
+/*N*/ (*ppObjRef)->EnableSetModified( sal_False );
+/*N*/
+/*N*/ // Kein RefDevice oder RefDevice kein Printer
+/*N*/ Printer* pPrinter = (Printer*) pModel->GetRefDevice();
+/*N*/ (*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
+/*N*/
+/*N*/ // reset state
+/*N*/ (*ppObjRef)->EnableSetModified( bWasEnabled );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // register modify listener on initial load
+/*N*/ if( pModifyListener == NULL )
+/*N*/ {
+/*N*/ ((SdrOle2Obj*)this)->pModifyListener = new SvxUnoShapeModifyListener( (SdrOle2Obj*)this );
+/*N*/ pModifyListener->acquire();
+/*N*/
+/*N*/ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+/*N*/ if( xBC.is() && pModifyListener )
+/*N*/ {
+/*N*/ uno::Reference< util::XModifyListener > xListener( pModifyListener );
+/*N*/ xBC->addModifyListener( xListener );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (ppObjRef->Is())
+/*N*/ {
+/*N*/ // In Cache einfuegen
+/*N*/ GetSdrGlobalData().GetOLEObjCache().InsertObj((SdrOle2Obj*) this);
+/*N*/ }
+/*N*/
+/*N*/ return *ppObjRef;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ uno::Reference< frame::XModel > SdrOle2Obj::getXModel() const
+/*N*/ {
+/*N*/ uno::Reference< frame::XModel > xModel;
+/*N*/
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ SvInPlaceObjectRef xSvIPO( GetObjRef() );
+/*N*/ SfxInPlaceObjectRef xIPO( xSvIPO );
+/*N*/ if( xIPO.Is() )
+/*N*/ {
+/*N*/ SfxObjectShell* pShell = xIPO->GetObjectShell();
+/*N*/
+/*N*/ if( pShell )
+/*N*/ xModel = pShell->GetModel();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return xModel;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/// #110015# sets the visible area at the SvInPlaceObject and SvEmbeddedInfoObject
+/*N*/ void SdrOle2Obj::SetVisibleArea( const Rectangle& rVisArea )
+/*N*/ {
+/*N*/ const SvInPlaceObjectRef& xInplace = GetObjRef();
+/*N*/ if( xInplace.Is() )
+/*N*/ {
+/*N*/ xInplace->SetVisArea( rVisArea );
+/*N*/
+/*N*/ if( pModel && (!pModel->GetPersist()->IsEnableSetModified()) )
+/*N*/ xInplace->SetModified(FALSE);
+/*N*/ }
+/*N*/
+/*N*/ if(pModel && mpImpl->aPersistName.Len() )
+/*N*/ {
+/*N*/ SvPersist* pPers = pModel->GetPersist();
+/*N*/
+/*N*/ if (pPers)
+/*N*/ {
+/*N*/ SvInfoObject* pInfo = pPers->Find(mpImpl->aPersistName);
+/*N*/ SvEmbeddedInfoObject * pEmbed = PTR_CAST(SvEmbeddedInfoObject, pInfo );
+/*N*/
+/*N*/ if( pEmbed )
+/*N*/ pEmbed->SetInfoVisArea( rVisArea );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdopage.cxx b/binfilter/bf_svx/source/svdraw/svx_svdopage.cxx
new file mode 100644
index 000000000000..928752eab97d
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdopage.cxx
@@ -0,0 +1,254 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdopage.hxx"
+#include "svdstr.hrc" // Objektname
+#include "svdio.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+
+
+#include <bf_svtools/itemset.hxx>
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrPageObj,SdrObject);
+
+/*N*/ SdrPageObj::SdrPageObj(USHORT nNewPageNum):
+/*N*/ mpPageItemSet(0L),
+/*N*/ nPageNum(nNewPageNum),
+/*N*/ bPainting(FALSE),
+/*N*/ bNotifying(FALSE)
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrPageObj::~SdrPageObj()
+/*N*/ {
+/*N*/ if(mpPageItemSet)
+/*?*/ delete mpPageItemSet;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ const SfxItemSet& SdrPageObj::GetItemSet() const
+/*N*/ {
+/*N*/ if(!mpPageItemSet)
+/*N*/ ((SdrPageObj*)this)->mpPageItemSet = ((SdrPageObj*)this)->CreateNewItemSet((SfxItemPool&)(*GetItemPool()));
+/*N*/ return *mpPageItemSet;
+/*N*/ }
+
+/*N*/ SfxItemSet* SdrPageObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ return new SfxItemSet(rPool);
+/*N*/ }
+
+/*N*/ void SdrPageObj::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ // #86481# simply ignore item setting on page objects
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void __EXPORT SdrPageObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId&, const SfxHint& rHint, const TypeId&)
+/*N*/ {
+/*N*/ SdrHint* pSdrHint = PTR_CAST(SdrHint, &rHint);
+/*N*/
+/*N*/ if(pSdrHint)
+/*N*/ {
+/*N*/ SdrHintKind eHint = pSdrHint->GetKind();
+/*N*/
+/*N*/ if(eHint == HINT_PAGEORDERCHG)
+/*N*/ {
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ const SdrPage* pChangedPage = pSdrHint->GetPage();
+/*N*/
+/*N*/ if(pSdrHint->GetObject() != this
+/*N*/ && pModel
+/*N*/ && bInserted
+/*N*/ && pChangedPage
+/*N*/ && pChangedPage != pPage)
+/*N*/ {
+/*N*/ const SdrPage* pShownPage = pModel->GetPage(nPageNum);
+/*N*/
+/*N*/ if(pShownPage)
+/*N*/ {
+/*N*/ if(pShownPage == pChangedPage)
+/*N*/ {
+/*N*/ if(eHint == HINT_OBJCHG || eHint == HINT_OBJLISTCLEARED)
+/*N*/ {
+/*N*/ // do nothing, else loop with HINT_OBJCHG cause
+/*N*/ // it can not be decided if hint comes from 21 lines
+/*N*/ // above (SendRepaintBroadcast())or normally from
+/*N*/ // object. Doing nothing leads to not updating
+/*N*/ // object moves on a 2nd opened view showing the page
+/*N*/ // as handout or notice page. (AW 06052000)
+/*N*/ //
+/*N*/ // one solution would be to invalidate without using
+/*N*/ // SendRepaintBroadcast(), so I made some tries, but it
+/*N*/ // did'nt work:
+/*N*/ //
+/*N*/ //SdrHint aHint(*this);
+/*N*/ //aHint.SetNeedRepaint(TRUE);
+/*N*/ //aHint.SetKind(HINT_PAGECHG);
+/*N*/ //pModel->Broadcast(aHint);
+/*N*/ //SdrPageView* pPV;
+/*N*/ //if(pModel && (pPV = pModel->GetPaintingPageView()))
+/*N*/ //{
+/*N*/ // pPV->InvalidateAllWin(pSdrHint->GetRect(), TRUE);
+/*N*/ //}
+/*N*/ // GetPageView(pChangedPage);
+/*N*/ // SdrPageView::InvalidateAllWin(pSdrHint->GetRect(), TRUE);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // send normal
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ }
+/*N*/ else if(pChangedPage->IsMasterPage())
+/*N*/ {
+/*N*/ UINT16 nMaPgAnz = pShownPage->GetMasterPageCount();
+/*N*/ BOOL bDone(FALSE);
+/*N*/
+/*N*/ for(UINT16 i=0; i<nMaPgAnz && !bDone; i++)
+/*N*/ {
+/*N*/ const SdrPage* pMaster = pShownPage->GetMasterPage(i);
+/*N*/
+/*N*/ if(pMaster == pChangedPage)
+/*N*/ {
+/*N*/ if(eHint == HINT_OBJCHG || eHint == HINT_OBJLISTCLEARED)
+/*N*/ {
+/*N*/ // see comment above...
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // send normal
+/*N*/ SendRepaintBroadcast();
+/*N*/ bDone = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPageObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrModel* pOldMod=pModel;
+/*N*/ SdrObject::SetModel(pNewModel);
+/*N*/ if (pModel!=pOldMod) {
+/*N*/ if (pOldMod!=NULL) EndListening(*pOldMod);
+/*N*/ if (pModel!=NULL) StartListening(*pModel);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ UINT16 SdrPageObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return UINT16(OBJ_PAGE);
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ const Rectangle& SdrPageObj::GetBoundRect() const
+/*N*/ {
+/*N*/ return SdrObject::GetBoundRect();
+/*N*/ }
+
+
+/*N*/ const Rectangle& SdrPageObj::GetSnapRect() const
+/*N*/ {
+/*N*/ return SdrObject::GetSnapRect();
+/*N*/ }
+
+
+/*N*/ const Rectangle& SdrPageObj::GetLogicRect() const
+/*N*/ {
+/*N*/ return SdrObject::GetLogicRect();
+/*N*/ }
+
+
+/*N*/ void SdrPageObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrObject::NbcSetSnapRect(rRect);
+/*N*/ }
+
+
+/*N*/ void SdrPageObj::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrObject::NbcSetLogicRect(rRect);
+/*N*/ }
+
+
+
+
+
+/*N*/ void SdrPageObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrObject::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrPageObj");
+/*N*/ #endif
+/*N*/ rOut<<nPageNum;
+/*N*/ }
+
+/*N*/ void SdrPageObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrObject::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrPageObj");
+/*N*/ #endif
+/*N*/ rIn>>nPageNum;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdopath.cxx b/binfilter/bf_svx/source/svdraw/svx_svdopath.cxx
new file mode 100644
index 000000000000..5cd05ae2b633
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdopath.cxx
@@ -0,0 +1,979 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdopath.hxx"
+#include <math.h>
+#include "xpool.hxx"
+#include "xoutx.hxx"
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdview.hxx" // fuer MovCreate bei Freihandlinien
+#include "svdstr.hrc" // Objektname
+
+#ifdef _MSC_VER
+#pragma optimize ("",off)
+#endif
+
+
+
+#include <vcl/salbtype.hxx> // FRound
+
+#include "svdoimp.hxx"
+
+#include <bf_goodies/matrix3d.hxx>
+
+namespace binfilter {
+
+// #104018# replace macros above with type-safe methods
+inline sal_Int32 ImplTwipsToMM(sal_Int32 nVal) { return ((nVal * 127 + 36) / 72); }
+inline sal_Int32 ImplMMToTwips(sal_Int32 nVal) { return ((nVal * 72 + 63) / 127); }
+inline sal_Int64 ImplTwipsToMM(sal_Int64 nVal) { return ((nVal * 127 + 36) / 72); }
+inline sal_Int64 ImplMMToTwips(sal_Int64 nVal) { return ((nVal * 72 + 63) / 127); }
+inline double ImplTwipsToMM(double fVal) { return (fVal * (127.0 / 72.0)); }
+inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); }
+
+/*************************************************************************/
+
+#define SVDOPATH_INITSIZE 20
+#define SVDOPATH_RESIZE 20
+
+/*************************************************************************/
+
+/*N*/ SdrPathObjGeoData::SdrPathObjGeoData()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrPathObjGeoData::~SdrPathObjGeoData()
+/*N*/ {
+/*N*/ }
+
+/*N*/ TYPEINIT1(SdrPathObj,SdrTextObj);
+
+/*N*/ SdrPathObj::SdrPathObj(SdrObjKind eNewKind)
+/*N*/ {
+/*N*/ eKind=eNewKind;
+/*N*/ bClosedObj=IsClosed();
+/*N*/ bCreating=FALSE;
+/*N*/ }
+
+/*N*/ SdrPathObj::SdrPathObj(SdrObjKind eNewKind, const XPolyPolygon& rPathPoly)
+/*N*/ {
+/*N*/ eKind=eNewKind;
+/*N*/ bClosedObj=IsClosed();
+/*N*/
+/*N*/ // #104640# Set local XPolyPolygon with open/close correction
+/*N*/ NbcSetPathPoly(rPathPoly);
+/*N*/
+/*N*/ bCreating=FALSE;
+/*N*/ ImpForceKind();
+/*N*/ }
+
+/*?*/ 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();
+/*?*/ }
+
+/*N*/ SdrPathObj::~SdrPathObj()
+/*N*/ {
+/*N*/ }
+
+/*N*/ FASTBOOL SdrPathObj::FindPolyPnt(USHORT nAbsPnt, USHORT& rPolyNum,
+/*N*/ USHORT& rPointNum, FASTBOOL bAllPoints) const
+/*N*/ {
+/*N*/ USHORT nPolyCnt=aPathPolygon.Count();
+/*N*/ USHORT nPoly=0;
+/*N*/ FASTBOOL bClosed=IsClosed();
+/*N*/ nAbsPnt+=1;
+/*N*/
+/*N*/ while (nPoly<nPolyCnt) {
+/*N*/ const XPolygon& rXPoly = aPathPolygon[nPoly];
+/*N*/ USHORT nPnt=0;
+/*N*/ USHORT nCnt=0;
+/*N*/ USHORT nPntCnt=rXPoly.GetPointCount();
+/*N*/ // geschlossen? Dann Endpunkt=Startpunkt
+/*N*/ if (bClosed && nPntCnt>1) nPntCnt--;
+/*N*/
+/*N*/ while (nPnt<nPntCnt) {
+/*N*/ if (bAllPoints || rXPoly.GetFlags(nPnt)!=XPOLY_CONTROL) nCnt++;
+/*N*/ if (nCnt==nAbsPnt) {
+/*N*/ rPolyNum=nPoly;
+/*N*/ rPointNum=nPnt;
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ nPnt++;
+/*N*/ }
+/*?*/ nAbsPnt-=nCnt;
+/*?*/ nPoly++;
+/*?*/ }
+/*?*/ return FALSE;
+/*N*/ }
+
+/*N*/ void SdrPathObj::ImpForceLineWink()
+/*N*/ {
+/*N*/ if (aPathPolygon.Count()==1 && aPathPolygon[0].GetPointCount()==2 && eKind==OBJ_LINE) {
+/*N*/ Point aDelt(aPathPolygon[0][1]);
+/*N*/ aDelt-=aPathPolygon[0][0];
+/*N*/ aGeo.nDrehWink=GetAngle(aDelt);
+/*N*/ aGeo.nShearWink=0;
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ aGeo.RecalcTan();
+/*N*/
+/*N*/ // #101412# for SdrTextObj, keep aRect up to date
+/*N*/ aRect = Rectangle(aPathPolygon[0][0], aPathPolygon[0][1]);
+/*N*/ aRect.Justify();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPathObj::ImpForceKind()
+/*N*/ {
+/*N*/ if (eKind==OBJ_PATHPLIN) eKind=OBJ_PLIN;
+/*N*/ if (eKind==OBJ_PATHPOLY) eKind=OBJ_POLY;
+/*N*/
+/*N*/ USHORT nPolyAnz=aPathPolygon.Count();
+/*N*/ USHORT nPoly1PointAnz=nPolyAnz==0 ? 0 : aPathPolygon[0].GetPointCount();
+/*N*/ FASTBOOL bHasCtrl=FALSE;
+/*N*/ FASTBOOL bHasLine=FALSE; // gemischt wird jedoch z.Zt. nicht in eKind festgehalten
+/*N*/ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz && (!bHasCtrl || !bHasLine); nPolyNum++) {
+/*N*/ const XPolygon& rPoly=aPathPolygon[nPolyNum];
+/*N*/ USHORT nPointAnz=rPoly.GetPointCount();
+/*N*/ for (USHORT nPointNum=0; nPointNum<nPointAnz && (!bHasCtrl || !bHasLine); nPointNum++) {
+/*N*/ if (rPoly.IsControl(nPointNum)) bHasCtrl=TRUE;
+/*N*/ if (nPointNum+1<nPointAnz && !rPoly.IsControl(nPointNum) && !rPoly.IsControl(nPointNum+1)) bHasLine=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bHasCtrl) {
+/*N*/ switch (eKind) {
+/*N*/ case OBJ_PATHLINE: eKind=OBJ_PLIN; break;
+/*N*/ case OBJ_FREELINE: eKind=OBJ_PLIN; break;
+/*N*/ case OBJ_PATHFILL: eKind=OBJ_POLY; break;
+/*N*/ case OBJ_FREEFILL: eKind=OBJ_POLY; break;
+/*N*/ }
+/*N*/ } else {
+/*N*/ switch (eKind) {
+/*N*/ case OBJ_LINE: eKind=OBJ_PATHLINE; break;
+/*N*/ case OBJ_PLIN: eKind=OBJ_PATHLINE; break;
+/*N*/ case OBJ_POLY: eKind=OBJ_PATHFILL; break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (eKind==OBJ_LINE && (nPolyAnz!=1 || nPoly1PointAnz!=2)) eKind=OBJ_PLIN;
+/*N*/ if (eKind==OBJ_PLIN && (nPolyAnz==1 && nPoly1PointAnz==2)) eKind=OBJ_LINE;
+/*N*/
+/*N*/ bClosedObj=IsClosed();
+/*N*/
+/*N*/ if (eKind==OBJ_LINE)
+/*N*/ {
+/*N*/ ImpForceLineWink();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // #i10659#, similar to #101412# but for polys with more than 2 points.
+/*N*/ //
+/*N*/ // Here i again need to fix something, because when Path-Polys are Copy-Pasted
+/*N*/ // between Apps with different measurements (e.g. 100TH_MM and TWIPS) there is
+/*N*/ // a scaling loop started from SdrExchangeView::Paste. This is principally nothing
+/*N*/ // wrong, but aRect is wrong here and not even updated by RecalcSnapRect(). If
+/*N*/ // this is the case, some size needs to be set here in aRect to avoid that the cyclus
+/*N*/ // through Rect2Poly - Poly2Rect does something badly wrong since that cycle is
+/*N*/ // BASED on aRect. That cycle is triggered in SdrTextObj::NbcResize() which is called
+/*N*/ // from the local Resize() implementation.
+/*N*/ //
+/*N*/ // Basic problem is that the member aRect in SdrTextObj basically is a unrotated
+/*N*/ // text rectangle for the text object itself and methods at SdrTextObj do handle it
+/*N*/ // in that way. Many draw objects derived from SdrTextObj 'abuse' aRect as SnapRect
+/*N*/ // which is basically wrong. To make the SdrText methods which deal with aRect directly
+/*N*/ // work it is necessary to always keep aRect updated. This e.g. not done after a Clone()
+/*N*/ // command for SdrPathObj. Since adding this update mechanism with #101412# to
+/*N*/ // ImpForceLineWink() for lines was very successful, i add it to where ImpForceLineWink()
+/*N*/ // was called, once here below and once on a 2nd place below.
+/*N*/
+/*N*/ // #i10659# for SdrTextObj, keep aRect up to date
+/*N*/ aRect=aPathPolygon.GetBoundRect(); // fuer SdrTextObj
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ UINT16 SdrPathObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return USHORT(eKind);
+/*N*/ }
+
+/*N*/ void SdrPathObj::RecalcBoundRect()
+/*N*/ {
+/*N*/ aOutRect=GetSnapRect();
+/*N*/ long nLineWdt=ImpGetLineWdt();
+/*N*/ if (!IsClosed()) { // ggf. Linienenden beruecksichtigen
+/*N*/ long nLEndWdt=ImpGetLineEndAdd();
+/*N*/ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+/*N*/ }
+/*N*/ if (nLineWdt!=0) {
+/*N*/ aOutRect.Left ()-=nLineWdt;
+/*N*/ aOutRect.Top ()-=nLineWdt;
+/*N*/ aOutRect.Right ()+=nLineWdt;
+/*N*/ aOutRect.Bottom()+=nLineWdt;
+/*N*/ }
+/*N*/ ImpAddShadowToBoundRect();
+/*N*/ ImpAddTextToBoundRect();
+/*N*/ }
+
+/*N*/ FASTBOOL SdrPathObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+/*N*/ {
+/*N*/ // Hidden objects on masterpages, draw nothing
+/*N*/ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+/*N*/ return TRUE;
+/*N*/
+/*N*/ BOOL bHideContour(IsHideContour());
+/*N*/ BOOL bIsFillDraft(0 != (rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTFILL));
+/*N*/ BOOL bIsLineDraft(0 != (rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTLINE));
+/*N*/
+/*N*/ // prepare ItemSet of this object
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/
+/*N*/ // perepare ItemSet to avoid old XOut line drawing
+/*N*/ SfxItemSet aEmptySet(*rSet.GetPool());
+/*N*/ aEmptySet.Put(XLineStyleItem(XLINE_NONE));
+/*N*/ aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+/*N*/
+/*N*/ // #103692# prepare ItemSet for shadow fill attributes
+/*N*/ SfxItemSet aShadowSet(rSet);
+/*N*/
+/*N*/ // prepare line geometry
+/*N*/ ::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
+/*N*/
+/*N*/ // Shadows
+/*N*/ if (!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
+/*N*/ {
+/*?*/ if( !IsClosed() || bIsFillDraft )
+/*?*/ rXOut.SetFillAttr(aEmptySet);
+/*?*/ else
+/*?*/ rXOut.SetFillAttr(aShadowSet);
+/*?*/
+/*?*/ UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+/*?*/ UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+/*?*/ XPolyPolygon aTmpXPoly(aPathPolygon);
+/*?*/ aTmpXPoly.Move(nXDist,nYDist);
+/*?*/
+/*?*/ // avoid shadow line drawing in XOut
+/*?*/ rXOut.SetLineAttr(aEmptySet);
+/*?*/
+/*?*/ if (!IsClosed()) {
+/*?*/ USHORT nPolyAnz=aTmpXPoly.Count();
+/*?*/ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+/*?*/ rXOut.DrawXPolyLine(aTmpXPoly.GetObject(nPolyNum));
+/*?*/ }
+/*?*/ } else {
+/*?*/ // #100127# Output original geometry for metafiles
+/*?*/ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
+/*?*/
+/*?*/ rXOut.DrawXPolyPolygon(aTmpXPoly);
+/*?*/ }
+/*?*/
+/*?*/ // new shadow line drawing
+/*?*/ if( pLineGeometry.get() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ // draw the line geometry
+/*?*/ }
+/*N*/ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+ // avoid line drawing in XOut
+/*N*/ rXOut.SetLineAttr(aEmptySet);
+/*N*/
+/*N*/ rXOut.SetFillAttr( bIsFillDraft || !IsClosed() ? aEmptySet : rSet );
+/*N*/
+/*N*/ if( !bHideContour )
+/*N*/ {
+/*N*/ if( IsClosed() )
+/*N*/ {
+/*N*/ // #100127# Output original geometry for metafiles
+/*?*/ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft || !IsClosed() ? aEmptySet : rSet );
+/*?*/
+/*?*/ rXOut.DrawXPolyPolygon(aPathPolygon);
+/*N*/ }
+/*N*/
+/*N*/ // Own line drawing
+/*N*/ if( pLineGeometry.get() )
+/*N*/ {
+/*N*/ // draw the line geometry
+/*N*/ ImpDrawColorLineGeometry(rXOut, rSet, *pLineGeometry);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ FASTBOOL bOk=TRUE;
+/*N*/ if (HasText()) {
+/*?*/ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+/*N*/ }
+/*N*/ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 bOk=PaintGluePoints(rXOut,rInfoRec);
+/*N*/ }
+/*N*/
+/*N*/ return bOk;
+/*N*/ }
+
+/*N*/ SdrObject* SdrPathObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+/*N*/ INT32 nMyTol=nTol;
+/*N*/ FASTBOOL bFilled=IsClosed() && (bTextFrame || HasFill());
+/*N*/
+/*N*/ INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
+/*N*/ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
+/*N*/ Rectangle aR(rPnt,rPnt);
+/*N*/ aR.Left() -=nMyTol;
+/*N*/ aR.Right() +=nMyTol;
+/*N*/ aR.Top() -=nMyTol;
+/*N*/ aR.Bottom()+=nMyTol;
+/*N*/
+/*N*/ FASTBOOL bHit=FALSE;
+/*N*/ unsigned nPolyAnz=aPathPolygon.Count();
+/*N*/ if (bFilled) {
+/*N*/ PolyPolygon aPP;
+/*N*/ for (unsigned nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+/*N*/ aPP.Insert(XOutCreatePolygon(aPathPolygon[nPolyNum],NULL));
+/*N*/ }
+/*N*/ bHit=IsRectTouchesPoly(aPP,aR);
+/*N*/ } else {
+/*N*/ for (unsigned nPolyNum=0; nPolyNum<nPolyAnz && !bHit; nPolyNum++) {
+/*N*/ Polygon aPoly(XOutCreatePolygon(aPathPolygon[nPolyNum],NULL));
+/*N*/ bHit=IsRectTouchesLine(aPoly,aR);
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bHit && !IsTextFrame() && HasText()) {
+/*N*/ bHit=SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+/*N*/ }
+/*N*/ return bHit ? (SdrObject*)this : NULL;
+/*N*/ }
+
+/*N*/ void SdrPathObj::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ SdrTextObj::operator=(rObj);
+/*N*/ SdrPathObj& rPath=(SdrPathObj&)rObj;
+/*N*/ aPathPolygon=rPath.aPathPolygon;
+/*N*/ }
+
+
+
+/*N*/ void SdrPathObj::TakeXorPoly(XPolyPolygon& rXPolyPoly, FASTBOOL bDetail) const
+/*N*/ {
+/*N*/ rXPolyPoly=aPathPolygon;
+/*N*/ }
+
+/*N*/ void SdrPathObj::TakeContour(XPolyPolygon& rPoly) const
+/*N*/ {
+/*N*/ // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+/*N*/ SdrTextObj::TakeContour(rPoly);
+/*N*/ }
+
+
+
+
+
+
+
+
+/*?*/ 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;
+/*?*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void SdrPathObj::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ SdrTextObj::NbcMove(rSiz);
+/*N*/ MoveXPoly(aPathPolygon,rSiz);
+/*N*/ }
+
+/*N*/ void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrTextObj::NbcResize(rRef,xFact,yFact);
+/*N*/ ResizeXPoly(aPathPolygon,rRef,xFact,yFact);
+/*N*/ }
+
+/*N*/ void SdrPathObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ SdrTextObj::NbcRotate(rRef,nWink,sn,cs);
+/*N*/ RotateXPoly(aPathPolygon,rRef,sn,cs);
+/*N*/ }
+
+/*N*/ void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ SdrTextObj::NbcShear(rRefPnt,nAngle,fTan,bVShear);
+/*N*/ ShearXPoly(aPathPolygon,rRefPnt,fTan,bVShear);
+/*N*/ }
+
+
+/*N*/ void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ if (aGeo.nDrehWink==0) {
+/*N*/ rRect=GetSnapRect();
+/*N*/ } else {
+/*N*/ XPolyPolygon aXPP(aPathPolygon);
+/*N*/ RotateXPoly(aXPP,Point(),-aGeo.nSin,aGeo.nCos);
+/*N*/ rRect=aXPP.GetBoundRect();
+/*N*/ Point aTmp(rRect.TopLeft());
+/*N*/ RotatePoint(aTmp,Point(),aGeo.nSin,aGeo.nCos);
+/*N*/ aTmp-=rRect.TopLeft();
+/*N*/ rRect.Move(aTmp.X(),aTmp.Y());
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPathObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ maSnapRect=aPathPolygon.GetBoundRect();
+/*N*/ }
+
+/*N*/ void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ Rectangle aOld(GetSnapRect());
+/*N*/
+/*N*/ // #95736# Take RECT_EMPTY into account when calculating scale factors
+/*N*/ long nMulX = (RECT_EMPTY == rRect.Right()) ? 0 : rRect.Right() - rRect.Left();
+/*N*/
+/*N*/ long nDivX = aOld.Right() - aOld.Left();
+/*N*/
+/*N*/ // #95736# Take RECT_EMPTY into account when calculating scale factors
+/*N*/ long nMulY = (RECT_EMPTY == rRect.Bottom()) ? 0 : rRect.Bottom() - rRect.Top();
+/*N*/
+/*N*/ long nDivY = aOld.Bottom() - aOld.Top();
+/*N*/ if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
+/*N*/ if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
+/*N*/ Fraction aX(nMulX,nDivX);
+/*N*/ Fraction aY(nMulY,nDivY);
+/*N*/ NbcResize(aOld.TopLeft(), aX, aY);
+/*N*/ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+/*N*/ }
+
+
+
+/*N*/ FASTBOOL SdrPathObj::IsPolyObj() const
+/*N*/ {
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ USHORT SdrPathObj::GetPointCount() const
+/*N*/ {
+/*N*/ USHORT nPolyCnt = aPathPolygon.Count();
+/*N*/ USHORT nPntCnt = 0;
+/*N*/
+/*N*/ for (USHORT i = 0; i < nPolyCnt; i++)
+/*N*/ nPntCnt += aPathPolygon[i].GetPointCount();
+/*N*/
+/*N*/ return nPntCnt;
+/*N*/ }
+
+/*N*/ const Point& SdrPathObj::GetPoint(USHORT nHdlNum) const
+/*N*/ {
+/*N*/ USHORT nPoly,nPnt;
+/*N*/ FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE);
+/*N*/ return aPathPolygon[nPoly][nPnt];
+/*N*/ }
+
+/*N*/ void SdrPathObj::NbcSetPoint(const Point& rPnt, USHORT nHdlNum)
+/*N*/ {
+/*N*/ USHORT nPoly,nPnt;
+/*N*/
+/*N*/ if (FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE)) {
+/*N*/ XPolygon& rXP=aPathPolygon[nPoly];
+/*N*/ rXP[nPnt]=rPnt;
+/*N*/ if (IsClosed() && nPnt==0) rXP[rXP.GetPointCount()-1]=rXP[0];
+/*N*/
+/*N*/ if (eKind==OBJ_LINE)
+/*N*/ {
+/*N*/ ImpForceLineWink();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // #i10659# for SdrTextObj, keep aRect up to date
+/*N*/ aRect=aPathPolygon.GetBoundRect(); // fuer SdrTextObj
+/*N*/ }
+/*N*/
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************/
+// 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).
+
+
+
+
+
+
+
+
+
+/*N*/ SdrObjGeoData* SdrPathObj::NewGeoData() const
+/*N*/ {
+/*N*/ return new SdrPathObjGeoData;
+/*N*/ }
+
+/*N*/ void SdrPathObj::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {
+/*N*/ SdrTextObj::SaveGeoData(rGeo);
+/*N*/ SdrPathObjGeoData& rPGeo = (SdrPathObjGeoData&) rGeo;
+/*N*/ rPGeo.aPathPolygon=aPathPolygon;
+/*N*/ rPGeo.eKind=eKind;
+/*N*/ }
+
+
+/*N*/ void SdrPathObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrTextObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrPathObj");
+/*N*/ #endif
+/*N*/ {
+/*N*/ SdrDownCompat aPathCompat(rOut,STREAM_WRITE); // ab V11 eingepackt
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aPathCompat.SetID("SdrPathObj(PathPolygon)");
+/*N*/ #endif
+/*N*/ rOut<<aPathPolygon;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPathObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrTextObj::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrPathObj");
+/*N*/ #endif
+/*N*/ aPathPolygon.Clear();
+/*N*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ } else {
+/*N*/ if (rHead.GetVersion()>=11) { // ab V11 ist das eingepackt
+/*N*/ SdrDownCompat aPathCompat(rIn,STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aPathCompat.SetID("SdrPathObj(PathPolygon)");
+/*N*/ #endif
+/*N*/ rIn>>aPathPolygon;
+/*N*/ } else {
+/*N*/ rIn>>aPathPolygon;
+/*N*/ }
+/*N*/ }
+/*N*/ ImpForceKind(); // ggf. den richtigen Identifier herstellen.
+/*N*/ }
+
+/*N*/ void SdrPathObj::NbcSetPathPoly(const XPolyPolygon& rPathPoly)
+/*N*/ {
+/*N*/ aPathPolygon=rPathPoly;
+/*N*/ ImpForceKind();
+/*N*/ if (IsClosed()) {
+/*N*/ USHORT nPolyAnz=aPathPolygon.Count();
+/*N*/ for (USHORT nPolyNum=nPolyAnz; nPolyNum>0;) {
+/*N*/ nPolyNum--;
+/*N*/ const XPolygon& rConstXP=aPathPolygon[nPolyNum];
+/*N*/ USHORT nPointAnz=rConstXP.GetPointCount();
+/*N*/ if (nPointAnz!=0) {
+/*N*/ Point aStartPt(rConstXP[0]);
+/*N*/ if (rConstXP[nPointAnz-1]!=aStartPt) {
+/*N*/ // Polygon schliessen (wird dabei um einen Punkt erweitert)
+/*N*/ aPathPolygon[nPolyNum][nPointAnz]=aStartPt;
+/*N*/ }
+/*N*/ } else {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 aPathPolygon.Remove(nPolyNum); // leere Polygone raus
+/*N*/ }
+/*N*/
+/*N*/ }
+/*N*/ }
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*N*/ void SdrPathObj::SetPathPoly(const XPolyPolygon& rPathPoly)
+/*N*/ {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcSetPathPoly(rPathPoly);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// transformation interface for StarOfficeAPI. This implements support for
+// homogen 3x3 matrices containing the transformation of the SdrObject. At the
+// moment it contains a shearX, rotation and translation, but for setting all linear
+// transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
+// with the base geometry and returns TRUE. Otherwise it returns FALSE.
+/*N*/ BOOL SdrPathObj::TRGetBaseGeometry(Matrix3D& rMat, XPolyPolygon& rPolyPolygon) const
+/*N*/ {
+/*N*/ double fRotate;
+/*N*/ double fShear;
+/*N*/ Rectangle aRectangle;
+/*N*/
+/*N*/ if(eKind==OBJ_LINE)
+/*N*/ {
+/*N*/ // #85920# special handling for single line mode (2 points)
+/*N*/ XPolygon aLine(2);
+/*N*/ aLine[0] = GetPoint(0);
+/*N*/ aLine[1] = GetPoint(1);
+/*N*/ rPolyPolygon.Clear();
+/*N*/ rPolyPolygon.Insert(aLine);
+/*N*/ aRectangle = rPolyPolygon.GetBoundRect();
+/*N*/
+/*N*/ // fill in values
+/*N*/ fRotate = fShear = 0.0;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // get turn and shear
+/*N*/ fRotate = (aGeo.nDrehWink / 100.0) * F_PI180;
+/*N*/ fShear = (aGeo.nShearWink / 100.0) * F_PI180;
+/*N*/
+/*N*/ // get path, remove rotate and shear
+/*N*/ rPolyPolygon = GetPathPoly();
+/*N*/ if(aGeo.nDrehWink)
+/*N*/ RotateXPoly(rPolyPolygon, Point(), -aGeo.nSin, aGeo.nCos);
+/*N*/
+/*N*/ aRectangle = rPolyPolygon.GetBoundRect();
+/*N*/ Point aTmp(aRectangle.TopLeft());
+/*N*/
+/*N*/ if(aGeo.nShearWink)
+/*N*/ {
+/*N*/ ShearXPoly(rPolyPolygon, aTmp, -aGeo.nTan, FALSE);
+/*N*/ aRectangle = rPolyPolygon.GetBoundRect();
+/*N*/ aTmp = aRectangle.TopLeft();
+/*N*/ }
+/*N*/
+/*N*/ RotatePoint(aTmp, Point(), aGeo.nSin, aGeo.nCos);
+/*N*/ aTmp -= aRectangle.TopLeft();
+/*N*/
+/*N*/ // polygon to base position
+/*N*/ rPolyPolygon.Move(aTmp.X(), aTmp.Y());
+/*N*/
+/*N*/ // get bound rect for values
+/*N*/ aRectangle = rPolyPolygon.GetBoundRect();
+/*N*/ }
+/*N*/
+/*N*/ // fill in values
+/*N*/ Vector2D aScale((double)aRectangle.GetWidth(), (double)aRectangle.GetHeight());
+/*N*/ Vector2D aTranslate((double)aRectangle.Left(), (double)aRectangle.Top());
+/*N*/
+/*N*/ // polygon to (0,0)
+/*N*/ rPolyPolygon.Move(-aRectangle.Left(), -aRectangle.Top());
+/*N*/
+/*N*/ // position maybe relative to anchorpos, convert
+/*N*/ if( pModel->IsWriter() )
+/*N*/ {
+/*N*/ if(GetAnchorPos().X() != 0 || GetAnchorPos().Y() != 0)
+/*N*/ aTranslate -= Vector2D(GetAnchorPos().X(), GetAnchorPos().Y());
+/*N*/ }
+/*N*/
+/*N*/ // force MapUnit to 100th mm
+/*N*/ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+/*N*/ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+/*N*/ {
+/*N*/ switch(eMapUnit)
+/*N*/ {
+/*N*/ case SFX_MAPUNIT_TWIP :
+/*N*/ {
+/*N*/ // position
+/*N*/ // #104018#
+/*N*/ aTranslate.X() = ImplTwipsToMM(aTranslate.X());
+/*N*/ aTranslate.Y() = ImplTwipsToMM(aTranslate.Y());
+/*N*/
+/*N*/ // size
+/*N*/ // #104018#
+/*N*/ aScale.X() = ImplTwipsToMM(aScale.X());
+/*N*/ aScale.Y() = ImplTwipsToMM(aScale.Y());
+/*N*/
+/*N*/ // polygon
+/*N*/ for(sal_uInt16 a(0); a < rPolyPolygon.Count(); a++)
+/*N*/ {
+/*N*/ XPolygon& rPoly = rPolyPolygon[a];
+/*N*/ for(sal_uInt16 b(0); b < rPoly.GetPointCount(); b++)
+/*N*/ {
+/*N*/ rPoly[b].X() = ImplTwipsToMM(rPoly[b].X());
+/*N*/ rPoly[b].Y() = ImplTwipsToMM(rPoly[b].Y());
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ default:
+/*N*/ {
+/*N*/ DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!");
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // build matrix
+/*N*/ rMat.Identity();
+/*N*/ if(aScale.X() != 1.0 || aScale.Y() != 1.0)
+/*N*/ rMat.Scale(aScale.X(), aScale.Y());
+/*N*/ if(fShear != 0.0)
+/*N*/ rMat.ShearX(tan(fShear));
+/*N*/ if(fRotate != 0.0)
+/*N*/ rMat.Rotate(fRotate);
+/*N*/ if(aTranslate.X() != 0.0 || aTranslate.Y() != 0.0)
+/*N*/ rMat.Translate(aTranslate.X(), aTranslate.Y());
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+// sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+// If it's an SdrPathObj it will use the provided geometry information. The Polygon has
+// to use (0,0) as upper left and will be scaled to the given size in the matrix.
+/*N*/ void SdrPathObj::TRSetBaseGeometry(const Matrix3D& rMat, const XPolyPolygon& rPolyPolygon)
+/*N*/ {
+/*N*/ // break up matrix
+/*N*/ Vector2D aScale, aTranslate;
+/*N*/ double fShear, fRotate;
+/*N*/ rMat.DecomposeAndCorrect(aScale, fShear, fRotate, aTranslate);
+/*N*/
+/*N*/ // copy poly
+/*N*/ XPolyPolygon aNewPolyPolygon(rPolyPolygon);
+/*N*/
+/*N*/ // reset object shear and rotations
+/*N*/ aGeo.nDrehWink = 0;
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ aGeo.nShearWink = 0;
+/*N*/ aGeo.RecalcTan();
+/*N*/
+/*N*/ // force metric to pool metric
+/*N*/ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+/*N*/ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+/*N*/ {
+/*N*/ switch(eMapUnit)
+/*N*/ {
+/*N*/ case SFX_MAPUNIT_TWIP :
+/*N*/ {
+/*N*/ // position
+/*N*/ // #104018#
+/*N*/ aTranslate.X() = ImplMMToTwips(aTranslate.X());
+/*N*/ aTranslate.Y() = ImplMMToTwips(aTranslate.Y());
+/*N*/
+/*N*/ // size
+/*N*/ // #104018#
+/*N*/ aScale.X() = ImplMMToTwips(aScale.X());
+/*N*/ aScale.Y() = ImplMMToTwips(aScale.Y());
+/*N*/
+/*N*/ // polygon
+/*N*/ for(sal_uInt16 a(0); a < aNewPolyPolygon.Count(); a++)
+/*N*/ {
+/*N*/ XPolygon& rPoly = aNewPolyPolygon[a];
+/*N*/ for(sal_uInt16 b(0); b < rPoly.GetPointCount(); b++)
+/*N*/ {
+/*N*/ rPoly[b].X() = ImplMMToTwips(rPoly[b].X());
+/*N*/ rPoly[b].Y() = ImplMMToTwips(rPoly[b].Y());
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ default:
+/*N*/ {
+/*N*/ DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!");
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( pModel->IsWriter() )
+/*N*/ {
+/*N*/ // if anchor is used, make position relative to it
+/*N*/ if(GetAnchorPos().X() != 0 || GetAnchorPos().Y() != 0)
+/*N*/ aTranslate -= Vector2D(GetAnchorPos().X(), GetAnchorPos().Y());
+/*N*/ }
+/*N*/
+/*N*/ // set PathPoly and get type
+/*N*/ SetPathPoly(aNewPolyPolygon);
+/*N*/
+/*N*/ if(eKind==OBJ_LINE)
+/*N*/ {
+/*N*/ // #85920# special handling for single line mode (2 points)
+/*N*/ Point aPoint1 = aNewPolyPolygon[0][0];
+/*N*/ Point aPoint2 = aNewPolyPolygon[0][1];
+/*N*/
+/*N*/ // shear?
+/*N*/ if(fShear != 0.0)
+/*N*/ {
+/*?*/ GeoStat aGeoStat;
+/*?*/ aGeoStat.nShearWink = FRound((atan(fShear) / F_PI180) * 100.0);
+/*?*/ aGeoStat.RecalcTan();
+/*?*/ ShearPoint(aPoint1, Point(), aGeoStat.nTan, FALSE);
+/*?*/ ShearPoint(aPoint2, Point(), aGeoStat.nTan, FALSE);
+/*N*/ }
+/*N*/
+/*N*/ // rotation?
+/*N*/ if(fRotate != 0.0)
+/*N*/ {
+/*?*/ GeoStat aGeoStat;
+/*?*/ aGeoStat.nDrehWink = FRound((fRotate / F_PI180) * 100.0);
+/*?*/ aGeoStat.RecalcSinCos();
+/*?*/ RotatePoint(aPoint1, Point(), aGeoStat.nSin, aGeoStat.nCos);
+/*?*/ RotatePoint(aPoint2, Point(), aGeoStat.nSin, aGeoStat.nCos);
+/*N*/ }
+/*N*/
+/*N*/ // translate?
+/*N*/ if(aTranslate.X() != 0.0 || aTranslate.Y() != 0.0)
+/*N*/ {
+/*N*/ Point aOffset((sal_Int32)FRound(aTranslate.X()), (sal_Int32)FRound(aTranslate.Y()));
+/*N*/ aPoint1 += aOffset;
+/*N*/ aPoint2 += aOffset;
+/*N*/ }
+/*N*/
+/*N*/ // put points back to poly
+/*N*/ aNewPolyPolygon[0][0] = aPoint1;
+/*N*/ aNewPolyPolygon[0][1] = aPoint2;
+/*N*/
+/*N*/ // set PathPoly again; this sets all of JOEs old needed stati and values
+/*N*/ SetPathPoly(aNewPolyPolygon);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // shear?
+/*N*/ if(fShear != 0.0)
+/*N*/ {
+/*N*/ GeoStat aGeoStat;
+/*N*/ aGeoStat.nShearWink = FRound((atan(fShear) / F_PI180) * 100.0);
+/*N*/ aGeoStat.RecalcTan();
+/*N*/ Shear(Point(), aGeoStat.nShearWink, aGeoStat.nTan, FALSE);
+/*N*/ }
+/*N*/
+/*N*/ // rotation?
+/*N*/ if(fRotate != 0.0)
+/*N*/ {
+/*N*/ GeoStat aGeoStat;
+/*N*/ aGeoStat.nDrehWink = FRound((fRotate / F_PI180) * 100.0);
+/*N*/ aGeoStat.RecalcSinCos();
+/*N*/ Rotate(Point(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
+/*N*/ }
+/*N*/
+/*N*/ // translate?
+/*N*/ if(aTranslate.X() != 0.0 || aTranslate.Y() != 0.0)
+/*N*/ {
+/*N*/ Move(Size(
+/*N*/ (sal_Int32)FRound(aTranslate.X()),
+/*N*/ (sal_Int32)FRound(aTranslate.Y())));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// EOF
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdorect.cxx b/binfilter/bf_svx/source/svdraw/svx_svdorect.cxx
new file mode 100644
index 000000000000..73ec1b758e22
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdorect.cxx
@@ -0,0 +1,586 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <stdlib.h>
+#include "xpool.hxx"
+#include "svdpool.hxx"
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdpage.hxx"
+#include "svdocapt.hxx" // fuer Import von SdrFileVersion 2
+#include "svdview.hxx" // das
+#include "svdstr.hrc" // Objektname
+
+#include <xflclit.hxx>
+
+#include <xlnclit.hxx>
+
+#include <xlnwtit.hxx>
+
+#include "rectenum.hxx"
+
+#include "svdoimp.hxx"
+
+#include "xoutx.hxx"
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrRectObj,SdrTextObj);
+
+/*N*/ SdrRectObj::SdrRectObj():
+/*N*/ pXPoly(NULL),
+/*N*/ bXPolyIsLine(FALSE)
+/*N*/ {
+/*N*/ bClosedObj=TRUE;
+/*N*/ }
+
+/*N*/ SdrRectObj::SdrRectObj(const Rectangle& rRect):
+/*N*/ SdrTextObj(rRect),
+/*N*/ pXPoly(NULL),
+/*N*/ bXPolyIsLine(FALSE)
+/*N*/ {
+/*N*/ bClosedObj=TRUE;
+/*N*/ }
+
+/*N*/ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind):
+/*N*/ SdrTextObj(eNewTextKind),
+/*N*/ pXPoly(NULL),
+/*N*/ bXPolyIsLine(FALSE)
+/*N*/ {
+/*N*/ DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
+/*N*/ eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
+/*N*/ "SdrRectObj::SdrRectObj(SdrObjKind) ist nur fuer Textrahmen gedacht");
+/*N*/ bClosedObj=TRUE;
+/*N*/ }
+
+/*N*/ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect):
+/*N*/ SdrTextObj(eNewTextKind,rRect),
+/*N*/ pXPoly(NULL),
+/*N*/ bXPolyIsLine(FALSE)
+/*N*/ {
+/*N*/ DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
+/*N*/ eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
+/*N*/ "SdrRectObj::SdrRectObj(SdrObjKind,...) ist nur fuer Textrahmen gedacht");
+/*N*/ bClosedObj=TRUE;
+/*N*/ }
+
+/*N*/ SdrRectObj::~SdrRectObj()
+/*N*/ {
+/*N*/ if (pXPoly!=NULL) delete pXPoly;
+/*N*/ }
+
+/*N*/ void SdrRectObj::SetXPolyDirty()
+/*N*/ {
+/*N*/ if (pXPoly!=NULL) {
+/*N*/ delete pXPoly;
+/*N*/ pXPoly=NULL;
+/*N*/ }
+/*N*/ }
+
+/*N*/ FASTBOOL SdrRectObj::PaintNeedsXPoly(long nEckRad) const
+/*N*/ {
+/*N*/ FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0;
+/*N*/ return bNeed;
+/*N*/ }
+
+/*N*/ XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1, FASTBOOL bContour) const
+/*N*/ {
+/*N*/ bContour=TRUE; // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+/*N*/ XPolygon aXPoly(rRect1,nRad1,nRad1);
+/*N*/ if (bContour) {
+/*N*/ unsigned nPointAnz=aXPoly.GetPointCount();
+/*N*/ XPolygon aNeuPoly(nPointAnz+1);
+/*N*/ unsigned nShift=nPointAnz-2;
+/*N*/ if (nRad1!=0) nShift=nPointAnz-5;
+/*N*/ unsigned j=nShift;
+/*N*/ for (unsigned i=1; i<nPointAnz; i++) {
+/*N*/ aNeuPoly[i]=aXPoly[j];
+/*N*/ aNeuPoly.SetFlags(i,aXPoly.GetFlags(j));
+/*N*/ j++;
+/*N*/ if (j>=nPointAnz) j=1;
+/*N*/ }
+/*N*/ aNeuPoly[0]=rRect1.BottomCenter();
+/*N*/ aNeuPoly[nPointAnz]=aNeuPoly[0];
+/*N*/ aXPoly=aNeuPoly;
+/*N*/ }
+/*N*/ // Die Winkelangaben beziehen sich immer auf die linke obere Ecke von !aRect!
+/*N*/ if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan);
+/*N*/ if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ return aXPoly;
+/*N*/ }
+
+/*N*/ void SdrRectObj::RecalcXPoly()
+/*N*/ { // #i37639# Needed for calc import
+/*N*/ pXPoly=new XPolygon(ImpCalcXPoly(aRect,GetEckenradius()));
+/*N*/ }
+
+/*N*/ const XPolygon& SdrRectObj::GetXPoly() const
+/*N*/ {
+/*N*/ if (pXPoly==NULL) ((SdrRectObj*)this)->RecalcXPoly();
+/*N*/ return *pXPoly;
+/*N*/ }
+
+
+/*N*/ UINT16 SdrRectObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ if (IsTextFrame()) return UINT16(eTextKind);
+/*N*/ else return UINT16(OBJ_RECT);
+/*N*/ }
+
+/*N*/ void SdrRectObj::RecalcBoundRect()
+/*N*/ {
+/*N*/ aOutRect=GetSnapRect();
+/*N*/ long nLineWdt=ImpGetLineWdt();
+/*N*/ nLineWdt++; nLineWdt/=2;
+/*N*/ if (nLineWdt!=0) {
+/*N*/ long a=nLineWdt;
+/*N*/ if ((aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) && GetEckenradius()==0) {
+/*N*/ a*=2; // doppelt, wegen evtl. spitzen Ecken
+/*N*/ }
+/*N*/ aOutRect.Left ()-=a;
+/*N*/ aOutRect.Top ()-=a;
+/*N*/ aOutRect.Right ()+=a;
+/*N*/ aOutRect.Bottom()+=a;
+/*N*/ }
+/*N*/ ImpAddShadowToBoundRect();
+/*N*/ ImpAddTextToBoundRect();
+/*N*/ }
+
+/*N*/ void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ rRect=aRect;
+/*N*/ if (aGeo.nShearWink!=0) {
+/*N*/ long nDst=Round((aRect.Bottom()-aRect.Top())*aGeo.nTan);
+/*N*/ 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());
+/*N*/ } else {
+/*N*/ rRect.Right()-=nDst;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ FASTBOOL SdrRectObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+/*N*/ {
+/*N*/ // Hidden objects on masterpages, draw nothing
+/*N*/ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+/*N*/ return TRUE;
+/*N*/
+/*N*/ // Im Graustufenmodus/Kontrastmodus soll die Hintergrundseite NICHT angezeigt werden
+/*N*/ ULONG nMode = rXOut.GetOutDev()->GetDrawMode();
+/*N*/ FASTBOOL bGrayscaleMode = ( nMode == (DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+/*N*/ FASTBOOL bSettingsMode = ( nMode == (DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) );
+/*N*/
+/*N*/ if( ( bGrayscaleMode || bSettingsMode ) && pPage && pPage->IsMasterPage() )
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*?*/
+/*N*/ }
+
+/*N*/ if (bTextFrame && aGeo.nShearWink!=0) {
+/*?*/ DBG_WARNING("Shearwinkel vom TextFrame innerhalb von SdrRectObj::Paint() auf 0 gesetzt");
+/*?*/ ((SdrRectObj*)this)->ImpCheckShear();
+/*?*/ ((SdrRectObj*)this)->SetRectsDirty();
+/*N*/ }
+/*N*/ FASTBOOL bOk=TRUE;
+/*N*/ BOOL bHideContour(IsHideContour());
+/*N*/ sal_Int32 nEckRad(GetEckenradius());
+/*N*/ BOOL bIsFillDraft(0 != (rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTFILL));
+/*N*/ BOOL bIsLineDraft(0 != (rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTLINE));
+/*N*/
+/*N*/ // prepare ItemSet of this object
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/
+/*N*/ // perepare ItemSet to avoid old XOut line drawing
+/*N*/ SfxItemSet aEmptySet(*rSet.GetPool());
+/*N*/ aEmptySet.Put(XLineStyleItem(XLINE_NONE));
+/*N*/ aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+/*N*/
+/*N*/ // #103692# prepare ItemSet for shadow fill attributes
+/*N*/ SfxItemSet aShadowSet(rSet);
+/*N*/
+/*N*/ // prepare line geometry
+/*N*/ ::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
+/*N*/
+/*N*/ // Shadows
+/*N*/ if (!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
+/*N*/ {
+/*?*/ if( bIsFillDraft )
+/*?*/ rXOut.SetFillAttr(aEmptySet);
+/*?*/ else
+/*?*/ rXOut.SetFillAttr(aShadowSet);
+/*?*/
+/*?*/ UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+/*?*/ UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+/*?*/
+/*?*/ // avoid shadow line drawing in XOut
+/*?*/ rXOut.SetLineAttr(aEmptySet);
+/*?*/
+/*?*/ {
+/*?*/ // #100127# Output original geometry for metafiles
+/*?*/ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
+/*?*/
+/*?*/ 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.get() )
+/*?*/ {
+/*?*/ // draw the line geometry
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpDrawShadowLineGeometry(rXOut, rSet, *pLineGeometry);
+/*?*/ }
+/*N*/ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+/*N*/ rXOut.SetLineAttr(aEmptySet);
+/*N*/
+/*N*/ rXOut.SetFillAttr( bIsFillDraft ? aEmptySet : rSet );
+/*N*/
+/*N*/ if (!bHideContour) {
+/*N*/ // #100127# Output original geometry for metafiles
+/*N*/ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft ? aEmptySet : rSet );
+/*N*/
+/*N*/ if (PaintNeedsXPoly(nEckRad)) {
+/*?*/ rXOut.DrawXPolygon(GetXPoly());
+/*N*/ } else {
+/*N*/ DBG_ASSERT(nEckRad==0,"SdrRectObj::Paint(): XOut.DrawRect() unterstuetz kein Eckenradius!");
+/*N*/ rXOut.DrawRect(aRect/*,USHORT(2*nEckRad),USHORT(2*nEckRad)*/);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT(aRect.GetWidth()>1 && aRect.GetHeight()>1,"SdrRectObj::Paint(): Rect hat Nullgroesse (oder negativ)!");
+/*N*/
+/*N*/ // Own line drawing
+/*N*/ if( !bHideContour && pLineGeometry.get() )
+/*N*/ {
+/*N*/ // draw the line geometry
+/*N*/ ImpDrawColorLineGeometry(rXOut, rSet, *pLineGeometry);
+/*N*/ }
+/*N*/
+/*N*/ if (HasText()) {
+/*?*/ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+/*N*/ }
+/*N*/ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 bOk=PaintGluePoints(rXOut,rInfoRec);
+/*N*/ }
+/*N*/
+/*N*/ return bOk;
+/*N*/ }
+
+/*N*/ SdrObject* SdrRectObj::ImpCheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bForceFilled, FASTBOOL bForceTol) const
+/*N*/ {
+/*N*/ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+/*N*/ INT32 nMyTol=nTol;
+/*N*/ FASTBOOL bFilled=bForceFilled || HasFill();
+/*N*/ FASTBOOL bPickThrough=pModel!=NULL && pModel->IsPickThroughTransparentTextFrames();
+/*N*/ if (bTextFrame && !bPickThrough) bFilled=TRUE;
+/*N*/ FASTBOOL bLine=HasLine();
+/*N*/
+/*N*/ INT32 nWdt=bLine ? ImpGetLineWdt()/2 :0; // Halbe Strichstaerke
+/*N*/ long nBoundWdt=aRect.GetWidth()-1;
+/*N*/ long nBoundHgt=aRect.GetHeight()-1;
+/*N*/ if (bFilled && nBoundWdt>short(nTol) && nBoundHgt>short(nTol) && Abs(aGeo.nShearWink)<=4500) {
+/*N*/ if (!bForceTol && !bTextFrame ) nMyTol=0; // Keine Toleranz noetig hier
+/*N*/ }
+/*N*/ if (nWdt>nMyTol && (!bTextFrame || pEdtOutl==NULL)) nMyTol=nWdt; // Bei dicker Umrandung keine Toleranz noetig, ausser wenn bei TextEdit
+/*N*/ Rectangle aR(aRect);
+/*N*/ if (nMyTol!=0 && bFilled) {
+/*N*/ aR.Left ()-=nMyTol;
+/*N*/ aR.Top ()-=nMyTol;
+/*N*/ aR.Right ()+=nMyTol;
+/*N*/ aR.Bottom()+=nMyTol;
+/*N*/ }
+/*N*/
+/*N*/ if (bFilled || bLine || bTextFrame) { // Bei TextFrame so tun, alsob Linie da
+/*N*/ unsigned nCnt=0;
+/*N*/ INT32 nXShad=0,nYShad=0;
+/*N*/ long nEckRad=/*bTextFrame ? 0 :*/ GetEckenradius();
+/*N*/ do { // 1 Durchlauf, bei Schatten 2 Durchlaeufe.
+/*N*/ if (nCnt!=0) aR.Move(nXShad,nYShad);
+/*N*/ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0 || !bFilled) {
+/*N*/ Polygon aPol(aR);
+/*N*/ if (nEckRad!=0) {
+/*N*/ INT32 nRad=nEckRad;
+/*N*/ if (bFilled) nRad+=nMyTol; // um korrekt zu sein ...
+/*N*/ XPolygon aXPoly(ImpCalcXPoly(aR,nRad));
+/*N*/ aPol=XOutCreatePolygon(aXPoly,NULL);
+/*N*/ } else {
+/*N*/ if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
+/*N*/ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ }
+/*N*/ if (bFilled) {
+/*N*/ if (IsPointInsidePoly(aPol,rPnt)) return (SdrObject*)this;
+/*N*/ } else {
+/*N*/ Rectangle aTouchRect(rPnt.X()-nMyTol,rPnt.Y()-nMyTol,rPnt.X()+nMyTol,rPnt.Y()+nMyTol);
+/*N*/ if (IsRectTouchesLine(aPol,aTouchRect)) return (SdrObject*)this;
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (aR.IsInside(rPnt)) return (SdrObject*)this;
+/*N*/ }
+/*N*/ } while (nCnt++==0 && ImpGetShadowDist(nXShad,nYShad));
+/*N*/ }
+/*N*/ FASTBOOL bCheckText=TRUE;
+/*N*/ if (bCheckText && HasText() && (!bTextFrame || bPickThrough)) {
+/*N*/ return SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer);
+/*N*/ }
+/*N*/ return NULL;
+/*N*/ }
+
+/*N*/ SdrObject* SdrRectObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ return ImpCheckHit(rPnt,nTol,pVisiLayer,FALSE/*,bTextFrame*/);
+/*N*/ }
+
+
+
+/*N*/ void SdrRectObj::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ SdrTextObj::operator=(rObj);
+/*N*/ }
+
+/*N*/ void SdrRectObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+/*N*/ {
+/*N*/ rPoly=XPolyPolygon(ImpCalcXPoly(aRect,GetEckenradius()));
+/*N*/ }
+
+/*N*/ void SdrRectObj::TakeContour(XPolyPolygon& rPoly) const
+/*N*/ {
+/*N*/ SdrTextObj::TakeContour(rPoly);
+/*N*/ }
+
+
+/*N*/ void SdrRectObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ long nEckRad=GetEckenradius();
+/*N*/ if ((aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) && nEckRad!=0) {
+/*?*/ maSnapRect=GetXPoly().GetBoundRect();
+/*N*/ } else {
+/*N*/ SdrTextObj::RecalcSnapRect();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrRectObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrTextObj::NbcSetSnapRect(rRect);
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+/*N*/ void SdrRectObj::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrTextObj::NbcSetLogicRect(rRect);
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ Pointer SdrRectObj::GetCreatePointer() const
+/*N*/ {
+/*N*/ if (IsTextFrame()) return Pointer(POINTER_DRAW_TEXT);
+/*N*/ return Pointer(POINTER_DRAW_RECT);
+/*N*/ }
+
+/*N*/ void SdrRectObj::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ SdrTextObj::NbcMove(rSiz);
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+/*N*/ void SdrRectObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrTextObj::NbcResize(rRef,xFact,yFact);
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+/*N*/ void SdrRectObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ SdrTextObj::NbcRotate(rRef,nWink,sn,cs);
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+/*N*/ void SdrRectObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+
+
+
+/*N*/ SdrGluePoint SdrRectObj::GetVertexGluePoint(USHORT nPosNum) const
+/*N*/ {
+/*N*/ INT32 nWdt = ((XLineWidthItem&)(GetItem(XATTR_LINEWIDTH))).GetValue();
+/*N*/ nWdt++;
+/*N*/ nWdt /= 2;
+/*N*/
+/*N*/ Point aPt;
+/*N*/ switch (nPosNum) {
+/*N*/ case 0: aPt=aRect.TopCenter(); aPt.Y()-=nWdt; break;
+/*N*/ case 1: aPt=aRect.RightCenter(); aPt.X()+=nWdt; break;
+/*N*/ case 2: aPt=aRect.BottomCenter(); aPt.Y()+=nWdt; break;
+/*N*/ case 3: aPt=aRect.LeftCenter(); aPt.X()-=nWdt; break;
+/*N*/ }
+/*N*/ if (aGeo.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
+/*N*/ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ aPt-=GetSnapRect().Center();
+/*N*/ SdrGluePoint aGP(aPt);
+/*N*/ aGP.SetPercent(FALSE);
+/*N*/ return aGP;
+/*N*/ }
+
+
+
+/*N*/ void SdrRectObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ SdrTextObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ SetXPolyDirty(); // wg. Eckenradius
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+/*N*/ void SdrRectObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrTextObj::ItemSetChanged(rSet);
+/*N*/
+/*N*/ // local changes
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrRectObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ SdrTextObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ SetXPolyDirty(); // wg. Eckenradius
+/*N*/ }
+
+/*N*/ SdrObjGeoData* SdrRectObj::NewGeoData() const
+/*N*/ { // etwas umstaendlicher, damit's vielleicht unter Chicago durchgeht
+/*N*/ SdrObjGeoData* pGeo=new SdrRectObjGeoData;
+/*N*/ return pGeo;
+/*N*/ }
+
+/*N*/ void SdrRectObj::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {
+/*N*/ SdrTextObj::SaveGeoData(rGeo);
+/*N*/ SdrRectObjGeoData& rRGeo=(SdrRectObjGeoData&)rGeo;
+/*N*/ rRGeo.nEckRad=GetEckenradius();
+/*N*/ }
+
+/*?*/ 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();
+/*?*/ }
+
+/*N*/ void SdrRectObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrTextObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrRectObj");
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void SdrRectObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrTextObj::ReadData(rHead,rIn);
+/*N*/ if (IsTextFrame() && rHead.GetVersion()<3 && !HAS_BASE(SdrCaptionObj,this)) {
+/*N*/ // 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));
+/*?*/
+/*?*/ SetItemSet(aSet);
+/*N*/ }
+/*N*/ } else {
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrRectObj");
+/*N*/ #endif
+/*N*/ if (rHead.GetVersion()<=5) {
+/*N*/ long nEckRad;
+/*?*/ rIn>>nEckRad;
+/*?*/ long nAltRad=GetEckenradius();
+/*?*/ if (nEckRad!=nAltRad) NbcSetEckenradius(nEckRad);
+/*N*/ }
+/*N*/ }
+/*N*/ SetXPolyDirty();
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotext.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotext.cxx
new file mode 100644
index 000000000000..d61616fbf444
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotext.cxx
@@ -0,0 +1,1633 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svditext.hxx"
+#include "svdview.hxx" // Objekt gerade editiert wird
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svdoutl.hxx"
+#include "svdstr.hrc" // Objektname
+#include "svdtxhdl.hxx" // DrawTextToPath
+#include "writingmodeitem.hxx"
+
+
+
+#include <editstat.hxx>
+
+#include <outlobj.hxx>
+
+#include <editobj.hxx>
+
+
+#include "fhgtitem.hxx"
+
+#include <bf_svtools/itempool.hxx>
+
+#include "adjitem.hxx"
+
+
+#include "itemdata.hxx"
+
+#include "flditem.hxx"
+
+
+#include <vcl/salbtype.hxx> // FRound
+
+#include "xflgrit.hxx"
+
+#include "xoutx.hxx"
+
+#include <bf_goodies/matrix3d.hxx>
+
+namespace binfilter {
+
+// #104018# replace macros above with type-safe methods
+inline double ImplTwipsToMM(double fVal) { return (fVal * (127.0 / 72.0)); }
+inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrTextObj,SdrAttrObj);
+
+/*N*/ SdrTextObj::SdrTextObj():
+/*N*/ eTextKind(OBJ_TEXT),
+/*N*/ pOutlinerParaObject(NULL),
+/*N*/ pEdtOutl(NULL),
+/*N*/ pFormTextBoundRect(NULL)
+/*N*/ {
+/*N*/ bTextSizeDirty=FALSE;
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ bTextFrame=FALSE;
+/*N*/ bNoShear=FALSE;
+/*N*/ bNoRotate=FALSE;
+/*N*/ bNoMirror=FALSE;
+/*N*/ bDisableAutoWidthOnDragging=FALSE;
+/*N*/
+/*N*/ // #101684#
+/*N*/ mbInEditMode = FALSE;
+/*N*/
+/*N*/ // #108784#
+/*N*/ maTextEditOffset = Point(0, 0);
+/*N*/ }
+
+/*N*/ SdrTextObj::SdrTextObj(const Rectangle& rNewRect):
+/*N*/ aRect(rNewRect),
+/*N*/ eTextKind(OBJ_TEXT),
+/*N*/ pOutlinerParaObject(NULL),
+/*N*/ pEdtOutl(NULL),
+/*N*/ pFormTextBoundRect(NULL)
+/*N*/ {
+/*N*/ bTextSizeDirty=FALSE;
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ bTextFrame=FALSE;
+/*N*/ bNoShear=FALSE;
+/*N*/ bNoRotate=FALSE;
+/*N*/ bNoMirror=FALSE;
+/*N*/ bDisableAutoWidthOnDragging=FALSE;
+/*N*/ ImpJustifyRect(aRect);
+/*N*/
+/*N*/ // #101684#
+/*N*/ mbInEditMode = FALSE;
+/*N*/
+/*N*/ // #108784#
+/*N*/ maTextEditOffset = Point(0, 0);
+/*N*/ }
+
+/*N*/ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind):
+/*N*/ eTextKind(eNewTextKind),
+/*N*/ pOutlinerParaObject(NULL),
+/*N*/ pEdtOutl(NULL),
+/*N*/ pFormTextBoundRect(NULL)
+/*N*/ {
+/*N*/ bTextSizeDirty=FALSE;
+/*N*/ bTextFrame=TRUE;
+/*N*/ bNoShear=TRUE;
+/*N*/ bNoRotate=FALSE;
+/*N*/ bNoMirror=TRUE;
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ bDisableAutoWidthOnDragging=FALSE;
+/*N*/
+/*N*/ // #101684#
+/*N*/ mbInEditMode = FALSE;
+/*N*/
+/*N*/ // #108784#
+/*N*/ maTextEditOffset = Point(0, 0);
+/*N*/ }
+
+/*N*/ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect):
+/*N*/ aRect(rNewRect),
+/*N*/ eTextKind(eNewTextKind),
+/*N*/ pOutlinerParaObject(NULL),
+/*N*/ pEdtOutl(NULL),
+/*N*/ pFormTextBoundRect(NULL)
+/*N*/ {
+/*N*/ bTextSizeDirty=FALSE;
+/*N*/ bTextFrame=TRUE;
+/*N*/ bNoShear=TRUE;
+/*N*/ bNoRotate=FALSE;
+/*N*/ bNoMirror=TRUE;
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ bDisableAutoWidthOnDragging=FALSE;
+/*N*/ ImpJustifyRect(aRect);
+/*N*/
+/*N*/ // #101684#
+/*N*/ mbInEditMode = FALSE;
+/*N*/
+/*N*/ // #108784#
+/*N*/ maTextEditOffset = Point(0, 0);
+/*N*/ }
+
+/*N*/ SdrTextObj::~SdrTextObj()
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ SdrOutliner& rOutl = pModel->GetHitTestOutliner();
+/*N*/ if( rOutl.GetTextObj() == this )
+/*N*/ rOutl.SetTextObj( NULL );
+/*N*/ }
+/*N*/
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ delete pOutlinerParaObject;
+/*N*/ }
+/*N*/ if (pFormTextBoundRect!=NULL) {
+/*N*/ delete pFormTextBoundRect;
+/*N*/ }
+/*N*/ ImpLinkAbmeldung();
+/*N*/ }
+
+/*N*/ const Size& SdrTextObj::GetTextSize() const
+/*N*/ {
+/*N*/ if (bTextSizeDirty) {
+/*N*/ Size aSiz;
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+/*N*/ rOutliner.SetText(*pOutlinerParaObject);
+/*N*/ rOutliner.SetUpdateMode(TRUE);
+/*N*/ aSiz=rOutliner.CalcTextSize();
+/*N*/ rOutliner.Clear();
+/*N*/ }
+/*N*/ // 2x casting auf nonconst
+/*N*/ ((SdrTextObj*)this)->aTextSize=aSiz;
+/*N*/ ((SdrTextObj*)this)->bTextSizeDirty=FALSE;
+/*N*/ }
+/*N*/ return aTextSize;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::IsAutoGrowHeight() const
+/*N*/ {
+/*N*/ if(!bTextFrame)
+/*N*/ return FALSE; // AutoGrow nur bei TextFrames
+/*N*/
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ BOOL bRet = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+/*N*/
+/*N*/ if(bRet)
+/*N*/ {
+/*N*/ SdrTextAniKind eAniKind = ((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+/*N*/
+/*N*/ if(eAniKind == SDRTEXTANI_SCROLL || eAniKind == SDRTEXTANI_ALTERNATE || eAniKind == SDRTEXTANI_SLIDE)
+/*N*/ {
+/*N*/ SdrTextAniDirection eDirection = ((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+/*N*/
+/*N*/ if(eDirection == SDRTEXTANI_UP || eDirection == SDRTEXTANI_DOWN)
+/*N*/ {
+/*N*/ bRet = FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::IsAutoGrowWidth() const
+/*N*/ {
+/*N*/ if(!bTextFrame)
+/*N*/ return FALSE; // AutoGrow nur bei TextFrames
+/*N*/
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ BOOL bRet = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+/*N*/
+/*N*/ // #101684#
+/*N*/ BOOL bInEditMOde = IsInEditMode();
+/*N*/
+/*N*/ if(!bInEditMOde && bRet)
+/*N*/ {
+/*N*/ SdrTextAniKind eAniKind = ((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+/*N*/
+/*N*/ if(eAniKind == SDRTEXTANI_SCROLL || eAniKind == SDRTEXTANI_ALTERNATE || eAniKind == SDRTEXTANI_SLIDE)
+/*N*/ {
+/*?*/ SdrTextAniDirection eDirection = ((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+/*?*/
+/*?*/ if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT)
+/*?*/ {
+/*?*/ bRet = FALSE;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ SdrTextHorzAdjust SdrTextObj::GetTextHorizontalAdjust() const
+/*N*/ {
+/*N*/ if(IsContourTextFrame())
+/*?*/ return SDRTEXTHORZADJUST_BLOCK;
+/*N*/
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ SdrTextHorzAdjust eRet = ((SdrTextHorzAdjustItem&)(rSet.Get(SDRATTR_TEXT_HORZADJUST))).GetValue();
+/*N*/
+/*N*/ // #101684#
+/*N*/ BOOL bInEditMode = IsInEditMode();
+/*N*/
+/*N*/ if(!bInEditMode && eRet == SDRTEXTHORZADJUST_BLOCK)
+/*N*/ {
+/*N*/ SdrTextAniKind eAniKind = ((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+/*N*/
+/*N*/ if(eAniKind == SDRTEXTANI_SCROLL || eAniKind == SDRTEXTANI_ALTERNATE || eAniKind == SDRTEXTANI_SLIDE)
+/*N*/ {
+/*?*/ SdrTextAniDirection eDirection = ((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+/*?*/
+/*?*/ if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT)
+/*?*/ {
+/*?*/ eRet = SDRTEXTHORZADJUST_LEFT;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return eRet;
+/*N*/ } // defaults: BLOCK fuer Textrahmen, CENTER fuer beschriftete Grafikobjekte
+
+/*N*/ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust() const
+/*N*/ {
+/*N*/ if(IsContourTextFrame())
+/*?*/ return SDRTEXTVERTADJUST_TOP;
+/*N*/
+/*N*/ // #103516# Take care for vertical text animation here
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ SdrTextVertAdjust eRet = ((SdrTextVertAdjustItem&)(rSet.Get(SDRATTR_TEXT_VERTADJUST))).GetValue();
+/*N*/ BOOL bInEditMode = IsInEditMode();
+/*N*/
+/*N*/ // #103516# Take care for vertical text animation here
+/*N*/ if(!bInEditMode && eRet == SDRTEXTVERTADJUST_BLOCK)
+/*N*/ {
+/*N*/ SdrTextAniKind eAniKind = ((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+/*N*/
+/*N*/ if(eAniKind == SDRTEXTANI_SCROLL || eAniKind == SDRTEXTANI_ALTERNATE || eAniKind == SDRTEXTANI_SLIDE)
+/*N*/ {
+/*N*/ SdrTextAniDirection eDirection = ((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+/*N*/
+/*N*/ if(eDirection == SDRTEXTANI_LEFT || eDirection == SDRTEXTANI_RIGHT)
+/*N*/ {
+/*N*/ eRet = SDRTEXTVERTADJUST_TOP;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return eRet;
+/*N*/ } // defaults: TOP fuer Textrahmen, CENTER fuer beschriftete Grafikobjekte
+
+/*N*/ void SdrTextObj::ImpJustifyRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ if (!rRect.IsEmpty()) {
+/*N*/ rRect.Justify();
+/*N*/ if (rRect.Left()==rRect.Right()) rRect.Right()++;
+/*N*/ if (rRect.Top()==rRect.Bottom()) rRect.Bottom()++;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrTextObj::ImpCheckShear()
+/*N*/ {
+/*N*/ if (bNoShear && aGeo.nShearWink!=0) {
+/*N*/ aGeo.nShearWink=0;
+/*N*/ aGeo.nTan=0;
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ FASTBOOL SdrTextObj::HasEditText() const
+/*N*/ {
+/*N*/ FASTBOOL bRet=FALSE;
+/*N*/ if (pEdtOutl!=NULL) {
+/*N*/ Paragraph* p1stPara=pEdtOutl->GetParagraph( 0 );
+/*N*/ ULONG nParaAnz=pEdtOutl->GetParagraphCount();
+/*N*/ if (p1stPara==NULL) nParaAnz=0;
+/*N*/ if (nParaAnz==1) { // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+/*N*/ XubString aStr(pEdtOutl->GetText(p1stPara));
+/*N*/
+/*N*/ // Aha, steht nix drin!
+/*N*/ if(!aStr.Len())
+/*N*/ nParaAnz = 0;
+/*N*/ }
+/*N*/ bRet=nParaAnz!=0;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ void SdrTextObj::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL;
+/*N*/ FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL;
+/*N*/ FASTBOOL bLinked=IsLinkedText();
+/*N*/
+/*N*/ if (bLinked && bRemove) {
+/*?*/ ImpLinkAbmeldung();
+/*N*/ }
+/*N*/
+/*N*/ SdrAttrObj::SetPage(pNewPage);
+/*N*/
+/*N*/ if (bLinked && bInsert) {
+/*?*/ ImpLinkAnmeldung();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrTextObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ const SfxItemSet& rSet = GetItemSet();
+/*N*/ SdrModel* pOldModel=pModel;
+/*N*/ BOOL bLinked=IsLinkedText();
+/*N*/ BOOL bChg=pNewModel!=pModel;
+/*N*/ BOOL bHgtSet = rSet.GetItemState(EE_CHAR_FONTHEIGHT, TRUE) == SFX_ITEM_SET;
+/*N*/ if (bLinked && bChg) {
+/*?*/ ImpLinkAbmeldung();
+/*N*/ }
+/*N*/
+/*N*/ SdrAttrObj::SetModel(pNewModel);
+/*N*/
+/*N*/ 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();
+/*?*/ BOOL bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
+/*?*/ BOOL bSetHgtItem=bDefHgtChanged && !bHgtSet;
+/*?*/ if (bSetHgtItem) { // #32665#
+/*?*/ // zunaechst das HeightItem festklopfen, damit
+/*?*/ // 1. Es eben bestehen bleibt und
+/*?*/ // 2. DoStretchChars vom richtigen Wert ausgeht
+/*?*/ SetItem(SvxFontHeightItem(nOldFontHgt));
+/*?*/ }
+/*?*/ // erst jetzt den Outliner holen, etc. damit obiges SetAttr auch wirkt
+/*?*/ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+/*?*/ rOutliner.SetText(*pOutlinerParaObject);
+/*?*/ delete pOutlinerParaObject;
+/*?*/ pOutlinerParaObject=NULL;
+/*?*/ if (bScaleUnitChanged) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ SetOutlinerParaObject(rOutliner.CreateParaObject()); // #34494#
+/*?*/ pOutlinerParaObject->ClearPortionInfo();
+/*?*/ bPortionInfoChecked=FALSE;
+/*?*/ rOutliner.Clear();
+/*?*/ //ImpSetTextStyleSheetListeners();
+/*N*/ }
+
+/*N*/ if (bLinked && bChg) {
+/*?*/ ImpLinkAnmeldung();
+/*N*/ }
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::NbcSetEckenradius(long nRad)
+/*N*/ {
+/*N*/ SetItem(SdrEckenradiusItem(nRad));
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::NbcSetAutoGrowHeight(FASTBOOL bAuto)
+/*N*/ {
+/*N*/ if(bTextFrame)
+/*N*/ {
+/*N*/ SetItem(SdrTextAutoGrowHeightItem(bAuto));
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::NbcSetMinTextFrameHeight(long nHgt)
+/*N*/ {
+/*N*/ if(bTextFrame)
+/*N*/ {
+/*N*/ SetItem(SdrTextMinFrameHeightItem(nHgt));
+/*N*/
+/*N*/ // #84974# use bDisableAutoWidthOnDragging as
+/*N*/ // bDisableAutoHeightOnDragging if vertical.
+/*N*/ if(IsVerticalWriting() && bDisableAutoWidthOnDragging)
+/*N*/ {
+/*?*/ bDisableAutoWidthOnDragging = FALSE;
+/*?*/ SetItem(SdrTextAutoGrowHeightItem(FALSE));
+/*N*/ }
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+/*?*/ return FALSE;
+/*N*/ }
+
+
+
+/*N*/ FASTBOOL SdrTextObj::NbcSetMinTextFrameWidth(long nWdt)
+/*N*/ {
+/*N*/ if(bTextFrame)
+/*N*/ {
+/*N*/ SetItem(SdrTextMinFrameWidthItem(nWdt));
+/*N*/
+/*N*/ // #84974# use bDisableAutoWidthOnDragging only
+/*N*/ // when not vertical.
+/*N*/ if(!IsVerticalWriting() && bDisableAutoWidthOnDragging)
+/*N*/ {
+/*?*/ bDisableAutoWidthOnDragging = FALSE;
+/*?*/ SetItem(SdrTextAutoGrowWidthItem(FALSE));
+/*N*/ }
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+
+
+
+/*N*/ void SdrTextObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+/*N*/ {
+/*N*/ rRect=aRect;
+/*N*/ }
+
+/*N*/ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
+/*N*/ {
+/*N*/ long nLeftDist=GetTextLeftDistance();
+/*N*/ long nRightDist=GetTextRightDistance();
+/*N*/ long nUpperDist=GetTextUpperDistance();
+/*N*/ long nLowerDist=GetTextLowerDistance();
+/*N*/ Rectangle aAnkRect(aRect); // Rect innerhalb dem geankert wird
+/*N*/ FASTBOOL bFrame=IsTextFrame();
+/*N*/ if (!bFrame) {
+/*N*/ TakeUnrotatedSnapRect(aAnkRect);
+/*N*/ }
+/*N*/ Point aRotateRef(aAnkRect.TopLeft());
+/*N*/ aAnkRect.Left()+=nLeftDist;
+/*N*/ aAnkRect.Top()+=nUpperDist;
+/*N*/ aAnkRect.Right()-=nRightDist;
+/*N*/ aAnkRect.Bottom()-=nLowerDist;
+/*N*/
+/*N*/ // #108816#
+/*N*/ // Since sizes may be bigger than the object bounds it is necessary to
+/*N*/ // justify the rect now.
+/*N*/ ImpJustifyRect(aAnkRect);
+/*N*/
+/*N*/ if (bFrame) {
+/*N*/ // !!! hier noch etwas verfeinern !!!
+/*N*/ if (aAnkRect.GetWidth()<2) aAnkRect.Right()=aAnkRect.Left()+1; // Mindestgroesse 2
+/*N*/ if (aAnkRect.GetHeight()<2) aAnkRect.Bottom()=aAnkRect.Top()+1; // Mindestgroesse 2
+/*N*/ }
+/*N*/ if (aGeo.nDrehWink!=0) {
+/*N*/ Point aTmpPt(aAnkRect.TopLeft());
+/*N*/ RotatePoint(aTmpPt,aRotateRef,aGeo.nSin,aGeo.nCos);
+/*N*/ aTmpPt-=aAnkRect.TopLeft();
+/*N*/ aAnkRect.Move(aTmpPt.X(),aTmpPt.Y());
+/*N*/ }
+/*N*/ rAnchorRect=aAnkRect;
+/*N*/ }
+
+/*N*/ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText,
+/*N*/ Rectangle* pAnchorRect, BOOL bLineWidth ) const
+/*N*/ {
+/*N*/ Rectangle aAnkRect; // Rect innerhalb dem geankert wird
+/*N*/ TakeTextAnchorRect(aAnkRect);
+/*N*/ SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
+/*N*/ SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
+/*N*/ SdrTextAniKind eAniKind=GetTextAniKind();
+/*N*/ SdrTextAniDirection eAniDirection=GetTextAniDirection();
+/*N*/
+/*N*/ SdrFitToSizeType eFit=GetFitToSize();
+/*N*/ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+/*N*/ FASTBOOL bContourFrame=IsContourTextFrame();
+/*N*/
+/*N*/ FASTBOOL bFrame=IsTextFrame();
+/*N*/ ULONG nStat0=rOutliner.GetControlWord();
+/*N*/ Size aNullSize;
+/*N*/ if (!bContourFrame)
+/*N*/ {
+/*N*/ rOutliner.SetControlWord(nStat0|EE_CNTRL_AUTOPAGESIZE);
+/*N*/ rOutliner.SetMinAutoPaperSize(aNullSize);
+/*N*/ rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
+/*N*/ }
+/*N*/
+/*N*/ if (!bFitToSize && !bContourFrame)
+/*N*/ {
+/*N*/ long nAnkWdt=aAnkRect.GetWidth();
+/*N*/ long nAnkHgt=aAnkRect.GetHeight();
+/*N*/ if (bFrame)
+/*N*/ {
+/*N*/ long nWdt=nAnkWdt;
+/*N*/ long nHgt=nAnkHgt;
+/*N*/
+/*N*/ // #101684#
+/*N*/ BOOL bInEditMode = IsInEditMode();
+/*N*/
+/*N*/ if (!bInEditMode && (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE))
+/*N*/ {
+/*?*/ // Grenzenlose Papiergroesse fuer Laufschrift
+/*?*/ if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nWdt=1000000;
+/*?*/ if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=1000000;
+/*N*/ }
+/*N*/ rOutliner.SetMaxAutoPaperSize(Size(nWdt,nHgt));
+/*N*/ }
+/*N*/
+/*N*/ // #103516# New try with _BLOCK for hor and ver after completely
+/*N*/ // supporting full width for vertical text.
+/*N*/ if(SDRTEXTHORZADJUST_BLOCK == eHAdj && !IsVerticalWriting())
+/*N*/ {
+/*N*/ rOutliner.SetMinAutoPaperSize(Size(nAnkWdt, 0));
+/*N*/ }
+/*N*/
+/*N*/ if(SDRTEXTVERTADJUST_BLOCK == eVAdj && IsVerticalWriting())
+/*N*/ {
+/*N*/ rOutliner.SetMinAutoPaperSize(Size(0, nAnkHgt));
+/*N*/ }
+/*N*/
+/*N*/ // #103335# back to old solution, thus #100801# will be back and needs to be solved in
+/*N*/ // another way.
+// if (eHAdj==SDRTEXTHORZADJUST_BLOCK)
+// {
+// if(IsVerticalWriting())
+// rOutliner.SetMinAutoPaperSize(Size(nAnkWdt, nAnkHgt));
+// else
+// rOutliner.SetMinAutoPaperSize(Size(nAnkWdt, 0));
+// }
+
+// // #100801# MinAutoPaperSize needs always to be set completely
+// // when Verical
+// if(IsVerticalWriting())
+// {
+// rOutliner.SetMinAutoPaperSize(Size(nAnkWdt, nAnkHgt));
+// }
+//
+// if(SDRTEXTHORZADJUST_BLOCK == eHAdj)
+// {
+// // #89459#
+// if(!IsVerticalWriting())
+// {
+// rOutliner.SetMinAutoPaperSize(Size(nAnkWdt, 0));
+// }
+// }
+/*N*/ }
+/*N*/
+/*N*/ rOutliner.SetPaperSize(aNullSize);
+/*N*/ if (bContourFrame)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 ImpSetContourPolygon( rOutliner, aAnkRect, bLineWidth );
+/*N*/
+/*N*/ // Text in den Outliner stecken - ggf. den aus dem EditOutliner
+/*N*/ OutlinerParaObject* pPara=pOutlinerParaObject;
+/*N*/ if (pEdtOutl && !bNoEditText)
+/*?*/ pPara=pEdtOutl->CreateParaObject();
+/*N*/
+/*N*/ if (pPara)
+/*N*/ {
+/*N*/ BOOL bHitTest = FALSE;
+/*N*/ if( pModel )
+/*N*/ bHitTest = &pModel->GetHitTestOutliner() == &rOutliner;
+/*N*/
+/*N*/ const SdrTextObj* pTestObj = rOutliner.GetTextObj();
+/*N*/ if( !pTestObj || !bHitTest || pTestObj != this ||
+/*N*/ pTestObj->GetOutlinerParaObject() != pOutlinerParaObject )
+/*N*/ {
+/*N*/ if( bHitTest )
+/*N*/ rOutliner.SetTextObj( this );
+/*N*/
+/*N*/ rOutliner.SetUpdateMode(TRUE);
+/*N*/ rOutliner.SetText(*pPara);
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // rOutliner.Clear();
+/*?*/ rOutliner.SetTextObj( NULL );
+/*N*/ }
+/*N*/
+/*N*/ if (pEdtOutl && !bNoEditText && pPara)
+/*?*/ delete pPara;
+/*N*/
+/*N*/ rOutliner.SetUpdateMode(TRUE);
+/*N*/ rOutliner.SetControlWord(nStat0);
+/*N*/
+/*N*/ if (!bPortionInfoChecked)
+/*N*/ {
+/*N*/ // Optimierung: ggf. BigTextObject erzeugen
+/*N*/ ((SdrTextObj*)this)->bPortionInfoChecked=TRUE;
+/*N*/ if (pOutlinerParaObject!=NULL && rOutliner.ShouldCreateBigTextObject())
+/*?*/ ((SdrTextObj*)this)->pOutlinerParaObject=rOutliner.CreateParaObject();
+/*N*/ }
+/*N*/
+/*N*/ Point aTextPos(aAnkRect.TopLeft());
+/*N*/ Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() hat etwas Toleranz drauf, oder?
+/*N*/
+/*N*/ // #106653#
+/*N*/ // For draw objects containing text correct hor/ver alignment if text is bigger
+/*N*/ // than the object itself. Without that correction, the text would always be
+/*N*/ // formatted to the left edge (or top edge when vertical) of the draw object.
+/*N*/ if(!IsTextFrame())
+/*N*/ {
+/*N*/ if(aAnkRect.GetWidth() < aTextSiz.Width() && !IsVerticalWriting())
+/*N*/ {
+/*N*/ // #110129#
+/*N*/ // Horizontal case here. Correct only if eHAdj == SDRTEXTHORZADJUST_BLOCK,
+/*N*/ // else the alignment is wanted.
+/*N*/ if(SDRTEXTHORZADJUST_BLOCK == eHAdj)
+/*N*/ {
+/*N*/ eHAdj = SDRTEXTHORZADJUST_CENTER;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(aAnkRect.GetHeight() < aTextSiz.Height() && IsVerticalWriting())
+/*N*/ {
+/*N*/ // #110129#
+/*N*/ // Vertical case here. Correct only if eHAdj == SDRTEXTVERTADJUST_BLOCK,
+/*N*/ // else the alignment is wanted.
+/*N*/ if(SDRTEXTVERTADJUST_BLOCK == eVAdj)
+/*N*/ {
+/*N*/ eVAdj = SDRTEXTVERTADJUST_CENTER;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (eHAdj==SDRTEXTHORZADJUST_CENTER || eHAdj==SDRTEXTHORZADJUST_RIGHT)
+/*N*/ {
+/*N*/ long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
+/*N*/ if (eHAdj==SDRTEXTHORZADJUST_CENTER)
+/*N*/ aTextPos.X()+=nFreeWdt/2;
+/*N*/ if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
+/*N*/ aTextPos.X()+=nFreeWdt;
+/*N*/ }
+/*N*/ if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
+/*N*/ {
+/*N*/ long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
+/*N*/ if (eVAdj==SDRTEXTVERTADJUST_CENTER)
+/*N*/ aTextPos.Y()+=nFreeHgt/2;
+/*N*/ if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
+/*N*/ aTextPos.Y()+=nFreeHgt;
+/*N*/ }
+/*N*/ if (aGeo.nDrehWink!=0)
+/*N*/ RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/
+/*N*/ if (pAnchorRect)
+/*N*/ *pAnchorRect=aAnkRect;
+/*N*/
+/*N*/ // rTextRect ist bei ContourFrame in einigen Faellen nicht korrekt
+/*N*/ rTextRect=Rectangle(aTextPos,aTextSiz);
+/*N*/ if (bContourFrame)
+/*?*/ rTextRect=aAnkRect;
+/*N*/ }
+
+/*N*/ OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const
+/*N*/ {
+/*N*/ OutlinerParaObject* pPara=NULL;
+/*N*/ 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, (sal_uInt16)nParaAnz);
+/*?*/ }
+/*N*/ }
+/*N*/ return pPara;
+/*N*/ }
+
+
+
+// Geht z.Zt. nur wenn das Obj schon wenigstens einmal gepaintet wurde
+// Denn dann ist der MtfAnimator initiallisiert
+
+
+
+
+/*N*/ void SdrTextObj::ImpAddTextToBoundRect()
+/*N*/ {
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ if (IsContourTextFrame()) return;
+/*N*/ if (IsFontwork()) {
+/*N*/ if (pModel!=NULL) {
+/*N*/ VirtualDevice aVD;
+/*N*/ ExtOutputDevice aXOut(&aVD);
+/*N*/ SdrOutliner& rOutl=ImpGetDrawOutliner();
+/*N*/ rOutl.SetUpdateMode(TRUE);
+/*N*/ ImpTextPortionHandler aTPHandler(rOutl,*this);
+/*N*/
+/*N*/ aXOut.SetTextAttr(GetItemSet());
+/*N*/
+/*N*/ aTPHandler.DrawTextToPath(aXOut,FALSE);
+/*N*/ if (pFormTextBoundRect==NULL) pFormTextBoundRect=new Rectangle;
+/*N*/ *pFormTextBoundRect=aTPHandler.GetFormTextBoundRect();
+/*N*/ aOutRect.Union(*pFormTextBoundRect);
+/*N*/ }
+/*N*/ } else { // Ansonsten Text im Zeichenobjekt zentriert
+/*N*/ if (pFormTextBoundRect!=NULL) {
+/*?*/ delete pFormTextBoundRect;
+/*?*/ pFormTextBoundRect=NULL;
+/*N*/ }
+/*N*/ FASTBOOL bCheckText=TRUE;
+/*N*/ if (bTextFrame) {
+/*N*/ bCheckText=GetTextLeftDistance ()<0 ||
+/*N*/ GetTextRightDistance()<0 ||
+/*N*/ GetTextUpperDistance()<0 ||
+/*N*/ GetTextLowerDistance()<0 ||
+/*N*/ (GetEckenradius()>0 && aGeo.nDrehWink!=0);
+/*N*/ }
+/*N*/ if (bCheckText) {
+/*N*/ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+/*N*/ Rectangle aTextRect;
+/*N*/ Rectangle aAnchorRect;
+/*N*/ TakeTextRect(rOutliner,aTextRect,TRUE,&aAnchorRect); // EditText ignorieren!
+/*N*/ SdrFitToSizeType eFit=GetFitToSize();
+/*N*/ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+/*N*/ if (bFitToSize) aTextRect=aAnchorRect;
+/*N*/ rOutliner.Clear();
+/*N*/ if (aGeo.nDrehWink!=0) {
+/*N*/ Polygon aPol(aTextRect);
+/*N*/ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aTextRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ aOutRect.Union(aPol.GetBoundRect());
+/*N*/ } else {
+/*N*/ aOutRect.Union(aTextRect);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObject* SdrTextObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ if (!bTextFrame && pOutlinerParaObject==NULL) return NULL;
+/*N*/ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+/*N*/ INT32 nMyTol=nTol;
+/*N*/ FASTBOOL bFontwork=IsFontwork();
+/*N*/ SdrFitToSizeType eFit=GetFitToSize();
+/*N*/ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+/*N*/ Rectangle aR(aRect);
+/*N*/ Rectangle aAnchor(aR);
+/*N*/ Rectangle aTextRect(aR);
+/*N*/ SdrOutliner* pOutliner = NULL;
+/*N*/ pOutliner = &pModel->GetHitTestOutliner();
+/*N*/
+/*N*/ if (bFontwork) {
+/*?*/ if (pFormTextBoundRect!=NULL) aR=*pFormTextBoundRect;
+/*?*/ else aR=GetBoundRect();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ TakeTextRect( *pOutliner, aTextRect, FALSE, &aAnchor, FALSE ); // EditText nicht mehr ignorieren! TRUE); // EditText ignorieren!
+/*N*/
+/*N*/ if (bFitToSize)
+/*?*/ aR=aAnchor;
+/*N*/ else
+/*N*/ aR=aTextRect;
+/*N*/ }
+/*N*/ if (aR.GetWidth()-1>short(nTol) && aR.GetHeight()-1>short(nTol)) nMyTol=0; // Keine Toleranz noetig hier
+/*N*/ if (nMyTol!=0) {
+/*?*/ aR.Left ()-=nMyTol;
+/*?*/ aR.Top ()-=nMyTol;
+/*?*/ aR.Right ()+=nMyTol;
+/*?*/ aR.Bottom()+=nMyTol;
+/*N*/ }
+/*N*/ FASTBOOL bRet=FALSE;
+/*N*/
+/*N*/ if(bFontwork)
+/*N*/ {
+/*N*/ bRet = aR.IsInside(rPnt);
+/*N*/
+/*N*/ // #105130# Include aRect here in measurements to be able to hit a
+/*N*/ // fontwork object on its border
+/*N*/ if(!bRet)
+/*N*/ {
+/*N*/ const Rectangle aSnapRect = GetSnapRect();
+/*N*/
+/*N*/ if( (rPnt.X() >= aSnapRect.Left() - nTol && rPnt.X() <= aSnapRect.Left() + nTol)
+/*N*/ || (rPnt.X() >= aSnapRect.Right() - nTol && rPnt.X() <= aSnapRect.Right() + nTol)
+/*N*/ || (rPnt.Y() >= aSnapRect.Top() - nTol && rPnt.Y() <= aSnapRect.Top() + nTol)
+/*N*/ || (rPnt.Y() >= aSnapRect.Bottom() - nTol && rPnt.Y() <= aSnapRect.Bottom() + nTol))
+/*N*/ {
+/*N*/ bRet = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if (aGeo.nDrehWink!=0) {
+/*N*/ Polygon aPol(aR);
+/*N*/ RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ bRet=IsPointInsidePoly(aPol,rPnt);
+/*N*/ } else {
+/*N*/ bRet=aR.IsInside(rPnt);
+/*N*/ }
+/*N*/ if (bRet) { // und nun noch checken, ob wirklich Buchstaben getroffen sind
+/*N*/ // Featurewunsch zur 4.0
+/*N*/ // Zunaechst meine Dok-Koordinaten in EE-Dok-Koordinaten umwandeln.
+/*N*/ Point aPt(rPnt); aPt-=aR.TopLeft();
+/*N*/ 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);
+/*N*/ }
+/*N*/ if (aGeo.nDrehWink!=0) RotatePoint(aPt,Point(),-aGeo.nSin,aGeo.nCos); // -sin fuer Unrotate
+/*N*/ // Und nun im EE-Dok auf Buchstabensuche gehen
+/*N*/ long nHitTol = 2000;
+/*N*/ OutputDevice* pRef = pOutliner->GetRefDevice();
+/*N*/ if( pRef )
+/*N*/ nHitTol = pRef->LogicToLogic( nHitTol, MAP_100TH_MM, pRef->GetMapMode().GetMapUnit() );
+/*N*/
+/*N*/ bRet = pOutliner->IsTextPos( aPt, (sal_uInt16)nHitTol );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bRet ? (SdrObject*)this : NULL;
+/*N*/ }
+
+
+
+/*N*/ void SdrTextObj::operator=(const SdrObject& rObj)
+/*N*/ {
+/*N*/ SdrAttrObj::operator=(rObj);
+/*N*/ const SdrTextObj* pText=PTR_CAST(SdrTextObj,&rObj);
+/*N*/ if (pText!=NULL) {
+/*N*/ aRect =pText->aRect;
+/*N*/ aGeo =pText->aGeo;
+/*N*/ eTextKind =pText->eTextKind;
+/*N*/ bTextFrame=pText->bTextFrame;
+/*N*/ aTextSize=pText->aTextSize;
+/*N*/ bTextSizeDirty=pText->bTextSizeDirty;
+/*N*/
+/*N*/ // #101776# Not all of the necessary parameters were copied yet.
+/*N*/ bNoShear = pText->bNoShear;
+/*N*/ bNoRotate = pText->bNoRotate;
+/*N*/ bNoMirror = pText->bNoMirror;
+/*N*/ bDisableAutoWidthOnDragging = pText->bDisableAutoWidthOnDragging;
+/*N*/
+/*N*/ if (pOutlinerParaObject!=NULL) delete pOutlinerParaObject;
+/*N*/ if (pText->HasText()) {
+/*N*/ const Outliner* pEO=pText->pEdtOutl;
+/*N*/ if (pEO!=NULL) {
+/*?*/ pOutlinerParaObject=pEO->CreateParaObject();
+/*N*/ } else {
+/*N*/ pOutlinerParaObject=pText->pOutlinerParaObject->Clone();
+/*N*/ }
+/*N*/ } else {
+/*N*/ pOutlinerParaObject=NULL;
+/*N*/ }
+/*N*/ ImpSetTextStyleSheetListeners();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrTextObj::TakeContour(XPolyPolygon& rPoly) const
+/*N*/ {
+/*N*/ SdrAttrObj::TakeContour(rPoly);
+/*N*/
+/*N*/ // #80328# using Clone()-Paint() strategy inside TakeContour() leaves a destroyed
+/*N*/ // SdrObject as pointer in DrawOutliner. Set *this again in fetching the outliner
+/*N*/ // in every case
+/*N*/ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+/*N*/
+/*N*/ // und nun noch ggf. das BoundRect des Textes dazu
+/*N*/ if (pOutlinerParaObject!=NULL && !IsFontwork() && !IsContourTextFrame()) {
+/*?*/ 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));
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrTextObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) {
+/*N*/ Polygon aPol(aRect);
+/*N*/ if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
+/*N*/ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+/*N*/ maSnapRect=aPol.GetBoundRect();
+/*N*/ } else {
+/*N*/ maSnapRect=aRect;
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ void SdrTextObj::ImpCheckMasterCachable()
+/*N*/ {
+/*N*/ bNotMasterCachable=FALSE;
+/*N*/ if (!bNotVisibleAsMaster && pOutlinerParaObject!=NULL && pOutlinerParaObject->IsEditDoc()) {
+/*N*/ const EditTextObject& rText=pOutlinerParaObject->GetTextObject();
+/*N*/ bNotMasterCachable=rText.HasField(SvxPageField::StaticType());
+/*N*/ }
+/*N*/ }
+
+// #101029#: Extracted from ImpGetDrawOutliner()
+/*N*/ void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const
+/*N*/ {
+/*N*/ rOutl.SetUpdateMode(FALSE);
+/*N*/ USHORT nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+/*N*/ if ( !IsOutlText() )
+/*N*/ nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+/*N*/ rOutl.Init( nOutlinerMode );
+/*N*/
+/*N*/ rOutl.SetGlobalCharStretching(100,100);
+/*N*/ ULONG nStat=rOutl.GetControlWord();
+/*N*/ nStat&=~(EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE);
+/*N*/ rOutl.SetControlWord(nStat);
+/*N*/ Size aNullSize;
+/*N*/ Size aMaxSize(100000,100000);
+/*N*/ rOutl.SetMinAutoPaperSize(aNullSize);
+/*N*/ rOutl.SetMaxAutoPaperSize(aMaxSize);
+/*N*/ rOutl.SetPaperSize(aMaxSize);
+/*N*/ rOutl.ClearPolygon();
+/*N*/ }
+
+/*N*/ SdrOutliner& SdrTextObj::ImpGetDrawOutliner() const
+/*N*/ {
+/*N*/ SdrOutliner& rOutl=pModel->GetDrawOutliner(this);
+/*N*/
+/*N*/ // #101029#: Code extracted to ImpInitDrawOutliner()
+/*N*/ ImpInitDrawOutliner( rOutl );
+/*N*/
+/*N*/ return rOutl;
+/*N*/ }
+
+// #101029#: Extracted from Paint()
+
+/*N*/ void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrTextObj::PreSave()
+/*N*/ {
+/*N*/ // call parent
+/*N*/ SdrAttrObj::PreSave();
+/*N*/
+/*N*/ // Prepare OutlinerParaObjects for storing
+/*N*/ OutlinerParaObject* pParaObj = GetOutlinerParaObject();
+/*N*/ if(pParaObj && GetModel())
+/*N*/ pParaObj->PrepareStore((SfxStyleSheetPool*)GetModel()->GetStyleSheetPool());
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ OutlinerParaObject* SdrTextObj::GetOutlinerParaObject() const
+/*N*/ {
+/*N*/ return pOutlinerParaObject;
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ // Update HitTestOutliner
+/*N*/ const SdrTextObj* pTestObj = pModel->GetHitTestOutliner().GetTextObj();
+/*N*/ if( pTestObj && pTestObj->GetOutlinerParaObject() == pOutlinerParaObject )
+/*?*/ pModel->GetHitTestOutliner().SetTextObj( NULL );
+/*N*/ }
+/*N*/
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ delete pOutlinerParaObject;
+/*N*/ pOutlinerParaObject=NULL;
+/*N*/ }
+/*N*/ pOutlinerParaObject=pTextObject;
+/*N*/
+/*N*/ if( pOutlinerParaObject )
+/*N*/ {
+/*N*/ ImpForceItemSet();
+/*N*/ mpObjectItemSet->Put( SvxWritingModeItem( pOutlinerParaObject->IsVertical() ? ::com::sun::star::text::WritingMode_TB_RL : ::com::sun::star::text::WritingMode_LR_TB ) );
+/*N*/ }
+/*N*/
+/*N*/ SetTextSizeDirty();
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ if (IsTextFrame() && (IsAutoGrowHeight() || IsAutoGrowWidth())) { // Textrahmen anpassen!
+/*N*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ }
+/*N*/ if (!IsTextFrame()) {
+/*N*/ // Das SnapRect behaelt seine Groesse bei
+/*N*/ bBoundRectDirty=TRUE;
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ }
+/*N*/ ImpSetTextStyleSheetListeners();
+/*N*/ ImpCheckMasterCachable();
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcReformatText()
+/*N*/ {
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ pOutlinerParaObject->ClearPortionInfo();
+/*N*/ if (bTextFrame) {
+/*N*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ } else {
+/*N*/ // Das SnapRect behaelt seine Groesse bei
+/*N*/ bBoundRectDirty=TRUE;
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ }
+/*N*/ SetTextSizeDirty();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrTextObj::ReformatText()
+/*N*/ {
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ SendRepaintBroadcast();
+/*N*/ NbcReformatText();
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ if (GetBoundRect()!=aBoundRect0) {
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrTextObj::RestartAnimation(SdrPageView* pPageView) const
+/*N*/ {
+///*N*/ FASTBOOL bAnimated=GetTextAniKind()!=SDRTEXTANI_NONE;
+///*N*/ if (bAnimated) {
+///*N*/ ImpSdrMtfAnimator* pAnimator=((SdrTextObj*)this)->ImpGetMtfAnimator();
+///*N*/ if (pAnimator!=NULL) {
+///*?*/ if (pPageView==NULL) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+////STRIP001 /*?*/ pAnimator->Stop();
+///*?*/ } else {
+///*?*/ for (ULONG nInfoNum=pAnimator->GetInfoCount(); nInfoNum>0;) {
+///*?*/ nInfoNum--;
+///*?*/ ImpMtfAnimationInfo* pInfo=pAnimator->GetInfo(nInfoNum);
+///*?*/ if (pInfo->pPageView==pPageView) {
+///*?*/ pAnimator->RemoveInfo(nInfoNum);
+///*?*/ }
+///*?*/ }
+///*?*/ }
+///*N*/ }
+///*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrTextObj::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {
+/*N*/ SdrAttrObj::SaveGeoData(rGeo);
+/*N*/ SdrTextObjGeoData& rTGeo=(SdrTextObjGeoData&)rGeo;
+/*N*/ rTGeo.aRect =aRect;
+/*N*/ rTGeo.aGeo =aGeo;
+/*N*/ }
+
+/*N*/ void SdrTextObj::RestGeoData(const SdrObjGeoData& rGeo)
+/*N*/ { // RectsDirty wird von SdrObject gerufen
+/*N*/ SdrAttrObj::RestGeoData(rGeo);
+/*N*/ SdrTextObjGeoData& rTGeo=(SdrTextObjGeoData&)rGeo;
+/*N*/ aRect =rTGeo.aRect;
+/*N*/ aGeo =rTGeo.aGeo;
+/*N*/ SetTextSizeDirty();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// I/O
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrTextObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrAttrObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrTextObj");
+/*N*/ #endif
+/*N*/ rOut<<BYTE(eTextKind);
+/*N*/ rOut<<aRect;
+/*N*/ rOut<<INT32(aGeo.nDrehWink);
+/*N*/ rOut<<INT32(aGeo.nShearWink);
+/*N*/
+/*N*/ // Wird gerade editiert, also das ParaObject aus dem aktiven Editor verwenden
+/*N*/ // Das war frueher. Jetzt wird beim Speichern sowas aehnliches wie EndTextEdit gemacht! #43095#
+/*N*/ if (pEdtOutl!=NULL) {
+/*?*/ // #43095#
+/*?*/ OutlinerParaObject* pPara=GetEditOutlinerParaObject();
+/*?*/ // casting auf nicht-const
+/*?*/ ((SdrTextObj*)this)->SetOutlinerParaObject(pPara);
+/*?*/
+/*?*/ // #91254# put text to object and set EmptyPresObj to FALSE
+/*?*/ if(pPara && IsEmptyPresObj())
+/*?*/ ((SdrTextObj*)this)->SetEmptyPresObj(FALSE);
+/*N*/ }
+/*N*/ OutlinerParaObject* pPara=pOutlinerParaObject;
+/*N*/
+/*N*/ BOOL bOutlinerParaObjectValid=pPara!=NULL;
+/*N*/ rOut<<bOutlinerParaObjectValid;
+/*N*/
+/*N*/ if (bOutlinerParaObjectValid)
+/*N*/ {
+/*N*/ SdrDownCompat aTextCompat(rOut,STREAM_WRITE); // Ab V11 eingepackt
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aTextCompat.SetID("SdrTextObj(OutlinerParaObject)");
+/*N*/ #endif
+/*N*/ pPara->Store(rOut); // neues Store am Outliner ab SV303
+/*N*/ pPara->FinishStore();
+/*N*/ }
+/*N*/
+/*N*/ // Ab FileVersion 10 wird das TextBoundRect gestreamt
+/*N*/ BOOL bFormTextBoundRectValid=pFormTextBoundRect!=NULL;
+/*N*/ rOut<<bFormTextBoundRectValid;
+/*N*/ if (bFormTextBoundRectValid) {
+/*N*/ rOut<<*pFormTextBoundRect;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrTextObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*?*/ delete pOutlinerParaObject;
+/*?*/ pOutlinerParaObject=NULL;
+/*N*/ }
+/*N*/
+/*N*/ SdrAttrObj::ReadData(rHead,rIn);
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrTextObj");
+/*N*/ #endif
+/*N*/ BYTE nTmp;
+/*N*/ rIn>>nTmp;
+/*N*/ eTextKind=SdrObjKind(nTmp);
+/*N*/ rIn>>aRect;
+/*N*/ INT32 n32;
+/*N*/ rIn>>n32; aGeo.nDrehWink=n32;
+/*N*/ rIn>>n32; aGeo.nShearWink=n32;
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ aGeo.RecalcTan();
+/*N*/ //rIn>>aText;
+/*N*/ if (rHead.GetVersion()<=5 && IsOutlText()) { // Das war bis zu diesem Zeitpunkt nicht gespeichert
+/*?*/ NbcSetAutoGrowHeight(FALSE);
+/*N*/ }
+/*N*/
+/*N*/ BOOL bOutlinerParaObjectValid=FALSE;
+/*N*/ rIn>>bOutlinerParaObjectValid;
+/*N*/ if (bOutlinerParaObjectValid)
+/*N*/ {
+/*N*/ SfxItemPool* pOutlPool=pModel!=NULL ? &pModel->GetItemPool() : NULL;
+/*N*/ if (rHead.GetVersion()>=11) {
+/*N*/ SdrDownCompat aTextCompat(rIn,STREAM_READ); // ab V11 eingepackt
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aTextCompat.SetID("SdrTextObj(OutlinerParaObject)");
+/*N*/ #endif
+/*N*/ pOutlinerParaObject=OutlinerParaObject::Create(rIn,pOutlPool);
+/*N*/ } else {
+/*N*/ pOutlinerParaObject=OutlinerParaObject::Create(rIn,pOutlPool);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( pOutlinerParaObject )
+/*N*/ {
+/*N*/ if( pOutlinerParaObject->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
+/*N*/ {
+/*N*/ if( eTextKind == OBJ_TITLETEXT )
+/*N*/ pOutlinerParaObject->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
+/*N*/ else if( eTextKind == OBJ_OUTLINETEXT )
+/*N*/ pOutlinerParaObject->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
+/*N*/ else
+/*N*/ pOutlinerParaObject->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+/*N*/ }
+/*N*/
+/*N*/ if( pOutlinerParaObject->IsVertical() )
+/*N*/ {
+/*?*/ ImpForceItemSet();
+/*?*/ mpObjectItemSet->Put( SvxWritingModeItem( ::com::sun::star::text::WritingMode_TB_RL ) );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (rHead.GetVersion()>=10) {
+/*N*/ // Ab FileVersion 10 wird das TextBoundRect gestreamt
+/*N*/ BOOL bFormTextBoundRectValid=FALSE;
+/*N*/ rIn>>bFormTextBoundRectValid;
+/*N*/ if (bFormTextBoundRectValid) {
+/*N*/ if (pFormTextBoundRect==NULL) pFormTextBoundRect=new Rectangle;
+/*N*/ rIn>>*pFormTextBoundRect;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if(rHead.GetVersion() < 12 && !bTextFrame)
+/*N*/ {
+/*N*/ mpObjectItemSet->Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
+/*N*/ mpObjectItemSet->Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
+/*N*/ mpObjectItemSet->Put(SvxAdjustItem(SVX_ADJUST_CENTER));
+/*N*/ }
+/*N*/
+/*N*/ if (bTextFrame && pOutlinerParaObject!=NULL)
+/*N*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/
+/*N*/ if ( pOutlinerParaObject &&
+/*N*/ pOutlinerParaObject->GetTextObject().GetVersion() < 500 &&
+/*N*/ !pOutlinerParaObject->IsEditDoc() )
+/*N*/ {
+/*N*/ pOutlinerParaObject->MergeParaAttribs( GetItemSet() );
+/*N*/ }
+/*N*/
+/*N*/ // #84529# correct gradient rotation for 5.2 and earlier
+/*N*/ if(aGeo.nDrehWink != 0 && rHead.GetVersion() <= 16)
+/*N*/ {
+/*N*/ XFillStyle eStyle = ((const XFillStyleItem&)GetItem(XATTR_FILLSTYLE)).GetValue();
+/*N*/ if(XFILL_GRADIENT == eStyle)
+/*N*/ {
+/*N*/ XFillGradientItem aItem = (XFillGradientItem&)GetItem(XATTR_FILLGRADIENT);
+/*N*/ XGradient aGradient = aItem.GetValue();
+/*N*/
+/*N*/ // calc new angle. aGeo.nDrehWink is 1/100th degree, aGradient.GetAngle()
+/*N*/ // is 1/10th degree. Match this.
+/*N*/ sal_Int32 nNewAngle = ((aGeo.nDrehWink + (aGradient.GetAngle() * 10)) + 5) / 10;
+/*N*/
+/*N*/ while(nNewAngle < 0)
+/*?*/ nNewAngle += 3600;
+/*N*/
+/*N*/ while(nNewAngle >= 3600)
+/*N*/ nNewAngle -= 3600;
+/*N*/
+/*N*/ // create new item and set
+/*N*/ aGradient.SetAngle(nNewAngle);
+/*N*/ aItem.SetValue(aGradient);
+/*N*/ SetItem(aItem);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ImpSetTextStyleSheetListeners();
+/*N*/ SetTextSizeDirty();
+/*N*/ ImpCheckMasterCachable();
+/*N*/ }
+
+
+
+/*N*/ SdrFitToSizeType SdrTextObj::GetFitToSize() const
+/*N*/ {
+/*N*/ SdrFitToSizeType eType = SDRTEXTFIT_NONE;
+/*N*/
+/*N*/ if(!IsAutoGrowWidth())
+/*N*/ eType = ((SdrTextFitToSizeTypeItem&)(GetItem(SDRATTR_TEXT_FITTOSIZE))).GetValue();
+/*N*/
+/*N*/ return eType;
+/*N*/ }
+
+/*N*/ void SdrTextObj::ForceOutlinerParaObject()
+/*N*/ {
+/*N*/ if( pOutlinerParaObject == NULL )
+/*N*/ {
+/*?*/ USHORT nOutlMode = OUTLINERMODE_TEXTOBJECT;
+/*?*/ if( IsTextFrame() && eTextKind == OBJ_OUTLINETEXT )
+/*?*/ nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+/*?*/
+/*?*/ Outliner* pOutliner = SdrMakeOutliner( nOutlMode, pModel );
+/*?*/ if( pOutliner )
+/*?*/ {
+/*?*/ Outliner& aDrawOutliner = pModel->GetDrawOutliner();
+/*?*/ pOutliner->SetCalcFieldValueHdl( aDrawOutliner.GetCalcFieldValueHdl() );
+/*?*/
+/*?*/ pOutliner->SetStyleSheet( 0, GetStyleSheet());
+/*?*/ OutlinerParaObject* pOutlinerParaObject = pOutliner->CreateParaObject();
+/*?*/ SetOutlinerParaObject( pOutlinerParaObject );
+/*?*/
+/*?*/ delete pOutliner;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrTextObj::IsVerticalWriting() const
+/*N*/ {
+/*N*/ // #89459#
+/*N*/ if(pOutlinerParaObject)
+/*N*/ return pOutlinerParaObject->IsVertical();
+/*N*/ if(pEdtOutl)
+/*?*/ return pEdtOutl->IsVertical();
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ void SdrTextObj::SetVerticalWriting( BOOL bVertical )
+/*N*/ {
+/*N*/ ForceOutlinerParaObject();
+/*N*/
+/*N*/ DBG_ASSERT( pOutlinerParaObject, "SdrTextObj::SetVerticalWriting() without OutlinerParaObject!" );
+/*N*/ if( pOutlinerParaObject )
+/*N*/ {
+/*N*/ if(pOutlinerParaObject->IsVertical() != bVertical)
+/*N*/ {
+/*?*/ // get item settings
+/*?*/ const SfxItemSet& rSet = GetItemSet();
+/*?*/ sal_Bool bAutoGrowWidth = ((SdrTextAutoGrowWidthItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue();
+/*?*/ sal_Bool bAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+/*?*/
+/*?*/ // #103516# Also exchange hor/ver adjust items
+/*?*/ SdrTextHorzAdjust eHorz = ((SdrTextHorzAdjustItem&)(rSet.Get(SDRATTR_TEXT_HORZADJUST))).GetValue();
+/*?*/ SdrTextVertAdjust eVert = ((SdrTextVertAdjustItem&)(rSet.Get(SDRATTR_TEXT_VERTADJUST))).GetValue();
+/*?*/
+/*?*/ // rescue object size
+/*?*/ Rectangle aObjectRect = GetSnapRect();
+/*?*/
+/*?*/ // prepare ItemSet to set exchanged width and height items
+/*?*/ SfxItemSet aNewSet(*rSet.GetPool(),
+/*?*/ SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+/*?*/ // #103516# Expanded item ranges to also support hor and ver adjust.
+/*?*/ SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
+/*?*/ SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST,
+/*?*/ 0, 0);
+/*?*/
+/*?*/ aNewSet.Put(rSet);
+/*?*/ aNewSet.Put(SdrTextAutoGrowWidthItem(bAutoGrowHeight));
+/*?*/ aNewSet.Put(SdrTextAutoGrowHeightItem(bAutoGrowWidth));
+/*?*/
+/*?*/ // #103516# Exchange horz and vert adjusts
+/*?*/ switch(eVert)
+/*?*/ {
+/*?*/ case SDRTEXTVERTADJUST_TOP: aNewSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); break;
+/*?*/ case SDRTEXTVERTADJUST_CENTER: aNewSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER)); break;
+/*?*/ case SDRTEXTVERTADJUST_BOTTOM: aNewSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_LEFT)); break;
+/*?*/ case SDRTEXTVERTADJUST_BLOCK: aNewSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK)); break;
+/*?*/ }
+/*?*/ switch(eHorz)
+/*?*/ {
+/*?*/ case SDRTEXTHORZADJUST_LEFT: aNewSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_BOTTOM)); break;
+/*?*/ case SDRTEXTHORZADJUST_CENTER: aNewSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER)); break;
+/*?*/ case SDRTEXTHORZADJUST_RIGHT: aNewSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); break;
+/*?*/ case SDRTEXTHORZADJUST_BLOCK: aNewSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_BLOCK)); break;
+/*?*/ }
+/*?*/
+/*?*/ SetItemSet(aNewSet);
+/*?*/
+/*?*/ // set ParaObject orientation accordingly
+/*?*/ pOutlinerParaObject->SetVertical(bVertical);
+/*?*/
+/*?*/ // restore object size
+/*?*/ SetSnapRect(aObjectRect);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// transformation interface for StarOfficeAPI. This implements support for
+// homogen 3x3 matrices containing the transformation of the SdrObject. At the
+// moment it contains a shearX, rotation and translation, but for setting all linear
+// transforms like Scale, ShearX, ShearY, Rotate and Translate are supported.
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// gets base transformation and rectangle of object. If it's an SdrPathObj it fills the PolyPolygon
+// with the base geometry and returns TRUE. Otherwise it returns FALSE.
+/*N*/ BOOL SdrTextObj::TRGetBaseGeometry(Matrix3D& rMat, XPolyPolygon& rPolyPolygon) const
+/*N*/ {
+/*N*/ // get turn and shear
+/*N*/ double fRotate = (aGeo.nDrehWink / 100.0) * F_PI180;
+/*N*/ double fShear = (aGeo.nShearWink / 100.0) * F_PI180;
+/*N*/
+/*N*/ // get aRect, this is the unrotated snaprect
+/*N*/ Rectangle aRectangle(aRect);
+/*N*/
+/*N*/ // fill other values
+/*N*/ Vector2D aScale((double)aRectangle.GetWidth(), (double)aRectangle.GetHeight());
+/*N*/ Vector2D aTranslate((double)aRectangle.Left(), (double)aRectangle.Top());
+/*N*/
+/*N*/ // position maybe relative to anchorpos, convert
+/*N*/ if( pModel->IsWriter() )
+/*N*/ {
+/*N*/ if(GetAnchorPos().X() != 0 || GetAnchorPos().Y() != 0)
+/*N*/ aTranslate -= Vector2D(GetAnchorPos().X(), GetAnchorPos().Y());
+/*N*/ }
+/*N*/
+/*N*/ // force MapUnit to 100th mm
+/*N*/ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+/*N*/ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+/*N*/ {
+/*N*/ switch(eMapUnit)
+/*N*/ {
+/*N*/ case SFX_MAPUNIT_TWIP :
+/*N*/ {
+/*N*/ // position
+/*N*/ // #104018#
+/*N*/ aTranslate.X() = ImplTwipsToMM(aTranslate.X());
+/*N*/ aTranslate.Y() = ImplTwipsToMM(aTranslate.Y());
+/*N*/
+/*N*/ // size
+/*N*/ // #104018#
+/*N*/ aScale.X() = ImplTwipsToMM(aScale.X());
+/*N*/ aScale.Y() = ImplTwipsToMM(aScale.Y());
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ default:
+/*N*/ {
+/*N*/ DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!");
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // build matrix
+/*N*/ rMat.Identity();
+/*N*/ if(aScale.X() != 1.0 || aScale.Y() != 1.0)
+/*N*/ rMat.Scale(aScale.X(), aScale.Y());
+/*N*/ if(fShear != 0.0)
+/*N*/ rMat.ShearX(tan(fShear));
+/*N*/ if(fRotate != 0.0)
+/*N*/ rMat.Rotate(fRotate);
+/*N*/ if(aTranslate.X() != 0.0 || aTranslate.Y() != 0.0)
+/*N*/ rMat.Translate(aTranslate.X(), aTranslate.Y());
+/*N*/
+/*N*/ return FALSE;
+/*N*/ }
+
+// sets the base geometry of the object using infos contained in the homogen 3x3 matrix.
+// If it's an SdrPathObj it will use the provided geometry information. The Polygon has
+// to use (0,0) as upper left and will be scaled to the given size in the matrix.
+/*N*/ void SdrTextObj::TRSetBaseGeometry(const Matrix3D& rMat, const XPolyPolygon& rPolyPolygon)
+/*N*/ {
+/*N*/ // break up matrix
+/*N*/ Vector2D aScale, aTranslate;
+/*N*/ double fShear, fRotate;
+/*N*/ rMat.DecomposeAndCorrect(aScale, fShear, fRotate, aTranslate);
+/*N*/
+/*N*/ // reset object shear and rotations
+/*N*/ aGeo.nDrehWink = 0;
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ aGeo.nShearWink = 0;
+/*N*/ aGeo.RecalcTan();
+/*N*/
+/*N*/ // force metric to pool metric
+/*N*/ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+/*N*/ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+/*N*/ {
+/*N*/ switch(eMapUnit)
+/*N*/ {
+/*N*/ case SFX_MAPUNIT_TWIP :
+/*N*/ {
+/*N*/ // position
+/*N*/ // #104018#
+/*N*/ aTranslate.X() = ImplMMToTwips(aTranslate.X());
+/*N*/ aTranslate.Y() = ImplMMToTwips(aTranslate.Y());
+/*N*/
+/*N*/ // size
+/*N*/ // #104018#
+/*N*/ aScale.X() = ImplMMToTwips(aScale.X());
+/*N*/ aScale.Y() = ImplMMToTwips(aScale.Y());
+/*N*/
+/*N*/ break;
+/*N*/ }
+/*N*/ default:
+/*N*/ {
+/*N*/ DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!");
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // if anchor is used, make position relative to it
+/*N*/ if( pModel->IsWriter() )
+/*N*/ {
+/*N*/ if(GetAnchorPos().X() != 0 || GetAnchorPos().Y() != 0)
+/*N*/ aTranslate += Vector2D(GetAnchorPos().X(), GetAnchorPos().Y());
+/*N*/ }
+/*N*/
+/*N*/ // build and set BaseRect (use scale)
+/*N*/ Point aPoint = Point();
+/*N*/ Size aSize(FRound(aScale.X()), FRound(aScale.Y()));
+/*N*/ Rectangle aBaseRect(aPoint, aSize);
+/*N*/ SetSnapRect(aBaseRect);
+/*N*/
+/*N*/ // shear?
+/*N*/ if(fShear != 0.0)
+/*N*/ {
+/*N*/ GeoStat aGeoStat;
+/*N*/ aGeoStat.nShearWink = FRound((atan(fShear) / F_PI180) * 100.0);
+/*N*/ aGeoStat.RecalcTan();
+/*N*/ Shear(Point(), aGeoStat.nShearWink, aGeoStat.nTan, FALSE);
+/*N*/ }
+/*N*/
+/*N*/ // rotation?
+/*N*/ if(fRotate != 0.0)
+/*N*/ {
+/*N*/ GeoStat aGeoStat;
+/*N*/ aGeoStat.nDrehWink = FRound((fRotate / F_PI180) * 100.0);
+/*N*/ aGeoStat.RecalcSinCos();
+/*N*/ Rotate(Point(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
+/*N*/ }
+/*N*/
+/*N*/ // translate?
+/*N*/ if(aTranslate.X() != 0.0 || aTranslate.Y() != 0.0)
+/*N*/ {
+/*N*/ Move(Size(
+/*N*/ (sal_Int32)FRound(aTranslate.X()),
+/*N*/ (sal_Int32)FRound(aTranslate.Y())));
+/*N*/ }
+/*N*/ }
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// 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...
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxat.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxat.cxx
new file mode 100644
index 000000000000..8eddd194e4ef
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotxat.cxx
@@ -0,0 +1,522 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svditext.hxx"
+#include "svdmodel.hxx" // fuer GetMaxObjSize und GetStyleSheetPool
+#include "svdoutl.hxx"
+#include "svdocapt.hxx" // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight
+#include "writingmodeitem.hxx"
+#include "eeitem.hxx"
+
+
+#include "itemdata.hxx"
+
+
+
+
+#include <bf_svtools/smplhint.hxx>
+
+
+#include <outlobj.hxx>
+
+
+#include "eeitem.hxx"
+
+#include <editobj.hxx>
+
+#include "fhgtitem.hxx"
+
+#include <charscaleitem.hxx>
+
+#include <bf_svtools/style.hxx>
+
+#include <bf_svtools/itemiter.hxx>
+
+#define ITEMID_LRSPACE EE_PARA_LRSPACE
+
+
+
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// Attribute, StyleSheets und AutoGrow
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void __EXPORT SdrTextObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ SdrAttrObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+/*N*/ if (pOutlinerParaObject!=NULL)
+/*N*/ {
+/*N*/ if (HAS_BASE(SfxStyleSheet, &rBC))
+/*N*/ {
+/*N*/ SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint);
+/*N*/ ULONG nId=pSimple==NULL ? 0 : pSimple->GetId();
+/*N*/ if (nId==SFX_HINT_DATACHANGED)
+/*N*/ {
+/*N*/ bPortionInfoChecked=FALSE;
+/*N*/ pOutlinerParaObject->ClearPortionInfo();
+/*N*/ SetTextSizeDirty();
+/*N*/ if (bTextFrame && NbcAdjustTextFrameWidthAndHeight())
+/*N*/ {
+/*?*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ }
+/*N*/ if (nId==SFX_HINT_DYING)
+/*N*/ {
+/*?*/ bPortionInfoChecked=FALSE;
+/*?*/ pOutlinerParaObject->ClearPortionInfo();
+/*N*/ }
+/*N*/ }
+/*N*/ else if (HAS_BASE(SfxStyleSheetBasePool, &rBC))
+/*N*/ {
+/*N*/ SfxStyleSheetHintExtended* pExtendedHint = PTR_CAST(SfxStyleSheetHintExtended, &rHint);
+/*N*/
+/*N*/ if (pExtendedHint && pExtendedHint->GetHint() == SFX_STYLESHEET_MODIFIED)
+/*N*/ {
+/*N*/ String aOldName(pExtendedHint->GetOldName());
+/*N*/ String aNewName(pExtendedHint->GetStyleSheet()->GetName());
+/*N*/ SfxStyleFamily eFamily = pExtendedHint->GetStyleSheet()->GetFamily();
+/*N*/
+/*N*/ if(!aOldName.Equals(aNewName))
+/*N*/ pOutlinerParaObject->ChangeStyleSheetName(eFamily, aOldName, aNewName);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ SdrAttrObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/
+/*N*/ if ( pOutlinerParaObject && !pEdtOutl && !IsLinkedText() )
+/*N*/ {
+/*N*/ // StyleSheet auf alle Absaetze anwenden
+/*N*/ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+/*N*/ rOutliner.SetText(*pOutlinerParaObject);
+/*N*/ USHORT nParaCount=(USHORT)rOutliner.GetParagraphCount();
+/*N*/ if (nParaCount!=0)
+/*N*/ {
+/*N*/ SfxItemSet* pTempSet;
+/*N*/ for (USHORT nPara=0; nPara<nParaCount; nPara++)
+/*N*/ {
+/*N*/ // since setting the stylesheet removes all para attributes
+/*N*/ if( bDontRemoveHardAttr )
+/*N*/ {
+/*N*/ // we need to remember them if we want to keep them
+/*N*/ pTempSet = new SfxItemSet( rOutliner.GetParaAttribs( nPara ) );
+/*N*/ }
+/*N*/
+/*N*/ if ( GetStyleSheet() )
+/*N*/ {
+/*N*/ if( eTextKind == OBJ_OUTLINETEXT && GetObjInventor() == SdrInventor )
+/*N*/ {
+/*N*/ String aNewStyleSheetName( GetStyleSheet()->GetName() );
+/*N*/ aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
+/*N*/ aNewStyleSheetName += String::CreateFromInt32( rOutliner.GetDepth( nPara ) );
+/*N*/
+/*N*/ SfxStyleSheetBasePool* pStylePool = pModel!=NULL ? pModel->GetStyleSheetPool() : NULL;
+/*N*/ SfxStyleSheet* pNewStyle = (SfxStyleSheet*) pStylePool->Find( aNewStyleSheetName, GetStyleSheet()->GetFamily() );
+/*N*/ DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
+/*N*/ if ( pNewStyle )
+/*N*/ rOutliner.SetStyleSheet( nPara, pNewStyle );
+/*N*/ }
+/*N*/ else
+/*N*/ rOutliner.SetStyleSheet( nPara, GetStyleSheet() );
+/*N*/ }
+/*N*/ else
+/*N*/ rOutliner.SetStyleSheet( nPara, NULL ); // StyleSheet entfernen
+/*N*/
+/*N*/ if( bDontRemoveHardAttr )
+/*N*/ {
+/*N*/ // restore para attributes
+/*N*/ rOutliner.SetParaAttribs( nPara, *pTempSet );
+/*N*/ delete pTempSet;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(pNewStyleSheet!=NULL)
+/*N*/ {
+/*N*/ // Harte Absatz-Attributierung aller im
+/*N*/ // StyleSheet vorhandenen Items entfernen
+/*N*/ // -> Parents beruecksichtigen !!!
+/*N*/ SfxItemIter aIter(pNewStyleSheet->GetItemSet());
+/*N*/ const SfxPoolItem* pItem=aIter.FirstItem();
+/*N*/ while (pItem!=NULL) {
+/*N*/ if (!IsInvalidItem(pItem)) {
+/*N*/ USHORT nW=pItem->Which();
+/*N*/ if (nW>=EE_ITEMS_START && nW<=EE_ITEMS_END) {
+/*N*/ // gibts noch nicht, baut Malte aber ein:
+/*N*/ rOutliner.QuickRemoveCharAttribs(nPara,nW);
+/*N*/ }
+/*N*/ }
+/*N*/ pItem=aIter.NextItem();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ OutlinerParaObject* pTemp=rOutliner.CreateParaObject( 0, nParaCount );
+/*N*/ rOutliner.Clear();
+/*N*/ NbcSetOutlinerParaObject(pTemp);
+/*N*/ }
+/*N*/ }
+/*N*/ if (bTextFrame) {
+/*N*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+/*N*/ void SdrTextObj::ItemSetChanged(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ // handle outliner attributes
+/*N*/ ImpForceItemSet();
+/*N*/
+/*N*/ if(pOutlinerParaObject)
+/*N*/ {
+/*N*/ Outliner* pOutliner;
+/*N*/
+/*N*/ if(!pEdtOutl)
+/*N*/ {
+/*N*/ pOutliner = &ImpGetDrawOutliner();
+/*N*/ pOutliner->SetText(*pOutlinerParaObject);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ pOutliner = pEdtOutl;
+/*N*/ }
+/*N*/
+/*N*/ sal_uInt16 nParaCount((sal_uInt16)pOutliner->GetParagraphCount());
+/*N*/ for(sal_uInt16 nPara(0); nPara < nParaCount; nPara++)
+/*N*/ {
+/*N*/ SfxItemSet aSet( pOutliner->GetParaAttribs(nPara) );
+/*N*/ aSet.Put( rSet );
+/*N*/ pOutliner->SetParaAttribs(nPara, aSet);
+/*N*/ }
+/*N*/
+/*N*/ if(!pEdtOutl)
+/*N*/ {
+/*N*/ if(nParaCount)
+/*N*/ {
+/*N*/ SfxItemSet aNewSet(pOutliner->GetParaAttribs(0));
+/*N*/ mpObjectItemSet->Put(aNewSet);
+/*N*/ }
+/*N*/
+/*N*/ OutlinerParaObject* pTemp = pOutliner->CreateParaObject(0, nParaCount);
+/*N*/ pOutliner->Clear();
+/*N*/ NbcSetOutlinerParaObject(pTemp);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Extra-Repaint wenn das Layout so radikal geaendert wird (#43139#)
+/*N*/ if(SFX_ITEM_SET == mpObjectItemSet->GetItemState(SDRATTR_TEXT_CONTOURFRAME))
+/*N*/ SendRepaintBroadcast();
+/*N*/
+/*N*/ // call parent
+/*N*/ SdrAttrObj::ItemSetChanged(rSet);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrTextObj::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
+/*N*/ {
+/*N*/ if( pNewItem && nWhich == SDRATTR_TEXTDIRECTION )
+/*N*/ {
+/*N*/ bool bVertical = ( (SvxWritingModeItem*) pNewItem )->GetValue() == ::com::sun::star::text::WritingMode_TB_RL;
+/*N*/
+/*N*/ if( bVertical || pOutlinerParaObject )
+/*N*/ {
+/*N*/ SetVerticalWriting( bVertical );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // #95501# reset to default
+/*N*/ if(!pNewItem && !nWhich && pOutlinerParaObject)
+/*N*/ {
+/*?*/ SdrOutliner& rOutliner = ImpGetDrawOutliner();
+/*?*/ rOutliner.SetText(*pOutlinerParaObject);
+/*?*/ sal_uInt16 nParaCount(sal_uInt16(rOutliner.GetParagraphCount()));
+/*?*/
+/*?*/ if(nParaCount)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ESelection aSelection( 0, 0, EE_PARA_ALL, EE_PARA_ALL);
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ SdrAttrObj::ItemChange( nWhich, pNewItem );
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const
+/*N*/ {
+/*N*/ if (bTextFrame && pModel!=NULL && !rR.IsEmpty()) {
+/*N*/ SdrFitToSizeType eFit=GetFitToSize();
+/*N*/ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+/*N*/ FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth();
+/*N*/ FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight();
+/*N*/ SdrTextAniKind eAniKind=GetTextAniKind();
+/*N*/ SdrTextAniDirection eAniDir=GetTextAniDirection();
+/*N*/ FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE;
+/*N*/ FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT);
+/*N*/ FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN);
+/*N*/ if (!bFitToSize && (bWdtGrow || bHgtGrow)) {
+/*N*/ Rectangle aR0(rR);
+/*N*/ long nHgt=0,nMinHgt=0,nMaxHgt=0;
+/*N*/ long nWdt=0,nMinWdt=0,nMaxWdt=0;
+/*N*/ Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--;
+/*N*/ Size aMaxSiz(100000,100000);
+/*N*/ Size aTmpSiz(pModel->GetMaxObjSize());
+/*N*/ if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
+/*N*/ if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
+/*N*/ if (bWdtGrow) {
+/*N*/ nMinWdt=GetMinTextFrameWidth();
+/*N*/ nMaxWdt=GetMaxTextFrameWidth();
+/*N*/ if (nMaxWdt==0 || nMaxWdt>aMaxSiz.Width()) nMaxWdt=aMaxSiz.Width();
+/*N*/ if (nMinWdt<=0) nMinWdt=1;
+/*N*/ aSiz.Width()=nMaxWdt;
+/*N*/ }
+/*N*/ if (bHgtGrow) {
+/*N*/ nMinHgt=GetMinTextFrameHeight();
+/*N*/ nMaxHgt=GetMaxTextFrameHeight();
+/*N*/ if (nMaxHgt==0 || nMaxHgt>aMaxSiz.Height()) nMaxHgt=aMaxSiz.Height();
+/*N*/ if (nMinHgt<=0) nMinHgt=1;
+/*N*/ aSiz.Height()=nMaxHgt;
+/*N*/ }
+/*N*/ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+/*N*/ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+/*N*/ aSiz.Width()-=nHDist;
+/*N*/ aSiz.Height()-=nVDist;
+/*N*/ if (aSiz.Width()<2) aSiz.Width()=2; // Mindestgroesse 2
+/*N*/ if (aSiz.Height()<2) aSiz.Height()=2; // Mindestgroesse 2
+/*N*/
+/*N*/ // #101684#
+/*N*/ BOOL bInEditMode = IsInEditMode();
+/*N*/
+/*N*/ if(!bInEditMode)
+/*N*/ {
+/*N*/ if (bHScroll) aSiz.Width()=0x0FFFFFFF; // Laufschrift nicht umbrechen
+/*N*/ if (bVScroll) aSiz.Height()=0x0FFFFFFF;
+/*N*/ }
+/*N*/
+/*N*/ if(pEdtOutl)
+/*N*/ {
+/*?*/ 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
+/*?*/ }
+/*N*/ } else {
+/*N*/ Outliner& rOutliner=ImpGetDrawOutliner();
+/*N*/ rOutliner.SetPaperSize(aSiz);
+/*N*/ rOutliner.SetUpdateMode(TRUE);
+/*N*/ // !!! hier sollte ich wohl auch noch mal die Optimierung mit
+/*N*/ // bPortionInfoChecked usw einbauen
+/*N*/ if (pOutlinerParaObject!=NULL) rOutliner.SetText(*pOutlinerParaObject);
+/*N*/ if (bWdtGrow) {
+/*N*/ Size aSiz(rOutliner.CalcTextSize());
+/*N*/ nWdt=aSiz.Width()+1; // lieber etwas Tolleranz
+/*N*/ if (bHgtGrow) nHgt=aSiz.Height()+1; // lieber etwas Tolleranz
+/*N*/ } else {
+/*N*/ nHgt=rOutliner.GetTextHeight()+1; // lieber etwas Tolleranz
+/*N*/ }
+/*N*/ rOutliner.Clear();
+/*N*/ }
+/*N*/ if (nWdt<nMinWdt) nWdt=nMinWdt;
+/*N*/ if (nWdt>nMaxWdt) nWdt=nMaxWdt;
+/*N*/ nWdt+=nHDist;
+/*N*/ if (nWdt<1) nWdt=1; // nHDist kann auch negativ sein
+/*N*/ if (nHgt<nMinHgt) nHgt=nMinHgt;
+/*N*/ if (nHgt>nMaxHgt) nHgt=nMaxHgt;
+/*N*/ nHgt+=nVDist;
+/*N*/ if (nHgt<1) nHgt=1; // nVDist kann auch negativ sein
+/*N*/ long nWdtGrow=nWdt-(rR.Right()-rR.Left());
+/*N*/ long nHgtGrow=nHgt-(rR.Bottom()-rR.Top());
+/*N*/ if (nWdtGrow==0) bWdtGrow=FALSE;
+/*N*/ if (nHgtGrow==0) bHgtGrow=FALSE;
+/*N*/ if (bWdtGrow || bHgtGrow) {
+/*N*/ if (bWdtGrow) {
+/*N*/ SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
+/*N*/ if (eHAdj==SDRTEXTHORZADJUST_LEFT) rR.Right()+=nWdtGrow;
+/*N*/ else if (eHAdj==SDRTEXTHORZADJUST_RIGHT) rR.Left()-=nWdtGrow;
+/*N*/ else {
+/*N*/ long nWdtGrow2=nWdtGrow/2;
+/*N*/ rR.Left()-=nWdtGrow2;
+/*N*/ rR.Right()=rR.Left()+nWdt;
+/*N*/ }
+/*N*/ }
+/*N*/ if (bHgtGrow) {
+/*N*/ SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
+/*N*/ if (eVAdj==SDRTEXTVERTADJUST_TOP) rR.Bottom()+=nHgtGrow;
+/*N*/ else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) rR.Top()-=nHgtGrow;
+/*N*/ else {
+/*N*/ long nHgtGrow2=nHgtGrow/2;
+/*N*/ rR.Top()-=nHgtGrow2;
+/*N*/ rR.Bottom()=rR.Top()+nHgt;
+/*N*/ }
+/*N*/ }
+/*N*/ if (aGeo.nDrehWink!=0) {
+/*N*/ Point aD1(rR.TopLeft());
+/*N*/ aD1-=aR0.TopLeft();
+/*N*/ Point aD2(aD1);
+/*N*/ RotatePoint(aD2,Point(),aGeo.nSin,aGeo.nCos);
+/*N*/ aD2-=aD1;
+/*N*/ rR.Move(aD2.X(),aD2.Y());
+/*N*/ }
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt)
+/*N*/ {
+/*N*/ FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt);
+/*N*/ if (bRet) {
+/*N*/ SetRectsDirty();
+/*N*/ if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack
+/*N*/ ((SdrRectObj*)this)->SetXPolyDirty();
+/*N*/ }
+/*N*/ if (HAS_BASE(SdrCaptionObj,this)) { // mal wieder 'nen Hack
+/*N*/ ((SdrCaptionObj*)this)->ImpRecalcTail();
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+
+/*N*/ void SdrTextObj::ImpSetTextStyleSheetListeners()
+/*N*/ {
+/*N*/ SfxStyleSheetBasePool* pStylePool=pModel!=NULL ? pModel->GetStyleSheetPool() : NULL;
+/*N*/ if (pStylePool!=NULL) {
+/*N*/ Container aStyles(1024,64,64);
+/*N*/ if (pOutlinerParaObject!=NULL) {
+/*N*/ // Zunaechst werden alle im ParaObject enthaltenen StyleSheets
+/*N*/ // im Container aStyles gesammelt. Dazu wird die Family jeweils
+/*N*/ // ans Ende des StyleSheet-Namen drangehaengt.
+/*N*/ const EditTextObject& rTextObj=pOutlinerParaObject->GetTextObject();
+/*N*/ XubString aStyleName;
+/*N*/ SfxStyleFamily eStyleFam;
+/*N*/ USHORT nParaAnz=rTextObj.GetParagraphCount();
+/*N*/
+/*N*/ for(UINT16 nParaNum(0); nParaNum < nParaAnz; nParaNum++)
+/*N*/ {
+/*N*/ rTextObj.GetStyleSheet(nParaNum, aStyleName, eStyleFam);
+/*N*/
+/*N*/ if(aStyleName.Len())
+/*N*/ {
+/*N*/ XubString aFam = UniString::CreateFromInt32((UINT16)eStyleFam);
+/*N*/ aFam.Expand(5);
+/*N*/
+/*N*/ aStyleName += sal_Unicode('|');
+/*N*/ aStyleName += aFam;
+/*N*/
+/*N*/ BOOL bFnd(FALSE);
+/*N*/ UINT32 nNum(aStyles.Count());
+/*N*/
+/*N*/ while(!bFnd && nNum > 0)
+/*N*/ {
+/*N*/ // kein StyleSheet doppelt!
+/*N*/ nNum--;
+/*N*/ bFnd = (aStyleName.Equals(*(XubString*)aStyles.GetObject(nNum)));
+/*N*/ }
+/*N*/
+/*N*/ if(!bFnd)
+/*N*/ {
+/*N*/ aStyles.Insert(new XubString(aStyleName), CONTAINER_APPEND);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // nun die Strings im Container durch StyleSheet* ersetzten
+/*N*/ ULONG nNum=aStyles.Count();
+/*N*/ while (nNum>0) {
+/*N*/ nNum--;
+/*N*/ XubString* pName=(XubString*)aStyles.GetObject(nNum);
+/*N*/
+/*N*/ // UNICODE: String aFam(pName->Cut(pName->Len()-6));
+/*N*/ String aFam = pName->Copy(0, pName->Len() - 6);
+/*N*/
+/*N*/ aFam.Erase(0,1);
+/*N*/ aFam.EraseTrailingChars();
+/*N*/
+/*N*/ // UNICODE: USHORT nFam=USHORT(aFam);
+/*N*/ UINT16 nFam = (UINT16)aFam.ToInt32();
+/*N*/
+/*N*/ SfxStyleFamily eFam=(SfxStyleFamily)nFam;
+/*N*/ SfxStyleSheetBase* pStyleBase=pStylePool->Find(*pName,eFam);
+/*N*/ SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pStyleBase);
+/*N*/ delete pName;
+/*N*/ if (pStyle!=NULL && pStyle!=GetStyleSheet()) {
+/*?*/ aStyles.Replace(pStyle,nNum);
+/*N*/ } else {
+/*N*/ aStyles.Remove(nNum);
+/*N*/ }
+/*N*/ }
+/*N*/ // jetzt alle ueberfluessigen StyleSheets entfernen
+/*N*/ nNum=GetBroadcasterCount();
+/*N*/ while (nNum>0) {
+/*N*/ nNum--;
+/*N*/ SfxBroadcaster* pBroadcast=GetBroadcasterJOE((USHORT)nNum);
+/*N*/ SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pBroadcast);
+/*N*/ if (pStyle!=NULL && pStyle!=GetStyleSheet()) { // Sonderbehandlung fuer den StyleSheet des Objekts
+/*N*/ if (aStyles.GetPos(pStyle)==CONTAINER_ENTRY_NOTFOUND) {
+/*N*/ EndListening(*pStyle);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ // und schliesslich alle in aStyles enthaltenen StyleSheets mit den vorhandenen Broadcastern mergen
+/*N*/ nNum=aStyles.Count();
+/*N*/ while (nNum>0) {
+/*N*/ nNum--;
+/*N*/ SfxStyleSheet* pStyle=(SfxStyleSheet*)aStyles.GetObject(nNum);
+/*N*/ // StartListening soll selbst nachsehen, ob hier nicht evtl. schon gehorcht wird
+/*N*/ StartListening(*pStyle,TRUE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxed.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxed.cxx
new file mode 100644
index 000000000000..5bca1ed45cc8
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotxed.cxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdotext.hxx"
+
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// TextEdit
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ FASTBOOL SdrTextObj::HasTextEdit() const
+/*N*/ {
+/*N*/ // lt. Anweisung von MB duerfen gelinkte Textobjekte nun doch
+/*N*/ // geaendert werden (kein automatisches Reload)
+/*N*/ return TRUE;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001
+/*N*/ }
+
+
+/*N*/ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ SdrObject* SdrTextObj::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+/*N*/ {
+/*N*/ return SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer);
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxfl.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxfl.cxx
new file mode 100644
index 000000000000..781f73da2530
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotxfl.cxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <eeitem.hxx>
+
+
+#include "itemdata.hxx"
+
+#include <bf_svtools/poolitem.hxx>
+
+#include <tools/date.hxx>
+
+#include <tools/time.hxx>
+
+#include "svdfield.hxx"
+#include "svdotext.hxx"
+namespace binfilter {
+
+// Do not remove this, it is still used in src536a!
+/*N*/ void SdrRegisterFieldClasses()
+/*N*/ {
+/*N*/ SvxFieldItem::GetClassManager().SV_CLASS_REGISTER(SdrMeasureField);
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////////////////////////////// */
+
+/*N*/ FASTBOOL SdrTextObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+/*N*/ FASTBOOL bEdit, Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx
new file mode 100644
index 000000000000..e4f481b6e1bc
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx
@@ -0,0 +1,308 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#include "svdotext.hxx"
+#include "svdmodel.hxx"
+#include "svdio.hxx"
+
+#ifndef SVX_LIGHT
+#include <bf_so3/lnkbase.hxx>
+#endif
+
+#include <linkmgr.hxx>
+
+
+#include <bf_svtools/urihelper.hxx>
+
+// #90477#
+#include <tools/tenccvt.hxx>
+#include "bf_so3/staticbaseurl.hxx"
+namespace binfilter {
+
+#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 ::binfilter::SvBaseLink
+/*?*/ {
+/*?*/ SdrTextObj* pSdrObj;
+/*?*/
+/*?*/ public:
+/*?*/ ImpSdrObjTextLink( SdrTextObj* pObj1 )
+/*?*/ : ::binfilter::SvBaseLink( ::binfilter::LINKUPDATE_ONCALL, FORMAT_FILE ),
+/*?*/ pSdrObj( pObj1 )
+/*?*/ {}
+/*?*/ virtual ~ImpSdrObjTextLink();
+/*?*/
+/*?*/ virtual void Closed();
+/*?*/ virtual void DataChanged( const String& rMimeType,
+/*?*/ const ::com::sun::star::uno::Any & rValue );
+/*?*/
+/*?*/ BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+/*?*/ };
+
+/*?*/ ImpSdrObjTextLink::~ImpSdrObjTextLink()
+/*?*/ {
+/*?*/ }
+
+/*?*/ void ImpSdrObjTextLink::Closed()
+/*?*/ {
+/*?*/ if (pSdrObj )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ SvBaseLink::Closed();
+/*?*/ }
+
+
+/*?*/ void ImpSdrObjTextLink::DataChanged( const String& rMimeType,
+/*?*/ const ::com::sun::star::uno::Any & rValue )
+/*?*/ {
+/*?*/ FASTBOOL bForceReload=FALSE;
+/*?*/ SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0;
+/*?*/ SvxLinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
+/*?*/ if( pLinkManager )
+/*?*/ {
+/*?*/ ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
+/*?*/ if( pData )
+/*?*/ {
+/*?*/ String aFile;
+/*?*/ String aFilter;
+/*?*/ pLinkManager->GetDisplayNames( this, 0,&aFile, 0, &aFilter );
+/*?*/
+/*?*/ if( !pData->aFileName.Equals( aFile ) ||
+/*?*/ !pData->aFilterName.Equals( aFilter ))
+/*?*/ {
+/*?*/ pData->aFileName = aFile;
+/*?*/ pData->aFilterName = aFilter;
+/*?*/ pSdrObj->SetChanged();
+/*?*/ bForceReload = TRUE;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ if (pSdrObj )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 pSdrObj->ReloadLinkedText( bForceReload );
+/*?*/ }
+#endif // SVX_LIGHT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@
+// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@ @@ @@ @@@@@@ @@ @@@@@@
+// @@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@ @@ @@ @@ @@@@ @@@@@ @@@@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(ImpSdrObjTextLinkUserData,SdrObjUserData);
+
+/*N*/ ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData(SdrTextObj* pObj1):
+/*N*/ SdrObjUserData(SdrInventor,SDRUSERDATA_OBJTEXTLINK,0),
+/*N*/ pObj(pObj1),
+/*N*/ pLink(NULL),
+/*N*/ eCharSet(RTL_TEXTENCODING_DONTKNOW)
+/*N*/ {
+/*N*/ }
+
+/*N*/ ImpSdrObjTextLinkUserData::~ImpSdrObjTextLinkUserData()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 delete pLink;
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ SdrObjUserData* ImpSdrObjTextLinkUserData::Clone(SdrObject* pObj1) const
+/*N*/ {
+/*N*/ ImpSdrObjTextLinkUserData* pData=new ImpSdrObjTextLinkUserData((SdrTextObj*)pObj1);
+/*N*/ pData->aFileName =aFileName;
+/*N*/ pData->aFilterName=aFilterName;
+/*N*/ pData->aFileDate0 =aFileDate0;
+/*N*/ pData->eCharSet =eCharSet;
+/*N*/ pData->pLink=NULL;
+/*N*/ return pData;
+/*N*/ }
+
+/*N*/ void ImpSdrObjTextLinkUserData::WriteData(SvStream& rOut)
+/*N*/ {
+/*N*/ SdrObjUserData::WriteData(rOut);
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("ImpSdrObjTextLinkUserData");
+/*N*/ #endif
+/*N*/
+/*N*/ String aRelFileName;
+/*N*/
+/*N*/ if( aFileName.Len() )
+/*N*/ {
+/*N*/ aRelFileName = ::binfilter::StaticBaseUrl::AbsToRel( aFileName,
+/*N*/ INetURLObject::WAS_ENCODED,
+/*N*/ INetURLObject::DECODE_UNAMBIGUOUS );
+/*N*/ }
+/*N*/
+/*N*/ rOut.WriteByteString( aRelFileName );
+/*N*/
+/*N*/ // UNICODE: rOut << aFilterName;
+/*N*/ rOut.WriteByteString(aFilterName);
+/*N*/
+/*N*/ // #90477# rOut << UINT16(GetStoreCharSet(eCharSet));
+/*N*/ rOut << UINT16(GetSOStoreTextEncoding(eCharSet, (sal_uInt16)rOut.GetVersion()));
+/*N*/
+/*N*/ rOut << UINT32(aFileDate0.GetDate());
+/*N*/ rOut << UINT32(aFileDate0.GetTime());
+/*N*/ }
+
+/*N*/ void ImpSdrObjTextLinkUserData::ReadData(SvStream& rIn)
+/*N*/ {
+/*N*/ SdrObjUserData::ReadData(rIn);
+/*N*/ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ);
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("ImpSdrObjTextLinkUserData");
+/*N*/ #endif
+/*N*/
+/*N*/ UINT32 nTmp32;
+/*N*/ UINT16 nTmp16;
+/*N*/ String aFileNameRel;
+/*N*/
+/*N*/ rIn.ReadByteString(aFileNameRel);
+/*N*/
+/*N*/ if( aFileNameRel.Len() )
+/*N*/ {
+/*N*/
+/*N*/ aFileName = ::binfilter::StaticBaseUrl::SmartRelToAbs( aFileNameRel, FALSE,
+/*N*/ INetURLObject::WAS_ENCODED,
+/*N*/ INetURLObject::DECODE_UNAMBIGUOUS );
+/*N*/ }
+/*N*/ else
+/*N*/ aFileName.Erase();
+/*N*/
+/*N*/ // UNICODE: rIn >> aFilterName;
+/*N*/ rIn.ReadByteString(aFilterName);
+/*N*/
+/*N*/ // #90477# rIn >> nTmp16; eCharSet = rtl_TextEncoding(nTmp16);
+/*N*/ rIn >> nTmp16;
+/*N*/ eCharSet = (rtl_TextEncoding)GetSOLoadTextEncoding((rtl_TextEncoding)nTmp16, (sal_uInt16)rIn.GetVersion());
+/*N*/
+/*N*/ rIn >> nTmp32; aFileDate0.SetDate(nTmp32);
+/*N*/ rIn >> nTmp32; aFileDate0.SetTime(nTmp32);
+/*N*/ }
+
+/*N*/ void ImpSdrObjTextLinkUserData::AfterRead()
+/*N*/ {
+/*N*/ if (pObj!=NULL) {
+/*N*/ pObj->ImpLinkAnmeldung();
+/*N*/ // lt. Anweisung von MB kein automatisches Reload mehr
+/*N*/ //pObj->ReloadLinkedText();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+/*N*/ ImpSdrObjTextLinkUserData* SdrTextObj::GetLinkUserData() const
+/*N*/ {
+/*N*/ ImpSdrObjTextLinkUserData* pData=NULL;
+/*N*/ USHORT nAnz=GetUserDataCount();
+/*N*/ for (USHORT nNum=nAnz; nNum>0 && pData==NULL;) {
+/*N*/ nNum--;
+/*N*/ pData=(ImpSdrObjTextLinkUserData*)GetUserData(nNum);
+/*N*/ if (pData->GetInventor()!=SdrInventor || pData->GetId()!=SDRUSERDATA_OBJTEXTLINK) {
+/*N*/ pData=NULL;
+/*N*/ }
+/*N*/ }
+/*N*/ return pData;
+/*N*/ }
+
+/*N*/ void SdrTextObj::ImpLinkAnmeldung()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
+/*N*/ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+/*N*/ if (pLinkManager!=NULL && pData!=NULL && pData->pLink==NULL) { // Nicht 2x Anmelden
+/*N*/ pData->pLink=new ImpSdrObjTextLink(this);
+/*N*/ #ifdef GCC
+/*N*/ pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,pData->aFileName,
+/*N*/ pData->aFilterName.Len() ?
+/*N*/ &pData->aFilterName : (const String *)NULL,
+/*N*/ (const String *)NULL);
+/*N*/ #else
+/*N*/ pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,pData->aFileName,
+/*N*/ pData->aFilterName.Len() ? &pData->aFilterName : NULL,NULL);
+/*N*/ #endif
+/*N*/ pData->pLink->Connect();
+/*N*/ }
+/*N*/ #endif // SVX_LIGHT
+/*N*/ }
+
+/*N*/ void SdrTextObj::ImpLinkAbmeldung()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
+/*N*/ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+/*N*/ if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // Nicht 2x Abmelden
+/*N*/ // Bei Remove wird *pLink implizit deleted
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pLinkManager->Remove( pData->pLink );
+/*N*/ }
+/*N*/ #endif // SVX_LIGHT
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxtr.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxtr.cxx
new file mode 100644
index 000000000000..5b43c2d38928
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotxtr.cxx
@@ -0,0 +1,339 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "xoutx.hxx" // fuer XOutCreatePolygon
+#include "svdopath.hxx"
+#include "svdtxhdl.hxx" // DrawTextToPath fuer Convert
+#include "svdmodel.hxx" // fuer Convert
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// Transformationen
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ 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(maSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0));
+/*?*/ SdrTextObj::NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top()));
+/*N*/ } else {
+/*N*/ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+/*N*/ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+/*N*/ long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0;
+/*N*/ long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0;
+/*N*/ long nTWdt1=rRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
+/*N*/ long nTHgt1=rRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
+/*N*/ aRect=rRect;
+/*N*/ ImpJustifyRect(aRect);
+/*N*/ if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
+/*N*/ if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
+/*N*/ if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
+/*N*/ if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ }
+/*N*/ ImpCheckShear();
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ }
+
+/*N*/ const Rectangle& SdrTextObj::GetLogicRect() const
+/*N*/ {
+/*N*/ return aRect;
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+/*N*/ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+/*N*/ long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0;
+/*N*/ long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0;
+/*N*/ long nTWdt1=rRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
+/*N*/ long nTHgt1=rRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
+/*N*/ aRect=rRect;
+/*N*/ ImpJustifyRect(aRect);
+/*N*/ if (bTextFrame) {
+/*N*/ if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
+/*N*/ if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
+/*N*/ if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ }
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*N*/ long SdrTextObj::GetRotateAngle() const
+/*N*/ {
+/*N*/ return aGeo.nDrehWink;
+/*N*/ }
+
+/*N*/ long SdrTextObj::GetShearAngle(FASTBOOL bVertical) const
+/*N*/ {
+/*N*/ return (aGeo.nDrehWink==0 || aGeo.nDrehWink==18000) ? aGeo.nShearWink : 0;
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcMove(const Size& rSiz)
+/*N*/ {
+/*N*/ MoveRect(aRect,rSiz);
+/*N*/ MoveRect(aOutRect,rSiz);
+/*N*/ MoveRect(maSnapRect,rSiz);
+/*N*/ SetRectsDirty(TRUE);
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ FASTBOOL bNoShearMerk=aGeo.nShearWink==0;
+/*N*/ FASTBOOL bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 9000 ==0;
+/*N*/ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+/*N*/ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+/*N*/ long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0;
+/*N*/ long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0;
+/*N*/ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+/*N*/ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+/*N*/ if (bXMirr || bYMirr) {
+/*N*/ Point aRef1(GetSnapRect().Center());
+/*N*/ if (bXMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.Y()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ if (bYMirr) {
+/*N*/ Point aRef2(aRef1);
+/*N*/ aRef2.X()++;
+/*N*/ NbcMirrorGluePoints(aRef1,aRef2);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (aGeo.nDrehWink==0 && aGeo.nShearWink==0) {
+/*N*/ ResizeRect(aRect,rRef,xFact,yFact);
+/*N*/ if (bYMirr) {
+/*N*/ aRect.Justify();
+/*N*/ aRect.Move(aRect.Right()-aRect.Left(),aRect.Bottom()-aRect.Top());
+/*N*/ aGeo.nDrehWink=18000;
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // #100663# aRect is NOT initialized for lines (polgon objects with two
+/*N*/ // exceptionally handled points). Thus, after this call the text rotaion is
+/*N*/ // gone. This error must be present since day one of this old drawing layer.
+/*N*/ // It's astonishing that noone discovered it earlier.
+/*N*/ // Polygon aPol(Rect2Poly(aRect,aGeo));
+/*N*/ // Polygon aPol(Rect2Poly(GetSnapRect(), aGeo));
+/*N*/
+/*N*/ // #101412# go back to old method, side effects are impossible
+/*N*/ // to calculate.
+/*N*/ Polygon aPol(Rect2Poly(aRect,aGeo));
+/*N*/
+/*N*/ for(sal_uInt16 a(0); a < aPol.GetSize(); a++)
+/*N*/ {
+/*N*/ ResizePoint(aPol[a], rRef, xFact, yFact);
+/*N*/ }
+/*N*/
+/*N*/ if(bXMirr != bYMirr)
+/*N*/ {
+/*N*/ // Polygon wenden und etwas schieben
+/*N*/ Polygon aPol0(aPol);
+/*N*/
+/*N*/ aPol[0] = aPol0[1];
+/*N*/ aPol[1] = aPol0[0];
+/*N*/ aPol[2] = aPol0[3];
+/*N*/ aPol[3] = aPol0[2];
+/*N*/ aPol[4] = aPol0[1];
+/*N*/ }
+/*N*/
+/*N*/ Poly2Rect(aPol, aRect, aGeo);
+/*N*/ }
+/*N*/
+/*N*/ if (bRota90Merk) {
+/*N*/ FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0;
+/*N*/ if (!bRota90) { // Scheinbar Rundungsfehler: Korregieren
+/*N*/ long a=NormAngle360(aGeo.nDrehWink);
+/*N*/ if (a<4500) a=0;
+/*N*/ else if (a<13500) a=9000;
+/*N*/ else if (a<22500) a=18000;
+/*N*/ else if (a<31500) a=27000;
+/*N*/ else a=0;
+/*N*/ aGeo.nDrehWink=a;
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ }
+/*N*/ if (bNoShearMerk!=(aGeo.nShearWink==0)) { // Shear ggf. korregieren wg. Rundungsfehler
+/*N*/ aGeo.nShearWink=0;
+/*N*/ aGeo.RecalcTan();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ImpJustifyRect(aRect);
+/*N*/ long nTWdt1=aRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
+/*N*/ long nTHgt1=aRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
+/*N*/ if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
+/*N*/ if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
+/*N*/ if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
+/*N*/ if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
+/*N*/ }
+/*?*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ }
+/*N*/ ImpCheckShear();
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+/*N*/ {
+/*N*/ SetGlueReallyAbsolute(TRUE);
+/*N*/ long dx=aRect.Right()-aRect.Left();
+/*N*/ long dy=aRect.Bottom()-aRect.Top();
+/*N*/ Point aP(aRect.TopLeft());
+/*N*/ RotatePoint(aP,rRef,sn,cs);
+/*N*/ aRect.Left()=aP.X();
+/*N*/ aRect.Top()=aP.Y();
+/*N*/ aRect.Right()=aRect.Left()+dx;
+/*N*/ aRect.Bottom()=aRect.Top()+dy;
+/*N*/ if (aGeo.nDrehWink==0) {
+/*N*/ aGeo.nDrehWink=NormAngle360(nWink);
+/*N*/ aGeo.nSin=sn;
+/*N*/ aGeo.nCos=cs;
+/*N*/ } else {
+/*N*/ aGeo.nDrehWink=NormAngle360(aGeo.nDrehWink+nWink);
+/*N*/ aGeo.RecalcSinCos();
+/*N*/ }
+/*N*/ SetRectsDirty();
+/*N*/ NbcRotateGluePoints(rRef,nWink,sn,cs);
+/*N*/ SetGlueReallyAbsolute(FALSE);
+/*N*/ }
+
+/*N*/ void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ SetGlueReallyAbsolute(TRUE);
+/*N*/
+/*N*/ // #75889# when this is a SdrPathObj aRect maybe not initialized
+/*N*/ Polygon aPol(Rect2Poly(aRect.IsEmpty() ? GetSnapRect() : aRect, aGeo));
+/*N*/
+/*N*/ USHORT nPointCount=aPol.GetSize();
+/*N*/ for (USHORT i=0; i<nPointCount; i++) {
+/*N*/ ShearPoint(aPol[i],rRef,tn,bVShear);
+/*N*/ }
+/*N*/ Poly2Rect(aPol,aRect,aGeo);
+/*N*/ ImpJustifyRect(aRect);
+/*N*/ if (bTextFrame) {
+/*?*/ NbcAdjustTextFrameWidthAndHeight();
+/*N*/ }
+/*N*/ ImpCheckShear();
+/*N*/ SetRectsDirty();
+/*N*/ NbcShearGluePoints(rRef,nWink,tn,bVShear);
+/*N*/ SetGlueReallyAbsolute(FALSE);
+/*N*/ }
+
+
+
+
+/*N*/ void SdrTextObj::ImpConvertSetAttrAndLayer(SdrObject* pObj, FASTBOOL bNoSetAttr) const
+/*N*/ {
+/*N*/ if (pObj!=NULL) {
+/*N*/ pObj->ImpSetAnchorPos(aAnchor);
+/*N*/ pObj->NbcSetLayer(SdrLayerID(nLayerId));
+/*N*/ if (pModel!=NULL) {
+/*N*/ pObj->SetModel(pModel);
+/*N*/ if (!bNoSetAttr) {
+/*N*/ SdrBroadcastItemChange aItemChange(*pObj);
+/*N*/ pObj->ClearItem();
+/*N*/ pObj->SetItemSet(GetItemSet());
+/*N*/ pObj->BroadcastItemChange(aItemChange);
+/*N*/
+/*N*/ pObj->NbcSetStyleSheet(GetStyleSheet(),TRUE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObject* SdrTextObj::ImpConvertMakeObj(const XPolyPolygon& rXPP, FASTBOOL bClosed, FASTBOOL bBezier, FASTBOOL bNoSetAttr) const
+/*N*/ {
+/*N*/ SdrObjKind ePathKind=bClosed?OBJ_PATHFILL:OBJ_PATHLINE;
+/*N*/ XPolyPolygon aXPP(rXPP);
+/*N*/ if (bClosed) {
+/*N*/ // Alle XPolygone des XPolyPolygons schliessen, sonst kommt das PathObj durcheinander!
+/*N*/ for (USHORT i=0; i<aXPP.Count(); i++) {
+/*N*/ const XPolygon& rXP=aXPP[i];
+/*N*/ USHORT nAnz=rXP.GetPointCount();
+/*N*/ if (nAnz>0) {
+/*N*/ USHORT nMax=USHORT(nAnz-1);
+/*N*/ Point aPnt(rXP[0]);
+/*N*/ if (aPnt!=rXP[nMax]) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bBezier && pModel!=NULL) {
+/*N*/ // Polygon aus Bezierkurve interpolieren
+/*N*/ VirtualDevice aVDev;
+/*N*/ XPolyPolygon aXPolyPoly;
+/*N*/
+/*N*/ MapMode aMap = aVDev.GetMapMode();
+/*N*/ aMap.SetMapUnit(pModel->GetScaleUnit());
+/*N*/ aMap.SetScaleX(pModel->GetScaleFraction());
+/*N*/ aMap.SetScaleY(pModel->GetScaleFraction());
+/*N*/ aVDev.SetMapMode(aMap);
+/*N*/
+/*N*/ for (USHORT i=0; i<aXPP.Count(); i++)
+/*N*/ aXPolyPoly.Insert(XOutCreatePolygon(aXPP[i],&aVDev));
+/*N*/ aXPP=aXPolyPoly;
+/*N*/ ePathKind=bClosed?OBJ_POLY:OBJ_PLIN;
+/*N*/ }
+/*N*/ SdrPathObj* pPathObj=new SdrPathObj(ePathKind,aXPP);
+/*N*/ if (bBezier) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ ImpConvertSetAttrAndLayer(pPathObj,bNoSetAttr);
+/*N*/ return pPathObj;
+/*N*/ }
+
+/*N*/ SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const
+/*N*/ {
+/*N*/ if (!ImpCanConvTextToCurve()) return pObj;
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return pObj;//STRIP001 SdrObject* pText=ImpConvertObj(!bBezier);
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdouno.cxx b/binfilter/bf_svx/source/svdraw/svx_svdouno.cxx
new file mode 100644
index 000000000000..040d8a1e6be5
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdouno.cxx
@@ -0,0 +1,479 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+
+#include "svdouno.hxx"
+#include "svdpagv.hxx"
+#include "svdio.hxx"
+#include "svdstr.hrc" // Objektname
+#include "svdview.hxx"
+#include "svdviter.hxx"
+
+#include <set>
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//************************************************************
+// Defines
+//************************************************************
+
+//************************************************************
+// Hilfsklasse SdrControlEventListenerImpl
+//************************************************************
+
+
+#include <cppuhelper/implbase1.hxx>
+namespace binfilter {
+
+/*N*/ class SdrControlEventListenerImpl : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener >
+/*N*/ {
+/*N*/ protected:
+/*N*/ SdrUnoObj* pObj;
+/*N*/
+/*N*/ public:
+/*N*/ SdrControlEventListenerImpl(SdrUnoObj* _pObj)
+/*N*/ : pObj(_pObj)
+/*N*/ {}
+/*N*/
+/*N*/ // XEventListener
+/*N*/ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+/*N*/
+/*N*/ void StopListening(const uno::Reference< lang::XComponent >& xComp);
+/*N*/ void StartListening(const uno::Reference< lang::XComponent >& xComp);
+/*N*/ };
+
+// XEventListener
+/*N*/ void SAL_CALL SdrControlEventListenerImpl::disposing( const ::com::sun::star::lang::EventObject& Source )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ if (pObj)
+/*N*/ {
+/*N*/ pObj->xUnoControlModel = NULL;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrControlEventListenerImpl::StopListening(const uno::Reference< lang::XComponent >& xComp)
+/*N*/ {
+/*N*/ if (xComp.is())
+/*N*/ xComp->removeEventListener(this);
+/*N*/ }
+
+/*N*/ void SdrControlEventListenerImpl::StartListening(const uno::Reference< lang::XComponent >& xComp)
+/*N*/ {
+/*N*/ if (xComp.is())
+/*N*/ xComp->addEventListener(this);
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+/*?*/ namespace
+/*?*/ {
+/*?*/ void lcl_ensureControlVisibility( SdrView* _pView, const SdrUnoObj* _pObject, bool _bVisible )
+/*?*/ {
+/*?*/ SdrPageView* pPageView = _pView ? _pView->GetPageView( _pObject->GetPage() ) : NULL;
+/*?*/ DBG_ASSERT( pPageView, "lcl_ensureControlVisibility: no view found!" );
+/*?*/
+/*?*/ if ( pPageView )
+/*?*/ {
+/*?*/ // loop through all the views windows
+/*?*/ const SdrPageViewWinList& rViewWins = pPageView->GetWinList();
+/*?*/ USHORT nWins = rViewWins.GetCount();
+/*?*/ for ( USHORT i=0; i<nWins; ++i )
+/*?*/ {
+/*?*/ const SdrPageViewWinRec& rWinData = rViewWins[i];
+/*?*/
+/*?*/ // loop through all controls in this window
+/*?*/ const SdrUnoControlList& rControlsInThisWin = rWinData.GetControlList();
+/*?*/ USHORT nControlsInThisWin = rControlsInThisWin.GetCount();
+/*?*/ for ( USHORT j=0; j<nControlsInThisWin; ++j )
+/*?*/ {
+/*?*/ const SdrUnoControlRec& rControlData = rControlsInThisWin[j];
+/*?*/ if ( rControlData.GetUnoObj() == _pObject )
+/*?*/ {
+/*?*/ // yep - this control is the representation of the given FmFormObj in the
+/*?*/ // given view
+/*?*/ // is the control in alive mode?
+/*?*/ uno::Reference< awt::XControl > xControl( rControlData.GetControl(), uno::UNO_QUERY );
+/*?*/ DBG_ASSERT( xControl.is(), "lcl_ensureControlVisibility: no control!" );
+/*?*/ if ( xControl.is() && !xControl->isDesignMode() )
+/*?*/ {
+/*?*/ // yes, alive mode. Is the visibility correct?
+/*?*/ if ( (bool)rControlData.IsVisible() != _bVisible )
+/*?*/ {
+/*?*/ // no -> adjust it
+/*?*/ uno::Reference< awt::XWindow > xControlWindow( xControl, uno::UNO_QUERY );
+/*?*/ DBG_ASSERT( xControlWindow.is(), "lcl_ensureControlVisibility: the control is no window!" );
+/*?*/ if ( xControlWindow.is() )
+/*?*/ {
+/*?*/ xControlWindow->setVisible( _bVisible );
+/*?*/ DBG_ASSERT( (bool)rControlData.IsVisible() == _bVisible, "lcl_ensureControlVisibility: this didn't work!" );
+/*?*/ // now this would mean that either IsVisible is not reliable (which would
+/*?*/ // be bad 'cause we used it above) or that showing/hiding the window
+/*?*/ // did not work as intended.
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+
+//************************************************************
+// SdrUnoObj
+//************************************************************
+
+/*N*/ TYPEINIT1(SdrUnoObj, SdrRectObj);
+
+/*N*/ SdrUnoObj::SdrUnoObj(const String& rModelName, BOOL _bOwnUnoControlModel)
+/*N*/ : bOwnUnoControlModel(_bOwnUnoControlModel)
+/*N*/ {
+/*N*/ bIsUnoObj = TRUE;
+/*N*/
+/*N*/ pEventListener = new SdrControlEventListenerImpl(this);
+/*N*/ pEventListener->acquire();
+/*N*/
+/*N*/ // nur ein owner darf eigenstaendig erzeugen
+/*N*/ if (rModelName.Len())
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 CreateUnoControlModel(rModelName);
+/*N*/ }
+
+/*N*/ SdrUnoObj::~SdrUnoObj()
+/*N*/ {
+/*N*/ uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
+/*N*/ if (xComp.is())
+/*N*/ {
+/*N*/ // gehoert das Control seiner Umgebung?
+/*N*/ uno::Reference< container::XChild > xContent(xUnoControlModel, uno::UNO_QUERY);
+/*N*/ if (xContent.is() && !xContent->getParent().is())
+/*N*/ xComp->dispose();
+/*N*/ else
+/*N*/ pEventListener->StopListening(xComp);
+/*N*/ }
+/*N*/ pEventListener->release();
+/*N*/ }
+
+/*N*/ void SdrUnoObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrRectObj::SetModel(pNewModel);
+/*N*/ }
+
+/*N*/ void SdrUnoObj::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ SdrRectObj::SetPage(pNewPage);
+/*N*/ }
+
+
+
+/** helper class to restore graphics at <awt::XView> object after <SdrUnoObj::Paint>
+
+ OD 08.05.2003 #109432#
+ Restoration of graphics necessary to assure that paint on a window
+
+ @author OD
+*/
+/*?*/ class RestoreXViewGraphics
+/*?*/ {
+/*?*/ private:
+/*?*/ uno::Reference< awt::XView > m_rXView;
+/*?*/ uno::Reference< awt::XGraphics > m_rXGraphics;
+/*?*/
+/*?*/ public:
+/*?*/ RestoreXViewGraphics( const uno::Reference< awt::XView >& _rXView )
+/*?*/ {
+/*?*/ m_rXView = _rXView;
+/*?*/ m_rXGraphics = m_rXView->getGraphics();
+/*?*/ }
+/*?*/ ~RestoreXViewGraphics()
+/*?*/ {
+/*?*/ m_rXView->setGraphics( m_rXGraphics );
+/*?*/ }
+/*?*/ };
+
+
+
+
+
+
+
+/*N*/ void SdrUnoObj::VisAreaChanged(const OutputDevice* pOut)
+/*N*/ {
+/*N*/ if (!xUnoControlModel.is())
+/*N*/ return;
+/*N*/
+/*N*/ if (pOut)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+ // Nur dieses eine OutDev beruecksichtigen
+/*N*/ }
+/*N*/ else if (pModel)
+/*N*/ {
+/*N*/ // Controls aller PageViews beruecksichtigen
+/*N*/ USHORT nLstPos = pModel->GetListenerCount();
+/*N*/ uno::Reference< awt::XWindow > xWindow;
+/*N*/ Point aPixPos;
+/*N*/ Size aPixSize;
+/*N*/ SfxListener* pListener;
+/*N*/ SdrPageView* pPV;
+/*N*/ const SdrUnoControlRec* pControlRec = NULL;
+/*N*/
+/*N*/ for (; nLstPos ;)
+/*N*/ {
+/*N*/ pListener = pModel->GetListener(--nLstPos);
+/*N*/
+/*N*/ if (pListener && pListener->ISA(SdrPageView))
+/*N*/ {
+/*N*/ pPV = (SdrPageView*) pListener;
+/*N*/ const SdrPageViewWinList& rWL = pPV->GetWinList();
+/*N*/ USHORT nPos = rWL.GetCount();
+/*N*/
+/*N*/ for (; nPos ; )
+/*N*/ {
+/*N*/ // Controls aller OutDevs beruecksichtigen
+/*N*/ const SdrPageViewWinRec& rWR = rWL[--nPos];
+/*N*/ const SdrUnoControlList& rControlList = rWR.GetControlList();
+/*N*/ USHORT nCtrlNum = rControlList.Find(xUnoControlModel);
+/*N*/ pControlRec = (nCtrlNum != SDRUNOCONTROL_NOTFOUND) ? &rControlList[nCtrlNum] : NULL;
+/*N*/ if (pControlRec)
+/*N*/ {
+/*N*/ xWindow = uno::Reference< awt::XWindow >(pControlRec->GetControl(), uno::UNO_QUERY);
+/*N*/ if (xWindow.is())
+/*N*/ {
+/*N*/ // #62560 Pixelverschiebung weil mit einem Rechteck
+/*N*/ // und nicht mit Point, Size gearbeitet wurde
+/*N*/ aPixPos = rWR.GetOutputDevice()->LogicToPixel(aRect.TopLeft());
+/*N*/ aPixSize = rWR.GetOutputDevice()->LogicToPixel(aRect.GetSize());
+/*N*/ xWindow->setPosSize(aPixPos.X(), aPixPos.Y(),
+/*N*/ aPixSize.Width(), aPixSize.Height(),
+/*N*/ awt::PosSize::POSSIZE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ SdrRectObj::NbcResize(rRef,xFact,yFact);
+/*N*/
+/*N*/ if (aGeo.nShearWink!=0 || aGeo.nDrehWink!=0)
+/*N*/ {
+/*N*/ // 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();
+/*N*/ }
+/*N*/
+/*N*/ VisAreaChanged();
+/*N*/ }
+
+/*N*/ void SdrUnoObj::NbcMove(const Size& rSize)
+/*N*/ {
+/*N*/ SdrRectObj::NbcMove(rSize);
+/*N*/ VisAreaChanged();
+/*N*/ }
+
+/*N*/ void SdrUnoObj::NbcSetSnapRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetSnapRect(rRect);
+/*N*/ VisAreaChanged();
+/*N*/ }
+
+/*N*/ void SdrUnoObj::NbcSetLogicRect(const Rectangle& rRect)
+/*N*/ {
+/*N*/ SdrRectObj::NbcSetLogicRect(rRect);
+/*N*/ VisAreaChanged();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+/*N*/ void SdrUnoObj::NbcSetLayer( SdrLayerID _nLayer )
+/*N*/ {
+/*N*/ if ( GetLayer() == _nLayer )
+/*N*/ { // redundant call -> not interested in doing anything here
+/*N*/ SdrRectObj::NbcSetLayer( _nLayer );
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*N*/ // we need some special handling here in case we're moved from an invisible layer
+/*N*/ // to a visible one, or vice versa
+/*N*/ // (relative to a layer. Remember that the visibility of a layer is a view attribute
+/*N*/ // - the same layer can be visible in one view, and invisible in another view, at the
+/*N*/ // same time)
+/*N*/ // 2003-06-03 - #110592# - fs@openoffice.org
+/*N*/
+/*N*/ // collect all views in which our old layer is visible
+/*N*/ ::std::set< SdrView* > aPreviouslyVisible;
+/*N*/
+/*N*/ {
+/*N*/ SdrViewIter aIter( this );
+/*N*/ for ( SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView() )
+/*N*/ aPreviouslyVisible.insert( pView );
+/*N*/ }
+/*N*/
+/*N*/ SdrRectObj::NbcSetLayer( _nLayer );
+/*N*/
+/*N*/ // collect all views in which our new layer is visible
+/*N*/ ::std::set< SdrView* > aNewlyVisible;
+/*N*/
+/*N*/ {
+/*N*/ SdrViewIter aIter( this );
+/*N*/ for ( SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView() )
+/*N*/ {
+/*N*/ ::std::set< SdrView* >::iterator aPrevPos = aPreviouslyVisible.find( pView );
+/*N*/ if ( aPreviouslyVisible.end() != aPrevPos )
+/*N*/ { // in pView, we were visible _before_ the layer change, and are
+/*N*/ // visible _after_ the layer change, too
+/*N*/ // -> we're not interested in this view at all
+/*N*/ aPreviouslyVisible.erase( aPrevPos );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // in pView, we were visible _before_ the layer change, and are
+/*N*/ // _not_ visible after the layer change
+/*N*/ // => remember this view, as our visibility there changed
+/*N*/ aNewlyVisible.insert( pView );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // now aPreviouslyVisible contains all views where we became invisible
+/*N*/ ::std::set< SdrView* >::const_iterator aLoopViews;
+/*N*/ for ( aLoopViews = aPreviouslyVisible.begin();
+/*N*/ aLoopViews != aPreviouslyVisible.end();
+/*N*/ ++aLoopViews
+/*N*/ )
+/*N*/ {
+/*N*/ lcl_ensureControlVisibility( *aLoopViews, this, false );
+/*N*/ }
+/*N*/
+/*N*/ // and aNewlyVisible all views where we became visible
+/*N*/ for ( aLoopViews = aNewlyVisible.begin();
+/*N*/ aLoopViews != aNewlyVisible.end();
+/*N*/ ++aLoopViews
+/*N*/ )
+/*N*/ {
+/*N*/ lcl_ensureControlVisibility( *aLoopViews, this, true );
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ void SdrUnoObj::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrRectObj::WriteData(rOut);
+/*N*/ SdrDownCompat aCompat(rOut, STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrUnoObj");
+/*N*/ #endif
+/*N*/
+/*N*/ if (bOwnUnoControlModel) // nur als besitzt des Models dieses auch schreiben
+/*N*/ {
+/*?*/ // UNICODE: rOut << aUnoControlModelTypeName;
+/*?*/ rOut.WriteByteString(aUnoControlModelTypeName);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrUnoObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError() != 0)
+/*N*/ return;
+/*N*/
+/*N*/ SdrRectObj::ReadData(rHead,rIn);
+/*N*/
+/*N*/ SdrDownCompat aCompat(rIn, STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrUnoObj");
+/*N*/ #endif
+/*N*/
+/*N*/ if (bOwnUnoControlModel) // nur als besitzt des Models dieses auch lesen
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrUnoObj::SetUnoControlModel( uno::Reference< awt::XControlModel > xModel)
+/*N*/ {
+/*N*/ if (xUnoControlModel.is())
+/*N*/ {
+/*?*/ 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);
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ xUnoControlModel = xModel;
+/*N*/
+/*N*/ // control model muss servicename des controls enthalten
+/*N*/ if (xUnoControlModel.is())
+/*N*/ {
+/*N*/ uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY);
+/*N*/ if (xSet.is())
+/*N*/ {
+/*N*/ uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", gsl_getSystemTextEncoding())) );
+/*N*/ OUString aStr;
+/*N*/ if( aValue >>= aStr )
+/*N*/ aUnoControlTypeName = String(aStr);
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
+/*N*/ if (xComp.is())
+/*N*/ pEventListener->StartListening(xComp);
+/*N*/
+/*N*/ if (pModel)
+/*N*/ {
+/*N*/ SdrHint aHint(*this);
+/*N*/ aHint.SetKind(HINT_CONTROLINSERTED);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoutl.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoutl.cxx
new file mode 100644
index 000000000000..70305e673432
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoutl.cxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdoutl.hxx"
+#include "svdotext.hxx"
+#include <editstat.hxx>
+namespace binfilter {
+
+
+//TYPEINIT1( SdrOutliner, Outliner );
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+/*N*/ SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, USHORT nMode ):
+/*N*/ Outliner( pItemPool, nMode ),
+/*N*/ pTextObj( NULL )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+/*N*/ SdrOutliner::~SdrOutliner()
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+/*N*/ void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
+/*N*/ {
+/*N*/ if( pObj && pObj != pTextObj )
+/*N*/ {
+/*N*/ SetUpdateMode(FALSE);
+/*N*/ USHORT nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+/*N*/ if ( !pObj->IsOutlText() )
+/*N*/ nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+/*N*/ Init( nOutlinerMode );
+/*N*/
+/*N*/ SetGlobalCharStretching(100,100);
+/*N*/
+/*N*/ ULONG nStat = GetControlWord();
+/*N*/ nStat &= ~( EE_CNTRL_STRETCHING | EE_CNTRL_AUTOPAGESIZE );
+/*N*/ SetControlWord(nStat);
+/*N*/
+/*N*/ Size aNullSize;
+/*N*/ Size aMaxSize( 100000,100000 );
+/*N*/ SetMinAutoPaperSize( aNullSize );
+/*N*/ SetMaxAutoPaperSize( aMaxSize );
+/*N*/ SetPaperSize( aMaxSize );
+/*N*/ ClearPolygon();
+/*N*/ }
+/*N*/
+/*N*/ pTextObj = pObj;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+/*N*/ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj )
+/*N*/ {
+/*N*/ pTextObj = pObj;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+/*N*/ XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+/*N*/ Color*& rpTxtColor, Color*& rpFldColor)
+/*N*/ {
+/*N*/ FASTBOOL bOk = FALSE;
+/*N*/ XubString aRet;
+/*N*/
+/*N*/ if (pTextObj)
+/*N*/ bOk = pTextObj->CalcFieldValue(rField, nPara, nPos, FALSE, rpTxtColor, rpFldColor, aRet);
+/*N*/
+/*N*/ if (!bOk)
+/*N*/ aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor);
+/*N*/
+/*N*/ return aRet;
+/*N*/ }
+
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdoutlinercache.cxx b/binfilter/bf_svx/source/svdraw/svx_svdoutlinercache.cxx
new file mode 100644
index 000000000000..bfdad6b2e7bb
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdoutlinercache.cxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "svdoutlinercache.hxx"
+#include "svdoutl.hxx"
+#include "svdmodel.hxx"
+namespace binfilter {
+
+/*N*/ extern SdrOutliner* SdrMakeOutliner( USHORT nOutlinerMode, SdrModel* pModel );
+
+/*N*/ SdrOutlinerCache::SdrOutlinerCache( SdrModel* pModel )
+/*N*/ : mpModel( pModel ),
+/*N*/ mpModeOutline( NULL ),
+/*N*/ mpModeText( NULL )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrOutliner* SdrOutlinerCache::createOutliner( sal_uInt16 nOutlinerMode )
+/*N*/ {
+/*N*/ SdrOutliner* pOutliner = NULL;
+/*N*/
+/*N*/ if( (OUTLINERMODE_OUTLINEOBJECT == nOutlinerMode) && mpModeOutline )
+/*N*/ {
+/*N*/ pOutliner = mpModeOutline;
+/*N*/ mpModeOutline = NULL;
+/*N*/ }
+/*N*/ else if( (OUTLINERMODE_TEXTOBJECT == nOutlinerMode) && mpModeText )
+/*N*/ {
+/*N*/ pOutliner = mpModeText;
+/*N*/ mpModeText = NULL;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pOutliner = SdrMakeOutliner( nOutlinerMode, mpModel );
+/*N*/ Outliner& aDrawOutliner = mpModel->GetDrawOutliner();
+/*N*/ pOutliner->SetCalcFieldValueHdl( aDrawOutliner.GetCalcFieldValueHdl() );
+/*N*/ }
+/*N*/
+/*N*/ return pOutliner;
+/*N*/ }
+
+/*N*/ SdrOutlinerCache::~SdrOutlinerCache()
+/*N*/ {
+/*N*/ if( mpModeOutline )
+/*N*/ {
+/*N*/ delete mpModeOutline;
+/*N*/ mpModeOutline = NULL;
+/*N*/ }
+/*N*/
+/*N*/ if( mpModeText )
+/*N*/ {
+/*N*/ delete mpModeText;
+/*N*/ mpModeText = NULL;
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
+/*N*/ {
+/*N*/ if( pOutliner )
+/*N*/ {
+/*N*/ USHORT nOutlMode = pOutliner->GetOutlinerMode();
+/*N*/
+/*N*/ if( (OUTLINERMODE_OUTLINEOBJECT == nOutlMode) && (NULL == mpModeOutline) )
+/*N*/ {
+/*N*/ mpModeOutline = pOutliner;
+/*N*/ pOutliner->Clear();
+/*N*/ pOutliner->SetVertical( false );
+/*N*/ }
+/*N*/ else if( (OUTLINERMODE_TEXTOBJECT == nOutlMode) && (NULL == mpModeText) )
+/*N*/ {
+/*N*/ mpModeText = pOutliner;
+/*N*/ pOutliner->Clear();
+/*N*/ pOutliner->SetVertical( false );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ delete pOutliner;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdovirt.cxx b/binfilter/bf_svx/source/svdraw/svx_svdovirt.cxx
new file mode 100644
index 000000000000..f4c3d806d136
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdovirt.cxx
@@ -0,0 +1,318 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdovirt.hxx"
+#include "svdio.hxx"
+#include "svdhdl.hxx"
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrVirtObj,SdrObject);
+
+/*N*/ SdrVirtObj::SdrVirtObj(SdrObject& rNewObj):
+/*N*/ rRefObj(rNewObj)
+/*N*/ {
+/*N*/ bVirtObj=TRUE; // Ja, ich bin ein virtuelles Objekt
+/*N*/ rRefObj.AddReference(*this);
+/*N*/ bClosedObj=rRefObj.IsClosedObj();
+/*N*/ }
+
+/*N*/ SdrVirtObj::~SdrVirtObj()
+/*N*/ {
+/*N*/ rRefObj.DelReference(*this);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ const SdrObject& SdrVirtObj::GetReferencedObj() const
+/*N*/ {
+/*N*/ return rRefObj;
+/*N*/ }
+
+/*N*/ SdrObject& SdrVirtObj::ReferencedObj()
+/*N*/ {
+/*N*/ return rRefObj;
+/*N*/ }
+
+/*N*/ void __EXPORT SdrVirtObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ bClosedObj=rRefObj.IsClosedObj();
+/*N*/ SetRectsDirty(); // hier noch Optimieren.
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrVirtObj::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrObject::SetModel(pNewModel);
+/*N*/ rRefObj.SetModel(pNewModel);
+/*N*/ }
+
+
+/*N*/ UINT32 SdrVirtObj::GetObjInventor() const
+/*N*/ {
+/*N*/ return rRefObj.GetObjInventor();
+/*N*/ }
+
+/*N*/ UINT16 SdrVirtObj::GetObjIdentifier() const
+/*N*/ {
+/*N*/ return rRefObj.GetObjIdentifier();
+/*N*/ }
+
+/*N*/ SdrObjList* SdrVirtObj::GetSubList() const
+/*N*/ {
+/*N*/ return rRefObj.GetSubList();
+/*N*/ }
+
+
+
+/*N*/ void SdrVirtObj::SetChanged()
+/*N*/ {
+/*N*/ SdrObject::SetChanged();
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ rRefObj.NbcResize(rRef-aAnchor,xFact,yFact);
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
+/*N*/ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+/*N*/ rRefObj.Resize(rRef-aAnchor,xFact,yFact);
+/*N*/ SetRectsDirty();
+/*N*/ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+/*N*/ }
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrVirtObj::RecalcSnapRect()
+/*N*/ {
+/*N*/ aSnapRect=rRefObj.GetSnapRect();
+/*N*/ aSnapRect+=aAnchor;
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ long SdrVirtObj::GetRotateAngle() const
+/*N*/ {
+/*N*/ return rRefObj.GetRotateAngle();
+/*N*/ }
+
+/*N*/ long SdrVirtObj::GetShearAngle(FASTBOOL bVertical) const
+/*N*/ {
+/*N*/ return rRefObj.GetShearAngle(bVertical);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+/*N*/ void SdrVirtObj::NbcSetPoint(const Point& rPnt, USHORT i)
+/*N*/ {
+/*N*/ Point aP(rPnt);
+/*N*/ aP-=aAnchor;
+/*N*/ rRefObj.SetPoint(aP,i);
+/*N*/ SetRectsDirty();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrObjGeoData* SdrVirtObj::NewGeoData() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001
+/*N*/ }
+
+/*N*/ void SdrVirtObj::SaveGeoData(SdrObjGeoData& rGeo) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void SdrVirtObj::RestGeoData(const SdrObjGeoData& rGeo)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ItemSet access
+
+/*N*/ const SfxItemSet& SdrVirtObj::GetItemSet() const
+/*N*/ {
+/*N*/ return rRefObj.GetItemSet();
+/*N*/ }
+
+/*N*/ SfxItemSet* SdrVirtObj::CreateNewItemSet(SfxItemPool& rPool)
+/*N*/ {
+/*N*/ return rRefObj.CreateNewItemSet(rPool);
+/*N*/ }
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// private support routines for ItemSet access
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// pre- and postprocessing for objects for saving
+
+/*N*/ void SdrVirtObj::PreSave()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrVirtObj::PostSave()
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/*N*/ void SdrVirtObj::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void SdrVirtObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ rRefObj.NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*?*/ 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
+/*?*/ }
+
+/*?*/ const Point SdrVirtObj::GetOffset() const
+/*?*/ {
+/*?*/ return Point(0,0);
+/*?*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdpage.cxx b/binfilter/bf_svx/source/svdraw/svx_svdpage.cxx
new file mode 100644
index 000000000000..bbdb8e7cf5c2
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdpage.cxx
@@ -0,0 +1,1635 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// HACK
+#ifdef SVX_LIGHT
+#define _IPOBJ_HXX
+#endif
+
+#include <sot/clsids.hxx>
+#include "svdview.hxx"
+#include <string.h>
+#ifndef _STRING_H
+#define _STRING_H
+#endif
+#include <bf_so3/ipobj.hxx>
+
+#include "svdetc.hxx"
+#include "svdio.hxx"
+#include "svdograf.hxx" // fuer SwapInAll()
+#include "svdoole2.hxx" // Sonderbehandlung OLE beim SdrExchangeFormat
+#include "svditer.hxx"
+#include "svdpagv.hxx"
+#include "polysc3d.hxx"
+
+#ifndef SVX_LIGHT
+#include "fmdpage.hxx"
+#else
+#endif
+
+
+#include "xoutx.hxx"
+
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+/*N*/ DBG_NAME(SdrObjList)
+
+/*N*/ TYPEINIT0(SdrObjList);
+
+/*N*/ SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewUpList):
+/*N*/ aList(1024,64,64)
+/*N*/ {
+/*N*/ DBG_CTOR(SdrObjList,NULL);
+/*N*/ pModel=pNewModel;
+/*N*/ pPage=pNewPage;
+/*N*/ pUpList=pNewUpList;
+/*N*/ bObjOrdNumsDirty=FALSE;
+/*N*/ bRectsDirty=FALSE;
+/*N*/ pOwnerObj=NULL;
+/*N*/ eListKind=SDROBJLIST_UNKNOWN;
+/*N*/ }
+
+/*?*/ 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;
+/*?*/ }
+
+/*N*/ SdrObjList::~SdrObjList()
+/*N*/ {
+/*N*/ DBG_DTOR(SdrObjList,NULL);
+/*N*/ Clear(); // Containerinhalt loeschen!
+/*N*/ }
+
+/*N*/ void SdrObjList::operator=(const SdrObjList& rSrcList)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+/*N*/ {
+/*N*/ Clear();
+/*N*/ bObjOrdNumsDirty=FALSE;
+/*N*/ bRectsDirty =FALSE;
+/*N*/ ULONG nCloneErrCnt=0;
+/*N*/ ULONG nAnz=rSrcList.GetObjCount();
+/*N*/ SdrInsertReason aReason(SDRREASON_COPY);
+/*N*/ ULONG no;
+/*N*/ for (no=0; no<nAnz; no++) {
+/*N*/ SdrObject* pSO=rSrcList.GetObj(no);
+/*N*/ SdrObject* pDO=pSO->Clone(pPage,pModel);
+/*N*/ if (pDO!=NULL) {
+/*N*/ NbcInsertObject(pDO,CONTAINER_APPEND,&aReason);
+/*N*/ } else {
+/*N*/ nCloneErrCnt++;
+/*N*/ }
+/*N*/ }
+/*N*/ // und nun zu den Konnektoren
+/*N*/ // Die neuen Objekte werden auf die der rSrcList abgebildet
+/*N*/ // und so die Objektverbindungen hergestellt.
+/*N*/ // Aehnliche Implementation an folgenden Stellen:
+/*N*/ // void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+/*N*/ // SdrModel* SdrExchangeView::GetMarkedObjModel() const
+/*N*/ // FASTBOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
+/*N*/ // void SdrEditView::CopyMarked()
+/*N*/ if (nCloneErrCnt==0) {
+/*N*/ for (no=0; no<nAnz; no++) {
+/*N*/ const SdrObject* pSrcOb=rSrcList.GetObj(no);
+/*N*/ SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pSrcOb);
+/*N*/ 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!");
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ } else {
+/*N*/ #ifdef DBG_UTIL
+/*?*/ ByteString aStr("SdrObjList::operator=(): Fehler beim Clonen ");
+/*?*/
+/*?*/ if(nCloneErrCnt == 1)
+/*?*/ {
+/*?*/ aStr += "eines Zeichenobjekts.";
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ aStr += "von ";
+/*?*/ aStr += ByteString::CreateFromInt32( nCloneErrCnt );
+/*?*/ aStr += " Zeichenobjekten.";
+/*?*/ }
+/*?*/
+/*?*/ aStr += " Objektverbindungen werden nicht mitkopiert.";
+/*?*/
+/*?*/ DBG_ERROR(aStr.GetBuffer());
+/*?*/ #endif
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjList::Clear()
+/*N*/ {
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/
+/*N*/ if(pModel!=NULL && nAnz!=0)
+/*N*/ {
+/*N*/ SdrHint aHint(HINT_OBJLISTCLEAR);
+/*N*/ aHint.SetPage(pPage);
+/*N*/ aHint.SetObjList(this);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/
+/*N*/ for (ULONG no=0; no<nAnz; no++) {
+/*N*/ SdrObject* pObj=GetObj(no);
+/*N*/ delete pObj;
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ if (pModel!=NULL && nAnz!=0)
+/*N*/ {
+/*N*/ pModel->SetChanged();
+/*N*/ SdrHint aHint(HINT_OBJLISTCLEARED);
+/*N*/ aHint.SetPage(pPage);
+/*N*/ aHint.SetObjList(this);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrPage* SdrObjList::GetPage() const
+/*N*/ {
+/*N*/ return pPage;
+/*N*/ }
+
+/*N*/ void SdrObjList::SetPage(SdrPage* pNewPage)
+/*N*/ {
+/*N*/ if (pPage!=pNewPage) {
+/*N*/ pPage=pNewPage;
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ for (ULONG no=0; no<nAnz; no++) {
+/*N*/ SdrObject* pObj=GetObj(no);
+/*N*/ pObj->SetPage(pPage);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrModel* SdrObjList::GetModel() const
+/*N*/ {
+/*N*/ return pModel;
+/*N*/ }
+
+/*N*/ void SdrObjList::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ if (pModel!=pNewModel) {
+/*N*/ pModel=pNewModel;
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ for (ULONG i=0; i<nAnz; i++) {
+/*N*/ SdrObject* pObj=GetObj(i);
+/*N*/ pObj->SetModel(pModel);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjList::RecalcObjOrdNums()
+/*N*/ {
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ for (ULONG no=0; no<nAnz; no++) {
+/*N*/ SdrObject* pObj=GetObj(no);
+/*N*/ pObj->SetOrdNum(no);
+/*N*/ }
+/*N*/ bObjOrdNumsDirty=FALSE;
+/*N*/ }
+
+/*N*/ void SdrObjList::RecalcRects()
+/*N*/ {
+/*N*/ aOutRect=Rectangle();
+/*N*/ aSnapRect=aOutRect;
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ ULONG i;
+/*N*/ for (i=0; i<nAnz; i++) {
+/*N*/ SdrObject* pObj=GetObj(i);
+/*N*/ if (i==0) {
+/*N*/ aOutRect=pObj->GetBoundRect();
+/*N*/ aSnapRect=pObj->GetSnapRect();
+/*N*/ } else {
+/*N*/ aOutRect.Union(pObj->GetBoundRect());
+/*N*/ aSnapRect.Union(pObj->GetSnapRect());
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjList::SetRectsDirty()
+/*N*/ {
+/*N*/ bRectsDirty=TRUE;
+/*N*/ if (pUpList!=NULL) pUpList->SetRectsDirty();
+/*N*/ }
+
+/*N*/ void SdrObjList::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+/*N*/ {
+/*N*/ DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcInsertObject(NULL)");
+/*N*/ if (pObj!=NULL) {
+/*N*/ DBG_ASSERT(!pObj->IsInserted(),"ZObjekt hat bereits Inserted-Status");
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ if (nPos>nAnz) nPos=nAnz;
+/*N*/ aList.Insert(pObj,nPos);
+/*N*/ if (nPos<nAnz) bObjOrdNumsDirty=TRUE;
+/*N*/ pObj->SetOrdNum(nPos);
+/*N*/ pObj->SetObjList(this);
+/*N*/ pObj->SetPage(pPage);
+/*N*/ if (!bRectsDirty) {
+/*N*/ aOutRect.Union(pObj->GetBoundRect());
+/*N*/ aSnapRect.Union(pObj->GetSnapRect());
+/*N*/ }
+/*N*/ pObj->SetInserted(TRUE); // Ruft u.a. den UserCall
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjList::InsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+/*N*/ {
+/*N*/ DBG_ASSERT(pObj!=NULL,"SdrObjList::InsertObject(NULL)");
+/*N*/
+/*N*/ if(pObj)
+/*N*/ {
+/*N*/ if(pOwnerObj && !GetObjCount())
+/*N*/ {
+/*N*/ // damit der graue Rahmen des leeren Gruppenobjekts korrekt weggemalt wird
+/*N*/ pOwnerObj->SendRepaintBroadcast();
+/*N*/ }
+/*N*/
+/*N*/ // #69055# if anchor is used, reset it before grouping
+/*N*/ if(GetOwnerObj())
+/*N*/ {
+/*N*/ const Point& rAnchorPos = pObj->GetAnchorPos();
+/*N*/ if(rAnchorPos.X() || rAnchorPos.Y())
+/*N*/ pObj->NbcSetAnchorPos(Point());
+/*N*/ }
+/*N*/
+/*N*/ // do insert to new group
+/*N*/ NbcInsertObject(pObj, nPos, pReason);
+/*N*/
+/*N*/ // Falls das Objekt in eine Gruppe eingefuegt wird
+/*N*/ // und nicht mit seinen Bruedern ueberlappt, muss es
+/*N*/ // einen eigenen Redraw bekommen
+/*N*/ if(pOwnerObj)
+/*N*/ {
+/*N*/ pOwnerObj->SendRepaintBroadcast();
+/*N*/ }
+/*N*/
+/*N*/ if(pModel)
+/*N*/ {
+/*N*/ // Hier muss ein anderer Broadcast her!
+/*N*/ // Repaint ab Objekt Nummer ... (Achtung: GroupObj)
+/*N*/ if(pObj->GetPage())
+/*N*/ {
+/*N*/ SdrHint aHint(*pObj);
+/*N*/
+/*N*/ aHint.SetKind(HINT_OBJINSERTED);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/
+/*N*/ pModel->SetChanged();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObject* SdrObjList::NbcRemoveObject(ULONG nObjNum)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");return NULL; //STRIP001
+/*N*/ }
+
+/*N*/ SdrObject* SdrObjList::RemoveObject(ULONG nObjNum)
+/*N*/ {
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ SdrObject* pObj=(SdrObject*)aList.Remove(nObjNum);
+/*N*/ DBG_ASSERT(pObj!=NULL,"Object zum Removen nicht gefunden");
+/*N*/ if (pObj!=NULL) {
+/*N*/ DBG_ASSERT(pObj->IsInserted(),"ZObjekt hat keinen Inserted-Status");
+/*N*/ if (pModel!=NULL) {
+/*N*/ // Hier muss ein anderer Broadcast her!
+/*N*/ if (pObj->GetPage()!=NULL) {
+/*N*/ SdrHint aHint(*pObj);
+/*N*/ aHint.SetKind(HINT_OBJREMOVED);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ pModel->SetChanged();
+/*N*/ }
+/*N*/ pObj->SetInserted(FALSE); // Ruft u.a. den UserCall
+/*N*/ pObj->SetObjList(NULL);
+/*N*/ pObj->SetPage(NULL);
+/*N*/ if (!bObjOrdNumsDirty) { // Optimierung fuer den Fall, dass das letzte Obj rausgenommen wird
+/*N*/ if (nObjNum!=ULONG(nAnz-1)) {
+/*N*/ bObjOrdNumsDirty=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ SetRectsDirty();
+/*N*/ if (pOwnerObj!=NULL && GetObjCount()==0) {
+/*N*/ // damit der graue Rahmen des leeren Gruppenobjekts korrekt gemalt wird
+/*N*/ pOwnerObj->SendRepaintBroadcast();
+/*N*/ }
+/*N*/ }
+/*N*/ return pObj;
+/*N*/ }
+
+
+/*N*/ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
+/*N*/ {
+/*N*/ //ULONG nAnz=GetObjCount();
+/*N*/ SdrObject* pObj=(SdrObject*)aList.GetObject(nObjNum);
+/*N*/ DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Object zum Removen nicht gefunden");
+/*N*/ if (pObj!=NULL) {
+/*N*/ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt hat keinen Inserted-Status");
+/*N*/ if (pModel!=NULL) {
+/*N*/ // Hier muss ein anderer Broadcast her!
+/*N*/ if (pObj->GetPage()!=NULL) {
+/*N*/ SdrHint aHint(*pObj);
+/*N*/ aHint.SetKind(HINT_OBJREMOVED);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ }
+/*N*/ pObj->SetInserted(FALSE);
+/*N*/ pObj->SetObjList(NULL);
+/*N*/ pObj->SetPage(NULL);
+/*N*/ aList.Replace(pNewObj,nObjNum);
+/*N*/ pNewObj->SetOrdNum(nObjNum);
+/*N*/ pNewObj->SetObjList(this);
+/*N*/ pNewObj->SetPage(pPage);
+/*N*/ pNewObj->SetInserted(TRUE);
+/*N*/ if (pModel!=NULL) {
+/*N*/ // Hier muss ein anderer Broadcast her!
+/*N*/ if (pNewObj->GetPage()!=NULL) {
+/*N*/ SdrHint aHint(*pNewObj);
+/*N*/ aHint.SetKind(HINT_OBJINSERTED);
+/*N*/ pModel->Broadcast(aHint);
+/*N*/ }
+/*N*/ pModel->SetChanged();
+/*N*/ }
+/*N*/ SetRectsDirty();
+/*N*/ }
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ SdrObject* SdrObjList::NbcSetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum)
+/*N*/ {
+/*N*/ SdrObject* pObj=(SdrObject*)aList.GetObject(nOldObjNum);
+/*N*/ if (nOldObjNum==nNewObjNum) return pObj;
+/*N*/ DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcSetObjectOrdNum: Object nicht gefunden");
+/*N*/ if (pObj!=NULL) {
+/*N*/ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::NbcSetObjectOrdNum: ZObjekt hat keinen Inserted-Status");
+/*N*/ aList.Remove(nOldObjNum);
+/*N*/ aList.Insert(pObj,nNewObjNum);
+/*N*/ pObj->SetOrdNum(nNewObjNum);
+/*N*/ bObjOrdNumsDirty=TRUE;
+/*N*/ }
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ SdrObject* SdrObjList::SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum)
+/*N*/ {
+/*N*/ SdrObject* pObj=(SdrObject*)aList.GetObject(nOldObjNum);
+/*N*/ if (nOldObjNum==nNewObjNum) return pObj;
+/*N*/ DBG_ASSERT(pObj!=NULL,"SdrObjList::SetObjectOrdNum: Object nicht gefunden");
+/*N*/ if (pObj!=NULL) {
+/*N*/ 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));
+ }*/
+/*N*/ aList.Remove(nOldObjNum);
+/*N*/ aList.Insert(pObj,nNewObjNum);
+/*N*/ pObj->SetOrdNum(nNewObjNum);
+/*N*/ bObjOrdNumsDirty=TRUE;
+/*N*/ if (pModel!=NULL) {
+/*N*/ // Hier muss ein anderer Broadcast her!
+/*N*/ if (pObj->GetPage()!=NULL) pModel->Broadcast(SdrHint(*pObj));
+/*N*/ pModel->SetChanged();
+/*N*/ }
+/*N*/ }
+/*N*/ return pObj;
+/*N*/ }
+
+/*N*/ const Rectangle& SdrObjList::GetAllObjSnapRect() const
+/*N*/ {
+/*N*/ if (bRectsDirty) {
+/*N*/ ((SdrObjList*)this)->RecalcRects();
+/*N*/ ((SdrObjList*)this)->bRectsDirty=FALSE;
+/*N*/ }
+/*N*/ return aSnapRect;
+/*N*/ }
+
+/*N*/ const Rectangle& SdrObjList::GetAllObjBoundRect() const
+/*N*/ {
+/*N*/ if (bRectsDirty) {
+/*N*/ ((SdrObjList*)this)->RecalcRects();
+/*N*/ ((SdrObjList*)this)->bRectsDirty=FALSE;
+/*N*/ }
+/*N*/ return aOutRect;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObjList::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec, FASTBOOL bRestoreColors) const
+/*N*/ {
+/*N*/ BOOL bOk(TRUE);
+/*N*/ BOOL bWasNotActive = rInfoRec.bNotActive;
+/*N*/ BOOL bIsEnteredGroup(FALSE);
+/*N*/ UINT32 nWasDrawMode = rXOut.GetOutDev()->GetDrawMode();
+/*N*/
+/*N*/ if(!rInfoRec.bOriginalDrawModeSet)
+/*N*/ {
+/*N*/ // Original-Paintmode retten
+/*N*/ ((SdrPaintInfoRec&)rInfoRec).bOriginalDrawModeSet = TRUE;
+/*N*/ ((SdrPaintInfoRec&)rInfoRec).nOriginalDrawMode = rXOut.GetOutDev()->GetDrawMode();
+/*N*/ }
+/*N*/
+/*N*/ if((rInfoRec.pPV && rInfoRec.pPV->GetObjList() == this)
+/*N*/ || (rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE))
+/*N*/ {
+/*N*/ bIsEnteredGroup = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ if(bIsEnteredGroup && bWasNotActive)
+/*N*/ {
+/*N*/ // auf aktive Elemente schalten
+/*?*/ ((SdrPaintInfoRec&)rInfoRec).bNotActive = FALSE;
+/*N*/ }
+/*N*/
+/*N*/ if(rInfoRec.pPV && rInfoRec.bNotActive)
+/*N*/ {
+/*?*/ if(rInfoRec.pPV->GetView().DoVisualizeEnteredGroup())
+/*?*/ {
+/*?*/ // Darstellung schmal
+/*?*/ rXOut.GetOutDev()->SetDrawMode(nWasDrawMode | (
+/*?*/ DRAWMODE_GHOSTEDLINE|DRAWMODE_GHOSTEDFILL|DRAWMODE_GHOSTEDTEXT|DRAWMODE_GHOSTEDBITMAP|DRAWMODE_GHOSTEDGRADIENT));
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Darstellung normal
+/*N*/ rXOut.GetOutDev()->SetDrawMode(rInfoRec.nOriginalDrawMode);
+/*N*/ }
+/*N*/
+/*N*/ bOk = Paint(rXOut, rInfoRec, bRestoreColors, IMP_PAGEPAINT_NORMAL);
+/*N*/
+/*N*/ if(bIsEnteredGroup && bWasNotActive)
+/*N*/ {
+/*?*/ // Zurueck auf Ursprung, Zustand wieder verlassen
+/*?*/ ((SdrPaintInfoRec&)rInfoRec).bNotActive = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ // Darstellung restaurieren
+/*N*/ rXOut.GetOutDev()->SetDrawMode(nWasDrawMode);
+/*N*/
+/*N*/ return bOk;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrObjList::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec, FASTBOOL bRestoreColors, USHORT nImpMode) const
+/*N*/ {
+/*N*/ FASTBOOL bOk=TRUE;
+/*N*/ FASTBOOL bBrk=FALSE;
+/*N*/ ULONG nObjAnz=GetObjCount();
+/*N*/ if (nObjAnz==0) return TRUE;
+/*N*/ USHORT nEvent=rInfoRec.nBrkEvent;
+/*N*/ const SetOfByte* pVisiLayer=&rInfoRec.aPaintLayer;
+/*N*/ FASTBOOL bPrinter=rInfoRec.bPrinter;
+/*N*/ OutputDevice* pOut=rXOut.GetOutDev();
+/*N*/ Rectangle aCheckRect(rInfoRec.aCheckRect);
+/*N*/ FASTBOOL bDrawAll=aCheckRect.IsEmpty();
+/*N*/ ImpSdrHdcMerk aHDCMerk(*pOut,SDRHDC_SAVEPENANDBRUSHANDFONT,bRestoreColors);
+/*N*/ FASTBOOL bColorsDirty=FALSE;
+/*N*/ if (bDrawAll || aCheckRect.IsOver(GetAllObjBoundRect())) {
+/*N*/ Application* pAppPtr=NULL;
+/*N*/ if (nEvent!=0) pAppPtr=GetpApp();
+/*N*/ SetOfByte aPaintLayer(*pVisiLayer);
+/*N*/ USHORT nPaintCycles = 1;
+/*N*/ SdrLayerID nLayerId = 0;
+/*N*/
+/*N*/ // #85670# if pModel is NULL, try to get model of list owner
+/*N*/ SdrModel *pLocalModel = pModel;
+/*N*/ if(!pLocalModel && GetOwnerObj())
+/*N*/ pLocalModel = GetOwnerObj()->GetModel();
+/*N*/
+/*N*/ // #85670# use correct model to get layer ID
+/*N*/ if(pLocalModel)
+/*N*/ {
+/*N*/ const SdrLayerAdmin& rLayerAdmin = pLocalModel->GetLayerAdmin();
+/*N*/ nLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName(), FALSE);
+/*N*/ }
+/*N*/
+/*N*/ if( pPage == NULL || ( !pPage->IsMasterPage() && aPaintLayer.IsSet( nLayerId ) ) )
+/*N*/ {
+/*N*/ // Der ControlLayer soll gezeichnet werden
+/*N*/ // Wenn Controls existieren, wird der ControlLayer als letztes gezeichnet
+/*N*/ SetOfByte aTestLayerSet = aPaintLayer;
+/*N*/ aTestLayerSet.Clear(nLayerId);
+/*N*/
+/*N*/ if (!aTestLayerSet.IsEmpty())
+/*N*/ {
+/*N*/ // Es soll nicht nur der ControlLayer gezeichnet werden
+/*N*/ ULONG nObjNum=0;
+/*N*/ while (nObjNum<nObjAnz && nPaintCycles < 2)
+/*N*/ {
+/*N*/ if (GetObj(nObjNum)->GetLayer() == nLayerId)
+/*N*/ {
+/*N*/ // Objekt auf ControlLayer gefunden
+/*?*/ // Der ControlLayer wird ersteinmal unsichtbar geschaltet
+/*?*/ nPaintCycles = 2;
+/*?*/ aPaintLayer.Clear(nLayerId);
+/*N*/ }
+/*N*/
+/*N*/ nObjNum++;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ for (USHORT nCycle = 1; nCycle <= nPaintCycles; nCycle++)
+/*N*/ {
+/*N*/ USHORT nPaintImpMode = nImpMode;
+/*N*/ FASTBOOL bNormal = ( nPaintImpMode == IMP_PAGEPAINT_NORMAL );
+/*N*/ FASTBOOL bCachePrepare = ( nPaintImpMode == IMP_PAGEPAINT_PREPARE_CACHE );
+/*N*/ FASTBOOL bBGCachePrepare = ( nPaintImpMode == IMP_PAGEPAINT_PREPARE_BG_CACHE );
+/*N*/ FASTBOOL bCachePaint = ( nPaintImpMode == IMP_PAGEPAINT_PAINT_CACHE );
+/*N*/ FASTBOOL bBGCachePaint = ( nPaintImpMode == IMP_PAGEPAINT_PAINT_BG_CACHE );
+/*N*/ FASTBOOL bPaintFlag = ( bNormal || bCachePrepare || bBGCachePrepare );
+/*N*/
+/*N*/ if( nCycle == 2 )
+/*N*/ {
+/*N*/ // Im zweiten Durchgang nur den ControlLayer zeichnen
+/*?*/ aPaintLayer.ClearAll();
+/*?*/ aPaintLayer.Set(nLayerId);
+/*N*/ }
+/*N*/
+/*N*/ ULONG nObjNum = 0UL;
+/*N*/
+/*N*/ while( ( nObjNum < nObjAnz ) && !bBrk )
+/*N*/ {
+/*N*/ SdrObject* pObj = GetObj( nObjNum );
+/*N*/
+/*N*/ if( nObjNum == 0 && eListKind == SDROBJLIST_MASTERPAGE &&
+/*N*/ pPage && pPage->IsMasterPage() && rInfoRec.pPV )
+/*N*/ {
+/*?*/ // 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;
+/*?*/
+/*?*/ }
+/*N*/ }
+
+/*N*/ if( pObj && ( bDrawAll || aCheckRect.IsOver( pObj->GetBoundRect() ) ) )
+/*N*/ {
+/*N*/ SdrObjList* pSubList = pObj->GetSubList();
+/*N*/
+/*N*/ // Gruppenobjekte beruecksichtigen sichtbare Layer selbst (Ansonsten nur Painten, wenn Layer sichtbar)
+/*N*/ if( pSubList!=NULL || ((!bPrinter || pObj->IsPrintable()) && aPaintLayer.IsSet(pObj->GetLayer())) )
+/*N*/ {
+/*N*/ // #108937#
+/*N*/ // IsMasterCachable() does not visit groups automatically. Since
+/*N*/ // this mechanism should be changed to set information at the page
+/*N*/ // (counter?) later, i will fix that with a SdrObjListIter here.
+/*N*/ sal_Bool bHierarchyIsMasterPageCachable(pObj->IsMasterCachable());
+/*N*/
+/*N*/ if(bHierarchyIsMasterPageCachable && pObj->IsGroupObject())
+/*N*/ {
+/*N*/ SdrObjListIter aIter(*pObj, IM_DEEPNOGROUPS);
+/*N*/
+/*N*/ while(bHierarchyIsMasterPageCachable && aIter.IsMore())
+/*N*/ {
+/*N*/ SdrObject* pNestedObj = aIter.Next();
+/*N*/
+/*N*/ if(!pNestedObj->IsMasterCachable())
+/*N*/ {
+/*N*/ bHierarchyIsMasterPageCachable = sal_False;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bNormal && !bHierarchyIsMasterPageCachable)
+/*N*/ {
+/*?*/ if( bCachePrepare || bBGCachePrepare )
+/*?*/ bBrk = TRUE, bPaintFlag = FALSE;
+/*?*/ else if( bCachePaint || bBGCachePaint )
+/*?*/ {
+/*?*/ bPaintFlag = bNormal = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( bPaintFlag )
+/*N*/ {
+/*N*/ if( pObj->IsNeedColorRestore() )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ else
+/*N*/ bColorsDirty=TRUE; // andere aendern die Farben
+/*N*/
+/*N*/ if( rInfoRec.pPaintProc!=NULL )
+/*N*/ {
+/*?*/ SdrPaintProcRec aRec(pObj,rXOut,rInfoRec);
+/*?*/ Link aLink(*rInfoRec.pPaintProc);
+/*?*/ aLink.Call(&aRec); // sollte mal 'nen ReturnCode liefern
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bOk=pObj->Paint(rXOut,rInfoRec);
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Vector2D aTRScale;
+// double fTRShear;
+// double fTRRotate;
+// Vector2D aTRTranslate;
+// Matrix3D aOrigMat;
+// XPolyPolygon aTRPolyPolygon;
+//
+// BOOL bIsPath = pObj->TRGetBaseGeometry(aOrigMat, aTRPolyPolygon);
+// aOrigMat.DecomposeAndCorrect(aTRScale, fTRShear, fTRRotate, aTRTranslate);
+// Vector2D aVectorTranslate;
+// aVectorTranslate.X() = FRound(aTRTranslate.X());
+// aVectorTranslate.Y() = FRound(aTRTranslate.Y());
+//
+// Point aPoint(aVectorTranslate.X(), aVectorTranslate.Y());
+// Rectangle aTRBaseRect(
+// aPoint,
+// Size(FRound(aTRScale.X()), FRound(aTRScale.Y())));
+//
+// Color aLineColorMerk(rXOut.GetOutDev()->GetLineColor());
+// Color aFillColorMerk(rXOut.GetOutDev()->GetFillColor());
+// rXOut.GetOutDev()->SetFillColor();
+//
+// rXOut.GetOutDev()->SetLineColor(COL_BLACK);
+// rXOut.GetOutDev()->DrawRect(aTRBaseRect);
+//
+// if(bIsPath)
+// {
+// rXOut.GetOutDev()->SetLineColor(COL_LIGHTRED);
+// XPolyPolygon aTRPoPo(aTRPolyPolygon);
+// aTRPoPo.Move(aTRBaseRect.Left(), aTRBaseRect.Top());
+// sal_uInt16 nCount(aTRPoPo.Count());
+// for(sal_uInt16 a(0); a < nCount; a++)
+// rXOut.GetOutDev()->DrawPolygon(XOutCreatePolygon(aTRPoPo[a], rXOut.GetOutDev()));
+// }
+//
+// rXOut.GetOutDev()->SetLineColor(aLineColorMerk);
+// rXOut.GetOutDev()->SetFillColor(aFillColorMerk);
+//
+// static BOOL bDoTestSetAllGeometry(FALSE);
+// if(bDoTestSetAllGeometry)
+// pObj->TRSetBaseGeometry(aOrigMat, aTRPolyPolygon);
+//
+//
+//////////////////////////////////////////////////////////////////////////////
+/*N*/ }
+/*N*/
+/*N*/ // nach dem ersten Objekt bei reinem Hintergrundcache
+/*N*/ // sollen die folgenden Objekte natuerlich nicht gezeichnet werden
+/*N*/ if( bBGCachePrepare )
+/*N*/ bPaintFlag = FALSE;
+/*N*/ }
+/*N*/ else if( bBGCachePaint )
+/*N*/ bPaintFlag = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ if( bOk && nEvent != 0 )
+/*?*/ bOk = !pAppPtr->AnyInput( nEvent );
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ bBrk = TRUE;
+/*N*/ }
+/*N*/ nObjNum++;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if (bColorsDirty && bRestoreColors)
+/*N*/ aHDCMerk.Restore(*pOut);
+/*N*/
+/*N*/ return bOk;
+/*N*/ }
+
+
+
+/*N*/ void SdrObjList::ReformatAllTextObjects()
+/*N*/ {
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ ULONG nNum=0;
+/*N*/
+/*N*/ Printer* pPrinter = NULL;
+/*N*/
+/*N*/ if (pModel)
+/*N*/ {
+/*N*/ if (pModel->GetRefDevice() && pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+/*N*/ {
+/*N*/ // Kein RefDevice oder RefDevice kein Printer
+/*N*/ pPrinter = (Printer*) pModel->GetRefDevice();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ while (nNum<nAnz)
+/*N*/ {
+/*N*/ SdrObject* pObj = GetObj(nNum);
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (pPrinter &&
+/*N*/ pObj->GetObjInventor() == SdrInventor &&
+/*N*/ pObj->GetObjIdentifier() == OBJ_OLE2 &&
+/*N*/ !( (SdrOle2Obj*) pObj )->IsEmpty() )
+/*N*/ {
+/*?*/ const SvInPlaceObjectRef& xObjRef = ((SdrOle2Obj*) pObj)->GetObjRef();
+/*?*/
+/*?*/ if( xObjRef.Is() && ( xObjRef->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE ) )
+/*?*/ xObjRef->OnDocumentPrinterChanged(pPrinter);
+/*N*/ }
+/*N*/ #endif
+/*N*/
+/*N*/ pObj->ReformatText();
+/*N*/ nAnz=GetObjCount(); // ReformatText may delete an object
+/*N*/ nNum++;
+/*N*/ }
+/*N*/ }
+
+/** steps over all available objects and reformats all
+ edge objects that are connected to other objects so that
+ they may reposition itselfs.
+ #103122#
+*/
+/*N*/ void SdrObjList::ReformatAllEdgeObjects()
+/*N*/ {
+/*N*/ const sal_uInt32 nCount=GetObjCount();
+/*N*/ sal_uInt32 nObj;
+/*N*/
+/*N*/ for( nObj = 0; nObj < nCount; nObj++ )
+/*N*/ {
+/*N*/ SdrObject* pObj = GetObj(nObj);
+/*N*/ if( pObj->ISA(SdrEdgeObj) )
+/*N*/ static_cast<SdrEdgeObj*>(pObj)->Reformat();
+/*N*/ }
+/*N*/ }
+
+
+
+/*N*/ void SdrObjList::RestartAllAnimations(SdrPageView* pPageView) const
+/*N*/ {
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ ULONG nNum=0;
+/*N*/ while (nNum<nAnz) {
+/*N*/ GetObj(nNum)->RestartAnimation(pPageView);
+/*N*/ nNum++;
+/*N*/ }
+/*N*/ }
+
+/*N*/ ULONG SdrObjList::CountAllObjects() const
+/*N*/ {
+/*N*/ ULONG nCnt=GetObjCount();
+/*N*/ ULONG nAnz=nCnt;
+/*N*/ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+/*N*/ SdrObjList* pSubOL=GetObj(nNum)->GetSubList();
+/*N*/ if (pSubOL!=NULL) {
+/*N*/ nCnt+=pSubOL->CountAllObjects();
+/*N*/ }
+/*N*/ }
+/*N*/ return nCnt;
+/*N*/ }
+
+
+
+/*N*/ void SdrObjList::Save(SvStream& rOut) const
+/*N*/ {
+/*N*/ FASTBOOL bNotPersist=pPage!=NULL && pPage->IsObjectsNotPersistent();
+/*N*/ FASTBOOL bNoOLE=pModel!=NULL && pModel->IsStreamingSdrModel();
+/*N*/ if (!bNotPersist) {
+/*N*/ SdrObjListIter aIter(*this,IM_FLAT);
+/*N*/ while (aIter.IsMore()) {
+/*N*/ SdrObject* pObj=aIter.Next();
+/*N*/ FASTBOOL bThisObjNot=pObj->IsNotPersistent();
+/*N*/ if (!bThisObjNot && bNoOLE && pObj->ISA(SdrOle2Obj)) {
+/*N*/ bThisObjNot=TRUE;
+/*N*/ }
+/*N*/ if (!bThisObjNot) rOut<<*pObj;
+/*N*/ if (pModel!=NULL) pModel->IncProgress();
+/*N*/ }
+/*N*/ }
+/*N*/ SdrIOHeader(rOut,STREAM_WRITE,SdrIOEndeID); // Endemarke
+/*N*/ }
+
+/*N*/ void SdrObjList::Load(SvStream& rIn, SdrPage& rPage)
+/*N*/ {
+/*N*/ Clear();
+/*N*/
+/*N*/ if (rIn.GetError()!=0)
+/*N*/ return;
+/*N*/
+/*N*/ SdrInsertReason aReason(SDRREASON_STREAMING);
+/*N*/ FASTBOOL bEnde=FALSE;
+/*N*/
+/*N*/ while( rIn.GetError()==0 && !rIn.IsEof() && !bEnde )
+/*N*/ {
+/*N*/ SdrObjIOHeaderLookAhead aHead(rIn,STREAM_READ);
+/*N*/
+/*N*/ if (!aHead.IsEnde())
+/*N*/ {
+/*N*/ SdrObject* pObj=SdrObjFactory::MakeNewObject(aHead.nInventor,aHead.nIdentifier,&rPage);
+/*N*/
+/*N*/ if( pObj!=NULL )
+/*N*/ {
+/*N*/ rIn >> *pObj;
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( ( pObj->GetObjIdentifier() == OBJ_OLE2 ) && ( pObj->GetObjInventor() == SdrInventor ) )
+/*N*/ {
+/*N*/ // convert StarImage OLE objects to normal graphic objects
+/*N*/ SdrOle2Obj* pOLEObj = (SdrOle2Obj*) pObj;
+/*N*/ BOOL bImageOLE = FALSE;
+/*N*/
+/*N*/ if( pOLEObj->GetProgName() == String( RTL_CONSTASCII_USTRINGPARAM( "StarImage" ) ) )
+/*N*/ bImageOLE = TRUE;
+/*N*/ else if( pModel->GetPersist() )
+/*N*/ {
+/*N*/ SvInfoObjectRef xInfo( pModel->GetPersist()->Find( pOLEObj->GetPersistName() ) );
+/*N*/ const SvGlobalName aSim30Name( BF_SO3_SIM_CLASSID_30 );
+/*N*/ const SvGlobalName aSim40Name( BF_SO3_SIM_CLASSID_40 );
+/*N*/ const SvGlobalName aSim50Name( BF_SO3_SIM_CLASSID_50 );
+/*N*/
+/*N*/ if( xInfo.Is() &&
+/*N*/ ( xInfo->GetClassName() == aSim30Name ||
+/*N*/ xInfo->GetClassName() == aSim40Name ||
+/*N*/ xInfo->GetClassName() == aSim50Name ) )
+/*N*/ {
+/*N*/ bImageOLE = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( bImageOLE && pOLEObj->GetPersistName().Len() )
+/*N*/ {
+/*?*/ SotStorage* pModelStorage = pModel->GetModelStorage();
+/*?*/ const String aSimStorageName( pOLEObj->GetPersistName() );
+/*?*/
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ }
+#endif // SVX_LIGHT
+
+/*N*/ InsertObject(pObj,CONTAINER_APPEND,&aReason);
+/*N*/ }
+/*N*/ else
+/*N*/ { // aha, das wil keiner. Also ueberlesen.
+/*N*/ #ifdef SVX_LIGHT
+/*N*/ if( aHead.nInventor != FmFormInventor )
+/*N*/ {
+/*N*/ #endif
+/*N*/
+/*N*/ #ifdef DBG_UTIL
+/*?*/ ByteString aStr("SdrObjList::Load(): Zeichenobjekt kann von der Factory nicht erzeugt werden:\n");
+/*?*/ UINT32 nPos(GetObjCount());
+/*?*/
+/*?*/ aStr += "Listenposition: ";
+/*?*/ aStr += ByteString::CreateFromInt32( nPos );
+/*?*/ aStr += "\n";
+/*?*/ aStr += "Inventor: ";
+/*?*/ sal_Int32 nInv = SWAPLONG( aHead.nInventor );
+/*?*/ aStr += ByteString::CreateFromInt32( nInv );
+/*?*/ aStr += ", Identifier: ";
+/*?*/ aStr += ByteString::CreateFromInt32( aHead.nIdentifier );
+/*?*/ aStr += "\n";
+/*?*/ aStr += "FilePos: ";
+/*?*/ aStr += ByteString::CreateFromInt32( aHead.GetFilePos() );
+/*?*/ aStr += ", BlockSize: ";
+/*?*/ aStr += ByteString::CreateFromInt32( aHead.GetBlockSize() );
+/*?*/
+/*?*/ DBG_ERROR(aStr.GetBuffer());
+/*?*/ #endif
+/*?*/
+/*?*/ #ifdef SVX_LIGHT
+/*?*/ }
+/*?*/ #endif
+/*?*/ aHead.SkipRecord();
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bEnde=TRUE;
+/*N*/ aHead.SkipRecord(); // die Endemarke weglesen
+/*N*/ }
+/*N*/
+/*N*/ SdrModel* pMd=pModel;
+/*N*/
+/*N*/ if (pMd==NULL)
+/*N*/ pMd=rPage.GetModel();
+/*N*/
+/*N*/ if (pMd!=NULL)
+/*N*/ pMd->DoProgress(rIn.Tell());
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjList::AfterRead()
+/*N*/ {
+/*N*/ ULONG nAnz=GetObjCount();
+/*N*/ for (ULONG i=0; i<nAnz; i++) {
+/*N*/ GetObj(i)->AfterRead();
+/*N*/ }
+/*N*/ }
+
+/*?*/ void SdrObjList::FlattenGroups()
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*?*/ }
+
+/*?*/ void SdrObjList::UnGroupObj( ULONG nObjNum )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*?*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrMasterPageDescriptor& rMDP)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOMPgDID);
+/*N*/ rOut<<rMDP.nPgNum;
+/*N*/ rOut<<rMDP.aVisLayers;
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrMasterPageDescriptor& rMDP)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ rIn>>rMDP.nPgNum;
+/*N*/ rIn>>rMDP.aVisLayers;
+/*N*/ return rIn;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrMasterPageDescriptorList::Clear()
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ delete GetObject(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrMasterPageDescriptorList& rMPDL)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOMPDLID);
+/*N*/ USHORT nAnz=rMPDL.GetCount();
+/*N*/ rOut<<nAnz;
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ rOut<<rMPDL[i];
+/*N*/ }
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrMasterPageDescriptorList& rMPDL)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ rMPDL.Clear();
+/*N*/ USHORT nAnz;
+/*N*/ rIn>>nAnz;
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ SdrMasterPageDescriptor* pMPD=new SdrMasterPageDescriptor;
+/*N*/ rIn>>*pMPD;
+/*N*/ rMPDL.aList.Insert(pMPD,CONTAINER_APPEND);
+/*N*/ }
+/*N*/ return rIn;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPageGridFrameList::Clear()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT1(SdrPage,SdrObjList);
+
+/*N*/ SdrPage::SdrPage(SdrModel& rNewModel, FASTBOOL bMasterPage):
+/*N*/ SdrObjList(&rNewModel,this),
+/*N*/ pBackgroundObj( NULL )
+/*N*/ {
+/*N*/ pLayerAdmin=new SdrLayerAdmin(&rNewModel.GetLayerAdmin());
+/*N*/ bMaster=bMasterPage;
+/*N*/ bInserted=FALSE;
+/*N*/ aPrefVisiLayers.SetAll();
+/*N*/ nWdt=10;
+/*N*/ nHgt=10;
+/*N*/ nBordLft=0;
+/*N*/ nBordUpp=0;
+/*N*/ nBordRgt=0;
+/*N*/ nBordLwr=0;
+/*N*/ nPageNum=0;
+/*N*/ eListKind=bMasterPage ? SDROBJLIST_MASTERPAGE : SDROBJLIST_DRAWPAGE;
+/*N*/ bSwappingLocked=FALSE;
+/*N*/ bObjectsNotPersistent=FALSE;
+/*N*/ }
+
+/*?*/ 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;
+/*?*/ }
+
+/*N*/ SdrPage::~SdrPage()
+/*N*/ {
+/*N*/ delete pBackgroundObj;
+/*N*/ delete pLayerAdmin;
+/*N*/ }
+
+
+
+
+
+/*N*/ void SdrPage::SetSize(const Size& aSiz)
+/*N*/ {
+/*N*/ nWdt=aSiz.Width();
+/*N*/ nHgt=aSiz.Height();
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+/*N*/ Size SdrPage::GetSize() const
+/*N*/ {
+/*N*/ return Size(nWdt,nHgt);
+/*N*/ }
+
+/*N*/ INT32 SdrPage::GetWdt() const
+/*N*/ {
+/*N*/ return nWdt;
+/*N*/ }
+
+/*N*/ void SdrPage::SetOrientation(Orientation eOri)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+/*N*/ INT32 SdrPage::GetHgt() const
+/*N*/ {
+/*N*/ return nHgt;
+/*N*/ }
+
+/*N*/ void SdrPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr)
+/*N*/ {
+/*N*/ nBordLft=nLft;
+/*N*/ nBordUpp=nUpp;
+/*N*/ nBordRgt=nRgt;
+/*N*/ nBordLwr=nLwr;
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+/*N*/ void SdrPage::SetLftBorder(INT32 nBorder)
+/*N*/ {
+/*N*/ nBordLft=nBorder;
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+/*N*/ void SdrPage::SetUppBorder(INT32 nBorder)
+/*N*/ {
+/*N*/ nBordUpp=nBorder;
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+/*N*/ void SdrPage::SetRgtBorder(INT32 nBorder)
+/*N*/ {
+/*N*/ nBordRgt=nBorder;
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+/*N*/ void SdrPage::SetLwrBorder(INT32 nBorder)
+/*N*/ {
+/*N*/ nBordLwr=nBorder;
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+/*N*/ INT32 SdrPage::GetLftBorder() const
+/*N*/ {
+/*N*/ return nBordLft;
+/*N*/ }
+
+/*N*/ INT32 SdrPage::GetUppBorder() const
+/*N*/ {
+/*N*/ return nBordUpp;
+/*N*/ }
+
+/*N*/ INT32 SdrPage::GetRgtBorder() const
+/*N*/ {
+/*N*/ return nBordRgt;
+/*N*/ }
+
+/*N*/ INT32 SdrPage::GetLwrBorder() const
+/*N*/ {
+/*N*/ return nBordLwr;
+/*N*/ }
+
+// #i3694#
+// This GetOffset() method is not needed anymore, it even leads to errors.
+//Point SdrPage::GetOffset() const
+//{
+// return Point();
+//}
+
+/*N*/ void SdrPage::SetModel(SdrModel* pNewModel)
+/*N*/ {
+/*N*/ SdrModel* pOldModel=pModel;
+/*N*/ SdrObjList::SetModel(pNewModel);
+/*N*/ if (pNewModel!=pOldModel)
+/*N*/ {
+/*?*/ if (pNewModel!=NULL) {
+/*?*/ pLayerAdmin->SetParent(&pNewModel->GetLayerAdmin());
+/*?*/ } else {
+/*?*/ pLayerAdmin->SetParent(NULL);
+/*?*/ }
+/*?*/ pLayerAdmin->SetModel(pNewModel);
+/*?*/
+/*?*/ if( pBackgroundObj )
+/*?*/ pBackgroundObj->SetModel( pNewModel );
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ USHORT SdrPage::GetPageNum() const
+/*N*/ {
+/*N*/ if (!bInserted) return 0;
+/*N*/ if (bMaster) {
+/*N*/ if (pModel && pModel->IsMPgNumsDirty())
+/*N*/ ((SdrModel*)pModel)->RecalcPageNums(TRUE);
+/*N*/ } else {
+/*N*/ if (pModel && pModel->IsPagNumsDirty())
+/*N*/ ((SdrModel*)pModel)->RecalcPageNums(FALSE);
+/*N*/ }
+/*N*/ return nPageNum;
+/*N*/ }
+
+/*N*/ void SdrPage::SetChanged()
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ pModel->SetChanged();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPage::SendRepaintBroadcast() const
+/*N*/ {
+/*N*/ if (bInserted && pModel!=NULL) pModel->Broadcast(SdrHint(*this));
+/*N*/ }
+
+
+/*N*/ void SdrPage::InsertMasterPage(USHORT nPgNum, USHORT nPos)
+/*N*/ {
+/*N*/ aMasters.Insert(nPgNum,nPos);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+/*?*/ void SdrPage::InsertMasterPage(const SdrMasterPageDescriptor& rMPD, USHORT nPos)
+/*?*/ {
+/*?*/ aMasters.Insert(rMPD,nPos);
+/*?*/ SetChanged();
+/*?*/ SendRepaintBroadcast();
+/*?*/ }
+
+/*N*/ void SdrPage::RemoveMasterPage(USHORT nPos)
+/*N*/ {
+/*N*/ if (nPos<aMasters.GetCount()) {
+/*N*/ aMasters.Remove(nPos);
+/*N*/ SetChanged();
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPage::MoveMasterPage(USHORT nPos, USHORT nNewPos)
+/*N*/ {
+/*N*/ if (nPos<aMasters.GetCount()) {
+/*N*/ aMasters.Move(nPos,nNewPos);
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+/*N*/ }
+
+/*?*/ SdrPage* SdrPage::GetMasterPage(USHORT nPos) const
+/*?*/ {
+/*?*/ USHORT nPgNum=GetMasterPageNum(nPos);
+/*?*/ SdrPage* pPg=NULL;
+/*?*/ if( pModel )
+/*?*/ pPg = pModel->GetMasterPage(nPgNum);
+/*?*/ return pPg;
+/*?*/ }
+
+
+/*N*/ void SdrPage::SetMasterPageVisibleLayers(const SetOfByte& rVL, USHORT nPos)
+/*N*/ {
+/*N*/ aMasters[nPos].SetVisibleLayers(rVL);
+/*N*/ SendRepaintBroadcast();
+/*N*/ }
+
+
+
+/*N*/ void SdrPage::ImpMasterPageRemoved(USHORT nMasterPageNum)
+/*N*/ {
+/*N*/ USHORT nMasterAnz=GetMasterPageCount();
+/*N*/ for (USHORT nm=nMasterAnz; nm>0;) {
+/*N*/ nm--;
+/*N*/ USHORT nNum=aMasters[nm].GetPageNum();
+/*N*/ if (nNum==nMasterPageNum) { RemoveMasterPage(nm); SendRepaintBroadcast(); }
+/*N*/ if (nNum>nMasterPageNum) {
+/*N*/ // Hintere anpassen wegen Verschiebung durch entfernen
+/*?*/ aMasters[nm].SetPageNum(USHORT(nNum-1));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPage::ImpMasterPageMoved(USHORT nMasterPageNum, USHORT nNewMasterPageNum)
+/*N*/ {
+/*N*/ USHORT nMasterAnz=GetMasterPageCount();
+/*N*/ for (USHORT nm=nMasterAnz; nm>0;) {
+/*N*/ nm--;
+/*N*/ USHORT nNum=aMasters[nm].GetPageNum();
+/*N*/ if (nNum==nMasterPageNum) {
+/*N*/ aMasters[nm].SetPageNum(nNewMasterPageNum);
+/*N*/ } else {
+/*N*/ // Hintere anpassen wegen Verschiebung durch entfernen und einfuegen
+/*N*/ USHORT nNeuNum=nNum;
+/*N*/ if (nNeuNum>nMasterPageNum) nNeuNum--;
+/*N*/ if (nNeuNum>=nNewMasterPageNum) nNeuNum++;
+/*N*/ aMasters[nm].SetPageNum(nNeuNum);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPage::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return;
+/*N*/ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrPage");
+/*N*/ #endif
+/*N*/
+/*N*/ if (rHead.GetVersion()>=11) {
+/*N*/ // damit ich meine eigenen SubRecords erkenne (ab V11)
+/*N*/ char cMagic[4];
+/*N*/ if (rIn.Read(cMagic,4)!=4 || memcmp(cMagic,SdrIOJoeMagic,4)!=0) {
+/*?*/ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
+/*?*/ return;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ { // MiscellaneousData ab V11 eingepackt
+/*N*/ SdrDownCompat* pPageMiscCompat=NULL;
+/*N*/ if (rHead.GetVersion()>=11) {
+/*N*/ pPageMiscCompat=new SdrDownCompat(rIn,STREAM_READ);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ pPageMiscCompat->SetID("SdrPage(Miscellaneous)");
+/*N*/ #endif
+/*N*/ }
+/*N*/ rIn>>nWdt;
+/*N*/ rIn>>nHgt;
+/*N*/ rIn>>nBordLft;
+/*N*/ rIn>>nBordUpp;
+/*N*/ rIn>>nBordRgt;
+/*N*/ rIn>>nBordLwr;
+/*N*/ USHORT n;
+/*N*/ rIn>>n; //aName;
+/*N*/ if (pPageMiscCompat!=NULL) {
+/*N*/ delete pPageMiscCompat;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ FASTBOOL bEnde=FALSE;
+/*N*/ while (rIn.GetError()==0 && !rIn.IsEof() && !bEnde) {
+/*N*/ SdrIOHeaderLookAhead aHead(rIn); // Layerdefinitionen lesen
+/*N*/ if (aHead.IsID(SdrIOLayrID)) {
+/*?*/ SdrLayer* pLay=new SdrLayer; // Layerdefinition lesen
+/*?*/ rIn>>*pLay;
+/*?*/ pLayerAdmin->InsertLayer(pLay);
+/*N*/ } else
+/*N*/ if (aHead.IsID(SdrIOLSetID)) {
+/*?*/ SdrLayerSet* pSet=new SdrLayerSet; // Layersetdefinition lesen
+/*?*/ rIn>>*pSet;
+/*?*/ pLayerAdmin->InsertLayerSet(pSet);
+/*N*/ } else
+/*N*/ // Fuer den Fall der Faelle kann hier ww. MPgDscr oder MPgDscrList stehen
+/*N*/ if (aHead.IsID(SdrIOMPgDID)) { // Masterpagedescriptor
+/*?*/ SdrMasterPageDescriptor aDscr;
+/*?*/ rIn>>aDscr;
+/*?*/ aMasters.Insert(aDscr);
+/*N*/ } else
+/*N*/ if (aHead.IsID(SdrIOMPDLID)) { // MasterpagedescriptorList
+/*N*/ SdrMasterPageDescriptorList aDscrList;
+/*N*/ rIn>>aDscrList;
+/*N*/ USHORT nAnz=aDscrList.GetCount();
+/*N*/ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+/*N*/ aMasters.Insert(aDscrList[nNum]);
+/*N*/ }
+/*N*/ } else bEnde=TRUE;
+/*N*/ }
+/*N*/
+/*N*/ if (rHead.GetVersion()>=1) {
+/*N*/ } else {
+/*?*/ USHORT nMaAnz=0,i;
+/*?*/ rIn>>nMaAnz;
+/*?*/ for (i=0; i<nMaAnz; i++) {
+/*?*/ USHORT nMaPgNum;
+/*?*/ rIn>>nMaPgNum;
+/*?*/ InsertMasterPage(nMaPgNum);
+/*N*/ }
+/*N*/ }
+/*N*/ SdrObjList::Load(rIn,*this); // Liste der Objekte lesen
+/*N*/
+/*N*/ if ( rHead.GetVersion() >= 16 )
+/*N*/ {
+/*N*/ BOOL bBackgroundObj = FALSE;
+/*N*/ rIn >> bBackgroundObj;
+/*N*/ if( bBackgroundObj )
+/*N*/ {
+/*N*/ SdrObjIOHeaderLookAhead aHead( rIn,STREAM_READ );
+/*N*/ if ( !aHead.IsEnde() )
+/*N*/ {
+/*N*/ pBackgroundObj = SdrObjFactory::MakeNewObject( aHead.nInventor, aHead.nIdentifier, this );
+/*N*/ if ( bBackgroundObj )
+/*N*/ rIn >> *pBackgroundObj;
+/*N*/ }
+/*N*/ else
+/*?*/ aHead.SkipRecord(); // skip end mark
+/*N*/ }
+/*N*/ }
+/*N*/
+ // #88340#
+/*N*/ if(!aMasters.GetCount() && !IsMasterPage())
+/*N*/ {
+/*N*/ if(pModel && pModel->GetMasterPageCount() > 2)
+/*N*/ {
+/*N*/ // This is not allowed. Create a dummy entry
+/*N*/ // to compensate this error.
+/*?*/ SdrMasterPageDescriptor aDscr(1/*PageMaster*/);
+/*?*/ aMasters.Insert(aDscr);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ SdrMasterPageDescriptor aDscr(0);
+/*N*/ aMasters.Insert(aDscr);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPage::WriteData(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aCompat.SetID("SdrPage");
+/*N*/ #endif
+/*N*/ rOut.Write(SdrIOJoeMagic,4); // damit ich meine eigenen SubRecords erkenne (ab V11)
+/*N*/ { // MiscellaneousData ab V11 eingepackt
+/*N*/ SdrDownCompat aPageMiscCompat(rOut,STREAM_WRITE);
+/*N*/ #ifdef DBG_UTIL
+/*N*/ aPageMiscCompat.SetID("SdrPage(Miscellaneous)");
+/*N*/ #endif
+/*N*/ rOut<<nWdt;
+/*N*/ rOut<<nHgt;
+/*N*/ rOut<<nBordLft;
+/*N*/ rOut<<nBordUpp;
+/*N*/ rOut<<nBordRgt;
+/*N*/ rOut<<nBordLwr;
+/*N*/ USHORT n=0;
+/*N*/ rOut<<n; //rPg.aName;
+/*N*/ }
+/*N*/
+/*N*/ USHORT i; // Lokale Layerdefinitionen der Seite
+/*N*/ for (i=0; i<pLayerAdmin->GetLayerCount(); i++) {
+/*?*/ rOut<<*pLayerAdmin->GetLayer(i);
+/*N*/ }
+/*N*/ for (i=0; i<pLayerAdmin->GetLayerSetCount(); i++) {
+/*?*/ rOut<<*pLayerAdmin->GetLayerSet(i);
+/*N*/ }
+/*N*/
+/*N*/ rOut<<aMasters;
+/*N*/ SdrObjList::Save(rOut);
+/*N*/
+/*N*/ BOOL bBackgroundObj = pBackgroundObj ? TRUE : FALSE;
+/*N*/ rOut << bBackgroundObj;
+/*N*/ if( pBackgroundObj )
+/*N*/ rOut << *pBackgroundObj;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrPage& rPg)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ rPg.ReadData(aHead,rIn);
+/*N*/ return rIn;
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrPage& rPg)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,!rPg.bMaster ? SdrIOPageID : SdrIOMaPgID);
+/*N*/ rPg.WriteData(rOut);
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ XubString SdrPage::GetLayoutName() const
+/*N*/ {
+/*N*/ // Die wollte Dieter haben.
+/*N*/ return String();
+/*N*/ }
+
+/*N*/ void SdrPage::SetBackgroundObj( SdrObject* pObj )
+/*N*/ {
+/*N*/ if ( pObj )
+/*N*/ {
+/*N*/ pObj->SetPage( this );
+/*N*/ pObj->SetModel( pModel );
+/*N*/ pObj->SetLayer( 1 ); // Nothing known about the backgroundlayer...
+/*N*/ }
+/*N*/ delete pBackgroundObj, pBackgroundObj = pObj;
+/*N*/ }
+
+/*N*/ void SdrPage::SetInserted( FASTBOOL bIns )
+/*N*/ {
+/*N*/ if( bInserted != bIns )
+/*N*/ {
+/*N*/ bInserted = bIns;
+/*N*/
+/*N*/ SdrObjListIter aIter( *this, IM_FLAT );
+/*N*/ while ( aIter.IsMore() )
+/*N*/ {
+/*N*/ SdrObject* pObj = aIter.Next();
+/*N*/ if ( pObj->ISA(SdrOle2Obj) )
+/*N*/ {
+/*N*/ if( bInserted )
+/*N*/ ( (SdrOle2Obj*) pObj)->Connect();
+/*N*/ else
+/*N*/ ( (SdrOle2Obj*) pObj)->Disconnect();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ uno::Reference< uno::XInterface > SdrPage::getUnoPage()
+/*N*/ {
+/*N*/ // try weak reference first
+/*N*/ uno::Reference< uno::XInterface > xPage( mxUnoPage );
+/*N*/
+/*N*/ if( !xPage.is() )
+/*N*/ {
+/*N*/ // create one
+/*N*/ xPage = createUnoPage();
+/*N*/
+/*N*/ mxUnoPage = xPage;
+/*N*/ }
+/*N*/
+/*N*/ return xPage;
+/*N*/ }
+
+/*N*/ uno::Reference< uno::XInterface > SdrPage::createUnoPage()
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt =
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ static_cast<cppu::OWeakObject*>( new SvxFmDrawPage( this ) );
+/*N*/ #else
+/*N*/ static_cast<cppu::OWeakObject*>( new SvxDrawPage( this ) );
+/*N*/ #endif
+/*N*/ return xInt;
+/*N*/ }
+
+/*N*/ SfxStyleSheet* SdrPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
+/*N*/ {
+/*N*/ return pObj->GetStyleSheet();
+/*N*/ }
+
+
+/** returns an averaged background color of this page */
+/*N*/ Color SdrPage::GetBackgroundColor( SdrPageView* pView ) const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); Color aColor; return aColor;
+/*N*/ }
+
+/** *deprecated, use GetBackgroundColor with SdrPageView */
+/*N*/ Color SdrPage::GetBackgroundColor() const
+/*N*/ {
+/*N*/ return GetBackgroundColor( NULL );
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdpagv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdpagv.cxx
new file mode 100644
index 000000000000..5df7b88a5f5a
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdpagv.cxx
@@ -0,0 +1,911 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/awt/PosSize.hpp>
+
+#include <toolkit/helper/vclunohelper.hxx>
+
+
+#include "svdpagv.hxx"
+#include "svdouno.hxx"
+#include "svdpage.hxx"
+#include "svdio.hxx"
+#include "svdview.hxx"
+#include "svditer.hxx"
+#include "svdogrp.hxx"
+
+#include "svdoole2.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+/*N*/ TYPEINIT1(SdrPageView, SfxListener);
+
+
+// Klasse muß als listener fungieren, um den Zustand, ob ein Object sichtbar ist oder nicht
+// festzuhalten
+//------------------------------------------------------------------------------
+/*N*/ SdrUnoControlRec::SdrUnoControlRec(SdrUnoControlList* _pParent, SdrUnoObj* _pObj, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > _xControl) throw()
+/*N*/ :pObj(_pObj)
+/*N*/ ,xControl(_xControl)
+/*N*/ ,bVisible(TRUE)
+/*N*/ ,bIsListening(FALSE)
+/*N*/ ,bDisposed(FALSE)
+/*N*/ ,pParent(_pParent)
+/*N*/ ,mnPaintLevel( 0 )
+/*N*/ {
+/*N*/ DBG_ASSERT( xControl.is(), "SdrUnoControlRec::SdrUnoControlRec: invalid control, this will crash!" );
+/*N*/
+/*N*/ bVisible = xControl.is() ? !xControl->isDesignMode() : TRUE;
+/*N*/ bool bOldVisible = bVisible;
+/*N*/
+/*N*/ // if bVisible is TRUE here, then switchControlListening will also start
+/*N*/ // DesignModeListening
+/*N*/ switchControlListening( true );
+/*N*/
+/*N*/ // adjust the initial visibility according to the visibility of the layer
+/*N*/ // 2003-06-03 - #110592# - fs@openoffice.org
+/*N*/ adjustControlVisibility( true );
+/*N*/
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ SdrUnoControlRec::~SdrUnoControlRec() throw()
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*?*/ void SdrUnoControlRec::adjustControlVisibility( bool _bForce )
+/*?*/ {{DBG_BF_ASSERT(0, "STRIP");}//STRIP001
+/*?*/ }
+
+//------------------------------------------------------------------------------
+/*?*/ void SdrUnoControlRec::switchControlListening( bool _bStart )
+/*?*/ {{DBG_BF_ASSERT(0, "STRIP");}//STRIP001
+/*?*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void SAL_CALL SdrUnoControlRec::disposing( const ::com::sun::star::lang::EventObject& Source )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ uno::Reference< awt::XControl > xSource( Source.Source, uno::UNO_QUERY);
+/*N*/ if (xSource.is())
+/*?*/ { {DBG_BF_ASSERT(0, "STRIP");}//STRIP001 // it's the control we're responsible for
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------------------
+
+// XWindowListener
+/*N*/ void SAL_CALL SdrUnoControlRec::windowResized( const ::com::sun::star::awt::WindowEvent& e )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SAL_CALL SdrUnoControlRec::windowMoved( const ::com::sun::star::awt::WindowEvent& e )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SAL_CALL SdrUnoControlRec::windowShown( const ::com::sun::star::lang::EventObject& e )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void SAL_CALL SdrUnoControlRec::windowHidden( const ::com::sun::star::lang::EventObject& e )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+// XPropertyChangeListener
+//------------------------------------------------------------------------------
+/*N*/ void SAL_CALL SdrUnoControlRec::propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+// XImageConsumer
+//------------------------------------------------------------------------------
+/*N*/ void SAL_CALL SdrUnoControlRec::complete( sal_Int32 Status, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer >& xProducer )
+/*N*/ throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void SAL_CALL SdrUnoControlRec::init( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException)
+/*N*/ {
+/*N*/ }
+
+/*N*/ 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)
+/*N*/ {
+/*N*/ }
+
+/*N*/ 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)
+/*N*/ {
+/*N*/ }
+
+/*N*/ 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)
+/*N*/ {
+/*N*/ }
+
+//------------------------------------------------------------------------------
+/*?*/ void SAL_CALL SdrUnoControlRec::modeChanged( const util::ModeChangeEvent& _rSource ) throw (uno::RuntimeException)
+/*?*/ {{DBG_BF_ASSERT(0, "STRIP");}//STRIP001
+/*?*/ }
+
+//------------------------------------------------------------------------------
+/*N*/ void SdrUnoControlRec::Clear(BOOL bDispose)
+/*N*/ {
+/*N*/ if (xControl.is())
+/*N*/ {
+/*N*/ switchControlListening( false );
+/*N*/
+/*N*/ if (bDispose)
+/*?*/ xControl->dispose();
+/*N*/ xControl = NULL;
+/*N*/ }
+/*N*/ }
+
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/ SV_IMPL_OP_PTRARR_SORT( SdrUnoControlAccessArr, SdrUnoControlAccessPtr )
+
+//------------------------------------------------------------------------
+/*N*/ SdrUnoControlRec* SdrUnoControlList::GetObject(USHORT i) const
+/*N*/ {
+/*N*/ SdrUnoControlAccess* pAccess = aAccessArr[i];
+/*N*/ return pAccess->pControlRec;
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ void SdrUnoControlList::Clear(BOOL bDispose)
+/*N*/ {
+/*N*/ for( USHORT i=aAccessArr.Count(); i > 0; )
+/*N*/ Delete(--i, bDispose);
+/*N*/
+/*N*/ DBG_ASSERT(!aList.Count(), "SdrUnoControlList::Clear(BOOL bDispose): List not empty");
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ void SdrUnoControlList::Insert(SdrUnoControlRec* pRec)
+/*N*/ {
+/*N*/ aList.Insert( pRec, LIST_APPEND );
+/*N*/ pRec->acquire();
+/*N*/
+/*N*/ SdrUnoControlAccess* pAccess = new SdrUnoControlAccess(pRec->GetControl()->getModel(), pRec);
+/*N*/ aAccessArr.Insert( pAccess );
+/*N*/ }
+
+//------------------------------------------------------------------------
+/*N*/ void SdrUnoControlList::Delete(USHORT nPos, BOOL bDispose)
+/*N*/ {
+/*N*/ SdrUnoControlAccess* pAccess = aAccessArr[nPos];
+/*N*/ SdrUnoControlRec* pRec = pAccess->pControlRec;
+/*N*/
+/*N*/ aList.Remove( pRec );
+/*N*/ aAccessArr.Remove( nPos );
+/*N*/
+/*N*/ // Rec laeßt alles los und wird anschließend zerstoert
+/*N*/ pRec->Clear(bDispose);
+/*N*/
+/*N*/ pRec->release();
+/*N*/ delete pAccess;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+//------------------------------------------------------------------------
+
+//------------------------------------------------------------------------
+
+//------------------------------------------------------------------------
+/*N*/ USHORT SdrUnoControlList::Find(uno::Reference< awt::XControlModel > rUnoControlModel) const
+/*N*/ {
+/*N*/ SdrUnoControlAccess aAccess(rUnoControlModel);
+/*N*/ USHORT nPos;
+/*N*/ if( !aAccessArr.Seek_Entry(&aAccess, &nPos) )
+/*N*/ return SDRUNOCONTROL_NOTFOUND;
+/*N*/
+/*N*/ return nPos;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/ void SdrPageViewWinList::Clear()
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ delete GetObject(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+/*N*/ USHORT SdrPageViewWinList::Find(OutputDevice* pOut) const
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ USHORT nRet=SDRPAGEVIEWWIN_NOTFOUND;
+/*N*/ for (USHORT nNum=0; nNum<nAnz && nRet==SDRPAGEVIEWWIN_NOTFOUND; nNum++) {
+/*N*/ if (GetObject(nNum)->MatchOutputDevice(pOut))
+/*N*/ nRet=nNum;
+/*N*/ }
+/*N*/ return nRet;
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/*N*/ SdrPageViewWinRec::SdrPageViewWinRec(SdrPageView& rNewPageView, OutputDevice* pOut)
+/*N*/ :rView( rNewPageView.GetView() )
+/*N*/ ,pOutDev( pOut )
+/*N*/ ,aControlList( rNewPageView )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SdrPageViewWinRec::~SdrPageViewWinRec()
+/*N*/ {
+/*N*/ if (xControlContainer.is())
+/*N*/ {
+/*N*/ // notify derived views
+/*N*/ rView.RemoveControlContainer(xControlContainer);
+/*N*/
+/*N*/ // clear the control place holders
+/*N*/ aControlList.Clear(FALSE);
+/*N*/
+/*N*/ // dispose the control container
+/*N*/ uno::Reference< lang::XComponent > xComponent(xControlContainer, uno::UNO_QUERY);
+/*N*/ xComponent->dispose();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPageViewWinRec::CreateControlContainer()
+/*N*/ {
+/*N*/ if (!xControlContainer.is())
+/*N*/ {
+/*N*/ if (pOutDev && pOutDev->GetOutDevType() == OUTDEV_WINDOW &&
+/*N*/ !rView.IsPrintPreview())
+/*N*/ {
+/*N*/ Window* pWindow = (Window*) pOutDev;
+/*N*/ xControlContainer = VCLUnoHelper::CreateControlContainer( pWindow );
+
+ // #100394# xC->setVisible triggers window->Show() and this has
+ // problems when the view is not completely constructed which may
+ // happen when loading. This leads to accessibility broadcasts which
+ // throw asserts due to the not finished view. All this chan be avoided
+ // since xC->setVisible is here called only for the side effect in
+ // UnoControlContainer::setVisible(...) which calls createPeer(...).
+ // This will now be called directly from here.
+
+ // UnoContainerModel erzeugen
+ // uno::Reference< awt::XWindow > xC(xControlContainer, uno::UNO_QUERY);
+ // CreateControlContainer() is only used from
+ // , thus it seems not necessary to make
+ // it visible her at all.
+ // #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();
+ // if( !mxContext.is() && bVisible )
+ // // Es ist ein TopWindow, also automatisch anzeigen
+ // createPeer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > (), ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > () );
+
+/*N*/ uno::Reference< awt::XControl > xControl(xControlContainer, uno::UNO_QUERY);
+/*N*/ if(xControl.is())
+/*N*/ {
+/*N*/ uno::Reference< uno::XInterface > xContext = xControl->getContext();
+/*N*/ if(!xContext.is())
+/*N*/ {
+/*N*/ xControl->createPeer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > (),
+/*N*/ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > () );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ // Printer und VirtualDevice, bzw. kein OutDev
+/*?*/ uno::Reference< lang::XMultiServiceFactory > xFactory( ::legacy_binfilters::getLegacyProcessServiceFactory() );
+/*?*/ 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);
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ rView.InsertControlContainer(xControlContainer);
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrPageViewWinRec::MatchOutputDevice(OutputDevice* pOut) const
+/*N*/ {
+/*N*/ BOOL bMatch = FALSE;
+/*N*/
+/*N*/ if (pOutDev == pOut)
+/*N*/ {
+/*N*/ bMatch = TRUE;
+/*N*/ }
+/*N*/
+/*N*/ return (bMatch);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ DBG_NAME(SdrPageView)
+
+
+/*N*/ SdrPageView::SdrPageView(SdrPage* pPage1, const Point& rOffs, SdrView& rNewView):
+/*N*/ rView(rNewView),
+/*N*/ //aRedraw(1024,16,16),
+/*N*/ aOfs(rOffs),
+/*N*/ pPaintingPageObj( NULL ),
+/*N*/ maDocumentColor( COL_AUTO ) // #103911# col_auto color lets the view takes the default SvxColorConfig entry
+/*N*/ {
+/*N*/ DBG_CTOR(SdrPageView,NULL);
+/*N*/ pDragPoly0=new XPolyPolygon;
+/*N*/ pDragPoly=new XPolyPolygon;
+/*N*/ pWinList=new SdrPageViewWinList;
+/*N*/ pPage=pPage1;
+/*N*/ if (pPage!=NULL) {
+/*N*/ aPgOrg.X()=pPage->GetLftBorder();
+/*N*/ aPgOrg.Y()=pPage->GetUppBorder();
+/*N*/ }
+/*N*/ // aOut.SetOutDev(rView.pWin);
+/*N*/ // aOut.SetOffset(rOffs);
+/*N*/ // eDrwStat=RS_READY;
+/*N*/ bHasMarked=FALSE;
+/*N*/ //aDragPoly.Clear();
+/*N*/ aLayerVisi.SetAll();
+/*N*/ aLayerPrn.SetAll();
+/*N*/ bVisible=FALSE;
+/*N*/
+/*N*/ pAktList = NULL;
+/*N*/ pAktGroup = NULL;
+/*N*/ SetAktGroupAndList(NULL, pPage);
+/*N*/
+/*N*/ StartListening(*rNewView.GetModel());
+/*N*/ USHORT nWinAnz=rNewView.GetWinCount();
+/*N*/ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+/*N*/ AddWin(rNewView.GetWin(nWinNum));
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ SdrPageView::~SdrPageView()
+/*N*/ {
+/*N*/ if (rView.GetModel()->GetPaintingPageView() == this)
+/*N*/ {
+ // Abmelden
+/*?*/ rView.GetModel()->SetPaintingPageView(NULL);
+/*N*/ }
+/*N*/
+/*N*/ DBG_DTOR(SdrPageView,NULL);
+/*N*/ delete pWinList;
+/*N*/ delete pDragPoly0;
+/*N*/ delete pDragPoly;
+/*N*/ }
+
+/*N*/ SdrPageViewWinRec* SdrPageView::ImpMakePageViewWinRec(OutputDevice* pOut)
+/*N*/ {
+/*N*/ // MIB 3.7.08: Das WinRec muss sofort in die Liste eingetragen werden,
+/*N*/ // weil sich das InsertControlContainer darauf verlaesst
+/*N*/ SdrPageViewWinRec* pRec = new SdrPageViewWinRec( *this, pOut );
+/*N*/ pWinList->Insert(pRec);
+/*N*/
+/*N*/ ULONG nObjAnz=pPage!=NULL?pPage->GetObjCount():0;
+/*N*/
+/*N*/ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++)
+/*N*/ {
+/*N*/ SdrObject* pObj = pPage->GetObj(nObjNum);
+/*N*/
+/*N*/ if (pObj->IsUnoObj())
+/*N*/ {
+/*N*/ SdrUnoObj* pSdrUnoObj = PTR_CAST(SdrUnoObj, pObj);
+/*N*/ ImpInsertControl(pSdrUnoObj, pRec);
+/*N*/ }
+/*N*/ else if (pObj->GetObjIdentifier() == OBJ_GRUP &&
+/*N*/ pObj->GetObjInventor() == SdrInventor)
+/*N*/ {
+/*N*/ // Gruppenobjekt: sind Uno-Objekte enthalten?
+/*N*/ SdrObjListIter aIter(*((SdrObjGroup*) pObj)->GetSubList(), IM_DEEPNOGROUPS);
+/*N*/
+/*N*/ SdrObject* pObj = NULL;
+/*N*/
+/*N*/ while (aIter.IsMore())
+/*N*/ {
+/*N*/ pObj = aIter.Next();
+/*N*/
+/*N*/ if (pObj && pObj->IsUnoObj())
+/*N*/ {
+/*?*/ SdrUnoObj* pSdrUnoObj = PTR_CAST(SdrUnoObj, pObj);
+/*?*/ ImpInsertControl(pSdrUnoObj, pRec);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return pRec;
+/*N*/ }
+
+/*N*/ void SdrPageView::AddWin(OutputDevice* pOutDev)
+/*N*/ {
+/*N*/ USHORT nPos = pWinList->Find(pOutDev);
+/*N*/
+/*N*/ if (nPos == SDRPAGEVIEWWIN_NOTFOUND)
+/*N*/ SdrPageViewWinRec* pWinRec = ImpMakePageViewWinRec(pOutDev);
+/*N*/ }
+
+/*N*/ void SdrPageView::DelWin(OutputDevice* pOutDev)
+/*N*/ {
+/*N*/ USHORT nPos=pWinList->Find(pOutDev);
+/*N*/
+/*N*/ if (nPos != SDRPAGEVIEWWIN_NOTFOUND)
+/*N*/ {
+/*N*/ pWinList->Delete(nPos);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPageView::ImpInsertControl(const SdrUnoObj* pSdrUnoObj,
+/*N*/ SdrPageViewWinRec* pRec)
+/*N*/ {
+/*N*/ if (pSdrUnoObj)
+/*N*/ {
+/*N*/ uno::Reference< awt::XControlModel > xUnoControlModel(pSdrUnoObj->GetUnoControlModel());
+/*N*/ if (!xUnoControlModel.is())
+/*N*/ return;
+/*N*/
+/*N*/ USHORT nCtrlNum = pRec->aControlList.Find(xUnoControlModel);
+/*N*/ if (nCtrlNum == SDRUNOCONTROL_NOTFOUND)
+/*N*/ {
+/*N*/ // Control fuer die View erzeugen
+/*N*/ uno::Reference< lang::XMultiServiceFactory > xFactory( ::legacy_binfilters::getLegacyProcessServiceFactory() );
+/*N*/ uno::Reference< awt::XControl > xUnoControl;
+/*N*/ if( xFactory.is() )
+/*N*/ xUnoControl = uno::Reference< awt::XControl >(xFactory->createInstance(pSdrUnoObj->GetUnoControlTypeName()), uno::UNO_QUERY);
+/*N*/
+/*N*/ if (xUnoControl.is())
+/*N*/ {
+/*N*/ xUnoControl->setModel(xUnoControlModel);
+/*N*/ if (pRec->pOutDev->GetOutDevType() != OUTDEV_WINDOW)
+/*N*/ {
+/*?*/ uno::Reference< awt::XView > xView = xUnoControl->getView();
+/*?*/ if (xView.is())
+/*?*/ {
+/*?*/ // xView->setGraphics(pRec->pOutDev->GetGraphicsInterface(TRUE));
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ // ControlContainer ggf. erzeugen
+/*N*/ pRec->CreateControlContainer();
+/*N*/
+/*N*/ // xControl in ControlContainer einfuegen (Eigentuemer-Uebergang)
+/*N*/ if (pRec->GetControlContainerRef().is())
+/*N*/ {
+/*N*/ uno::Reference< awt::XWindow > xWindow(xUnoControl, uno::UNO_QUERY);
+/*N*/ if (xWindow.is())
+/*N*/ {
+/*N*/ Rectangle aRect(pSdrUnoObj->GetLogicRect());
+/*N*/ Point aPixPos(pRec->pOutDev->LogicToPixel(aRect.TopLeft()));
+/*N*/ Size aPixSize(pRec->pOutDev->LogicToPixel(aRect.GetSize()));
+/*N*/ xWindow->setPosSize(aPixPos.X(), aPixPos.Y(), aPixSize.Width(), aPixSize.Height(), awt::PosSize::POSSIZE);
+/*N*/ }
+/*N*/
+/*N*/ // set the correct zoom
+/*N*/ if (!GetView().IsDesignMode())
+/*N*/ {
+/*N*/ uno::Reference< awt::XView > xView(xUnoControl, uno::UNO_QUERY);
+/*N*/ if (xView.is())
+/*N*/ {
+/*N*/ const MapMode& rMap = pRec->pOutDev->GetMapMode();
+/*N*/ xView->setZoom((float) double(rMap.GetScaleX()),
+/*N*/ (float) double(rMap.GetScaleY()));
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // #107049# set design mode before peer is created,
+/*N*/ // this is also needed for accessibility
+/*N*/ xUnoControl->setDesignMode(GetView().IsDesignMode());
+/*N*/
+/*N*/ SdrUnoControlRec* pUCR = new SdrUnoControlRec(&pRec->aControlList, (SdrUnoObj*)pSdrUnoObj, xUnoControl);
+/*N*/ pRec->aControlList.Insert(pUCR);
+/*N*/
+/*N*/ // #108327# do this last - the addition of the control triggeres processes which rely
+/*N*/ // on the control already being inserted into the aControlList
+/*N*/ pRec->GetControlContainerRef()->addControl(pSdrUnoObj->GetUnoControlTypeName(), xUnoControl);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPageView::ImpUnoInserted(const SdrObject* pObj)
+/*N*/ {
+/*N*/ SdrUnoObj* pSdrUnoObj = (SdrUnoObj*)pObj;
+/*N*/ USHORT nPos = pWinList->GetCount();
+/*N*/
+/*N*/ for (; nPos; )
+/*N*/ ImpInsertControl(pSdrUnoObj, &(*pWinList)[--nPos]);
+/*N*/
+/*N*/ }
+
+
+
+/*N*/ void __EXPORT SdrPageView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ if (bVisible) {
+/*N*/ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+/*N*/ if (pSdrHint!=NULL) {
+/*N*/ SdrHintKind eKind=pSdrHint->GetKind();
+/*N*/ const SdrObject* pObj=pSdrHint->GetObject();
+/*N*/ if ( pObj!=NULL && pObj->GetPage() == pPage )
+/*N*/ {
+/*N*/ if (pObj->IsUnoObj())
+/*N*/ {
+/*N*/ if (eKind == HINT_OBJINSERTED ||
+/*N*/ eKind == HINT_CONTROLINSERTED)
+/*N*/ {
+/*N*/ ImpUnoInserted(pObj);
+/*N*/ }
+/*N*/ else if (eKind == HINT_OBJREMOVED ||
+/*N*/ eKind == HINT_CONTROLREMOVED)
+/*N*/
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpUnoRemoved(pObj);
+/*N*/ }
+/*N*/ }
+/*N*/ else if (pObj->GetObjIdentifier() == OBJ_GRUP &&
+/*N*/ pObj->GetObjInventor() == SdrInventor)
+/*N*/ {
+/*N*/ // Gruppenobjekt: sind Uno-Objekte enthalten?
+/*N*/ SdrObjListIter aIter(*((SdrObjGroup*) pObj)->GetSubList(), IM_DEEPNOGROUPS);
+/*N*/
+/*N*/ SdrObject* pObj = NULL;
+/*N*/
+/*N*/ while (aIter.IsMore())
+/*N*/ {
+/*N*/ pObj = aIter.Next();
+/*N*/
+/*N*/ if (pObj && pObj->IsUnoObj())
+/*N*/ {
+/*?*/ if (eKind == HINT_OBJINSERTED ||
+/*?*/ eKind == HINT_CONTROLINSERTED)
+/*?*/
+/*?*/ {
+/*?*/ ImpUnoInserted(pObj);
+/*?*/ }
+/*?*/ else if (eKind == HINT_OBJREMOVED ||
+/*?*/ eKind == HINT_CONTROLREMOVED)
+/*?*/
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpUnoRemoved(pObj);
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (pSdrHint->IsNeedRepaint()) {
+/*N*/ if (((eKind==HINT_OBJCHG
+/*N*/ || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED
+/*N*/ || eKind == HINT_CONTROLINSERTED || eKind == HINT_CONTROLREMOVED) &&
+/*N*/ pSdrHint->GetPage()!=NULL) ||
+/*N*/ eKind==HINT_PAGECHG)
+/*N*/ {
+/*N*/ FASTBOOL bInv=FALSE;
+/*N*/ if (pSdrHint->GetPage()==pPage) bInv=TRUE;
+/*N*/ else if (pSdrHint->GetPage()->IsMasterPage()) { // ebenfalls Invalidate, wenn pPage die geaenderte Page als MasterPage referenziert
+/*N*/ USHORT nMaPgAnz=pPage!=NULL?pPage->GetMasterPageCount():0;
+/*N*/ for (USHORT i=0; i<nMaPgAnz && !bInv; i++) {
+/*N*/ const SdrPage* pMPg=pPage->GetMasterPage(i);
+/*N*/ bInv=pMPg==pSdrHint->GetPage();
+/*N*/ }
+/*N*/ }
+/*N*/ if (bInv) {
+/*N*/ InvalidateAllWin(pSdrHint->GetRect(),TRUE);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (eKind==HINT_OBJLISTCLEARED && pSdrHint->GetPage()==pPage) {
+/*?*/ if (GetAktGroup()!=NULL) {
+/*?*/ rView.UnmarkAllObj();
+/*?*/ LeaveAllGroup();
+/*?*/ //pWinList ...
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPageView::ModelHasChanged()
+/*N*/ {
+/*N*/ if (GetAktGroup()!=NULL) CheckAktGroup();
+/*N*/ }
+
+
+
+
+/*N*/ void SdrPageView::Show()
+/*N*/ {
+/*N*/ if (!bVisible) {
+/*N*/ bVisible=TRUE;
+/*N*/ InvalidateAllWin();
+/*N*/ USHORT nWinAnz=rView.GetWinCount();
+/*N*/ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+/*N*/ AddWin(rView.GetWin(nWinNum));
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPageView::Hide()
+/*N*/ {
+/*N*/ if (bVisible) {
+/*N*/ InvalidateAllWin();
+/*N*/ bVisible=FALSE;
+/*N*/ pWinList->Clear();
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ Rectangle SdrPageView::GetPageRect() const
+/*N*/ {
+/*N*/ if (pPage==NULL) return Rectangle();
+/*N*/ return Rectangle(GetOffset(),Size(pPage->GetWdt()+1,pPage->GetHgt()+1));
+/*N*/ }
+
+
+/*N*/ void SdrPageView::InvalidateAllWin()
+/*N*/ {
+/*N*/ if (bVisible && pPage!=NULL) {
+/*N*/ Rectangle aRect(Point(0,0),Size(pPage->GetWdt()+1,pPage->GetHgt()+1));
+/*N*/ aRect.Union(pPage->GetAllObjBoundRect());
+/*N*/ aRect.Move(aOfs.X(),aOfs.Y());
+/*N*/ rView.InvalidateAllWin(aRect);
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPageView::InvalidateAllWin(const Rectangle& rRect, FASTBOOL bPlus1Pix)
+/*N*/ {
+/*N*/ if (bVisible) {
+/*N*/ rView.InvalidateAllWin(rRect+GetOffset(),bPlus1Pix);
+/*N*/ }
+/*N*/ }
+
+#ifdef OS2
+#define RGBCOLOR(r,g,b) ((ULONG)(((BYTE)(b) | ((USHORT)(g)<<8)) | (((ULONG)(BYTE)(r))<<16)))
+#endif
+
+/*N*/ FASTBOOL SdrPageView::IsLayer(const XubString& rName, const SetOfByte& rBS) const
+/*N*/ {
+/*N*/ if(!pPage)
+/*N*/ return FALSE;
+/*N*/
+/*N*/ BOOL bRet(FALSE);
+/*N*/
+/*N*/ if(rName.Len())
+/*N*/ {
+/*N*/ SdrLayerID nId = pPage->GetLayerAdmin().GetLayerID(rName, TRUE);
+/*N*/
+/*N*/ if(nId != SDRLAYER_NOTFOUND)
+/*N*/ {
+/*N*/ bRet = rBS.IsSet(nId);
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ FASTBOOL SdrPageView::IsObjMarkable(SdrObject* pObj) const
+/*N*/ {
+/*N*/ if(pObj)
+/*N*/ {
+/*N*/ // Vom Markieren ausgeschlossen?
+/*N*/ if(pObj->IsMarkProtect())
+/*N*/ return FALSE;
+/*N*/
+/*N*/ // Der Layer muss sichtbar und darf nicht gesperrt sein
+/*N*/ SdrLayerID nL = pObj->GetLayer();
+/*N*/ return aLayerVisi.IsSet(BYTE(nL)) && !aLayerLock.IsSet(BYTE(nL));
+/*N*/ }
+/*N*/ return FALSE;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+// Betretene Gruppe und Liste setzen
+/*N*/ void SdrPageView::SetAktGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList)
+/*N*/ {
+/*N*/ if(pAktGroup != pNewGroup)
+/*N*/ {
+/*?*/ pAktGroup = pNewGroup;
+/*N*/ }
+/*N*/ if(pAktList != pNewList)
+/*N*/ {
+/*N*/ pAktList = pNewList;
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void SdrPageView::LeaveAllGroup()
+/*N*/ {
+/*N*/ if(GetAktGroup())
+/*N*/ {
+/*?*/ BOOL bDisInvalidate = (rView.pDisabledAttr != NULL);
+/*?*/ BOOL bGlueInvalidate = (!bDisInvalidate && rView.ImpIsGlueVisible());
+/*?*/
+/*?*/ if(bGlueInvalidate)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 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)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 rView.GlueInvalidate();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPageView::CheckAktGroup()
+/*N*/ {
+/*N*/ SdrObject* pGrp=GetAktGroup();
+/*N*/ while (pGrp!=NULL &&
+/*N*/ (!pGrp->IsInserted() || pGrp->GetObjList()==NULL ||
+/*N*/ pGrp->GetPage()==NULL || pGrp->GetModel()==NULL)) { // irgendwas daneben?
+/*N*/ pGrp=pGrp->GetUpGroup();
+/*N*/ }
+/*N*/ if (pGrp!=GetAktGroup()) {
+/*?*/ if (pGrp!=NULL) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 EnterGroup(pGrp);
+/*N*/ else LeaveAllGroup();
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrPageView& rPageView)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOPgVwID);
+/*N*/ {
+/*N*/ if (rPageView.pPage!=NULL) {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_PAGVIEW);
+/*N*/ rOut<<BOOL(rPageView.bVisible);
+/*N*/ rOut<<BOOL(rPageView.pPage->IsMasterPage());
+/*N*/ rOut<<rPageView.pPage->GetPageNum();
+/*N*/ rOut<<rPageView.aOfs;
+/*N*/ rOut<<rPageView.aPgOrg;
+/*N*/ }
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_PAGVLAYER);
+/*N*/ rOut<<rPageView.aLayerVisi;
+/*N*/ rOut<<rPageView.aLayerLock;
+/*N*/ rOut<<rPageView.aLayerPrn;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_PAGVHELPLINES);
+/*N*/ rOut<<rPageView.aHelpLines;
+/*N*/ }
+/*N*/ //if (GetAktGroup()!=NULL) {
+/*N*/ // // ...
+/*N*/ // //rOut<<aAktGroup;
+/*N*/ //}
+/*N*/ return rOut;
+/*N*/ }
+
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrPageView& rPageView)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ while (aHead.GetBytesLeft()>0 && rIn.GetError()==0 && !rIn.IsEof()) {
+/*N*/ SdrNamedSubRecord aSubRecord(rIn,STREAM_READ);
+/*N*/ if (aSubRecord.GetInventor()==SdrInventor) {
+/*N*/ switch (aSubRecord.GetIdentifier()) {
+/*N*/ case SDRIORECNAME_PAGVIEW: {
+/*N*/ BOOL bVisible;
+/*N*/ BOOL bMaster;
+/*N*/ USHORT nPgNum;
+/*N*/ rIn>>bVisible;
+/*N*/ rPageView.bVisible=bVisible;
+/*N*/ rIn>>bMaster;
+/*N*/ rIn>>nPgNum;
+/*N*/ rIn>>rPageView.aOfs;
+/*N*/ rIn>>rPageView.aPgOrg;
+/*N*/ SdrModel* pMod=rPageView.GetView().GetModel();
+/*N*/ if (!bMaster) rPageView.pPage=pMod->GetPage(nPgNum);
+/*N*/ else rPageView.pPage=pMod->GetMasterPage(nPgNum);
+/*N*/ rPageView.pAktList=rPageView.pPage;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_PAGVLAYER: {
+/*N*/ rIn>>rPageView.aLayerVisi;
+/*N*/ rIn>>rPageView.aLayerLock;
+/*N*/ rIn>>rPageView.aLayerPrn;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_PAGVHELPLINES: {
+/*N*/ rIn>>rPageView.aHelpLines;
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_PAGVAKTGROUP: {
+/*N*/ //rIn>>aAktGroup; fehlende Implementation!
+/*N*/ } break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return rIn;
+/*N*/ }
+
+// #103834# Set background color for svx at SdrPageViews
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdpntv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdpntv.cxx
new file mode 100644
index 000000000000..a06a6ca90d87
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdpntv.cxx
@@ -0,0 +1,997 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svdvmark.hxx"
+#include "svdio.hxx"
+#include "svdview.hxx"
+#include "svdograf.hxx"
+#include "svdouno.hxx"
+
+
+
+#include <bf_svtools/whiter.hxx>
+
+
+
+#include <bf_svtools/style.hxx>
+
+
+
+
+#include "xoutx.hxx"
+
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ FrameAnimator::FrameAnimator(SdrView& rNewView):
+/*N*/ rView(rNewView)
+/*N*/ {
+/*N*/ aTim.SetTimeoutHdl(LINK(this,FrameAnimator,Hdl));
+/*N*/ aTim.SetTimeout(50);
+/*N*/ pOut=NULL;
+/*N*/ }
+
+
+
+/*N*/ IMPL_LINK(FrameAnimator,Hdl,AutoTimer*,pTim)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//#define TEST_IAO
+
+/*N*/ SdrViewWinRec::SdrViewWinRec(OutputDevice* pW)
+/*N*/ : pWin(pW),
+/*N*/ // pVDev(NULL),
+//STRIP012/*N*/ pIAOManager(NULL),
+/*N*/ bXorVisible(FALSE)
+/*N*/ {
+/*N*/ // is it a window?
+/*N*/ if(pW && pW->GetOutDevType() == OUTDEV_WINDOW)
+/*N*/ {
+/*N*/ // create B2dIAOManager for this window
+//STRIP012/*N*/ pIAOManager = new B2dIAOManager((Window*)pW);
+//STRIP012#ifdef TEST_IAO
+//STRIP012/*?*/ if(pIAOManager)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ // create some demo shapes
+//STRIP012/*?*/ B2dIAOLine* pLine;
+//STRIP012/*?*/ B2dIAOMarker* pMarker;
+//STRIP012/*?*/ B2dIAOBitmapObj* pBitmap;
+//STRIP012/*?*/ B2dIAOTriangle* pTriangle;
+//STRIP012/*?*/
+//STRIP012/*?*/ static BOOL bCreateLines = FALSE;
+//STRIP012/*?*/ static BOOL bCreateMarkers = FALSE;
+//STRIP012/*?*/ static BOOL bCreateField = FALSE;
+//STRIP012/*?*/ static BOOL bCreateSingleMarker = FALSE;
+//STRIP012/*?*/ static BOOL bCreateBitmap = FALSE;
+//STRIP012/*?*/ static BOOL bCreateBitmapField = FALSE;
+//STRIP012/*?*/ static BOOL bCreateTriangle = FALSE;
+//STRIP012/*?*/
+//STRIP012/*?*/ if(bCreateLines)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, Point(5000, 5200), Point(5000, 7000));
+//STRIP012/*?*/ pLine->SetBaseColor(Color(COL_CYAN));
+//STRIP012/*?*/ pLine = new B2dIAOLineStriped(pIAOManager, Point(5100, 5200), Point(5100, 7000));
+//STRIP012/*?*/ pLine->SetBaseColor(Color(COL_BLUE));
+//STRIP012/*?*/ B2dIAOLineTwoColor* p2Line = new B2dIAOLineTwoColor(pIAOManager, Point(5200, 5200), Point(5200, 7000));
+//STRIP012/*?*/ p2Line->SetBaseColor(Color(COL_YELLOW));
+//STRIP012/*?*/ p2Line->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ B2dIAOLineTwoColorAnim* p3Line = new B2dIAOLineTwoColorAnim(pIAOManager, Point(5300, 5200), Point(5300, 7000));
+//STRIP012/*?*/ p3Line->SetBaseColor(Color(COL_YELLOW));
+//STRIP012/*?*/ p3Line->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ }
+//STRIP012/*?*/
+//STRIP012/*?*/ if(bCreateMarkers)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5000, 5000), B2D_IAO_MARKER_POINT);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTRED));
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5100, 5000), B2D_IAO_MARKER_PLUS);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5200, 5000), B2D_IAO_MARKER_CROSS);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTBLUE));
+//STRIP012/*?*/
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5000, 5100), B2D_IAO_MARKER_RECT_5X5);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+//STRIP012/*?*/ pMarker->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5100, 5100), B2D_IAO_MARKER_RECT_7X7);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+//STRIP012/*?*/ pMarker->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5200, 5100), B2D_IAO_MARKER_RECT_9X9);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+//STRIP012/*?*/ pMarker->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ }
+//STRIP012/*?*/
+//STRIP012/*?*/ if(bCreateField || bCreateBitmapField)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ static UINT16 nNumX = 10;
+//STRIP012/*?*/ static UINT16 nNumY = 10;
+//STRIP012/*?*/ static UINT16 nStart = 2000;
+//STRIP012/*?*/ static UINT16 nEnd = 16000;
+//STRIP012/*?*/
+//STRIP012/*?*/ for(UINT16 a=nStart;a<nEnd;a+=(nEnd-nStart)/nNumX)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ for(UINT16 b=nStart;b<nEnd;b+=(nEnd-nStart)/nNumY)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ if(bCreateField)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(a, b), B2D_IAO_MARKER_RECT_7X7);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(
+//STRIP012/*?*/ (((a-nStart)*256L)/(nEnd-nStart)),
+//STRIP012/*?*/ (((b-nStart)*256L)/(nEnd-nStart)),
+//STRIP012/*?*/ 0x80));
+//STRIP012/*?*/ pMarker->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ }
+//STRIP012/*?*/ if(bCreateBitmapField)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ Bitmap aBitmap(Size(10, 10), 8);
+//STRIP012/*?*/ pBitmap = new B2dIAOBitmapObj(pIAOManager, Point(a, b), aBitmap);
+//STRIP012/*?*/ }
+//STRIP012/*?*/ }
+//STRIP012/*?*/ }
+//STRIP012/*?*/ }
+//STRIP012/*?*/ if(bCreateSingleMarker)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ pMarker = new B2dIAOMarker(pIAOManager, Point(5000, 5000), B2D_IAO_MARKER_RECT_7X7);
+//STRIP012/*?*/ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+//STRIP012/*?*/ pMarker->Set2ndColor(Color(COL_BLACK));
+//STRIP012/*?*/ }
+//STRIP012/*?*/ if(bCreateBitmap)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ Bitmap aBitmap(Size(10, 10), 8);
+//STRIP012/*?*/ pBitmap = new B2dIAOBitmapObj(pIAOManager, Point(6000, 6000), aBitmap);
+//STRIP012/*?*/ }
+//STRIP012/*?*/ if(bCreateTriangle)
+//STRIP012/*?*/ {
+//STRIP012/*?*/ pTriangle = new B2dIAOTriangle(pIAOManager, Point(5000, 5000), Point(7000, 5000), Point(6000, 7000), Color(COL_YELLOW));
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, pTriangle->GetBasePosition(), pTriangle->Get2ndPosition());
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get2ndPosition(), pTriangle->Get3rdPosition());
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get3rdPosition(), pTriangle->GetBasePosition());
+//STRIP012/*?*/
+//STRIP012/*?*/ pTriangle = new B2dIAOBitmapTriangle(pIAOManager, Point(8000, 5000), Point(10000, 5000), Point(9000, 7000), Color(COL_RED));
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, pTriangle->GetBasePosition(), pTriangle->Get2ndPosition());
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get2ndPosition(), pTriangle->Get3rdPosition());
+//STRIP012/*?*/ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get3rdPosition(), pTriangle->GetBasePosition());
+//STRIP012/*?*/ }
+//STRIP012/*?*/ }
+//STRIP012#endif
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrViewWinRec::~SdrViewWinRec()
+/*N*/ {
+/*N*/ // if (pVDev!=NULL)
+/*N*/ // delete pVDev;
+/*N*/
+/*N*/ // cleanup IAOManager for this window
+//STRIP012/*N*/ if(pIAOManager)
+//STRIP012/*N*/ delete pIAOManager;
+//STRIP012/*N*/ pIAOManager = NULL;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrViewWinList::Clear()
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ delete GetObject(i);
+/*N*/ }
+/*N*/ aList.Clear();
+/*N*/ }
+
+/*N*/ USHORT SdrViewWinList::Find(OutputDevice* pW) const
+/*N*/ {
+/*N*/ USHORT nAnz=GetCount();
+/*N*/ USHORT nRet=SDRVIEWWIN_NOTFOUND;
+/*N*/ for (USHORT nNum=0; nNum<nAnz && nRet==SDRVIEWWIN_NOTFOUND; nNum++) {
+/*N*/ if (GetObject(nNum)->pWin==pW) nRet=nNum;
+/*N*/ }
+/*N*/ return nRet;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ TYPEINIT1( SvxViewHint, SfxSimpleHint );
+/*N*/
+/*N*/ SvxViewHint::SvxViewHint( ULONG _nId ) :
+/*N*/ SfxSimpleHint( _nId )
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@@ @@@@@@ @@ @@@@@@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ TYPEINIT2(SdrPaintView,SfxListener,SfxRepeatTarget);
+
+/*N*/ DBG_NAME(SdrPaintView)
+
+/*N*/ void SdrPaintView::ImpClearVars()
+/*N*/ {
+/*N*/ pXOut=NULL;
+/*N*/ bForeignXOut=FALSE;
+/*N*/ pItemBrowser=NULL;
+/*N*/ bLayerSortedRedraw=FALSE;
+/*N*/ bPageVisible=TRUE;
+/*N*/ bPageBorderVisible=TRUE;
+/*N*/ bBordVisible=TRUE;
+/*N*/ bGridVisible=TRUE;
+/*N*/ bGridFront =FALSE;
+/*N*/ bHlplVisible=TRUE;
+/*N*/ bHlplFront =TRUE;
+/*N*/ bGlueVisible=FALSE;
+/*N*/ bGlueVisible2=FALSE;
+/*N*/ bGlueVisible3=FALSE;
+/*N*/ bGlueVisible4=FALSE;
+/*N*/ bSwapAsynchron=FALSE;
+/*N*/ bPrintPreview=FALSE;
+/*N*/ bLineDraft=FALSE;
+/*N*/ bFillDraft=FALSE;
+/*N*/ bGrafDraft=FALSE;
+/*N*/ bHideGrafDraft=FALSE;
+/*N*/ bTextDraft=FALSE;
+/*N*/ bLineDraftPrn=FALSE;
+/*N*/ bFillDraftPrn=FALSE;
+/*N*/ bGrafDraftPrn=FALSE;
+/*N*/ bTextDraftPrn=FALSE;
+/*N*/
+/*N*/ bObjectPaintIgnoresClipping=FALSE;
+/*N*/
+/*N*/ eAnimationMode = SDR_ANIMATION_ANIMATE;
+/*N*/ bAnimationPause = FALSE;
+/*N*/
+/*N*/ nHitTolPix=2;
+/*N*/ nMinMovPix=3;
+/*N*/ nHitTolLog=0;
+/*N*/ nMinMovLog=0;
+/*N*/ pActualOutDev=NULL;
+/*N*/
+/*N*/ bSaveHiddenPages=FALSE;
+/*N*/ bPageTwice=FALSE;
+/*N*/ pDragWin=NULL;
+/*N*/ bRestoreColors=TRUE;
+/*N*/ pDisabledAttr=NULL;
+/*N*/ pDefaultStyleSheet=NULL;
+/*N*/ bEncircle=FALSE;
+/*N*/ bSomeObjChgdFlag=FALSE;
+/*N*/
+/*N*/ bMasterBmp=FALSE;
+/*N*/ pMasterBmp=NULL;
+/*N*/ nMasterCacheMode = SDR_MASTERPAGECACHE_DEFAULT;
+/*N*/
+/*N*/ nGraphicManagerDrawMode = GRFMGR_DRAW_STANDARD;
+/*N*/
+/*N*/ aComeBackTimer.SetTimeout(1);
+/*N*/ aComeBackTimer.SetTimeoutHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
+/*N*/ aAfterPaintTimer.SetTimeout(1);
+/*N*/ aAfterPaintTimer.SetTimeoutHdl(LINK(this,SdrPaintView,ImpAfterPaintHdl));
+/*N*/ aUserMarkerAnimator.SetTimeout(50);
+/*N*/ aUserMarkerAnimator.SetTimeoutHdl(LINK(this,SdrPaintView,ImpUserMarkerAnimatorHdl));
+/*N*/
+/*N*/ String aNam; // System::GetUserName() just return an empty string
+/*N*/
+/*N*/ if (pMod)
+/*N*/ SetDefaultStyleSheet(pMod->GetDefaultStyleSheet(), TRUE);
+/*N*/
+/*N*/ aNam.ToUpperAscii();
+/*N*/
+/*N*/ maGridColor = Color( COL_BLACK );
+/*N*/ }
+
+
+/*N*/ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ aPagV(1024,16,16),
+/*N*/ aPagHide(1024,16,16),
+/*N*/ aAni(*(SdrView*)this),
+/*N*/ aDefaultAttr(pModel1->GetItemPool()),
+/*N*/ aUserMarkers(1024,16,16)
+/*N*/ {
+/*N*/ DBG_CTOR(SdrPaintView,NULL);
+/*N*/ pMod=pModel1;
+/*N*/ ImpClearVars();
+/*N*/ if (pOut!=NULL) AddWin(pOut);
+/*N*/ pXOut=new ExtOutputDevice(pOut);
+/*N*/
+/*N*/ // Flag zur Visualisierung von Gruppen
+/*N*/ bVisualizeEnteredGroup = TRUE;
+/*N*/
+/*N*/ StartListening( maColorConfig );
+/*N*/ onChangeColorConfig();
+/*N*/ }
+
+/*N*/ SdrPaintView::~SdrPaintView()
+/*N*/ {
+/*N*/ DBG_DTOR(SdrPaintView,NULL);
+/*N*/ aAfterPaintTimer.Stop();
+/*N*/
+/*N*/ EndListening( maColorConfig );
+/*N*/
+/*N*/ ClearAll();
+/*N*/ if (!bForeignXOut && pXOut!=NULL) {
+/*N*/ delete pXOut;
+/*N*/ }
+/*N*/ if (pDisabledAttr!=NULL) {
+/*?*/ delete pDisabledAttr;
+/*N*/ }
+/*N*/ if (pMasterBmp!=NULL) {
+/*?*/ delete pMasterBmp;
+/*N*/ }
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (pItemBrowser!=NULL) {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 delete pItemBrowser;
+/*N*/ }
+/*N*/ #endif
+/*N*/ USHORT nAnz=ImpGetUserMarkerCount();
+/*N*/ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+/*?*/ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+/*?*/ pUM->pView=NULL; // Weil's mich gleich nichtmehr gibt.
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void __EXPORT SdrPaintView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ BOOL bObjChg=!bSomeObjChgdFlag; // TRUE= auswerten fuer ComeBack-Timer
+/*N*/ BOOL bMaster=pMasterBmp!=NULL; // TRUE= auswerten fuer MasterPagePaintCache
+/*N*/ if (bObjChg || bMaster) {
+/*N*/ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+/*N*/ if (pSdrHint!=NULL) {
+/*N*/ SdrHintKind eKind=pSdrHint->GetKind();
+/*N*/ if (eKind==HINT_OBJCHG || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED) {
+/*N*/ if (bObjChg) {
+/*N*/ bSomeObjChgdFlag=TRUE;
+/*N*/ aComeBackTimer.Start();
+/*N*/ }
+/*N*/ if (bMaster) {
+/*?*/ const SdrPage* pPg=pSdrHint->GetPage();
+/*?*/ if (pPg!=NULL && pPg->IsMasterPage() && pPg->GetPageNum()==pMasterBmp->GetMasterPageNum()) {
+/*?*/ ReleaseMasterPagePaintCache();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (eKind==HINT_PAGEORDERCHG) {
+/*N*/ const SdrPage* pPg=pSdrHint->GetPage();
+/*N*/ if (!pPg->IsInserted()) { // aha, Seite geloescht: also hiden
+/*N*/ USHORT nAnz=GetPageViewCount();
+/*N*/ USHORT nv;
+/*N*/ for (nv=nAnz; nv>0;) {
+/*?*/ nv--;
+/*?*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*?*/ if (pPV->GetPage()==pPg) {
+/*?*/ HidePagePvNum(nv);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if (bMaster) ReleaseMasterPagePaintCache();
+/*N*/ }
+/*N*/ if (eKind==HINT_PAGECHG) {
+/*N*/ if (bMaster) ReleaseMasterPagePaintCache();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( rHint.ISA( SfxSimpleHint ) && ( (SfxSimpleHint&) rHint ).GetId() == SFX_HINT_COLORS_CHANGED )
+/*N*/ {
+/*?*/ onChangeColorConfig();
+/*?*/ InvalidateAllWin();
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ IMPL_LINK_INLINE_START(SdrPaintView,ImpComeBackHdl,Timer*,pTimer)
+/*N*/ {
+/*N*/ if (bSomeObjChgdFlag) {
+/*N*/ bSomeObjChgdFlag=FALSE;
+/*N*/ ModelHasChanged();
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ IMPL_LINK_INLINE_END(SdrPaintView,ImpComeBackHdl,Timer*,pTimer)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+/*?*/ void SdrPaintView::ImpAsyncPaintDone( const SdrObject* pObj )
+/*?*/ {{DBG_BF_ASSERT(0, "STRIP");}//STRIP001
+/*?*/ }
+
+/*N*/ IMPL_LINK(SdrPaintView,ImpAfterPaintHdl,Timer*,pTimer)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ void SdrPaintView::ModelHasChanged()
+/*N*/ {
+/*N*/ // Auch alle PageViews benachrichtigen
+/*N*/ USHORT nv;
+/*N*/ USHORT nAnz;
+/*N*/ nAnz=GetPageViewCount();
+/*N*/ for (nv=nAnz; nv>0;) {
+/*N*/ nv--;
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ if (!pPV->GetPage()->IsInserted()) {
+/*?*/ HidePage(pPV);
+/*N*/ }
+/*N*/ }
+/*N*/ nAnz=GetPageViewCount();
+/*N*/ for (nv=0; nv<nAnz; nv++) {
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ pPV->ModelHasChanged();
+/*N*/ }
+/*N*/ nAnz=GetPageHideCount();
+/*N*/ for (nv=0; nv<nAnz; nv++) {
+/*?*/ SdrPageView* pPV=GetPageHidePvNum(nv);
+/*?*/ pPV->ModelHasChanged();
+/*N*/ }
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (pItemBrowser!=NULL) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 pItemBrowser->SetDirty();
+/*N*/ #endif
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ IMPL_LINK_INLINE_START(SdrPaintView,ImpUserMarkerAnimatorHdl,AutoTimer*,pTimer)
+/*N*/ {
+/*N*/ USHORT nAnz=ImpGetUserMarkerCount();
+/*N*/ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+/*N*/ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+/*N*/ if (pUM->IsAnimate() && pUM->IsVisible()) {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 pUM->DoAnimateOneStep();
+/*N*/ }
+/*N*/ return 0;
+/*N*/ }
+
+/*N*/ IMPL_LINK_INLINE_END(SdrPaintView,ImpUserMarkerAnimatorHdl,AutoTimer*,pTimer)
+
+/*N*/ void SdrPaintView::ImpInsertUserMarker(SdrViewUserMarker* pMarker)
+/*N*/ {
+/*N*/ aUserMarkers.Insert(pMarker);
+/*N*/ ImpCheckMarkerAnimator();
+/*N*/ }
+/*N*/
+/*N*/ void SdrPaintView::ImpRemoveUserMarker(SdrViewUserMarker* pMarker)
+/*N*/ {
+/*N*/ aUserMarkers.Remove(pMarker);
+/*N*/ ImpCheckMarkerAnimator();
+/*N*/ }
+/*N*/
+/*N*/ void SdrPaintView::ImpCheckMarkerAnimator()
+/*N*/ {
+/*N*/ BOOL bNeed=FALSE;
+/*N*/ USHORT nAnz=ImpGetUserMarkerCount();
+/*N*/ for (USHORT nNum=0; nNum<nAnz && !bNeed; nNum++) {
+/*N*/ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+/*N*/ bNeed=pUM->IsAnimate();
+/*N*/ }
+/*N*/ if (bNeed) aUserMarkerAnimator.Start();
+/*N*/ else aUserMarkerAnimator.Stop();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ BOOL SdrPaintView::IsAction() const
+/*N*/ {
+/*N*/ return IsEncirclement();
+/*N*/ }
+
+
+
+
+/*N*/ void SdrPaintView::BrkAction()
+/*N*/ {
+/*N*/ BrkEncirclement();
+/*N*/ }
+
+
+/*N*/ void SdrPaintView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+/*N*/ {
+/*N*/ if (IsEncirclement() && aDragStat.IsShown()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ USHORT nAnz=ImpGetUserMarkerCount();
+/*N*/ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+/*N*/ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+/*N*/ if (pUM->IsVisible()) {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 pUM->Draw(pOut,FALSE,!bRestoreColors); // den 3. Parameter hier noch richtig setzen !!!!!
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPaintView::BrkEncirclement()
+/*N*/ {
+/*N*/ if (IsEncirclement()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPaintView::ShowShownXor(OutputDevice* pOut, BOOL bShow)
+/*N*/ {
+/*N*/ USHORT nAnz=GetWinCount();
+/*N*/ USHORT nw=0;
+/*N*/ BOOL bWeiter=TRUE;
+/*N*/ do {
+/*N*/ if (pOut!=NULL) {
+/*N*/ nw=aWinList.Find(pOut);
+/*N*/ bWeiter=FALSE;
+/*N*/ }
+/*N*/ if (nw<nAnz && nw!=SDRVIEWWIN_NOTFOUND) {
+/*N*/ BOOL bOn=IsShownXorVisibleWinNum(nw);
+/*N*/ if (bOn!=bShow) {
+/*N*/ ToggleShownXor(GetWin(nw),NULL);
+/*N*/ SetShownXorVisible(nw,bShow);
+/*N*/ }
+/*N*/ } else bWeiter=FALSE;
+/*N*/ } while (bWeiter);
+/*N*/ }
+
+/*N*/ BOOL SdrPaintView::IsShownXorVisible(OutputDevice* pOut) const
+/*N*/ {
+/*N*/ USHORT nPos=aWinList.Find(pOut);
+/*N*/ if (nPos!=SDRVIEWWIN_NOTFOUND) {
+/*N*/ return IsShownXorVisibleWinNum(nPos);
+/*N*/ } else {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPaintView::ClearPageViews()
+/*N*/ {
+/*N*/ BrkAction();
+/*N*/ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ InvalidateAllWin(pPV->GetPageRect());
+/*N*/ delete pPV;
+/*N*/ }
+/*N*/ aPagV.Clear();
+/*N*/ }
+
+/*N*/ void SdrPaintView::ClearHideViews()
+/*N*/ {
+/*N*/ for (USHORT nh=0; nh<GetPageHideCount(); nh++) {
+/*?*/ SdrPageView* pPV=GetPageHidePvNum(nh);
+/*?*/ delete pPV;
+/*N*/ }
+/*N*/ aPagHide.Clear();
+/*N*/ }
+
+/*N*/ void SdrPaintView::Clear()
+/*N*/ {
+/*N*/ ClearPageViews();
+/*N*/ ClearHideViews();
+/*N*/ }
+
+/*N*/ void SdrPaintView::ClearAll()
+/*N*/ {
+/*N*/ for( void* p = aAsyncPaintList.First(); p; p = aAsyncPaintList.Next() )
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 delete (ImpAsyncStruct*) p;
+/*N*/
+/*N*/ aAsyncPaintList.Clear();
+/*N*/ ClearPageViews();
+/*N*/ ClearHideViews();
+/*N*/ ImpForceSwapOut();
+/*N*/ }
+
+/*N*/ SdrPageView* SdrPaintView::ShowPage(SdrPage* pPage, const Point& rOffs)
+/*N*/ {
+/*N*/ SdrPageView* pPV=NULL;
+/*N*/ if (pPage!=NULL) {
+/*N*/ SdrPageView* pTmpPV=NULL;
+/*N*/ if (!bPageTwice) pTmpPV=GetPageView(pPage); // Evtl. jede Seite nur einmal!
+/*N*/ if (pTmpPV==NULL) {
+/*N*/ USHORT nPos=GetHiddenPV(pPage); // War die schon mal da?
+/*N*/ if (nPos<GetPageHideCount()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ } else {
+/*N*/ pPV=new SdrPageView(pPage,rOffs,*((SdrView*)this));
+/*N*/ }
+/*N*/ if (pPV!=NULL) {
+/*N*/ aPagV.Insert(pPV,CONTAINER_APPEND);
+/*N*/ pPV->Show();
+/*N*/
+/*N*/ // #110290# Swap out graphics when switching pages
+/*N*/ ImpForceSwapOut();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return pPV;
+/*N*/ }
+
+/*N*/ void SdrPaintView::HidePage(SdrPageView* pPV)
+/*N*/ {
+/*N*/ if (pPV!=NULL) {
+/*N*/ ULONG nPos=aPagV.GetPos(pPV);
+/*N*/ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+/*N*/ aPagV.Remove(nPos);
+/*N*/ pPV->Hide();
+/*N*/ if (bSaveHiddenPages) {
+/*?*/ aPagHide.Insert(pPV,CONTAINER_APPEND);
+/*N*/ } else {
+/*N*/ delete pPV;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ void SdrPaintView::HideAllPages()
+/*N*/ {
+/*N*/ while (GetPageViewCount()>0) HidePagePvNum(0);
+/*N*/ }
+
+
+
+/*N*/ SdrPageView* SdrPaintView::GetPageView(const SdrPage* pPage) const
+/*N*/ {
+/*N*/ if (pPage==NULL) return NULL;
+/*N*/ BOOL bWeiter=TRUE;
+/*N*/ SdrPageView* pPV=NULL;
+/*N*/ for (USHORT i=0; i<GetPageViewCount() && bWeiter; i++) {
+/*?*/ pPV=GetPageViewPvNum(i);
+/*?*/ bWeiter=(pPV->GetPage()!=pPage);
+/*N*/ }
+/*N*/ if (bWeiter) return NULL;
+/*N*/ else return pPV;
+/*N*/ }
+
+
+
+
+
+/*N*/ USHORT SdrPaintView::GetHiddenPV(const SdrPage* pPage) const
+/*N*/ {
+/*N*/ BOOL bWeiter=TRUE;
+/*N*/ USHORT i;
+/*N*/ for (i=0; i<GetPageHideCount() && bWeiter;) {
+/*?*/ SdrPageView* pPV=GetPageHidePvNum(i);
+/*?*/ bWeiter=(pPV->GetPage()!=pPage);
+/*?*/ if (bWeiter) i++;
+/*N*/ }
+/*N*/ return i;
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPaintView::AddWin(OutputDevice* pWin1)
+/*N*/ {
+/*N*/ SdrViewWinRec* pWinRec=new SdrViewWinRec(pWin1);
+/*N*/ pWinRec->bXorVisible=TRUE; // Normalerweise ist Xor nicht unterdrueckt
+/*N*/ aWinList.Insert(pWinRec);
+/*N*/ for (USHORT i=0; i<GetPageViewCount(); i++) {
+/*?*/ GetPageViewPvNum(i)->AddWin(pWin1);
+/*N*/ }
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (pItemBrowser!=NULL) {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 pItemBrowser->ForceParent();
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ void SdrPaintView::DelWin(OutputDevice* pWin1)
+/*N*/ {
+/*N*/ USHORT nPos=aWinList.Find(pWin1);
+/*N*/ if (nPos!=SDRVIEWWIN_NOTFOUND) {
+/*N*/ for (USHORT i=0; i<GetPageViewCount(); i++) {
+/*N*/ GetPageViewPvNum(i)->DelWin(pWin1);
+/*N*/ }
+/*N*/ aWinList.Delete(nPos);
+/*N*/ }
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if (pItemBrowser!=NULL) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 pItemBrowser->ForceParent();
+/*N*/ #endif
+/*N*/ }
+
+/*N*/ Rectangle SdrPaintView::GetVisibleArea( USHORT nNum )
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return Rectangle();//STRIP001
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPaintView::InitRedraw(OutputDevice* pOut, const Region& rReg, USHORT nPaintMode)
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+/*N*/ void SdrPaintView::GlueInvalidate() const
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");
+/*N*/ }
+
+/*N*/ void SdrPaintView::InvalidateAllWin()
+/*N*/ {
+/*N*/ for (USHORT i=0; i<GetWinCount(); i++) {
+/*N*/ OutputDevice* pOut=GetWin(i);
+/*N*/ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+/*N*/ InvalidateOneWin(*(Window*)pOut);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix)
+/*N*/ {
+/*N*/ USHORT nWinAnz=GetWinCount();
+/*N*/ for (USHORT i=0; i<nWinAnz; i++) {
+/*N*/ OutputDevice* pOut=GetWin(i);
+/*N*/ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+/*N*/ Rectangle aRect(rRect);
+/*N*/ if (bPlus1Pix) {
+/*N*/ Size aPixSiz(1,1);
+/*N*/ Size aSiz(pOut->PixelToLogic(aPixSiz));
+/*N*/ aRect.Left ()-=aSiz.Width();
+/*N*/ aRect.Top ()-=aSiz.Height();
+/*N*/ aRect.Right ()+=aSiz.Width();
+/*N*/ aRect.Bottom()+=aSiz.Height();
+/*N*/ }
+/*N*/ Point aOrg(pOut->GetMapMode().GetOrigin());
+/*N*/ aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y();
+/*N*/ Rectangle aOutRect(aOrg,pOut->GetOutputSize());
+/*N*/ if (aRect.IsOver(aOutRect)) {
+/*N*/ InvalidateOneWin(*(Window*)pOut,aRect);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPaintView::InvalidateOneWin(Window& rWin)
+/*N*/ {
+/*N*/ rWin.Invalidate();
+/*N*/ }
+
+/*N*/ void SdrPaintView::InvalidateOneWin(Window& rWin, const Rectangle& rRect)
+/*N*/ {
+/*N*/ rWin.Invalidate(rRect);
+/*N*/ }
+
+
+/*N*/ void SdrPaintView::LeaveAllGroup()
+/*N*/ {
+/*N*/ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ pPV->LeaveAllGroup();
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrPaintView::SetMasterPagePaintCaching( BOOL bOn, ULONG nCacheMode )
+/*N*/ {
+/*N*/ bMasterBmp = bOn;
+/*N*/
+/*N*/ if( bOn )
+/*N*/ {
+/*N*/ if( SDR_MASTERPAGECACHE_DEFAULT == nCacheMode || SDR_MASTERPAGECACHE_NONE == nCacheMode )
+/*N*/ nMasterCacheMode = SDR_MASTERPAGECACHE_FULL;
+/*N*/ else
+/*N*/ nMasterCacheMode = nCacheMode;
+/*N*/
+/*N*/ ReleaseMasterPagePaintCache();
+/*N*/ }
+/*N*/ else
+/*N*/ nMasterCacheMode = SDR_MASTERPAGECACHE_NONE;
+/*N*/ }
+
+// z.B. rufen, wenn Obj der MPg geaendert
+/*N*/ void SdrPaintView::ReleaseMasterPagePaintCache()
+/*N*/ {
+/*N*/ if (pMasterBmp!=NULL) {
+/*?*/ delete pMasterBmp;
+/*?*/ pMasterBmp=NULL;
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+/*N*/ {
+/*N*/ pDefaultStyleSheet=pStyleSheet;
+/*N*/ 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();
+/*?*/ }
+/*N*/ }
+#ifndef SVX_LIGHT
+/*N*/ if (pItemBrowser!=NULL) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 pItemBrowser->SetDirty();
+#endif
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPaintView::WriteRecords(SvStream& rOut) const
+/*N*/ {
+/*N*/ {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWPAGEVIEWS);
+/*N*/ USHORT nv;
+/*N*/ for (nv=0; nv<GetPageViewCount(); nv++) {
+/*N*/ SdrPageView* pPV=GetPageViewPvNum(nv);
+/*N*/ if (pPV->GetPage()->IsInserted()) {
+/*?*/ rOut<<*pPV;
+/*N*/ }
+/*N*/ }
+/*N*/ for (nv=0; nv<GetPageHideCount(); nv++) {
+/*?*/ SdrPageView* pPV=GetPageHidePvNum(nv);
+/*?*/ if (pPV->GetPage()->IsInserted()) {
+/*?*/ rOut<<*pPV;
+/*N*/ }
+/*N*/ }
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWVISIELEM);
+/*N*/ rOut<<BOOL(bLayerSortedRedraw);
+/*N*/ rOut<<BOOL(bPageVisible);
+/*N*/ rOut<<BOOL(bBordVisible);
+/*N*/ rOut<<BOOL(bGridVisible);
+/*N*/ rOut<<BOOL(bGridFront);
+/*N*/ rOut<<BOOL(bHlplVisible);
+/*N*/ rOut<<BOOL(bHlplFront);
+/*N*/ rOut<<BOOL(bGlueVisible);
+/*N*/ rOut<<aGridBig;
+/*N*/ rOut<<aGridFin;
+/*N*/ rOut<<aGridWdtX;
+/*N*/ rOut<<aGridWdtY;
+/*N*/ rOut<<aGridSubdiv;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWAKTLAYER);
+/*N*/
+/*N*/ // UNICODE: rOut << aAktLayer;
+/*N*/ rOut.WriteByteString(aAktLayer);
+/*N*/
+/*N*/ // UNICODE: rOut << aMeasureLayer;
+/*N*/ rOut.WriteByteString(aMeasureLayer);
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ BOOL SdrPaintView::ReadRecord(const SdrIOHeader& rViewHead,
+/*N*/ const SdrNamedSubRecord& rSubHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (rSubHead.GetInventor()==SdrInventor) {
+/*N*/ bRet=TRUE;
+/*N*/ switch (rSubHead.GetIdentifier()) {
+/*N*/ case SDRIORECNAME_VIEWPAGEVIEWS: {
+/*N*/ while (rSubHead.GetBytesLeft()>0 && rIn.GetError()==0 && !rIn.IsEof()) {
+/*N*/ SdrPageView* pPV=new SdrPageView(NULL,Point(),*(SdrView*)this);
+/*N*/ rIn>>*pPV;
+/*N*/ if (pPV->GetPage()!=NULL) {
+/*N*/ if (pPV->IsVisible()) {
+/*N*/ aPagV.Insert(pPV,CONTAINER_APPEND);
+/*N*/ } else aPagHide.Insert(pPV,CONTAINER_APPEND);
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrPaintView::ReadRecord(): Seite der PageView nicht gefunden");
+/*N*/ delete pPV;
+/*N*/ }
+/*N*/ }
+/*N*/ } break;
+/*N*/
+/*N*/ case SDRIORECNAME_VIEWVISIELEM:
+/*N*/ {
+/*N*/ BOOL bTemp;
+/*N*/
+/*N*/ rIn>>bTemp; bLayerSortedRedraw=bTemp;
+/*N*/ rIn>>bTemp; bPageVisible =bTemp;
+/*N*/ rIn>>bTemp; bBordVisible =bTemp;
+/*N*/ rIn>>bTemp; bGridVisible =bTemp;
+/*N*/ rIn>>bTemp; bGridFront =bTemp;
+/*N*/ rIn>>bTemp; bHlplVisible =bTemp;
+/*N*/ rIn>>bTemp; bHlplFront =bTemp;
+/*N*/ rIn>>bTemp; bGlueVisible =bTemp;
+/*N*/ rIn>>aGridBig;
+/*N*/ rIn>>aGridFin;
+/*N*/
+/*N*/ if(rSubHead.GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ rIn >> aGridWdtX;
+/*N*/ rIn >> aGridWdtY;
+/*N*/ rIn >> aGridSubdiv;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ case SDRIORECNAME_VIEWAKTLAYER:
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aAktLayer;
+/*N*/ rIn.ReadByteString(aAktLayer);
+/*N*/
+/*N*/ if(rSubHead.GetBytesLeft() > 0)
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aMeasureLayer;
+/*N*/ rIn.ReadByteString(aMeasureLayer);
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ default:
+/*N*/ bRet = FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ void SdrPaintView::onChangeColorConfig()
+/*N*/ {
+/*N*/ SetGridColor( Color( maColorConfig.GetColorValue( DRAWGRID ).nColor ) );
+/*N*/ }
+
+/*N*/ void SdrPaintView::SetGridColor( Color aColor )
+/*N*/ {
+/*N*/ maGridColor = aColor;
+/*N*/ }
+
+
+// #103834# Set background color for svx at SdrPageViews
+
+/*N*/ void SdrPaintView::ImpForceSwapOut()
+/*N*/ {
+/*N*/ // #110290# Force swap out all graphics on this page. There might be
+/*N*/ // some left, since every graphic that has not received a Draw yet,
+/*N*/ // but is swapped in, has its swapout handler disabled.
+/*N*/ while( !maSwappedInGraphicsStack.empty() )
+/*N*/ {
+/*N*/ maSwappedInGraphicsStack.front()->ForceSwapOut();
+/*N*/ maSwappedInGraphicsStack.pop_front();
+/*N*/ }
+/*N*/ }
+
+// eof
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdpoev.cxx b/binfilter/bf_svx/source/svdraw/svx_svdpoev.cxx
new file mode 100644
index 000000000000..c5f2d77f9621
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdpoev.cxx
@@ -0,0 +1,163 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdpoev.hxx"
+#include <math.h>
+#include "svdopath.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrPolyEditView::ImpResetPolyPossibilityFlags()
+/*N*/ {
+/*N*/ eMarkedPointsSmooth=SDRPATHSMOOTH_DONTCARE;
+/*N*/ eMarkedSegmentsKind=SDRPATHSEGMENT_DONTCARE;
+/*N*/ bSetMarkedPointsSmoothPossible=FALSE;
+/*N*/ bSetMarkedSegmentsKindPossible=FALSE;
+/*N*/ }
+
+/*N*/ void SdrPolyEditView::ImpClearVars()
+/*N*/ {
+/*N*/ ImpResetPolyPossibilityFlags();
+/*N*/ }
+
+/*N*/ SdrPolyEditView::SdrPolyEditView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrEditView(pModel1,pOut)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ }
+
+/*N*/ SdrPolyEditView::~SdrPolyEditView()
+/*N*/ {
+/*N*/ }
+
+/*N*/ void SdrPolyEditView::ImpCheckPolyPossibilities()
+/*N*/ {
+/*N*/ ImpResetPolyPossibilityFlags();
+/*N*/ ULONG nMarkAnz=aMark.GetMarkCount();
+/*N*/ 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;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdsnpv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdsnpv.cxx
new file mode 100644
index 000000000000..2acb85cc5b13
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdsnpv.cxx
@@ -0,0 +1,277 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdsnpv.hxx"
+#include <math.h>
+
+#include "svdio.hxx"
+#include "svdpagv.hxx"
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@@@@@ @@@@@@ @@@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrSnapView::ClearVars()
+/*N*/ {
+/*N*/ nMagnSizPix=4;
+/*N*/ bSnapEnab=TRUE;
+/*N*/ bGridSnap=TRUE;
+/*N*/ bSnapTo1Pix=TRUE;
+/*N*/ bBordSnap=TRUE;
+/*N*/ bHlplSnap=TRUE;
+/*N*/ bOFrmSnap=TRUE;
+/*N*/ bOPntSnap=FALSE;
+/*N*/ bOConSnap=TRUE;
+/*N*/ bMoveMFrmSnap=TRUE;
+/*N*/ bMoveOFrmSnap=TRUE;
+/*N*/ bMoveOPntSnap=TRUE;
+/*N*/ bMoveOConSnap=TRUE;
+/*N*/ bMoveSnapOnlyTopLeft=FALSE;
+/*N*/ bSetPageOrg=FALSE;
+/*N*/ bOrtho=FALSE;
+/*N*/ bBigOrtho=TRUE;
+/*N*/ nSnapAngle=1500;
+/*N*/ bAngleSnapEnab=FALSE;
+/*N*/ bMoveOnlyDragging=FALSE;
+/*N*/ bSlantButShear=FALSE;
+/*N*/ bCrookNoContortion=FALSE;
+/*N*/ eCrookMode=SDRCROOK_ROTATE;
+/*N*/ bHlplFixed=FALSE;
+/*N*/ pDragHelpLinePV=NULL;
+/*N*/ nDragHelpLineNum=0;
+/*N*/ bDragHelpLine=FALSE;
+/*N*/ bEliminatePolyPoints=FALSE;
+/*N*/ nEliminatePolyPointLimitAngle=0;
+/*N*/ }
+
+/*N*/ SdrSnapView::SdrSnapView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrPaintView(pModel1,pOut)
+/*N*/ {
+/*N*/ ClearVars();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ BOOL SdrSnapView::IsAction() const
+/*N*/ {
+/*N*/ return IsSetPageOrg() || IsDragHelpLine() || SdrPaintView::IsAction();
+/*N*/ }
+
+
+
+
+/*N*/ void SdrSnapView::BrkAction()
+/*N*/ {
+/*N*/ BrkSetPageOrg();
+/*N*/ BrkDragHelpLine();
+/*N*/ SdrPaintView::BrkAction();
+/*N*/ }
+
+
+/*N*/ void SdrSnapView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+/*N*/ {
+/*N*/ SdrPaintView::ToggleShownXor(pOut,pRegion);
+/*N*/ if (IsSetPageOrg()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ if (IsDragHelpLine()) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrSnapView::SnapMove()
+/*N*/ {
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+#define NOT_SNAPPED 0x7FFFFFFF
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+/*N*/ void SdrSnapView::BrkSetPageOrg()
+/*N*/ {
+/*N*/ if (bSetPageOrg) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrSnapView::BrkDragHelpLine()
+/*N*/ {
+/*N*/ if (bDragHelpLine) {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrSnapView::WriteRecords(SvStream& rOut) const
+/*N*/ {
+/*N*/ SdrPaintView::WriteRecords(rOut);
+/*N*/ {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWSNAP);
+/*N*/ rOut<<aMagnSiz;
+/*N*/ rOut<<aSnapSiz;
+/*N*/
+/*N*/ rOut << (BOOL)bSnapEnab;
+/*N*/ rOut << (BOOL)bGridSnap;
+/*N*/ rOut << (BOOL)bBordSnap;
+/*N*/ rOut << (BOOL)bHlplSnap;
+/*N*/ rOut << (BOOL)bOFrmSnap;
+/*N*/ rOut << (BOOL)bOPntSnap;
+/*N*/ rOut << (BOOL)bOConSnap;
+/*N*/ rOut << (BOOL)bMoveMFrmSnap;
+/*N*/ rOut << (BOOL)bMoveOFrmSnap;
+/*N*/ rOut << (BOOL)bMoveOPntSnap;
+/*N*/ rOut << (BOOL)bMoveOConSnap;
+/*N*/ rOut << (BOOL)bHlplFixed;
+/*N*/
+/*N*/ rOut<<nMagnSizPix;
+/*N*/
+/*N*/ rOut << (BOOL)bSnapTo1Pix;
+/*N*/ rOut << (BOOL)bMoveSnapOnlyTopLeft;
+/*N*/
+/*N*/ rOut<<aSnapWdtX;
+/*N*/ rOut<<aSnapWdtY;
+/*N*/ } {
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWORTHO);
+/*N*/
+/*N*/ rOut << (BOOL)bOrtho;
+/*N*/ rOut << (BOOL)bBigOrtho;
+/*N*/
+/*N*/ rOut<<nSnapAngle;
+/*N*/
+/*N*/ rOut << (BOOL)bAngleSnapEnab;
+/*N*/ rOut << (BOOL)bMoveOnlyDragging;
+/*N*/ rOut << (BOOL)bSlantButShear;
+/*N*/ rOut << (BOOL)bCrookNoContortion;
+/*N*/
+/*N*/ rOut<<USHORT(eCrookMode);
+/*N*/ }
+/*N*/ }
+
+/*N*/ BOOL SdrSnapView::ReadRecord(const SdrIOHeader& rViewHead,
+/*N*/ const SdrNamedSubRecord& rSubHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (rSubHead.GetInventor()==SdrInventor)
+/*N*/ {
+/*N*/ bRet=TRUE;
+/*N*/ BOOL bZwi;
+/*N*/
+/*N*/ switch (rSubHead.GetIdentifier())
+/*N*/ {
+/*N*/ case SDRIORECNAME_VIEWSNAP:
+/*N*/ {
+/*N*/ rIn>>aMagnSiz;
+/*N*/ rIn>>aSnapSiz;
+/*N*/
+/*N*/ rIn >> bZwi; bSnapEnab = bZwi;
+/*N*/ rIn >> bZwi; bGridSnap = bZwi;
+/*N*/ rIn >> bZwi; bBordSnap = bZwi;
+/*N*/ rIn >> bZwi; bHlplSnap = bZwi;
+/*N*/ rIn >> bZwi; bOFrmSnap = bZwi;
+/*N*/ rIn >> bZwi; bOPntSnap = bZwi;
+/*N*/ rIn >> bZwi; bOConSnap = bZwi;
+/*N*/ rIn >> bZwi; bMoveMFrmSnap = bZwi;
+/*N*/ rIn >> bZwi; bMoveOFrmSnap = bZwi;
+/*N*/ rIn >> bZwi; bMoveOPntSnap = bZwi;
+/*N*/ rIn >> bZwi; bMoveOConSnap = bZwi;
+/*N*/
+/*N*/ if (rSubHead.GetBytesLeft()>0)
+/*N*/ {
+/*N*/ rIn >> bZwi; bHlplFixed = bZwi; // kam erst spaeter dazu
+/*N*/ }
+/*N*/ if (rSubHead.GetBytesLeft()>0)
+/*N*/ {
+/*N*/ // kam erst spaeter dazu
+/*N*/ rIn>>nMagnSizPix;
+/*N*/ rIn >> bZwi; bSnapTo1Pix = bZwi;
+/*N*/ }
+/*N*/ if (rSubHead.GetBytesLeft()>0)
+/*N*/ {
+/*N*/ // kam erst spaeter dazu
+/*N*/ rIn >> bZwi; bMoveSnapOnlyTopLeft = bZwi;
+/*N*/ }
+/*N*/ if (rSubHead.GetBytesLeft()>0)
+/*N*/ {
+/*N*/ // kam erst spaeter dazu
+/*N*/ rIn>>aSnapWdtX;
+/*N*/ rIn>>aSnapWdtY;
+/*N*/ }
+/*N*/ } break;
+/*N*/ case SDRIORECNAME_VIEWORTHO:
+/*N*/ {
+/*N*/ rIn >> bZwi; bOrtho = bZwi;
+/*N*/ rIn >> bZwi; bBigOrtho = bZwi;
+/*N*/
+/*N*/ rIn>>nSnapAngle;
+/*N*/
+/*N*/ if (rSubHead.GetBytesLeft()>0)
+/*N*/ {
+/*N*/ // kam erst spaeter dazu
+/*N*/ rIn >> bZwi; bAngleSnapEnab = bZwi;
+/*N*/ rIn >> bZwi; bMoveOnlyDragging = bZwi;
+/*N*/ rIn >> bZwi; bSlantButShear = bZwi;
+/*N*/ rIn >> bZwi; bCrookNoContortion = bZwi;
+/*N*/ }
+/*N*/ if (rSubHead.GetBytesLeft()>0)
+/*N*/ {
+/*N*/ // kam erst spaeter dazu
+/*N*/ USHORT nCrookMode;
+/*N*/ rIn>>nCrookMode;
+/*N*/ eCrookMode=SdrCrookMode(nCrookMode);
+/*N*/ }
+/*N*/ } break;
+/*N*/ default: bRet=FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bRet) bRet=SdrPaintView::ReadRecord(rViewHead,rSubHead,rIn);
+/*N*/ return bRet;
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdstr.src b/binfilter/bf_svx/source/svdraw/svx_svdstr.src
new file mode 100644
index 000000000000..d60739113c01
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdstr.src
@@ -0,0 +1,378 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+/* StarView resource file */
+
+#include "svdstr.hrc"
+ // Ab hier gecachte Strings
+ //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_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";
+ //};
+// Neu ab 537: Namen fuer 3D-Objekte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+String STR_ViewTextEdit
+{
+ Text [ de ] = "TextEdit: Absatz %a, Zeile %z, Spalte %s" ;
+ Text [ en-US ] = "TextEdit: Paragraph %a, Row %z, Column %s" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "EditarTexto: Parágrafo %a, Linha %z, Coluna %s";
+ Text[ ru ] = "Правка текÑта: Ðбзац %a, Строка %z, Столбец %s";
+ Text[ el ] = "ΕπεξεÏγασία κειμένου: ΠαÏάγÏαφος %a, ΓÏαμμή %z, Στήλη %s";
+ Text[ nl ] = "TextEdit: Alinea %a, Rij %r, Kolom %k";
+ Text[ fr ] = "TextEdit : Paragraphe %a, Ligne %z, Colonne %s";
+ Text[ es ] = "Editar Texto: Párrafo %a, Línea %z, Columna %s";
+ Text[ fi ] = "Tekstin muokkaus: Kappale %a, Rivi %z, Sarake %s";
+ Text[ ca ] = "Edita Text: Paràgraf %a, Línia %z, Columna %s";
+ Text[ it ] = "TextEdit: Paragrafo %a, Riga %z, Colonna %s";
+ Text[ sk ] = "Editor textu: Odstavec %a, Riadok %z, Stĺpec %s";
+ Text[ da ] = "Tekstredigering: Afsnit %a, Række %z, Kolonne %s";
+ Text[ sv ] = "TextEdit: Stycke %a, Rad %z, Kolumn %s";
+ Text[ pl ] = "Edytuj tekst: Akapit %a, Wiersz %z, Kolumna %s";
+ Text[ pt-BR ] = "Editar Texto: Parágrafo %a, Linha %z, Coluna %s";
+ Text[ th ] = "à¹à¸à¹‰à¹„ขข้อความ: ย่อหน้า %a, à¹à¸–ว %z, คอลัมน์ %s";
+ Text[ ja ] = "テキスト編集: 段è½%aã€è¡Œ%zã€åˆ—%s";
+ Text[ ko ] = "í…스트 편집: ë‹¨ë½ %a, í–‰ %z, ì—´ %s";
+ Text[ zh-CN ] = "编辑文字:段è½%a,行%z,æ %s";
+ Text[ zh-TW ] = "編輯文字:段è½%a,行%z,欄%s";
+ Text[ tr ] = "Metin düzenleme: Paragraf %a, Satır %z, Sütun %s";
+ Text[ hi-IN ] = "टेकà¥à¤¸à¥à¤Ÿà¥ संपादन: परिचà¥à¤›à¥‡à¤¦ %a, पंकà¥à¤¤à¤¿ %z, सà¥à¤¤à¤®à¥à¤­ %s";
+ Text[ ar ] = "تحرير النص: الÙقرة %aØŒ السطر %zØŒ العمود %s";
+ Text[ he ] = "‮עריכת טקסט: פיסקה %a, שורה %z, עמודה %s‬";
+};
+
+String STR_ViewMarkPoints
+{
+ Text [ de ] = "Markiere Punkte" ;
+ Text [ en-US ] = "Mark points" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Marcar pontos";
+ Text[ ru ] = "Отметить точки";
+ Text[ el ] = "Σήμανση σημείων";
+ Text[ nl ] = "Markeer punten";
+ Text[ fr ] = "Sélectionner des points";
+ Text[ es ] = "Marcar puntos";
+ Text[ fi ] = "Merkitse kohdat";
+ Text[ ca ] = "Marca els punts";
+ Text[ it ] = "Contrassegna punti";
+ Text[ sk ] = "OznaÄiÅ¥ body";
+ Text[ da ] = "Marker punkter";
+ Text[ sv ] = "Markera punkter";
+ Text[ pl ] = "Zaznacz punkty";
+ Text[ pt-BR ] = "Marcar pontos";
+ Text[ th ] = "ทำเครื่องหมายจุด";
+ Text[ ja ] = "制御点をé¸æŠžã—ã¾ã™";
+ Text[ ko ] = "ì  ì„ íƒ í‘œì‹œ";
+ Text[ zh-CN ] = "选择接点";
+ Text[ zh-TW ] = "é¸å–接點";
+ Text[ tr ] = "Noktaları seç";
+ Text[ hi-IN ] = "बिनà¥à¤¦à¥à¤“ं को सूचित करो";
+ Text[ ar ] = "تحديد نقاط";
+ Text[ he ] = "‮סימון נקודות‬";
+};
+
+String STR_ViewMarkGluePoints
+{
+ Text [ de ] = "Markiere Klebepunkte" ;
+ Text [ en-US ] = "Mark glue points" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Marcar pontos de colagem";
+ Text[ ru ] = "Выделить точки ÑоединениÑ";
+ Text[ el ] = "Σήμανση σημείων κόλλησης";
+ Text[ nl ] = "Markeer plakpunten";
+ Text[ fr ] = "Marquer les points de collage";
+ Text[ es ] = "Marcar puntos de adhesión";
+ Text[ fi ] = "Merkitse kiinnityskohdat";
+ Text[ ca ] = "Marca els punts de cola";
+ Text[ it ] = "Contrassegna punti di incollaggio";
+ Text[ sk ] = "OznaÄiÅ¥ záchytné body";
+ Text[ da ] = "Marker klæbepunkter";
+ Text[ sv ] = "Markera fästpunkter";
+ Text[ pl ] = "Zaznacz punkty sklejania";
+ Text[ pt-BR ] = "Marcar pontos de adesão";
+ Text[ th ] = "ทำเครื่องหมายจุดเชื่อม";
+ Text[ ja ] = "接ç€ç‚¹ã‚’é¸æŠžã—ã¾ã™";
+ Text[ ko ] = "ì ‘ì°©ì  ì„ íƒ í‘œì‹œ";
+ Text[ zh-CN ] = "标记粘结点";
+ Text[ zh-TW ] = "é¸å–接點";
+ Text[ tr ] = "Yapıştırma noktalarını seç";
+ Text[ hi-IN ] = "गà¥à¤²à¥‚ बिनà¥à¤¦à¥à¤“ं को सूचित करो";
+ Text[ ar ] = "تحديد نقاط اللصق";
+ Text[ he ] = "‮סימון נקודות הדבקה‬";
+};
+String STR_ViewMarkMoreGluePoints
+{
+ Text [ de ] = "Markiere weitere Klebepunkte" ;
+ Text [ en-US ] = "Mark additional glue points" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Marcar pontos de colagem adicionais";
+ Text[ ru ] = "Выделить оÑтальные точки ÑоединениÑ";
+ Text[ el ] = "Σήμανση επιπλέον σημείων κόλλησης";
+ Text[ nl ] = "Markeer andere plakpunten";
+ Text[ fr ] = "Sélectionner des points de collage supplémentaires";
+ Text[ es ] = "Marcar puntos de adhesión adicionales";
+ Text[ fi ] = "Merkitse lisäkiinnityskohdat";
+ Text[ ca ] = "Marca els punts de cola addicionals";
+ Text[ it ] = "Contrassegna punti di incollaggio aggiuntivi";
+ Text[ sk ] = "OznaÄiÅ¥ ÄalÅ¡ie záchytné body";
+ Text[ da ] = "Marker flere klæbepunkter";
+ Text[ sv ] = "Markera ytterligare fästpunkter";
+ Text[ pl ] = "Zaznacz dodatkowe punkty sklejania";
+ Text[ pt-BR ] = "Marcar pontos de adesão adicionais";
+ Text[ th ] = "ทำเครื่องหมายจุดเชื่อมเพิ่มเติม";
+ Text[ ja ] = "ã»ã‹ã®æŽ¥ç€ç‚¹ã‚‚é¸æŠž";
+ Text[ ko ] = "기타 ì ‘ì°©ì  ì„ íƒ í‘œì‹œ";
+ Text[ zh-CN ] = "标记其他的粘结点";
+ Text[ zh-TW ] = "é¸å–其他的接點";
+ Text[ tr ] = "Ek yapıştırma noktaları seç";
+ Text[ hi-IN ] = "अधिकतर गà¥à¤²à¥‚ बिनà¥à¤¦à¥à¤“ं को सूचित करो";
+ Text[ ar ] = "تحديد نقاط لصق أخرى";
+ Text[ he ] = "‮סימון נקודות הדבקה נוספות‬";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Ende der gecachten Strings
+
+ // und hier noch Bitmaps
+Bitmap BMAP_GrafikEi { File = "grafikei.bmp" ; };
+
+// Strings fuer den Vorlagen-Dialog
+
+// Strings fuer den Vorlagen-Dialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// #100499#
+
+// #101928#
+
+// ******************************************************************* EOF
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdsuro.cxx b/binfilter/bf_svx/source/svdraw/svx_svdsuro.cxx
new file mode 100644
index 000000000000..7f827e76d2ca
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdsuro.cxx
@@ -0,0 +1,283 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdsuro.hxx"
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+#include "svdmodel.hxx"
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// fuer Schreiben
+/*N*/ SdrObjSurrogate::SdrObjSurrogate(SdrObject* pObj1, const SdrObject* pRefObj1)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ pObj=pObj1;
+/*N*/ pRefObj=pRefObj1;
+/*N*/ ImpMakeSurrogate();
+/*N*/ }
+
+// fuer Lesen
+/*N*/ SdrObjSurrogate::SdrObjSurrogate(const SdrModel& rMod, SvStream& rIn)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ pModel=&rMod;
+/*N*/ ImpRead(rIn);
+/*N*/ }
+
+// fuer Lesen
+/*N*/ SdrObjSurrogate::SdrObjSurrogate(const SdrObject& rRefObj, SvStream& rIn)
+/*N*/ {
+/*N*/ ImpClearVars();
+/*N*/ pRefObj=&rRefObj;
+/*N*/ pModel=rRefObj.GetModel();
+/*N*/ ImpRead(rIn);
+/*N*/ }
+
+/*N*/ SdrObjSurrogate::~SdrObjSurrogate()
+/*N*/ {
+/*N*/ if (pGrpOrdNums!=NULL) delete [] pGrpOrdNums;
+/*N*/ }
+
+/*N*/ void SdrObjSurrogate::ImpClearVars()
+/*N*/ {
+/*N*/ pObj=NULL;
+/*N*/ pRefObj=NULL;
+/*N*/ pList=NULL;
+/*N*/ pRootList=NULL;
+/*N*/ pPage=NULL;
+/*N*/ pModel=NULL;
+/*N*/ eList=SDROBJLIST_UNKNOWN;
+/*N*/ nOrdNum=0;
+/*N*/ pGrpOrdNums=NULL;
+/*N*/ nGrpLevel=0;
+/*N*/ nPageNum=0;
+/*N*/ }
+
+/*N*/ void SdrObjSurrogate::ImpMakeSurrogate()
+/*N*/ {
+/*N*/ if (pObj!=NULL) { // ansonsten bleibt eList=SDROBJLIST_UNKNOWN, weil Obj=NULL
+/*N*/ FASTBOOL bSameList=FALSE;
+/*N*/ FASTBOOL bSamePage=FALSE;
+/*N*/ pModel=pObj->GetModel();
+/*N*/ pList=pObj->GetObjList();
+/*N*/ pRootList=pList;
+/*N*/ pPage=pObj->GetPage();
+/*N*/ nOrdNum=pObj->GetOrdNum();
+/*N*/ DBG_ASSERT(pModel!=NULL,"ImpMakeSurrogate(): Zielobjekt hat kein Model");
+/*N*/ DBG_ASSERT(pList!=NULL,"ImpMakeSurrogate(): Zielobjekt hat keine ObjList");
+/*N*/ if (pModel!=NULL && pList!=NULL) {
+/*N*/ if (pRefObj!=NULL) {
+/*N*/ if (pList==pRefObj->GetObjList()) bSameList=TRUE;
+/*N*/ else if (pPage!=NULL && pPage==pRefObj->GetPage()) bSamePage=TRUE;
+/*N*/ }
+/*N*/ if (!bSameList) {
+/*N*/ //if (eList==SDROBJLIST_UNKNOWN) eList=pList->GetListKind();
+/*N*/ SdrObjList* pL=pList->GetUpList();
+/*N*/ nGrpLevel=0;
+/*N*/ while (pL!=NULL) { pL=pL->GetUpList(); nGrpLevel++; }
+/*N*/ if (nGrpLevel!=0) { DBG_BF_ASSERT(0, "STRIP"); //STRIP001 // Aha, verschachtelt
+/*N*/ } // if (nGrpLevel!=0)
+/*N*/ } // if (eList!=SDROBJLIST_SAMELIST)
+/*N*/ if (bSameList) eList=SDROBJLIST_SAMELIST;
+/*N*/ else if (bSamePage) eList=SDROBJLIST_SAMEPAGE;
+/*N*/ else eList=pRootList->GetListKind();
+/*N*/ if (eList==SDROBJLIST_GROUPOBJ || eList==SDROBJLIST_UNKNOWN) {
+/*?*/ if (pGrpOrdNums!=NULL) {
+/*?*/ delete [] pGrpOrdNums;
+/*?*/ pGrpOrdNums=NULL;
+/*?*/ nGrpLevel=0;
+/*?*/ }
+/*?*/ eList=SDROBJLIST_UNKNOWN;
+/*?*/ return;
+/*N*/ }
+/*N*/ if (SdrIsPageKind(eList)) {
+/*N*/ if (pPage!=NULL) {
+/*N*/ nPageNum=pPage->GetPageNum();
+/*N*/ } else {
+/*?*/ DBG_ERROR("ImpMakeSurrogate(): eList ist eine Page, aber pPage==NULL");
+/*?*/ if (pGrpOrdNums!=NULL) {
+/*?*/ delete [] pGrpOrdNums;
+/*?*/ pGrpOrdNums=NULL;
+/*?*/ nGrpLevel=0;
+/*N*/ }
+/*N*/ eList=SDROBJLIST_UNKNOWN;
+/*N*/ return;
+/*N*/ }
+/*N*/ }
+/*N*/ // so, nun ist alles beisammen und kann gestreamt werden.
+/*N*/ } // if (pModel!=NULL && pList!=NULL)
+/*N*/ } // if (pObj!=NULL)
+/*N*/ }
+
+/*N*/ void SdrObjSurrogate::ImpWriteValue(SvStream& rOut, UINT32 nVal, unsigned nByteAnz) const
+/*N*/ {
+/*N*/ switch (nByteAnz) {
+/*N*/ case 0: rOut<<BYTE(nVal); break;
+/*N*/ case 1: rOut<<UINT16(nVal); break;
+/*N*/ case 3: rOut<<nVal; break;
+/*N*/ default: DBG_ERROR("ImpWriteValue(): Nur Bytelaengen 1, 2 oder 4 sind erlaubt!");
+/*N*/ } // switch
+/*N*/ }
+
+/*N*/ void SdrObjSurrogate::ImpReadValue(SvStream& rIn, UINT32& rVal, unsigned nByteAnz) const
+/*N*/ {
+/*N*/ switch (nByteAnz) {
+/*N*/ case 0: { BYTE n; rIn>>n; rVal=n; } break;
+/*N*/ case 1: { UINT16 n; rIn>>n; rVal=n; } break;
+/*N*/ case 3: { rIn>>rVal; } break;
+/*N*/ default: DBG_ERROR("ImpReadValue(): Nur Bytelaengen 1, 2 oder 4 sind erlaubt!");
+/*N*/ } // switch
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrObjSurrogate& rSurro)
+/*N*/ {
+/*N*/ BYTE nId=BYTE(rSurro.eList);
+/*N*/ if (rSurro.eList==SDROBJLIST_UNKNOWN) {
+/*N*/ rOut<<nId;
+/*N*/ } else {
+/*N*/ FASTBOOL bGrp=rSurro.nGrpLevel!=0;
+/*N*/ if (bGrp) nId|=0x20; // Gruppierung
+/*N*/ ULONG nMaxOrdNum=rSurro.nOrdNum;
+/*N*/ unsigned i;
+/*N*/ for (i=0; i<rSurro.nGrpLevel; i++) {
+/*?*/ if (nMaxOrdNum<rSurro.pGrpOrdNums[i]) nMaxOrdNum=rSurro.pGrpOrdNums[i];
+/*N*/ }
+/*N*/ unsigned nByteAnz=0;
+/*N*/ if (nMaxOrdNum>0xFF) nByteAnz++;
+/*N*/ if (nMaxOrdNum>0xFFFF) nByteAnz+=2;
+/*N*/ nId|=BYTE(nByteAnz<<6); // Byteanzahl an der richtigen Stelle im ID-Byte eintragen
+/*N*/ rOut<<nId;
+/*N*/ rSurro.ImpWriteValue(rOut,rSurro.nOrdNum,nByteAnz);
+/*N*/ if (SdrIsPageKind(rSurro.eList)) { // Seitennummer schreiben
+/*N*/ rOut<<rSurro.nPageNum;
+/*N*/ }
+/*N*/ if (bGrp) { // Gruppierung
+/*?*/ rOut<<rSurro.nGrpLevel;
+/*?*/ for (i=0; i<rSurro.nGrpLevel; i++) {
+/*?*/ rSurro.ImpWriteValue(rOut,rSurro.pGrpOrdNums[i],nByteAnz);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ void SdrObjSurrogate::ImpRead(SvStream& rIn)
+/*N*/ {
+/*N*/ BYTE nId;
+/*N*/ rIn>>nId;
+/*N*/ eList=SdrObjListKind(nId & 0x1F);
+/*N*/ if (eList!=SDROBJLIST_UNKNOWN) {
+/*N*/ FASTBOOL bGrp=(nId & 0x20)!=0; // Id-Byte
+/*N*/ unsigned nByteAnz=(nId & 0xC0)>>6; // aufschluesseln
+/*N*/ ImpReadValue(rIn,nOrdNum,nByteAnz); // Ordnungsnummer des Objekts
+/*N*/ if (SdrIsPageKind(eList)) { // Seitennummer schreiben
+/*N*/ rIn>>nPageNum;
+/*N*/ }
+/*N*/ if (bGrp) { // Gruppierung
+/*?*/ rIn>>nGrpLevel;
+/*?*/ pGrpOrdNums=new UINT32[nGrpLevel];
+/*?*/ for (unsigned i=0; i<nGrpLevel; i++) {
+/*?*/ ImpReadValue(rIn,pGrpOrdNums[i],nByteAnz);
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SdrObjSurrogate::ImpFindObj()
+/*N*/ {
+/*N*/ if (eList!=SDROBJLIST_UNKNOWN) {
+/*N*/ switch (eList) {
+/*N*/ case SDROBJLIST_SAMEPAGE: case SDROBJLIST_SAMELIST: {
+/*N*/ if (pRefObj!=NULL) {
+/*N*/ pPage=pRefObj->GetPage();
+/*N*/ if (eList==SDROBJLIST_SAMELIST) {
+/*N*/ pRootList=pRefObj->GetObjList();
+/*N*/ if (pRootList==NULL) {
+/*N*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): eList=SDROBJLIST_SAMELIST, pRefObj hat jedoch keine ObjList");
+/*N*/ return;
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (pPage!=NULL) {
+/*N*/ pRootList=pPage;
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): eList=SDROBJLIST_SAMEPAGE, pRefObj hat jedoch keine Page");
+/*N*/ return;
+/*N*/ }
+/*N*/ }
+/*N*/ } else {
+/*N*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): Relatives Surrogat benoetigt Referenzobjekt");
+/*N*/ return;
+/*N*/ }
+/*N*/ } break;
+/*N*/ case SDROBJLIST_DRAWPAGE: pPage=pModel->GetPage(nPageNum); pRootList=pPage; break;
+/*N*/ case SDROBJLIST_MASTERPAGE: pPage=pModel->GetMasterPage(nPageNum); pRootList=pPage; break;
+/*N*/ case SDROBJLIST_VIRTOBJECTS: {
+/*N*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): Persistente virtuelle Objekte in dieser Version nicht verfuegbar");
+/*N*/ return;
+/*N*/ } break;
+/*N*/ case SDROBJLIST_SYMBOLTABLE: {
+/*N*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): Symbole in dieser Version nicht verfuegbar");
+/*N*/ return;
+/*N*/ } break;
+/*N*/ default: {
+/*N*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): Unbekannter oder unsinniger Objektlistentyp");
+/*N*/ return;
+/*N*/ }
+/*N*/ } // switch
+/*N*/ pList=pRootList;
+/*N*/ for (unsigned i=0; i<nGrpLevel; i++) {
+/*?*/ SdrObject* pO=pList->GetObj(pGrpOrdNums[i]);
+/*?*/ if (pO!=NULL) {
+/*?*/ pList=pO->GetSubList();
+/*?*/ if (pList==NULL) {
+/*?*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): Objekt ist kein Gruppenobjekt");
+/*?*/ return;
+/*?*/ }
+/*?*/ } else {
+/*?*/ DBG_ERROR("SdrObjSurrogate::ImpFindObj(): Gruppenobjekt nicht gefunden");
+/*?*/ return;
+/*?*/ }
+/*N*/ }
+/*N*/ pObj=pList->GetObj(nOrdNum);
+/*N*/ DBG_ASSERT(pObj!=NULL,"SdrObjSurrogate::ImpFindObj(): Zielobjekt nicht gefunden");
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrObject* SdrObjSurrogate::GetObject()
+/*N*/ {
+/*N*/ if (pObj==NULL && eList!=SDROBJLIST_UNKNOWN) ImpFindObj();
+/*N*/ return pObj;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx b/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx
new file mode 100644
index 000000000000..e3b3ef18a396
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdtouch.cxx
@@ -0,0 +1,282 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <tools/bigint.hxx>
+#include <tools/poly.hxx>
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ class ImpPolyHitCalc {
+/*N*/ public:
+/*N*/ long x1,x2,y1,y2; // Koordinaten des Rect, muessen sortiert sein!
+/*N*/ FASTBOOL bEdge; // ein Punkt lag genau auf einer Kante
+/*N*/ FASTBOOL bIntersect; // mind. 2 Punkte auf verschiedenen Seiten einer Kante
+/*N*/ FASTBOOL bPntInRect; // mind. 1 Punkt war vollstaendig im Rect
+/*N*/ USHORT nOCnt; // wenn Counter ungerade, dann getroffen
+/*N*/ USHORT nUCnt; // wenn Counter ungerade, dann getroffen
+/*N*/ USHORT nLCnt; // wenn Counter ungerade, dann getroffen
+/*N*/ USHORT nRCnt; // wenn Counter ungerade, dann getroffen
+/*N*/ FASTBOOL bLine; // TRUE=PolyLine, kein Polygon
+/*N*/ public:
+/*N*/ ImpPolyHitCalc(const Rectangle& aR, FASTBOOL bIsLine=FALSE)
+/*N*/ {
+/*N*/ bLine=bIsLine;
+/*N*/ bEdge=FALSE;
+/*N*/ bIntersect=FALSE;
+/*N*/ bPntInRect=FALSE;
+/*N*/ x1=aR.Left();
+/*N*/ x2=aR.Right();
+/*N*/ y1=aR.Top();
+/*N*/ y2=aR.Bottom();
+/*N*/ nOCnt=0;
+/*N*/ nUCnt=0;
+/*N*/ nLCnt=0;
+/*N*/ nRCnt=0;
+/*N*/ }
+/*N*/ FASTBOOL IsDecided() { return bEdge || bIntersect || bPntInRect; }
+/*N*/ void CheckPntInRect(const Point& rP)
+/*N*/ {
+/*N*/ if (!bPntInRect) {
+/*N*/ bPntInRect=rP.X()>=x1 && rP.X()<=x2 && rP.Y()>=y1 && rP.Y()<=y2;
+/*N*/ }
+/*N*/ }
+/*N*/ FASTBOOL IsHit() { return (!bLine && (nOCnt & 1)==1) || IsDecided(); }
+/*N*/ };
+
+/*N*/ #define CAREFUL_MULDIV(Res,Val,Mul,Div) { \
+/*N*/ if (Abs(Val)>0xB504 || Abs(Mul)>0xB504) { \
+/*N*/ BigInt aBigTemp(Val); \
+/*N*/ aBigTemp*=Mul; \
+/*N*/ aBigTemp/=Div; \
+/*N*/ Res=long(aBigTemp); \
+/*N*/ } else { \
+/*N*/ Res=Val*Mul/Div; \
+/*N*/ } \
+/*N*/ }
+
+/*N*/ void ImpCheckIt(ImpPolyHitCalc& rH, long lx1, long ly1, long lx2, long ly2,
+/*N*/ long rx1, long ry1, long rx2, long ry2, USHORT& nOCnt, USHORT& nUCnt)
+/*N*/ {
+/*N*/ if ((ly1>ly2) || ((ly1==ly2) && (lx1>lx2))) {
+/*N*/ long nTmp; // die 2 Punkte nach Y sortieren
+/*N*/ nTmp=lx1;
+/*N*/ lx1=lx2;
+/*N*/ lx2=nTmp;
+/*N*/ nTmp=ly1;
+/*N*/ ly1=ly2;
+/*N*/ ly2=nTmp;
+/*N*/ }
+/*N*/ FASTBOOL b1=FALSE,b2=FALSE,b3=FALSE,b4=FALSE; // je 1 Flag fuer jeden der 4 Punkte LO,RO,LU,RU
+/*N*/ FASTBOOL bx1,bx2;
+/*N*/ FASTBOOL by1=ly1<=ry1 && ly2>ry1;
+/*N*/ FASTBOOL by2=ly1<=ry2 && ly2>ry2;
+/*N*/ long dx,dy,a;
+/*N*/ if (by1 || by2) {
+/*N*/ dx=lx2-lx1;
+/*N*/ dy=ly2-ly1;
+/*N*/ }
+/*N*/ if (by1) { // Nur wer die Scanline schneidet
+/*N*/ bx1=lx1<rx1; // x1,y1
+/*N*/ bx2=lx2<rx1;
+/*N*/ FASTBOOL bA=FALSE; // Optimierung: ggf eine Division sparen
+/*N*/ if (bx1 && bx2) b1=TRUE;
+/*N*/ else if (bx1 || bx2) {
+/*N*/ long yTemp=ry1-ly1;
+/*N*/ CAREFUL_MULDIV(a,dx,yTemp,dy); // a=dx*yTemp/dy;
+/*N*/ a+=lx1;
+/*N*/ bA=TRUE;
+/*N*/ rH.bEdge=(a==rx1);
+/*N*/ if (a<rx1) b1=TRUE;
+/*N*/ } // x2,y1
+/*N*/ bx1=lx1<rx2;
+/*N*/ bx2=lx2<rx2;
+/*N*/ if (bx1 && bx2) b2=TRUE;
+/*N*/ else if (bx1 || bx2) {
+/*N*/ if (!bA) {
+/*?*/ long yTemp=ry1-ly1;
+/*?*/ CAREFUL_MULDIV(a,dx,yTemp,dy);
+/*?*/ a+=lx1;
+/*N*/ }
+/*N*/ rH.bEdge=(a==rx2);
+/*N*/ if (a<rx2) b2=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (by2) { // Nur wer die Scanline schneidet
+/*N*/ bx1=lx1<rx1; // x1,y2
+/*N*/ bx2=lx2<rx1;
+/*N*/ FASTBOOL bA=FALSE; // Optimierung: ggf eine Division sparen
+/*N*/ if (bx1 && bx2) b3=TRUE;
+/*N*/ else if (bx1 || bx2) {
+/*N*/ long yTemp=ry2-ly1;
+/*N*/ CAREFUL_MULDIV(a,dx,yTemp,dy);
+/*N*/ a+=lx1;
+/*N*/ bA=TRUE;
+/*N*/ rH.bEdge=(a==rx1);
+/*N*/ if (a<rx1) b3=TRUE;
+/*N*/ }
+/*N*/ bx1=lx1<rx2; // x2,y2
+/*N*/ bx2=lx2<rx2;
+/*N*/ if (bx1 && bx2) b4=TRUE;
+/*N*/ else if (bx1 || bx2) {
+/*N*/ if (!bA) {
+/*N*/ long yTemp=ry2-ly1;
+/*N*/ CAREFUL_MULDIV(a,dx,yTemp,dy);
+/*N*/ a+=lx1;
+/*N*/ }
+/*N*/ rH.bEdge=(a==rx2);
+/*N*/ if (a<rx2) b4=TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (by1 || by2) { // nun die Ergebnisse auswerten
+/*N*/ if (by1 && by2) { // Linie durch beide Scanlines
+/*N*/ if (b1 && b2 && b3 && b4) { nOCnt++; nUCnt++; } // Rect komplett rechts neben der Linie
+/*N*/ else if (b1 || b2 || b3 || b4) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
+/*N*/ } else { // ansonsten Ober- und Unterkante des Rects getrennt betrachten
+/*N*/ if (by1) { // Linie durch Oberkante
+/*N*/ if (b1 && b2) nOCnt++; // Oberkante komplett rechts neben der Linie
+/*N*/ else if (b1 || b2) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
+/*N*/ }
+/*N*/ if (by2) { // Linie durch Unterkante
+/*N*/ if (b3 && b4) nUCnt++; // Unterkante komplett rechts neben der Linie
+/*N*/ else if (b3 || b4) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void CheckPolyHit(const Polygon& rPoly, ImpPolyHitCalc& rH)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetSize();
+/*N*/ if (nAnz==0) return;
+/*N*/ if (nAnz==1) { rH.CheckPntInRect(rPoly[0]); return; }
+/*N*/ Point aPt0=rPoly[USHORT(nAnz-1)];
+/*N*/ rH.CheckPntInRect(aPt0);
+/*N*/ USHORT i=0;
+/*N*/ if (rH.bLine) {
+/*N*/ aPt0=rPoly[0];
+/*N*/ i++;
+/*N*/ }
+/*N*/ for (; i<nAnz && !rH.IsDecided(); i++) {
+/*N*/ Point aP1(aPt0);
+/*N*/ Point aP2(rPoly[i]);
+/*N*/ rH.CheckPntInRect(aP2);
+/*N*/ if (!rH.IsDecided()) {
+/*N*/ ImpCheckIt(rH,aP1.X(),aP1.Y(),aP2.X(),aP2.Y(),rH.x1,rH.y1,rH.x2,rH.y2,rH.nOCnt,rH.nUCnt);
+/*N*/ ImpCheckIt(rH,aP1.Y(),aP1.X(),aP2.Y(),aP2.X(),rH.y1,rH.x1,rH.y2,rH.x2,rH.nLCnt,rH.nRCnt);
+/*N*/ }
+/*N*/ aPt0=rPoly[i];
+/*N*/ }
+/*N*/ if (!rH.bLine) { // Sicherheitshalber nochmal checken
+/*N*/ if ((rH.nOCnt&1)!=(rH.nUCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
+/*N*/ if ((rH.nLCnt&1)!=(rH.nRCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
+/*N*/ if ((rH.nOCnt&1)!=(rH.nLCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ FASTBOOL IsRectTouchesPoly(const PolyPolygon& rPoly, const Rectangle& rHit)
+/*N*/ {
+/*N*/ ImpPolyHitCalc aHit(rHit);
+/*N*/ USHORT nAnz=rPoly.Count();
+/*N*/ for (USHORT i=0; i<nAnz && !aHit.IsDecided(); i++) {
+/*N*/ CheckPolyHit(rPoly.GetObject(i),aHit);
+/*N*/ }
+/*N*/ return aHit.IsHit();
+/*N*/ }
+
+
+
+
+/*N*/ FASTBOOL IsRectTouchesLine(const Polygon& rLine, const Rectangle& rHit)
+/*N*/ {
+/*N*/ ImpPolyHitCalc aHit(rHit,TRUE);
+/*N*/ CheckPolyHit(rLine,aHit);
+/*N*/ return aHit.IsHit();
+/*N*/ }
+
+
+
+
+/*N*/ BYTE CheckPointTouchesPoly(const Polygon& rPoly, const Point& rHit) // 0=Ausserhalb, 1=Innerhalb, 2=Beruehrung
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetSize();
+/*N*/ if (nAnz<2) return FALSE;
+/*N*/ FASTBOOL bEdge=FALSE;
+/*N*/ USHORT nCnt=0;
+/*N*/ Point aPt0=rPoly[USHORT(nAnz-1)];
+/*N*/ for (USHORT i=0; i<nAnz && !bEdge; i++) {
+/*N*/ Point aP1(rPoly[i]);
+/*N*/ Point aP2(aPt0);
+/*N*/ if ((aP1.Y()>aP2.Y()) || ((aP1.Y()==aP2.Y()) && (aP1.X()>aP2.X()))) { Point aTmp(aP1); aP1=aP2; aP2=aTmp; }
+/*N*/ bEdge=((aP1.X()==aP2.X()) && (rHit.X()==aP1.X()) && (rHit.Y()>=aP1.Y()) && (rHit.Y()<=aP2.Y())) ||
+/*N*/ ((aP1.Y()==aP2.Y()) && (rHit.Y()==aP1.Y()) && (rHit.X()>=aP1.X()) && (rHit.X()<=aP2.X())) ||
+/*N*/ (rHit.X()==aP1.X()) && (rHit.Y()==aP1.Y());
+/*N*/ if (!bEdge && aP1.Y()<=rHit.Y() && aP2.Y()>rHit.Y()) { // Nur wer die Scanline schneidet
+/*N*/ FASTBOOL bx1=aP1.X()<rHit.X();
+/*N*/ FASTBOOL bx2=aP2.X()<rHit.X();
+/*N*/ if (bx1 && bx2) nCnt++;
+/*N*/ else if (bx1 || bx2) {
+/*N*/ long dx=aP2.X()-aP1.X();
+/*N*/ long dy=aP2.Y()-aP1.Y();
+/*N*/ long yTemp=rHit.Y()-aP1.Y();
+/*N*/ long xTemp;
+/*N*/ if (Abs(dx)>0xB504 || Abs(yTemp)>0xB504) { // gegen Integerueberlaeufe
+/*?*/ BigInt aBigTemp(dx);
+/*?*/ aBigTemp*=yTemp;
+/*?*/ aBigTemp/=dy;
+/*?*/ xTemp=long(aBigTemp);
+/*N*/ } else {
+/*N*/ xTemp=dx*yTemp /dy;
+/*N*/ }
+/*N*/ xTemp+=aP1.X();
+/*N*/ bEdge=(xTemp==rHit.X());
+/*N*/ if (xTemp<rHit.X()) nCnt++;
+/*N*/ }
+/*N*/ }
+/*N*/ aPt0=rPoly[i];
+/*N*/ }
+/*N*/ if (bEdge) return 2;
+/*N*/ return (nCnt & 1)==1;
+/*N*/ }
+
+/*N*/ FASTBOOL IsPointInsidePoly(const Polygon& rPoly, const Point& rHit)
+/*N*/ {
+/*N*/ return CheckPointTouchesPoly(rPoly,rHit)!=0;
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdtrans.cxx b/binfilter/bf_svx/source/svdraw/svx_svdtrans.cxx
new file mode 100644
index 000000000000..41dcb0ee93f1
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdtrans.cxx
@@ -0,0 +1,425 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdtrans.hxx"
+#include <math.h>
+#include "xpoly.hxx"
+
+
+#include <tools/bigint.hxx>
+
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void MoveXPoly(XPolygon& rPoly, const Size& S)
+/*N*/ {
+/*N*/ rPoly.Move(S.Width(),S.Height());
+/*N*/ }
+
+/*N*/ void MoveXPoly(XPolyPolygon& rPoly, const Size& S)
+/*N*/ {
+/*N*/ rPoly.Move(S.Width(),S.Height());
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, FASTBOOL bNoJustify)
+/*N*/ {
+/*N*/ Fraction xFact(rxFact);
+/*N*/ Fraction yFact(ryFact);
+/*N*/ long nHgt=rRect.Bottom()-rRect.Top();
+/*N*/
+/*N*/ {
+/*N*/ 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()--;
+/*N*/ }
+/*N*/ }
+/*N*/ rRect.Left() =rRef.X()+Round(((double)(rRect.Left() -rRef.X())*xFact.GetNumerator())/xFact.GetDenominator());
+/*N*/ rRect.Right() =rRef.X()+Round(((double)(rRect.Right() -rRef.X())*xFact.GetNumerator())/xFact.GetDenominator());
+/*N*/ }
+/*N*/ {
+/*N*/ 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
+/*N*/ }
+/*N*/ rRect.Top() =rRef.Y()+Round(((double)(rRect.Top() -rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator());
+/*N*/ rRect.Bottom()=rRef.Y()+Round(((double)(rRect.Bottom()-rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator());
+/*N*/ }
+/*N*/ if (!bNoJustify) rRect.Justify();
+/*N*/ }
+
+
+/*?*/ 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);
+/*?*/ }
+/*?*/ }
+
+/*N*/ void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetPointCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ ResizePoint(rPoly[i],rRef,xFact,yFact);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ResizeXPoly(XPolyPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.Count();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ ResizeXPoly(rPoly[i],rRef,xFact,yFact);
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void RotatePoly(Polygon& rPoly, const Point& rRef, double sn, double cs)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetSize();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ RotatePoint(rPoly[i],rRef,sn,cs);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void RotateXPoly(XPolygon& rPoly, const Point& rRef, double sn, double cs)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetPointCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ RotatePoint(rPoly[i],rRef,sn,cs);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.Count();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ RotateXPoly(rPoly[i],rRef,sn,cs);
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetSize();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ ShearPoint(rPoly[i],rRef,tn,bVShear);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.GetPointCount();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ ShearPoint(rPoly[i],rRef,tn,bVShear);
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+/*N*/ {
+/*N*/ USHORT nAnz=rPoly.Count();
+/*N*/ for (USHORT i=0; i<nAnz; i++) {
+/*N*/ ShearXPoly(rPoly[i],rRef,tn,bVShear);
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@ @@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@ @@ @@@@ @@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ long GetAngle(const Point& rPnt)
+/*N*/ {
+/*N*/ long a=0;
+/*N*/ if (rPnt.Y()==0) {
+/*N*/ if (rPnt.X()<0) a=-18000;
+/*N*/ } else if (rPnt.X()==0) {
+/*N*/ if (rPnt.Y()>0) a=-9000;
+/*N*/ else a=9000;
+/*N*/ } else {
+/*N*/ a=Round((atan2((double)-rPnt.Y(),(double)rPnt.X())/nPi180));
+/*N*/ }
+/*N*/ return a;
+/*N*/ }
+
+/*N*/ long NormAngle180(long a)
+/*N*/ {
+/*N*/ while (a<18000) a+=36000;
+/*N*/ while (a>=18000) a-=36000;
+/*N*/ return a;
+/*N*/ }
+
+/*N*/ long NormAngle360(long a)
+/*N*/ {
+/*N*/ while (a<0) a+=36000;
+/*N*/ while (a>=36000) a-=36000;
+/*N*/ return a;
+/*N*/ }
+
+/*N*/ long GetLen(const Point& rPnt)
+/*N*/ {
+/*N*/ long x=Abs(rPnt.X());
+/*N*/ long y=Abs(rPnt.Y());
+/*N*/ if (x+y<0x8000) { // weil 7FFF * 7FFF * 2 = 7FFE0002
+/*N*/ x*=x;
+/*N*/ y*=y;
+/*N*/ x+=y;
+/*N*/ x=Round(sqrt((double)x));
+/*N*/ return x;
+/*N*/ } 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);
+/*?*/ }
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void GeoStat::RecalcSinCos()
+/*N*/ {
+/*N*/ if (nDrehWink==0) {
+/*N*/ nSin=0.0;
+/*N*/ nCos=1.0;
+/*N*/ } else {
+/*N*/ double a=nDrehWink*nPi180;
+/*N*/ nSin=sin(a);
+/*N*/ nCos=cos(a);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ void GeoStat::RecalcTan()
+/*N*/ {
+/*N*/ if (nShearWink==0) {
+/*N*/ nTan=0.0;
+/*N*/ } else {
+/*N*/ double a=nShearWink*nPi180;
+/*N*/ nTan=tan(a);
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
+/*N*/ {
+/*N*/ Polygon aPol(5);
+/*N*/ aPol[0]=rRect.TopLeft();
+/*N*/ aPol[1]=rRect.TopRight();
+/*N*/ aPol[2]=rRect.BottomRight();
+/*N*/ aPol[3]=rRect.BottomLeft();
+/*N*/ aPol[4]=rRect.TopLeft();
+/*N*/ if (rGeo.nShearWink!=0) ShearPoly(aPol,rRect.TopLeft(),rGeo.nTan);
+/*N*/ if (rGeo.nDrehWink!=0) RotatePoly(aPol,rRect.TopLeft(),rGeo.nSin,rGeo.nCos);
+/*N*/ return aPol;
+/*N*/ }
+
+/*N*/ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
+/*N*/ {
+/*N*/ rGeo.nDrehWink=GetAngle(rPol[1]-rPol[0]);
+/*N*/ rGeo.nDrehWink=NormAngle360(rGeo.nDrehWink);
+/*N*/ // Drehung ist damit im Kasten
+/*N*/ rGeo.RecalcSinCos();
+/*N*/
+/*N*/ Point aPt1(rPol[1]-rPol[0]);
+/*N*/ if (rGeo.nDrehWink!=0) RotatePoint(aPt1,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin fuer Rueckdrehung
+/*N*/ long nWdt=aPt1.X();
+/*N*/
+/*N*/ Point aPt0(rPol[0]);
+/*N*/ Point aPt3(rPol[3]-rPol[0]);
+/*N*/ if (rGeo.nDrehWink!=0) RotatePoint(aPt3,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin fuer Rueckdrehung
+/*N*/ long nHgt=aPt3.Y();
+/*N*/ long nShW=GetAngle(aPt3);
+/*N*/ nShW-=27000; // ShearWink wird zur Senkrechten gemessen
+/*N*/ nShW=-nShW; // Negieren, denn '+' ist Rechtskursivierung
+/*N*/
+/*N*/ FASTBOOL bMirr=aPt3.Y()<0;
+/*N*/ if (bMirr) { // "Punktetausch" bei Spiegelung
+/*N*/ nHgt=-nHgt;
+/*N*/ nShW+=18000;
+/*N*/ aPt0=rPol[3];
+/*N*/ }
+/*N*/ nShW=NormAngle180(nShW);
+/*N*/ if (nShW<-9000 || nShW>9000) {
+/*N*/ nShW=NormAngle180(nShW+18000);
+/*N*/ }
+/*N*/ if (nShW<-SDRMAXSHEAR) nShW=-SDRMAXSHEAR; // ShearWinkel begrenzen auf +/- 89.00 deg
+/*N*/ if (nShW>SDRMAXSHEAR) nShW=SDRMAXSHEAR;
+/*N*/ rGeo.nShearWink=nShW;
+/*N*/ rGeo.RecalcTan();
+/*N*/ Point aRU(aPt0);
+/*N*/ aRU.X()+=nWdt;
+/*N*/ aRU.Y()+=nHgt;
+/*N*/ rRect=Rectangle(aPt0,aRU);
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ long BigMulDiv(long nVal, long nMul, long nDiv)
+/*N*/ {
+/*N*/ BigInt aVal(nVal);
+/*N*/ aVal*=nMul;
+/*N*/ if (aVal.IsNeg()!=(nDiv<0)) {
+/*N*/ aVal-=nDiv/2; // fuer korrektes Runden
+/*N*/ } else {
+/*N*/ aVal+=nDiv/2; // fuer korrektes Runden
+/*N*/ }
+/*N*/ if(nDiv)
+/*N*/ {
+/*N*/ aVal/=nDiv;
+/*N*/ return long(aVal);
+/*N*/ }
+/*N*/ return 0x7fffffff;
+/*N*/ }
+
+/*NBFF*/ void Kuerzen(Fraction& rF, unsigned nDigits)
+/*NBFF*/ {
+/*NBFF*/ INT32 nMul=rF.GetNumerator();
+/*NBFF*/ INT32 nDiv=rF.GetDenominator();
+/*NBFF*/ FASTBOOL bNeg=FALSE;
+/*NBFF*/ if (nMul<0) { nMul=-nMul; bNeg=!bNeg; }
+/*NBFF*/ if (nDiv<0) { nDiv=-nDiv; bNeg=!bNeg; }
+/*NBFF*/ if (nMul==0 || nDiv==0) return;
+/*NBFF*/ UINT32 a;
+/*NBFF*/ a=UINT32(nMul); unsigned nMulZ=0; // Fuehrende Nullen zaehlen
+/*NBFF*/ while (a<0x00800000) { nMulZ+=8; a<<=8; }
+/*NBFF*/ while (a<0x80000000) { nMulZ++; a<<=1; }
+/*NBFF*/ a=UINT32(nDiv); unsigned nDivZ=0; // Fuehrende Nullen zaehlen
+/*NBFF*/ while (a<0x00800000) { nDivZ+=8; a<<=8; }
+/*NBFF*/ while (a<0x80000000) { nDivZ++; a<<=1; }
+/*NBFF*/ // Anzahl der verwendeten Digits bestimmen
+/*NBFF*/ int nMulDigits=32-nMulZ;
+/*NBFF*/ int nDivDigits=32-nDivZ;
+/*NBFF*/ // Nun bestimmen, wieviele Stellen hinten weg koennen
+/*NBFF*/ int nMulWeg=nMulDigits-nDigits; if (nMulWeg<0) nMulWeg=0;
+/*NBFF*/ int nDivWeg=nDivDigits-nDigits; if (nDivWeg<0) nDivWeg=0;
+/*NBFF*/ int nWeg=Min(nMulWeg,nDivWeg);
+/*NBFF*/ nMul>>=nWeg;
+/*NBFF*/ nDiv>>=nWeg;
+/*NBFF*/ if (nMul==0 || nDiv==0) {
+/*NBFF*/ DBG_WARNING("Oups, beim kuerzen einer Fraction hat sich Joe verrechnet.");
+/*NBFF*/ return;
+/*NBFF*/ }
+/*NBFF*/ if (bNeg) nMul=-nMul;
+/*NBFF*/ rF=Fraction(nMul,nDiv);
+/*NBFF*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Wieviele eU-Einheiten passen in einen mm bzw. Inch?
+// Oder wie gross ist ein eU in mm bzw. Inch, und davon der Kehrwert
+
+
+
+// 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(FieldUnit eS, FieldUnit eD)
+/*?*/ {
+/*?*/ if (eS==eD) return FrPair(1,1,1,1);
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");}return FrPair(1,1,1,1);//STRIP001 //STRIP001 /*?*/ FrPair aS(GetInchOrMM(eS));
+/*?*/ };
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ // 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
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdtxhdl.cxx b/binfilter/bf_svx/source/svdraw/svx_svdtxhdl.cxx
new file mode 100644
index 000000000000..ce439b264116
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdtxhdl.cxx
@@ -0,0 +1,396 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdtxhdl.hxx"
+#include <limits.h>
+#include "svdmodel.hxx"
+#include "svdotext.hxx"
+#include "svdoutl.hxx"
+
+
+#include <outlobj.hxx>
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// #101499#
+
+#include <com/sun/star/i18n/ScriptType.hdl>
+
+
+
+#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
+
+
+#include "xoutx.hxx"
+
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::i18n;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ ImpTextPortionHandler::ImpTextPortionHandler(SdrOutliner& rOutln, const SdrTextObj& rTxtObj):
+/*N*/ rOutliner(rOutln),
+/*N*/ rTextObj(rTxtObj),
+/*N*/ // #101498# aPoly(0)
+/*N*/ mpRecordPortions(0L)
+/*N*/ {
+/*N*/ pModel=rTextObj.GetModel();
+/*N*/ MapMode aMap=aVDev.GetMapMode();
+/*N*/
+/*N*/ aMap.SetMapUnit(pModel->GetScaleUnit());
+/*N*/ aMap.SetScaleX(pModel->GetScaleFraction());
+/*N*/ aMap.SetScaleY(pModel->GetScaleFraction());
+/*N*/ aVDev.SetMapMode(aMap);
+/*N*/ }
+
+
+/*N*/ void ImpTextPortionHandler::DrawTextToPath(ExtOutputDevice& rXOut, FASTBOOL bDrawEffect)
+/*N*/ {
+/*N*/ aFormTextBoundRect=Rectangle();
+/*N*/ const Rectangle& rBR = rTextObj.GetSnapRect();
+/*N*/
+/*N*/ bDraw = bDrawEffect;
+/*N*/
+/*N*/ OutlinerParaObject* pPara=rTextObj.GetOutlinerParaObject();
+/*N*/ if (rTextObj.IsTextEditActive()) {
+/*?*/ pPara=rTextObj.GetEditOutlinerParaObject();
+/*N*/ }
+/*N*/ if (pPara!=NULL) {
+/*N*/ XPolyPolygon aXPP;
+/*N*/ //rTextObj.TakeContour(aXPP);
+/*N*/ rTextObj.TakeXorPoly(aXPP,FALSE);
+/*N*/ pXOut=&rXOut;
+/*N*/ Font aFont(rXOut.GetOutDev()->GetFont());
+/*N*/ rOutliner.Clear();
+/*N*/ rOutliner.SetPaperSize(Size(LONG_MAX,LONG_MAX));
+/*N*/ rOutliner.SetText(*pPara);
+/*N*/ USHORT nCnt = Min(aXPP.Count(), (USHORT) rOutliner.GetParagraphCount());
+/*N*/
+/*N*/ if ( nCnt == 1 ) bToLastPoint = TRUE;
+/*N*/ else bToLastPoint = FALSE;
+/*N*/
+/*N*/ // #101498# completely different methodology needed here for making this BIDI-able
+/*N*/ // iterate over paragraphs and Polygons, thus each paragraph will be put to
+/*N*/ // one Polygon
+/*N*/ const sal_uInt32 nSavedLayoutMode(rXOut.GetOutDev()->GetLayoutMode());
+/*N*/ sal_uInt32 nLayoutMode(nSavedLayoutMode);
+/*N*/
+/*N*/ if(TRUE)
+/*N*/ {
+/*N*/ nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL);
+/*N*/ nLayoutMode |= ~(TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
+/*N*/ }
+/*N*/
+/*N*/ rXOut.GetOutDev()->SetLayoutMode(nLayoutMode);
+/*N*/
+/*N*/ for(nParagraph = 0; nParagraph < nCnt; nParagraph++)
+/*N*/ {
+/*N*/ Polygon aPoly = XOutCreatePolygon(aXPP[sal_uInt16(nParagraph)], rXOut.GetOutDev());
+/*N*/
+/*N*/ rOutliner.SetDrawPortionHdl(LINK(this, ImpTextPortionHandler, FormTextRecordPortionHdl));
+/*N*/ rOutliner.StripPortions();
+/*N*/
+/*N*/ DrawFormTextRecordPortions(aPoly);
+/*N*/ ClearFormTextRecordPortions();
+/*N*/
+/*N*/ const Rectangle& rFTBR = rXOut.GetFormTextBoundRect();
+/*N*/ aFormTextBoundRect.Union(rFTBR);
+/*N*/ }
+/*N*/
+/*N*/ rXOut.GetOutDev()->SetLayoutMode(nSavedLayoutMode);
+/*N*/
+/*N*/ //for (nParagraph = 0; nParagraph < nCnt; nParagraph++)
+/*N*/ //{
+/*N*/ // aPoly = XOutCreatePolygon(aXPP[USHORT(nParagraph)], rXOut.GetOutDev());
+/*N*/ // nTextWidth = 0;
+/*N*/ //
+/*N*/ // rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,FormTextWidthHdl));
+/*N*/ // rOutliner.StripPortions();
+/*N*/ // rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,FormTextDrawHdl));
+/*N*/ // rOutliner.StripPortions();
+/*N*/ // rOutliner.SetDrawPortionHdl(Link());
+/*N*/ //
+/*N*/ // const Rectangle& rFTBR=rXOut.GetFormTextBoundRect();
+/*N*/ // aFormTextBoundRect.Union(rFTBR);
+/*N*/ //}
+/*N*/
+/*N*/ rXOut.GetOutDev()->SetFont(aFont);
+/*N*/ rOutliner.Clear();
+/*N*/ }
+/*N*/ if (rTextObj.IsTextEditActive()) {
+/*?*/ delete pPara;
+/*N*/ }
+/*N*/ }
+
+// #101498# Record and sort all portions
+/*N*/ IMPL_LINK(ImpTextPortionHandler, FormTextRecordPortionHdl, DrawPortionInfo*, pInfo)
+/*N*/ {
+/*N*/ if(pInfo->nPara == nParagraph)
+/*N*/ {
+/*N*/ SortedAddFormTextRecordPortion(pInfo);
+/*N*/ }
+/*N*/
+/*N*/ return 0;
+/*N*/ }
+
+// #101498# Helper class to remember text portions in sorted manner
+/*N*/ class ImpRecordPortion
+/*N*/ {
+/*N*/ public:
+/*N*/ Point maPosition;
+/*N*/ String maText;
+/*N*/ xub_StrLen mnTextStart;
+/*N*/ xub_StrLen mnTextLength;
+/*N*/ sal_uInt16 mnPara;
+/*N*/ xub_StrLen mnIndex;
+/*N*/
+/*N*/ // #102819# Here SvxFont needs to be used instead of Font
+/*N*/ SvxFont maFont;
+/*N*/
+/*N*/ sal_Int32* mpDXArray;
+/*N*/ sal_uInt8 mnBiDiLevel;
+/*N*/
+/*N*/ ImpRecordPortion(DrawPortionInfo* pInfo);
+/*N*/ ~ImpRecordPortion();
+/*N*/
+/*N*/ sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
+/*N*/ };
+
+/*N*/ ImpRecordPortion::ImpRecordPortion(DrawPortionInfo* pInfo)
+/*N*/ : maPosition(pInfo->rStartPos),
+/*N*/ maText(pInfo->rText),
+/*N*/ mnTextStart((xub_StrLen)pInfo->nTextStart),
+/*N*/ mnTextLength((xub_StrLen)pInfo->nTextLen),
+/*N*/ mnPara(pInfo->nPara),
+/*N*/ mnIndex(pInfo->nIndex),
+/*N*/ maFont(pInfo->rFont),
+/*N*/ mpDXArray(NULL),
+/*N*/ mnBiDiLevel(pInfo->GetBiDiLevel())
+/*N*/ {
+/*N*/ if(pInfo->pDXArray)
+/*N*/ {
+/*N*/ mpDXArray = new sal_Int32[pInfo->nTextLen];
+/*N*/
+/*N*/ for(sal_uInt32 a(0L); a < pInfo->nTextLen; a++)
+/*N*/ {
+/*N*/ mpDXArray[a] = pInfo->pDXArray[a];
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ ImpRecordPortion::~ImpRecordPortion()
+/*N*/ {
+/*N*/ if(mpDXArray)
+/*N*/ {
+/*N*/ delete[] mpDXArray;
+/*N*/ }
+/*N*/ }
+
+/*N*/ // #101498# List classes for recording portions
+/*N*/ DECLARE_LIST(ImpRecordPortionList, ImpRecordPortion*)//STRIP008 ;
+/*N*/ DECLARE_LIST(ImpRecordPortionListList, ImpRecordPortionList*)//STRIP008 ;
+
+/*N*/ // #101498# Draw recorded formtext along Poly
+/*N*/ void ImpTextPortionHandler::DrawFormTextRecordPortions(Polygon aPoly)
+/*N*/ {
+/*N*/ sal_Int32 nTextWidth = -((sal_Int32)GetFormTextPortionsLength(pXOut->GetOutDev()));
+/*N*/
+/*N*/ ImpRecordPortionListList* pListList = (ImpRecordPortionListList*)mpRecordPortions;
+/*N*/ if(pListList)
+/*N*/ {
+/*N*/ for(sal_uInt32 a(0L); a < pListList->Count(); a++)
+/*N*/ {
+/*N*/ ImpRecordPortionList* pList = pListList->GetObject(a);
+/*N*/
+/*N*/ for(sal_uInt32 b(0L); b < pList->Count(); b++)
+/*N*/ {
+/*N*/ ImpRecordPortion* pPortion = pList->GetObject(b);
+/*N*/
+/*N*/ DrawPortionInfo aNewInfo(
+/*N*/ pPortion->maPosition,
+/*N*/ pPortion->maText,
+/*N*/ pPortion->mnTextStart,
+/*N*/ pPortion->mnTextLength,
+/*N*/ pPortion->maFont,
+/*N*/ pPortion->mnPara,
+/*N*/ pPortion->mnIndex,
+/*N*/ pPortion->mpDXArray,
+/*N*/ pPortion->mnBiDiLevel);
+/*N*/
+/*N*/ nTextWidth = pXOut->DrawFormText(&aNewInfo, aPoly, nTextWidth, bToLastPoint, bDraw);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ // #101498# Insert new portion sorted
+/*N*/ void ImpTextPortionHandler::SortedAddFormTextRecordPortion(DrawPortionInfo* pInfo)
+/*N*/ {
+/*N*/ // get ListList and create on demand
+/*N*/ ImpRecordPortionListList* pListList = (ImpRecordPortionListList*)mpRecordPortions;
+/*N*/ if(!pListList)
+/*N*/ {
+/*N*/ mpRecordPortions = (void*)(new ImpRecordPortionListList(2, 2));
+/*N*/ pListList = (ImpRecordPortionListList*)mpRecordPortions;
+/*N*/ }
+/*N*/
+/*N*/ // create new portion
+/*N*/ ImpRecordPortion* pNewPortion = new ImpRecordPortion(pInfo);
+/*N*/
+/*N*/ // look for the list where to insert new portion
+/*N*/ ImpRecordPortionList* pList = 0L;
+/*N*/
+/*N*/ for(sal_uInt32 nListListIndex(0L); !pList && nListListIndex < pListList->Count(); nListListIndex++)
+/*N*/ {
+/*?*/ ImpRecordPortionList* pTmpList = pListList->GetObject(nListListIndex);
+/*?*/
+/*?*/ if(pTmpList->GetObject(0)->maPosition.Y() == pNewPortion->maPosition.Y())
+/*?*/ pList = pTmpList;
+/*N*/ }
+/*N*/
+/*N*/ if(!pList)
+/*N*/ {
+/*N*/ // no list for that Y-Coordinate yet, create a new one.
+/*N*/ pList = new ImpRecordPortionList(8, 8);
+/*N*/ pList->Insert(pNewPortion, LIST_APPEND);
+/*N*/ pListList->Insert(pList, LIST_APPEND);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // found a list for that for that Y-Coordinate, sort in
+/*?*/ sal_uInt32 nInsertInd(0L);
+/*?*/
+/*?*/ while(nInsertInd < pList->Count()
+/*?*/ && pList->GetObject(nInsertInd)->maPosition.X() < pNewPortion->maPosition.X())
+/*?*/ {
+/*?*/ nInsertInd++;
+/*?*/ }
+/*?*/
+/*?*/ if(nInsertInd == pList->Count())
+/*?*/ nInsertInd = LIST_APPEND;
+/*?*/
+/*?*/ pList->Insert(pNewPortion, nInsertInd);
+/*N*/ }
+/*N*/ }
+
+// #101498# Calculate complete length of FormTextPortions
+/*N*/ sal_uInt32 ImpTextPortionHandler::GetFormTextPortionsLength(OutputDevice* pOut)
+/*N*/ {
+/*N*/ sal_uInt32 nRetval(0L);
+/*N*/
+/*N*/ ImpRecordPortionListList* pListList = (ImpRecordPortionListList*)mpRecordPortions;
+/*N*/ if(pListList)
+/*N*/ {
+/*N*/ for(sal_uInt32 a(0L); a < pListList->Count(); a++)
+/*N*/ {
+/*N*/ ImpRecordPortionList* pList = pListList->GetObject(a);
+/*N*/
+/*N*/ for(sal_uInt32 b(0L); b < pList->Count(); b++)
+/*N*/ {
+/*N*/ ImpRecordPortion* pPortion = pList->GetObject(b);
+/*N*/
+/*N*/ if(pPortion->mpDXArray)
+/*N*/ {
+/*N*/ if(pPortion->maFont.IsVertical() && pOut)
+/*?*/ nRetval += pOut->GetTextHeight() * pPortion->mnTextLength;
+/*N*/ else
+/*N*/ nRetval += pPortion->mpDXArray[pPortion->mnTextLength - 1];
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return nRetval;
+/*N*/ }
+
+// #101498# Cleanup recorded portions
+/*N*/ void ImpTextPortionHandler::ClearFormTextRecordPortions()
+/*N*/ {
+/*N*/ ImpRecordPortionListList* pListList = (ImpRecordPortionListList*)mpRecordPortions;
+/*N*/ if(pListList)
+/*N*/ {
+/*N*/ for(sal_uInt32 a(0L); a < pListList->Count(); a++)
+/*N*/ {
+/*N*/ ImpRecordPortionList* pList = pListList->GetObject(a);
+/*N*/
+/*N*/ for(sal_uInt32 b(0L); b < pList->Count(); b++)
+/*N*/ {
+/*N*/ delete pList->GetObject(b);
+/*N*/ }
+/*N*/
+/*N*/ delete pList;
+/*N*/ }
+/*N*/
+/*N*/ delete pListList;
+/*N*/ mpRecordPortions = (void*)0L;
+/*N*/ }
+/*N*/ }
+
+
+
+
+//IMPL_LINK(ImpTextPortionHandler, FormTextWidthHdl, DrawPortionInfo*, pInfo)
+//{
+// // #101498# change calculation of nTextWidth
+// if(pInfo->nPara == nParagraph && pInfo->nTextLen)
+// {
+// // negative value is used because of the interface of
+// // XOutputDevice::ImpDrawFormText(...), please look there
+// // for more info.
+// nTextWidth -= pInfo->pDXArray[pInfo->nTextLen - 1];
+// }
+//
+// return 0;
+//}
+
+//IMPL_LINK(ImpTextPortionHandler, FormTextDrawHdl, DrawPortionInfo*, pInfo)
+//{
+// // #101498# Implementation of DrawFormText needs to be updated, too.
+// if(pInfo->nPara == nParagraph)
+// {
+// nTextWidth = pXOut->DrawFormText(pInfo, aPoly, nTextWidth, bToLastPoint, bDraw);
+// //pInfo->rText, aPoly, pInfo->rFont, nTextWidth,
+// //bToLastPoint, bDraw, pInfo->pDXArray);
+// }
+//
+// return 0;
+//}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdundo.cxx b/binfilter/bf_svx/source/svdraw/svx_svdundo.cxx
new file mode 100644
index 000000000000..6992a23e57be
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdundo.cxx
@@ -0,0 +1,371 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdundo.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "scene3d.hxx"
+
+
+// #i11426#
+
+// #109587#
+
+// #109587#
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod)
+/*N*/ : SdrUndoAction(rNewMod),
+/*N*/ aBuf(1024,32,32),
+/*N*/ eFunction(SDRREPFUNC_OBJ_NONE) /*#72642#*/
+/*N*/ {}
+
+/*N*/ SdrUndoGroup::~SdrUndoGroup()
+/*N*/ {
+/*N*/ Clear();
+/*N*/ }
+
+/*N*/ void SdrUndoGroup::Clear()
+/*N*/ {
+/*N*/ for (ULONG nu=0; nu<GetActionCount(); nu++) {
+/*N*/ SdrUndoAction* pAct=GetAction(nu);
+/*N*/ delete pAct;
+/*N*/ }
+/*N*/ aBuf.Clear();
+/*N*/ }
+
+/*N*/ void SdrUndoGroup::AddAction(SdrUndoAction* pAct)
+/*N*/ {
+/*N*/ aBuf.Insert(pAct,CONTAINER_APPEND);
+/*N*/ }
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@@@ @@ @@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@@@ @@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrUndoObj::SdrUndoObj(SdrObject& rNewObj):
+/*N*/ SdrUndoAction(*rNewObj.GetModel()),
+/*N*/ pObj(&rNewObj)
+/*N*/ {
+/*N*/ }
+
+
+// #94278# common call method for evtl. page change when UNDO/REDO
+// is triggered
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj):
+/*N*/ SdrUndoObj(rNewObj),
+/*N*/ pUndoGeo(NULL),
+/*N*/ pRedoGeo(NULL),
+/*N*/ pUndoGroup(NULL)
+/*N*/ {
+/*N*/ SdrObjList* pOL=rNewObj.GetSubList();
+/*N*/ if (pOL!=NULL && pOL->GetObjCount() && !rNewObj.ISA(E3dScene))
+/*N*/ {
+/*?*/ // 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)));
+/*?*/ }
+/*N*/ } else {
+/*N*/ pUndoGeo=pObj->GetGeoData();
+/*N*/ }
+/*N*/ }
+
+/*N*/ SdrUndoGeoObj::~SdrUndoGeoObj()
+/*N*/ {
+/*N*/ if (pUndoGeo!=NULL) delete pUndoGeo;
+/*N*/ if (pRedoGeo!=NULL) delete pRedoGeo;
+/*N*/ if (pUndoGroup!=NULL) delete pUndoGroup;
+/*N*/ }
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, FASTBOOL bOrdNumDirect):
+/*N*/ pView(NULL),
+/*N*/ pPageView(NULL),
+/*N*/ SdrUndoObj(rNewObj),
+/*N*/ bOwner(FALSE)
+/*N*/ {
+/*N*/ pObjList=pObj->GetObjList();
+/*N*/ if (bOrdNumDirect) {
+/*?*/ nOrdNum=pObj->GetOrdNumDirect();
+/*N*/ } else {
+/*N*/ nOrdNum=pObj->GetOrdNum();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ SdrUndoObjList::~SdrUndoObjList()
+/*N*/ {
+/*N*/ if (pObj!=NULL && IsOwner())
+/*N*/ {
+/*N*/ // Attribute muessen wieder in den regulaeren Pool
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SetOwner(FALSE);
+/*?*/
+/*?*/ // nun loeschen
+/*N*/ }
+/*N*/ }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// #i11702#
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@@@ @@ @@ @@@@@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@@ @@@@ @@@@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@ @@@@ @@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@@@@@ @@ @@@ @@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrUndoPage::SdrUndoPage(SdrPage& rNewPg):
+/*N*/ SdrUndoAction(*rNewPg.GetModel()), pPage(&rNewPg)
+/*N*/ { }
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrUndoPageList::SdrUndoPageList(SdrPage& rNewPg):
+/*N*/ SdrUndoPage(rNewPg),
+/*N*/ bItsMine(FALSE)
+/*N*/ {
+/*N*/ nPageNum=rNewPg.GetPageNum();
+/*N*/ }
+
+/*N*/ SdrUndoPageList::~SdrUndoPageList()
+/*N*/ {
+/*N*/ if(bItsMine && pPage)
+/*N*/ {
+/*?*/ delete pPage;
+/*?*/ pPage = 0L;
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@@@ @@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@
+// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@@@ @@@@@@ @@@@ @@ @@@@ @@@@@ @@@@@ @@@@@@ @@ @@@ @@@@ @@@@
+// @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@@@ @@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdview.cxx b/binfilter/bf_svx/source/svdraw/svx_svdview.cxx
new file mode 100644
index 000000000000..816f77b3e9bd
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdview.cxx
@@ -0,0 +1,232 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <eeitem.hxx>
+
+#include "svdio.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svdpagv.hxx"
+#include "svdopath.hxx" // fuer GetContext
+#include "svdograf.hxx" // fuer GetContext
+#include "svdview.hxx"
+#include "editview.hxx" // fuer GetField
+#define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <flditem.hxx> benoetigt */
+
+
+#include "itemdata.hxx"
+
+#include "flditem.hxx" // fuer URLField
+#include "svdoutl.hxx"
+
+// #90477#
+#include <tools/tenccvt.hxx>
+namespace binfilter {
+
+/*N*/ TYPEINIT1(SdrView,SdrCreateView);
+
+/*N*/ SdrView::SdrView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrCreateView(pModel1,pOut),
+/*N*/ bNoExtendedMouseDispatcher(FALSE),
+/*N*/ bNoExtendedKeyDispatcher(FALSE),
+/*N*/ bNoExtendedCommandDispatcher(FALSE)
+/*N*/ {
+/*N*/ bTextEditOnObjectsWithoutTextIfTextTool=FALSE;
+/*N*/
+/*N*/
+/*N*/ onAccessibilityOptionsChanged();
+/*N*/ }
+
+/*N*/ SdrView::SdrView(SdrModel* pModel1):
+/*N*/ SdrCreateView(pModel1,(OutputDevice*)NULL),
+/*N*/ bNoExtendedMouseDispatcher(FALSE),
+/*N*/ bNoExtendedKeyDispatcher(FALSE),
+/*N*/ bNoExtendedCommandDispatcher(FALSE)
+/*N*/ {
+/*N*/ bTextEditOnObjectsWithoutTextIfTextTool=FALSE;
+/*N*/
+/*N*/
+/*N*/ onAccessibilityOptionsChanged();
+/*N*/ }
+
+/*N*/ SdrView::~SdrView()
+/*N*/ {
+/*N*/ }
+
+
+
+
+
+
+/* new interface src537 */
+
+
+
+// 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 */
+
+} //namespace binfilter
+#include "outlobj.hxx"
+namespace binfilter {//STRIP009
+
+/*N*/ void SdrView::UnmarkAll()
+/*N*/ {
+/*N*/ if (IsTextEdit()) {
+/*?*/ ESelection eSel=GetTextEditOutlinerView()->GetSelection();
+/*?*/ eSel.nStartPara=eSel.nEndPara;
+/*?*/ eSel.nStartPos=eSel.nEndPos;
+/*?*/ GetTextEditOutlinerView()->SetSelection(eSel);
+/*?*/ #ifndef SVX_LIGHT
+/*?*/ if (pItemBrowser!=NULL) {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 pItemBrowser->SetDirty();
+/*?*/ #endif
+/*N*/ } else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
+/*N*/ else if (HasMarkedPoints()) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 UnmarkAllPoints(); // ! Marked statt Markable !
+/*N*/ else UnmarkAllObj();
+/*N*/ }
+
+
+
+
+
+
+
+
+/*N*/ void SdrView::DeleteMarked()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+
+
+
+/*N*/ void SdrView::WriteRecords(SvStream& rOut) const
+/*N*/ {
+/*N*/ {
+/*N*/ // Der CharSet muss! als erstes rausgestreamt werden
+/*N*/ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCHARSET);
+/*N*/
+/*N*/ // UNICODE:
+/*N*/ // rtl_TextEncoding eOutCharSet=rOut.GetStreamCharSet();
+/*N*/ rtl_TextEncoding eOutCharSet = gsl_getSystemTextEncoding();
+/*N*/
+/*N*/ // #90477# rOut << UINT16( GetStoreCharSet( eOutCharSet ) );
+/*N*/ rOut << (UINT16)GetSOStoreTextEncoding(eOutCharSet, (sal_uInt16)rOut.GetVersion());
+/*N*/ }
+/*N*/ SdrCreateView::WriteRecords(rOut);
+/*N*/ }
+
+/*N*/ BOOL SdrView::ReadRecord(const SdrIOHeader& rViewHead,
+/*N*/ const SdrNamedSubRecord& rSubHead,
+/*N*/ SvStream& rIn)
+/*N*/ {
+/*N*/ BOOL bRet=FALSE;
+/*N*/ if (rSubHead.GetInventor()==SdrInventor) {
+/*N*/ bRet=TRUE;
+/*N*/ switch (rSubHead.GetIdentifier()) {
+/*N*/ case SDRIORECNAME_VIEWCHARSET: {
+/*N*/ UINT16 nCharSet;
+/*N*/ // #90477# rIn>>nCharSet;
+/*N*/ // rIn.SetStreamCharSet(rtl_TextEncoding(nCharSet));
+/*N*/ rIn >> nCharSet;
+/*N*/ rIn.SetStreamCharSet(GetSOLoadTextEncoding((rtl_TextEncoding)nCharSet, (sal_uInt16)rIn.GetVersion()));
+/*N*/ } break;
+/*N*/ default: bRet=FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/ if (!bRet) bRet=SdrCreateView::ReadRecord(rViewHead,rSubHead,rIn);
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ SvStream& operator<<(SvStream& rOut, const SdrView& rView)
+/*N*/ {
+/*N*/ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOViewID);
+/*N*/ rView.WriteRecords(rOut);
+/*N*/ return rOut;
+/*N*/ }
+
+/*N*/ SvStream& operator>>(SvStream& rIn, SdrView& rView)
+/*N*/ {
+/*N*/ if (rIn.GetError()!=0) return rIn;
+/*N*/ rView.BrkAction();
+/*N*/ rView.Clear();
+/*N*/ SdrIOHeader aHead(rIn,STREAM_READ);
+/*N*/ if (!aHead.IsMagic()) {
+/*N*/ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR); // Format-Fehler
+/*N*/ return rIn;
+/*N*/ }
+/*N*/ rtl_TextEncoding eStreamCharSetMerker=rIn.GetStreamCharSet(); // Der StreamCharSet wird von SdrView::ReadRecord() gesetzt
+/*N*/ while (aHead.GetBytesLeft()>0 && rIn.GetError()==0 && !rIn.IsEof()) {
+/*N*/ SdrNamedSubRecord aSubRecord(rIn,STREAM_READ);
+/*N*/ rView.ReadRecord(aHead,aSubRecord,rIn);
+/*N*/ }
+/*N*/
+/*N*/ rIn.SetStreamCharSet(eStreamCharSetMerker); // StreamCharSet wieder restaurieren
+/*N*/
+/*N*/ rView.InvalidateAllWin();
+/*N*/ return rIn;
+/*N*/ }
+
+
+/*N*/ void SdrView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+/*N*/ {
+/*N*/ if( rHint.ISA( SfxSimpleHint ) && ( (SfxSimpleHint&) rHint ).GetId() == SFX_HINT_ACCESSIBILITY_CHANGED )
+/*N*/ {
+/*?*/ onAccessibilityOptionsChanged();
+/*N*/ }
+/*N*/
+/*N*/ SdrCreateView::SFX_NOTIFY(rBC, rBCType, rHint, rHintType );
+/*N*/ }
+
+
+/** method is called whenever the global SvtAccessibilityOptions is changed */
+/*N*/ void SdrView::onAccessibilityOptionsChanged()
+/*N*/ {
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdviter.cxx b/binfilter/bf_svx/source/svdraw/svx_svdviter.cxx
new file mode 100644
index 000000000000..3de19e113612
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdviter.cxx
@@ -0,0 +1,196 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdviter.hxx"
+#include "svdpage.hxx"
+#include "svdview.hxx"
+#include "svdpagv.hxx"
+
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ void SdrViewIter::ImpInitVars()
+/*N*/ {
+/*N*/ nListenerNum=0;
+/*N*/ nPageViewNum=0;
+/*N*/ nOutDevNum=0;
+/*N*/ pAktView=NULL;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrViewIter::SdrViewIter(const SdrObject* pObject_, FASTBOOL bNoMasterPage_)
+/*N*/ {
+/*N*/ pObject=pObject_;
+/*N*/ pModel=pObject_!=NULL ? pObject_->GetModel() : NULL;
+/*N*/ pPage=pObject_!=NULL ? pObject_->GetPage() : NULL;
+/*N*/ bNoMasterPage=bNoMasterPage_;
+/*N*/ if (pModel==NULL || pPage==NULL) {
+/*N*/ pModel=NULL;
+/*N*/ pPage=NULL;
+/*N*/ }
+/*N*/ ImpInitVars();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ FASTBOOL SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const
+/*N*/ {
+/*N*/ if (pPage!=NULL) {
+/*N*/ FASTBOOL bMaster=pPage->IsMasterPage();
+/*N*/ USHORT nPageNum=pPage->GetPageNum();
+/*N*/ SdrPage* pPg=pPV->GetPage();
+/*N*/ if (pPg==pPage) {
+/*N*/ if (pObject!=NULL) {
+/*N*/ // Objekt gewuenscht? Na dann erstmal sehen, ob
+/*N*/ // das Obj in dieser PageView auch sichtbar ist.
+/*N*/ SetOfByte aObjLay;
+/*N*/ pObject->GetLayer(aObjLay);
+/*N*/ aObjLay&=pPV->GetVisibleLayers();
+/*N*/ return !aObjLay.IsEmpty();
+/*N*/ } else {
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ } else {
+/*N*/ if (!bNoMasterPage && bMaster && (pObject==NULL || !pObject->IsNotVisibleAsMaster())) {
+/*N*/ USHORT nMasterPageAnz=pPg->GetMasterPageCount();
+/*N*/ USHORT nMasterPagePos=0;
+/*N*/ while (nMasterPagePos<nMasterPageAnz) {
+/*N*/ if (nPageNum==pPg->GetMasterPageNum(nMasterPagePos)) {
+/*N*/ // Aha, die gewuenschte Page ist also MasterPage in dieser PageView
+/*N*/ if (pObject!=NULL) {
+/*N*/ // Objekt gewuenscht? Na dann erstmal sehen, ob
+/*N*/ // das Obj in dieser PageView auch sichtbar ist.
+/*N*/ SetOfByte aObjLay;
+/*N*/ pObject->GetLayer(aObjLay);
+/*N*/ aObjLay&=pPV->GetVisibleLayers();
+/*N*/ aObjLay&=pPg->GetMasterPageVisibleLayers(nMasterPagePos);
+/*N*/ if (!aObjLay.IsEmpty()) {
+/*N*/ return TRUE;
+/*N*/ } // ansonsten die naechste MasterPage der Page ansehen...
+/*N*/ } else {
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ nMasterPagePos++;
+/*N*/ }
+/*N*/ }
+/*N*/ // MasterPage nicht erlaubt oder keine passende gefunden
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ } else {
+/*N*/ return TRUE;
+/*N*/ }
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrView* SdrViewIter::ImpFindView()
+/*N*/ {
+/*N*/ if (pModel!=NULL) {
+/*N*/ USHORT nLsAnz=pModel->GetListenerCount();
+/*N*/ while (nListenerNum<nLsAnz) {
+/*N*/ SfxListener* pLs=pModel->GetListener(nListenerNum);
+/*N*/ pAktView=PTR_CAST(SdrView,pLs);
+/*N*/ if (pAktView!=NULL) {
+/*N*/ if (pPage!=NULL) {
+/*N*/ USHORT nPvAnz=pAktView->GetPageViewCount();
+/*N*/ USHORT nPvNum=0;
+/*N*/ while (nPvNum<nPvAnz) {
+/*N*/ SdrPageView* pPV=pAktView->GetPageViewPvNum(nPvNum);
+/*N*/ if (ImpCheckPageView(pPV)) {
+/*N*/ return pAktView;
+/*N*/ }
+/*N*/ nPvNum++;
+/*N*/ }
+/*N*/ } else {
+/*N*/ return pAktView;
+/*N*/ }
+/*N*/ }
+/*N*/ nListenerNum++;
+/*N*/ }
+/*N*/ }
+/*N*/ pAktView=NULL;
+/*N*/ return pAktView;
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrView* SdrViewIter::FirstView()
+/*N*/ {
+/*N*/ ImpInitVars();
+/*N*/ return ImpFindView();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrView* SdrViewIter::NextView()
+/*N*/ {
+/*N*/ nListenerNum++;
+/*N*/ return ImpFindView();
+/*N*/ }
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdvmark.cxx b/binfilter/bf_svx/source/svdraw/svx_svdvmark.cxx
new file mode 100644
index 000000000000..ba0c1b362dcf
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdvmark.cxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "svdvmark.hxx"
+#include "svdobj.hxx"
+#include "svdpntv.hxx"
+
+namespace binfilter {
+
+/*N*/ SdrViewUserMarker::SdrViewUserMarker(SdrPaintView* pView_)
+/*N*/ : pView(pView_),
+/*N*/ pForcedOutDev(NULL),
+/*N*/ pPoint(NULL),
+/*N*/ pRect(NULL),
+/*N*/ pPoly(NULL),
+/*N*/ pPolyPoly(NULL),
+/*N*/ pXPoly(NULL),
+/*N*/ pXPolyPoly(NULL),
+/*N*/ eAlign(SDRMARKER_ALIGNCENTER),
+/*N*/ nPixelDistance(0),
+/*N*/ nLineWdt(0),
+/*N*/ nCrossSize(0),
+/*N*/ bLineWdtLog(FALSE),
+/*N*/ bCrossSizeLog(FALSE),
+/*N*/ bSolidArea(FALSE),
+/*N*/ bDashed(FALSE),
+/*N*/ bCrossHair(FALSE),
+/*N*/ bStripes(FALSE),
+/*N*/ bEllipse(FALSE),
+/*N*/ bPolyLine(FALSE),
+/*N*/ bAnimate(FALSE),
+/*N*/ bVisible(FALSE),
+/*N*/ nAnimateDelay(0),
+/*N*/ nAnimateSpeed(0),
+/*N*/ nAnimateAnz(0),
+/*N*/ bAnimateBwd(FALSE),
+/*N*/ bAnimateToggle(FALSE),
+/*N*/ nAnimateDelayCountDown(0),
+/*N*/ nAnimateSpeedCountDown(0),
+/*N*/ nAnimateNum(0),
+/*N*/ bHasPointer(FALSE),
+/*N*/ bMouseMovable(FALSE)
+/*N*/ {
+/*N*/ if (pView!=NULL) pView->ImpInsertUserMarker(this);
+/*N*/ bAnimateToggle=TRUE;
+/*N*/ }
+/*N*/
+/*N*/ SdrViewUserMarker::~SdrViewUserMarker()
+/*N*/ {
+/*N*/ if (bVisible) {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 Hide();
+/*N*/ if (pView!=NULL) pView->ImpRemoveUserMarker(this);
+/*N*/ ImpDelGeometrics();
+/*N*/ }
+/*N*/
+/*N*/ void SdrViewUserMarker::ImpDelGeometrics()
+/*N*/ {
+/*N*/ if (pPoint !=NULL) { delete pPoint ; pPoint =NULL; }
+/*N*/ if (pRect !=NULL) { delete pRect ; pRect =NULL; }
+/*N*/ if (pPoly !=NULL) { delete pPoly ; pPoly =NULL; }
+/*N*/ if (pPolyPoly !=NULL) { delete pPolyPoly ; pPolyPoly =NULL; }
+/*N*/ if (pXPoly !=NULL) { delete pXPoly ; pXPoly =NULL; }
+/*N*/ if (pXPolyPoly!=NULL) { delete pXPolyPoly; pXPolyPoly=NULL; }
+/*N*/ }
+
+/*N*/ void SdrViewUserMarker::SetLineWidth(USHORT nWdt)
+/*N*/ {
+/*N*/ FASTBOOL bVis=bVisible;
+/*N*/ if (bVis) Hide();
+/*N*/ nLineWdt=nWdt;
+/*N*/ if (bVis) Show();
+/*N*/ }
+
+/*N*/ void SdrViewUserMarker::Show()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");
+/*N*/ }
+
+/*N*/ void SdrViewUserMarker::Hide()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP");
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdxcgv.cxx b/binfilter/bf_svx/source/svdraw/svx_svdxcgv.cxx
new file mode 100644
index 000000000000..3ccad62f13bd
--- /dev/null
+++ b/binfilter/bf_svx/source/svdraw/svx_svdxcgv.cxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <vector>
+#include "svdxcgv.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+
+
+// #i13033#
+namespace binfilter {
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*N*/ SdrExchangeView::SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut):
+/*N*/ SdrObjEditView(pModel1,pOut)
+/*N*/ {
+/*N*/ }
+
+/*?*/ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile( BOOL bNoVDevIfOneMtfMarked ) const
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); GDIMetaFile aMtf; return aMtf;//STRIP001
+/*?*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svxlink/fileobj.hxx b/binfilter/bf_svx/source/svxlink/fileobj.hxx
new file mode 100644
index 000000000000..dca51f5a68c9
--- /dev/null
+++ b/binfilter/bf_svx/source/svxlink/fileobj.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FILEOBJ_HXX
+#define _FILEOBJ_HXX
+
+#include <bf_so3/linksrc.hxx>
+#include <bf_sfx2/docfile.hxx>
+class Graphic;
+namespace binfilter {
+
+struct Impl_DownLoadData;
+
+
+class SvFileObject : public ::binfilter::SvLinkSource
+{
+ String sFileNm;
+ String sFilter;
+ String sReferer;
+ SfxMediumRef xMed;
+ Impl_DownLoadData* pDownLoadData;
+
+ BYTE nType;
+
+ 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;
+ BOOL bStateChangeCalled : 1;
+ BOOL bInCallDownLoad : 1;
+
+ 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* );
+protected:
+ virtual ~SvFileObject();
+
+public:
+ SvFileObject();
+
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ const String & rMimeType,
+ BOOL bSynchron = FALSE );
+
+ virtual BOOL Connect( ::binfilter::SvBaseLink* );
+
+ // erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
+ // erst angestossen werden muss
+
+ void CancelTransfers();
+};
+
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svxlink/makefile.mk b/binfilter/bf_svx/source/svxlink/makefile.mk
new file mode 100644
index 000000000000..80fd00c1f07f
--- /dev/null
+++ b/binfilter/bf_svx/source/svxlink/makefile.mk
@@ -0,0 +1,74 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(BFPRJ)$/util$/svx_svxpch
+
+PRJNAME=binfilter
+TARGET=svx_svxlink
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+CXXFILES=\
+ svx_linkmgr.cxx \
+ svx_fileobj.cxx
+
+SLOFILES=\
+ $(SLO)$/svx_linkmgr.obj \
+ $(SLO)$/svx_fileobj.obj
+
+SRS1NAME=$(TARGET)
+SRC1FILES= \
+ svx_linkmgr.src
+
+.IF "$(GUI)" == "WNT"
+NOOPTFILES=\
+ $(SLO)$/svx_fileobj.obj
+.ENDIF
+
+.ENDIF
+
+# ==========================================================================
+
+.INCLUDE : target.mk
+
+
diff --git a/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx b/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx
new file mode 100644
index 000000000000..ad03f1e14440
--- /dev/null
+++ b/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx
@@ -0,0 +1,579 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#ifdef OS2
+#endif
+
+
+#include <sot/formats.hxx>
+#include <bf_so3/lnkbase.hxx>
+#include <bf_sfx2/app.hxx>
+#include <bf_sfx2/progress.hxx>
+#include <bf_sfx2/interno.hxx>
+
+#include "fileobj.hxx"
+#include "linkmgr.hxx"
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "impgrf.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star::uno;
+
+
+/*N*/ #define FILETYPE_TEXT 1
+/*N*/ #define FILETYPE_GRF 2
+
+/*N*/ struct Impl_DownLoadData
+/*N*/ {
+/*N*/ Graphic aGrf;
+/*N*/ Timer aTimer;
+/*N*/
+/*N*/ Impl_DownLoadData( const Link& rLink )
+/*N*/ {
+/*N*/ aTimer.SetTimeout( 100 );
+/*N*/ aTimer.SetTimeoutHdl( rLink );
+/*N*/ aGrf.SetDefaultType();
+/*N*/ }
+/*N*/ ~Impl_DownLoadData()
+/*N*/ {
+/*N*/ aTimer.Stop();
+/*N*/ }
+/*N*/ };
+
+// --------------------------------------------------------------------------
+
+
+/*N*/ SvFileObject::SvFileObject()
+/*N*/ : nType( FILETYPE_TEXT ), pDownLoadData( 0 )
+/*N*/ {
+/*N*/ bLoadAgain = bMedUseCache = TRUE;
+/*N*/ bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
+/*N*/ bClearMedium = bStateChangeCalled = bInCallDownLoad = FALSE;
+/*N*/ }
+
+
+/*N*/ SvFileObject::~SvFileObject()
+/*N*/ {
+/*N*/ if ( xMed.Is() )
+/*N*/ {
+/*?*/ xMed->SetDataAvailableLink( Link() );
+/*?*/ xMed->SetDoneLink( Link() );
+/*?*/ xMed.Clear();
+/*N*/ }
+/*N*/ delete pDownLoadData;
+/*N*/ }
+
+
+/*N*/ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
+/*N*/ const String & rMimeType,
+/*N*/ BOOL bGetSynchron )
+/*N*/ {
+/*N*/ ULONG nFmt = SotExchange::GetFormatStringId( rMimeType );
+/*N*/ switch( nType )
+/*N*/ {
+/*N*/ case FILETYPE_TEXT:
+/*N*/ if( FORMAT_FILE == nFmt )
+/*N*/ {
+/*N*/ // das Medium muss in der Applikation geoffnet werden, um die
+/*N*/ // relativen Datei Links aufzuloesen!!!! Wird ueber den
+/*N*/ // LinkManager und damit von dessen Storage erledigt.
+/*N*/ rData <<= ::rtl::OUString( sFileNm );
+/*N*/
+/*
+===========================================================================
+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 );
+ }
+*/
+/*N*/ }
+/*N*/ break;
+/*N*/
+/*N*/ case FILETYPE_GRF:
+/*?*/ if( !bLoadError )
+/*?*/ {
+/*?*/ SfxMediumRef xTmpMed;
+/*?*/
+/*?*/ if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt ||
+/*?*/ SOT_FORMATSTR_ID_SVXB == nFmt )
+/*?*/ {
+/*?*/ Graphic aGrf;
+/*?*/
+/*?*/ //JP 15.07.98: Bug 52959
+/*?*/ // falls das Nativformat doch erwuenscht ist, muss am
+/*?*/ // Ende das Flag zurueckgesetzt werden.
+/*?*/ // wird einzig und allein im sw/ndgrf.cxx benutzt, wenn der Link vom
+/*?*/ // GraphicNode entfernt wird.
+/*?*/ BOOL bOldNativFormat = bNativFormat;
+/*?*/ //!!?? bNativFormat = 0 != (ASPECT_ICON & pSvData->GetAspect());
+/*?*/
+/*?*/ // falls gedruckt werden soll, warten wir bis die
+/*?*/ // Daten vorhanden sind
+/*?*/ if( bGetSynchron )
+/*?*/ {
+/*?*/ // 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 );
+/*?*/ }
+/*?*/
+/*?*/ if( !bInCallDownLoad )
+/*?*/ {
+/*?*/ xTmpMed = xMed;
+/*?*/ while( bWaitForData )
+/*?*/ Application::Reschedule();
+/*?*/
+/*?*/ xMed = xTmpMed;
+/*?*/ bClearMedium = TRUE;
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ if( pDownLoadData ||
+/*?*/ ( !bWaitForData && ( xMed.Is() || // wurde als URL geladen
+/*?*/ ( bSynchron && LoadFile_Impl() && xMed.Is() ) )) )
+/*?*/ {
+/*?*/ // falls
+/*?*/
+/*?*/ // falls es uebers Internet gesogen wurde, nicht
+/*?*/ // wieder versuchen
+/*?*/ if( !bGetSynchron )
+/*?*/ bLoadAgain = !xMed->IsRemote();
+/*?*/ bLoadError = !GetGraphic_Impl( aGrf, xMed->GetInStream() );
+/*?*/ }
+/*?*/ else if( !LoadFile_Impl() ||
+/*?*/ !GetGraphic_Impl( aGrf, xMed.Is() ? xMed->GetInStream() : 0 ))
+/*?*/ {
+/*?*/ if( !xMed.Is() )
+/*?*/ break;
+/*?*/ aGrf.SetDefaultType();
+/*?*/ }
+/*?*/
+/*?*/ if( SOT_FORMATSTR_ID_SVXB != nFmt )
+/*?*/ nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
+/*?*/ ? FORMAT_BITMAP
+/*?*/ : FORMAT_GDIMETAFILE;
+/*?*/
+/*?*/ SvMemoryStream aMemStm( 0, 65535 );
+/*?*/ switch ( nFmt )
+/*?*/ {
+/*?*/ case SOT_FORMATSTR_ID_SVXB:
+/*?*/ if( GRAPHIC_NONE != aGrf.GetType() )
+/*?*/ {
+/*?*/ aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
+/*?*/ aMemStm << aGrf;
+/*?*/ }
+/*?*/ break;
+/*?*/
+/*?*/ case FORMAT_BITMAP:
+/*?*/ if( !aGrf.GetBitmap().IsEmpty())
+/*?*/ aMemStm << aGrf.GetBitmap();
+/*?*/ break;
+/*?*/
+/*?*/ default:
+/*?*/ if( aGrf.GetGDIMetaFile().GetActionCount() )
+/*?*/ {
+/*?*/ GDIMetaFile aMeta( aGrf.GetGDIMetaFile() );
+/*?*/ aMeta.Write( aMemStm );
+/*?*/ }
+/*?*/ }
+/*?*/ rData <<= Sequence< sal_Int8 >( (sal_Int8*) aMemStm.GetData(),
+/*?*/ aMemStm.Seek( STREAM_SEEK_TO_END ) );
+/*?*/
+/*?*/ bNativFormat = bOldNativFormat;
+/*?*/
+/*?*/ // alles fertig?
+/*?*/ if( xMed.Is() && !bSynchron && bClearMedium )
+/*?*/ {
+/*?*/ xMed.Clear();
+/*?*/ bClearMedium = FALSE;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ break;
+/*N*/ }
+/*N*/ return sal_True/*0 != aTypeList.Count()*/;
+/*N*/ }
+
+
+
+
+/*N*/ BOOL SvFileObject::Connect( ::binfilter::SvBaseLink* pLink )
+/*N*/ {
+/*N*/ if( !pLink || !pLink->GetLinkManager() )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ // teste doch mal, ob nicht ein anderer Link mit der gleichen
+/*N*/ // Verbindung schon existiert
+/*N*/ pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
+/*N*/
+/*N*/ if( OBJECT_CLIENT_GRF == pLink->GetObjType() )
+/*N*/ {
+/*?*/ if( !pLink->IsUseCache() )
+/*?*/ bMedUseCache = FALSE;
+/*?*/
+/*?*/ // Reload-Erkennung ???
+/*?*/ SvInPlaceObjectRef aRef( pLink->GetLinkManager()->GetPersist() );
+/*?*/ 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();
+/*?*/ }
+/*N*/ }
+/*N*/
+/*N*/ switch( pLink->GetObjType() )
+/*N*/ {
+/*N*/ case OBJECT_CLIENT_GRF:
+/*?*/ nType = FILETYPE_GRF;
+/*?*/ bSynchron = pLink->IsSynchron();
+/*?*/ break;
+/*N*/
+/*N*/ case OBJECT_CLIENT_FILE:
+/*N*/ nType = FILETYPE_TEXT;
+/*N*/ break;
+/*N*/
+/*N*/ default:
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ SetUpdateTimeout( 0 );
+/*N*/
+/*N*/ // und jetzt bei diesem oder gefundenem Pseudo-Object anmelden
+/*N*/ AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType() ), 0 );
+/*N*/ return TRUE;
+/*N*/ }
+
+
+/*?*/ 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 ) );
+/*?*/ bInCallDownLoad = TRUE;
+/*?*/ xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
+/*?*/ bInCallDownLoad = FALSE;
+/*?*/
+/*?*/ 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 )
+/*?*/ {
+/*?*/ GraphicFilter* pGF = GetGrfFilter();
+/*?*/ 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, INetURLObject(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();
+/*?*/
+/*?*/ #ifdef DBG_UTIL
+/*?*/ 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
+/*?*/
+/*?*/ return GRFILTER_OK == nRes;
+/*?*/ }
+
+
+
+
+/*?*/ 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;
+/*?*/ pThis->bInCallDownLoad = 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
+/*?*/ pThis->NotifyDataChanged();
+/*?*/ }
+/*?*/
+/*?*/ if( pThis->bDataReady )
+/*?*/ {
+/*?*/ pThis->bLoadAgain = TRUE;
+/*?*/ if( pThis->xMed.Is() )
+/*?*/ {
+/*?*/ pThis->xMed->SetDataAvailableLink( Link() );
+/*?*/ pThis->xMed->SetDoneLink( Link() );
+/*?*/
+/*?*/ Application::PostUserEvent(
+/*?*/ STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
+/*?*/ new SfxMediumRef( pThis->xMed ));
+/*?*/ pThis->xMed.Clear();
+/*?*/ }
+/*?*/ if( pThis->pDownLoadData )
+/*?*/ delete pThis->pDownLoadData, pThis->pDownLoadData = 0;
+/*?*/ }
+/*?*/
+/*?*/ 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 );
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ pThis->NotifyDataChanged();
+/*?*/
+/*?*/ SvStream* pStrm = pThis->xMed.Is() ? pThis->xMed->GetInStream() : 0;
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ 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;
+/*?*/ }
+
+
+/* [Beschreibung]
+
+ Die Methode stellt fest, ob aus einem DDE-Object die Daten 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
+*/
+
+
+
+/*N*/ void SvFileObject::CancelTransfers()
+/*N*/ {
+/*N*/ if( xMed.Is() )
+/*?*/ xMed->CancelTransfers();
+/*N*/
+/*N*/ // und aus dem Cache austragen, wenn man mitten im Laden ist
+/*N*/ if( !bDataReady )
+/*N*/ {
+/*N*/ // nicht noch mal aufsetzen
+/*N*/ bLoadAgain = bMedUseCache = FALSE;
+/*N*/ bDataReady = bLoadError = bWaitForData = TRUE;
+/*N*/ SendStateChg_Impl( STATE_LOAD_ABORT );
+/*N*/ }
+/*N*/ }
+
+
+
+
+/*N*/ void SvFileObject::SendStateChg_Impl( USHORT nState )
+/*N*/ {
+/*N*/ if( !bStateChangeCalled && HasDataLinks() )
+/*N*/ {
+/*N*/ Any aAny;
+/*N*/ aAny <<= ::rtl::OUString::valueOf( (sal_Int32)nState );
+/*N*/ DataChanged( SotExchange::GetFormatName(
+/*N*/ SvxLinkManager::RegisterStatusInfoId()), aAny );
+/*N*/ bStateChangeCalled = TRUE;
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx b/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx
new file mode 100644
index 000000000000..42ef272dc45f
--- /dev/null
+++ b/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx
@@ -0,0 +1,222 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <com/sun/star/uno/Sequence.h>
+#include <sot/formats.hxx>
+#include <vcl/graph.hxx>
+#include <bf_so3/lnkbase.hxx>
+#include <bf_svtools/itemset.hxx>
+
+#include "linkmgr.hxx"
+#include "fileobj.hxx"
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "bf_so3/staticbaseurl.hxx"
+namespace binfilter {
+
+
+
+/*N*/ SvxLinkManager::SvxLinkManager( SvPersist * pPersist )
+/*N*/ {
+/*N*/ SvLinkManager::SetPersist( pPersist );
+/*N*/ }
+
+/*N*/ ::binfilter::SvLinkSourceRef SvxLinkManager::CreateObj( ::binfilter::SvBaseLink * pLink )
+/*N*/ {
+/*N*/ switch( pLink->GetObjType() )
+/*N*/ {
+/*N*/ case OBJECT_CLIENT_FILE:
+/*N*/ case OBJECT_CLIENT_GRF:
+/*N*/ return new SvFileObject;
+/*N*/
+/*N*/ case OBJECT_INTERN:
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 return new SvxInternalLink();
+/*N*/ }
+/*?*/ return SvLinkManager::CreateObj( pLink );
+/*N*/ }
+
+
+/*N*/ BOOL SvxLinkManager::InsertFileLink( ::binfilter::SvBaseLink& rLink,
+/*N*/ USHORT nFileType,
+/*N*/ const String& rFileNm,
+/*N*/ const String* pFilterNm,
+/*N*/ const String* pRange )
+/*N*/ {
+/*N*/ if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
+/*N*/ return FALSE;
+/*N*/
+/*N*/ String sCmd( rFileNm );
+/*N*/ sCmd += ::binfilter::cTokenSeperator;
+/*N*/ if( pRange )
+/*N*/ sCmd += *pRange;
+/*N*/ if( pFilterNm )
+/*N*/ ( sCmd += ::binfilter::cTokenSeperator ) += *pFilterNm;
+/*N*/
+/*N*/ return SvLinkManager::InsertLink( &rLink, nFileType,
+/*N*/ ::binfilter::LINKUPDATE_ONCALL, &sCmd );
+/*N*/ }
+
+
+ // erfrage die Strings fuer den Dialog
+/*N*/ BOOL SvxLinkManager::GetDisplayNames( const ::binfilter::SvBaseLink* pBaseLink,
+/*N*/ String* pType,
+/*N*/ String* pFile,
+/*N*/ String* pLink,
+/*N*/ String* pFilter ) const
+/*N*/ {
+/*N*/ BOOL bRet = FALSE;
+/*N*/ const String sLNm( pBaseLink->GetLinkSourceName() );
+/*N*/ if( sLNm.Len() )
+/*N*/ switch( pBaseLink->GetObjType() )
+/*N*/ {
+/*N*/ case OBJECT_CLIENT_FILE:
+/*N*/ case OBJECT_CLIENT_GRF:
+/*N*/ {
+/*N*/ USHORT nPos = 0;
+/*N*/ String sFile( sLNm.GetToken( 0, ::binfilter::cTokenSeperator, nPos ) );
+/*N*/ String sRange( sLNm.GetToken( 0, ::binfilter::cTokenSeperator, nPos ) );
+/*N*/
+/*N*/ if( pFile )
+/*N*/ *pFile = sFile;
+/*N*/ if( pLink )
+/*N*/ *pLink = sRange;
+/*N*/ if( pFilter )
+/*N*/ *pFilter = sLNm.Copy( nPos );
+/*N*/
+/*N*/ if( pType )
+/*?*/ *pType = String( ResId(
+/*?*/ OBJECT_CLIENT_FILE == pBaseLink->GetObjType()
+/*?*/ ? RID_SVXSTR_FILELINK
+/*?*/ : RID_SVXSTR_GRAFIKLINK
+/*?*/ , DIALOG_MGR() ));
+/*N*/
+/*N*/ bRet = TRUE;
+/*N*/ }
+/*N*/ break;
+/*N*/ default:
+/*N*/ bRet = SvLinkManager::GetDisplayNames( pBaseLink, pType, pFile,
+/*N*/ pLink, pFilter );
+/*N*/ break;
+/*N*/ }
+/*N*/ return bRet;
+/*N*/ }
+
+// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+// (ist zur Zeit nur fuer die FileLinks interressant!)
+/*N*/ void SvxLinkManager::CancelTransfers()
+/*N*/ {
+/*N*/ SvFileObject* pFileObj;
+/*N*/ ::binfilter::SvBaseLink* pLnk;
+/*N*/
+/*N*/ const ::binfilter::SvBaseLinks& rLnks = GetLinks();
+/*N*/ for( USHORT n = rLnks.Count(); n; )
+/*N*/ if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
+/*N*/ OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
+/*N*/ 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
+/*N*/ // 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
+/*N*/ // CastAndAddRef( pLnk->GetObj() )) )
+/*N*/ pFileObj->CancelTransfers();
+/*N*/ }
+
+
+
+ // 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
+/*N*/ ULONG SvxLinkManager::RegisterStatusInfoId()
+/*N*/ {
+/*N*/ static ULONG nFormat = 0;
+/*N*/
+/*N*/ if( !nFormat )
+/*N*/ {
+/*N*/ // wie sieht die neue Schnittstelle aus?
+/*N*/ // nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
+/*N*/ nFormat = SotExchange::RegisterFormatName(
+/*N*/ String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
+/*N*/ "StatusInfo vom SvxInternalLink" )));
+/*N*/ }
+/*N*/ return nFormat;
+/*N*/ }
+
+// ----------------------------------------------------------------------
+
+/*N*/ BOOL SvxLinkManager::GetGraphicFromAny( const String& rMimeType,
+/*N*/ const ::com::sun::star::uno::Any & rValue,
+/*N*/ Graphic& rGrf )
+/*N*/ {
+/*?*/ BOOL bRet = FALSE;
+/*?*/ ::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
+/*?*/ if( rValue.hasValue() && ( rValue >>= aSeq ) )
+/*?*/ {
+/*?*/ SvMemoryStream aMemStm( (void*)aSeq.getConstArray(), aSeq.getLength(),
+/*?*/ STREAM_READ );
+/*?*/ aMemStm.Seek( 0 );
+/*?*/
+/*?*/ switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
+/*?*/ {
+/*?*/ case SOT_FORMATSTR_ID_SVXB:
+/*?*/ {
+/*?*/ aMemStm >> rGrf;
+/*?*/ bRet = TRUE;
+/*?*/ }
+/*?*/ break;
+/*?*/ case FORMAT_GDIMETAFILE:
+/*?*/ {
+/*?*/ GDIMetaFile aMtf;
+/*?*/ aMtf.Read( aMemStm );
+/*?*/ rGrf = aMtf;
+/*?*/ bRet = TRUE;
+/*?*/ }
+/*?*/ break;
+/*?*/ case FORMAT_BITMAP:
+/*?*/ {
+/*?*/ Bitmap aBmp;
+/*?*/ aMemStm >> aBmp;
+/*?*/ rGrf = aBmp;
+/*?*/ bRet = TRUE;
+/*?*/ }
+/*?*/ break;
+/*?*/ }
+/*?*/ }
+/*?*/ return bRet;
+/*N*/ }
+
+
+// ----------------------------------------------------------------------
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/svxlink/svx_linkmgr.src b/binfilter/bf_svx/source/svxlink/svx_linkmgr.src
new file mode 100644
index 000000000000..7897df761095
--- /dev/null
+++ b/binfilter/bf_svx/source/svxlink/svx_linkmgr.src
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+
+#include "dialogs.hrc"
+String RID_SVXSTR_FILELINK
+{
+ Text [ de ] = "Dokument" ;
+ Text [ en-US ] = "Document" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Documento";
+ Text[ ru ] = "Документ";
+ Text[ el ] = "ΈγγÏαφο";
+ Text[ nl ] = "Document";
+ Text[ fr ] = "Document";
+ Text[ es ] = "Documento";
+ Text[ fi ] = "Asiakirja";
+ Text[ ca ] = "Document";
+ Text[ it ] = "Documento";
+ Text[ sk ] = "Dokument";
+ Text[ da ] = "Dokument";
+ Text[ sv ] = "Dokument";
+ Text[ pl ] = "Dokument";
+ Text[ pt-BR ] = "Documento";
+ Text[ th ] = "เอà¸à¸ªà¸²à¸£";
+ Text[ ja ] = "ドキュメント";
+ Text[ ko ] = "문서";
+ Text[ zh-CN ] = "文档";
+ Text[ zh-TW ] = "文件";
+ Text[ tr ] = "Belge";
+ Text[ hi-IN ] = "लेखपतà¥à¤°";
+ Text[ ar ] = "المستند";
+ Text[ he ] = "‮מסמך‬";
+};
+String RID_SVXSTR_GRAFIKLINK
+{
+ Text [ de ] = "Grafik" ;
+ Text [ en-US ] = "Graphic" ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "Imagem";
+ Text[ ru ] = "ГрафичеÑкий объект";
+ Text[ el ] = "ΓÏαφικό";
+ Text[ nl ] = "Afbeelding";
+ Text[ fr ] = "Image";
+ Text[ es ] = "Imagen";
+ Text[ fi ] = "Grafiikka";
+ Text[ ca ] = "Imatge";
+ Text[ it ] = "Immagine";
+ Text[ sk ] = "Obrázok";
+ Text[ da ] = "Grafik";
+ Text[ sv ] = "Grafik";
+ Text[ pl ] = "Grafika";
+ Text[ pt-BR ] = "Figura";
+ Text[ th ] = "à¸à¸£à¸²à¸Ÿà¸´à¸„";
+ Text[ ja ] = "図";
+ Text[ ko ] = "그래픽";
+ Text[ zh-CN ] = "图形";
+ Text[ zh-TW ] = "圖形";
+ Text[ tr ] = "Grafik";
+ Text[ hi-IN ] = "सà¥à¤šà¤¿à¤¤à¥à¤°";
+ Text[ ar ] = "صورة";
+ Text[ he ] = "‮גרפיקה‬";
+};
+
+String RID_SVXSTR_GRFLINKPROGRESS
+{
+ Text [ de ] = "Importiere Grafik..." ;
+ Text [ en-US ] = "Importing graphic..." ;
+ Text [ x-comment ] = " ";
+ Text[ pt ] = "A importar imagem...";
+ Text[ ru ] = "Импорт графичеÑкого объекта...";
+ Text[ el ] = "Εισαγωγή γÏαφικοÏ...";
+ Text[ nl ] = "Bezig met het importeren van afbeelding...";
+ Text[ fr ] = "Import de l'image...";
+ Text[ es ] = "Importando imagen...";
+ Text[ fi ] = "Tuodaan grafiikkaa...";
+ Text[ ca ] = "S'està important la imatge...";
+ Text[ it ] = "Importazione immagine...";
+ Text[ sk ] = "Importuje sa obrázok...";
+ Text[ da ] = "Importerer grafik...";
+ Text[ sv ] = "Importerar grafik...";
+ Text[ pl ] = "Importowanie grafiki...";
+ Text[ pt-BR ] = "Importando figuras...";
+ Text[ th ] = "à¸à¸³à¸¥à¸±à¸‡à¸™à¸³à¹€à¸‚้าà¸à¸£à¸²à¸Ÿà¸´à¸„...";
+ Text[ ja ] = "図ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ...";
+ Text[ ko ] = "ê·¸ë¦¼ì„ ê°€ì ¸ì˜¤ê³  있습니다...";
+ Text[ zh-CN ] = "输入图形...";
+ Text[ zh-TW ] = "匯入圖形...";
+ Text[ tr ] = "İçe aktar (grafik)...";
+ Text[ hi-IN ] = "सà¥à¤šà¤¿à¤¤à¥à¤° को आयात कर रहा है...";
+ Text[ ar ] = "استيراد رسومات...";
+ Text[ he ] = "â€®×™×‘×•× ×’×¨×¤×™×§×”â€¬";
+};
diff --git a/binfilter/bf_svx/source/unodraw/UnoGraphicExporter.hxx b/binfilter/bf_svx/source/unodraw/UnoGraphicExporter.hxx
new file mode 100644
index 000000000000..cb62a5f290af
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/UnoGraphicExporter.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNOGRAPHICEXPORTER_HXX_
+#define _SVX_UNOGRAPHICEXPORTER_HXX_
+
+#include <com/sun/star/uno/XInterface.hpp>
+namespace binfilter {
+
+namespace svx
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GraphicExporter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception );
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw();
+ ::rtl::OUString SAL_CALL GraphicExporter_getImplementationName() throw();
+}
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/UnoNameItemTable.hxx b/binfilter/bf_svx/source/unodraw/UnoNameItemTable.hxx
new file mode 100644
index 000000000000..b6242588c5f4
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/UnoNameItemTable.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNONAMEITEMTABLE_HXX_
+#define _SVX_UNONAMEITEMTABLE_HXX_
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <vector>
+
+#include <bf_svtools/lstner.hxx>
+
+#include "xit.hxx"
+
+namespace binfilter {
+
+class SfxItemPool;
+class SfxItemSet;
+class SdrModel;
+
+typedef std::vector< SfxItemSet* > ItemPoolVector;
+class SvxUnoNameItemTable : public cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer, ::com::sun::star::lang::XServiceInfo >,
+ public SfxListener
+{
+private:
+ SdrModel* mpModel;
+ SfxItemPool* mpModelPool;
+ USHORT mnWhich;
+ BYTE mnMemberId;
+
+ ItemPoolVector maItemSetVector;
+
+ void SAL_CALL ImplInsertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement );
+
+public:
+ SvxUnoNameItemTable( SdrModel* pModel, USHORT nWhich, BYTE nMemberId = 0 ) throw();
+ virtual ~SvxUnoNameItemTable() throw();
+
+ virtual NameOrIndex* createItem() const throw() = 0;
+ void dispose();
+
+ // SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
+
+ // XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException);
+
+ // 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);
+
+ // 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);
+
+ // 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( ) throw( ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual sal_Bool SAL_CALL hasElements( ) throw( ::com::sun::star::uno::RuntimeException);
+};
+
+}//end of namespace binfilter
+#endif // _SVX_UNONAMEITEMTABLE_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/makefile.mk b/binfilter/bf_svx/source/unodraw/makefile.mk
new file mode 100644
index 000000000000..6089c9e6aae8
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/makefile.mk
@@ -0,0 +1,78 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_unodraw
+
+NO_HIDS=TRUE
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/svx_UnoNamespaceMap.obj \
+ $(SLO)$/svx_unopool.obj \
+ $(SLO)$/svx_XPropertyTable.obj \
+ $(SLO)$/svx_UnoNameItemTable.obj \
+ $(SLO)$/svx_unoshape.obj \
+ $(SLO)$/svx_unoipset.obj \
+ $(SLO)$/svx_unoctabl.obj \
+ $(SLO)$/svx_unoshap2.obj \
+ $(SLO)$/svx_unoshap3.obj \
+ $(SLO)$/svx_unoshap4.obj \
+ $(SLO)$/svx_unopage.obj \
+ $(SLO)$/svx_unoshtxt.obj \
+ $(SLO)$/svx_unoshcol.obj \
+ $(SLO)$/svx_unoprov.obj \
+ $(SLO)$/svx_unomod.obj \
+ $(SLO)$/svx_unonrule.obj \
+ $(SLO)$/svx_unofdesc.obj \
+ $(SLO)$/svx_unomlstr.obj \
+ $(SLO)$/svx_unogtabl.obj \
+ $(SLO)$/svx_unohtabl.obj \
+ $(SLO)$/svx_unobtabl.obj \
+ $(SLO)$/svx_unottabl.obj \
+ $(SLO)$/svx_unomtabl.obj \
+ $(SLO)$/svx_unodtabl.obj \
+ $(SLO)$/svx_gluepts.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/unodraw/shapeimpl.hxx b/binfilter/bf_svx/source/unodraw/shapeimpl.hxx
new file mode 100644
index 000000000000..1c0b7b6c93df
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/shapeimpl.hxx
@@ -0,0 +1,144 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_SHAPEIMPL_HXX
+#define _SVX_SHAPEIMPL_HXX
+
+#include "unoshape.hxx"
+class SvGlobalName;
+namespace binfilter {
+
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+class SvxShapeCaption : public SvxShapeText
+{
+public:
+ SvxShapeCaption( SdrObject* pObj ) throw();
+ virtual ~SvxShapeCaption() throw();
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+class SvxOle2Shape : public SvxShape
+{
+public:
+ SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ virtual ~SvxOle2Shape() throw();
+
+ sal_Bool createObject( const SvGlobalName &aClassName );
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+};
+
+/***********************************************************************
+* *
+***********************************************************************/
+}//end of namespace binfilter
+#ifndef SVX_LIGHT
+
+#include <bf_so3/plugin.hxx>
+namespace binfilter {
+class SvxPluginShape : public SvxOle2Shape
+{
+private:
+ SvPlugInObjectRef mxPlugin;
+
+public:
+ SvxPluginShape( SdrObject* pObj ) throw();
+ virtual ~SvxPluginShape() throw();
+
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+
+ //XPropertySet
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+};
+}//end of namespace binfilter
+#endif
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+#ifndef SVX_LIGHT
+
+#include <bf_so3/applet.hxx>
+namespace binfilter {
+class SvxAppletShape : public SvxOle2Shape
+{
+private:
+ SvAppletObjectRef mxApplet;
+
+public:
+ SvxAppletShape( SdrObject* pObj ) throw();
+ virtual ~SvxAppletShape() throw();
+
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+
+ //XPropertySet
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+};
+}//end of namespace binfilter
+#endif
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+#ifndef SVX_LIGHT
+
+namespace binfilter {
+class SvxFrameShape : public SvxOle2Shape
+{
+public:
+ SvxFrameShape( SdrObject* pObj ) throw();
+ virtual ~SvxFrameShape() throw();
+
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
+
+ //XPropertySet
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+};
+}//end of namespace binfilter
+#endif
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_UnoNameItemTable.cxx b/binfilter/bf_svx/source/unodraw/svx_UnoNameItemTable.cxx
new file mode 100644
index 000000000000..bcc2d5a045c6
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_UnoNameItemTable.cxx
@@ -0,0 +1,335 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <set>
+
+#include <bf_svtools/itempool.hxx>
+
+#include <bf_svtools/itemset.hxx>
+
+
+#include <comphelper/stl_types.hxx>
+
+#include "svdmodel.hxx"
+
+#include "UnoNameItemTable.hxx"
+
+#include <osl/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+#include "unoapi.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+SvxUnoNameItemTable::SvxUnoNameItemTable( SdrModel* pModel, USHORT nWhich, BYTE nMemberId ) throw()
+: mpModel( pModel ),
+ mpModelPool( pModel ? &pModel->GetItemPool() : NULL ),
+ mnWhich( nWhich ), mnMemberId( nMemberId )
+{
+ if( pModel )
+ StartListening( *pModel );
+}
+
+SvxUnoNameItemTable::~SvxUnoNameItemTable() throw()
+{
+ if( mpModel )
+ EndListening( *mpModel );
+ dispose();
+}
+
+void SvxUnoNameItemTable::dispose()
+{
+ ItemPoolVector::iterator aIter = maItemSetVector.begin();
+ const ItemPoolVector::iterator aEnd = maItemSetVector.end();
+
+ while( aIter != aEnd )
+ {
+ delete (*aIter++);
+ }
+
+ maItemSetVector.clear();
+}
+
+void SvxUnoNameItemTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw()
+{
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+
+ if( pSdrHint && HINT_MODELCLEARED == pSdrHint->GetKind() )
+ dispose();
+}
+
+sal_Bool SAL_CALL SvxUnoNameItemTable::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;
+}
+
+void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, const uno::Any& aElement )
+{
+ SfxItemSet* mpInSet = new SfxItemSet( *mpModelPool, mnWhich, mnWhich );
+ maItemSetVector.push_back( mpInSet );
+
+ NameOrIndex* pNewItem = createItem();
+ pNewItem->SetName( String( aName ) );
+ pNewItem->PutValue( aElement, mnMemberId );
+ mpInSet->Put( *pNewItem, mnWhich );
+ delete pNewItem;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoNameItemTable::insertByName( const OUString& aApiName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ if( hasByName( aApiName ) )
+ throw container::ElementExistException();
+
+ String aName;
+ SvxUnogetInternalNameForItem( mnWhich, aApiName, aName );
+
+ ImplInsertByName( aName, aElement );
+}
+
+
+
+void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String Name;
+ SvxUnogetInternalNameForItem( mnWhich, aApiName, Name );
+
+ ItemPoolVector::iterator aIter = maItemSetVector.begin();
+ const ItemPoolVector::iterator aEnd = maItemSetVector.end();
+
+ NameOrIndex *pItem;
+ const String aSearchName( Name );
+
+ while( aIter != aEnd )
+ {
+ pItem = (NameOrIndex *)&((*aIter)->Get( mnWhich ) );
+ if( pItem->GetName() == aSearchName )
+ {
+ delete (*aIter);
+ maItemSetVector.erase( aIter );
+ return;
+ }
+ aIter++;
+ }
+
+ if( !hasByName( Name ) )
+ throw container::NoSuchElementException();
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ String aName;
+ SvxUnogetInternalNameForItem( mnWhich, aApiName, aName );
+
+ ItemPoolVector::iterator aIter = maItemSetVector.begin();
+ const ItemPoolVector::iterator aEnd = maItemSetVector.end();
+
+ NameOrIndex *pItem;
+ const String aSearchName( aName );
+
+ while( aIter != aEnd )
+ {
+ pItem = (NameOrIndex *)&((*aIter)->Get( mnWhich ) );
+ if( pItem->GetName() == aSearchName )
+ {
+ NameOrIndex* pNewItem = createItem();
+ pNewItem->SetName( aSearchName );
+ if( !pNewItem->PutValue( aElement, mnMemberId ) )
+ throw lang::IllegalArgumentException();
+
+ (*aIter)->Put( *pNewItem );
+ return;
+ }
+ aIter++;
+ }
+
+ // if it is not in our own sets, modify the pool!
+ sal_Bool bFound = sal_False;
+
+ USHORT nSurrogate;
+ USHORT nCount = mpModelPool ? mpModelPool->GetItemCount( mnWhich ) : 0;
+ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ {
+ pItem->PutValue( aElement, mnMemberId );
+ bFound = sal_True;
+ break;
+ }
+ }
+
+ if( bFound )
+ ImplInsertByName( aName, aElement );
+ else
+ throw container::NoSuchElementException();
+
+ if( !hasByName( aName ) )
+ throw container::NoSuchElementException();
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoNameItemTable::getByName( const OUString& aApiName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String aName;
+ SvxUnogetInternalNameForItem( mnWhich, aApiName, aName );
+
+ uno::Any aAny;
+
+ if( mpModelPool && aName.Len() != 0 )
+ {
+ const String aSearchName( aName );
+ NameOrIndex *pItem;
+ sal_Int32 nSurrogate;
+
+ sal_Int32 nSurrogateCount = mpModelPool ? (sal_Int32)mpModelPool->GetItemCount( mnWhich ) : 0;
+ for( nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, (USHORT)nSurrogate );
+
+ if( pItem && pItem->GetName() == aSearchName )
+ {
+ pItem->QueryValue( aAny, mnMemberId );
+ return aAny;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+ return aAny;
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ std::set< OUString, comphelper::UStringLess > aNameSet;
+
+ NameOrIndex *pItem;
+ OUString aApiName;
+
+ const sal_Int32 nSurrogateCount = mpModelPool ? (sal_Int32)mpModelPool->GetItemCount( mnWhich ) : 0;
+ sal_Int32 nSurrogate;
+ for( nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, (USHORT)nSurrogate );
+
+ if( pItem == NULL || pItem->GetName().Len() == 0 )
+ continue;
+
+ SvxUnogetApiNameForItem( mnWhich, pItem->GetName(), aApiName );
+ aNameSet.insert( aApiName );
+ }
+
+ uno::Sequence< OUString > aSeq( aNameSet.size() );
+ OUString* pNames = aSeq.getArray();
+
+ std::set< OUString, comphelper::UStringLess >::iterator aIter( aNameSet.begin() );
+ const std::set< OUString, comphelper::UStringLess >::iterator aEnd( aNameSet.end() );
+
+ while( aIter != aEnd )
+ {
+ *pNames++ = *aIter++;
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ String aName;
+ SvxUnogetInternalNameForItem( mnWhich, aApiName, aName );
+
+ if( aName.Len() == 0 )
+ return sal_False;
+
+ const String aSearchName( aName );
+ USHORT nSurrogate;
+
+ const NameOrIndex *pItem;
+
+ USHORT nCount = mpModelPool ? mpModelPool->GetItemCount( mnWhich ) : 0;
+ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, nSurrogate );
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SAL_CALL SvxUnoNameItemTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ const NameOrIndex *pItem;
+
+ sal_Int32 nSurrogate;
+ const sal_Int32 nSurrogateCount = mpModelPool ? (sal_Int32)mpModelPool->GetItemCount( mnWhich ) : 0;
+ for( nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, (USHORT)nSurrogate );
+
+ if( pItem && pItem->GetName().Len() != 0 )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_UnoNamespaceMap.cxx b/binfilter/bf_svx/source/unodraw/svx_UnoNamespaceMap.cxx
new file mode 100644
index 000000000000..3fd3a05234b9
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_UnoNamespaceMap.cxx
@@ -0,0 +1,316 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <set>
+
+#include <com/sun/star/container/XNameAccess.hpp>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <osl/diagnose.h>
+
+
+#include <comphelper/stl_types.hxx>
+
+#include <bf_svtools/itempool.hxx>
+
+#include "unoapi.hxx"
+
+#include "xmlcnitm.hxx"
+namespace binfilter {
+
+using namespace ::comphelper;
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+
+namespace svx
+{
+ /** implements a component to export namespaces of all SvXMLAttrContainerItem inside
+ one or two pools with a variable count of which ids.
+ */
+ class NamespaceMap : public WeakImplHelper2< XNameAccess, XServiceInfo >
+ {
+ private:
+ sal_uInt16* mpWhichIds;
+ SfxItemPool* mpPool;
+
+ public:
+ NamespaceMap( sal_uInt16* pWhichIds, SfxItemPool* pPool );
+ virtual ~NamespaceMap();
+
+ // XNameAccess
+ virtual Any SAL_CALL getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getElementNames( ) throw (RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (RuntimeException);
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType( ) throw (RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw (RuntimeException);
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw(RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(RuntimeException);
+ };
+
+ Reference< XInterface > SAL_CALL NamespaceMap_createInstance( sal_uInt16* pWhichIds, SfxItemPool* pPool )
+ throw( Exception )
+ {
+ return (XWeak*)new NamespaceMap( pWhichIds, pPool );
+ }
+
+ Sequence< OUString > SAL_CALL NamespaceMap_getSupportedServiceNames()
+ throw()
+ {
+ Sequence< OUString > aSupportedServiceNames( 1 );
+ aSupportedServiceNames[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.NamespaceMap" ) );
+ return aSupportedServiceNames;
+ }
+
+ OUString SAL_CALL NamespaceMap_getImplementationName()
+ throw()
+ {
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Svx.NamespaceMap" ) );
+ }
+
+
+
+ class NamespaceIteratorImpl
+ {
+ private:
+ SfxItemPool* mpPool;
+
+ sal_uInt16* mpWhichId;
+
+ sal_uInt16 mnItemCount;
+ sal_uInt16 mnItem;
+
+ const SvXMLAttrContainerItem* mpCurrentAttr;
+ sal_uInt16 mnCurrentAttr;
+
+ public:
+
+ NamespaceIteratorImpl( sal_uInt16* pWhichIds, SfxItemPool* pPool );
+
+ sal_Bool next( OUString& rPrefix, OUString& rURL );
+ };
+}
+
+using namespace ::binfilter ::svx;
+
+// -------------
+
+NamespaceIteratorImpl::NamespaceIteratorImpl( sal_uInt16* pWhichIds, SfxItemPool* pPool )
+{
+ mpPool = pPool;
+ mpCurrentAttr = NULL;
+ mnCurrentAttr = 0;
+
+ mpWhichId = pWhichIds;
+
+ mnItem = 0;
+ mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount( *mpWhichId ) : 0;
+}
+
+sal_Bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
+{
+ // we still need to process the current attribute
+ if( mpCurrentAttr && (mnCurrentAttr != USHRT_MAX) )
+ {
+ rPrefix = mpCurrentAttr->GetPrefix( mnCurrentAttr );
+ rURL = mpCurrentAttr->GetNamespace( mnCurrentAttr );
+
+ mnCurrentAttr = mpCurrentAttr->GetNextNamespaceIndex( mnCurrentAttr );
+ return sal_True;
+ }
+
+ // we need the next namespace item
+ mpCurrentAttr = NULL;
+
+ const SfxPoolItem* pItem;
+ // look for the next available item in the current pool
+ while( (mnItem < mnItemCount) && ( NULL == (pItem = mpPool->GetItem( *mpWhichId, mnItem ) ) ) )
+ mnItem++;
+
+ // are we finished with the current whichid?
+ if( mnItem == mnItemCount )
+ {
+ mpWhichId++;
+
+ // are we finished with the current pool?
+ if( 0 != *mpWhichId )
+ {
+ mnItem = 0;
+ mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount( *mpWhichId ) : 0;
+ return next( rPrefix, rURL );
+ }
+
+ pItem = NULL;
+ }
+
+ if( pItem )
+ {
+ mnItem++;
+
+ // get that item and see if there namespaces inside
+ const SvXMLAttrContainerItem *pUnknown = (const SvXMLAttrContainerItem *)pItem;
+ if( (pUnknown->GetAttrCount() > 0) )
+ {
+ mpCurrentAttr = pUnknown;
+ mnCurrentAttr = pUnknown->GetFirstNamespaceIndex();
+ }
+ return next( rPrefix, rURL );
+ }
+
+ return false;
+}
+
+// -------------
+
+NamespaceMap::NamespaceMap( sal_uInt16* pWhichIds, SfxItemPool* pPool )
+: mpWhichIds( pWhichIds ), mpPool( pPool )
+{
+}
+
+NamespaceMap::~NamespaceMap()
+{
+}
+
+// XNameAccess
+Any SAL_CALL NamespaceMap::getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ sal_Bool bFound;
+
+ do
+ {
+ bFound = aIter.next( aPrefix, aURL );
+ }
+ while( bFound && (aPrefix != aName ) );
+
+ if( !bFound )
+ throw NoSuchElementException();
+
+ return makeAny( aURL );
+}
+
+Sequence< OUString > SAL_CALL NamespaceMap::getElementNames() throw (RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ std::set< OUString, comphelper::UStringLess > aPrefixSet;
+
+ while( aIter.next( aPrefix, aURL ) )
+ aPrefixSet.insert( aPrefix );
+
+ Sequence< OUString > aSeq( aPrefixSet.size() );
+ OUString* pPrefixes = aSeq.getArray();
+
+ std::set< OUString, comphelper::UStringLess >::iterator aPrefixIter( aPrefixSet.begin() );
+ const std::set< OUString, comphelper::UStringLess >::iterator aEnd( aPrefixSet.end() );
+
+ while( aPrefixIter != aEnd )
+ {
+ *pPrefixes++ = *aPrefixIter++;
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL NamespaceMap::hasByName( const OUString& aName ) throw (RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ sal_Bool bFound;
+
+ do
+ {
+ bFound = aIter.next( aPrefix, aURL );
+ }
+ while( bFound && (aPrefix != aName ) );
+
+ return bFound;
+}
+
+// XElementAccess
+Type SAL_CALL NamespaceMap::getElementType() throw (RuntimeException)
+{
+ return ::getCppuType( (const OUString*) 0 );
+}
+
+sal_Bool SAL_CALL NamespaceMap::hasElements() throw (RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ return aIter.next( aPrefix, aURL );
+}
+
+// XServiceInfo
+OUString SAL_CALL NamespaceMap::getImplementationName( )
+ throw(RuntimeException)
+{
+ return NamespaceMap_getImplementationName();
+}
+
+sal_Bool SAL_CALL NamespaceMap::supportsService( const OUString& ServiceName )
+ throw(RuntimeException)
+{
+ return sal_True;
+}
+
+Sequence< OUString > SAL_CALL NamespaceMap::getSupportedServiceNames( )
+ throw(RuntimeException)
+{
+ return NamespaceMap_getSupportedServiceNames();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_XPropertyTable.cxx b/binfilter/bf_svx/source/unodraw/svx_XPropertyTable.cxx
new file mode 100644
index 000000000000..adc0d315343c
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_XPropertyTable.cxx
@@ -0,0 +1,751 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include <osl/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include "xtable.hxx"
+
+#include "unopolyhelper.hxx"
+
+#include "xdef.hxx"
+
+#include "unoapi.hxx"
+#include "unoprnms.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
+using namespace ::cppu;
+using namespace ::rtl;
+
+class SvxUnoXPropertyTable : public WeakImplHelper2< XNameContainer, XServiceInfo >
+{
+private:
+ sal_Int16 mnWhich;
+ XPropertyList* mpList;
+ XPropertyTable* mpTable;
+
+ long getCount() const { return mpList ? mpList->Count() : (mpTable?mpTable->Count():0); }
+ XPropertyEntry* get( long index ) const;
+public:
+ SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pList ) throw();
+ SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyTable* pTable ) throw();
+
+ virtual ~SvxUnoXPropertyTable() throw();
+
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw() = 0;
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw() = 0;
+
+ // XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( RuntimeException);
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const Any& aElement ) throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( NoSuchElementException, WrappedTargetException, RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const Any& aElement ) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException);
+
+ // XNameAccess
+ virtual Any SAL_CALL getByName( const OUString& aName ) throw( NoSuchElementException, WrappedTargetException, RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getElementNames( ) throw( RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( RuntimeException);
+
+ // XElementAccess
+ virtual sal_Bool SAL_CALL hasElements( ) throw( RuntimeException);
+};
+
+SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyTable* pTable ) throw()
+: mpTable( pTable ), mpList( NULL ), mnWhich( nWhich )
+{
+}
+
+SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pList ) throw()
+: mpTable( NULL ), mpList( pList ), mnWhich( nWhich )
+{
+}
+
+SvxUnoXPropertyTable::~SvxUnoXPropertyTable() throw()
+{
+}
+
+XPropertyEntry* SvxUnoXPropertyTable::get( long index ) const
+{
+ if( mpTable )
+ return mpTable->Get( index, 0 );
+ else if( mpList )
+ return mpList->Get( index, 0 );
+ else
+ return NULL;
+}
+
+// XServiceInfo
+sal_Bool SAL_CALL SvxUnoXPropertyTable::supportsService( const OUString& ServiceName )
+ throw( RuntimeException)
+{
+ const Sequence< OUString > aServices( getSupportedServiceNames() );
+ const OUString* pServices = aServices.getConstArray();
+ const sal_Int32 nCount = aServices.getLength();
+ sal_Int32 i;
+ for( i = 0; i < nCount; i++ )
+ {
+ if( *pServices++ == ServiceName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const Any& aElement )
+ throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if( NULL == mpList && NULL == mpTable )
+ throw IllegalArgumentException();
+
+ if( hasByName( aName ) )
+ throw ElementExistException();
+
+ String aInternalName;
+ SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName );
+
+ XPropertyEntry* pNewEntry = getEntry( aInternalName, aElement );
+ if( NULL == pNewEntry )
+ throw IllegalArgumentException();
+
+ if( mpList )
+ mpList->Insert( pNewEntry );
+ else
+ mpTable->Insert( mpTable->Count(), pNewEntry );
+}
+
+void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name )
+ throw( NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String aInternalName;
+ SvxUnogetInternalNameForItem( mnWhich, Name, aInternalName );
+
+ const long nCount = getCount();
+ long i;
+ XPropertyEntry* pEntry;
+ for( i = 0; i < nCount; i++ )
+ {
+ pEntry = get( i );
+ if( pEntry && pEntry->GetName() == aInternalName )
+ {
+ if( mpList )
+ delete mpList->Remove( i, 0 );
+ else
+ delete mpTable->Remove( i, 0 );
+ return;
+ }
+ }
+
+ throw NoSuchElementException();
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const Any& aElement )
+ throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String aInternalName;
+ SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName );
+
+ const long nCount = getCount();
+ long i;
+ XPropertyEntry* pEntry;
+ for( i = 0; i < nCount; i++ )
+ {
+ pEntry = get( i );
+ if( pEntry && pEntry->GetName() == aInternalName )
+ {
+ XPropertyEntry* pNewEntry = getEntry( aInternalName, aElement );
+ if( NULL == pNewEntry )
+ throw IllegalArgumentException();
+
+ if( mpList )
+ delete mpList->Replace( pNewEntry, i );
+ else
+ delete mpTable->Replace( i, pNewEntry );
+ return;
+ }
+ }
+
+ throw NoSuchElementException();
+}
+
+// XNameAccess
+Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName )
+ throw( NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String aInternalName;
+ SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName );
+
+ const long nCount = getCount();
+ long i;
+ XPropertyEntry* pEntry;
+ for( i = 0; i < nCount; i++ )
+ {
+ pEntry = get( i );
+
+ if( pEntry && pEntry->GetName() == aInternalName )
+ return getAny( pEntry );
+ }
+
+ throw NoSuchElementException();
+}
+
+Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames()
+ throw( RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ const long nCount = getCount();
+ Sequence< OUString > aNames( nCount );
+ OUString* pNames = aNames.getArray();
+ long i;
+ XPropertyEntry* pEntry;
+ for( i = 0; i < nCount; i++ )
+ {
+ pEntry = get( i );
+
+ if( pEntry )
+ {
+ SvxUnogetApiNameForItem( mnWhich, pEntry->GetName(), *pNames );
+ pNames++;
+ }
+ }
+
+ return aNames;
+}
+
+sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName )
+ throw( RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String aInternalName;
+ SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName );
+
+ const long nCount = mpList?mpList->Count():0;
+ long i;
+ XPropertyEntry* pEntry;
+ for( i = 0; i < nCount; i++ )
+ {
+ pEntry = get( i );
+ if( pEntry && pEntry->GetName() == aInternalName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// XElementAccess
+sal_Bool SAL_CALL SvxUnoXPropertyTable::hasElements( )
+ throw( RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ return getCount() != 0;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxUnoXColorTable : public SvxUnoXPropertyTable
+{
+public:
+ SvxUnoXColorTable( XPropertyTable* pTable ) throw() : SvxUnoXPropertyTable( XATTR_LINECOLOR, pTable ) {};
+
+ // SvxUnoXPropertyTable
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw();
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw();
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType() throw( RuntimeException );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+};
+
+Reference< XInterface > SvxUnoXColorTable_createInstance( XPropertyTable* pTable ) throw()
+{
+ return (OWeakObject*) new SvxUnoXColorTable( pTable );
+}
+
+// SvxUnoXPropertyTable
+Any SvxUnoXColorTable::getAny( const XPropertyEntry* pEntry ) const throw()
+{
+ Any aAny;
+ aAny <<= (sal_Int32)((XColorEntry*)pEntry)->GetColor().GetColor();
+ return aAny;
+}
+
+XPropertyEntry* SvxUnoXColorTable::getEntry( const OUString& rName, const Any& rAny ) const throw()
+{
+ sal_Int32 nColor;
+ if( !(rAny >>= nColor) )
+ return NULL;
+
+ const Color aColor( (ColorData)nColor );
+ const String aName( rName );
+ return new XColorEntry( aColor, aName );
+}
+
+// XElementAccess
+Type SAL_CALL SvxUnoXColorTable::getElementType()
+ throw( RuntimeException )
+{
+ return ::getCppuType((const sal_Int32*)0);
+}
+
+// XServiceInfo
+OUString SAL_CALL SvxUnoXColorTable::getImplementationName( ) throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoXColorTable" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoXColorTable::getSupportedServiceNames( ) throw( uno::RuntimeException)
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ColorTable" ) );
+ Sequence< OUString > aServices( &aServiceName, 1 );
+ return aServices;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxUnoXLineEndTable : public SvxUnoXPropertyTable
+{
+public:
+ SvxUnoXLineEndTable( XPropertyList* pTable ) throw() : SvxUnoXPropertyTable( XATTR_LINEEND, pTable ) {};
+
+ // SvxUnoXPropertyTable
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw();
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw();
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType() throw( RuntimeException );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+};
+
+Reference< XInterface > SvxUnoXLineEndTable_createInstance( XPropertyList* pTable ) throw()
+{
+ return (OWeakObject*)new SvxUnoXLineEndTable( pTable );
+}
+
+// SvxUnoXPropertyTable
+Any SvxUnoXLineEndTable::getAny( const XPropertyEntry* pEntry ) const throw()
+{
+
+ Any aAny;
+ drawing::PolyPolygonBezierCoords aBezier;
+ SvxConvertXPolygonToPolyPolygonBezier( ((XLineEndEntry*)pEntry)->GetLineEnd(), aBezier );
+ aAny <<= aBezier;
+ return aAny;
+}
+
+XPropertyEntry* SvxUnoXLineEndTable::getEntry( const OUString& rName, const Any& rAny ) const throw()
+{
+
+ if( !rAny.getValue() || rAny.getValueType() != ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) )
+ return NULL;
+
+ XPolygon aPolygon;
+ drawing::PolyPolygonBezierCoords* pCoords = (drawing::PolyPolygonBezierCoords*)rAny.getValue();
+ if( pCoords->Coordinates.getLength() > 0 )
+ SvxConvertPolyPolygonBezierToXPolygon( pCoords, aPolygon );
+
+ // #86265# make sure polygon is closed
+ if(aPolygon.GetPointCount() > 1 && aPolygon[0] != aPolygon[aPolygon.GetPointCount() - 1])
+ aPolygon[aPolygon.GetPointCount()] = aPolygon[0];
+
+ const String aName( rName );
+ return new XLineEndEntry( aPolygon, aName );
+}
+
+// XElementAccess
+Type SAL_CALL SvxUnoXLineEndTable::getElementType()
+ throw( RuntimeException )
+{
+ return ::getCppuType((const drawing::PolyPolygonBezierCoords*)0);
+}
+
+// XServiceInfo
+OUString SAL_CALL SvxUnoXLineEndTable::getImplementationName( ) throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoXLineEndTable" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoXLineEndTable::getSupportedServiceNames( ) throw( uno::RuntimeException)
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.LineEndTable" ) );
+ Sequence< OUString > aServices( &aServiceName, 1 );
+ return aServices;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxUnoXDashTable : public SvxUnoXPropertyTable
+{
+public:
+ SvxUnoXDashTable( XPropertyList* pTable ) throw() : SvxUnoXPropertyTable( XATTR_LINEDASH, pTable ) {};
+
+ // SvxUnoXPropertyTable
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw();
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw();
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType() throw( RuntimeException );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+};
+
+Reference< XInterface > SvxUnoXDashTable_createInstance( XPropertyList* pTable ) throw()
+{
+ return (OWeakObject*)new SvxUnoXDashTable( pTable );
+}
+
+// SvxUnoXPropertyTable
+Any SvxUnoXDashTable::getAny( const XPropertyEntry* pEntry ) const throw()
+{
+ const XDash& rXD = ((XDashEntry*)pEntry)->GetDash();
+
+ 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();
+
+ Any aAny;
+ aAny <<= aLineDash;
+ return aAny;
+}
+
+XPropertyEntry* SvxUnoXDashTable::getEntry( const OUString& rName, const Any& rAny ) const throw()
+{
+ drawing::LineDash aLineDash;
+ if(!(rAny >>= aLineDash))
+ return NULL;
+
+ 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);
+
+ const String aName( rName );
+ return new XDashEntry( aXDash, aName );
+}
+
+// XElementAccess
+Type SAL_CALL SvxUnoXDashTable::getElementType()
+ throw( RuntimeException )
+{
+ return ::getCppuType((const drawing::LineDash*)0);
+}
+
+// XServiceInfo
+OUString SAL_CALL SvxUnoXDashTable::getImplementationName( ) throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoXDashTable" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoXDashTable::getSupportedServiceNames( ) throw( uno::RuntimeException)
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DashTable" ) );
+ Sequence< OUString > aServices( &aServiceName, 1 );
+ return aServices;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxUnoXHatchTable : public SvxUnoXPropertyTable
+{
+public:
+ SvxUnoXHatchTable( XPropertyList* pTable ) throw() : SvxUnoXPropertyTable( XATTR_FILLHATCH, pTable ) {};
+
+ // SvxUnoXPropertyTable
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw();
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw();
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType() throw( RuntimeException );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+};
+
+Reference< XInterface > SvxUnoXHatchTable_createInstance( XPropertyList* pTable ) throw()
+{
+ return (OWeakObject*)new SvxUnoXHatchTable( pTable );
+}
+
+// SvxUnoXPropertyTable
+Any SvxUnoXHatchTable::getAny( const XPropertyEntry* pEntry ) const throw()
+{
+ const XHatch& aHatch = ((XHatchEntry*)pEntry)->GetHatch();
+
+ drawing::Hatch aUnoHatch;
+
+ aUnoHatch.Style = (drawing::HatchStyle)aHatch.GetHatchStyle();
+ aUnoHatch.Color = aHatch.GetColor().GetColor();
+ aUnoHatch.Distance = aHatch.GetDistance();
+ aUnoHatch.Angle = aHatch.GetAngle();
+
+ Any aAny;
+ aAny <<= aUnoHatch;
+ return aAny;
+}
+
+XPropertyEntry* SvxUnoXHatchTable::getEntry( const OUString& rName, const Any& rAny ) const throw()
+{
+ drawing::Hatch aUnoHatch;
+ if(!(rAny >>= aUnoHatch))
+ return NULL;
+
+ XHatch aXHatch;
+ aXHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
+ aXHatch.SetColor( aUnoHatch.Color );
+ aXHatch.SetDistance( aUnoHatch.Distance );
+ aXHatch.SetAngle( aUnoHatch.Angle );
+
+ const String aName( rName );
+ return new XHatchEntry( aXHatch, aName );
+}
+
+// XElementAccess
+Type SAL_CALL SvxUnoXHatchTable::getElementType()
+ throw( RuntimeException )
+{
+ return ::getCppuType((const drawing::Hatch*)0);
+}
+
+// XServiceInfo
+OUString SAL_CALL SvxUnoXHatchTable::getImplementationName( ) throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoXHatchTable" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoXHatchTable::getSupportedServiceNames( ) throw( uno::RuntimeException)
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.HatchTable" ) );
+ Sequence< OUString > aServices( &aServiceName, 1 );
+ return aServices;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxUnoXGradientTable : public SvxUnoXPropertyTable
+{
+public:
+ SvxUnoXGradientTable( XPropertyList* pTable ) throw() : SvxUnoXPropertyTable( XATTR_FILLGRADIENT, pTable ) {};
+
+ // SvxUnoXPropertyTable
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw();
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw();
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType() throw( RuntimeException );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+};
+
+Reference< XInterface > SvxUnoXGradientTable_createInstance( XPropertyList* pTable ) throw()
+{
+ return (OWeakObject*)new SvxUnoXGradientTable( pTable );
+}
+
+// SvxUnoXPropertyTable
+Any SvxUnoXGradientTable::getAny( const XPropertyEntry* pEntry ) const throw()
+{
+ const XGradient& aXGradient = ((XGradientEntry*)pEntry)->GetGradient();
+ awt::Gradient aGradient;
+
+ aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle();
+ aGradient.StartColor = (INT32)aXGradient.GetStartColor().GetColor();
+ aGradient.EndColor = (INT32)aXGradient.GetEndColor().GetColor();
+ aGradient.Angle = (short)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();
+
+ Any aAny;
+ aAny <<= aGradient;
+ return aAny;
+}
+
+XPropertyEntry* SvxUnoXGradientTable::getEntry( const OUString& rName, const Any& rAny ) const throw()
+{
+ awt::Gradient aGradient;
+ if(!(rAny >>= aGradient))
+ return NULL;
+
+ 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 );
+
+ const String aName( rName );
+ return new XGradientEntry( aXGradient, aName );
+}
+
+// XElementAccess
+Type SAL_CALL SvxUnoXGradientTable::getElementType()
+ throw( RuntimeException )
+{
+ return ::getCppuType((const awt::Gradient*)0);
+}
+
+// XServiceInfo
+OUString SAL_CALL SvxUnoXGradientTable::getImplementationName( ) throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoXGradientTable" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoXGradientTable::getSupportedServiceNames( ) throw( uno::RuntimeException)
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GradientTable" ) );
+ Sequence< OUString > aServices( &aServiceName, 1 );
+ return aServices;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxUnoXBitmapTable : public SvxUnoXPropertyTable
+{
+public:
+ SvxUnoXBitmapTable( XPropertyList* pTable ) throw() : SvxUnoXPropertyTable( XATTR_FILLBITMAP, pTable ) {};
+
+ // SvxUnoXPropertyTable
+ virtual Any getAny( const XPropertyEntry* pEntry ) const throw();
+ virtual XPropertyEntry* getEntry( const OUString& rName, const Any& rAny ) const throw();
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType() throw( RuntimeException );
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+};
+
+Reference< XInterface > SvxUnoXBitmapTable_createInstance( XPropertyList* pTable ) throw()
+{
+ return (OWeakObject*)new SvxUnoXBitmapTable( pTable );
+}
+
+// SvxUnoXPropertyTable
+Any SvxUnoXBitmapTable::getAny( const XPropertyEntry* pEntry ) const throw()
+{
+ OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+ aURL += OUString::createFromAscii( ((XBitmapEntry*)pEntry)->GetXBitmap().GetGraphicObject().GetUniqueID().GetBuffer() );
+
+ Any aAny;
+ aAny <<= aURL;
+ return aAny;
+}
+
+XPropertyEntry* SvxUnoXBitmapTable::getEntry( const OUString& rName, const Any& rAny ) const throw()
+{
+ OUString aURL;
+ if(!(rAny >>= aURL))
+ return NULL;
+
+ BfGraphicObject aGrafObj( CreateGraphicObjectFromURL( aURL ) );
+ XOBitmap aBMP( aGrafObj );
+
+ const String aName( rName );
+ return new XBitmapEntry( aBMP, aName );
+}
+
+// XElementAccess
+Type SAL_CALL SvxUnoXBitmapTable::getElementType()
+ throw( RuntimeException )
+{
+ return ::getCppuType((const OUString*)0);
+}
+
+// XServiceInfo
+OUString SAL_CALL SvxUnoXBitmapTable::getImplementationName( ) throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoXBitmapTable" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoXBitmapTable::getSupportedServiceNames( ) throw( uno::RuntimeException)
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.BitmapTable" ) );
+ Sequence< OUString > aServices( &aServiceName, 1 );
+ return aServices;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_gluepts.cxx b/binfilter/bf_svx/source/unodraw/svx_gluepts.cxx
new file mode 100644
index 000000000000..fa488e1d2526
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_gluepts.cxx
@@ -0,0 +1,554 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/container/XIdentifierContainer.hpp>
+
+#include <com/sun/star/container/XIndexContainer.hpp>
+#include <com/sun/star/drawing/GluePoint2.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include "svdmodel.hxx"
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+const USHORT NON_USER_DEFINED_GLUE_POINTS = 4;
+
+class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >,
+ public SfxListener
+{
+private:
+ SdrObject* mpObject;
+
+public:
+ SvxUnoGluePointAccess( SdrObject* pObject ) throw();
+ virtual ~SvxUnoGluePointAccess() throw();
+
+ // SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
+
+ // XIdentifierContainer
+ virtual sal_Int32 SAL_CALL insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XIdentifierReplace
+ virtual void SAL_CALL replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XIdentifierReplace
+ virtual uno::Any SAL_CALL getByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< sal_Int32 > SAL_CALL getIdentifiers( ) throw (uno::RuntimeException);
+
+ /* deprecated */
+ // XIndexContainer
+ virtual void SAL_CALL insertByIndex( sal_Int32 Index, const uno::Any& Element ) throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
+
+ /* deprecated */
+ // XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const uno::Any& Element ) throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
+
+ /* deprecated */
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(uno::RuntimeException);
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+static void convert( const SdrGluePoint& rSdrGlue, drawing::GluePoint2& rUnoGlue ) throw()
+{
+ rUnoGlue.Position.X = rSdrGlue.GetPos().X();
+ rUnoGlue.Position.Y = rSdrGlue.GetPos().Y();
+ rUnoGlue.IsRelative = rSdrGlue.IsPercent();
+
+ switch( rSdrGlue.GetAlign() )
+ {
+ case SDRVERTALIGN_TOP|SDRHORZALIGN_LEFT:
+ rUnoGlue.PositionAlignment = drawing::Alignment_TOP_LEFT;
+ break;
+ case SDRHORZALIGN_CENTER|SDRVERTALIGN_TOP:
+ rUnoGlue.PositionAlignment = drawing::Alignment_TOP;
+ break;
+ case SDRVERTALIGN_TOP|SDRHORZALIGN_RIGHT:
+ rUnoGlue.PositionAlignment = drawing::Alignment_TOP_RIGHT;
+ break;
+ case SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER:
+ rUnoGlue.PositionAlignment = drawing::Alignment_CENTER;
+ break;
+ case SDRHORZALIGN_RIGHT|SDRVERTALIGN_CENTER:
+ rUnoGlue.PositionAlignment = drawing::Alignment_RIGHT;
+ break;
+ case SDRHORZALIGN_LEFT|SDRVERTALIGN_BOTTOM:
+ rUnoGlue.PositionAlignment = drawing::Alignment_BOTTOM_LEFT;
+ break;
+ case SDRHORZALIGN_CENTER|SDRVERTALIGN_BOTTOM:
+ rUnoGlue.PositionAlignment = drawing::Alignment_BOTTOM;
+ break;
+ case SDRHORZALIGN_RIGHT|SDRVERTALIGN_BOTTOM:
+ rUnoGlue.PositionAlignment = drawing::Alignment_BOTTOM_RIGHT;
+ break;
+// case SDRHORZALIGN_LEFT:
+ default:
+ rUnoGlue.PositionAlignment = drawing::Alignment_LEFT;
+ break;
+ }
+
+ switch( rSdrGlue.GetEscDir() )
+ {
+ case SDRESC_LEFT:
+ rUnoGlue.Escape = drawing::EscapeDirection_LEFT;
+ break;
+ case SDRESC_RIGHT:
+ rUnoGlue.Escape = drawing::EscapeDirection_RIGHT;
+ break;
+ case SDRESC_TOP:
+ rUnoGlue.Escape = drawing::EscapeDirection_UP;
+ break;
+ case SDRESC_BOTTOM:
+ rUnoGlue.Escape = drawing::EscapeDirection_DOWN;
+ break;
+ case SDRESC_HORZ:
+ rUnoGlue.Escape = drawing::EscapeDirection_HORIZONTAL;
+ break;
+ case SDRESC_VERT:
+ rUnoGlue.Escape = drawing::EscapeDirection_VERTICAL;
+ break;
+// case SDRESC_SMART:
+ default:
+ rUnoGlue.Escape = drawing::EscapeDirection_SMART;
+ break;
+ }
+}
+
+static void convert( const drawing::GluePoint2& rUnoGlue, SdrGluePoint& rSdrGlue ) throw()
+{
+ rSdrGlue.SetPos( Point( rUnoGlue.Position.X, rUnoGlue.Position.Y ) );
+ rSdrGlue.SetPercent( rUnoGlue.IsRelative );
+
+ switch( rUnoGlue.PositionAlignment )
+ {
+ case drawing::Alignment_TOP_LEFT:
+ rSdrGlue.SetAlign( SDRVERTALIGN_TOP|SDRHORZALIGN_LEFT );
+ break;
+ case drawing::Alignment_TOP:
+ rSdrGlue.SetAlign( SDRHORZALIGN_CENTER|SDRVERTALIGN_TOP );
+ break;
+ case drawing::Alignment_TOP_RIGHT:
+ rSdrGlue.SetAlign( SDRVERTALIGN_TOP|SDRHORZALIGN_RIGHT );
+ break;
+ case drawing::Alignment_CENTER:
+ rSdrGlue.SetAlign( SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER );
+ break;
+ case drawing::Alignment_RIGHT:
+ rSdrGlue.SetAlign( SDRHORZALIGN_RIGHT|SDRVERTALIGN_CENTER );
+ break;
+ case drawing::Alignment_BOTTOM_LEFT:
+ rSdrGlue.SetAlign( SDRHORZALIGN_LEFT|SDRVERTALIGN_BOTTOM );
+ break;
+ case drawing::Alignment_BOTTOM:
+ rSdrGlue.SetAlign( SDRHORZALIGN_CENTER|SDRVERTALIGN_BOTTOM );
+ break;
+ case drawing::Alignment_BOTTOM_RIGHT:
+ rSdrGlue.SetAlign( SDRHORZALIGN_RIGHT|SDRVERTALIGN_BOTTOM );
+ break;
+// case SDRHORZALIGN_LEFT:
+ default:
+ rSdrGlue.SetAlign( SDRHORZALIGN_LEFT );
+ break;
+ }
+ switch( rUnoGlue.Escape )
+ {
+ case drawing::EscapeDirection_LEFT:
+ rSdrGlue.SetEscDir(SDRESC_LEFT);
+ break;
+ case drawing::EscapeDirection_RIGHT:
+ rSdrGlue.SetEscDir(SDRESC_RIGHT);
+ break;
+ case drawing::EscapeDirection_UP:
+ rSdrGlue.SetEscDir(SDRESC_TOP);
+ break;
+ case drawing::EscapeDirection_DOWN:
+ rSdrGlue.SetEscDir(SDRESC_BOTTOM);
+ break;
+ case drawing::EscapeDirection_HORIZONTAL:
+ rSdrGlue.SetEscDir(SDRESC_HORZ);
+ break;
+ case drawing::EscapeDirection_VERTICAL:
+ rSdrGlue.SetEscDir(SDRESC_VERT);
+ break;
+// case drawing::EscapeDirection_SMART:
+ default:
+ rSdrGlue.SetEscDir(SDRESC_SMART);
+ break;
+ }
+}
+
+SvxUnoGluePointAccess::SvxUnoGluePointAccess( SdrObject* pObject ) throw()
+: mpObject( pObject )
+{
+ StartListening( *mpObject->GetModel() );
+
+}
+
+SvxUnoGluePointAccess::~SvxUnoGluePointAccess() throw()
+{
+ if( mpObject && mpObject->GetModel())
+ EndListening( *mpObject->GetModel() );
+}
+
+void SvxUnoGluePointAccess::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw()
+{
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+
+ if( pSdrHint && mpObject)
+ {
+ if( pSdrHint->GetKind() == HINT_OBJREMOVED )
+ {
+ if( mpObject == pSdrHint->GetObject() )
+ mpObject = NULL;
+ }
+ else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
+ {
+ mpObject = NULL;
+ }
+ else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
+ {
+ SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
+ while( pObjList )
+ {
+ if( pSdrHint->GetObjList() == pObjList )
+ {
+ mpObject = NULL;
+ break;
+ }
+
+ pObjList = pObjList->GetUpList();
+ }
+ }
+ }
+}
+
+// XIdentifierContainer
+sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpObject )
+ {
+ SdrGluePointList* pList = mpObject->ForceGluePointList();
+ if( pList )
+ {
+ // second, insert the new glue point
+ drawing::GluePoint2 aUnoGlue;
+
+ if( aElement >>= aUnoGlue )
+ {
+ SdrGluePoint aSdrGlue;
+ convert( aUnoGlue, aSdrGlue );
+ USHORT nId = pList->Insert( aSdrGlue );
+ mpObject->SendRepaintBroadcast();
+
+ return (sal_Int32)((*pList)[nId].GetId() + NON_USER_DEFINED_GLUE_POINTS);
+ }
+
+ throw lang::IllegalArgumentException();
+ }
+ }
+
+ return -1;
+}
+
+void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpObject && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS ))
+ {
+ const USHORT nId = (USHORT)(Identifier - NON_USER_DEFINED_GLUE_POINTS);
+
+ SdrGluePointList* pList = mpObject->GetGluePointList();
+ const USHORT nCount = pList ? pList->GetCount() : 0;
+ USHORT i;
+
+ for( i = 0; i < nCount; i++ )
+ {
+ if( (*pList)[i].GetId() == nId )
+ {
+ pList->Delete( i );
+ mpObject->SendRepaintBroadcast();
+ return;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+}
+
+// XIdentifierReplace
+void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpObject && mpObject->IsNode() )
+ {
+ struct drawing::GluePoint2 aGluePoint;
+ if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint))
+ throw lang::IllegalArgumentException();
+
+ const USHORT nId = (USHORT)Identifier - NON_USER_DEFINED_GLUE_POINTS;
+
+ SdrGluePointList* pList = mpObject->GetGluePointList();
+ const USHORT nCount = pList ? pList->GetCount() : 0;
+ USHORT i;
+ for( i = 0; i < nCount; i++ )
+ {
+ if( (*pList)[i].GetId() == nId )
+ {
+ // change the glue point
+ SdrGluePoint& rTempPoint = (*pList)[i];
+ convert( aGluePoint, rTempPoint );
+ mpObject->SendRepaintBroadcast();
+ return;
+ }
+ }
+
+ throw container::NoSuchElementException();
+ }
+}
+
+// XIdentifierAccess
+uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpObject && mpObject->IsNode() )
+ {
+ struct drawing::GluePoint2 aGluePoint;
+
+ if( Identifier < NON_USER_DEFINED_GLUE_POINTS ) // default glue point?
+ {
+ SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (USHORT)Identifier );
+ aGluePoint.IsUserDefined = sal_False;
+ convert( aTempPoint, aGluePoint );
+ return uno::makeAny( aGluePoint );
+ }
+ else
+ {
+ const USHORT nId = (USHORT)Identifier - NON_USER_DEFINED_GLUE_POINTS;
+
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ const USHORT nCount = pList ? pList->GetCount() : 0;
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ const SdrGluePoint& rTempPoint = (*pList)[i];
+ if( rTempPoint.GetId() == nId )
+ {
+ aGluePoint.IsUserDefined = sal_True;
+ convert( rTempPoint, aGluePoint );
+ return uno::makeAny( aGluePoint );
+ }
+ }
+ }
+ }
+
+ throw lang::IndexOutOfBoundsException();
+}
+
+uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() throw (uno::RuntimeException)
+{
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ const USHORT nCount = pList ? pList->GetCount() : 0;
+
+ USHORT i;
+
+ uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS );
+ sal_Int32 *pIdentifier = aIdSequence.getArray();
+
+ for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ )
+ *pIdentifier++ = (sal_Int32)i;
+
+ for( i = 0; i < nCount; i++ )
+ *pIdentifier++ = (sal_Int32) (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS;
+
+ return aIdSequence;
+}
+
+/* deprecated */
+
+// XIndexContainer
+void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32 Index, const uno::Any& Element )
+ throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
+ lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpObject )
+ {
+ SdrGluePointList* pList = mpObject->ForceGluePointList();
+ if( pList )
+ {
+ SdrGluePoint aSdrGlue;
+ drawing::GluePoint2 aUnoGlue;
+
+ if( Element >>= aUnoGlue )
+ {
+ convert( aUnoGlue, aSdrGlue );
+ pList->Insert( aSdrGlue );
+ mpObject->SendRepaintBroadcast();
+ return;
+ }
+
+ throw lang::IllegalArgumentException();
+ }
+ }
+
+ throw lang::IndexOutOfBoundsException();
+}
+
+void SAL_CALL SvxUnoGluePointAccess::removeByIndex( sal_Int32 Index )
+ throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpObject )
+ {
+ SdrGluePointList* pList = mpObject->ForceGluePointList();
+ if( pList )
+ {
+ Index -= 4;
+ if( Index >= 0 && Index < pList->GetCount() )
+ {
+ pList->Delete( (USHORT)Index );
+ mpObject->SendRepaintBroadcast();
+ return;
+ }
+ }
+ }
+
+ throw lang::IndexOutOfBoundsException();
+}
+
+// XIndexReplace
+void SAL_CALL SvxUnoGluePointAccess::replaceByIndex( sal_Int32 Index, const uno::Any& Element )
+ throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException,
+ uno::RuntimeException)
+{
+ drawing::GluePoint2 aUnoGlue;
+ if(!(Element >>= aUnoGlue))
+ throw lang::IllegalArgumentException();
+
+ Index -= 4;
+ if( mpObject && Index >= 0 )
+ {
+ SdrGluePointList* pList = mpObject->GetGluePointList();
+ if( pList && Index < pList->GetCount() )
+ {
+ SdrGluePoint& rGlue = (*pList)[(USHORT)Index];
+ convert( aUnoGlue, rGlue );
+ mpObject->SendRepaintBroadcast();
+ }
+ }
+
+ throw lang::IndexOutOfBoundsException();
+}
+
+// XIndexAccess
+sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
+ throw(uno::RuntimeException)
+{
+ sal_Int32 nCount = 0;
+ if( mpObject )
+ {
+ // each node has a default of 4 glue points
+ // and any number of user defined glue points
+ if( mpObject->IsNode() )
+ {
+ nCount += 4;
+
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ if( pList )
+ nCount += pList->GetCount();
+ }
+ }
+
+ return nCount;
+}
+
+uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
+ throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( Index >= 0 && mpObject && mpObject->IsNode() )
+ {
+ struct drawing::GluePoint2 aGluePoint;
+
+ if( Index < 4 ) // default glue point?
+ {
+ SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (USHORT)Index );
+ aGluePoint.IsUserDefined = sal_False;
+ convert( aTempPoint, aGluePoint );
+ uno::Any aAny;
+ aAny <<= aGluePoint;
+ return aAny;
+ }
+ else
+ {
+ Index -= 4;
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ if( pList && Index < pList->GetCount() )
+ {
+ const SdrGluePoint& rTempPoint = (*pList)[(USHORT)Index];
+ aGluePoint.IsUserDefined = sal_True;
+ convert( rTempPoint, aGluePoint );
+ uno::Any aAny;
+ aAny <<= aGluePoint;
+ return aAny;
+ }
+ }
+ }
+
+ throw lang::IndexOutOfBoundsException();
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoGluePointAccess::getElementType()
+ throw( uno::RuntimeException)
+{
+ return ::getCppuType((const struct drawing::GluePoint2*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoGluePointAccess::hasElements()
+ throw( uno::RuntimeException)
+{
+ return mpObject && mpObject->IsNode();
+}
+
+/**
+ * Create a SvxUnoGluePointAccess
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoGluePointAccess_createInstance( SdrObject* pObject )
+{
+ return *new SvxUnoGluePointAccess(pObject);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
new file mode 100644
index 000000000000..adbe6fd0a077
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
@@ -0,0 +1,143 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <vcl/cvtgrf.hxx>
+
+#ifndef SVX_LIGHT
+#include <bf_sfx2/docfile.hxx>
+#endif
+
+#include "UnoNameItemTable.hxx"
+
+#include "xdef.hxx"
+
+#include "xbtmpit.hxx"
+#include "unomid.hxx"
+#include "unoprnms.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+class SvxUnoBitmapTable : public SvxUnoNameItemTable
+{
+public:
+ SvxUnoBitmapTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoBitmapTable() throw();
+
+ virtual NameOrIndex* createItem() const throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+};
+
+SvxUnoBitmapTable::SvxUnoBitmapTable( SdrModel* pModel ) throw()
+: SvxUnoNameItemTable( pModel, XATTR_FILLBITMAP, MID_GRAFURL )
+{
+}
+
+SvxUnoBitmapTable::~SvxUnoBitmapTable() throw()
+{
+}
+
+OUString SAL_CALL SvxUnoBitmapTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoBitmapTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoBitmapTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.BitmapTable" ));
+ return aSNS;
+}
+
+NameOrIndex* SvxUnoBitmapTable::createItem() const throw()
+{
+ return new XFillBitmapItem();
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoBitmapTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType( (const ::rtl::OUString*)0 );
+}
+
+/**
+ * Create a bitmaptable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoBitmapTable(pModel);
+}
+} //STRIP009 namespace bifilter
+
+namespace binfilter {//STRIP009
+/** returns a GraphicObject for this URL */
+BfGraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw()
+{
+ const String aURL( rURL ), aPrefix( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) );
+
+ if( aURL.Search( aPrefix ) == 0 )
+ {
+ // graphic manager url
+ ByteString aUniqueID( String(rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 )), RTL_TEXTENCODING_UTF8 );
+ return BfGraphicObject( aUniqueID );
+ }
+ else
+ {
+ Graphic aGraphic;
+
+#ifndef SVX_LIGHT
+ SfxMedium aMedium( aURL, STREAM_READ, TRUE );
+ SvStream* pStream = aMedium.GetInStream();
+
+ if( pStream )
+ GraphicConverter::Import( *pStream, aGraphic );
+#else
+ String aSystemPath( rURL );
+ ::utl::LocalFileHelper::ConvertURLToSystemPath( aSystemPath, aSystemPath );
+ SvFileStream aFile( aSystemPath, STREAM_READ );
+ GraphicConverter::Import( aFile, aGraphic );
+#endif
+
+
+ return BfGraphicObject( aGraphic );
+ }
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoctabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unoctabl.cxx
new file mode 100644
index 000000000000..4aca092543d8
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoctabl.cxx
@@ -0,0 +1,319 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <bf_svtools/pathoptions.hxx>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include "xtable.hxx"
+namespace binfilter {
+
+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()
+{
+ pTable = new XColorTable( SvtPathOptions().GetPalettePath() );
+}
+
+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 = 0;
+ 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)
+{DBG_BF_ASSERT(0, "STRIP");//STRIP001
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ INT32 nColor = 0;
+ 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)
+{DBG_BF_ASSERT(0, "STRIP"); uno::Any aAny; return aAny;//STRIP001
+}
+
+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++ )
+ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+ }
+
+ 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
+//
+}
+
+#include <osl/diagnose.h>
+
+#include <cppuhelper/factory.hxx>
+#include <uno/lbnames.h>
+namespace binfilter {//STRIP009
+//STRIP002 added begin
+//------the following is added for sfx2 integrate with svx
+extern "C" {
+void* SAL_CALL sfx2_component_getFactory( const sal_Char* pImplementationName ,
+ void* pServiceManager ,
+ void* pRegistryKey );
+
+
+//----------------------the following part is copied from sfx2 project source\appl\appuno.cxx
+
+sal_Bool SAL_CALL sfx2_component_writeInfo( void* pServiceManager ,
+ void* pRegistryKey );
+}
+//STRIP002 added end
+
+extern "C"
+{
+
+void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+void SAL_CALL writeInfo( registry::XRegistryKey * pRegistryKey, const OUString& rImplementationName, const uno::Sequence< OUString >& rServices )
+{
+ uno::Reference< registry::XRegistryKey > xNewKey(
+ pRegistryKey->createKey(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) );
+
+ for( sal_Int32 i = 0; i < rServices.getLength(); i++ )
+ xNewKey->createKey( rServices.getConstArray()[i]);
+}
+
+sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
+{
+ if( pRegistryKey )
+ {
+ try
+ {
+ registry::XRegistryKey *pKey = reinterpret_cast< registry::XRegistryKey * >( pRegistryKey );
+
+ writeInfo( pKey, SvxUnoColorTable::getImplementationName_Static(), SvxUnoColorTable::getSupportedServiceNames_Static() );
+#ifndef SVX_LIGHT
+ //writeInfo( pKey, svx::GraphicExporter_getImplementationName(), svx::GraphicExporter_getSupportedServiceNames() );
+#endif
+ sfx2_component_writeInfo(pServiceManager,pRegistryKey);//STRIP002
+ }
+ catch (registry::InvalidRegistryException &)
+ {
+ OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ }
+ }
+
+ return sal_True;
+}
+
+void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+{
+ void * pRet = 0;
+ if( pServiceManager )
+ {
+ uno::Reference< lang::XSingleServiceFactory > xFactory;
+
+ if( rtl_str_compare( pImplName, "com.sun.star.drawing.SvxUnoColorTable" ) == 0 )
+ {
+ xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ SvxUnoColorTable::getImplementationName_Static(),
+ SvxUnoColorTable_createInstance,
+ SvxUnoColorTable::getSupportedServiceNames_Static() );
+ }
+#ifndef SVX_LIGHT
+ /*else if( svx::GraphicExporter_getImplementationName().equalsAscii( pImplName ) )
+ {
+ xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ svx::GraphicExporter_getImplementationName(),
+ svx::GraphicExporter_createInstance,
+ svx::GraphicExporter_getSupportedServiceNames() );
+ }*/
+#endif
+ if( xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ }
+ if (0==pRet)// added for sfx2 moudle integration with svx //STRIP002 begin
+ {
+ pRet=sfx2_component_getFactory(pImplName,pServiceManager,pRegistryKey);
+ }//STRIP002 end
+
+ return pRet;
+}
+
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unodtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unodtabl.cxx
new file mode 100644
index 000000000000..8c1f8b0aa528
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unodtabl.cxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/drawing/LineDash.hpp>
+
+
+
+#include <vector>
+
+#include "UnoNameItemTable.hxx"
+
+#include "xlndsit.hxx"
+
+
+#include "xdef.hxx"
+
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+class SvxUnoDashTable : public SvxUnoNameItemTable
+{
+public:
+ SvxUnoDashTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoDashTable() throw();
+
+ virtual NameOrIndex* createItem() const throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+};
+
+SvxUnoDashTable::SvxUnoDashTable( SdrModel* pModel ) throw()
+: SvxUnoNameItemTable( pModel, XATTR_LINEDASH )
+{
+}
+
+SvxUnoDashTable::~SvxUnoDashTable() throw()
+{
+}
+
+OUString SAL_CALL SvxUnoDashTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoDashTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDashTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DashTable" ));
+ return aSNS;
+}
+
+NameOrIndex* SvxUnoDashTable::createItem() const throw()
+{
+ XLineDashItem* pNewItem = new XLineDashItem();
+ pNewItem->SetWhich( XATTR_LINEDASH ); // set which id for pooling
+ return pNewItem;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoDashTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct drawing::LineDash*)0);
+}
+
+/**
+ * Create a gradienttable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDashTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoDashTable(pModel);
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unofdesc.cxx b/binfilter/bf_svx/source/unodraw/svx_unofdesc.cxx
new file mode 100644
index 000000000000..9e1e4c094835
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unofdesc.cxx
@@ -0,0 +1,266 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "eeitem.hxx"
+
+
+#include <toolkit/helper/vclunohelper.hxx>
+
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#include <fontitem.hxx>
+
+#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
+#include <fhgtitem.hxx>
+
+#define ITEMID_POSTURE EE_CHAR_ITALIC
+#include <postitem.hxx>
+
+#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE
+#include <udlnitem.hxx>
+
+#define ITEMID_WEIGHT EE_CHAR_WEIGHT
+#include <wghtitem.hxx>
+
+#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT
+#include <crsditem.hxx>
+
+#define ITEMID_WORDLINEMODE EE_CHAR_WLM
+#include <wrlmitem.hxx>
+
+
+#include <bf_svtools/itempool.hxx>
+
+#include "unofdesc.hxx"
+namespace binfilter {
+
+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.0;
+ 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; \
+ }
+
+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;
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unogtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unogtabl.cxx
new file mode 100644
index 000000000000..afe24656a0c0
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unogtabl.cxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/awt/Gradient.hpp>
+
+
+
+#include "UnoNameItemTable.hxx"
+
+#include "xdef.hxx"
+#include "xflgrit.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+class SvxUnoGradientTable : public SvxUnoNameItemTable
+{
+public:
+ SvxUnoGradientTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoGradientTable() throw();
+
+ virtual NameOrIndex* createItem() const throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+};
+
+SvxUnoGradientTable::SvxUnoGradientTable( SdrModel* pModel ) throw()
+: SvxUnoNameItemTable( pModel, XATTR_FILLGRADIENT )
+{
+}
+
+SvxUnoGradientTable::~SvxUnoGradientTable() throw()
+{
+}
+
+OUString SAL_CALL SvxUnoGradientTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoGradientTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoGradientTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GradientTable" ));
+ return aSNS;
+}
+
+
+// XNameContainer
+NameOrIndex* SvxUnoGradientTable::createItem() const throw()
+{
+ return new XFillGradientItem();
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoGradientTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct awt::Gradient*)0);
+}
+
+/**
+ * Create a gradienttable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoGradientTable(pModel);
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unohtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unohtabl.cxx
new file mode 100644
index 000000000000..992b4492bfb1
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unohtabl.cxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/drawing/Hatch.hpp>
+
+
+
+#include "UnoNameItemTable.hxx"
+
+#include "xdef.hxx"
+#include "xflhtit.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+class SvxUnoHatchTable : public SvxUnoNameItemTable
+{
+public:
+ SvxUnoHatchTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoHatchTable() throw();
+
+ virtual NameOrIndex* createItem() const throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+};
+
+SvxUnoHatchTable::SvxUnoHatchTable( SdrModel* pModel ) throw()
+: SvxUnoNameItemTable( pModel, XATTR_FILLHATCH )
+{
+}
+
+SvxUnoHatchTable::~SvxUnoHatchTable() throw()
+{
+}
+
+OUString SAL_CALL SvxUnoHatchTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoHatchTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoHatchTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.HatchTable" ));
+ return aSNS;
+}
+
+NameOrIndex* SvxUnoHatchTable::createItem() const throw()
+{
+ return new XFillHatchItem();
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoHatchTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct drawing::Hatch*)0);
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoHatchTable(pModel);
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoipset.cxx b/binfilter/bf_svx/source/unodraw/svx_unoipset.cxx
new file mode 100644
index 000000000000..a2afce19fd36
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoipset.cxx
@@ -0,0 +1,683 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+
+#include <hash_map>
+#include <vector>
+
+
+#include "svxids.hrc"
+#include "unoshprp.hxx"
+#include "unoapi.hxx"
+#include "svdobj.hxx"
+
+#include <algorithm>
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+
+using rtl::OUString;
+
+//----------------------------------------------------------------------
+
+struct SfxItemPropertyMapHash
+{
+ size_t operator()(const SfxItemPropertyMap* pMap) const { return (size_t)pMap; }
+};
+
+class SvxInfoSetCache;
+
+class SvxCachedItemPropertySetInfo : public SfxItemPropertySetInfo
+{
+private:
+ SvxInfoSetCache* mpCache;
+
+public:
+ SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache );
+ virtual void SAL_CALL release() throw ();
+};
+
+/** this class caches the created XPropertySetInfo objects for each different
+ SfxItemPropertyMap pointer. This class can't be used with dynamicly created
+ SfxItemPropertyMaps!
+*/
+
+class SvxInfoSetCache
+{
+private:
+ typedef std::hash_map< const SfxItemPropertyMap*, uno::Reference< beans::XPropertySetInfo >, SfxItemPropertyMapHash > InfoMap;
+ typedef std::hash_map< const SfxItemPropertyMap*, const SfxItemPropertyMap*, SfxItemPropertyMapHash > PropertyMap;
+
+ InfoMap maInfoMap;
+ PropertyMap maPropertyMap;
+
+ static ::osl::Mutex maMutex;
+ static SvxInfoSetCache* mpGlobalCache;
+
+ SvxInfoSetCache() {};
+ ~SvxInfoSetCache() {};
+public:
+ static uno::Reference< beans::XPropertySetInfo > getCachedPropertySetInfo( const SfxItemPropertyMap* pMap );
+ static const SfxItemPropertyMap* getSortedPropertyMap( const SfxItemPropertyMap* pMap );
+
+ void dispose( SvxCachedItemPropertySetInfo* pInfo );
+};
+
+SvxCachedItemPropertySetInfo::SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache )
+: SfxItemPropertySetInfo( pMap ), mpCache( pCache )
+{
+}
+
+void SAL_CALL SvxCachedItemPropertySetInfo::release() throw ()
+{
+ SvxInfoSetCache* pCache = mpCache;
+ if( pCache && m_refCount == 2 )
+ {
+ mpCache = NULL;
+ pCache->dispose( this );
+ }
+ SfxItemPropertySetInfo::release();
+}
+
+::osl::Mutex SvxInfoSetCache::maMutex;
+SvxInfoSetCache* SvxInfoSetCache::mpGlobalCache = NULL;
+
+uno::Reference< beans::XPropertySetInfo > SvxInfoSetCache::getCachedPropertySetInfo( const SfxItemPropertyMap* pMap )
+{
+ ::osl::MutexGuard aGuard(maMutex);
+
+ if( NULL == mpGlobalCache )
+ mpGlobalCache = new SvxInfoSetCache();
+
+ InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pMap));
+ if (aIt != mpGlobalCache->maInfoMap.end())
+ return aIt->second.get();
+
+ uno::Reference< beans::XPropertySetInfo > xInfo( new SvxCachedItemPropertySetInfo( pMap, mpGlobalCache ) );
+ mpGlobalCache->maInfoMap.insert(InfoMap::value_type(pMap,xInfo));
+
+ /* if this assertion is triggered this class is possible used with dynamicly created
+ SfxItemPropertyMap pointers. This will cause a cache overflow as the current
+ implementation is designed for a limited number of different SfxItemPropertyMap
+ pointers */
+ DBG_ASSERT( mpGlobalCache->maInfoMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" );
+
+ return xInfo;
+}
+
+/** removes a cached property set info from the cache. This is called by the property set
+ info when its refcount goes to 1, meaning the cache holds the last reference to the
+ info
+*/
+void SvxInfoSetCache::dispose( SvxCachedItemPropertySetInfo* pInfo )
+{
+ if( pInfo )
+ {
+ ::osl::MutexGuard aGuard(maMutex);
+
+ InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pInfo->getMap()));
+ if (aIt != mpGlobalCache->maInfoMap.end())
+ {
+ mpGlobalCache->maInfoMap.erase( aIt );
+ }
+ }
+}
+
+inline bool greater_size_pmap( const SfxItemPropertyMap* pFirst,
+ const SfxItemPropertyMap* pSecond )
+{
+ return strcmp( pFirst->pName, pSecond->pName ) < 0;
+}
+
+
+const SfxItemPropertyMap* SvxInfoSetCache::getSortedPropertyMap( const SfxItemPropertyMap* pMap )
+{
+ ::osl::MutexGuard aGuard(maMutex);
+
+ if( NULL == mpGlobalCache )
+ mpGlobalCache = new SvxInfoSetCache();
+
+ const SfxItemPropertyMap* pSortedMap = NULL;
+ PropertyMap::iterator aIt( mpGlobalCache->maPropertyMap.find(pMap) );
+ if (aIt != mpGlobalCache->maPropertyMap.end())
+ pSortedMap = aIt->second;
+
+ if( NULL == pSortedMap )
+ {
+ // count the entries in the map
+ std::vector< const SfxItemPropertyMap * >::size_type nCount = 0;
+ const SfxItemPropertyMap* pTempMap = pMap;
+ while( pTempMap->pName )
+ {
+ pTempMap++;
+ nCount++;
+ }
+
+ // fill a stl vector with the entry pointers
+ std::vector< const SfxItemPropertyMap * > aMap( nCount );
+ std::vector< const SfxItemPropertyMap * >::iterator aIter( aMap.begin() );
+
+ pTempMap = pMap;
+ while( pTempMap->pName )
+ *aIter++ = pTempMap++;
+
+ // sort the vector
+ std::sort( aMap.begin(), aMap.end(), greater_size_pmap );
+
+ // create a new map
+ pSortedMap = new SfxItemPropertyMap[nCount+1];
+ pTempMap = pSortedMap;
+
+ // copy the sorted entries to a new map
+ aIter = aMap.begin();
+ while( aIter != aMap.end() )
+ {
+ memcpy( (void*)pTempMap, *aIter++, sizeof( SfxItemPropertyMap ) );
+ pTempMap++;
+ }
+
+ ((SfxItemPropertyMap*)pTempMap)->pName = NULL;
+
+ mpGlobalCache->maPropertyMap[pMap] = pSortedMap;
+
+ /* if this assertion is triggered this class is possible used with dynamicly created
+ SfxItemPropertyMap pointers. This will cause a cache overflow as the current
+ implementation is designed for a limited number of different SfxItemPropertyMap
+ pointers */
+ DBG_ASSERT( mpGlobalCache->maPropertyMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" );
+ }
+
+ return pSortedMap;
+}
+
+//----------------------------------------------------------------------
+
+struct SvxIDPropertyCombine
+{
+ sal_uInt16 nWID;
+ uno::Any aAny;
+};
+
+DECLARE_LIST( SvxIDPropertyCombineList, SvxIDPropertyCombine * )//STRIP008 ;
+
+SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMap* pMap, sal_Bool bConvertTwips )
+: _pMap(SvxInfoSetCache::getSortedPropertyMap(pMap)), mbConvertTwips(bConvertTwips)
+{
+ mpLastMap = 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::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
+ {
+ if(rSet.GetPool()->IsWhich(pDst->nWID))
+ rSet.Put(rSet.GetPool()->GetDefaultItem(pDst->nWID));
+
+ // setzen
+ setPropertyValue(pDst, *pUsrAny, rSet);
+ }
+ }
+ }
+ }
+
+ // Naechster Eintrag
+ pSrc++;
+ }
+ }
+}
+
+/** this function checks if a SFX_METRIC_ITEM realy needs to be converted.
+ This check is for items that store either metric values if theire positiv
+ or percentage if theire negativ.
+*/
+sal_Bool SvxUnoCheckForConversion( const SfxItemSet& rSet, sal_Int32 nWID, const uno::Any& rVal )
+{
+ sal_Bool bConvert = sal_True; // the default is that all metric items must be converted
+
+ switch( nWID )
+ {
+ case XATTR_FILLBMP_SIZEX:
+ case XATTR_FILLBMP_SIZEY:
+ {
+ sal_Int32 nValue;
+ if( rVal >>= nValue )
+ bConvert = nValue > 0;
+ break;
+ }
+ }
+
+ // the default is to always
+ return bConvert;
+}
+
+//----------------------------------------------------------------------
+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;
+ SfxItemPool* pPool = rSet.GetPool();
+
+ SfxItemState eState = rSet.GetItemState( pMap->nWID, pMap->nWID != SDRATTR_XMLATTRIBUTES, &pItem );
+
+ if( NULL == pItem && pPool )
+ {
+ pItem = &(pPool->GetDefaultItem( pMap->nWID ));
+ }
+
+ const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
+
+ BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+ if( eMapUnit == SFX_MAPUNIT_100TH_MM )
+ nMemberId &= (~CONVERT_TWIPS);
+
+ // item-Wert als UnoAny zurueckgeben
+ if(pItem)
+ {
+ pItem->QueryValue( aVal, nMemberId );
+
+ if( pMap->nMemberId & SFX_METRIC_ITEM )
+ {
+ // check for needed metric translation
+ if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ if( SvxUnoCheckForConversion( rSet, pMap->nWID, aVal ) )
+ SvxUnoConvertToMM( eMapUnit, aVal );
+ }
+ }
+ // convert typeless SfxEnumItem to enum type
+ else if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM &&
+ aVal.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ {
+ sal_Int32 nEnum;
+ aVal >>= nEnum;
+
+ aVal.setValue( &nEnum, *pMap->pType );
+ }
+ }
+ else
+ {
+ DBG_ERROR( "No SfxPoolItem found for property!" );
+ }
+
+ 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 );
+ SfxItemPool* pPool = rSet.GetPool();
+
+ // UnoAny in item-Wert stecken
+ if(eState < SFX_ITEM_DEFAULT || pItem == NULL)
+ {
+ if( pPool == NULL )
+ {
+ DBG_ERROR( "No default item and no pool?" );
+ return;
+ }
+
+ pItem = &pPool->GetDefaultItem( pMap->nWID );
+ }
+
+ DBG_ASSERT( pItem, "Got no default for item!" );
+ if( pItem )
+ {
+ uno::Any aValue( rVal );
+
+ const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
+
+ if( pMap->nMemberId & SFX_METRIC_ITEM )
+ {
+ // check for needed metric translation
+ if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ if( SvxUnoCheckForConversion( rSet, pMap->nWID, aValue ) )
+ SvxUnoConvertFromMM( eMapUnit, aValue );
+ }
+ }
+
+ pNewItem = pItem->Clone();
+
+ BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+ if( eMapUnit == SFX_MAPUNIT_100TH_MM )
+ nMemberId &= (~CONVERT_TWIPS);
+
+ if( pNewItem->PutValue( aValue, 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
+
+ SdrItemPool* pItemPool = SdrObject::GetGlobalDrawObjectItemPool();
+/*
+ if(!pItemPool)
+ {
+ // ItemPool generieren
+ ((SvxItemPropertySet*)this)->pItemPool = new SdrItemPool;
+ // Der Outliner hat keinen eigenen Pool, deshalb den der EditEngine
+ SfxItemPool* pOutlPool=EditEngine::CreatePool();
+ // OutlinerPool als SecondaryPool des SdrPool
+ pItemPool->SetSecondaryPool(pOutlPool);
+ }
+*/
+ const SfxMapUnit eMapUnit = pItemPool ? pItemPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM;
+ BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+ if( eMapUnit == SFX_MAPUNIT_100TH_MM )
+ nMemberId &= (~CONVERT_TWIPS);
+
+ uno::Any aVal;
+ SfxItemSet aSet( *pItemPool, pMap->nWID, pMap->nWID);
+
+ 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, nMemberId );
+ ((SvxItemPropertySet*)this)->AddUsrAnyForID(aVal, pMap->nWID);
+ }
+ }
+
+ if( pMap->nMemberId & SFX_METRIC_ITEM )
+ {
+ // check for needed metric translation
+ if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ SvxUnoConvertToMM( eMapUnit, aVal );
+ }
+ }
+
+ 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
+{
+ const SfxItemPropertyMap* pMap = mpLastMap ? mpLastMap : _pMap;
+ while ( pMap->pName )
+ {
+ if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) )
+ {
+ const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1;
+ if( NULL == mpLastMap->pName )
+ const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL;
+
+ return pMap;
+ }
+ ++pMap;
+ }
+
+ if( mpLastMap == NULL )
+ return 0;
+
+ pMap = _pMap;
+ while ( pMap->pName && (_pMap != mpLastMap) )
+ {
+ if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) )
+ {
+ const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1;
+ if( NULL == mpLastMap->pName )
+ const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL;
+ return pMap;
+ }
+ ++pMap;
+ }
+
+ return 0;
+}
+
+//----------------------------------------------------------------------
+
+Reference< ::com::sun::star::beans::XPropertySetInfo > SvxItemPropertySet::getPropertySetInfo() const
+{
+ return SvxInfoSetCache::getCachedPropertySetInfo( _pMap );
+}
+
+//----------------------------------------------------------------------
+
+#ifndef TWIPS_TO_MM
+#define TWIPS_TO_MM(val) ((val * 127 + 36) / 72)
+#endif
+#ifndef MM_TO_TWIPS
+#define MM_TO_TWIPS(val) ((val * 72 + 63) / 127)
+#endif
+
+/** converts the given any with a metric to 100th/mm if needed */
+void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, ::com::sun::star::uno::Any & rMetric ) throw()
+{
+ // map the metric of the itempool to 100th mm
+ switch(eSourceMapUnit)
+ {
+ case SFX_MAPUNIT_TWIP :
+ {
+ switch( rMetric.getValueTypeClass() )
+ {
+ case uno::TypeClass_BYTE:
+ rMetric <<= (sal_Int8)(TWIPS_TO_MM(*(sal_Int8*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_SHORT:
+ rMetric <<= (sal_Int16)(TWIPS_TO_MM(*(sal_Int16*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_UNSIGNED_SHORT:
+ rMetric <<= (sal_uInt16)(TWIPS_TO_MM(*(sal_uInt16*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_LONG:
+ rMetric <<= (sal_Int32)(TWIPS_TO_MM(*(sal_Int32*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_UNSIGNED_LONG:
+ rMetric <<= (sal_uInt32)(TWIPS_TO_MM(*(sal_uInt32*)rMetric.getValue()));
+ break;
+ default:
+ DBG_ERROR("AW: Missing unit translation to 100th mm!");
+ }
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("AW: Missing unit translation to 100th mm!");
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+
+/** converts the given any with a metric from 100th/mm to the given metric if needed */
+void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, ::com::sun::star::uno::Any & rMetric ) throw()
+{
+ switch(eDestinationMapUnit)
+ {
+ case SFX_MAPUNIT_TWIP :
+ {
+ switch( rMetric.getValueTypeClass() )
+ {
+ case uno::TypeClass_BYTE:
+ rMetric <<= (sal_Int8)(MM_TO_TWIPS(*(sal_Int8*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_SHORT:
+ rMetric <<= (sal_Int16)(MM_TO_TWIPS(*(sal_Int16*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_UNSIGNED_SHORT:
+ rMetric <<= (sal_uInt16)(MM_TO_TWIPS(*(sal_uInt16*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_LONG:
+ rMetric <<= (sal_Int32)(MM_TO_TWIPS(*(sal_Int32*)rMetric.getValue()));
+ break;
+ case uno::TypeClass_UNSIGNED_LONG:
+ rMetric <<= (sal_uInt32)(MM_TO_TWIPS(*(sal_uInt32*)rMetric.getValue()));
+ break;
+ default:
+ DBG_ERROR("AW: Missing unit translation to 100th mm!");
+ }
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("AW: Missing unit translation to PoolMetrics!");
+ }
+ }
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unomlstr.cxx b/binfilter/bf_svx/source/unodraw/svx_unomlstr.cxx
new file mode 100644
index 000000000000..8581543f5d4c
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unomlstr.cxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <svdobj.hxx>
+
+#include "unomlstr.hxx"
+namespace binfilter {
+
+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;
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unomod.cxx b/binfilter/bf_svx/source/unodraw/svx_unomod.cxx
new file mode 100644
index 000000000000..8551e552942b
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unomod.cxx
@@ -0,0 +1,759 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
+
+
+#include <vcl/svapp.hxx>
+
+
+
+#include <bf_svtools/unoevent.hxx>
+
+
+
+#include <unofill.hxx>
+
+#include <unonrule.hxx>
+
+#include <bf_svtools/unoimap.hxx>
+
+#include <fmdpage.hxx>
+#include <fmmodel.hxx>
+
+#include <fmpage.hxx>
+
+#include <bf_sfx2/sfx.hrc>
+
+#include <unoapi.hxx>
+
+#include "globl3d.hxx"
+#include "unofield.hxx"
+#include "unomodel.hxx"
+#include "svdobj.hxx"
+#include "unoshape.hxx"
+#include <hash_map>
+namespace binfilter {
+
+//-////////////////////////////////////////////////////////////////////
+
+using namespace ::rtl;
+using namespace ::osl;
+using namespace ::com::sun::star;
+
+//-////////////////////////////////////////////////////////////////////
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
+ aAny <<= uno::Reference< xint >(this)
+
+#define ITYPE( xint ) \
+ ::getCppuType((const uno::Reference< xint >*)0)
+
+//-////////////////////////////////////////////////////////////////////
+
+#ifndef SVX_LIGHT
+
+class SvxUnoDrawPagesAccess : public ::cppu::WeakImplHelper2< ::com::sun::star::drawing::XDrawPages, ::com::sun::star::lang::XServiceInfo >
+{
+private:
+ SvxUnoDrawingModel& mrModel;
+
+public:
+ SvxUnoDrawPagesAccess( SvxUnoDrawingModel& rMyModel ) throw();
+ virtual ~SvxUnoDrawPagesAccess() throw();
+
+ // XDrawPages
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL insertNewByIndex( sal_Int32 nIndex ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage ) throw(::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);
+
+ // 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
+//-////////////////////////////////////////////////////////////////////
+
+#ifndef SVX_LIGHT
+const SvEventDescription* ImplGetSupportedMacroItems()
+{
+ static const SvEventDescription aMacroDescriptionsImpl[] =
+ {
+ { SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
+ { SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
+ { 0, NULL }
+ };
+
+ return aMacroDescriptionsImpl;
+}
+#endif
+
+//-////////////////////////////////////////////////////////////////////
+
+/** fills the given EventObject from the given SdrHint.
+ @returns
+ true if the SdrHint could be translated to an EventObject<br>
+ false if not
+*/
+sal_Bool SvxUnoDrawMSFactory::createEvent( const SdrModel* pDoc, const SdrHint* pSdrHint, ::com::sun::star::document::EventObject& aEvent )
+{
+ const SdrObject* pObj = NULL;
+ const SdrPage* pPage = NULL;
+
+ switch( pSdrHint->GetKind() )
+ {
+// case HINT_LAYERCHG: // Layerdefinition geaendert
+// case HINT_LAYERORDERCHG: // Layerreihenfolge geaendert (Insert/Remove/ChangePos)
+// case HINT_LAYERSETCHG: // Layerset geaendert
+// case HINT_LAYERSETORDERCHG: // Layersetreihenfolge geaendert (Insert/Remove/ChangePos)
+
+ case HINT_PAGECHG: // Page geaendert
+ aEvent.EventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageModified" ) );
+ pPage = pSdrHint->GetPage();
+ break;
+ case HINT_PAGEORDERCHG: // Reihenfolge der Seiten (Zeichenseiten oder Masterpages) geaendert (Insert/Remove/ChangePos)
+ aEvent.EventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageOrderModified" ) );
+ pPage = pSdrHint->GetPage();
+ break;
+ case HINT_OBJCHG: // Objekt geaendert
+ aEvent.EventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "ShapeModified" ) );
+ pObj = pSdrHint->GetObject();
+ break;
+ case HINT_OBJINSERTED: // Neues Zeichenobjekt eingefuegt
+ aEvent.EventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "ShapeInserted" ) );
+ pObj = pSdrHint->GetObject();
+ break;
+ case HINT_OBJREMOVED: // Zeichenobjekt aus Liste entfernt
+ aEvent.EventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "ShapeRemoved" ) );
+ pObj = pSdrHint->GetObject();
+ break;
+// HINT_DEFAULTTABCHG, // Default Tabulatorweite geaendert
+// HINT_DEFFONTHGTCHG, // Default FontHeight geaendert
+// HINT_CONTROLINSERTED, // UnoControl wurde eingefuegt
+// HINT_CONTROLREMOVED, // UnoControl wurde entfernt
+// HINT_SWITCHTOPAGE, // #94278# UNDO/REDO at an object evtl. on another page
+// HINT_OBJLISTCLEAR // Is called before an SdrObjList will be cleared
+ default:
+ return sal_False;
+ }
+
+ if( pObj )
+ aEvent.Source = const_cast<SdrObject*>(pObj)->getUnoShape();
+ else if( pPage )
+ aEvent.Source = const_cast<SdrPage*>(pPage)->getUnoPage();
+ else
+ aEvent.Source = (const_cast<SdrModel*>(pDoc))->getUnoModel();
+
+ return sal_True;
+}
+
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier )
+ throw( uno::Exception, uno::RuntimeException )
+{
+ const OUString aDrawingPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.") );
+
+ if( rServiceSpecifier.compareTo( aDrawingPrefix, aDrawingPrefix.getLength() ) == 0 )
+ {
+ sal_uInt32 nType = UHashMap::getId( rServiceSpecifier );
+ 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 ) );
+ }
+ }
+
+ uno::Reference< uno::XInterface > xRet( createTextField( rServiceSpecifier ) );
+ if( !xRet.is() )
+ throw lang::ServiceNotRegisteredException();
+
+ return xRet;
+}
+
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField( const ::rtl::OUString& ServiceSpecifier ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Reference< uno::XInterface > xRet;
+
+ const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") );
+
+ if( ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0 )
+ {
+ OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) );
+
+ sal_Int32 nId = ID_UNKNOWN;
+
+ if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DateTime") ) )
+ {
+ nId = ID_DATEFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL") ) )
+ {
+ nId = ID_URLFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("PageNumber") ) )
+ {
+ nId = ID_PAGEFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("PageCount") ) )
+ {
+ nId = ID_PAGESFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("SheetName") ) )
+ {
+ nId = ID_TABLEFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName") ) )
+ {
+ nId = ID_EXT_FILEFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
+ {
+ nId = ID_FILEFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Author") ) )
+ {
+ nId = ID_AUTHORFIELD;
+ }
+ else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Measure") ) )
+ {
+ nId = ID_MEASUREFIELD;
+ }
+
+ if( nId != ID_UNKNOWN )
+ xRet = (::cppu::OWeakObject * )new SvxUnoTextField( nId );
+ }
+
+ return xRet;
+}
+
+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 )
+{
+ return UHashMap::getServiceNames();
+}
+
+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;
+}
+
+
+#ifndef SVX_LIGHT
+
+SvxUnoDrawingModel::~SvxUnoDrawingModel() throw()
+{
+}
+
+uno::Any SAL_CALL SvxUnoDrawingModel::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT(lang::XServiceInfo);
+ else QUERYINT(lang::XMultiServiceFactory);
+ else QUERYINT(drawing::XDrawPagesSupplier);
+ else QUERYINT(::com::sun::star::ucb::XAnyCompareFactory);
+ else
+ return SfxBaseModel::queryInterface( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxUnoDrawingModel::acquire() throw ( )
+{
+ SfxBaseModel::acquire();
+}
+
+void SAL_CALL SvxUnoDrawingModel::release() throw ( )
+{
+ SfxBaseModel::release();
+}
+
+// XTypeProvider
+uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawingModel::getTypes( ) throw(uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ const uno::Sequence< uno::Type > aBaseTypes( SfxBaseModel::getTypes() );
+ const sal_Int32 nBaseTypes = aBaseTypes.getLength();
+ const uno::Type* pBaseTypes = aBaseTypes.getConstArray();
+
+ const sal_Int32 nOwnTypes = 4; // !DANGER! Keep this updated!
+
+ maTypeSequence.realloc( nBaseTypes + nOwnTypes );
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ITYPE(lang::XServiceInfo);
+ *pTypes++ = ITYPE(lang::XMultiServiceFactory);
+ *pTypes++ = ITYPE(drawing::XDrawPagesSupplier);
+ *pTypes++ = ITYPE(::com::sun::star::ucb::XAnyCompareFactory);
+
+ for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
+ *pTypes++ = *pBaseTypes++;
+ }
+
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawingModel::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 SvxUnoDrawingModel::lockControllers( )
+ throw(uno::RuntimeException)
+{
+ if( mpDoc )
+ mpDoc->setLock( sal_True );
+}
+
+void SAL_CALL SvxUnoDrawingModel::unlockControllers( )
+ throw(uno::RuntimeException)
+{
+ if( mpDoc && mpDoc->isLocked() )
+ {
+ mpDoc->setLock( sal_False );
+ }
+}
+
+sal_Bool SAL_CALL SvxUnoDrawingModel::hasControllersLocked( )
+ throw(uno::RuntimeException)
+{
+ return mpDoc && mpDoc->isLocked();
+}
+
+// XDrawPagesSupplier
+uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages()
+ throw(uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess );
+
+ if( !xDrawPages.is() )
+ mxDrawPagesAccess = xDrawPages = (drawing::XDrawPages*)new SvxUnoDrawPagesAccess(*this);
+
+ return xDrawPages;
+}
+
+// XMultiServiceFactory ( SvxFmMSFactory )
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier )
+ throw(uno::Exception, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) )
+ {
+ if( !mxDashTable.is() )
+ mxDashTable = SvxUnoDashTable_createInstance( mpDoc );
+ return mxDashTable;
+ }
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GradientTable") ) )
+ {
+ if( !mxGradientTable.is() )
+ mxGradientTable = SvxUnoGradientTable_createInstance( mpDoc );
+ return mxGradientTable;
+ }
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.HatchTable") ) )
+ {
+ if( !mxHatchTable.is() )
+ mxHatchTable = SvxUnoHatchTable_createInstance( mpDoc );
+ return mxHatchTable;
+ }
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.BitmapTable") ) )
+ {
+ if( !mxBitmapTable.is() )
+ mxBitmapTable = SvxUnoBitmapTable_createInstance( mpDoc );
+ return mxBitmapTable;
+ }
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TransparencyGradientTable") ) )
+ {
+ if( !mxTransGradientTable.is() )
+ mxTransGradientTable = SvxUnoTransGradientTable_createInstance( mpDoc );
+ return mxTransGradientTable;
+ }
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MarkerTable") ) )
+ {
+ if( !mxMarkerTable.is() )
+ mxMarkerTable = SvxUnoMarkerTable_createInstance( mpDoc );
+ return mxMarkerTable;
+ }
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.NumberingRules" ) ) )
+ {
+ return SvxCreateNumRule( mpDoc );
+ }
+
+ if( aServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.image.ImageMapRectangleObject") ) )
+ {
+ return SvUnoImageMapRectangleObject_createInstance( ImplGetSupportedMacroItems() );
+ }
+
+ if( aServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.image.ImageMapCircleObject") ) )
+ {
+ return SvUnoImageMapCircleObject_createInstance( ImplGetSupportedMacroItems() );
+ }
+
+ if( aServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.image.ImageMapPolygonObject") ) )
+ {
+ return SvUnoImageMapPolygonObject_createInstance( ImplGetSupportedMacroItems() );
+ }
+
+ if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) )
+ {
+ return (::cppu::OWeakObject * )new SvxUnoTextField( ID_EXT_DATEFIELD );
+ }
+
+ uno::Reference< uno::XInterface > xRet;
+
+ const String aType( aServiceSpecifier );
+ if( aType.EqualsAscii( "com.sun.star.presentation.", 0, 26 ) )
+ {
+ SvxShape* pShape = NULL;
+
+ sal_uInt16 nType = OBJ_TEXT;
+ // create a shape wrapper
+ if( aType.EqualsAscii( "TitleTextShape", 26, 14 ) )
+ {
+ nType = OBJ_TEXT;
+ }
+ else if( aType.EqualsAscii( "OutlinerShape", 26, 13 ) )
+ {
+ nType = OBJ_TEXT;
+ }
+ else if( aType.EqualsAscii( "SubtitleShape", 26, 13 ) )
+ {
+ nType = OBJ_TEXT;
+ }
+ else if( aType.EqualsAscii( "GraphicObjectShape", 26, 18 ) )
+ {
+ nType = OBJ_GRAF;
+ }
+ else if( aType.EqualsAscii( "PageShape", 26, 9 ) )
+ {
+ nType = OBJ_PAGE;
+ }
+ else if( aType.EqualsAscii( "OLE2Shape", 26, 9 ) )
+ {
+ nType = OBJ_OLE2;
+ }
+ else if( aType.EqualsAscii( "ChartShape", 26, 10 ) )
+ {
+ nType = OBJ_OLE2;
+ }
+ else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ {
+ nType = OBJ_OLE2;
+ }
+ else if( aType.EqualsAscii( "OrgChartShape", 26, 13 ) )
+ {
+ nType = OBJ_OLE2;
+ }
+ else if( aType.EqualsAscii( "NotesShape", 26, 13 ) )
+ {
+ nType = OBJ_TEXT;
+ }
+ else if( aType.EqualsAscii( "HandoutShape", 26, 13 ) )
+ {
+ nType = OBJ_PAGE;
+ }
+ else
+ {
+ throw lang::ServiceNotRegisteredException();
+ }
+
+ // create the API wrapper
+ pShape = CreateSvxShapeByTypeAndInventor( nType, SdrInventor );
+
+ // set shape type
+ if( pShape )
+ pShape->SetShapeType(aServiceSpecifier);
+
+ xRet = (uno::XWeak*)pShape;
+ }
+ else
+ {
+ xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
+ }
+
+ return xRet;
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames()
+ throw(uno::RuntimeException)
+{
+ const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
+
+ uno::Sequence< OUString > aSNS( 21 );
+
+ sal_uInt16 i = 0;
+
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DashTable"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GradientTable"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.HatchTable"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.BitmapTable"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TransparencyGradientTable"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MarkerTable"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingRules"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.image.ImageMapRectangleObject"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.image.ImageMapCircleObject"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.image.ImageMapPolygonObject"));
+
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.TitleTextShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.OutlinerShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SubtitleShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.GraphicObjectShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.ChartShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PageShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.OLE2Shape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.TableShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.OrgChartShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.NotesShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.HandoutShape"));
+
+ DBG_ASSERT( i == aSNS.getLength(), "Sequence overrun!" );
+
+ return comphelper::concatSequences( aSNS_ORG, aSNS );
+}
+
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoDrawingModel::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoDrawingModel"));
+}
+
+sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceName )
+ throw(uno::RuntimeException)
+{
+ return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getSupportedServiceNames() throw(uno::RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument"));
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
+
+// XAnyCompareFactory
+uno::Reference< ::com::sun::star::ucb::XAnyCompare > SAL_CALL SvxUnoDrawingModel::createAnyCompareByName( const OUString& PropertyName )
+ throw(uno::RuntimeException)
+{
+ return SvxCreateNumRuleCompare();
+}
+
+//=============================================================================
+// class SvxUnoDrawPagesAccess
+//=============================================================================
+
+SvxUnoDrawPagesAccess::SvxUnoDrawPagesAccess( SvxUnoDrawingModel& rMyModel ) throw()
+: mrModel(rMyModel)
+{
+}
+
+SvxUnoDrawPagesAccess::~SvxUnoDrawPagesAccess() throw()
+{
+}
+
+// XIndexAccess
+sal_Int32 SAL_CALL SvxUnoDrawPagesAccess::getCount()
+ throw(uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ sal_Int32 nCount = 0;
+
+ if( mrModel.mpDoc )
+ nCount = mrModel.mpDoc->GetPageCount();
+
+ return( nCount );
+}
+
+uno::Any SAL_CALL SvxUnoDrawPagesAccess::getByIndex( sal_Int32 Index )
+ throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ uno::Any aAny;
+
+ if( mrModel.mpDoc )
+ {
+ if( (Index < 0) || (Index >= mrModel.mpDoc->GetPageCount() ) )
+ throw lang::IndexOutOfBoundsException();
+
+ SdrPage* pPage = mrModel.mpDoc->GetPage( (sal_uInt16)Index );
+ if( pPage )
+ {
+ uno::Reference< uno::XInterface > xPage( pPage->mxUnoPage );
+
+ if( !xPage.is() )
+ {
+ if( PTR_CAST( FmFormModel, mrModel.mpDoc ) )
+ xPage = (drawing::XDrawPage*)new SvxFmDrawPage( pPage );
+ else
+ xPage = (drawing::XDrawPage*)new SvxDrawPage( pPage );
+
+ pPage->mxUnoPage = xPage;
+ }
+
+ aAny <<= xPage;
+ }
+ }
+ return aAny;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoDrawPagesAccess::getElementType()
+ throw(uno::RuntimeException)
+{
+ return ITYPE( drawing::XDrawPage );
+}
+
+sal_Bool SAL_CALL SvxUnoDrawPagesAccess::hasElements()
+ throw(uno::RuntimeException)
+{
+ return getCount() > 0;
+}
+
+// XDrawPages
+
+/******************************************************************************
+* Erzeugt eine neue Seite mit Model an der angegebennen Position und gibt die *
+* dazugehoerige SdDrawPage zurueck. *
+******************************************************************************/
+uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewByIndex( sal_Int32 nIndex )
+ throw(uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ uno::Reference< drawing::XDrawPage > xDrawPage;
+
+ if( mrModel.mpDoc )
+ {
+ SdrPage* pPage;
+
+ if( PTR_CAST( FmFormModel, mrModel.mpDoc ) )
+ pPage = new FmFormPage(*(FmFormModel*)mrModel.mpDoc, NULL);
+ else
+ pPage = new SdrPage(*mrModel.mpDoc);
+
+ mrModel.mpDoc->InsertPage( pPage, (sal_uInt16)nIndex );
+ xDrawPage = uno::Reference< drawing::XDrawPage >::query( pPage->getUnoPage() );
+ }
+
+ return xDrawPage;
+}
+
+void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage )
+ throw(uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ sal_uInt16 nPageCount = mrModel.mpDoc->GetPageCount();
+ if( nPageCount > 1 )
+ {
+ // pPage von xPage besorgen und dann die Id (nPos )ermitteln
+ SvxDrawPage* pSvxPage = SvxDrawPage::getImplementation( xPage );
+ if( pSvxPage )
+ {
+ SdrPage* pPage = pSvxPage->GetSdrPage();
+ if(pPage)
+ {
+ sal_uInt16 nPage = pPage->GetPageNum();
+ mrModel.mpDoc->DeletePage( nPage );
+ }
+ }
+ }
+}
+
+// XServiceInfo
+sal_Char pSvxUnoDrawPagesAccessService[sizeof("com.sun.star.drawing.DrawPages")] = "com.sun.star.drawing.DrawPages";
+
+OUString SAL_CALL SvxUnoDrawPagesAccess::getImplementationName( ) throw(uno::RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoDrawPagesAccess" ) );
+}
+
+sal_Bool SAL_CALL SvxUnoDrawPagesAccess::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( pSvxUnoDrawPagesAccessService ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDrawPagesAccess::getSupportedServiceNames( ) throw(uno::RuntimeException)
+{
+ OUString aService( RTL_CONSTASCII_USTRINGPARAM( pSvxUnoDrawPagesAccessService ) );
+ uno::Sequence< OUString > aSeq( &aService, 1 );
+ return aSeq;
+}
+
+#endif
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unomtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unomtabl.cxx
new file mode 100644
index 000000000000..79a18cfae964
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unomtabl.cxx
@@ -0,0 +1,479 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <set>
+
+#include <comphelper/stl_types.hxx>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/drawing/PointSequence.hpp>
+
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <bf_svtools/itempool.hxx>
+
+#include <bf_svtools/itemset.hxx>
+
+#include <bf_svtools/lstner.hxx>
+
+#include <xlnedit.hxx>
+#include <xlnstit.hxx>
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+
+#include <vector>
+
+#include <osl/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+
+#include "unoapi.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+typedef std::vector< SfxItemSet* > ItemPoolVector;
+
+class SvxUnoMarkerTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >,
+ public SfxListener
+{
+private:
+ SdrModel* mpModel;
+ SfxItemPool* mpModelPool;
+
+ ItemPoolVector maItemSetVector;
+
+public:
+ SvxUnoMarkerTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoMarkerTable() throw();
+
+ void dispose();
+
+ // SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
+
+ void SAL_CALL ImplInsertByName( const OUString& aName, const uno::Any& aElement );
+
+ // 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);
+
+ // 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 ),
+ mpModelPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+ if( pModel )
+ StartListening( *pModel );
+}
+
+SvxUnoMarkerTable::~SvxUnoMarkerTable() throw()
+{
+ if( mpModel )
+ EndListening( *mpModel );
+ dispose();
+}
+
+void SvxUnoMarkerTable::dispose()
+{
+ ItemPoolVector::iterator aIter = maItemSetVector.begin();
+ const ItemPoolVector::iterator aEnd = maItemSetVector.end();
+
+ while( aIter != aEnd )
+ {
+ delete (*aIter++);
+ }
+
+ maItemSetVector.clear();
+}
+
+// SfxListener
+void SvxUnoMarkerTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw()
+{
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+
+ if( pSdrHint && HINT_MODELCLEARED == pSdrHint->GetKind() )
+ dispose();
+}
+
+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 )
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MarkerTable" ));
+ return aSNS;
+}
+
+void SAL_CALL SvxUnoMarkerTable::ImplInsertByName( const OUString& aName, const uno::Any& aElement )
+{
+ SfxItemSet* mpInSet = new SfxItemSet( *mpModelPool, XATTR_LINESTART, XATTR_LINEEND );
+ maItemSetVector.push_back( mpInSet );
+
+ 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 );
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoMarkerTable::insertByName( const OUString& aApiName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ if( hasByName( aApiName ) )
+ throw container::ElementExistException();
+
+ String aName;
+ SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName );
+
+ ImplInsertByName( aName, aElement );
+}
+
+void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String Name;
+ SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, Name );
+
+ ItemPoolVector::iterator aIter = maItemSetVector.begin();
+ const ItemPoolVector::iterator aEnd = maItemSetVector.end();
+
+ NameOrIndex *pItem;
+ const String aSearchName( Name );
+
+ while( aIter != aEnd )
+ {
+ pItem = (NameOrIndex *)&((*aIter)->Get( XATTR_LINEEND ) );
+ if( pItem->GetName() == aSearchName )
+ {
+ delete (*aIter);
+ maItemSetVector.erase( aIter );
+ return;
+ }
+ aIter++;
+ }
+
+ if( !hasByName( Name ) )
+ throw container::NoSuchElementException();
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ String aName;
+ SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName );
+
+ ItemPoolVector::iterator aIter = maItemSetVector.begin();
+ const ItemPoolVector::iterator aEnd = maItemSetVector.end();
+
+ NameOrIndex *pItem;
+ const String aSearchName( aName );
+
+ while( aIter != aEnd )
+ {
+ pItem = (NameOrIndex *)&((*aIter)->Get( XATTR_LINEEND ) );
+ if( pItem->GetName() == aSearchName )
+ {
+ XLineEndItem aEndMarker;
+ aEndMarker.SetName( aSearchName );
+ if( !aEndMarker.PutValue( aElement ) )
+ throw lang::IllegalArgumentException();
+
+ (*aIter)->Put( aEndMarker, XATTR_LINEEND );
+
+ XLineStartItem aStartMarker;
+ aStartMarker.SetName( aSearchName );
+ aStartMarker.PutValue( aElement );
+
+ (*aIter)->Put( aStartMarker, XATTR_LINESTART );
+ return;
+ }
+ aIter++;
+ }
+
+ // if it is not in our own sets, modify the pool!
+ sal_Bool bFound = sal_False;
+
+ USHORT nSurrogate;
+ const USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0;
+ for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ {
+ pItem->PutValue( aElement );
+ bFound = sal_True;
+ break;
+ }
+ }
+
+ const USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0;
+ for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ {
+ pItem->PutValue( aElement );
+ bFound = sal_True;
+ break;
+ }
+ }
+
+ if( bFound )
+ ImplInsertByName( aName, aElement );
+ else
+ throw container::NoSuchElementException();
+}
+
+static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool, USHORT nWhich, uno::Any& rAny )
+{
+ NameOrIndex *pItem;
+ const sal_Int32 nSurrogateCount = pPool ? (sal_Int32)pPool->GetItemCount( nWhich ) : 0;
+ for( sal_Int32 nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)pPool->GetItem( nWhich, (USHORT)nSurrogate );
+
+ if( pItem && pItem->GetName() == rSearchName )
+ {
+ pItem->QueryValue( rAny, 0 );
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aApiName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ String aName;
+ SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName );
+
+ uno::Any aAny;
+
+ if( mpModelPool && aName.Len() != 0 )
+ {
+ do
+ {
+ const String aSearchName( aName );
+ if( getByNameFromPool( aSearchName, mpModelPool, XATTR_LINESTART, aAny ) )
+ break;
+
+ if( getByNameFromPool( aSearchName, mpModelPool, XATTR_LINEEND, aAny ) )
+ break;
+
+ throw container::NoSuchElementException();
+ }
+ while(0);
+ }
+
+ return aAny;
+}
+
+static void createNamesForPool( SfxItemPool* pPool, USHORT nWhich, std::set< OUString, comphelper::UStringLess >& rNameSet )
+{
+ const sal_Int32 nSuroCount = pPool->GetItemCount( nWhich );
+ sal_Int32 nSurrogate;
+
+ NameOrIndex *pItem;
+ OUString aName;
+
+ for( nSurrogate = 0; nSurrogate < nSuroCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)pPool->GetItem( nWhich, (USHORT)nSurrogate );
+
+ if( pItem == NULL || pItem->GetName().Len() == 0 )
+ continue;
+
+ SvxUnogetApiNameForItem( XATTR_LINEEND, pItem->GetName(), aName );
+ rNameSet.insert( aName );
+ }
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames()
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ std::set< OUString, comphelper::UStringLess > aNameSet;
+
+ // search model pool for line starts
+ createNamesForPool( mpModelPool, XATTR_LINESTART, aNameSet );
+
+ // search model pool for line ends
+ createNamesForPool( mpModelPool, XATTR_LINEEND, aNameSet );
+
+ uno::Sequence< OUString > aSeq( aNameSet.size() );
+ OUString* pNames = aSeq.getArray();
+
+ std::set< OUString, comphelper::UStringLess >::iterator aIter( aNameSet.begin() );
+ const std::set< OUString, comphelper::UStringLess >::iterator aEnd( aNameSet.end() );
+
+ while( aIter != aEnd )
+ {
+ *pNames++ = *aIter++;
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ if( aName.getLength() == 0 )
+ return sal_False;
+
+ String aSearchName;
+
+ NameOrIndex *pItem;
+
+ SvxUnogetInternalNameForItem( XATTR_LINESTART, aName, aSearchName );
+ USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0;
+ USHORT nSurrogate;
+ for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ SvxUnogetInternalNameForItem( XATTR_LINEEND, aName, aSearchName );
+ USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0;
+ for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// 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 )
+{
+ SolarMutexGuard aGuard;
+
+ NameOrIndex *pItem;
+
+ const USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0;
+ USHORT nSurrogate;
+ for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate);
+ if( pItem && pItem->GetName().Len() != 0 )
+ return sal_True;
+ }
+
+ const USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0;
+ for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate);
+ if( pItem && pItem->GetName().Len() != 0 )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoMarkerTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoMarkerTable(pModel);
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unonrule.cxx b/binfilter/bf_svx/source/unodraw/svx_unonrule.cxx
new file mode 100644
index 000000000000..5d9e2d149b76
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unonrule.cxx
@@ -0,0 +1,599 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define PROPERTY_NONE 0
+#define ITEMID_BRUSH 0
+
+#include <brshitem.hxx>
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+
+#include <vcl/svapp.hxx>
+#include <osl/mutex.hxx>
+
+#include <toolkit/unohlp.hxx>
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unofdesc.hxx"
+#include "unonrule.hxx"
+#include "unotext.hxx"
+#include "svdmodel.hxx"
+#include "numitem.hxx"
+#include "unoapi.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::std;
+
+/******************************************************************
+ * SvxUnoNumberingRules
+ ******************************************************************/
+
+#include <cppuhelper/implbase3.hxx>
+namespace binfilter {
+
+
+class SvxUnoNumberingRules : public ::cppu::WeakAggImplHelper3< container::XIndexReplace, lang::XUnoTunnel, lang::XServiceInfo >
+{
+private:
+ SvxNumRule maRule;
+public:
+ SvxUnoNumberingRules( const SvxNumRule& rRule ) throw();
+ virtual ~SvxUnoNumberingRules() throw();
+
+ UNO3_GETIMPLEMENTATION_DECL( SvxUnoNumberingRules )
+
+ //XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const uno::Any& Element ) throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(uno::RuntimeException) ;
+ virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
+
+ //XElementAccess
+ virtual uno::Type SAL_CALL getElementType() throw(uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements() throw(uno::RuntimeException);
+
+ // 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);
+
+ // intern
+ uno::Sequence<beans::PropertyValue> getNumberingRuleByIndex( sal_Int32 nIndex) const throw();
+ void setNumberingRuleByIndex( const uno::Sequence< beans::PropertyValue >& rProperties, sal_Int32 nIndex) throw( uno::RuntimeException, lang::IllegalArgumentException );
+
+ const SvxNumRule& getNumRule() const { return maRule; }
+};
+
+UNO3_GETIMPLEMENTATION_IMPL( SvxUnoNumberingRules );
+
+SvxUnoNumberingRules::SvxUnoNumberingRules( const SvxNumRule& rRule ) throw()
+: maRule( rRule )
+{
+}
+
+SvxUnoNumberingRules::~SvxUnoNumberingRules() throw()
+{
+}
+
+//XIndexReplace
+void SAL_CALL SvxUnoNumberingRules::replaceByIndex( sal_Int32 Index, const uno::Any& Element )
+ throw( lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ if(maRule.GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING)
+ Index++;
+
+ if( Index < 0 || Index >= maRule.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 )
+{
+ SolarMutexGuard aGuard;
+
+ sal_Int32 nCount = maRule.GetLevelCount();
+ if(maRule.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 )
+{
+ SolarMutexGuard aGuard;
+
+ if(maRule.GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING)
+ Index++;
+
+ if( Index < 0 || Index >= maRule.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 sal_True;
+}
+
+// XServiceInfo
+sal_Char pSvxUnoNumberingRulesService[sizeof("com.sun.star.text.NumberingRules")] = "com.sun.star.text.NumberingRules";
+
+OUString SAL_CALL SvxUnoNumberingRules::getImplementationName( ) throw(uno::RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoNumberingRules" ) );
+}
+
+sal_Bool SAL_CALL SvxUnoNumberingRules::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( pSvxUnoNumberingRulesService ) );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoNumberingRules::getSupportedServiceNames( ) throw(uno::RuntimeException)
+{
+ OUString aService( RTL_CONSTASCII_USTRINGPARAM( pSvxUnoNumberingRulesService ) );
+ uno::Sequence< OUString > aSeq( &aService, 1 );
+ return aSeq;
+}
+
+uno::Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sal_Int32 nIndex) const throw()
+{
+ // NumberingRule aRule;
+ const SvxNumberFormat& rFmt = maRule.GetLevel((sal_uInt16) nIndex);
+ sal_uInt16 nIdx = 0;
+
+ const int nProps = 15;
+ beans::PropertyValue* pArray = new beans::PropertyValue[nProps];
+
+ uno::Any aVal;
+ {
+ aVal <<= rFmt.GetNumberingType();
+ 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;
+ }
+
+ {
+ sal_Unicode nCode = rFmt.GetBulletChar();
+ OUString aStr( &nCode, 1 );
+ aVal <<= aStr;
+ beans::PropertyValue aBulletProp( OUString(RTL_CONSTASCII_USTRINGPARAM("BulletChar")), -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 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();
+ if(pBrush && pBrush->GetGraphicObject())
+ {
+ const BfGraphicObject* 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);
+
+ pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SymbolTextDistance")), -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 )
+{
+ SvxNumberFormat aFmt(maRule.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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_NUMBERINGTYPE)))
+ {
+ 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.SetNumberingType((SvxExtNumType)nSet);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_PREFIX)))
+ {
+ OUString aPrefix;
+ if( aVal >>= aPrefix )
+ {
+ aFmt.SetPrefix(aPrefix);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_SUFFIX)))
+ {
+ OUString aSuffix;
+ if( aVal >>= aSuffix )
+ {
+ aFmt.SetSuffix(aSuffix);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLETID)))
+ {
+ sal_Int16 nSet;
+ if( aVal >>= nSet )
+ {
+ if(nSet < 0x100)
+ {
+ aFmt.SetBulletChar(nSet);
+ continue;
+ }
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("BulletChar")))
+ {
+ OUString aStr;
+ if( aVal >>= aStr )
+ {
+ if(aStr.getLength())
+ {
+ aFmt.SetBulletChar(aStr[0]);
+ }
+ else
+ {
+ aFmt.SetBulletChar(0);
+ }
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_ADJUST)))
+ {
+ sal_Int16 nAdjust;
+ if( aVal >>= nAdjust )
+ {
+ aFmt.SetNumAdjust(ConvertUnoAdjust( (unsigned short)nAdjust ));
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLET_FONT)))
+ {
+ awt::FontDescriptor aDesc;
+ if( aVal >>= aDesc )
+ {
+ Font aFont;
+ SvxUnoFontDescriptor::ConvertToFont( aDesc, aFont );
+ aFmt.SetBulletFont(&aFont);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Graphic")))
+ {
+ 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("GraphicURL")))
+ {
+ OUString aURL;
+ if( aVal >>= aURL )
+ {
+ BfGraphicObject aGrafObj( CreateGraphicObjectFromURL( aURL ) );
+ SvxBrushItem aBrushItem( aGrafObj, GPOS_AREA );
+ aFmt.SetGraphicBrush( &aBrushItem );
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("GraphicSize")))
+ {
+ awt::Size aUnoSize;
+ if( aVal >>= aUnoSize )
+ {
+ aFmt.SetGraphicSize( Size( aUnoSize.Width, aUnoSize.Height ) );
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_START_WITH)))
+ {
+ sal_Int16 nStart;
+ if( aVal >>= nStart )
+ {
+ aFmt.SetStart( nStart );
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_LEFT_MARGIN)))
+ {
+ sal_Int32 nMargin;
+ if( aVal >>= nMargin )
+ {
+ aFmt.SetAbsLSpace((sal_uInt16)nMargin);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_FIRST_LINE_OFFSET)))
+ {
+ sal_Int32 nMargin;
+ if( aVal >>= nMargin )
+ {
+ aFmt.SetFirstLineOffset((sal_uInt16)nMargin);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("SymbolTextDistance")))
+ {
+ sal_Int32 nTextDistance;
+ if( aVal >>= nTextDistance )
+ {
+ aFmt.SetCharTextDistance((sal_uInt16)nTextDistance);
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLET_COLOR)))
+ {
+ sal_Int32 nColor;
+ if( aVal >>= nColor )
+ {
+ aFmt.SetBulletColor( (Color) nColor );
+ continue;
+ }
+ }
+ else if(rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLET_RELSIZE)))
+ {
+ sal_Int16 nSize;
+ if( aVal >>= nSize )
+ {
+ aFmt.SetBulletRelSize( (short)nSize );
+ continue;
+ }
+ }
+ else
+ {
+ continue;
+ }
+
+ throw lang::IllegalArgumentException();
+ }
+
+ // check that we always have a brush item for bitmap numbering
+ if( aFmt.GetNumberingType() == SVX_NUM_BITMAP )
+ {
+ if( NULL == aFmt.GetBrush() )
+ {
+ BfGraphicObject aGrafObj;
+ SvxBrushItem aBrushItem( aGrafObj, GPOS_AREA );
+ aFmt.SetGraphicBrush( &aBrushItem );
+ }
+ }
+ maRule.SetLevel( (sal_uInt16)nIndex, aFmt );
+}
+
+///////////////////////////////////////////////////////////////////////
+
+const SvxNumRule& SvxGetNumRule( uno::Reference< container::XIndexReplace > xRule ) throw( lang::IllegalArgumentException )
+{
+ SvxUnoNumberingRules* pRule = SvxUnoNumberingRules::getImplementation( xRule );
+ if( pRule == NULL )
+ throw lang::IllegalArgumentException();
+
+ return pRule->getNumRule();
+}
+
+///////////////////////////////////////////////////////////////////////
+
+uno::Reference< container::XIndexReplace > SvxCreateNumRule( const SvxNumRule* pRule ) throw()
+{
+ DBG_ASSERT( pRule, "No default SvxNumRule!" );
+ if( pRule )
+ {
+ return new SvxUnoNumberingRules( *pRule );
+ }
+ else
+ {
+ SvxNumRule aDefaultRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE);
+ return new SvxUnoNumberingRules( aDefaultRule );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////
+
+uno::Reference< container::XIndexReplace > SvxCreateNumRule( SdrModel* pModel ) throw()
+{
+ SvxNumRule* pDefaultRule = NULL;
+ if( pModel )
+ {
+ SvxNumBulletItem* pItem = (SvxNumBulletItem*) pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
+ if( pItem )
+ {
+ pDefaultRule = pItem->GetNumRule();
+ }
+ }
+
+ if( pDefaultRule )
+ {
+ return SvxCreateNumRule( pDefaultRule );
+ }
+ else
+ {
+ SvxNumRule aTempRule( 0, 10, false );
+ return SvxCreateNumRule( &aTempRule );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////
+
+
+class SvxUnoNumberingRulesCompare : public ::cppu::WeakAggImplHelper1< ::com::sun::star::ucb::XAnyCompare >
+{
+public:
+ virtual sal_Int16 SAL_CALL compare( const uno::Any& Any1, const uno::Any& Any2 ) throw(uno::RuntimeException);
+};
+
+sal_Int16 SAL_CALL SvxUnoNumberingRulesCompare::compare( const uno::Any& Any1, const uno::Any& Any2 ) throw(uno::RuntimeException)
+{
+ uno::Reference< container::XIndexReplace > x1, x2;
+ Any1 >>= x1;
+ Any2 >>= x2;
+ if( x1.is() && x2.is() )
+ {
+ if( x1.get() == x2.get() )
+ return 0;
+
+ SvxUnoNumberingRules* pRule1 = SvxUnoNumberingRules::getImplementation( x1 );
+ if( pRule1 )
+ {
+ SvxUnoNumberingRules* pRule2 = SvxUnoNumberingRules::getImplementation( x2 );
+ if( pRule2 )
+ {
+ const SvxNumRule& rRule1 = pRule1->getNumRule();
+ const SvxNumRule& rRule2 = pRule2->getNumRule();
+
+
+ const USHORT nLevelCount1 = rRule1.GetLevelCount();
+ const USHORT nLevelCount2 = rRule2.GetLevelCount();
+
+ if( nLevelCount1 == 0 || nLevelCount2 == 0 )
+ return -1;
+
+ USHORT i1 = 0;
+ USHORT i2 = 0;
+
+ if( rRule1.GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING )
+ i1 = 1;
+
+ if( rRule2.GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING )
+ i2 = 1;
+
+ for(; (i1 < nLevelCount1) && (i2 < nLevelCount2); i1++, i2++ )
+ {
+ if( rRule1.GetLevel(i1) != rRule2.GetLevel(i2) )
+ return -1;
+ }
+ return 0;
+ }
+ }
+ }
+
+ return -1;
+}
+
+uno::Reference< ::com::sun::star::ucb::XAnyCompare > SvxCreateNumRuleCompare() throw()
+{
+ return new SvxUnoNumberingRulesCompare();
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unontabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unontabl.cxx
new file mode 100644
index 000000000000..d3f1e72c5eea
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unontabl.cxx
@@ -0,0 +1,318 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <cppuhelper/implbase2.hxx>
+
+#include <bf_svtools/itempool.hxx>
+
+#include <bf_svtools/itemset.hxx>
+
+#include <bf_svtools/svarray.hxx>
+
+#include "eeitem.hxx"
+#include "numitem.hxx"
+#include "unonrule.hxx"
+
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+SV_DECL_PTRARR( ItemSetArray_Impl, SfxItemSet*, 5, 5 )
+
+class SvxUnoNumberingRuleTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XGradientList* mpGradientList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ void CreateName( OUString& rStrName);
+
+public:
+ SvxUnoNumberingRuleTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoNumberingRuleTable() 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.SvxUnoNumberingRuleTable"));
+ }
+
+ 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);
+};
+
+SvxUnoNumberingRuleTable::SvxUnoNumberingRuleTable( SdrModel* pModel ) throw()
+: mpModel( pModel ), mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoNumberingRuleTable::~SvxUnoNumberingRuleTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoNumberingRuleTable::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 sal_True;
+
+ return sal_False;
+}
+
+OUString SAL_CALL SvxUnoNumberingRuleTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoNumberingRuleTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoNumberingRuleTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingRulesTable" ));
+ return aSNS;
+}
+
+
+// XNameContainer
+void SAL_CALL SvxUnoNumberingRuleTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, EE_PARA_NUMBULLET, EE_PARA_NUMBULLET );
+ aItemSetArray.C40_INSERT( ItemSetArray_Impl, mpInSet, aItemSetArray.Count() );
+
+ uno::Reference< container::XIndexReplace > xNumRule;
+ if(aElement >>= xNumRule)
+ {
+ SvxUnoNumberingRules *pNumRules = SvxUnoNumberingRules::getImplementation( xNumRule );
+
+ if( pNumRules )
+ {
+ mpInSet->Put( *(pNumRules->GetNumBulletItem()), EE_PARA_NUMBULLET );
+ return;
+ }
+ }
+
+ throw lang::IllegalArgumentException();
+}
+
+
+
+void SAL_CALL SvxUnoNumberingRuleTable::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 SvxUnoNumberingRuleTable::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 );
+ */
+}
+
+SvxNumBulletItem* SvxGetNumBulletItemByName( SfxItemPool* pPool, const OUString& aName ) throw()
+{
+ if( pPool )
+ {
+ const USHORT nCount = pPool->GetItemCount(EE_PARA_NUMBULLET);
+ SvxNumBulletItem *pItem = NULL, *pSearchItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pSearchItem = (SvxNumBulletItem*)pPool->GetItem(EE_PARA_NUMBULLET, nSurrogate);
+
+ if( pSearchItem && pSearchItem->GetNumRule() && pSearchItem->GetNumRule()->GetLevelCount() && ( pSearchItem->getName() == aName ) )
+ {
+ return pSearchItem;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoNumberingRuleTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ SvxNumBulletItem *pItem = SvxGetNumBulletItemByName( mpPool, aName );
+ if( pItem == NULL )
+ throw container::NoSuchElementException();
+
+ aAny <<= pItem->getUnoNumRule();
+ return aAny;
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoNumberingRuleTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(EE_PARA_NUMBULLET) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ SvxNumBulletItem *pItem;
+
+ USHORT nRealCount = 0;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (SvxNumBulletItem*)mpPool->GetItem(EE_PARA_NUMBULLET, nSurrogate);
+
+ if( pItem && pItem->GetNumRule() && pItem->GetNumRule()->GetLevelCount() )
+ {
+ *pStrings = pItem->getName();
+
+ if( !(*pStrings).getLength() )
+ {
+ CreateName( *pStrings );
+ pItem->setName( String( *pStrings ) );
+ }
+
+ pStrings++;
+ nRealCount++;
+ }
+ }
+
+ if( nRealCount != nCount )
+ aSeq.realloc( nRealCount );
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoNumberingRuleTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(EE_PARA_NUMBULLET) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const SvxNumBulletItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (SvxNumBulletItem*)mpPool->GetItem(EE_PARA_NUMBULLET, nSurrogate);
+ if( pItem && pItem->GetNumRule() && pItem->GetNumRule()->GetLevelCount() && pItem->getName() == aName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoNumberingRuleTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const uno::Reference< container::XIndexAccess >*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoNumberingRuleTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount(EE_PARA_NUMBULLET) != 0;
+}
+
+void SvxUnoNumberingRuleTable::CreateName( OUString& rStrName)
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(EE_PARA_NUMBULLET) : 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 numbering rule table
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoNumberingRuleTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoNumberingRuleTable(pModel);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unopage.cxx b/binfilter/bf_svx/source/unodraw/svx_unopage.cxx
new file mode 100644
index 000000000000..0ef356815aaf
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unopage.cxx
@@ -0,0 +1,777 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef SVX_LIGHT
+#include <sot/clsids.hxx>
+#endif
+
+/*
+*/
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "svdoole2.hxx"
+#include "svdview.hxx"
+#include "unopage.hxx"
+#include "shapeimpl.hxx"
+#include "globl3d.hxx"
+#include "polysc3d.hxx"
+#include "svdopath.hxx"
+#include "svdomeas.hxx"
+
+#include <extrud3d.hxx>
+
+#include <lathe3d.hxx>
+#include <cube3d.hxx>
+#include <sphere3d.hxx>
+#include <polygn3d.hxx>
+
+namespace binfilter {
+
+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;
+
+using rtl::OUString;
+
+#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 * )//STRIP008 ;
+
+extern SfxItemPropertyMap* ImplGetSvxOle2PropertyMap();
+extern SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap();
+
+/**********************************************************************
+* 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);
+}
+
+//----------------------------------------------------------------------
+SvxDrawPage::~SvxDrawPage() throw()
+{
+ // Am Broadcaster abmelden
+ if( pModel )
+ EndListening( *pModel );
+
+ delete pView;
+}
+
+// SfxListener
+
+//----------------------------------------------------------------------
+void SvxDrawPage::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if( pModel )
+ {
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+
+ sal_Bool bInvalid = sal_False;
+
+ if( pSdrHint )
+ {
+ switch( pSdrHint->GetKind() )
+ {
+ case HINT_MODELCLEARED:
+ bInvalid = sal_True;
+ break;
+ case HINT_PAGEORDERCHG:
+ {
+ const SdrPage* pPg=pSdrHint->GetPage();
+ if( pPg == pPage ) // own page?
+ {
+ if(!pPg->IsInserted()) // page removed?
+ bInvalid = sal_True;
+ }
+ }
+ break;
+ }
+ }
+
+ if( bInvalid )
+ {
+ pModel = NULL;
+ delete pView;
+ pView = NULL;
+ }
+ }
+}
+
+// ::com::sun::star::drawing::XShapes
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxDrawPage::add( const Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if( NULL == pShape )
+ return;
+
+ SdrObject *pObj = pShape->GetSdrObject();
+
+ if(!pObj)
+ {
+ pObj = CreateSdrObject( xShape );
+ }
+ else if ( !pObj->IsInserted() )
+ {
+ pObj->SetModel(pModel);
+ pPage->InsertObject( pObj );
+ }
+
+ 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 )
+{
+ SolarMutexGuard aGuard;
+
+ 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)
+ {
+ 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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pPage == NULL)
+ throw uno::RuntimeException();
+
+ if ( Index < 0 || Index >= (sal_Int32)pPage->GetObjCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ SdrObject* pObj = pPage->GetObj( Index );
+ if( pObj == NULL )
+ throw uno::RuntimeException();
+
+
+ return makeAny(Reference< drawing::XShape >( pObj->getUnoShape(), uno::UNO_QUERY ));
+}
+
+
+// ::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 )
+{
+ SolarMutexGuard aGuard;
+
+ 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 )
+ xShapeGroup = Reference< drawing::XShapeGroup >::query( pObj->getUnoShape() );
+ }
+
+ pView->HidePage(pPageView);
+
+ if( pModel )
+ pModel->SetChanged();
+
+ return xShapeGroup;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGroup )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ 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()
+{
+ sal_uInt16 nType;
+ sal_uInt32 nInventor;
+
+ GetTypeAndInventor( nType, nInventor, xShape->getShapeType() );
+ 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 ) );
+
+ // special cases
+ if( nInventor == SdrInventor )
+ {
+ switch( nType )
+ {
+ case OBJ_MEASURE:
+ pNewObj = new SdrMeasureObj( aRect.TopLeft(), aRect.BottomRight() );
+ break;
+ case OBJ_LINE:
+ pNewObj = new SdrPathObj( aRect.TopLeft(), aRect.BottomRight() );
+ break;
+ }
+ }
+
+ if( pNewObj == NULL )
+ 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();
+ }
+ else if(pNewObj->ISA(E3dExtrudeObj))
+ {
+ E3dExtrudeObj* pObj = (E3dExtrudeObj*)pNewObj;
+ Polygon3D aNewP(3);
+ aNewP[0] = Vector3D(0,0,0);
+ aNewP[1] = Vector3D(0,1,0);
+ aNewP[2] = Vector3D(1,0,0);
+
+ // #87922#
+ // To avoid that CreateGeometry(...) sets the DoubleSided
+ // item at once, use a closed poylgon.
+ aNewP.SetClosed(TRUE);
+
+ PolyPolygon3D aNewPP(aNewP);
+ pObj->SetExtrudePolygon(aNewPP);
+
+ // #107245# pObj->SetExtrudeCharacterMode(TRUE);
+ pObj->SetItem(Svx3DCharacterModeItem(sal_True));
+ }
+ else if(pNewObj->ISA(E3dLatheObj))
+ {
+ E3dLatheObj* pObj = (E3dLatheObj*)pNewObj;
+ Polygon3D aNewP(3);
+ aNewP[0] = Vector3D(0,0,0);
+ aNewP[1] = Vector3D(0,1,0);
+ aNewP[2] = Vector3D(1,0,0);
+
+ // #87922#
+ // To avoid that CreateGeometry(...) sets the DoubleSided
+ // item at once, use a closed poylgon.
+ aNewP.SetClosed(TRUE);
+
+ PolyPolygon3D aNewPP(aNewP);
+ pObj->SetPolyPoly3D(aNewPP);
+
+ // #107245# pObj->SetLatheCharacterMode(TRUE);
+ pObj->SetItem(Svx3DCharacterModeItem(sal_True));
+ }
+ }
+ }
+
+ return pNewObj;
+}
+
+//----------------------------------------------------------------------
+void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const OUString& aName ) const throw()
+{
+ sal_uInt32 nTempType = UHashMap::getId( aName );
+
+ if(nTempType & E3D_INVENTOR_FLAG)
+ {
+ rInventor = E3dInventor;
+ rType = (sal_uInt16)(nTempType & ~E3D_INVENTOR_FLAG);
+ }
+ else
+ {
+ rInventor = SdrInventor;
+ rType = (sal_uInt16)nTempType;
+
+ switch( rType )
+ {
+ case OBJ_FRAME:
+ case OBJ_OLE2_PLUGIN:
+ case OBJ_OLE2_APPLET:
+ rType = OBJ_OLE2;
+ break;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj, SvxDrawPage *pPage ) throw()
+{
+ SvxShape* pRet = NULL;
+ switch( nInventor )
+ {
+ case E3dInventor:
+ {
+ if( nType == E3D_COMPOUNDOBJ_ID )
+ {
+ if( pObj->ISA( E3dSphereObj ) )
+ nType = E3D_SPHEREOBJ_ID;
+ else if( pObj->ISA( E3dCubeObj ) )
+ nType = E3D_CUBEOBJ_ID;
+ else if( pObj->ISA( E3dExtrudeObj ) )
+ nType = E3D_EXTRUDEOBJ_ID;
+ else if( pObj->ISA( E3dLatheObj ) )
+ nType = E3D_LATHEOBJ_ID;
+ else if( pObj->ISA( E3dPolygonObj ) )
+ nType = E3D_LATHEOBJ_ID;
+ }
+
+ switch( nType )
+ {
+ case E3D_SCENE_ID :
+ 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
+ DBG_ERROR( "svx::SvxDrawPage::CreateShapeByTypeAndInventor(), unkown 3d-object found!" );
+ 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:
+ pRet = new SvxShapeCaption( pObj );
+ break;
+ case OBJ_TITLETEXT:
+ case OBJ_OUTLINETEXT:
+ case OBJ_TEXT:
+ pRet = new SvxShapeText( pObj );
+ break;
+ case OBJ_GRAF:
+ pRet = new SvxGraphicObject( pObj );
+ break;
+ case OBJ_FRAME:
+#ifndef SVX_LIGHT
+ pRet = new SvxFrameShape( pObj );
+ break;
+#endif
+ case OBJ_OLE2_APPLET:
+#ifndef SVX_LIGHT
+ pRet = new SvxAppletShape( pObj );
+ break;
+#endif
+ case OBJ_OLE2_PLUGIN:
+#ifndef SVX_LIGHT
+ pRet = new SvxPluginShape( pObj );
+ break;
+#endif
+ case OBJ_OLE2:
+ {
+#ifndef SVX_LIGHT
+ if( pObj && !pObj->IsEmptyPresObj() )
+ {
+ SvPersist *pPersist = pPage->GetSdrPage()->GetModel()->GetPersist();
+
+ if( pPersist )
+ {
+ const SvInfoObject *pInfo = pPersist->Find( static_cast< SdrOle2Obj* >( pObj )->GetPersistName() );
+
+ DBG_ASSERT( pInfo, "no info object for OLE object found" );
+
+ // CL->KA: Why is this not working anymore?
+ if( pInfo )
+ {
+
+ const SvGlobalName aClassId( pInfo->GetClassName() );
+ const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID ); //STRIP003
+ const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID ); //STRIP003
+ const SvGlobalName aIFrameClassId( BF_SO3_IFRAME_CLASSID );
+
+ if( aPluginClassId == aClassId )
+ {
+ pRet = new SvxPluginShape( pObj );
+ nType = OBJ_OLE2_PLUGIN;
+ }
+ else if( aAppletClassId == aClassId )
+ {
+ pRet = new SvxAppletShape( pObj );
+ nType = OBJ_OLE2_APPLET;
+ }
+ else if( aIFrameClassId == aClassId )
+ {
+ pRet = new SvxFrameShape( pObj );
+ nType = OBJ_FRAME;
+ }
+ }
+ }
+ }
+#endif
+ if( pRet == NULL )
+ {
+ pRet = new SvxOle2Shape( 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, ImplGetSvxPageShapePropertyMap() );
+ break;
+ case OBJ_MEASURE:
+ pRet = new SvxShapeDimensioning( pObj );
+ break;
+// case OBJ_DUMMY:
+// 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 SvxShapeText( 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_SCENE_ID | E3D_INVENTOR_FLAG:
+ nObjId = E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG;
+ break;
+
+ case OBJ_TITLETEXT:
+ case OBJ_OUTLINETEXT:
+ nObjId = OBJ_TEXT;
+ break;
+ }
+
+ pRet->setShapeKind(nObjId);
+ }
+
+ return pRet;
+}
+
+//----------------------------------------------------------------------
+Reference< drawing::XShape > SvxDrawPage::_CreateShape( SdrObject *pObj ) const throw()
+{
+ Reference< drawing::XShape > 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 );
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unopool.cxx b/binfilter/bf_svx/source/unodraw/svx_unopool.cxx
new file mode 100644
index 000000000000..918f9523c73d
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unopool.cxx
@@ -0,0 +1,409 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <comphelper/propertysetinfo.hxx>
+
+#include <rtl/uuid.h>
+
+#include <vcl/svapp.hxx>
+
+#include "unopool.hxx"
+#include "svdmodel.hxx"
+#include "svdobj.hxx"
+#include "unoshprp.hxx"
+#include "xflbstit.hxx"
+#include "xflbmtit.hxx"
+#include "svdetc.hxx"
+#include "editeng.hxx"
+
+#include "unoapi.hxx"
+#include <memory>
+namespace binfilter {
+
+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 ::cppu;
+
+using rtl::OUString;
+
+SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw()
+: PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( nServiceId ) ), mpModel( pModel )
+{
+ init();
+}
+
+/* deprecated */
+SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel ) throw()
+: PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS ) ), mpModel( pModel )
+{
+ init();
+}
+
+SvxUnoDrawPool::~SvxUnoDrawPool() throw()
+{
+ delete mpDefaultsPool;
+}
+
+void SvxUnoDrawPool::init()
+{
+ mpDefaultsPool = new SdrItemPool(SDRATTR_START, SDRATTR_END );
+ SfxItemPool* pOutlPool=EditEngine::CreatePool();
+ mpDefaultsPool->SetSecondaryPool(pOutlPool);
+
+// mpDefaultsPool = new SdrItemPool( SdrObject::GetGlobalDrawObjectItemPool() );
+ SdrModel::SetTextDefaults( mpDefaultsPool, SdrEngineDefaults::GetFontHeight() );
+ mpDefaultsPool->SetDefaultMetric((SfxMapUnit)SdrEngineDefaults::GetMapUnit());
+ mpDefaultsPool->FreezeIdRanges();
+}
+
+SfxItemPool* SvxUnoDrawPool::getModelPool( sal_Bool bReadOnly ) throw()
+{
+ if( mpModel )
+ {
+ return &mpModel->GetItemPool();
+ }
+ else
+ {
+ if( bReadOnly )
+ return mpDefaultsPool;
+ else
+ return NULL;
+ }
+}
+
+void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, Any& rValue )
+ throw(UnknownPropertyException)
+{
+ switch( pEntry->mnHandle )
+ {
+ case OWN_ATTR_FILLBMP_MODE:
+ {
+ XFillBmpStretchItem* pStretchItem = (XFillBmpStretchItem*)&pPool->GetDefaultItem(XATTR_FILLBMP_STRETCH);
+ XFillBmpTileItem* pTileItem = (XFillBmpTileItem*)&pPool->GetDefaultItem(XATTR_FILLBMP_TILE);
+ if( pTileItem && pTileItem->GetValue() )
+ {
+ rValue <<= drawing::BitmapMode_REPEAT;
+ }
+ else if( pStretchItem && pStretchItem->GetValue() )
+ {
+ rValue <<= drawing::BitmapMode_STRETCH;
+ }
+ else
+ {
+ rValue <<= drawing::BitmapMode_NO_REPEAT;
+ }
+ break;
+ }
+ default:
+ {
+ const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pEntry->mnHandle) : SFX_MAPUNIT_100TH_MM;
+
+ BYTE nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM);
+ if( eMapUnit == SFX_MAPUNIT_100TH_MM )
+ nMemberId &= (~CONVERT_TWIPS);
+
+ pPool->GetDefaultItem( (USHORT)pEntry->mnHandle ).QueryValue( rValue, nMemberId );
+ }
+ }
+
+
+ // check for needed metric translation
+ const SfxMapUnit eMapUnit = pPool->GetMetric((USHORT)pEntry->mnHandle);
+ if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ SvxUnoConvertToMM( eMapUnit, rValue );
+ }
+ // convert int32 to correct enum type if needed
+ else if ( pEntry->mpType->getTypeClass() == TypeClass_ENUM && rValue.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ {
+ sal_Int32 nEnum;
+ rValue >>= nEnum;
+
+ rValue.setValue( &nEnum, *pEntry->mpType );
+ }
+}
+
+void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, const Any& rValue )
+ throw(UnknownPropertyException, IllegalArgumentException)
+{
+ Any aValue( rValue );
+
+ const SfxMapUnit eMapUnit = pPool->GetMetric((USHORT)pEntry->mnHandle);
+ if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ SvxUnoConvertFromMM( eMapUnit, aValue );
+ }
+
+ const sal_uInt16 nWhich = (sal_uInt16)pEntry->mnHandle;
+ switch( nWhich )
+ {
+ case OWN_ATTR_FILLBMP_MODE:
+ do
+ {
+ drawing::BitmapMode eMode;
+ if(!(aValue >>= eMode) )
+ {
+ sal_Int32 nMode;
+ if(!(aValue >>= nMode))
+ throw IllegalArgumentException();
+
+ eMode = (drawing::BitmapMode)nMode;
+ }
+
+ pPool->SetPoolDefaultItem( XFillBmpStretchItem( eMode == drawing::BitmapMode_STRETCH ) );
+ pPool->SetPoolDefaultItem( XFillBmpTileItem( eMode == drawing::BitmapMode_REPEAT ) );
+ return;
+ }
+ while(0);
+ break;
+
+ default:
+ {
+ ::std::auto_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() );
+
+ const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric(nWhich) : SFX_MAPUNIT_100TH_MM;
+
+ BYTE nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM);
+ if( eMapUnit == SFX_MAPUNIT_100TH_MM )
+ nMemberId &= (~CONVERT_TWIPS);
+
+ if( !pNewItem->PutValue( aValue, nMemberId ) )
+ throw IllegalArgumentException();
+
+ pPool->SetPoolDefaultItem( *pNewItem );
+ }
+ }
+}
+
+void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const Any* pValues )
+ throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
+{
+ SolarMutexGuard aGuard;
+
+ SfxItemPool* pPool = getModelPool( sal_False );
+
+ DBG_ASSERT( pPool, "I need a SfxItemPool!" );
+ if( NULL == pPool )
+ throw UnknownPropertyException();
+
+ while( *ppEntries )
+ putAny( pPool, *ppEntries++, *pValues++ );
+}
+
+void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, Any* pValue )
+ throw(UnknownPropertyException, WrappedTargetException )
+{
+ SolarMutexGuard aGuard;
+
+ SfxItemPool* pPool = getModelPool( sal_True );
+
+ DBG_ASSERT( pPool, "I need a SfxItemPool!" );
+ if( NULL == pPool )
+ throw UnknownPropertyException();
+
+ while( *ppEntries )
+ getAny( pPool, *ppEntries++, *pValue++ );
+}
+
+void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, PropertyState* pStates )
+ throw(UnknownPropertyException )
+{
+ SolarMutexGuard aGuard;
+
+ SfxItemPool* pPool = getModelPool( sal_True );
+
+ if( pPool && pPool != mpDefaultsPool )
+ {
+ while( *ppEntries )
+ {
+ const sal_uInt16 nWhich = (sal_uInt16)(*ppEntries)->mnHandle;
+
+ switch( nWhich )
+ {
+ case OWN_ATTR_FILLBMP_MODE:
+ {
+ if( pPool->GetDefaultItem( XATTR_FILLBMP_STRETCH ) == mpDefaultsPool->GetDefaultItem( XATTR_FILLBMP_STRETCH ) ||
+ pPool->GetDefaultItem( XATTR_FILLBMP_TILE ) == mpDefaultsPool->GetDefaultItem( XATTR_FILLBMP_TILE ) )
+ {
+ *pStates = beans::PropertyState_DEFAULT_VALUE;
+ }
+ else
+ {
+ *pStates = beans::PropertyState_DIRECT_VALUE;
+ }
+ }
+ break;
+ default:
+ const SfxPoolItem& r1 = pPool->GetDefaultItem( nWhich );
+ const SfxPoolItem& r2 = mpDefaultsPool->GetDefaultItem( nWhich );
+
+ if( r1 == r2 )
+ {
+ *pStates = PropertyState_DEFAULT_VALUE;
+ }
+ else
+ {
+ *pStates = PropertyState_DIRECT_VALUE;
+ }
+ }
+
+ pStates++;
+ ppEntries++;
+ }
+ }
+ else
+ {
+ // as long as we have no model, all properties are default
+ while( *ppEntries++ )
+ *pStates++ = PropertyState_DEFAULT_VALUE;
+ return;
+ }
+}
+
+void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry )
+ throw(UnknownPropertyException )
+{
+ SolarMutexGuard aGuard;
+
+ SfxItemPool* pPool = getModelPool( sal_True );
+
+ if( pPool && pPool != mpDefaultsPool )
+ pPool->Put( mpDefaultsPool->GetDefaultItem( (USHORT)pEntry->mnHandle ), (USHORT)pEntry->mnHandle );
+}
+
+Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry )
+ throw(UnknownPropertyException, WrappedTargetException )
+{
+ SolarMutexGuard aGuard;
+
+ Any aAny;
+ getAny( mpDefaultsPool, pEntry, aAny );
+ return aAny;
+}
+
+// XInterface
+
+Any SAL_CALL SvxUnoDrawPool::queryInterface( const Type & rType )
+ throw( RuntimeException )
+{
+ return OWeakAggObject::queryInterface( rType );
+}
+
+Any SAL_CALL SvxUnoDrawPool::queryAggregation( const Type & rType )
+ throw(RuntimeException)
+{
+ Any aAny;
+
+ if( rType == ::getCppuType((const Reference< XServiceInfo >*)0) )
+ aAny <<= Reference< XServiceInfo >(this);
+ else if( rType == ::getCppuType((const Reference< XTypeProvider >*)0) )
+ aAny <<= Reference< XTypeProvider >(this);
+ else if( rType == ::getCppuType((const Reference< XPropertySet >*)0) )
+ aAny <<= Reference< XPropertySet >(this);
+ else if( rType == ::getCppuType((const Reference< XPropertyState >*)0) )
+ aAny <<= Reference< XPropertyState >(this);
+ else if( rType == ::getCppuType((const Reference< XMultiPropertySet >*)0) )
+ aAny <<= Reference< XMultiPropertySet >(this);
+ else
+ aAny <<= OWeakAggObject::queryAggregation( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxUnoDrawPool::acquire() throw ( )
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoDrawPool::release() throw ( )
+{
+ OWeakAggObject::release();
+}
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawPool::getTypes()
+ throw (uno::RuntimeException)
+{
+ uno::Sequence< uno::Type > aTypes( 6 );
+ uno::Type* pTypes = aTypes.getArray();
+
+ *pTypes++ = ::getCppuType((const uno::Reference< XAggregation>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< XServiceInfo>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< XTypeProvider>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< XPropertySet>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< XPropertyState>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< XMultiPropertySet>*)0);
+
+ return aTypes;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawPool::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// XServiceInfo
+
+sal_Bool SAL_CALL SvxUnoDrawPool::supportsService( const OUString& ServiceName ) throw(RuntimeException)
+{
+ 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 SvxUnoDrawPool::getImplementationName() throw( RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoDrawPool") );
+}
+
+Sequence< OUString > SAL_CALL SvxUnoDrawPool::getSupportedServiceNames( )
+ throw( RuntimeException )
+{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults" ));
+ return aSNS;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx b/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx
new file mode 100644
index 000000000000..52391dd28f6c
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx
@@ -0,0 +1,1244 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#include <com/sun/star/frame/XModel.hpp>
+
+#include <com/sun/star/util/MeasureUnit.hpp>
+
+#include <vcl/fldunit.hxx>
+
+#include <tools/shl.hxx>
+
+#include <vcl/svapp.hxx>
+#include <sal/macros.h>
+
+#include <hash_map>
+
+#include <comphelper/propertysetinfo.hxx>
+
+#include "dialmgr.hxx"
+
+#include "unoshprp.hxx"
+#include "svdobj.hxx"
+#include "globl3d.hxx"
+#include "dialogs.hrc"
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+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
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aShapePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap()
+{
+ static SfxItemPropertyMap aTextShapePropertyMap_Impl[] =
+ {
+ EDGERADIUS_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES_NO_SHEAR
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aTextShapePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap()
+{
+ 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
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aConnectorPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap()
+{
+ 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
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aDimensioningPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxCirclePropertyMap()
+{
+ 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
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aCirclePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap()
+{
+ static SfxItemPropertyMap aPolyPolygonPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0 },
+ SPECIAL_POLYGON_PROPERTIES
+ SPECIAL_POLYPOLYGON_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aPolyPolygonPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap()
+{
+ static SfxItemPropertyMap aPolyPolygonBezierPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0 },
+ SPECIAL_POLYGON_PROPERTIES
+ SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aPolyPolygonBezierPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap()
+{
+ static SfxItemPropertyMap aGraphicObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_GRAPHOBJ_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES_NO_SHEAR
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ { MAP_CHAR_LEN("IsMirrored"), OWN_ATTR_MIRRORED , &::getCppuBooleanType(), 0, 0},
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aGraphicObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap()
+{
+ 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,0}
+ };
+
+ return a3DSceneObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap()
+{
+ 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
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return a3DCubeObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap()
+{
+ 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
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+ return a3DSphereObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap()
+{
+ static SfxItemPropertyMap a3DLatheObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DLATHEOBJECT_PROPERTIES
+
+ // #107245# New 3D properties which are possible for lathe and extrude 3d objects
+ SPECIAL_3DLATHEANDEXTRUDEOBJ_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
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return a3DLatheObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap()
+{
+ static SfxItemPropertyMap a3DExtrudeObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
+
+ // #107245# New 3D properties which are possible for lathe and extrude 3d objects
+ SPECIAL_3DLATHEANDEXTRUDEOBJ_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
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return a3DExtrudeObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap()
+{
+ 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
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return a3DPolygonObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxAllPropertyMap()
+{
+ static SfxItemPropertyMap aAllPropertyMap_Impl[] =
+ {
+ SHADOW_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ FILL_PROPERTIES
+ EDGERADIUS_PROPERTIES
+ TEXT_PROPERTIES
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SPECIAL_CONNECTOR_PROPERTIES
+ SPECIAL_DIMENSIONING_PROPERTIES
+ SPECIAL_CIRCLE_PROPERTIES
+ SPECIAL_POLYGON_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
+
+ // #107245# New 3D properties which are possible for lathe and extrude 3d objects
+ SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
+
+ SPECIAL_3DBACKSCALE_PROPERTIES
+ SPECIAL_3DPOLYGONOBJECT_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aAllPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxGroupPropertyMap()
+{
+ static SfxItemPropertyMap aGroupPropertyMap_Impl[] =
+ {
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ {0,0,0,0,0,0}
+ };
+
+ return aGroupPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxOle2PropertyMap()
+{
+ static SfxItemPropertyMap aOle2PropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct ::com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { 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("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 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 },
+ { MAP_CHAR_LEN("IsInternal"), OWN_ATTR_INTERNAL_OLE , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aOle2PropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxPluginPropertyMap()
+{
+ static SfxItemPropertyMap aPluginPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("PluginCommands"), OWN_ATTR_PLUGIN_COMMANDS , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0},
+ { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct ::com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { 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("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aPluginPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxFramePropertyMap()
+{
+ static SfxItemPropertyMap aFramePropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("FrameIsAutoScroll"), OWN_ATTR_FRAME_ISAUTOSCROLL , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
+ { MAP_CHAR_LEN("FrameIsBorder"), OWN_ATTR_FRAME_ISBORDER , &::getBooleanCppuType() , 0, 0},
+ { MAP_CHAR_LEN("FrameMarginWidth"), OWN_ATTR_FRAME_MARGIN_WIDTH , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("FrameMarginHeight"), OWN_ATTR_FRAME_MARGIN_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct ::com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { 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("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aFramePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxAppletPropertyMap()
+{
+ static SfxItemPropertyMap aAppletPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("AppletCode"), OWN_ATTR_APPLET_CODE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
+ { MAP_CHAR_LEN("AppletCommands"), OWN_ATTR_APPLET_COMMANDS , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0},
+ { MAP_CHAR_LEN("AppletIsScript"), OWN_ATTR_APPLET_ISSCRIPT , &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct ::com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { 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("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aAppletPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap()
+{
+ static SfxItemPropertyMap aControlPropertyMap_Impl[] =
+ {
+ // the following properties are mapped to the XControl Model of this shape
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT), 0, &::getCppuType((const float*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE), 0, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), 0, &::getCppuType((const float*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), 0, &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("CharRelief"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN("CharUnderlineColor"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("CharKerning"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN("CharWordMode"), 0, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN("ControlBackground"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("ControlBorder"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN("ControlTextEmphasis"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ // the following properties are handled by SvxShape
+ { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct ::com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 },
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { 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("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aControlPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap()
+{
+ static SfxItemPropertyMap aPageShapePropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct ::com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ { 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_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aPageShapePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap()
+{
+ static SfxItemPropertyMap aCaptionPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT, &::getCppuType((const ::com::sun::star::awt::Point*)0), 0, 0 },
+ { MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE, &::getCppuType((const sal_Int16*)0), 0, 0},
+ { MAP_CHAR_LEN("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE, &::getBooleanCppuType(), 0, 0},
+ { MAP_CHAR_LEN("CaptionAngle"), SDRATTR_CAPTIONANGLE, &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("CaptionGap"), SDRATTR_CAPTIONGAP, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
+ { MAP_CHAR_LEN("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR, &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL, &::getBooleanCppuType(), 0, 0},
+ { MAP_CHAR_LEN("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL, &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
+ { MAP_CHAR_LEN("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
+ { MAP_CHAR_LEN("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN, &::getBooleanCppuType(), 0, 0},
+ EDGERADIUS_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ // #FontWork#
+ FONTWORK_PROPERTIES
+ { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+ return aCaptionPropertyMap_Impl;
+}
+
+comphelper::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap()
+{
+ static comphelper::PropertyMapEntry aSvxDrawingDefaultsPropertyMap_Impl[] =
+ {
+ SHADOW_PROPERTIES
+ LINE_PROPERTIES_DEFAULTS
+ FILL_PROPERTIES_BMP
+ FILL_PROPERTIES_DEFAULTS
+ EDGERADIUS_PROPERTIES
+ TEXT_PROPERTIES_DEFAULTS
+ CONNECTOR_PROPERTIES
+ SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
+ MISC_3D_OBJ_PROPERTIES
+ SPECIAL_3DBACKSCALE_PROPERTIES
+ {0,0,0,0,0,0}
+ };
+
+ return aSvxDrawingDefaultsPropertyMap_Impl;
+}
+
+
+/***********************************************************************
+* class UHashMap *
+***********************************************************************/
+
+typedef ::std::hash_map< rtl::OUString, sal_uInt32, rtl::OUStringHash > UHashMapImpl;
+
+namespace {
+ static const UHashMapImpl &GetUHashImpl()
+ {
+ static UHashMapImpl aImpl(63);
+ static bool bInited = false;
+ if (!bInited) {
+ struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = {
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG }
+ };
+ for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(aInit); i++)
+ aImpl[rtl::OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id;
+ bInited = true;
+ }
+ return aImpl;
+ }
+}
+
+//----------------------------------------------------------------------
+rtl::OUString UHashMap::getNameFromId(sal_uInt32 nId)
+{
+ const UHashMapImpl &rMap = GetUHashImpl();
+
+ for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); it++)
+ {
+ if (it->second == nId)
+ return it->first;
+ }
+ DBG_ERROR("[CL] unknown SdrObjekt identifier");
+ return rtl::OUString();
+}
+
+uno::Sequence< OUString > UHashMap::getServiceNames()
+{
+ const UHashMapImpl &rMap = GetUHashImpl();
+
+ int i = 0;
+ uno::Sequence< OUString > aSeq( rMap.size() );
+ OUString* pStrings = aSeq.getArray();
+
+ for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); it++)
+ pStrings[i++] = it->first;
+
+ return aSeq;
+}
+
+UINT32 UHashMap::getId( const OUString& rCompareString )
+{
+ const UHashMapImpl &rMap = GetUHashImpl();
+ UHashMapImpl::const_iterator it = rMap.find( rCompareString );
+ if( it == rMap.end() )
+ return UHASHMAP_NOTFOUND;
+ else
+ return it->second;
+}
+
+/***********************************************************************
+* class SvxUnoPropertyMapProvider *
+***********************************************************************/
+
+SvxUnoPropertyMapProvider aSvxMapProvider;
+
+EXTERN_C
+#ifdef WNT
+int _cdecl
+#else
+int
+#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;
+ case SVXMAP_CAPTION: aMapArr[SVXMAP_CAPTION]=ImplGetSvxCaptionPropertyMap(); break;
+ case SVXMAP_OLE2: aMapArr[SVXMAP_OLE2]=ImplGetSvxOle2PropertyMap(); break;
+ case SVXMAP_PLUGIN: aMapArr[SVXMAP_PLUGIN]=ImplGetSvxPluginPropertyMap(); break;
+ case SVXMAP_FRAME: aMapArr[SVXMAP_FRAME]=ImplGetSvxFramePropertyMap(); break;
+ case SVXMAP_APPLET: aMapArr[SVXMAP_APPLET]=ImplGetSvxAppletPropertyMap(); break;
+ case SVXMAP_CONTROL: aMapArr[SVXMAP_CONTROL]=ImplGetSvxControlShapePropertyMap(); break;
+ case SVXMAP_TEXT: aMapArr[SVXMAP_TEXT]=ImplGetSvxTextShapePropertyMap(); 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 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 );
+}
+
+/** maps the vcl MapUnit enum to a API constant MeasureUnit.
+ Returns false if conversion is not supported.
+*/
+sal_Bool SvxMapUnitToMeasureUnit( const short eVcl, short& eApi ) throw()
+{
+ switch( eVcl )
+ {
+ case MAP_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
+ case MAP_10TH_MM: eApi = util::MeasureUnit::MM_10TH; break;
+ case MAP_MM: eApi = util::MeasureUnit::MM; break;
+ case MAP_CM: eApi = util::MeasureUnit::CM; break;
+ case MAP_1000TH_INCH: eApi = util::MeasureUnit::INCH_1000TH; break;
+ case MAP_100TH_INCH: eApi = util::MeasureUnit::INCH_100TH; break;
+ case MAP_10TH_INCH: eApi = util::MeasureUnit::INCH_10TH; break;
+ case MAP_INCH: eApi = util::MeasureUnit::INCH; break;
+ case MAP_POINT: eApi = util::MeasureUnit::POINT; break;
+ case MAP_TWIP: eApi = util::MeasureUnit::TWIP; break;
+ case MAP_RELATIVE: eApi = util::MeasureUnit::PERCENT; break;
+ default:
+ return false;
+ }
+
+ return true;
+}
+
+/** maps the API constant MeasureUnit to a vcl MapUnit enum.
+ Returns false if conversion is not supported.
+*/
+
+sal_Bool SvxMeasureUnitToFieldUnit( const short eApi, short& eVcl ) throw()
+{
+ switch( eApi )
+ {
+ case util::MeasureUnit::MM: eVcl = FUNIT_MM; break;
+ case util::MeasureUnit::CM: eVcl = FUNIT_CM; break;
+ case util::MeasureUnit::M: eVcl = FUNIT_M; break;
+ case util::MeasureUnit::KM: eVcl = FUNIT_KM; break;
+ case util::MeasureUnit::TWIP: eVcl = FUNIT_TWIP; break;
+ case util::MeasureUnit::POINT: eVcl = FUNIT_POINT; break;
+ case util::MeasureUnit::PICA: eVcl = FUNIT_PICA; break;
+ case util::MeasureUnit::INCH: eVcl = FUNIT_INCH; break;
+ case util::MeasureUnit::FOOT: eVcl = FUNIT_FOOT; break;
+ case util::MeasureUnit::MILE: eVcl = FUNIT_MILE; break;
+ case util::MeasureUnit::PERCENT: eVcl = FUNIT_PERCENT; break;
+ case util::MeasureUnit::MM_100TH: eVcl = FUNIT_100TH_MM; break;
+ default:
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+/** maps the vcl MapUnit enum to a API constant MeasureUnit.
+ Returns false if conversion is not supported.
+*/
+sal_Bool SvxFieldUnitToMeasureUnit( const short eVcl, short& eApi ) throw()
+{
+ switch( eVcl )
+ {
+ case FUNIT_MM: eApi = util::MeasureUnit::MM; break;
+ case FUNIT_CM: eApi = util::MeasureUnit::CM; break;
+ case FUNIT_M: eApi = util::MeasureUnit::M; break;
+ case FUNIT_KM: eApi = util::MeasureUnit::KM; break;
+ case FUNIT_TWIP: eApi = util::MeasureUnit::TWIP; break;
+ case FUNIT_POINT: eApi = util::MeasureUnit::POINT; break;
+ case FUNIT_PICA: eApi = util::MeasureUnit::PICA; break;
+ case FUNIT_INCH: eApi = util::MeasureUnit::INCH; break;
+ case FUNIT_FOOT: eApi = util::MeasureUnit::FOOT; break;
+ case FUNIT_MILE: eApi = util::MeasureUnit::MILE; break;
+ case FUNIT_PERCENT: eApi = util::MeasureUnit::PERCENT; break;
+ case FUNIT_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
+ default:
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResIds, int& nCount ) throw()
+{
+ switch( nWhich )
+ {
+ case XATTR_FILLBITMAP:
+ nApiResIds = RID_SVXSTR_BMP_DEF_START;
+ nIntResIds = RID_SVXSTR_BMP_START;
+ nCount = RID_SVXSTR_BMP_DEF_END - RID_SVXSTR_BMP_DEF_START + 1;
+ break;
+
+ case XATTR_LINEDASH:
+ nApiResIds = RID_SVXSTR_DASH_DEF_START;
+ nIntResIds = RID_SVXSTR_DASH_START;
+ nCount = RID_SVXSTR_DASH_DEF_END - RID_SVXSTR_DASH_DEF_START + 1;
+ break;
+
+ case XATTR_LINESTART:
+ case XATTR_LINEEND:
+ nApiResIds = RID_SVXSTR_LEND_DEF_START;
+ nIntResIds = RID_SVXSTR_LEND_START;
+ nCount = RID_SVXSTR_LEND_DEF_END - RID_SVXSTR_LEND_DEF_START + 1;
+ break;
+
+ case XATTR_FILLGRADIENT:
+ nApiResIds = RID_SVXSTR_GRDT_DEF_START;
+ nIntResIds = RID_SVXSTR_GRDT_START;
+ nCount = RID_SVXSTR_GRDT_DEF_END - RID_SVXSTR_GRDT_DEF_START + 1;
+ break;
+
+ case XATTR_FILLHATCH:
+ nApiResIds = RID_SVXSTR_HATCH_DEF_START;
+ nIntResIds = RID_SVXSTR_HATCH_START;
+ nCount = RID_SVXSTR_HATCH_DEF_END - RID_SVXSTR_HATCH_DEF_START + 1;
+ break;
+
+ case XATTR_FILLFLOATTRANSPARENCE:
+ nApiResIds = RID_SVXSTR_TRASNGR_DEF_START;
+ nIntResIds = RID_SVXSTR_TRASNGR_START;
+ nCount = RID_SVXSTR_TRASNGR_DEF_END - RID_SVXSTR_TRASNGR_DEF_START + 1;
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, String& rString ) throw()
+{
+ // first, calculate the search string length without an optional number behind the name
+ int nLength = rString.Len();
+ while( nLength > 0 )
+ {
+ const sal_Unicode nChar = rString.GetChar( nLength - 1 );
+ if( (nChar < '0') || (nChar > '9') )
+ break;
+
+ nLength--;
+ }
+
+ // if we cut off a number, also cut of some spaces
+ if( nLength != rString.Len() )
+ {
+ while( nLength > 0 )
+ {
+ const sal_Unicode nChar = rString.GetChar( nLength - 1 );
+ if( nChar != ' ' )
+ break;
+
+ nLength--;
+ }
+ }
+
+ const String aShortString( rString.Copy( 0, nLength ) );
+
+ int i;
+ for( i = 0; i < nCount; i++ )
+ {
+ USHORT nResId = (USHORT)(nSourceResIds + i);
+ const ResId aRes( SVX_RES(nResId));
+ const String aCompare( aRes );
+ if( aShortString == aCompare )
+ {
+ USHORT nNewResId = (USHORT)(nDestResIds + i);
+ ResId aNewRes( SVX_RES( nNewResId ));
+ rString.Replace( 0, aShortString.Len(), String( aNewRes ) );
+ return TRUE;
+ }
+ else if( rString == aCompare )
+ {
+ USHORT nNewResId = (USHORT)(nDestResIds + i);
+ ResId aNewRes( SVX_RES( nNewResId ));
+ rString = String( aNewRes );
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static USHORT __READONLY_DATA SvxUnoColorNameDefResId[] =
+{
+ 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 SvxUnoColorNameResId[] =
+{
+ 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 SvxUnoConvertResourceString( USHORT* pSourceResIds, USHORT* pDestResIds, int nCount, String& rString ) throw()
+{
+ int i = 0;
+
+ for( i = 0; i < nCount; i++ )
+ {
+ String aStrDefName = SVX_RESSTR( pSourceResIds[i] );
+ if( rString.Search( aStrDefName ) == 0 )
+ {
+ String aReplace = SVX_RESSTR( pDestResIds[i] );
+ rString.Replace( 0, aStrDefName.Len(), aReplace );
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/** if the given name is a predefined name for the current language it is replaced by
+ the corresponding api name.
+*/
+void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, ::rtl::OUString& rApiName ) throw()
+{
+#ifndef SVX_LIGHT
+ String aNew = rInternalName;
+
+ if( nWhich == XATTR_LINECOLOR )
+ {
+ if( SvxUnoConvertResourceString( (USHORT*)SvxUnoColorNameResId, (USHORT*)SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( USHORT ), aNew ) )
+ {
+ rApiName = aNew;
+ return;
+ }
+ }
+ else
+ {
+ int nApiResIds;
+ int nIntResIds;
+ int nCount;
+
+ if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
+ {
+ if(SvxUnoConvertResourceString( nIntResIds, nApiResIds, nCount, aNew ) )
+ {
+ rApiName = aNew;
+ return;
+ }
+ }
+ }
+#endif
+
+ // just use previous name, if nothing else was found.
+ rApiName = rInternalName;
+}
+
+/** if the given name is a predefined api name it is replaced by the predefined name
+ for the current language.
+*/
+void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const ::rtl::OUString& rApiName, String& rInternalName ) throw()
+{
+#ifndef SVX_LIGHT
+ String aNew = rApiName;
+
+ if( nWhich == XATTR_LINECOLOR )
+ {
+ if( SvxUnoConvertResourceString( (USHORT*)SvxUnoColorNameDefResId, (USHORT*)SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( USHORT ), aNew ) )
+ {
+ rInternalName = aNew;
+ return;
+ }
+ }
+ else
+ {
+ int nApiResIds;
+ int nIntResIds;
+ int nCount;
+
+ if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
+ {
+ if(SvxUnoConvertResourceString( nApiResIds, nIntResIds, nCount, aNew ) )
+ {
+ rInternalName = aNew;
+ return;
+ }
+ }
+ }
+#endif // !SVX_LIGHT
+
+ // just use previous name, if nothing else was found.
+ rInternalName = rApiName;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
+{
+ SolarMutexGuard aGuard;
+
+ if( nServiceId > SVXUNO_SERVICEID_LASTID )
+ {
+ DBG_ERROR( "unknown service id!" );
+ return NULL;
+ }
+
+ if( mpInfos[ nServiceId ] == NULL )
+ {
+ mpInfos[nServiceId] = new comphelper::PropertySetInfo();
+ mpInfos[nServiceId]->acquire();
+
+ switch( nServiceId )
+ {
+ case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS:
+ mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
+ break;
+ case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER:
+ mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
+ mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->remove( OUString( RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION ) ) );
+ break;
+
+ default:
+ DBG_ERROR( "unknown service id!" );
+ }
+ }
+
+ return mpInfos[ nServiceId ];
+}
+
+comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL };
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
new file mode 100644
index 000000000000..0de62108482f
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
@@ -0,0 +1,1785 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#include <com/sun/star/awt/TextAlign.hpp> //added by BerryJia for fixing Bug102407 2002-11-4
+#include <com/sun/star/style/ParagraphAdjust.hpp> //added by BerryJia for fixing Bug102407 2002-11-4
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/drawing/PointSequence.hpp>
+#include <bf_goodies/matrix3d.hxx>
+#include <unotools/localfilehelper.hxx>
+#include <vcl/svapp.hxx>
+#include <bf_svtools/fltcall.hxx>
+#include "impgrf.hxx"
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unopage.hxx"
+#include "svdpage.hxx"
+#include "svdmodel.hxx"
+#include "svdouno.hxx"
+#include "shapeimpl.hxx"
+
+class GDIMetaFile;
+class SvStream;
+
+namespace binfilter {
+
+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 rtl::OUString;
+
+#define INTERFACE_TYPE( xint ) \
+ ::getCppuType((const Reference< xint >*)0)
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const Reference< xint >*)0) ) \
+ aAny <<= Reference< xint >(this)
+
+sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, sal_Bool bPlaceable=sal_True);
+
+/***********************************************************************
+* class SvxShapeGroup *
+***********************************************************************/
+
+SvxShapeGroup::SvxShapeGroup( SdrObject* pSdrObj, SvxDrawPage* pDrawPage ) throw() :
+ SvxShape( pSdrObj, 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 SvxShape::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
+ SvxShape::queryAggregation( rType, aAny );
+
+ return aAny;
+}
+
+void SAL_CALL SvxShapeGroup::acquire() throw ( )
+{
+ SvxShape::acquire();
+}
+
+void SAL_CALL SvxShapeGroup::release() throw ( )
+{
+ SvxShape::release();
+}
+
+uno::Sequence< uno::Type > SAL_CALL SvxShapeGroup::getTypes()
+ throw (uno::RuntimeException)
+{
+ return SvxShape::getTypes();
+}
+
+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;
+}
+
+//----------------------------------------------------------------------
+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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if( pObj != NULL && pPage != NULL && pShape != NULL )
+ {
+ SdrObject* pSdrShape = pShape->GetSdrObject();
+ if( pSdrShape == NULL )
+ pSdrShape = pPage->_CreateSdrObject( xShape );
+
+ if( pSdrShape->IsInserted() )
+ pSdrShape->GetObjList()->RemoveObject( pSdrShape->GetOrdNum() );
+
+ pObj->GetSubList()->InsertObject( pSdrShape );
+
+ // #85922# It makes no sense to set the layer asked
+ // from the group object since these is an iteration
+ // over the contained objects. In consequence, this
+ // statement erases all layer information from the draw
+ // objects. Layers need to be set at draw objects directly
+ // and have nothing to do with grouping at all.
+ // pSdrShape->SetLayer(pObj->GetLayer());
+
+ if(pShape)
+ pShape->Create( pSdrShape, pPage );
+
+ if( pModel )
+ pModel->SetChanged();
+ }
+ else
+ {
+ DBG_ERROR("could not add XShape to group shape!");
+ }
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 sal_uInt32 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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ if( pObj == NULL || pObj->GetSubList() == NULL )
+ throw uno::RuntimeException();
+
+
+ if( pObj->GetSubList()->GetObjCount() <= (sal_uInt32)Index )
+ throw lang::IndexOutOfBoundsException();
+
+ SdrObject* pDestObj = pObj->GetSubList()->GetObj( Index );
+
+ if(pDestObj == NULL)
+ throw lang::IndexOutOfBoundsException();
+
+ Reference< drawing::XShape > xShape( pDestObj->getUnoShape(), uno::UNO_QUERY );
+ uno::Any aAny;
+ aAny <<= xShape;
+ return aAny;
+}
+
+// ::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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ return pObj && pObj->GetSubList() && (pObj->GetSubList()->GetObjCount() > 0);
+}
+
+//----------------------------------------------------------------------
+// ::com::sun::star::lang::XServiceInfo
+
+uno::Sequence< OUString > SAL_CALL SvxShapeGroup::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ return SvxShape::getSupportedServiceNames();
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+SvxShapeConnector::SvxShapeConnector( SdrObject* pSdrObj ) throw() :
+ SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeConnector::~SvxShapeConnector() throw()
+{
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SAL_CALL SvxShapeConnector::queryInterface( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ return SvxShapeText::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeConnector::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( drawing::XConnectorShape );
+ else
+ return SvxShapeText::queryAggregation( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxShapeConnector::acquire() throw ( )
+{
+ SvxShapeText::acquire();
+}
+
+void SAL_CALL SvxShapeConnector::release() throw ( )
+{
+ SvxShapeText::release();
+}
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxShapeConnector::getTypes()
+ throw (uno::RuntimeException)
+{
+ return SvxShape::getTypes();
+}
+
+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 SvxShapeText::getShapeType();
+}
+
+//------------------------------------------------------------------1----
+awt::Point SAL_CALL SvxShapeConnector::getPosition() throw(uno::RuntimeException)
+{
+ return SvxShapeText::getPosition();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::setPosition( const awt::Point& Position ) throw(uno::RuntimeException)
+{
+ SvxShapeText::setPosition(Position);
+}
+
+//----------------------------------------------------------------------
+
+awt::Size SAL_CALL SvxShapeConnector::getSize() throw(uno::RuntimeException)
+{
+ return SvxShapeText::getSize();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::setSize( const awt::Size& rSize )
+ throw(beans::PropertyVetoException, uno::RuntimeException)
+{
+ SvxShapeText::setSize( rSize );
+}
+
+//----------------------------------------------------------------------
+
+// XConnectorShape
+
+void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType nPos ) throw( uno::RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj)
+ pObj->DisconnectFromNode( sal_True );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::disconnectEnd( const uno::Reference< drawing::XConnectableShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+/***********************************************************************
+* class SvxShapeControl *
+***********************************************************************/
+
+
+SvxShapeControl::SvxShapeControl( SdrObject* pSdrObj ) throw() :
+ SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL) )
+{
+ setShapeKind( OBJ_UNO );
+}
+
+//----------------------------------------------------------------------
+SvxShapeControl::~SvxShapeControl() throw()
+{
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeControl::queryInterface( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ return SvxShapeText::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeControl::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( drawing::XControlShape );
+ else
+ return SvxShapeText::queryAggregation( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxShapeControl::acquire() throw ( )
+{
+ SvxShapeText::acquire();
+}
+
+void SAL_CALL SvxShapeControl::release() throw ( )
+{
+ SvxShapeText::release();
+}
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxShapeControl::getTypes()
+ throw (uno::RuntimeException)
+{
+ return SvxShape::getTypes();
+}
+
+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 SvxShapeText::getShapeType();
+}
+
+//------------------------------------------------------------------1----
+awt::Point SAL_CALL SvxShapeControl::getPosition() throw(uno::RuntimeException)
+{
+ return SvxShapeText::getPosition();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeControl::setPosition( const awt::Point& Position ) throw(uno::RuntimeException)
+{
+ SvxShapeText::setPosition(Position);
+}
+
+//----------------------------------------------------------------------
+
+awt::Size SAL_CALL SvxShapeControl::getSize() throw(uno::RuntimeException)
+{
+ return SvxShapeText::getSize();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeControl::setSize( const awt::Size& rSize )
+ throw(beans::PropertyVetoException, uno::RuntimeException)
+{
+ SvxShapeText::setSize( rSize );
+}
+
+//----------------------------------------------------------------------
+// XControlShape
+
+Reference< awt::XControlModel > SAL_CALL SvxShapeControl::getControl()
+ throw( uno::RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ 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 )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+static struct
+{
+ const sal_Char* mpAPIName;
+ sal_uInt16 mnAPINameLen;
+
+ const sal_Char* mpFormName;
+ sal_uInt16 mnFormNameLen;
+}
+SvxShapeControlPropertyMapping[] =
+{
+ // Warning: The first entry must be FontSlant because the any needs to be converted
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE), MAP_CHAR_LEN("FontSlant") }, // const sal_Int16 => ::com::sun::star::awt::FontSlant
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), MAP_CHAR_LEN("FontName") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME), MAP_CHAR_LEN("FontStyleName") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY), MAP_CHAR_LEN("FontFamily") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET), MAP_CHAR_LEN("FontCharset") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT), MAP_CHAR_LEN("FontHeight") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH), MAP_CHAR_LEN("FontPitch" ) },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), MAP_CHAR_LEN("FontWeight" ) },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), MAP_CHAR_LEN("FontUnderline") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), MAP_CHAR_LEN("FontStrikeout") },
+ { MAP_CHAR_LEN("CharKerning"), MAP_CHAR_LEN("FontKerning") },
+ { MAP_CHAR_LEN("CharWordMode"), MAP_CHAR_LEN("FontWordLineMode" ) },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), MAP_CHAR_LEN("TextColor") },
+ { MAP_CHAR_LEN("CharRelief"), MAP_CHAR_LEN("FontRelief") },
+ { MAP_CHAR_LEN("CharUnderlineColor"), MAP_CHAR_LEN("TextLineColor") },
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST), MAP_CHAR_LEN("Align") },
+ { MAP_CHAR_LEN("ControlBackground"), MAP_CHAR_LEN("BackgroundColor") },
+ { MAP_CHAR_LEN("ControlBorder"), MAP_CHAR_LEN("Border") },
+ { MAP_CHAR_LEN("ControlTextEmphasis"), MAP_CHAR_LEN("FontEmphasisMark") },
+ { NULL,0, NULL, 0 }
+};
+
+void SvxShapeControl::convertPropertyName( const OUString& rApiName, OUString& rInternalName, sal_Bool& rNeedsConversion )
+{
+ sal_uInt16 i = 0;
+ while( SvxShapeControlPropertyMapping[i].mpAPIName )
+ {
+ if( rApiName.reverseCompareToAsciiL( SvxShapeControlPropertyMapping[i].mpAPIName, SvxShapeControlPropertyMapping[i].mnAPINameLen ) == 0 )
+ {
+ rInternalName = OUString( SvxShapeControlPropertyMapping[i].mpFormName, SvxShapeControlPropertyMapping[i].mnFormNameLen, RTL_TEXTENCODING_ASCII_US );
+ rNeedsConversion = i == 0;
+ }
+ i++;
+ }
+}
+
+//added by BerryJia for fixing Bug102407 2002-11-04
+static struct
+{
+ sal_Int16 nAPIValue;
+ sal_Int16 nFormValue;
+}
+SvxShapeControlPropertyValueMapping[] =
+{
+ // note that order matters:
+ // valueAlignToParaAdjust and valueParaAdjustToAlign search this map from the _beginning_
+ // and use the first matching entry
+ {style::ParagraphAdjust_LEFT, (sal_Int16)awt::TextAlign::LEFT},
+ {style::ParagraphAdjust_CENTER, (sal_Int16)awt::TextAlign::CENTER},
+ {style::ParagraphAdjust_RIGHT, (sal_Int16)awt::TextAlign::RIGHT},
+ {style::ParagraphAdjust_BLOCK, (sal_Int16)awt::TextAlign::RIGHT},
+ {style::ParagraphAdjust_STRETCH, (sal_Int16)awt::TextAlign::LEFT},
+ {style::ParagraphAdjust_MAKE_FIXED_SIZE,(sal_Int16)awt::TextAlign::LEFT},
+ {-1,-1}
+};
+
+void SvxShapeControl::valueAlignToParaAdjust(Any& rValue)
+{
+ sal_Int16 nValue;
+ rValue >>= nValue;
+ sal_uInt16 i = 0;
+ while (-1 != SvxShapeControlPropertyValueMapping[i].nFormValue)
+ {
+ if (nValue == SvxShapeControlPropertyValueMapping[i].nFormValue)
+ {
+ rValue <<= (SvxShapeControlPropertyValueMapping[i].nAPIValue);
+ return;
+ }
+ i++;
+ }
+}
+
+void SvxShapeControl::valueParaAdjustToAlign(Any& rValue)
+{
+ sal_Int32 nValue;
+ rValue >>= nValue;
+ sal_uInt16 i = 0;
+ while (-1 != SvxShapeControlPropertyValueMapping[i].nAPIValue)
+ {
+ if ( nValue == SvxShapeControlPropertyValueMapping[i].nAPIValue)
+ {
+ rValue <<= (SvxShapeControlPropertyValueMapping[i].nFormValue);
+ return;
+ }
+ i++;
+ }
+}
+
+void SAL_CALL SvxShapeControl::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)
+{
+ OUString aFormsName;
+ sal_Bool bNeedConversion;
+
+ convertPropertyName( aPropertyName, aFormsName, bNeedConversion );
+ if( aFormsName.getLength() )
+ {
+ uno::Reference< beans::XPropertySet > xControl( getControl(), uno::UNO_QUERY );
+ if( xControl.is() )
+ {
+ uno::Reference< beans::XPropertySetInfo > xInfo( xControl->getPropertySetInfo() );
+ if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) )
+ {
+ if( bNeedConversion )
+ {
+ awt::FontSlant nSlant;
+ if( !(aValue >>= nSlant ) )
+ throw lang::IllegalArgumentException();
+
+ xControl->setPropertyValue( aFormsName, uno::makeAny( (sal_Int16)nSlant ) );
+ }
+ else
+ {
+ //modified by BerryJia for fixing Bug102407 2002-11-4
+ Any rValue;
+ rValue = aValue;
+ if (::rtl::OUString::createFromAscii("Align") == aFormsName)
+ valueParaAdjustToAlign(rValue);
+ xControl->setPropertyValue( aFormsName, rValue );
+ }
+ }
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue( aPropertyName, aValue );
+ }
+}
+
+uno::Any SAL_CALL SvxShapeControl::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OUString aFormsName;
+ sal_Bool bNeedConversion;
+
+ convertPropertyName( aPropertyName, aFormsName, bNeedConversion );
+ if( aFormsName.getLength() )
+ {
+ uno::Reference< beans::XPropertySet > xControl( getControl(), uno::UNO_QUERY );
+
+ if( xControl.is() )
+ {
+ uno::Reference< beans::XPropertySetInfo > xInfo( xControl->getPropertySetInfo() );
+ if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) )
+ {
+ if( bNeedConversion )
+ {
+ sal_Int16 nSlant;
+ xControl->getPropertyValue( aFormsName ) >>= nSlant;
+ return uno::makeAny( (awt::FontSlant)nSlant );
+ }
+ else
+ {
+ //modified by BerryJia for fixing Bug102407 2002-11-4
+ Any rValue;
+ rValue = xControl->getPropertyValue( aFormsName );
+ if (::rtl::OUString::createFromAscii("Align") == aFormsName)
+ valueAlignToParaAdjust(rValue);
+ return rValue;
+ }
+ }
+ }
+
+ uno::Any aAny;
+ return aAny;
+ }
+ else
+ {
+ return SvxShape::getPropertyValue( aPropertyName );
+ }
+
+}
+
+// XPropertyState
+beans::PropertyState SAL_CALL SvxShapeControl::getPropertyState( const ::rtl::OUString& PropertyName ) throw( beans::UnknownPropertyException, uno::RuntimeException )
+{
+ OUString aFormsName;
+ sal_Bool bNeedConversion;
+
+ convertPropertyName( PropertyName, aFormsName, bNeedConversion );
+ if( aFormsName.getLength() )
+ {
+ uno::Reference< beans::XPropertyState > xControl( getControl(), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xPropSet( getControl(), uno::UNO_QUERY );
+
+ if( xControl.is() && xPropSet.is() )
+ {
+ uno::Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
+ if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) )
+ {
+ return xControl->getPropertyState( aFormsName );
+ }
+ }
+
+ return beans::PropertyState_DEFAULT_VALUE;
+ }
+ else
+ {
+ return SvxShape::getPropertyState( PropertyName );
+ }
+}
+
+void SAL_CALL SvxShapeControl::setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw( beans::UnknownPropertyException, uno::RuntimeException )
+{
+ OUString aFormsName;
+ sal_Bool bNeedConversion;
+
+ convertPropertyName( PropertyName, aFormsName, bNeedConversion );
+ if( aFormsName.getLength() )
+ {
+ uno::Reference< beans::XPropertyState > xControl( getControl(), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xPropSet( getControl(), uno::UNO_QUERY );
+
+ if( xControl.is() && xPropSet.is() )
+ {
+ uno::Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
+ if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) )
+ {
+ xControl->setPropertyToDefault( aFormsName );
+ }
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyToDefault( PropertyName );
+ }
+}
+
+uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const ::rtl::OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OUString aFormsName;
+ sal_Bool bNeedConversion;
+
+ convertPropertyName( aPropertyName, aFormsName, bNeedConversion );
+ if( aFormsName.getLength() )
+ {
+ uno::Reference< beans::XPropertyState > xControl( getControl(), uno::UNO_QUERY );
+
+ if( xControl.is() )
+ {
+ if( bNeedConversion )
+ {
+ sal_Int16 nSlant;
+ xControl->getPropertyDefault( aFormsName ) >>= nSlant;
+
+ return uno::makeAny( (awt::FontSlant)nSlant );
+ }
+ else
+ {
+ return xControl->getPropertyDefault( aFormsName );
+ }
+ }
+
+ throw beans::UnknownPropertyException();
+ }
+ else
+ {
+ return SvxShape::getPropertyDefault( aPropertyName );
+ }
+}
+
+
+/***********************************************************************
+* class SvxShapeDimensioning *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+SvxShapeDimensioning::SvxShapeDimensioning( SdrObject* pSdrObj ) throw()
+: SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeDimensioning::~SvxShapeDimensioning() throw()
+{
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapeDimensioning::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+SvxShapeCircle::SvxShapeCircle( SdrObject* pSdrObj ) throw()
+: SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeCircle::~SvxShapeCircle() throw()
+{
+}
+
+// ::com::sun::star::lang::XServiceInfo
+// XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapeCircle::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+}//namespace binfilter
+#include "svdopath.hxx"
+namespace binfilter {//STRIP009
+//----------------------------------------------------------------------
+SvxShapePolyPolygon::SvxShapePolyPolygon( SdrObject* pSdrObj , drawing::PolygonKind eNew )
+ throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException)
+: SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON) ),
+ ePolygonKind( eNew )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapePolyPolygon::~SvxShapePolyPolygon() throw()
+{
+}
+
+void SAL_CALL ImplSvxPolyPolygonToPointSequenceSequence( const drawing::PointSequenceSequence* pOuterSequence, XPolyPolygon& rNewPolyPolygon ) throw()
+{
+ // Koordinaten in das PolyPolygon packen
+ // Zeiger auf innere sequences holen
+ const drawing::PointSequence* pInnerSequence = pOuterSequence->getConstArray();
+ const drawing::PointSequence* pInnerSeqEnd = pInnerSequence + pOuterSequence->getLength();
+
+ // #85920# Clear the given polygon, since the new one shall be SET, not ADDED
+ rNewPolyPolygon.Clear();
+
+ for(;pInnerSequence != pInnerSeqEnd;++pInnerSequence)
+ {
+ sal_Int32 nInnerSequenceCount = pInnerSequence->getLength();
+
+ // Neues XPolygon vorbereiten
+ XPolygon aNewPolygon((USHORT)nInnerSequenceCount);
+
+ // Zeiger auf Arrays holen
+ const awt::Point* pArray = pInnerSequence->getConstArray();
+ const awt::Point* pArrayEnd = pArray + nInnerSequenceCount;
+
+ for(USHORT b=0;pArray != pArrayEnd;++b,++pArray)
+ {
+ Point& rPoint = aNewPolygon[b];
+ rPoint.X() = pArray->X;
+ rPoint.Y() = pArray->Y;
+ }
+
+ // Neues Teilpolygon einfuegen
+ rNewPolyPolygon.Insert(aNewPolygon);
+ }
+}
+
+//----------------------------------------------------------------------
+
+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)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGON)))
+ {
+ if( !aValue.getValue() || aValue.getValueType() != ::getCppuType((const drawing::PointSequenceSequence*)0) )
+ throw lang::IllegalArgumentException();
+
+ XPolyPolygon aNewPolyPolygon;
+
+ ImplSvxPolyPolygonToPointSequenceSequence( (drawing::PointSequenceSequence*)aValue.getValue(), aNewPolyPolygon );
+
+ SetPolygon(aNewPolyPolygon);
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Geometry")))
+ {
+ if( !aValue.getValue() || aValue.getValueType() != ::getCppuType((const drawing::PointSequenceSequence*)0) )
+ throw lang::IllegalArgumentException();
+
+ if( pObj )
+ {
+ XPolyPolygon aNewPolyPolygon;
+ Matrix3D aMatrix3D;
+
+ pObj->TRGetBaseGeometry(aMatrix3D, aNewPolyPolygon);
+
+ ImplSvxPolyPolygonToPointSequenceSequence( (drawing::PointSequenceSequence*)aValue.getValue(), aNewPolyPolygon );
+
+ pObj->TRSetBaseGeometry(aMatrix3D, aNewPolyPolygon);
+ }
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGON)))
+ {
+ 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((USHORT)nSequenceCount);
+
+ // Zeiger auf Arrays holen
+ awt::Point* pArray = pSequence->getArray();
+
+ for(sal_Int32 b=0;b<nSequenceCount;b++)
+ {
+ aNewPolygon[(USHORT)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();
+}
+
+void SAL_CALL ImplSvxPointSequenceSequenceToPolyPolygon( const XPolyPolygon& rPolyPoly, drawing::PointSequenceSequence& rRetval )
+{
+ if( rRetval.getLength() != rPolyPoly.Count() )
+ rRetval.realloc( rPolyPoly.Count() );
+
+ // Zeiger auf aeussere Arrays holen
+ drawing::PointSequence* pOuterSequence = rRetval.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++;
+ }
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SAL_CALL SvxShapePolyPolygon::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGON)))
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ const XPolyPolygon& rPolyPoly = GetPolygon();
+ drawing::PointSequenceSequence aRetval( rPolyPoly.Count() );
+
+ ImplSvxPointSequenceSequenceToPolyPolygon( rPolyPoly, aRetval );
+
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PointSequenceSequence*)0) );
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Geometry")))
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ XPolyPolygon aPolyPoly;
+ Matrix3D aMatrix3D;
+ if( pObj )
+ pObj->TRGetBaseGeometry( aMatrix3D, aPolyPoly );
+
+ drawing::PointSequenceSequence aRetval( aPolyPoly.Count() );
+
+ ImplSvxPointSequenceSequenceToPolyPolygon( aPolyPoly, aRetval );
+
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PointSequenceSequence*)0) );
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGON)))
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ const XPolyPolygon& rPolyPoly = GetPolygon();
+
+ sal_Int32 nCount = 0;
+ if( rPolyPoly.Count() > 0 )
+ nCount = rPolyPoly[0].GetPointCount();
+
+ drawing::PointSequence aRetval( nCount );
+
+ if( nCount > 0 )
+ {
+ // Einzelpolygon holen
+ const XPolygon& rPoly = rPolyPoly[0];
+
+ // Pointer auf arrays holen
+ awt::Point* pSequence = aRetval.getArray();
+
+ for(sal_Int32 b=0;b<nCount;b++)
+ *pSequence++ = awt::Point( rPoly[(USHORT)b].X(), rPoly[(USHORT)b].Y() );
+ }
+
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PointSequence*)0) );
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGONKIND)))
+ {
+ 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()
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj)
+ ((SdrPathObj*)pObj)->SetPathPoly(rNew);
+}
+
+//----------------------------------------------------------------------
+const XPolyPolygon& SvxShapePolyPolygon::GetPolygon() const throw()
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj)
+ return ((SdrPathObj*)pObj)->GetPathPoly();
+ return aEmptyPoly;
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygon::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+/***********************************************************************
+* class SvxShapePolyPolygonBezier *
+***********************************************************************/
+}
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/FlagSequence.hpp>
+namespace binfilter {//STRIP009
+//----------------------------------------------------------------------
+SvxShapePolyPolygonBezier::SvxShapePolyPolygonBezier( SdrObject* pSdrObj , drawing::PolygonKind eNew ) throw()
+: SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER) ),
+ ePolygonKind( eNew )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapePolyPolygonBezier::~SvxShapePolyPolygonBezier() throw()
+{
+}
+
+void SAL_CALL ImplSvxPolyPolygonBezierCoordsToPolyPolygon( drawing::PolyPolygonBezierCoords* pSourcePolyPolygon, XPolyPolygon& rNewPolyPolygon )
+ throw( IllegalArgumentException )
+{
+ sal_Int32 nOuterSequenceCount = pSourcePolyPolygon->Coordinates.getLength();
+ if(pSourcePolyPolygon->Flags.getLength() != nOuterSequenceCount)
+ throw IllegalArgumentException();
+
+ // Zeiger auf innere sequences holen
+ const drawing::PointSequence* pInnerSequence = pSourcePolyPolygon->Coordinates.getConstArray();
+ const drawing::FlagSequence* pInnerSequenceFlags = pSourcePolyPolygon->Flags.getConstArray();
+ sal_Bool bIsCurve(FALSE);
+ sal_Bool bCurveValid(TRUE);
+ sal_Bool bCurveTestActive(FALSE);
+
+ for(sal_Int32 a(0); bCurveValid && a < nOuterSequenceCount; a++)
+ {
+ sal_Int32 nInnerSequenceCount = pInnerSequence->getLength();
+
+ if(pInnerSequenceFlags->getLength() != nInnerSequenceCount)
+ throw IllegalArgumentException();
+
+ // Neues XPolygon vorbereiten
+ XPolygon aNewPolygon((USHORT)nInnerSequenceCount);
+
+ // Zeiger auf Arrays holen
+ const awt::Point* pArray = pInnerSequence->getConstArray();
+ const drawing::PolygonFlags* pArrayFlags = pInnerSequenceFlags->getConstArray();
+
+ for(sal_Int32 b(0); bCurveValid && b < nInnerSequenceCount; b++)
+ {
+ // coordinate data
+ aNewPolygon[(USHORT)b] = Point( pArray->X, pArray->Y );
+ pArray++;
+
+ // flag data
+ XPolyFlags ePolyFlag = (XPolyFlags)((sal_uInt16)*pArrayFlags++);
+
+ // set curve flag
+ if(!bIsCurve && ePolyFlag == XPOLY_CONTROL)
+ bIsCurve = TRUE;
+
+ // curve testing
+ if(bIsCurve && bCurveValid && (bCurveTestActive || ePolyFlag == XPOLY_CONTROL))
+ {
+ if(!bCurveTestActive)
+ {
+ // first control point found, test it
+ if(b == 0)
+ {
+ // no curve startpoint possible
+ bCurveValid = FALSE;
+ }
+ else
+ {
+ // test type of prev point
+ XPolyFlags ePrevPolyFlag = (XPolyFlags)((sal_uInt16)*(pArrayFlags - 2));
+ if(ePrevPolyFlag == XPOLY_CONTROL)
+ {
+ // curve startpoint is a control point,
+ // this is not allowed (three control points in a row)
+ bCurveValid = FALSE;
+ }
+ }
+
+ // next curve test state
+ bCurveTestActive = TRUE;
+ }
+ else
+ {
+ // prev was a valid curve start, this should be the second
+ // curve control point, test it
+ if(ePolyFlag != XPOLY_CONTROL)
+ {
+ // no second curve control point
+ bCurveValid = FALSE;
+ }
+ else if(b == nInnerSequenceCount-1)
+ {
+ // no curve endpoint possible
+ bCurveValid = FALSE;
+ }
+ else
+ {
+ // test type of next point
+ XPolyFlags eNextPolyFlag = (XPolyFlags)((sal_uInt16)*pArrayFlags);
+ if(eNextPolyFlag == XPOLY_CONTROL)
+ {
+ // curve endpoint is the next control point,
+ // this is not allowed (three control points in a row)
+ bCurveValid = FALSE;
+ }
+ }
+
+ // end curve test for this segment
+ bCurveTestActive = FALSE;
+ }
+ }
+
+ aNewPolygon.SetFlags((USHORT)b, ePolyFlag);
+ }
+
+ pInnerSequence++;
+ pInnerSequenceFlags++;
+
+ // Neues Teilpolygon einfuegen
+ rNewPolyPolygon.Insert(aNewPolygon);
+ }
+
+ // throw exception if polygon data is an invalid curve definition
+ if(bIsCurve && !bCurveValid)
+ throw IllegalArgumentException();
+}
+
+//----------------------------------------------------------------------
+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 )
+{
+ ::SolarMutexGuard aGuard;
+
+ if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGONBEZIER)))
+ {
+ if( !aValue.getValue() || aValue.getValueType() != ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) )
+ throw IllegalArgumentException();
+
+ XPolyPolygon aNewPolyPolygon;
+ ImplSvxPolyPolygonBezierCoordsToPolyPolygon( (drawing::PolyPolygonBezierCoords*)aValue.getValue(), aNewPolyPolygon );
+ SetPolygon(aNewPolyPolygon);
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Geometry")))
+ {
+ if( !aValue.getValue() || aValue.getValueType() != ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) )
+ throw IllegalArgumentException();
+
+ if( pObj )
+ {
+ Matrix3D aMatrix3D;
+ XPolyPolygon aNewPolyPolygon;
+
+ pObj->TRGetBaseGeometry(aMatrix3D, aNewPolyPolygon);
+ ImplSvxPolyPolygonBezierCoordsToPolyPolygon( (drawing::PolyPolygonBezierCoords*)aValue.getValue(), aNewPolyPolygon );
+ pObj->TRSetBaseGeometry(aMatrix3D, aNewPolyPolygon);
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+void SAL_CALL ImplSvxPolyPolygonToPolyPolygonBezierCoords( const XPolyPolygon& rPolyPoly, drawing::PolyPolygonBezierCoords& rRetval )
+{
+ // Polygone innerhalb vrobereiten
+ rRetval.Coordinates.realloc((sal_Int32)rPolyPoly.Count());
+ rRetval.Flags.realloc((sal_Int32)rPolyPoly.Count());
+
+ // Zeiger auf aeussere Arrays holen
+ drawing::PointSequence* pOuterSequence = rRetval.Coordinates.getArray();
+ drawing::FlagSequence* pOuterFlags = rRetval.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++;
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapePolyPolygonBezier::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+ uno::Any aAny;
+
+ if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGONBEZIER)))
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ const XPolyPolygon& rPolyPoly = GetPolygon();
+ drawing::PolyPolygonBezierCoords aRetval;
+ ImplSvxPolyPolygonToPolyPolygonBezierCoords(rPolyPoly, aRetval );
+
+ aAny <<= aRetval;
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Geometry")))
+ {
+ if( pObj )
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ XPolyPolygon aPolyPoly;
+ Matrix3D aMatrix3D;
+ pObj->TRGetBaseGeometry( aMatrix3D, aPolyPoly );
+
+ drawing::PolyPolygonBezierCoords aRetval;
+ ImplSvxPolyPolygonToPolyPolygonBezierCoords(aPolyPoly, aRetval );
+
+ aAny <<= aRetval;
+ }
+ }
+ else if(aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGONKIND)))
+ {
+ aAny <<= (drawing::PolygonKind)GetPolygonKind();
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+
+ return aAny;
+}
+
+//----------------------------------------------------------------------
+drawing::PolygonKind SvxShapePolyPolygonBezier::GetPolygonKind() const throw()
+{
+ return ePolygonKind;
+}
+
+//----------------------------------------------------------------------
+void SvxShapePolyPolygonBezier::SetPolygon(const XPolyPolygon& rNew) throw()
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj)
+ ((SdrPathObj*)pObj)->SetPathPoly(rNew);
+}
+
+//----------------------------------------------------------------------
+const XPolyPolygon& SvxShapePolyPolygonBezier::GetPolygon() const throw()
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj)
+ return ((SdrPathObj*)pObj)->GetPathPoly();
+ return aEmptyPoly;
+}
+
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+/***********************************************************************
+* class SvxGraphicObject *
+***********************************************************************/
+}
+#include <vcl/cvtgrf.hxx>
+#include <svdograf.hxx>
+#ifndef SVX_LIGHT
+#include <bf_sfx2/docfile.hxx>
+#include <bf_sfx2/app.hxx>
+#include <bf_sfx2/fcontnr.hxx>
+#endif
+
+#include "toolkit/unohlp.hxx"
+namespace binfilter {//STRIP009
+//----------------------------------------------------------------------
+SvxGraphicObject::SvxGraphicObject( SdrObject* pSdrObj ) throw()
+: SvxShapeText( pSdrObj, 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)
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_FILLBITMAP)))
+ {
+ 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAFURL)))
+ {
+ OUString aURL;
+ if(!(aValue >>= aURL))
+ throw lang::IllegalArgumentException();
+
+ if( aURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) == 0 )
+ {
+ // graphic manager url
+ aURL = aURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 );
+ String aTmpStr(aURL);
+ ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ BfGraphicObject aGrafObj( aUniqueID );
+
+ // #101808# since loading a graphic can cause a reschedule of the office
+ // it is possible that our shape is removed while where in this
+ // method.
+ if( pObj )
+ {
+ ((SdrGrafObj*)pObj)->ReleaseGraphicLink();
+ ((SdrGrafObj*)pObj)->SetGraphicObject( aGrafObj );
+ }
+ }
+ else if( aURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPKGPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPKGPREFIX ) ) != 0 )
+ {
+ // normal link
+ String aFilterName;
+ const SfxFilter* pSfxFilter = NULL;
+ SfxMedium aSfxMedium( aURL, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE );
+
+ SFX_APP()->GetFilterMatcher().GuessFilter( aSfxMedium, &pSfxFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE );
+
+ if( !pSfxFilter )
+ {
+ INetURLObject aURLObj( aURL );
+
+ if( aURLObj.GetProtocol() == INET_PROT_NOT_VALID )
+ {
+ String aValidURL;
+
+ if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aURL, aValidURL ) )
+ aURLObj = INetURLObject( aValidURL );
+ }
+
+ if( aURLObj.GetProtocol() != INET_PROT_NOT_VALID )
+ {
+ GraphicFilter* pGrfFilter = GetGrfFilter();
+ aFilterName = pGrfFilter->GetImportFormatName( pGrfFilter->GetImportFormatNumberForShortName( aURLObj.getExtension() ) );
+ }
+ }
+ else
+ aFilterName = pSfxFilter->GetFilterName();
+
+ // #101808# since loading a graphic can cause a reschedule of the office
+ // it is possible that our shape is removed while where in this
+ // method.
+ if( pObj )
+ ((SdrGrafObj*)pObj)->SetGraphicLink( aURL, aFilterName );
+ }
+ else
+ {
+ }
+
+ }
+ else if( pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL)))
+ {
+ OUString aStreamURL;
+
+ if( !( aValue >>= aStreamURL ) )
+ throw lang::IllegalArgumentException();
+
+
+ if( aStreamURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPKGPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPKGPREFIX ) ) != 0 )
+ {
+ aStreamURL = OUString();
+ }
+
+ ((SdrGrafObj*)pObj)->SetGrafStreamURL( aStreamURL );
+ ((SdrGrafObj*)pObj)->ForceSwapOut();
+ }
+ 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)
+{
+ ::SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_FILLBITMAP)))
+ {
+ 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, sal_False );
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
+ return uno::Any( &aSeq, ::getCppuType(( uno::Sequence< sal_Int8 >*)0) );
+ }
+ }
+ else if( pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAFURL)) )
+ {
+ uno::Any aAny;
+ if( ((SdrGrafObj*)pObj)->IsLinkedGraphic() )
+ {
+ aAny <<= OUString( ((SdrGrafObj*)pObj)->GetFileName() );
+ }
+ else
+ {
+ const BfGraphicObject& 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL)) )
+ {
+ const OUString aStreamURL( ( (SdrGrafObj*) pObj )->GetGrafStreamURL() );
+ uno::Any aAny;
+
+ if( aStreamURL.getLength() )
+ aAny <<= aStreamURL;
+
+ return aAny;
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxGraphicObject::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ return SvxShapeText::getSupportedServiceNames();
+}
+
+
+void SvxConvertPolyPolygonBezierToXPolygon( const drawing::PolyPolygonBezierCoords* pSourcePolyPolygon, XPolygon& rNewPolygon )
+ throw( lang::IllegalArgumentException )
+{
+ sal_Int32 nOuterSequenceCount = pSourcePolyPolygon->Coordinates.getLength();
+ if( nOuterSequenceCount != 1 || pSourcePolyPolygon->Flags.getLength() != nOuterSequenceCount)
+ throw lang::IllegalArgumentException();
+
+ // Zeiger auf innere sequences holen
+ const drawing::PointSequence* pInnerSequence = pSourcePolyPolygon->Coordinates.getConstArray();
+ const drawing::FlagSequence* pInnerSequenceFlags = pSourcePolyPolygon->Flags.getConstArray();
+
+ sal_Int32 nInnerSequenceCount = pInnerSequence->getLength();
+
+ if(pInnerSequenceFlags->getLength() != nInnerSequenceCount)
+ throw lang::IllegalArgumentException();
+
+ // Zeiger auf Arrays holen
+ const awt::Point* pArray = pInnerSequence->getConstArray();
+ const drawing::PolygonFlags* pArrayFlags = pInnerSequenceFlags->getConstArray();
+
+ for(sal_Int32 b=0;b<nInnerSequenceCount;b++)
+ {
+ rNewPolygon[(USHORT)b] = Point( pArray->X, pArray->Y );
+ pArray++;
+ rNewPolygon.SetFlags((USHORT)b, (XPolyFlags)((sal_uInt16)*pArrayFlags++));
+ }
+}
+
+void SvxConvertXPolygonToPolyPolygonBezier( const XPolygon& rPolygon, drawing::PolyPolygonBezierCoords& rRetval ) throw()
+{
+ // Polygone innerhalb vrobereiten
+ rRetval.Coordinates.realloc(1);
+ rRetval.Flags.realloc(1);
+
+ // Zeiger auf aeussere Arrays holen
+ drawing::PointSequence* pOuterSequence = rRetval.Coordinates.getArray();
+ drawing::FlagSequence* pOuterFlags = rRetval.Flags.getArray();
+
+ // Platz in Arrays schaffen
+ pOuterSequence->realloc((sal_Int32)rPolygon.GetPointCount());
+ pOuterFlags->realloc((sal_Int32)rPolygon.GetPointCount());
+
+ // Pointer auf arrays holen
+ awt::Point* pInnerSequence = pOuterSequence->getArray();
+ drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray();
+
+ for(sal_uInt16 b=0;b<rPolygon.GetPointCount();b++)
+ {
+ *pInnerSequence++ = awt::Point( rPolygon[b].X(), rPolygon[b].Y() );
+ *pInnerFlags++ = (drawing::PolygonFlags)((sal_uInt16)rPolygon.GetFlags(b));
+ }
+}
+
+///////////////////////////////////////////////////////////////////////
+
+SvxShapeCaption::SvxShapeCaption( SdrObject* pSdrObj ) throw()
+: SvxShapeText( pSdrObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION) )
+{
+}
+
+SvxShapeCaption::~SvxShapeCaption() throw()
+{
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx
new file mode 100644
index 000000000000..ff29c7231f1a
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshap3.cxx
@@ -0,0 +1,1145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#include <com/sun/star/drawing/DoubleSequence.hpp>
+#include <com/sun/star/drawing/CameraGeometry.hpp>
+
+#include <vcl/svapp.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unoshape.hxx"
+#include "unopage.hxx"
+#include "polysc3d.hxx"
+#include "cube3d.hxx"
+#include "sphere3d.hxx"
+#include "lathe3d.hxx"
+#include "extrud3d.hxx"
+#include "polygn3d.hxx"
+#include "svdmodel.hxx"
+namespace binfilter {
+
+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 rtl::OUString;
+
+#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 *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+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
+ SvxShape::queryAggregation( rType, aAny );
+
+ 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 ( )
+{
+ SvxShape::acquire();
+}
+
+void SAL_CALL Svx3DSceneObject::release() throw ( )
+{
+ SvxShape::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL Svx3DSceneObject::getTypes()
+ throw (uno::RuntimeException)
+{
+
+ return SvxShape::getTypes();
+}
+
+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)
+{
+ SolarMutexGuard aGuard;
+
+ 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 );
+
+ if(pShape)
+ pShape->Create( pSdrShape, pPage );
+ }
+ else
+ {
+ delete pSdrShape;
+ pShape->InvalidateSdrObject();
+ throw uno::RuntimeException();
+ }
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ 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 sal_uInt32 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 )
+{
+ SolarMutexGuard aGuard;
+
+ 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)
+{
+ SolarMutexGuard aGuard;
+
+ if( pObj == NULL || pObj->GetSubList() == NULL )
+ throw uno::RuntimeException();
+
+ if( pObj->GetSubList()->GetObjCount() <= (sal_uInt32)Index )
+ throw lang::IndexOutOfBoundsException();
+
+ SdrObject* pDestObj = pObj->GetSubList()->GetObj( Index );
+ if(pDestObj == NULL)
+ throw lang::IndexOutOfBoundsException();
+
+ Reference< drawing::XShape > xShape( pDestObj->getUnoShape(), uno::UNO_QUERY );
+ uno::Any aAny;
+ aAny <<= xShape;
+ return aAny;
+}
+
+//----------------------------------------------------------------------
+// ::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 )
+{
+ SolarMutexGuard aGuard;
+
+ 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) );
+
+//----------------------------------------------------------------------
+} //namespace binfilter
+#include <svditer.hxx>
+namespace binfilter {//STRIP009
+struct ImpRememberTransAndRect
+{
+ Matrix4D maMat;
+ Rectangle maRect;
+};
+
+void SAL_CALL Svx3DSceneObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj
+ && pObj->ISA(E3dScene)
+ && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_CAMERA_GEOMETRY)) )
+ {
+ // set CameraGeometry at scene
+ E3dScene* pScene = (E3dScene*)pObj;
+ drawing::CameraGeometry aCamGeo;
+
+ if(aValue >>= aCamGeo)
+ {
+ Vector3D aVRP(aCamGeo.vrp.PositionX, aCamGeo.vrp.PositionY, aCamGeo.vrp.PositionZ);
+ Vector3D aVPN(aCamGeo.vpn.DirectionX, aCamGeo.vpn.DirectionY, aCamGeo.vpn.DirectionZ);
+ Vector3D aVUP(aCamGeo.vup.DirectionX, aCamGeo.vup.DirectionY, aCamGeo.vup.DirectionZ);
+
+ // rescue scene transformation
+ ImpRememberTransAndRect aSceneTAR;
+ aSceneTAR.maMat = pScene->GetTransform();
+ aSceneTAR.maRect = pScene->GetSnapRect();
+
+ // rescue object transformations
+ SdrObjListIter aIter(*pScene->GetSubList(), IM_DEEPWITHGROUPS);
+ List aObjTrans;
+ while(aIter.IsMore())
+ {
+ E3dObject* p3DObj = (E3dObject*)aIter.Next();
+ Matrix4D* pNew = new Matrix4D;
+ *pNew = p3DObj->GetTransform();
+ aObjTrans.Insert(pNew, LIST_APPEND);
+ }
+
+ // reset object transformations
+ aIter.Reset();
+ while(aIter.IsMore())
+ {
+ E3dObject* p3DObj = (E3dObject*)aIter.Next();
+ p3DObj->NbcResetTransform();
+ }
+
+ // reset scene transformation and make a complete recalc
+ pScene->NbcResetTransform();
+
+ // fill old camera from new parameters
+ Camera3D aCam(pScene->GetCamera());
+ const Volume3D& rVolume = pScene->GetBoundVolume();
+ double fW = rVolume.GetWidth();
+ double fH = rVolume.GetHeight();
+ double fCamPosZ =
+ (double)((const SfxUInt32Item&)pScene->GetItem(SDRATTR_3DSCENE_DISTANCE)).GetValue();
+ double fCamFocal =
+ (double)((const SfxUInt32Item&)pScene->GetItem(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
+
+ aCam.SetAutoAdjustProjection(FALSE);
+ aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
+ Vector3D aLookAt;
+ Vector3D aCamPos(0.0, 0.0, fCamPosZ);
+ aCam.SetPosAndLookAt(aCamPos, aLookAt);
+ aCam.SetFocalLength(fCamFocal / 100.0);
+ aCam.SetDefaults(Vector3D(0.0, 0.0, fCamPosZ), aLookAt, fCamFocal / 100.0);
+ aCam.SetDeviceWindow(Rectangle(0, 0, fW, fH));
+
+ // set at scene
+ pScene->SetCamera(aCam);
+
+ // #91047# use imported VRP, VPN and VUP (if used)
+ sal_Bool bVRPUsed(aVRP != Vector3D(0.0, 0.0, 1.0));
+ sal_Bool bVPNUsed(aVPN != Vector3D(0.0, 0.0, 1.0));
+ sal_Bool bVUPUsed(aVUP != Vector3D(0.0, 1.0, 0.0));
+
+ if(bVRPUsed || bVPNUsed || bVUPUsed)
+ {
+ pScene->GetCameraSet().SetViewportValues(aVRP, aVPN, aVUP);
+ }
+
+ // set object transformations again at objects
+ aIter.Reset();
+ sal_uInt32 nIndex(0L);
+ while(aIter.IsMore())
+ {
+ E3dObject* p3DObj = (E3dObject*)aIter.Next();
+ Matrix4D* pMat = (Matrix4D*)aObjTrans.GetObject(nIndex++);
+ p3DObj->NbcSetTransform(*pMat);
+ delete pMat;
+ }
+
+ // set scene transformation again at scene
+ pScene->NbcSetTransform(aSceneTAR.maMat);
+ pScene->FitSnapRectToBoundVol();
+ pScene->NbcSetSnapRect(aSceneTAR.maRect);
+
+ // #86559# init transformation set to allow correct
+ // calculation of BoundRect
+ pScene->InitTransformationSet();
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DSceneObject::getPropertyValue( const OUString& PropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Objekt in eine homogene 4x4 Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj
+ && pObj->ISA(E3dScene)
+ && PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_CAMERA_GEOMETRY)) )
+ {
+ // get CameraGeometry from scene
+ E3dScene* pScene = (E3dScene*)pObj;
+ drawing::CameraGeometry aCamGeo;
+
+ // fill Vectors from scene camera
+ B3dCamera& aCameraSet = pScene->GetCameraSet();
+ Vector3D aVRP = aCameraSet.GetVRP();
+ Vector3D aVPN = aCameraSet.GetVPN();
+ Vector3D aVUP = aCameraSet.GetVUV();
+
+ // transfer to structure
+ aCamGeo.vrp.PositionX = aVRP.X();
+ aCamGeo.vrp.PositionY = aVRP.Y();
+ aCamGeo.vrp.PositionZ = aVRP.Z();
+ aCamGeo.vpn.DirectionX = aVPN.X();
+ aCamGeo.vpn.DirectionY = aVPN.Y();
+ aCamGeo.vpn.DirectionZ = aVPN.Z();
+ aCamGeo.vup.DirectionX = aVUP.X();
+ aCamGeo.vup.DirectionY = aVUP.Y();
+ aCamGeo.vup.DirectionZ = aVUP.Z();
+
+ return uno::Any(&aCamGeo, ::getCppuType((const drawing::CameraGeometry*)0) );
+ }
+ 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() );
+ SvxServiceInfoHelper::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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)) )
+ {
+ // 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)) )
+ {
+ // Groesse in das Objekt packen
+ drawing::Direction3D aDirection;
+ if( aValue >>= aDirection )
+ {
+ Vector3D aSize(aDirection.DirectionX, aDirection.DirectionY, aDirection.DirectionZ);
+ ((E3dCubeObj*)pObj)->SetCubeSize(aSize);
+ }
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS_IS_CENTER)) )
+ {
+ // 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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)) )
+ {
+ // 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)) )
+ {
+ // 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS_IS_CENTER)) )
+ {
+ // 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() );
+ SvxServiceInfoHelper::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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)))
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)))
+ {
+ // 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)))
+ {
+ // 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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)))
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)))
+ {
+ // 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)))
+ {
+ // 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() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DSphere");
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+} //namespace binfilter
+#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
+namespace binfilter {//STRIP009
+
+
+//----------------------------------------------------------------------
+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((USHORT)nInnerSequenceCount); \
+ double* pArrayX = pInnerSequenceX->getArray(); \
+ double* pArrayY = pInnerSequenceY->getArray(); \
+ double* pArrayZ = pInnerSequenceZ->getArray(); \
+ for(sal_Int32 b=0;b<nInnerSequenceCount;b++) \
+ { \
+ aNewPolygon[(USHORT)b].X() = *pArrayX++; \
+ aNewPolygon[(USHORT)b].Y() = *pArrayY++; \
+ aNewPolygon[(USHORT)b].Z() = *pArrayZ++; \
+ } \
+ pInnerSequenceX++; \
+ pInnerSequenceY++; \
+ pInnerSequenceZ++; \
+ aNewPolygon.CheckClosed(); \
+ 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]; \
+ sal_Int32 nPointCount(rPoly.GetPointCount()); \
+ if(rPoly.IsClosed()) nPointCount++; \
+ pOuterSequenceX->realloc(nPointCount); \
+ pOuterSequenceY->realloc(nPointCount); \
+ pOuterSequenceZ->realloc(nPointCount); \
+ double* pInnerSequenceX = pOuterSequenceX->getArray(); \
+ double* pInnerSequenceY = pOuterSequenceY->getArray(); \
+ double* pInnerSequenceZ = pOuterSequenceZ->getArray(); \
+ for(sal_uInt16 b=0;b<rPoly.GetPointCount();b++) \
+ { \
+ *pInnerSequenceX++ = rPoly[(USHORT)b].X(); \
+ *pInnerSequenceY++ = rPoly[(USHORT)b].Y(); \
+ *pInnerSequenceZ++ = rPoly[(USHORT)b].Z(); \
+ } \
+ if(rPoly.IsClosed()) \
+ { \
+ *pInnerSequenceX++ = rPoly[0].X(); \
+ *pInnerSequenceY++ = rPoly[0].Y(); \
+ *pInnerSequenceZ++ = rPoly[0].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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) )
+ {
+ // Polygondefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // #105127# SetPolyPoly3D sets the Svx3DVerticalSegmentsItem to the number
+ // of points of the polygon. Thus, value gets lost. To avoid this, rescue
+ // item here and re-set after setting the polygon.
+ const sal_uInt32 nPrevVerticalSegs(((E3dLatheObj*)pObj)->GetVerticalSegments());
+
+ // Polygon setzen
+ ((E3dLatheObj*)pObj)->SetPolyPoly3D(aNewPolyPolygon);
+
+ const sal_uInt32 nPostVerticalSegs(((E3dLatheObj*)pObj)->GetVerticalSegments());
+
+ if(nPrevVerticalSegs != nPostVerticalSegs)
+ {
+ // restore the vertical segment count
+ ((E3dLatheObj*)pObj)->SetItem(Svx3DVerticalSegmentsItem(nPrevVerticalSegs));
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DLatheObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformation in eine homogene Matrix packen
+ drawing::HomogenMatrix aHomMat;
+ Matrix4D aMat = ((E3dObject*)pObj)->GetTransform();
+
+ // test for transformed PolyPolygon3D
+ const PolyPolygon3D& rPolyPoly = ((E3dExtrudeObj*)pObj)->GetExtrudePolygon();
+ if(rPolyPoly.Count() && rPolyPoly[0].GetPointCount())
+ {
+ const Vector3D& rFirstPoint = rPolyPoly[0][0];
+ if(rFirstPoint.Z() != 0.0)
+ {
+ // change transformation so that source poly lies in Z == 0,
+ // so it can be exported as 2D polygon
+ //
+ // ATTENTION: the translation has to be multiplied from LEFT
+ // SIDE since it was executed as the first translate for this
+ // 3D object during it's creation.
+ Matrix4D aTransMat;
+ aTransMat.TranslateZ(rFirstPoint.Z());
+ aMat = aTransMat * aMat;
+ }
+ }
+
+ // pack evtl. transformed matrix to output
+ aHomMat.Line1.Column1 = aMat[0][0];
+ aHomMat.Line1.Column2 = aMat[0][1];
+ aHomMat.Line1.Column3 = aMat[0][2];
+ aHomMat.Line1.Column4 = aMat[0][3];
+ aHomMat.Line2.Column1 = aMat[1][0];
+ aHomMat.Line2.Column2 = aMat[1][1];
+ aHomMat.Line2.Column3 = aMat[1][2];
+ aHomMat.Line2.Column4 = aMat[1][3];
+ aHomMat.Line3.Column1 = aMat[2][0];
+ aHomMat.Line3.Column2 = aMat[2][1];
+ aHomMat.Line3.Column3 = aMat[2][2];
+ aHomMat.Line3.Column4 = aMat[2][3];
+ aHomMat.Line4.Column1 = aMat[3][0];
+ aHomMat.Line4.Column2 = aMat[3][1];
+ aHomMat.Line4.Column3 = aMat[3][2];
+ aHomMat.Line4.Column4 = aMat[3][3];
+
+ return uno::Any( &aHomMat, ::getCppuType((const drawing::HomogenMatrix*)0) );
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) )
+ {
+ 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() );
+ SvxServiceInfoHelper::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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) )
+ {
+ // 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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformation in eine homogene Matrix packen
+ drawing::HomogenMatrix aHomMat;
+ Matrix4D aMat = ((E3dObject*)pObj)->GetTransform();
+
+ // test for transformed PolyPolygon3D
+ const PolyPolygon3D& rPolyPoly = ((E3dExtrudeObj*)pObj)->GetExtrudePolygon();
+ if(rPolyPoly.Count() && rPolyPoly[0].GetPointCount())
+ {
+ const Vector3D& rFirstPoint = rPolyPoly[0][0];
+ if(rFirstPoint.Z() != 0.0)
+ {
+ // change transformation so that source poly lies in Z == 0,
+ // so it can be exported as 2D polygon
+ //
+ // ATTENTION: the translation has to be multiplied from LEFT
+ // SIDE since it was executed as the first translate for this
+ // 3D object during it's creation.
+ Matrix4D aTransMat;
+ aTransMat.TranslateZ(rFirstPoint.Z());
+ aMat = aTransMat * aMat;
+ }
+ }
+
+ // pack evtl. transformed matrix to output
+ aHomMat.Line1.Column1 = aMat[0][0];
+ aHomMat.Line1.Column2 = aMat[0][1];
+ aHomMat.Line1.Column3 = aMat[0][2];
+ aHomMat.Line1.Column4 = aMat[0][3];
+ aHomMat.Line2.Column1 = aMat[1][0];
+ aHomMat.Line2.Column2 = aMat[1][1];
+ aHomMat.Line2.Column3 = aMat[1][2];
+ aHomMat.Line2.Column4 = aMat[1][3];
+ aHomMat.Line3.Column1 = aMat[2][0];
+ aHomMat.Line3.Column2 = aMat[2][1];
+ aHomMat.Line3.Column3 = aMat[2][2];
+ aHomMat.Line3.Column4 = aMat[2][3];
+ aHomMat.Line4.Column1 = aMat[3][0];
+ aHomMat.Line4.Column2 = aMat[3][1];
+ aHomMat.Line4.Column3 = aMat[3][2];
+ aHomMat.Line4.Column4 = aMat[3][3];
+
+ return uno::Any( &aHomMat, ::getCppuType((const drawing::HomogenMatrix*)0) );
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) )
+ {
+ // 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() );
+ SvxServiceInfoHelper::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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) )
+ {
+ // Polygondefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dPolygonObj*)pObj)->SetPolyPolygon3D(aNewPolyPolygon);
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_NORMALSPOLYGON3D)) )
+ {
+ // Normalendefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dPolygonObj*)pObj)->SetPolyNormals3D(aNewPolyPolygon);
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TEXTUREPOLYGON3D)) )
+ {
+ // Texturdefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dPolygonObj*)pObj)->SetPolyTexture3D(aNewPolyPolygon);
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_LINEONLY)) )
+ {
+ // 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)
+{
+ SolarMutexGuard aGuard;
+
+ if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) )
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) )
+ {
+ // Polygondefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dPolygonObj*)pObj)->GetPolyPolygon3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_NORMALSPOLYGON3D)) )
+ {
+ // Normalendefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dPolygonObj*)pObj)->GetPolyNormals3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TEXTUREPOLYGON3D)) )
+ {
+ // Texturdefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dPolygonObj*)pObj)->GetPolyTexture3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else if(pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_LINEONLY)) )
+ {
+ // 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() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DPolygon");
+ return aSeq;
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshap4.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshap4.cxx
new file mode 100644
index 000000000000..7e97ca1b63ed
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshap4.cxx
@@ -0,0 +1,888 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#include "svdoole2.hxx"
+
+#include <bf_so3/outplace.hxx>
+
+#ifndef SVX_LIGHT
+#include <sot/clsids.hxx>
+#ifndef _SFX_FRMDESCRHXX
+#include <bf_sfx2/frmdescr.hxx>
+#endif
+#endif
+#include <vcl/svapp.hxx>
+
+#include "svdmodel.hxx"
+#include "shapeimpl.hxx"
+
+#include "unoshprp.hxx"
+
+#include "svdstr.hrc"
+
+#include <bf_sfx2/frameobj.hxx>
+
+namespace binfilter {
+
+///////////////////////////////////////////////////////////////////////
+
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+
+///////////////////////////////////////////////////////////////////////
+
+SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ()
+: SvxShape( pObject, pPropertySet )
+{
+}
+
+SvxOle2Shape::~SvxOle2Shape() throw()
+{
+}
+
+::com::sun::star::uno::Any SAL_CALL SvxOle2Shape::queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ Any aAny;
+ SvxShape::queryAggregation( rType, aAny );
+ return aAny;
+}
+
+//XPropertySet
+void SAL_CALL SvxOle2Shape::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CLSID" ) ) )
+ {
+#ifndef SVX_LIGHT
+ OUString aCLSID;
+ if( aValue >>= aCLSID )
+ {
+ // init a ole object with a global name
+ if( pObj )
+ {
+ // to force creation of the corresponding stripped OLE, translate
+ // wanted CLSID to BF_* CLSID.
+ if(0L == aCLSID.compareTo(SvGlobalName(SO3_SW_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SW_CLASSID).GetHexName();
+ }
+ else if(0L == aCLSID.compareTo(SvGlobalName(SO3_SWWEB_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SWWEB_CLASSID).GetHexName();
+ }
+ else if(0L == aCLSID.compareTo(SvGlobalName(SO3_SC_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SC_CLASSID).GetHexName();
+ }
+ else if(0L == aCLSID.compareTo(SvGlobalName(SO3_SDRAW_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SDRAW_CLASSID).GetHexName();
+ }
+ else if(0L == aCLSID.compareTo(SvGlobalName(SO3_SIMPRESS_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SIMPRESS_CLASSID).GetHexName();
+ }
+ else if(0L == aCLSID.compareTo(SvGlobalName(SO3_SCH_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SCH_CLASSID).GetHexName();
+ }
+ else if(0L == aCLSID.compareTo(SvGlobalName(SO3_SM_CLASSID).GetHexName()))
+ {
+ aCLSID = SvGlobalName(BF_SO3_SM_CLASSID).GetHexName();
+ }
+
+ SvGlobalName aClassName;
+ if( aClassName.MakeId( aCLSID ) )
+ {
+ if( createObject( aClassName ) )
+ return;
+ }
+ }
+ }
+
+ throw IllegalArgumentException();
+#endif
+ }
+ else if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ThumbnailGraphicURL" ) ) )
+ {
+#ifndef SVX_LIGHT
+ // only allow setting of thumbnail for player
+ return;
+#else
+ OUString aURL;
+ if( aValue >>= aURL )
+ {
+ SdrOle2Obj* pOle = PTR_CAST( SdrOle2Obj, pObj );
+ if( pOle )
+ {
+ BfGraphicObject aGrafObj( CreateGraphicObjectFromURL( aURL ) );
+ pOle->SetGraphic( &aGrafObj.GetGraphic() );
+ }
+ return;
+ }
+
+ throw IllegalArgumentException();
+#endif
+ }
+ else if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_OLE2_PERSISTNAME ) ) )
+ {
+ OUString aPersistName;
+
+ if( aValue >>= aPersistName )
+ {
+ SdrOle2Obj* pOle = PTR_CAST( SdrOle2Obj, pObj );
+
+ if( pOle )
+ pOle->SetPersistName( aPersistName );
+
+ return;
+ }
+
+ throw IllegalArgumentException();
+ }
+
+ SvxShape::setPropertyValue( aPropertyName, aValue );
+}
+
+Any SAL_CALL SvxOle2Shape::getPropertyValue( const OUString& PropertyName ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ThumbnailGraphicURL" ) ) )
+ {
+ OUString aURL;
+ SdrOle2Obj* pOle = PTR_CAST( SdrOle2Obj, pObj );
+
+ if( pOle )
+ {
+ Graphic* pGraphic = pOle->GetGraphic();
+
+ // if there isn't already a preview graphic set, check if we need to generate
+ // one if model says so
+ if( pGraphic == NULL && !pOle->IsEmptyPresObj() && pModel->IsSaveOLEPreview() )
+ {
+ const GDIMetaFile* pMetaFile = pOle->GetGDIMetaFile();
+ if( pMetaFile )
+ {
+ Graphic aNewGrf( *pMetaFile );
+ pOle->SetGraphic( &aNewGrf );
+ pGraphic = pOle->GetGraphic();
+ }
+ }
+
+ if( pGraphic )
+ {
+ BfGraphicObject aObj( *pGraphic );
+ aURL = OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+ aURL += OUString::createFromAscii( aObj.GetUniqueID().GetBuffer() );
+ }
+ }
+ return makeAny( aURL );
+ }
+ else if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_OLE2_PERSISTNAME ) ) )
+ {
+ OUString aPersistName;
+ SdrOle2Obj* pOle = PTR_CAST( SdrOle2Obj, pObj );
+
+ if( pOle )
+ {
+ aPersistName = pOle->GetPersistName();
+ if( aPersistName.getLength() )
+ {
+ SvPersist *pPersist = pObj->GetModel()->GetPersist();
+ if( (NULL == pPersist) || ( NULL == pPersist->Find( static_cast< SdrOle2Obj* >( pObj )->GetPersistName() ) ) )
+ aPersistName = OUString();
+ }
+ }
+
+ return makeAny( aPersistName );
+ }
+
+ return SvxShape::getPropertyValue( PropertyName );
+}
+
+
+sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
+{
+ const SvInPlaceObjectRef& rIPRef = static_cast< SdrOle2Obj* >( pObj )->GetObjRef();
+
+ if( rIPRef.Is() )
+ return sal_False;
+
+ // create storage and inplace object
+ String aEmptyStr;
+ SvStorageRef aStor;
+ const SotFactory* pFact = SvFactory::Find( aClassName );
+ SvInPlaceObjectRef aIPObj;
+ if ( pFact )
+ {
+ aStor = new SvStorage( aEmptyStr, STREAM_STD_READWRITE );
+ aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit( aClassName,aStor );
+ }
+ else
+ {
+ aStor = new SvStorage( FALSE, aEmptyStr, STREAM_STD_READWRITE );
+ String aFileName;
+ BOOL bOk;
+ SvGlobalName aName( aClassName );
+ aIPObj = SvOutPlaceObject::InsertObject( NULL, &aStor, bOk, aName, aFileName );
+ }
+
+ SvPersist* pPersist = pModel->GetPersist();
+ sal_Bool bOk = sal_False;
+ String aPersistName;
+ OUString aTmpStr;
+ Any aAny( getPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ) ) );
+
+ if( aAny >>= aTmpStr )
+ aPersistName = aTmpStr;
+
+ // if we already have a shape name check if its a unique
+ // storage name
+ if( aPersistName.Len() && !pPersist->Find( aPersistName ) )
+ {
+ SvInfoObjectRef xSub = new SvEmbeddedInfoObject( aIPObj, aPersistName );
+ bOk = pPersist->Move( xSub, aPersistName );
+ }
+ else
+ {
+ // generate a unique name
+ String aStr( aPersistName = String( RTL_CONSTASCII_USTRINGPARAM("Object ") ) );
+
+ // for-Schleife wegen Storage Bug 46033
+ for( sal_uInt32 i = 1, n = 0; n < 100; n++ )
+ {
+ do
+ {
+ aStr = aPersistName;
+ aStr += String::CreateFromInt32( i++ );
+ }
+ while( pPersist->Find( aStr ) );
+
+ SvInfoObjectRef xSub( new SvEmbeddedInfoObject( aIPObj, aStr ) );
+
+ if( pPersist->Move( xSub, aStr ) ) // Eigentuemer Uebergang
+ {
+ bOk = sal_True;
+ aPersistName = aStr;
+ break;
+ }
+ }
+ }
+
+ DBG_ASSERT( bOk, "could not create move ole stream!" );
+
+ if( bOk )
+ {
+ aAny <<= ( aTmpStr = aPersistName );
+ setPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ), aAny );
+ }
+
+ static_cast< SdrOle2Obj* >( pObj )->SetObjRef( aIPObj );
+ Rectangle aRect = static_cast< SdrOle2Obj* >( pObj )->GetLogicRect();
+ if ( aRect.GetWidth() == 100 && aRect.GetHeight() == 100 )
+ {
+ // default size
+ aRect.SetSize( aIPObj->GetVisArea().GetSize() );
+ static_cast< SdrOle2Obj* >( pObj )->SetLogicRect( aRect );
+ }
+ else
+ aIPObj->SetVisAreaSize( static_cast< SdrOle2Obj* >( pObj )->GetLogicRect().GetSize() );
+ return bOk;
+}
+
+///////////////////////////////////////////////////////////////////////
+
+// the following code is currently not working in the player
+#ifndef SVX_LIGHT
+
+static sal_Bool SvxImplFillCommandList( const Sequence< PropertyValue >& aCommandSequence, SvCommandList& aNewCommands )
+{
+ const sal_Int32 nCount = aCommandSequence.getLength();
+
+ String aCommand, aArg;
+ OUString aApiArg;
+ for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ aCommand = aCommandSequence[nIndex].Name;
+
+ if( !( aCommandSequence[nIndex].Value >>= aApiArg ) )
+ return sal_False;
+
+ aArg = aApiArg;
+ aNewCommands.Append( aCommand, aArg );
+ }
+
+ return sal_True;
+}
+
+static void SvxImplFillCommandSequence( const SvCommandList& aCommands, Sequence< PropertyValue >& aCommandSequence )
+{
+ const sal_Int32 nCount = aCommands.Count();
+ aCommandSequence.realloc( nCount );
+
+ for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ const SvCommand& rCommand = aCommands[ nIndex ];
+
+ aCommandSequence[nIndex].Name = rCommand.GetCommand();
+ aCommandSequence[nIndex].Handle = -1;
+ aCommandSequence[nIndex].Value = makeAny( OUString( rCommand.GetArgument() ) );
+ aCommandSequence[nIndex].State = PropertyState_DIRECT_VALUE;
+
+ }
+}
+
+///////////////////////////////////////////////////////////////////////
+
+SvxAppletShape::SvxAppletShape( SdrObject* pObject ) throw()
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET) )
+{
+ SetShapeType( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) );
+}
+
+SvxAppletShape::~SvxAppletShape() throw()
+{
+}
+
+void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+{
+ SvxShape::Create( pNewObj, pNewPage );
+ const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID ); //STRIP003
+ createObject(aAppletClassId);
+ SetShapeType( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) );
+}
+
+//XPropertySet
+void SAL_CALL SvxAppletShape::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw( UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ sal_Bool bOwn = sal_False;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(aPropertyName);
+
+ if( pMap && pObj && pModel )
+ {
+ if( pMap->nWID >= OWN_ATTR_APPLET_CODEBASE && pMap->nWID <= OWN_ATTR_APPLET_ISSCRIPT )
+ {
+ SvAppletObjectRef xApplet = SvAppletObjectRef( ((SdrOle2Obj*)pObj)->GetObjRef() );
+ DBG_ASSERT( xApplet.Is(), "wrong ole object inside applet" );
+ if( !xApplet.Is() )
+ return;
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_APPLET_CODEBASE:
+ {
+ OUString aCodeBase;
+ if( aValue >>= aCodeBase )
+ {
+ const String aStrCodeBase( aCodeBase );
+ xApplet->SetCodeBase( aStrCodeBase );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_APPLET_NAME:
+ {
+ OUString aName;
+ if( aValue >>= aName )
+ {
+ const String aStrName( aName );
+ xApplet->SetName( aStrName );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_APPLET_CODE:
+ {
+ OUString aCode;
+ if( aValue >>= aCode )
+ {
+ const String aStrCode( aCode );
+ xApplet->SetClass( aStrCode );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_APPLET_COMMANDS:
+ {
+ Sequence< PropertyValue > aCommandSequence;
+ if( aValue >>= aCommandSequence )
+ {
+ SvCommandList aNewCommands;
+ if( SvxImplFillCommandList( aCommandSequence, aNewCommands ) )
+ {
+ xApplet->SetCommandList( aNewCommands );
+ bOwn = sal_True;
+ }
+ }
+ }
+ break;
+ case OWN_ATTR_APPLET_ISSCRIPT:
+ {
+ sal_Bool bScript;
+ if( aValue >>= bScript )
+ {
+ xApplet->SetMayScript( bScript );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ }
+
+ if( !bOwn )
+ throw IllegalArgumentException();
+ }
+ }
+
+ if( !bOwn )
+ SvxOle2Shape::setPropertyValue( aPropertyName, aValue );
+
+ if( pModel )
+ {
+ SvPersist* pPersist = pModel->GetPersist();
+ if( pPersist && !pPersist->IsEnableSetModified() )
+ {
+ SdrOle2Obj* pOle = static_cast< SdrOle2Obj* >( pObj );
+ if( pOle && ! pOle->IsEmpty() )
+ {
+ const SvInPlaceObjectRef& rIPRef = pOle->GetObjRef();
+
+ if( rIPRef.Is() )
+ rIPRef->SetModified( sal_False );
+ }
+ }
+ }
+}
+
+Any SAL_CALL SvxAppletShape::getPropertyValue( const OUString& PropertyName ) throw( UnknownPropertyException, WrappedTargetException, RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ if( pMap && pObj && pModel )
+ {
+ if( pMap->nWID >= OWN_ATTR_APPLET_CODEBASE && pMap->nWID <= OWN_ATTR_APPLET_ISSCRIPT )
+ {
+ SvAppletObjectRef xApplet = SvAppletObjectRef( ((SdrOle2Obj*)pObj)->GetObjRef() );
+ DBG_ASSERT( xApplet.Is(), "wrong ole object inside applet" );
+ if( xApplet.Is() )
+ {
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_APPLET_CODEBASE:
+ return makeAny( OUString( xApplet->GetCodeBase() ) );
+ case OWN_ATTR_APPLET_NAME:
+ return makeAny( OUString( xApplet->GetName() ) );
+ case OWN_ATTR_APPLET_CODE:
+ return makeAny( OUString( xApplet->GetClass() ) );
+ case OWN_ATTR_APPLET_COMMANDS:
+ {
+ Sequence< PropertyValue > aCommandSequence;
+ SvxImplFillCommandSequence( xApplet->GetCommandList(), aCommandSequence );
+ return makeAny( aCommandSequence );
+ }
+ case OWN_ATTR_APPLET_ISSCRIPT:
+ return makeAny( (sal_Bool) xApplet->IsMayScript() );
+ }
+ }
+
+ Any aAny;
+ return aAny;
+ }
+ }
+
+ return SvxOle2Shape::getPropertyValue( PropertyName );
+}
+
+///////////////////////////////////////////////////////////////////////
+
+SvxPluginShape::SvxPluginShape( SdrObject* pObject ) throw()
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN) )
+{
+ SetShapeType( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) );
+}
+
+SvxPluginShape::~SvxPluginShape() throw()
+{
+}
+
+void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+{
+ SvxShape::Create( pNewObj, pNewPage );
+ const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID ); //STRIP003
+ createObject(aPluginClassId);
+ SetShapeType( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) );
+}
+
+//XPropertySet
+void SAL_CALL SvxPluginShape::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
+ throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ sal_Bool bOwn = sal_False;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(aPropertyName);
+
+ if( pMap && pObj && pModel )
+ {
+ if( pMap->nWID >= OWN_ATTR_PLUGIN_MIMETYPE && pMap->nWID <= OWN_ATTR_PLUGIN_COMMANDS )
+ {
+ SvPlugInObjectRef xPlugin = SvPlugInObjectRef( ((SdrOle2Obj*)pObj)->GetObjRef() );
+ DBG_ASSERT( xPlugin.Is(), "wrong ole object inside plugin" );
+ if( !xPlugin.Is() )
+ return;
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_PLUGIN_MIMETYPE:
+ {
+ OUString aMimeType;
+ if( aValue >>= aMimeType )
+ {
+ const String aStrMimeType( aMimeType );
+ xPlugin->SetMimeType( aStrMimeType );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_PLUGIN_URL:
+ {
+ OUString aURL;
+ if( aValue >>= aURL )
+ {
+ xPlugin->SetURL( aURL );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_PLUGIN_COMMANDS:
+ {
+ Sequence< PropertyValue > aCommandSequence;
+ if( aValue >>= aCommandSequence )
+ {
+ SvCommandList aNewCommands;
+ if( SvxImplFillCommandList( aCommandSequence, aNewCommands ) )
+ {
+ xPlugin->SetCommandList( aNewCommands );
+ bOwn = sal_True;
+ }
+ }
+ }
+ break;
+ }
+
+ if( !bOwn )
+ throw IllegalArgumentException();
+ }
+ }
+
+ if( !bOwn )
+ SvxOle2Shape::setPropertyValue( aPropertyName, aValue );
+
+ if( pModel )
+ {
+ SvPersist* pPersist = pModel->GetPersist();
+ if( pPersist && !pPersist->IsEnableSetModified() )
+ {
+ SdrOle2Obj* pOle = static_cast< SdrOle2Obj* >( pObj );
+ if( pOle && ! pOle->IsEmpty() )
+ {
+ const SvInPlaceObjectRef& rIPRef = pOle->GetObjRef();
+
+ if( rIPRef.Is() )
+ rIPRef->SetModified( sal_False );
+ }
+ }
+ }
+}
+
+Any SAL_CALL SvxPluginShape::getPropertyValue( const OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ if( pMap && pObj && pModel )
+ {
+ if( pMap->nWID >= OWN_ATTR_PLUGIN_MIMETYPE && pMap->nWID <= OWN_ATTR_PLUGIN_COMMANDS )
+ {
+ SvPlugInObjectRef xPlugin = SvPlugInObjectRef( ((SdrOle2Obj*)pObj)->GetObjRef() );
+ DBG_ASSERT( xPlugin.Is(), "wrong ole object inside plugin" );
+ if( xPlugin.Is() )
+ {
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_PLUGIN_MIMETYPE:
+ return makeAny( OUString( xPlugin->GetMimeType() ) );
+ case OWN_ATTR_PLUGIN_URL:
+ {
+ OUString aURL;
+ DBG_ASSERT( xPlugin->GetURL(), "Plugin without a URL!" );
+ if( xPlugin->GetURL() )
+ aURL = xPlugin->GetURL()->GetMainURL( INetURLObject::NO_DECODE );
+ return makeAny( aURL );
+ }
+ case OWN_ATTR_PLUGIN_COMMANDS:
+ {
+ Sequence< PropertyValue > aCommandSequence;
+ SvxImplFillCommandSequence( xPlugin->GetCommandList(), aCommandSequence );
+ return makeAny( aCommandSequence );
+ }
+ }
+ }
+
+ Any aAny;
+ return aAny;
+ }
+ }
+
+ return SvxOle2Shape::getPropertyValue( PropertyName );
+}
+
+///////////////////////////////////////////////////////////////////////
+
+SvxFrameShape::SvxFrameShape( SdrObject* pObject ) throw()
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME) )
+{
+ SetShapeType( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) );
+}
+
+SvxFrameShape::~SvxFrameShape() throw()
+{
+}
+
+void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+{
+ SvxShape::Create( pNewObj, pNewPage );
+ const SvGlobalName aIFrameClassId( BF_SO3_IFRAME_CLASSID );
+ createObject(aIFrameClassId);
+ SetShapeType( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) );
+}
+
+//XPropertySet
+void SAL_CALL SvxFrameShape::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
+ throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ sal_Bool bOwn = sal_False;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(aPropertyName);
+
+ Any aAny;
+ if( pMap && pObj && pModel )
+ {
+ if( pMap->nWID >= OWN_ATTR_FRAME_URL && pMap->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT )
+ {
+ SfxFrameObjectRef xFrame = SfxFrameObjectRef( ((SdrOle2Obj*)pObj)->GetObjRef() );
+ DBG_ASSERT( xFrame.Is(), "wrong ole object inside frame" );
+ if( !xFrame.Is() )
+ return;
+
+ SfxFrameDescriptor *pDescriptor = xFrame->GetFrameDescriptor()->Clone( NULL );
+ DBG_ASSERT( pDescriptor, "no descriptor for frame!" );
+ if( !pDescriptor )
+ return;
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_FRAME_URL:
+ {
+ OUString aURL;
+ if( aValue >>= aURL )
+ {
+ const String aStrURL( aURL );
+ pDescriptor->SetURL( aStrURL );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_FRAME_NAME:
+ {
+ OUString aName;
+ if( aValue >>= aName )
+ {
+ const String aStrName( aName );
+ pDescriptor->SetName( aStrName );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_FRAME_ISAUTOSCROLL:
+ {
+ sal_Bool bScroll;
+ if( !aValue.hasValue() )
+ {
+ pDescriptor->SetScrollingMode( ScrollingAuto );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ else if( aValue >>= bScroll )
+ {
+ pDescriptor->SetScrollingMode( bScroll ? ScrollingYes : ScrollingNo );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_FRAME_ISBORDER:
+ {
+ sal_Bool bBorder;
+ if( aValue >>= bBorder )
+ {
+ pDescriptor->SetFrameBorder( bBorder );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ }
+ break;
+
+ case OWN_ATTR_FRAME_MARGIN_WIDTH:
+ {
+ sal_Int32 nMargin;
+ if( aValue >>= nMargin )
+ {
+ const Size aNewMargin( nMargin, pDescriptor->GetMargin().Height() );
+ pDescriptor->SetMargin( aNewMargin );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ case OWN_ATTR_FRAME_MARGIN_HEIGHT:
+ {
+ sal_Int32 nMargin;
+ if( aValue >>= nMargin )
+ {
+ const Size aNewMargin( pDescriptor->GetMargin().Width(), nMargin );
+ pDescriptor->SetMargin( aNewMargin );
+ xFrame->SetFrameDescriptor( pDescriptor );
+ bOwn = sal_True;
+ }
+ }
+ break;
+ }
+
+ if( !bOwn )
+ throw IllegalArgumentException();
+ }
+ }
+
+ if( !bOwn )
+ SvxOle2Shape::setPropertyValue( aPropertyName, aValue );
+
+ if( pModel )
+ {
+ SvPersist* pPersist = pModel->GetPersist();
+ if( pPersist && !pPersist->IsEnableSetModified() )
+ {
+ SdrOle2Obj* pOle = static_cast< SdrOle2Obj* >( pObj );
+ if( pOle && ! pOle->IsEmpty() )
+ {
+ const SvInPlaceObjectRef& rIPRef = pOle->GetObjRef();
+
+ if( rIPRef.Is() )
+ rIPRef->SetModified( sal_False );
+ }
+ }
+ }
+}
+
+Any SAL_CALL SvxFrameShape::getPropertyValue( const OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ Any aAny;
+ if( pMap && pObj && pModel )
+ {
+ if( pMap->nWID >= OWN_ATTR_FRAME_URL && pMap->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT )
+ {
+ SfxFrameObjectRef xFrame = SfxFrameObjectRef( ((SdrOle2Obj*)pObj)->GetObjRef() );
+ DBG_ASSERT( xFrame.Is(), "wrong ole object inside frame" );
+ if( !xFrame.Is() )
+ {
+ Any aAny;
+ return aAny;
+ }
+
+ const SfxFrameDescriptor *pDescriptor = xFrame->GetFrameDescriptor();
+ DBG_ASSERT( pDescriptor, "no descriptor for frame!" );
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_FRAME_URL:
+ return makeAny( OUString( pDescriptor->GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) );
+ case OWN_ATTR_FRAME_NAME:
+ return makeAny( OUString( pDescriptor->GetName() ) );
+ case OWN_ATTR_FRAME_ISAUTOSCROLL:
+ if( pDescriptor->GetScrollingMode() == ScrollingAuto )
+ {
+ Any aAny;
+ return aAny;
+ }
+ else
+ {
+ return makeAny( (sal_Bool)(pDescriptor->GetScrollingMode() == ScrollingYes) );
+ }
+ case OWN_ATTR_FRAME_ISBORDER:
+ return makeAny( (sal_Bool)pDescriptor->IsFrameBorderOn() );
+ case OWN_ATTR_FRAME_MARGIN_WIDTH:
+ return makeAny( (sal_Int32)pDescriptor->GetMargin().Width() );
+ case OWN_ATTR_FRAME_MARGIN_HEIGHT:
+ return makeAny( (sal_Int32)pDescriptor->GetMargin().Height() );
+ }
+ throw IllegalArgumentException();
+ }
+ }
+
+ return SvxOle2Shape::getPropertyValue( PropertyName );
+}
+
+#endif
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshape.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshape.cxx
new file mode 100644
index 000000000000..8eff008ee75c
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshape.cxx
@@ -0,0 +1,3825 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#include <cppuhelper/typeprovider.hxx>
+
+#include <bf_goodies/matrix3d.hxx>
+
+#include <bf_svtools/fltcall.hxx>
+
+#include <toolkit/unohlp.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+#include <bf_so3/outplace.hxx>
+
+#include "svdopage.hxx"
+#include "xflbstit.hxx"
+#include "xflbmtit.hxx"
+#include "svdogrp.hxx"
+#include "scene3d.hxx"
+#include "globl3d.hxx"
+#include "fmglob.hxx"
+#include "unopage.hxx"
+#include "view3d.hxx"
+#include "unoshape.hxx"
+#include "svxids.hrc"
+#include "unoshtxt.hxx"
+#include "unoshprp.hxx"
+#include "svdoole2.hxx"
+#include "sxciaitm.hxx" // todo: remove
+#include "svdograf.hxx"
+#include "unoapi.hxx"
+#include "svdomeas.hxx"
+
+#include "dialogs.hrc" //
+
+#include "svdocapt.hxx"
+
+
+#include "xflftrit.hxx"
+
+#include "xtable.hxx"
+
+#include "xbtmpit.hxx"
+
+
+#include "xflhtit.hxx"
+
+#include "xlnedit.hxx"
+
+#include "xlnstit.hxx"
+
+#include "xlndsit.hxx"
+
+#include "svdstr.hrc"
+#include "unomaster.hxx"
+
+#include <outlobj.hxx>
+
+class GDIMetaFile;
+class SvStream;
+
+namespace binfilter {
+
+using namespace ::osl;
+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 rtl::OUString;
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
+ aAny <<= uno::Reference< xint >(this)
+
+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,
+ {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0}
+ };
+
+ return aSvxUnoOutlinerTextCursorPropertyMap;
+}
+
+const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap()
+{
+ // Propertymap fuer einen Outliner Text
+ static const SfxItemPropertyMap aSvxTextPortionPropertyMap[] =
+ {
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_FONT_PROPERTIES,
+ SVX_UNOEDIT_OUTLINER_PROPERTIES,
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0}
+ };
+
+ return aSvxTextPortionPropertyMap;
+}
+
+sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, sal_Bool bPlaceable = sal_True );
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoGluePointAccess_createInstance( SdrObject* pObject );
+
+DECLARE_LIST( SvxShapeList, SvxShape * )//STRIP008 ;
+
+#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 *
+***********************************************************************/
+
+struct SvxShapeImpl
+{
+ SfxItemSet* mpItemSet;
+ sal_uInt32 mnObjId;
+ SvxShapeMaster* mpMaster;
+};
+
+//UNO3_GETIMPLEMENTATION_IMPL( SvxShape );
+
+SvxShape::SvxShape( SdrObject* pObject ) throw()
+: aPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE)),
+ pObj (pObject),
+ bDisposing( sal_False ),
+ pModel(NULL),
+ aSize(100,100),
+ mnLockCount(0),
+ aDisposeListeners( maMutex ),
+ mpImpl(NULL)
+{
+ Init();
+}
+
+//----------------------------------------------------------------------
+SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertyMap ) throw()
+: aPropSet(pPropertyMap),
+ bDisposing( sal_False ),
+ pObj (pObject),
+ pModel(NULL),
+ aSize(100,100),
+ mnLockCount(0),
+ aDisposeListeners( maMutex ),
+ mpImpl(NULL)
+
+{
+ Init();
+}
+
+//----------------------------------------------------------------------
+SvxShape::~SvxShape() throw()
+{
+ ::SolarMutexGuard aGuard;
+
+ DBG_ASSERT( mnLockCount == 0, "Locked shape was disposed!" );
+
+ if( pModel )
+ EndListening( *pModel );
+
+ if( mpImpl )
+ {
+ if(mpImpl->mpMaster)
+ mpImpl->mpMaster->dispose();
+
+ delete mpImpl;
+ }
+}
+
+//----------------------------------------------------------------------
+
+void SvxShape::setShapeKind( sal_uInt32 nKind )
+{
+ if( mpImpl )
+ mpImpl->mnObjId = nKind;
+}
+
+//----------------------------------------------------------------------
+
+sal_uInt32 SvxShape::getShapeKind() const
+{
+ return mpImpl ? mpImpl->mnObjId : OBJ_NONE;
+}
+
+//----------------------------------------------------------------------
+
+void SvxShape::setMaster( SvxShapeMaster* pMaster )
+{
+ mpImpl->mpMaster = pMaster;
+}
+
+//----------------------------------------------------------------------
+sal_Bool SvxShape::queryAggregation( const ::com::sun::star::uno::Type & rType, ::com::sun::star::uno::Any& aAny )
+{
+ if( mpImpl->mpMaster )
+ {
+ if( mpImpl->mpMaster->queryAggregation( rType, aAny ) )
+ return sal_True;
+ }
+
+ if( rType == ::getCppuType((const uno::Reference< beans::XPropertyState >*)0) )
+ aAny <<= uno::Reference< beans::XPropertyState >(this);
+ else if( rType == ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )
+ aAny <<= uno::Reference< beans::XPropertySet >(this);
+ else if( rType == ::getCppuType((const uno::Reference< drawing::XShape >*)0) )
+ aAny <<= uno::Reference< drawing::XShape >(this);
+ else if( rType == ::getCppuType((const uno::Reference< lang::XTypeProvider >*)0) )
+ aAny <<= uno::Reference< lang::XTypeProvider >(this);
+ else if( rType == ::getCppuType((const uno::Reference< uno::XAggregation >*)0) )
+ aAny <<= uno::Reference< uno::XAggregation >(this);
+ else if( rType == ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0) )
+ aAny <<= uno::Reference< beans::XMultiPropertySet >(this);
+ else if( rType == ::getCppuType((const uno::Reference< drawing::XShapeDescriptor >*)0) )
+ aAny <<= uno::Reference< drawing::XShapeDescriptor >(this);
+ else if( rType == ::getCppuType((const uno::Reference< document::XActionLockable >*)0) )
+ aAny <<= uno::Reference< document::XActionLockable >(this);
+ else if( rType == ::getCppuType((const uno::Reference< lang::XUnoTunnel >*)0) )
+ aAny <<= uno::Reference< lang::XUnoTunnel >(this);
+ else if( rType == ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0) )
+ aAny <<= uno::Reference< drawing::XGluePointsSupplier >(this);
+ else if( rType == ::getCppuType((const uno::Reference< container::XNamed >*)0) )
+ aAny <<= uno::Reference< container::XNamed >(this);
+ else if( rType == ::getCppuType((const uno::Reference< lang::XServiceInfo >*)0) )
+ aAny <<= uno::Reference< lang::XServiceInfo >(this);
+ else if( rType == ::getCppuType((const uno::Reference< container::XChild >*)0) )
+ aAny <<= uno::Reference< container::XChild >(this);
+ else if( rType == ::getCppuType((const uno::Reference< lang::XComponent >*)0) )
+ aAny <<= uno::Reference< lang::XComponent >(this);
+ else if( rType == ::getCppuType((const uno::Reference< uno::XInterface >*)0) )
+ aAny <<= uno::Reference< uno::XInterface >(static_cast< XInterface * >(static_cast< OWeakObject * >(this)));
+ else if( rType == ::getCppuType((const uno::Reference< uno::XWeak >*)0) )
+ aAny <<= uno::Reference< uno::XWeak >(this);
+ else
+ return sal_False;
+
+ return sal_True;
+}
+
+//----------------------------------------------------------------------
+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( const uno::Reference< uno::XInterface >& xInt )
+{
+ 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
+ {
+ return NULL;
+ }
+}
+
+//----------------------------------------------------------------------
+void SvxShape::Init() throw()
+{
+ if( NULL == mpImpl )
+ {
+ mpImpl = new SvxShapeImpl;
+ mpImpl->mpItemSet = NULL;
+ mpImpl->mpMaster = NULL;
+ mpImpl->mnObjId = 0;
+ }
+
+ mbIsMultiPropertyCall = sal_False;
+
+ // only init if we already have an object
+ // if we get an object later Init() will
+ // be called again
+ if(pObj == NULL)
+ return;
+
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ pObj->setUnoShape( *this, SdrObject::GrantXShapeAccess() );
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+
+ // no model? this should not be
+ if(!pObj->GetModel())
+ return;
+
+ pModel = pObj->GetModel();
+
+ StartListening( *pModel );
+
+ const sal_uInt32 nInventor = pObj->GetObjInventor();
+
+ // is it one of ours (svx) ?
+ if( nInventor == SdrInventor || nInventor == E3dInventor || nInventor == FmFormInventor )
+ {
+ if(nInventor == FmFormInventor)
+ {
+ mpImpl->mnObjId = OBJ_UNO;
+ }
+ else
+ {
+ mpImpl->mnObjId = pObj->GetObjIdentifier();
+ if( nInventor == E3dInventor )
+ mpImpl->mnObjId |= E3D_INVENTOR_FLAG;
+ }
+
+ switch(mpImpl->mnObjId)
+ {
+ case OBJ_CCUT: // Kreisabschnitt
+ case OBJ_CARC: // Kreisbogen
+ case OBJ_SECT: // Kreissektor
+ mpImpl->mnObjId = OBJ_CIRC;
+ break;
+
+ case E3D_SCENE_ID | E3D_INVENTOR_FLAG:
+ mpImpl->mnObjId = E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG;
+ break;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+{
+ if( pNewObj && ( (pObj != pNewObj) || (pModel == NULL) ) )
+ {
+ DBG_ASSERT( pNewObj->GetModel(), "no model for SdrObject?" );
+
+ pObj = pNewObj;
+
+ Init();
+
+ ObtainSettingsFromPropertySet( aPropSet );
+
+ // save user call
+ SdrObjUserCall* pUser = pObj->GetUserCall();
+ pObj->SetUserCall(NULL);
+
+ setPosition( aPosition );
+ setSize( aSize );
+
+ // restore user call after we set the initial size
+ pObj->SetUserCall( pUser );
+
+ // if this shape was already named, use this name
+ if( aShapeName.getLength() )
+ {
+ pObj->SetName( aShapeName );
+ aShapeName = OUString();
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+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() && pModel)
+ {
+ SfxItemSet aSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0);
+ Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY );
+ aPropSet.ObtainSettingsFromPropertySet(rPropSet, aSet, xShape);
+ pObj->SetItemSetAndBroadcast(aSet);
+ pObj->ApplyNotPersistAttr( aSet );
+ }
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw()
+{
+ uno::Any aAny;
+
+ if( pObj == NULL || pModel == NULL || !pObj->IsInserted() || NULL == pObj->GetPage() )
+ 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, sal_False );
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
+ 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;
+}
+
+//----------------------------------------------------------------------
+
+uno::Sequence< uno::Type > SAL_CALL SvxShape::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( mpImpl->mpMaster )
+ {
+ return mpImpl->mpMaster->getTypes();
+ }
+ else
+ {
+ return _getTypes();
+ }
+}
+
+//----------------------------------------------------------------------
+
+uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes()
+ throw(uno::RuntimeException)
+{
+ switch( mpImpl->mnObjId )
+ {
+ // shapes without text
+ case OBJ_OLE2:
+ case OBJ_PAGE:
+ case OBJ_FRAME:
+ case OBJ_OLE2_PLUGIN:
+ case OBJ_OLE2_APPLET:
+ case E3D_CUBEOBJ_ID|E3D_INVENTOR_FLAG:
+ case E3D_SPHEREOBJ_ID|E3D_INVENTOR_FLAG:
+ case E3D_LATHEOBJ_ID|E3D_INVENTOR_FLAG:
+ case E3D_EXTRUDEOBJ_ID|E3D_INVENTOR_FLAG:
+ case E3D_POLYGONOBJ_ID|E3D_INVENTOR_FLAG:
+ {
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
+
+ if( aTypeSequence.getLength() == 0 )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if( aTypeSequence.getLength() == 0 )
+ {
+ aTypeSequence.realloc( 11 );
+ uno::Type* pTypes = aTypeSequence.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::XMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)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);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0);
+ }
+ }
+ return aTypeSequence;
+ }
+ // group shape
+ case OBJ_GRUP:
+ {
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
+
+ if( aTypeSequence.getLength() == 0 )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if( aTypeSequence.getLength() == 0 )
+ {
+ aTypeSequence.realloc( 13 );
+ uno::Type* pTypes = aTypeSequence.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::XMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)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);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShapes>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShapeGroup>*)0);
+ }
+ }
+ return aTypeSequence;
+ }
+ // connector shape
+ case OBJ_EDGE:
+ {
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
+
+ if( aTypeSequence.getLength() == 0 )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if( aTypeSequence.getLength() == 0 )
+ {
+ aTypeSequence.realloc( 15 );
+ uno::Type* pTypes = aTypeSequence.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::XMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)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);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XConnectorShape>*)0);
+ // from SvxUnoTextBase::getTypes()
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XText >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeMover >*)0);
+ }
+ }
+ return aTypeSequence;
+ }
+ // control shape
+ case OBJ_UNO:
+ {
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
+
+ if( aTypeSequence.getLength() == 0 )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if( aTypeSequence.getLength() == 0 )
+ {
+ aTypeSequence.realloc( 12 );
+ uno::Type* pTypes = aTypeSequence.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::XMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)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);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XControlShape>*)0);
+ }
+ }
+ return aTypeSequence;
+ }
+ // 3d scene shape
+ case E3D_POLYSCENE_ID|E3D_INVENTOR_FLAG:
+ {
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
+
+ if( aTypeSequence.getLength() == 0 )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if( aTypeSequence.getLength() == 0 )
+ {
+ aTypeSequence.realloc( 12 );
+ uno::Type* pTypes = aTypeSequence.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::XMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)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);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShapes>*)0);
+ }
+ }
+ return aTypeSequence;
+ }
+ // shapes with text
+ case OBJ_RECT:
+ case OBJ_CIRC:
+ case OBJ_MEASURE:
+ case OBJ_LINE:
+ case OBJ_POLY:
+ case OBJ_PLIN:
+ case OBJ_PATHLINE:
+ case OBJ_PATHFILL:
+ case OBJ_FREELINE:
+ case OBJ_FREEFILL:
+ case OBJ_PATHPOLY:
+ case OBJ_PATHPLIN:
+ case OBJ_GRAF:
+ case OBJ_TEXT:
+ case OBJ_CAPTION:
+ default:
+ {
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
+
+ if( aTypeSequence.getLength() == 0 )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if( aTypeSequence.getLength() == 0 )
+ {
+ aTypeSequence.realloc( 14 );
+ uno::Type* pTypes = aTypeSequence.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::XMultiPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XChild >*)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);
+ *pTypes++ = ::getCppuType((const uno::Reference< container::XNamed >*)0);
+ // from SvxUnoTextBase::getTypes()
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XText >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeMover >*)0);
+ }
+ }
+ return aTypeSequence;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxShape::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static ::cppu::OImplementationId* pID = NULL ;
+
+ if ( pID == NULL )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::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 ::cppu::OImplementationId aID( sal_False ) ;
+ // ... and set his address to static pointer!
+ pID = &aID ;
+ }
+ }
+
+ return pID->getImplementationId() ;
+}
+
+// SfxListener
+
+//----------------------------------------------------------------------
+void SvxShape::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw()
+{
+ if( pObj == NULL )
+ return;
+
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+ if (!pSdrHint || ( /* (pSdrHint->GetKind() != HINT_OBJREMOVED) && */
+ (pSdrHint->GetKind() != HINT_MODELCLEARED) &&
+ (pSdrHint->GetKind() != HINT_OBJLISTCLEAR) &&
+ (pSdrHint->GetKind() != HINT_OBJCHG)))
+ return;
+
+ uno::Reference< uno::XInterface > xSelf( pObj->getWeakUnoShape() );
+ if( !xSelf.is() )
+ {
+ pObj = NULL;
+ return;
+ }
+
+ sal_Bool bClearMe = sal_False;
+
+ switch( pSdrHint->GetKind() )
+ {
+ case HINT_OBJCHG:
+ {
+ updateShapeKind();
+ break;
+ }
+/*
+ case HINT_OBJREMOVED:
+ {
+ if( pObj == pSdrHint->GetObject() )
+ bClearMe = sal_True;
+ break;
+ }
+*/
+ case HINT_MODELCLEARED:
+ {
+ bClearMe = sal_True;
+ pModel = NULL;
+ break;
+ }
+ case HINT_OBJLISTCLEAR:
+ {
+ SdrObjList* pObjList = pObj ? pObj->GetObjList() : NULL;
+ while( pObjList )
+ {
+ if( pSdrHint->GetObjList() == pObjList )
+ {
+ bClearMe = sal_True;
+ break;
+ }
+
+ pObjList = pObjList->GetUpList();
+ }
+ break;
+ }
+ };
+
+ if( bClearMe )
+ {
+ 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)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( pObj && pModel)
+ {
+ Rectangle aRect( getLogicRectHack(pObj) );
+ Point aPt( aRect.Left(), aRect.Top() );
+
+ // Position is relativ to anchor, so recalc to absolut position
+ if( pModel->IsWriter() )
+ 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)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( pObj && pModel )
+ {
+ // do NOT move 3D objects, this would change the homogen
+ // transformation matrix
+ if(!pObj->ISA(E3dCompoundObject))
+ {
+ Rectangle aRect( getLogicRectHack(pObj) );
+ Point aLocalPos( Position.X, Position.Y );
+ ForceMetricToItemPoolMetric(aLocalPos);
+
+ // Position ist absolut, relativ zum Anker stellen
+ if( pModel->IsWriter() )
+ 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)
+{
+ ::SolarMutexGuard aGuard;
+
+ 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)
+{
+ ::SolarMutexGuard aGuard;
+
+ 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;
+}
+
+//----------------------------------------------------------------------
+
+// XNamed
+OUString SAL_CALL SvxShape::getName( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if( pObj )
+ {
+ return pObj->GetName();
+ }
+ else
+ {
+ return aShapeName;
+ }
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::setName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if( pObj )
+ {
+ pObj->SetName( aName );
+ }
+ else
+ {
+ aShapeName = aName;
+ }
+}
+
+// XShapeDescriptor
+
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException)
+{
+ if( !aShapeType.getLength() )
+ return UHashMap::getNameFromId( mpImpl->mnObjId );
+
+ return aShapeType;
+}
+
+// XComponent
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( bDisposing )
+ return; // catched a recursion
+
+ bDisposing = sal_True;
+
+ lang::EventObject aEvt;
+ aEvt.Source = *(OWeakAggObject*) this;
+ aDisposeListeners.disposeAndClear(aEvt);
+
+ SdrObject* pObj = GetSdrObject();
+ if(pObj && pObj->IsInserted() && pObj->GetPage() )
+ {
+ 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->RemoveObject(nNum);
+ InvalidateSdrObject();
+ break;
+ }
+ }
+ }
+
+ if( pModel )
+ {
+ EndListening( *pModel );
+ pModel = NULL;
+ }
+}
+
+//----------------------------------------------------------------------
+
+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)
+{
+ if( mpImpl->mpMaster )
+ {
+ return mpImpl->mpMaster->getPropertySetInfo();
+ }
+ else
+ {
+ return _getPropertySetInfo();
+ }
+}
+
+Reference< beans::XPropertySetInfo > SAL_CALL
+ SvxShape::_getPropertySetInfo() throw(uno::RuntimeException)
+{
+ return aPropSet.getPropertySetInfo();
+}
+
+//----------------------------------------------------------------------
+
+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(), (USHORT)nWID, (USHORT)nWID );
+
+ if( SetFillAttribute( nWID, rName, aSet, pModel ) )
+ {
+ pObj->SetItemSetAndBroadcast(aSet);
+ return sal_True;
+ }
+ else
+ {
+ return sal_False;
+ }
+}
+
+//----------------------------------------------------------------------
+
+sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const ::rtl::OUString& rName, SfxItemSet& rSet, SdrModel* pModel )
+{
+ // check if an item with the given name and which id is inside the models
+ // pool or the stylesheet pool, if found its puttet in the itemse
+ if( !SetFillAttribute( nWID, rName, rSet ) )
+ {
+ // we did not find such item in one of the pools, so we check
+ // the property lists that are loaded for the model for items
+ // that support such.
+ String aStrName;
+ SvxUnogetInternalNameForItem( (sal_Int16)nWID, rName, aStrName );
+
+ switch( nWID )
+ {
+ case XATTR_FILLBITMAP:
+ {
+ XBitmapList* pBitmapList = pModel->GetBitmapList();
+
+ if( !pBitmapList )
+ return sal_False;
+
+ long nPos = ((XPropertyList*)pBitmapList)->Get(aStrName);
+ if( nPos == -1 )
+ return sal_False;
+
+ XBitmapEntry* pEntry = pBitmapList->Get( nPos );
+ XFillBitmapItem aBmpItem;
+ aBmpItem.SetWhich( XATTR_FILLBITMAP );
+ aBmpItem.SetName( rName );
+ aBmpItem.SetValue( pEntry->GetXBitmap() );
+ rSet.Put( aBmpItem );
+ break;
+ }
+ case XATTR_FILLGRADIENT:
+ {
+ XGradientList* pGradientList = pModel->GetGradientList();
+
+ if( !pGradientList )
+ return sal_False;
+
+ long nPos = ((XPropertyList*)pGradientList)->Get(aStrName);
+ if( nPos == -1 )
+ return sal_False;
+
+ XGradientEntry* pEntry = pGradientList->Get( nPos );
+ XFillGradientItem aGrdItem;
+ aGrdItem.SetWhich( XATTR_FILLGRADIENT );
+ aGrdItem.SetName( rName );
+ aGrdItem.SetValue( pEntry->GetGradient() );
+ rSet.Put( aGrdItem );
+ break;
+ }
+ case XATTR_FILLHATCH:
+ {
+ XHatchList* pHatchList = pModel->GetHatchList();
+
+ if( !pHatchList )
+ return sal_False;
+
+ long nPos = ((XPropertyList*)pHatchList)->Get(aStrName);
+ if( nPos == -1 )
+ return sal_False;
+
+ XHatchEntry* pEntry = pHatchList->Get( nPos );
+ XFillHatchItem aHatchItem;
+ aHatchItem.SetWhich( XATTR_FILLHATCH );
+ aHatchItem.SetName( rName );
+ aHatchItem.SetValue( pEntry->GetHatch() );
+ rSet.Put( aHatchItem );
+ break;
+ }
+ case XATTR_LINEEND:
+ case XATTR_LINESTART:
+ {
+ XLineEndList* pLineEndList = pModel->GetLineEndList();
+
+ if( !pLineEndList )
+ return sal_False;
+
+ long nPos = ((XPropertyList*)pLineEndList)->Get(aStrName);
+ if( nPos == -1 )
+ return sal_False;
+
+ XLineEndEntry* pEntry = pLineEndList->Get( nPos );
+ if( XATTR_LINEEND == nWID )
+ {
+ XLineEndItem aLEItem;
+ aLEItem.SetWhich( XATTR_LINEEND );
+ aLEItem.SetName( rName );
+ aLEItem.SetValue( pEntry->GetLineEnd() );
+ rSet.Put( aLEItem );
+ }
+ else
+ {
+ XLineStartItem aLSItem;
+ aLSItem.SetWhich( XATTR_LINESTART );
+ aLSItem.SetName( rName );
+ aLSItem.SetValue( pEntry->GetLineEnd() );
+ rSet.Put( aLSItem );
+ }
+
+ break;
+ }
+ case XATTR_LINEDASH:
+ {
+ XDashList* pDashList = pModel->GetDashList();
+
+ if( !pDashList )
+ return sal_False;
+
+ long nPos = ((XPropertyList*)pDashList)->Get(aStrName);
+ if( nPos == -1 )
+ return sal_False;
+
+ XDashEntry* pEntry = pDashList->Get( nPos );
+ XLineDashItem aDashItem;
+ aDashItem.SetWhich( XATTR_LINEDASH );
+ aDashItem.SetName( rName );
+ aDashItem.SetValue( pEntry->GetDash() );
+ rSet.Put( aDashItem );
+ break;
+ }
+ default:
+ return sal_False;
+ }
+ }
+
+ return sal_True;
+}
+
+//----------------------------------------------------------------------
+
+sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet )
+{
+ String aName;
+ SvxUnogetInternalNameForItem( (sal_Int16)nWID, rName, aName );
+
+ if( aName.Len() == 0 )
+ {
+ switch( nWID )
+ {
+ case XATTR_LINEEND:
+ case XATTR_LINESTART:
+ {
+ const String aEmpty;
+ const XPolygon aPoly;
+ if( nWID == XATTR_LINEEND )
+ rSet.Put( XLineEndItem( aEmpty, aPoly ) );
+ else
+ rSet.Put( XLineStartItem( aEmpty, aPoly ) );
+
+ return sal_True;
+ }
+ break;
+ case XATTR_FILLFLOATTRANSPARENCE:
+ {
+ // #85953# Set a disabled XFillFloatTransparenceItem
+ rSet.Put(XFillFloatTransparenceItem());
+
+ return sal_True;
+ }
+ break;
+ }
+
+ return sal_False;
+ }
+
+ const SfxItemPool* pPool = rSet.GetPool();
+
+ const String aSearchName( aName );
+ const USHORT nCount = pPool->GetItemCount((USHORT)nWID);
+ const NameOrIndex *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)pPool->GetItem((USHORT)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)
+{
+ if( mpImpl->mpMaster )
+ {
+ mpImpl->mpMaster->setPropertyValue( rPropertyName, rVal );
+ }
+ else
+ {
+ _setPropertyValue( rPropertyName, rVal );
+ }
+}
+
+void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& rVal )
+ throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(rPropertyName);
+
+ if( pObj && pModel )
+ {
+ if( pMap == NULL )
+ throw beans::UnknownPropertyException();
+
+ if( (pMap->nFlags & beans::PropertyAttribute::READONLY ) != 0 )
+ throw beans::PropertyVetoException();
+
+ pModel->SetChanged();
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_CAPTION_POINT:
+ {
+ awt::Point aPnt;
+ if( rVal >>= aPnt )
+ {
+ Point aVclPoint( aPnt.X, aPnt.Y );
+
+ // #90763# position is relative to top left, make it absolute
+ XPolyPolygon aEmptyPolygon;
+ Matrix3D aMatrix3D;
+ pObj->TRGetBaseGeometry(aMatrix3D, aEmptyPolygon);
+ aVclPoint.X() += FRound(aMatrix3D[0][2]);
+ aVclPoint.Y() += FRound(aMatrix3D[1][2]);
+
+ // #88657# metric of pool maybe twips (writer)
+ ForceMetricToItemPoolMetric(aVclPoint);
+
+ // #88491# position relative to anchor
+ if( pModel->IsWriter() )
+ {
+ aVclPoint += pObj->GetAnchorPos();
+ }
+
+ ((SdrCaptionObj*)pObj)->SetTailPos(aVclPoint);
+
+ return;
+ }
+ break;
+ }
+ case OWN_ATTR_TRANSFORMATION:
+ {
+ drawing::HomogenMatrix3 aMatrix;
+ if(rVal >>= aMatrix)
+ {
+ XPolyPolygon aEmptyPolygon;
+ Matrix3D aMatrix3D;
+ pObj->TRGetBaseGeometry(aMatrix3D, aEmptyPolygon);
+ aMatrix3D[0] = Point3D( aMatrix.Line1.Column1, aMatrix.Line1.Column2, aMatrix.Line1.Column3 );
+ aMatrix3D[1] = Point3D( aMatrix.Line2.Column1, aMatrix.Line2.Column2, aMatrix.Line2.Column3 );
+ aMatrix3D[2] = Point3D( aMatrix.Line3.Column1, aMatrix.Line3.Column2, aMatrix.Line3.Column3 );
+ pObj->TRSetBaseGeometry(aMatrix3D, aEmptyPolygon);
+ return;
+ }
+ break;
+ }
+
+ case OWN_ATTR_ZORDER:
+ {
+ sal_Int32 nNewOrdNum;
+ if(rVal >>= nNewOrdNum)
+ {
+ SdrObjList* pObjList = pObj->GetObjList();
+ if( pObjList )
+ {
+ SdrObject* pCheck =
+ pObjList->SetObjectOrdNum( pObj->GetOrdNum(), (ULONG)nNewOrdNum );
+ DBG_ASSERT( pCheck == pObj, "GetOrdNum() failed!" );
+ return;
+ }
+ }
+ break;
+ }
+ 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_MIRRORED:
+ {
+ sal_Bool bMirror;
+ if(rVal >>= bMirror )
+ {
+ if( pObj && pObj->ISA(SdrGrafObj) )
+ {
+ ((SdrGrafObj*)pObj)->SetMirrored(bMirror);
+ 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 ) )
+ {
+ 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) );
+ SvPersist* pPersist = pModel->GetPersist();
+ String aPersistName;
+ OUString aTmpStr;
+ Any aAny( getPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ) ) );
+ sal_Bool bOk = sal_False;
+
+ if( aAny >>= aTmpStr )
+ aPersistName = aTmpStr;
+
+ // if we already have a shape name check if its a unique storage name
+ if( aPersistName.Len() && !pPersist->Find( aPersistName ) )
+ {
+ SvInfoObjectRef xSub = new SvEmbeddedInfoObject( aIPObj, aPersistName );
+ bOk = pPersist->Move( xSub, aPersistName );
+ }
+ else
+ {
+ // generate a unique name
+ String aStr( aPersistName = String( RTL_CONSTASCII_USTRINGPARAM("Object ") ) );
+
+ // for-Schleife wegen Storage Bug 46033
+ for( sal_Int32 i = 1, n = 0; n < 100; n++ )
+ {
+ do
+ {
+ aStr = aPersistName;
+ aStr += String::CreateFromInt32( i++ );
+ }
+ while ( pPersist->Find( aStr ) );
+
+ SvInfoObjectRef xSub( new SvEmbeddedInfoObject( aIPObj, aStr ) );
+
+ if( pPersist->Move( xSub, aStr ) ) // Eigentuemer Uebergang
+ {
+ bOk = sal_True;
+ aPersistName = aStr;
+ break;
+ }
+ }
+ }
+
+ DBG_ASSERT( bOk, "could not create move ole stream!" );
+
+ if( bOk )
+ {
+ aAny <<= ( aTmpStr = aPersistName );
+ setPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ), aAny );
+ }
+
+ static_cast< SdrOle2Obj* >( pObj )->SetObjRef( aIPObj );
+ aIPObj->SetVisAreaSize( static_cast< SdrOle2Obj* >( pObj )->GetLogicRect().GetSize() );
+
+ return;
+ }
+ }
+ }
+ }
+ }
+ break;
+ }
+ case OWN_ATTR_EDGE_START_OBJ:
+ case OWN_ATTR_EDGE_END_OBJ:
+ case OWN_ATTR_GLUEID_HEAD:
+ case OWN_ATTR_GLUEID_TAIL:
+ case OWN_ATTR_EDGE_START_POS:
+ case OWN_ATTR_EDGE_END_POS:
+ {
+ SdrEdgeObj* pEdgeObj = PTR_CAST(SdrEdgeObj,pObj);
+ if(pEdgeObj)
+ {
+ switch(pMap->nWID)
+ {
+ case OWN_ATTR_EDGE_START_OBJ:
+ case OWN_ATTR_EDGE_END_OBJ:
+ {
+ Reference< drawing::XShape > xShape;
+ if( rVal >>= xShape )
+ {
+ SdrObject* pNode = GetSdrObjectFromXShape( xShape );
+ if( pNode )
+ {
+ pEdgeObj->ConnectToNode( pMap->nWID == OWN_ATTR_EDGE_START_OBJ, pNode );
+ pEdgeObj->setGluePointIndex( pMap->nWID == OWN_ATTR_EDGE_START_OBJ, -1 );
+ return;
+ }
+ }
+ break;
+ }
+
+ case OWN_ATTR_EDGE_START_POS:
+ case OWN_ATTR_EDGE_END_POS:
+ {
+ awt::Point aUnoPoint;
+ if( rVal >>= aUnoPoint )
+ {
+ Point aPoint( aUnoPoint.X, aUnoPoint.Y );
+ if( pModel->IsWriter() )
+ aPoint += pObj->GetAnchorPos();
+
+ pEdgeObj->SetTailPoint( pMap->nWID == OWN_ATTR_EDGE_START_POS, aPoint );
+ return;
+ }
+ break;
+ }
+
+ case OWN_ATTR_GLUEID_HEAD:
+ case OWN_ATTR_GLUEID_TAIL:
+ {
+ sal_Int32 nId;
+ if( rVal >>= nId )
+ {
+ pEdgeObj->setGluePointIndex( pMap->nWID == OWN_ATTR_GLUEID_HEAD, nId );
+ return;
+ }
+ }
+ }
+ }
+ break;
+ }
+ case OWN_ATTR_MEASURE_START_POS:
+ case OWN_ATTR_MEASURE_END_POS:
+ {
+ SdrMeasureObj* pMeasureObj = PTR_CAST(SdrMeasureObj,pObj);
+ awt::Point aUnoPoint;
+ if(pMeasureObj && ( rVal >>= aUnoPoint ) )
+ {
+ Point aPoint( aUnoPoint.X, aUnoPoint.Y );
+
+ if( pModel->IsWriter() )
+ aPoint += pObj->GetAnchorPos();
+
+ pMeasureObj->NbcSetPoint( aPoint, pMap->nWID == OWN_ATTR_MEASURE_START_POS ? 0 : 1 );
+ pMeasureObj->SendRepaintBroadcast();
+ pMeasureObj->SetChanged();
+ return;
+ }
+ break;
+ }
+ case OWN_ATTR_FILLBMP_MODE:
+ do
+ {
+ drawing::BitmapMode eMode;
+ if(!(rVal >>= eMode) )
+ {
+ sal_Int32 nMode;
+ if(!(rVal >>= nMode))
+ break;
+
+ eMode = (drawing::BitmapMode)nMode;
+ }
+ pObj->SetItem( XFillBmpStretchItem( eMode == drawing::BitmapMode_STRETCH ) );
+ pObj->SetItem( XFillBmpTileItem( eMode == drawing::BitmapMode_REPEAT ) );
+ return;
+ }
+ while(0);
+ break;
+
+ case SDRATTR_LAYERID:
+ {
+ sal_Int16 nLayerId;
+ if( rVal >>= nLayerId )
+ {
+ SdrLayer* pLayer = pModel->GetLayerAdmin().GetLayerPerID((unsigned char)nLayerId);
+ if( pLayer )
+ {
+ pObj->SetLayer((unsigned char)nLayerId);
+ return;
+ }
+ }
+ break;
+ }
+
+ case SDRATTR_LAYERNAME:
+ {
+ OUString aLayerName;
+ if( rVal >>= aLayerName )
+ {
+ const SdrLayer* pLayer=pModel->GetLayerAdmin().GetLayer(aLayerName, TRUE);
+ if( pLayer != NULL )
+ {
+ pObj->SetLayer( pLayer->GetID() );
+ return;
+ }
+ }
+ break;
+ }
+ case SDRATTR_ROTATEANGLE:
+ {
+ sal_Int32 nAngle;
+ if( rVal >>= nAngle )
+ {
+ Point aRef1(pObj->GetSnapRect().Center());
+ nAngle -= pObj->GetRotateAngle();
+ if (nAngle!=0)
+ {
+ double nSin=sin(nAngle*nPi180);
+ double nCos=cos(nAngle*nPi180);
+ pObj->Rotate(aRef1,nAngle,nSin,nCos);
+ }
+ return;
+ }
+
+ break;
+ }
+
+ case SDRATTR_SHEARANGLE:
+ {
+ sal_Int32 nShear;
+ if( rVal >>= nShear )
+ {
+ nShear -= pObj->GetShearAngle();
+ if(nShear != 0 )
+ {
+ Point aRef1(pObj->GetSnapRect().Center());
+ double nTan=tan(nShear*nPi180);
+ pObj->Shear(aRef1,nShear,nTan,FALSE);
+ return;
+ }
+ }
+
+ break;
+ }
+
+ case SDRATTR_OBJMOVEPROTECT:
+ {
+ sal_Bool bMoveProtect;
+ if( rVal >>= bMoveProtect )
+ {
+ pObj->SetMoveProtect(bMoveProtect);
+ return;
+ }
+ break;
+ }
+ case SDRATTR_OBJECTNAME:
+ {
+ OUString aName;
+ if( rVal >>= aName )
+ {
+ pObj->SetName( aName );
+ return;
+ }
+ break;
+ }
+ case SDRATTR_OBJPRINTABLE:
+ {
+ sal_Bool bPrintable;
+ if( rVal >>= bPrintable )
+ {
+ pObj->SetPrintable(bPrintable);
+ return;
+ }
+ break;
+ }
+ case SDRATTR_OBJSIZEPROTECT:
+ {
+ sal_Bool bResizeProtect;
+ if( rVal >>= bResizeProtect )
+ {
+ pObj->SetResizeProtect(bResizeProtect);
+ return;
+ }
+ break;
+ }
+ case OWN_ATTR_PAGE_NUMBER:
+ {
+ sal_Int32 nPageNum;
+ if( (rVal >>= nPageNum) && ( nPageNum >= 0 ) && ( nPageNum <= 0xffff ) )
+ {
+ nPageNum <<= 1;
+ nPageNum -= 1;
+
+ SdrPageObj* pPageObj = PTR_CAST(SdrPageObj,pObj);
+ if( pPageObj )
+ pPageObj->SetPageNum( (sal_uInt16)nPageNum );
+ return;
+ }
+ break;
+ }
+ case OWN_ATTR_OLE_VISAREA:
+ {
+ awt::Rectangle aVisArea;
+ if( (rVal >>= aVisArea) && pObj->ISA(SdrOle2Obj))
+ {
+ Rectangle aTmpArea( aVisArea.X, aVisArea.Y, aVisArea.X + aVisArea.Width, aVisArea.Y + aVisArea.Height );
+ ((SdrOle2Obj*)pObj)->SetVisibleArea( aTmpArea );
+ 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 aApiName;
+ if( rVal >>= aApiName )
+ {
+ if( SetFillAttribute( pMap->nWID, aApiName ) )
+ return;
+ }
+ break;
+ }
+
+ // warning, this fall-through is intended
+ }
+ default:
+ {
+ DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" );
+ DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
+
+ sal_Bool bIsNotPersist = pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST && pMap->nWID != SDRATTR_TEXTDIRECTION;
+
+ if( pMap->nWID == SDRATTR_ECKENRADIUS )
+ {
+ sal_Int32 nCornerRadius;
+ if( !(rVal >>= nCornerRadius) || (nCornerRadius < 0) || (nCornerRadius > 5000000))
+ throw IllegalArgumentException();
+ }
+
+ // HACK-fix #99090#
+ // since SdrTextObj::SetVerticalWriting exchanges
+ // SDRATTR_TEXT_AUTOGROWWIDTH and SDRATTR_TEXT_AUTOGROWHEIGHT,
+ // we have to set the textdirection here
+
+ if( pMap->nWID == SDRATTR_TEXTDIRECTION && pObj->ISA(SdrTextObj))
+ {
+ ::com::sun::star::text::WritingMode eMode;
+ rVal >>= eMode;
+ bool bVertical = eMode == ::com::sun::star::text::WritingMode_TB_RL;
+ OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
+ if( bVertical || pOPO )
+ {
+ if( NULL == pOPO )
+ {
+ ((SdrTextObj*)pObj)->ForceOutlinerParaObject();
+ pOPO = pObj->GetOutlinerParaObject();
+ }
+
+ pOPO->SetVertical(bVertical);
+ }
+ }
+
+ SfxItemSet* pSet;
+ if( mbIsMultiPropertyCall && !bIsNotPersist )
+ {
+ if( mpImpl->mpItemSet == NULL )
+ {
+ pSet = mpImpl->mpItemSet = pObj->GetItemSet().Clone();
+ }
+ else
+ {
+ pSet = mpImpl->mpItemSet;
+ }
+ }
+ else
+ {
+ pSet = new SfxItemSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ }
+
+ if( pSet->GetItemState( pMap->nWID ) != SFX_ITEM_SET )
+ pSet->Put(pObj->GetItem(pMap->nWID));
+
+ if( !SvxUnoTextRangeBase::SetPropertyValueHelper( *pSet, pMap, rVal, *pSet ))
+ {
+ if( pSet->GetItemState( pMap->nWID ) != SFX_ITEM_SET )
+ {
+ if(bIsNotPersist)
+ {
+ // Not-Persistant Attribute, hole diese extra
+ pObj->TakeNotPersistAttr(*pSet, sal_False);
+ }
+ }
+
+ if( pSet->GetItemState( pMap->nWID ) != SFX_ITEM_SET )
+ {
+ // Default aus ItemPool holen
+ if(pModel->GetItemPool().IsWhich(pMap->nWID))
+ pSet->Put(pModel->GetItemPool().GetDefaultItem(pMap->nWID));
+ }
+
+ if( pSet->GetItemState( pMap->nWID ) == SFX_ITEM_SET )
+ {
+ aPropSet.setPropertyValue( pMap, rVal, *pSet );
+
+ }
+ }
+
+ if(bIsNotPersist)
+ {
+ // Not-Persist Attribute extra setzen
+ pObj->ApplyNotPersistAttr( *pSet );
+ delete pSet;
+ }
+ else
+ {
+ // if we have a XMultiProperty call then the item set
+ // will be set in setPropertyValues later
+ if( !mbIsMultiPropertyCall )
+ {
+ pObj->SetItemSetAndBroadcast( *pSet );
+ delete pSet;
+ }
+ }
+ return;
+ }
+ }
+
+ throw lang::IllegalArgumentException();
+ }
+ 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 );
+ }
+}
+
+//----------------------------------------------------------------------
+
+const SvGlobalName SvxShape::GetClassName_Impl(::rtl::OUString& rHexCLSID)
+{
+ SvGlobalName aClassName;
+ if( pObj && pObj->ISA(SdrOle2Obj))
+ {
+ rHexCLSID = ::rtl::OUString();
+
+ if( static_cast< SdrOle2Obj* >( pObj )->IsEmpty() )
+ {
+ SvPersist* pPersist = pModel->GetPersist();
+
+ if( pPersist )
+ {
+ SvInfoObject * pEle = pPersist->Find( static_cast< SdrOle2Obj* >( pObj )->GetPersistName() );
+
+ if( pEle )
+ {
+ aClassName = pEle->GetClassName();
+ rHexCLSID = aClassName.GetHexName();
+ }
+ }
+ }
+
+ if (!rHexCLSID.getLength())
+ {
+ const SvInPlaceObjectRef& rIPRef = ((SdrOle2Obj*)pObj)->GetObjRef();
+
+ if (rIPRef.Is() )
+ {
+ aClassName = rIPRef->GetClassName();
+ rHexCLSID = aClassName.GetHexName();
+ }
+ }
+ }
+
+ return aClassName;
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpImpl && mpImpl->mpMaster )
+ return mpImpl->mpMaster->getPropertyValue( PropertyName );
+ else
+ return _getPropertyValue( PropertyName );
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ uno::Any aAny;
+ if( pObj && pModel )
+ {
+ if(pMap == NULL )
+ throw beans::UnknownPropertyException();
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_HASLEVELS:
+ {
+ aAny <<= SvxTextEditSource::hasLevels( pObj );
+ break;
+ }
+ case OWN_ATTR_CAPTION_POINT:
+ {
+ Point aVclPoint = ((SdrCaptionObj*)pObj)->GetTailPos();
+
+ // #88491# make pos relative to anchor
+ if( pModel->IsWriter() )
+ {
+ aVclPoint -= pObj->GetAnchorPos();
+ }
+
+ // #88657# metric of pool maybe twips (writer)
+ ForceMetricTo100th_mm(aVclPoint);
+
+ // #90763# pos is absolute, make it relative to top left
+ Matrix3D aMatrix3D;
+ XPolyPolygon aPolyPolygon;
+ pObj->TRGetBaseGeometry( aMatrix3D, aPolyPolygon );
+ aVclPoint.X() -= FRound(aMatrix3D[0][2]);
+ aVclPoint.Y() -= FRound(aMatrix3D[1][2]);
+
+ awt::Point aPnt( aVclPoint.X(), aVclPoint.Y() );
+ aAny <<= aPnt;
+ break;
+ }
+ case OWN_ATTR_INTERNAL_OLE:
+ {
+ ::rtl::OUString sCLSID;
+ sal_Bool bInternal = SvFactory::IsIntern( GetClassName_Impl(sCLSID), 0 );
+ aAny <<= bInternal;
+ break;
+ }
+ case OWN_ATTR_TRANSFORMATION:
+ {
+ Matrix3D aMatrix3D;
+ XPolyPolygon aPolyPolygon;
+ pObj->TRGetBaseGeometry( aMatrix3D, aPolyPolygon );
+
+ drawing::HomogenMatrix3 aMatrix;
+ aMatrix.Line1.Column1 = aMatrix3D[0].X();
+ aMatrix.Line1.Column2 = aMatrix3D[0].Y();
+ aMatrix.Line1.Column3 = aMatrix3D[0].W();
+
+ aMatrix.Line2.Column1 = aMatrix3D[1].X();
+ aMatrix.Line2.Column2 = aMatrix3D[1].Y();
+ aMatrix.Line2.Column3 = aMatrix3D[1].W();
+
+ aMatrix.Line3.Column1 = aMatrix3D[2].X();
+ aMatrix.Line3.Column2 = aMatrix3D[2].Y();
+ aMatrix.Line3.Column3 = aMatrix3D[2].W();
+ aAny <<= aMatrix;
+ break;
+ }
+ case OWN_ATTR_ZORDER:
+ {
+ aAny <<= (sal_Int32)pObj->GetOrdNum();
+ break;
+ }
+ case OWN_ATTR_BITMAP:
+ {
+ aAny = GetBitmap();
+ if(!aAny.hasValue())
+ throw uno::RuntimeException();
+
+ break;
+ }
+ case OWN_ATTR_ISFONTWORK:
+ {
+ aAny <<= (sal_Bool)(pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsFontwork());
+ 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:
+ { DBG_BF_ASSERT(0, "STRIP"); // Discussed with DL, this is not needed. Thus the bitmaps may be removed again, too.
+//STRIP003 sal_uInt16 nId;
+//STRIP003 if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2 )
+//STRIP003 {
+//STRIP003 nId = RID_UNODRAW_OLE2;
+//STRIP003 }
+//STRIP003 else if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF )
+//STRIP003 {
+//STRIP003 nId = RID_UNODRAW_GRAPHICS;
+//STRIP003 }
+//STRIP003 else
+//STRIP003 {
+//STRIP003 nId = RID_UNODRAW_OBJECTS;
+//STRIP003 }
+//STRIP003
+//STRIP003 BitmapEx aBmp( SVX_RES(nId) );
+//STRIP003 Reference< awt::XBitmap > xBmp( VCLUnoHelper::CreateBitmap( aBmp ) );
+//STRIP003
+//STRIP003 aAny <<= xBmp;
+ break;
+ }
+ case OWN_ATTR_OLE_VISAREA:
+ {
+ awt::Rectangle aVisArea;
+ if( pObj->ISA(SdrOle2Obj))
+ {
+ SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj;
+ const SvInPlaceObjectRef& xInplace = aObj.GetObjRef();
+ if( xInplace.Is() )
+ {
+ Rectangle aTmpArea( xInplace->GetVisArea() );
+ aVisArea = awt::Rectangle( aTmpArea.Left(), aTmpArea.Top(), aTmpArea.GetWidth(), aTmpArea.GetHeight() );
+ }
+ }
+ aAny <<= aVisArea;
+ 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:
+ {
+ if( pObj->ISA(SdrOle2Obj))
+ {
+ SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj;
+ SvOutPlaceObjectRef xOut( aObj.GetObjRef() );
+ if ( xOut.Is() )
+ aAny <<= xOut->GetUnoComponent();
+ else
+ aAny <<= ((SdrOle2Obj*)pObj)->getXModel();
+ }
+
+ 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;
+ SvGlobalName aClassName = GetClassName_Impl(aCLSID);
+ 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, sal_False );
+ const uno::Sequence<sal_Int8> aSeq(
+ static_cast< const sal_Int8* >(aDestStrm.GetData()),
+ aDestStrm.GetEndOfData());
+ 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:
+ case OWN_ATTR_GLUEID_HEAD:
+ case OWN_ATTR_GLUEID_TAIL:
+ {
+ 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( GetXShapeForSdrObject( 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 ) );
+ if( pModel->IsWriter() )
+ aPoint -= pObj->GetAnchorPos();
+
+ awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
+
+ aAny <<= aUnoPoint;
+ break;
+ }
+ case OWN_ATTR_GLUEID_HEAD:
+ case OWN_ATTR_GLUEID_TAIL:
+ {
+ aAny <<= pEdgeObj->getGluePointIndex( pMap->nWID == OWN_ATTR_GLUEID_HEAD );
+ break;
+ }
+ }
+ }
+ break;
+ }
+ case OWN_ATTR_MEASURE_START_POS:
+ case OWN_ATTR_MEASURE_END_POS:
+ {
+ SdrMeasureObj* pMeasureObj = PTR_CAST(SdrMeasureObj,pObj);
+ if(pMeasureObj)
+ {
+ Point aPoint( pMeasureObj->GetPoint( pMap->nWID == OWN_ATTR_MEASURE_START_POS ? 0 : 1 ) );
+ if( pModel->IsWriter() )
+ aPoint -= pObj->GetAnchorPos();
+
+ awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
+
+ aAny <<= aUnoPoint;
+ break;
+ }
+ break;
+ }
+ case OWN_ATTR_FILLBMP_MODE:
+ {
+ XFillBmpStretchItem* pStretchItem = (XFillBmpStretchItem*)&pObj->GetItem(XATTR_FILLBMP_STRETCH);
+ XFillBmpTileItem* pTileItem = (XFillBmpTileItem*)&pObj->GetItem(XATTR_FILLBMP_TILE);
+
+ if( pTileItem && pTileItem->GetValue() )
+ {
+ aAny <<= drawing::BitmapMode_REPEAT;
+ }
+ else if( pStretchItem && pStretchItem->GetValue() )
+ {
+ aAny <<= drawing::BitmapMode_STRETCH;
+ }
+ else
+ {
+ aAny <<= drawing::BitmapMode_NO_REPEAT;
+ }
+ break;
+ }
+ case SDRATTR_LAYERID:
+ aAny <<= (sal_Int16)pObj->GetLayer();
+ break;
+ case SDRATTR_LAYERNAME:
+ {
+ SdrLayer* pLayer = pModel->GetLayerAdmin().GetLayerPerID(pObj->GetLayer());
+ if( pLayer )
+ {
+ OUString aName( pLayer->GetName() );
+ aAny <<= aName;
+ }
+ }
+ break;
+ case SDRATTR_ROTATEANGLE:
+ aAny <<= pObj->GetRotateAngle();
+ break;
+ case SDRATTR_SHEARANGLE:
+ aAny <<= pObj->GetShearAngle();
+ break;
+ case SDRATTR_OBJMOVEPROTECT:
+ aAny = uno::makeAny( (sal_Bool) pObj->IsMoveProtect() );
+ break;
+ case SDRATTR_OBJECTNAME:
+ {
+ OUString aName( pObj->GetName() );
+ aAny <<= aName;
+ break;
+ }
+ case SDRATTR_OBJPRINTABLE:
+ aAny = uno::makeAny( (sal_Bool) pObj->IsPrintable() );
+ break;
+ case SDRATTR_OBJSIZEPROTECT:
+ aAny = uno::makeAny( (sal_Bool)pObj->IsResizeProtect() );
+ break;
+ case OWN_ATTR_PAGE_NUMBER:
+ {
+ SdrPageObj* pPageObj = PTR_CAST(SdrPageObj,pObj);
+ if(pPageObj)
+ {
+ sal_Int32 nPageNumber = pPageObj->GetPageNum();
+ nPageNumber++;
+ nPageNumber >>= 1;
+ aAny <<= nPageNumber;
+ }
+ break;
+ }
+ default:
+ {
+ DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || (pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST), "Not persist item not handled!" );
+ DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
+
+ SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ aSet.Put(pObj->GetItem(pMap->nWID));
+
+ 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())
+ {
+ // 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
+ {
+
+// Fixme: we should return default values for OWN_ATTR !
+
+ if(pMap && pMap->nWID)
+// FixMe: see setPropertyValue
+ aAny = aPropSet.getPropertyValue( pMap );
+
+ }
+ return aAny;
+}
+
+//----------------------------------------------------------------------
+
+// XMultiPropertySet
+void SAL_CALL SvxShape::setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+{
+ const sal_Int32 nCount = aPropertyNames.getLength();
+ const OUString* pNames = aPropertyNames.getConstArray();
+
+ const uno::Any* pValues = aValues.getConstArray();
+
+
+ try
+ {
+ mbIsMultiPropertyCall = sal_True;
+
+ if( mpImpl->mpMaster )
+ {
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
+ setPropertyValue( *pNames++, *pValues++ );
+ }
+ else
+ {
+ uno::Reference< beans::XPropertySet > xSet;
+ queryInterface( ::getCppuType( (const uno::Reference< beans::XPropertySet >*) 0) ) >>= xSet;
+
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
+ xSet->setPropertyValue( *pNames++, *pValues++ );
+ }
+
+ mbIsMultiPropertyCall = sal_False;
+
+ if( mpImpl->mpItemSet )
+ {
+ pObj->SetItemSetAndBroadcast( *mpImpl->mpItemSet );
+ delete mpImpl->mpItemSet;
+ mpImpl->mpItemSet = NULL;
+ }
+ }
+ catch( beans::UnknownPropertyException& e )
+ {
+ mbIsMultiPropertyCall = sal_False;
+
+ if( mpImpl->mpItemSet )
+ {
+ delete mpImpl->mpItemSet;
+ mpImpl->mpItemSet = NULL;
+ }
+
+ const OUString aMsg( RTL_CONSTASCII_USTRINGPARAM("UnknownPropertyException"));
+ const uno::Reference< uno::XInterface > xContext;
+
+ throw lang::WrappedTargetException( aMsg, xContext, uno::makeAny(e) );
+ }
+}
+
+//----------------------------------------------------------------------
+
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL SvxShape::getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException)
+{
+ const sal_Int32 nCount = aPropertyNames.getLength();
+ const OUString* pNames = aPropertyNames.getConstArray();
+
+ uno::Sequence< uno::Any > aRet( nCount );
+ uno::Any* pValue = aRet.getArray();;
+
+ if( mpImpl->mpMaster )
+ {
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pValue++ )
+ {
+ try
+ {
+ *pValue = getPropertyValue( *pNames++ );
+ }
+ catch( uno::Exception& )
+ {
+ DBG_ERROR( "SvxShape::getPropertyValues, unknown property asked" );
+ }
+ }
+ }
+ else
+ {
+ uno::Reference< beans::XPropertySet > xSet;
+ queryInterface( ::getCppuType( (const uno::Reference< beans::XPropertySet >*) 0) ) >>= xSet;
+
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pValue++ )
+ {
+ try
+ {
+ *pValue = xSet->getPropertyValue( *pNames++ );
+ }
+ catch( uno::Exception& )
+ {
+ DBG_ERROR( "SvxShape::getPropertyValues, unknown property asked" );
+ }
+ }
+ }
+
+ return aRet;
+}
+
+void SAL_CALL SvxShape::addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SvxShape::removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SvxShape::firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
+{
+}
+
+//----------------------------------------------------------------------
+
+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 );
+
+ if( *pMap->pType != aAny.getValueType() )
+ {
+ // since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
+ if( ( *pMap->pType == ::getCppuType((const sal_Int16*)0)) && aAny.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ {
+ sal_Int32 nValue;
+ aAny >>= nValue;
+ aAny <<= (sal_Int16)nValue;
+ }
+ else
+ {
+ DBG_ERROR("SvxShape::GetAnyForItem() Returnvalue has wrong Type!" );
+ }
+ }
+
+ }
+ }
+
+ return aAny;
+}
+
+//----------------------------------------------------------------------
+
+// XPropertyState
+beans::PropertyState SAL_CALL SvxShape::getPropertyState( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ if( mpImpl->mpMaster )
+ {
+ return mpImpl->mpMaster->getPropertyState( PropertyName );
+ }
+ else
+ {
+ return _getPropertyState( PropertyName );
+ }
+}
+
+beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ if( pObj == NULL || pMap == NULL )
+ throw beans::UnknownPropertyException();
+
+ if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ {
+ const SfxItemSet& rSet = pObj->GetItemSet();
+
+ if( rSet.GetItemState( XATTR_FILLBMP_STRETCH, false ) == SFX_ITEM_SET ||
+ rSet.GetItemState( XATTR_FILLBMP_TILE, false ) == SFX_ITEM_SET )
+ {
+ return beans::PropertyState_DIRECT_VALUE;
+ }
+ else
+ {
+ return beans::PropertyState_AMBIGUOUS_VALUE;
+ }
+ }
+ else if((( pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END ) ||
+ ( pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST )) && ( pMap->nWID != SDRATTR_TEXTDIRECTION ) )
+ {
+ return beans::PropertyState_DIRECT_VALUE;
+ }
+ else
+ {
+ const SfxItemSet& rSet = pObj->GetItemSet();
+
+ beans::PropertyState eState;
+
+ switch( rSet.GetItemState( pMap->nWID, sal_False ) )
+ {
+ case SFX_ITEM_READONLY:
+ case SFX_ITEM_SET:
+ eState = beans::PropertyState_DIRECT_VALUE;
+ break;
+ case SFX_ITEM_DEFAULT:
+ eState = beans::PropertyState_DEFAULT_VALUE;
+ break;
+// case SFX_ITEM_UNKNOWN:
+// case SFX_ITEM_DONTCARE:
+// case SFX_ITEM_DISABLED:
+ default:
+ eState = beans::PropertyState_AMBIGUOUS_VALUE;
+ break;
+ }
+
+ // if a item is set, this doesn't mean we want it :)
+ if( ( beans::PropertyState_DIRECT_VALUE == eState ) )
+ {
+ switch( pMap->nWID )
+ {
+ case XATTR_FILLBITMAP:
+ case XATTR_FILLGRADIENT:
+ case XATTR_FILLHATCH:
+ case XATTR_FILLFLOATTRANSPARENCE:
+ case XATTR_LINEEND:
+ case XATTR_LINESTART:
+ case XATTR_LINEDASH:
+ {
+ NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((USHORT)pMap->nWID);
+ if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) )
+ eState = beans::PropertyState_DEFAULT_VALUE;
+ }
+ }
+ }
+ return eState;
+ }
+}
+
+//----------------------------------------------------------------------
+
+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();
+
+ if( mpImpl->mpMaster )
+ {
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
+ pState[nIdx] = getPropertyState( pNames[nIdx] );
+
+ }
+ else
+ {
+ 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)
+{
+ if( mpImpl->mpMaster )
+ {
+ mpImpl->mpMaster->setPropertyToDefault( PropertyName );
+ }
+ else
+ {
+ _setPropertyToDefault( PropertyName );
+ }
+}
+
+void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ if( pObj == NULL || pModel == NULL || pMap == NULL )
+ throw beans::UnknownPropertyException();
+
+ if( pMap->nWID == OWN_ATTR_FILLBMP_MODE )
+ {
+ pObj->ClearItem( XATTR_FILLBMP_STRETCH );
+ pObj->ClearItem( XATTR_FILLBMP_TILE );
+ }
+ else if((pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END ) ||
+ ( pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST ))
+ {
+ return;
+ }
+ else
+ {
+ pObj->ClearItem( pMap->nWID );
+ }
+
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SAL_CALL SvxShape::getPropertyDefault( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpImpl->mpMaster )
+ {
+ return mpImpl->mpMaster->getPropertyDefault( aPropertyName );
+ }
+ else
+ {
+ return _getPropertyDefault( aPropertyName );
+ }
+}
+
+uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(aPropertyName);
+
+ if( pObj == NULL || pMap == NULL || pModel == NULL )
+ throw beans::UnknownPropertyException();
+
+ if(( pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END ) ||
+ ( pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST ))
+ {
+ 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 );
+ }
+}
+
+//----------------------------------------------------------------------
+
+//----------------------------------------------------------------------
+// XServiceInfo
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShape::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ static OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM("SvxShape") );
+ return aServiceName;
+}
+
+#define STAR_NAMESPACE "com.sun.star."
+
+const char* sUNO_service_style_ParagraphProperties = STAR_NAMESPACE "style.ParagraphProperties";
+const char* sUNO_service_style_ParagraphPropertiesComplex = STAR_NAMESPACE "style.ParagraphPropertiesComplex";
+const char* sUNO_service_style_ParagraphPropertiesAsian = STAR_NAMESPACE "style.ParagraphPropertiesAsian";
+const char* sUNO_service_style_CharacterProperties = STAR_NAMESPACE "style.CharacterProperties";
+const char* sUNO_service_style_CharacterPropertiesComplex = STAR_NAMESPACE "style.CharacterPropertiesComplex";
+const char* sUNO_service_style_CharacterPropertiesAsian = STAR_NAMESPACE "style.CharacterPropertiesAsian";
+
+const char* sUNO_service_drawing_FillProperties = STAR_NAMESPACE "drawing.FillProperties";
+const char* sUNO_service_drawing_TextProperties = STAR_NAMESPACE "drawing.TextProperties";
+const char* sUNO_service_drawing_LineProperties = STAR_NAMESPACE "drawing.LineProperties";
+const char* sUNO_service_drawing_ConnectorProperties = STAR_NAMESPACE "drawing.ConnectorProperties";
+const char* sUNO_service_drawing_MeasureProperties = STAR_NAMESPACE "drawing.MeasureProperties";
+const char* sUNO_service_drawing_ShadowProperties = STAR_NAMESPACE "drawing.ShadowProperties";
+
+const char* sUNO_service_drawing_RotationDescriptor = STAR_NAMESPACE "drawing.RotationDescriptor";
+
+const char* sUNO_service_drawing_Text = STAR_NAMESPACE "drawing.Text";
+const char* sUNO_service_drawing_GroupShape = STAR_NAMESPACE "drawing.GroupShape";
+
+const char* sUNO_service_drawing_PolyPolygonDescriptor = STAR_NAMESPACE "drawing.PolyPolygonDescriptor";
+const char* sUNO_service_drawing_PolyPolygonBezierDescriptor= STAR_NAMESPACE "drawing.PolyPolygonBezierDescriptor";
+
+const char* sUNO_service_drawing_LineShape = STAR_NAMESPACE "drawing.LineShape";
+const char* sUNO_service_drawing_Shape = STAR_NAMESPACE "drawing.Shape";
+const char* sUNO_service_drawing_RectangleShape = STAR_NAMESPACE "drawing.RectangleShape";
+const char* sUNO_service_drawing_EllipseShape = STAR_NAMESPACE "drawing.EllipseShape";
+const char* sUNO_service_drawing_PolyPolygonShape = STAR_NAMESPACE "drawing.PolyPolygonShape";
+const char* sUNO_service_drawing_PolyLineShape = STAR_NAMESPACE "drawing.PolyLineShape";
+const char* sUNO_service_drawing_OpenBezierShape = STAR_NAMESPACE "drawing.OpenBezierShape";
+const char* sUNO_service_drawing_ClosedBezierShape = STAR_NAMESPACE "drawing.ClosedBezierShape";
+const char* sUNO_service_drawing_TextShape = STAR_NAMESPACE "drawing.TextShape";
+const char* sUNO_service_drawing_GraphicObjectShape = STAR_NAMESPACE "drawing.GraphicObjectShape";
+const char* sUNO_service_drawing_OLE2Shape = STAR_NAMESPACE "drawing.OLE2Shape";
+const char* sUNO_service_drawing_PageShape = STAR_NAMESPACE "drawing.PageShape";
+const char* sUNO_service_drawing_CaptionShape = STAR_NAMESPACE "drawing.CaptionShape";
+const char* sUNO_service_drawing_MeasureShape = STAR_NAMESPACE "drawing.MeasureShape";
+const char* sUNO_service_drawing_FrameShape = STAR_NAMESPACE "drawing.FrameShape";
+const char* sUNO_service_drawing_ControlShape = STAR_NAMESPACE "drawing.ControlShape";
+const char* sUNO_service_drawing_ConnectorShape = STAR_NAMESPACE "drawing.ConnectorShape";
+
+
+uno::Sequence< OUString > SAL_CALL SvxShape::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ if( mpImpl->mpMaster )
+ {
+ return mpImpl->mpMaster->getSupportedServiceNames();
+ }
+ else
+ {
+ return _getSupportedServiceNames();
+ }
+}
+
+uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ if( pObj && pObj->GetObjInventor() == SdrInventor)
+ {
+ const UINT16 nIdent = pObj->GetObjIdentifier();
+
+ switch(nIdent)
+ {
+ case OBJ_GRUP:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_GroupServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_GroupServices, 2,
+ sUNO_service_drawing_GroupShape,
+ sUNO_service_drawing_Shape );
+
+ pSeq = &SvxShape_GroupServices;
+ }
+ }
+
+ return *pSeq;
+ }
+ case OBJ_LINE:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_LineServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_LineServices,14,
+ sUNO_service_drawing_LineShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_PolyPolygonDescriptor,
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_LineServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_RECT:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_RectServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_RectServices,14,
+ sUNO_service_drawing_RectangleShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_FillProperties,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+ pSeq = &SvxShape_RectServices;
+ }
+
+ }
+ return *pSeq;
+ }
+
+ case OBJ_CIRC:
+ case OBJ_SECT:
+ case OBJ_CARC:
+ case OBJ_CCUT:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_CircServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_CircServices,14,
+ sUNO_service_drawing_EllipseShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_FillProperties,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_CircServices;
+ }
+ }
+
+ return *pSeq;
+ }
+
+ case OBJ_PATHPLIN:
+ case OBJ_PLIN:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_PathServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_PathServices,14,
+ sUNO_service_drawing_PolyLineShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_PolyPolygonDescriptor,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+ pSeq = &SvxShape_PathServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_PATHPOLY:
+ case OBJ_POLY:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_PolyServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_PolyServices,15,
+ sUNO_service_drawing_PolyPolygonShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+ sUNO_service_drawing_FillProperties,
+
+ sUNO_service_drawing_PolyPolygonDescriptor,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_PolyServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_FREELINE:
+ case OBJ_PATHLINE:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_FreeLineServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_FreeLineServices,15,
+ sUNO_service_drawing_OpenBezierShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+ sUNO_service_drawing_FillProperties,
+
+ sUNO_service_drawing_PolyPolygonBezierDescriptor,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_FreeLineServices;
+ }
+ }
+
+ return *pSeq;
+ }
+
+ case OBJ_FREEFILL:
+ case OBJ_PATHFILL:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_FreeFillServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_FreeFillServices,15,
+ sUNO_service_drawing_ClosedBezierShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+ sUNO_service_drawing_FillProperties,
+
+ sUNO_service_drawing_PolyPolygonBezierDescriptor,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_FreeFillServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_OUTLINETEXT:
+ case OBJ_TITLETEXT:
+ case OBJ_TEXT:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_TextServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_TextServices,14,
+ sUNO_service_drawing_TextShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_FillProperties,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_TextServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_GRAF:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_GrafServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_GrafServices, 12,
+ sUNO_service_drawing_GraphicObjectShape,
+
+ sUNO_service_drawing_Shape,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_GrafServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_OLE2:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_Ole2Services;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_Ole2Services, 2,
+ sUNO_service_drawing_OLE2Shape,
+ sUNO_service_drawing_Shape);
+
+ pSeq = &SvxShape_Ole2Services;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_CAPTION:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_CaptionServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_CaptionServices,14,
+ sUNO_service_drawing_CaptionShape,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_FillProperties,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_CaptionServices;
+ }
+ }
+
+ return *pSeq;
+ }
+
+ case OBJ_PAGE:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_PageServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_PageServices, 2,
+ sUNO_service_drawing_PageShape,
+ sUNO_service_drawing_Shape );
+
+ pSeq = &SvxShape_PageServices;
+ }
+ }
+
+ return *pSeq;
+ }
+
+ case OBJ_MEASURE:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_MeasureServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_MeasureServices,15,
+ sUNO_service_drawing_MeasureShape,
+
+ sUNO_service_drawing_MeasureProperties,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_PolyPolygonDescriptor,
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_MeasureServices;
+ }
+ }
+
+ return *pSeq;
+ }
+
+ case OBJ_FRAME:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_FrameServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_FrameServices, 2,
+ sUNO_service_drawing_FrameShape,
+ sUNO_service_drawing_Shape );
+
+ pSeq = &SvxShape_FrameServices;
+ }
+ }
+
+ return *pSeq;
+ }
+
+ case OBJ_UNO:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_UnoServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2,
+ sUNO_service_drawing_ControlShape,
+ sUNO_service_drawing_Shape );
+
+ pSeq = &SvxShape_UnoServices;
+ }
+ }
+ return *pSeq;
+ }
+
+ case OBJ_EDGE:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_EdgeServices;
+
+ SvxServiceInfoHelper::addToSequence( SvxShape_EdgeServices,15,
+ sUNO_service_drawing_ConnectorShape,
+ sUNO_service_drawing_ConnectorProperties,
+
+ sUNO_service_drawing_Shape,
+ sUNO_service_drawing_LineProperties,
+
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_PolyPolygonDescriptor,
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
+
+ pSeq = &SvxShape_EdgeServices;
+ }
+ }
+ return *pSeq;
+ }
+ }
+ }
+ else if( pObj && pObj->GetObjInventor() == FmFormInventor)
+ {
+ const UINT16 nIdent = pObj->GetObjIdentifier();
+
+ switch(nIdent)
+ {
+ case OBJ_FM_CONTROL:
+ {
+ static uno::Sequence< OUString > *pSeq = 0;
+ if( 0 == pSeq )
+ {
+ ::SolarMutexGuard aGuard;
+ if( 0 == pSeq )
+ {
+ static uno::Sequence< OUString > SvxShape_UnoServices;
+ SvxServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2,
+ sUNO_service_drawing_ControlShape,
+ sUNO_service_drawing_Shape );
+
+ pSeq = &SvxShape_UnoServices;
+ }
+ }
+ return *pSeq;
+ }
+ }
+ }
+ uno::Sequence< OUString > aSeq;
+ return aSeq;
+}
+
+//----------------------------------------------------------------------
+sal_Bool SAL_CALL SvxShape::supportsService( const OUString& ServiceName ) throw ( uno::RuntimeException )
+{
+ Sequence< OUString > SupportedServices( getSupportedServiceNames() );
+ const ::rtl::OUString * pArray = SupportedServices.getConstArray();
+ const sal_Int32 nCount = SupportedServices.getLength();
+ sal_Int32 i;
+ for( i = 0; i < nCount; i++ )
+ if( *pArray++ == ServiceName )
+ return sal_True;
+ return sal_False;
+}
+
+//----------------------------------------------------------------------
+
+// XGluePointsSupplier
+uno::Reference< container::XIndexContainer > SAL_CALL SvxShape::getGluePoints()
+ throw(uno::RuntimeException)
+{
+ uno::Reference< container::XIndexContainer > xGluePoints( mxGluePoints );
+
+ if( !xGluePoints.is() )
+ {
+ uno::Reference< container::XIndexContainer > xNew( SvxUnoGluePointAccess_createInstance( pObj ), uno::UNO_QUERY );
+ mxGluePoints = xGluePoints = xNew;
+ }
+
+ return xGluePoints;
+}
+
+//----------------------------------------------------------------------
+
+// XChild
+uno::Reference< uno::XInterface > SAL_CALL SvxShape::getParent( )
+ throw(uno::RuntimeException)
+{
+
+ if( pObj && pObj->GetObjList() )
+ {
+ SdrObjList* pObjList = pObj->GetObjList();
+
+ switch( pObjList->GetListKind() )
+ {
+ case SDROBJLIST_GROUPOBJ:
+ if( pObjList->GetOwnerObj()->ISA( SdrObjGroup ) )
+ return PTR_CAST( SdrObjGroup, pObjList->GetOwnerObj())->getUnoShape();
+ else if( pObjList->GetOwnerObj()->ISA( E3dScene ) )
+ return PTR_CAST( E3dScene, pObjList->GetOwnerObj())->getUnoShape();
+ break;
+ case SDROBJLIST_DRAWPAGE:
+ case SDROBJLIST_MASTERPAGE:
+ return PTR_CAST( SdrPage, pObjList )->getUnoPage();
+ }
+
+
+ DBG_ERROR( "SvxShape::getParent( ): unexpected SdrObjListKind" );
+ }
+
+ uno::Reference< uno::XInterface > xParent;
+ return xParent;
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent )
+ throw(lang::NoSupportException, uno::RuntimeException)
+{
+ throw lang::NoSupportException();
+}
+
+//----------------------------------------------------------------------
+
+/** called from the XActionLockable interface methods on initial locking */
+void SvxShape::lock()
+{
+}
+
+//----------------------------------------------------------------------
+
+/** called from the XActionLockable interface methods on final unlock */
+void SvxShape::unlock()
+{
+}
+
+//----------------------------------------------------------------------
+
+// XActionLockable
+sal_Bool SAL_CALL SvxShape::isActionLocked( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ return mnLockCount != 0;
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::addActionLock( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ DBG_ASSERT( mnLockCount < 0xffff, "lock overflow in SvxShape!" );
+ mnLockCount++;
+
+ if( mnLockCount == 1 )
+ lock();
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::removeActionLock( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ DBG_ASSERT( mnLockCount > 0, "lock underflow in SvxShape!" );
+ mnLockCount--;
+
+ if( mnLockCount == 0 )
+ unlock();
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException )
+{
+ ::SolarMutexGuard aGuard;
+
+ if( (mnLockCount == 0) && (nLock != 0) )
+ unlock();
+
+ if( (mnLockCount != 0) && (nLock == 0) )
+ lock();
+
+ mnLockCount = (sal_uInt16)nLock;
+}
+
+//----------------------------------------------------------------------
+
+sal_Int16 SAL_CALL SvxShape::resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::SolarMutexGuard aGuard;
+
+ if( mnLockCount != 0 )
+ unlock();
+
+ sal_Int16 nOldLocks = (sal_Int16)mnLockCount;
+ mnLockCount = 0;
+
+ return nOldLocks;
+}
+
+//----------------------------------------------------------------------
+
+/** since polygon shapes can change theire kind during editing, we have
+ to recheck it here.
+ Circle shapes also change theire kind, but theire all treated equal
+ so no update is necessary.
+*/
+void SvxShape::updateShapeKind()
+{
+ switch( mpImpl->mnObjId )
+ {
+ case OBJ_LINE:
+ case OBJ_POLY:
+ case OBJ_PLIN:
+ case OBJ_PATHLINE:
+ case OBJ_PATHFILL:
+ case OBJ_FREELINE:
+ case OBJ_FREEFILL:
+ case OBJ_PATHPOLY:
+ case OBJ_PATHPLIN:
+ {
+ const sal_uInt32 nId = pObj->GetObjIdentifier();
+
+ if( nId != mpImpl->mnObjId )
+ {
+ mpImpl->mnObjId = nId;
+
+ }
+ break;
+ }
+ };
+}
+
+/***********************************************************************
+* class SvxShapeText *
+***********************************************************************/
+SvxShapeText::SvxShapeText( SdrObject* pObject ) throw ()
+: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+{
+ if( pObject && pObject->GetModel() )
+ SetEditSource( new SvxTextEditSource( pObject ) );
+}
+
+//----------------------------------------------------------------------
+SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ()
+: SvxShape( pObject, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+{
+ if( pObject && pObject->GetModel() )
+ SetEditSource( new SvxTextEditSource( pObject ) );
+}
+
+//----------------------------------------------------------------------
+SvxShapeText::~SvxShapeText() throw ()
+{
+}
+
+void SvxShapeText::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
+{
+ if( pNewObj && (NULL == GetEditSource()))
+ SetEditSource( new SvxTextEditSource( pNewObj ) );
+
+ SvxShape::Create( pNewObj, pNewPage );
+}
+
+// XInterface
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeText::queryInterface( const uno::Type & rType )
+ throw( uno::RuntimeException )
+{
+ return SvxShape::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeText::queryAggregation( const uno::Type & rType )
+ throw( uno::RuntimeException )
+{
+ uno::Any aAny;
+
+ if( !SvxShape::queryAggregation( rType, aAny ) )
+ SvxUnoTextBase::queryAggregation( rType, aAny );
+
+ return aAny;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeText::acquire() throw()
+{
+ SvxShape::acquire();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeText::release() throw()
+{
+ SvxShape::release();
+}
+
+// XServiceInfo
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShapeText::getImplementationName() throw( uno::RuntimeException )
+{
+ static OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM("SvxShapeText") );
+ return aServiceName;
+}
+
+//----------------------------------------------------------------------
+uno::Sequence< OUString > SAL_CALL SvxShapeText::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ return SvxShape::getSupportedServiceNames();
+}
+
+//----------------------------------------------------------------------
+sal_Bool SAL_CALL SvxShapeText::supportsService( const OUString& ServiceName ) throw ( uno::RuntimeException )
+{
+ return SvxShape::supportsService(ServiceName);
+}
+
+ // XTypeProvider
+//----------------------------------------------------------------------
+uno::Sequence< uno::Type > SAL_CALL SvxShapeText::getTypes()
+ throw( uno::RuntimeException )
+{
+ return SvxShape::getTypes();
+}
+
+sal_Int64 SAL_CALL SvxShapeText::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) \
+{
+ const sal_Int64 nReturn = SvxShape::getSomething( rId );
+ if( nReturn )
+ return nReturn;
+
+ return SvxUnoTextBase::getSomething( rId );
+}
+
+//----------------------------------------------------------------------
+uno::Sequence< sal_Int8 > SAL_CALL SvxShapeText::getImplementationId()
+ throw( uno::RuntimeException )
+{
+ static ::cppu::OImplementationId* pID = NULL ;
+
+ if ( pID == NULL )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MutexGuard aGuard( osl::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 ::cppu::OImplementationId aID( sal_False ) ;
+ // ... and set his address to static pointer!
+ pID = &aID ;
+ }
+ }
+
+ return pID->getImplementationId() ;
+}
+
+//----------------------------------------------------------------------
+
+/** called from the XActionLockable interface methods on initial locking */
+void SvxShapeText::lock()
+{
+ SvxTextEditSource* pEditSource = (SvxTextEditSource*)GetEditSource();
+ if( pEditSource )
+ pEditSource->lock();
+}
+
+//----------------------------------------------------------------------
+
+/** called from the XActionLockable interface methods on final unlock */
+void SvxShapeText::unlock()
+{
+ SvxTextEditSource* pEditSource = (SvxTextEditSource*)GetEditSource();
+ if( pEditSource )
+ pEditSource->unlock();
+}
+
+
+/***********************************************************************
+* class SvxShapeRect *
+***********************************************************************/
+SvxShapeRect::SvxShapeRect( SdrObject* pObj ) throw()
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE) )
+
+{
+
+}
+
+SvxShapeRect::~SvxShapeRect() throw()
+{
+}
+
+uno::Any SAL_CALL SvxShapeRect::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return SvxShapeText::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeRect::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return SvxShapeText::queryAggregation( rType );
+}
+
+void SAL_CALL SvxShapeRect::acquire() throw()
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxShapeRect::release() throw()
+{
+ OWeakAggObject::release();
+}
+//----------------------------------------------------------------------
+// XServiceInfo
+//----------------------------------------------------------------------
+uno::Sequence< OUString > SvxShapeRect::getSupportedServiceNames(void) throw( uno::RuntimeException )
+{
+ return SvxShape::getSupportedServiceNames();
+}
+
+/** returns a StarOffice API wrapper for the given SdrObject */
+uno::Reference< drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ()
+{
+ uno::Reference< drawing::XShape > xShape( pObj->getUnoShape(), uno::UNO_QUERY );
+ 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;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshcol.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshcol.cxx
new file mode 100644
index 000000000000..405fab2d726b
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshcol.cxx
@@ -0,0 +1,247 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/document/EventObject.hpp>
+
+#include "unoshcol.hxx"
+#include "unoprov.hxx"
+namespace binfilter {
+
+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( maMutex ), mrBHelper( maMutex )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeCollection::~SvxShapeCollection() throw()
+{
+}
+
+
+//----------------------------------------------------------------------
+Reference< uno::XInterface > SvxShapeCollection_NewInstance() throw()
+{
+ Reference< drawing::XShapes > xShapes( new SvxShapeCollection() );
+ Reference< uno::XInterface > xRef( xShapes, UNO_QUERY );
+ return xRef;
+}
+
+// XInterface
+void SvxShapeCollection::release() throw()
+{
+ uno::Reference< uno::XInterface > x( xDelegator );
+ if (! x.is())
+ {
+ if (osl_decrementInterlockedCount( &m_refCount ) == 0)
+ {
+ if (! mrBHelper.bDisposed)
+ {
+ uno::Reference< uno::XInterface > xHoldAlive( (uno::XWeak*)this );
+ // First dispose
+ try
+ {
+ dispose();
+ }
+ catch(::com::sun::star::uno::Exception&)
+ {
+ // release should not throw exceptions
+ }
+
+ // only the alive ref holds the object
+ OSL_ASSERT( m_refCount == 1 );
+ // destroy the object if xHoldAlive decrement the refcount to 0
+ return;
+ }
+ }
+ // restore the reference count
+ osl_incrementInterlockedCount( &m_refCount );
+ }
+ OWeakAggObject::release();
+}
+
+// XComponent
+void SvxShapeCollection::disposing() throw()
+{
+ maShapeContainer.clear();
+}
+
+// XComponent
+void SvxShapeCollection::dispose()
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ // An frequently programming error is to release the last
+ // reference to this object in the disposing message.
+ // Make it rubust, hold a self Reference.
+ uno::Reference< lang::XComponent > xSelf( this );
+
+ // Guard dispose against multible threading
+ // Remark: It is an error to call dispose more than once
+ sal_Bool bDoDispose = sal_False;
+ {
+ osl::MutexGuard aGuard( mrBHelper.rMutex );
+ if( !mrBHelper.bDisposed && !mrBHelper.bInDispose )
+ {
+ // only one call go into this section
+ mrBHelper.bInDispose = sal_True;
+ bDoDispose = sal_True;
+ }
+ }
+
+ // Do not hold the mutex because we are broadcasting
+ if( bDoDispose )
+ {
+ // Create an event with this as sender
+ try
+ {
+ uno::Reference< uno::XInterface > xSource( uno::Reference< uno::XInterface >::query( (lang::XComponent *)this ) );
+ document::EventObject aEvt;
+ aEvt.Source = xSource;
+ // inform all listeners to release this object
+ // The listener container are automaticly cleared
+ mrBHelper.aLC.disposeAndClear( aEvt );
+ // notify subclasses to do their dispose
+ disposing();
+ }
+ catch(::com::sun::star::uno::Exception& e)
+ {
+ // catch exception and throw again but signal that
+ // the object was disposed. Dispose should be called
+ // only once.
+ mrBHelper.bDisposed = sal_True;
+ mrBHelper.bInDispose = sal_False;
+ throw e;
+ }
+
+ // the values bDispose and bInDisposing must set in this order.
+ // No multithread call overcome the "!rBHelper.bDisposed && !rBHelper.bInDispose" guard.
+ mrBHelper.bDisposed = sal_True;
+ mrBHelper.bInDispose = sal_False;
+ }
+ else
+ {
+ // in a multithreaded environment, it can't be avoided, that dispose is called twice.
+ // However this condition is traced, because it MAY indicate an error.
+ OSL_TRACE( "OComponentHelper::dispose() - dispose called twice" );
+ }
+}
+
+// XComponent
+void SAL_CALL SvxShapeCollection::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException)
+{
+ mrBHelper.addListener( ::getCppuType( &aListener ) , aListener );
+}
+
+// XComponent
+void SAL_CALL SvxShapeCollection::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException)
+{
+ mrBHelper.removeListener( ::getCppuType( &aListener ) , aListener );
+}
+
+// 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() );
+
+
+ return uno::makeAny( Reference< XShape>(static_cast< drawing::XShape* >( xElements.getArray()[Index].get())) );
+}
+
+// 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.Shapes") );
+ return aSeq;
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshtxt.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshtxt.cxx
new file mode 100644
index 000000000000..cbb61c9506da
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshtxt.cxx
@@ -0,0 +1,980 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <unoshtxt.hxx>
+#include <unoedhlp.hxx>
+
+#include <bf_svtools/style.hxx>
+#include <svdoutl.hxx>
+#include <svdview.hxx>
+#include <unoviwou.hxx>
+#include "outlobj.hxx"
+#include "svdpage.hxx"
+#include "editeng.hxx"
+#include "editobj.hxx"
+
+#include "unotext.hxx"
+#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+#include <legacysmgr/legacy_binfilters_smgr.hxx>
+
+namespace binfilter {
+
+
+using namespace ::osl;
+using namespace ::rtl;
+
+namespace css = ::com::sun::star;
+
+
+//------------------------------------------------------------------------
+// SvxTextEditSourceImpl
+//------------------------------------------------------------------------
+
+/** @descr
+ <p>This class essentially provides the text and view forwarders. If
+ no SdrView is given, this class handles the UNO objects, which are
+ currently not concerned with view issues. In this case,
+ GetViewForwarder() always returns NULL and the underlying
+ EditEngine of the SvxTextForwarder is a background one (i.e. not
+ the official DrawOutliner, but one created exclusively for this
+ object, with no relation to a view).
+ </p>
+
+ <p>If a SdrView is given at construction time, the caller is
+ responsible for destroying this object when the view becomes
+ invalid (the views cannot notify). If GetViewForwarder(sal_True)
+ is called, the underlying shape is put into edit mode, the view
+ forwarder returned encapsulates the OutlinerView and the next call
+ to GetTextForwarder() yields a forwarder encapsulating the actual
+ DrawOutliner. Thus, changes on that Outliner are immediately
+ reflected on the screen. If the object leaves edit mode, the old
+ behaviour is restored.</p>
+ */
+class SvxTextEditSourceImpl : public SfxListener, public SfxBroadcaster
+{
+private:
+ oslInterlockedCount maRefCount;
+
+ SdrObject* mpObject;
+ SdrView* mpView;
+ const Window* mpWindow;
+ SdrModel* mpModel;
+ SdrOutliner* mpOutliner;
+ SvxOutlinerForwarder* mpTextForwarder;
+ SvxDrawOutlinerViewForwarder* mpViewForwarder; // if non-NULL, use GetViewModeTextForwarder text forwarder
+ css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLinguServiceManager;
+ Point maTextOffset;
+ BOOL mbDataValid;
+ BOOL mbDestroyed;
+ BOOL mbIsLocked;
+ BOOL mbNeedsUpdate;
+ BOOL mbOldUndoMode;
+ BOOL mbForwarderIsEditMode; // have to reflect that, since ENDEDIT can happen more often
+ BOOL mbShapeIsEditMode; // #104157# only true, if HINT_BEGEDIT was received
+ BOOL mbNotificationsDisabled; // prevent EditEngine/Outliner notifications (e.g. when setting up forwarder)
+
+ SvxTextForwarder* GetBackgroundTextForwarder();
+ SvxTextForwarder* GetEditModeTextForwarder();
+ SvxDrawOutlinerViewForwarder* CreateViewForwarder();
+
+ void SetupOutliner();
+
+ sal_Bool HasView() const { return mpView ? sal_True : sal_False; }
+ sal_Bool IsEditMode() const
+ {
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ return mbShapeIsEditMode && pTextObj && pTextObj->IsTextEditActive() ? sal_True : sal_False;
+ }
+
+public:
+ SvxTextEditSourceImpl( SdrObject* pObject );
+ ~SvxTextEditSourceImpl();
+
+ void SAL_CALL acquire();
+ void SAL_CALL release();
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ SvxEditSource* Clone() const;
+ SvxTextForwarder* GetTextForwarder();
+ SvxEditViewForwarder* GetEditViewForwarder( sal_Bool );
+ void UpdateData();
+
+ SdrObject* GetSdrObject() const { return mpObject; }
+
+ void lock();
+ void unlock();
+
+ BOOL IsValid() const;
+
+ Rectangle GetVisArea();
+ Point LogicToPixel( const Point&, const MapMode& rMapMode );
+ Point PixelToLogic( const Point&, const MapMode& rMapMode );
+
+ DECL_LINK( NotifyHdl, EENotify* );
+
+};
+
+//------------------------------------------------------------------------
+
+SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject* pObject )
+ : maRefCount ( 0 ),
+ mpObject ( pObject ),
+ mpView ( NULL ),
+ mpWindow ( NULL ),
+ mpModel ( pObject ? pObject->GetModel() : NULL ),
+ mpOutliner ( NULL ),
+ mpTextForwarder ( NULL ),
+ mpViewForwarder ( NULL ),
+ mbDataValid ( FALSE ),
+ mbDestroyed ( FALSE ),
+ mbIsLocked ( FALSE ),
+ mbNeedsUpdate ( FALSE ),
+ mbOldUndoMode ( FALSE ),
+ mbForwarderIsEditMode ( FALSE ),
+ mbShapeIsEditMode ( FALSE ),
+ mbNotificationsDisabled ( FALSE )
+{
+ DBG_ASSERT( mpObject, "invalid pObject!" );
+
+ if( mpModel )
+ StartListening( *mpModel );
+}
+
+//------------------------------------------------------------------------
+
+SvxTextEditSourceImpl::~SvxTextEditSourceImpl()
+{
+ DBG_ASSERT( mbIsLocked == sal_False, "text edit source was not unlocked before dispose!" );
+
+ if( mpModel )
+ EndListening( *mpModel );
+ if( mpView )
+ EndListening( *mpView );
+
+ delete mpTextForwarder;
+ delete mpViewForwarder;
+ if( mpOutliner )
+ {
+ // #101088# Deregister on outliner, might be reused from outliner cache
+ mpOutliner->SetNotifyHdl( Link() );
+
+ if( mpModel )
+ {
+ mpModel->disposeOutliner( mpOutliner );
+ }
+ else
+ {
+ delete mpOutliner;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SAL_CALL SvxTextEditSourceImpl::acquire()
+{
+ osl_incrementInterlockedCount( &maRefCount );
+}
+
+//------------------------------------------------------------------------
+
+void SAL_CALL SvxTextEditSourceImpl::release()
+{
+ if( ! osl_decrementInterlockedCount( &maRefCount ) )
+ delete this;
+}
+
+//------------------------------------------------------------------------
+
+void SvxTextEditSourceImpl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+ const SvxViewHint* pViewHint = PTR_CAST( SvxViewHint, &rHint );
+
+ if( pViewHint )
+ {
+ switch( pViewHint->GetId() )
+ {
+ case SVX_HINT_VIEWCHANGED:
+ Broadcast( *pViewHint );
+ break;
+ }
+ }
+ else if( pSdrHint )
+ {
+ switch( pSdrHint->GetKind() )
+ {
+ case HINT_OBJCHG:
+ {
+ mbDataValid = FALSE; // Text muss neu geholt werden
+
+ if( HasView() )
+ {
+ // #104157# Update maTextOffset, object has changed
+ // #105196#, #105203#: Cannot call that // here,
+ // since TakeTextRect() (called from there) //
+ // changes outliner content.
+
+ // #101029# Broadcast object changes, as they might change visible attributes
+ SvxViewHint aHint(SVX_HINT_VIEWCHANGED);
+ Broadcast( aHint );
+ }
+ break;
+ }
+
+ case HINT_OBJREMOVED:
+ if( mpObject == pSdrHint->GetObject() )
+ {
+ mbDestroyed = TRUE;
+ }
+ break;
+
+ case HINT_MODELCLEARED:
+ mbDestroyed = TRUE;
+ break;
+
+ case HINT_OBJLISTCLEAR:
+ {
+ SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
+ while( pObjList )
+ {
+ if( pSdrHint->GetObjList() == pObjList )
+ {
+ mbDestroyed = sal_True;
+ break;
+ }
+
+ pObjList = pObjList->GetUpList();
+ }
+ break;
+ }
+
+ case HINT_BEGEDIT:
+ if( mpObject == pSdrHint->GetObject() )
+ {
+ // invalidate old forwarder
+ if( !mbForwarderIsEditMode )
+ {
+ delete mpTextForwarder;
+ mpTextForwarder = NULL;
+ }
+
+ // register as listener - need to broadcast state change messages
+ if( mpView && mpView->GetTextEditOutliner() )
+ mpView->GetTextEditOutliner()->SetNotifyHdl( LINK(this, SvxTextEditSourceImpl, NotifyHdl) );
+
+ // #104157# Only now we're really in edit mode
+ mbShapeIsEditMode = TRUE;
+
+ Broadcast( *pSdrHint );
+ }
+ break;
+
+ case HINT_ENDEDIT:
+ if( mpObject == pSdrHint->GetObject() )
+ {
+ Broadcast( *pSdrHint );
+
+ // #104157# We're no longer in edit mode
+ mbShapeIsEditMode = FALSE;
+
+ // remove as listener - outliner might outlive ourselves
+ if( mpView && mpView->GetTextEditOutliner() )
+ mpView->GetTextEditOutliner()->SetNotifyHdl( Link() );
+
+ // destroy view forwarder, OutlinerView no longer
+ // valid (no need for UpdateData(), it's been
+ // synched on EndTextEdit)
+ delete mpViewForwarder;
+ mpViewForwarder = NULL;
+
+ // #100424# Invalidate text forwarder, we might
+ // not be called again before entering edit mode a
+ // second time! Then, the old outliner might be
+ // invalid.
+ if( mbForwarderIsEditMode )
+ {
+ mbForwarderIsEditMode = sal_False;
+ delete mpTextForwarder;
+ mpTextForwarder = NULL;
+ }
+ }
+ break;
+ }
+ }
+
+ if( mbDestroyed )
+ {
+ delete mpTextForwarder;
+ mpTextForwarder = NULL;
+
+ delete mpViewForwarder;
+ mpViewForwarder = NULL;
+
+ if( mpOutliner )
+ {
+ // #101088# Deregister on outliner, might be reused from outliner cache
+ mpOutliner->SetNotifyHdl( Link() );
+
+ if( mpModel )
+ {
+ mpModel->disposeOutliner( mpOutliner );
+ }
+ else
+ {
+ delete mpOutliner;
+ }
+ mpOutliner = NULL;
+ }
+
+ if( mpModel )
+ {
+ EndListening( *mpModel );
+ mpModel = NULL;
+ }
+ if( mpView )
+ {
+ EndListening( *mpView );
+ mpView = NULL;
+ }
+
+ mpObject = NULL;
+ mpWindow = NULL;
+
+ Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SvxTextEditSourceImpl::SetupOutliner()
+{
+ // #101029#
+ // only for UAA edit source: setup outliner equivalently as in
+ // SdrTextObj::Paint(), such that formatting equals screen
+ // layout
+ if( mpObject && mpOutliner )
+ {
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ Rectangle aPaintRect;
+ if( pTextObj )
+ {
+ Rectangle aBoundRect( pTextObj->GetBoundRect() );
+ pTextObj->SetupOutlinerFormatting( *mpOutliner, aPaintRect );
+
+ // #101029# calc text offset from shape anchor
+ maTextOffset = aPaintRect.TopLeft() - aBoundRect.TopLeft();
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
+{
+ sal_Bool bCreated = sal_False;
+
+ // #99840#: prevent EE/Outliner notifications during setup
+ mbNotificationsDisabled = sal_True;
+
+ if (!mpTextForwarder)
+ {
+ if( mpOutliner == NULL )
+ {
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ USHORT nOutlMode = OUTLINERMODE_TEXTOBJECT;
+ if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_OUTLINETEXT )
+ nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+
+ mpOutliner = mpModel->createOutliner( nOutlMode );
+
+ // #109151# Do the setup after outliner creation, would be useless otherwise
+ if( HasView() )
+ {
+ // #101029#, #104157# Setup outliner _before_ filling it
+ SetupOutliner();
+ }
+
+ mpOutliner->SetTextObjNoInit( pTextObj );
+/*
+ mpOutliner = SdrMakeOutliner( nOutlMode, pModel );
+ Outliner& aDrawOutliner = pModel->GetDrawOutliner();
+ mpOutliner->SetCalcFieldValueHdl( aDrawOutliner.GetCalcFieldValueHdl() );
+*/
+ if( mbIsLocked )
+ {
+ ((EditEngine*)&(mpOutliner->GetEditEngine()))->SetUpdateMode( sal_False );
+ mbOldUndoMode = ((EditEngine*)&(mpOutliner->GetEditEngine()))->IsUndoEnabled();
+ ((EditEngine*)&(mpOutliner->GetEditEngine()))->EnableUndo( sal_False );
+ }
+ }
+
+ mpTextForwarder = new SvxOutlinerForwarder( *mpOutliner, mpObject );
+
+ // delay listener subscription and UAA initialization until Outliner is fully setup
+ bCreated = sal_True;
+
+ mbForwarderIsEditMode = sal_False;
+ }
+
+ if( mpObject && !mbDataValid && mpObject->IsInserted() && mpObject->GetPage() )
+ {
+ mpTextForwarder->flushCache();
+
+ OutlinerParaObject* mpOutlinerParaObject = NULL;
+ BOOL bTextEditActive = FALSE;
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ if( pTextObj )
+ mpOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
+
+ if( mpOutlinerParaObject )
+ bTextEditActive = TRUE; // text edit active
+ else
+ mpOutlinerParaObject = mpObject->GetOutlinerParaObject();
+
+ if( mpOutlinerParaObject && ( bTextEditActive || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) )
+ {
+ mpOutliner->SetText( *mpOutlinerParaObject );
+
+ // #91254# put text to object and set EmptyPresObj to FALSE
+ if( pTextObj && bTextEditActive && mpOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() )
+ {
+ mpObject->SetEmptyPresObj( FALSE );
+ pTextObj->SetOutlinerParaObject( mpOutlinerParaObject );
+ }
+ }
+ else
+ {
+ sal_Bool bVertical = mpOutlinerParaObject ? mpOutlinerParaObject->IsVertical() : sal_False;
+
+ // set objects style sheet on empty outliner
+ SfxStyleSheetPool* pPool = (SfxStyleSheetPool*)mpObject->GetModel()->GetStyleSheetPool();
+ if( pPool )
+ mpOutliner->SetStyleSheetPool( pPool );
+
+ SfxStyleSheet* pStyleSheet = mpObject->GetPage()->GetTextStyleSheetForObject( mpObject );
+ if( pStyleSheet )
+ mpOutliner->SetStyleSheet( 0, pStyleSheet );
+
+ if( bVertical )
+ mpOutliner->SetVertical( sal_True );
+ }
+
+ // evtually we have to set the border attributes
+ if (mpOutliner->GetParagraphCount()==1)
+ {
+ // if we only have one paragraph we check if it is empty
+ XubString aStr( mpOutliner->GetText( mpOutliner->GetParagraph( 0 ) ) );
+
+ if(!aStr.Len())
+ {
+ // its empty, so we have to force the outliner to initialise itself
+ mpOutliner->SetText( String(), mpOutliner->GetParagraph( 0 ) );
+
+ if(mpObject->GetStyleSheet())
+ mpOutliner->SetStyleSheet( 0, mpObject->GetStyleSheet());
+ }
+ }
+
+ mbDataValid = TRUE;
+ }
+
+ if( bCreated && mpOutliner && HasView() )
+ {
+ // register as listener - need to broadcast state change messages
+ // registration delayed until outliner is completely set up
+ mpOutliner->SetNotifyHdl( LINK(this, SvxTextEditSourceImpl, NotifyHdl) );
+ }
+
+ // #99840#: prevent EE/Outliner notifications during setup
+ mbNotificationsDisabled = sal_False;
+
+ return mpTextForwarder;
+}
+
+//------------------------------------------------------------------------
+
+SvxTextForwarder* SvxTextEditSourceImpl::GetEditModeTextForwarder()
+{
+ if( !mpTextForwarder && HasView() )
+ {
+ SdrOutliner* pEditOutliner = mpView->GetTextEditOutliner();
+
+ if( pEditOutliner )
+ {
+ mpTextForwarder = new SvxOutlinerForwarder( *pEditOutliner, mpObject );
+
+ mbForwarderIsEditMode = sal_True;
+ }
+ }
+
+ return mpTextForwarder;
+}
+
+//------------------------------------------------------------------------
+
+SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder()
+{
+ if( mbDestroyed || mpObject == NULL )
+ return NULL;
+
+ if( mpModel == NULL )
+ mpModel = mpObject->GetModel();
+
+ if( mpModel == NULL )
+ return NULL;
+
+ // distinguish the cases
+ // a) connected to view, maybe edit mode is active, can work directly on the EditOutliner
+ // b) background Outliner, reflect changes into ParaOutlinerObject (this is exactly the old UNO code)
+ if( HasView() )
+ {
+ if( IsEditMode() != mbForwarderIsEditMode )
+ {
+ // forwarder mismatch - create new
+ delete mpTextForwarder;
+ mpTextForwarder = NULL;
+ }
+
+ if( IsEditMode() )
+ return GetEditModeTextForwarder();
+ else
+ return GetBackgroundTextForwarder();
+ }
+ else
+ return GetBackgroundTextForwarder();
+}
+
+//------------------------------------------------------------------------
+
+SvxDrawOutlinerViewForwarder* SvxTextEditSourceImpl::CreateViewForwarder()
+{
+ if( mpView->GetTextEditOutlinerView() && mpObject )
+ {
+ // register as listener - need to broadcast state change messages
+ mpView->GetTextEditOutliner()->SetNotifyHdl( LINK(this, SvxTextEditSourceImpl, NotifyHdl) );
+
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ if( pTextObj )
+ {
+ Rectangle aBoundRect( pTextObj->GetBoundRect() );
+ OutlinerView& rOutlView = *mpView->GetTextEditOutlinerView();
+
+ return new SvxDrawOutlinerViewForwarder( rOutlView, aBoundRect.TopLeft() );
+ }
+ }
+
+ return NULL;
+}
+
+SvxEditViewForwarder* SvxTextEditSourceImpl::GetEditViewForwarder( sal_Bool bCreate )
+{
+ if( mbDestroyed || mpObject == NULL )
+ return NULL;
+
+ if( mpModel == NULL )
+ mpModel = mpObject->GetModel();
+
+ if( mpModel == NULL )
+ return NULL;
+
+ // shall we delete?
+ if( mpViewForwarder )
+ {
+ if( !IsEditMode() )
+ {
+ // destroy all forwarders (no need for UpdateData(),
+ // it's been synched on EndTextEdit)
+ delete mpViewForwarder;
+ mpViewForwarder = NULL;
+ }
+ }
+ // which to create? Directly in edit mode, create new, or none?
+ else if( mpView )
+ {
+ if( IsEditMode() )
+ {
+ // create new view forwarder
+ mpViewForwarder = CreateViewForwarder();
+ }
+ else if( bCreate )
+ {
+ // dispose old text forwarder
+ UpdateData();
+
+ delete mpTextForwarder;
+ mpTextForwarder = NULL;
+
+ // enter edit mode
+ mpView->EndTextEdit();
+ if( mpView->BegTextEdit( mpObject, NULL, NULL, (SdrOutliner*)NULL, NULL, FALSE, FALSE ) )
+ {
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ if( pTextObj->IsTextEditActive() )
+ {
+ // create new view forwarder
+ mpViewForwarder = CreateViewForwarder();
+ }
+ else
+ {
+ // failure. Somehow, BegTextEdit did not set
+ // our SdrTextObj into edit mode
+ mpView->EndTextEdit();
+ }
+ }
+ }
+ }
+
+ return mpViewForwarder;
+}
+
+//------------------------------------------------------------------------
+
+void SvxTextEditSourceImpl::UpdateData()
+{
+ // if we have a view and in edit mode, we're working with the
+ // DrawOutliner. Thus, all changes made on the text forwarder are
+ // reflected on the view and committed to the model on
+ // EndTextEdit(). Thus, no need for explicit updates here.
+ if( !HasView() || !IsEditMode() )
+ {
+ if( mbIsLocked )
+ {
+ mbNeedsUpdate = sal_True;
+ }
+ else
+ {
+ if( mpOutliner && mpObject && !mbDestroyed )
+ {
+ if( mpOutliner->GetParagraphCount() != 1 || mpOutliner->GetEditEngine().GetTextLen( 0 ) )
+ {
+ if( mpOutliner->GetParagraphCount() > 1 )
+ {
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_TITLETEXT )
+ {
+ while( mpOutliner->GetParagraphCount() > 1 )
+ {
+ ESelection aSel( 0,mpOutliner->GetEditEngine().GetTextLen( 0 ), 1,0 );
+ mpOutliner->QuickInsertLineBreak( aSel );
+ }
+ }
+ }
+
+ mpObject->SetOutlinerParaObject( mpOutliner->CreateParaObject() );
+ }
+ else
+ mpObject->SetOutlinerParaObject( NULL );
+
+ if( mpObject->IsEmptyPresObj() )
+ mpObject->SetEmptyPresObj(sal_False);
+ }
+ }
+ }
+}
+
+void SvxTextEditSourceImpl::lock()
+{
+ mbIsLocked = sal_True;
+ if( mpOutliner )
+ {
+ ((EditEngine*)&(mpOutliner->GetEditEngine()))->SetUpdateMode( sal_False );
+ mbOldUndoMode = ((EditEngine*)&(mpOutliner->GetEditEngine()))->IsUndoEnabled();
+ ((EditEngine*)&(mpOutliner->GetEditEngine()))->EnableUndo( sal_False );
+ }
+}
+
+void SvxTextEditSourceImpl::unlock()
+{
+ mbIsLocked = sal_False;
+
+ if( mbNeedsUpdate )
+ {
+ UpdateData();
+ mbNeedsUpdate = sal_False;
+ }
+
+ if( mpOutliner )
+ {
+ ((EditEngine*)&(mpOutliner->GetEditEngine()))->SetUpdateMode( sal_True );
+ ((EditEngine*)&(mpOutliner->GetEditEngine()))->EnableUndo( mbOldUndoMode );
+ }
+}
+
+BOOL SvxTextEditSourceImpl::IsValid() const
+{
+ return mpView && mpWindow ? TRUE : FALSE;
+}
+
+Rectangle SvxTextEditSourceImpl::GetVisArea()
+{
+ if( IsValid() )
+ {
+ Rectangle aVisArea = mpView->GetVisibleArea( mpView->FindWin( const_cast< Window* > (mpWindow) ) );
+
+ // offset vis area by edit engine left-top position
+ SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject );
+ if( pTextObj )
+ {
+ Rectangle aAnchorRect;
+ pTextObj->TakeTextAnchorRect( aAnchorRect );
+ aVisArea.Move( -aAnchorRect.Left(), -aAnchorRect.Top() );
+
+ MapMode aMapMode(mpWindow->GetMapMode());
+ aMapMode.SetOrigin(Point());
+ return mpWindow->LogicToPixel( aVisArea, aMapMode );
+ }
+ }
+
+ return Rectangle();
+}
+
+Point SvxTextEditSourceImpl::LogicToPixel( const Point& rPoint, const MapMode& rMapMode )
+{
+ // #101029#: The responsibilities of ViewForwarder happen to be
+ // somewhat mixed in this case. On the one hand, we need the
+ // different interface queries on the SvxEditSource interface,
+ // since we need both VisAreas. On the other hand, if an
+ // EditViewForwarder exists, maTextOffset does not remain static,
+ // but may change with every key press.
+ if( IsEditMode() )
+ {
+ SvxEditViewForwarder* pForwarder = GetEditViewForwarder(sal_False);
+
+ if( pForwarder )
+ return pForwarder->LogicToPixel( rPoint, rMapMode );
+ }
+ else if( IsValid() && mpModel )
+ {
+ // #101029#
+ Point aPoint1( rPoint );
+ aPoint1.X() += maTextOffset.X();
+ aPoint1.Y() += maTextOffset.Y();
+
+ Point aPoint2( OutputDevice::LogicToLogic( aPoint1, rMapMode,
+ MapMode(mpModel->GetScaleUnit()) ) );
+ MapMode aMapMode(mpWindow->GetMapMode());
+ aMapMode.SetOrigin(Point());
+ return mpWindow->LogicToPixel( aPoint2, aMapMode );
+ }
+
+ return Point();
+}
+
+Point SvxTextEditSourceImpl::PixelToLogic( const Point& rPoint, const MapMode& rMapMode )
+{
+ // #101029#: The responsibilities of ViewForwarder happen to be
+ // somewhat mixed in this case. On the one hand, we need the
+ // different interface queries on the SvxEditSource interface,
+ // since we need both VisAreas. On the other hand, if an
+ // EditViewForwarder exists, maTextOffset does not remain static,
+ // but may change with every key press.
+ if( IsEditMode() )
+ {
+ SvxEditViewForwarder* pForwarder = GetEditViewForwarder(sal_False);
+
+ if( pForwarder )
+ return pForwarder->PixelToLogic( rPoint, rMapMode );
+ }
+ else if( IsValid() && mpModel )
+ {
+ MapMode aMapMode(mpWindow->GetMapMode());
+ aMapMode.SetOrigin(Point());
+ Point aPoint1( mpWindow->PixelToLogic( rPoint, aMapMode ) );
+ Point aPoint2( OutputDevice::LogicToLogic( aPoint1,
+ MapMode(mpModel->GetScaleUnit()),
+ rMapMode ) );
+ // #101029#
+ aPoint2.X() -= maTextOffset.X();
+ aPoint2.Y() -= maTextOffset.Y();
+
+ return aPoint2;
+ }
+
+ return Point();
+}
+
+IMPL_LINK(SvxTextEditSourceImpl, NotifyHdl, EENotify*, aNotify)
+{
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+// --------------------------------------------------------------------
+// SvxTextEditSource
+// --------------------------------------------------------------------
+
+SvxTextEditSource::SvxTextEditSource( SdrObject* pObject )
+{
+ mpImpl = new SvxTextEditSourceImpl( pObject );
+ mpImpl->acquire();
+}
+
+// --------------------------------------------------------------------
+
+SvxTextEditSource::SvxTextEditSource( SvxTextEditSourceImpl* pImpl )
+{
+ mpImpl = pImpl;
+ mpImpl->acquire();
+}
+
+//------------------------------------------------------------------------
+SvxTextEditSource::~SvxTextEditSource()
+{
+ ::SolarMutexGuard aGuard;
+
+ mpImpl->release();
+}
+
+//------------------------------------------------------------------------
+SvxEditSource* SvxTextEditSource::Clone() const
+{
+ return new SvxTextEditSource( mpImpl );
+}
+
+//------------------------------------------------------------------------
+SvxTextForwarder* SvxTextEditSource::GetTextForwarder()
+{
+ return mpImpl->GetTextForwarder();
+}
+
+//------------------------------------------------------------------------
+SvxEditViewForwarder* SvxTextEditSource::GetEditViewForwarder( sal_Bool bCreate )
+{
+ return mpImpl->GetEditViewForwarder( bCreate );
+}
+
+//------------------------------------------------------------------------
+SvxViewForwarder* SvxTextEditSource::GetViewForwarder()
+{
+ return this;
+}
+
+//------------------------------------------------------------------------
+void SvxTextEditSource::UpdateData()
+{
+ mpImpl->UpdateData();
+}
+
+SfxBroadcaster& SvxTextEditSource::GetBroadcaster() const
+{
+ return *mpImpl;
+}
+
+void SvxTextEditSource::lock()
+{
+ mpImpl->lock();
+}
+
+void SvxTextEditSource::unlock()
+{
+ mpImpl->unlock();
+}
+
+BOOL SvxTextEditSource::IsValid() const
+{
+ return mpImpl->IsValid();
+}
+
+Rectangle SvxTextEditSource::GetVisArea() const
+{
+ return mpImpl->GetVisArea();
+}
+
+Point SvxTextEditSource::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ return mpImpl->LogicToPixel( rPoint, rMapMode );
+}
+
+Point SvxTextEditSource::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ return mpImpl->PixelToLogic( rPoint, rMapMode );
+}
+
+/** this method returns true if the outliner para object of the given shape has
+ a paragraph with a level > 0 or if there is a paragraph with the EE_PARA_BULLETSTATE
+ set to true. This is needed for xml export to decide if we need to export the
+ level information.
+*/
+sal_Bool SvxTextEditSource::hasLevels( const SdrObject* pObject )
+{
+ OutlinerParaObject* pOutlinerParaObject = pObject->GetOutlinerParaObject();
+ if( NULL == pOutlinerParaObject )
+ return sal_False;
+
+ USHORT nParaCount = (USHORT)pOutlinerParaObject->Count();
+ USHORT nPara;
+ for( nPara = 0; nPara < nParaCount; nPara++ )
+ {
+ if( pOutlinerParaObject->GetDepth( nPara ) > 0 )
+ return sal_True;
+ }
+
+ sal_Bool bHadBulletStateOnEachPara = sal_True;
+
+ const EditTextObject& rEditTextObject = pOutlinerParaObject->GetTextObject();
+ const SfxPoolItem* pItem;
+
+ for( nPara = 0; nPara < nParaCount; nPara++ )
+ {
+ SfxItemSet aSet = rEditTextObject.GetParaAttribs( nPara );
+ if( aSet.GetItemState(EE_PARA_BULLETSTATE, sal_False, &pItem) == SFX_ITEM_SET )
+ {
+ if( ((const SfxUInt16Item*) pItem)->GetValue() )
+ return sal_True;
+ }
+ else
+ {
+ bHadBulletStateOnEachPara = sal_False;
+ }
+ }
+
+ // if there was at least one paragraph without a bullet state item we
+ // also need to check the stylesheet for a bullet state item
+ if( !bHadBulletStateOnEachPara && pObject->GetStyleSheet() )
+ {
+ const SfxItemSet& rSet = pObject->GetStyleSheet()->GetItemSet();
+ if( rSet.GetItemState(EE_PARA_BULLETSTATE, sal_False, &pItem) == SFX_ITEM_SET )
+ {
+ if( ((const SfxUInt16Item*)pItem)->GetValue() )
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unodraw/svx_unottabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unottabl.cxx
new file mode 100644
index 000000000000..61b5692db655
--- /dev/null
+++ b/binfilter/bf_svx/source/unodraw/svx_unottabl.cxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/awt/Gradient.hpp>
+
+
+
+
+#include "xdef.hxx"
+
+#include "xflftrit.hxx"
+
+
+#include "UnoNameItemTable.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+class SvxUnoTransGradientTable : public SvxUnoNameItemTable
+{
+public:
+ SvxUnoTransGradientTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoTransGradientTable() throw();
+
+ virtual NameOrIndex* createItem() const throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+};
+
+SvxUnoTransGradientTable::SvxUnoTransGradientTable( SdrModel* pModel ) throw()
+: SvxUnoNameItemTable( pModel, XATTR_FILLFLOATTRANSPARENCE )
+{
+}
+
+SvxUnoTransGradientTable::~SvxUnoTransGradientTable() throw()
+{
+}
+
+OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoTransGradientTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TransparencyGradientTable" ));
+ return aSNS;
+}
+
+NameOrIndex* SvxUnoTransGradientTable::createItem() const throw()
+{
+ XFillFloatTransparenceItem* pNewItem = new XFillFloatTransparenceItem();
+ pNewItem->SetEnabled( TRUE );
+ return pNewItem;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct awt::Gradient*)0);
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoTransGradientTable(pModel);
+}
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/makefile.mk b/binfilter/bf_svx/source/unoedit/makefile.mk
new file mode 100644
index 000000000000..f4272cf31be5
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/makefile.mk
@@ -0,0 +1,64 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_unoedit
+
+NO_HIDS=TRUE
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/svx_UnoForbiddenCharsTable.obj \
+ $(SLO)$/svx_unoedsrc.obj \
+ $(SLO)$/svx_unoedhlp.obj \
+ $(SLO)$/svx_unoedprx.obj \
+ $(SLO)$/svx_unoviwed.obj \
+ $(SLO)$/svx_unoviwou.obj \
+ $(SLO)$/svx_unofored.obj \
+ $(SLO)$/svx_unoforou.obj \
+ $(SLO)$/svx_unotext.obj \
+ $(SLO)$/svx_unotext2.obj \
+ $(SLO)$/svx_unofield.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx b/binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx
new file mode 100644
index 000000000000..81de3aae323c
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_UnoForbiddenCharsTable.cxx
@@ -0,0 +1,150 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "UnoForbiddenCharsTable.hxx"
+
+#include "forbiddencharacterstable.hxx"
+
+#include <osl/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <rtl/ref.hxx>
+
+#include "unolingu.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::i18n;
+using namespace ::cppu;
+
+SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars) :
+ mxForbiddenChars( xForbiddenChars )
+{
+}
+
+SvxUnoForbiddenCharsTable::~SvxUnoForbiddenCharsTable()
+{
+}
+
+void SvxUnoForbiddenCharsTable::onChange()
+{
+}
+
+ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Locale& rLocale )
+ throw(NoSuchElementException, RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(!mxForbiddenChars.is())
+ throw RuntimeException();
+
+ const LanguageType eLang = SvxLocaleToLanguage( rLocale );
+ const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE );
+ if(!pForbidden)
+ throw NoSuchElementException();
+
+ return *pForbidden;
+}
+
+sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocale )
+ throw(RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(!mxForbiddenChars.is())
+ return sal_False;
+
+ const LanguageType eLang = SvxLocaleToLanguage( rLocale );
+ const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, FALSE );
+
+ return NULL != pForbidden;
+}
+
+void SvxUnoForbiddenCharsTable::setForbiddenCharacters(const Locale& rLocale, const ForbiddenCharacters& rForbiddenCharacters )
+ throw(RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(!mxForbiddenChars.is())
+ throw RuntimeException();
+
+ const LanguageType eLang = SvxLocaleToLanguage( rLocale );
+ mxForbiddenChars->SetForbiddenCharacters( eLang, rForbiddenCharacters );
+
+ onChange();
+}
+
+void SvxUnoForbiddenCharsTable::removeForbiddenCharacters( const Locale& rLocale )
+ throw(RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(!mxForbiddenChars.is())
+ throw RuntimeException();
+
+ const LanguageType eLang = SvxLocaleToLanguage( rLocale );
+ mxForbiddenChars->ClearForbiddenCharacters( eLang );
+
+ onChange();
+}
+
+// XSupportedLocales
+Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales()
+ throw(RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ const sal_Int32 nCount = mxForbiddenChars.is() ? mxForbiddenChars->Count() : 0;
+
+ Sequence< Locale > aLocales( nCount );
+ if( nCount )
+ {
+ Locale* pLocales = aLocales.getArray();
+
+ for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ const ULONG nLanguage = mxForbiddenChars->GetObjectKey( nIndex );
+ SvxLanguageToLocale ( *pLocales++, static_cast < LanguageType > (nLanguage) );
+ }
+ }
+
+ return aLocales;
+}
+
+sal_Bool SAL_CALL SvxUnoForbiddenCharsTable::hasLocale( const Locale& aLocale )
+ throw(RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ return hasForbiddenCharacters( aLocale );
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoedacc.cxx b/binfilter/bf_svx/source/unoedit/svx_unoedacc.cxx
new file mode 100644
index 000000000000..6b21d6591ff6
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoedacc.cxx
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoedhlp.cxx b/binfilter/bf_svx/source/unoedit/svx_unoedhlp.cxx
new file mode 100644
index 000000000000..3b4acc0072b7
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoedhlp.cxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <tools/debug.hxx>
+
+#include "unoedhlp.hxx"
+#include "editeng.hxx"
+namespace binfilter {
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxEditSourceHelper::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex )
+{
+ EECharAttribArray aCharAttribs;
+
+ rEE.GetCharAttribs( nPara, aCharAttribs );
+
+ // find closest index in front of nIndex
+ USHORT nAttr, nCurrIndex;
+ sal_Int32 nClosestStartIndex;
+ for( nAttr=0, nClosestStartIndex=0; nAttr<aCharAttribs.Count(); ++nAttr )
+ {
+ nCurrIndex = aCharAttribs[nAttr].nStart;
+
+ if( nCurrIndex > nIndex )
+ break; // aCharAttribs array is sorted in increasing order for nStart values
+
+ if( nCurrIndex > nClosestStartIndex )
+ {
+ nClosestStartIndex = nCurrIndex;
+ }
+ }
+
+ // find closest index behind of nIndex
+ sal_Int32 nClosestEndIndex;
+ for( nAttr=0, nClosestEndIndex=rEE.GetTextLen(nPara); nAttr<aCharAttribs.Count(); ++nAttr )
+ {
+ nCurrIndex = aCharAttribs[nAttr].nEnd;
+
+ if( nCurrIndex > nIndex &&
+ nCurrIndex < nClosestEndIndex )
+ {
+ nClosestEndIndex = nCurrIndex;
+ }
+ }
+
+ nStartIndex = static_cast<USHORT>( nClosestStartIndex );
+ nEndIndex = static_cast<USHORT>( nClosestEndIndex );
+
+ return sal_True;
+}
+
+Point SvxEditSourceHelper::EEToUserSpace( const Point& rPoint, const Size& rEESize, bool bIsVertical )
+{
+ return bIsVertical ? Point( -rPoint.Y() + rEESize.Height(), rPoint.X() ) : rPoint;
+}
+
+Point SvxEditSourceHelper::UserSpaceToEE( const Point& rPoint, const Size& rEESize, bool bIsVertical )
+{
+ return bIsVertical ? Point( rPoint.Y(), -rPoint.X() + rEESize.Height() ) : rPoint;
+}
+
+Rectangle SvxEditSourceHelper::EEToUserSpace( const Rectangle& rRect, const Size& rEESize, bool bIsVertical )
+{
+ // #106775# Don't touch rect if not vertical
+ return bIsVertical ? Rectangle( EEToUserSpace(rRect.BottomLeft(), rEESize, bIsVertical),
+ EEToUserSpace(rRect.TopRight(), rEESize, bIsVertical) ) : rRect;
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoedprx.cxx b/binfilter/bf_svx/source/unoedit/svx_unoedprx.cxx
new file mode 100644
index 000000000000..f1f3a61437d9
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoedprx.cxx
@@ -0,0 +1,1199 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+//------------------------------------------------------------------------
+//
+// Global header
+//
+//------------------------------------------------------------------------
+
+#include <limits.h>
+#include <vector>
+#include <algorithm>
+
+
+
+
+
+
+//------------------------------------------------------------------------
+//
+// Project-local header
+//
+//------------------------------------------------------------------------
+
+#include "unoedprx.hxx"
+
+#include "unotext.hxx"
+
+#include "editeng.hxx"
+#include "AccessibleStringWrap.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+
+class SvxAccessibleTextIndex
+{
+public:
+ SvxAccessibleTextIndex() :
+ mnPara(0),
+ mnIndex(0),
+ mnEEIndex(0),
+ mnFieldOffset(0),
+ mnFieldLen(0),
+ mbInField(sal_False),
+ mnBulletOffset(0),
+ mnBulletLen(0),
+ mbInBullet(sal_False) {};
+ ~SvxAccessibleTextIndex() {};
+
+ // Get/Set current paragraph
+ void SetParagraph( USHORT nPara )
+ {
+ mnPara = nPara;
+ }
+ USHORT GetParagraph() const { return mnPara; }
+
+ /** Set the index in the UAA semantic
+
+ @param nIndex
+ The index from the UA API (fields and bullets are expanded)
+
+ @param rTF
+ The text forwarder to use in the calculations
+ */
+ void SetIndex( sal_Int32 nIndex, const SvxTextForwarder& rTF );
+ void SetIndex( USHORT nPara, sal_Int32 nIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetIndex(nIndex, rTF); }
+ sal_Int32 GetIndex() const { return mnIndex; }
+
+ /** Set the index in the edit engine semantic
+
+ Update the object state to reflect the given index position in
+ EditEngine/Outliner index values
+
+ @param nEEIndex
+ The index from the edit engine (fields span exactly one index increment)
+
+ @param rTF
+ The text forwarder to use in the calculations
+ */
+ void SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF );
+ void SetEEIndex( USHORT nPara, USHORT nEEIndex, const SvxTextForwarder& rTF ) { SetParagraph(nPara); SetEEIndex(nEEIndex, rTF); }
+ USHORT GetEEIndex() const;
+
+ void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; }
+ sal_Int32 GetFieldOffset() const { return mnFieldOffset; }
+ sal_Int32 GetFieldLen() const { return mnFieldLen; }
+ void AreInField( sal_Bool bInField = sal_True ) { mbInField = bInField; }
+ sal_Bool InField() const { return mbInField; }
+
+ void SetBulletOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnBulletOffset = nOffset; mnBulletLen = nLen; }
+ sal_Int32 GetBulletOffset() const { return mnBulletOffset; }
+ sal_Int32 GetBulletLen() const { return mnBulletLen; }
+ void AreInBullet( sal_Bool bInBullet = sal_True ) { mbInBullet = bInBullet; }
+ sal_Bool InBullet() const { return mbInBullet; }
+
+ /// returns false if the given range is non-editable (e.g. contains bullets or _parts_ of fields)
+ sal_Bool IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const;
+
+private:
+ USHORT mnPara;
+ sal_Int32 mnIndex;
+ sal_Int32 mnEEIndex;
+ sal_Int32 mnFieldOffset;
+ sal_Int32 mnFieldLen;
+ sal_Bool mbInField;
+ sal_Int32 mnBulletOffset;
+ sal_Int32 mnBulletLen;
+ sal_Bool mbInBullet;
+};
+
+ESelection MakeEESelection( const SvxAccessibleTextIndex& rStart, const SvxAccessibleTextIndex& rEnd )
+{
+ // deal with field special case: to really get a field contained
+ // within a selection, the start index must be before or on the
+ // field, the end index after it.
+
+ // The SvxAccessibleTextIndex.GetEEIndex method gives the index on
+ // the field, as long the input index is on the field. Thus,
+ // correction necessary for the end index
+
+ // Therefore, for _ranges_, if part of the field is touched, all
+ // of the field must be selected
+ if( rStart.GetParagraph() <= rEnd.GetParagraph() ||
+ (rStart.GetParagraph() == rEnd.GetParagraph() &&
+ rStart.GetEEIndex() <= rEnd.GetEEIndex()) )
+ {
+ if( rEnd.InField() && rEnd.GetFieldOffset() )
+ return ESelection( rStart.GetParagraph(), rStart.GetEEIndex(),
+ rEnd.GetParagraph(), rEnd.GetEEIndex()+1 );
+ }
+ else if( rStart.GetParagraph() > rEnd.GetParagraph() ||
+ (rStart.GetParagraph() == rEnd.GetParagraph() &&
+ rStart.GetEEIndex() > rEnd.GetEEIndex()) )
+ {
+ if( rStart.InField() && rStart.GetFieldOffset() )
+ return ESelection( rStart.GetParagraph(), rStart.GetEEIndex()+1,
+ rEnd.GetParagraph(), rEnd.GetEEIndex() );
+ }
+
+ return ESelection( rStart.GetParagraph(), rStart.GetEEIndex(),
+ rEnd.GetParagraph(), rEnd.GetEEIndex() );
+}
+
+ESelection MakeEESelection( const SvxAccessibleTextIndex& rIndex )
+{
+ return ESelection( rIndex.GetParagraph(), rIndex.GetEEIndex(),
+ rIndex.GetParagraph(), rIndex.GetEEIndex() + 1 );
+}
+
+USHORT SvxAccessibleTextIndex::GetEEIndex() const
+{
+ DBG_ASSERT(mnEEIndex >= 0 && mnEEIndex <= USHRT_MAX,
+ "SvxAccessibleTextIndex::GetEEIndex: index value overflow");
+
+ return static_cast< USHORT > (mnEEIndex);
+}
+
+void SvxAccessibleTextIndex::SetEEIndex( USHORT nEEIndex, const SvxTextForwarder& rTF )
+{
+ // reset
+ mnFieldOffset = 0;
+ mbInField = sal_False;
+ mnFieldLen = 0;
+ mnBulletOffset = 0;
+ mbInBullet = sal_False;
+ mnBulletLen = 0;
+
+ // set known values
+ mnEEIndex = nEEIndex;
+
+ // calculate unknowns
+ USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() );
+
+ mnIndex = nEEIndex;
+
+ EBulletInfo aBulletInfo = rTF.GetBulletInfo( GetParagraph() );
+
+ // any text bullets?
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
+ aBulletInfo.bVisible &&
+ aBulletInfo.nType != SVX_NUM_BITMAP )
+ {
+ mnIndex += aBulletInfo.aText.Len();
+ }
+
+ for( nCurrField=0; nCurrField < nFieldCount; ++nCurrField )
+ {
+ EFieldInfo aFieldInfo( rTF.GetFieldInfo( GetParagraph(), nCurrField ) );
+
+ if( aFieldInfo.aPosition.nIndex > nEEIndex )
+ break;
+
+ if( aFieldInfo.aPosition.nIndex == nEEIndex )
+ {
+ AreInField();
+ break;
+ }
+
+ // #106010#
+ mnIndex += ::std::max(aFieldInfo.aCurrentText.Len()-1, 0);
+ }
+}
+
+void SvxAccessibleTextIndex::SetIndex( sal_Int32 nIndex, const SvxTextForwarder& rTF )
+{
+ // reset
+ mnFieldOffset = 0;
+ mbInField = sal_False;
+ mnFieldLen = 0;
+ mnBulletOffset = 0;
+ mbInBullet = sal_False;
+ mnBulletLen = 0;
+
+ // set known values
+ mnIndex = nIndex;
+
+ // calculate unknowns
+ USHORT nCurrField, nFieldCount = rTF.GetFieldCount( GetParagraph() );
+
+ DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ mnEEIndex = nIndex;
+
+ EBulletInfo aBulletInfo = rTF.GetBulletInfo( GetParagraph() );
+
+ // any text bullets?
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
+ aBulletInfo.bVisible &&
+ aBulletInfo.nType != SVX_NUM_BITMAP )
+ {
+ sal_Int32 nBulletLen = aBulletInfo.aText.Len();
+
+ if( nIndex < nBulletLen )
+ {
+ AreInBullet();
+ SetBulletOffset( nIndex, nBulletLen );
+ mnEEIndex = 0;
+ return;
+ }
+
+ mnEEIndex = mnEEIndex - nBulletLen;
+ }
+
+ for( nCurrField=0; nCurrField < nFieldCount; ++nCurrField )
+ {
+ EFieldInfo aFieldInfo( rTF.GetFieldInfo( GetParagraph(), nCurrField ) );
+
+ // we're before a field
+ if( aFieldInfo.aPosition.nIndex > mnEEIndex )
+ break;
+
+ // #106010#
+ mnEEIndex -= ::std::max(aFieldInfo.aCurrentText.Len()-1, 0);
+
+ // we're within a field
+ if( aFieldInfo.aPosition.nIndex >= mnEEIndex )
+ {
+ AreInField();
+ SetFieldOffset( ::std::max(aFieldInfo.aCurrentText.Len()-1, 0) - (aFieldInfo.aPosition.nIndex - mnEEIndex),
+ aFieldInfo.aCurrentText.Len() );
+ mnEEIndex = aFieldInfo.aPosition.nIndex ;
+ break;
+ }
+ }
+}
+
+sal_Bool SvxAccessibleTextIndex::IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const
+{
+ if( GetIndex() > rEnd.GetIndex() )
+ return rEnd.IsEditableRange( *this );
+
+ if( InBullet() || rEnd.InBullet() )
+ return sal_False;
+
+ if( InField() && GetFieldOffset() )
+ return sal_False; // within field
+
+ if( rEnd.InField() && rEnd.GetFieldOffset() >= rEnd.GetFieldLen() - 1 )
+ return sal_False; // within field
+
+ return sal_True;
+}
+
+//---------------------------------------------------------------------------------
+
+SvxEditSourceAdapter::SvxEditSourceAdapter() : mbEditSourceValid( sal_False )
+{
+}
+
+SvxEditSourceAdapter::~SvxEditSourceAdapter()
+{
+}
+
+SvxEditSource* SvxEditSourceAdapter::Clone() const
+{
+ if( mbEditSourceValid && mpAdaptee.get() )
+ {
+ ::std::auto_ptr< SvxEditSource > pClonedAdaptee( mpAdaptee->Clone() );
+
+ if( pClonedAdaptee.get() )
+ {
+ SvxEditSourceAdapter* pClone = new SvxEditSourceAdapter();
+
+ if( pClone )
+ {
+ pClone->SetEditSource( pClonedAdaptee );
+ return pClone;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+SvxAccessibleTextAdapter* SvxEditSourceAdapter::GetTextForwarderAdapter()
+{
+ if( mbEditSourceValid && mpAdaptee.get() )
+ {
+ SvxTextForwarder* pTextForwarder = mpAdaptee->GetTextForwarder();
+
+ if( pTextForwarder )
+ {
+ maTextAdapter.SetForwarder(*pTextForwarder);
+
+ return &maTextAdapter;
+ }
+ }
+
+ return NULL;
+}
+
+SvxTextForwarder* SvxEditSourceAdapter::GetTextForwarder()
+{
+ return GetTextForwarderAdapter();
+}
+
+SvxViewForwarder* SvxEditSourceAdapter::GetViewForwarder()
+{
+ if( mbEditSourceValid && mpAdaptee.get() )
+ return mpAdaptee->GetViewForwarder();
+
+ return NULL;
+}
+
+SvxAccessibleTextEditViewAdapter* SvxEditSourceAdapter::GetEditViewForwarderAdapter( sal_Bool bCreate )
+{
+ if( mbEditSourceValid && mpAdaptee.get() )
+ {
+ SvxEditViewForwarder* pEditViewForwarder = mpAdaptee->GetEditViewForwarder(bCreate);
+
+ if( pEditViewForwarder )
+ {
+ SvxAccessibleTextAdapter* pTextAdapter = GetTextForwarderAdapter();
+
+ if( pTextAdapter )
+ {
+ maEditViewAdapter.SetForwarder(*pEditViewForwarder, *pTextAdapter);
+
+ return &maEditViewAdapter;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+SvxEditViewForwarder* SvxEditSourceAdapter::GetEditViewForwarder( sal_Bool bCreate )
+{
+ return GetEditViewForwarderAdapter( bCreate );
+}
+
+void SvxEditSourceAdapter::UpdateData()
+{
+ if( mbEditSourceValid && mpAdaptee.get() )
+ mpAdaptee->UpdateData();
+}
+
+SfxBroadcaster& SvxEditSourceAdapter::GetBroadcaster() const
+{
+ if( mbEditSourceValid && mpAdaptee.get() )
+ return mpAdaptee->GetBroadcaster();
+
+ return maDummyBroadcaster;
+}
+
+void SvxEditSourceAdapter::SetEditSource( ::std::auto_ptr< SvxEditSource > pAdaptee )
+{
+ if( pAdaptee.get() )
+ {
+ mpAdaptee = pAdaptee;
+ mbEditSourceValid = sal_True;
+ }
+ else
+ {
+ // do a lazy delete (prevents us from deleting the broadcaster
+ // from within a broadcast in
+ // AccessibleTextHelper_Impl::Notify)
+ mbEditSourceValid = sal_False;
+ }
+}
+
+//--------------------------------------------------------------------------------------
+
+SvxAccessibleTextAdapter::SvxAccessibleTextAdapter() : mrTextForwarder( NULL )
+{
+}
+
+SvxAccessibleTextAdapter::~SvxAccessibleTextAdapter()
+{
+}
+
+USHORT SvxAccessibleTextAdapter::GetParagraphCount() const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetParagraphCount();
+}
+
+USHORT SvxAccessibleTextAdapter::GetTextLen( USHORT nParagraph ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetEEIndex( nParagraph, mrTextForwarder->GetTextLen( nParagraph ), *this );
+
+ return static_cast< USHORT >(aIndex.GetIndex());
+}
+
+String SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ // normalize selection
+ if( rSel.nStartPara > rSel.nEndPara ||
+ (rSel.nStartPara == rSel.nEndPara && rSel.nStartPos > rSel.nEndPos) )
+ {
+ ::std::swap( aStartIndex, aEndIndex );
+ }
+
+ String sStr = mrTextForwarder->GetText( MakeEESelection(aStartIndex, aEndIndex) );
+
+ // trim field text, if necessary
+ if( aStartIndex.InField() )
+ {
+ DBG_ASSERT(aStartIndex.GetFieldOffset() >= 0 &&
+ aStartIndex.GetFieldOffset() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::GetText: index value overflow");
+
+ sStr.Erase(0, static_cast< USHORT > (aStartIndex.GetFieldOffset()) );
+ }
+ if( aEndIndex.InField() && aEndIndex.GetFieldOffset() )
+ {
+ DBG_ASSERT(sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset()) >= 0 &&
+ sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset()) <= USHRT_MAX,
+ "SvxAccessibleTextIndex::GetText: index value overflow");
+
+ sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetFieldLen() - aEndIndex.GetFieldOffset())) );
+ }
+
+ EBulletInfo aBulletInfo1 = GetBulletInfo( static_cast< USHORT >(aStartIndex.GetParagraph()) );
+ EBulletInfo aBulletInfo2 = GetBulletInfo( static_cast< USHORT >(aEndIndex.GetParagraph()) );
+
+ if( aStartIndex.InBullet() )
+ {
+ // prepend leading bullet
+ String sBullet = aBulletInfo1.aText;
+
+ DBG_ASSERT(aStartIndex.GetBulletOffset() >= 0 &&
+ aStartIndex.GetBulletOffset() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::GetText: index value overflow");
+
+ sBullet.Erase(0, static_cast< USHORT > (aStartIndex.GetBulletOffset()) );
+
+ sBullet += sStr;
+ sStr = sBullet;
+ }
+
+ if( aEndIndex.InBullet() )
+ {
+ // append trailing bullet
+ sStr += aBulletInfo2.aText;;
+
+ DBG_ASSERT(sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) >= 0 &&
+ sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX,
+ "SvxAccessibleTextIndex::GetText: index value overflow");
+
+ sStr = sStr.Copy(0, static_cast< USHORT > (sStr.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) );
+ }
+ else if( aStartIndex.GetParagraph() != aEndIndex.GetParagraph() &&
+ HaveTextBullet( aEndIndex.GetParagraph() ) )
+ {
+ String sBullet = aBulletInfo2.aText;
+
+ DBG_ASSERT(sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) >= 0 &&
+ sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset()) <= USHRT_MAX,
+ "SvxAccessibleTextIndex::GetText: index value overflow");
+
+ sBullet = sBullet.Copy(0, static_cast< USHORT > (sBullet.Len() - (aEndIndex.GetBulletLen() - aEndIndex.GetBulletOffset())) );
+
+ // insert bullet
+ sStr.Insert( sBullet,
+ static_cast< USHORT > (GetTextLen(aStartIndex.GetParagraph()) - aStartIndex.GetIndex()) );
+ }
+
+ return sStr;
+}
+
+SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ return mrTextForwarder->GetAttribs( MakeEESelection(aStartIndex, aEndIndex),
+ bOnlyHardAttrib );
+}
+
+SfxItemSet SvxAccessibleTextAdapter::GetParaAttribs( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetParaAttribs( nPara );
+}
+
+void SvxAccessibleTextAdapter::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ mrTextForwarder->SetParaAttribs( nPara, rSet );
+}
+
+void SvxAccessibleTextAdapter::GetPortions( USHORT nPara, SvUShorts& rList ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ mrTextForwarder->GetPortions( nPara, rList );
+}
+
+USHORT SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ return mrTextForwarder->GetItemState( MakeEESelection(aStartIndex, aEndIndex),
+ nWhich );
+}
+
+USHORT SvxAccessibleTextAdapter::GetItemState( USHORT nPara, USHORT nWhich ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetItemState( nPara, nWhich );
+}
+
+void SvxAccessibleTextAdapter::QuickInsertText( const String& rText, const ESelection& rSel )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ mrTextForwarder->QuickInsertText( rText,
+ MakeEESelection(aStartIndex, aEndIndex) );
+}
+
+void SvxAccessibleTextAdapter::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ mrTextForwarder->QuickInsertField( rFld,
+ MakeEESelection(aStartIndex, aEndIndex) );
+}
+
+void SvxAccessibleTextAdapter::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ mrTextForwarder->QuickSetAttribs( rSet,
+ MakeEESelection(aStartIndex, aEndIndex) );
+}
+
+void SvxAccessibleTextAdapter::QuickInsertLineBreak( const ESelection& rSel )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ mrTextForwarder->QuickInsertLineBreak( MakeEESelection(aStartIndex, aEndIndex) );
+}
+
+SfxItemPool* SvxAccessibleTextAdapter::GetPool() const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetPool();
+}
+
+XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+}
+
+BOOL SvxAccessibleTextAdapter::IsValid() const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ if( mrTextForwarder )
+ return mrTextForwarder->IsValid();
+ else
+ return sal_False;
+}
+
+LanguageType SvxAccessibleTextAdapter::GetLanguage( USHORT nPara, USHORT nPos ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+
+ aIndex.SetIndex( nPara, nPos, *this );
+
+ return mrTextForwarder->GetLanguage( nPara, aIndex.GetEEIndex() );
+}
+
+USHORT SvxAccessibleTextAdapter::GetFieldCount( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetFieldCount( nPara );
+}
+
+EFieldInfo SvxAccessibleTextAdapter::GetFieldInfo( USHORT nPara, USHORT nField ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetFieldInfo( nPara, nField );
+}
+
+EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetBulletInfo( nPara );
+}
+
+Rectangle SvxAccessibleTextAdapter::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetIndex( nPara, nIndex, *this );
+
+ // preset if anything goes wrong below
+ // n-th char in GetParagraphIndex's paragraph
+ Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) );
+
+ if( aIndex.InBullet() )
+ {
+ EBulletInfo aBulletInfo = GetBulletInfo( nPara );
+
+ OutputDevice* pOutDev = GetRefDevice();
+
+ DBG_ASSERT(pOutDev!=NULL, "SvxAccessibleTextAdapter::GetCharBounds: No ref device");
+
+ // preset if anything goes wrong below
+ aRect = aBulletInfo.aBounds; // better than nothing
+ if( pOutDev )
+ {
+ AccessibleStringWrap aStringWrap( *pOutDev, aBulletInfo.aFont, aBulletInfo.aText );
+
+ if( aStringWrap.GetCharacterBounds( aIndex.GetBulletOffset(), aRect ) )
+ aRect.Move( aBulletInfo.aBounds.Left(), aBulletInfo.aBounds.Top() );
+ }
+ }
+ else
+ {
+ // handle field content manually
+ if( aIndex.InField() )
+ {
+ OutputDevice* pOutDev = GetRefDevice();
+
+ DBG_ASSERT(pOutDev!=NULL, "SvxAccessibleTextAdapter::GetCharBounds: No ref device");
+
+ if( pOutDev )
+ {
+ ESelection aSel = MakeEESelection( aIndex );
+
+ SvxFont aFont = EditEngine::CreateSvxFontFromItemSet( mrTextForwarder->GetAttribs( aSel ) );
+ AccessibleStringWrap aStringWrap( *pOutDev,
+ aFont,
+ mrTextForwarder->GetText( aSel ) );
+
+ Rectangle aStartRect = mrTextForwarder->GetCharBounds( nPara, static_cast< USHORT >( aIndex.GetEEIndex() ) );
+
+ if( !aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ) )
+ aRect = aStartRect;
+ else
+ aRect.Move( aStartRect.Left(), aStartRect.Top() );
+ }
+ }
+ }
+
+ return aRect;
+}
+
+Rectangle SvxAccessibleTextAdapter::GetParaBounds( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ EBulletInfo aBulletInfo = GetBulletInfo( nPara );
+
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
+ aBulletInfo.bVisible &&
+ aBulletInfo.nType != SVX_NUM_BITMAP )
+ {
+ // include bullet in para bounding box
+ Rectangle aRect( mrTextForwarder->GetParaBounds( nPara ) );
+
+ aRect.Union( aBulletInfo.aBounds );
+
+ return aRect;
+ }
+ else
+ return mrTextForwarder->GetParaBounds( nPara );
+}
+
+MapMode SvxAccessibleTextAdapter::GetMapMode() const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetMapMode();
+}
+
+OutputDevice* SvxAccessibleTextAdapter::GetRefDevice() const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetRefDevice();
+}
+
+sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, USHORT& nPara, USHORT& nIndex ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ if( !mrTextForwarder->GetIndexAtPoint( rPoint, nPara, nIndex ) )
+ return sal_False;
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetEEIndex(nPara, nIndex, *this);
+
+ DBG_ASSERT(aIndex.GetIndex() >= 0 && aIndex.GetIndex() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ nIndex = static_cast< USHORT > (aIndex.GetIndex());
+
+ EBulletInfo aBulletInfo = GetBulletInfo( nPara );
+
+ // any text bullets?
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
+ aBulletInfo.bVisible &&
+ aBulletInfo.nType != SVX_NUM_BITMAP )
+ {
+ if( aBulletInfo.aBounds.IsInside( rPoint) )
+ {
+ OutputDevice* pOutDev = GetRefDevice();
+
+ DBG_ASSERT(pOutDev!=NULL, "SvxAccessibleTextAdapter::GetIndexAtPoint: No ref device");
+
+ if( !pOutDev )
+ return sal_False;
+
+ AccessibleStringWrap aStringWrap( *pOutDev, aBulletInfo.aFont, aBulletInfo.aText );
+
+ Point aPoint = rPoint;
+ aPoint.Move( -aBulletInfo.aBounds.Left(), -aBulletInfo.aBounds.Top() );
+
+ DBG_ASSERT(aStringWrap.GetIndexAtPoint( aPoint ) >= 0 &&
+ aStringWrap.GetIndexAtPoint( aPoint ) <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ nIndex = static_cast< USHORT > (aStringWrap.GetIndexAtPoint( aPoint ));
+ return sal_True;
+ }
+ }
+
+ if( aIndex.InField() )
+ {
+ OutputDevice* pOutDev = GetRefDevice();
+
+ DBG_ASSERT(pOutDev!=NULL, "SvxAccessibleTextAdapter::GetIndexAtPoint: No ref device");
+
+ if( !pOutDev )
+ return sal_False;
+
+ ESelection aSelection = MakeEESelection( aIndex );
+ SvxFont aFont = EditEngine::CreateSvxFontFromItemSet( mrTextForwarder->GetAttribs( aSelection ) );
+ AccessibleStringWrap aStringWrap( *pOutDev,
+ aFont,
+ mrTextForwarder->GetText( aSelection ) );
+
+ Rectangle aRect = mrTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
+ Point aPoint = rPoint;
+ aPoint.Move( -aRect.Left(), -aRect.Top() );
+
+ DBG_ASSERT(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( rPoint ) >= 0 &&
+ aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( rPoint ) <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ nIndex = static_cast< USHORT >(aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint ));
+ return sal_True;
+ }
+
+ return sal_True;
+}
+
+sal_Bool SvxAccessibleTextAdapter::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetIndex(nPara, nIndex, *this);
+ nIndex = aIndex.GetEEIndex();
+
+ if( aIndex.InBullet() )
+ {
+ DBG_ASSERT(aIndex.GetBulletLen() >= 0 &&
+ aIndex.GetBulletLen() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ // always treat bullet as separate word
+ nStart = 0;
+ nEnd = static_cast< USHORT > (aIndex.GetBulletLen());
+
+ return sal_True;
+ }
+
+ if( aIndex.InField() )
+ {
+ DBG_ASSERT(aIndex.GetIndex() - aIndex.GetFieldOffset() >= 0 &&
+ aIndex.GetIndex() - aIndex.GetFieldOffset() <= USHRT_MAX &&
+ nStart + aIndex.GetFieldLen() >= 0 &&
+ nStart + aIndex.GetFieldLen() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ // always treat field as separate word
+ // TODO: to circumvent this, _we_ would have to do the break iterator stuff!
+ nStart = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset());
+ nEnd = static_cast< USHORT > (nStart + aIndex.GetFieldLen());
+
+ return sal_True;
+ }
+
+ if( !mrTextForwarder->GetWordIndices( nPara, nIndex, nStart, nEnd ) )
+ return sal_False;
+
+ aIndex.SetEEIndex( nPara, nStart, *this );
+ DBG_ASSERT(aIndex.GetIndex() >= 0 &&
+ aIndex.GetIndex() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+ nStart = static_cast< USHORT > (aIndex.GetIndex());
+
+ aIndex.SetEEIndex( nPara, nEnd, *this );
+ DBG_ASSERT(aIndex.GetIndex() >= 0 &&
+ aIndex.GetIndex() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+ nEnd = static_cast< USHORT > (aIndex.GetIndex());
+
+ return sal_True;
+}
+
+sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetIndex(nPara, nIndex, *this);
+ nIndex = aIndex.GetEEIndex();
+
+ if( aIndex.InBullet() )
+ {
+ DBG_ASSERT(aIndex.GetBulletLen() >= 0 &&
+ aIndex.GetBulletLen() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ // always treat bullet as distinct attribute
+ nStartIndex = 0;
+ nEndIndex = static_cast< USHORT > (aIndex.GetBulletLen());
+
+ return sal_True;
+ }
+
+ if( aIndex.InField() )
+ {
+ DBG_ASSERT(aIndex.GetIndex() - aIndex.GetFieldOffset() >= 0 &&
+ aIndex.GetIndex() - aIndex.GetFieldOffset() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+
+ // always treat field as distinct attribute
+ nStartIndex = static_cast< USHORT > (aIndex.GetIndex() - aIndex.GetFieldOffset());
+ nEndIndex = static_cast< USHORT > (nStartIndex + aIndex.GetFieldLen());
+
+ return sal_True;
+ }
+
+ if( !mrTextForwarder->GetAttributeRun( nStartIndex, nEndIndex, nPara, nIndex ) )
+ return sal_False;
+
+ aIndex.SetEEIndex( nPara, nStartIndex, *this );
+ DBG_ASSERT(aIndex.GetIndex() >= 0 &&
+ aIndex.GetIndex() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+ nStartIndex = static_cast< USHORT > (aIndex.GetIndex());
+
+ aIndex.SetEEIndex( nPara, nEndIndex, *this );
+ DBG_ASSERT(aIndex.GetIndex() >= 0 &&
+ aIndex.GetIndex() <= USHRT_MAX,
+ "SvxAccessibleTextIndex::SetIndex: index value overflow");
+ nEndIndex = static_cast< USHORT > (aIndex.GetIndex());
+
+ return sal_True;
+}
+
+USHORT SvxAccessibleTextAdapter::GetLineCount( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetLineCount( nPara );
+}
+
+USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+ USHORT nCurrLine;
+ USHORT nCurrIndex, nLastIndex;
+ for( nCurrLine=0, nCurrIndex=0, nLastIndex=0; nCurrLine<=nLine; ++nCurrLine )
+ {
+ nLastIndex = nCurrIndex;
+ nCurrIndex += mrTextForwarder->GetLineLen( nPara, nCurrLine );
+ }
+
+ aEndIndex.SetEEIndex( nPara, nCurrIndex, *this );
+ if( nLine > 0 )
+ {
+ aStartIndex.SetEEIndex( nPara, nLastIndex, *this );
+
+ return static_cast< USHORT >(aEndIndex.GetIndex() - aStartIndex.GetIndex());
+ }
+ else
+ return static_cast< USHORT >(aEndIndex.GetIndex());
+}
+
+sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ return mrTextForwarder->Delete( MakeEESelection(aStartIndex, aEndIndex ) );
+}
+
+sal_Bool SvxAccessibleTextAdapter::InsertText( const String& rStr, const ESelection& rSel )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *this );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *this );
+
+ return mrTextForwarder->InsertText( rStr, MakeEESelection(aStartIndex, aEndIndex) );
+}
+
+sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( BOOL bFull )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->QuickFormatDoc( bFull );
+}
+
+USHORT SvxAccessibleTextAdapter::GetDepth( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->GetDepth( nPara );
+}
+
+sal_Bool SvxAccessibleTextAdapter::SetDepth( USHORT nPara, USHORT nNewDepth )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ return mrTextForwarder->SetDepth( nPara, nNewDepth );
+}
+
+void SvxAccessibleTextAdapter::SetForwarder( SvxTextForwarder& rForwarder )
+{
+ mrTextForwarder = &rForwarder;
+}
+
+sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( USHORT nPara ) const
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ EBulletInfo aBulletInfo = GetBulletInfo( nPara );
+
+ if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
+ aBulletInfo.bVisible &&
+ aBulletInfo.nType != SVX_NUM_BITMAP )
+ {
+ return sal_True;
+ }
+ else
+ {
+ return sal_False;
+ }
+}
+
+//---------------------------------------------------------------------------------------
+
+SvxAccessibleTextEditViewAdapter::SvxAccessibleTextEditViewAdapter()
+{
+}
+
+SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter()
+{
+}
+
+BOOL SvxAccessibleTextEditViewAdapter::IsValid() const
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ if( mrViewForwarder )
+ return mrViewForwarder->IsValid();
+ else
+ return sal_False;
+}
+
+Rectangle SvxAccessibleTextEditViewAdapter::GetVisArea() const
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ return mrViewForwarder->GetVisArea();
+}
+
+Point SvxAccessibleTextEditViewAdapter::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ return mrViewForwarder->LogicToPixel(rPoint, rMapMode);
+}
+
+Point SvxAccessibleTextEditViewAdapter::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ return mrViewForwarder->PixelToLogic(rPoint, rMapMode);
+}
+
+sal_Bool SvxAccessibleTextEditViewAdapter::GetSelection( ESelection& rSel ) const
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ ESelection aSelection;
+
+ if( !mrViewForwarder->GetSelection( aSelection ) )
+ return sal_False;
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetEEIndex( aSelection.nStartPara, aSelection.nStartPos, *mrTextForwarder );
+ aEndIndex.SetEEIndex( aSelection.nEndPara, aSelection.nEndPos, *mrTextForwarder );
+
+ DBG_ASSERT(aStartIndex.GetIndex() >= 0 && aStartIndex.GetIndex() <= USHRT_MAX &&
+ aEndIndex.GetIndex() >= 0 && aEndIndex.GetIndex() <= USHRT_MAX,
+ "SvxAccessibleTextEditViewAdapter::GetSelection: index value overflow");
+
+ rSel = ESelection( aStartIndex.GetParagraph(), static_cast< USHORT > (aStartIndex.GetIndex()),
+ aEndIndex.GetParagraph(), static_cast< USHORT > (aEndIndex.GetIndex()) );
+
+ return sal_True;
+}
+
+sal_Bool SvxAccessibleTextEditViewAdapter::SetSelection( const ESelection& rSel )
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aStartIndex;
+ SvxAccessibleTextIndex aEndIndex;
+
+ aStartIndex.SetIndex( rSel.nStartPara, rSel.nStartPos, *mrTextForwarder );
+ aEndIndex.SetIndex( rSel.nEndPara, rSel.nEndPos, *mrTextForwarder );
+
+ return mrViewForwarder->SetSelection( MakeEESelection(aStartIndex, aEndIndex) );
+}
+
+sal_Bool SvxAccessibleTextEditViewAdapter::Copy()
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ return mrViewForwarder->Copy();
+}
+
+sal_Bool SvxAccessibleTextEditViewAdapter::Cut()
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ return mrViewForwarder->Cut();
+}
+
+sal_Bool SvxAccessibleTextEditViewAdapter::Paste()
+{
+ DBG_ASSERT(mrViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
+
+ return mrViewForwarder->Paste();
+}
+
+void SvxAccessibleTextEditViewAdapter::SetForwarder( SvxEditViewForwarder& rForwarder,
+ SvxAccessibleTextAdapter& rTextForwarder )
+{
+ mrViewForwarder = &rForwarder;
+ mrTextForwarder = &rTextForwarder;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoedsrc.cxx b/binfilter/bf_svx/source/unoedit/svx_unoedsrc.cxx
new file mode 100644
index 000000000000..9f92ec102d3e
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoedsrc.cxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <bf_svtools/brdcst.hxx>
+
+#include "unoedsrc.hxx"
+namespace binfilter {
+
+//------------------------------------------------------------------------
+
+SvxTextForwarder::~SvxTextForwarder()
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxViewForwarder::~SvxViewForwarder()
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxEditSource::~SvxEditSource()
+{
+}
+
+SvxViewForwarder* SvxEditSource::GetViewForwarder()
+{
+ return NULL;
+}
+
+SvxEditViewForwarder* SvxEditSource::GetEditViewForwarder( sal_Bool bCreate )
+{
+ return NULL;
+}
+
+SfxBroadcaster& SvxEditSource::GetBroadcaster() const
+{
+ DBG_ERROR("SvxEditSource::GetBroadcaster called for implementation missing this feature!");
+
+ static SfxBroadcaster aBroadcaster;
+
+ return aBroadcaster;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unofield.cxx b/binfilter/bf_svx/source/unoedit/svx_unofield.cxx
new file mode 100644
index 000000000000..1e1b97dfbac4
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unofield.cxx
@@ -0,0 +1,1075 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/util/DateTime.hpp>
+
+#include <com/sun/star/text/FilenameDisplayFormat.hpp>
+
+
+#include <vcl/svapp.hxx>
+#include <osl/mutex.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "eeitem.hxx"
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+
+#include <bf_svtools/poolitem.hxx>
+
+#include <bf_svx/itemdata.hxx>
+
+#include "svdfield.hxx"
+#include "unofield.hxx"
+#include "unotext.hxx"
+#include "adritem.hxx"
+namespace binfilter {
+
+using namespace ::rtl;
+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_DATE 0
+#define WID_BOOL1 1
+#define WID_BOOL2 2
+#define WID_INT32 3
+#define WID_INT16 4
+#define WID_STRING1 5
+#define WID_STRING2 6
+#define WID_STRING3 7
+
+class SvxUnoFieldData_Impl
+{
+public:
+ sal_Bool mbBoolean1;
+ sal_Bool mbBoolean2;
+ sal_Int32 mnInt32;
+ sal_Int16 mnInt16;
+ OUString msString1;
+ OUString msString2;
+ OUString msString3;
+ util::DateTime maDateTime;
+
+ OUString msPresentation;
+};
+
+SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
+{
+ static SfxItemPropertyMap aExDateTimeFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("DateTime"), WID_DATE, &::getCppuType((const util::DateTime*)0), 0, 0 },
+ { MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("IsDate"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("NumberFormat"), WID_INT32, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aDateTimeFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("IsDate"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aUrlFieldPropertyMap_Impl[] =
+ {
+
+ { MAP_CHAR_LEN("Format"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN("Representation"), WID_STRING1, &::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("TargetFrame"), WID_STRING2, &::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("URL"), WID_STRING3, &::getCppuType((const OUString*)0), 0, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aEmptyPropertyMap_Impl[] =
+ {
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aExtFileFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("FileFormat"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aAuthorFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("Content"), WID_STRING2,&::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("AuthorFormat"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ { MAP_CHAR_LEN("FullName"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aMeasureFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("Kind"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
+ {0,0}
+ };
+
+ switch( mnId )
+ {
+ case ID_EXT_DATEFIELD:
+ case ID_EXT_TIMEFIELD:
+ return aExDateTimeFieldPropertyMap_Impl;
+ case ID_URLFIELD:
+ return aUrlFieldPropertyMap_Impl;
+ case ID_DATEFIELD:
+ case ID_TIMEFIELD:
+ return aDateTimeFieldPropertyMap_Impl;
+ case ID_EXT_FILEFIELD:
+ return aExtFileFieldPropertyMap_Impl;
+ case ID_AUTHORFIELD:
+ return aAuthorFieldPropertyMap_Impl;
+ case ID_MEASUREFIELD:
+ return aMeasureFieldPropertyMap_Impl;
+// case ID_PAGEFIELD:
+// case ID_PAGESFIELD:
+// case ID_FILEFIELD:
+// case ID_TABLEFIELD:
+ default:
+ return aEmptyPropertyMap_Impl;
+ }
+}
+
+static SfxItemPropertyMap aEmptyPropertyMap_Impl[] =
+{
+ {0,0}
+};
+
+static sal_Char* aFieldItemNameMap_Impl[] =
+{
+ "Date",
+ "URL",
+ "Page",
+ "Pages",
+ "Time",
+ "File",
+ "Table",
+ "ExtTime",
+ "ExtFile",
+ "Author",
+ "Measure",
+ "ExtDate",
+ "Unknown"
+};
+
+/* conversion routines */
+
+static sal_Int16 getFileNameDisplayFormat( SvxFileFormat nFormat )
+{
+ switch( nFormat )
+ {
+ case SVXFILEFORMAT_NAME_EXT: return text::FilenameDisplayFormat::NAME_AND_EXT;
+ case SVXFILEFORMAT_FULLPATH: return text::FilenameDisplayFormat::FULL;
+ case SVXFILEFORMAT_PATH: return text::FilenameDisplayFormat::PATH;
+// case SVXFILEFORMAT_NAME:
+ default: return text::FilenameDisplayFormat::NAME;
+ }
+}
+
+static SvxFileFormat setFileNameDisplayFormat( sal_Int16 nFormat )
+{
+ switch( nFormat )
+ {
+ case text::FilenameDisplayFormat::FULL: return SVXFILEFORMAT_FULLPATH;
+ case text::FilenameDisplayFormat::PATH: return SVXFILEFORMAT_PATH;
+ case text::FilenameDisplayFormat::NAME: return SVXFILEFORMAT_NAME;
+// case text::FilenameDisplayFormat::NAME_AND_EXT:
+ default:
+ return SVXFILEFORMAT_NAME_EXT;
+ }
+}
+
+static util::DateTime getDate( ULONG nDate )
+{
+ util::DateTime aDate;
+ memset( &aDate, 0, sizeof( util::DateTime ) );
+
+ Date aTempDate( nDate );
+
+ aDate.Day = aTempDate.GetDay();
+ aDate.Month = aTempDate.GetMonth();
+ aDate.Year = aTempDate.GetYear();
+
+ return aDate;
+}
+
+inline Date setDate( util::DateTime& rDate )
+{
+ return Date( rDate.Day, rDate.Month, rDate.Year );
+}
+
+static util::DateTime getTime( long nTime )
+{
+ util::DateTime aTime;
+ memset( &aTime, 0, sizeof( util::DateTime ) );
+
+ Time aTempTime( nTime );
+
+ aTime.HundredthSeconds = aTempTime.Get100Sec();
+ aTime.Seconds = aTempTime.GetSec();
+ aTime.Minutes = aTempTime.GetMin();
+ aTime.Hours = aTempTime.GetHour();
+
+ return aTime;
+}
+
+inline Time setTime( util::DateTime& rDate )
+{
+ return Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.HundredthSeconds );
+}
+
+// ====================================================================
+// class SvxUnoTextField
+// ====================================================================
+UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextField );
+
+SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw()
+: OComponentHelper( getMutex() ),
+ mpPropSet(NULL),
+ mpImpl( new SvxUnoFieldData_Impl ),
+ mnServiceId(nServiceId)
+{
+ mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+
+ memset( &(mpImpl->maDateTime), 0, sizeof( util::DateTime ) );
+
+ switch( nServiceId )
+ {
+ case ID_EXT_DATEFIELD:
+ case ID_DATEFIELD:
+ mpImpl->mbBoolean2 = sal_True;
+ mpImpl->mnInt32 = SVXDATEFORMAT_STDSMALL;
+ mpImpl->mbBoolean1 = sal_False;
+ break;
+
+ case ID_EXT_TIMEFIELD:
+ case ID_TIMEFIELD:
+ mpImpl->mbBoolean2 = sal_False;
+ mpImpl->mbBoolean1 = sal_False;
+ mpImpl->mnInt32 = SVXTIMEFORMAT_STANDARD;
+ break;
+
+ case ID_URLFIELD:
+ mpImpl->mnInt16 = SVXURLFORMAT_REPR;
+ break;
+
+ case ID_EXT_FILEFIELD:
+ mpImpl->mbBoolean1 = sal_False;
+ mpImpl->mnInt16 = text::FilenameDisplayFormat::FULL;
+ break;
+
+ case ID_AUTHORFIELD:
+ mpImpl->mnInt16 = SVXAUTHORFORMAT_FULLNAME;
+ mpImpl->mbBoolean1 = sal_False;
+ mpImpl->mbBoolean2 = sal_True;
+ break;
+
+ case ID_MEASUREFIELD:
+ mpImpl->mnInt16 = SDRMEASUREFIELD_VALUE;
+ break;
+
+ default:
+ mpImpl->mbBoolean1 = sal_False;
+ mpImpl->mbBoolean2 = sal_False;
+ mpImpl->mnInt32 = 0;
+ mpImpl->mnInt16 = 0;
+
+ }
+}
+
+SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, const OUString& rPresentation, const SvxFieldData* pData ) throw()
+: OComponentHelper( getMutex() ),
+ mxAnchor( xAnchor ),
+ mpPropSet(NULL),
+ mpImpl( new SvxUnoFieldData_Impl ),
+ mnServiceId(ID_UNKNOWN)
+{
+ DBG_ASSERT(pData, "pFieldData == NULL! [CL]" );
+
+ mpImpl->msPresentation = rPresentation;
+
+ if(pData)
+ {
+ mnServiceId = GetFieldId(pData);
+ DBG_ASSERT(mnServiceId != ID_UNKNOWN, "unknown SvxFieldData! [CL]");
+ if(mnServiceId != ID_UNKNOWN)
+ {
+ // extract field properties from data class
+ switch( mnServiceId )
+ {
+ case ID_DATEFIELD:
+ case ID_EXT_DATEFIELD:
+ mpImpl->mbBoolean2 = sal_True;
+ mpImpl->maDateTime = getDate( ((SvxDateField*)pData)->GetFixDate() );
+ mpImpl->mnInt32 = ((SvxDateField*)pData)->GetFormat();
+ mpImpl->mbBoolean1 = ((SvxDateField*)pData)->GetType() == SVXDATETYPE_FIX;
+ break;
+
+ case ID_TIMEFIELD:
+ mpImpl->mbBoolean2 = sal_False;
+ mpImpl->mbBoolean1 = sal_False;
+ mpImpl->mnInt32 = SVXTIMEFORMAT_STANDARD;
+ break;
+
+ case ID_EXT_TIMEFIELD:
+ mpImpl->mbBoolean2 = sal_False;
+ mpImpl->maDateTime = getTime( ((SvxExtTimeField*)pData)->GetFixTime() );
+ mpImpl->mbBoolean1 = ((SvxExtTimeField*)pData)->GetType() == SVXTIMETYPE_FIX;
+ mpImpl->mnInt32 = ((SvxExtTimeField*)pData)->GetFormat();
+ break;
+
+ case ID_URLFIELD:
+ mpImpl->msString1 = ((SvxURLField*)pData)->GetRepresentation();
+ mpImpl->msString2 = ((SvxURLField*)pData)->GetTargetFrame();
+ mpImpl->msString3 = ((SvxURLField*)pData)->GetURL();
+ mpImpl->mnInt16 = ((SvxURLField*)pData)->GetFormat();
+ break;
+
+ case ID_EXT_FILEFIELD:
+ mpImpl->msString1 = ((SvxExtFileField*)pData)->GetFile();
+ mpImpl->mbBoolean1 = ((SvxExtFileField*)pData)->GetType() == SVXFILETYPE_FIX;
+ mpImpl->mnInt16 = getFileNameDisplayFormat(((SvxExtFileField*)pData)->GetFormat());
+ break;
+
+ case ID_AUTHORFIELD:
+ mpImpl->msString1 = ((SvxAuthorField*)pData)->GetFormatted();
+ mpImpl->msString2 = ((SvxAuthorField*)pData)->GetFormatted();
+ mpImpl->mnInt16 = ((SvxAuthorField*)pData)->GetFormat();
+ mpImpl->mbBoolean1 = ((SvxAuthorField*)pData)->GetType() == SVXAUTHORTYPE_FIX;
+ mpImpl->mbBoolean2 = ((SvxAuthorField*)pData)->GetType() != SVXAUTHORFORMAT_SHORTNAME;
+ break;
+
+ case ID_MEASUREFIELD:
+ mpImpl->mnInt16 = ((SdrMeasureField*)pData)->GetMeasureFieldKind();
+ break;
+ }
+ }
+ }
+
+ mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+}
+
+SvxUnoTextField::~SvxUnoTextField() throw()
+{
+ delete mpPropSet;
+ delete mpImpl;
+}
+
+SvxFieldData* SvxUnoTextField::CreateFieldData() const throw()
+{
+ SvxFieldData* pData = NULL;
+
+ switch( mnServiceId )
+ {
+ case ID_TIMEFIELD:
+ case ID_EXT_TIMEFIELD:
+ case ID_DATEFIELD:
+ case ID_EXT_DATEFIELD:
+ {
+ if( mpImpl->mbBoolean2 ) // IsDate?
+ {
+ Date aDate( setDate( mpImpl->maDateTime ) );
+ pData = new SvxDateField( aDate, mpImpl->mbBoolean1?SVXDATETYPE_FIX:SVXDATETYPE_VAR );
+ if( mpImpl->mnInt32 >= SVXDATEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXDATEFORMAT_F )
+ ((SvxDateField*)pData)->SetFormat( (SvxDateFormat)mpImpl->mnInt32 );
+ }
+ else
+ {
+ Time aTime;
+
+ if( mnServiceId != ID_TIMEFIELD && mnServiceId != ID_DATEFIELD )
+ {
+ Time aTime( setTime( mpImpl->maDateTime ) );
+ pData = new SvxExtTimeField( aTime, mpImpl->mbBoolean1?SVXTIMETYPE_FIX:SVXTIMETYPE_VAR );
+
+ if( mpImpl->mnInt32 >= SVXTIMEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXTIMEFORMAT_AM_HMSH )
+ ((SvxExtTimeField*)pData)->SetFormat( (SvxTimeFormat)mpImpl->mnInt32 );
+ }
+ else
+ {
+ pData = new SvxTimeField();
+ }
+ }
+
+ }
+ break;
+
+ case ID_URLFIELD:
+ pData = new SvxURLField( mpImpl->msString3, mpImpl->msString1, mpImpl->msString1.getLength() ? SVXURLFORMAT_REPR : SVXURLFORMAT_URL );
+ ((SvxURLField*)pData)->SetTargetFrame( mpImpl->msString2 );
+ if( mpImpl->mnInt16 >= SVXURLFORMAT_APPDEFAULT && mpImpl->mnInt16 <= SVXURLFORMAT_REPR )
+ ((SvxURLField*)pData)->SetFormat( (SvxURLFormat)mpImpl->mnInt16 );
+ break;
+
+ case ID_PAGEFIELD:
+ pData = new SvxPageField();
+ break;
+
+ case ID_PAGESFIELD:
+ pData = new SvxPagesField();
+ break;
+
+ case ID_FILEFIELD:
+ pData = new SvxFileField();
+ break;
+
+ case ID_TABLEFIELD:
+ pData = new SvxTableField();
+ break;
+
+ case ID_EXT_FILEFIELD:
+ {
+ // #92009# pass fixed attribute to constructor
+ pData = new SvxExtFileField( mpImpl->msString1,
+ mpImpl->mbBoolean1 ? SVXFILETYPE_FIX : SVXFILETYPE_VAR,
+ setFileNameDisplayFormat((SvxFileFormat)mpImpl->mnInt16 ) );
+ break;
+ }
+
+ case ID_AUTHORFIELD:
+ {
+ ::rtl::OUString aContent;
+ String aFirstName;
+ String aLastName;
+ String aEmpty;
+
+ // do we have CurrentPresentation given?
+ // mimic behaviour of writer, which means:
+ // prefer CurrentPresentation over Content
+ // if both are given.
+ if( mpImpl->msString1.getLength() )
+ aContent = mpImpl->msString1;
+ else
+ aContent = mpImpl->msString2;
+
+ sal_Int32 nPos = aContent.lastIndexOf( sal_Char(' '), 0 );
+ if( nPos > 0 )
+ {
+ aFirstName = aContent.copy( 0, nPos );
+ aLastName = aContent.copy( nPos + 1 );
+ }
+ else
+ {
+ aLastName = aContent;
+ }
+
+ // #92009# pass fixed attribute to constructor
+ pData = new SvxAuthorField( SvxAddressItem( aEmpty, aEmpty, aFirstName, aLastName ),
+ mpImpl->mbBoolean1 ? SVXAUTHORTYPE_FIX : SVXAUTHORTYPE_VAR );
+
+ if( !mpImpl->mbBoolean2 )
+ {
+ ((SvxAuthorField*)pData)->SetFormat( SVXAUTHORFORMAT_SHORTNAME );
+ }
+ else if( mpImpl->mnInt16 >= SVXAUTHORFORMAT_FULLNAME || mpImpl->mnInt16 <= SVXAUTHORFORMAT_SHORTNAME )
+ {
+ ((SvxAuthorField*)pData)->SetFormat( (SvxAuthorFormat) mpImpl->mnInt16 );
+ }
+
+ break;
+ }
+
+ case ID_MEASUREFIELD:
+ {
+ SdrMeasureFieldKind eKind = SDRMEASUREFIELD_VALUE;
+ if( mpImpl->mnInt16 == (sal_Int16)SDRMEASUREFIELD_UNIT || mpImpl->mnInt16 == (sal_Int16)SDRMEASUREFIELD_ROTA90BLANCS )
+ eKind = (SdrMeasureFieldKind) mpImpl->mnInt16;
+ pData = new SdrMeasureField( eKind);
+ break;
+ }
+ };
+
+ return pData;
+}
+
+// uno::XInterface
+uno::Any SAL_CALL SvxUnoTextField::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( beans::XPropertySet );
+ else QUERYINT( text::XTextContent );
+ else QUERYINT( text::XTextField );
+ else QUERYINT( lang::XServiceInfo );
+ else QUERYINT( lang::XUnoTunnel );
+ 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 + 4 ); // !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< lang::XServiceInfo >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)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( )
+{
+ OComponentHelper::acquire();
+}
+
+void SAL_CALL SvxUnoTextField::release() throw( )
+{
+ OComponentHelper::release();
+}
+
+// Interface text::XTextField
+OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(bShowCommand)
+ {
+ DBG_ASSERT( ((sal_uInt32)mnServiceId) < ID_UNKNOWN, "Unknown field type" );
+ return OUString::createFromAscii( aFieldItemNameMap_Impl[(((sal_uInt32)mnServiceId) > ID_UNKNOWN)? ID_UNKNOWN : mnServiceId ] );
+ }
+ else
+ {
+ return mpImpl->msPresentation;
+ }
+}
+
+// Interface text::XTextContent
+void SAL_CALL SvxUnoTextField::attach( const uno::Reference< text::XTextRange >& xTextRange )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRange::getImplementation( xTextRange );
+ if(pRange == NULL)
+ throw lang::IllegalArgumentException();
+
+ SvxFieldData* pData = CreateFieldData();
+ if( pData )
+ pRange->attachField( pData );
+
+ delete pData;
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextField::getAnchor()
+ throw(uno::RuntimeException)
+{
+ return mxAnchor;
+}
+
+// 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)
+{
+ SolarMutexGuard aGuard;
+ return mpPropSet->getPropertySetInfo();
+}
+
+void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if( mpImpl == NULL )
+ throw uno::RuntimeException();
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), aPropertyName );
+ if ( !pMap )
+ throw beans::UnknownPropertyException();
+
+ switch( pMap->nWID )
+ {
+ case WID_DATE:
+ if(aValue >>= mpImpl->maDateTime)
+ return;
+ break;
+ case WID_BOOL1:
+ if(aValue >>= mpImpl->mbBoolean1)
+ return;
+ break;
+ case WID_BOOL2:
+ if(aValue >>= mpImpl->mbBoolean2)
+ return;
+ break;
+ case WID_INT16:
+ if(aValue >>= mpImpl->mnInt16)
+ return;
+ break;
+ case WID_INT32:
+ if(aValue >>= mpImpl->mnInt32)
+ return;
+ break;
+ case WID_STRING1:
+ if(aValue >>= mpImpl->msString1)
+ return;
+ break;
+ case WID_STRING2:
+ if(aValue >>= mpImpl->msString2)
+ return;
+ break;
+ case WID_STRING3:
+ if(aValue >>= mpImpl->msString3)
+ return;
+ break;
+ }
+
+ throw lang::IllegalArgumentException();
+
+/*
+ case WID_FORMAT:
+ {
+ sal_Int32 nFormat;
+
+ 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)
+{
+ SolarMutexGuard aGuard;
+
+ uno::Any aValue;
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ if ( !pMap )
+ throw beans::UnknownPropertyException();
+
+ switch( pMap->nWID )
+ {
+ case WID_DATE:
+ aValue <<= mpImpl->maDateTime;
+ break;
+ case WID_BOOL1:
+ aValue <<= mpImpl->mbBoolean1;
+ break;
+ case WID_BOOL2:
+ aValue <<= mpImpl->mbBoolean2;
+ break;
+ case WID_INT16:
+ aValue <<= mpImpl->mnInt16;
+ break;
+ case WID_INT32:
+ aValue <<= mpImpl->mnInt32;
+ break;
+ case WID_STRING1:
+ aValue <<= mpImpl->msString1;
+ break;
+ case WID_STRING2:
+ aValue <<= mpImpl->msString2;
+ break;
+ case WID_STRING3:
+ aValue <<= mpImpl->msString3;
+ break;
+ }
+
+ return aValue;
+
+/*
+ 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;
+*/
+}
+
+void SAL_CALL SvxUnoTextField::addPropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxUnoTextField::removePropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxUnoTextField::addVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxUnoTextField::removeVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+
+// OComponentHelper
+void SvxUnoTextField::disposing()
+{
+ // nothing to do
+}
+
+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_EXT_DATEFIELD;
+ else if( pFieldData->ISA( SdrMeasureField ) )
+ return ID_MEASUREFIELD;
+
+ return ID_UNKNOWN;
+}
+
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeException)
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField"));
+}
+
+static const sal_Char* pServiceNames[] =
+{
+ "com.sun.star.text.TextField.DateTime",
+ "com.sun.star.text.TextField.URL",
+ "com.sun.star.text.TextField.PageNumber",
+ "com.sun.star.text.TextField.PageCount",
+ "com.sun.star.text.TextField.DateTime",
+ "com.sun.star.text.TextField.DocInfo.Title", // SvxFileField is used for title
+ "com.sun.star.text.TextField.SheetName",
+ "com.sun.star.text.TextField.DateTime",
+ "com.sun.star.text.TextField.FileName",
+ "com.sun.star.text.TextField.Author",
+ "com.sun.star.text.TextField.Measure",
+ "com.sun.star.text.TextField.DateTime"
+};
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( 3 );
+ OUString* pServices = aSeq.getArray();
+ pServices[0] = OUString::createFromAscii( pServiceNames[mnServiceId] );
+ pServices[1] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
+ pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextField" );
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoTextField::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException )
+{
+ return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unofored.cxx b/binfilter/bf_svx/source/unoedit/svx_unofored.cxx
new file mode 100644
index 000000000000..8513850fd5ff
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unofored.cxx
@@ -0,0 +1,503 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <algorithm>
+
+#include <com/sun/star/i18n/WordType.hpp>
+
+#include <unoedhlp.hxx>
+#include <outliner.hxx>
+#include <editobj.hxx> // nur fuer die GetText-Kruecke
+
+#include "unofored.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+//------------------------------------------------------------------------
+
+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, BOOL bOnlyHardAttrib ) const
+{
+ if( rSel.nStartPara == rSel.nEndPara )
+ {
+ sal_uInt8 nFlags = 0;
+ switch( bOnlyHardAttrib )
+ {
+ case EditEngineAttribs_All:
+ nFlags = GETATTRIBS_ALL;
+ break;
+ case EditEngineAttribs_HardAndPara:
+ nFlags = GETATTRIBS_PARAATTRIBS|GETATTRIBS_CHARATTRIBS;
+ break;
+ case EditEngineAttribs_OnlyHard:
+ nFlags = GETATTRIBS_CHARATTRIBS;
+ break;
+ default:
+ DBG_ERROR("unknown flags for SvxOutlinerForwarder::GetAttribs");
+ }
+
+ return rEditEngine.GetAttribs( rSel.nStartPara, rSel.nStartPos, rSel.nEndPos, nFlags );
+ }
+ else
+ {
+ return rEditEngine.GetAttribs( rSel, bOnlyHardAttrib );
+ }
+}
+
+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::QuickInsertLineBreak( const ESelection& rSel )
+{
+ rEditEngine.QuickInsertLineBreak( 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 );
+}
+
+BOOL SvxEditEngineForwarder::IsValid() const
+{
+ // cannot reliably query EditEngine state
+ // while in the middle of an update
+ return rEditEngine.GetUpdateMode();
+}
+
+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" );
+
+ const sal_Bool bEmptyPortion = aAttrib.nStart == aAttrib.nEnd;
+ if( (!bEmptyPortion && (aAttrib.nStart >= nEndPos)) || (bEmptyPortion && (aAttrib.nStart > nEndPos)) )
+ break; // break if we are already behind our selektion
+
+ if( (!bEmptyPortion && (aAttrib.nEnd <= nPos)) || (bEmptyPortion && (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( bEmpty )
+ eParaState = SFX_ITEM_DEFAULT;
+ else if( bGaps )
+ eParaState = 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 );
+}
+
+LanguageType SvxEditEngineForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+{
+ return rEditEngine.GetLanguage(nPara, nIndex);
+}
+
+USHORT SvxEditEngineForwarder::GetFieldCount( USHORT nPara ) const
+{
+ return rEditEngine.GetFieldCount(nPara);
+}
+
+EFieldInfo SvxEditEngineForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+{
+ return rEditEngine.GetFieldInfo( nPara, nField );
+}
+
+EBulletInfo SvxEditEngineForwarder::GetBulletInfo( USHORT nPara ) const
+{
+ return EBulletInfo();
+}
+
+Rectangle SvxEditEngineForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+{
+ // #101701#
+ // EditEngine's 'internal' methods like GetCharacterBounds()
+ // don't rotate for vertical text.
+ Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() );
+ ::std::swap( aSize.Width(), aSize.Height() );
+ bool bIsVertical( rEditEngine.IsVertical() == TRUE );
+
+ // #108900# Handle virtual position one-past-the end of the string
+ if( nIndex >= rEditEngine.GetTextLen(nPara) )
+ {
+ Rectangle aLast;
+
+ if( nIndex )
+ {
+ // use last character, if possible
+ aLast = rEditEngine.GetCharacterBounds( EPosition(nPara, nIndex-1) );
+
+ // move at end of this last character, make one pixel wide
+ aLast.Move( aLast.Right() - aLast.Left(), 0 );
+ aLast.SetSize( Size(1, aLast.GetHeight()) );
+
+ // take care for CTL
+ aLast = SvxEditSourceHelper::EEToUserSpace( aLast, aSize, bIsVertical );
+ }
+ else
+ {
+ // #109864# Bounds must lie within the paragraph
+ aLast = GetParaBounds( nPara );
+
+ // #109151# Don't use paragraph height, but line height
+ // instead. aLast is already CTL-correct
+ if( bIsVertical)
+ aLast.SetSize( Size( rEditEngine.GetLineHeight(nPara,0), 1 ) );
+ else
+ aLast.SetSize( Size( 1, rEditEngine.GetLineHeight(nPara,0) ) );
+ }
+
+ return aLast;
+ }
+ else
+ {
+ return SvxEditSourceHelper::EEToUserSpace( rEditEngine.GetCharacterBounds( EPosition(nPara, nIndex) ),
+ aSize, bIsVertical );
+ }
+}
+
+Rectangle SvxEditEngineForwarder::GetParaBounds( USHORT nPara ) const
+{
+ const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara );
+ ULONG nWidth;
+ ULONG nHeight;
+ ULONG nTextWidth;
+
+ if( rEditEngine.IsVertical() )
+ {
+ // #101701#
+ // Hargl. EditEngine's 'external' methods return the rotated
+ // dimensions, 'internal' methods like GetTextHeight( n )
+ // don't rotate.
+ nWidth = rEditEngine.GetTextHeight( nPara );
+ nHeight = rEditEngine.GetTextHeight();
+ nTextWidth = rEditEngine.GetTextHeight();
+
+ return Rectangle( nTextWidth - aPnt.Y() - nWidth, 0, nTextWidth - aPnt.Y(), nHeight );
+ }
+ else
+ {
+ nWidth = rEditEngine.CalcTextWidth();
+ nHeight = rEditEngine.GetTextHeight( nPara );
+
+ return Rectangle( 0, aPnt.Y(), nWidth, aPnt.Y() + nHeight );
+ }
+}
+
+MapMode SvxEditEngineForwarder::GetMapMode() const
+{
+ return rEditEngine.GetRefMapMode();
+}
+
+OutputDevice* SvxEditEngineForwarder::GetRefDevice() const
+{
+ return rEditEngine.GetRefDevice();
+}
+
+sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+{
+ // #101701#
+ Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() );
+ ::std::swap( aSize.Width(), aSize.Height() );
+ Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos,
+ aSize,
+ rEditEngine.IsVertical() == TRUE ));
+
+ EPosition aDocPos = rEditEngine.FindDocPosition( aEEPos );
+
+ nPara = aDocPos.nPara;
+ nIndex = aDocPos.nIndex;
+
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+{
+ ESelection aRes = rEditEngine.GetWord( ESelection(nPara, nIndex, nPara, nIndex), ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
+
+ if( aRes.nStartPara == nPara &&
+ aRes.nStartPara == aRes.nEndPara )
+ {
+ nStart = aRes.nStartPos;
+ nEnd = aRes.nEndPos;
+
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SvxEditEngineForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+{
+ return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rEditEngine, nPara, nIndex );
+}
+
+USHORT SvxEditEngineForwarder::GetLineCount( USHORT nPara ) const
+{
+ return rEditEngine.GetLineCount(nPara);
+}
+
+USHORT SvxEditEngineForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+{
+ return rEditEngine.GetLineLen(nPara, nLine);
+}
+
+sal_Bool SvxEditEngineForwarder::QuickFormatDoc( BOOL bFull )
+{
+ rEditEngine.QuickFormatDoc();
+
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineForwarder::Delete( const ESelection& rSelection )
+{
+ rEditEngine.QuickDelete( rSelection );
+ rEditEngine.QuickFormatDoc();
+
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineForwarder::InsertText( const String& rStr, const ESelection& rSelection )
+{
+ rEditEngine.QuickInsertText( rStr, rSelection );
+ rEditEngine.QuickFormatDoc();
+
+ return sal_True;
+}
+
+USHORT SvxEditEngineForwarder::GetDepth( USHORT nPara ) const
+{
+ // EditEngine does not support outline depth
+ return 0;
+}
+
+sal_Bool SvxEditEngineForwarder::SetDepth( USHORT nPara, USHORT nNewDepth )
+{
+ // EditEngine does not support outline depth
+ return nNewDepth == 0 ? sal_True : sal_False;
+}
+
+//------------------------------------------------------------------------
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoforou.cxx b/binfilter/bf_svx/source/unoedit/svx_unoforou.cxx
new file mode 100644
index 000000000000..202885aa1ee6
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoforou.cxx
@@ -0,0 +1,505 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <algorithm>
+
+#include <bf_svtools/style.hxx>
+#include <com/sun/star/i18n/WordType.hpp>
+
+#include <bf_svtools/itemset.hxx>
+#include <outliner.hxx>
+#include <unoedhlp.hxx>
+#include <svdobj.hxx>
+
+
+
+
+#include "unoforou.hxx"
+#include "unofored.hxx"
+namespace binfilter {
+
+using namespace ::com::sun::star;
+
+//------------------------------------------------------------------------
+
+SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl, SdrObject* pSdrObj ) :
+ rOutliner( rOutl ),
+ pSdrObject( pSdrObj ),
+ mpAttribsCache( NULL ),
+ mpParaAttribsCache( NULL ),
+ mnParaAttribsCache( 0 )
+{
+}
+
+SvxOutlinerForwarder::~SvxOutlinerForwarder()
+{
+ flushCache();
+}
+
+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 );
+}
+
+static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib, EditEngine& rEditEngine )
+{
+ if( rSel.nStartPara == rSel.nEndPara )
+ {
+ sal_uInt8 nFlags = 0;
+
+ switch( bOnlyHardAttrib )
+ {
+ case EditEngineAttribs_All:
+ nFlags = GETATTRIBS_ALL;
+ break;
+ case EditEngineAttribs_HardAndPara:
+ nFlags = GETATTRIBS_PARAATTRIBS|GETATTRIBS_CHARATTRIBS;
+ break;
+ case EditEngineAttribs_OnlyHard:
+ nFlags = GETATTRIBS_CHARATTRIBS;
+ break;
+ default:
+ DBG_ERROR("unknown flags for SvxOutlinerForwarder::GetAttribs");
+ }
+ return rEditEngine.GetAttribs( rSel.nStartPara, rSel.nStartPos, rSel.nEndPos, nFlags );
+ }
+ else
+ {
+ return rEditEngine.GetAttribs( rSel, bOnlyHardAttrib );
+ }
+}
+
+SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+{
+ if( mpAttribsCache && ( 0 == bOnlyHardAttrib ) )
+ {
+ // have we the correct set in cache?
+ if( ((SvxOutlinerForwarder*)this)->maAttribCacheSelection.IsEqual(rSel) )
+ {
+ // yes! just return the cache
+ return *mpAttribsCache;
+ }
+ else
+ {
+ // no, we need delete the old cache
+ delete mpAttribsCache;
+ mpAttribsCache = NULL;
+ }
+ }
+
+ //! gibt's das nicht am Outliner ???
+ //! und warum ist GetAttribs an der EditEngine nicht const?
+ EditEngine& rEditEngine = (EditEngine&)rOutliner.GetEditEngine();
+
+ SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, bOnlyHardAttrib, rEditEngine ) );
+
+ if( 0 == bOnlyHardAttrib )
+ {
+ mpAttribsCache = new SfxItemSet( aSet );
+ maAttribCacheSelection = rSel;
+ }
+
+ SfxStyleSheet* pStyle = rEditEngine.GetStyleSheet( rSel.nStartPara );
+ if( pStyle )
+ aSet.SetParent( &(pStyle->GetItemSet() ) );
+
+ return aSet;
+}
+
+SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const
+{
+ if( mpParaAttribsCache )
+ {
+ // have we the correct set in cache?
+ if( nPara == mnParaAttribsCache )
+ {
+ // yes! just return the cache
+ return *mpParaAttribsCache;
+ }
+ else
+ {
+ // no, we need delete the old cache
+ delete mpParaAttribsCache;
+ mpParaAttribsCache = NULL;
+ }
+ }
+
+ mpParaAttribsCache = new SfxItemSet( rOutliner.GetParaAttribs( nPara ) );
+ mnParaAttribsCache = nPara;
+
+ EditEngine& rEditEngine = (EditEngine&)rOutliner.GetEditEngine();
+
+ SfxStyleSheet* pStyle = rEditEngine.GetStyleSheet( nPara );
+ if( pStyle )
+ mpParaAttribsCache->SetParent( &(pStyle->GetItemSet() ) );
+
+ return *mpParaAttribsCache;
+}
+
+void SvxOutlinerForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+{
+ flushCache();
+
+ const SfxItemSet* pOldParent = rSet.GetParent();
+ if( pOldParent )
+ ((SfxItemSet*)&rSet)->SetParent( NULL );
+
+ rOutliner.SetParaAttribs( nPara, rSet, true );
+
+ if( pOldParent )
+ ((SfxItemSet*)&rSet)->SetParent( pOldParent );
+}
+
+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 )
+{
+ flushCache();
+ if( rText.Len() == 0 )
+ {
+ rOutliner.QuickDelete( rSel );
+ }
+ else
+ {
+ rOutliner.QuickInsertText( rText, rSel );
+ }
+}
+
+void SvxOutlinerForwarder::QuickInsertLineBreak( const ESelection& rSel )
+{
+ flushCache();
+ rOutliner.QuickInsertLineBreak( rSel );
+}
+
+void SvxOutlinerForwarder::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+ flushCache();
+ rOutliner.QuickInsertField( rFld, rSel );
+}
+
+void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+ flushCache();
+ 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 );
+}
+
+BOOL SvxOutlinerForwarder::IsValid() const
+{
+ // cannot reliably query outliner state
+ // while in the middle of an update
+ return rOutliner.GetUpdateMode();
+}
+
+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 );
+}
+
+
+void SvxOutlinerForwarder::flushCache()
+{
+ if( mpAttribsCache )
+ {
+ delete mpAttribsCache;
+ mpAttribsCache = NULL;
+ }
+
+ if( mpParaAttribsCache )
+ {
+ delete mpParaAttribsCache;
+ mpParaAttribsCache = NULL;
+ }
+}
+
+LanguageType SvxOutlinerForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+{
+ return rOutliner.GetLanguage(nPara, nIndex);
+}
+
+USHORT SvxOutlinerForwarder::GetFieldCount( USHORT nPara ) const
+{
+ return rOutliner.GetEditEngine().GetFieldCount(nPara);
+}
+
+EFieldInfo SvxOutlinerForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+{
+ return rOutliner.GetEditEngine().GetFieldInfo( nPara, nField );
+}
+
+EBulletInfo SvxOutlinerForwarder::GetBulletInfo( USHORT nPara ) const
+{
+ return rOutliner.GetBulletInfo( nPara );
+}
+
+Rectangle SvxOutlinerForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+{
+ // #101701#
+ // EditEngine's 'internal' methods like GetCharacterBounds()
+ // don't rotate for vertical text.
+ Size aSize( rOutliner.CalcTextSize() );
+ ::std::swap( aSize.Width(), aSize.Height() );
+ bool bIsVertical( rOutliner.IsVertical() == TRUE );
+
+ // #108900# Handle virtual position one-past-the end of the string
+ if( nIndex >= GetTextLen(nPara) )
+ {
+ Rectangle aLast;
+
+ if( nIndex )
+ {
+ // use last character, if possible
+ aLast = rOutliner.GetEditEngine().GetCharacterBounds( EPosition(nPara, nIndex-1) );
+
+ // move at end of this last character, make one pixel wide
+ aLast.Move( aLast.Right() - aLast.Left(), 0 );
+ aLast.SetSize( Size(1, aLast.GetHeight()) );
+
+ // take care for CTL
+ aLast = SvxEditSourceHelper::EEToUserSpace( aLast, aSize, bIsVertical );
+ }
+ else
+ {
+ // #109864# Bounds must lie within the paragraph
+ aLast = GetParaBounds( nPara );
+
+ // #109151# Don't use paragraph height, but line height
+ // instead. aLast is already CTL-correct
+ if( bIsVertical)
+ aLast.SetSize( Size( rOutliner.GetLineHeight(nPara,0), 1 ) );
+ else
+ aLast.SetSize( Size( 1, rOutliner.GetLineHeight(nPara,0) ) );
+ }
+
+ return aLast;
+ }
+ else
+ {
+ return SvxEditSourceHelper::EEToUserSpace( rOutliner.GetEditEngine().GetCharacterBounds( EPosition(nPara, nIndex) ),
+ aSize, bIsVertical );
+ }
+}
+
+Rectangle SvxOutlinerForwarder::GetParaBounds( USHORT nPara ) const
+{
+ Point aPnt = rOutliner.GetDocPosTopLeft( nPara );
+ Size aSize = rOutliner.CalcTextSize();
+
+ if( rOutliner.IsVertical() )
+ {
+ // #101701#
+ // Hargl. Outliner's 'external' methods return the rotated
+ // dimensions, 'internal' methods like GetTextHeight( n )
+ // don't rotate.
+ ULONG nWidth = rOutliner.GetTextHeight( nPara );
+
+ return Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() );
+ }
+ else
+ {
+ ULONG nHeight = rOutliner.GetTextHeight( nPara );
+
+ return Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight );
+ }
+}
+
+MapMode SvxOutlinerForwarder::GetMapMode() const
+{
+ return rOutliner.GetRefMapMode();
+}
+
+OutputDevice* SvxOutlinerForwarder::GetRefDevice() const
+{
+ return rOutliner.GetRefDevice();
+}
+
+sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+{
+ // #101701#
+ Size aSize( rOutliner.CalcTextSize() );
+ ::std::swap( aSize.Width(), aSize.Height() );
+ Point aEEPos( SvxEditSourceHelper::UserSpaceToEE( rPos,
+ aSize,
+ rOutliner.IsVertical() == TRUE ));
+
+ EPosition aDocPos = rOutliner.GetEditEngine().FindDocPosition( aEEPos );
+
+ nPara = aDocPos.nPara;
+ nIndex = aDocPos.nIndex;
+
+ return sal_True;
+}
+
+sal_Bool SvxOutlinerForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+{
+ ESelection aRes = rOutliner.GetEditEngine().GetWord( ESelection(nPara, nIndex, nPara, nIndex), ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
+
+ if( aRes.nStartPara == nPara &&
+ aRes.nStartPara == aRes.nEndPara )
+ {
+ nStart = aRes.nStartPos;
+ nEnd = aRes.nEndPos;
+
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SvxOutlinerForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+{
+ return SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, rOutliner.GetEditEngine(), nPara, nIndex );
+}
+
+USHORT SvxOutlinerForwarder::GetLineCount( USHORT nPara ) const
+{
+ return static_cast < USHORT >( rOutliner.GetLineCount(nPara) );
+}
+
+USHORT SvxOutlinerForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+{
+ return rOutliner.GetLineLen(nPara, nLine);
+}
+
+sal_Bool SvxOutlinerForwarder::QuickFormatDoc( BOOL bFull )
+{
+ rOutliner.QuickFormatDoc();
+
+ return sal_True;
+}
+
+sal_Bool SvxOutlinerForwarder::Delete( const ESelection& rSelection )
+{
+ flushCache();
+ rOutliner.QuickDelete( rSelection );
+ rOutliner.QuickFormatDoc();
+
+ return sal_True;
+}
+
+sal_Bool SvxOutlinerForwarder::InsertText( const String& rStr, const ESelection& rSelection )
+{
+ flushCache();
+ rOutliner.QuickInsertText( rStr, rSelection );
+ rOutliner.QuickFormatDoc();
+
+ return sal_True;
+}
+
+USHORT SvxOutlinerForwarder::GetDepth( USHORT nPara ) const
+{
+ DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::GetDepth: Invalid paragraph index");
+
+ Paragraph* pPara = rOutliner.GetParagraph( nPara );
+
+ USHORT nLevel(0);
+
+ if( pPara )
+ {
+ nLevel = rOutliner.GetDepth( nPara );
+
+ if(pSdrObject != NULL)
+ {
+ if((pSdrObject->GetObjInventor() == SdrInventor) &&
+ (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT))
+ --nLevel;
+ }
+ }
+
+ return nLevel;
+}
+
+sal_Bool SvxOutlinerForwarder::SetDepth( USHORT nPara, USHORT nNewDepth )
+{
+ DBG_ASSERT( nPara < GetParagraphCount(), "SvxOutlinerForwarder::SetDepth: Invalid paragraph index");
+
+ if(pSdrObject == NULL)
+ return sal_False;
+
+ const sal_Bool bOutlinerText = (pSdrObject->GetObjInventor() == SdrInventor) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT);
+
+ if(bOutlinerText)
+ ++nNewDepth;
+
+ if(nNewDepth >= 0 && nNewDepth <= 9)
+ {
+ Paragraph* pPara = rOutliner.GetParagraph( nPara );
+ if( pPara )
+ {
+ rOutliner.SetDepth( pPara, nNewDepth );
+ if( bOutlinerText )
+ rOutliner.SetLevelDependendStyleSheet( nPara );
+
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+//------------------------------------------------------------------------
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unotext.cxx b/binfilter/bf_svx/source/unoedit/svx_unotext.cxx
new file mode 100644
index 000000000000..be5733d75e72
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unotext.cxx
@@ -0,0 +1,2154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <vcl/svapp.hxx>
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/text/XTextField.hdl>
+
+
+
+#include <eeitem.hxx>
+
+
+#define ITEMID_FONT EE_CHAR_FONTINFO
+
+#define ITEMID_TABSTOP EE_PARA_TABS
+
+#include "svdobj.hxx"
+
+#include <bf_svtools/intitem.hxx>
+
+#define ITEMID_FIELD EE_FEATURE_FIELD
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unoshtxt.hxx"
+#include "unonrule.hxx"
+#include "unofdesc.hxx"
+#include "unofield.hxx"
+
+
+
+#include <bf_svx/itemdata.hxx>
+
+#include "flditem.hxx"
+#include "unoshprp.hxx"
+#include "numitem.hxx"
+#include "editeng.hxx"
+namespace binfilter {
+
+using namespace ::rtl;
+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}
+};
+
+extern const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap();
+
+// ====================================================================
+// 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 )
+ {
+ if( rSel.nStartPara == 0xffff )
+ {
+ ::binfilter::GetSelection( rSel, pForwarder );//STRIP008 ::GetSelection( rSel, pForwarder );
+ }
+ else
+ {
+ 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 );
+ }
+ }
+ }
+}
+
+// ====================================================================
+// class SvxUnoTextRangeBase
+// ====================================================================
+
+UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextRangeBase );
+
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SfxItemPropertyMap* _pMap ) throw()
+: aPropSet(_pMap), pEditSource(NULL)
+{
+}
+
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
+: aPropSet(_pMap)
+{
+ SolarMutexGuard aGuard;
+
+ DBG_ASSERT(pSource,"SvxUnoTextRangeBase: I need a valid SvxEditSource!");
+
+ pEditSource = pSource->Clone();
+ ESelection aSelection;
+ ::binfilter::GetSelection( aSelection, pEditSource->GetTextForwarder() );//STRIP008 ::GetSelection( aSelection, pEditSource->GetTextForwarder() );
+ SetSelection( aSelection );
+}
+
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) throw()
+: aPropSet(rRange.getPropertyMap())
+{
+ SolarMutexGuard aGuard;
+
+ pEditSource = rRange.pEditSource ? rRange.pEditSource->Clone() : NULL;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ aSelection = rRange.aSelection;
+ CheckSelection( aSelection, pForwarder );
+ }
+}
+
+SvxUnoTextRangeBase::~SvxUnoTextRangeBase() throw()
+{
+ delete pEditSource;
+}
+
+void SvxUnoTextRangeBase::SetEditSource( SvxEditSource* pSource ) throw()
+{
+ DBG_ASSERT(pSource,"SvxUnoTextRangeBase: I need a valid SvxEditSource!");
+ DBG_ASSERT(pEditSource==NULL,"SvxUnoTextRangeBase::SetEditSource called while SvxEditSource already set" );
+
+ pEditSource = pSource;
+
+ aSelection.nStartPara = 0xffff;
+}
+
+/** puts a field item with a copy of the given FieldData into the itemset
+ corresponding with this range */
+void SvxUnoTextRangeBase::attachField( const SvxFieldData* pData ) throw()
+{
+ SolarMutexGuard aGuard;
+
+ if( pData )
+ {
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ SvxFieldItem aField( *pData );
+ pForwarder->QuickInsertField( aField, aSelection );
+ }
+ }
+}
+
+void SvxUnoTextRangeBase::SetSelection( const ESelection& rSelection ) throw()
+{
+ SolarMutexGuard aGuard;
+
+ aSelection = rSelection;
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+}
+
+// Interface XTextRange ( XText )
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart(void)
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ uno::Reference< text::XTextRange > xRange;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+
+ CheckSelection( aSelection, pForwarder );
+
+ SvxUnoTextBase* pText = SvxUnoTextBase::getImplementation( getText() );
+
+ if(pText == NULL)
+ throw uno::RuntimeException();
+
+ SvxUnoTextRange* pRange = new SvxUnoTextRange( *pText );
+ 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 )
+{
+ SolarMutexGuard aGuard;
+
+ uno::Reference< text::XTextRange > xRet;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ CheckSelection( aSelection, pForwarder );
+
+ SvxUnoTextBase* pText = SvxUnoTextBase::getImplementation( getText() );
+
+ if(pText == NULL)
+ throw uno::RuntimeException();
+
+ SvxUnoTextRange* pNew = new SvxUnoTextRange( *pText );
+ 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 )
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ CheckSelection( aSelection, pForwarder );
+
+ return pForwarder->GetText( aSelection );
+ }
+ else
+ {
+ const OUString aEmpty;
+ return aEmpty;
+ }
+}
+
+void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ CheckSelection( aSelection, pForwarder );
+
+ String aConverted( aString );
+ aConverted.ConvertLineEnd( LINEEND_LF ); // Zeilenenden nur einfach zaehlen
+
+ 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 );
+ }
+}
+
+// Interface beans::XPropertySet
+uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextRangeBase::getPropertySetInfo(void)
+ throw( uno::RuntimeException )
+{
+ return aPropSet.getPropertySetInfo();
+}
+
+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 )
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+
+ CheckSelection( aSelection, pForwarder );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if ( pMap )
+ {
+ ESelection aSel( GetSelection() );
+ sal_Bool bParaAttrib = (pMap->nWID >= EE_PARA_START) && ( pMap->nWID <= EE_PARA_END );
+
+ if( nPara == -1 && !bParaAttrib )
+ {
+ SfxItemSet aOldSet( pForwarder->GetAttribs( aSel ) );
+ // we have a selection and no para attribute
+ SfxItemSet aNewSet( *aOldSet.GetPool(), aOldSet.GetRanges() );
+
+ setPropertyValue( pMap, aValue, aSelection, aOldSet, aNewSet );
+
+
+ pForwarder->QuickSetAttribs( aNewSet, GetSelection() );
+ }
+ else
+ {
+ sal_Int32 nEndPara;
+
+ if( nPara == -1 )
+ {
+ nPara = aSel.nStartPara;
+ nEndPara = aSel.nEndPara;
+ }
+ else
+ {
+ // only one paragraph
+ nEndPara = nPara;
+ }
+
+ while( nPara <= nEndPara )
+ {
+ // we have a paragraph
+ SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nPara ) );
+ setPropertyValue( pMap, aValue, aSelection, aSet, aSet );
+ pForwarder->SetParaAttribs( (USHORT)nPara, aSet );
+ nPara++;
+ }
+ }
+
+ GetEditSource()->UpdateData();
+ return;
+ }
+ }
+
+ throw beans::UnknownPropertyException();
+}
+
+void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
+{
+ if(!SetPropertyValueHelper( rOldSet, pMap, rValue, rNewSet, &rSelection, (SvxTextEditSource*)GetEditSource() ))
+ {
+ // Fuer Teile von zusammengesetzten Items mit mehreren Properties (z.B. Hintergrund)
+ // muss vorher das alte Item aus dem Dokument geholt werden
+ rNewSet.Put(rOldSet.Get(pMap->nWID)); // altes Item in neuen Set
+ aPropSet.setPropertyValue(pMap, rValue, rNewSet);
+ }
+}
+
+sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertyMap* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( 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 > xRule;
+ if( !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()) )
+ return sal_True;
+
+ return sal_False;
+ }
+ break;
+
+ case WID_NUMLEVEL:
+ {
+ SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : NULL;
+ if(pForwarder && pSelection)
+ {
+ sal_Int16 nLevel;
+ if( aValue >>= nLevel )
+ {
+ // #101004# Call interface method instead of unsafe cast
+ if(! pForwarder->SetDepth( pSelection->nStartPara, nLevel ) )
+ throw lang::IllegalArgumentException();
+
+ return sal_True;
+ }
+ }
+ }
+ break;
+ case EE_PARA_BULLETSTATE:
+ {
+ sal_Bool bBullet;
+ if( aValue >>= bBullet )
+ {
+ 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 )
+{
+ SolarMutexGuard aGuard;
+
+ uno::Any aAny;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if( pMap )
+ {
+ SfxItemSet* pAttribs = NULL;
+ if( nPara != -1 )
+ pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone();
+ else
+ pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone();
+
+ // Dontcare durch Default ersetzen, damit man immer eine Reflection hat
+ pAttribs->ClearInvalidItems();
+
+ getPropertyValue( pMap, aAny, *pAttribs );
+
+ delete pAttribs;
+ return aAny;
+ }
+ }
+
+ throw beans::UnknownPropertyException();
+ return aAny;
+}
+
+void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
+{
+ switch( pMap->nWID )
+ {
+ case EE_FEATURE_FIELD:
+ if ( rSet.GetItemState( EE_FEATURE_FIELD, sal_False ) == SFX_ITEM_SET )
+ {
+ SvxFieldItem* pItem = (SvxFieldItem*)rSet.GetItem( EE_FEATURE_FIELD );
+ const SvxFieldData* pData = pItem->GetField();
+ uno::Reference< text::XTextRange > xAnchor( this );
+
+ // get presentation string for field
+ Color* pTColor = NULL;
+ Color* pFColor = NULL;
+
+ SvxTextForwarder* pForwarder = pEditSource->GetTextForwarder();
+ OUString aPresentation( pForwarder->CalcFieldValue( *pData, aSelection.nStartPara, aSelection.nStartPos, pTColor, pFColor ) );
+
+ delete pTColor;
+ delete pFColor;
+
+ uno::Reference< text::XTextField > xField( new SvxUnoTextField( xAnchor, aPresentation, pData ) );
+ rAny <<= xField;
+ }
+ break;
+
+ case WID_PORTIONTYPE:
+ if ( rSet.GetItemState( EE_FEATURE_FIELD, sal_False ) == SFX_ITEM_SET )
+ {
+ OUString aType( RTL_CONSTASCII_USTRINGPARAM("TextField") );
+ rAny <<= aType;
+ }
+ else
+ {
+ OUString aType( RTL_CONSTASCII_USTRINGPARAM("Text") );
+ rAny <<= aType;
+ }
+ break;
+
+ default:
+ if(!GetPropertyValueHelper( *((SfxItemSet*)(&rSet)), pMap, rAny, &aSelection, (SvxTextEditSource*)GetEditSource() ))
+ rAny = aPropSet.getPropertyValue(pMap, rSet);
+ }
+}
+
+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* pBulletItem = (SvxNumBulletItem*)rSet.GetItem( EE_PARA_NUMBULLET, sal_True );
+
+ if( pBulletItem == NULL )
+ throw uno::RuntimeException();
+
+ aAny <<= SvxCreateNumRule( pBulletItem->GetNumRule() );
+ }
+ break;
+
+ case WID_NUMLEVEL:
+ {
+ SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : NULL;
+ if(pForwarder && pSelection)
+ {
+ // #101004# Call interface method instead of unsafe cast
+ sal_Int16 nLevel( pForwarder->GetDepth( pSelection->nStartPara ) );
+ 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() == TRUE;
+ }
+
+ 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) {}
+
+// XMultiPropertySet
+void SAL_CALL SvxUnoTextRangeBase::setPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues ) throw (beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ _setPropertyValues( aPropertyNames, aValues, -1 );
+}
+
+void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues, sal_Int32 nPara ) throw (beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ CheckSelection( aSelection, pForwarder );
+
+ ESelection aSel( GetSelection() );
+
+ sal_Bool bUnknownProperty = sal_False;
+
+ const OUString* pPropertyNames = aPropertyNames.getConstArray();
+ const uno::Any* pValues = aValues.getConstArray();
+ sal_Int32 nCount = aPropertyNames.getLength();
+
+ sal_Int32 nEndPara = nPara;
+ sal_Int32 nTempPara = nPara;
+
+ if( nTempPara == -1 )
+ {
+ nTempPara = aSel.nStartPara;
+ nEndPara = aSel.nEndPara;
+ }
+
+ SfxItemSet* pOldAttrSet = NULL;
+ SfxItemSet* pNewAttrSet = NULL;
+
+ SfxItemSet* pOldParaSet = NULL;
+ SfxItemSet* pNewParaSet = NULL;
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMap();
+
+ for( ; nCount; nCount--, pPropertyNames++, pValues++ )
+ {
+ pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ if( NULL == pMap )
+ {
+ bUnknownProperty = sal_True;
+ break;
+ }
+
+ sal_Bool bParaAttrib = (pMap->nWID >= EE_PARA_START) && ( pMap->nWID <= EE_PARA_END );
+
+ if( (nPara == -1) && !bParaAttrib )
+ {
+ if( NULL == pNewAttrSet )
+ {
+ const SfxItemSet aSet( pForwarder->GetAttribs( aSel ) );
+ pOldAttrSet = new SfxItemSet( aSet );
+ pNewAttrSet = new SfxItemSet( *pOldAttrSet->GetPool(), pOldAttrSet->GetRanges() );
+ }
+
+ setPropertyValue( pMap, *pValues, GetSelection(), *pOldAttrSet, *pNewAttrSet );
+
+ if( pMap->nWID >= EE_ITEMS_START && pMap->nWID <= EE_ITEMS_END )
+ {
+ const SfxPoolItem* pItem;
+ if( pNewAttrSet->GetItemState( pMap->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
+ {
+ pOldAttrSet->Put( *pItem );
+ }
+ }
+ }
+ else
+ {
+ if( NULL == pNewParaSet )
+ {
+ const SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) );
+ pOldParaSet = new SfxItemSet( aSet );
+ pNewParaSet = new SfxItemSet( *pOldParaSet->GetPool(), pOldParaSet->GetRanges() );
+ }
+
+ setPropertyValue( pMap, *pValues, GetSelection(), *pOldParaSet, *pNewParaSet );
+
+ if( pMap->nWID >= EE_ITEMS_START && pMap->nWID <= EE_ITEMS_END )
+ {
+ const SfxPoolItem* pItem;
+ if( pNewParaSet->GetItemState( pMap->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
+ {
+ pOldParaSet->Put( *pItem );
+ }
+ }
+
+ }
+
+ if (pMap)
+ pMap++;
+ else
+ pMap = aPropSet.getPropertyMap();
+ }
+
+ if( !bUnknownProperty )
+ {
+ sal_Bool bNeedsUpdate = sal_False;
+
+ if( pNewParaSet )
+ {
+
+ if( pNewParaSet->Count() )
+ {
+ while( nTempPara <= nEndPara )
+ {
+ SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nTempPara ) );
+ aSet.Put( *pNewParaSet );
+ pForwarder->SetParaAttribs( (USHORT)nTempPara, aSet );
+ nTempPara++;
+ }
+ bNeedsUpdate = sal_True;
+ }
+
+ delete pNewParaSet;
+ delete pOldParaSet;
+ }
+
+ if( pNewAttrSet )
+ {
+ if( pNewAttrSet->Count() )
+ {
+ pForwarder->QuickSetAttribs( *pNewAttrSet, GetSelection() );
+ bNeedsUpdate = sal_True;
+ }
+ delete pNewAttrSet;
+ delete pOldAttrSet;
+
+ }
+
+ if( bNeedsUpdate )
+ GetEditSource()->UpdateData();
+ }
+
+ if( bUnknownProperty )
+ throw beans::UnknownPropertyException();
+ }
+}
+
+uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::getPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (uno::RuntimeException)
+{
+ return _getPropertyValues( aPropertyNames, -1 );
+}
+
+uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames, sal_Int32 nPara ) throw (uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ sal_Int32 nCount = aPropertyNames.getLength();
+
+
+ uno::Sequence< uno::Any > aValues( nCount );
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ SfxItemSet* pAttribs = NULL;
+ if( nPara != -1 )
+ pAttribs = pForwarder->GetParaAttribs( (USHORT)nPara ).Clone();
+ else
+ pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone();
+
+ pAttribs->ClearInvalidItems();
+
+ const OUString* pPropertyNames = aPropertyNames.getConstArray();
+ uno::Any* pValues = aValues.getArray();
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMap();
+
+ for( ; nCount; nCount--, pPropertyNames++, pValues++ )
+ {
+ pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ if( NULL == pMap )
+ throw beans::UnknownPropertyException();
+
+ getPropertyValue( pMap, *pValues, *pAttribs );
+
+ if (pMap)
+ pMap++;
+ else
+ pMap = aPropSet.getPropertyMap();
+ }
+
+ delete pAttribs;
+
+ }
+
+ return aValues;
+}
+
+void SAL_CALL SvxUnoTextRangeBase::addPropertiesChangeListener( const uno::Sequence< ::rtl::OUString >& aPropertyNames, const uno::Reference< beans::XPropertiesChangeListener >& xListener ) throw (uno::RuntimeException)
+{
+}
+
+void SAL_CALL SvxUnoTextRangeBase::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& xListener ) throw (uno::RuntimeException)
+{
+}
+
+void SAL_CALL SvxUnoTextRangeBase::firePropertiesChangeEvent( const uno::Sequence< ::rtl::OUString >& aPropertyNames, const uno::Reference< beans::XPropertiesChangeListener >& xListener ) throw (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 )
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if ( pMap )
+ {
+ 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( (USHORT)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( (USHORT)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:
+ }
+ }
+ }
+ 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();
+
+
+
+ const sal_Bool bPara = nPara != -1;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ SfxItemSet* pSet = NULL;
+ if( nPara != -1 )
+ {
+ const SfxItemSet aSet( pForwarder->GetParaAttribs( (USHORT)nPara ) );
+ pSet = new SfxItemSet( aSet );
+ }
+ else
+ {
+ ESelection aSel( GetSelection() );
+ CheckSelection( aSel, pForwarder );
+ const SfxItemSet aSet(pForwarder->GetAttribs( aSel, EditEngineAttribs_OnlyHard ) );
+ pSet = new SfxItemSet( aSet );
+ }
+
+ sal_Bool bUnknownPropertyFound = sal_False;
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMap();
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
+ {
+ pMap = SfxItemPropertyMap::GetByName(pMap, *pNames++ );
+ if( NULL == pMap )
+ {
+ bUnknownPropertyFound = sal_True;
+ break;
+ }
+
+ SfxItemState eItemState = SFX_ITEM_UNKNOWN;
+ sal_uInt16 nWID = 0;
+
+ switch( pMap->nWID )
+ {
+ case WID_FONTDESC:
+ {
+ sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
+ SfxItemState eTempItemState;
+ while( *pWhichId )
+ {
+ eTempItemState = pSet->GetItemState( *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:
+ bUnknownPropertyFound = sal_True;
+ break;
+ }
+
+ pWhichId++;
+ }
+ }
+ break;
+
+ case WID_NUMLEVEL:
+ eItemState = SFX_ITEM_SET;
+ break;
+
+ default:
+ nWID = pMap->nWID;
+ }
+
+ if( bUnknownPropertyFound )
+ break;
+
+ if( nWID != 0 )
+ eItemState = pSet->GetItemState( nWID, sal_False );
+
+ switch( eItemState )
+ {
+ case SFX_ITEM_READONLY:
+ case SFX_ITEM_SET:
+ *pState++ = beans::PropertyState_DIRECT_VALUE;
+ break;
+ case SFX_ITEM_DEFAULT:
+ *pState++ = beans::PropertyState_DEFAULT_VALUE;
+ break;
+// case SFX_ITEM_UNKNOWN:
+// case SFX_ITEM_DONTCARE:
+// case SFX_ITEM_DISABLED:
+ default:
+ *pState++ = beans::PropertyState_AMBIGUOUS_VALUE;
+ }
+
+ if (pMap)
+ pMap++;
+ else
+ pMap = aPropSet.getPropertyMap();
+ }
+
+ delete pSet;
+
+ if( bUnknownPropertyFound )
+ throw beans::UnknownPropertyException();
+ }
+
+ 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 )
+{
+ SolarMutexGuard aGuard;
+
+ do
+ {
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+
+ if( NULL == pForwarder )
+ break;
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if( NULL == pMap )
+ break;
+
+ SfxItemSet aSet( *pForwarder->GetPool(), TRUE );
+
+ if( pMap->nWID == WID_FONTDESC )
+ {
+ SvxUnoFontDescriptor::setPropertyToDefault( aSet );
+ }
+ else if( pMap->nWID == WID_NUMLEVEL )
+ {
+ // #101004# Call interface method instead of unsafe cast
+ pForwarder->SetDepth( aSelection.nStartPara, 0 );
+ return;
+ }
+ else
+ {
+ aSet.InvalidateItem( pMap->nWID );
+ }
+
+ if(nPara != -1)
+ pForwarder->SetParaAttribs( (USHORT)nPara, aSet );
+ else
+ pForwarder->QuickSetAttribs( aSet, GetSelection() );
+
+ GetEditSource()->UpdateData();
+
+ return;
+ }
+ while(0);
+
+ throw beans::UnknownPropertyException();
+}
+
+uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aPropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), aPropertyName );
+ if( pMap )
+ {
+ 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))
+ {
+ SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID);
+ aSet.Put(pPool->GetDefaultItem(pMap->nWID));
+ return aPropSet.getPropertyValue(pMap, aSet);
+ }
+ }
+ }
+ }
+ }
+ throw beans::UnknownPropertyException();
+}
+
+// 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()
+{
+ SvxTextForwarder* pForwarder = pEditSource ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ CheckSelection( aSelection, pForwarder );
+
+
+ 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;
+ }
+ return sal_False;
+}
+
+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 ? pEditSource->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+
+ 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, 3, "com.sun.star.style.CharacterProperties",
+ "com.sun.star.style.CharacterPropertiesComplex",
+ "com.sun.star.style.CharacterPropertiesAsian");
+ return aSeq;
+}
+
+
+// ====================================================================
+// class SvxUnoTextRange
+// ====================================================================
+
+uno::Sequence< uno::Type > SvxUnoTextRange::maTypeSequence;
+
+SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion /* = sal_False */ ) throw()
+:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionPropertyMap() : rParent.getPropertyMap() ),
+ mbPortion( bPortion )
+{
+ 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 if( rType == ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )
+ aAny <<= uno::Reference< beans::XPropertySet >(this);
+ else QUERYINT( beans::XPropertyState );
+ else if( rType == ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0) )
+ aAny <<= uno::Reference< beans::XMultiPropertySet >(this);
+ 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( )
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoTextRange::release()
+ throw( )
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextRange::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< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)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 > SvxUnoTextBase::maTypeSequence;
+
+SvxUnoTextBase::SvxUnoTextBase( const SfxItemPropertyMap* _pMap ) throw()
+: SvxUnoTextRangeBase( _pMap )
+{
+}
+
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextRangeBase( pSource, _pMap )
+{
+ xParentText = xParent;
+ ESelection aSelection;
+ ::binfilter::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );//STRIP008 ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+}
+
+SvxUnoTextBase::SvxUnoTextBase( const SvxUnoTextBase& rText ) throw()
+:SvxUnoTextRangeBase( rText )
+{
+ xParentText = rText.xParentText;
+}
+
+SvxUnoTextBase::~SvxUnoTextBase() throw()
+{
+}
+
+sal_Bool SvxUnoTextBase::queryAggregation( const uno::Type & rType, 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::XMultiPropertySet );
+ else QUERYINT( beans::XPropertyState );
+ else QUERYINT( lang::XServiceInfo );
+ else QUERYINT( text::XTextRangeMover );
+ else QUERYINT( lang::XTypeProvider );
+ else QUERYINT( lang::XUnoTunnel );
+ else
+ return sal_False;
+
+ return sal_True;
+}
+
+// XInterface
+uno::Any SAL_CALL SvxUnoTextBase::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+ queryAggregation( rType, aAny );
+ return aAny;
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextBase::getStaticTypes() throw()
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence.realloc( 9 ); // !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::XMultiPropertySet >*)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 SvxUnoTextBase::getTypes()
+ throw (uno::RuntimeException)
+{
+ return getStaticTypes();
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextBase::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 SvxUnoTextBase::createTextCursor()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ return new SvxUnoTextCursor( *this );
+}
+
+uno::Reference< text::XTextCursor > SAL_CALL SvxUnoTextBase::createTextCursorByRange( const uno::Reference< text::XTextRange >& aTextPosition )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ 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 SvxUnoTextBase::insertString( const uno::Reference< text::XTextRange >& xRange, const OUString& aString, sal_Bool bAbsorb )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if( !xRange.is() )
+ return;
+
+ ESelection aSelection;
+ ::binfilter::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );//STRIP008 ::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 );
+
+ pRange->CollapseToEnd();
+ }
+}
+
+void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL;
+
+ if( pForwarder )
+ {
+ ESelection aSelection;
+ ::binfilter::GetSelection( aSelection, pForwarder );//STRIP008 ::GetSelection( aSelection, pForwarder );
+ SetSelection( aSelection );
+
+ switch( nControlCharacter )
+ {
+ case text::ControlCharacter::PARAGRAPH_BREAK:
+ {
+ const String aText( (char)13, 1 ); // '\r' geht auf'm Mac nicht
+ insertString( xRange, aText, bAbsorb );
+
+ return;
+ }
+ case text::ControlCharacter::LINE_BREAK:
+ {
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRange::getImplementation( xRange );
+ if(pRange)
+ {
+ ESelection aRange = pRange->GetSelection();
+
+ if( bAbsorb )
+ {
+ const String aEmpty;
+ pForwarder->QuickInsertText( aEmpty, aRange );
+
+ aRange.nEndPos = aRange.nStartPos;
+ aRange.nEndPara = aRange.nStartPara;
+ }
+ else
+ {
+ aRange.nStartPos = aRange.nEndPos;
+ aRange.nStartPara = aRange.nStartPara;
+ }
+
+ pForwarder->QuickInsertLineBreak( aRange );
+ GetEditSource()->UpdateData();
+
+ aRange.nEndPos += 1;
+ if( !bAbsorb )
+ aRange.nStartPos += 1;
+
+ pRange->SetSelection( aRange );
+ }
+ return;
+ }
+ case text::ControlCharacter::APPEND_PARAGRAPH:
+ {
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRange::getImplementation( xRange );
+ if(pRange)
+ {
+ ESelection aRange = pRange->GetSelection();
+// ESelection aOldSelection = aRange;
+
+ aRange.nStartPos = pForwarder->GetTextLen( aRange.nStartPara );
+
+ aRange.nEndPara = aRange.nStartPara;
+ aRange.nEndPos = aRange.nStartPos;
+
+ pRange->SetSelection( aRange );
+ const String aText( (char)13, 1 ); // '\r' geht auf'm Mac nicht
+ pRange->setString( aText );
+
+ aRange.nStartPos = 0;
+ aRange.nStartPara += 1;
+ aRange.nEndPos = 0;
+ aRange.nEndPara += 1;
+
+ pRange->SetSelection( aRange );
+
+ return;
+ }
+ }
+ }
+ }
+
+ throw lang::IllegalArgumentException();
+}
+
+// XText
+void SAL_CALL SvxUnoTextBase::insertTextContent( const uno::Reference< text::XTextRange >& xRange, const uno::Reference< text::XTextContent >& xContent, sal_Bool bAbsorb )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRange::getImplementation( xRange );
+ SvxUnoTextField* pField = SvxUnoTextField::getImplementation( xContent );
+
+ if( pRange == NULL || pField == NULL )
+ throw lang::IllegalArgumentException();
+
+ ESelection aSelection = pRange->GetSelection();
+ if( !bAbsorb )
+ {
+ aSelection.nStartPara = aSelection.nEndPara;
+ aSelection.nStartPos = aSelection.nEndPos;
+ }
+
+ SvxFieldData* pFieldData = pField->CreateFieldData();
+ if( pField == NULL )
+ throw lang::IllegalArgumentException();
+
+ SvxFieldItem aField( *pFieldData );
+ pForwarder->QuickInsertField( aField, aSelection );
+ GetEditSource()->UpdateData();
+
+ pField->SetAnchor( uno::Reference< text::XTextRange >::query( (cppu::OWeakObject*)this ) );
+
+ aSelection.nEndPos += 1;
+ aSelection.nStartPos = aSelection.nEndPos;
+ pRange->SetSelection( aSelection );
+
+ delete pFieldData;
+ }
+}
+
+void SAL_CALL SvxUnoTextBase::removeTextContent( const uno::Reference< text::XTextContent >& xContent ) throw(container::NoSuchElementException, uno::RuntimeException)
+{
+}
+
+// XTextRange
+
+uno::Reference< text::XText > SAL_CALL SvxUnoTextBase::getText()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ ESelection aSelection;
+ ::binfilter::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );//STRIP008 ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ ((SvxUnoTextBase*)this)->SetSelection( aSelection );
+
+ return (text::XText*)this;
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::getStart()
+ throw(uno::RuntimeException)
+{
+ return SvxUnoTextRangeBase::getStart();
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::getEnd()
+ throw(uno::RuntimeException)
+{
+ return SvxUnoTextRangeBase::getEnd();
+}
+
+OUString SAL_CALL SvxUnoTextBase::getString() throw( uno::RuntimeException )
+{
+ return SvxUnoTextRangeBase::getString();
+}
+
+void SAL_CALL SvxUnoTextBase::setString( const OUString& aString ) throw(uno::RuntimeException)
+{
+ SvxUnoTextRangeBase::setString(aString);
+}
+
+
+// XEnumerationAccess
+uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextBase::createEnumeration()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ ESelection aSelection;
+ ::binfilter::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );//STRIP008 ::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 SvxUnoTextBase::getElementType( ) throw(uno::RuntimeException)
+{
+ return ::getCppuType((const uno::Reference< text::XTextRange >*)0 );
+}
+
+sal_Bool SAL_CALL SvxUnoTextBase::hasElements( ) throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if(GetEditSource())
+ {
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ if(pForwarder)
+ return pForwarder->GetParagraphCount() != 0;
+ }
+
+ return sal_False;
+}
+
+// text::XTextRangeMover
+void SAL_CALL SvxUnoTextBase::moveTextRange( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nParagraphs )
+ throw(uno::RuntimeException)
+{
+}
+
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoTextBase::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextBase"));
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTextBase::getSupportedServiceNames( )
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.text.Text" );
+ return aSeq;
+}
+
+const uno::Sequence< sal_Int8 > & SvxUnoTextBase::getUnoTunnelId() throw()
+{
+ static uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+SvxUnoTextBase* SvxUnoTextBase::getImplementation( const uno::Reference< uno::XInterface >& xInt )
+{
+ uno::Reference< lang::XUnoTunnel > xUT( xInt, uno::UNO_QUERY );
+ if( xUT.is() )
+ return (SvxUnoTextBase*)xUT->getSomething( SvxUnoTextBase::getUnoTunnelId() );
+ else
+ return NULL;
+}
+
+sal_Int64 SAL_CALL SvxUnoTextBase::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw(uno::RuntimeException) \
+{
+ if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return (sal_Int64)this;
+ }
+ else
+ {
+ return SvxUnoTextRangeBase::getSomething( rId );
+ }
+}
+
+// --------------------------------------------------------------------
+
+SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextBase( pSource, _pMap, xParent )
+{
+}
+
+SvxUnoText::SvxUnoText( const SvxUnoText& rText ) throw()
+: SvxUnoTextBase( rText )
+{
+}
+
+SvxUnoText::~SvxUnoText() throw()
+{
+}
+
+// uno::XInterface
+uno::Any SAL_CALL SvxUnoText::queryAggregation( const uno::Type & rType ) throw( uno::RuntimeException )
+{
+ uno::Any aAny( SvxUnoTextBase::queryAggregation( rType ) );
+ if( !aAny.hasValue() )
+ aAny = 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( )
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoText::release() throw( )
+{
+ OWeakAggObject::release();
+}
+
+// lang::XTypeProvider
+uno::Sequence< uno::Type > SAL_CALL SvxUnoText::getTypes( ) throw( uno::RuntimeException )
+{
+ return SvxUnoTextBase::getTypes();
+}
+
+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;
+}
+
+const uno::Sequence< sal_Int8 > & SvxUnoText::getUnoTunnelId() throw()
+{
+ static uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+sal_Int64 SAL_CALL SvxUnoText::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw(uno::RuntimeException) \
+{
+ if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return (sal_Int64)this;
+ }
+ else
+ {
+ return SvxUnoTextBase::getSomething( rId );
+ }
+}
+
+
+// --------------------------------------------------------------------
+
+SvxDummyTextSource::~SvxDummyTextSource()
+{
+};
+
+SvxEditSource* SvxDummyTextSource::Clone() const
+{
+ return new SvxDummyTextSource();
+}
+
+SvxTextForwarder* SvxDummyTextSource::GetTextForwarder()
+{
+ return this;
+}
+
+void SvxDummyTextSource::UpdateData()
+{
+}
+
+sal_uInt16 SvxDummyTextSource::GetParagraphCount() const
+{
+ return 0;
+}
+
+sal_uInt16 SvxDummyTextSource::GetTextLen( sal_uInt16 nParagraph ) const
+{
+ return 0;
+}
+
+String SvxDummyTextSource::GetText( const ESelection& rSel ) const
+{
+ return String();
+}
+
+SfxItemSet SvxDummyTextSource::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+{
+ String aDummyStr(RTL_CONSTASCII_USTRINGPARAM("Dummy"));
+ SfxItemPool aPool(aDummyStr,0,0,NULL);
+ return SfxItemSet(aPool);
+}
+
+SfxItemSet SvxDummyTextSource::GetParaAttribs( sal_uInt16 nPara ) const
+{
+ return GetAttribs(ESelection());
+}
+
+void SvxDummyTextSource::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
+{
+}
+
+void SvxDummyTextSource::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
+{
+}
+
+sal_uInt16 SvxDummyTextSource::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
+{
+ return 0;
+}
+
+sal_uInt16 SvxDummyTextSource::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
+{
+ return 0;
+}
+
+SfxItemPool* SvxDummyTextSource::GetPool() const
+{
+ return NULL;
+}
+
+void SvxDummyTextSource::QuickInsertText( const String& rText, const ESelection& rSel )
+{
+}
+
+void SvxDummyTextSource::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+}
+
+void SvxDummyTextSource::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+}
+
+void SvxDummyTextSource::QuickInsertLineBreak( const ESelection& rSel )
+{
+};
+
+XubString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ return XubString();
+}
+
+sal_Bool SvxDummyTextSource::IsValid() const
+{
+ return sal_False;
+}
+
+void SvxDummyTextSource::SetNotifyHdl( const Link& )
+{
+}
+
+LanguageType SvxDummyTextSource::GetLanguage( USHORT nPara, USHORT nIndex ) const
+{
+ return LANGUAGE_DONTKNOW;
+}
+
+USHORT SvxDummyTextSource::GetFieldCount( USHORT nPara ) const
+{
+ return 0;
+}
+
+EFieldInfo SvxDummyTextSource::GetFieldInfo( USHORT nPara, USHORT nField ) const
+{
+ return EFieldInfo();
+}
+
+EBulletInfo SvxDummyTextSource::GetBulletInfo( USHORT nPara ) const
+{
+ return EBulletInfo();
+}
+
+Rectangle SvxDummyTextSource::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+{
+ return Rectangle();
+}
+
+Rectangle SvxDummyTextSource::GetParaBounds( USHORT nPara ) const
+{
+ return Rectangle();
+}
+
+MapMode SvxDummyTextSource::GetMapMode() const
+{
+ return MapMode();
+}
+
+OutputDevice* SvxDummyTextSource::GetRefDevice() const
+{
+ return NULL;
+}
+
+sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const
+{
+ return sal_False;
+}
+
+sal_Bool SvxDummyTextSource::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+{
+ return sal_False;
+}
+
+sal_Bool SvxDummyTextSource::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+{
+ return sal_False;
+}
+
+USHORT SvxDummyTextSource::GetLineCount( USHORT nPara ) const
+{
+ return 0;
+}
+
+USHORT SvxDummyTextSource::GetLineLen( USHORT nPara, USHORT nLine ) const
+{
+ return 0;
+}
+
+sal_Bool SvxDummyTextSource::QuickFormatDoc( BOOL bFull )
+{
+ return sal_False;
+}
+
+USHORT SvxDummyTextSource::GetDepth( USHORT nPara ) const
+{
+ return 0;
+}
+
+sal_Bool SvxDummyTextSource::SetDepth( USHORT nPara, USHORT nNewDepth )
+{
+ return nNewDepth == 0 ? sal_True : sal_False;
+}
+
+sal_Bool SvxDummyTextSource::Delete( const ESelection& )
+{
+ return sal_False;
+}
+
+sal_Bool SvxDummyTextSource::InsertText( const String&, const ESelection& )
+{
+ return sal_False;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unotext2.cxx b/binfilter/bf_svx/source/unoedit/svx_unotext2.cxx
new file mode 100644
index 000000000000..a969e917609f
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unotext2.cxx
@@ -0,0 +1,635 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <vcl/svapp.hxx>
+#include <osl/mutex.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <bf_svtools/svstdarr.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include <eeitem.hxx>
+
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+
+#include <bf_svtools/poolitem.hxx>
+
+#include <bf_svx/itemdata.hxx>
+
+#include "unotext.hxx"
+namespace binfilter {
+
+using namespace ::rtl;
+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 SvxUnoTextBase& _rText ) throw()
+: rText( _rText )
+{
+ xParentText = const_cast<SvxUnoTextBase*>(&rText);
+ if( rText.GetEditSource() )
+ pEditSource = rText.GetEditSource()->Clone();
+ else
+ pEditSource = NULL;
+ nNextParagraph = 0;
+}
+
+SvxUnoTextContentEnumeration::~SvxUnoTextContentEnumeration() throw()
+{
+ delete pEditSource;
+}
+
+// container::XEnumeration
+sal_Bool SAL_CALL SvxUnoTextContentEnumeration::hasMoreElements(void)
+ throw( uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+ return nNextParagraph < pEditSource->GetTextForwarder()->GetParagraphCount();
+}
+
+uno::Any SvxUnoTextContentEnumeration::nextElement(void) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SolarMutexGuard aGuard;
+
+ 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;
+
+SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw()
+: SvxUnoTextRangeBase(rText),rParentText(rText),
+ aDisposeListeners(aDisposeContainerMutex),
+ nParagraph(nPara),
+ bDisposing( sal_False )
+{
+ xParentText = const_cast<SvxUnoTextBase*>(&rText);
+ SetSelection( ESelection( nParagraph,0, nParagraph, GetEditSource()->GetTextForwarder()->GetTextLen( nParagraph ) ) );
+}
+
+SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextContent& rContent ) throw()
+: SvxUnoTextRangeBase(rContent),
+ aDisposeListeners(aDisposeContainerMutex),
+ rParentText(rContent.rParentText),
+ bDisposing( sal_False )
+{
+ 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::XMultiPropertySet );
+ 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( )
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoTextContent::release() throw( )
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextContent::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence.realloc( 9 ); // !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::XMultiPropertySet >*)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 >::query( xParentText );
+}
+
+// XComponent
+
+void SAL_CALL SvxUnoTextContent::dispose()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if( bDisposing )
+ return; // catched a recursion
+
+ bDisposing = sal_True;
+
+ lang::EventObject aEvt;
+ aEvt.Source = *(OWeakAggObject*) this;
+ aDisposeListeners.disposeAndClear(aEvt);
+
+ if( xParentText.is() )
+ xParentText->removeTextContent( this );
+}
+
+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)
+{
+ SolarMutexGuard aGuard;
+
+ 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)
+{
+ SolarMutexGuard aGuard;
+
+ SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL;
+ if( pForwarder )
+ {
+ SvUShorts aPortions;
+ pForwarder->GetPortions( nParagraph, aPortions );
+ return aPortions.Count() > 0;
+ }
+ else
+ {
+ return 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 );
+}
+
+// XMultiPropertySet
+void SAL_CALL SvxUnoTextContent::setPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues ) throw (beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ _setPropertyValues( aPropertyNames, aValues, nParagraph );
+}
+
+uno::Sequence< uno::Any > SAL_CALL SvxUnoTextContent::getPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (uno::RuntimeException)
+{
+ return _getPropertyValues( aPropertyNames, 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, 5, "com.sun.star.style.ParagraphProperties",
+ "com.sun.star.style.ParagraphPropertiesComplex",
+ "com.sun.star.style.ParagraphPropertiesAsian",
+ "com.sun.star.text.TextContent",
+ "com.sun.star.text.Paragraph");
+ return aSeq;
+}
+
+// ====================================================================
+// class SvxUnoTextRangeEnumeration
+// ====================================================================
+
+SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw()
+: xParentText( const_cast<SvxUnoTextBase*>(&rText) ),
+ rParentText( rText ),
+ nParagraph( nPara ),
+ nNextPortion( 0 )
+{
+ pEditSource = rText.GetEditSource() ? rText.GetEditSource()->Clone() : NULL;
+
+ if( pEditSource && pEditSource->GetTextForwarder() )
+ {
+ pPortions = new SvUShorts;
+ pEditSource->GetTextForwarder()->GetPortions( nPara, *pPortions );
+ }
+ else
+ {
+ pPortions = NULL;
+ }
+}
+
+SvxUnoTextRangeEnumeration::~SvxUnoTextRangeEnumeration() throw()
+{
+ delete pEditSource;
+ delete pPortions;
+}
+
+// container::XEnumeration
+
+sal_Bool SAL_CALL SvxUnoTextRangeEnumeration::hasMoreElements()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ return pPortions ? nNextPortion < pPortions->Count() : 0;
+}
+
+uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement()
+ throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+
+ if( pPortions == NULL || 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();
+
+ SvxUnoTextRange* pRange = new SvxUnoTextRange( rParentText, sal_True );
+ 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;
+
+SvxUnoTextCursor::SvxUnoTextCursor( const SvxUnoTextBase& rText ) throw()
+: SvxUnoTextRangeBase(rText),
+ xParentText( const_cast<SvxUnoTextBase*>(&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::XMultiPropertySet );
+ 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 ( )
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoTextCursor::release() throw ( )
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextCursor::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< text::XTextCursor >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)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)
+{
+ SolarMutexGuard aGuard;
+ CollapseToStart();
+}
+
+void SAL_CALL SvxUnoTextCursor::collapseToEnd()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ CollapseToEnd();
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::isCollapsed()
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ return IsCollapsed();
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::goLeft( sal_Int16 nCount, sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ return GoLeft( nCount, bExpand );
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::goRight( sal_Int16 nCount, sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ return GoRight( nCount, bExpand );
+}
+
+void SAL_CALL SvxUnoTextCursor::gotoStart( sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ GotoStart( bExpand );
+}
+
+void SAL_CALL SvxUnoTextCursor::gotoEnd( sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ 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("SvxUnoTextCursor"));
+}
+
+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, 4,"com.sun.star.style.ParagraphProperties",
+ "com.sun.star.style.ParagraphPropertiesComplex",
+ "com.sun.star.style.ParagraphPropertiesAsian",
+ "com.sun.star.text.TextCursor");
+ return aSeq;
+}
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoviwed.cxx b/binfilter/bf_svx/source/unoedit/svx_unoviwed.cxx
new file mode 100644
index 000000000000..e28b4201b964
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoviwed.cxx
@@ -0,0 +1,135 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#include "unoviwed.hxx"
+#include "editview.hxx"
+#include "editeng.hxx"
+#include "svdotext.hxx"
+namespace binfilter {
+
+SvxEditEngineViewForwarder::~SvxEditEngineViewForwarder()
+{
+}
+
+BOOL SvxEditEngineViewForwarder::IsValid() const
+{
+ return sal_True;
+}
+
+Rectangle SvxEditEngineViewForwarder::GetVisArea() const
+{
+ OutputDevice* pOutDev = mrView.GetWindow();
+
+ if( pOutDev )
+ {
+ Rectangle aVisArea = mrView.GetVisArea();
+
+ // figure out map mode from edit engine
+ EditEngine* pEditEngine = mrView.GetEditEngine();
+
+ if( pEditEngine )
+ {
+ MapMode aMapMode(pOutDev->GetMapMode());
+ aVisArea = OutputDevice::LogicToLogic( aVisArea,
+ pEditEngine->GetRefMapMode(),
+ aMapMode.GetMapUnit() );
+ aMapMode.SetOrigin(Point());
+ return pOutDev->LogicToPixel( aVisArea, aMapMode );
+ }
+ }
+
+ return Rectangle();
+}
+
+Point SvxEditEngineViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ OutputDevice* pOutDev = mrView.GetWindow();
+
+ if( pOutDev )
+ {
+ MapMode aMapMode(pOutDev->GetMapMode());
+ Point aPoint( OutputDevice::LogicToLogic( rPoint, rMapMode,
+ aMapMode.GetMapUnit() ) );
+ aMapMode.SetOrigin(Point());
+ return pOutDev->LogicToPixel( aPoint, aMapMode );
+ }
+
+ return Point();
+}
+
+Point SvxEditEngineViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ OutputDevice* pOutDev = mrView.GetWindow();
+
+ if( pOutDev )
+ {
+ MapMode aMapMode(pOutDev->GetMapMode());
+ aMapMode.SetOrigin(Point());
+ Point aPoint( pOutDev->PixelToLogic( rPoint, aMapMode ) );
+ return OutputDevice::LogicToLogic( aPoint,
+ aMapMode.GetMapUnit(),
+ rMapMode );
+ }
+
+ return Point();
+}
+
+sal_Bool SvxEditEngineViewForwarder::GetSelection( ESelection& rSelection ) const
+{
+ rSelection = mrView.GetSelection();
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineViewForwarder::SetSelection( const ESelection& rSelection )
+{
+ mrView.SetSelection( rSelection );
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineViewForwarder::Copy()
+{
+ mrView.Copy();
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineViewForwarder::Cut()
+{
+ mrView.Cut();
+ return sal_True;
+}
+
+sal_Bool SvxEditEngineViewForwarder::Paste()
+{
+ mrView.Paste();
+ return sal_True;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/unoedit/svx_unoviwou.cxx b/binfilter/bf_svx/source/unoedit/svx_unoviwou.cxx
new file mode 100644
index 000000000000..b66899a365f7
--- /dev/null
+++ b/binfilter/bf_svx/source/unoedit/svx_unoviwou.cxx
@@ -0,0 +1,167 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+
+#include "unoviwou.hxx"
+#include "outliner.hxx"
+#include "svdotext.hxx"
+namespace binfilter {
+
+
+SvxDrawOutlinerViewForwarder::SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft ) :
+ mrOutlinerView ( rOutl ), maTextShapeTopLeft( rShapePosTopLeft )
+{
+}
+
+SvxDrawOutlinerViewForwarder::~SvxDrawOutlinerViewForwarder()
+{
+}
+
+Point SvxDrawOutlinerViewForwarder::GetTextOffset() const
+{
+ // #101029# calc text offset from shape anchor
+ Rectangle aOutputRect( mrOutlinerView.GetOutputArea() );
+
+ return aOutputRect.TopLeft() - maTextShapeTopLeft;
+}
+
+BOOL SvxDrawOutlinerViewForwarder::IsValid() const
+{
+ return sal_True;
+}
+
+Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const
+{
+ OutputDevice* pOutDev = mrOutlinerView.GetWindow();
+
+ if( pOutDev )
+ {
+ Rectangle aVisArea = mrOutlinerView.GetVisArea();
+
+ // #101029#
+ Point aTextOffset( GetTextOffset() );
+ aVisArea.Move( aTextOffset.X(), aTextOffset.Y() );
+
+ // figure out map mode from edit engine
+ Outliner* pOutliner = mrOutlinerView.GetOutliner();
+
+ if( pOutliner )
+ {
+ MapMode aMapMode(pOutDev->GetMapMode());
+ aVisArea = OutputDevice::LogicToLogic( aVisArea,
+ pOutliner->GetRefMapMode(),
+ aMapMode.GetMapUnit() );
+ aMapMode.SetOrigin(Point());
+ return pOutDev->LogicToPixel( aVisArea, aMapMode );
+ }
+ }
+
+ return Rectangle();
+}
+
+Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ OutputDevice* pOutDev = mrOutlinerView.GetWindow();
+
+ if( pOutDev )
+ {
+ Point aPoint1( rPoint );
+ Point aTextOffset( GetTextOffset() );
+
+ // #101029#
+ aPoint1.X() += aTextOffset.X();
+ aPoint1.Y() += aTextOffset.Y();
+
+ MapMode aMapMode(pOutDev->GetMapMode());
+ Point aPoint2( OutputDevice::LogicToLogic( aPoint1, rMapMode,
+ aMapMode.GetMapUnit() ) );
+ aMapMode.SetOrigin(Point());
+ return pOutDev->LogicToPixel( aPoint2, aMapMode );
+ }
+
+ return Point();
+}
+
+Point SvxDrawOutlinerViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
+{
+ OutputDevice* pOutDev = mrOutlinerView.GetWindow();
+
+ if( pOutDev )
+ {
+ MapMode aMapMode(pOutDev->GetMapMode());
+ aMapMode.SetOrigin(Point());
+ Point aPoint1( pOutDev->PixelToLogic( rPoint, aMapMode ) );
+ Point aPoint2( OutputDevice::LogicToLogic( aPoint1,
+ aMapMode.GetMapUnit(),
+ rMapMode ) );
+ // #101029#
+ Point aTextOffset( GetTextOffset() );
+
+ aPoint2.X() -= aTextOffset.X();
+ aPoint2.Y() -= aTextOffset.Y();
+
+ return aPoint2;
+ }
+
+ return Point();
+}
+
+sal_Bool SvxDrawOutlinerViewForwarder::GetSelection( ESelection& rSelection ) const
+{
+ rSelection = mrOutlinerView.GetSelection();
+ return sal_True;
+}
+
+sal_Bool SvxDrawOutlinerViewForwarder::SetSelection( const ESelection& rSelection )
+{
+ mrOutlinerView.SetSelection( rSelection );
+ return sal_True;
+}
+
+sal_Bool SvxDrawOutlinerViewForwarder::Copy()
+{
+ mrOutlinerView.Copy();
+ return sal_True;
+}
+
+sal_Bool SvxDrawOutlinerViewForwarder::Cut()
+{
+ mrOutlinerView.Cut();
+ return sal_True;
+}
+
+sal_Bool SvxDrawOutlinerViewForwarder::Paste()
+{
+ mrOutlinerView.Paste();
+ return sal_True;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/editsource.hxx b/binfilter/bf_svx/source/xml/editsource.hxx
new file mode 100644
index 000000000000..08369816985b
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/editsource.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_EDITSOURCE_HXX
+#define _SVX_EDITSOURCE_HXX
+
+#include <unoedsrc.hxx>
+namespace binfilter {
+
+class EditEngine;
+class SvxEditEngineSourceImpl;
+
+class SvxEditEngineSource : public SvxEditSource
+{
+public:
+ virtual ~SvxEditEngineSource();
+
+ virtual SvxEditSource* Clone() const;
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual void UpdateData();
+
+private:
+ SvxEditEngineSource( SvxEditEngineSourceImpl* pImpl );
+
+ SvxEditEngineSourceImpl* mpImpl;
+};
+
+}//end of namespace binfilter
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/makefile.mk b/binfilter/bf_svx/source/xml/makefile.mk
new file mode 100644
index 000000000000..d272c8551318
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/makefile.mk
@@ -0,0 +1,57 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+TARGET=svx_xml
+
+NO_HIDS=TRUE
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+
+# --- Files --------------------------------------------------------
+SLOFILES = \
+ $(SLO)$/svx_xmltxtimp.obj \
+ $(SLO)$/svx_xmltxtexp.obj \
+ $(SLO)$/svx_xmlxtimp.obj \
+ $(SLO)$/svx_xmlxtexp.obj \
+ $(SLO)$/svx_xmlgrhlp.obj \
+ $(SLO)$/svx_xmleohlp.obj
+
+# --- Targets --------------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx b/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx
new file mode 100644
index 000000000000..f9c56e1201ec
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/svx_xmleohlp.cxx
@@ -0,0 +1,733 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+
+#include <tools/debug.hxx>
+#include <unotools/streamwrap.hxx>
+#include <unotools/tempfile.hxx>
+
+#include <comphelper/classids.hxx>
+#include <bf_so3/embobj.hxx>
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+
+#include <map>
+
+#include "xmleohlp.hxx"
+namespace binfilter {
+
+// -----------
+// - Defines -
+// -----------
+
+using namespace ::rtl;
+using namespace ::osl;
+using namespace ::cppu;
+using namespace ::utl;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+
+#define XML_CONTAINERSTORAGE_NAME "Objects"
+#define XML_EMBEDDEDOBJECT_URL_BASE "vnd.sun.star.EmbeddedObject:"
+
+// -----------------------------------------------------------------------------
+
+class InputStorageWrapper_Impl : public ::cppu::WeakImplHelper1<stario::XInputStream>
+{
+ ::osl::Mutex maMutex;
+ SvStorageRef xStor;
+ Reference < XInputStream > xIn;
+ TempFile aTempFile;
+
+public:
+ InputStorageWrapper_Impl( SvPersist *pPersist );
+ virtual ~InputStorageWrapper_Impl();
+
+ virtual sal_Int32 SAL_CALL readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
+ virtual sal_Int32 SAL_CALL readSomeBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
+ virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
+ virtual sal_Int32 SAL_CALL available() throw(stario::NotConnectedException, staruno::RuntimeException);
+ virtual void SAL_CALL closeInput() throw(stario::NotConnectedException, staruno::RuntimeException);
+};
+
+
+/*N*/ InputStorageWrapper_Impl::InputStorageWrapper_Impl(
+/*N*/ SvPersist *pPersist )
+/*N*/ {
+/*N*/ SvStream *pStream = 0;
+/*N*/ aTempFile.EnableKillingFile();
+/*N*/ pStream = aTempFile.GetStream( STREAM_READWRITE );
+/*N*/ SvStorageRef aTempStor = new SvStorage( sal_False, *pStream );
+/*N*/ // the object should not be stored in 5.2 storage since the alien objects are stored in a wrapped way in this case
+/*N*/ aTempStor->SetVersion( SOFFICE_FILEFORMAT_31 );
+/*N*/ if( pPersist->DoSaveAs( aTempStor ) )
+/*N*/ {
+/*N*/ aTempStor->Commit();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ aTempStor.Clear();
+/*?*/ pStream = 0;
+/*N*/ }
+/*N*/
+/*N*/ if( pStream )
+/*N*/ {
+/*N*/ pStream->Seek( 0 );
+/*N*/ xIn = new OInputStreamWrapper( *pStream );
+/*N*/ }
+/*N*/ }
+
+/*N*/ InputStorageWrapper_Impl::~InputStorageWrapper_Impl()
+/*N*/ {
+/*N*/ xIn = 0;
+/*N*/ xStor = 0;
+/*N*/ }
+
+/*N*/ sal_Int32 SAL_CALL InputStorageWrapper_Impl::readBytes(
+/*N*/ Sequence< sal_Int8 >& aData,
+/*N*/ sal_Int32 nBytesToRead)
+/*N*/ throw(NotConnectedException, BufferSizeExceededException, RuntimeException)
+/*N*/ {
+/*N*/ MutexGuard aGuard( maMutex );
+/*N*/ return xIn->readBytes( aData, nBytesToRead );
+/*N*/ }
+
+/*?*/ sal_Int32 SAL_CALL InputStorageWrapper_Impl::readSomeBytes(
+/*?*/ Sequence< sal_Int8 >& aData,
+/*?*/ sal_Int32 nMaxBytesToRead)
+/*?*/ throw(NotConnectedException, BufferSizeExceededException, RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+/*?*/ void SAL_CALL InputStorageWrapper_Impl::skipBytes( sal_Int32 nBytesToSkip )
+/*?*/ throw(NotConnectedException, BufferSizeExceededException, RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+/*?*/ sal_Int32 SAL_CALL InputStorageWrapper_Impl::available()
+/*?*/ throw(NotConnectedException, RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+/*?*/ void SAL_CALL InputStorageWrapper_Impl::closeInput()
+/*?*/ throw(NotConnectedException, RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+class OutputStorageWrapper_Impl : public ::cppu::WeakImplHelper1<XOutputStream>
+{
+ ::osl::Mutex maMutex;
+ SvStorageRef xStor;
+ Reference < XOutputStream > xOut;
+ TempFile aTempFile;
+ sal_Bool bStreamClosed : 1;
+ sal_Bool bCreateStorageFailed : 1;
+
+public:
+ OutputStorageWrapper_Impl();
+ virtual ~OutputStorageWrapper_Impl();
+
+// stario::XOutputStream
+ virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData) throw(NotConnectedException, BufferSizeExceededException, RuntimeException);
+ virtual void SAL_CALL flush() throw(NotConnectedException, BufferSizeExceededException, RuntimeException);
+ virtual void SAL_CALL closeOutput() throw(NotConnectedException, BufferSizeExceededException, RuntimeException);
+
+ SvStorage *GetStorage();
+};
+
+/*N*/ OutputStorageWrapper_Impl::OutputStorageWrapper_Impl() :
+/*N*/ bStreamClosed( sal_False ),
+/*N*/ bCreateStorageFailed( sal_False )
+/*N*/ {
+/*N*/ aTempFile.EnableKillingFile();
+/*N*/ SvStream *pStream = aTempFile.GetStream( STREAM_READWRITE );
+/*N*/ xOut = new OOutputStreamWrapper( *pStream );
+/*N*/ }
+
+/*N*/ OutputStorageWrapper_Impl::~OutputStorageWrapper_Impl()
+/*N*/ {
+/*N*/ xStor = 0;
+/*N*/ xOut = 0;
+/*N*/ }
+
+/*N*/ SvStorage *OutputStorageWrapper_Impl::GetStorage()
+/*N*/ {
+/*N*/ if( !xStor )
+/*N*/ {
+/*N*/ if( bStreamClosed && !bCreateStorageFailed )
+/*N*/ {
+/*N*/ xStor = new SvStorage( *aTempFile.GetStream( STREAM_READWRITE ) );
+/*N*/ if( xStor->GetError() != 0 )
+/*N*/ {
+/*?*/ xStor = 0;
+/*?*/ bCreateStorageFailed = sal_True;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return xStor;
+/*N*/ }
+
+/*N*/ void SAL_CALL OutputStorageWrapper_Impl::writeBytes(
+/*N*/ const Sequence< sal_Int8 >& aData)
+/*N*/ throw(NotConnectedException, BufferSizeExceededException, RuntimeException)
+/*N*/ {
+/*N*/ MutexGuard aGuard( maMutex );
+/*N*/ xOut->writeBytes( aData );
+/*N*/ }
+
+/*?*/ void SAL_CALL OutputStorageWrapper_Impl::flush()
+/*?*/ throw(NotConnectedException, BufferSizeExceededException, RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+/*N*/ void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
+/*N*/ throw(NotConnectedException, BufferSizeExceededException, RuntimeException)
+/*N*/ {
+/*N*/ MutexGuard aGuard( maMutex );
+/*N*/ xOut->closeOutput();
+/*N*/ bStreamClosed = sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+struct OUStringLess
+{
+ bool operator() ( const ::rtl::OUString& r1, const ::rtl::OUString& r2 ) const
+ {
+ return (r1 < r2) != sal_False;
+ }
+};
+
+// -----------------------------------------------------------------------------
+
+// -----------------------------
+// - SvXMLEmbeddedObjectHelper -
+// -----------------------------
+
+/*N*/ SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
+/*N*/ WeakComponentImplHelper2< XEmbeddedObjectResolver, XNameAccess >( maMutex ),
+/*N*/ maDefaultContainerStorageName( RTL_CONSTASCII_USTRINGPARAM(XML_CONTAINERSTORAGE_NAME) ),
+/*N*/ mpRootStorage( 0 ),
+/*N*/ mpDocPersist( 0 ),
+/*N*/ mpStreamMap( 0 ),
+/*N*/ meCreateMode( EMBEDDEDOBJECTHELPER_MODE_READ )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper( SvPersist& rDocPersist, SvXMLEmbeddedObjectHelperMode eCreateMode ) :
+/*N*/ WeakComponentImplHelper2< XEmbeddedObjectResolver, XNameAccess >( maMutex ),
+/*N*/ maDefaultContainerStorageName( RTL_CONSTASCII_USTRINGPARAM(XML_CONTAINERSTORAGE_NAME) ),
+/*N*/ mpRootStorage( 0 ),
+/*N*/ mpDocPersist( 0 ),
+/*N*/ mpStreamMap( 0 ),
+/*N*/ meCreateMode( EMBEDDEDOBJECTHELPER_MODE_READ )
+/*N*/ {
+/*N*/ Init( 0, rDocPersist, eCreateMode );
+/*N*/ }
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLEmbeddedObjectHelper::~SvXMLEmbeddedObjectHelper()
+/*N*/ {
+/*N*/ if( mpStreamMap )
+/*N*/ {
+/*?*/ SvXMLEmbeddedObjectHelper_Impl::iterator aIter = mpStreamMap->begin();
+/*?*/ SvXMLEmbeddedObjectHelper_Impl::iterator aEnd = mpStreamMap->end();
+/*?*/ for( aIter; aIter != aEnd; aIter++ )
+/*?*/ {
+/*?*/ if( aIter->second )
+/*?*/ {
+/*?*/ aIter->second->release();
+/*?*/ aIter->second = 0;
+/*?*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SAL_CALL SvXMLEmbeddedObjectHelper::disposing()
+/*N*/ {
+/*N*/ Flush();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
+/*N*/ const OUString& rURLStr,
+/*N*/ OUString& rContainerStorageName,
+/*N*/ OUString& rObjectStorageName,
+/*N*/ sal_Bool bInternalToExternal ) const
+/*N*/ {
+/*N*/ // internal URL: vnd.sun.star.EmbeddedObject:<object-name>
+/*N*/ // or: vnd.sun.star.EmbeddedObject:<path>/<object-name>
+/*N*/ // external URL: #./<path>/<object-name>
+/*N*/ // or: #<path>/<object-name>
+/*N*/ // or: #<object-name>
+/*N*/ // currently, path may only consist of a single directory name
+/*N*/ sal_Bool bRet = sal_False;
+/*N*/
+/*N*/ if( !rURLStr.getLength() )
+/*N*/ return sal_False;
+/*N*/
+/*N*/ if( bInternalToExternal )
+/*N*/ {
+/*N*/ sal_Int32 nPos = rURLStr.indexOf( ':' );
+/*N*/ if( -1 == nPos ||
+/*N*/ 0 != rURLStr.compareToAscii( XML_EMBEDDEDOBJECT_URL_BASE,
+/*N*/ sizeof( XML_EMBEDDEDOBJECT_URL_BASE ) -1 ) )
+/*N*/ return sal_False;
+/*N*/
+/*N*/ sal_Int32 nPathStart = nPos + 1;
+/*N*/ nPos = rURLStr.lastIndexOf( '/' );
+/*N*/ if( -1 == nPos )
+/*N*/ {
+/*N*/ rContainerStorageName = OUString();
+/*N*/ rObjectStorageName = rURLStr.copy( nPathStart );
+/*N*/ }
+/*N*/ else if( nPos > nPathStart )
+/*N*/ {
+/*?*/ rContainerStorageName = rURLStr.copy( nPathStart, nPos-nPathStart);
+/*?*/ rObjectStorageName = rURLStr.copy( nPos+1 );
+/*N*/ }
+/*N*/ else
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if( '#' != rURLStr[0 ] )
+/*N*/ return sal_False;
+/*N*/
+/*N*/ sal_Int32 nPos = rURLStr.lastIndexOf( '/' );
+/*N*/ if( -1 == nPos )
+/*N*/ {
+/*N*/ rContainerStorageName = OUString();
+/*N*/ rObjectStorageName = rURLStr.copy( 1 );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ sal_Int32 nPathStart = 1;
+/*?*/ if( 0 == rURLStr.compareToAscii( "#./", 3 ) )
+/*?*/ nPathStart = 3;
+/*?*/ if( nPos >= nPathStart )
+/*?*/ rContainerStorageName = rURLStr.copy( nPathStart, nPos-nPathStart);
+/*?*/ rObjectStorageName = rURLStr.copy( nPos+1 );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( -1 != rContainerStorageName.indexOf( '/' ) )
+/*N*/ {
+/*?*/ DBG_ERROR( "SvXMLEmbeddedObjectHelper: invalid path name" );
+/*?*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvStorageRef SvXMLEmbeddedObjectHelper::ImplGetContainerStorage(
+/*N*/ const OUString& rStorageName )
+/*N*/ {
+/*N*/ DBG_ASSERT( -1 == rStorageName.indexOf( '/' ) &&
+/*N*/ -1 == rStorageName.indexOf( '\\' ),
+/*N*/ "nested embedded storages aren't supported" );
+/*N*/ if( !mxContainerStorage.Is() ||
+/*N*/ ( rStorageName != maCurContainerStorageName ) )
+/*N*/ {
+/*N*/ if( mxContainerStorage.Is() &&
+/*N*/ maCurContainerStorageName.getLength() > 0 &&
+/*N*/ EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode )
+/*?*/ mxContainerStorage->Commit();
+/*N*/
+/*N*/ if( rStorageName.getLength() > 0 && mpRootStorage )
+/*N*/ {
+/*?*/ StreamMode eMode = EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode
+/*?*/ ? STREAM_STD_READWRITE
+/*?*/ : STREAM_STD_READ;
+/*?*/ mxContainerStorage = mpRootStorage->OpenStorage( rStorageName,
+/*N*/ eMode );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ mxContainerStorage = mpRootStorage;
+/*N*/ }
+/*N*/ maCurContainerStorageName = rStorageName;
+/*N*/ }
+/*N*/
+/*N*/ return mxContainerStorage;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ SvStorageRef SvXMLEmbeddedObjectHelper::ImplGetObjectStorage(
+/*?*/ const OUString& rContainerStorageName,
+/*?*/ const OUString& rObjectStorageName,
+/*?*/ sal_Bool bUCBStorage )
+/*?*/ {
+/*?*/ SvStorageRef xObjStor;
+/*?*/ SvStorageRef xCntnrStor( ImplGetContainerStorage( rContainerStorageName ) );
+/*?*/ if( xCntnrStor.Is() )
+/*?*/ {
+/*?*/ StreamMode eMode = EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode
+/*?*/ ? STREAM_STD_READWRITE
+/*?*/ : STREAM_STD_READ;
+/*?*/ xObjStor = xCntnrStor->OpenStorage( rObjectStorageName, eMode );
+/*?*/ }
+/*?*/
+/*?*/ return xObjStor;
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ String SvXMLEmbeddedObjectHelper::ImplGetUniqueName( SvStorage* pStg,
+/*N*/ const sal_Char* p ) const
+/*N*/ {
+/*N*/ String aP = String( ByteString( p ), RTL_TEXTENCODING_UTF8 );
+/*N*/ String aName;
+/*N*/ static ULONG nId = (ULONG)&aP;
+/*N*/ nId++;
+/*N*/ for( ;; )
+/*N*/ {
+/*N*/ aName = aP;
+/*N*/ sal_Int32 nBitsLeft = 32;
+/*N*/ while( nBitsLeft )
+/*N*/ {
+/*N*/ sal_uInt32 nNumb = ( nId << ( 32 - nBitsLeft ) ) >> 28;
+/*N*/ if ( nNumb > 9 )
+/*N*/ nNumb += 'A' - 10;
+/*N*/ else
+/*N*/ nNumb += '0';
+/*N*/ aName+=(sal_Unicode)((sal_Char)nNumb);
+/*N*/ nBitsLeft -= 4;
+/*N*/ }
+/*N*/ if( !pStg->IsContained( aName ) )
+/*N*/ break;
+/*N*/ nId++;
+/*N*/ }
+/*N*/ return aName;
+/*N*/ }
+
+/*N*/ sal_Bool SvXMLEmbeddedObjectHelper::ImplReadObject(
+/*N*/ const OUString& rContainerStorageName,
+/*N*/ OUString& rObjName,
+/*N*/ const SvGlobalName *pClassId,
+/*N*/ SvStorage *pTempStor )
+/*N*/ {
+/*N*/ SvStorageRef xDocStor( mpDocPersist->GetStorage() );
+/*N*/ SvStorageRef xCntnrStor( ImplGetContainerStorage(
+/*N*/ rContainerStorageName ) );
+/*N*/
+/*N*/ if( !xCntnrStor.Is() && !pTempStor )
+/*N*/ return sal_False;
+/*N*/
+/*N*/ String aSrcObjName( rObjName );
+/*N*/ if( xDocStor != xCntnrStor || pTempStor )
+/*N*/ {
+/*N*/
+/*N*/ // Is the object name unique?
+/*N*/ if( mpDocPersist->GetObjectList() )
+/*N*/ {
+/*N*/ sal_uInt32 nCount = mpDocPersist->GetObjectList()->Count();
+/*N*/ for( sal_uInt32 i = 0; i < nCount; i++ )
+/*N*/ {
+/*N*/ SvInfoObject* pTst = mpDocPersist->GetObjectList()->GetObject(i);
+/*N*/ // TODO: unicode: is this correct?
+/*N*/ if( rObjName.equalsIgnoreAsciiCase( pTst->GetObjName() ) ||
+/*N*/ rObjName.equalsIgnoreAsciiCase( pTst->GetStorageName() ) )
+/*N*/ {
+/*N*/ rObjName = ImplGetUniqueName( xDocStor, "Obj" );
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( pTempStor )
+/*N*/ {
+/*N*/ SvStorageRef xDstStor = xDocStor->OpenOLEStorage( rObjName );
+/*N*/ if( !pTempStor->CopyTo( xDstStor ) )
+/*N*/ return sal_False;
+/*N*/ xDstStor->Commit();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ if( !xCntnrStor->CopyTo( aSrcObjName, xDocStor, rObjName ) )
+/*?*/ return sal_False;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ SvGlobalName aClassId;
+/*N*/ if( pClassId )
+/*N*/ {
+/*N*/ // If a class id is specifies, use it.
+/*N*/ aClassId = *pClassId;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Otherwise try to get one from the storage. For packages, the
+/*N*/ // class id is derived from the package's mime type. The mime type
+/*N*/ // is stored in the packages manifest and the manifest is read when
+/*N*/ // the stoage is opened. Therfor, the class id is available without
+/*N*/ // realy accessing the storage.
+/*N*/ SvStorageRef xObjStor;
+/*N*/ if( xDocStor == xCntnrStor )
+/*N*/ xObjStor = ImplGetObjectStorage( rContainerStorageName,
+/*N*/ rObjName, sal_False );
+/*N*/ else
+/*N*/ xObjStor = xDocStor->OpenStorage( rObjName, STREAM_STD_READ );
+/*N*/ DBG_ASSERT( xObjStor.Is(), "Couldn't open object storage" );
+/*N*/ if( xObjStor.Is() )
+/*N*/ aClassId = xObjStor->GetClassName();
+/*N*/ }
+/*N*/
+/*N*/ // For all unkown class id, the OLE object has to be wrapped by an
+/*N*/ // outplace object.
+/*N*/ SvGlobalName aOutClassId( SO3_OUT_CLASSID ); //STRIP003
+/*N*/ if( SvGlobalName() == aClassId ||
+/*N*/ ( aOutClassId != aClassId &&
+/*N*/ !SvFactory::IsIntern( aClassId, 0 ) ) )
+/*?*/ aClassId = SvGlobalName( aOutClassId );
+/*N*/
+/*N*/ SvInfoObjectRef xInfo = new SvEmbeddedInfoObject( rObjName, aClassId );
+/*N*/ mpDocPersist->Insert( xInfo );
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL(
+/*N*/ const OUString& rURLStr )
+/*N*/ {
+/*N*/ OUString sRetURL;
+/*N*/
+/*N*/ OUString aContainerStorageName, aObjectStorageName;
+/*N*/ if( !ImplGetStorageNames( rURLStr, aContainerStorageName,
+/*N*/ aObjectStorageName,
+/*N*/ EMBEDDEDOBJECTHELPER_MODE_WRITE == meCreateMode ) )
+/*N*/ return sRetURL;
+/*N*/
+/*N*/ if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+/*N*/ {
+/*N*/ OutputStorageWrapper_Impl *pOut = 0;
+/*N*/ SvXMLEmbeddedObjectHelper_Impl::iterator aIter;
+/*N*/
+/*N*/ if( mpStreamMap )
+/*N*/ {
+/*N*/ aIter = mpStreamMap->find( rURLStr );
+/*N*/ if( aIter != mpStreamMap->end() && aIter->second )
+/*N*/ pOut = aIter->second;
+/*N*/ }
+/*N*/
+/*N*/ SvGlobalName aClassId, *pClassId = 0;
+/*N*/ sal_Int32 nPos = aObjectStorageName.lastIndexOf( '!' );
+/*N*/ if( -1 != nPos && aClassId.MakeId( aObjectStorageName.copy( nPos+1 ) ) )
+/*N*/ {
+/*?*/ aObjectStorageName = aObjectStorageName.copy( 0, nPos );
+/*?*/ pClassId = &aClassId;
+/*N*/ }
+/*N*/ ImplReadObject( aContainerStorageName, aObjectStorageName, pClassId,
+/*N*/ pOut ? pOut->GetStorage() : 0 );
+/*N*/ sRetURL = OUString( RTL_CONSTASCII_USTRINGPARAM(XML_EMBEDDEDOBJECT_URL_BASE ) );
+/*N*/ sRetURL += aObjectStorageName;
+/*N*/
+/*N*/ if( pOut )
+/*N*/ {
+/*N*/ mpStreamMap->erase( aIter );
+/*N*/ pOut->release();
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // Objects are written using SfxObjectShell::SaveAs
+/*?*/ sRetURL = OUString( RTL_CONSTASCII_USTRINGPARAM("#./") );
+/*?*/ if( aContainerStorageName.getLength() )
+/*?*/ {
+/*?*/ sRetURL += aContainerStorageName;
+/*?*/ sRetURL += OUString( '/' );
+/*?*/ }
+/*?*/ sRetURL += aObjectStorageName;
+/*N*/ }
+/*N*/
+/*N*/ return sRetURL;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLEmbeddedObjectHelper::Init(
+/*N*/ SvStorage *pRootStorage,
+/*N*/ SvPersist& rPersist,
+/*N*/ SvXMLEmbeddedObjectHelperMode eCreateMode )
+/*N*/ {
+/*N*/ mpRootStorage = pRootStorage;
+/*N*/ mpDocPersist = &rPersist;
+/*N*/ meCreateMode = eCreateMode;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLEmbeddedObjectHelper* SvXMLEmbeddedObjectHelper::Create(
+/*N*/ SvStorage& rRootStorage,
+/*N*/ SvPersist& rDocPersist,
+/*N*/ SvXMLEmbeddedObjectHelperMode eCreateMode,
+/*N*/ sal_Bool bDirect )
+/*N*/ {
+/*N*/ SvXMLEmbeddedObjectHelper* pThis = new SvXMLEmbeddedObjectHelper;
+/*N*/
+/*N*/ pThis->acquire();
+/*N*/ pThis->Init( &rRootStorage, rDocPersist, eCreateMode );
+/*N*/
+/*N*/ return pThis;
+/*N*/ }
+
+/*N*/ SvXMLEmbeddedObjectHelper* SvXMLEmbeddedObjectHelper::Create(
+/*N*/ SvPersist& rDocPersist,
+/*N*/ SvXMLEmbeddedObjectHelperMode eCreateMode )
+/*N*/ {
+/*N*/ SvXMLEmbeddedObjectHelper* pThis = new SvXMLEmbeddedObjectHelper;
+/*N*/
+/*N*/ pThis->acquire();
+/*N*/ pThis->Init( 0, rDocPersist, eCreateMode );
+/*N*/
+/*N*/ return pThis;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLEmbeddedObjectHelper::Destroy(
+/*N*/ SvXMLEmbeddedObjectHelper* pSvXMLEmbeddedObjectHelper )
+/*N*/ {
+/*N*/ if( pSvXMLEmbeddedObjectHelper )
+/*N*/ {
+/*N*/ pSvXMLEmbeddedObjectHelper->dispose();
+/*N*/ pSvXMLEmbeddedObjectHelper->release();
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLEmbeddedObjectHelper::Flush()
+/*N*/ {
+/*N*/ }
+
+// XGraphicObjectResolver
+/*N*/ OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL( const OUString& aURL )
+/*N*/ throw(RuntimeException)
+/*N*/ {
+/*N*/ MutexGuard aGuard( maMutex );
+/*N*/
+/*N*/ return ImplInsertEmbeddedObjectURL( aURL );
+/*N*/ }
+
+// XNameAccess
+/*N*/ Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
+/*N*/ const OUString& rURLStr )
+/*N*/ throw (NoSuchElementException, WrappedTargetException, RuntimeException)
+/*N*/ {
+/*N*/ MutexGuard aGuard( maMutex );
+/*N*/ Any aRet;
+/*N*/ if( EMBEDDEDOBJECTHELPER_MODE_READ == meCreateMode )
+/*N*/ {
+/*N*/ Reference < XOutputStream > xStrm;
+/*N*/ if( mpStreamMap )
+/*N*/ {
+/*N*/ SvXMLEmbeddedObjectHelper_Impl::iterator aIter =
+/*N*/ mpStreamMap->find( rURLStr );
+/*N*/ if( aIter != mpStreamMap->end() && aIter->second )
+/*?*/ xStrm = aIter->second;
+/*N*/ }
+/*N*/ if( !xStrm.is() )
+/*N*/ {
+/*N*/ OutputStorageWrapper_Impl *pOut = new OutputStorageWrapper_Impl;
+/*N*/ pOut->acquire();
+/*N*/ if( !mpStreamMap )
+/*N*/ mpStreamMap = new SvXMLEmbeddedObjectHelper_Impl;
+/*N*/ (*mpStreamMap)[rURLStr] = pOut;
+/*N*/ xStrm = pOut;
+/*N*/ }
+/*N*/
+/*N*/ aRet <<= xStrm;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Reference < XInputStream > xStrm;
+/*N*/ OUString aContainerStorageName, aObjectStorageName;
+/*N*/ if( ImplGetStorageNames( rURLStr, aContainerStorageName,
+/*N*/ aObjectStorageName,
+/*N*/ sal_True ) )
+/*N*/ {
+/*N*/ SvPersistRef xObj = mpDocPersist->GetObject( aObjectStorageName );
+/*N*/ if( xObj.Is() )
+/*N*/ xStrm = new InputStorageWrapper_Impl( xObj );
+/*N*/ }
+/*N*/ aRet <<= xStrm;
+/*N*/ }
+/*N*/
+/*N*/ return aRet;
+/*N*/ }
+
+/*?*/ Sequence< OUString > SAL_CALL SvXMLEmbeddedObjectHelper::getElementNames()
+/*?*/ throw (RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); Sequence< OUString > aSeq; return aSeq;//STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+/*?*/ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& rURLStr )
+/*?*/ throw (RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+// XNameAccess
+/*?*/ Type SAL_CALL SvXMLEmbeddedObjectHelper::getElementType()
+/*?*/ throw (RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); Type aType; return aType;//STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+
+/*?*/ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasElements()
+/*?*/ throw (RuntimeException)
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 MutexGuard aGuard( maMutex );
+/*?*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx b/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx
new file mode 100644
index 000000000000..0e6745472383
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx
@@ -0,0 +1,798 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/streamwrap.hxx>
+#include <unotools/tempfile.hxx>
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#include <sal/macros.h>
+
+#include "impgrf.hxx"
+#include "xmlgrhlp.hxx"
+namespace binfilter {
+
+// -----------
+// - Defines -
+// -----------
+
+using namespace rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::io;
+
+#define XML_GRAPHICSTORAGE_NAME "Pictures"
+#define XML_PACKAGE_URL_BASE "vnd.sun.star.Package:"
+#define XML_GRAPHICOBJECT_URL_BASE "vnd.sun.star.GraphicObject:"
+
+// ---------------------------
+// - SvXMLGraphicInputStream -
+// ---------------------------
+
+class SvXMLGraphicInputStream : public::cppu::WeakImplHelper1< XInputStream >
+{
+private:
+
+ virtual sal_Int32 SAL_CALL readBytes( Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead) throw(NotConnectedException, BufferSizeExceededException, RuntimeException);
+ virtual sal_Int32 SAL_CALL readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) throw(NotConnectedException, BufferSizeExceededException, RuntimeException);
+ virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) throw(NotConnectedException, BufferSizeExceededException, RuntimeException);
+ virtual sal_Int32 SAL_CALL available() throw(NotConnectedException, RuntimeException);
+ virtual void SAL_CALL closeInput() throw(NotConnectedException, RuntimeException);
+
+private:
+
+ ::utl::TempFile maTmp;
+ Reference< XInputStream > mxStmWrapper;
+
+ // not available
+ SvXMLGraphicInputStream();
+ SvXMLGraphicInputStream( const SvXMLGraphicInputStream& );
+ SvXMLGraphicInputStream& operator==( SvXMLGraphicInputStream& );
+
+public:
+
+ SvXMLGraphicInputStream( const OUString& rGraphicId );
+ virtual ~SvXMLGraphicInputStream();
+
+ sal_Bool Exists() const { return mxStmWrapper.is(); }
+};
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
+/*N*/ {
+/*N*/ String aGraphicId( rGraphicId );
+/*N*/ BfGraphicObject aGrfObject( ByteString( aGraphicId, RTL_TEXTENCODING_ASCII_US ) );
+/*N*/
+/*N*/ maTmp.EnableKillingFile();
+/*N*/
+/*N*/ if( aGrfObject.GetType() != GRAPHIC_NONE )
+/*N*/ {
+/*N*/ SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( maTmp.GetURL(), STREAM_WRITE | STREAM_TRUNC );
+/*N*/
+/*N*/ if( pStm )
+/*N*/ {
+/*N*/ Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() );
+/*N*/ const GfxLink aGfxLink( aGraphic.GetLink() );
+/*N*/ sal_Bool bRet = sal_False;
+/*N*/
+/*N*/ if( aGfxLink.GetDataSize() )
+/*N*/ {
+/*N*/ pStm->Write( aGfxLink.GetData(), aGfxLink.GetDataSize() );
+/*N*/ bRet = ( pStm->GetError() == 0 );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if( aGraphic.GetType() == GRAPHIC_BITMAP )
+/*N*/ {
+/*N*/ GraphicFilter* pFilter = GetGrfFilter();
+/*N*/ String aFormat;
+/*N*/
+/*N*/ if( aGraphic.IsAnimated() )
+/*N*/ aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) );
+/*N*/ else
+/*N*/ aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "png" ) );
+/*N*/
+/*N*/ bRet = ( pFilter->ExportGraphic( aGraphic, String(), *pStm, pFilter->GetExportFormatNumberForShortName( aFormat ) ) == 0 );
+/*N*/ }
+/*N*/ else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+/*N*/ {
+/*N*/ ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm );
+/*N*/ bRet = ( pStm->GetError() == 0 );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( bRet )
+/*N*/ {
+/*N*/ pStm->Seek( 0 );
+/*N*/ mxStmWrapper = new ::utl::OInputStreamWrapper( pStm, sal_True );
+/*N*/ }
+/*N*/ else
+/*N*/ delete pStm;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicInputStream::~SvXMLGraphicInputStream()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ sal_Int32 SAL_CALL SvXMLGraphicInputStream::readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead )
+/*N*/ throw( NotConnectedException, BufferSizeExceededException, RuntimeException )
+/*N*/ {
+/*N*/ if( !mxStmWrapper.is() )
+/*N*/ throw NotConnectedException();
+/*N*/
+/*N*/ return mxStmWrapper->readBytes( rData, nBytesToRead );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ sal_Int32 SAL_CALL SvXMLGraphicInputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead )
+/*?*/ throw( NotConnectedException, BufferSizeExceededException, RuntimeException )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 if( !mxStmWrapper.is() )
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ void SAL_CALL SvXMLGraphicInputStream::skipBytes( sal_Int32 nBytesToSkip )
+/*?*/ throw( NotConnectedException, BufferSizeExceededException, RuntimeException )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 if( !mxStmWrapper.is() )
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ sal_Int32 SAL_CALL SvXMLGraphicInputStream::available() throw( NotConnectedException, RuntimeException )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 if( !mxStmWrapper.is() )
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ void SAL_CALL SvXMLGraphicInputStream::closeInput() throw( NotConnectedException, RuntimeException )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 if( !mxStmWrapper.is() )
+/*?*/ }
+
+// ----------------------------
+// - SvXMLGraphicOutputStream -
+// ----------------------------
+
+class SvXMLGraphicOutputStream : public::cppu::WeakImplHelper1< XOutputStream >
+{
+private:
+
+ // XOutputStream
+ virtual void SAL_CALL writeBytes( const Sequence< sal_Int8 >& rData ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException );
+ virtual void SAL_CALL flush() throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException );
+ virtual void SAL_CALL closeOutput() throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException );
+
+private:
+
+ ::utl::TempFile* mpTmp;
+ SvStream* mpOStm;
+ Reference< XOutputStream > mxStmWrapper;
+ BfGraphicObject maGrfObj;
+ sal_Bool mbClosed;
+
+ // not available
+ SvXMLGraphicOutputStream( const SvXMLGraphicOutputStream& );
+ SvXMLGraphicOutputStream& operator==( SvXMLGraphicOutputStream& );
+
+public:
+
+ SvXMLGraphicOutputStream();
+ virtual ~SvXMLGraphicOutputStream();
+
+ sal_Bool Exists() const { return mxStmWrapper.is(); }
+ const BfGraphicObject& GetGraphicObject();
+};
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicOutputStream::SvXMLGraphicOutputStream() :
+/*N*/ mpTmp( new ::utl::TempFile ),
+/*N*/ mbClosed( sal_False )
+/*N*/ {
+/*N*/ mpTmp->EnableKillingFile();
+/*N*/
+/*N*/ mpOStm = ::utl::UcbStreamHelper::CreateStream( mpTmp->GetURL(), STREAM_WRITE | STREAM_TRUNC );
+/*N*/
+/*N*/ if( mpOStm )
+/*N*/ mxStmWrapper = new ::utl::OOutputStreamWrapper( *mpOStm );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicOutputStream::~SvXMLGraphicOutputStream()
+/*N*/ {
+/*N*/ delete mpTmp;
+/*N*/ delete mpOStm;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SAL_CALL SvXMLGraphicOutputStream::writeBytes( const Sequence< sal_Int8 >& rData )
+/*N*/ throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
+/*N*/ {
+/*N*/ if( !mxStmWrapper.is() )
+/*N*/ throw NotConnectedException() ;
+/*N*/
+/*N*/ mxStmWrapper->writeBytes( rData );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*?*/ void SAL_CALL SvXMLGraphicOutputStream::flush()
+/*?*/ throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 //STRIP001 if( !mxStmWrapper.is() )
+/*?*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SAL_CALL SvXMLGraphicOutputStream::closeOutput()
+/*N*/ throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException )
+/*N*/ {
+/*N*/ if( !mxStmWrapper.is() )
+/*N*/ throw NotConnectedException() ;
+/*N*/
+/*N*/ mxStmWrapper->closeOutput();
+/*N*/ mxStmWrapper = Reference< XOutputStream >();
+/*N*/
+/*N*/ mbClosed = sal_True;
+/*N*/ }
+
+// ------------------------------------------------------------------------------
+
+/*N*/ const BfGraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
+/*N*/ {
+/*N*/ if( mbClosed && ( maGrfObj.GetType() == GRAPHIC_NONE ) && mpOStm )
+/*N*/ {
+/*N*/ Graphic aGraphic;
+/*N*/
+/*N*/ mpOStm->Seek( 0 );
+/*N*/ GetGrfFilter()->ImportGraphic( aGraphic, String(), *mpOStm );
+/*N*/
+/*N*/ maGrfObj = BfGraphicObject(aGraphic);
+/*N*/
+/*N*/ if( maGrfObj.GetType() != GRAPHIC_NONE )
+/*N*/ {
+/*N*/ delete mpOStm, mpOStm = NULL;
+/*N*/ delete mpTmp, mpTmp = NULL;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return maGrfObj;
+/*N*/ }
+
+// ----------------------
+// - SvXMLGraphicHelper -
+// ----------------------
+
+/*N*/ SvXMLGraphicHelper::SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ) :
+/*N*/ ::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver,
+/*N*/ ::com::sun::star::document::XBinaryStreamResolver >( maMutex )
+/*N*/ {
+/*N*/ Init( NULL, eCreateMode, sal_False );
+/*N*/ }
+
+/*N*/ SvXMLGraphicHelper::SvXMLGraphicHelper() :
+/*N*/ ::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver,
+/*N*/ ::com::sun::star::document::XBinaryStreamResolver >( maMutex )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicHelper::~SvXMLGraphicHelper()
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SAL_CALL SvXMLGraphicHelper::disposing()
+/*N*/ {
+/*N*/ Flush();
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ sal_Bool SvXMLGraphicHelper::ImplGetStreamNames( const ::rtl::OUString& rURLStr,
+/*N*/ ::rtl::OUString& rPictureStorageName,
+/*N*/ ::rtl::OUString& rPictureStreamName )
+/*N*/ {
+/*N*/ String aURLStr( rURLStr );
+/*N*/ sal_Bool bRet = sal_False;
+/*N*/
+/*N*/ if( aURLStr.Len() )
+/*N*/ {
+/*N*/ aURLStr = aURLStr.GetToken( aURLStr.GetTokenCount( ':' ) - 1, ':' );
+/*N*/ const sal_uInt32 nTokenCount = aURLStr.GetTokenCount( '/' );
+/*N*/
+/*N*/ if( 1 == nTokenCount )
+/*N*/ {
+/*N*/ rPictureStorageName = String( RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICSTORAGE_NAME ) );
+/*N*/ rPictureStreamName = aURLStr;
+/*N*/ bRet = sal_True;
+/*N*/ }
+/*N*/ else if( 2 == nTokenCount )
+/*N*/ {
+/*N*/ rPictureStorageName = aURLStr.GetToken( 0, '/' );
+/*N*/
+/*N*/ if( rPictureStorageName.getLength() && rPictureStorageName.getStr()[ 0 ] == '#' )
+/*?*/ rPictureStorageName = rPictureStorageName.copy( 1 );
+/*N*/
+/*N*/ rPictureStreamName = aURLStr.GetToken( 1, '/' );
+/*N*/ bRet = sal_True;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ DBG_ERROR( "SvXMLGraphicHelper::ImplInsertGraphicURL: invalid scheme" );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SotStorageRef SvXMLGraphicHelper::ImplGetGraphicStorage( const ::rtl::OUString& rStorageName )
+/*N*/ {
+/*N*/ if( mpRootStorage && ( !mxGraphicStorage.Is() || ( rStorageName != maCurStorageName ) ) )
+/*N*/ {
+/*N*/ if( mxGraphicStorage.Is() && GRAPHICHELPER_MODE_WRITE == meCreateMode )
+/*?*/ mxGraphicStorage->Commit();
+/*N*/
+/*N*/ mxGraphicStorage = mpRootStorage->OpenUCBStorage( maCurStorageName = rStorageName, STREAM_READ | STREAM_WRITE );
+/*N*/ }
+/*N*/
+/*N*/ return mxGraphicStorage;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SotStorageStreamRef SvXMLGraphicHelper::ImplGetGraphicStream( const ::rtl::OUString& rPictureStorageName,
+/*N*/ const ::rtl::OUString& rPictureStreamName,
+/*N*/ BOOL bTruncate )
+/*N*/ {
+/*N*/ SotStorageStreamRef xStm;
+/*N*/ SotStorageRef xStorage( ImplGetGraphicStorage( rPictureStorageName ) );
+/*N*/
+/*N*/ if( xStorage.Is() )
+/*N*/ {
+/*N*/ xStm = xStorage->OpenSotStream( rPictureStreamName,
+/*N*/ STREAM_READ | ( ( GRAPHICHELPER_MODE_WRITE == meCreateMode ) ?
+/*N*/ ( STREAM_WRITE | ( bTruncate ? STREAM_TRUNC : 0 ) ) : 0 ) );
+/*N*/
+/*N*/ if( xStm.Is() && ( GRAPHICHELPER_MODE_WRITE == meCreateMode ) )
+/*N*/ {
+/*N*/ OUString aPropName( RTL_CONSTASCII_USTRINGPARAM("Encrypted") );
+/*N*/ sal_Bool bTrue = sal_True;
+/*N*/ uno::Any aAny;
+/*N*/
+/*N*/ aAny.setValue( &bTrue, ::getBooleanCppuType() );
+/*N*/ xStm->SetProperty( aPropName, aAny );
+/*N*/
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return xStm;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) const
+/*N*/ {
+/*N*/ struct XMLGraphicMimeTypeMapper
+/*N*/ {
+/*N*/ const char* pExt;
+/*N*/ const char* pMimeType;
+/*N*/ };
+/*N*/
+/*N*/ static XMLGraphicMimeTypeMapper aMapper[] =
+/*N*/ {
+/*N*/ { "gif", "image/gif" },
+/*N*/ { "png", "image/png" },
+/*N*/ { "jpg", "image/jpeg" },
+/*N*/ { "tif", "image/tiff" }
+/*N*/ };
+/*N*/
+/*N*/ String aMimeType;
+/*N*/
+/*N*/ if( ( rFileName.Len() >= 4 ) && ( rFileName.GetChar( rFileName.Len() - 4 ) == '.' ) )
+/*N*/ {
+/*N*/ const ByteString aExt( rFileName.Copy( rFileName.Len() - 3 ), RTL_TEXTENCODING_ASCII_US );
+/*N*/
+/*N*/ for( long i = 0, nCount = SAL_N_ELEMENTS( aMapper ); ( i < nCount ) && !aMimeType.Len(); i++ )
+/*N*/ if( aExt == aMapper[ i ].pExt )
+/*N*/ aMimeType = String( aMapper[ i ].pMimeType, RTL_TEXTENCODING_ASCII_US );
+/*N*/ }
+/*N*/
+/*N*/ return aMimeType;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ Graphic SvXMLGraphicHelper::ImplReadGraphic( const ::rtl::OUString& rPictureStorageName,
+/*N*/ const ::rtl::OUString& rPictureStreamName )
+/*N*/ {
+/*N*/ Graphic aGraphic;
+/*N*/ SotStorageStreamRef xStm( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, FALSE ) );
+/*N*/
+/*N*/ if( xStm.Is() )
+/*N*/ GetGrfFilter()->ImportGraphic( aGraphic, String(), *xStm );
+/*N*/
+/*N*/ return aGraphic;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureStorageName,
+/*N*/ const ::rtl::OUString& rPictureStreamName,
+/*N*/ const ::rtl::OUString& rGraphicId )
+/*N*/ {
+/*N*/ String aGraphicId( rGraphicId );
+/*N*/ BfGraphicObject aGrfObject( ByteString( aGraphicId, RTL_TEXTENCODING_ASCII_US ) );
+/*N*/ sal_Bool bRet = sal_False;
+/*N*/
+/*N*/ if( aGrfObject.GetType() != GRAPHIC_NONE )
+/*N*/ {
+/*N*/ SotStorageStreamRef xStm( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, TRUE ) );
+/*N*/
+/*N*/ if( xStm.Is() )
+/*N*/ {
+/*N*/ Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() );
+/*N*/ const GfxLink aGfxLink( aGraphic.GetLink() );
+/*N*/ const OUString aMimeType( ImplGetGraphicMimeType( rPictureStreamName ) );
+/*N*/ uno::Any aAny;
+/*N*/
+/*N*/ // set stream properties (MediaType/Compression)
+/*N*/ if( aMimeType.getLength() )
+/*N*/ {
+/*N*/ aAny <<= aMimeType;
+/*N*/ xStm->SetProperty( String( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), aAny );
+/*N*/ }
+/*N*/
+/*N*/ const sal_Bool bCompressed = ( ( 0 == aMimeType.getLength() ) || ( aMimeType == OUString::createFromAscii( "image/tiff" ) ) );
+/*N*/ aAny <<= bCompressed;
+/*N*/ xStm->SetProperty( String( RTL_CONSTASCII_USTRINGPARAM( "Compressed" ) ), aAny );
+/*N*/
+/*N*/ if( aGfxLink.GetDataSize() )
+/*N*/ xStm->Write( aGfxLink.GetData(), aGfxLink.GetDataSize() );
+/*N*/ else
+/*N*/ {
+/*N*/ if( aGraphic.GetType() == GRAPHIC_BITMAP )
+/*N*/ {
+/*?*/ GraphicFilter* pFilter = GetGrfFilter();
+/*?*/ String aFormat;
+/*?*/
+/*?*/ if( aGraphic.IsAnimated() )
+/*?*/ aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) );
+/*?*/ else
+/*?*/ aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "png" ) );
+/*?*/
+/*?*/ bRet = ( pFilter->ExportGraphic( aGraphic, String(), *xStm,
+/*N*/ pFilter->GetExportFormatNumberForShortName( aFormat ) ) == 0 );
+/*N*/ }
+/*N*/ else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+/*N*/ {
+/*N*/ ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *xStm );
+/*N*/ bRet = ( xStm->GetError() == 0 );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ xStm->Commit();
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos )
+/*N*/ {
+/*N*/ ::rtl::OUString aPictureStorageName, aPictureStreamName;
+/*N*/
+/*N*/ if( ( maURLSet.find( rURLStr ) != maURLSet.end() ) )
+/*N*/ {
+/*N*/ URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() );
+/*N*/
+/*N*/ while( aIter != aEnd )
+/*N*/ {
+/*N*/ if( rURLStr == (*aIter).first )
+/*N*/ {
+/*N*/ maGrfURLs[ nInsertPos ].second = (*aIter).second;
+/*N*/ aIter = aEnd;
+/*N*/ }
+/*N*/ else
+/*N*/ aIter++;
+/*N*/ }
+/*N*/ }
+/*N*/ else if( ImplGetStreamNames( rURLStr, aPictureStorageName, aPictureStreamName ) )
+/*N*/ {
+/*N*/ URLPair& rURLPair = maGrfURLs[ nInsertPos ];
+/*N*/
+/*N*/ if( GRAPHICHELPER_MODE_READ == meCreateMode )
+/*N*/ {
+/*N*/ const BfGraphicObject aObj( ImplReadGraphic( aPictureStorageName, aPictureStreamName ) );
+/*N*/
+/*N*/ if( aObj.GetType() != GRAPHIC_NONE )
+/*N*/ {
+/*N*/ const static ::rtl::OUString aBaseURL( RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICOBJECT_URL_BASE ) );
+/*N*/
+/*N*/ maGrfObjs.push_back( aObj );
+/*N*/ rURLPair.second = aBaseURL;
+/*N*/ rURLPair.second += String( aObj.GetUniqueID().GetBuffer(), RTL_TEXTENCODING_ASCII_US );
+/*N*/ }
+/*N*/ else
+/*?*/ rURLPair.second = String();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ const String aGraphicObjectId( aPictureStreamName );
+/*N*/ const BfGraphicObject aGrfObject( ByteString( aGraphicObjectId, RTL_TEXTENCODING_ASCII_US ) );
+/*N*/
+/*N*/ if( aGrfObject.GetType() != GRAPHIC_NONE )
+/*N*/ {
+/*N*/ String aStreamName( aGraphicObjectId );
+/*N*/ Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() );
+/*N*/ const GfxLink aGfxLink( aGraphic.GetLink() );
+/*N*/
+/*N*/ if( aGfxLink.GetDataSize() )
+/*N*/ {
+/*N*/ switch( aGfxLink.GetType() )
+/*N*/ {
+/*N*/ case( GFX_LINK_TYPE_EPS_BUFFER ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_GIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_JPG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_PNG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_TIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_WMF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_MET ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
+/*N*/ case( GFX_LINK_TYPE_NATIVE_PCT ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
+/*N*/
+/*N*/ default:
+/*N*/ aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if( aGrfObject.GetType() == GRAPHIC_BITMAP )
+/*N*/ {
+/*N*/ if( aGrfObject.IsAnimated() )
+/*N*/ aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) );
+/*N*/ else
+/*N*/ aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) );
+/*N*/ }
+/*N*/ else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE )
+/*N*/ aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
+/*N*/ }
+/*N*/
+/*N*/ if( mbDirect && aStreamName.Len() )
+/*N*/ ImplWriteGraphic( aPictureStorageName, aStreamName, aGraphicObjectId );
+/*N*/
+/*N*/ rURLPair.second = String( RTL_CONSTASCII_USTRINGPARAM( "#Pictures/" ) );
+/*N*/ rURLPair.second += aStreamName;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ maURLSet.insert( rURLStr );
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLGraphicHelper::Init( SotStorage* pXMLStorage,
+/*N*/ SvXMLGraphicHelperMode eCreateMode,
+/*N*/ BOOL bDirect )
+/*N*/ {
+/*N*/ mpRootStorage = pXMLStorage;
+/*N*/ meCreateMode = eCreateMode;
+/*N*/ mbDirect = ( ( GRAPHICHELPER_MODE_READ == meCreateMode ) ? bDirect : sal_True );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicHelper* SvXMLGraphicHelper::Create( SotStorage& rXMLStorage,
+/*N*/ SvXMLGraphicHelperMode eCreateMode,
+/*N*/ BOOL bDirect )
+/*N*/ {
+/*N*/ SvXMLGraphicHelper* pThis = new SvXMLGraphicHelper;
+/*N*/
+/*N*/ pThis->acquire();
+/*N*/ pThis->Init( &rXMLStorage, eCreateMode, bDirect );
+/*N*/
+/*N*/ return pThis;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SvXMLGraphicHelper* SvXMLGraphicHelper::Create( SvXMLGraphicHelperMode eCreateMode )
+/*N*/ {
+/*N*/ SvXMLGraphicHelper* pThis = new SvXMLGraphicHelper;
+/*N*/
+/*N*/ pThis->acquire();
+/*N*/ pThis->Init( NULL, eCreateMode, sal_False );
+/*N*/
+/*N*/ return pThis;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper )
+/*N*/ {
+/*N*/ if( pSvXMLGraphicHelper )
+/*N*/ {
+/*N*/ pSvXMLGraphicHelper->dispose();
+/*N*/ pSvXMLGraphicHelper->release();
+/*N*/ }
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void SvXMLGraphicHelper::Flush()
+/*N*/ {
+/*N*/ if( ( GRAPHICHELPER_MODE_WRITE == meCreateMode ) && !mbDirect )
+/*N*/ {
+/*?*/ ::rtl::OUString aPictureStorageName, aPictureStreamName;
+/*?*/ URLSet::iterator aSetIter( maURLSet.begin() ), aSetEnd( maURLSet.end() );
+/*?*/
+/*?*/ while( aSetIter != aSetEnd )
+/*?*/ {
+/*?*/ URLPairVector::iterator aPairIter( maGrfURLs.begin() ), aPairEnd( maGrfURLs.end() );
+/*?*/
+/*?*/ while( aPairIter != aPairEnd )
+/*?*/ {
+/*?*/ if( *aSetIter == (*aPairIter).first )
+/*?*/ {
+/*?*/ if( ImplGetStreamNames( (*aPairIter).second, aPictureStorageName, aPictureStreamName ) )
+/*?*/ {
+/*?*/ DBG_ASSERT( String( aPictureStreamName ).GetTokenCount( '.' ) == 2, "invalid URL" );
+/*?*/ ImplWriteGraphic( aPictureStorageName, aPictureStreamName, String( aPictureStreamName ).GetToken( 0, '.' ) );
+/*?*/ }
+/*?*/
+/*?*/ aPairIter = aPairEnd;
+/*?*/ }
+/*?*/ else
+/*?*/ aPairIter++;
+/*?*/ }
+/*?*/
+/*?*/ aSetIter++;
+/*?*/ }
+/*?*/
+/*?*/ mbDirect = sal_True;
+/*N*/ }
+/*N*/ if( GRAPHICHELPER_MODE_WRITE == meCreateMode )
+/*N*/ {
+/*N*/ SotStorageRef xStorage = ImplGetGraphicStorage( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(XML_GRAPHICSTORAGE_NAME) ) );
+/*N*/
+/*N*/ if( xStorage.Is() )
+/*N*/ xStorage->Commit();
+/*N*/ }
+/*N*/
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+// XGraphicObjectResolver
+/*N*/ OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const OUString& aURL )
+/*N*/ throw(uno::RuntimeException)
+/*N*/ {
+/*N*/ ::osl::MutexGuard aGuard( maMutex );
+/*N*/ const sal_Int32 nIndex = maGrfURLs.size();
+/*N*/
+/*N*/ maGrfURLs.push_back( ::std::make_pair( aURL, ::rtl::OUString() ) );
+/*N*/ ImplInsertGraphicURL( aURL, nIndex );
+/*N*/
+/*N*/ return maGrfURLs[ nIndex ].second;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+// XBinaryStreamResolver
+/*N*/ Reference< XInputStream > SAL_CALL SvXMLGraphicHelper::getInputStream( const OUString& rURL )
+/*N*/ throw( RuntimeException )
+/*N*/ {
+/*N*/ Reference< XInputStream > xRet;
+/*N*/ OUString aPictureStorageName, aGraphicId;
+/*N*/
+/*N*/
+/*N*/ if( ( GRAPHICHELPER_MODE_WRITE == meCreateMode ) &&
+/*N*/ ImplGetStreamNames( rURL, aPictureStorageName, aGraphicId ) )
+/*N*/ {
+/*N*/ SvXMLGraphicInputStream* pInputStream = new SvXMLGraphicInputStream( aGraphicId );
+/*N*/
+/*N*/ if( pInputStream->Exists() )
+/*N*/ xRet = pInputStream;
+/*N*/ else
+/*N*/ delete pInputStream;
+/*N*/ }
+/*N*/
+/*N*/ return xRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream()
+/*N*/ throw( RuntimeException )
+/*N*/ {
+/*N*/ Reference< XOutputStream > xRet;
+/*N*/
+/*N*/ if( GRAPHICHELPER_MODE_READ == meCreateMode )
+/*N*/ {
+/*N*/ SvXMLGraphicOutputStream* pOutputStream = new SvXMLGraphicOutputStream;
+/*N*/
+/*N*/ if( pOutputStream->Exists() )
+/*N*/ maGrfStms.push_back( xRet = pOutputStream );
+/*N*/ else
+/*?*/ delete pOutputStream;
+/*N*/ }
+/*N*/
+/*N*/ return xRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOutputStream >& rxBinaryStream )
+/*N*/ throw( RuntimeException )
+/*N*/ {
+/*N*/ OUString aRet;
+/*N*/
+/*N*/ if( ( GRAPHICHELPER_MODE_READ == meCreateMode ) && rxBinaryStream.is() )
+/*N*/ {
+/*N*/ if( ::std::find( maGrfStms.begin(), maGrfStms.end(), rxBinaryStream ) != maGrfStms.end() )
+/*N*/ {
+/*N*/ SvXMLGraphicOutputStream* pOStm = static_cast< SvXMLGraphicOutputStream* >( rxBinaryStream.get() );
+/*N*/
+/*N*/ if( pOStm )
+/*N*/ {
+/*N*/ const BfGraphicObject& rGrfObj = pOStm->GetGraphicObject();
+/*N*/ const OUString aId( OUString::createFromAscii( rGrfObj.GetUniqueID().GetBuffer() ) );
+/*N*/
+/*N*/ if( aId.getLength() )
+/*N*/ {
+/*N*/ aRet = OUString::createFromAscii( XML_GRAPHICOBJECT_URL_BASE );
+/*N*/ aRet += aId;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return aRet;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx b/binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx
new file mode 100644
index 000000000000..e4deb85e5545
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/svx_xmltxtexp.cxx
@@ -0,0 +1,170 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/** this file implements an export of a selected EditEngine content into
+ a xml stream. See bf_svx/source/inc/xmledit.hxx for interface */
+
+#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+
+
+
+
+
+
+
+
+
+
+
+#include <unotools/streamwrap.hxx>
+
+
+#include "bf_xmloff/xmlexp.hxx"
+
+
+#include "unofored.hxx"
+
+#include "unotext.hxx"
+
+#include "editsource.hxx"
+
+#include <cppuhelper/implbase4.hxx>
+
+#include "unofield.hxx"
+
+#include "unomod.hxx"
+#include "unonrule.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml::sax;
+using namespace cppu;
+
+using rtl::OUString;
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxEditEngineSourceImpl;
+
+///////////////////////////////////////////////////////////////////////
+
+/*N*/ class SvxEditEngineSourceImpl
+/*N*/ {
+/*N*/ private:
+/*N*/ oslInterlockedCount maRefCount;
+/*N*/
+/*N*/ EditEngine* mpEditEngine;
+/*N*/ SvxTextForwarder* mpTextForwarder;
+/*N*/
+/*N*/ ~SvxEditEngineSourceImpl();
+/*N*/
+/*N*/ public:
+/*N*/ void SAL_CALL acquire();
+/*N*/ void SAL_CALL release();
+/*N*/
+/*N*/ SvxTextForwarder* GetTextForwarder();
+/*N*/ };
+/*N*/
+/*N*/ ///////////////////////////////////////////////////////////////////////
+/*N*/
+/*N*/ SvxEditEngineSourceImpl::~SvxEditEngineSourceImpl()
+/*N*/ {
+/*N*/ delete mpTextForwarder;
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ void SAL_CALL SvxEditEngineSourceImpl::acquire()
+/*N*/ {
+/*N*/ osl_incrementInterlockedCount( &maRefCount );
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ void SAL_CALL SvxEditEngineSourceImpl::release()
+/*N*/ {
+/*N*/ if( ! osl_decrementInterlockedCount( &maRefCount ) )
+/*N*/ delete this;
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ SvxTextForwarder* SvxEditEngineSourceImpl::GetTextForwarder()
+/*N*/ {
+/*N*/ if (!mpTextForwarder)
+/*N*/ mpTextForwarder = new SvxEditEngineForwarder( *mpEditEngine );
+/*N*/
+/*N*/ return mpTextForwarder;
+/*N*/ }
+/*N*/
+/*N*/ // --------------------------------------------------------------------
+/*N*/ // SvxTextEditSource
+/*N*/ // --------------------------------------------------------------------
+/*N*/
+/*N*/ SvxEditEngineSource::SvxEditEngineSource( SvxEditEngineSourceImpl* pImpl )
+/*N*/ {
+/*N*/ mpImpl = pImpl;
+/*N*/ mpImpl->acquire();
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ SvxEditEngineSource::~SvxEditEngineSource()
+/*N*/ {
+/*N*/ mpImpl->release();
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ SvxEditSource* SvxEditEngineSource::Clone() const
+/*N*/ {
+/*N*/ return new SvxEditEngineSource( mpImpl );
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ SvxTextForwarder* SvxEditEngineSource::GetTextForwarder()
+/*N*/ {
+/*N*/ return mpImpl->GetTextForwarder();
+/*N*/ }
+/*N*/
+/*N*/ //------------------------------------------------------------------------
+/*N*/
+/*N*/ void SvxEditEngineSource::UpdateData()
+/*N*/ {
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx b/binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx
new file mode 100644
index 000000000000..a0cc13fb91be
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/svx_xmltxtimp.cxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <com/sun/star/xml/sax/XParser.hpp>
+
+
+#include <unotools/streamwrap.hxx>
+
+
+
+
+
+#include <bf_xmloff/xmlimp.hxx>
+
+#include <bf_xmloff/xmlnmspe.hxx>
+#include <bf_xmloff/xmlstyle.hxx>
+
+#include "editsource.hxx"
+
+#include "unotext.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::text;
+using namespace cppu;
+using namespace xmloff::token;
+
+using rtl::OUString;
+
+
+///////////////////////////////////////////////////////////////////////
+
+/*N*/ class SvxXMLTextImportContext : public SvXMLImportContext
+/*N*/ {
+/*N*/ public:
+/*N*/ SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const Reference< XAttributeList >& xAttrList, const Reference< XText >& xText );
+/*N*/ virtual ~SvxXMLTextImportContext();
+/*N*/
+/*N*/ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList );
+/*N*/
+/*N*/ // SvxXMLXTableImport& getImport() const { return *(SvxXMLXTableImport*)&GetImport(); }
+/*N*/
+/*N*/ private:
+/*N*/ const Reference< XText > mxText;
+/*N*/ };
+/*N*/
+/*N*/ ///////////////////////////////////////////////////////////////////////
+/*N*/
+/*N*/ SvxXMLTextImportContext::SvxXMLTextImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const Reference< XAttributeList >& xAttrList, const Reference< XText >& xText )
+/*N*/ : SvXMLImportContext( rImport, nPrfx, rLName ), mxText( xText )
+/*N*/ {
+/*N*/ }
+/*N*/
+/*N*/ SvxXMLTextImportContext::~SvxXMLTextImportContext()
+/*N*/ {
+/*N*/ }
+/*N*/
+/*N*/ SvXMLImportContext *SvxXMLTextImportContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
+/*N*/ {
+/*N*/ SvXMLImportContext* pContext = NULL;
+/*N*/ if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_BODY ) )
+/*N*/ {
+/*N*/ pContext = new SvxXMLTextImportContext( GetImport(), nPrefix, rLocalName, xAttrList, mxText );
+/*N*/ }
+/*N*/ else if( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_AUTOMATIC_STYLES ) )
+/*N*/ {
+/*N*/ pContext = new SvXMLStylesContext( GetImport(), nPrefix, rLocalName, xAttrList );
+/*N*/ GetImport().GetTextImport()->SetAutoStyles( (SvXMLStylesContext*)pContext );
+/*N*/
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList );
+/*N*/ }
+/*N*/
+/*N*/ if( NULL == pContext )
+/*N*/ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+/*N*/
+/*N*/ return pContext;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/svx_xmlxtexp.cxx b/binfilter/bf_svx/source/xml/svx_xmlxtexp.cxx
new file mode 100644
index 000000000000..7125852a1412
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/svx_xmlxtexp.cxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+
+#include <bf_sfx2/docfile.hxx>
+
+
+#include <bf_xmloff/xmluconv.hxx>
+
+#include "bf_xmloff/xmlnmspe.hxx"
+
+#include "bf_xmloff/nmspmap.hxx"
+
+#include "bf_xmloff/xmlkywd.hxx"
+
+
+#include "bf_xmloff/DashStyle.hxx"
+
+#include "bf_xmloff/GradientStyle.hxx"
+
+#include "bf_xmloff/HatchStyle.hxx"
+
+#include "bf_xmloff/ImageStyle.hxx"
+
+#include "bf_xmloff/MarkerStyle.hxx"
+
+#include <com/sun/star/container/XNameContainer.hpp>
+
+
+#include <unotools/streamwrap.hxx>
+
+#include "xmlgrhlp.hxx"
+
+#include "xmlxtexp.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::rtl;
+using namespace cppu;
+
+/*N*/ class SvxXMLTableEntryExporter
+/*N*/ {
+/*N*/ public:
+/*N*/ SvxXMLTableEntryExporter( SvXMLExport& rExport ) : mrExport( rExport ) {}
+/*N*/ virtual ~SvxXMLTableEntryExporter();
+/*N*/
+/*N*/ virtual void exportEntry( const OUString& rStrName, const Any& rValue ) = 0;
+/*N*/
+/*N*/ protected:
+/*N*/ SvXMLExport& mrExport;
+/*N*/ };
+/*N*/
+/*N*/ ///////////////////////////////////////////////////////////////////////
+/*N*/
+/*N*/ SvxXMLTableEntryExporter::~SvxXMLTableEntryExporter()
+/*N*/ {
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx b/binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx
new file mode 100644
index 000000000000..fd4c42fb8b75
--- /dev/null
+++ b/binfilter/bf_svx/source/xml/svx_xmlxtimp.cxx
@@ -0,0 +1,376 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+
+
+#include <com/sun/star/io/XActiveDataControl.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/io/XSeekable.hdl>
+
+#include <unotools/streamwrap.hxx>
+
+
+
+#include <bf_sfx2/docfile.hxx>
+
+#include <bf_xmloff/xmluconv.hxx>
+
+#include "bf_xmloff/xmlnmspe.hxx"
+
+#include "bf_xmloff/nmspmap.hxx"
+
+#include "bf_xmloff/xmlkywd.hxx"
+
+
+#include "bf_xmloff/DashStyle.hxx"
+
+#include "bf_xmloff/GradientStyle.hxx"
+
+#include "bf_xmloff/HatchStyle.hxx"
+
+#include "bf_xmloff/ImageStyle.hxx"
+
+#include "bf_xmloff/MarkerStyle.hxx"
+
+
+#include "xmlgrhlp.hxx"
+
+#include "xmlxtimp.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::xml::sax;
+using namespace cppu;
+
+using rtl::OUString;
+
+///////////////////////////////////////////////////////////////////////
+
+enum SvxXMLTableImportContextEnum { stice_unknown, stice_color, stice_marker, stice_dash, stice_hatch, stice_gradient, stice_bitmap };
+
+///////////////////////////////////////////////////////////////////////
+
+class SvxXMLTableImportContext : public SvXMLImportContext
+{
+public:
+ SvxXMLTableImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const Reference< XAttributeList >& xAttrList, SvxXMLTableImportContextEnum eContext, const Reference< XNameContainer >& xTable );
+ virtual ~SvxXMLTableImportContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList );
+
+ SvxXMLXTableImport& getImport() const { return *(SvxXMLXTableImport*)&GetImport(); }
+
+protected:
+ void importColor( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName );
+ void importMarker( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName );
+ void importDash( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName );
+ void importHatch( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName );
+ void importGradient( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName );
+ void importBitmap( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName );
+
+private:
+ Reference< XNameContainer > mxTable;
+ SvxXMLTableImportContextEnum meContext;
+};
+
+///////////////////////////////////////////////////////////////////////
+
+/*N*/ SvxXMLTableImportContext::SvxXMLTableImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const Reference< XAttributeList >& xAttrList, SvxXMLTableImportContextEnum eContext, const Reference< XNameContainer >& xTable )
+/*N*/ : SvXMLImportContext( rImport, nPrfx, rLName ), meContext( eContext ), mxTable( xTable )
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvxXMLTableImportContext::~SvxXMLTableImportContext()
+/*N*/ {
+/*N*/ }
+
+/*N*/ SvXMLImportContext *SvxXMLTableImportContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
+/*N*/ {
+/*N*/ if( XML_NAMESPACE_DRAW == nPrefix )
+/*N*/ {
+/*N*/ try
+/*N*/ {
+/*N*/ Any aAny;
+/*N*/ OUString aName;
+/*N*/
+/*N*/ switch( meContext )
+/*N*/ {
+/*N*/ case stice_color:
+/*N*/ importColor( nPrefix, rLocalName, xAttrList, aAny, aName );
+/*N*/ break;
+/*N*/ case stice_marker:
+/*N*/ importMarker( nPrefix, rLocalName, xAttrList, aAny, aName );
+/*N*/ break;
+/*N*/ case stice_dash:
+/*N*/ importDash( nPrefix, rLocalName, xAttrList, aAny, aName );
+/*N*/ break;
+/*N*/ case stice_hatch:
+/*N*/ importHatch( nPrefix, rLocalName, xAttrList, aAny, aName );
+/*N*/ break;
+/*N*/ case stice_gradient:
+/*N*/ importGradient( nPrefix, rLocalName, xAttrList, aAny, aName );
+/*N*/ break;
+/*N*/ case stice_bitmap:
+/*N*/ importBitmap( nPrefix, rLocalName, xAttrList, aAny, aName );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( aName.getLength() && aAny.hasValue() )
+/*N*/ {
+/*N*/ if( mxTable->hasByName( aName ) )
+/*N*/ {
+/*?*/ mxTable->replaceByName( aName, aAny );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ mxTable->insertByName( aName, aAny );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ catch( uno::Exception& e )
+/*N*/ {
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+/*N*/ }
+
+/*N*/ void SvxXMLTableImportContext::importColor( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName )
+/*N*/ {
+/*N*/ const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+/*N*/ for( sal_Int16 i=0; i < nAttrCount; i++ )
+/*N*/ {
+/*N*/ const OUString& rFullAttrName = xAttrList->getNameByIndex( i );
+/*N*/ OUString aLocalName;
+/*N*/ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rFullAttrName, &aLocalName );
+/*N*/
+/*N*/
+/*N*/ if( XML_NAMESPACE_DRAW == nPrefix )
+/*N*/ {
+/*N*/ if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) )
+/*N*/ {
+/*N*/ rName = xAttrList->getValueByIndex( i );
+/*N*/ }
+/*N*/ else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_color ) ) )
+/*N*/ {
+/*N*/ Color aColor;
+/*N*/ SvXMLUnitConverter::convertColor(aColor, xAttrList->getValueByIndex( i ));
+/*N*/ rAny <<= (sal_Int32)aColor.GetColor();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void SvxXMLTableImportContext::importMarker( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName )
+/*N*/ {
+/*N*/ XMLMarkerStyleImport aMarkerStyle( GetImport() );
+/*N*/ aMarkerStyle.importXML( xAttrList, rAny, rName );
+/*N*/ }
+
+/*N*/ void SvxXMLTableImportContext::importDash( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName )
+/*N*/ {
+/*N*/ XMLDashStyleImport aDashStyle( GetImport() );
+/*N*/ aDashStyle.importXML( xAttrList, rAny, rName );
+/*N*/ }
+
+/*N*/ void SvxXMLTableImportContext::importHatch( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName )
+/*N*/ {
+/*N*/ XMLHatchStyleImport aHatchStyle( GetImport() );
+/*N*/ aHatchStyle.importXML( xAttrList, rAny, rName );
+/*N*/ }
+
+/*N*/ void SvxXMLTableImportContext::importGradient( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName )
+/*N*/ {
+/*N*/ XMLGradientStyleImport aGradientStyle( GetImport() );
+/*N*/ aGradientStyle.importXML( xAttrList, rAny, rName );
+/*N*/ }
+
+/*N*/ void SvxXMLTableImportContext::importBitmap( USHORT nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName )
+/*N*/ {
+/*N*/ XMLImageStyle aImageStyle;
+/*N*/ aImageStyle.importXML( xAttrList, rAny, rName, GetImport() );
+/*N*/ }
+
+///////////////////////////////////////////////////////////////////////
+
+/*N*/ // #110680#
+/*N*/ SvxXMLXTableImport::SvxXMLXTableImport(
+/*N*/ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+/*N*/ const Reference< XNameContainer > & rTable,
+/*N*/ Reference< XGraphicObjectResolver >& xGrfResolver )
+/*N*/ : SvXMLImport(xServiceFactory),
+/*N*/ mrTable( rTable )
+/*N*/ {
+/*N*/ SetGraphicResolver( xGrfResolver );
+/*N*/ }
+
+/*N*/ SvxXMLXTableImport::~SvxXMLXTableImport() throw ()
+/*N*/ {
+/*N*/ }
+
+/*N*/ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const Reference< XNameContainer >& xTable ) throw()
+/*N*/ {
+/*N*/ sal_Bool bRet = sal_True;
+/*N*/
+/*N*/ Reference< XGraphicObjectResolver > xGrfResolver;
+/*N*/ SvXMLGraphicHelper* pGraphicHelper = 0;
+/*N*/
+/*N*/ try
+/*N*/ {
+/*N*/ do
+/*N*/ {
+/*N*/ SfxMedium aMedium( rUrl, STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/
+/*N*/ uno::Reference<lang::XMultiServiceFactory> xServiceFactory( ::legacy_binfilters::getLegacyProcessServiceFactory() );
+/*N*/ if( !xServiceFactory.is() )
+/*N*/ {
+/*N*/ DBG_ERROR( "SvxXMLXTableImport::load: got no service manager" );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< xml::sax::XParser > xParser( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" ) ) ), uno::UNO_QUERY );
+/*N*/ if( !xParser.is() )
+/*N*/ {
+/*N*/ DBG_ERROR( "com.sun.star.xml.sax.Parser service missing" );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ SvStorageStreamRef xIStm;
+/*N*/ uno::Reference< io::XActiveDataSource > xSource;
+/*N*/
+/*N*/ SvStorage* pStorage = aMedium.GetStorage();
+/*N*/
+/*N*/ xml::sax::InputSource aParserInput;
+/*N*/ aParserInput.sSystemId = aMedium.GetName();
+/*N*/
+/*N*/ if( pStorage )
+/*N*/ {
+/*N*/ const String aContentStmName( RTL_CONSTASCII_USTRINGPARAM( "Content.xml" ) );
+/*N*/
+/*N*/ xIStm = pStorage->OpenStream( aContentStmName, STREAM_READ | STREAM_NOCREATE );
+/*N*/ if( !xIStm.Is() )
+/*N*/ {
+/*N*/ DBG_ERROR( "could not open Content stream" );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ xIStm->SetBufferSize( 16 * 1024 );
+/*N*/ aParserInput.aInputStream = new ::utl::OInputStreamWrapper( *xIStm );
+/*N*/
+/*N*/ pGraphicHelper = SvXMLGraphicHelper::Create( *pStorage, GRAPHICHELPER_MODE_READ );
+/*N*/ xGrfResolver = pGraphicHelper;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aParserInput.aInputStream = aMedium.GetInputStream();
+/*N*/ Reference< io::XSeekable > xSeek( aParserInput.aInputStream, UNO_QUERY );
+/*N*/ if ( xSeek.is() )
+/*N*/ xSeek->seek( 0 );
+/*N*/ }
+/*N*/
+/*N*/ if( xSource.is() )
+/*N*/ {
+/*?*/ Reference< io::XActiveDataControl > xSourceControl( xSource, UNO_QUERY );
+/*?*/ xSourceControl->start();
+/*N*/ }
+/*N*/
+/*N*/ // #110680#
+/*N*/ // Reference< XDocumentHandler > xHandler( new SvxXMLXTableImport( xTable, xGrfResolver ) );
+/*N*/ Reference< XDocumentHandler > xHandler( new SvxXMLXTableImport( xServiceFactory, xTable, xGrfResolver ) );
+/*N*/
+/*N*/ xParser->setDocumentHandler( xHandler );
+/*N*/ xParser->parseStream( aParserInput );
+/*N*/ }
+/*N*/ while(0);
+/*N*/
+/*N*/ if( pGraphicHelper )
+/*N*/ SvXMLGraphicHelper::Destroy( pGraphicHelper );
+/*N*/ }
+/*N*/ catch( uno::Exception& e )
+/*N*/ {
+/*N*/ bRet = sal_False;
+/*N*/ }
+/*N*/
+/*N*/ return bRet;
+/*N*/ }
+
+/*N*/ SvXMLImportContext *SvxXMLXTableImport::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
+/*N*/ {
+/*N*/ if( XML_NAMESPACE_OFFICE == nPrefix )
+/*N*/ {
+/*N*/ Type aType = mrTable->getElementType();
+/*N*/
+/*N*/ if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "color-table" ) ) )
+/*N*/ {
+/*N*/ if( aType == ::getCppuType((const sal_Int32*)0) )
+/*N*/ return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_color, mrTable );
+/*N*/ }
+/*N*/ else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "marker-table" ) ) )
+/*N*/ {
+/*N*/ if( aType == ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) )
+/*N*/ return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_marker, mrTable );
+/*N*/ }
+/*N*/ else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dash-table" ) ) )
+/*N*/ {
+/*N*/ if( aType == ::getCppuType((const drawing::LineDash*)0) )
+/*N*/ return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_dash, mrTable );
+/*N*/ }
+/*N*/ else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hatch-table" ) ) )
+/*N*/ {
+/*N*/ if( aType == ::getCppuType((const drawing::Hatch*)0) )
+/*N*/ return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_hatch, mrTable );
+/*N*/ }
+/*N*/ else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gradient-table" ) ) )
+/*N*/ {
+/*N*/ if( aType == ::getCppuType((const awt::Gradient*)0))
+/*N*/ return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_gradient, mrTable );
+/*N*/ }
+/*N*/ else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bitmap-table" ) ) )
+/*N*/ {
+/*N*/ if( aType == ::getCppuType((const OUString*)0))
+/*N*/ return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_bitmap, mrTable );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*?*/ return new SvXMLImportContext( *this, nPrefix, rLocalName );
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/makefile.mk b/binfilter/bf_svx/source/xoutdev/makefile.mk
new file mode 100644
index 000000000000..86186821a852
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/makefile.mk
@@ -0,0 +1,72 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..$/..
+BFPRJ=..$/..
+
+PRJNAME=binfilter
+
+NO_HIDS=TRUE
+TARGET=svx_xout
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(BFPRJ)$/util$/makefile.pmk
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Files --------------------------------------------------------
+
+SLOFILES= \
+ $(SLO)$/svx_xout.obj \
+ $(SLO)$/svx_xout1.obj \
+ $(SLO)$/svx_xattr.obj \
+ $(SLO)$/svx_xattr2.obj \
+ $(SLO)$/svx_xattrbmp.obj \
+ $(SLO)$/svx_xline.obj \
+ $(SLO)$/svx_xpool.obj \
+ $(SLO)$/svx_xtable.obj \
+ $(SLO)$/svx_xtabcolr.obj \
+ $(SLO)$/svx_xtablend.obj \
+ $(SLO)$/svx_xtabdash.obj \
+ $(SLO)$/svx_xtabhtch.obj \
+ $(SLO)$/svx_xtabgrdt.obj \
+ $(SLO)$/svx_xtabbtmp.obj \
+ $(SLO)$/svx_xiocomp.obj \
+ $(SLO)$/svx__xpoly.obj \
+ $(SLO)$/svx__ximp.obj \
+ $(SLO)$/svx__xoutbmp.obj \
+ $(SLO)$/svx__xfont.obj
+
+HXXCOPYFILES=\
+ $(PRJ)$/inc$/bf_svx$/xenum.hxx
+
+
+.INCLUDE : target.mk
diff --git a/binfilter/bf_svx/source/xoutdev/svx__xfont.cxx b/binfilter/bf_svx/source/xoutdev/svx__xfont.cxx
new file mode 100644
index 000000000000..fdbb82be370d
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx__xfont.cxx
@@ -0,0 +1,703 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <vcl/metric.hxx>
+#include <vcl/virdev.hxx>
+#include <math.h>
+
+#include <bf_svx/xdef.hxx>
+
+#include "xoutx.hxx"
+
+// #101498#
+#include "outliner.hxx"
+
+
+#include <com/sun/star/i18n/ScriptType.hdl>
+
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+
+
+#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
+
+#include "unolingu.hxx"
+#include <legacysmgr/legacy_binfilters_smgr.hxx> //STRIP002
+namespace binfilter {
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::i18n;
+
+/*************************************************************************
+|*
+|* XOutGetCharOutline()
+|*
+|* Ein Zeichen eines Outlinefonts in ein Bezier-PolyPolygon umwandeln
+|* Wenn keine Umwandlung moeglich ist, wird ein leeres PolyPolygon
+|* zurueckgegeben
+|* Ersterstellung 12.01.95 ESO
+|* Letzte Aenderung 09.05.95 ESO
+|*
+*************************************************************************/
+
+// #102382# Remove XOutGetCharOutline
+// #100318# deprecated, use XOutGetTextOutline
+//XPolyPolygon XOutGetCharOutline( USHORT nChar, OutputDevice& rOut, BOOL bOptimizeSize )
+//{
+// PolyPolygon aPolyPoly;
+//
+// //if( !rOut.GetGlyphOutline( (xub_Unicode) nChar, aPolyPoly, bOptimizeSize ) && rOut.GetOutDevType() == OUTDEV_PRINTER )
+// // #97492#
+// String aGlyphString((xub_Unicode) nChar);
+//
+// if( !rOut.GetTextOutline(aPolyPoly, aGlyphString) && OUTDEV_PRINTER == rOut.GetOutDevType())
+// {
+// VirtualDevice aVDev;
+// aVDev.SetMapMode( rOut.GetMapMode() );
+// aVDev.SetFont( rOut.GetFont() );
+// aVDev.SetTextAlign( rOut.GetTextAlign() );
+// // #97492#
+// //aVDev.GetGlyphOutline( (xub_Unicode) nChar, aPolyPoly, FALSE );
+// aVDev.GetTextOutline(aPolyPoly, aGlyphString);
+// }
+//
+// // #97492# since GetTextOutline(...) is base line oriented, the
+// // polygon needs to be moved one line height
+// aPolyPoly.Move(0, rOut.GetFontMetric().GetAscent());
+//
+// return XPolyPolygon( aPolyPoly );
+//}
+
+// #100318# new for XOutGetCharOutline
+// #102382# new interface for XOutGetTextOutline to support PolyPolyVector
+/*N*/ sal_Bool XOutGetTextOutlines(PolyPolyVector& rPolyPolyVector, const String& rText, OutputDevice& rOut,
+/*N*/ xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen)
+/*N*/ {
+/*N*/ // #102382# use GetTextOutlines and PolyPolyVector now
+/*N*/ if(!rOut.GetTextOutlines(rPolyPolyVector, rText, nBase, nIndex, nLen) && OUTDEV_PRINTER == rOut.GetOutDevType())
+/*N*/ {
+/*?*/ VirtualDevice aVDev;
+/*?*/
+/*?*/ aVDev.SetMapMode(rOut.GetMapMode());
+/*?*/ aVDev.SetFont(rOut.GetFont());
+/*?*/ aVDev.SetTextAlign(rOut.GetTextAlign());
+/*?*/
+/*?*/ // #102382# use GetTextOutlines and PolyPolyVector now
+/*?*/ aVDev.GetTextOutlines(rPolyPolyVector, rText, nBase, nIndex, nLen);
+/*N*/ }
+
+ // since GetTextOutline(...) is base line oriented, the
+ // polygon needs to be moved one line height
+ // #102382# now a loop is necessary for moving all contained single PolyPolygons
+/*N*/ for(sal_uInt32 a(0); a < rPolyPolyVector.size(); a++)
+/*N*/ {
+/*N*/ rPolyPolyVector[a].Move(0, rOut.GetFontMetric().GetAscent());
+/*N*/ }
+/*N*/
+/*N*/ return (rPolyPolyVector.size() != 0);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::ImpDrawFormText(String, Polygon, Font, nAbsStart)
+|*
+|* Einen String entlang eines Polygons ausgeben; nAbsStart
+|* ueberschreibt den XFormTextStartItem-Wert und wird fuer die
+|* Ausgabe mehrerer Strings entlang des gleichen Polygons benoetigt.
+|* Rueckgabewert ist die Endposition des ausgegebenen Textes in
+|* Bezug auf den Linienanfang.
+|*
+|* nAbsStart < 0: Die Gesamtlaenge aller Strings, notwendig fuer
+|* alle Formatierungen ausser Linksbuendig
+|* <= 0: Item-Startwert verwenden
+|* > 0: Text an dieser absoluten Position ausgeben; ist
+|* normalerweise der Rueckgabewert eines vorigen
+|* DrawFormText-Aufrufs
+|*
+|* bToLastPoint: alle Linien einschliesslich der letzten Zeichnen,
+|* sonst die letzte Linie auslassen
+|*
+|* bDraw: wenn FALSE, wird nichts ausgegeben, sondern nur das BoundRect
+|* berechnet
+|*
+|* pDXArray: wenn vorhanden, enthaelt dieses Array die horizontalen
+|* Positionen der einzelnen Zeichen, beginnend beim ersten
+|* und endend hinter dem letzten Zeichen; es muß also
+|* rText.Len()-1 long-Werte enthalten
+|*
+|*
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 11.10.95 ESO
+|*
+*************************************************************************/
+
+// #101498# Helper method ImpGetTextLength to get text length taking into account
+// hor/vertical and BIDI, especially right-to-left.
+/*N*/ sal_Int32 ImpGetTextLength(OutputDevice* pOut, DrawPortionInfo* pInfo, sal_Int32* pDXArray,
+/*N*/ xub_StrLen nIndex, xub_StrLen nLen)
+/*N*/ {
+/*N*/ sal_Bool bRightToLeft = pInfo->IsRTL();
+/*N*/ sal_Int32 nRetval(0L);
+/*N*/
+/*N*/ if(pInfo->rFont.IsVertical())
+/*N*/ {
+/*?*/ nRetval = pOut->GetTextHeight() * (sal_Int32)nLen;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ if(bRightToLeft)
+/*N*/ {
+/*?*/ nRetval = pOut->GetTextArray(pInfo->rText, pDXArray,
+/*?*/ pInfo->nTextStart + (pInfo->nTextLen - (nIndex + nLen)),
+/*?*/ nLen);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nRetval = pOut->GetTextArray(pInfo->rText, pDXArray,
+/*N*/ pInfo->nTextStart + nIndex,
+/*N*/ nLen);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return nRetval;
+/*N*/ }
+
+// #101498# Helper method ImpDrawTextArray to draw text taking into account
+// hor/vertical and BIDI, especially right-to-left.
+
+// #101498# Helper method ImpXOutGetTextOutline to get text outline taking into account
+// hor/vertical and BIDI, especially right-to-left.
+// #102382# new interface for XOutGetTextOutline to support PolyPolyVector
+/*N*/ sal_Bool ImpXOutGetTextOutlines(PolyPolyVector& rPolyPolyVector, OutputDevice* pOut, DrawPortionInfo* pInfo,
+/*N*/ xub_StrLen nIndex, xub_StrLen nLen)
+/*N*/ {
+/*N*/ sal_Bool bRightToLeft(pInfo->IsRTL());
+/*N*/
+/*N*/ if(bRightToLeft)
+/*N*/ {
+/*?*/ return XOutGetTextOutlines(rPolyPolyVector, pInfo->rText, *pOut,
+/*?*/ pInfo->nTextStart + (pInfo->nTextLen - (nIndex + nLen)),
+/*?*/ pInfo->nTextStart + (pInfo->nTextLen - (nIndex + nLen)),
+/*?*/ nLen);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ return XOutGetTextOutlines(rPolyPolyVector, pInfo->rText, *pOut,
+/*N*/ pInfo->nTextStart + nIndex,
+/*N*/ pInfo->nTextStart + nIndex,
+/*N*/ nLen);
+/*N*/ }
+/*N*/ }
+
+// #101498# changed interface due to bidi requirements
+/*N*/ sal_Int32 XOutputDevice::ImpDrawFormText(DrawPortionInfo* pInfo, const Polygon& rPoly, sal_Int32 nAbsStart,
+/*N*/ sal_Bool bToLastPoint, sal_Bool bDraw, sal_Bool bIsShadow)
+/*N*/ {
+/*N*/ Font aFont = pInfo->rFont;
+/*N*/ const sal_Int32* pDXArray = pInfo->pDXArray;
+/*N*/ sal_Bool bUseBreakIterator(sal_False);
+/*N*/
+/*N*/ Reference < ::com::sun::star::i18n::XBreakIterator > xBreak;
+/*N*/ Reference < XMultiServiceFactory > xMSF = ::legacy_binfilters::getLegacyProcessServiceFactory();
+/*N*/ Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"));
+/*N*/ ::com::sun::star::lang::Locale aFontLocale = SvxCreateLocale(pInfo->rFont.GetLanguage());
+/*N*/
+/*N*/ if(xInterface.is())
+/*N*/ {
+/*N*/ Any x = xInterface->queryInterface(::getCppuType((const Reference< XBreakIterator >*)0));
+/*N*/ x >>= xBreak;
+/*N*/ }
+/*N*/
+/*N*/ if(xBreak.is())
+/*N*/ {
+/*N*/ bUseBreakIterator = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ long nXMin = LONG_MAX, nYMin = LONG_MAX;
+/*N*/ long nXMax = LONG_MIN, nYMax = LONG_MIN;
+/*N*/ long nMaxCharExtent;
+/*N*/ long nPolyLen = 0;
+/*N*/ long nTextLen = 0;
+/*N*/ long nTotal = 0;
+/*N*/ long nTextWidth;
+/*N*/ long nStart;
+/*N*/ long nShadowX;
+/*N*/ USHORT nPntCnt = rPoly.GetSize();
+/*N*/ USHORT nLastPnt;
+/*N*/ USHORT nPnt;
+/*N*/ xub_StrLen nChar(0);
+/*N*/ const xub_StrLen nCharCnt(pInfo->nTextLen);
+/*N*/ short nDirection;
+
+/*N*/ if ( nPntCnt < 2 || !nCharCnt)
+/*N*/ return 0;
+
+/*N*/ BOOL bIsSlantShadow = ( bIsShadow && eFormTextShadow == XFTSHADOW_SLANT );
+/*N*/ BOOL bDrawAsPoly = ( bFormTextOutline || bIsSlantShadow );
+
+/*N*/ if ( nAbsStart > 0 ) nStart = nAbsStart;
+/*N*/ else nStart = nFormTextStart;
+
+/*N*/ aFont.SetTransparent(TRUE);
+
+ // Attribute sichern
+/*N*/ XLineStyle eOldLineStyle = eLineStyle;
+/*N*/ XFillStyle eOldFillStyle = eFillStyle;
+
+/*N*/ Color aOldLineColor( pOut->GetLineColor() );
+
+/*N*/ pOut->SetFillColor( aFont.GetColor() );
+
+/*N*/ if ( !(bFormTextOutline && bHair) || bIsShadow )
+/*N*/ pOut->SetLineColor();
+/*N*/
+/*N*/ if ( !bFormTextOutline || bIsShadow )
+/*N*/ eLineStyle = XLINE_NONE;
+/*N*/
+/*N*/ eFillStyle = XFILL_SOLID;
+/*N*/
+/*N*/ if ( eFormTextAdjust == XFT_AUTOSIZE && nAbsStart > 0 )
+/*?*/ aFont.SetSize(Size(0, nFtAutoHeightSave));
+/*N*/
+/*N*/ Font aOldFont = pOut->GetFont();
+/*N*/ pOut->SetFont(aFont);
+/*N*/ long nAscent = pOut->GetFontMetric().GetAscent();
+/*N*/
+/*N*/ // #78478# outline text in FontWork
+/*N*/ if(bFormTextOutline)
+/*N*/ {
+/*?*/ eLineStyle = XLINE_SOLID;
+/*?*/ pOut->SetLineColor(aLineColor);
+/*N*/ }
+/*N*/
+/*N*/ if ( eFormTextAdjust == XFT_AUTOSIZE )
+/*N*/ {
+/*N*/ // bei Autosize den Arrayinhalt immer ignorieren
+/*N*/ pDXArray = NULL;
+/*N*/ }
+/*N*/
+/*N*/ nTextWidth = ImpGetTextLength(pOut, pInfo, const_cast<sal_Int32*>(pDXArray), 0, pInfo->nTextLen);
+/*N*/
+/*N*/ if ( eFormTextAdjust != XFT_LEFT && nAbsStart <= 0 )
+/*N*/ {
+/*N*/ // Gesamtlaenge des Polygons berechnen
+/*N*/ USHORT nMax = nPntCnt;
+/*N*/ nPnt = 1;
+/*N*/
+/*N*/ if ( !bToLastPoint )
+/*N*/ nMax--;
+/*N*/
+/*N*/ for ( ; nPnt < nMax; nPnt++)
+/*N*/ {
+/*N*/ double fDx = rPoly[nPnt].X() - rPoly[nPnt-1].X();
+/*N*/ double fDy = rPoly[nPnt].Y() - rPoly[nPnt-1].Y();
+/*N*/ nPolyLen += (long) (sqrt(fDx * fDx + fDy * fDy) + 0.5);
+/*N*/ }
+/*N*/
+/*N*/ if ( nAbsStart == 0 )
+/*N*/ nAbsStart = - nTextWidth;
+/*N*/
+/*N*/ if ( eFormTextAdjust == XFT_AUTOSIZE )
+/*N*/ {
+/*N*/ nFtAutoHeightSave = aFont.GetSize().Height();
+/*N*/ nFtAutoHeightSave = - (nPolyLen * nFtAutoHeightSave / nAbsStart);
+/*N*/ aFont.SetSize(Size(0, nFtAutoHeightSave));
+/*N*/ pOut->SetFont(aFont);
+/*N*/ nFtAutoHeightSave = aFont.GetSize().Height();
+/*N*/ nTextWidth = pOut->GetTextWidth(pInfo->rText, pInfo->nTextStart, pInfo->nTextLen);
+/*N*/ nAscent = pOut->GetFontMetric().GetAscent();
+/*N*/ nAbsStart = - nPolyLen;
+/*N*/ }
+/*N*/ // Bei rechtsbuendiger Ausgabe auch Startposition beruecksichtigen
+/*N*/ if ( eFormTextAdjust == XFT_RIGHT )
+/*N*/ nAbsStart -= nStart;
+/*N*/ nStart = nPolyLen + nAbsStart;
+/*N*/
+/*N*/ if ( eFormTextAdjust != XFT_RIGHT )
+/*N*/ nStart /= 2;
+/*N*/ }
+/*N*/ if ( nStart < 0 )
+/*N*/ nStart = 0;
+/*N*/
+/*N*/ if ( bIsShadow && eFormTextShadow != XFTSHADOW_SLANT )
+/*N*/ nShadowX = nFormTextShdwXVal;
+/*N*/ else
+/*N*/ nShadowX = 0;
+/*N*/
+/*N*/ nTotal = nStart + nTextWidth;
+/*N*/
+/*N*/ if ( bIsShadow && eFormTextShadow == XFTSHADOW_SLANT &&
+/*N*/ nFormTextShdwYVal && nFormTextShdwYVal != 100 )
+/*N*/ nAscent = nAscent * nFormTextShdwYVal / 100;
+/*N*/
+/*N*/ // Maximaler Zeichenbereich ca. 1,4 (sqrt(2)) * Ascent fuer BoundRect
+/*N*/ nMaxCharExtent = nAscent * 7 / 5;
+/*N*/
+/*N*/ // Laufrichtung des Polygons ggf. spiegeln
+/*N*/ if ( bFormTextMirror )
+/*N*/ {
+/*N*/ nDirection = -1;
+/*N*/ nLastPnt = (USHORT) -1;
+/*N*/ nPnt = nPntCnt - 2;
+/*N*/ if ( !bToLastPoint )
+/*N*/ nPnt--;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nDirection = 1;
+/*N*/ nLastPnt = nPntCnt - 1;
+/*N*/ nPnt = 1;
+/*N*/ if ( bToLastPoint )
+/*N*/ nLastPnt++;
+/*N*/ }
+/*N*/
+/*N*/ while ( nChar < nCharCnt && nPnt != nLastPnt )
+/*N*/ {
+/*N*/ xub_StrLen nGlyphLen(1);
+/*N*/
+/*N*/ if(bUseBreakIterator)
+/*N*/ {
+/*N*/ sal_Int32 nDone(0L);
+/*N*/ nGlyphLen = (xub_StrLen)xBreak->nextCharacters( pInfo->rText, nChar + pInfo->nTextStart, aFontLocale,
+/*N*/ CharacterIteratorMode::SKIPCELL, 1, nDone) - (nChar + pInfo->nTextStart);
+/*N*/ }
+/*N*/
+/*N*/ Point aPos = rPoly[nPnt];
+/*N*/ double fDx, fDy, fLen;
+/*N*/ long nLen, nChar1Len;
+/*N*/
+/*N*/ fDx = aPos.X() - rPoly[nPnt-nDirection].X();
+/*N*/ fDy = aPos.Y() - rPoly[nPnt-nDirection].Y();
+/*N*/ fLen = sqrt(fDx * fDx + fDy * fDy);
+/*N*/ nLen = (long) (fLen + 0.5);
+/*N*/
+/*N*/ nChar1Len = ImpGetTextLength(pOut, pInfo, const_cast<sal_Int32*>(pDXArray), nChar, nGlyphLen);
+/*N*/
+/*N*/ double fXDist, fYDist;
+/*N*/ double fCos = fDx;
+/*N*/ double fSin = fDy;
+/*N*/ double fPartLen = fLen;
+/*N*/ double fLenSum = fLen - nTextLen;
+/*N*/ USHORT nSumPnt = nPnt + nDirection;
+/*N*/
+/*N*/ // Laenge halbieren, um Zeichenmitte als Referenzpunkt zu verwenden
+/*N*/ nChar1Len /= 2;
+/*N*/
+/*N*/ while ( nSumPnt != nLastPnt && fLenSum < nChar1Len )
+/*N*/ {
+/*N*/ fCos = rPoly[nSumPnt].X() - rPoly[nSumPnt-nDirection].X();
+/*N*/ fSin = rPoly[nSumPnt].Y() - rPoly[nSumPnt-nDirection].Y();
+/*N*/ fPartLen = sqrt(fSin * fSin + fCos * fCos);
+/*N*/ fLenSum += fPartLen;
+/*N*/ nSumPnt += nDirection;
+/*N*/ }
+/*N*/ fSin /= - fPartLen;
+/*N*/ fCos /= fPartLen;
+/*N*/
+/*N*/ fXDist = fSin * nFormTextDistance;
+/*N*/ fYDist = fCos * nFormTextDistance;
+/*N*/
+/*N*/ if ( nStart > 0 )
+/*N*/ nStart -= nLen;
+/*N*/ else
+/*N*/ {
+/*N*/ nLen -= nTextLen;
+/*N*/ nTextLen = - nLen;
+/*N*/ }
+/*N*/
+/*N*/ if ( nLen > 0 && nStart <= 0 )
+/*N*/ {
+/*N*/ xub_StrLen nCnt(0);
+/*N*/
+/*N*/ if ( nStart < 0 )
+/*N*/ {
+/*N*/ nLen = - nStart;
+/*N*/ nStart = 0;
+/*N*/ }
+/*N*/
+/*N*/ do
+/*N*/ {
+/*N*/ xub_StrLen nNextGlyphLen(1);
+/*N*/
+/*N*/ if(bUseBreakIterator)
+/*N*/ {
+/*N*/ sal_Int32 nDone(0L);
+/*N*/ nNextGlyphLen = (xub_StrLen)xBreak->nextCharacters( pInfo->rText, nChar + pInfo->nTextStart + nCnt, aFontLocale,
+/*N*/ CharacterIteratorMode::SKIPCELL, 1, nDone) - (nChar + pInfo->nTextStart + nCnt);
+/*N*/ }
+/*N*/
+/*N*/ nTextLen = ImpGetTextLength(pOut, pInfo, const_cast<sal_Int32*>(pDXArray), nChar, nCnt + nNextGlyphLen);
+/*N*/
+/*N*/ nCnt += nNextGlyphLen;
+/*N*/ }
+/*N*/ while ( nChar + nCnt < nCharCnt && nTextLen < nLen );
+/*N*/
+/*N*/ aPos.X() -= (long) (fDx * (nLen - nShadowX) / fLen + fXDist);
+/*N*/ aPos.Y() -= (long) (fDy * (nLen - nShadowX) / fLen + fYDist);
+/*N*/
+/*N*/ // BoundRect-Approximation
+/*N*/ nXMin = Min(nXMin, aPos.X() - nMaxCharExtent);
+/*N*/ nYMin = Min(nYMin, aPos.Y() - nMaxCharExtent);
+/*N*/ nXMax = Max(nXMax, aPos.X() + nMaxCharExtent);
+/*N*/ nYMax = Max(nYMax, aPos.Y() + nMaxCharExtent);
+/*N*/
+/*N*/ if ( eFormTextStyle == XFT_ROTATE )
+/*N*/ {
+/*N*/ if ( bDrawAsPoly )
+/*N*/ {
+/*N*/ // #101145# Do create outline polygons more efficient
+/*N*/ // #102382# new interface supporting PolyPolyVector
+/*N*/ PolyPolyVector aPolyPolyVector;
+/*N*/ sal_Bool bOkay(ImpXOutGetTextOutlines(aPolyPolyVector, pOut, pInfo, nChar, nCnt));
+/*N*/
+/*N*/ // #102382# iterate over single PolyPolygons
+/*N*/ for(sal_uInt32 a(0); a < aPolyPolyVector.size(); a++)
+/*N*/ {
+/*N*/ PolyPolygon aPolyPoly(aPolyPolyVector[a]);
+/*N*/
+/*N*/ if(aPolyPoly.Count() > 0 && aPolyPoly[0].GetSize() > 0)
+/*N*/ {
+/*N*/ XPolyPolygon aChar(aPolyPoly);
+/*N*/
+/*N*/ // #102382# new interface supporting PolyPolyVector
+/*N*/ if(bIsSlantShadow)
+/*N*/ {
+/*N*/ if(nFormTextShdwYVal && 100 != nFormTextShdwYVal)
+/*N*/ {
+/*?*/ aChar.Scale(1.0, (double)nFormTextShdwYVal / 100.0);
+/*N*/ }
+/*N*/
+/*N*/ aChar.SlantX(nAscent,
+/*N*/ sin(- F_PI * nFormTextShdwXVal / 1800.0),
+/*N*/ cos(- F_PI * nFormTextShdwXVal / 1800.0));
+/*N*/ }
+/*N*/
+/*N*/ aChar.Translate(Point(aPos.X(), aPos.Y() - nAscent));
+/*N*/ aChar.Rotate(aPos, fSin, fCos);
+/*N*/
+/*N*/ if(bDraw)
+/*N*/ {
+/*?*/ DrawXPolyPolygon(aChar);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ // #83801# vertical writing for contour
+/*?*/ if(aFont.IsVertical())
+/*?*/ {
+/*?*/ short nAngle = (short) (acos(fCos) * 1800 / F_PI + 0.5);
+/*?*/ if(fSin < 0)
+/*?*/ nAngle = 3600 - nAngle;
+/*?*/ nAngle += 2700;
+/*?*/ aFont.SetOrientation(nAngle);
+/*?*/ pOut->SetFont(aFont);
+/*?*/ if(bDraw)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ short nAngle = (short) (acos(fCos) * 1800 / F_PI + 0.5);
+/*N*/ if(fSin < 0)
+/*N*/ nAngle = 3600 - nAngle;
+/*N*/ aFont.SetOrientation(nAngle);
+/*N*/ pOut->SetFont(aFont);
+/*N*/ if(bDraw)
+/*N*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpDrawTextArray(pOut, aPos, pInfo, (long*)pDXArray, nChar, nCnt);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ bDrawAsPoly = ( bDrawAsPoly || eFormTextStyle != XFT_UPRIGHT);
+/*?*/
+/*?*/ for (xub_StrLen i = 0; i < nCnt;)
+/*?*/ {
+/*?*/ xub_StrLen nNextGlyphLen(1);
+/*?*/
+/*?*/ if(bUseBreakIterator)
+/*?*/ {
+/*?*/ sal_Int32 nDone(0L);
+/*?*/ nNextGlyphLen = (xub_StrLen)xBreak->nextCharacters( pInfo->rText, nChar + pInfo->nTextStart + i, aFontLocale,
+/*?*/ CharacterIteratorMode::SKIPCELL, 1, nDone) - (nChar + pInfo->nTextStart + i);
+/*?*/ }
+/*?*/
+/*?*/ XPolyPolygon aChar(0);
+/*?*/ Point aPolyPos = aPos;
+/*?*/
+/*?*/ if ( i > 0 )
+/*?*/ {
+/*?*/ long nW;
+/*?*/
+/*?*/ nW = ImpGetTextLength(pOut, pInfo, const_cast<sal_Int32*>(pDXArray), nChar, i);
+/*?*/
+/*?*/ aPolyPos.X() += (long) (fDx * nW / fLen);
+/*?*/ aPolyPos.Y() += (long) (fDy * nW / fLen);
+/*?*/ }
+/*?*/ if ( bDrawAsPoly )
+/*?*/ {
+/*?*/ // #100318# new for XOutGetCharOutline
+/*?*/ // #102382# new interface supporting PolyPolyVector
+/*?*/ PolyPolyVector aPolyPolyVector;
+/*?*/
+/*?*/ // #108756#
+/*?*/ // Here the wrong index was called for the ImpXOutGetTextOutlines(...)
+/*?*/ // call. nChar needs to be added here to index the different characters.
+/*?*/ sal_Bool bOkay(ImpXOutGetTextOutlines(aPolyPolyVector, pOut, pInfo, nChar + i, nNextGlyphLen));
+/*?*/
+/*?*/ // #102382# iterate over single PolyPolygons
+/*?*/ for(sal_uInt32 a(0); a < aPolyPolyVector.size(); a++)
+/*?*/ {
+/*?*/ PolyPolygon aPolyPoly(aPolyPolyVector[a]);
+/*?*/
+/*?*/ if(aPolyPoly.Count() > 0 && aPolyPoly[0].GetSize() > 0)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");//STRIP001
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ if ( eFormTextStyle == XFT_SLANTY )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ long nW;
+/*?*/
+/*?*/ nW = ImpGetTextLength(pOut, pInfo, const_cast<sal_Int32*>(pDXArray), nChar + i, nNextGlyphLen);
+/*?*/
+/*?*/ aPolyPos.X() -= nW / 2;
+/*?*/
+/*?*/ if ( eFormTextStyle == XFT_SLANTX )
+/*?*/ {
+/*?*/ aPolyPos.X() += (long) (fDy * nAscent / fLen);
+/*?*/ aPolyPos.Y() -= (long) (fDx * nAscent / fLen);
+/*?*/ aChar.SlantX(0, fSin, fCos);
+/*?*/ }
+/*?*/ else if ( bDrawAsPoly )
+/*?*/ aPolyPos.Y() -= nAscent;
+/*?*/ }
+/*?*/ aChar.Translate(aPolyPos);
+/*?*/
+/*?*/ if ( bDraw )
+/*?*/ {
+/*?*/ if ( bDrawAsPoly )
+/*?*/ DrawXPolyPolygon(aChar);
+/*?*/ else
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpDrawTextArray(pOut, aPolyPos, pInfo, (long*)pDXArray, nChar + i, nNextGlyphLen);
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ i += nNextGlyphLen;
+/*?*/ }
+/*N*/ }
+/*N*/ nChar += nCnt;
+/*N*/ nTextLen -= nLen;
+/*N*/ }
+/*N*/ nPnt += nDirection;
+/*N*/ }
+/*N*/ // auch letzten Punkt fuer BoundRect-Approximation beruecksichtigen
+/*N*/ Point aPos = rPoly[nPnt - nDirection];
+/*N*/ nXMin = Min(nXMin, aPos.X() - nMaxCharExtent);
+/*N*/ nYMin = Min(nYMin, aPos.Y() - nMaxCharExtent);
+/*N*/ nXMax = Max(nXMax, aPos.X() + nMaxCharExtent);
+/*N*/ nYMax = Max(nYMax, aPos.Y() + nMaxCharExtent);
+
+/*N*/ aFormTextBoundRect.Union(Rectangle(nXMin, nYMin, nXMax, nYMax));
+/*N*/
+/*N*/ pOut->SetFont(aOldFont);
+/*N*/ pOut->SetLineColor( aOldLineColor );
+/*N*/ eLineStyle = eOldLineStyle;
+/*N*/ eFillStyle = eOldFillStyle;
+/*N*/
+/*N*/ return nTotal;
+/*N*/ }
+
+// #101498# changed interface due to bidi requirements
+/*N*/ void XOutputDevice::ImpDrawFormTextShadow(DrawPortionInfo* pInfo, const Polygon& rPoly, sal_Int32 nAbsStart, sal_Bool bToLastPoint, sal_Bool bDraw)
+/*N*/ {
+/*N*/ if(XFTSHADOW_NONE != eFormTextShadow)
+/*N*/ {
+/*N*/ sal_Bool bOutline(bFormTextOutline);
+/*N*/ Font aShadowFont(pInfo->rFont);
+/*N*/
+/*N*/ aShadowFont.SetColor(aFormTextShdwColor);
+/*N*/
+/*N*/ DrawPortionInfo aNewInfo(
+/*N*/ pInfo->rStartPos,
+/*N*/ pInfo->rText,
+/*N*/ pInfo->nTextStart,
+/*N*/ pInfo->nTextLen,
+/*N*/ aShadowFont,
+/*N*/ pInfo->nPara,
+/*N*/ pInfo->nIndex,
+/*N*/ pInfo->pDXArray,
+/*N*/ pInfo->GetBiDiLevel());
+/*N*/
+/*N*/ if(XFTSHADOW_SLANT != eFormTextShadow)
+/*N*/ {
+/*N*/ nFormTextDistance += nFormTextShdwYVal;
+/*N*/ }
+/*N*/
+/*N*/ ImpDrawFormText(&aNewInfo, rPoly, nAbsStart, bToLastPoint, bDraw, sal_True);
+/*N*/
+/*N*/ if(XFTSHADOW_SLANT != eFormTextShadow)
+/*N*/ {
+/*N*/ nFormTextDistance -= nFormTextShdwYVal;
+/*N*/ }
+/*N*/
+/*N*/ bFormTextOutline = bOutline;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+*************************************************************************/
+
+// #101498# changed interface due to bidi requirements
+/*N*/ sal_Int32 XOutputDevice::DrawFormText(DrawPortionInfo* pInfo, const Polygon& rPoly,
+/*N*/ sal_Int32 nAbsStart, sal_Bool bToLastPoint, sal_Bool bDraw)
+/*N*/ {
+/*N*/ if(nAbsStart <= 0L)
+/*N*/ {
+/*N*/ // empty BoundRect at first call
+/*N*/ aFormTextBoundRect = Rectangle();
+/*N*/ }
+/*N*/
+/*N*/ ImpDrawFormTextShadow(pInfo, rPoly, nAbsStart, bToLastPoint, bDraw);
+/*N*/
+/*N*/ return ImpDrawFormText(pInfo, rPoly, nAbsStart, bToLastPoint, bDraw, sal_False);
+/*N*/ }
+
+// eof
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx__ximp.cxx b/binfilter/bf_svx/source/xoutdev/svx__ximp.cxx
new file mode 100644
index 000000000000..4143835094f0
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx__ximp.cxx
@@ -0,0 +1,222 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <algorithm>
+
+#include <stdlib.h>
+#include <vcl/virdev.hxx>
+#include <vcl/metaact.hxx>
+
+#include <bf_svx/xdef.hxx>
+
+#include "xoutx.hxx"
+namespace binfilter {
+
+// -----------
+// - Statics -
+// -----------
+
+#ifdef MAC
+ const BOOL XIMP_bDrawRasterOps = FALSE;
+#else
+ const BOOL XIMP_bDrawRasterOps = TRUE;
+#endif
+
+// -----------
+// - Defines -
+// -----------
+
+#define FILL_TILE 200
+
+// ----------------
+// - XOuputDevice -
+// ----------------
+
+/*N*/ void XOutputDevice::DrawFillPolyPolygon( const PolyPolygon& rPolyPoly, BOOL bRect )
+/*N*/ {
+/*N*/ if( ( eFillStyle != XFILL_NONE ) && iRotTransGradient() &&
+/*N*/ ( eFillStyle != XFILL_SOLID || iRotTransGradient()->GetStartColor() != iRotTransGradient()->GetEndColor() ) )
+/*N*/ {
+/*?*/ XGradient& rTransGradient = *iRotTransGradient();
+/*?*/ Gradient aVCLGradient;
+/*?*/ GDIMetaFile aMtf;
+/*?*/ VirtualDevice aVDev;
+/*?*/ OutputDevice* pOldOut = pOut;
+/*?*/ const Rectangle aBound( rPolyPoly.GetBoundRect() );
+/*?*/ MapMode aMap( pOldOut->GetMapMode() );
+/*?*/
+/*?*/ pOut = &aVDev;
+/*?*/ aVDev.EnableOutput( FALSE );
+/*?*/ aVDev.SetMapMode( pOldOut->GetMapMode() );
+/*?*/ aMtf.Record( &aVDev );
+/*?*/ aVDev.SetLineColor( pOldOut->GetLineColor() );
+/*?*/ aVDev.SetFillColor( pOldOut->GetFillColor() );
+/*?*/ aVDev.SetFont( pOldOut->GetFont() );
+/*?*/ aVDev.SetDrawMode( pOldOut->GetDrawMode() );
+/*?*/ aVDev.SetRefPoint( pOldOut->GetRefPoint() );
+/*?*/ ImpDrawFillPolyPolygon( rPolyPoly, bRect, pOldOut->GetOutDevType() == OUTDEV_PRINTER );
+/*?*/ aMtf.Stop();
+/*?*/ aMtf.WindStart();
+/*?*/ aMap.SetOrigin( aBound.TopLeft() );
+/*?*/ aMtf.SetPrefMapMode( aMap );
+/*?*/ aMtf.SetPrefSize( aBound.GetSize() );
+/*?*/ pOut = pOldOut;
+/*?*/
+/*?*/ aVCLGradient.SetStyle((GradientStyle)rTransGradient.GetGradientStyle());
+/*?*/ aVCLGradient.SetStartColor(rTransGradient.GetStartColor());
+/*?*/ aVCLGradient.SetEndColor(rTransGradient.GetEndColor());
+/*?*/ aVCLGradient.SetAngle((USHORT)rTransGradient.GetAngle());
+/*?*/ aVCLGradient.SetBorder(rTransGradient.GetBorder());
+/*?*/ aVCLGradient.SetOfsX(rTransGradient.GetXOffset());
+/*?*/ aVCLGradient.SetOfsY(rTransGradient.GetYOffset());
+/*?*/ aVCLGradient.SetStartIntensity(rTransGradient.GetStartIntens());
+/*?*/ aVCLGradient.SetEndIntensity(rTransGradient.GetEndIntens());
+/*?*/ aVCLGradient.SetSteps(rTransGradient.GetSteps());
+/*?*/
+/*?*/ pOut->DrawTransparent( aMtf, aBound.TopLeft(), aBound.GetSize(), aVCLGradient );
+/*N*/ }
+/*N*/ else
+/*N*/ ImpDrawFillPolyPolygon( rPolyPoly, bRect, pOut->GetOutDevType() == OUTDEV_PRINTER );
+/*N*/ }
+
+// ------------------------------------------------------------------------
+
+/*N*/ void XOutputDevice::ImpDrawFillPolyPolygon( const PolyPolygon& rPolyPoly, BOOL bRect, BOOL bPrinter )
+/*N*/ {
+/*N*/ if( eFillStyle != XFILL_NONE )
+/*N*/ {
+/*?*/ const Color aOldLineColor( pOut->GetLineColor() );
+/*?*/ const ULONG nDrawMode = pOut->GetDrawMode();
+/*?*/
+/*?*/ pOut->SetLineColor();
+/*?*/
+/*?*/ if( eFillStyle == XFILL_SOLID )
+/*?*/ {
+/*?*/ if( nFillTransparence )
+/*?*/ pOut->DrawTransparent( rPolyPoly, nFillTransparence );
+/*?*/ else
+/*?*/ pOut->DrawPolyPolygon( rPolyPoly );
+/*?*/ }
+/*?*/ else if( eFillStyle == XFILL_HATCH )
+/*?*/ {
+/*?*/ long nAngle10 = aHatch.GetAngle() % 3600;
+/*?*/ HatchStyle eStyle;
+/*?*/
+/*?*/ if( nAngle10 < 0 )
+/*?*/ nAngle10 += 3600;
+/*?*/
+/*?*/ switch( aHatch.GetHatchStyle() )
+/*?*/ {
+/*?*/ case( XHATCH_TRIPLE ): eStyle = HATCH_TRIPLE; break;
+/*?*/ case( XHATCH_DOUBLE ): eStyle = HATCH_DOUBLE; break;
+/*?*/
+/*?*/ default:
+/*?*/ eStyle = HATCH_SINGLE;
+/*?*/ break;
+/*?*/ }
+/*?*/
+/*?*/ if( iSolidHatch() )
+/*?*/ pOut->DrawPolyPolygon( rPolyPoly );
+/*?*/
+/*?*/ pOut->DrawHatch( rPolyPoly, Hatch( eStyle, aHatch.GetColor(), aHatch.GetDistance(), (USHORT) nAngle10 ) );
+/*?*/ }
+/*?*/ else if( eFillStyle == XFILL_GRADIENT )
+/*?*/ {
+/*?*/ GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
+/*?*/ Gradient aVCLGradient;
+/*?*/
+/*?*/
+/*?*/ aVCLGradient.SetStyle((GradientStyle)aGradient.GetGradientStyle());
+/*?*/ aVCLGradient.SetStartColor(aGradient.GetStartColor());
+/*?*/ aVCLGradient.SetEndColor(aGradient.GetEndColor());
+/*?*/ aVCLGradient.SetAngle((USHORT)aGradient.GetAngle());
+/*?*/ aVCLGradient.SetBorder(aGradient.GetBorder());
+/*?*/ aVCLGradient.SetOfsX(aGradient.GetXOffset());
+/*?*/ aVCLGradient.SetOfsY(aGradient.GetYOffset());
+/*?*/ aVCLGradient.SetStartIntensity(aGradient.GetStartIntens());
+/*?*/ aVCLGradient.SetEndIntensity(aGradient.GetEndIntens());
+/*?*/ aVCLGradient.SetSteps(aGradient.GetSteps());
+/*?*/
+/*?*/ if( bRect )
+/*?*/ pOut->DrawGradient( rPolyPoly.GetBoundRect(), aVCLGradient );
+/*?*/ else
+/*?*/ pOut->DrawGradient( rPolyPoly, aVCLGradient );
+/*?*/ }
+/*?*/ else if( eFillStyle == XFILL_BITMAP )
+/*?*/ {
+/*?*/ if( nDrawMode & DRAWMODE_WHITEFILL )
+/*?*/ {
+/*?*/ const Color aOldFillColor( pOut->GetFillColor() );
+/*?*/
+/*?*/ pOut->SetFillColor( COL_WHITE );
+/*?*/ pOut->DrawPolyPolygon( rPolyPoly );
+/*?*/ pOut->SetFillColor( aOldFillColor );
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ Rectangle aPolyRect( rPolyPoly.GetBoundRect() );
+/*?*/ GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
+/*?*/
+/*?*/ pOut->Push();
+/*?*/ pOut->SetRasterOp( ROP_OVERPAINT );
+/*?*/
+/*?*/ if( pMtf && !bPrinter )
+/*?*/ {
+/*?*/ if( !pOut->GetPDFWriter() && XIMP_bDrawRasterOps )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ else
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ }
+/*?*/ else if( bRect || bPrinter )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ else
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/
+/*?*/ pOut->Pop();
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ pOut->SetLineColor( aOldLineColor );
+/*N*/ }
+/*N*/ }
+
+// ------------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------------
+
+
+// ------------------------------------------------------------------------
+
+} //namespace binfilter
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx__xoutbmp.cxx b/binfilter/bf_svx/source/xoutdev/svx__xoutbmp.cxx
new file mode 100644
index 000000000000..d14b17f16188
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx__xoutbmp.cxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <bf_svtools/solar.hrc>
+#include "impgrf.hxx"
+#include "xoutbmp.hxx"
+namespace binfilter {
+
+GraphicFilter* XOutBitmap::pGrfFilter = NULL;
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx__xpoly.cxx b/binfilter/bf_svx/source/xoutdev/svx__xpoly.cxx
new file mode 100644
index 000000000000..15851fc9d2c9
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx__xpoly.cxx
@@ -0,0 +1,2056 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <string.h>
+#include <tools/stream.hxx>
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "xoutx.hxx"
+#include "xpolyimp.hxx"
+#include <osl/endian.h>
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+/*N*/ DBG_NAME(XPolygon)
+/*N*/ DBG_NAME(XPolyPolygon)
+
+/*************************************************************************
+|*
+|* ImpXPolygon::ImpXPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ ImpXPolygon::ImpXPolygon( USHORT nInitSize, USHORT nResize )
+/*N*/ {
+/*N*/ pPointAry = NULL;
+/*N*/ pFlagAry = NULL;
+/*N*/ bDeleteOldPoints = FALSE;
+/*N*/ nSize = 0;
+/*N*/ ImpXPolygon::nResize = nResize;
+/*N*/ nPoints = 0;
+/*N*/ nRefCount = 1;
+/*N*/
+/*N*/ Resize( nInitSize );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ImpXPolygon::ImpXPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly )
+/*N*/ {
+/*N*/ ( (ImpXPolygon&) rImpXPoly ).CheckPointDelete();
+/*N*/
+/*N*/ pPointAry = NULL;
+/*N*/ pFlagAry = NULL;
+/*N*/ bDeleteOldPoints = FALSE;
+/*N*/ nSize = 0;
+/*N*/ ImpXPolygon::nResize = rImpXPoly.nResize;
+/*N*/ nPoints = 0;
+/*N*/ nRefCount = 1;
+/*N*/
+/*N*/ Resize( rImpXPoly.nSize );
+/*N*/
+/*N*/ // Kopieren
+/*N*/ nPoints = rImpXPoly.nPoints;
+/*N*/ memcpy( pPointAry, rImpXPoly.pPointAry, nSize*sizeof( Point ) );
+/*N*/ memcpy( pFlagAry, rImpXPoly.pFlagAry, nSize );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ImpXPolygon::~ImpXPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ ImpXPolygon::~ImpXPolygon()
+/*N*/ {
+/*N*/ delete[] (char*) pPointAry;
+/*N*/ delete[] pFlagAry;
+/*N*/ if ( bDeleteOldPoints )
+/*?*/ delete[] (char*) pOldPointAry;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ImpXPolygon::operator==()
+|*
+|* Ersterstellung Joe 26-09-95
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+
+/*N*/ FASTBOOL ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const
+/*N*/ {
+/*N*/ return nPoints==rImpXPoly.nPoints &&
+/*N*/ (nPoints==0 ||
+/*N*/ (memcmp(pPointAry,rImpXPoly.pPointAry,nPoints*sizeof(Point))==0 &&
+/*N*/ memcmp(pFlagAry,rImpXPoly.pFlagAry,nPoints)==0));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ void ImpXPolygon::Resize( USHORT nNewSize, BOOL bDeletePoints )
+/*N*/ {
+/*N*/ if( nNewSize == nSize )
+/*N*/ return;
+/*N*/
+/*N*/ BYTE* pOldFlagAry = pFlagAry;
+/*N*/ USHORT nOldSize = nSize;
+/*N*/
+/*N*/ CheckPointDelete();
+/*N*/ pOldPointAry = pPointAry;
+/*N*/
+/*N*/ // Neue Groesse auf vielfaches von nResize runden, sofern Objekt
+/*N*/ // nicht neu angelegt wurde (nSize != 0)
+/*N*/ if ( nSize != 0 && nNewSize > nSize )
+/*N*/ {
+/*N*/ DBG_ASSERT(nResize, "Resize-Versuch trotz nResize = 0 !");
+/*N*/ nNewSize = nSize + ((nNewSize-nSize-1) / nResize + 1) * nResize;
+/*N*/ }
+/*N*/ // Punkt Array erzeugen
+/*N*/ nSize = nNewSize;
+/*N*/ pPointAry = (Point*)new char[ nSize*sizeof( Point ) ];
+/*N*/ memset( pPointAry, 0, nSize*sizeof( Point ) );
+/*N*/
+/*N*/ // Flag Array erzeugen
+/*N*/ pFlagAry = new BYTE[ nSize ];
+/*N*/ memset( pFlagAry, 0, nSize );
+/*N*/
+/*N*/ // Eventuell umkopieren
+/*N*/ if( nOldSize )
+/*N*/ {
+/*N*/ if( nOldSize < nSize )
+/*N*/ {
+/*N*/ memcpy( pPointAry, pOldPointAry, nOldSize*sizeof( Point ) );
+/*N*/ memcpy( pFlagAry, pOldFlagAry, nOldSize );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ memcpy( pPointAry, pOldPointAry, nSize*sizeof( Point ) );
+/*N*/ memcpy( pFlagAry, pOldFlagAry, nSize );
+/*N*/
+/*N*/ // Anzahl der gueltigen Punkte anpassen
+/*N*/ if( nPoints > nSize )
+/*N*/ nPoints = nSize;
+/*N*/ }
+/*N*/ if ( bDeletePoints ) delete[] (char*) pOldPointAry;
+/*N*/ else bDeleteOldPoints = TRUE;
+/*N*/ delete[] pOldFlagAry;
+/*N*/ }
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* ImpXPolygon::InsertSpace()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 29.03.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ void ImpXPolygon::InsertSpace( USHORT nPos, USHORT nCount )
+/*N*/ {
+/*N*/ USHORT nOldSize = nSize;
+/*N*/
+/*N*/ CheckPointDelete();
+/*N*/
+/*N*/ if ( nPos > nPoints )
+/*N*/ nPos = nPoints;
+/*N*/
+/*N*/ // Wenn Polygon zu klein dann groesser machen
+/*N*/ if( (nPoints + nCount) > nSize )
+/*N*/ Resize( nPoints + nCount );
+/*N*/
+/*N*/ // Wenn nicht hinter dem letzten Punkt eingefuegt wurde,
+/*N*/ // den Rest nach hinten schieben
+/*N*/ if( nPos < nPoints )
+/*N*/ {
+/*N*/ USHORT nMove = nPoints - nPos;
+/*N*/ memmove( &pPointAry[nPos+nCount], &pPointAry[nPos],
+/*N*/ nMove * sizeof(Point) );
+/*N*/ memmove( &pFlagAry[nPos+nCount], &pFlagAry[nPos], nMove );
+/*N*/ }
+/*N*/ memset( &pPointAry[nPos], 0, nCount * sizeof( Point ) );
+/*N*/ memset( &pFlagAry [nPos], 0, nCount );
+/*N*/
+/*N*/ nPoints += nCount;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* ImpXPolygon::Remove()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ void ImpXPolygon::Remove( USHORT nPos, USHORT nCount )
+/*N*/ {
+/*N*/ CheckPointDelete();
+/*N*/
+/*N*/ if( (nPos + nCount) <= nPoints )
+/*N*/ {
+/*N*/ USHORT nMove = nPoints - nPos - nCount;
+/*N*/
+/*N*/ if( nMove )
+/*N*/ {
+/*?*/ memmove( &pPointAry[nPos], &pPointAry[nPos+nCount],
+/*?*/ nMove * sizeof(Point) );
+/*?*/ memmove( &pFlagAry[nPos], &pFlagAry[nPos+nCount], nMove );
+/*N*/ }
+/*N*/ memset( &pPointAry[nPoints - nCount], 0, nCount * sizeof( Point ) );
+/*N*/ memset( &pFlagAry [nPoints - nCount], 0, nCount );
+/*N*/ nPoints -= nCount;
+/*N*/ }
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ XPolygon::XPolygon( USHORT nSize, USHORT nResize )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolygon,NULL);
+/*N*/ pImpXPolygon = new ImpXPolygon( nSize, nResize );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ XPolygon::XPolygon( const XPolygon& rXPoly )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolygon,NULL);
+/*N*/ pImpXPolygon = rXPoly.pImpXPolygon;
+/*N*/ pImpXPolygon->nRefCount++;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* XPolygon aus einem Standardpolygon erstellen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XPolygon::XPolygon( const Polygon& rPoly )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolygon,NULL);
+/*N*/
+/*N*/ USHORT nSize = rPoly.GetSize();
+/*N*/ pImpXPolygon = new ImpXPolygon( nSize );
+/*N*/ pImpXPolygon->nPoints = nSize;
+/*N*/
+/*N*/ for( USHORT i = 0; i < nSize; i++ )
+/*N*/ {
+/*N*/ pImpXPolygon->pPointAry[i] = rPoly[i];
+/*N*/ pImpXPolygon->pFlagAry[i] = (BYTE) rPoly.GetFlags( i );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Rechteck (auch mit abgerundeten Ecken) als Bezierpolygon erzeugen
+|* Ersterstellung 09.01.95 ESO
+|* Letzte Aenderung 09.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy)
+/*N*/ {
+/*N*/ DBG_CTOR(XPolygon,NULL);
+/*N*/ pImpXPolygon = new ImpXPolygon(17);
+/*N*/ long nWh = (rRect.GetWidth() - 1) / 2;
+/*N*/ long nHh = (rRect.GetHeight() - 1) / 2;
+/*N*/
+/*N*/ if ( nRx > nWh ) nRx = nWh;
+/*N*/ if ( nRy > nHh ) nRy = nHh;
+/*N*/
+/*N*/ // Rx negativ, damit Umlauf im Uhrzeigersinn erfolgt
+/*N*/ nRx = -nRx;
+/*N*/
+/*N*/ // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
+/*N*/ long nXHdl = (long)(0.552284749 * nRx);
+/*N*/ long nYHdl = (long)(0.552284749 * nRy);
+/*N*/ USHORT nPos = 0;
+/*N*/
+/*N*/ if ( nRx && nRy )
+/*N*/ {
+/*N*/ Point aCenter;
+/*N*/
+/*N*/ for (USHORT nQuad = 0; nQuad < 4; nQuad++)
+/*N*/ {
+/*N*/ switch ( nQuad )
+/*N*/ {
+/*N*/ case 0: aCenter = rRect.TopLeft();
+/*N*/ aCenter.X() -= nRx;
+/*N*/ aCenter.Y() += nRy;
+/*N*/ break;
+/*N*/ case 1: aCenter = rRect.TopRight();
+/*N*/ aCenter.X() += nRx;
+/*N*/ aCenter.Y() += nRy;
+/*N*/ break;
+/*N*/ case 2: aCenter = rRect.BottomRight();
+/*N*/ aCenter.X() += nRx;
+/*N*/ aCenter.Y() -= nRy;
+/*N*/ break;
+/*N*/ case 3: aCenter = rRect.BottomLeft();
+/*N*/ aCenter.X() -= nRx;
+/*N*/ aCenter.Y() -= nRy;
+/*N*/ break;
+/*N*/ }
+/*N*/ GenBezArc(aCenter, nRx, nRy, nXHdl, nYHdl, 0, 900, nQuad, nPos);
+/*N*/ pImpXPolygon->pFlagAry[nPos ] = (BYTE) XPOLY_SMOOTH;
+/*N*/ pImpXPolygon->pFlagAry[nPos+3] = (BYTE) XPOLY_SMOOTH;
+/*N*/ nPos += 4;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pImpXPolygon->pPointAry[nPos++] = rRect.TopLeft();
+/*N*/ pImpXPolygon->pPointAry[nPos++] = rRect.TopRight();
+/*N*/ pImpXPolygon->pPointAry[nPos++] = rRect.BottomRight();
+/*N*/ pImpXPolygon->pPointAry[nPos++] = rRect.BottomLeft();
+/*N*/ }
+/*N*/ pImpXPolygon->pPointAry[nPos] = pImpXPolygon->pPointAry[0];
+/*N*/ pImpXPolygon->nPoints = nPos + 1;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Ellipsen(bogen) als Bezierpolygon erzeugen
+|* Ersterstellung 09.01.95
+|* Letzte Aenderung 09.01.95
+|*
+*************************************************************************/
+
+/*N*/ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
+/*N*/ USHORT nStartAngle, USHORT nEndAngle, BOOL bClose)
+/*N*/ {
+/*N*/ DBG_CTOR(XPolygon,NULL);
+/*N*/ pImpXPolygon = new ImpXPolygon(17);
+/*N*/
+/*N*/ nStartAngle %= 3600;
+/*N*/ if ( nEndAngle > 3600 ) nEndAngle %= 3600;
+/*N*/ BOOL bFull = (nStartAngle == 0 && nEndAngle == 3600);
+/*N*/
+/*N*/ // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
+/*N*/ long nXHdl = (long)(0.552284749 * nRx);
+/*N*/ long nYHdl = (long)(0.552284749 * nRy);
+/*N*/ USHORT nPos = 0;
+/*N*/ BOOL bLoopEnd = FALSE;
+/*N*/
+/*N*/ do
+/*N*/ {
+/*N*/ USHORT nA1, nA2;
+/*N*/ USHORT nQuad = nStartAngle / 900;
+/*N*/ if ( nQuad == 4 ) nQuad = 0;
+/*N*/ bLoopEnd = CheckAngles(nStartAngle, nEndAngle, nA1, nA2);
+/*N*/ GenBezArc(rCenter, nRx, nRy, nXHdl, nYHdl, nA1, nA2, nQuad, nPos);
+/*N*/ nPos += 3;
+/*N*/ if ( !bLoopEnd )
+/*N*/ pImpXPolygon->pFlagAry[nPos] = (BYTE) XPOLY_SMOOTH;
+/*N*/
+/*N*/ } while ( !bLoopEnd );
+/*N*/
+/*N*/ // Wenn kein Vollkreis, dann ggf. Enden mit Mittelpunkt verbinden
+/*N*/ if ( !bFull && bClose )
+/*N*/ pImpXPolygon->pPointAry[++nPos] = rCenter;
+/*N*/
+/*N*/ if ( bFull )
+/*N*/ {
+/*N*/ pImpXPolygon->pFlagAry[0 ] = (BYTE) XPOLY_SMOOTH;
+/*N*/ pImpXPolygon->pFlagAry[nPos] = (BYTE) XPOLY_SMOOTH;
+/*N*/ }
+/*N*/ pImpXPolygon->nPoints = nPos + 1;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::~XPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ XPolygon::~XPolygon()
+/*N*/ {
+/*N*/ DBG_DTOR(XPolygon,NULL);
+/*N*/ if( pImpXPolygon->nRefCount > 1 )
+/*N*/ pImpXPolygon->nRefCount--;
+/*N*/ else
+/*N*/ delete pImpXPolygon;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::CheckReference()
+|*
+|* Referenzzaehler desImpXPoly pruefen und ggf. von diesem abkoppeln
+|* Ersterstellung 17.01.95 ESO
+|* Letzte Aenderung 17.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::CheckReference()
+/*N*/ {
+/*N*/ if( pImpXPolygon->nRefCount > 1 )
+/*N*/ {
+/*N*/ pImpXPolygon->nRefCount--;
+/*N*/ pImpXPolygon = new ImpXPolygon( *pImpXPolygon );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::SetSize()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::SetSize( USHORT nNewSize )
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ pImpXPolygon->Resize( nNewSize );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::GetSize()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::SetPointCount()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::SetPointCount( USHORT nPoints )
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ if( pImpXPolygon->nSize < nPoints )
+/*?*/ pImpXPolygon->Resize( nPoints );
+/*N*/
+/*N*/ if ( nPoints < pImpXPolygon->nPoints )
+/*N*/ {
+/*N*/ USHORT nSize = pImpXPolygon->nPoints - nPoints;
+/*N*/ memset( &pImpXPolygon->pPointAry[nPoints], 0, nSize * sizeof( Point ) );
+/*N*/ memset( &pImpXPolygon->pFlagAry [nPoints], 0, nSize );
+/*N*/ }
+/*N*/ pImpXPolygon->nPoints = nPoints;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::GetPointCount()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ USHORT XPolygon::GetPointCount() const
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ return pImpXPolygon->nPoints;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::Insert()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Insert( USHORT nPos, const Point& rPt, XPolyFlags eFlags )
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ if (nPos>pImpXPolygon->nPoints) nPos=pImpXPolygon->nPoints;
+/*N*/ pImpXPolygon->InsertSpace( nPos, 1 );
+/*N*/ pImpXPolygon->pPointAry[nPos] = rPt;
+/*N*/ pImpXPolygon->pFlagAry[nPos] = (BYTE)eFlags;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::Insert()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::Insert()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::Remove()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Remove( USHORT nPos, USHORT nCount )
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ pImpXPolygon->Remove( nPos, nCount );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::Move()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Move( long nHorzMove, long nVertMove )
+/*N*/ {
+/*N*/ if ( !nHorzMove && !nVertMove )
+/*N*/ return;
+/*N*/
+/*N*/ CheckReference();
+/*N*/
+/*N*/ // Punkte verschieben
+/*N*/ USHORT nCount = pImpXPolygon->nPoints;
+/*N*/ for ( USHORT i = 0; i < nCount; i++ )
+/*N*/ {
+/*N*/ Point* pPt = &(pImpXPolygon->pPointAry[i]);
+/*N*/ pPt->X() += nHorzMove;
+/*N*/ pPt->Y() += nVertMove;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::GetBoundRect()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ Rectangle XPolygon::GetBoundRect(OutputDevice *pOut) const
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/
+/*N*/ 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;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::operator[]()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95
+|*
+*************************************************************************/
+
+/*N*/ const Point& XPolygon::operator[]( USHORT nPos ) const
+/*N*/ {
+/*N*/ DBG_ASSERT(nPos < pImpXPolygon->nPoints, "Ungueltiger Index bei const-Arrayzugriff auf XPolygon");
+/*N*/
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ return pImpXPolygon->pPointAry[nPos];
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::operator[]()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ Point& XPolygon::operator[]( USHORT nPos )
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ if( nPos >= pImpXPolygon->nSize )
+/*N*/ {
+/*N*/ DBG_ASSERT(pImpXPolygon->nResize, "Ungueltiger Index bei Arrayzugriff auf XPolygon");
+/*N*/ pImpXPolygon->Resize(nPos + 1, FALSE);
+/*N*/ }
+/*N*/ if( nPos >= pImpXPolygon->nPoints )
+/*N*/ pImpXPolygon->nPoints = nPos + 1;
+/*N*/
+/*N*/ return pImpXPolygon->pPointAry[nPos];
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::operator=()
+|*
+|* Beschreibung Zuweisungsoperator
+|* Ersterstellung ESO 22.11.94
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+/*N*/ XPolygon& XPolygon::operator=( const XPolygon& rXPoly )
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/
+/*N*/ rXPoly.pImpXPolygon->nRefCount++;
+/*N*/
+/*N*/ if( pImpXPolygon->nRefCount > 1 )
+/*N*/ pImpXPolygon->nRefCount--;
+/*N*/ else
+/*N*/ delete pImpXPolygon;
+/*N*/
+/*N*/ pImpXPolygon = rXPoly.pImpXPolygon;
+/*N*/ return *this;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::operator==()
+|*
+|* Beschreibung Gleichheitsoperator
+|* Ersterstellung ESO 22.11.94
+|* Letzte Aenderung Joe 26.09.95
+|*
+*************************************************************************/
+
+/*N*/ BOOL XPolygon::operator==( const XPolygon& rXPoly ) const
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ if (rXPoly.pImpXPolygon==pImpXPolygon) return TRUE;
+/*N*/ return *rXPoly.pImpXPolygon == *pImpXPolygon;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::operator!=()
+|*
+|* Beschreibung Ungleichheitsoperator
+|* Ersterstellung ESO 22.11.94
+|* Letzte Aenderung Joe 26.09.95
+|*
+*************************************************************************/
+
+/*N*/ BOOL XPolygon::operator!=( const XPolygon& rXPoly ) const
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ if (rXPoly.pImpXPolygon==pImpXPolygon) return FALSE;
+/*N*/ return *rXPoly.pImpXPolygon != *pImpXPolygon;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::GetFlags()
+|*
+|* Flags fuer den Punkt an der Position nPos zurueckgeben
+|* Ersterstellung ESO 11.11.94
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+/*N*/ XPolyFlags XPolygon::GetFlags( USHORT nPos ) const
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ return (XPolyFlags) pImpXPolygon->pFlagAry[nPos];
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::SetFlags()
+|*
+|* Flags fuer den Punkt an der Position nPos setzen
+|* Ersterstellung ESO 11.11.94
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::SetFlags( USHORT nPos, XPolyFlags eFlags )
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/ pImpXPolygon->pFlagAry[nPos] = (BYTE) eFlags;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::IsControl()
+|*
+|* Kurzform zur Abfrage des CONTROL-Flags
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+/*N*/ BOOL XPolygon::IsControl(USHORT nPos) const
+/*N*/ {
+/*N*/ return ( (XPolyFlags) pImpXPolygon->pFlagAry[nPos] == XPOLY_CONTROL );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::IsSmooth()
+|*
+|* Kurzform zur Abfrage von SMOOTH- und SYMMTR-Flag
+|* Ersterstellung ESO 18.04.95
+|* Letzte Aenderung ESO 18.04.95
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::CalcDistance()
+|*
+|* Abstand zwischen zwei Punkten berechnen
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 09.01.95
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::SubdivideBezier()
+|*
+|* Bezierkurve unterteilen
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 09.01.95
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::SubdivideBezier(USHORT nPos, BOOL bCalcFirst, double fT)
+/*N*/ {
+/*N*/ Point* pPoints = pImpXPolygon->pPointAry;
+/*N*/ double fT2 = fT * fT;
+/*N*/ double fT3 = fT * fT2;
+/*N*/ double fU = 1.0 - fT;
+/*N*/ double fU2 = fU * fU;
+/*N*/ double fU3 = fU * fU2;
+/*N*/ USHORT nIdx = nPos;
+/*N*/ short nPosInc, nIdxInc;
+/*N*/
+/*N*/ if ( bCalcFirst )
+/*N*/ {
+/*N*/ nPos += 3;
+/*N*/ nPosInc = -1;
+/*N*/ nIdxInc = 0;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ nPosInc = 1;
+/*N*/ nIdxInc = 1;
+/*N*/ }
+/*N*/ pPoints[nPos].X() = (long) (fU3 * pPoints[nIdx ].X() +
+/*N*/ fT * fU2 * pPoints[nIdx+1].X() * 3 +
+/*N*/ fT2 * fU * pPoints[nIdx+2].X() * 3 +
+/*N*/ fT3 * pPoints[nIdx+3].X());
+/*N*/ pPoints[nPos].Y() = (long) (fU3 * pPoints[nIdx ].Y() +
+/*N*/ fT * fU2 * pPoints[nIdx+1].Y() * 3 +
+/*N*/ fT2 * fU * pPoints[nIdx+2].Y() * 3 +
+/*N*/ fT3 * pPoints[nIdx+3].Y());
+/*N*/ nPos += nPosInc;
+/*N*/ nIdx += nIdxInc;
+/*N*/ pPoints[nPos].X() = (long) (fU2 * pPoints[nIdx ].X() +
+/*N*/ fT * fU * pPoints[nIdx+1].X() * 2 +
+/*N*/ fT2 * pPoints[nIdx+2].X());
+/*N*/ pPoints[nPos].Y() = (long) (fU2 * pPoints[nIdx ].Y() +
+/*N*/ fT * fU * pPoints[nIdx+1].Y() * 2 +
+/*N*/ fT2 * pPoints[nIdx+2].Y());
+/*N*/ nPos += nPosInc;
+/*N*/ nIdx += nIdxInc;
+/*N*/ pPoints[nPos].X() = (long) (fU * pPoints[nIdx ].X() +
+/*N*/ fT * pPoints[nIdx+1].X());
+/*N*/ pPoints[nPos].Y() = (long) (fU * pPoints[nIdx ].Y() +
+/*N*/ fT * pPoints[nIdx+1].Y());
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
+/*N*/ long nXHdl, long nYHdl, USHORT nStart, USHORT nEnd,
+/*N*/ USHORT nQuad, USHORT nFirst)
+/*N*/ {
+/*N*/ Point* pPoints = pImpXPolygon->pPointAry;
+/*N*/ pPoints[nFirst ] = rCenter;
+/*N*/ pPoints[nFirst+3] = rCenter;
+/*N*/
+/*N*/ if ( nQuad == 1 || nQuad == 2 )
+/*N*/ {
+/*N*/ nRx = -nRx; nXHdl = -nXHdl;
+/*N*/ }
+/*N*/ if ( nQuad == 0 || nQuad == 1 )
+/*N*/ {
+/*N*/ nRy = -nRy; nYHdl = -nYHdl;
+/*N*/ }
+/*N*/
+/*N*/ if ( nQuad == 0 || nQuad == 2 )
+/*N*/ {
+/*N*/ pPoints[nFirst].X() += nRx; pPoints[nFirst+3].Y() += nRy;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pPoints[nFirst].Y() += nRy; pPoints[nFirst+3].X() += nRx;
+/*N*/ }
+/*N*/ pPoints[nFirst+1] = pPoints[nFirst];
+/*N*/ pPoints[nFirst+2] = pPoints[nFirst+3];
+/*N*/
+/*N*/ if ( nQuad == 0 || nQuad == 2 )
+/*N*/ {
+/*N*/ pPoints[nFirst+1].Y() += nYHdl; pPoints[nFirst+2].X() += nXHdl;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ pPoints[nFirst+1].X() += nXHdl; pPoints[nFirst+2].Y() += nYHdl;
+/*N*/ }
+/*N*/ if ( nStart > 0 )
+/*N*/ SubdivideBezier(nFirst, FALSE, (double)nStart / 900);
+/*N*/ if ( nEnd < 900 )
+/*N*/ SubdivideBezier(nFirst, TRUE, (double)(nEnd-nStart) / (900-nStart));
+/*N*/ SetFlags(nFirst+1, XPOLY_CONTROL);
+/*N*/ SetFlags(nFirst+2, XPOLY_CONTROL);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XPolygon::CheckAngles(USHORT& nStart, USHORT nEnd, USHORT& nA1, USHORT& nA2)
+/*N*/ {
+/*N*/ if ( nStart == 3600 ) nStart = 0;
+/*N*/ if ( nEnd == 0 ) nEnd = 3600;
+/*N*/ USHORT nStPrev = nStart;
+/*N*/ USHORT nMax = (nStart / 900 + 1) * 900;
+/*N*/ USHORT nMin = nMax - 900;
+/*N*/
+/*N*/ if ( nEnd >= nMax || nEnd <= nStart ) nA2 = 900;
+/*N*/ else nA2 = nEnd - nMin;
+/*N*/ nA1 = nStart - nMin;
+/*N*/ nStart = nMax;
+/*N*/
+/*N*/ // TRUE zurueck, falls letztes Segment berechnet wurde
+/*N*/ return (nStPrev < nEnd && nStart >= nEnd);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* 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
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::PointsToBezier()
+|*
+|* wandelt vier Polygonpunkte in eine Bezierkurve durch diese Punkte um
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 09.01.95
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::Translate()
+|*
+|* Polygon auf den uebergebenen Punkt verschieben
+|* Ersterstellung ESO 17.01.95
+|* Letzte Aenderung ESO 17.01.95
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Translate(const Point& rTrans)
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ USHORT nPntCnt = pImpXPolygon->nPoints;
+/*N*/
+/*N*/ for (USHORT i = 0; i < nPntCnt; i++)
+/*N*/ pImpXPolygon->pPointAry[i] += rTrans;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Rotate(const Point& rCenter, double fSin, double fCos)
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ long nX;
+/*N*/ long nY;
+/*N*/ long nNewX;
+/*N*/ long nNewY;
+/*N*/ long nCenterX = rCenter.X();
+/*N*/ long nCenterY = rCenter.Y();
+/*N*/
+/*N*/ USHORT nPntCnt = pImpXPolygon->nPoints;
+/*N*/
+/*N*/ for (USHORT i = 0; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ Point *pPt = &(pImpXPolygon->pPointAry[i]);
+/*N*/ nX = pPt->X()-nCenterX;
+/*N*/ nY = pPt->Y()-nCenterY;
+/*N*/ nNewX = (long)floor(fCos * nX + fSin * nY + 0.5);
+/*N*/ nNewY = -(long)floor(fSin * nX - fCos * nY + 0.5);
+/*N*/ pPt->X() = nNewX + nCenterX;
+/*N*/ pPt->Y() = nNewY + nCenterY;
+/*N*/
+ /* 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;
+ */
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Rotate(const Point& rCenter, USHORT nAngle)
+/*N*/ {
+/*N*/ nAngle %= 3600;
+/*N*/
+/*N*/ if ( nAngle != 0 )
+/*N*/ {
+/*N*/ double fAngle = F_PI * nAngle / 1800;
+/*N*/ double fSin = sin(fAngle);
+/*N*/ double fCos = cos(fAngle);
+/*N*/ Rotate(rCenter, fSin, fCos);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::Scale()
+|*
+|* XPolygon in X- und/oder Y-Richtung skalieren
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::Scale(double fSx, double fSy)
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ USHORT nPntCnt = pImpXPolygon->nPoints;
+/*N*/
+/*N*/ for (USHORT i = 0; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ Point& rPnt = pImpXPolygon->pPointAry[i];
+/*N*/ rPnt.X() = (long)(fSx * rPnt.X());
+/*N*/ rPnt.Y() = (long)(fSy * rPnt.Y());
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ void XPolygon::SlantX(long nYRef, double fSin, double fCos)
+/*N*/ {
+/*N*/ pImpXPolygon->CheckPointDelete();
+/*N*/ CheckReference();
+/*N*/
+/*N*/ USHORT nPntCnt = pImpXPolygon->nPoints;
+/*N*/
+/*N*/ for (USHORT i = 0; i < nPntCnt; i++)
+/*N*/ {
+/*N*/ Point& rPnt = pImpXPolygon->pPointAry[i];
+/*N*/ long nDy = rPnt.Y() - nYRef;
+/*N*/ rPnt.X() += (long)(fSin * nDy);
+/*N*/ rPnt.Y() = nYRef + (long)(fCos * nDy);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Bestimme den linken, unteren Punkt des Polygons und richte das
+|* Polygon so aus, dass dieser Punkt auf dem Index 0 liegt
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolygon::operator>>()
+|*
+|* Beschreibung Stream-Leseoperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung ESO 04.04.95
+|*
+*************************************************************************/
+
+/*N*/ SvStream& operator>>( SvStream& rIStream, XPolygon& rXPoly )
+/*N*/ {
+/*N*/ DBG_CHKOBJ( &rXPoly, XPolygon, NULL );
+/*N*/
+/*N*/ USHORT i;
+/*N*/ USHORT nStart;
+/*N*/ USHORT nCurPoints;
+/*N*/ USHORT nReadPoints; // Anzahl der Punkte im Stream
+/*N*/ USHORT nMerkPoints; // Anzahl der Punkte die ich speichern kann
+/*N*/ unsigned char bShort;
+/*N*/ short nShortX;
+/*N*/ short nShortY;
+/*N*/ long nLongX;
+/*N*/ long nLongY;
+/*N*/
+/*N*/ rXPoly.pImpXPolygon->CheckPointDelete();
+/*N*/
+/*N*/ // Anzahl der Punkte einlesen und Array erzeugen
+/*N*/ rIStream >> nReadPoints;
+/*N*/ nMerkPoints=nReadPoints;
+/*N*/ if (nMerkPoints>XPOLY_MAXPOINTS) {
+/*?*/ nMerkPoints=XPOLY_MAXPOINTS;
+/*N*/ // hier koennte man ein Flag am Stream setzen um zu vermerken
+/*N*/ // dass beim Lesen Informationsverlusst aufgetreten ist !!!!!
+/*N*/ }
+/*N*/ rXPoly.pImpXPolygon->nPoints = nMerkPoints;
+/*N*/
+/*N*/ if ( rXPoly.pImpXPolygon->nRefCount != 1 )
+/*N*/ {
+/*?*/ if ( rXPoly.pImpXPolygon->nRefCount )
+/*?*/ rXPoly.pImpXPolygon->nRefCount--;
+/*?*/ rXPoly.pImpXPolygon = new ImpXPolygon( nMerkPoints );
+/*N*/ }
+/*N*/ else
+/*N*/ rXPoly.pImpXPolygon->Resize( nMerkPoints );
+/*N*/
+/*N*/ // Je nach CompressMode das Polygon einlesen
+/*N*/ if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+ // Feststellen, ob ueber die Operatoren gelesen werden muss
+#if (__SIZEOFLONG) != 4
+ if ( 1 )
+#else
+#ifdef OSL_BIGENDIAN
+/*N*/ if ( rIStream.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN )
+#else
+/*N*/ if ( rIStream.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN )
+#endif
+#endif
+/*N*/ {
+/*?*/ 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;
+/*?*/ }
+/*?*/ }
+/*N*/ } else {
+/*N*/ rIStream.Read( rXPoly.pImpXPolygon->pPointAry, nMerkPoints*sizeof(Point) );
+/*N*/ if (nReadPoints>nMerkPoints) { // restliche Punkte ueberspringen
+/*?*/ rIStream.SeekRel( ULONG(nReadPoints-nMerkPoints)*sizeof(Point) );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ rIStream.Read( rXPoly.pImpXPolygon->pFlagAry, nMerkPoints );
+/*N*/ if (nReadPoints>nMerkPoints) { // Flags der restlichen Punkte ueberspringen
+/*?*/ rIStream.SeekRel( ULONG(nReadPoints-nMerkPoints) );
+/*N*/ // Poly muesste hier noch etwas korregiert werden (Bezier-Kontrollpunkte am Ende..., geschlossen?)
+/*N*/ }
+/*N*/ 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);
+/*N*/ }
+/*N*/
+/*N*/ return rIStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::operator<<()
+|*
+|* Beschreibung Stream-Schreiboperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung ESO 04.04.95
+|*
+*************************************************************************/
+
+/*N*/ SvStream& operator<<( SvStream& rOStream, const XPolygon& rXPoly )
+/*N*/ {
+/*N*/ DBG_CHKOBJ( &rXPoly, XPolygon, NULL );
+/*N*/
+/*N*/ unsigned char bShort;
+/*N*/ unsigned char bCurShort;
+/*N*/ USHORT nStart;
+/*N*/ USHORT i;
+/*N*/ USHORT nPoints = rXPoly.GetPointCount();
+/*N*/
+/*N*/ rXPoly.pImpXPolygon->CheckPointDelete();
+/*N*/
+/*N*/ // Anzahl der Punkte rausschreiben
+/*N*/ rOStream << nPoints;
+/*N*/
+/*N*/ // Je nach CompressMode das Polygon rausschreiben
+/*N*/ if ( rOStream.GetCompressMode() == COMPRESSMODE_FULL )
+/*N*/ {
+/*?*/ 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();
+/*?*/ }
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+ // Feststellen, ob ueber die Operatoren geschrieben werden muss
+#if (__SIZEOFLONG) != 4
+/*N*/ if ( 1 )
+#else
+#ifdef OSL_BIGENDIAN
+/*N*/ if ( rOStream.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN )
+#else
+/*N*/ if ( rOStream.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN )
+#endif
+#endif
+/*N*/ {
+/*?*/ for( i = 0; i < nPoints; i++ )
+/*?*/ rOStream << rXPoly.pImpXPolygon->pPointAry[i].X()
+/*?*/ << rXPoly.pImpXPolygon->pPointAry[i].Y();
+/*N*/ }
+/*N*/ else if ( nPoints )
+/*N*/ rOStream.Write( rXPoly.pImpXPolygon->pPointAry, nPoints*sizeof(Point) );
+/*N*/ }
+/*N*/
+/*N*/ if ( nPoints )
+/*N*/ rOStream.Write( rXPoly.pImpXPolygon->pFlagAry, nPoints );
+/*N*/
+/*N*/ return rOStream;
+/*N*/ }
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//+--------------- XPolyPolygon -----------------------------------------+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+/*************************************************************************
+|*
+|* ImpXPolyPolygon::ImpXPolyPolygon()
+|*
+|* Beschreibung Erzeugt das XPolygon-Array
+|* Ersterstellung CL 09.11.94
+|* Letzte Aenderung MM 09.11.94
+|*
+*************************************************************************/
+
+/*N*/ ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) :
+/*N*/ aXPolyList( rImpXPolyPoly.aXPolyList )
+/*N*/ {
+/*N*/ nRefCount = 1;
+/*N*/
+/*N*/ // Einzelne Elemente duplizieren
+/*N*/ XPolygon* pXPoly = aXPolyList.First();
+/*N*/ while ( pXPoly )
+/*N*/ {
+/*N*/ aXPolyList.Replace( new XPolygon( *(aXPolyList.GetCurObject()) ) );
+/*N*/ pXPoly = aXPolyList.Next();
+/*N*/ }
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* ImpXPolyPolygon::~ImpXPolyPolygon()
+|*
+|* Beschreibung Loescht das Polygon-Array
+|* Ersterstellung CL 09.06.93
+|* Letzte Aenderung CL 09.06.93
+|*
+*************************************************************************/
+
+/*N*/ ImpXPolyPolygon::~ImpXPolyPolygon()
+/*N*/ {
+/*N*/ XPolygon* pXPoly = aXPolyList.First();
+/*N*/ while( pXPoly )
+/*N*/ {
+/*N*/ delete pXPoly;
+/*N*/ pXPoly = aXPolyList.Next();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* ImpXPolyPolygon::operator==()
+|*
+|* Ersterstellung Joe 26-09-95
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ XPolyPolygon::XPolyPolygon( USHORT nInitSize, USHORT nResize )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolyPolygon,NULL);
+/*N*/ pImpXPolyPolygon = new ImpXPolyPolygon( nInitSize, nResize );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ XPolyPolygon::XPolyPolygon( const XPolygon& rXPoly )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolyPolygon,NULL);
+/*N*/ pImpXPolyPolygon = new ImpXPolyPolygon;
+/*N*/ pImpXPolyPolygon->aXPolyList.Insert( new XPolygon( rXPoly ) );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolyPolygon,NULL);
+/*N*/ pImpXPolyPolygon = rXPolyPoly.pImpXPolyPolygon;
+/*N*/ pImpXPolyPolygon->nRefCount++;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* XPolyPolygon aus einen Standard-PolyPolygon erzeugen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XPolyPolygon::XPolyPolygon( const PolyPolygon& rPolyPoly )
+/*N*/ {
+/*N*/ DBG_CTOR(XPolyPolygon,NULL);
+/*N*/ pImpXPolyPolygon = new ImpXPolyPolygon;
+/*N*/
+/*N*/ for (USHORT i = 0; i < rPolyPoly.Count(); i++)
+/*N*/ pImpXPolyPolygon->aXPolyList.Insert(
+/*N*/ new XPolygon(rPolyPoly.GetObject(i)) );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::~XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ XPolyPolygon::~XPolyPolygon()
+/*N*/ {
+/*N*/ DBG_DTOR(XPolyPolygon,NULL);
+/*N*/ if( pImpXPolyPolygon->nRefCount > 1 )
+/*N*/ pImpXPolyPolygon->nRefCount--;
+/*N*/ else
+/*N*/ delete pImpXPolyPolygon;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolygon::CheckReference()
+|*
+|* Referenzzaehler desImpXPolyPoly pruefen und ggf. von diesem abkoppeln
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::CheckReference()
+/*N*/ {
+/*N*/ if( pImpXPolyPolygon->nRefCount > 1 )
+/*N*/ {
+/*N*/ pImpXPolyPolygon->nRefCount--;
+/*N*/ pImpXPolyPolygon = new ImpXPolyPolygon( *pImpXPolyPolygon );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Insert()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::Insert( const XPolygon& rXPoly, USHORT nPos )
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ XPolygon* pXPoly = new XPolygon( rXPoly );
+/*N*/ pImpXPolyPolygon->aXPolyList.Insert( pXPoly, nPos );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Insert()
+|*
+|* saemtliche XPolygone aus einem XPolyPolygon einfuegen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Remove()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Replace()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::GetObject()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ const XPolygon& XPolyPolygon::GetObject( USHORT nPos ) const
+/*N*/ {
+/*N*/ return *(pImpXPolyPolygon->aXPolyList.GetObject( nPos ));
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Clear()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung TH 17.10.94
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::Clear()
+/*N*/ {
+/*N*/ if ( pImpXPolyPolygon->nRefCount > 1 )
+/*N*/ {
+/*N*/ pImpXPolyPolygon->nRefCount--;
+/*N*/ pImpXPolyPolygon = new ImpXPolyPolygon();
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.First();
+/*N*/ while( pXPoly )
+/*N*/ {
+/*N*/ delete pXPoly;
+/*N*/ pXPoly = pImpXPolyPolygon->aXPolyList.Next();
+/*N*/ }
+/*N*/ pImpXPolyPolygon->aXPolyList.Clear();
+/*N*/ }
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Count()
+|*
+|* Beschreibung
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ USHORT XPolyPolygon::Count() const
+/*N*/ {
+/*N*/ return (USHORT)(pImpXPolyPolygon->aXPolyList.Count());
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Move()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung TH 04.10.94
+|* Letzte Aenderung TH 04.10.94
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::Move( long nHorzMove, long nVertMove )
+/*N*/ {
+/*N*/ // Diese Abfrage sollte man fuer die DrawEngine durchfuehren
+/*N*/ if ( !nHorzMove && !nVertMove )
+/*N*/ return;
+/*N*/
+/*N*/ // Referenzcounter beruecksichtigen
+/*N*/ CheckReference();
+/*N*/
+/*N*/ // Punkte verschieben
+/*N*/ XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.First();
+/*N*/ while( pXPoly )
+/*N*/ {
+/*N*/ pXPoly->Move( nHorzMove, nVertMove );
+/*N*/ pXPoly = pImpXPolyPolygon->aXPolyList.Next();
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::GetBoundRect()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung TH 04.10.94
+|* Letzte Aenderung TH 04.10.94
+|*
+*************************************************************************/
+
+/*N*/ Rectangle XPolyPolygon::GetBoundRect(OutputDevice* pOut) const
+/*N*/ {
+/*N*/ USHORT nXPoly = (USHORT)pImpXPolyPolygon->aXPolyList.Count();
+/*N*/ Rectangle aRect;
+/*N*/
+/*N*/ for ( USHORT n = 0; n < nXPoly; n++ )
+/*N*/ {
+/*N*/ const XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.GetObject( n );
+/*N*/
+/*N*/ aRect.Union( pXPoly->GetBoundRect(pOut) );
+/*N*/ }
+/*N*/
+/*N*/ return aRect;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator[]()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung TH 28.10.94
+|* Letzte Aenderung TH 28.10.94
+|*
+*************************************************************************/
+
+/*N*/ XPolygon& XPolyPolygon::operator[]( USHORT nPos )
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/ return *(pImpXPolyPolygon->aXPolyList.GetObject( nPos ));
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator=()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+/*N*/ XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly )
+/*N*/ {
+/*N*/ rXPolyPoly.pImpXPolyPolygon->nRefCount++;
+/*N*/
+/*N*/ if( pImpXPolyPolygon->nRefCount > 1 )
+/*N*/ pImpXPolyPolygon->nRefCount--;
+/*N*/ else
+/*N*/ delete pImpXPolyPolygon;
+/*N*/
+/*N*/ pImpXPolyPolygon = rXPolyPoly.pImpXPolyPolygon;
+/*N*/ return *this;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator==()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung Joe 27.01.93
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator!=()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung Joe 27.01.93
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Translate()
+|*
+|* Alle Polygone auf den uebergebenen Punkt verschieben
+|* Ersterstellung ESO 25.01.95
+|* Letzte Aenderung ESO 25.01.95
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::Translate(const Point& rTrans)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/
+/*N*/ for (USHORT i = 0; i < Count(); i++)
+/*N*/ pImpXPolyPolygon->aXPolyList.GetObject(i)->Translate(rTrans);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::Rotate(const Point& rCenter, double fSin, double fCos)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/
+/*N*/ for (USHORT i = 0; i < Count(); i++)
+/*N*/ pImpXPolyPolygon->aXPolyList.GetObject(i)->Rotate(rCenter, fSin, fCos);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Bestimme den linken, unteren Punkt des Polygons und richte das
+|* Polygon so aus, dass dieser Punkt auf dem Index 0 liegt
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Scale()
+|*
+|* Alle Polygone in X- und/oder Y-Richtung skalieren
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::Scale(double fSx, double fSy)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/
+/*N*/ for (USHORT i = 0; i < Count(); i++)
+/*N*/ pImpXPolyPolygon->aXPolyList.GetObject(i)->Scale(fSx, fSy);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ void XPolyPolygon::SlantX(long nYRef, double fSin, double fCos)
+/*N*/ {
+/*N*/ CheckReference();
+/*N*/
+/*N*/ for (USHORT i = 0; i < Count(); i++)
+/*N*/ pImpXPolyPolygon->aXPolyList.GetObject(i)->SlantX(nYRef, fSin, fCos);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator>>()
+|*
+|* Beschreibung Stream-Leseoperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung Joe 10.10.95 64k Begrenzung
+|*
+*************************************************************************/
+
+/*N*/ SvStream& operator>>( SvStream& rIStream, XPolyPolygon& rXPolyPoly )
+/*N*/ {
+/*N*/ DBG_CHKOBJ( &rXPolyPoly, XPolyPolygon, NULL );
+/*N*/
+/*N*/ XPolygon* pXPoly;
+/*N*/
+/*N*/ // Anzahl der Polygone einlesen
+/*N*/ USHORT nXPolyCount;
+/*N*/ rIStream >> nXPolyCount;
+/*N*/
+/*N*/ FASTBOOL bTruncated=FALSE;
+/*N*/ ULONG nAllPointCount=0; // Gesamtanzahl der Punkte mitzaehlen
+/*N*/
+/*N*/ if ( rXPolyPoly.pImpXPolyPolygon->nRefCount > 1 ) {
+/*?*/ rXPolyPoly.pImpXPolyPolygon->nRefCount--;
+/*N*/ } else {
+/*N*/ delete rXPolyPoly.pImpXPolyPolygon;
+/*N*/ }
+/*N*/ rXPolyPoly.pImpXPolyPolygon = new ImpXPolyPolygon( nXPolyCount );
+/*N*/
+/*N*/ while (nXPolyCount>0) {
+/*N*/ pXPoly = new XPolygon;
+/*N*/ rIStream >> *pXPoly;
+/*N*/ nAllPointCount+=pXPoly->GetPointCount();
+/*N*/ if (!bTruncated) {
+/*N*/ 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
+/*N*/ }
+/*N*/ rXPolyPoly.pImpXPolyPolygon->aXPolyList.Insert( pXPoly, LIST_APPEND );
+/*N*/ } else {
+/*?*/ delete pXPoly;
+/*N*/ }
+/*N*/ nXPolyCount--;
+/*N*/ }
+/*N*/
+/*N*/ if (bTruncated) {
+ // hier koennte man ein Flag am Stream setzen um zu vermerken
+ // dass beim Lesen Informationsverlusst aufgetreten ist !!!!!
+/*N*/ }
+
+/*N*/ return rIStream;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator<<()
+|*
+|* Beschreibung Stream-Schreiboperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung ESO 04.04.95
+|*
+*************************************************************************/
+
+/*N*/ SvStream& operator<<( SvStream& rOStream, const XPolyPolygon& rXPolyPoly )
+/*N*/ {
+/*N*/ DBG_CHKOBJ( &rXPolyPoly, XPolyPolygon, NULL );
+/*N*/
+/*N*/ // Anzahl der Polygone rausschreiben
+/*N*/ rOStream << rXPolyPoly.Count();
+/*N*/
+/*N*/ // Die einzelnen Polygone ausgeben
+/*N*/ XPolygon* pXPoly = rXPolyPoly.pImpXPolyPolygon->aXPolyList.First();
+/*N*/
+/*N*/ while( pXPoly )
+/*N*/ {
+/*N*/ rOStream << *pXPoly;
+/*N*/ pXPoly = rXPolyPoly.pImpXPolyPolygon->aXPolyList.Next();
+/*N*/ }
+/*N*/
+/*N*/ return rOStream;
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx b/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx
new file mode 100644
index 000000000000..4c909e998124
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xattr.cxx
@@ -0,0 +1,4720 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+
+#include <com/sun/star/drawing/Hatch.hpp>
+
+#include <com/sun/star/drawing/LineStyle.hpp>
+
+#include <com/sun/star/drawing/LineDash.hpp>
+
+#include <com/sun/star/drawing/FillStyle.hpp>
+
+#include <com/sun/star/awt/Gradient.hpp>
+
+#include <bf_svtools/itempool.hxx>
+
+#include <bf_svx/xdef.hxx>
+
+#include "unoapi.hxx"
+
+#include <bf_svtools/style.hxx>
+
+#include "unopolyhelper.hxx"
+
+#include <bf_svtools/itemset.hxx>
+#include "dialogs.hrc"
+#include "svdstr.hrc"
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "itemtype.hxx"
+
+#include "xftadit.hxx"
+#include "xftdiit.hxx"
+#include "xftmrit.hxx"
+#include "xftouit.hxx"
+#include "xftsfit.hxx"
+#include "xftshcit.hxx"
+#include "xftshit.hxx"
+#include "xftshxy.hxx"
+#include "xftstit.hxx"
+#include "xtxasit.hxx"
+
+#include "svdmodel.hxx"
+namespace binfilter {
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+#define GLOBALOVERFLOW
+
+/************************************************************************/
+
+#define VCLTOSVCOL( rCol ) (USHORT)((((USHORT)(rCol))<<8)|(rCol))
+
+/************************************************************************/
+
+XubString aNameOrIndexEmptyString;
+
+/*N*/ TYPEINIT1_AUTOFACTORY(NameOrIndex, SfxStringItem);
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(USHORT nWhich, long nIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+/*N*/ NameOrIndex::NameOrIndex(USHORT nWhich, long nIndex) :
+/*N*/ SfxStringItem(nWhich, aNameOrIndexEmptyString),
+/*N*/ nPalIndex(nIndex)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(USHORT nWhich, const String& rName)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+/*N*/ NameOrIndex::NameOrIndex(USHORT nWhich, const XubString& rName) :
+/*N*/ SfxStringItem(nWhich, rName),
+/*N*/ nPalIndex((long)-1)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(USHORT nWhich, SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+/*N*/ NameOrIndex::NameOrIndex(USHORT nWhich, SvStream& rIn) :
+/*N*/ SfxStringItem(nWhich, rIn)
+/*N*/ {
+/*N*/ rIn >> nPalIndex;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+/*N*/ NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) :
+/*N*/ SfxStringItem(rNameOrIndex),
+/*N*/ nPalIndex(rNameOrIndex.nPalIndex)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int NameOrIndex::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+/*N*/ int NameOrIndex::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( SfxStringItem::operator==(rItem) &&
+/*N*/ ((const NameOrIndex&) rItem).nPalIndex == nPalIndex );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SvStream* NameOrIndex::Store(SvStream& rIn) const
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& NameOrIndex::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ SfxStringItem::Store( rOut, nItemVersion );
+/*N*/ rOut << (INT32)nPalIndex;
+/*N*/ return rOut;
+/*N*/ }
+
+/** this static checks if the given NameOrIndex item has a unique name for its value.
+ The returned String is a unique name for an item with this value in both given pools.
+ Argument pPool2 can be null.
+ If returned string equals NameOrIndex->GetName(), the name was already unique.
+*/
+/*N*/ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* pPool2, SvxCompareValueFunc pCompareValueFunc, USHORT nPrefixResId, XPropertyList* pDefaults )
+/*N*/ {
+/*N*/ sal_Bool bForceNew = sal_False;
+/*N*/
+/*N*/ String aUniqueName;
+/*N*/ SvxUnogetInternalNameForItem( nWhich, pCheckItem->GetName(), aUniqueName );
+/*N*/
+/*N*/ // 2. if we have a name check if there is already an item with the
+/*N*/ // same name in the documents pool with a different line end or start
+/*N*/
+/*N*/ if( aUniqueName.Len() && pPool1 )
+/*N*/ {
+/*N*/ const sal_uInt16 nCount = pPool1->GetItemCount( nWhich );
+/*N*/
+/*N*/ const NameOrIndex *pItem;
+/*N*/ for( sal_uInt16 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ pItem = (NameOrIndex*)pPool1->GetItem( nWhich, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pCheckItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( !pCompareValueFunc( pItem, pCheckItem ) )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // if we have no name yet, find existing item with same conent or
+/*N*/ // create a unique name
+/*N*/ if( aUniqueName.Len() == 0 )
+/*N*/ {
+/*N*/ sal_Int32 nUserIndex = 1;
+/*N*/ const ResId aRes(SVX_RES(nPrefixResId));
+/*N*/ String aUser( aRes );
+/*N*/ aUser += sal_Unicode( ' ' );
+/*N*/
+/*N*/ if( pDefaults )
+/*N*/ {
+/*N*/ const int nCount = pDefaults->Count();
+/*N*/ int nIndex;
+/*N*/ for( nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ XPropertyEntry* pEntry = pDefaults->Get( nIndex, 0 );
+/*N*/ if( pEntry )
+/*N*/ {
+/*N*/ bool bFound = false;
+/*N*/
+/*N*/ switch( nWhich )
+/*N*/ {
+/*N*/ case XATTR_FILLBITMAP:
+/*N*/ bFound = (((XFillBitmapItem*)pCheckItem)->GetValue().GetGraphicObject().GetUniqueID() ==
+/*N*/ ((XBitmapEntry*)pEntry)->GetXBitmap().GetGraphicObject().GetUniqueID());
+/*N*/ break;
+/*N*/ case XATTR_LINEDASH:
+/*N*/ bFound = (((XLineDashItem*)pCheckItem)->GetValue() == ((XDashEntry*)pEntry) ->GetDash());
+/*N*/ break;
+/*N*/ case XATTR_LINESTART:
+/*?*/ bFound = (((XLineStartItem*)pCheckItem)->GetValue() == ((XLineEndEntry*)pEntry)->GetLineEnd());
+/*N*/ break;
+/*N*/ case XATTR_LINEEND:
+/*?*/ bFound = (((XLineEndItem*)pCheckItem)->GetValue() == ((XLineEndEntry*)pEntry)->GetLineEnd());
+/*N*/ break;
+/*N*/ case XATTR_FILLGRADIENT:
+/*N*/ bFound = (((XFillGradientItem*)pCheckItem)->GetValue() == ((XGradientEntry*)pEntry)->GetGradient());
+/*N*/ break;
+/*N*/ case XATTR_FILLHATCH:
+/*N*/ bFound = (((XFillHatchItem*)pCheckItem)->GetValue() == ((XHatchEntry*)pEntry)->GetHatch());
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( bFound )
+/*N*/ {
+/*?*/ aUniqueName = pEntry->GetName();
+/*?*/ break;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ sal_Int32 nThisIndex = pEntry->GetName().Copy( aUser.Len() ).ToInt32();
+/*N*/ if( nThisIndex >= nUserIndex )
+/*N*/ nUserIndex = nThisIndex + 1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( (aUniqueName.Len() == 0) && pPool1 )
+/*N*/ {
+/*N*/ const sal_uInt16 nCount = pPool1->GetItemCount( nWhich );
+/*N*/ const NameOrIndex *pItem;
+/*N*/ for( sal_uInt16 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ pItem = (NameOrIndex*)pPool1->GetItem( nWhich, nSurrogate );
+/*N*/
+/*N*/ if( pItem && pItem->GetName().Len() )
+/*N*/ {
+/*N*/ if( !bForceNew && pCompareValueFunc( pItem, pCheckItem ) )
+/*N*/ return pItem->GetName();
+/*N*/
+/*N*/ if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+/*N*/ {
+/*N*/ sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+/*N*/ if( nThisIndex >= nUserIndex )
+/*N*/ nUserIndex = nThisIndex + 1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ aUniqueName = aUser;
+/*N*/ aUniqueName += String::CreateFromInt32( nUserIndex );
+/*N*/ }
+/*N*/
+/*N*/ return aUniqueName;
+/*N*/ }
+
+//*************************************************************************
+
+// -------------------
+// class XColorItem
+// -------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(USHORT nWhich, const String& rName, const Color& rTheColor)
+|*
+\************************************************************************/
+
+/*N*/ XColorItem::XColorItem(USHORT nWhich, const XubString& rName, const Color& rTheColor) :
+/*N*/ NameOrIndex(nWhich, rName),
+/*N*/ aColor(rTheColor)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(const XColorItem& rItem)
+|*
+\************************************************************************/
+
+/*N*/ XColorItem::XColorItem(const XColorItem& rItem) :
+/*N*/ NameOrIndex(rItem),
+/*N*/ aColor(rItem.aColor)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(USHORT nWhich, SvStream& rIn)
+|*
+\************************************************************************/
+
+/*N*/ XColorItem::XColorItem(USHORT nWhich, SvStream& rIn) :
+/*N*/ NameOrIndex(nWhich, rIn)
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ rIn >> aColor;
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XColorItem::Clone(SfxItemPool* pPool) const
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XColorItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XColorItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XColorItem::operator==(const SfxPoolItem& rItem) const
+|*
+\************************************************************************/
+
+/*N*/ int XColorItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ ((const XColorItem&) rItem).aColor == aColor );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XColorItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XColorItem(Which(), rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XColorItem::Store(SvStream& rOut) const
+|*
+\************************************************************************/
+
+/*N*/ SvStream& XColorItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if ( !IsIndex() )
+/*N*/ {
+/*N*/ rOut << aColor;
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const XColor& XColorItem::GetValue(const XColorTable* pTable) const
+|*
+\************************************************************************/
+
+/*N*/ const Color& XColorItem::GetValue(const XColorTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aColor;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetColor();
+/*N*/
+/*N*/ }
+
+/*N*/ bool XColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue().GetRGBColor();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue( nValue );
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Linienattribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+//---------------------
+// class XLineStyleItem
+//---------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineStyleItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) :
+/*N*/ SfxEnumItem(XATTR_LINESTYLE, eTheLineStyle)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStyleItem::XLineStyleItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStyleItem::XLineStyleItem(SvStream& rIn) :
+/*N*/ SfxEnumItem(XATTR_LINESTYLE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStyleItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStyleItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineStyleItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineStyleItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::LineStyle eLS = (::com::sun::star::drawing::LineStyle)GetValue();
+/*N*/ rVal <<= eLS;
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::LineStyle eLS;
+/*N*/ if(!(rVal >>= eLS ))
+/*N*/ {
+/*?*/ // also try an int (for Basic)
+/*?*/ sal_Int32 nLS;
+/*?*/ if(!(rVal >>= nLS))
+/*?*/ return sal_False;
+/*?*/ eLS = (::com::sun::star::drawing::LineStyle)nLS;
+/*N*/ }
+/*N*/
+/*N*/ SetValue( (XLineStyle)eLS );
+/*N*/ return true;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ USHORT XLineStyleItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 3;
+/*N*/ }
+
+
+// ------------
+// class XDash
+// ------------
+/*************************************************************************
+|*
+|* XDash::XDash(XDashStyle, USHORT, ULONG, USHORT, ULONG, ULONG)
+|*
+|* Beschreibung
+|* Ersterstellung 21.11.94
+|* Letzte Aenderung 21.11.94
+|*
+*************************************************************************/
+
+/*N*/ XDash::XDash(XDashStyle eTheDash, USHORT nTheDots, ULONG nTheDotLen,
+/*N*/ USHORT nTheDashes, ULONG nTheDashLen, ULONG nTheDistance) :
+/*N*/ eDash(eTheDash),
+/*N*/ nDots(nTheDots),
+/*N*/ nDotLen(nTheDotLen),
+/*N*/ nDashes(nTheDashes),
+/*N*/ nDashLen(nTheDashLen),
+/*N*/ nDistance(nTheDistance)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XDash::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 29.11.94
+|* Letzte Aenderung 29.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XDash::operator==(const XDash& rDash) const
+/*N*/ {
+/*N*/ return ( eDash == rDash.eDash &&
+/*N*/ nDots == rDash.nDots &&
+/*N*/ nDotLen == rDash.nDotLen &&
+/*N*/ nDashes == rDash.nDashes &&
+/*N*/ nDashLen == rDash.nDashLen &&
+/*N*/ nDistance == rDash.nDistance );
+/*N*/ }
+
+
+// -------------------
+// class XLineDashItem
+// -------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(const String& rName, const XDash& rTheDash)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) :
+/*N*/ NameOrIndex(XATTR_LINEDASH, rName),
+/*N*/ aDash(rTheDash)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(const XLineDashItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineDashItem::XLineDashItem(const XLineDashItem& rItem) :
+/*N*/ NameOrIndex(rItem),
+/*N*/ aDash(rItem.aDash)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineDashItem::XLineDashItem(SvStream& rIn) :
+/*N*/ NameOrIndex(XATTR_LINEDASH, rIn)
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ USHORT nSTemp;
+/*N*/ UINT32 nLTemp;
+/*N*/ INT32 nITemp;
+/*N*/
+/*N*/ rIn >> nITemp; aDash.SetDashStyle((XDashStyle)nITemp);
+/*N*/ rIn >> nSTemp; aDash.SetDots(nSTemp);
+/*N*/ rIn >> nLTemp; aDash.SetDotLen(nLTemp);
+/*N*/ rIn >> nSTemp; aDash.SetDashes(nSTemp);
+/*N*/ rIn >> nLTemp; aDash.SetDashLen(nLTemp);
+/*N*/ rIn >> nLTemp; aDash.SetDistance(nLTemp);
+/*N*/ }
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XLineDashItem::XLineDashItem(SfxItemPool* pPool, const XDash& rTheDash)
+/*N*/ : NameOrIndex( XATTR_LINEDASH, -1 ),
+/*N*/ aDash(rTheDash)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineDashItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineDashItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineDashItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XLineDashItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XLineDashItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ aDash == ((const XLineDashItem&) rItem).aDash );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineDashItem(rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineDashItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& XLineDashItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ rOut << (INT32) aDash.GetDashStyle();
+/*N*/ rOut << aDash.GetDots();
+/*N*/ rOut << (UINT32) aDash.GetDotLen();
+/*N*/ rOut << aDash.GetDashes();
+/*N*/ rOut << (UINT32) aDash.GetDashLen();
+/*N*/ rOut << (UINT32) aDash.GetDistance();
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const XDash& XLineDashItem::GetValue(const XDashTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ const XDash& XLineDashItem::GetValue(const XDashTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aDash;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetDash();
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_NAME:
+/*N*/ {
+/*N*/ ::rtl::OUString aApiName;
+/*N*/ SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
+/*N*/ rVal <<= aApiName;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH:
+/*N*/ {
+/*N*/ const XDash& rXD = GetValue();
+/*N*/
+/*N*/ ::com::sun::star::drawing::LineDash aLineDash;
+/*N*/
+/*N*/ aLineDash.Style = (::com::sun::star::drawing::DashStyle)((UINT16)rXD.GetDashStyle());
+/*N*/ aLineDash.Dots = rXD.GetDots();
+/*N*/ aLineDash.DotLen = rXD.GetDotLen();
+/*N*/ aLineDash.Dashes = rXD.GetDashes();
+/*N*/ aLineDash.DashLen = rXD.GetDashLen();
+/*N*/ aLineDash.Distance = rXD.GetDistance();
+/*N*/
+/*N*/ rVal <<= aLineDash;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_STYLE:
+/*N*/ {
+/*?*/ const XDash& rXD = GetValue();
+/*?*/ rVal <<= (::com::sun::star::drawing::DashStyle)((sal_Int16)rXD.GetDashStyle());
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_DOTS:
+/*N*/ {
+/*?*/ const XDash& rXD = GetValue();
+/*?*/ rVal <<= rXD.GetDots();
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_DOTLEN:
+/*N*/ {
+/*?*/ const XDash& rXD = GetValue();
+/*?*/ rVal <<= rXD.GetDotLen();
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_DASHES:
+/*N*/ {
+/*?*/ const XDash& rXD = GetValue();
+/*?*/ rVal <<= rXD.GetDashes();
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_DASHLEN:
+/*N*/ {
+/*?*/ const XDash& rXD = GetValue();
+/*?*/ rVal <<= rXD.GetDashLen();
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_DISTANCE:
+/*N*/ {
+/*?*/ const XDash& rXD = GetValue();
+/*?*/ rVal <<= rXD.GetDistance();
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*?*/ default: DBG_ERROR("Wrong MemberId!"); return false;
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_NAME:
+/*N*/ {
+/*?*/ ::rtl::OUString aName;
+/*?*/ if (!(rVal >>= aName))
+/*?*/ return false;
+/*?*/ SetName( aName );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH:
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::LineDash aLineDash;
+/*N*/ if(!(rVal >>= aLineDash))
+/*N*/ return false;
+/*N*/
+/*N*/ XDash aXDash;
+/*N*/
+/*N*/ aXDash.SetDashStyle((XDashStyle)((UINT16)(aLineDash.Style)));
+/*N*/ aXDash.SetDots(aLineDash.Dots);
+/*N*/ aXDash.SetDotLen(aLineDash.DotLen);
+/*N*/ aXDash.SetDashes(aLineDash.Dashes);
+/*N*/ aXDash.SetDashLen(aLineDash.DashLen);
+/*N*/ aXDash.SetDistance(aLineDash.Distance);
+/*N*/
+/*N*/ if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
+/*?*/ aXDash.SetDots(1);
+/*N*/
+/*N*/ SetValue( aXDash );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_STYLE:
+/*N*/ {
+/*?*/ sal_Int16 nVal;
+/*?*/ if(!(rVal >>= nVal))
+/*?*/ return false;
+/*?*/
+/*?*/ XDash aXDash = GetValue();
+/*?*/ aXDash.SetDashStyle((XDashStyle)((UINT16)(nVal)));
+/*?*/
+/*?*/ if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
+/*?*/ aXDash.SetDots(1);
+/*?*/
+/*?*/ SetValue( aXDash );
+/*?*/
+/*?*/ break;
+/*N*/ }
+
+/*N*/ case MID_LINEDASH_DOTS:
+/*N*/ case MID_LINEDASH_DASHES:
+/*N*/ {
+/*?*/ sal_Int16 nVal;
+/*?*/ if(!(rVal >>= nVal))
+/*?*/ return false;
+/*?*/
+/*?*/ XDash aXDash = GetValue();
+/*?*/ if ( nMemberId == MID_LINEDASH_DOTS )
+/*?*/ aXDash.SetDots( nVal );
+/*?*/ else
+/*?*/ aXDash.SetDashes( nVal );
+/*?*/
+/*?*/ if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
+/*?*/ aXDash.SetDots(1);
+/*?*/
+/*?*/ SetValue( aXDash );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_LINEDASH_DOTLEN:
+/*N*/ case MID_LINEDASH_DASHLEN:
+/*N*/ case MID_LINEDASH_DISTANCE:
+/*N*/ {
+/*?*/ sal_Int32 nVal;
+/*?*/ if(!(rVal >>= nVal))
+/*?*/ return false;
+/*?*/
+/*?*/ XDash aXDash = GetValue();
+/*?*/ if ( nMemberId == MID_LINEDASH_DOTLEN )
+/*?*/ aXDash.SetDotLen( nVal );
+/*?*/ else if ( nMemberId == MID_LINEDASH_DASHLEN )
+/*?*/ aXDash.SetDashLen( nVal );
+/*?*/ else
+/*?*/ aXDash.SetDistance( nVal );
+/*?*/
+/*?*/ if((0 == aXDash.GetDots()) && (0 == aXDash.GetDashes()))
+/*?*/ aXDash.SetDots(1);
+/*?*/
+/*?*/ SetValue( aXDash );
+/*?*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ BOOL XLineDashItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
+/*N*/ {
+/*N*/ return ((XLineDashItem*)p1)->GetValue() == ((XLineDashItem*)p2)->GetValue();
+/*N*/ }
+
+/*N*/ XLineDashItem* XLineDashItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+/*N*/ XATTR_LINEDASH,
+/*N*/ &pModel->GetItemPool(),
+/*N*/ pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
+/*N*/ XLineDashItem::CompareValueFunc,
+/*N*/ RID_SVXSTR_DASH11,
+/*N*/ pModel->GetDashList() );
+/*N*/
+/*N*/ // if the given name is not valid, replace it!
+/*N*/ if( aUniqueName != GetName() )
+/*N*/ {
+/*N*/ return new XLineDashItem( aUniqueName, aDash );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XLineDashItem*)this;
+/*N*/ }
+
+// -------------------
+// class XLineWidthItem
+// -------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineWidthItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XLineWidthItem::XLineWidthItem(long nWidth)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineWidthItem::XLineWidthItem(long nWidth) :
+/*N*/ SfxMetricItem(XATTR_LINEWIDTH, nWidth)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineWidthItem::XLineWidthItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineWidthItem::XLineWidthItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_LINEWIDTH, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineWidthItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineWidthItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineWidthItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineWidthItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/
+/*N*/ SetValue( nValue );
+/*N*/ return true;
+/*N*/ }
+
+// -------------------
+// class XLineColorItem
+// -------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
+
+/*************************************************************************
+|*
+|* XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) :
+/*N*/ XColorItem(XATTR_LINECOLOR, rName, rTheColor)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineColorItem::XLineColorItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineColorItem::XLineColorItem(SvStream& rIn) :
+/*N*/ XColorItem(XATTR_LINECOLOR, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineColorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineColorItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineColorItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineColorItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineColorItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue().GetRGBColor();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ if(!(rVal >>= nValue))
+/*N*/ return false;
+/*N*/
+/*N*/ SetValue( nValue );
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------
+// class XLineStartItem
+// -----------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(long nIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartItem::XLineStartItem(long nIndex) :
+/*N*/ NameOrIndex(XATTR_LINESTART, nIndex)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(const XubString& rName,
+|* const XPolygon& rXPolygon)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartItem::XLineStartItem(const XubString& rName,
+/*N*/ const XPolygon& rXPolygon):
+/*N*/ NameOrIndex(XATTR_LINESTART, rName),
+/*N*/ aXPolygon(rXPolygon)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(const XLineStartItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartItem::XLineStartItem(const XLineStartItem& rItem) :
+/*N*/ NameOrIndex(rItem),
+/*N*/ aXPolygon(rItem.aXPolygon)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartItem::XLineStartItem(SvStream& rIn) :
+/*N*/ NameOrIndex(XATTR_LINESTART, rIn)
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ UINT32 nPoints;
+/*N*/ INT32 nFlags;
+/*N*/ rIn >> nPoints;
+/*N*/ aXPolygon.SetSize((USHORT)nPoints);
+/*N*/ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+/*N*/ {
+/*N*/ rIn >> aXPolygon[nIndex].X();
+/*N*/ rIn >> aXPolygon[nIndex].Y();
+/*N*/ rIn >> nFlags; aXPolygon.SetFlags(nIndex, (XPolyFlags)nFlags);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XLineStartItem::XLineStartItem(SfxItemPool* pPool, const XPolygon& rXPolygon)
+/*N*/ : NameOrIndex( XATTR_LINESTART, -1 ),
+/*N*/ aXPolygon(rXPolygon)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStartItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineStartItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XLineStartItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XLineStartItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ ((const XLineStartItem&) rItem).aXPolygon == aXPolygon );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineStartItem(rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& XLineStartItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ UINT32 nPoints = (UINT32)aXPolygon.GetPointCount();
+/*N*/ rOut << nPoints;
+/*N*/ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+/*N*/ {
+/*N*/ rOut << aXPolygon[nIndex].X();
+/*N*/ rOut << aXPolygon[nIndex].Y();
+/*N*/ rOut << (INT32)aXPolygon.GetFlags(nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const XPolygon& XLineStartItem::GetValue(const XLineEndTable* pTable)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ const XPolygon& XLineStartItem::GetValue(const XLineEndTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aXPolygon;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetLineEnd();
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ if( nMemberId == MID_NAME )
+/*N*/ {
+/*N*/ ::rtl::OUString aApiName;
+/*N*/ SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
+/*N*/ rVal <<= aApiName;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::PolyPolygonBezierCoords aBezier;
+/*N*/ SvxConvertXPolygonToPolyPolygonBezier( aXPolygon, aBezier );
+/*N*/ rVal <<= aBezier;
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ if( nMemberId == MID_NAME )
+/*N*/ {
+/*?*/ return false;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aXPolygon.SetSize( 0 );
+/*N*/ if( rVal.hasValue() && rVal.getValue() )
+/*N*/ {
+/*N*/ if( rVal.getValueType() != ::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0) )
+/*?*/ return false;
+/*N*/
+/*N*/ aXPolygon.SetSize(0);
+/*N*/ ::com::sun::star::drawing::PolyPolygonBezierCoords* pCoords = (::com::sun::star::drawing::PolyPolygonBezierCoords*)rVal.getValue();
+/*N*/ if( pCoords->Coordinates.getLength() > 0 )
+/*N*/ SvxConvertPolyPolygonBezierToXPolygon( pCoords, aXPolygon );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+/** this function searches in both the models pool and the styles pool for XLineStartItem
+ and XLineEndItem with the same value or name and returns an item with the value of
+ this item and a unique name for an item with this value. */
+/*N*/ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ XLineStartItem* pTempItem = NULL;
+/*N*/ const XLineStartItem* pLineStartItem = this;
+/*N*/
+/*N*/ String aUniqueName( GetName() );
+/*N*/
+/*N*/ if( aXPolygon.GetPointCount() == 0 )
+/*N*/ {
+/*N*/ // if the polygon is empty, check if the name is empty
+/*N*/ if( aUniqueName.Len() == 0 )
+/*N*/ return (XLineStartItem*)this;
+/*N*/
+/*N*/ // force empty name for empty polygons
+/*N*/ return new XLineStartItem( String(), aXPolygon );
+/*N*/ }
+/*N*/
+/*N*/ if( aXPolygon.GetPointCount() > 1 )
+/*N*/ {
+/*N*/ // check if the polygon is closed
+/*N*/ if( aXPolygon[0] != aXPolygon[aXPolygon.GetPointCount() - 1] )
+/*N*/ {
+/*N*/ // force a closed polygon
+/*N*/ XPolygon aNewPolygon( aXPolygon );
+/*N*/ aNewPolygon[ aXPolygon.GetPointCount() ] = aXPolygon[0];
+/*N*/ pTempItem = new XLineStartItem( aUniqueName, aNewPolygon );
+/*N*/ pLineStartItem = pTempItem;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ sal_Bool bForceNew = sal_False;
+/*N*/
+/*N*/ // 2. if we have a name check if there is already an item with the
+/*N*/ // same name in the documents pool with a different line end or start
+/*N*/
+/*N*/ sal_uInt16 nCount, nSurrogate;
+/*N*/
+/*N*/ const SfxItemPool* pPool1 = &pModel->GetItemPool();
+/*N*/ if( aUniqueName.Len() && pPool1 )
+/*N*/ {
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINESTART );
+/*N*/
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineStartItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bForceNew )
+/*N*/ {
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINEEND );
+/*N*/
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineStartItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*?*/ aUniqueName = String();
+/*?*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
+/*N*/ if( aUniqueName.Len() && pPool2)
+/*N*/ {
+/*N*/ nCount = pPool2->GetItemCount( XATTR_LINESTART );
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem( XATTR_LINESTART, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineStartItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*?*/ aUniqueName = String();
+/*?*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bForceNew )
+/*N*/ {
+/*N*/ nCount = pPool2->GetItemCount( XATTR_LINEEND );
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem( XATTR_LINEEND, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineStartItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // if we have no name yet, find existing item with same conent or
+/*N*/ // create a unique name
+/*N*/ if( aUniqueName.Len() == 0 )
+/*N*/ {
+/*N*/ sal_Bool bFoundExisting = sal_False;
+/*N*/
+/*N*/ sal_Int32 nUserIndex = 1;
+/*N*/ const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
+/*N*/ const String aUser( aRes );
+/*N*/
+/*N*/ if( pPool1 )
+/*N*/ {
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINESTART );
+/*N*/ for( sal_uInt16 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate );
+/*N*/
+/*N*/ if( pItem && pItem->GetName().Len() )
+/*N*/ {
+/*N*/ if( !bForceNew && pItem->GetValue() == pLineStartItem->GetValue() )
+/*N*/ {
+/*N*/ aUniqueName = pItem->GetName();
+/*N*/ bFoundExisting = sal_True;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+/*N*/ {
+/*N*/ sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+/*N*/ if( nThisIndex >= nUserIndex )
+/*N*/ nUserIndex = nThisIndex + 1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINEEND );
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate );
+/*N*/
+/*N*/ if( pItem && pItem->GetName().Len() )
+/*N*/ {
+/*N*/ if( !bForceNew && pItem->GetValue() == pLineStartItem->GetValue() )
+/*N*/ {
+/*N*/ aUniqueName = pItem->GetName();
+/*N*/ bFoundExisting = sal_True;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+/*N*/ {
+/*N*/ sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+/*N*/ if( nThisIndex >= nUserIndex )
+/*N*/ nUserIndex = nThisIndex + 1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bFoundExisting )
+/*N*/ {
+/*N*/ aUniqueName = aUser;
+/*N*/ aUniqueName += sal_Unicode(' ');
+/*N*/ aUniqueName += String::CreateFromInt32( nUserIndex );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // if the given name is not valid, replace it!
+/*N*/ if( aUniqueName != GetName() || pTempItem )
+/*N*/ {
+/*N*/ if( pTempItem )
+/*N*/ {
+/*N*/ pTempItem->SetName( aUniqueName );
+/*N*/ return pTempItem;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ return new XLineStartItem( aUniqueName, aXPolygon );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XLineStartItem*)this;
+/*N*/ }
+
+// ---------------------
+// class XLineEndItem
+// ---------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(long nIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndItem::XLineEndItem(long nIndex) :
+/*N*/ NameOrIndex(XATTR_LINEEND, nIndex)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(const XubString& rName,
+|* const XPolygon& rXPolygon)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndItem::XLineEndItem(const XubString& rName, const XPolygon& rPolygon) :
+/*N*/ NameOrIndex(XATTR_LINEEND, rName),
+/*N*/ aXPolygon(rPolygon)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(const XLineEndItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndItem::XLineEndItem(const XLineEndItem& rItem) :
+/*N*/ NameOrIndex(rItem),
+/*N*/ aXPolygon(rItem.aXPolygon)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndItem::XLineEndItem(SvStream& rIn) :
+/*N*/ NameOrIndex(XATTR_LINEEND, rIn)
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ UINT32 nPoints;
+/*N*/ INT32 nFlags;
+/*N*/ rIn >> nPoints;
+/*N*/ aXPolygon.SetSize((USHORT)nPoints);
+/*N*/ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+/*N*/ {
+/*N*/ rIn >> aXPolygon[nIndex].X();
+/*N*/ rIn >> aXPolygon[nIndex].Y();
+/*N*/ rIn >> nFlags; aXPolygon.SetFlags(nIndex, (XPolyFlags)nFlags);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XLineEndItem::XLineEndItem(SfxItemPool* pPool, const XPolygon& rXPolygon)
+/*N*/ : NameOrIndex( XATTR_LINEEND, -1 ),
+/*N*/ aXPolygon(rXPolygon)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineEndItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineEndItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XLineEndItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XLineEndItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ ((const XLineEndItem&) rItem).aXPolygon == aXPolygon );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineEndItem(rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& XLineEndItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ UINT32 nPoints = (UINT32)aXPolygon.GetPointCount();
+/*N*/ rOut << nPoints;
+/*N*/ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+/*N*/ {
+/*N*/ rOut << aXPolygon[nIndex].X();
+/*N*/ rOut << aXPolygon[nIndex].Y();
+/*N*/ rOut << (INT32)aXPolygon.GetFlags(nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const XPolygon& XLineEndItem::GetValue(const XLineEndTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ const XPolygon& XLineEndItem::GetValue(const XLineEndTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aXPolygon;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetLineEnd();
+/*N*/ }
+
+
+/** this function searches in both the models pool and the styles pool for XLineStartItem
+ and XLineEndItem with the same value or name and returns an item with the value of
+ this item and a unique name for an item with this value. */
+/*N*/ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ XLineEndItem* pTempItem = NULL;
+/*N*/ const XLineEndItem* pLineEndItem = this;
+/*N*/
+/*N*/ String aUniqueName( GetName() );
+/*N*/
+/*N*/ if( aXPolygon.GetPointCount() == 0 )
+/*N*/ {
+/*N*/ // if the polygon is empty, check if the name is empty
+/*N*/ if( aUniqueName.Len() == 0 )
+/*N*/ return (XLineEndItem*)this;
+/*N*/
+/*N*/ // force empty name for empty polygons
+/*N*/ return new XLineEndItem( String(), aXPolygon );
+/*N*/ }
+/*N*/
+/*N*/ if( aXPolygon.GetPointCount() > 1 )
+/*N*/ {
+/*N*/ // check if the polygon is closed
+/*N*/ if( aXPolygon[0] != aXPolygon[aXPolygon.GetPointCount() - 1] )
+/*N*/ {
+/*N*/ // force a closed polygon
+/*N*/ XPolygon aNewPolygon( aXPolygon );
+/*N*/ aNewPolygon[ aXPolygon.GetPointCount() ] = aXPolygon[0];
+/*N*/ pTempItem = new XLineEndItem( aUniqueName, aNewPolygon );
+/*N*/ pLineEndItem = pTempItem;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ sal_Bool bForceNew = sal_False;
+/*N*/
+/*N*/ // 2. if we have a name check if there is already an item with the
+/*N*/ // same name in the documents pool with a different line end or start
+/*N*/
+/*N*/ sal_uInt16 nCount, nSurrogate;
+/*N*/
+/*N*/ const SfxItemPool* pPool1 = &pModel->GetItemPool();
+/*N*/ if( aUniqueName.Len() && pPool1 )
+/*N*/ {
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINESTART );
+/*N*/
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineEndItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bForceNew )
+/*N*/ {
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINEEND );
+/*N*/
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineEndItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
+/*N*/ if( aUniqueName.Len() && pPool2)
+/*N*/ {
+/*N*/ nCount = pPool2->GetItemCount( XATTR_LINESTART );
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem( XATTR_LINESTART, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineEndItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bForceNew )
+/*N*/ {
+/*N*/ nCount = pPool2->GetItemCount( XATTR_LINEEND );
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem( XATTR_LINEEND, nSurrogate );
+/*N*/
+/*N*/ if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
+/*N*/ {
+/*N*/ // if there is already an item with the same name and the same
+/*N*/ // value its ok to set it
+/*N*/ if( pItem->GetValue() != pLineEndItem->GetValue() )
+/*N*/ {
+/*N*/ // same name but different value, we need a new name for this item
+/*N*/ aUniqueName = String();
+/*N*/ bForceNew = sal_True;
+/*N*/ }
+/*N*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // if we have no name yet, find existing item with same conent or
+/*N*/ // create a unique name
+/*N*/ if( aUniqueName.Len() == 0 )
+/*N*/ {
+/*N*/ sal_Bool bFoundExisting = sal_False;
+/*N*/
+/*N*/ sal_Int32 nUserIndex = 1;
+/*N*/ const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
+/*N*/ const String aUser( aRes );
+/*N*/
+/*N*/ if( pPool1 )
+/*N*/ {
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINESTART );
+/*N*/ for( sal_uInt16 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate );
+/*N*/
+/*N*/ if( pItem && pItem->GetName().Len() )
+/*N*/ {
+/*N*/ if( !bForceNew && pItem->GetValue() == pLineEndItem->GetValue() )
+/*N*/ {
+/*N*/ aUniqueName = pItem->GetName();
+/*N*/ bFoundExisting = sal_True;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+/*N*/ {
+/*N*/ sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+/*N*/ if( nThisIndex >= nUserIndex )
+/*N*/ nUserIndex = nThisIndex + 1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ nCount = pPool1->GetItemCount( XATTR_LINEEND );
+/*N*/ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+/*N*/ {
+/*N*/ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate );
+/*N*/
+/*N*/ if( pItem && pItem->GetName().Len() )
+/*N*/ {
+/*N*/ if( !bForceNew && pItem->GetValue() == pLineEndItem->GetValue() )
+/*N*/ {
+/*N*/ aUniqueName = pItem->GetName();
+/*N*/ bFoundExisting = sal_True;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ if( pItem->GetName().CompareTo( aUser, aUser.Len() ) == 0 )
+/*N*/ {
+/*N*/ sal_Int32 nThisIndex = pItem->GetName().Copy( aUser.Len() ).ToInt32();
+/*N*/ if( nThisIndex >= nUserIndex )
+/*N*/ nUserIndex = nThisIndex + 1;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if( !bFoundExisting )
+/*N*/ {
+/*N*/ aUniqueName = aUser;
+/*N*/ aUniqueName += sal_Unicode(' ');
+/*N*/ aUniqueName += String::CreateFromInt32( nUserIndex );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // if the given name is not valid, replace it!
+/*N*/ if( aUniqueName != GetName() || pTempItem )
+/*N*/ {
+/*N*/ if( pTempItem )
+/*N*/ {
+/*N*/ pTempItem->SetName( aUniqueName );
+/*N*/ return pTempItem;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ return new XLineEndItem( aUniqueName, aXPolygon );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XLineEndItem*)this;
+/*N*/ }
+
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ if( nMemberId == MID_NAME )
+/*N*/ {
+/*N*/ ::rtl::OUString aApiName;
+/*N*/ SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
+/*N*/ rVal <<= aApiName;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::PolyPolygonBezierCoords aBezier;
+/*N*/ SvxConvertXPolygonToPolyPolygonBezier( aXPolygon, aBezier );
+/*N*/ rVal <<= aBezier;
+/*N*/ }
+/*N*/ #endif
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ if( nMemberId == MID_NAME )
+/*N*/ {
+/*N*/ return false;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aXPolygon.SetSize( 0 );
+/*N*/ if( rVal.hasValue() && rVal.getValue() )
+/*N*/ {
+/*N*/ if( rVal.getValueType() != ::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0) )
+/*N*/ return false;
+/*N*/
+/*N*/ aXPolygon.SetSize(0);
+/*N*/ ::com::sun::star::drawing::PolyPolygonBezierCoords* pCoords = (::com::sun::star::drawing::PolyPolygonBezierCoords*)rVal.getValue();
+/*N*/ if( pCoords->Coordinates.getLength() > 0 )
+/*N*/ SvxConvertPolyPolygonBezierToXPolygon( pCoords, aXPolygon );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// ----------------------------
+// class XLineStartWidthItem
+// ----------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XLineStartWidthItem::XLineStartWidthItem(long nWidth)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartWidthItem::XLineStartWidthItem(long nWidth) :
+/*N*/ SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_LINESTARTWIDTH, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartWidthItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStartWidthItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineStartWidthItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineStartWidthItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineStartWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineStartWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue( nValue );
+/*N*/ return true;
+/*N*/ }
+
+
+
+// --------------------------
+// class XLineEndWidthItem
+// --------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineEndWidthItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XLineEndWidthItem::XLineEndWidthItem(long nWidth)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndWidthItem::XLineEndWidthItem(long nWidth) :
+/*N*/ SfxMetricItem(XATTR_LINEENDWIDTH, nWidth)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_LINEENDWIDTH, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndWidthItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineEndWidthItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineEndWidthItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineEndWidthItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineEndWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineEndWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue( nValue );
+/*N*/ return true;
+/*N*/ }
+
+
+// -----------------------------
+// class XLineStartCenterItem
+// -----------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineStartCenterItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter) :
+/*N*/ SfxBoolItem(XATTR_LINESTARTCENTER, bStartCenter)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) :
+/*N*/ SfxBoolItem(XATTR_LINESTARTCENTER, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineStartCenterItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStartCenterItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineStartCenterItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineStartCenterItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineStartCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bValue = GetValue();
+/*N*/ rVal.setValue( &bValue, ::getCppuBooleanType() );
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineStartCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() )
+/*N*/ return false;
+/*N*/
+/*N*/ SetValue( *(sal_Bool*)rVal.getValue() );
+/*N*/ return true;
+/*N*/ }
+
+
+// ---------------------------
+// class XLineEndCenterItem
+// ---------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineEndCenterItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter) :
+/*N*/ SfxBoolItem(XATTR_LINEENDCENTER, bEndCenter)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) :
+/*N*/ SfxBoolItem(XATTR_LINEENDCENTER, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineEndCenterItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineEndCenterItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineEndCenterItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineEndCenterItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+/*N*/ bool XLineEndCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bValue = GetValue();
+/*N*/ rVal.setValue( &bValue, ::getCppuBooleanType() );
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ bool XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() )
+/*N*/ return false;
+/*N*/
+/*N*/ SetValue( *(sal_Bool*)rVal.getValue() );
+/*N*/ return true;
+/*N*/ }
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Fuellattribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// --------------------
+// class XFillStyleItem
+// --------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) :
+/*N*/ SfxEnumItem(XATTR_FILLSTYLE, eFillStyle)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillStyleItem::XFillStyleItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillStyleItem::XFillStyleItem(SvStream& rIn) :
+/*N*/ SfxEnumItem(XATTR_FILLSTYLE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillStyleItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillStyleItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFillStyleItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillStyleItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ USHORT XFillStyleItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 5;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::FillStyle eFS = (::com::sun::star::drawing::FillStyle)GetValue();
+/*N*/
+/*N*/ rVal <<= eFS;
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::FillStyle eFS;
+/*N*/ if(!(rVal >>= eFS))
+/*N*/ {
+/*?*/ // also try an int (for Basic)
+/*?*/ sal_Int32 nFS;
+/*?*/ if(!(rVal >>= nFS))
+/*?*/ return false;
+/*?*/ eFS = (::com::sun::star::drawing::FillStyle)nFS;
+/*N*/ }
+/*N*/
+/*N*/ SetValue( (XFillStyle)eFS );
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+
+// -------------------
+// class XFillColorItem
+// -------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
+
+/*************************************************************************
+|*
+|* XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) :
+/*N*/ XColorItem(XATTR_FILLCOLOR, rName, rTheColor)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillColorItem::XFillColorItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillColorItem::XFillColorItem(SvStream& rIn) :
+/*N*/ XColorItem(XATTR_FILLCOLOR, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillColorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillColorItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFillColorItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillColorItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillColorItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue().GetRGBColor();
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+
+/*N*/ bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ if(!(rVal >>= nValue ))
+/*N*/ return false;
+/*N*/
+/*N*/ SetValue( nValue );
+/*N*/ return true;
+/*N*/ }
+
+
+
+// ----------------
+// class XGradient
+// ----------------
+
+/*************************************************************************
+|*
+|* XGradient::XGradient(XGradientStyle, const Color&, const Color&,
+|* long, USHORT, USHORT, USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 21.11.94
+|* Letzte Aenderung 21.11.94
+|*
+*************************************************************************/
+
+/*N*/ XGradient::XGradient(const Color& rStart, const Color& rEnd,
+/*N*/ XGradientStyle eTheStyle, long nTheAngle, USHORT nXOfs,
+/*N*/ USHORT nYOfs, USHORT nTheBorder,
+/*N*/ USHORT nStartIntens, USHORT nEndIntens,
+/*N*/ USHORT nSteps) :
+/*N*/ aStartColor(rStart),
+/*N*/ aEndColor(rEnd),
+/*N*/ eStyle(eTheStyle),
+/*N*/ nAngle(nTheAngle),
+/*N*/ nBorder(nTheBorder),
+/*N*/ nOfsX(nXOfs),
+/*N*/ nOfsY(nYOfs),
+/*N*/ nIntensStart(nStartIntens),
+/*N*/ nIntensEnd(nEndIntens),
+/*N*/ nStepCount(nSteps)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XGradient::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 29.11.94
+|* Letzte Aenderung 29.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XGradient::operator==(const XGradient& rGradient) const
+/*N*/ {
+/*N*/ return ( eStyle == rGradient.eStyle &&
+/*N*/ aStartColor == rGradient.aStartColor &&
+/*N*/ aEndColor == rGradient.aEndColor &&
+/*N*/ nAngle == rGradient.nAngle &&
+/*N*/ nBorder == rGradient.nBorder &&
+/*N*/ nOfsX == rGradient.nOfsX &&
+/*N*/ nOfsY == rGradient.nOfsY &&
+/*N*/ nIntensStart == rGradient.nIntensStart &&
+/*N*/ nIntensEnd == rGradient.nIntensEnd &&
+/*N*/ nStepCount == rGradient.nStepCount );
+/*N*/ }
+
+
+// -----------------------
+// class XFillGradientItem
+// -----------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(long nIndex,
+|* const XGradient& rTheGradient)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillGradientItem::XFillGradientItem(long nIndex,
+/*N*/ const XGradient& rTheGradient) :
+/*N*/ NameOrIndex(XATTR_FILLGRADIENT, nIndex),
+/*N*/ aGradient(rTheGradient)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(const XubString& rName,
+|* const XGradient& rTheGradient)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillGradientItem::XFillGradientItem(const XubString& rName,
+/*N*/ const XGradient& rTheGradient) :
+/*N*/ NameOrIndex(XATTR_FILLGRADIENT, rName),
+/*N*/ aGradient(rTheGradient)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) :
+/*N*/ NameOrIndex(rItem),
+/*N*/ aGradient(rItem.aGradient)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillGradientItem::XFillGradientItem(SvStream& rIn, USHORT nVer) :
+/*N*/ NameOrIndex(XATTR_FILLGRADIENT, rIn),
+/*N*/ aGradient(COL_BLACK, COL_WHITE)
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ USHORT nUSTemp;
+/*N*/ USHORT nRed;
+/*N*/ USHORT nGreen;
+/*N*/ USHORT nBlue;
+/*N*/ INT16 nITemp;
+/*N*/ INT32 nLTemp;
+/*N*/
+/*N*/ rIn >> nITemp; aGradient.SetGradientStyle((XGradientStyle)nITemp);
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ Color aCol;
+/*N*/ aCol = Color( (BYTE)( nRed >> 8 ), (BYTE)( nGreen >> 8 ), (BYTE)( nBlue >> 8 ) );
+/*N*/ aGradient.SetStartColor( aCol );
+/*N*/
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aCol = Color( (BYTE)( nRed >> 8 ), (BYTE)( nGreen >> 8 ), (BYTE)( nBlue >> 8 ) );
+/*N*/ aGradient.SetEndColor(aCol);
+/*N*/ rIn >> nLTemp; aGradient.SetAngle(nLTemp);
+/*N*/ rIn >> nUSTemp; aGradient.SetBorder(nUSTemp);
+/*N*/ rIn >> nUSTemp; aGradient.SetXOffset(nUSTemp);
+/*N*/ rIn >> nUSTemp; aGradient.SetYOffset(nUSTemp);
+/*N*/ rIn >> nUSTemp; aGradient.SetStartIntens(nUSTemp);
+/*N*/ rIn >> nUSTemp; aGradient.SetEndIntens(nUSTemp);
+/*N*/
+/*N*/ // bei neueren Versionen wird zusaetzlich
+/*N*/ // die Schrittweite mit eingelesen
+/*N*/ if (nVer >= 1)
+/*N*/ {
+/*N*/ rIn >> nUSTemp; aGradient.SetSteps(nUSTemp);
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XFillGradientItem::XFillGradientItem(SfxItemPool* pPool, const XGradient& rTheGradient)
+/*N*/ : NameOrIndex( XATTR_FILLGRADIENT, -1 ),
+/*N*/ aGradient(rTheGradient)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillGradientItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillGradientItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFillGradientItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ aGradient == ((const XFillGradientItem&) rItem).aGradient );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillGradientItem(rIn, nVer);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillGradientItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& XFillGradientItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ rOut << (INT16)aGradient.GetGradientStyle();
+/*N*/
+/*N*/ USHORT nTmp;
+/*N*/
+/*N*/ nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetRed() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetGreen() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetBlue() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetRed() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetGreen() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetBlue() ); rOut << nTmp;
+/*N*/
+/*N*/ rOut << (INT32) aGradient.GetAngle();
+/*N*/ rOut << aGradient.GetBorder();
+/*N*/ rOut << aGradient.GetXOffset();
+/*N*/ rOut << aGradient.GetYOffset();
+/*N*/ rOut << aGradient.GetStartIntens();
+/*N*/ rOut << aGradient.GetEndIntens();
+/*N*/ rOut << aGradient.GetSteps();
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const XGradient& XFillGradientItem::GetValue(const XGradientTable* pTable)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ const XGradient& XFillGradientItem::GetValue(const XGradientTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aGradient;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetGradient();
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* USHORT XFillGradientItem::GetVersion() const
+|*
+|* Beschreibung
+|* Ersterstellung 01.11.95
+|* Letzte Aenderung 01.11.95
+|*
+*************************************************************************/
+
+/*N*/ USHORT XFillGradientItem::GetVersion( USHORT nFileFormatVersion ) const
+/*N*/ {
+/*N*/ // !!! this version number also represents the version number of superclasses
+/*N*/ // !!! (e.g. XFillFloatTransparenceItem); if you make any changes here,
+/*N*/ // !!! the superclass is also affected
+/*N*/ return 1;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+/*N*/ bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_FILLGRADIENT:
+/*N*/ {
+/*N*/ const XGradient& aXGradient = GetValue();
+/*N*/ ::com::sun::star::awt::Gradient aGradient;
+/*N*/
+/*N*/ aGradient.Style = (::com::sun::star::awt::GradientStyle) aXGradient.GetGradientStyle();
+/*N*/ aGradient.StartColor = (INT32)aXGradient.GetStartColor().GetColor();
+/*N*/ aGradient.EndColor = (INT32)aXGradient.GetEndColor().GetColor();
+/*N*/ aGradient.Angle = (short)aXGradient.GetAngle();
+/*N*/ aGradient.Border = aXGradient.GetBorder();
+/*N*/ aGradient.XOffset = aXGradient.GetXOffset();
+/*N*/ aGradient.YOffset = aXGradient.GetYOffset();
+/*N*/ aGradient.StartIntensity = aXGradient.GetStartIntens();
+/*N*/ aGradient.EndIntensity = aXGradient.GetEndIntens();
+/*N*/ aGradient.StepCount = aXGradient.GetSteps();
+/*N*/
+/*N*/ rVal <<= aGradient;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_NAME:
+/*N*/ {
+/*N*/ ::rtl::OUString aApiName;
+/*N*/ SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
+/*N*/ rVal <<= aApiName;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_GRADIENT_STYLE: rVal <<= (sal_Int16)GetValue().GetGradientStyle(); break;
+/*N*/ case MID_GRADIENT_STARTCOLOR: rVal <<= (sal_Int32)GetValue().GetStartColor().GetColor(); break;
+/*N*/ case MID_GRADIENT_ENDCOLOR: rVal <<= (sal_Int32)GetValue().GetEndColor().GetColor(); break;
+/*N*/ case MID_GRADIENT_ANGLE: rVal <<= (sal_Int16)GetValue().GetAngle(); break;
+/*N*/ case MID_GRADIENT_BORDER: rVal <<= GetValue().GetBorder(); break;
+/*N*/ case MID_GRADIENT_XOFFSET: rVal <<= GetValue().GetXOffset(); break;
+/*N*/ case MID_GRADIENT_YOFFSET: rVal <<= GetValue().GetYOffset(); break;
+/*N*/ case MID_GRADIENT_STARTINTENSITY: rVal <<= GetValue().GetStartIntens(); break;
+/*N*/ case MID_GRADIENT_ENDINTENSITY: rVal <<= GetValue().GetEndIntens(); break;
+/*N*/ case MID_GRADIENT_STEPCOUNT: rVal <<= GetValue().GetSteps(); break;
+/*N*/
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); return false;
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_NAME:
+/*N*/ {
+/*?*/ ::rtl::OUString aName;
+/*?*/ if (!(rVal >>= aName ))
+/*?*/ return sal_False;
+/*?*/ SetName( aName );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_FILLGRADIENT:
+/*N*/ {
+/*N*/ ::com::sun::star::awt::Gradient aGradient;
+/*N*/ if(!(rVal >>= aGradient))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ XGradient aXGradient;
+/*N*/
+/*N*/ aXGradient.SetGradientStyle( (XGradientStyle) aGradient.Style );
+/*N*/ aXGradient.SetStartColor( aGradient.StartColor );
+/*N*/ aXGradient.SetEndColor( aGradient.EndColor );
+/*N*/ aXGradient.SetAngle( aGradient.Angle );
+/*N*/ aXGradient.SetBorder( aGradient.Border );
+/*N*/ aXGradient.SetXOffset( aGradient.XOffset );
+/*N*/ aXGradient.SetYOffset( aGradient.YOffset );
+/*N*/ aXGradient.SetStartIntens( aGradient.StartIntensity );
+/*N*/ aXGradient.SetEndIntens( aGradient.EndIntensity );
+/*N*/ aXGradient.SetSteps( aGradient.StepCount );
+/*N*/
+/*N*/ SetValue( aXGradient );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_GRADIENT_STARTCOLOR:
+/*N*/ case MID_GRADIENT_ENDCOLOR:
+/*N*/ {
+/*?*/ sal_Int32 nVal;
+/*?*/ if(!(rVal >>= nVal ))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ XGradient aXGradient = GetValue();
+/*?*/
+/*?*/ if ( nMemberId == MID_GRADIENT_STARTCOLOR )
+/*?*/ aXGradient.SetStartColor( nVal );
+/*?*/ else
+/*?*/ aXGradient.SetEndColor( nVal );
+/*?*/ SetValue( aXGradient );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_GRADIENT_STYLE:
+/*N*/ case MID_GRADIENT_ANGLE:
+/*N*/ case MID_GRADIENT_BORDER:
+/*N*/ case MID_GRADIENT_STARTINTENSITY:
+/*N*/ case MID_GRADIENT_ENDINTENSITY:
+/*N*/ case MID_GRADIENT_STEPCOUNT:
+/*N*/ case MID_GRADIENT_XOFFSET:
+/*N*/ case MID_GRADIENT_YOFFSET:
+/*N*/ {
+/*?*/ sal_Int16 nVal;
+/*?*/ if(!(rVal >>= nVal ))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ XGradient aXGradient = GetValue();
+/*?*/
+/*?*/ switch ( nMemberId )
+/*?*/ {
+/*?*/ case MID_GRADIENT_STYLE:
+/*?*/ aXGradient.SetGradientStyle( (XGradientStyle)nVal ); break;
+/*?*/ case MID_GRADIENT_ANGLE:
+/*?*/ aXGradient.SetAngle( nVal ); break;
+/*?*/ case MID_GRADIENT_BORDER:
+/*?*/ aXGradient.SetBorder( nVal ); break;
+/*?*/ case MID_GRADIENT_STARTINTENSITY:
+/*?*/ aXGradient.SetStartIntens( nVal ); break;
+/*?*/ case MID_GRADIENT_ENDINTENSITY:
+/*?*/ aXGradient.SetEndIntens( nVal ); break;
+/*?*/ case MID_GRADIENT_STEPCOUNT:
+/*?*/ aXGradient.SetSteps( nVal ); break;
+/*?*/ case MID_GRADIENT_XOFFSET:
+/*?*/ aXGradient.SetXOffset( nVal ); break;
+/*?*/ case MID_GRADIENT_YOFFSET:
+/*?*/ aXGradient.SetYOffset( nVal ); break;
+/*?*/ }
+/*?*/
+/*?*/ SetValue( aXGradient );
+/*?*/ break;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return sal_True;
+/*N*/ }
+
+/*N*/ BOOL XFillGradientItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
+/*N*/ {
+/*N*/ return ((XFillGradientItem*)p1)->GetValue() == ((XFillGradientItem*)p2)->GetValue();
+/*N*/ }
+
+/*N*/ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+/*N*/ XATTR_FILLGRADIENT,
+/*N*/ &pModel->GetItemPool(),
+/*N*/ pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
+/*N*/ XFillGradientItem::CompareValueFunc,
+/*N*/ RID_SVXSTR_GRADIENT,
+/*N*/ pModel->GetGradientList() );
+/*N*/
+/*N*/ // if the given name is not valid, replace it!
+/*N*/ if( aUniqueName != GetName() )
+/*N*/ {
+/*N*/ return new XFillGradientItem( aUniqueName, aGradient );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XFillGradientItem*)this;
+/*N*/ }
+
+// ----------------------------------
+// class XFillFloatTransparenceItem -
+// ----------------------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillFloatTransparenceItem, XFillGradientItem );
+
+// -----------------------------------------------------------------------------
+
+/*N*/ XFillFloatTransparenceItem::XFillFloatTransparenceItem() :
+/*N*/ bEnabled( FALSE )
+/*N*/ {
+/*N*/ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*?*/ XFillFloatTransparenceItem::XFillFloatTransparenceItem(const XubString& rName, const XGradient& rGradient, BOOL bEnable ) :
+/*?*/ XFillGradientItem ( rName, rGradient ),
+/*?*/ bEnabled ( bEnable )
+/*?*/ {
+/*?*/ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+/*?*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ XFillFloatTransparenceItem::XFillFloatTransparenceItem( const XFillFloatTransparenceItem& rItem ) :
+/*N*/ XFillGradientItem ( rItem ),
+/*N*/ bEnabled ( rItem.bEnabled )
+/*N*/ {
+/*N*/ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ XFillFloatTransparenceItem::XFillFloatTransparenceItem( SvStream& rIn, USHORT nVer ) :
+/*N*/ XFillGradientItem ( rIn, nVer )
+/*N*/ {
+/*N*/ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+/*N*/ rIn >> bEnabled;
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XFillFloatTransparenceItem::XFillFloatTransparenceItem(SfxItemPool* pPool, const XGradient& rTheGradient, BOOL bEnable )
+/*N*/ : XFillGradientItem ( -1, rTheGradient ),
+/*N*/ bEnabled ( bEnable )
+/*N*/ {
+/*N*/ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ int XFillFloatTransparenceItem::operator==( const SfxPoolItem& rItem ) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) ) &&
+/*N*/ ( GetValue() == ((const XFillGradientItem&)rItem).GetValue() ) &&
+/*N*/ ( bEnabled == ( (XFillFloatTransparenceItem&) rItem ).bEnabled );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* XFillFloatTransparenceItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillFloatTransparenceItem( *this );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* XFillFloatTransparenceItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return( ( 0 == nVer ) ? Clone( NULL ) : new XFillFloatTransparenceItem( rIn, nVer ) );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ SvStream& XFillFloatTransparenceItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ XFillGradientItem::Store( rOut, nItemVersion );
+/*N*/ rOut << bEnabled;
+/*N*/ return rOut;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ USHORT XFillFloatTransparenceItem::GetVersion( USHORT nFileFormatVersion ) const
+/*N*/ {
+/*N*/ // !!! if version number of this object must be increased, please !!!
+/*N*/ // !!! increase version number of base class XFillGradientItem !!!
+/*N*/ return XFillGradientItem::GetVersion( nFileFormatVersion );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ bool XFillFloatTransparenceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ return XFillGradientItem::QueryValue( rVal, nMemberId );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+
+/*N*/ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ // #85953# unique name only necessary when enabled
+/*N*/ if(IsEnabled())
+/*N*/ {
+/*?*/ if( pModel )
+/*?*/ {
+/*?*/ const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+/*?*/ XATTR_FILLFLOATTRANSPARENCE,
+/*?*/ &pModel->GetItemPool(),
+/*?*/ pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
+/*?*/ XFillFloatTransparenceItem::CompareValueFunc,
+/*?*/ RID_SVXSTR_TRASNGR0,
+/*?*/ NULL );
+/*?*/
+/*?*/ // if the given name is not valid, replace it!
+/*?*/ if( aUniqueName != GetName() )
+/*?*/ {
+/*?*/ return new XFillFloatTransparenceItem( aUniqueName, GetValue(), TRUE );
+/*?*/ }
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ // #85953# if disabled, force name to empty string
+/*N*/ if(GetName().Len())
+/*N*/ {
+/*?*/ return new XFillFloatTransparenceItem(String(), GetValue(), FALSE);
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XFillFloatTransparenceItem*)this;
+/*N*/ }
+
+// -------------
+// class XHatch
+// -------------
+
+/*************************************************************************
+|*
+|* XHatch::XHatch(XHatchStyle, const Color&, long, long)
+|*
+|* Beschreibung
+|* Ersterstellung 21.11.94
+|* Letzte Aenderung 21.11.94
+|*
+*************************************************************************/
+
+/*N*/ XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance,
+/*N*/ long nTheAngle) :
+/*N*/ aColor(rCol),
+/*N*/ eStyle(eTheStyle),
+/*N*/ nDistance(nTheDistance),
+/*N*/ nAngle(nTheAngle)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XHatch::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 29.11.94
+|* Letzte Aenderung 29.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XHatch::operator==(const XHatch& rHatch) const
+/*N*/ {
+/*N*/ return ( eStyle == rHatch.eStyle &&
+/*N*/ aColor == rHatch.aColor &&
+/*N*/ nDistance == rHatch.nDistance &&
+/*N*/ nAngle == rHatch.nAngle );
+/*N*/ }
+
+
+// -----------------------
+// class XFillHatchItem
+// -----------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(const XubString& rName,
+|* const XHatch& rTheHatch)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillHatchItem::XFillHatchItem(const XubString& rName,
+/*N*/ const XHatch& rTheHatch) :
+/*N*/ NameOrIndex(XATTR_FILLHATCH, rName),
+/*N*/ aHatch(rTheHatch)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) :
+/*N*/ NameOrIndex(rItem),
+/*N*/ aHatch(rItem.aHatch)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillHatchItem::XFillHatchItem(SvStream& rIn) :
+/*N*/ NameOrIndex(XATTR_FILLHATCH, rIn),
+/*N*/ aHatch(COL_BLACK)
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ USHORT nRed;
+/*N*/ USHORT nGreen;
+/*N*/ USHORT nBlue;
+/*N*/ INT16 nITemp;
+/*N*/ INT32 nLTemp;
+/*N*/
+/*N*/ rIn >> nITemp; aHatch.SetHatchStyle((XHatchStyle)nITemp);
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/
+/*N*/ Color aCol;
+/*N*/ aCol = Color( (BYTE)( nRed >> 8 ), (BYTE)( nGreen >> 8 ), (BYTE)( nBlue >> 8 ) );
+/*N*/ aHatch.SetColor(aCol);
+/*N*/ rIn >> nLTemp; aHatch.SetDistance(nLTemp);
+/*N*/ rIn >> nLTemp; aHatch.SetAngle(nLTemp);
+/*N*/ }
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XFillHatchItem::XFillHatchItem(SfxItemPool* pPool, const XHatch& rTheHatch)
+/*N*/ : NameOrIndex( XATTR_FILLHATCH, -1 ),
+/*N*/ aHatch(rTheHatch)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillHatchItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillHatchItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFillHatchItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XFillHatchItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ int XFillHatchItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ aHatch == ((const XFillHatchItem&) rItem).aHatch );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillHatchItem(rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillHatchItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& XFillHatchItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ rOut << (INT16)aHatch.GetHatchStyle();
+/*N*/
+/*N*/ USHORT nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aHatch.GetColor().GetRed() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aHatch.GetColor().GetGreen() ); rOut << nTmp;
+/*N*/ nTmp = VCLTOSVCOL( aHatch.GetColor().GetBlue() ); rOut << nTmp;
+/*N*/
+/*N*/ rOut << (INT32) aHatch.GetDistance();
+/*N*/ rOut << (INT32) aHatch.GetAngle();
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const XHatch& XFillHatchItem::GetValue(const XHatchTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+/*N*/ const XHatch& XFillHatchItem::GetValue(const XHatchTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aHatch;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetHatch();
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+/*N*/ bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_FILLHATCH:
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::Hatch aUnoHatch;
+/*N*/
+/*N*/ aUnoHatch.Style = (::com::sun::star::drawing::HatchStyle)aHatch.GetHatchStyle();
+/*N*/ aUnoHatch.Color = aHatch.GetColor().GetColor();
+/*N*/ aUnoHatch.Distance = aHatch.GetDistance();
+/*N*/ aUnoHatch.Angle = aHatch.GetAngle();
+/*N*/ rVal <<= aUnoHatch;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_NAME:
+/*N*/ {
+/*N*/ ::rtl::OUString aApiName;
+/*N*/ SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
+/*N*/ rVal <<= aApiName;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_HATCH_STYLE:
+/*N*/ rVal <<= (::com::sun::star::drawing::HatchStyle)aHatch.GetHatchStyle(); break;
+/*N*/ case MID_HATCH_COLOR:
+/*N*/ rVal <<= (sal_Int32)aHatch.GetColor().GetColor(); break;
+/*N*/ case MID_HATCH_DISTANCE:
+/*N*/ rVal <<= aHatch.GetDistance(); break;
+/*N*/ case MID_HATCH_ANGLE:
+/*N*/ rVal <<= aHatch.GetAngle(); break;
+/*N*/
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------------------------------------------------------
+/*N*/ bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/
+/*N*/ switch ( nMemberId )
+/*N*/ {
+/*N*/ case MID_FILLHATCH:
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::Hatch aUnoHatch;
+/*N*/ if(!(rVal >>= aUnoHatch))
+/*N*/ return sal_False;
+/*N*/
+/*N*/ aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
+/*N*/ aHatch.SetColor( aUnoHatch.Color );
+/*N*/ aHatch.SetDistance( aUnoHatch.Distance );
+/*N*/ aHatch.SetAngle( aUnoHatch.Angle );
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_NAME:
+/*N*/ {
+/*?*/ ::rtl::OUString aName;
+/*?*/ if (!(rVal >>= aName ))
+/*?*/ return sal_False;
+/*?*/ SetName( aName );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_HATCH_STYLE:
+/*N*/ {
+/*?*/ sal_Int16 nVal;
+/*?*/ if (!(rVal >>= nVal ))
+/*?*/ return sal_False;
+/*?*/ aHatch.SetHatchStyle( (XHatchStyle)nVal );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ case MID_HATCH_COLOR:
+/*N*/ case MID_HATCH_DISTANCE:
+/*N*/ case MID_HATCH_ANGLE:
+/*N*/ {
+/*?*/ sal_Int32 nVal;
+/*?*/ if (!(rVal >>= nVal ))
+/*?*/ return sal_False;
+/*?*/
+/*?*/ if ( nMemberId == MID_HATCH_COLOR )
+/*?*/ aHatch.SetColor( nVal );
+/*?*/ else if ( nMemberId == MID_HATCH_DISTANCE )
+/*?*/ aHatch.SetDistance( nVal );
+/*?*/ else
+/*?*/ aHatch.SetAngle( nVal );
+/*?*/ break;
+/*N*/ }
+/*N*/
+/*N*/ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+/*N*/ BOOL XFillHatchItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
+/*N*/ {
+/*N*/ return ((XFillHatchItem*)p1)->GetValue() == ((XFillHatchItem*)p2)->GetValue();
+/*N*/ }
+
+/*N*/ XFillHatchItem* XFillHatchItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+/*N*/ XATTR_FILLHATCH,
+/*N*/ &pModel->GetItemPool(),
+/*N*/ pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
+/*N*/ XFillHatchItem::CompareValueFunc,
+/*N*/ RID_SVXSTR_HATCH10,
+/*N*/ pModel->GetHatchList() );
+/*N*/
+/*N*/ // if the given name is not valid, replace it!
+/*N*/ if( aUniqueName != GetName() )
+/*N*/ {
+/*N*/ return new XFillHatchItem( aUniqueName, aHatch );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XFillHatchItem*)this;
+/*N*/ }
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// FormText-Attribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+//-------------------------
+// class XFormTextStyleItem
+//-------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextStyleItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextStyleItem::XFormTextStyleItem()
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTSTYLE, eTheStyle)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTSTYLE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextStyleItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextStyleItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextStyleItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextStyleItem(rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+/*N*/ USHORT XFormTextStyleItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 5;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextStyleItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextStyleItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue((XFormTextStyle)nValue);
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+//-------------------------
+// class XFormTextAdjustItem
+//-------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextAdjustItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextAdjustItem::XFormTextAdjustItem()
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTADJUST, eTheAdjust)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTADJUST, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextAdjustItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextAdjustItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextAdjustItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextAdjustItem(rIn);
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+/*N*/ USHORT XFormTextAdjustItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 4;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue((XFormTextAdjust)nValue);
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+//----------------------------
+// class XFormTextDistanceItem
+//----------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextDistanceItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextDistanceItem::XFormTextDistanceItem()
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextDistanceItem::XFormTextDistanceItem(long nDist) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTDISTANCE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextDistanceItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextDistanceItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextDistanceItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextDistanceItem(rIn);
+/*N*/ }
+
+//-------------------------
+// class XFormTextStartItem
+//-------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextStartItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextStartItem::XFormTextStartItem(long nStart)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextStartItem::XFormTextStartItem(long nStart) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTSTART, nStart)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextStartItem::XFormTextStartItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextStartItem::XFormTextStartItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTSTART, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextStartItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextStartItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextStartItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextStartItem(rIn);
+/*N*/ }
+
+// -------------------------
+// class XFormTextMirrorItem
+// -------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextMirrorItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror)
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror) :
+/*N*/ SfxBoolItem(XATTR_FORMTXTMIRROR, bMirror)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn)
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) :
+/*N*/ SfxBoolItem(XATTR_FORMTXTMIRROR, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextMirrorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextMirrorItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextMirrorItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextMirrorItem(rIn);
+/*N*/ }
+
+
+// --------------------------
+// class XFormTextOutlineItem
+// --------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextOutlineItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFormTextOutlineItem::XFormTextOutlineItem()
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextOutlineItem::XFormTextOutlineItem(BOOL bOutline) :
+/*N*/ SfxBoolItem(XATTR_FORMTXTOUTLINE, bOutline)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn)
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) :
+/*N*/ SfxBoolItem(XATTR_FORMTXTOUTLINE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextOutlineItem::Clone(SfxItemPool* pPool) const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextOutlineItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextOutlineItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextOutlineItem(rIn);
+/*N*/ }
+
+//--------------------------
+// class XFormTextShadowItem
+//--------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextShadowItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowItem::XFormTextShadowItem()
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTSHADOW, eFormTextShadow)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTSHADOW, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextShadowItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextShadowItem(rIn);
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+/*N*/ USHORT XFormTextShadowItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 3;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue((XFormTextShadow)nValue);
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// -------------------------------
+// class XFormTextShadowColorItem
+// -------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName,
+/*N*/ const Color& rTheColor) :
+/*N*/ XColorItem(XATTR_FORMTXTSHDWCOLOR, rName, rTheColor)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) :
+/*N*/ XColorItem(XATTR_FORMTXTSHDWCOLOR, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextShadowColorItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextShadowColorItem(rIn);
+/*N*/ }
+
+//------------------------------
+// class XFormTextShadowXValItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextShadowXValItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowXValItem::XFormTextShadowXValItem(long)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTSHDWXVAL, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextShadowXValItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextShadowXValItem(rIn);
+/*N*/ }
+
+//------------------------------
+// class XFormTextShadowYValItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextShadowYValItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowYValItem::XFormTextShadowYValItem(long)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) :
+/*N*/ SfxMetricItem(XATTR_FORMTXTSHDWYVAL, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextShadowYValItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextShadowYValItem(rIn);
+/*N*/ }
+
+//---------------------------
+// class XFormTextStdFormItem
+//---------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextStdFormItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextStdFormItem::XFormTextStdFormItem()
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ XFormTextStdFormItem::XFormTextStdFormItem(XFormTextStdForm eFormTextStdForm) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTSTDFORM, eFormTextStdForm)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn) :
+/*N*/ SfxEnumItem(XATTR_FORMTXTSTDFORM, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextStdFormItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextStdFormItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextStdFormItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextStdFormItem(rIn);
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+/*N*/ USHORT XFormTextStdFormItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 3;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextStdFormItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ rVal <<= (sal_Int32)GetValue();
+/*N*/ return true;
+/*N*/ }
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+// #FontWork#
+/*N*/ bool XFormTextStdFormItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Int32 nValue;
+/*N*/ rVal >>= nValue;
+/*N*/ SetValue((XFormTextStdForm)nValue);
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// --------------------------
+// class XFormTextHideFormItem
+// --------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextHideFormItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFormTextHideFormItem::XFormTextHideFormItem()
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextHideFormItem::XFormTextHideFormItem(BOOL bHide) :
+/*N*/ SfxBoolItem(XATTR_FORMTXTHIDEFORM, bHide)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn)
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) :
+/*N*/ SfxBoolItem(XATTR_FORMTXTHIDEFORM, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextHideFormItem::Clone(SfxItemPool* pPool) const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextHideFormItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextHideFormItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextHideFormItem(rIn);
+/*N*/ }
+
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SetItems
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+/*N*/ TYPEINIT1(XLineAttrSetItem, SfxSetItem);
+
+/*************************************************************************
+|*
+|* Konstruktoren fuer Linienattribute-SetItem
+|*
+\************************************************************************/
+
+/*N*/ XLineAttrSetItem::XLineAttrSetItem( SfxItemSet* pItemSet ) :
+/*N*/ SfxSetItem( XATTRSET_LINE, pItemSet)
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) :
+/*N*/ SfxSetItem( XATTRSET_LINE,
+/*N*/ new SfxItemSet( *pItemPool, XATTR_LINE_FIRST, XATTR_LINE_LAST))
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*?*/ XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr ) :
+/*?*/ SfxSetItem( rLineAttr )
+/*?*/ {
+/*?*/ }
+
+/************************************************************************/
+
+/*N*/ XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr,
+/*N*/ SfxItemPool* pItemPool) :
+/*N*/ SfxSetItem( rLineAttr, pItemPool )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Clone-Funktion
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XLineAttrSetItem( *this, pPool );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetItem aus Stream erzeugen
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XLineAttrSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+/*N*/ {
+/*N*/ SfxItemSet *pSet = new SfxItemSet( *GetItemSet().GetPool(),
+/*N*/ XATTR_LINE_FIRST, XATTR_LINE_LAST);
+/*N*/ pSet->Load( rStream );
+/*N*/ return new XLineAttrSetItem( pSet );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetItem in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ SvStream& XLineAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ return SfxSetItem::Store( rStream, nItemVersion );
+/*N*/ }
+
+
+/*N*/ TYPEINIT1(XFillAttrSetItem, SfxSetItem);
+
+/*************************************************************************
+|*
+|* Konstruktoren fuer Fuellattribute-SetItem
+|*
+\************************************************************************/
+
+/*N*/ XFillAttrSetItem::XFillAttrSetItem( SfxItemSet* pItemSet ) :
+/*N*/ SfxSetItem( XATTRSET_FILL, pItemSet)
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) :
+/*N*/ SfxSetItem( XATTRSET_FILL,
+/*N*/ new SfxItemSet( *pItemPool, XATTR_FILL_FIRST, XATTR_FILL_LAST))
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*?*/ XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr ) :
+/*?*/ SfxSetItem( rFillAttr )
+/*?*/ {
+/*?*/ }
+
+/************************************************************************/
+
+/*N*/ XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr,
+/*N*/ SfxItemPool* pItemPool ) :
+/*N*/ SfxSetItem( rFillAttr, pItemPool )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Clone-Funktion
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillAttrSetItem( *this, pPool );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetItem aus Stream erzeugen
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XFillAttrSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+/*N*/ {
+/*N*/ SfxItemSet *pSet = new SfxItemSet( *GetItemSet().GetPool(),
+/*N*/ XATTR_FILL_FIRST, XATTR_FILL_LAST);
+/*N*/ pSet->Load( rStream );
+/*N*/ return new XFillAttrSetItem( pSet );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetItem in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ SvStream& XFillAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ return SfxSetItem::Store( rStream, nItemVersion );
+/*N*/ }
+
+
+/*N*/ TYPEINIT1(XTextAttrSetItem, SfxSetItem);
+
+/*************************************************************************
+|*
+|* Konstruktoren fuer Textattribute-SetItem
+|*
+\************************************************************************/
+
+/*N*/ XTextAttrSetItem::XTextAttrSetItem( SfxItemSet* pItemSet ) :
+/*N*/ SfxSetItem( XATTRSET_TEXT, pItemSet)
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XTextAttrSetItem::XTextAttrSetItem( SfxItemPool* pItemPool ) :
+/*N*/ SfxSetItem( XATTRSET_TEXT,
+/*N*/ new SfxItemSet( *pItemPool, XATTR_TEXT_FIRST, XATTR_TEXT_LAST))
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*?*/ XTextAttrSetItem::XTextAttrSetItem( const XTextAttrSetItem& rTextAttr ) :
+/*?*/ SfxSetItem( rTextAttr )
+/*?*/ {
+/*?*/ }
+
+/************************************************************************/
+
+/*N*/ XTextAttrSetItem::XTextAttrSetItem( const XTextAttrSetItem& rTextAttr,
+/*N*/ SfxItemPool* pItemPool ) :
+/*N*/ SfxSetItem( rTextAttr, pItemPool )
+/*N*/ {
+/*N*/ }
+/*N*/
+/*************************************************************************
+|*
+|* Clone-Funktion
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XTextAttrSetItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XTextAttrSetItem( *this, pPool );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetItem aus Stream erzeugen
+|*
+\************************************************************************/
+
+/*N*/ SfxPoolItem* XTextAttrSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+/*N*/ {
+/*N*/ SfxItemSet *pSet = new SfxItemSet( *GetItemSet().GetPool(),
+/*N*/ XATTR_TEXT_FIRST, XATTR_TEXT_LAST);
+/*N*/ pSet->Load( rStream );
+/*N*/ return new XTextAttrSetItem( pSet );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SetItem in Stream speichern
+|*
+\************************************************************************/
+
+/*N*/ SvStream& XTextAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ return SfxSetItem::Store( rStream, nItemVersion );
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xattr2.cxx b/binfilter/bf_svx/source/xoutdev/svx_xattr2.cxx
new file mode 100644
index 000000000000..ec945dfd3362
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xattr2.cxx
@@ -0,0 +1,1364 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <com/sun/star/drawing/LineJoint.hpp>
+
+#include "dialogs.hrc"
+
+#include <bf_svx/xdef.hxx>
+
+#include "xattr.hxx"
+
+#include "rectenum.hxx"
+#include "xflbckit.hxx"
+#include "xflbmpit.hxx"
+#include "xflbmsli.hxx"
+#include "xflbmsxy.hxx"
+#include "xflbmtit.hxx"
+#include "xflboxy.hxx"
+#include "xflbstit.hxx"
+#include "xflbtoxy.hxx"
+#include "xfltrit.hxx"
+#include "xftshtit.hxx"
+#include "xgrscit.hxx"
+#include "xlinjoit.hxx"
+#include "xlntrit.hxx"
+
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+/************************************************************************/
+
+//------------------------------
+// class XLineTransparenceItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XLineTransparenceItem::XLineTransparenceItem(USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ XLineTransparenceItem::XLineTransparenceItem(USHORT nLineTransparence) :
+/*N*/ SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) :
+/*N*/ SfxUInt16Item(XATTR_LINETRANSPARENCE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XLineTransparenceItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineTransparenceItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineTransparenceItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XLineTransparenceItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//-----------------------
+// class XLineJointItem -
+//-----------------------
+
+/*N*/ TYPEINIT1_AUTOFACTORY(XLineJointItem, SfxEnumItem);
+
+// -----------------------------------------------------------------------------
+
+/*N*/ XLineJointItem::XLineJointItem( XLineJoint eLineJoint ) :
+/*N*/ SfxEnumItem(XATTR_LINEJOINT, eLineJoint)
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ XLineJointItem::XLineJointItem( SvStream& rIn ) :
+/*N*/ SfxEnumItem( XATTR_LINEJOINT, rIn )
+/*N*/ {
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ USHORT XLineJointItem::GetVersion( USHORT nFileFormatVersion ) const
+/*N*/ {
+/*N*/ return 1;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* XLineJointItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ XLineJointItem* pRet = new XLineJointItem( rIn );
+/*N*/
+/*N*/ if(nVer < 1)
+/*?*/ pRet->SetValue(XLINEJOINT_ROUND);
+/*N*/
+/*N*/ return pRet;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ SfxPoolItem* XLineJointItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XLineJointItem( *this );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------
+
+/*N*/ bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ ::com::sun::star::drawing::LineJoint eJoint = ::com::sun::star::drawing::LineJoint_NONE;
+/*N*/
+/*N*/ switch( GetValue() )
+/*N*/ {
+/*N*/ case XLINEJOINT_NONE:
+/*N*/ break;
+/*N*/ case XLINEJOINT_MIDDLE:
+/*N*/ eJoint = ::com::sun::star::drawing::LineJoint_MIDDLE;
+/*N*/ break;
+/*N*/ case XLINEJOINT_BEVEL:
+/*N*/ eJoint = ::com::sun::star::drawing::LineJoint_BEVEL;
+/*N*/ break;
+/*N*/ case XLINEJOINT_MITER:
+/*N*/ eJoint = ::com::sun::star::drawing::LineJoint_MITER;
+/*N*/ break;
+/*N*/ case XLINEJOINT_ROUND:
+/*N*/ eJoint = ::com::sun::star::drawing::LineJoint_ROUND;
+/*N*/ break;
+/*N*/ default:
+/*N*/ DBG_ERROR( "Unknown LineJoint enum value!" );
+/*N*/ }
+/*N*/
+/*N*/ rVal <<= eJoint;
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ bool XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ XLineJoint eJoint = XLINEJOINT_NONE;
+/*N*/ ::com::sun::star::drawing::LineJoint eUnoJoint;
+/*N*/
+/*N*/ if(!(rVal >>= eUnoJoint))
+/*N*/ {
+/*?*/ // also try an int (for Basic)
+/*?*/ sal_Int32 nLJ;
+/*?*/ if(!(rVal >>= nLJ))
+/*?*/ return sal_False;
+/*?*/ eUnoJoint = (::com::sun::star::drawing::LineJoint)nLJ;
+/*N*/ }
+
+/*N*/ switch( eUnoJoint )
+/*N*/ {
+/*N*/ case ::com::sun::star::drawing::LineJoint_NONE:
+/*N*/ break;
+/*N*/ case ::com::sun::star::drawing::LineJoint_MIDDLE:
+/*N*/ eJoint = XLINEJOINT_MIDDLE;
+/*N*/ break;
+/*N*/ case ::com::sun::star::drawing::LineJoint_BEVEL:
+/*N*/ eJoint = XLINEJOINT_BEVEL;
+/*N*/ break;
+/*N*/ case ::com::sun::star::drawing::LineJoint_MITER:
+/*N*/ eJoint = XLINEJOINT_MITER;
+/*N*/ break;
+/*N*/ case ::com::sun::star::drawing::LineJoint_ROUND:
+/*N*/ eJoint = XLINEJOINT_ROUND;
+/*N*/ break;
+/*N*/ }
+/*N*/
+/*N*/ SetValue( eJoint );
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ USHORT XLineJointItem::GetValueCount() const
+/*N*/ {
+/*N*/ // don't forget to update the api interface also
+/*N*/ return 5;
+/*N*/ }
+
+//------------------------------
+// class XFillTransparenceItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillTransparenceItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XFillTransparenceItem::XFillTransparenceItem(USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillTransparenceItem::XFillTransparenceItem(USHORT nFillTransparence) :
+/*N*/ SfxUInt16Item(XATTR_FILLTRANSPARENCE, nFillTransparence)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) :
+/*N*/ SfxUInt16Item(XATTR_FILLTRANSPARENCE, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillTransparenceItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillTransparenceItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFillTransparenceItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillTransparenceItem(rIn);
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------
+// class XFormTextShadowTranspItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT nShdwTransparence) :
+/*N*/ SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) :
+/*N*/ SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, rIn)
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFormTextShadowTranspItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFormTextShadowTranspItem(rIn);
+/*N*/ }
+
+
+//------------------------------
+// class XFillGradientStepCountItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XGradientStepCountItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XGradientStepCountItem::XGradientStepCountItem( USHORT )
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XGradientStepCountItem::XGradientStepCountItem( USHORT nStepCount ) :
+/*N*/ SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn )
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) :
+/*N*/ SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, rIn )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XGradientStepCountItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XGradientStepCountItem( rIn );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+
+//------------------------------
+// class XFillBmpTileItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpTileItem, SfxBoolItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpTileItem::XFillBmpTileItem( BOOL bTile ) :
+/*N*/ SfxBoolItem( XATTR_FILLBMP_TILE, bTile )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpTileItem::XFillBmpTileItem( SvStream& rIn ) :
+/*N*/ SfxBoolItem( XATTR_FILLBMP_TILE, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpTileItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpTileItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpTileItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpTileItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTilePosItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpPosItem, SfxEnumItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP ) :
+/*N*/ SfxEnumItem( XATTR_FILLBMP_POS, eRP )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpPosItem::XFillBmpPosItem( SvStream& rIn ) :
+/*N*/ SfxEnumItem( XATTR_FILLBMP_POS, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpPosItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpPosItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpPosItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpPosItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+/*N*/ USHORT XFillBmpPosItem::GetValueCount() const
+/*N*/ {
+/*N*/ return 9;
+/*N*/ }
+
+
+//------------------------------
+// class XFillBmpTileSizeXItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX ) :
+/*N*/ SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpSizeXItem::XFillBmpSizeXItem( SvStream& rIn ) :
+/*N*/ SfxMetricItem( XATTR_FILLBMP_SIZEX, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpSizeXItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpSizeXItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpSizeXItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpSizeXItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Beschreibung
+|* Ersterstellung 05.11.96 KA
+|* Letzte Aenderung 05.11.96 KA
+|*
+\*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTileSizeYItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpSizeYItem, SfxMetricItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY ) :
+/*N*/ SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpSizeYItem::XFillBmpSizeYItem( SvStream& rIn ) :
+/*N*/ SfxMetricItem( XATTR_FILLBMP_SIZEY, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpSizeYItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpSizeYItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpSizeYItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpSizeYItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+/*************************************************************************
+|*
+|* Beschreibung
+|* Ersterstellung 05.11.96 KA
+|* Letzte Aenderung 05.11.96 KA
+|*
+\*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTileLogItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpSizeLogItem, SfxBoolItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpSizeLogItem::XFillBmpSizeLogItem( BOOL bLog ) :
+/*N*/ SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpSizeLogItem::XFillBmpSizeLogItem( SvStream& rIn ) :
+/*N*/ SfxBoolItem( XATTR_FILLBMP_SIZELOG, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpSizeLogItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpSizeLogItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpSizeLogItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpSizeLogItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTileOffXItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetXItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( USHORT nOffX ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( SvStream& rIn ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpTileOffsetXItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpTileOffsetXItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpTileOffsetXItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpTileOffsetXItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTileOffYItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetYItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( USHORT nOffY ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( SvStream& rIn ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpTileOffsetYItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpTileOffsetYItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpTileOffsetYItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpTileOffsetYItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpStretchItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpStretchItem, SfxBoolItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpStretchItem::XFillBmpStretchItem( BOOL bStretch ) :
+/*N*/ SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpStretchItem::XFillBmpStretchItem( SvStream& rIn ) :
+/*N*/ SfxBoolItem( XATTR_FILLBMP_STRETCH, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpStretchItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpStretchItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpStretchItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpStretchItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTileOffPosXItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( USHORT nOffPosX ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( SvStream& rIn ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpPosOffsetXItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpPosOffsetXItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpPosOffsetXItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpPosOffsetXItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+
+
+//------------------------------
+// class XFillBmpTileOffPosYItem
+//------------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetYItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( USHORT nOffPosY ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( SvStream& rIn ) :
+/*N*/ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, rIn )
+/*N*/ {
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpPosOffsetYItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBmpPosOffsetYItem( *this );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBmpPosOffsetYItem::Create( SvStream& rIn, USHORT nVer ) const
+/*N*/ {
+/*N*/ return new XFillBmpPosOffsetYItem( rIn );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+
+//--------------------------
+// class XFillBackgroundItem
+//--------------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillBackgroundItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFillBackgroundItem::XFillBackgroundItem( BOOL )
+|*
+|* Beschreibung
+|* Ersterstellung 19.11.96 KA
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+/*N*/ XFillBackgroundItem::XFillBackgroundItem( BOOL bFill ) :
+/*N*/ SfxBoolItem( XATTR_FILLBACKGROUND, bFill )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn )
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) :
+/*N*/ SfxBoolItem( XATTR_FILLBACKGROUND, rIn )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const
+/*N*/ {
+/*N*/ return new XFillBackgroundItem( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillBackgroundItem( rIn );
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xattrbmp.cxx b/binfilter/bf_svx/source/xoutdev/svx_xattrbmp.cxx
new file mode 100644
index 000000000000..f9a8d4ad78eb
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xattrbmp.cxx
@@ -0,0 +1,773 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <vcl/virdev.hxx>
+#include <toolkit/unohlp.hxx>
+
+#include <bf_svtools/style.hxx>
+
+#include "dialogs.hrc"
+
+#include <bf_svx/xdef.hxx>
+
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "unoprnms.hxx"
+
+#include "unoapi.hxx"
+
+#include "svdmodel.hxx"
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+// ---------------
+// class XOBitmap
+// ---------------
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap()
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+/*N*/ XOBitmap::XOBitmap() :
+/*N*/ eType ( XBITMAP_NONE ),
+/*N*/ eStyle ( XBITMAP_STRETCH ),
+/*N*/ pPixelArray ( NULL ),
+/*N*/ bGraphicDirty ( FALSE )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ XOBitmap::XOBitmap( const Bitmap& rBmp, XBitmapStyle eInStyle ) :
+/*N*/ eType ( XBITMAP_IMPORT ),
+/*N*/ eStyle ( eInStyle ),
+/*N*/ aGraphicObject ( rBmp ),
+/*N*/ pPixelArray ( NULL ),
+/*N*/ bGraphicDirty ( FALSE )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ XOBitmap::XOBitmap( const BfGraphicObject& rGraphicObject, XBitmapStyle eInStyle ) :
+/*N*/ eType ( XBITMAP_IMPORT ),
+/*N*/ eStyle ( eInStyle ),
+/*N*/ aGraphicObject ( rGraphicObject ),
+/*N*/ pPixelArray ( NULL ),
+/*N*/ bGraphicDirty ( FALSE )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* 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
+|*
+*************************************************************************/
+
+/*N*/ XOBitmap::XOBitmap( const XOBitmap& rXBmp ) :
+/*N*/ pPixelArray ( NULL )
+/*N*/ {
+/*N*/ eType = rXBmp.eType;
+/*N*/ eStyle = rXBmp.eStyle;
+/*N*/ aGraphicObject = rXBmp.aGraphicObject;
+/*N*/ aArraySize = rXBmp.aArraySize;
+/*N*/ aPixelColor = rXBmp.aPixelColor;
+/*N*/ aBckgrColor = rXBmp.aBckgrColor;
+/*N*/ bGraphicDirty = rXBmp.bGraphicDirty;
+/*N*/
+/*N*/ if( rXBmp.pPixelArray )
+/*N*/ {
+/*N*/ if( eType == XBITMAP_8X8 )
+/*N*/ {
+/*N*/ pPixelArray = new USHORT[ 64 ];
+/*N*/
+/*N*/ for( USHORT i = 0; i < 64; i++ )
+/*N*/ *( pPixelArray + i ) = *( rXBmp.pPixelArray + i );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ XOBitmap::~XOBitmap()
+/*N*/ {
+/*N*/ if( pPixelArray )
+/*N*/ delete []pPixelArray;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp )
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+/*N*/ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp )
+/*N*/ {
+/*N*/ eType = rXBmp.eType;
+/*N*/ eStyle = rXBmp.eStyle;
+/*N*/ aGraphicObject = rXBmp.aGraphicObject;
+/*N*/ aArraySize = rXBmp.aArraySize;
+/*N*/ aPixelColor = rXBmp.aPixelColor;
+/*N*/ aBckgrColor = rXBmp.aBckgrColor;
+/*N*/ bGraphicDirty = rXBmp.bGraphicDirty;
+/*N*/
+/*N*/ if( rXBmp.pPixelArray )
+/*N*/ {
+/*?*/ if( eType == XBITMAP_8X8 )
+/*?*/ {
+/*?*/ pPixelArray = new USHORT[ 64 ];
+/*?*/
+/*?*/ for( USHORT i = 0; i < 64; i++ )
+/*?*/ *( pPixelArray + i ) = *( rXBmp.pPixelArray + i );
+/*?*/ }
+/*N*/ }
+/*N*/ return( *this );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
+/*N*/ {
+/*N*/ if( eType != rXOBitmap.eType ||
+/*N*/ eStyle != rXOBitmap.eStyle ||
+/*N*/ !(aGraphicObject == rXOBitmap.aGraphicObject) ||
+/*N*/ aArraySize != rXOBitmap.aArraySize ||
+/*N*/ aPixelColor != rXOBitmap.aPixelColor ||
+/*N*/ aBckgrColor != rXOBitmap.aBckgrColor ||
+/*N*/ bGraphicDirty != rXOBitmap.bGraphicDirty )
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+/*N*/
+/*N*/ if( pPixelArray && rXOBitmap.pPixelArray )
+/*N*/ {
+/*N*/ USHORT nCount = (USHORT) ( aArraySize.Width() * aArraySize.Height() );
+/*N*/ for( USHORT i = 0; i < nCount; i++ )
+/*N*/ {
+/*?*/ if( *( pPixelArray + i ) != *( rXOBitmap.pPixelArray + i ) )
+/*?*/ return( FALSE );
+/*N*/ }
+/*N*/ }
+/*N*/ return( TRUE );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void SetPixelArray( const USHORT* pArray )
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+/*N*/ void XOBitmap::SetPixelArray( const USHORT* pArray )
+/*N*/ {
+/*N*/ if( eType == XBITMAP_8X8 )
+/*N*/ {
+/*N*/ if( pPixelArray )
+/*?*/ delete []pPixelArray;
+/*N*/
+/*N*/ pPixelArray = new USHORT[ 64 ];
+/*N*/
+/*N*/ for( USHORT i = 0; i < 64; i++ )
+/*N*/ *( pPixelArray + i ) = *( pArray + i );
+/*N*/
+/*N*/ bGraphicDirty = TRUE;
+/*N*/ }
+/*N*/ else
+/*N*/ DBG_ASSERT( 0, "Nicht unterstuetzter Bitmaptyp" );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Bitmap XOBitmap::GetBitmap()
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ Bitmap XOBitmap::GetBitmap() const
+/*N*/ {
+/*N*/ return GetGraphicObject().GetGraphic().GetBitmap();
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Bitmap XOBitmap::GetGraphicObject()
+|*
+|* Beschreibung
+|* Ersterstellung
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+/*N*/ const BfGraphicObject& XOBitmap::GetGraphicObject() const
+/*N*/ {
+/*N*/ if( bGraphicDirty )
+/*N*/ ( (XOBitmap*) this )->Array2Bitmap();
+/*N*/
+/*N*/ return aGraphicObject;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XOBitmap::Bitmap2Array()
+|*
+|* Beschreibung Umwandlung der Bitmap in Array, Hinter- u.
+|* Vordergrundfarbe
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+/*N*/ void XOBitmap::Bitmap2Array()
+/*N*/ {
+/*N*/ VirtualDevice aVD;
+/*N*/ BOOL bPixelColor = FALSE;
+/*N*/ const Bitmap aBitmap( GetBitmap() );
+/*N*/ const USHORT nLines = 8; // von Type abhaengig
+/*N*/
+/*N*/ if( !pPixelArray )
+/*N*/ pPixelArray = new USHORT[ nLines * nLines ];
+/*N*/
+/*N*/ aVD.SetOutputSizePixel( aBitmap.GetSizePixel() );
+/*N*/ aVD.DrawBitmap( Point(), aBitmap );
+/*N*/ aPixelColor = aBckgrColor = aVD.GetPixel( Point() );
+/*N*/
+/*N*/ // Aufbau des Arrays und Ermittlung der Vorder-, bzw.
+/*N*/ // Hintergrundfarbe
+/*N*/ for( USHORT i = 0; i < nLines; i++ )
+/*N*/ {
+/*N*/ for( USHORT j = 0; j < nLines; j++ )
+/*N*/ {
+/*N*/ if ( aVD.GetPixel( Point( j, i ) ) == aBckgrColor )
+/*N*/ *( pPixelArray + j + i * nLines ) = 0;
+/*N*/ else
+/*N*/ {
+/*N*/ *( pPixelArray + j + i * nLines ) = 1;
+/*N*/ if( !bPixelColor )
+/*N*/ {
+/*N*/ aPixelColor = aVD.GetPixel( Point( j, i ) );
+/*N*/ bPixelColor = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XOBitmap::Array2Bitmap()
+|*
+|* Beschreibung Umwandlung des Arrays, Hinter- u.
+|* Vordergrundfarbe in eine Bitmap
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+/*N*/ void XOBitmap::Array2Bitmap()
+/*N*/ {
+/*N*/ VirtualDevice aVD;
+/*N*/ BOOL bPixelColor = FALSE;
+/*N*/ USHORT nLines = 8; // von Type abhaengig
+/*N*/
+/*N*/ if( !pPixelArray )
+/*N*/ return;
+/*N*/
+/*N*/ aVD.SetOutputSizePixel( Size( nLines, nLines ) );
+/*N*/
+/*N*/ // Aufbau der Bitmap
+/*N*/ for( USHORT i = 0; i < nLines; i++ )
+/*N*/ {
+/*N*/ for( USHORT j = 0; j < nLines; j++ )
+/*N*/ {
+/*N*/ if( *( pPixelArray + j + i * nLines ) == 0 )
+/*N*/ aVD.DrawPixel( Point( j, i ), aBckgrColor );
+/*N*/ else
+/*N*/ aVD.DrawPixel( Point( j, i ), aPixelColor );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ aGraphicObject = BfGraphicObject( aVD.GetBitmap( Point(), Size( nLines, nLines ) ) );
+/*N*/ bGraphicDirty = FALSE;
+/*N*/ }
+
+// -----------------------
+// class XFillBitmapItem
+// -----------------------
+/*N*/ TYPEINIT1_AUTOFACTORY(XFillBitmapItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(const XubString& rName,
+|* const Bitmap& rTheBitmap)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillBitmapItem::XFillBitmapItem(const XubString& rName,
+/*N*/ const XOBitmap& rTheBitmap) :
+/*N*/ NameOrIndex( XATTR_FILLBITMAP, rName ),
+/*N*/ aXOBitmap( rTheBitmap )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) :
+/*N*/ NameOrIndex( rItem ),
+/*N*/ aXOBitmap( rItem.aXOBitmap )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 26.07.94
+|*
+*************************************************************************/
+
+/*N*/ XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) :
+/*N*/ NameOrIndex( XATTR_FILLBITMAP, rIn )
+/*N*/ {
+/*N*/ if( nVer == 0 )
+/*N*/ {
+/*?*/ 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 )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ else
+/*?*/ aXOBitmap.SetBitmapType( XBITMAP_IMPORT );
+/*?*/ }
+/*N*/ }
+/*N*/ else if( nVer == 1 )
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ INT16 iTmp;
+/*N*/ rIn >> iTmp;
+/*N*/ aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp );
+/*N*/ rIn >> iTmp;
+/*N*/ aXOBitmap.SetBitmapType( (XBitmapType) iTmp );
+/*N*/
+/*N*/ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+/*N*/ {
+/*N*/ Bitmap aBmp;
+/*N*/ rIn >> aBmp;
+/*N*/ aXOBitmap.SetBitmap( aBmp );
+/*N*/ }
+/*N*/ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+/*N*/ {
+/*N*/ USHORT* pArray = new USHORT[ 64 ];
+/*N*/ Color aColor;
+/*N*/
+/*N*/ for( USHORT i = 0; i < 64; i++ )
+/*N*/ rIn >> *( pArray + i );
+/*N*/ aXOBitmap.SetPixelArray( pArray );
+/*N*/
+/*N*/ rIn >> aColor;
+/*N*/ aXOBitmap.SetPixelColor( aColor );
+/*N*/ rIn >> aColor;
+/*N*/ aXOBitmap.SetBackgroundColor( aColor );
+/*N*/
+/*N*/ delete []pArray;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // #81908# force bitmap to exist
+/*N*/ aXOBitmap.GetBitmap();
+/*N*/ }
+
+//*************************************************************************
+
+/*N*/ XFillBitmapItem::XFillBitmapItem( SfxItemPool* pPool, const XOBitmap& rTheBitmap )
+/*N*/ : NameOrIndex( XATTR_FILLBITMAP, -1 ),
+/*N*/ aXOBitmap( rTheBitmap )
+/*N*/ {
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBitmapItem::Clone(SfxItemPool* pPool) const
+/*N*/ {
+/*N*/ return new XFillBitmapItem(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const
+/*N*/ {
+/*N*/ return ( NameOrIndex::operator==(rItem) &&
+/*N*/ aXOBitmap == ((const XFillBitmapItem&) rItem).aXOBitmap );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+/*N*/ SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const
+/*N*/ {
+/*N*/ return new XFillBitmapItem( rIn, nVer );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillBitmapItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 26.07.94
+|*
+*************************************************************************/
+
+/*N*/ SvStream& XFillBitmapItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+/*N*/ {
+/*N*/ NameOrIndex::Store( rOut, nItemVersion );
+/*N*/
+/*N*/ if (!IsIndex())
+/*N*/ {
+/*N*/ rOut << (INT16) aXOBitmap.GetBitmapStyle();
+/*N*/ if( !aXOBitmap.GetBitmap() )
+/*N*/ rOut << (INT16) XBITMAP_NONE;
+/*N*/ else
+/*N*/ {
+/*N*/ rOut << (INT16) aXOBitmap.GetBitmapType();
+/*N*/ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+/*N*/ {
+/*N*/ const USHORT nOldComprMode = rOut.GetCompressMode();
+/*N*/ USHORT nNewComprMode = nOldComprMode;
+/*N*/
+/*N*/ if( rOut.GetVersion() >= SOFFICE_FILEFORMAT_50 )
+/*N*/ nNewComprMode |= COMPRESSMODE_ZBITMAP;
+/*N*/ else
+/*N*/ nNewComprMode &= ~COMPRESSMODE_ZBITMAP;
+/*N*/
+/*N*/ rOut.SetCompressMode( nNewComprMode );
+/*N*/ rOut << aXOBitmap.GetBitmap();
+/*N*/ rOut.SetCompressMode( nOldComprMode );
+/*N*/ }
+/*N*/ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+/*N*/ {
+/*N*/ USHORT* pArray = aXOBitmap.GetPixelArray();
+/*N*/ for( USHORT i = 0; i < 64; i++ )
+/*N*/ rOut << (USHORT) *( pArray + i );
+/*N*/
+/*N*/ rOut << aXOBitmap.GetPixelColor();
+/*N*/ rOut << aXOBitmap.GetBackgroundColor();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rOut;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* const Bitmap& XFillBitmapItem::GetValue(const XBitmapTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 26.07.94
+|*
+*************************************************************************/
+
+/*N*/ const XOBitmap& XFillBitmapItem::GetValue(const XBitmapTable* pTable) const
+/*N*/ {
+/*N*/ if (!IsIndex())
+/*N*/ return aXOBitmap;
+/*N*/ else
+/*?*/ return pTable->Get(GetIndex())->GetXBitmap();
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* USHORT XFillBitmapItem::GetVersion() const
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+/*N*/ USHORT XFillBitmapItem::GetVersion( USHORT nFileFormatVersion ) const
+/*N*/ {
+/*N*/ // 2. Version
+/*N*/ return( 1 );
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------
+
+/*N*/ bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ if( nMemberId == MID_NAME )
+/*N*/ {
+/*N*/ ::rtl::OUString aApiName;
+/*N*/ SvxUnogetApiNameForItem( Which(), GetName(), aApiName );
+/*N*/ rVal <<= aApiName;
+/*N*/ }
+/*N*/ else if( nMemberId == MID_GRAFURL )
+/*N*/ {
+/*N*/ XOBitmap aXOBitmap( GetValue() );
+/*N*/ ::rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+/*N*/ aURL += ::rtl::OUString::createFromAscii( aXOBitmap.GetGraphicObject().GetUniqueID().GetBuffer() );
+/*N*/ rVal <<= aURL;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ 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;
+/*N*/ }
+/*N*/
+/*N*/ return true;
+/*N*/ }
+
+//------------------------------------------------------------------------
+
+/*N*/ bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+/*N*/ {
+/*N*/ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+/*N*/ nMemberId &= ~CONVERT_TWIPS;
+/*N*/ if( nMemberId == MID_NAME )
+/*N*/ {
+/*?*/ ::rtl::OUString aName;
+/*?*/ if(rVal >>= aName)
+/*?*/ {
+/*?*/ SetName( aName );
+/*?*/ return true;
+/*?*/ }
+/*N*/ }
+/*N*/ else if( nMemberId == MID_GRAFURL )
+/*N*/ {
+/*N*/ ::rtl::OUString aURL;
+/*N*/ if(rVal >>= aURL)
+/*N*/ {
+/*N*/ BfGraphicObject aGrafObj( CreateGraphicObjectFromURL( aURL ) );
+/*N*/ XOBitmap aBMP( aGrafObj );
+/*N*/ SetValue( aBMP );
+/*N*/ return true;
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ ::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)
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ return true;
+/*?*/ }
+/*?*/ }
+/*N*/ return false;
+/*N*/ }
+
+/*N*/ BOOL XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 )
+/*N*/ {
+/*N*/ return ((XFillBitmapItem*)p1)->GetValue().GetGraphicObject().GetUniqueID() ==
+/*N*/ ((XFillBitmapItem*)p2)->GetValue().GetGraphicObject().GetUniqueID();
+/*N*/ }
+
+/*N*/ XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const
+/*N*/ {
+/*N*/ if( pModel )
+/*N*/ {
+/*N*/ const String aUniqueName = NameOrIndex::CheckNamedItem( this,
+/*N*/ XATTR_FILLBITMAP,
+/*N*/ &pModel->GetItemPool(),
+/*N*/ pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL,
+/*N*/ XFillBitmapItem::CompareValueFunc,
+/*N*/ RID_SVXSTR_BMP21,
+/*N*/ pModel->GetBitmapList() );
+/*N*/
+/*N*/ // if the given name is not valid, replace it!
+/*N*/ if( aUniqueName != GetName() )
+/*N*/ {
+/*N*/ return new XFillBitmapItem( aUniqueName, aXOBitmap );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return (XFillBitmapItem*)this;
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xfontmac.cxx b/binfilter/bf_svx/source/xoutdev/svx_xfontmac.cxx
new file mode 100644
index 000000000000..1e175ba8c324
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xfontmac.cxx
@@ -0,0 +1,1682 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <Solar.h>
+
+#if defined (MAC)
+#include <mac_start.h>
+
+#include <GestaltEqu.h>
+#include <ToolUtils.h>
+
+#ifndef __RESOURCES__
+ #include <Resources.h>
+#endif
+
+#ifndef __FONTS__
+ #include <Fonts.h>
+#endif
+
+#include <math.h>
+#include <GXIncludes.h>
+
+#include <XFontMac.hxx>
+
+#include <mac_end.h>
+#endif
+
+#include <sv.hxx>
+
+#include "xpoly.hxx"
+#include "xattr.hxx"
+#include "xoutx.hxx"
+
+#define GLOBALOVERFLOW
+namespace binfilter {
+
+
+/*************************************************************************
+|*
+|* HasGX()
+|*
+|* Prueft, ob GX installiert ist
+|* Ersterstellung 05.02.95 DV
+|* Letzte Aenderung 05.02.95 DV
+|*
+*************************************************************************/
+BOOL HasGX()
+{
+ long nVersion;
+ gxGraphicsClient aClient;
+
+ if ( Gestalt( gestaltGraphicsVersion, &nVersion ) != noErr )
+ return FALSE;
+
+ aClient = GXNewGraphicsClient( nil, 500L * 1024L, 0L );
+ if ( aClient == 0 )
+ return FALSE;
+
+ GXEnterGraphics();
+ if ( GXGetGraphicsError( nil ) == out_of_memory )
+ return FALSE;
+
+ return TRUE;
+}
+
+
+/*************************************************************************
+|*
+|* SetUpFontData()
+|*
+|* Uebertraegt die Fontattribute uas dem OutputDevice
+|* in das Text Objekt
+|*
+|* Ersterstellung 05.02.95 DV
+|* Letzte Aenderung 05.02.95 DV
+|*
+*************************************************************************/
+
+void SetUpFontData( OutputDevice &rOut, gxShape aTextShape )
+{
+ gxFont aFont = 0;
+
+ String& rName = rOut.GetFont().GetName();
+
+ GXFindFonts( nil, gxFamilyFontName, gxMacintoshPlatform,
+ gxRomanScript, gxEnglishLanguage, rName.Len(),
+ (const unsigned char*) rName.GetStr(),
+ 1, 1, &aFont );
+
+ if ( aFont )
+ {
+ gxFont aTmpFont;
+ rName = rOut.GetFont().GetStyleName();
+
+ if ( rName.Len() )
+ {
+ if ( GXFindFonts( aFont, gxStyleFontName, gxMacintoshPlatform,
+ gxRomanScript, gxEnglishLanguage,
+ rName.Len(),
+ (const unsigned char*) rName.GetStr(),
+ 1, 1, &aTmpFont ) )
+ {
+ aFont = aTmpFont;
+ }
+ }
+ else
+ {
+ if ( GXFindFonts( aFont, gxStyleFontName, gxMacintoshPlatform,
+ gxRomanScript, gxEnglishLanguage,
+ 7, (const unsigned char*) "Regular",
+ 1, 1, &aTmpFont ) )
+ {
+ aFont = aTmpFont;
+ }
+ }
+
+ Size aSize( rOut.GetFont().GetSize() );
+ aSize = rOut.LogicToPixel( aSize );
+
+ GXSetShapeFont( aTextShape, aFont );
+ GXSetShapeTextSize( aTextShape, aSize.Height() * fixed1 );
+ }
+}
+
+
+/*************************************************************************
+|*
+|* XOutGetCharOutlineGX()
+|*
+|* Ein Zeichen eines Outlinefonts in ein Bezier-PolyPolygon umwandeln
+|* Wenn keine Umwandlung moeglich ist, wird ein leeres PolyPolygon
+|* zurueckgegeben
+|* Ersterstellung 03.02.95 DV
+|* Letzte Aenderung 27.06.95 DV
+|*
+*************************************************************************/
+
+XPolyPolygon XOutGetCharOutlineGX(USHORT nChar, OutputDevice& rOut,
+ BOOL bOptimizeSize)
+{
+ gxPoint aPoint, aDummy;
+ gxShape aOutlineShape;
+ long nSize, nContours, i, j;
+ gxPaths *pPathData;
+ long *pCurPath;
+ long nFontHeight = 1,
+ nOrgHeight = 1;
+ unsigned char cChar = (unsigned char) nChar;
+
+ Font aFont = rOut.GetFont();
+
+ if ( bOptimizeSize )
+ {
+ /* Font moeglichst gross machen, um eine hohe Aufloesung zu
+ * erreichen, da sonst eventuell mit Hints gearbeitet wird
+ */
+ aFont.SetSize(rOut.PixelToLogic(Size(0, 500)));
+ nFontHeight = aFont.GetSize().Height();
+ rOut.SetFont(aFont);
+ nOrgHeight = aFont.GetSize().Height();
+ }
+
+ /* Textshape mit einem Buchstaben anlegen, die Fontattribute holen
+ * und dann in ein Path Objekt umwandeln.
+ */
+ aOutlineShape = GXNewShape( gxTextType );
+ SetUpFontData( rOut, aOutlineShape );
+ GXGetShapeFontMetrics( aOutlineShape, &aPoint, &aDummy, &aDummy, &aDummy );
+ aPoint.y = -aPoint.y;
+
+ GXSetText( aOutlineShape, 1, &cChar, &aPoint );
+
+ GXSetShapeType( aOutlineShape, gxPathType );
+
+ /* Die Groesse das Path Objektes ermitteln, genug Speicher anfordern,
+ * und die Path Daten aus dem Path Objekt rausholen
+ */
+ nSize = GXGetPaths( aOutlineShape, nil );
+ pPathData = (gxPaths*) new char[ nSize ];
+ nSize = GXGetPaths( aOutlineShape, pPathData );
+
+ nContours = pPathData->contours;
+
+ /* Der Path laesst sich vortrefflich auf ein XPolyPolygon abbilden.
+ * Da wir schon wissen, wieviele Polygone wir habe, koennen wir auch
+ * gleich die richtige Groesse anfordern. Danach wird es leider etwas
+ * trickreich, da die GXPaths Struktur dynamisch ist. Deshalb auch
+ * die vielen Pointer.
+ */
+ XPolyPolygon aXPolyPoly( nContours ); // Unser XPolyPolygon
+
+ pCurPath = ((long*)pPathData) + 1; // pCurPath zeigt jetzt auf das erste
+ // Polygon ( kommt gleich hinter der
+ // Anzahl der Path Objekte )
+ for ( i=0; i< nContours; i++ )
+ {
+ /* fuer jeden einzelnen Path brauchen wir die Anzahl der darin
+ * enthaltenen Punkte, einen Zeiger auf das Bitfeld, das festlegt,
+ * ob ein Punkt auf der Kurve liegt oder nicht, und einen Zeiger
+ * auf die einzelnen Punkte. Da wir hier auch wieder eine dynamische
+ * Datenstruktur haben, wirds wieder undurchsichtig.
+ * pPoint wird zunaechst auf den ersten Punkt gesetzt. ( Wir haben
+ * ein long fuer die Anzahl und ( Anzahl +31 )/ 32 longs fuer das
+ * Bitfeld.
+ */
+ long nPointAnz = ( (gxPath*) pCurPath )->vectors;
+ char *pBits = (char*) ( (gxPath*) pCurPath )->controlBits;
+ USHORT nPnt;
+ XPolygon aXPoly( 100, 50 );
+ BOOL bCloseIt = TRUE;
+
+ gxPoint *pPoint;
+
+ pPoint = (gxPoint*) ( pCurPath + ( 1 + (nPointAnz+31) / 32 ) );
+ nPnt = 0;
+
+ for ( j=0; j<nPointAnz; j++ )
+ {
+ /* Die einzelnen Punkte werden von gxPoints in StarView Points
+ * umgewandelt und in das XPolygon eingetragen. Anschliessend
+ * wird geprueft, ob es sich um einen Off Curve point handlete.
+ * (gluecklicherweise bietet Apple eine Funktion an, mit der man
+ * die Bits in einem dynamischen Bitfeld testen kann (BitTst) ).
+ * Zum Schluss muss jetzt nur noch der Punktpointer eins weiter
+ * gesetzt werden.
+ */
+ aXPoly[nPnt].X() = (long) FixedToInt( pPoint->x );
+ aXPoly[nPnt].Y() = (long) FixedToInt( pPoint->y );
+ nPnt++;
+
+ /* Wenn Off Curve Points ins Spiel kommen, wirds leider etwas
+ * komplizierter
+ */
+ if ( BitTst( pBits, j ) )
+ {
+ /* Es gibt wohl wirklich polygone, die mit einem Off
+ * Curve Point anfangen.
+ */
+ if ( j==0 )
+ {
+ gxPoint *pTmpPt = pPoint + ( nPointAnz - 1);
+ aXPoly[nPnt] = aXPoly[nPnt-1];
+ nPnt++;
+ aXPoly[0].X() = (long) FixedToInt( pTmpPt->x );
+ aXPoly[0].Y() = (long) FixedToInt( pTmpPt->y );
+ bCloseIt = FALSE;
+ }
+
+ // Punkt verdoppeln fuer Bezier-Wandlung
+ aXPoly[nPnt] = aXPoly[nPnt-1];
+ nPnt++;
+
+ /* Wenn Polygone mit Off Curve Points anfangen, dann hoeren
+ * sie sicherlich auch mal damit auf
+ */
+ if ( j == nPointAnz - 1 )
+ {
+ aXPoly[nPnt] = aXPoly[0];
+ nPnt++;
+ bCloseIt = FALSE;
+ }
+ else if ( ! BitTst( pBits, j+1 ) )
+ {
+ /* Wenn der naechste Punkt auf der Kurve liegt, dann
+ * braucht er nur in unser Polygon eingetragen zu werden
+ */
+ pPoint += 1;
+ aXPoly[nPnt].X() = (long) FixedToInt( pPoint->x );
+ aXPoly[nPnt].Y() = (long) FixedToInt( pPoint->y );
+ nPnt++;
+ j++;
+ }
+ else
+ {
+ /* ansonsten muessen wir noch einen weiteren Punkt
+ * mit aufnehmen. ( Und zwar den Mittelpunkt zwischen
+ * den beiden Kontrollpunkten. )
+ */
+ aXPoly[nPnt].X() = (long) FixedToInt( pPoint->x / 2 +
+ (pPoint+1)->x / 2 );
+ aXPoly[nPnt].Y() = (long) FixedToInt( pPoint->y / 2 +
+ (pPoint+1)->y / 2 );
+ nPnt++;
+ }
+ /* Umrechnung in Bezier (PQ=TrueType-Controlpunkt):
+ * P1 = 1/3 * (P0 + 2 * PQ)
+ * P2 = 1/3 * (P3 + 2 * PQ)
+ */
+ aXPoly[nPnt-3] = (aXPoly[nPnt-4] + aXPoly[nPnt-3] * 2) / 3;
+ aXPoly[nPnt-2] = (aXPoly[nPnt-1] + aXPoly[nPnt-2] * 2) / 3;
+ aXPoly.SetFlags(nPnt-3, XPOLY_CONTROL);
+ aXPoly.SetFlags(nPnt-2, XPOLY_CONTROL);
+ }
+ pPoint += 1;
+ }
+ for (j = 0; j < nPnt; j++)
+ {
+ // GX gibt Pixelkoordinaten zurueck, deshalb
+ // in logische Koordinaten umrechnen; Size verwenden,
+ // damit der MapMode-Origin nicht beachtet wird
+ Size aSize(aXPoly[j].X(), aXPoly[j].Y());
+ aSize = rOut.PixelToLogic(aSize);
+ // zuletzt auf Originalgroesse des Fonts skalieren
+ aXPoly[j].X() = aSize.Width() * nOrgHeight / nFontHeight;
+ aXPoly[j].Y() = aSize.Height() * nOrgHeight / nFontHeight;
+ }
+
+ // Polygon schliessen
+ if ( bCloseIt )
+ aXPoly[nPnt] = aXPoly[0];
+
+
+ /* Nachdem die einzelnen Punkte in das XPolygon eingetragen wurden,
+ * wird jetzt das Xpolygon in das XPolyPolygon gestopft und danach
+ * geloescht.
+ * Unser pPoint Pointer zeigt jetzt nicht mehr auf einen Punkt sondern
+ * auf den Anfang des naechsten Path. Das nutzen wir natuerlich aus, um
+ * den Path Pointer umzusetzen.
+ */
+ aXPolyPoly.Insert( aXPoly );
+ aXPoly.SetPointCount(0);
+
+ pCurPath = (long*) pPoint;
+ }
+
+ /* was wir angefordert haben, muessen wir auch wieder freigeben!
+ */
+ GXDisposeShape( aOutlineShape );
+ delete[] pPathData;
+
+ rOut.SetFont( aFont );
+
+ return aXPolyPoly;
+}
+
+/*************************************************************************
+|*
+|* Hilfsfunktionen fuer XOutGetCharOutlineQD gefunden in einem
+|* Artikel zu Develop 8, 1995
+|*
+|* Ersterstellung 28.11.95 KH
+|* Letzte Aenderung 28.11.95 KH
+|*
+*************************************************************************/
+
+inline long PostFontError(long error)
+{
+#ifdef DBG_UTIL
+ if (error)
+ DBG_ERROR("FontError");
+#endif
+ return error;
+}
+
+/*************************************************************************/
+
+Handle GetNamedSfntHandle(const String& rName, short styleWord)
+{
+ Handle hFond = GetNamedResource('FOND', rName.GetPascalStr());
+ if (hFond && !ResError())
+ { FamRec* pFrec = (FamRec*)*hFond;
+ register short* assoc = (short*)(pFrec + 1);
+ register short sfntID = 0;
+ register count = *assoc++;
+
+ while (count-- >= 0 && !sfntID)
+ { if (*assoc++ == 0) /* size == 0 means sfnt */
+ if (*assoc++ == styleWord)
+ sfntID = *assoc;
+ else
+ assoc++;
+ else
+ assoc += 2;
+ }
+ if (sfntID)
+ { Handle hSfnt = GetResource('sfnt', sfntID);
+ if (hSfnt && !ResError())
+ return hSfnt;
+ }
+ }
+ DBG_ERROR("GetNamedSfntHandle : Font NotFound");
+ return 0;
+}
+
+/*************************************************************************/
+
+void InitGlyphOutline(GlyphOutline* out)
+{
+ out->contourCount = 0;
+ out->pointCount = 0;
+ out->endPoints = (short**)NewHandle(0);
+ out->onCurve = (BYTE**)NewHandle(0);
+ out->x = (Fixed**)NewHandle(0);
+ out->y = (Fixed**)NewHandle(0);
+}
+
+/*************************************************************************/
+
+void KillGlyphOutline(GlyphOutline* out)
+{
+ DisposeHandle((Handle)out->endPoints);
+ DisposeHandle((Handle)out->onCurve);
+ DisposeHandle((Handle)out->x);
+ DisposeHandle((Handle)out->y);
+}
+
+/*************************************************************************/
+
+void LockGlyphOutline(GlyphOutline* out)
+{
+ HLock((Handle)out->endPoints);
+ HLock((Handle)out->onCurve);
+ HLock((Handle)out->x);
+ HLock((Handle)out->y);
+}
+
+/*************************************************************************/
+
+void UnlockGlyphOutline(GlyphOutline* out)
+{
+ HUnlock((Handle)out->endPoints);
+ HUnlock((Handle)out->onCurve);
+ HUnlock((Handle)out->x);
+ HUnlock((Handle)out->y);
+}
+
+/*************************************************************************/
+
+static short GetFontState(Handle sfnt)
+{
+ short state;
+
+ LoadResource(sfnt);
+ state = HGetState(sfnt);
+ HNoPurge(sfnt);
+ return state;
+}
+
+
+/*************************************************************************/
+
+static void* GetSfntTablePtr(Handle sfnt, fontTableTag tag)
+{
+ FontTableInfo info;
+
+ if (GetSfntTableInfo(sfnt, tag, &info))
+ return 0;
+ return *sfnt + info.offset;
+}
+
+/*************************************************************************/
+
+inline void SetFontState(Handle sfnt, short state)
+{
+ HSetState(sfnt, state);
+}
+
+/*************************************************************************/
+
+FontError GetSfntTableInfo(Handle sfnt, fontTableTag tag, FontTableInfo* fTable)
+{
+ short state = GetFontState(sfnt);
+ register sfnt_OffsetTable* dir = (sfnt_OffsetTable*)*sfnt;
+ register sfnt_DirectoryEntry* table = dir->table;
+ register short count = dir->numOffsets;
+ FontError error = fNoError;
+
+ for (; --count >= 0; table++)
+ if (table->tableTag == tag)
+ { fTable->offset = table->offset;
+ fTable->length = table->length;
+ fTable->checkSum = table->checkSum;
+ break;
+ }
+ if (count < 0)
+ error = PostFontError(fTableNotFound);
+ SetFontState(sfnt, state);
+ return error;
+}
+
+/*************************************************************************/
+
+/* Glue routine and Macro to make handle growing easier.*/
+
+inline short NiceSetHandleSize(Handle h, long size)
+{
+ SetHandleSize(h, size);
+ return MemError();
+}
+
+#define SHS(h, s) NiceSetHandleSize((Handle)h, s)
+
+/*************************************************************************/
+
+/* Returns the glyph index for the given character code, or
+ * an error code.
+ */
+long GetCharGlyphIndex(Handle sfnt, unsigned short charCode)
+{
+ sfnt_char2IndexDirectory* table;
+ short i;
+ long mapOffset = 0;
+ long glyphIndex = 0; /* missing character glyph */
+ short state = GetFontState(sfnt);
+
+ if (!( 0 != (table = (sfnt_char2IndexDirectory*) GetSfntTablePtr(sfnt, tag_CharToIndexMap))))
+ { SetFontState(sfnt, state);
+ return PostFontError(fTableNotFound);
+ }
+
+ { register sfnt_platformEntry* plat = table->platform;
+
+ /* You can change this section to look for other scripts
+ */
+ for ( i = table->numTables - 1; i >= 0; --i )
+ { if ( plat->platformID == plat_Macintosh && plat->specificID == smRoman)
+ { mapOffset = plat->offset;
+ break;
+ }
+ ++plat;
+ }
+ }
+
+ if (mapOffset)
+ { sfnt_mappingTable* mapping = (sfnt_mappingTable*)((char*)table + mapOffset);
+
+ switch ( mapping->format ) {
+ case 0:
+ { BYTE* glyphs = (BYTE*)(mapping + 1);
+ glyphIndex = glyphs[charCode];
+ }
+ break;
+ case 6:
+ { short* glyphs = (short*)(mapping + 1);
+ short first = *glyphs++;
+ short count = *glyphs++;
+ charCode -= first;
+ if (charCode < count)
+ glyphIndex = glyphs[charCode];
+ }
+ break;
+ default:
+ glyphIndex = PostFontError(fUnimplemented);
+ }
+ }
+ else
+ glyphIndex = PostFontError(fCMapNotFound);
+
+ SetFontState(sfnt, state);
+ return glyphIndex;
+}
+
+/*************************************************************************/
+
+static void* GetSfntGlyphPtr(Handle sfnt, long glyphIndex, long* length)
+{
+ void* loc;
+ char* glyphStart;
+ sfnt_FontHeader* head;
+
+ if (!((0 != (head = (sfnt_FontHeader*)GetSfntTablePtr(sfnt, tag_FontHeader))) &&
+ (0 != (loc = GetSfntTablePtr(sfnt, tag_IndexToLoc))) &&
+ (0 != (glyphStart = (char*) GetSfntTablePtr(sfnt, tag_GlyphData)))))
+ return 0;
+
+ if (head->indexToLocFormat == SHORT_INDEX_TO_LOC_FORMAT)
+ { unsigned short* offset = (unsigned short*)loc + glyphIndex;
+ *length = (long)(offset[1] - *offset) << 1;
+ return glyphStart + ((long)*offset << 1);
+ }
+ else
+ { long* offset = (long*)loc + glyphIndex;
+ *length = offset[1] - *offset;
+ return glyphStart + *offset;
+ }
+}
+
+/*************************************************************************/
+
+void MoveGlyphOutline(GlyphOutline* out, Fixed xDelta, Fixed yDelta)
+{
+ Fixed* x = *out->x;
+ Fixed* y = *out->y;
+ short count = out->pointCount;
+
+ for (--count; count >= 0; --count)
+ { *x++ += xDelta;
+ *y++ += yDelta;
+ }
+ out->origin.x += xDelta;
+ out->origin.y += yDelta;
+}
+
+/*************************************************************************/
+
+void AppendHandle(Handle dst, Handle extra)
+{
+ long dstSize = GetHandleSize(dst);
+ long extraSize = GetHandleSize(extra);
+
+ SetHandleSize(dst, dstSize + extraSize);
+ if (MemError())
+ Debugger();
+ else
+ BlockMove(*extra, *dst + dstSize, extraSize);
+}
+
+#define APPENDHANDLE(a,b) AppendHandle((Handle)a, (Handle)b)
+
+/*************************************************************************/
+
+void AppendGlyphOutline(GlyphOutline* a, GlyphOutline* b)
+{
+ APPENDHANDLE(a->endPoints, b->endPoints);
+ { short* p = *a->endPoints + a->contourCount;
+ short* endp = p + b->contourCount;
+ short newFirstPoint = a->contourCount ? p[-1] + 1 : 0;
+ for (; p < endp; p++)
+ *p = *p + newFirstPoint;
+ }
+ a->contourCount += b->contourCount;
+ a->pointCount += b->pointCount;
+ APPENDHANDLE(a->onCurve, b->onCurve);
+ APPENDHANDLE(a->x, b->x);
+ APPENDHANDLE(a->y, b->y);
+}
+
+/*************************************************************************/
+
+#define GetUnsignedByte( p ) ((BYTE)(*p++))
+
+/*************************************************************************/
+
+FontError GetGlyphOutline(Handle hSfnt, long glyphIndex, GlyphOutline* pOutline, Matrix xform)
+{
+ short upem, state, sideBearing, adjustToLsb;
+ short* pGlyph;
+ sfnt_FontHeader* pHead;
+ sfnt_HorizontalHeader* pHHea;
+ sfnt_HorizontalMetrics* pHori;
+ long length;
+ FontError error = fNoError;
+
+ state = GetFontState( hSfnt );
+ HLock( hSfnt );
+
+ if (!((0 != (pHead = (sfnt_FontHeader*) GetSfntTablePtr(hSfnt, tag_FontHeader))) &&
+ (0 != (pHHea = (sfnt_HorizontalHeader*) GetSfntTablePtr(hSfnt, tag_HoriHeader))) &&
+ (0 != (pHori = (sfnt_HorizontalMetrics*) GetSfntTablePtr(hSfnt, tag_HorizontalMetrics)))))
+ {
+ error = fTableNotFound;
+ goto EXIT;
+ }
+
+ upem = pHead->unitsPerEm;
+
+ { long longMetrics = pHHea->numberLongMetrics;
+ if ( glyphIndex < longMetrics )
+ { pOutline->advance.x = FixRatio( pHori[glyphIndex].advance, upem );
+ sideBearing = pHori[glyphIndex].sideBearing;
+ }
+ else
+ { short *lsb = (short *)&pHori[longMetrics]; /* first entry after[AW,LSB] array */
+
+ pOutline->advance.x = FixRatio( pHori[longMetrics-1].advance, upem );
+ sideBearing = pHori[glyphIndex - longMetrics].sideBearing;
+ }
+ pOutline->advance.y = 0;
+ }
+
+ pOutline->origin.x = pOutline->origin.y = 0;
+
+ if (!(pGlyph = (short*) GetSfntGlyphPtr(hSfnt, glyphIndex, &length)))
+ { error = fGlyphNotFound;
+ goto EXIT;
+ }
+
+ if (length == 0)
+ { pOutline->contourCount = pOutline->pointCount = 0;
+ goto EXIT;
+ }
+
+ pOutline->contourCount = *pGlyph++;
+ adjustToLsb = *pGlyph - sideBearing; /* xmin - lsb */
+ pGlyph += 4; /* skip bounds rect */
+
+ if (pOutline->contourCount == 0)
+ pOutline->pointCount = 0;
+ else if (pOutline->contourCount == -1)
+ { short flags, index, newMatrix;
+
+ pOutline->contourCount = pOutline->pointCount = 0;
+ SHS(pOutline->endPoints, 0);
+ SHS(pOutline->onCurve, 0);
+ SHS(pOutline->x, 0);
+ SHS(pOutline->y, 0);
+ do
+ { Matrix compXform;
+ short arg1, arg2;
+
+ flags = *pGlyph++;
+ index = *pGlyph++;
+ newMatrix = false;
+
+ if ( flags & ARG_1_AND_2_ARE_WORDS )
+ { arg1 = *pGlyph++;
+ arg2 = *pGlyph++;
+ }
+ else
+ { char* byteP = (char*)pGlyph;
+ if ( flags & ARGS_ARE_XY_VALUES )
+ { /* offsets are signed */
+ arg1 = *byteP++;
+ arg2 = *byteP;
+ }
+ else
+ { /* anchor points are unsigned */
+ arg1 = (unsigned char)*byteP++;
+ arg2 = (unsigned char)*byteP;
+ }
+ ++pGlyph;
+ }
+ { GlyphOutline out;
+ InitGlyphOutline(&out);
+ GetGlyphOutline(hSfnt, index, &out, newMatrix ? compXform : xform);
+ { Fixed dx, dy;
+ if (flags & ARGS_ARE_XY_VALUES)
+ { dx = FixRatio(arg1, upem);
+ dy = -FixRatio(arg2, upem);
+ }
+ else
+ { dx = (*pOutline->x)[arg1] - (*out.x)[arg2];
+ dy = (*pOutline->y)[arg1] - (*out.y)[arg2];
+ }
+ MoveGlyphOutline(&out, dx, dy);
+ }
+ AppendGlyphOutline(pOutline, &out);
+ KillGlyphOutline(&out);
+ }
+ } while (flags & MORE_COMPONENTS);
+ }
+ else if (pOutline->contourCount > 0)
+ { /* Load in the end points.
+ */
+ { long size = pOutline->contourCount * sizeof(short);
+
+ if (SHS(pOutline->endPoints, size))
+ { error = fMemoryError;
+ goto EXIT;
+ }
+ BlockMove( (Ptr)pGlyph, (Ptr)*pOutline->endPoints, size );
+ pGlyph += pOutline->contourCount;
+ }
+
+ pOutline->pointCount = (*pOutline->endPoints)[pOutline->contourCount - 1] + 1;
+ if (SHS(pOutline->onCurve, pOutline->pointCount * sizeof(char)))
+ { error = fMemoryError;
+ goto EXIT;
+ }
+ if (SHS(pOutline->x, pOutline->pointCount * sizeof(Fixed)))
+ { error = fMemoryError;
+ goto EXIT;
+ }
+ if (SHS(pOutline->y, pOutline->pointCount * sizeof(Fixed)))
+ { error = fMemoryError;
+ goto EXIT;
+ }
+
+ /* Skip the word for instruction count + the instructions.
+ * Then load in the onCurve bytes.
+ */
+ { BYTE* p = (BYTE*)pGlyph + sizeof(short) + *pGlyph;
+ BYTE* onCurve = *pOutline->onCurve;
+ BYTE* stop = onCurve + pOutline->pointCount;
+ BYTE flag;
+
+ while (onCurve < stop)
+ { *onCurve++ = flag = GetUnsignedByte( p );
+ if ( flag & REPEAT_FLAGS ) {
+ short count = GetUnsignedByte( p );
+ for (--count; count >= 0; --count)
+ *onCurve++ = flag;
+ }
+ }
+ /* Lets do X
+ */
+ { short coord = adjustToLsb;
+ Fixed* x = *pOutline->x;
+
+ onCurve = *pOutline->onCurve;
+ while (onCurve < stop)
+ { if ( (flag = *onCurve++) & XSHORT ) {
+ if ( flag & SHORT_X_IS_POS )
+ coord += GetUnsignedByte( p );
+ else
+ coord -= GetUnsignedByte( p );
+ }
+ else if ( !(flag & NEXT_X_IS_ZERO) )
+ { coord += (short)(*p++) << 8;
+ coord += (BYTE)*p++;
+ }
+ *x++ = FixRatio( coord, upem );
+ }
+ }
+ /* Lets do Y
+ */
+ { short coord = 0;
+ Fixed* y = *pOutline->y;
+
+ onCurve = *pOutline->onCurve;
+ while (onCurve < stop)
+ { if ( (flag = *onCurve) & YSHORT ) {
+ if ( flag & SHORT_Y_IS_POS )
+ coord += GetUnsignedByte( p );
+ else
+ coord -= GetUnsignedByte( p );
+ }
+ else if ( !(flag & NEXT_Y_IS_ZERO) )
+ { coord += (short)(*p++) << 8;
+ coord += (BYTE)*p++;
+ }
+ *y++ = -FixRatio( coord, upem );
+
+ /* Filter off the extra bits
+ */
+ *onCurve++ = flag & ONCURVE;
+ }
+ }
+ }
+ }
+ else
+ error = fUnimplemented;
+EXIT:
+ SetFontState( hSfnt, state );
+
+ return PostFontError(error);
+}
+
+/*************************************************************************/
+
+static long* PackControlBits(long* p, BYTE * onCurve, long count)
+{
+ unsigned long mask = 0x80000000;
+
+ *p = 0;
+ while (count--)
+ { if (!mask)
+ { mask = 0x80000000;
+ *++p = 0;
+ }
+ if (!*onCurve++)
+ *p |= mask;
+ mask >>= 1;
+ }
+ return p + 1;
+}
+
+/*************************************************************************/
+
+gxPaths* OutlineToPaths(GlyphOutline* out)
+{
+ long size, *p, *origP;
+
+ size = sizeof(long); /* paths.contours */
+
+ { long i, sp = 0;
+ for (i = 0; i < out->contourCount; i++)
+ { long pts = (*out->endPoints)[i] - sp + 1;
+ size += sizeof(long); /* path.vectors */
+ size += (pts + 31 >> 5) << 2; /* path.controlBits */
+ size += pts << 3; /* path.vector[] */
+ sp = (*out->endPoints)[i] + 1;
+ }
+ }
+
+ origP = p = (long*) SvMemAlloc( size );
+ if (!p || MemError()) Debugger();
+
+ *p++ = out->contourCount;
+ { long i, sp = 0;
+ Fixed* x = *out->x;
+ Fixed* y = *out->y;
+ short* ep = *out->endPoints;
+ BYTE* onCurve = *out->onCurve;
+ for (i = 0; i < out->contourCount; i++)
+ { long pts = *ep - sp + 1;
+ *p++ = pts;
+ p = PackControlBits(p, onCurve, pts);
+ onCurve += pts;
+ while (pts--)
+ { *p++ = *x++;
+ *p++ = *y++;
+ }
+ sp = *ep++ + 1;
+ }
+ }
+ return (gxPaths*)origP;
+}
+
+/*************************************************************************/
+
+void ScaleGlyphOutline(GlyphOutline* out, Fixed xScale, Fixed yScale)
+{
+ Fixed* x = *out->x;
+ Fixed* y = *out->y;
+ short count = out->pointCount;
+
+ for (--count; count >= 0; --count)
+ { *x = FixMul( *x, xScale );
+ x++;
+ *y = FixMul( *y, yScale );
+ y++;
+ }
+ out->origin.x = FixMul( out->origin.x, xScale );
+ out->origin.y = FixMul( out->origin.y, yScale );
+ out->advance.x = FixMul( out->advance.x, xScale );
+ out->advance.y = FixMul( out->advance.y, yScale );
+}
+
+/*************************************************************************
+|*
+|* XOutGetCharOutlineQD()
+|*
+|* Ein Zeichen eines Outlinefonts in ein Bezier-PolyPolygon umwandeln
+|* Wenn keine Umwandlung moeglich ist, wird ein leeres PolyPolygon
+|* zurueckgegeben
+|* Ersterstellung 28.11.95 KH
+|* Letzte Aenderung 28.11.95 KH
+|*
+*************************************************************************/
+
+XPolyPolygon XOutGetCharOutlineQD(USHORT nChar, OutputDevice& rOut,
+ BOOL bOptimizeSize)
+{
+ Font aFont = rOut.GetFont();
+ short style = 0;
+
+ if (aFont.GetWeight() > WEIGHT_MEDIUM)
+ style |= bold;
+ if (aFont.GetItalic() > ITALIC_OBLIQUE)
+ style |= italic;
+ if (aFont.GetUnderline() > UNDERLINE_NONE)
+ style |= underline;
+ if (aFont.IsOutline())
+ style |= outline;
+ if (aFont.IsShadow())
+ style |= shadow;
+
+ Handle hSfnt = GetNamedSfntHandle( aFont.GetName(), style);
+
+ if (!hSfnt && style) // Font liegt vielleicht nur in der Grundform vor ?
+ hSfnt = GetNamedSfntHandle( aFont.GetName(), 0);
+
+ if (!hSfnt)
+ return XPolyPolygon();
+
+ FontMetric aMetric = rOut.GetFontMetric();
+
+ long nBaseLineOffset = aMetric.GetAscent();
+ long nOrgHeight = aFont.GetSize().Height();
+
+ unsigned nState = HGetState( hSfnt );
+ HNoPurge( hSfnt );
+
+ GlyphOutline out;
+
+ int i,j;
+
+ InitGlyphOutline( &out );
+
+ // Index des Glyphes besorgen
+ long glyphIndex = GetCharGlyphIndex( hSfnt, nChar );
+
+ // Glyph in Outline umwandlen
+ GetGlyphOutline( hSfnt, glyphIndex, &out, 0 );
+ ScaleGlyphOutline( &out, ff(nOrgHeight), ff(nOrgHeight) );
+
+ gxPaths* pPathData = OutlineToPaths( &out );
+
+ // Im Outline steht jetzt wieviele contouren wir haben
+ // so gro§ muuss alos unser Ergebnis sein
+ XPolyPolygon aXPolyPoly( out.contourCount ); // Unser XPolyPolygon
+
+ long* pCurPath = ((long*)pPathData) + 1; // pCurPath zeigt jetzt auf das erste
+ // Polygon ( kommt gleich hinter der
+ // Anzahl der Path Objekte )
+
+ for ( i=0; i < out.contourCount; i++ )
+ {
+ /* fuer jeden einzelnen Path brauchen wir die Anzahl der darin
+ * enthaltenen Punkte, einen Zeiger auf das Bitfeld, das festlegt,
+ * ob ein Punkt auf der Kurve liegt oder nicht, und einen Zeiger
+ * auf die einzelnen Punkte. Da wir hier auch wieder eine dynamische
+ * Datenstruktur haben, wirds wieder undurchsichtig.
+ * pPoint wird zunaechst auf den ersten Punkt gesetzt. ( Wir haben
+ * ein long fuer die Anzahl und ( Anzahl +31 )/ 32 longs fuer das
+ * Bitfeld.
+ */
+ long nPointAnz = ( (gxPath*) pCurPath )->vectors;
+ char *pBits = (char*) ( (gxPath*) pCurPath )->controlBits;
+ USHORT nPnt;
+ XPolygon aXPoly( 100, 50 );
+ BOOL bCloseIt = TRUE;
+
+ gxPoint *pPoint;
+
+ pPoint = (gxPoint*) ( pCurPath + ( 1 + (nPointAnz+31) / 32 ) );
+ nPnt = 0;
+
+ for ( j=0; j< nPointAnz; j++ )
+ {
+ /* Die einzelnen Punkte werden von gxPoints in StarView Points
+ * umgewandelt und in das XPolygon eingetragen. Anschliessend
+ * wird geprueft, ob es sich um einen Off Curve point handlete.
+ * (gluecklicherweise bietet Apple eine Funktion an, mit der man
+ * die Bits in einem dynamischen Bitfeld testen kann (BitTst) ).
+ * Zum Schluss muss jetzt nur noch der Punktpointer eins weiter
+ * gesetzt werden.
+ */
+
+ Point aPoint((long) FixedToInt( pPoint->x ),(long) FixedToInt( pPoint->y ));
+ aPoint.Y() += nBaseLineOffset;
+
+ aXPoly[nPnt] = aPoint;
+ nPnt++;
+
+ /* Wenn Off Curve Points ins Spiel kommen, wirds leider etwas
+ * komplizierter
+ */
+ if ( BitTst( pBits, j ) )
+ {
+ /* Es gibt wohl wirklich polygone, die mit einem Off
+ * Curve Point anfangen.
+ */
+ if ( j==0 )
+ {
+ gxPoint *pTmpPt = pPoint + ( nPointAnz - 1);
+ aXPoly[nPnt] = aXPoly[nPnt-1];
+ nPnt++;
+
+ Point aPoint((long) FixedToInt( pTmpPt->x ),(long) FixedToInt( pTmpPt->y ));
+ aPoint.Y() += nBaseLineOffset;
+
+ aXPoly[0] = aPoint;
+ bCloseIt = FALSE;
+ }
+
+ // Punkt verdoppeln fuer Bezier-Wandlung
+ aXPoly[nPnt] = aXPoly[nPnt-1];
+ nPnt++;
+
+ /* Wenn Polygone mit Off Curve Points anfangen, dann hoeren
+ * sie sicherlich auch mal damit auf
+ */
+ if ( j == nPointAnz - 1 )
+ {
+ aXPoly[nPnt] = aXPoly[0];
+ nPnt++;
+ bCloseIt = FALSE;
+ }
+ else if ( ! BitTst( pBits, j+1 ) )
+ {
+ /* Wenn der naechste Punkt auf der Kurve liegt, dann
+ * braucht er nur in unser Polygon eingetragen zu werden
+ */
+ pPoint += 1;
+ Point aPoint((long) FixedToInt( pPoint->x ),(long) FixedToInt( pPoint->y ));
+ aPoint.Y() += nBaseLineOffset;
+
+ aXPoly[nPnt] = aPoint;
+ nPnt++;
+ j++;
+ }
+ else
+ {
+ /* ansonsten muessen wir noch einen weiteren Punkt
+ * mit aufnehmen. ( Und zwar den Mittelpunkt zwischen
+ * den beiden Kontrollpunkten. )
+ */
+ Point aPoint((long) FixedToInt( pPoint->x / 2 + (pPoint+1)->x / 2 ),
+ (long) FixedToInt( pPoint->y / 2 + (pPoint+1)->y / 2 ));
+
+ aPoint.Y() += nBaseLineOffset;
+ aXPoly[nPnt] = aPoint;
+ nPnt++;
+ }
+ /* Umrechnung in Bezier (PQ=TrueType-Controlpunkt):
+ * P1 = 1/3 * (P0 + 2 * PQ)
+ * P2 = 1/3 * (P3 + 2 * PQ)
+ */
+ aXPoly[nPnt-3] = (aXPoly[nPnt-4] + aXPoly[nPnt-3] * 2) / 3;
+ aXPoly[nPnt-2] = (aXPoly[nPnt-1] + aXPoly[nPnt-2] * 2) / 3;
+ aXPoly.SetFlags(nPnt-3, XPOLY_CONTROL);
+ aXPoly.SetFlags(nPnt-2, XPOLY_CONTROL);
+ }
+ pPoint += 1;
+ }
+
+ // Polygon schliessen
+ if ( bCloseIt )
+ aXPoly[nPnt] = aXPoly[0];
+
+
+ /* Nachdem die einzelnen Punkte in das XPolygon eingetragen wurden,
+ * wird jetzt das Xpolygon in das XPolyPolygon gestopft und danach
+ * geloescht.
+ * Unser pPoint Pointer zeigt jetzt nicht mehr auf einen Punkt sondern
+ * auf den Anfang des naechsten Path. Das nutzen wir natuerlich aus, um
+ * den Path Pointer umzusetzen.
+ */
+ aXPolyPoly.Insert( aXPoly );
+ aXPoly.SetPointCount(0);
+
+ pCurPath = (long*) pPoint;
+ }
+
+ SvMemFree(pPathData);
+ KillGlyphOutline( &out );
+
+ HSetState( hSfnt, nState );
+
+ return aXPolyPoly;
+}
+
+/*************************************************************************
+|*
+|* XOutGetCharOutline()
+|*
+|* Ein Zeichen eines Outlinefonts in ein Bezier-PolyPolygon umwandeln
+|* Wenn keine Umwandlung moeglich ist, wird ein leeres PolyPolygon
+|* zurueckgegeben
+|* Ersterstellung 03.02.95 DV
+|* Letzte Aenderung 28.11.95 KH
+|*
+*************************************************************************/
+
+XPolyPolygon XOutGetCharOutline(USHORT nChar, OutputDevice& rOut,
+ BOOL bOptimizeSize)
+{
+ static BOOL bInit = FALSE;
+ static BOOL bHasGX;
+
+ if ( !bInit )
+ {
+ bHasGX = HasGX();
+ bInit = TRUE;
+ }
+
+ if ( bHasGX )
+ return XOutGetCharOutlineGX(nChar,rOut,bOptimizeSize);
+ else
+ return XOutGetCharOutlineQD(nChar,rOut,bOptimizeSize);
+}
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawFormText(String, Polygon, Font, nAbsStart)
+|*
+|* Einen String entlang eines Polygons ausgeben; nAbsStart
+|* ueberschreibt den XFormTextStartItem-Wert und wird fuer die
+|* Ausgabe mehrerer Strings entlang des gleichen Polygons benoetigt.
+|* Rueckgabewert ist die Endposition des ausgegebenen Textes in
+|* Bezug auf den Linienanfang.
+|*
+|* nAbsStart < 0: Die Gesamtlaenge aller Strings, notwendig fuer
+|* alle Formatierungen ausser Linksbuendig
+|* <= 0: Item-Startwert verwenden
+|* > 0: Text an dieser absoluten Position ausgeben; ist
+|* normalerweise der Rueckgabewert eines vorigen
+|* DrawFormText-Aufrufs
+|*
+|* bToLastPoint: alle Linien einschliesslich der letzten Zeichnen,
+|* sonst die letzte Linie auslassen
+|*
+|* bDraw: wenn FALSE, wird nichts ausgegeben, sondern nur das BoundRect
+|* berechnet
+|*
+|* pDXArray: wenn vorhanden, enthaelt dieses Array die horizontalen
+|* Positionen der einzelnen Zeichen, beginnend beim ersten
+|* und endend hinter dem letzten Zeichen; es muß also
+|* rText.Len()-1 long-Werte enthalten
+|*
+|*
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 11.10.95 ESO
+|*
+*************************************************************************/
+
+long XOutputDevice::ImpDrawFormText(const String& rText, const Polygon& rPoly,
+ Font aFont, long nAbsStart, BOOL bIsShadow,
+ BOOL bToLastPoint, BOOL bDraw,
+ const long* pDXArray)
+{
+ long nXMin = LONG_MAX, nYMin = LONG_MAX;
+ long nXMax = LONG_MIN, nYMax = LONG_MIN;
+ long nMaxCharExtent;
+ long nPolyLen = 0;
+ long nTextLen = 0;
+ long nTotal = 0;
+ long nTextWidth;
+ long nStart;
+ USHORT nPntCnt = rPoly.GetSize();
+ USHORT nLastPnt;
+ USHORT nPnt;
+ USHORT nChar = 0;
+ USHORT nCharCnt = rText.Len();
+ short nDirection;
+
+ if ( nPntCnt < 2 || nCharCnt == 0 )
+ return 0;
+
+ BOOL bIsSlantShadow = ( bIsShadow && eFormTextShadow == XFTSHADOW_SLANT );
+ BOOL bDrawAsPoly = ( bFormTextOutline || bIsSlantShadow );
+
+ if ( nAbsStart > 0 ) nStart = nAbsStart;
+ else nStart = nFormTextStart;
+
+ aFont.SetTransparent(TRUE);
+
+ // Attribute sichern
+ XLineStyle eOldLineStyle = eLineStyle;
+ XFillStyle eOldFillStyle = eFillStyle;
+ Color aOldLineColor( pOut->GetLineColor() );
+
+ pOut->SetFillColor( aFont.GetColor() );
+
+ if ( !(bFormTextOutline && bHair) || bIsShadow )
+ pOut->SetLineColor();
+
+ if ( !bFormTextOutline || bIsShadow )
+ eLineStyle = XLINE_NONE;
+
+ eFillStyle = XFILL_SOLID;
+
+ if ( eFormTextAdjust == XFT_AUTOSIZE && nAbsStart > 0 )
+ aFont.SetSize(Size(0, nFtAutoHeightSave));
+
+ Font aOldFont = pOut->GetFont();
+ long nAscent = pOut->GetFontMetric().GetAscent();
+
+ pOut->SetFont(aFont);
+
+ if ( pDXArray ) nTextWidth = pDXArray[nCharCnt - 1];
+ else nTextWidth = pOut->GetTextWidth(rText);
+
+ if ( eFormTextAdjust != XFT_LEFT && nAbsStart <= 0 )
+ {
+ // Gesamtlaenge des Polygons berechnen
+ USHORT nMax = nPntCnt;
+ nPnt = 1;
+
+ if ( !bToLastPoint )
+ nMax--;
+
+ for ( ; nPnt < nMax; nPnt++)
+ {
+ double fDx = rPoly[nPnt].X() - rPoly[nPnt-1].X();
+ double fDy = rPoly[nPnt].Y() - rPoly[nPnt-1].Y();
+ nPolyLen += (long) (sqrt(fDx * fDx + fDy * fDy) + 0.5);
+ }
+
+ if ( nAbsStart == 0 )
+ nAbsStart = - nTextWidth;
+
+ if ( eFormTextAdjust == XFT_AUTOSIZE )
+ {
+ aFont.SetSize(Size(0, nPolyLen * aFont.GetSize().Height() /
+ - nAbsStart));
+ nAbsStart = - nPolyLen;
+ pOut->SetFont(aFont);
+ nTextWidth = pOut->GetTextWidth(rText);
+ nAscent = pOut->GetFontMetric().GetAscent();
+ nFtAutoHeightSave = aFont.GetSize().Height();
+ // Nach Aenderung der Fontsize ist der Arrayinhalt ungueltig
+ pDXArray = NULL;
+ }
+ // Bei rechtsbuendiger Ausgabe auch Startposition beruecksichtigen
+ if ( eFormTextAdjust == XFT_RIGHT )
+ nAbsStart -= nStart;
+ nStart = nPolyLen + nAbsStart;
+
+ if ( eFormTextAdjust != XFT_RIGHT )
+ nStart /= 2;
+ }
+ if ( nStart < 0 )
+ nStart = 0;
+
+ if ( bIsShadow && eFormTextShadow != XFTSHADOW_SLANT )
+ nStart += nFormTextShdwXVal;
+
+ nTotal = nStart + nTextWidth;
+
+ if ( bIsShadow && eFormTextShadow == XFTSHADOW_SLANT &&
+ nFormTextShdwYVal && nFormTextShdwYVal != 100 )
+ nAscent = nAscent * nFormTextShdwYVal / 100;
+
+ // Maximaler Zeichenbereich ca. 1,4 (sqrt(2)) * Ascent fuer BoundRect
+ nMaxCharExtent = nAscent * 7 / 5;
+
+ // Laufrichtung des Polygons ggf. spiegeln
+ if ( bFormTextMirror )
+ {
+ nDirection = -1;
+ nLastPnt = (USHORT) -1;
+ nPnt = nPntCnt - 2;
+ if ( !bToLastPoint )
+ nPnt--;
+ }
+ else
+ {
+ nDirection = 1;
+ nLastPnt = nPntCnt - 1;
+ nPnt = 1;
+ if ( bToLastPoint )
+ nLastPnt++;
+ }
+
+ while ( nChar < nCharCnt && nPnt != nLastPnt )
+ {
+ Point aPos = rPoly[nPnt];
+ double fDx, fDy, fLen;
+ long nLen, nChar1Len;
+
+ fDx = aPos.X() - rPoly[nPnt-nDirection].X();
+ fDy = aPos.Y() - rPoly[nPnt-nDirection].Y();
+ fLen = sqrt(fDx * fDx + fDy * fDy);
+ nLen = (long) (fLen + 0.5);
+
+ if ( pDXArray )
+ {
+ nChar1Len = pDXArray[nChar];
+ if ( nChar > 0 )
+ nChar1Len -= pDXArray[nChar-1];
+ }
+ else
+ nChar1Len = pOut->GetTextWidth(rText, nChar, 1);
+
+ double fXDist, fYDist;
+ double fCos = fDx;
+ double fSin = fDy;
+ double fPartLen = fLen;
+ double fLenSum = fLen - nTextLen;
+ USHORT nSumPnt = nPnt + nDirection;
+
+ // Laenge halbieren, um Zeichenmitte als Referenzpunkt zu verwenden
+ nChar1Len /= 2;
+
+ while ( nSumPnt != nLastPnt && fLenSum < nChar1Len )
+ {
+ fCos = rPoly[nSumPnt].X() - rPoly[nSumPnt-nDirection].X();
+ fSin = rPoly[nSumPnt].Y() - rPoly[nSumPnt-nDirection].Y();
+ fPartLen = sqrt(fSin * fSin + fCos * fCos);
+ fLenSum += fPartLen;
+ nSumPnt += nDirection;
+ }
+ fXDist = - fSin * nFormTextDistance / fPartLen;
+ fYDist = fCos * nFormTextDistance / fPartLen;
+
+ fSin /= - fPartLen;
+ fCos /= fPartLen;
+
+ if ( nStart > 0 )
+ nStart -= nLen;
+ else
+ {
+ nLen -= nTextLen;
+ nTextLen = - nLen;
+ }
+
+ if ( nLen > 0 && nStart <= 0 )
+ {
+ USHORT nCnt = 0;
+
+ if ( nStart < 0 )
+ {
+ nLen = - nStart;
+ nStart = 0;
+ }
+ do
+ {
+ if ( pDXArray )
+ {
+ nTextLen = pDXArray[nChar + nCnt];
+ if ( nChar > 0 )
+ nTextLen -= pDXArray[nChar-1];
+ }
+ else
+ nTextLen = pOut->GetTextWidth(rText, nChar, nCnt+1);
+ nCnt++;
+ }
+ while ( nChar + nCnt < nCharCnt && nTextLen < nLen );
+
+ aPos.X() -= (long) (fDx * nLen / fLen + fXDist);
+ aPos.Y() -= (long) (fDy * nLen / fLen + fYDist);
+// aPos.X() -= (long) ((fDx * nLen - fDy * nFormTextDistance) / fLen);
+// aPos.Y() -= (long) ((fDy * nLen + fDx * nFormTextDistance) / fLen);
+
+ // BoundRect-Approximation
+ nXMin = Min(nXMin, aPos.X() - nMaxCharExtent);
+ nYMin = Min(nYMin, aPos.Y() - nMaxCharExtent);
+ nXMax = Max(nXMax, aPos.X() + nMaxCharExtent);
+ nYMax = Max(nYMax, aPos.Y() + nMaxCharExtent);
+
+ if ( eFormTextStyle == XFT_ROTATE )
+ {
+ if ( bDrawAsPoly )
+ {
+ for (USHORT i = 0; i < nCnt; i++)
+ {
+ XPolyPolygon aChar = XOutGetCharOutline(
+ (BYTE) rText[USHORT(nChar+i)], *pOut);
+ Point aPolyPos = aPos;
+
+ if ( i > 0 )
+ {
+ long nW;
+
+ if ( pDXArray )
+ {
+ nW = pDXArray[nChar + i - 1];
+ if ( nChar > 0 )
+ nW -= pDXArray[nChar-1];
+ }
+ else
+ nW = pOut->GetTextWidth(rText, nChar, i);
+
+ aPolyPos.X() += (long) (fDx * nW / fLen);
+ aPolyPos.Y() += (long) (fDy * nW / fLen);
+ }
+ Point aCenter = aPolyPos;
+
+ if ( bIsSlantShadow )
+ {
+ if ( nFormTextShdwYVal && nFormTextShdwYVal != 100 )
+ aChar.Scale(1.0, (double)nFormTextShdwYVal/100);
+
+ aChar.SlantX(nAscent,
+ sin(- F_PI * nFormTextShdwXVal / 1800),
+ cos(- F_PI * nFormTextShdwXVal / 1800));
+ }
+ aPolyPos.Y() -= nAscent;
+ aChar.Translate(aPolyPos);
+ aChar.Rotate(aCenter, fSin, fCos);
+ if ( bDraw )
+ DrawXPolyPolygon(aChar);
+ }
+ }
+ else
+ {
+ short nAngle = (short) (acos(fCos) * 1800 / F_PI + 0.5);
+ if ( fSin < 0 )
+ nAngle = 3600 - nAngle;
+ aFont.SetOrientation(nAngle);
+ pOut->SetFont(aFont);
+ if ( bDraw )
+ pOut->DrawTextArray(aPos, rText, pDXArray, nChar, nCnt);
+// pOut->DrawText(aPos, rText, nChar, nCnt);
+ }
+ }
+ else
+ {
+ bDrawAsPoly = ( bDrawAsPoly || eFormTextStyle != XFT_UPRIGHT);
+
+ for (USHORT i = 0; i < nCnt; i++)
+ {
+ XPolyPolygon aChar(0);
+ Point aPolyPos = aPos;
+
+ if ( i > 0 )
+ {
+ long nW;
+
+ if ( pDXArray )
+ {
+ nW = pDXArray[nChar + i - 1];
+ if ( nChar > 0 )
+ nW -= pDXArray[nChar-1];
+ }
+ else
+ nW = pOut->GetTextWidth(rText, nChar, i);
+
+ aPolyPos.X() += (long) (fDx * nW / fLen);
+ aPolyPos.Y() += (long) (fDy * nW / fLen);
+ }
+ if ( bDrawAsPoly )
+ {
+ aChar = XOutGetCharOutline(
+ (BYTE)rText[USHORT(nChar+i)], *pOut);
+
+ if ( bIsSlantShadow )
+ {
+ if ( nFormTextShdwYVal && nFormTextShdwYVal != 100 )
+ aChar.Scale(1.0, (double)nFormTextShdwYVal/100);
+
+ aChar.SlantX(nAscent,
+ sin(- F_PI * nFormTextShdwXVal / 1800),
+ cos(- F_PI * nFormTextShdwXVal / 1800));
+ }
+ }
+
+ if ( eFormTextStyle == XFT_SLANTY )
+ {
+ aPolyPos.Y() -= nAscent;
+ aChar.SlantY(0, fSin, fCos);
+ }
+ else
+ {
+ long nW;
+
+ if ( pDXArray )
+ {
+ nW = pDXArray[nChar + i];
+ if ( nChar > 0 || i > 0 )
+ nW -= pDXArray[nChar + i - 1];
+ }
+ else
+ nW = pOut->GetTextWidth(rText, nChar+i, 1);
+
+ aPolyPos.X() -= nW / 2;
+
+ if ( eFormTextStyle == XFT_SLANTX )
+ {
+ aPolyPos.X() += (long) (fDy * nAscent / fLen);
+ aPolyPos.Y() -= (long) (fDx * nAscent / fLen);
+ aChar.SlantX(0, fSin, fCos);
+ }
+ else if ( bDrawAsPoly )
+ aPolyPos.Y() -= nAscent;
+ }
+ aChar.Translate(aPolyPos);
+
+ if ( bDraw )
+ {
+ if ( bDrawAsPoly )
+ DrawXPolyPolygon(aChar);
+ else
+ pOut->DrawTextArray(aPolyPos, rText, pDXArray,
+ nChar+i, 1);
+// pOut->DrawText(aPolyPos, rText, nChar+i, 1);
+ }
+ }
+ }
+ nChar += nCnt;
+ nTextLen -= nLen;
+ }
+ nPnt += nDirection;
+ }
+ // auch letzten Punkt fuer BoundRect-Approximation beruecksichtigen
+ Point aPos = rPoly[nPnt - nDirection];
+ nXMin = Min(nXMin, aPos.X() - nMaxCharExtent);
+ nYMin = Min(nYMin, aPos.Y() - nMaxCharExtent);
+ nXMax = Max(nXMax, aPos.X() + nMaxCharExtent);
+ nYMax = Max(nYMax, aPos.Y() + nMaxCharExtent);
+
+ aFormTextBoundRect.Union(Rectangle(nXMin, nYMin, nXMax, nYMax));
+
+ pOut->SetFont(aOldFont);
+ pOut->SetLineColor( aOldLineColor );
+ eLineStyle = eOldLineStyle;
+ eFillStyle = eOldFillStyle;
+
+ return nTotal;
+}
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawFormTextShadow(String, Polygon, Font, nAbsStart)
+|*
+|* Schatten fuer FormText ausgeben
+|*
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 11.10.95 ESO
+|*
+*************************************************************************/
+
+void XOutputDevice::DrawFormTextShadow(const String& rText,
+ const Polygon& rPoly,
+ const Font& rFont, long nAbsStart,
+ BOOL bToLastPoint, BOOL bDraw,
+ const long* pDXArray)
+{
+ if ( eFormTextShadow != XFTSHADOW_NONE )
+ {
+ BOOL bOutline = bFormTextOutline;
+
+ if ( eFormTextShadow != XFTSHADOW_SLANT )
+ nFormTextDistance += nFormTextShdwYVal;
+
+ Font aShadowFont(rFont);
+ aShadowFont.SetColor(aFormTextShdwColor);
+
+ ImpDrawFormText(rText, rPoly, aShadowFont, nAbsStart, TRUE,
+ bToLastPoint, bDraw, pDXArray);
+
+ if ( eFormTextShadow != XFTSHADOW_SLANT )
+ nFormTextDistance -= nFormTextShdwYVal;
+ bFormTextOutline = bOutline;
+ }
+}
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawFormText(String, Polygon, Font, nAbsStart)
+|*
+|* Einen String entlang eines Polygons ausgeben
+|*
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 11.10.95 ESO
+|*
+*************************************************************************/
+
+long XOutputDevice::DrawFormText(const String& rText, const Polygon& rPoly,
+ Font aFont, long nAbsStart,
+ BOOL bToLastPoint, BOOL bDraw,
+ const long* pDXArray)
+{
+ // Beim erstn Aufruf BoundRect leeren
+ if ( nAbsStart <= 0 )
+ aFormTextBoundRect = Rectangle();
+
+ DrawFormTextShadow(rText, rPoly, aFont, nAbsStart, bToLastPoint, bDraw,
+ pDXArray);
+ return ImpDrawFormText(rText, rPoly, aFont, nAbsStart, FALSE,
+ bToLastPoint, bDraw, pDXArray);
+}
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawFormText(String, XPolygon, Font, nAbsStart)
+|*
+|* Einen String entlang eines Bezier-Polygons ausgeben
+|*
+|* Ersterstellung 03.02.95 ESO
+|* Letzte Aenderung 11.10.95 ESO
+|*
+*************************************************************************/
+
+long XOutputDevice::DrawFormText(const String& rText, const XPolygon& rXPoly,
+ Font aFont, long nAbsStart,
+ BOOL bToLastPoint, BOOL bDraw,
+ const long* pDXArray)
+{
+ // Beim ersten Aufruf BoundRect leeren
+ if ( nAbsStart <= 0 )
+ aFormTextBoundRect = Rectangle();
+
+ Polygon aPoly = XOutCreatePolygon(rXPoly, pOut);
+
+ DrawFormTextShadow(rText, aPoly, aFont, nAbsStart, bToLastPoint, bDraw,
+ pDXArray);
+ return ImpDrawFormText(rText, aPoly, aFont, nAbsStart, FALSE,
+ bToLastPoint, bDraw, pDXArray);
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xiocomp.cxx b/binfilter/bf_svx/source/xoutdev/svx_xiocomp.cxx
new file mode 100644
index 000000000000..d4b4d45b4d0c
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xiocomp.cxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <tools/debug.hxx>
+#include "xiocomp.hxx"
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+/*************************************************************************
+|*
+|* Beschreibung: Verwaltungsklasse fuer Blocklaengen und Versionsnummern
+|* Konstruktor, schreibt bzw. liest Versionsnummer
+|*
+\************************************************************************/
+
+/*N*/ XIOCompat::XIOCompat( SvStream& rNewStream, USHORT nNewMode, UINT16 nVer )
+/*N*/ : SdrDownCompat( rNewStream, nNewMode, TRUE ),
+/*N*/ nVersion( nVer )
+/*N*/ {
+/*N*/ if( nNewMode == STREAM_WRITE )
+/*N*/ {
+/*N*/ DBG_ASSERT(nVer != XIOCOMPAT_VERSIONDONTKNOW,
+/*N*/ "kann unbekannte Version nicht schreiben");
+/*N*/ rNewStream << nVersion;
+/*N*/ }
+/*N*/ else if( nNewMode == STREAM_READ )
+/*N*/ {
+/*N*/ DBG_ASSERT(nVer == XIOCOMPAT_VERSIONDONTKNOW,
+/*N*/ "Lesen mit Angabe der Version ist Quatsch!");
+/*N*/ rNewStream >> nVersion;
+/*N*/ }
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xline.cxx b/binfilter/bf_svx/source/xoutdev/svx_xline.cxx
new file mode 100644
index 000000000000..91afd0f50126
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xline.cxx
@@ -0,0 +1,772 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include <stdlib.h>
+#include <tools/bigint.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/metaact.hxx>
+#include "xoutx.hxx"
+#include <bf_svtools/colorcfg.hxx>
+
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+/*************************************************************************
+|*
+|* eine der Haelften einer Bezierkurve berechnen
+|*
+\************************************************************************/
+
+/*N*/ void SplitBezier(const XPolygon& rBez, XPolygon& rSplit, BOOL bFirstPart)
+/*N*/ {
+/*N*/ if ( bFirstPart )
+/*N*/ {
+/*N*/ rSplit[0] = rBez[0];
+/*N*/ rSplit[1] = (rBez[0] + rBez[1]) / 2;
+/*N*/ rSplit[2] = (rBez[0] + rBez[1] * 2 + rBez[2]) / 4;
+/*N*/ rSplit[3] = (rBez[0] + rBez[1] * 3 + rBez[2] * 3 + rBez[3]) / 8;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ rSplit[1] = (rBez[3] + rBez[2] * 2 + rBez[1]) / 4;
+/*N*/ rSplit[2] = (rBez[3] + rBez[2]) / 2;
+/*N*/ rSplit[3] = rBez[3];
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* pruefen, ob die uebergebene Bezierkurve eine gerade Linie ist
+|*
+\************************************************************************/
+
+/*N*/ BOOL IsBezierStraight(const XPolygon& rBez)
+/*N*/ {
+/*N*/ // Point-on-Line-Test nach Graphics Gems I, S. 49f.
+/*N*/ long X0 = rBez[0].X(), Y0 = rBez[0].Y();
+/*N*/ long X1 = rBez[1].X(), Y1 = rBez[1].Y();
+/*N*/ long X2 = rBez[2].X(), Y2 = rBez[2].Y();
+/*N*/ long X3 = rBez[3].X(), Y3 = rBez[3].Y();
+/*N*/ BigInt DX(X3 - X0);
+/*N*/ BigInt DY(Y3 - Y0);
+/*N*/ BigInt nAbsDX(DX), nAbsDY(DY);
+/*N*/ nAbsDX.Abs();
+/*N*/ nAbsDY.Abs();
+/*N*/ BigInt nMax(nAbsDX > nAbsDY ? nAbsDX : nAbsDY);
+/*N*/ BigInt nCompare;
+/*N*/
+/*N*/ // Kontrollpunkte auf der (unendlichen) Linie durch P3 und P0?
+/*N*/ nCompare = DY * BigInt(X1-X0) - DX * BigInt(Y1-Y0);
+/*N*/ nCompare.Abs();
+/*N*/ if ( nCompare >= nMax )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ nCompare = DY * BigInt(X2-X0) - DX * BigInt(Y2-Y0);
+/*N*/ nCompare.Abs();
+/*N*/ if ( nCompare >= nMax )
+/*N*/ return FALSE;
+/*N*/
+/*N*/ // ____
+/*N*/ // wenn ja, dann pruefen, ob ausserhalb der Strecke P3P0
+/*N*/ if ( (X3 < X0 && X0 < X1) || (Y3 < Y0 && Y0 < Y1) ) return FALSE;
+/*N*/ if ( (X1 < X0 && X0 < X3) || (Y1 < Y0 && Y0 < Y3) ) return FALSE;
+/*N*/ if ( (X0 < X3 && X3 < X1) || (Y0 < Y3 && Y3 < Y1) ) return FALSE;
+/*N*/ if ( (X1 < X3 && X3 < X0) || (Y1 < Y3 && Y3 < Y3) ) return FALSE;
+/*N*/
+/*N*/ if ( (X3 < X0 && X0 < X2) || (Y3 < Y0 && Y0 < Y2) ) return FALSE;
+/*N*/ if ( (X2 < X0 && X0 < X3) || (Y2 < Y0 && Y0 < Y3) ) return FALSE;
+/*N*/ if ( (X0 < X3 && X3 < X2) || (Y0 < Y3 && Y3 < Y2) ) return FALSE;
+/*N*/ if ( (X2 < X3 && X3 < X0) || (Y2 < Y3 && Y3 < Y3) ) return FALSE;
+/*N*/
+/*N*/ return TRUE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Bezierkurve durch Iteration bestimmen
+|*
+\************************************************************************/
+
+/*N*/ void XOutIterateBezier(const XPolygon& rBez, Rectangle& rRect, USHORT nMaxDepth)
+/*N*/ {
+/*N*/ // Das Folgende Statement ist Optimierung
+/*N*/ if (rRect.IsInside(rBez[0]) && rRect.IsInside(rBez[1]) &&
+/*N*/ rRect.IsInside(rBez[2]) && rRect.IsInside(rBez[3])) return;
+/*N*/
+/*N*/ if ( nMaxDepth == 0 || IsBezierStraight(rBez) )
+/*N*/ {
+/*N*/ long nX = rBez[3].X(),
+/*N*/ nY = rBez[3].Y();
+/*N*/ rRect.Left() = Min(nX, rRect.Left());
+/*N*/ rRect.Right() = Max(nX, rRect.Right());
+/*N*/ rRect.Top() = Min(nY, rRect.Top());
+/*N*/ rRect.Bottom() = Max(nY, rRect.Bottom());
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ XPolygon aSplitBez(4);
+/*N*/
+/*N*/ nMaxDepth--;
+/*N*/ SplitBezier(rBez, aSplitBez, TRUE);
+/*N*/ XOutIterateBezier(aSplitBez, rRect, nMaxDepth);
+/*N*/ aSplitBez[0] = aSplitBez[3];
+/*N*/ SplitBezier(rBez, aSplitBez, FALSE);
+/*N*/ XOutIterateBezier(aSplitBez, rRect, nMaxDepth);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::XOutCalcXPolyExtent()
+|*
+|* Beschreibung
+|* Ersterstellung 14.08.95 ESO
+|* Letzte Aenderung 15.08.95 ESO
+|*
+*************************************************************************/
+
+/*N*/ Rectangle XOutCalcXPolyExtent(const XPolygon& rXPoly, OutputDevice* pOut)
+/*N*/ {
+/*N*/ if ( rXPoly.GetPointCount() == 0 )
+/*?*/ return Rectangle();
+/*N*/
+/*N*/ USHORT i;
+/*N*/ USHORT nPntMax=rXPoly.GetPointCount()-1;
+/*N*/
+/*N*/ FASTBOOL bHasBezier=FALSE;
+/*N*/ Rectangle aRect(rXPoly[0],rXPoly[0]);
+/*N*/ // zunaechst das Rect der Stuetzstellen (ohne Kontrollpunkte) bestimmen
+/*N*/ Point aPt;
+/*N*/ for (i=nPntMax; i>0; i--) {
+/*N*/ if (!rXPoly.IsControl(i)) {
+/*N*/ aPt=rXPoly[i]; // lokal kopieren fuer bessere Performance
+/*N*/ if (aPt.X()<aRect.Left ()) aRect.Left ()=aPt.X();
+/*N*/ if (aPt.X()>aRect.Right ()) aRect.Right ()=aPt.X();
+/*N*/ if (aPt.Y()<aRect.Top ()) aRect.Top ()=aPt.Y();
+/*N*/ if (aPt.Y()>aRect.Bottom()) aRect.Bottom()=aPt.Y();
+/*N*/ } else bHasBezier=TRUE;
+/*N*/ }
+/*N*/ if (!bHasBezier) return aRect;
+/*N*/
+/*N*/ if (pOut!=NULL)
+/*?*/ aRect = pOut->LogicToPixel(aRect);
+/*N*/ i=0;
+/*N*/ while ( i < nPntMax )
+/*N*/ {
+/*N*/ if ( i <= nPntMax - 3 && rXPoly.GetFlags(i+1) == XPOLY_CONTROL )
+/*N*/ {
+/*N*/ XPolygon aBez(4);
+/*N*/
+/*N*/ if ( pOut )
+/*N*/ {
+/*?*/ aBez[0] = pOut->LogicToPixel(rXPoly[i]);
+/*?*/ aBez[1] = pOut->LogicToPixel(rXPoly[i+1]);
+/*?*/ aBez[2] = pOut->LogicToPixel(rXPoly[i+2]);
+/*?*/ aBez[3] = pOut->LogicToPixel(rXPoly[i+3]);
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ aBez[0] = rXPoly[i];
+/*N*/ aBez[1] = rXPoly[i+1];
+/*N*/ aBez[2] = rXPoly[i+2];
+/*N*/ aBez[3] = rXPoly[i+3];
+/*N*/ }
+/*N*/ XOutIterateBezier(aBez, aRect, 8);
+/*N*/ i += 3;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ Point aPnt(rXPoly[++i]);
+/*N*/ if ( pOut )
+/*?*/ aPnt = pOut->LogicToPixel(aPnt);
+/*N*/
+/*N*/ aRect.Left() = Min(aPnt.X(), aRect.Left());
+/*N*/ aRect.Right() = Max(aPnt.X(), aRect.Right());
+/*N*/ aRect.Top() = Min(aPnt.Y(), aRect.Top());
+/*N*/ aRect.Bottom() = Max(aPnt.Y(), aRect.Bottom());
+/*N*/ }
+/*N*/ }
+/*N*/ if ( pOut )
+/*?*/ aRect = pOut->PixelToLogic(aRect);
+/*N*/ return aRect;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::CalcBezierStepCount()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 14.12.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ long XOutCalcBezierStepCount( const XPolygon& rXPoly, USHORT nIndex,
+/*N*/ OutputDevice* pOut, USHORT nRough )
+/*N*/ {
+/*N*/ long nSteps;
+/*N*/
+/*N*/ if( pOut || nRough )
+/*N*/ {
+/*N*/ const Point& aPt = rXPoly[ nIndex++ ];
+/*N*/ const Point& aPt1 = rXPoly[ nIndex++ ];
+/*N*/ const Point& aPt2 = rXPoly[ nIndex++ ];
+/*N*/ const Point& aPt3 = rXPoly[ nIndex ];
+/*N*/ long nDx1 = Abs( aPt1.X() - aPt.X() ) * 2;
+/*N*/ long nDy1 = Abs( aPt1.Y() - aPt.Y() ) * 2;
+/*N*/ long nDx2 = Abs( aPt3.X() - aPt2.X() ) * 2;
+/*N*/ long nDy2 = Abs( aPt3.Y() - aPt2.Y() ) * 2;
+/*N*/ long nDxHndl = Abs( aPt2.X() - aPt1.X() );
+/*N*/ long nDyHndl = Abs( aPt2.Y() - aPt1.Y() );
+/*N*/
+/*N*/ long nDelta = Max(Max(nDx1, nDy1), Max(nDx2, nDy2));
+/*N*/ nDelta = Max(nDelta, Max(nDxHndl, nDyHndl));
+/*N*/ if( pOut )
+/*N*/ nDelta = pOut->LogicToPixel(Size(nDelta, 0)).Width();
+/*N*/ if( nRough )
+/*N*/ nSteps = nDelta / nRough + 4;
+/*N*/ else
+/*N*/ nSteps = nDelta / 25 + 4;
+/*N*/ }
+/*N*/ else nSteps = 10;
+/*N*/
+/*N*/ return nSteps;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::CalcBezier()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 14.12.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XOutCalcBezier( const XPolygon& rXPoly, USHORT nBezIndex, Polygon& rPoly,
+/*N*/ USHORT nPolyIndex, long nSteps )
+/*N*/ {
+/*N*/ if ( nPolyIndex > XPOLY_MAXPOINTS )
+/*N*/ {
+/*N*/ return;
+/*N*/ }
+/*N*/
+/*N*/ double nX;
+/*N*/ double nY;
+/*N*/ double nX0, nX1, nX2, nX3;
+/*N*/ double nY0, nY1, nY2, nY3;
+/*N*/
+/*N*/ long nDiff = nSteps - 1;
+/*N*/ long nDiv = nSteps * nSteps * nSteps;
+/*N*/ rPoly[nPolyIndex++] = rXPoly[nBezIndex];
+/*N*/
+/*N*/ nX0 = rXPoly[nBezIndex ].X();
+/*N*/ nY0 = rXPoly[nBezIndex++].Y();
+/*N*/ nX1 = rXPoly[nBezIndex ].X() * 3;
+/*N*/ nY1 = rXPoly[nBezIndex++].Y() * 3;
+/*N*/ nX2 = rXPoly[nBezIndex ].X() * 3;
+/*N*/ nY2 = rXPoly[nBezIndex++].Y() * 3;
+/*N*/ nX3 = rXPoly[nBezIndex ].X();
+/*N*/ nY3 = rXPoly[nBezIndex ].Y();
+/*N*/
+/*N*/ for (long nStep = 1; nStep < nSteps; nStep++, nDiff--, nPolyIndex++)
+/*N*/ {
+/*N*/ long nAcc = nDiff * nDiff * nDiff;
+/*N*/
+/*N*/ nX = nX0 * nAcc;
+/*N*/ nY = nY0 * nAcc;
+/*N*/ nAcc = nAcc / nDiff * nStep;
+/*N*/ nX += nX1 * nAcc;
+/*N*/ nY += nY1 * nAcc;
+/*N*/ nAcc = nAcc / nDiff * nStep;
+/*N*/ nX += nX2 * nAcc;
+/*N*/ nY += nY2 * nAcc;
+/*N*/ nAcc = nAcc / nDiff * nStep;
+/*N*/ nX += nX3 * nAcc;
+/*N*/ nY += nY3 * nAcc;
+/*N*/
+/*N*/ rPoly[nPolyIndex].X() = (long) (nX / nDiv);
+/*N*/ rPoly[nPolyIndex].Y() = (long) (nY / nDiv);
+/*N*/ }
+/*N*/ rPoly[nPolyIndex] = rXPoly[nBezIndex];
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::CreatePolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 14.12.94
+|*
+*************************************************************************/
+
+/*N*/ Polygon XOutCreatePolygon( const XPolygon& rXPoly, OutputDevice* pOut,
+/*N*/ USHORT nRough )
+/*N*/ {
+/*N*/ if ( rXPoly.GetPointCount() == 0 )
+/*N*/ return Polygon(0);
+/*N*/
+/*N*/ USHORT i = 0;
+/*N*/ ULONG nPolySize = 1;
+/*N*/ USHORT nPntMax = rXPoly.GetPointCount()-1;
+/*N*/
+/*N*/ while (i<nPntMax) {
+/*N*/ if (i+3<=nPntMax && rXPoly.IsControl(i+1)) {
+/*N*/ #ifdef DGB_UTIL
+/*N*/ // am 14.2.1997 von Joe
+/*N*/ if (!rXPoly.IsControl(i+2)) {
+/*N*/ ByteString aMsg("XOutCreatePolygon(): Fehlender Kontrollpunkt an Position ");
+/*N*/ aMsg += i+2;
+/*N*/ aMsg += ". Stattdessen ist dort eine normale Stuetzstelle.";
+/*N*/ DGB_ERROR(aMsg.GetBuffer());
+/*N*/ }
+/*N*/ if (rXPoly.IsControl(i+3)) {
+/*N*/ ByteString aMsg("XOutCreatePolygon(): Fehlende Stuetzstelle an Position ");
+/*N*/ aMsg += i+3;
+/*N*/ aMsg += ". Stattdessen ist dort ein Kontrollpunkt.";
+/*N*/ DGB_ERROR(aMsg.GetBuffer());
+/*N*/ }
+/*N*/ #endif
+/*N*/ nPolySize+=(USHORT)XOutCalcBezierStepCount(rXPoly,i,pOut,nRough);
+/*N*/ i+=3;
+/*N*/ } else {
+/*N*/ nPolySize++;
+/*N*/ i++;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ if ( nPolySize > XPOLY_MAXPOINTS )
+/*N*/ nPolySize = XPOLY_MAXPOINTS;
+/*N*/
+/*N*/ Polygon aPoly( (USHORT) nPolySize );
+/*N*/ USHORT nPolyPos = 0, nPolyPosMax = nPolySize - 1;
+/*N*/
+/*N*/ aPoly[ 0 ] = rXPoly[ i = 0 ];
+/*N*/
+/*N*/ while( i < nPntMax && nPolyPos < nPolySize )
+/*N*/ {
+/*N*/ if( i + 3 <= nPntMax && rXPoly.GetFlags( i + 1 ) == XPOLY_CONTROL )
+/*N*/ {
+/*N*/ USHORT nSteps = (USHORT) XOutCalcBezierStepCount( rXPoly, i, pOut, nRough );
+/*N*/
+/*N*/ if( nPolyPos + nSteps >= (USHORT) nPolySize )
+/*N*/ nSteps = (USHORT)( nPolySize - nPolyPos - 1 );
+/*N*/
+/*N*/ XOutCalcBezier( rXPoly, i, aPoly, nPolyPos, nSteps );
+/*N*/ nPolyPos += (USHORT) nSteps;
+/*N*/ i += 3;
+/*N*/ }
+/*N*/ else if( nPolyPos < nPolyPosMax )
+/*N*/ aPoly[ ++nPolyPos ] = rXPoly[ ++i ];
+/*N*/ }
+/*N*/
+/*N*/ return aPoly;
+/*N*/ }
+
+/*N*/ Polygon XOutCreatePolygonBezier( const XPolygon& rXPoly, OutputDevice* pOut )
+/*N*/ {
+/*N*/ sal_uInt16 i, nPtCount = rXPoly.GetPointCount();
+/*N*/ Polygon aPoly( nPtCount );
+/*N*/ for ( i = 0; i < nPtCount; i++ )
+/*N*/ {
+/*N*/ aPoly[ i ] = rXPoly[ i ];
+/*N*/ aPoly.SetFlags( i, (PolyFlags)( rXPoly.GetFlags( i ) ) );
+/*N*/ }
+/*N*/ return aPoly;
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* Parameterklassse fuer dicke Linien mit Linienmuster
+|*
+\************************************************************************/
+
+/*N*/ class XLineParam
+/*N*/ {
+/*N*/ public:
+/*N*/ long nPatSeg;
+/*N*/ long nPatRemain;
+/*N*/ BOOL bHasJoin, bUseJoin3;
+/*N*/ Point aJoin1, aJoin2, aJoin3;
+/*N*/ double fLength;
+/*N*/ long nLineDx, nLineDy;
+/*N*/ long nDxW, nDyW;
+/*N*/
+/*N*/ XLineParam() {}
+/*N*/
+/*N*/ void Init(const Point& rP1, const Point& rP2, long nWidth);
+/*N*/ };
+
+/*N*/ void XLineParam::Init(const Point& rP1, const Point& rP2, long nWidth)
+/*N*/ {
+/*N*/ double fWidth = 0.0, fRound;
+/*N*/
+/*N*/ nPatSeg = -1;
+/*N*/ nPatRemain = 0;
+/*N*/ bHasJoin = FALSE;
+/*N*/ bUseJoin3 = FALSE;
+/*N*/ nLineDx = rP2.X() - rP1.X();
+/*N*/ nLineDy = rP2.Y() - rP1.Y();
+/*N*/ fLength = sqrt((double) nLineDx * nLineDx + (double) nLineDy * nLineDy);
+/*N*/ if ( fLength > 0 )
+/*N*/ fWidth = nWidth / fLength;
+/*N*/ if ( nLineDy >= 0 ) fRound = 0.5;
+/*N*/ else fRound = -0.5;
+/*N*/ nDxW = (long) (fWidth * nLineDy + fRound);
+/*N*/ if ( nLineDx >= 0 ) fRound = 0.5;
+/*N*/ else fRound = -0.5;
+/*N*/ nDyW = - (long) (fWidth * nLineDx + fRound);
+/*N*/
+/*N*/ aJoin1.X() = rP2.X() + nDxW / 2;
+/*N*/ aJoin1.Y() = rP2.Y() + nDyW / 2;
+/*N*/ aJoin2 = aJoin1;
+/*N*/ aJoin2.X() -= nDxW;
+/*N*/ aJoin2.Y() -= nDyW;
+/*N*/ aJoin3 = aJoin1;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::CalcFatLineJoin()
+|*
+|* Beschreibung Uebergang zwischen zwei Linien eines Polygons
+|* berechnen
+|* Ersterstellung 02.12.94
+|* Letzte Aenderung 09.01.95
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawStartEndPoly()
+|*
+|* Linienanfang- bzw. -endpolygon zeichnen
+|* Ersterstellung 17.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawLineStartEnd()
+|*
+|* Linienanfang bzw. -ende eines Polygons zeichnen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 20.01.95 ESO
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawFatLine()
+|*
+|* Beschreibung Dicke Linie mit oder ohne Linienstile zeichnen
+|* Ersterstellung 28.11.94
+|* Letzte Aenderung 09.10.95
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawPatternLine()
+|*
+|* Beschreibung Haarlinie mit Linienstil zeichnen
+|* Ersterstellung 13.08.95 ESO
+|* Letzte Aenderung 14.08.95 ESO
+|*
+\************************************************************************/
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawLinePolygon()
+|*
+|* Beschreibung Polygon-Linie (ggf. mit Linienmuster) zeichnen
+|* Ersterstellung 28.11.94
+|* Letzte Aenderung 09.10.95 ESO
+|*
+\************************************************************************/
+
+/*N*/ void XOutputDevice::DrawLinePolygon( const Polygon& rPoly, BOOL bClosePoly )
+/*N*/ {
+/*N*/ if( nLineTransparence )
+/*N*/ {
+/*?*/ GDIMetaFile aMtf;
+/*?*/ VirtualDevice aVDev;
+/*?*/ OutputDevice* pOldOut = pOut;
+/*?*/ MapMode aMap( pOldOut->GetMapMode() );
+/*?*/ const BYTE cTrans = nLineTransparence * 255 / 100;
+/*?*/ const Color aTrans( cTrans, cTrans, cTrans );
+/*?*/ Gradient aTransGradient( GRADIENT_LINEAR, aTrans, aTrans );
+/*?*/
+/*?*/ pOut = &aVDev;
+/*?*/ aVDev.EnableOutput( FALSE );
+/*?*/ aVDev.SetMapMode( pOldOut->GetMapMode() );
+/*?*/ aMtf.Record( &aVDev );
+/*?*/ aVDev.SetLineColor( pOldOut->GetLineColor() );
+/*?*/ aVDev.SetFillColor( pOldOut->GetFillColor() );
+/*?*/ aVDev.SetFont( pOldOut->GetFont() );
+/*?*/ aVDev.SetDrawMode( pOldOut->GetDrawMode() );
+/*?*/ aVDev.SetRefPoint( pOldOut->GetRefPoint() );
+/*?*/ ImpDrawLinePolygon( rPoly, bClosePoly );
+/*?*/ aMtf.Stop();
+/*?*/ pOut = pOldOut;
+/*?*/
+/*?*/ Rectangle aBound;
+/*?*/
+/*?*/ for( MetaAction* pAct = aMtf.FirstAction(); pAct; pAct = aMtf.NextAction() )
+/*?*/ {
+/*?*/ if( pAct->GetType() == META_POLYGON_ACTION )
+/*?*/ aBound.Union( ( (MetaPolygonAction*) pAct )->GetPolygon().GetBoundRect() );
+/*?*/ else if( pAct->GetType() == META_POLYLINE_ACTION )
+/*?*/ aBound.Union( ( (MetaPolyLineAction*) pAct )->GetPolygon().GetBoundRect() );
+/*?*/ else if( pAct->GetType() == META_LINE_ACTION )
+/*?*/ {
+/*?*/ const Point aStart( ( (MetaLineAction*) pAct )->GetStartPoint() );
+/*?*/ const Point aEnd( ( (MetaLineAction*) pAct )->GetEndPoint() );
+/*?*/ aBound.Union( Rectangle( aStart, aEnd ) );
+/*?*/ }
+/*?*/ }
+/*?*/
+/*?*/ if( aMtf.GetActionCount() )
+/*?*/ {
+/*?*/ Size aSizeLog( aBound.GetSize() );
+/*?*/ const Size aMinSizeLog( pOut->PixelToLogic( Size( 1, 1 ) ) );
+/*?*/ const Size aSizePix( pOut->LogicToPixel( aSizeLog ) );
+/*?*/
+/*?*/ // watch for minimum width
+/*?*/ if( !aSizePix.Width() )
+/*?*/ aSizeLog.Width() = aMinSizeLog.Width();
+/*?*/
+/*?*/ // watch for minimum width
+/*?*/ if( !aSizePix.Height() )
+/*?*/ aSizeLog.Height() = aMinSizeLog.Height();
+/*?*/
+/*?*/ aMap.SetOrigin( aBound.TopLeft() );
+/*?*/ aMtf.SetPrefMapMode( aMap );
+/*?*/ aMtf.SetPrefSize( aBound.GetSize() );
+/*?*/ aTransGradient.SetSteps(3);
+/*?*/ pOut->DrawTransparent( aMtf, aBound.TopLeft(), aSizeLog, aTransGradient );
+/*?*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ ImpDrawLinePolygon( rPoly, bClosePoly );
+/*N*/ }
+
+// -----------------------------------------------------------------------------
+
+/*N*/ void XOutputDevice::ImpDrawLinePolygon(const Polygon& rPoly, BOOL bClosePoly)
+/*N*/ {
+/*N*/ Polygon aPoly( rPoly );
+/*N*/ const Point* pNextPoint;
+/*N*/ Point aLineStartPos, aLineEndPos;
+/*N*/ XLineParam aLParam, aStartParam, aEndParam;
+/*N*/ USHORT nPntMax = aPoly.GetSize() - 1;
+/*N*/
+/*N*/ if( nPntMax >= 1 )
+/*N*/ {
+/*N*/ if( bHair || ( ( XLINE_SOLID == eLineStyle ) && ( nLineWidth == 0 ) ) )
+/*N*/ {{DBG_BF_ASSERT(0, "STRIP"); }//STRIP001
+/*N*/ }
+/*N*/ else if( XLINE_NONE != eLineStyle )
+/*N*/ {
+/*?*/ Color aOldLineColor;
+/*?*/ Color aOldFillColor;
+/*?*/ Point aDiff;
+/*?*/ const ULONG nOldDrawMode = pOut->GetDrawMode();
+/*?*/ USHORT i = 0;
+/*?*/
+/*?*/ if( !nLineWidth )
+/*?*/ {
+/*?*/ aOldLineColor = pOut->GetLineColor();
+/*?*/ pOut->SetLineColor( aLineColor );
+/*?*/ }
+/*?*/
+/*?*/ aOldFillColor = pOut->GetFillColor();
+/*?*/
+/*?*/ if( nOldDrawMode & DRAWMODE_WHITEFILL )
+/*?*/ {
+/*?*/ ULONG nNewDrawMode = nOldDrawMode;
+/*?*/
+/*?*/ nNewDrawMode &= ~DRAWMODE_WHITEFILL;
+/*?*/ nNewDrawMode |= DRAWMODE_BLACKFILL;
+/*?*/ pOut->SetDrawMode( nNewDrawMode );
+/*?*/ }
+/*?*/
+/*?*/ if( nOldDrawMode & DRAWMODE_BLACKLINE )
+/*?*/ {
+/*?*/ const Color aBlack( COL_BLACK );
+/*?*/
+/*?*/ pOut->SetDrawMode( pOut->GetDrawMode() & (~DRAWMODE_SETTINGSFILL) );
+/*?*/ pOut->SetFillColor( aBlack );
+/*?*/ }
+/*?*/ else if( nOldDrawMode & DRAWMODE_SETTINGSLINE )
+/*?*/ {
+/*?*/ pOut->SetDrawMode( pOut->GetDrawMode() & (~DRAWMODE_SETTINGSFILL) );
+/*?*/ ColorConfig aColorConfig;
+/*?*/ Color aColor( aColorConfig.GetColorValue( FONTCOLOR ).nColor );
+/*?*/ pOut->SetFillColor( aColor );
+/*?*/ }
+/*?*/ else
+/*?*/ pOut->SetFillColor( aLineColor );
+/*?*/
+/*?*/ // bei einfachen Linien darf das Polygon nicht geschlossen sein (#24000)
+/*?*/ if ( aPoly[ nPntMax ] == aPoly[ 0 ] )
+/*?*/ {
+/*?*/ if ( nPntMax > 2 )
+/*?*/ {
+/*?*/ nPntMax--;
+/*?*/ bClosePoly = TRUE;
+/*?*/ }
+/*?*/ else if ( 2 == nPntMax )
+/*?*/ bClosePoly = FALSE;
+/*?*/ }
+/*?*/
+/*?*/ // Linien mit Laenge 0 nicht beruecksichtigen
+/*?*/ while ( i < nPntMax )
+/*?*/ {
+/*?*/ aDiff = aPoly[i+1] - aPoly[0];
+/*?*/
+/*?*/ if ( bLineStart && !bClosePoly )
+/*?*/ {
+/*?*/ long nSqLen = aDiff.X() * aDiff.X() + aDiff.Y() * aDiff.Y();
+/*?*/ if ( nSqLen > nLineStartSqLen || i == nPntMax-1 )
+/*?*/ {
+/*?*/ aLineStartPos = aPoly[0];
+/*?*/ aStartParam.Init(aPoly[0], aPoly[i+1], 1);
+/*?*/ double fLen = sqrt((double)nLineStartSqLen);
+/*?*/ if ( aStartParam.fLength )
+/*?*/ fLen /= aStartParam.fLength;
+/*?*/ aPoly[i].X() = aPoly[0].X() + (long) (fLen * aStartParam.nLineDx);
+/*?*/ aPoly[i].Y() = aPoly[0].Y() + (long) (fLen * aStartParam.nLineDy);
+/*?*/ break;
+/*?*/ }
+/*?*/ }
+/*?*/ else if ( aDiff.X() || aDiff.Y() )
+/*?*/ break;
+/*?*/ i++;
+/*?*/ }
+/*?*/ USHORT nLastPnt = nPntMax;
+/*?*/
+/*?*/ while ( nPntMax > i )
+/*?*/ {
+/*?*/ aDiff = aPoly[nPntMax-1] - aPoly[nLastPnt];
+/*?*/ if ( bLineEnd && !bClosePoly )
+/*?*/ {
+/*?*/ long nSqLen = aDiff.X() * aDiff.X() + aDiff.Y() * aDiff.Y();
+/*?*/ if ( nSqLen > nLineEndSqLen || nPntMax == i+1 )
+/*?*/ {
+/*?*/ aLineEndPos = aPoly[nLastPnt];
+/*?*/ aEndParam.Init(aPoly[nLastPnt], aPoly[nPntMax-1], 1);
+/*?*/ double fLen = sqrt((double)nLineEndSqLen);
+/*?*/ if ( aEndParam.fLength )
+/*?*/ fLen /= aEndParam.fLength;
+/*?*/ aPoly[nPntMax].X() = aPoly[nLastPnt].X() + (long) (fLen * aEndParam.nLineDx);
+/*?*/ aPoly[nPntMax].Y() = aPoly[nLastPnt].Y() + (long) (fLen * aEndParam.nLineDy);
+/*?*/ break;
+/*?*/ }
+/*?*/ }
+/*?*/ else if ( aDiff.X() || aDiff.Y() )
+/*?*/ break;
+/*?*/ nPntMax--;
+/*?*/ }
+/*?*/
+/*?*/ if ( bClosePoly )
+/*?*/ {
+/*?*/ aDiff = aPoly[nPntMax] - aPoly[i];
+/*?*/ if ( !aDiff.X() && !aDiff.Y() )
+/*?*/ nPntMax--;
+/*?*/ aLParam.Init(aPoly[nPntMax], aPoly[i], nLineWidth);
+/*?*/ if ( nLineWidth > 0 )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 CalcFatLineJoin(aPoly[i], aPoly[i+1], aLParam);
+/*?*/ }
+/*?*/ else
+/*?*/ aLParam.Init(aPoly[i], aPoly[i+1], nLineWidth);
+/*?*/
+/*?*/ while ( i < nPntMax )
+/*?*/ {
+/*?*/ USHORT nPos = i + 1;
+/*?*/ while ( nPos < nPntMax )
+/*?*/ {
+/*?*/ aDiff = aPoly[nPos+1] - aPoly[nPos];
+/*?*/ if ( aDiff.X() || aDiff.Y() )
+/*?*/ break;
+/*?*/ nPos++;
+/*?*/ }
+/*?*/ if ( nPos+1 <= nPntMax ) pNextPoint = &aPoly[nPos+1];
+/*?*/ else if ( bClosePoly ) pNextPoint = &aPoly[0];
+/*?*/ else pNextPoint = NULL;
+/*?*/
+/*?*/ if ( nLineWidth > 0 )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 DrawFatLine(aPoly[i], aPoly[i+1], pNextPoint, aLParam);
+/*?*/ else
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ i = nPos;
+/*?*/ }
+/*?*/ if ( bClosePoly )
+/*?*/ {
+/*?*/ if ( nLineWidth > 0 )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 DrawFatLine(aPoly[i], aPoly[0], &aPoly[1], aLParam);
+/*?*/ else
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*?*/ }
+/*?*/ }
+/*?*/ else
+/*?*/ {
+/*?*/ if ( bLineStart )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 DrawStartEndPoly(aLineStartPos, aLineStartPoly, aStartParam);
+/*?*/ if ( bLineEnd )
+/*?*/ {DBG_BF_ASSERT(0, "STRIP");} //STRIP001 DrawStartEndPoly(aLineEndPos, aLineEndPoly, aEndParam);
+/*?*/ }
+/*?*/
+/*?*/ if( nLineWidth == 0 )
+/*?*/ pOut->SetLineColor( aOldLineColor );
+/*?*/
+/*?*/ pOut->SetFillColor( aOldFillColor );
+/*?*/ pOut->SetDrawMode( nOldDrawMode );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xout.cxx b/binfilter/bf_svx/source/xoutdev/svx_xout.cxx
new file mode 100644
index 000000000000..b00fde2ede84
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xout.cxx
@@ -0,0 +1,809 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <stdlib.h>
+#include <vcl/svapp.hxx>
+#include <bf_svtools/itemset.hxx>
+
+#include <bf_svx/xdef.hxx>
+
+#include "xattr.hxx"
+#include "xoutx.hxx"
+
+#include "xflbckit.hxx"
+#include "xflgrit.hxx"
+#include "xfltrit.hxx"
+#include "xftadit.hxx"
+#include "xftdiit.hxx"
+#include "xftmrit.hxx"
+#include "xftouit.hxx"
+#include "xftsfit.hxx"
+#include "xftshcit.hxx"
+#include "xftshit.hxx"
+#include "xftshtit.hxx"
+#include "xftshxy.hxx"
+#include "xftstit.hxx"
+#include "xgrscit.hxx"
+#include "xlntrit.hxx"
+#include "xtextit0.hxx"
+
+
+namespace binfilter {
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+#define MTF_DIVISOR 2
+
+/*************************************************************************
+|*
+|* XOutputDevice::XOutputDevice()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ XOutputDevice::XOutputDevice(OutputDevice* pOutDev) :
+/*N*/ pImpData ( new ImpData ),
+/*N*/ pLinePattern ( NULL ),
+/*N*/ nLinePatternCnt ( 0 ),
+/*N*/ eLineStyle ( XLINE_SOLID ),
+/*N*/ nLineTransparence ( 0 ),
+/*N*/ nLineWidth ( 0 ),
+/*N*/ aLineStartPoly ( 0 ),
+/*N*/ aLineEndPoly ( 0 ),
+/*N*/ nLineStartSqLen ( 0 ),
+/*N*/ nLineEndSqLen ( 0 ),
+/*N*/ bLineStart ( FALSE ),
+/*N*/ bLineEnd ( FALSE ),
+/*N*/ bHair ( FALSE ),
+/*N*/ eFillStyle ( XFILL_SOLID ),
+/*N*/ nFillTransparence ( 0 ),
+/*N*/ mpFillGraphicObject ( new BfGraphicObject ),
+/*N*/ mnBmpPerCentX ( 0 ),
+/*N*/ mnBmpPerCentY ( 0 ),
+/*N*/ mnBmpOffX ( 0 ),
+/*N*/ mnBmpOffY ( 0 ),
+/*N*/ mnBmpOffPosX ( 0 ),
+/*N*/ mnBmpOffPosY ( 0 ),
+/*N*/ meLastOutDevType ( OUTDEV_WINDOW ),
+/*N*/ meBmpRectPoint ( RP_MM ),
+/*N*/ mbBmpTile ( FALSE ),
+/*N*/ mbBmpStretch ( TRUE ),
+/*N*/ mbBmpLogSize ( FALSE ),
+/*N*/ mbRecalc ( TRUE ),
+/*N*/ aGradient ( COL_BLACK, COL_WHITE ),
+/*N*/ aHatch ( COL_BLACK, XHATCH_SINGLE ),
+/*N*/ bDither ( ( pOutDev ? pOutDev : Application::GetDefaultDevice() )->GetColorCount() <= 256 ),
+/*N*/ bIgnoreLineAttr ( FALSE ),
+/*N*/ bIgnoreLineStyle ( FALSE ),
+/*N*/ bIgnoreFillAttr ( FALSE ),
+/*N*/ eFormTextStyle ( XFT_UPRIGHT ),
+/*N*/ eFormTextAdjust ( XFT_AUTOSIZE ),
+/*N*/ nFormTextDistance ( 0 ),
+/*N*/ nFormTextStart ( 0 ),
+/*N*/ bFormTextMirror ( FALSE ),
+/*N*/ bFormTextOutline ( FALSE ),
+/*N*/ eFormTextShadow ( XFTSHADOW_NONE ),
+/*N*/ aFormTextShdwColor ( COL_LIGHTGRAY ),
+/*N*/ nFormTextShdwTransp ( 0 ),
+/*N*/ nFormTextShdwXVal ( 0 ),
+/*N*/ nFormTextShdwYVal ( 0 ),
+/*N*/ eFormTextStdForm ( XFTFORM_NONE ),
+/*N*/ bFormTextHideForm ( FALSE ),
+/*N*/ nFtAutoHeightSave ( 0 ),
+/*N*/ pOut ( pOutDev )
+/*N*/ {
+/*N*/ iRotTransGradient() = NULL;
+/*N*/ iSolidHatch() = FALSE;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::~XOutputDevice()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ XOutputDevice::~XOutputDevice()
+/*N*/ {
+/*N*/ delete[] pLinePattern;
+/*N*/ delete mpFillGraphicObject;
+/*N*/
+/*N*/ delete iRotTransGradient();
+/*N*/ delete static_cast< ImpData* >( pImpData );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawLine()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 02.02.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawLine( const Point& rStart, const Point& rEnd )
+/*N*/ {
+/*N*/ Polygon aPoly(2);
+/*N*/
+/*N*/ aPoly[0] = rStart;
+/*N*/ aPoly[1] = rEnd;
+/*N*/ DrawLinePolygon( aPoly, FALSE );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawXPolyLine()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 29.11.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawXPolyLine( const XPolygon& rXPoly )
+/*N*/ {
+/*N*/ if ( rXPoly.GetPointCount() > 0 )
+/*N*/ {
+/*N*/ // #100127# Too much hassle below this method
+/*N*/ // const Polygon aPoly( XOutCreatePolygonBezier(rXPoly, pOut) );
+/*N*/ const Polygon aPoly( XOutCreatePolygon(rXPoly, pOut) );
+/*N*/ DrawLinePolygon(aPoly, FALSE);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawRect()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 29.11.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawRect( const Rectangle& rRect, ULONG nXRound,
+/*N*/ ULONG nYRound )
+/*N*/ {
+/*N*/ const Polygon aPoly( rRect, nXRound, nYRound );
+/*N*/
+/*N*/ DrawFillPolyPolygon( aPoly, TRUE );
+/*N*/ DrawLinePolygon( aPoly, TRUE );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawEllipse()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawEllipse( const Rectangle& rRect )
+/*N*/ {
+/*N*/ const Polygon aPoly( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 );
+/*N*/
+/*N*/ DrawFillPolyPolygon( aPoly );
+/*N*/ DrawLinePolygon( aPoly, TRUE );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawArc()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawArc( const Rectangle& rRect, const Point& rStart,
+/*N*/ const Point& rEnd )
+/*N*/ {
+/*N*/ const Polygon aPoly( rRect, rStart, rEnd, POLY_ARC );
+/*N*/
+/*N*/ DrawFillPolyPolygon( aPoly );
+/*N*/ DrawLinePolygon( aPoly, TRUE );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawPie()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawPie( const Rectangle& rRect, const Point& rStart,
+/*N*/ const Point& rEnd )
+/*N*/ {
+/*N*/ const Polygon aPoly( rRect, rStart, rEnd, POLY_PIE );
+/*N*/
+/*N*/ DrawFillPolyPolygon( aPoly );
+/*N*/ DrawLinePolygon( aPoly, TRUE );
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawXPolygon()
+|*
+|* Beschreibung Polygon mit Linien- und Fuellstilen zeichnen
+|* Ersterstellung 28.11.94 ESO
+|* Letzte Aenderung 29.11.94 ESO
+|*
+\************************************************************************/
+
+/*N*/ void XOutputDevice::DrawXPolygon(const XPolygon& rXPoly)
+/*N*/ {
+/*N*/ if ( rXPoly.GetPointCount() > 0 )
+/*N*/ {
+/*N*/ // #100127# Too much hassle below this method
+/*N*/ // const Polygon aPoly( XOutCreatePolygonBezier(rXPoly, pOut) );
+/*N*/ const Polygon aPoly( XOutCreatePolygon(rXPoly, pOut) );
+/*N*/
+/*N*/ DrawFillPolyPolygon( aPoly );
+/*N*/ DrawLinePolygon(aPoly, TRUE);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::DrawXPolyPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 29.11.94 ESO
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::DrawXPolyPolygon( const XPolyPolygon& rXPolyPoly )
+/*N*/ {
+/*N*/ PolyPolygon aPolyPoly;
+/*N*/
+/*N*/ USHORT nCount = rXPolyPoly.Count(), i;
+/*N*/
+/*N*/ for( i = 0; i < nCount; i++ )
+/*N*/ {
+/*N*/ if( rXPolyPoly[i].GetPointCount() > 0 )
+/*N*/ {
+/*N*/ // #100127# Too much hassle below this method
+/*N*/ // aPolyPoly.Insert(XOutCreatePolygonBezier(rXPolyPoly[i], pOut));
+/*N*/ aPolyPoly.Insert(XOutCreatePolygon(rXPolyPoly[i], pOut));
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ DrawFillPolyPolygon( aPolyPoly );
+/*N*/
+/*N*/ if( eLineStyle != XLINE_NONE )
+/*N*/ {
+/*N*/ nCount = aPolyPoly.Count();
+/*N*/
+/*N*/ for (i = 0; i < nCount; i++ )
+/*N*/ DrawLinePolygon(aPolyPoly.GetObject(i), TRUE);
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::InitLineStartEnd()
+|*
+|* Polygon fuer Linienanfang bzw. -ende initialisieren; gibt die
+|* Entfernung vom Polygon-Fixpunkt zum Linienansatz zurueck
+|* Ersterstellung 16.01.95 ESO
+|* Letzte Aenderung 28.07.95 SOH
+|*
+\************************************************************************/
+
+/*N*/ long XOutputDevice::InitLineStartEnd(XPolygon& rXPoly, long nNewWidth,
+/*N*/ BOOL bCenter)
+/*N*/ {
+/*N*/ Point aTranslation;
+/*N*/ const Rectangle aRect(rXPoly.GetBoundRect());
+/*N*/ const long nWidth = Max( (long)(aRect.GetWidth() - 1), 1L );
+/*N*/
+/*N*/ if ( bCenter )
+/*N*/ aTranslation = aRect.Center();
+/*N*/ else
+/*N*/ aTranslation = aRect.TopCenter();
+/*N*/
+/*N*/ // Punkte verschieben und Skalieren
+/*N*/ for (USHORT i = 0; i < rXPoly.GetPointCount(); i++)
+/*N*/ rXPoly[i] = (rXPoly[i] - aTranslation) * nNewWidth / nWidth;
+/*N*/
+/*N*/ long nHeight = aRect.GetHeight() * nNewWidth / nWidth;
+/*N*/
+/*N*/ if ( bCenter )
+/*N*/ nHeight >>= 1;
+/*N*/
+/*N*/ return nHeight;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::SetLineAttr()
+|*
+|* Linienattribute aus ItemSet auslesen und am OutputDevice setzen
+|* Ersterstellung 17.11.94 ESO
+|* Letzte Aenderung 09.10.95 ESO
+|*
+\************************************************************************/
+
+//-/void XOutputDevice::SetLineAttr(const XLineAttrSetItem& rAttr)
+/*N*/ void XOutputDevice::SetLineAttr(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ //-/ const SfxItemSet& rSet = rAttr.GetItemSet();
+/*N*/ const BOOL bPureMtf = ( pOut->GetOutDevType() != OUTDEV_PRINTER ) && ( pOut->GetConnectMetaFile() != NULL );
+/*N*/
+/*N*/ aLineColor = ITEMVALUE( rSet, XATTR_LINECOLOR, XLineColorItem );
+/*N*/ nLineTransparence = ITEMVALUE( rSet, XATTR_LINETRANSPARENCE, XLineTransparenceItem );
+/*N*/
+/*N*/ delete[] pLinePattern;
+/*N*/ pLinePattern = NULL;
+/*N*/ bLineStart = FALSE;
+/*N*/ bLineEnd = FALSE;
+/*N*/ bHair = TRUE;
+/*N*/ nLineWidth = ITEMVALUE( rSet, XATTR_LINEWIDTH, XLineWidthItem );
+/*N*/
+/*N*/ if( bIgnoreLineAttr )
+/*N*/ {
+/*N*/ // fuer Linien mit Staerke Null wird im "Nur Haarlinienmodus" ein Hellgrau-Pen benutzt
+/*N*/ if( nLineWidth == 0 )
+/*N*/ pOut->SetLineColor( COL_LIGHTGRAY );
+/*N*/ else
+/*N*/ {
+/*N*/ nLineWidth = 0;
+/*N*/ pOut->SetLineColor( aLineColor );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ long nMinLineWidth = Max( nLineWidth, pOut->PixelToLogic( Size( 2, 2 ) ) .Width() );
+/*N*/
+/*N*/ eLineStyle = ITEMVALUE( rSet, XATTR_LINESTYLE, XLineStyleItem );
+/*N*/
+/*N*/ // Falls wir Linienstil ignorieren, setzen wir Linienstil auf Solid
+/*N*/ if ( bIgnoreLineStyle )
+/*N*/ {
+/*N*/ eLineStyle = XLINE_SOLID;
+/*N*/ pOut->SetLineColor( COL_BLACK );
+/*N*/ }
+/*N*/
+/*N*/ // bei reinen Metafiles auch sehr duenne Linien als Polygone ausgeben,
+/*N*/ // damit wir hier eine hoehere Genauigkeit wegen der Systemunabhaegigkeit erreichen
+/*N*/ // SB: aber nicht, wenn gedruckt wird (dabei wird immer ein Metafile aufgezeichnet)
+/*N*/ if ( bPureMtf )
+/*N*/ nMinLineWidth /= MTF_DIVISOR;
+/*N*/
+/*N*/ if ( eLineStyle == XLINE_DASH )
+/*N*/ {
+/*N*/ USHORT i, nCnt, nDotCnt;
+/*N*/ long nDotLen, nDashLen, nDistance;
+/*N*/ long nMinLength = nMinLineWidth;
+/*N*/
+/*N*/ const XDash& rDash = ITEMVALUE( rSet, XATTR_LINEDASH, XLineDashItem );
+/*N*/
+/*N*/ // Sonderbehandlung fuer Haarlinien
+/*N*/ if ( nLineWidth < nMinLineWidth )
+/*N*/ nMinLength = 30;
+/*N*/
+/*N*/ nDotCnt = rDash.GetDots() << 1;
+/*N*/ nLinePatternCnt = nDotCnt + ( rDash.GetDashes() << 1 ) + 1;
+/*N*/ pLinePattern = new long[nLinePatternCnt];
+/*N*/ nCnt = 0;
+/*N*/ nDotLen = rDash.GetDotLen();
+/*N*/ nDashLen = rDash.GetDashLen();
+/*N*/ nDistance = rDash.GetDistance();
+/*N*/
+/*N*/ if ( rDash.GetDashStyle() == XDASH_RECTRELATIVE || rDash.GetDashStyle() == XDASH_ROUNDRELATIVE )
+/*N*/ {
+/*N*/ // Der Teilungsfaktor ist abhaengig davon,
+/*N*/ // ob wir uns in einer reinen Mtf-Aufzeichnung
+/*N*/ // befinden oder nicht. Wenn ja, muessen
+/*N*/ // wir dieses bei der Laengenberechn. beruecks.,
+/*N*/ // um gleiche Ergebnisse zu bekommen; die hoehere
+/*N*/ // Genauigkeit im Mtf bezieht sich nur auf die Breite
+/*N*/ // (KA 29.09.96)
+/*N*/ const long nFactor = nMinLength * ( bPureMtf ? MTF_DIVISOR : 1 );
+/*N*/
+/*N*/ nDotLen = nDotLen * nFactor / 100;
+/*N*/ nDashLen = nDashLen * nFactor / 100;
+/*N*/ nDistance = nDistance * nFactor / 100;
+/*N*/ }
+/*N*/
+/*N*/ if ( nDotLen == 0 )
+/*N*/ nDotLen = nMinLength;
+/*N*/ if ( nDashLen == 0 )
+/*N*/ nDashLen = nMinLength;
+/*N*/
+/*N*/ for (i = 0; i < nDotCnt; i += 2)
+/*N*/ {
+/*N*/ if ( nDotLen )
+/*N*/ {
+/*N*/ pLinePattern[nCnt++] = nDotLen;
+/*N*/ pLinePattern[nCnt++] = nDistance;
+/*N*/ }
+/*N*/ }
+/*N*/ for ( ; i < nLinePatternCnt - 1; i += 2)
+/*N*/ {
+/*N*/ if ( nDashLen )
+/*N*/ {
+/*N*/ pLinePattern[nCnt++] = nDashLen;
+/*N*/ pLinePattern[nCnt++] = nDistance;
+/*N*/ }
+/*N*/ }
+/*N*/ if ( !nCnt )
+/*N*/ {
+/*N*/ eLineStyle = XLINE_SOLID;
+/*N*/ delete pLinePattern;
+/*N*/ pLinePattern = NULL;
+/*N*/ }
+/*N*/ else
+/*N*/ pLinePattern[nCnt] = 0;
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ if ( nLineWidth < nMinLineWidth && eLineStyle == XLINE_SOLID )
+/*N*/ {
+/*N*/ nLineWidth = 0;
+/*N*/ pOut->SetLineColor( aLineColor );
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ bHair = FALSE;
+/*N*/ pOut->SetLineColor();
+/*N*/
+/*N*/ if( nLineWidth < nMinLineWidth )
+/*N*/ nLineWidth = 0;
+/*N*/ }
+/*N*/ const SfxPoolItem* pPoolItem;
+/*N*/
+/*N*/ // Polygon und Daten fuer Linienanfang und -ende initialisieren
+/*N*/ if ( rSet.GetItemState(XATTR_LINESTART, TRUE, &pPoolItem) == SFX_ITEM_SET )
+/*N*/ {
+/*N*/ long nWidth = ITEMVALUE( rSet, XATTR_LINESTARTWIDTH, XLineStartWidthItem );
+/*N*/
+/*N*/ aLineStartPoly = ((XLineStartItem*) pPoolItem)->GetValue();
+/*N*/
+/*N*/ // Nur aktivieren, wenn Polygonbreite > 0
+/*N*/ if ( nWidth )
+/*N*/ {
+/*N*/ // Breite negativ: Prozentwert
+/*N*/ if ( nWidth < 0 )
+/*N*/ {
+/*N*/ nWidth = - nMinLineWidth * nWidth / 100;
+/*N*/ if ( nWidth == 0 ) nWidth = nMinLineWidth;
+/*N*/ }
+/*N*/ BOOL bCenter = ITEMVALUE( rSet, XATTR_LINESTARTCENTER, XLineStartCenterItem );
+/*N*/ nLineStartSqLen = InitLineStartEnd(aLineStartPoly, nWidth, bCenter);
+/*N*/ // 4/5, um Ueberschneidung zu Gewaehrleisten
+/*N*/ nLineStartSqLen = nLineStartSqLen * 4 / 5;
+/*N*/ nLineStartSqLen = nLineStartSqLen * nLineStartSqLen;
+/*N*/ bLineStart = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ if ( rSet.GetItemState(XATTR_LINEEND, TRUE, &pPoolItem) == SFX_ITEM_SET )
+/*N*/ {
+/*N*/ long nWidth = ITEMVALUE( rSet, XATTR_LINEENDWIDTH, XLineEndWidthItem );
+/*N*/
+/*N*/ aLineEndPoly = ((XLineStartItem*) pPoolItem)->GetValue();
+/*N*/
+/*N*/ if ( nWidth )
+/*N*/ {
+/*N*/ // Breite negativ: Prozentwert
+/*N*/ if ( nWidth < 0 )
+/*N*/ {
+/*N*/ nWidth = - nMinLineWidth * nWidth / 100;
+/*N*/ if ( nWidth == 0 ) nWidth = nMinLineWidth;
+/*N*/ }
+/*N*/ BOOL bCenter = ITEMVALUE( rSet, XATTR_LINEENDCENTER, XLineEndCenterItem );
+/*N*/ nLineEndSqLen = InitLineStartEnd(aLineEndPoly, nWidth, bCenter);
+/*N*/ nLineEndSqLen = nLineEndSqLen * 4 / 5;
+/*N*/ nLineEndSqLen = nLineEndSqLen * nLineEndSqLen;
+/*N*/ bLineEnd = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::SetFillAttr()
+|*
+|* Fuellattribute aus ItemSet auslesen und am OutputDevice setzen
+|* Ersterstellung 17.11.94 ESO
+|* Letzte Aenderung 26.06.95 ESO
+|*
+\************************************************************************/
+
+//-/void XOutputDevice::SetFillAttr(const XFillAttrSetItem& rAttr)
+/*N*/ void XOutputDevice::SetFillAttr(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ //-/ const SfxItemSet& rSet = rAttr.GetItemSet();
+/*N*/ const XFillFloatTransparenceItem& rFloatTransItem = (const XFillFloatTransparenceItem&) rSet.Get( XATTR_FILLFLOATTRANSPARENCE );
+/*N*/
+/*N*/ eFillStyle = bIgnoreFillAttr ? XFILL_NONE : ITEMVALUE( rSet, XATTR_FILLSTYLE, XFillStyleItem );
+/*N*/ nFillTransparence = ITEMVALUE( rSet, XATTR_FILLTRANSPARENCE, XFillTransparenceItem );
+/*N*/
+/*N*/ // clear bitmap
+/*N*/ if( eFillStyle != XFILL_BITMAP )
+/*N*/ {
+/*N*/ maFillBitmap.SetEmpty();
+/*N*/ maFillBitmapSize.Width() = maFillBitmapSize.Height() = 0L;
+/*N*/ }
+/*N*/
+/*N*/ // assign transparent gradient?
+/*N*/ if( ( eFillStyle != XFILL_NONE ) && ( rFloatTransItem.IsEnabled() || nFillTransparence ) )
+/*N*/ {
+/*N*/ XGradient aXGrad;
+/*N*/
+/*N*/ if( rFloatTransItem.IsEnabled() )
+/*N*/ aXGrad = rFloatTransItem.GetValue();
+/*N*/ else
+/*N*/ {
+/*N*/ const BYTE cTrans = (BYTE) ( nFillTransparence * 255 / 100 );
+/*N*/ const Color aTransCol( cTrans, cTrans, cTrans );
+/*N*/
+/*N*/ aXGrad.SetGradientStyle( XGRAD_LINEAR );
+/*N*/ aXGrad.SetStartColor( aTransCol );
+/*N*/ aXGrad.SetEndColor( aTransCol );
+/*N*/ aXGrad.SetAngle( 0 );
+/*N*/ aXGrad.SetBorder( 0 );
+/*N*/ aXGrad.SetXOffset( 0 );
+/*N*/ aXGrad.SetYOffset( 0 );
+/*N*/ aXGrad.SetStartIntens( 100 );
+/*N*/ aXGrad.SetEndIntens( 100 );
+/*N*/ aXGrad.SetSteps( 3 );
+/*N*/ }
+/*N*/
+/*N*/ if( iRotTransGradient() )
+/*N*/ *iRotTransGradient() = aXGrad;
+/*N*/ else
+/*N*/ iRotTransGradient() = new XGradient( aXGrad );
+/*N*/ }
+/*N*/ else if( iRotTransGradient() )
+/*N*/ {
+/*N*/ delete iRotTransGradient();
+/*N*/ iRotTransGradient() = NULL;
+/*N*/ }
+/*N*/
+/*N*/ if( eFillStyle != XFILL_NONE )
+/*N*/ {
+/*N*/ pOut->SetFillColor( aFillColor = ITEMVALUE( rSet, XATTR_FILLCOLOR, XFillColorItem ) );
+/*N*/
+/*N*/ if( eFillStyle == XFILL_BITMAP )
+/*N*/ {
+/*N*/ MapMode aMapMode( pOut->GetMapMode() );
+/*N*/ Bitmap aBmp( ITEMVALUE( rSet, XATTR_FILLBITMAP, XFillBitmapItem ).GetBitmap() );
+/*N*/ USHORT nOffX = ITEMVALUE( rSet, XATTR_FILLBMP_TILEOFFSETX, SfxUInt16Item );
+/*N*/ USHORT nOffY = ITEMVALUE( rSet, XATTR_FILLBMP_TILEOFFSETY, SfxUInt16Item );
+/*N*/ USHORT nOffPosX = ITEMVALUE( rSet, XATTR_FILLBMP_POSOFFSETX, SfxUInt16Item );
+/*N*/ USHORT nOffPosY = ITEMVALUE( rSet, XATTR_FILLBMP_POSOFFSETY, SfxUInt16Item );
+/*N*/ RECT_POINT eRectPoint = (RECT_POINT) ITEMVALUE( rSet, XATTR_FILLBMP_POS, SfxEnumItem );
+/*N*/ BOOL bTile = ITEMVALUE( rSet, XATTR_FILLBMP_TILE, SfxBoolItem );
+/*N*/ BOOL bStretch = ITEMVALUE( rSet, XATTR_FILLBMP_STRETCH, SfxBoolItem );
+/*N*/ BOOL bLogSize = ITEMVALUE( rSet, XATTR_FILLBMP_SIZELOG, SfxBoolItem );
+/*N*/ Size aSize( labs( ITEMVALUE( rSet, XATTR_FILLBMP_SIZEX, SfxMetricItem ) ),
+/*N*/ labs( ITEMVALUE( rSet, XATTR_FILLBMP_SIZEY, SfxMetricItem ) ) );
+/*N*/
+/*N*/ if( !mbRecalc && !pOut->GetConnectMetaFile() &&
+/*N*/ ( aBmp == maFillBitmap ) &&
+/*N*/ ( pOut->GetOutDevType() == meLastOutDevType ) &&
+/*N*/ ( maLastMapMode.GetMapUnit() == aMapMode.GetMapUnit() ) &&
+/*N*/ ( maLastMapMode.GetScaleX() == aMapMode.GetScaleX() ) &&
+/*N*/ ( maLastMapMode.GetScaleY() == aMapMode.GetScaleY() ) &&
+/*N*/ ( bTile == mbBmpTile ) &&
+/*N*/ ( bStretch == mbBmpStretch ) &&
+/*N*/ ( bLogSize == mbBmpLogSize ) &&
+/*N*/ ( aSize == maBmpSize ) &&
+/*N*/ ( eRectPoint == meBmpRectPoint ) &&
+/*N*/ ( nOffX == mnBmpOffX ) &&
+/*N*/ ( nOffY == mnBmpOffY ) &&
+/*N*/ ( nOffPosX == mnBmpOffPosX ) &&
+/*N*/ ( nOffPosY == mnBmpOffPosY ) )
+/*N*/ {
+/*N*/ return;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*N*/ maFillBitmap = aBmp;
+/*N*/ maLastMapMode = aMapMode;
+/*N*/ meLastOutDevType = pOut->GetOutDevType();
+/*N*/
+/*N*/ mbBmpTile = bTile;
+/*N*/ mbBmpStretch = bStretch;
+/*N*/ mbBmpLogSize = bLogSize;
+/*N*/ mnBmpOffX = nOffX;
+/*N*/ mnBmpOffY = nOffY;
+/*N*/ meBmpRectPoint = eRectPoint;
+/*N*/ mnBmpOffPosX = nOffPosX;
+/*N*/ mnBmpOffPosY = nOffPosY;
+/*N*/
+/*N*/ if( bLogSize )
+/*N*/ maBmpSize = aSize;
+/*N*/ else
+/*N*/ {
+/*N*/ mnBmpPerCentX = (USHORT) aSize.Width();
+/*N*/ mnBmpPerCentY = (USHORT) aSize.Height();
+/*N*/ }
+/*N*/
+/*N*/ mbRecalc = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/ else if (eFillStyle == XFILL_GRADIENT)
+/*N*/ {
+/*N*/ aGradient = ITEMVALUE( rSet, XATTR_FILLGRADIENT, XFillGradientItem );
+/*N*/ aGradient.SetSteps( ITEMVALUE( rSet, XATTR_GRADIENTSTEPCOUNT, XGradientStepCountItem ) );
+/*N*/ }
+/*N*/ else if( eFillStyle == XFILL_HATCH )
+/*N*/ {
+/*N*/ iSolidHatch() = ITEMVALUE( rSet, XATTR_FILLBACKGROUND, XFillBackgroundItem );
+/*N*/ aHatch = ITEMVALUE( rSet, XATTR_FILLHATCH, XFillHatchItem );
+/*N*/ }
+/*N*/ }
+/*N*/ else
+/*N*/ pOut->SetFillColor();
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* XOutputDevice::SetTextAttr()
+|*
+|* Textattribute aus ItemSet auslesen und am OutputDevice setzen
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+\************************************************************************/
+
+//-/void XOutputDevice::SetTextAttr(const XTextAttrSetItem& rAttr)
+/*N*/ void XOutputDevice::SetTextAttr(const SfxItemSet& rSet)
+/*N*/ {
+/*N*/ //-/ const SfxItemSet& rSet = rAttr.GetItemSet();
+/*N*/
+/*N*/ eFormTextStyle = ITEMVALUE( rSet, XATTR_FORMTXTSTYLE, XFormTextStyleItem );
+/*N*/ eFormTextAdjust = ITEMVALUE( rSet, XATTR_FORMTXTADJUST, XFormTextAdjustItem );
+/*N*/ nFormTextDistance = ITEMVALUE( rSet, XATTR_FORMTXTDISTANCE, XFormTextDistanceItem );
+/*N*/ nFormTextStart = ITEMVALUE( rSet, XATTR_FORMTXTSTART, XFormTextStartItem );
+/*N*/ bFormTextMirror = ITEMVALUE( rSet, XATTR_FORMTXTMIRROR, XFormTextMirrorItem );
+/*N*/
+/*N*/ // Neu ab 27.06.95 ESO
+/*N*/ bFormTextOutline = ITEMVALUE( rSet, XATTR_FORMTXTOUTLINE, XFormTextOutlineItem );
+/*N*/ eFormTextShadow = ITEMVALUE( rSet, XATTR_FORMTXTSHADOW, XFormTextShadowItem );
+/*N*/ aFormTextShdwColor = ITEMVALUE( rSet, XATTR_FORMTXTSHDWCOLOR, XFormTextShadowColorItem );
+/*N*/
+/*N*/ // Neu ab 09.11.95 KA
+/*N*/ nFormTextShdwTransp = ITEMVALUE( rSet, XATTR_FORMTXTSHDWTRANSP, XFormTextShadowTranspItem );
+/*N*/ nFormTextShdwXVal = ITEMVALUE( rSet, XATTR_FORMTXTSHDWXVAL, XFormTextShadowXValItem );
+/*N*/ nFormTextShdwYVal = ITEMVALUE( rSet, XATTR_FORMTXTSHDWYVAL, XFormTextShadowYValItem );
+/*N*/ eFormTextStdForm = ITEMVALUE( rSet, XATTR_FORMTXTSTDFORM, XFormTextStdFormItem );
+/*N*/ bFormTextHideForm = ITEMVALUE( rSet, XATTR_FORMTXTHIDEFORM, XFormTextHideFormItem );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::OverridePen()
+|*
+|* StarView-Pen temporaer ueberschreiben, wenn SetLineAttr zu
+|* zeitkritisch ist. !ACHTUNG! Vor weiteren XOut-Ausgaben muessen
+|* die Attribute mit SetLineAttr neu gesetzt werden
+|* Ersterstellung 26.06.95 ESO
+|* Letzte Aenderung 26.06.95 ESO
+|*
+\************************************************************************/
+
+//#ifndef NOOLDSV
+//
+///*N*/ void XOutputDevice::OverridePen(const Pen& rPen)
+///*N*/ {
+///*N*/ nLineWidth = 0;
+///*N*/ bHair = TRUE;
+///*N*/ bLineStart = FALSE;
+///*N*/ bLineEnd = FALSE;
+///*N*/ eLineStyle = ( rPen.GetStyle() == PEN_NULL ) ? XLINE_NONE : XLINE_SOLID;
+///*N*/ pOut->SetLineColor( rPen.GetColor() );
+///*N*/ }
+//
+//#endif
+
+/*************************************************************************
+|*
+|* XOutputDevice::OverrideFillInBrush()
+|*
+|* StarView-Brush temporaer ueberschreiben, wenn SetFillAttr zu
+|* zeitkritisch ist. !ACHTUNG! Vor weiteren XOut-Ausgaben muessen
+|* die Attribute mit SetFillAttr neu gesetzt werden
+|* Ersterstellung 26.06.95 ESO
+|* Letzte Aenderung 26.06.95 ESO
+|*
+\************************************************************************/
+
+//#ifndef NOOLDSV
+//
+///*N*/ void XOutputDevice::OverrideFillInBrush( const Brush& rBrush )
+///*N*/ {
+///*N*/ eFillStyle = ( rBrush.GetStyle() == BRUSH_NULL ) ? XFILL_NONE : XFILL_SOLID;
+///*N*/ pOut->SetFillColor( rBrush.GetColor() );
+///*N*/ }
+//
+//#endif
+
+/*************************************************************************
+|*
+|* XOutputDevice:OverrideLineColor()
+|*
+|* StarView-Linecolor temporaer ueberschreiben, wenn SetLineAttr zu
+|* zeitkritisch ist. !ACHTUNG! Vor weiteren XOut-Ausgaben muessen
+|* die Attribute mit SetLineAttr neu gesetzt werden
+|* Ersterstellung 26.06.95 ESO
+|* Letzte Aenderung 26.06.95 ESO
+|*
+\************************************************************************/
+
+/*N*/ void XOutputDevice::OverrideLineColor(const Color& rColor )
+/*N*/ {
+/*N*/ nLineWidth = 0;
+/*N*/ bHair = TRUE;
+/*N*/ bLineStart = FALSE;
+/*N*/ bLineEnd = FALSE;
+/*N*/ eLineStyle = ( rColor.GetColor() == COL_TRANSPARENT ) ? XLINE_NONE : XLINE_SOLID;
+/*N*/ pOut->SetLineColor( rColor );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XOutputDevice::OverrideFillColor()
+|*
+|* StarView-Brush temporaer ueberschreiben, wenn SetFillAttr zu
+|* zeitkritisch ist. !ACHTUNG! Vor weiteren XOut-Ausgaben muessen
+|* die Attribute mit SetFillAttr neu gesetzt werden
+|* Ersterstellung 26.06.95 ESO
+|* Letzte Aenderung 26.06.95 ESO
+|*
+\************************************************************************/
+
+/*N*/ void XOutputDevice::OverrideFillColor( const Color& rColor )
+/*N*/ {
+/*N*/ eFillStyle = ( rColor.GetColor() == COL_TRANSPARENT ) ? XFILL_NONE : XFILL_SOLID;
+/*N*/ pOut->SetFillColor( rColor );
+/*N*/ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xout1.cxx b/binfilter/bf_svx/source/xoutdev/svx_xout1.cxx
new file mode 100644
index 000000000000..fc4a538f1553
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xout1.cxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "xoutx.hxx"
+
+#ifdef JOEDEBUG
+#endif
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+/*************************************************************************
+|*
+|* XOutputDevice::SetOffset()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+/*N*/ void XOutputDevice::SetOffset( const Point& rOfs )
+/*N*/ {
+/*N*/ if (rOfs!=aOfs)
+/*N*/ {
+/*N*/ Point aDelta(rOfs);
+/*N*/ Fraction aFact1(1,1);
+/*N*/ aDelta-=aOfs;
+/*N*/ #ifdef neeJOEDEBUG
+/*N*/ DebWrite("XOutputDevice::SetOffset(");
+/*N*/ DebOut(rOfs);
+/*N*/ DebWrite("Alter Offset: ");
+/*N*/ DebOut(aOfs);
+/*N*/ DebWrite("Alter Origin: ");
+/*N*/ DebOut(pOut->GetMapMode().GetOrigin());
+/*N*/ DebWrite("Delta: ");
+/*N*/ DebOut(aDelta);
+/*N*/ #endif
+//#ifdef JOEDEBUG
+//// pOut->SetMapMode(MapMode(MAP_RELATIVE,Point(-aOfs.X(),-aOfs.Y()),aFact1,aFact1));
+//// pOut->SetMapMode(MapMode(MAP_RELATIVE,rOfs,aFact1,aFact1));
+/*N*/ pOut->SetMapMode(MapMode(MAP_RELATIVE,aDelta,aFact1,aFact1));
+//#else
+// MapMode aMap(pOut->GetMapMode());
+// Point aOrg(aMap.GetOrigin());
+// aOrg.X()+=aDelta.X();
+// aOrg.Y()+=aDelta.Y();
+// aMap.SetOrigin(aOrg);
+// pOut->SetMapMode(aMap);
+//#endif
+/*N*/ aOfs=rOfs;
+/*N*/ #ifdef neeJOEDEBUG
+/*N*/ DebWrite("Neuer Offset: ");
+/*N*/ DebOut(aOfs);
+/*N*/ DebWrite("Neuer Origin: ");
+/*N*/ DebOut(pOut->GetMapMode().GetOrigin());
+/*N*/ #endif
+/*N*/ }
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xpool.cxx b/binfilter/bf_svx/source/xoutdev/svx_xpool.cxx
new file mode 100644
index 000000000000..b937af50f9f9
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xpool.cxx
@@ -0,0 +1,387 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "xtable.hxx"
+
+#include <bf_svx/xdef.hxx>
+
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "svdattr.hxx"
+#include "svxids.hrc"
+
+#include "rectenum.hxx"
+
+#include "xflbckit.hxx"
+#include "xflbmpit.hxx"
+#include "xflbmsli.hxx"
+#include "xflbmsxy.hxx"
+#include "xflbmtit.hxx"
+#include "xflboxy.hxx"
+#include "xflbstit.hxx"
+#include "xflbtoxy.hxx"
+#include "xfltrit.hxx"
+#include "xftadit.hxx"
+#include "xftdiit.hxx"
+#include "xftmrit.hxx"
+#include "xftouit.hxx"
+#include "xftsfit.hxx"
+#include "xftshcit.hxx"
+#include "xftshit.hxx"
+#include "xftshtit.hxx"
+#include "xftshxy.hxx"
+#include "xftstit.hxx"
+#include "xgrscit.hxx"
+#include "xlntrit.hxx"
+#include "xtxasit.hxx"
+
+
+namespace binfilter {
+
+#define GLOBALOVERFLOW3
+
+static USHORT nVersion1Map[40];
+static USHORT nVersion2Map[66];
+static USHORT nVersion3Map[124];
+static USHORT nVersion4Map[141];
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+
+/*N*/ XOutdevItemPool::XOutdevItemPool(USHORT nAttrStart, USHORT nAttrEnd, FASTBOOL bLoadRefCounts):
+/*N*/ SfxItemPool(String("XOutdevItemPool", gsl_getSystemTextEncoding()), nAttrStart, nAttrEnd, NULL, NULL, bLoadRefCounts)
+/*N*/ {
+/*N*/ Ctor(NULL,nAttrStart,nAttrEnd);
+/*N*/ }
+
+
+/*N*/ XOutdevItemPool::XOutdevItemPool(SfxItemPool* pMaster, USHORT nAttrStart, USHORT nAttrEnd, FASTBOOL bLoadRefCounts):
+/*N*/ SfxItemPool(String("XOutdevItemPool", gsl_getSystemTextEncoding()), nAttrStart, nAttrEnd, NULL, NULL, bLoadRefCounts)
+/*N*/ {
+/*N*/ Ctor(pMaster,nAttrStart,nAttrEnd);
+/*N*/ }
+
+
+/*N*/ void XOutdevItemPool::Ctor(SfxItemPool* pMaster, USHORT nAttrStart, USHORT nAttrEnd)
+/*N*/ {
+/*N*/ // Mich als Secondary an den MasterPool (Joe)
+/*N*/ if (pMaster==NULL) {
+/*N*/ pMaster=this;
+/*N*/ } else {
+/*N*/ // Ich ganz hinten dran
+/*N*/ SfxItemPool* pParent=pMaster;
+/*N*/ while (pParent->GetSecondaryPool()!=NULL) {
+/*?*/ pParent=pParent->GetSecondaryPool();
+/*N*/ }
+/*N*/ pParent->SetSecondaryPool(this);
+/*N*/ }
+/*N*/
+/*N*/ SfxItemSet* pSet;
+/*N*/
+/*N*/ nStart=nAttrStart;
+/*N*/ nEnd =nAttrEnd;
+/*N*/ ppPoolDefaults = new SfxPoolItem* [nEnd-nStart+1];
+/*N*/
+/*N*/ USHORT i;
+/*N*/
+/*N*/ // Am 27-06-1995 hat Elmar 13 neue Whiches fuer XATTR_FORMTXT bei Which 1021
+/*N*/ // eingebaut.
+/*N*/ // Alles was zu diesem Zeitpunkt >1021 war verschiebt sich also um
+/*N*/ // 13 Positionen nach hinten.
+/*N*/ // Alles was davor liegt (11 LineItems, 6 FillItems, 5 von 6 FormTextItems)
+/*N*/ // behaelt seine WhichId.
+/*N*/
+/*N*/ for (i=1000; i<=1021; i++) {
+/*N*/ nVersion1Map[i-1000]=i;
+/*N*/ }
+/*N*/ for (i=1022; i<=1039; i++) {
+/*N*/ nVersion1Map[i-1000]=i+13;
+/*N*/ }
+/*N*/ SetVersionMap(1,1000,1039,nVersion1Map);
+/*N*/
+/*N*/ // Am 09-11-1995 haben dann wiederum Kai Ahrens 14 und Joe 44 (also beide
+/*N*/ // insgesamt 58) neue Whiches an verschiedenen Stellen spendiert (siehe
+/*N*/ // auch die Beschreibung in svx\inc\SvdAttr.HXX).
+/*N*/
+/*N*/ for (i=1000; i<=1009; i++) { // XOut
+/*N*/ nVersion2Map[i-1000]=i;
+/*N*/ }
+/*N*/ for (i=1010; i<=1015; i++) { // XOut
+/*N*/ nVersion2Map[i-1000]=i+7;
+/*N*/ }
+/*N*/ for (i=1016; i<=1035; i++) { // XOut
+/*N*/ nVersion2Map[i-1000]=i+14;
+/*N*/ }
+/*N*/ for (i=1036; i<=1039; i++) { // SvDraw
+/*N*/ nVersion2Map[i-1000]=i+14;
+/*N*/ }
+/*N*/ for (i=1040; i<=1050; i++) { // SvDraw
+/*N*/ nVersion2Map[i-1000]=i+22;
+/*N*/ }
+/*N*/ for (i=1051; i<=1056; i++) { // SvDraw
+/*N*/ nVersion2Map[i-1000]=i+27;
+/*N*/ }
+/*N*/ for (i=1057; i<=1065; i++) { // SvDraw
+/*N*/ nVersion2Map[i-1000]=i+52;
+/*N*/ }
+/*N*/ SetVersionMap(2,1000,1065,nVersion2Map);
+/*N*/
+/*N*/
+/*N*/ // Am 29-02-1996 hat KA 17 neue Whiches
+/*N*/ // fuer das XOut spendiert
+/*N*/
+/*N*/ for (i=1000; i<=1029; i++) {
+/*N*/ nVersion3Map[i-1000]=i;
+/*N*/ }
+/*N*/ for (i=1030; i<=1123; i++) {
+/*N*/ nVersion3Map[i-1000]=i+17;
+/*N*/ }
+/*N*/ SetVersionMap(3,1000,1123,nVersion3Map);
+/*N*/
+/*N*/
+/*N*/ // Am 10-08-1996 hat Joe 45 neue Items in SvDraw eingebaut
+/*N*/ // fuer Bemassung, Verbinder und Laufschrift
+/*N*/
+/*N*/ for (i=1000; i<=1126; i++) {
+/*N*/ nVersion4Map[i-1000]=i;
+/*N*/ }
+/*N*/ for (i=1127; i<=1140; i++) {
+/*N*/ nVersion4Map[i-1000]=i+45;
+/*N*/ }
+/*N*/ SetVersionMap(4,1000,1140,nVersion4Map);
+/*N*/
+/*N*/
+/*N*/ XubString aNullStr;
+/*N*/ Bitmap aNullBmp;
+/*N*/ XPolygon aNullPol;
+/*N*/ Color aNullLineCol(RGB_Color(COL_BLACK));
+/*N*/
+/*N*/ Color aNullFillCol(Color(0,184,255)); // "Blau 7"
+/*N*/
+/*N*/ Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY));
+/*N*/ XDash aNullDash;
+/*N*/ XGradient aNullGrad(aNullLineCol, RGB_Color(COL_WHITE));
+/*N*/ XHatch aNullHatch(aNullLineCol);
+/*N*/
+/*N*/ // LineItems
+/*N*/ ppPoolDefaults[XATTR_LINESTYLE -XATTR_START] = new XLineStyleItem;
+/*N*/ ppPoolDefaults[XATTR_LINEDASH -XATTR_START] = new XLineDashItem(this,aNullDash);
+/*N*/ ppPoolDefaults[XATTR_LINEWIDTH -XATTR_START] = new XLineWidthItem;
+/*N*/ ppPoolDefaults[XATTR_LINECOLOR -XATTR_START] = new XLineColorItem(aNullStr,aNullLineCol);
+/*N*/ ppPoolDefaults[XATTR_LINESTART -XATTR_START] = new XLineStartItem(this,aNullPol);
+/*N*/ ppPoolDefaults[XATTR_LINEEND -XATTR_START] = new XLineEndItem (this,aNullPol);
+/*N*/ ppPoolDefaults[XATTR_LINESTARTWIDTH -XATTR_START] = new XLineStartWidthItem;
+/*N*/ ppPoolDefaults[XATTR_LINEENDWIDTH -XATTR_START] = new XLineEndWidthItem;
+/*N*/ ppPoolDefaults[XATTR_LINESTARTCENTER -XATTR_START] = new XLineStartCenterItem;
+/*N*/ ppPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem;
+/*N*/ ppPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem;
+/*N*/ ppPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem;
+/*N*/
+/*N*/ // Reserven fuer LineItems
+/*N*/ ppPoolDefaults[XATTR_LINERESERVED2 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED2);
+/*N*/ ppPoolDefaults[XATTR_LINERESERVED3 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED3);
+/*N*/ ppPoolDefaults[XATTR_LINERESERVED4 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED4);
+/*N*/ ppPoolDefaults[XATTR_LINERESERVED5 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED5);
+/*N*/ ppPoolDefaults[XATTR_LINERESERVED_LAST -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED_LAST);
+/*N*/
+/*N*/ // FillItems
+/*N*/ ppPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem;
+/*N*/ ppPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol);
+/*N*/ ppPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(this,aNullGrad);
+/*N*/ ppPoolDefaults[XATTR_FILLHATCH -XATTR_START] = new XFillHatchItem (this,aNullHatch);
+/*N*/ ppPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (this,aNullBmp);
+/*N*/ ppPoolDefaults[XATTR_FILLTRANSPARENCE -XATTR_START] = new XFillTransparenceItem;
+/*N*/ ppPoolDefaults[XATTR_GRADIENTSTEPCOUNT -XATTR_START] = new XGradientStepCountItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_TILE -XATTR_START] = new XFillBmpTileItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_POS -XATTR_START] = new XFillBmpPosItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_SIZEX -XATTR_START] = new XFillBmpSizeXItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_SIZEY -XATTR_START] = new XFillBmpSizeYItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_SIZELOG -XATTR_START] = new XFillBmpSizeLogItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_TILEOFFSETX -XATTR_START] = new XFillBmpTileOffsetXItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_TILEOFFSETY -XATTR_START] = new XFillBmpTileOffsetYItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_STRETCH -XATTR_START] = new XFillBmpStretchItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_POSOFFSETX -XATTR_START] = new XFillBmpPosOffsetXItem;
+/*N*/ ppPoolDefaults[XATTR_FILLBMP_POSOFFSETY -XATTR_START] = new XFillBmpPosOffsetYItem;
+/*N*/ ppPoolDefaults[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = new XFillFloatTransparenceItem( this, aNullGrad, FALSE );
+/*N*/
+/*N*/ // Reserven fuer FillItems
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED2 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED2);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED3 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED3);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED4 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED4);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED5 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED5);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED6 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED6);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED7 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED7);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED8 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED8);
+/*N*/ ppPoolDefaults[XATTR_FILLBACKGROUND -XATTR_START] = new XFillBackgroundItem;
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED10 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED10);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED11 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED11);
+/*N*/ ppPoolDefaults[XATTR_FILLRESERVED_LAST -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED_LAST);
+/*N*/
+/*N*/ // FormTextItems
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSTYLE -XATTR_START] = new XFormTextStyleItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTADJUST -XATTR_START] = new XFormTextAdjustItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTDISTANCE -XATTR_START] = new XFormTextDistanceItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSTART -XATTR_START] = new XFormTextStartItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTMIRROR -XATTR_START] = new XFormTextMirrorItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTOUTLINE -XATTR_START] = new XFormTextOutlineItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSHADOW -XATTR_START] = new XFormTextShadowItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSHDWCOLOR -XATTR_START] = new XFormTextShadowColorItem(aNullStr,aNullShadowCol);
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSHDWXVAL -XATTR_START] = new XFormTextShadowXValItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSHDWYVAL -XATTR_START] = new XFormTextShadowYValItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSTDFORM -XATTR_START] = new XFormTextStdFormItem;
+/*N*/ ppPoolDefaults[XATTR_FORMTXTHIDEFORM -XATTR_START] = new XFormTextHideFormItem;
+/*N*/
+/*N*/ // Reserven fuer FormTextItems
+/*N*/ ppPoolDefaults[XATTR_FORMTXTSHDWTRANSP -XATTR_START] = new XFormTextShadowTranspItem;
+/*N*/ ppPoolDefaults[XATTR_FTRESERVED2 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED2);
+/*N*/ ppPoolDefaults[XATTR_FTRESERVED3 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED3);
+/*N*/ ppPoolDefaults[XATTR_FTRESERVED4 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED4);
+/*N*/ ppPoolDefaults[XATTR_FTRESERVED5 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED5);
+/*N*/ ppPoolDefaults[XATTR_FTRESERVED_LAST -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED_LAST);
+/*N*/
+/*N*/ // SetItems erzeugen
+/*N*/ pSet=new SfxItemSet(*pMaster, XATTR_LINE_FIRST, XATTR_LINE_LAST);
+/*N*/ ppPoolDefaults[XATTRSET_LINE - XATTR_START] = new XLineAttrSetItem(pSet);
+/*N*/ pSet=new SfxItemSet(*pMaster, XATTR_FILL_FIRST, XATTR_FILL_LAST);
+/*N*/ ppPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem(pSet);
+/*N*/ pSet=new SfxItemSet(*pMaster, XATTR_TEXT_FIRST, XATTR_TEXT_LAST);
+/*N*/ ppPoolDefaults[XATTRSET_TEXT - XATTR_START] = new XTextAttrSetItem(pSet);
+/*N*/
+/*N*/ // ItemInfos
+/*N*/ pItemInfos=new SfxItemInfo[nEnd-nStart+1];
+/*N*/ for (i=nStart; i<=nEnd; i++) {
+/*N*/ pItemInfos[i-nStart]._nSID=0;
+/*N*/ pItemInfos[i-nStart]._nFlags=SFX_ITEM_POOLABLE;
+/*N*/ }
+/*N*/
+/*N*/ pItemInfos[XATTR_LINESTYLE -XATTR_START]._nSID = SID_ATTR_LINE_STYLE;
+/*N*/ pItemInfos[XATTR_LINEDASH -XATTR_START]._nSID = SID_ATTR_LINE_DASH;
+/*N*/ pItemInfos[XATTR_LINEWIDTH -XATTR_START]._nSID = SID_ATTR_LINE_WIDTH;
+/*N*/ pItemInfos[XATTR_LINECOLOR -XATTR_START]._nSID = SID_ATTR_LINE_COLOR;
+/*N*/ pItemInfos[XATTR_LINESTART -XATTR_START]._nSID = SID_ATTR_LINE_START;
+/*N*/ pItemInfos[XATTR_LINEEND -XATTR_START]._nSID = SID_ATTR_LINE_END;
+/*N*/ pItemInfos[XATTR_LINESTARTWIDTH -XATTR_START]._nSID = SID_ATTR_LINE_STARTWIDTH;
+/*N*/ pItemInfos[XATTR_LINEENDWIDTH -XATTR_START]._nSID = SID_ATTR_LINE_ENDWIDTH;
+/*N*/ pItemInfos[XATTR_LINESTARTCENTER -XATTR_START]._nSID = SID_ATTR_LINE_STARTCENTER;
+/*N*/ pItemInfos[XATTR_LINEENDCENTER -XATTR_START]._nSID = SID_ATTR_LINE_ENDCENTER;
+/*N*/
+/*N*/ pItemInfos[XATTR_FILLSTYLE -XATTR_START]._nSID = SID_ATTR_FILL_STYLE;
+/*N*/ pItemInfos[XATTR_FILLCOLOR -XATTR_START]._nSID = SID_ATTR_FILL_COLOR;
+/*N*/ pItemInfos[XATTR_FILLGRADIENT -XATTR_START]._nSID = SID_ATTR_FILL_GRADIENT;
+/*N*/ pItemInfos[XATTR_FILLHATCH -XATTR_START]._nSID = SID_ATTR_FILL_HATCH;
+/*N*/ pItemInfos[XATTR_FILLBITMAP -XATTR_START]._nSID = SID_ATTR_FILL_BITMAP;
+/*N*/
+/*N*/ pItemInfos[XATTR_FORMTXTSTYLE -XATTR_START]._nSID = SID_FORMTEXT_STYLE;
+/*N*/ pItemInfos[XATTR_FORMTXTADJUST -XATTR_START]._nSID = SID_FORMTEXT_ADJUST;
+/*N*/ pItemInfos[XATTR_FORMTXTDISTANCE -XATTR_START]._nSID = SID_FORMTEXT_DISTANCE;
+/*N*/ pItemInfos[XATTR_FORMTXTSTART -XATTR_START]._nSID = SID_FORMTEXT_START;
+/*N*/ pItemInfos[XATTR_FORMTXTMIRROR -XATTR_START]._nSID = SID_FORMTEXT_MIRROR;
+/*N*/ pItemInfos[XATTR_FORMTXTOUTLINE -XATTR_START]._nSID = SID_FORMTEXT_OUTLINE;
+/*N*/ pItemInfos[XATTR_FORMTXTSHADOW -XATTR_START]._nSID = SID_FORMTEXT_SHADOW;
+/*N*/ pItemInfos[XATTR_FORMTXTSHDWCOLOR -XATTR_START]._nSID = SID_FORMTEXT_SHDWCOLOR;
+/*N*/ pItemInfos[XATTR_FORMTXTSHDWXVAL -XATTR_START]._nSID = SID_FORMTEXT_SHDWXVAL;
+/*N*/ pItemInfos[XATTR_FORMTXTSHDWYVAL -XATTR_START]._nSID = SID_FORMTEXT_SHDWYVAL;
+/*N*/ pItemInfos[XATTR_FORMTXTSTDFORM -XATTR_START]._nSID = SID_FORMTEXT_STDFORM;
+/*N*/ pItemInfos[XATTR_FORMTXTHIDEFORM -XATTR_START]._nSID = SID_FORMTEXT_HIDEFORM;
+/*N*/
+/*N*/
+/*N*/ if (nAttrStart==XATTR_START && nAttrEnd==XATTR_END)
+/*N*/ {
+/*N*/ SetDefaults(ppPoolDefaults);
+/*N*/ SetItemInfos(pItemInfos);
+/*N*/ }
+/*N*/ }
+
+
+/*************************************************************************
+|*
+|* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
+|* (Parameter 2 = TRUE)
+|*
+\************************************************************************/
+
+/*N*/ XOutdevItemPool::XOutdevItemPool(const XOutdevItemPool& rPool) :
+/*N*/ SfxItemPool(rPool, TRUE)
+/*N*/ {
+ // damit geclonete Pools nicht im dtor auf die Nase fallen
+ // endgueltige Loesung --> MI
+/*N*/ ppPoolDefaults = NULL;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Clone()
+|*
+\************************************************************************/
+
+/*N*/ SfxItemPool* XOutdevItemPool::Clone() const
+/*N*/ {
+/*N*/ return new XOutdevItemPool(*this);
+/*N*/ }
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+/*N*/ XOutdevItemPool::~XOutdevItemPool()
+/*N*/ {
+/*N*/
+/*N*/ Delete();
+/*N*/ if ( ppPoolDefaults )
+/*N*/ {
+/*N*/ SfxPoolItem** ppDefaultItem = ppPoolDefaults;
+/*N*/ for ( USHORT i = nEnd - nStart + 1; i; --i, ++ppDefaultItem )
+/*N*/ {
+/*N*/ if ( *ppDefaultItem ) //Teile schon von abgel. Klasse abgeraeumt!
+/*N*/ {
+/*N*/ #ifdef DBG_UTIL
+/*N*/ SetRefCount( **ppDefaultItem, 0 );
+/*N*/ #endif
+/*N*/ delete *ppDefaultItem;
+/*N*/ }
+/*N*/ }
+/*N*/ delete[] ppPoolDefaults;
+/*N*/ }
+/*N*/ if (pItemInfos!=NULL) delete[] pItemInfos;
+/*N*/
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtabbtmp.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtabbtmp.cxx
new file mode 100644
index 000000000000..a4771e950235
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtabbtmp.cxx
@@ -0,0 +1,489 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_LIGHT
+
+#include "XPropertyTable.hxx"
+
+#include <unotools/ucbstreamhelper.hxx>
+
+#include "xmlxtimp.hxx"
+
+#endif
+
+#include <tools/urlobj.hxx>
+#include <bf_sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+using namespace ::com::sun::star;
+using namespace rtl;
+
+sal_Unicode const pszExtBitmap[] = {'s','o','b'};
+
+static char const aChckBitmap[] = { 0x04, 0x00, 'S','O','B','L'}; // very old
+static char const aChckBitmap0[] = { 0x04, 0x00, 'S','O','B','0'}; // old
+static char const aChckBitmap1[] = { 0x04, 0x00, 'S','O','B','1'}; // = 5.2
+static char const aChckXML[] = { 'P', 'K', 0x03, 0x04 }; // = 6.0
+
+// -------------------
+// class XBitmapTable
+// -------------------
+
+/************************************************************************/
+
+/*N*/ XBitmapTable::~XBitmapTable()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapEntry* XBitmapTable::Replace(long nIndex, XBitmapEntry* pEntry )
+/*N*/ {
+/*N*/ return (XBitmapEntry*) XPropertyTable::Replace(nIndex, pEntry);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapEntry* XBitmapTable::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XBitmapEntry*) XPropertyTable::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapEntry* XBitmapTable::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XBitmapEntry*) XPropertyTable::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapTable::Load()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapTable::Save()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapTable::Create()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapTable::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XBitmapTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+// ------------------
+// class XBitmapList
+// ------------------
+
+/*************************************************************************
+|*
+|* XBitmapList::XBitmapList()
+|*
+*************************************************************************/
+
+/*N*/ XBitmapList::XBitmapList( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ XPropertyList( rPath, pInPool, nInitSize, nReSize)
+/*N*/ {
+ // pBmpList = new List( nInitSize, nReSize );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapList::~XBitmapList()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapEntry* XBitmapList::Replace(XBitmapEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ return (XBitmapEntry*) XPropertyList::Replace(pEntry, nIndex);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapEntry* XBitmapList::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XBitmapEntry*) XPropertyList::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XBitmapEntry* XBitmapList::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XBitmapEntry*) XPropertyList::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapList::Load()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ bListDirty = FALSE;
+/*N*/
+/*N*/ INetURLObject aURL( aPath );
+/*N*/
+/*N*/ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+/*N*/ {
+/*N*/ DBG_ASSERT( !aPath.Len(), "invalid URL" );
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ aURL.Append( aName );
+/*N*/
+/*N*/ if( !aURL.getExtension().getLength() )
+/*N*/ aURL.setExtension( rtl::OUString( pszExtBitmap, 3 ) );
+/*N*/
+/*N*/ // check if file exists, SfxMedium shows an errorbox else
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler > xHandler;
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+/*N*/
+/*N*/ sal_Bool bOk = pIStm && ( pIStm->GetError() == 0);
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ delete pIStm;
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/
+/*N*/ SvStream* pStream = aMedium.GetInStream();
+/*N*/ if( !pStream )
+/*N*/ return( FALSE );
+/*N*/
+/*N*/ char aCheck[6];
+/*N*/ pStream->Read( aCheck, 6 );
+/*N*/
+/*N*/ // Handelt es sich um die gew"unschte Tabelle?
+/*N*/ if( memcmp( aCheck, aChckBitmap, sizeof( aChckBitmap ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckBitmap0, sizeof( aChckBitmap0 ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckBitmap1, sizeof( aChckBitmap1 ) ) == 0 )
+/*N*/ {
+/*N*/ ImpRead( *pStream );
+/*N*/ return( pStream->GetError() == SVSTREAM_OK );
+/*N*/ }
+/*N*/ else if( memcmp( aCheck, aChckXML, sizeof( aChckXML ) ) != 0 )
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< container::XNameContainer > xTable( SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
+/*N*/ return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
+/*N*/ }
+/*N*/ #endif
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapList::Save()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return false;//STRIP001
+/*
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ 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 );
+*/
+/*N*/ }
+
+/************************************************************************/
+// Umgestellt am 27.07.95 auf XBitmap
+
+/*N*/ BOOL XBitmapList::Create()
+/*N*/ {
+/*N*/ // Array der Bitmap
+/*N*/ //-----------------------
+/*N*/ // 00 01 02 03 04 05 06 07
+/*N*/ // 08 09 10 11 12 13 14 15
+/*N*/ // 16 17 18 19 20 21 22 23
+/*N*/ // 24 25 26 27 28 29 30 31
+/*N*/ // 32 33 34 35 36 37 38 39
+/*N*/ // 40 41 42 43 44 45 46 47
+/*N*/ // 48 49 50 51 52 53 54 55
+/*N*/ // 56 57 58 59 60 61 62 63
+/*N*/
+/*N*/ String aStr( SVX_RES( RID_SVXSTR_BITMAP ) );
+/*N*/ Color aColWhite( RGB_Color( COL_WHITE ) );
+/*N*/ xub_StrLen nLen;
+/*N*/ USHORT aArray[64];
+/*N*/
+/*N*/ memset( aArray, 0, sizeof( aArray ) );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert( new XBitmapEntry( XOBitmap( aArray, aColWhite, aColWhite ), aStr ) );
+/*N*/
+/*N*/ aArray[ 0] = 1; aArray[ 9] = 1; aArray[18] = 1; aArray[27] = 1;
+/*N*/ aArray[36] = 1; aArray[45] = 1; aArray[54] = 1; aArray[63] = 1;
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_BLACK ), aColWhite ), aStr ) );
+/*N*/
+/*N*/ aArray[ 7] = 1; aArray[14] = 1; aArray[21] = 1; aArray[28] = 1;
+/*N*/ aArray[35] = 1; aArray[42] = 1; aArray[49] = 1; aArray[56] = 1;
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_LIGHTRED ), aColWhite ), aStr ) );
+/*N*/
+/*N*/ aArray[24] = 1; aArray[25] = 1; aArray[26] = 1;
+/*N*/ aArray[29] = 1; aArray[30] = 1; aArray[31] = 1;
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_LIGHTBLUE ), aColWhite ), aStr ) );
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XBitmapList::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XBitmapList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XubString& XBitmapList::ConvertName( XubString& rStrName )
+/*N*/ {
+/*N*/ BOOL bFound = FALSE;
+/*N*/
+/*N*/ for( USHORT i=0; i<(RID_SVXSTR_BMP_DEF_END-RID_SVXSTR_BMP_DEF_START+1) && !bFound; i++ )
+/*N*/ {
+/*N*/ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_BMP_DEF_START + i );
+/*N*/ if( rStrName.Search( aStrDefName ) == 0 )
+/*N*/ {
+/*N*/ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_BMP_START + i ) );
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rStrName;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ SvStream& XBitmapList::ImpRead( SvStream& rIn )
+/*N*/ {
+/*N*/ // Lesen
+/*N*/ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+/*N*/
+/*N*/ delete pBmpList;
+/*N*/ pBmpList = new List( 16, 16 );
+/*N*/
+/*N*/ XBitmapEntry* pEntry = NULL;
+/*N*/ long nCount;
+/*N*/ String aName;
+/*N*/
+/*N*/ rIn >> nCount; // Version oder Anzahl ?
+/*N*/
+/*N*/ if( nCount >= 0 ) // Erste Version
+/*N*/ {
+/*N*/ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ // Behandlung der alten Bitmaps
+/*N*/ Bitmap aBmp;
+/*N*/ XOBitmap aXOBitmap;
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> aBmp;
+/*N*/
+/*N*/ aXOBitmap.SetBitmap( aBmp );
+/*N*/ aXOBitmap.SetBitmapStyle( XBITMAP_TILE );
+/*N*/
+/*N*/ if( aBmp.GetSizePixel().Width() == 8 &&
+/*N*/ aBmp.GetSizePixel().Height() == 8 )
+/*N*/ {
+/*N*/ aXOBitmap.SetBitmapType( XBITMAP_8X8 );
+/*N*/ aXOBitmap.Bitmap2Array();
+/*N*/ }
+/*N*/ else
+/*N*/ aXOBitmap.SetBitmapType( XBITMAP_IMPORT );
+/*N*/
+/*N*/ pEntry = new XBitmapEntry( aXOBitmap, aName );
+/*N*/ Insert( pEntry, nIndex );
+/*N*/ }
+/*N*/ }
+/*N*/ else if( nCount == -1 ) // Zweite Version
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/
+/*N*/ XOBitmap aXOBitmap;
+/*N*/ INT16 iTmp;
+/*N*/
+/*N*/ rIn >> iTmp;
+/*N*/ aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp );
+/*N*/ rIn >> iTmp;
+/*N*/ aXOBitmap.SetBitmapType( (XBitmapType) iTmp );
+/*N*/
+/*N*/ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+/*N*/ {
+/*N*/ Bitmap aBmp;
+/*N*/ rIn >> aBmp;
+/*N*/ aXOBitmap.SetBitmap( aBmp );
+/*N*/ }
+/*N*/ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+/*N*/ {
+/*N*/ USHORT* pArray = new USHORT[ 64 ];
+/*N*/ Color aColor;
+/*N*/
+/*N*/ for( USHORT i = 0; i < 64; i++ )
+/*N*/ rIn >> *( pArray + i );
+/*N*/ aXOBitmap.SetPixelArray( pArray );
+/*N*/
+/*N*/ rIn >> aColor;
+/*N*/ aXOBitmap.SetPixelColor( aColor );
+/*N*/ rIn >> aColor;
+/*N*/ aXOBitmap.SetBackgroundColor( aColor );
+/*N*/
+/*N*/ delete []pArray;
+/*N*/ }
+/*N*/
+/*N*/ pEntry = new XBitmapEntry( aXOBitmap, aName );
+/*N*/ Insert( pEntry, nIndex );
+/*N*/ }
+/*N*/ }
+/*N*/ else // Version ab 3.00a
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ // Versionsverwaltung
+/*N*/ XIOCompat aIOC( rIn, STREAM_READ );
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/
+/*N*/ XOBitmap aXOBitmap;
+/*N*/ INT16 iTmp;
+/*N*/
+/*N*/ rIn >> iTmp;
+/*N*/ aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp );
+/*N*/ rIn >> iTmp;
+/*N*/ aXOBitmap.SetBitmapType( (XBitmapType) iTmp );
+/*N*/
+/*N*/ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+/*N*/ {
+/*N*/ Bitmap aBmp;
+/*N*/ rIn >> aBmp;
+/*N*/ aXOBitmap.SetBitmap( aBmp );
+/*N*/ }
+/*N*/ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+/*N*/ {
+/*N*/ USHORT* pArray = new USHORT[ 64 ];
+/*N*/ Color aColor;
+/*N*/
+/*N*/ for( USHORT i = 0; i < 64; i++ )
+/*N*/ rIn >> *( pArray + i );
+/*N*/ aXOBitmap.SetPixelArray( pArray );
+/*N*/
+/*N*/ rIn >> aColor;
+/*N*/ aXOBitmap.SetPixelColor( aColor );
+/*N*/ rIn >> aColor;
+/*N*/ aXOBitmap.SetBackgroundColor( aColor );
+/*N*/
+/*N*/ delete []pArray;
+/*N*/ }
+/*N*/
+/*N*/ if (aIOC.GetVersion() > 0)
+/*N*/ {
+/*N*/ // lesen neuer Daten ...
+/*N*/ }
+/*N*/
+/*N*/ pEntry = new XBitmapEntry( aXOBitmap, aName );
+/*N*/ Insert( pEntry, nIndex );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return( rIn );
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtabcolr.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtabcolr.cxx
new file mode 100644
index 000000000000..eab67855e439
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtabcolr.cxx
@@ -0,0 +1,630 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVX_LIGHT
+
+#include "XPropertyTable.hxx"
+#include <unotools/ucbstreamhelper.hxx>
+
+
+#include "xmlxtimp.hxx"
+
+#endif
+
+#include <bf_sfx2/docfile.hxx>
+#include <tools/urlobj.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+using namespace ::com::sun::star;
+using namespace rtl;
+
+sal_Unicode const pszExtColor[] = {'s','o','c'};
+
+static char const aChckColor[] = { 0x04, 0x00, 'S','O','C','L'}; // < 5.2
+static char const aChckColor0[] = { 0x04, 0x00, 'S','O','C','0'}; // = 5.2
+static char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0
+
+// ------------------
+// class XColorTable
+// ------------------
+
+/*************************************************************************
+|*
+|* XColorTable::XColorTable()
+|*
+*************************************************************************/
+
+/*N*/ XColorTable::XColorTable( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+/*N*/ {
+/*N*/ // ColorTable braucht keine eigene BmpTable
+/*N*/ // pBmpTable = new Table( nInitSize, nReSize );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XColorTable::~XColorTable()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XColorEntry* XColorTable::Replace(long nIndex, XColorEntry* pEntry )
+/*N*/ {
+/*N*/ return (XColorEntry*) XPropertyTable::Replace(nIndex, pEntry);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XColorEntry* XColorTable::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XColorEntry*) XPropertyTable::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XColorEntry* XColorTable::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XColorEntry*) XPropertyTable::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XColorTable::Load()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( bTableDirty )
+/*N*/ {
+/*N*/ bTableDirty = FALSE;
+/*N*/
+/*N*/ INetURLObject aURL( aPath );
+/*N*/
+/*N*/ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+/*N*/ {
+/*N*/ DBG_ASSERT( !aPath.Len(), "invalid URL" );
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ aURL.Append( aName );
+/*N*/
+/*N*/ if( !aURL.getExtension().getLength() )
+/*N*/ aURL.setExtension( rtl::OUString( pszExtColor, 3 ) );
+/*N*/
+/*N*/ // check if file exists, SfxMedium shows an errorbox else
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler > xHandler;
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+/*N*/
+/*N*/ sal_Bool bOk = pIStm && ( pIStm->GetError() == 0);
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ delete pIStm;
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/ SvStream* pStream = aMedium.GetInStream();
+/*N*/ if( !pStream )
+/*N*/ return( FALSE );
+/*N*/
+/*N*/ char aCheck[6];
+/*N*/ pStream->Read( aCheck, 6 );
+/*N*/
+/*N*/ // Handelt es sich um die gew"unschte Tabelle?
+/*N*/ if( memcmp( aCheck, aChckColor, sizeof( aChckColor ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckColor0, sizeof( aChckColor0 ) ) == 0 )
+/*N*/ {
+/*N*/ ImpRead( *pStream );
+/*N*/ return( pStream->GetError() == SVSTREAM_OK );
+/*N*/ }
+/*N*/ else if( memcmp( aCheck, aChckXML, sizeof( aChckXML ) ) != 0 )
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< container::XNameContainer > xTable( SvxUnoXColorTable_createInstance( this ), uno::UNO_QUERY );
+/*N*/ return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
+/*N*/ }
+/*N*/ #endif
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XColorTable::Save()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return false;
+
+/*
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ 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 );
+*/
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XColorTable::Create()
+/*N*/ {
+/*N*/ XubString aStr;
+/*N*/ xub_StrLen nLen;
+/*N*/ ResMgr& rRes = DIALOG_MGR();
+/*N*/
+/*N*/ static USHORT __READONLY_DATA aResId[] =
+/*N*/ {
+/*N*/ RID_SVXSTR_BLACK,
+/*N*/ RID_SVXSTR_BLUE,
+/*N*/ RID_SVXSTR_GREEN,
+/*N*/ RID_SVXSTR_CYAN,
+/*N*/ RID_SVXSTR_RED,
+/*N*/ RID_SVXSTR_MAGENTA,
+/*N*/ RID_SVXSTR_BROWN,
+/*N*/ RID_SVXSTR_GREY,
+/*N*/ RID_SVXSTR_LIGHTGREY,
+/*N*/ RID_SVXSTR_LIGHTBLUE,
+/*N*/ RID_SVXSTR_LIGHTGREEN,
+/*N*/ RID_SVXSTR_LIGHTCYAN,
+/*N*/ RID_SVXSTR_LIGHTRED,
+/*N*/ RID_SVXSTR_LIGHTMAGENTA,
+/*N*/ RID_SVXSTR_YELLOW,
+/*N*/ RID_SVXSTR_WHITE
+/*N*/ };
+/*N*/
+/*N*/ // MT: COL_XXX ist in VCL kein enum mehr!!!
+/*N*/ // COL_WHITE ist seeeehr gross! ( => Zugriff ueber das obige Array hinweg )
+/*N*/ // Mit der unteren Schleife gibt es keinen Absturtz, aber es ist
+/*N*/ // alles schwarz, weil alles kleine Werte.
+/*N*/ // Ausserdem ist die ganze Vorgehensweise laut MM sehr unperformant
+/*N*/ // => lieber gleich Stringlisten laden.
+/*N*/
+/*N*/ // BM: ifndef VCL part removed (deprecated)
+/*N*/
+/*N*/ static ColorData __READONLY_DATA aColTab[] =
+/*N*/ {
+/*N*/ COL_BLACK,
+/*N*/ COL_BLUE,
+/*N*/ COL_GREEN,
+/*N*/ COL_CYAN,
+/*N*/ COL_RED,
+/*N*/ COL_MAGENTA,
+/*N*/ COL_BROWN,
+/*N*/ COL_GRAY,
+/*N*/ COL_LIGHTGRAY,
+/*N*/ COL_LIGHTBLUE,
+/*N*/ COL_LIGHTGREEN,
+/*N*/ COL_LIGHTCYAN,
+/*N*/ COL_LIGHTRED,
+/*N*/ COL_LIGHTMAGENTA,
+/*N*/ COL_YELLOW,
+/*N*/ COL_WHITE
+/*N*/ };
+/*N*/
+/*N*/ for( USHORT n = 0; n < 16; ++n )
+/*N*/ {
+/*N*/ Insert( n, new XColorEntry( Color( aColTab[n] ),
+/*N*/ String( ResId( aResId[ n ], rRes )) ) );
+/*N*/ }
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_GREY );
+/*N*/ aStr.AppendAscii(" 80%");
+/*N*/ nLen = aStr.Len() - 3;
+/*N*/ Insert(16, new XColorEntry( Color( 51, 51, 51 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(17, new XColorEntry( Color( 76, 76, 76 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(18, new XColorEntry( Color(102,102,102 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(19, new XColorEntry( Color(153,153,153 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(20, new XColorEntry( Color(179,179,179 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(21, new XColorEntry( Color(204,204,204 ), aStr ) );
+/*N*/ // BM: new 15%
+/*N*/ aStr.SetChar(nLen, sal_Unicode('1'));
+/*N*/ aStr.SetChar(nLen + 1, sal_Unicode('5'));
+/*N*/ Insert(22, new XColorEntry( Color(217,217,217 ), aStr ) );
+/*N*/ aStr.SetChar(nLen + 1, sal_Unicode('0'));
+/*N*/ Insert(23, new XColorEntry( Color(230,230,230 ), aStr ) );
+/*N*/ Insert(24, new XColorEntry( Color(230,230,255 ), SVX_RESSTR( RID_SVXSTR_BLUEGREY ) ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_RED );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(25, new XColorEntry( Color(255, 51,102 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(26, new XColorEntry( Color(220, 35, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(27, new XColorEntry( Color(184, 71, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(28, new XColorEntry( Color(255, 51, 51 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(29, new XColorEntry( Color(235, 97, 61 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(30, new XColorEntry( Color(184, 71, 71 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(31, new XColorEntry( Color(184, 0, 71 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('8'));
+/*N*/ Insert(32, new XColorEntry( Color(153, 40, 76 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_MAGENTA );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(33, new XColorEntry( Color(148, 0,107 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(34, new XColorEntry( Color(148, 71,107 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(35, new XColorEntry( Color(148, 71,148 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(36, new XColorEntry( Color(153,102,204 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(37, new XColorEntry( Color(107, 71,148 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(38, new XColorEntry( Color(107, 35,148 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(39, new XColorEntry( Color(107, 0,148 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('8'));
+/*N*/ Insert(40, new XColorEntry( Color( 94, 17,166 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_BLUE );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(41, new XColorEntry( Color( 40, 0,153 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(42, new XColorEntry( Color( 71, 0,184 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(43, new XColorEntry( Color( 35, 0,220 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(44, new XColorEntry( Color( 35, 35,220 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(45, new XColorEntry( Color( 0, 71,255 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(46, new XColorEntry( Color( 0,153,255 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(47, new XColorEntry( Color( 0,184,255 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('8'));
+/*N*/ Insert(48, new XColorEntry( Color(153,204,255 ), aStr ) );
+/*N*/ //Insert(48, new XColorEntry( Color( 46,215,255 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_CYAN );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(49, new XColorEntry( Color( 0,220,255 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(50, new XColorEntry( Color( 0,204,204 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(51, new XColorEntry( Color( 35,184,220 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(52, new XColorEntry( Color( 71,184,184 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(53, new XColorEntry( Color( 51,163,163 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(54, new XColorEntry( Color( 25,138,138 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(55, new XColorEntry( Color( 0,107,107 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('8'));
+/*N*/ Insert(56, new XColorEntry( Color( 0, 74, 74 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_GREEN );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(57, new XColorEntry( Color( 53, 94, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(58, new XColorEntry( Color( 92,133, 38 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(59, new XColorEntry( Color(125,166, 71 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(60, new XColorEntry( Color(148,189, 94 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(61, new XColorEntry( Color( 0,174, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(62, new XColorEntry( Color( 51,204,102 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(63, new XColorEntry( Color( 61,235, 61 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('8'));
+/*N*/ Insert(64, new XColorEntry( Color( 35,255, 35 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_YELLOW );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(65, new XColorEntry( Color(230,255, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(66, new XColorEntry( Color(255,255,153 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(67, new XColorEntry( Color(255,255,102 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(68, new XColorEntry( Color(230,230, 76 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(69, new XColorEntry( Color(204,204, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(70, new XColorEntry( Color(179,179, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('7'));
+/*N*/ Insert(71, new XColorEntry( Color(128,128, 25 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('8'));
+/*N*/ Insert(72, new XColorEntry( Color(102,102, 0 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_BROWN );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(73, new XColorEntry( Color( 76, 25, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(74, new XColorEntry( Color(102, 51, 0 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(75, new XColorEntry( Color(128, 76, 25 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(76, new XColorEntry( Color(153,102, 51 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_ORANGE );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(77, new XColorEntry( Color(204,102, 51 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(78, new XColorEntry( Color(255,102, 51 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(79, new XColorEntry( Color(255,153,102 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(80, new XColorEntry( Color(255,204,153 ), aStr ) );
+/*N*/
+/*N*/ // new chart colors
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_VIOLET );
+/*N*/ Insert( 81, new XColorEntry( Color( 0x99, 0x99, 0xff ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_BORDEAUX );
+/*N*/ Insert( 82, new XColorEntry( Color( 0x99, 0x33, 0x66 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_PALE_YELLOW );
+/*N*/ Insert( 83, new XColorEntry( Color( 0xff, 0xff, 0xcc ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_PALE_GREEN );
+/*N*/ Insert( 84, new XColorEntry( Color( 0xcc, 0xff, 0xff ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_DKVIOLET );
+/*N*/ Insert( 85, new XColorEntry( Color( 0x66, 0x00, 0x66 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_SALMON );
+/*N*/ Insert( 86, new XColorEntry( Color( 0xff, 0x80, 0x80 ), aStr ) );
+/*N*/
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_SEABLUE );
+/*N*/ Insert( 87, new XColorEntry( Color( 0x00, 0x66, 0xcc ), aStr ) );
+/*N*/
+/*N*/ // Sun colors
+/*N*/ aStr = SVX_RESSTR( RID_SVXSTR_COLOR_SUN );
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert( 88, new XColorEntry( Color( 0x33, 0x33, 0x66 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert( 89, new XColorEntry( Color( 0x66, 0x66, 0x99 ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert( 90, new XColorEntry( Color( 0x99, 0x99, 0xcc ), aStr ) );
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert( 91, new XColorEntry( Color( 0xcc, 0xcc, 0xff ), aStr ) );
+/*N*/
+/*N*/ return( Count() == 92 );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XColorTable::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XColorTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XubString& XColorTable::ConvertName( XubString& rStrName )
+/*N*/ {
+/*N*/ static USHORT __READONLY_DATA aDefResId[] =
+/*N*/ {
+/*N*/ RID_SVXSTR_BLUEGREY_DEF,
+/*N*/ RID_SVXSTR_BLACK_DEF,
+/*N*/ RID_SVXSTR_BLUE_DEF,
+/*N*/ RID_SVXSTR_GREEN_DEF,
+/*N*/ RID_SVXSTR_CYAN_DEF,
+/*N*/ RID_SVXSTR_RED_DEF,
+/*N*/ RID_SVXSTR_MAGENTA_DEF,
+/*N*/ RID_SVXSTR_BROWN_DEF,
+/*N*/ RID_SVXSTR_GREY_DEF,
+/*N*/ RID_SVXSTR_LIGHTGREY_DEF,
+/*N*/ RID_SVXSTR_LIGHTBLUE_DEF,
+/*N*/ RID_SVXSTR_LIGHTGREEN_DEF,
+/*N*/ RID_SVXSTR_LIGHTCYAN_DEF,
+/*N*/ RID_SVXSTR_LIGHTRED_DEF,
+/*N*/ RID_SVXSTR_LIGHTMAGENTA_DEF,
+/*N*/ RID_SVXSTR_YELLOW_DEF,
+/*N*/ RID_SVXSTR_WHITE_DEF,
+/*N*/ RID_SVXSTR_ORANGE_DEF,
+/*N*/ RID_SVXSTR_VIOLET_DEF,
+/*N*/ RID_SVXSTR_BORDEAUX_DEF,
+/*N*/ RID_SVXSTR_PALE_YELLOW_DEF,
+/*N*/ RID_SVXSTR_PALE_GREEN_DEF,
+/*N*/ RID_SVXSTR_DKVIOLET_DEF,
+/*N*/ RID_SVXSTR_SALMON_DEF,
+/*N*/ RID_SVXSTR_SEABLUE_DEF,
+/*N*/ RID_SVXSTR_COLOR_SUN_DEF
+/*N*/ };
+/*N*/ static USHORT __READONLY_DATA aResId[] =
+/*N*/ {
+/*N*/ RID_SVXSTR_BLUEGREY,
+/*N*/ RID_SVXSTR_BLACK,
+/*N*/ RID_SVXSTR_BLUE,
+/*N*/ RID_SVXSTR_GREEN,
+/*N*/ RID_SVXSTR_CYAN,
+/*N*/ RID_SVXSTR_RED,
+/*N*/ RID_SVXSTR_MAGENTA,
+/*N*/ RID_SVXSTR_BROWN,
+/*N*/ RID_SVXSTR_GREY,
+/*N*/ RID_SVXSTR_LIGHTGREY,
+/*N*/ RID_SVXSTR_LIGHTBLUE,
+/*N*/ RID_SVXSTR_LIGHTGREEN,
+/*N*/ RID_SVXSTR_LIGHTCYAN,
+/*N*/ RID_SVXSTR_LIGHTRED,
+/*N*/ RID_SVXSTR_LIGHTMAGENTA,
+/*N*/ RID_SVXSTR_YELLOW,
+/*N*/ RID_SVXSTR_WHITE,
+/*N*/ RID_SVXSTR_ORANGE,
+/*N*/ RID_SVXSTR_VIOLET,
+/*N*/ RID_SVXSTR_BORDEAUX,
+/*N*/ RID_SVXSTR_PALE_YELLOW,
+/*N*/ RID_SVXSTR_PALE_GREEN,
+/*N*/ RID_SVXSTR_DKVIOLET,
+/*N*/ RID_SVXSTR_SALMON,
+/*N*/ RID_SVXSTR_SEABLUE,
+/*N*/ RID_SVXSTR_COLOR_SUN
+/*N*/ };
+/*N*/
+/*N*/ BOOL bFound = FALSE;
+/*N*/
+/*N*/ for( int i=0; i<(sizeof(aDefResId) / sizeof(USHORT)) && !bFound; i++ )
+/*N*/ {
+/*N*/ XubString aStrDefName = SVX_RESSTR( aDefResId[i] );
+/*N*/ if( rStrName.Search( aStrDefName ) == 0 )
+/*N*/ {
+/*N*/ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( aResId[i] ) );
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rStrName;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ SvStream& XColorTable::ImpRead( SvStream& rIn )
+/*N*/ {
+/*N*/ // Lesen
+/*N*/ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+/*N*/
+/*N*/ delete pBmpTable;
+/*N*/ pBmpTable = new Table( 16, 16 );
+/*N*/
+/*N*/ XColorEntry* pEntry = NULL;
+/*N*/ long nType;
+/*N*/ long nCount;
+/*N*/ long nIndex;
+/*N*/ USHORT nRed;
+/*N*/ USHORT nGreen;
+/*N*/ USHORT nBlue;
+/*N*/ Color aColor;
+/*N*/ XubString aName;
+/*N*/
+/*N*/ rIn >> nType;
+/*N*/
+/*N*/ // gesamte Tabelle?
+/*N*/ if (nType == 0)
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for (long nI = 0; nI < nCount; nI++)
+/*N*/ {
+/*N*/ rIn >> nIndex;
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ aName = ConvertName( aName );
+/*N*/
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/
+/*N*/ aColor = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ pEntry = new XColorEntry( aColor, aName);
+/*N*/ Insert (nIndex, pEntry);
+/*N*/ }
+/*N*/ }
+/*N*/ else // Version ab 3.00a
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for (long nI = 0; nI < nCount; nI++)
+/*N*/ {
+/*N*/ // Versionsverwaltung
+/*N*/ XIOCompat aIOC( rIn, STREAM_READ );
+/*N*/
+/*N*/ rIn >> nIndex;
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ aName = ConvertName( aName );
+/*N*/
+/*N*/ if( aIOC.GetVersion() >= 0 )
+/*N*/ {
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aColor = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ }
+ /*
+ else if( aIOC.GetVersion() >= 1 )
+ {
+ // lesen neuer Daten ...
+ }
+ */
+/*N*/
+/*N*/ pEntry = new XColorEntry( aColor, aName );
+/*N*/ Insert( nIndex, pEntry );
+/*N*/ }
+/*N*/ }
+/*N*/ return( rIn );
+/*N*/ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtabdash.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtabdash.cxx
new file mode 100644
index 000000000000..4b598121ebc9
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtabdash.cxx
@@ -0,0 +1,504 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+#include "XPropertyTable.hxx"
+#include <unotools/ucbstreamhelper.hxx>
+
+#include "xmlxtimp.hxx"
+
+#endif
+#include <vcl/svapp.hxx>
+
+#include <tools/urlobj.hxx>
+#include <vcl/virdev.hxx>
+#include <bf_svtools/itemset.hxx>
+#include <bf_sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#include <xlineit0.hxx>
+
+#include <xlnclit.hxx>
+
+#include <xlnwtit.hxx>
+
+#include <xlndsit.hxx>
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace rtl;
+
+#define GLOBALOVERFLOW
+
+sal_Unicode const pszExtDash[] = {'s','o','d'};
+char const aChckDash[] = { 0x04, 0x00, 'S','O','D','L'}; // < 5.2
+char const aChckDash0[] = { 0x04, 0x00, 'S','O','D','0'}; // = 5.2
+char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0
+
+// -----------------
+// class XDashTable
+// -----------------
+
+/************************************************************************/
+
+/*N*/ XDashTable::~XDashTable()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashEntry* XDashTable::Replace(long nIndex, XDashEntry* pEntry )
+/*N*/ {
+/*N*/ return (XDashEntry*) XPropertyTable::Replace(nIndex, pEntry);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashEntry* XDashTable::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XDashEntry*) XPropertyTable::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashEntry* XDashTable::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XDashEntry*) XPropertyTable::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashTable::Load()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashTable::Save()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashTable::Create()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashTable::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XDashTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+// ----------------
+// class XDashList
+// ----------------
+
+/*************************************************************************
+|*
+|* XDashList::XDashList()
+|*
+*************************************************************************/
+
+/*N*/ XDashList::XDashList( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ XPropertyList ( rPath, pInPool, nInitSize, nReSize),
+/*N*/ pVD ( NULL ),
+/*N*/ pXOut ( NULL ),
+/*N*/ pXFSet ( NULL ),
+/*N*/ pXLSet ( NULL )
+/*N*/ {
+/*N*/ pBmpList = new List( nInitSize, nReSize );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashList::~XDashList()
+/*N*/ {
+/*N*/ if( pVD ) delete pVD;
+/*N*/ if( pXOut ) delete pXOut;
+/*N*/ if( pXFSet ) delete pXFSet;
+/*N*/ if( pXLSet ) delete pXLSet;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashEntry* XDashList::Replace(XDashEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ return (XDashEntry*) XPropertyList::Replace(pEntry, nIndex);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashEntry* XDashList::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XDashEntry*) XPropertyList::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XDashEntry* XDashList::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XDashEntry*) XPropertyList::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashList::Load()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ bListDirty = FALSE;
+/*N*/
+/*N*/ INetURLObject aURL( aPath );
+/*N*/
+/*N*/ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+/*N*/ {
+/*N*/ DBG_ASSERT( !aPath.Len(), "invalid URL" );
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ aURL.Append( aName );
+/*N*/
+/*N*/ if( !aURL.getExtension().getLength() )
+/*N*/ aURL.setExtension( rtl::OUString( pszExtDash, 3 ) );
+/*N*/
+/*N*/ // check if file exists, SfxMedium shows an errorbox else
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler > xHandler;
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+/*N*/
+/*N*/ sal_Bool bOk = pIStm && ( pIStm->GetError() == 0);
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ delete pIStm;
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/ SvStream* pStream = aMedium.GetInStream();
+/*N*/ if( !pStream )
+/*N*/ return( FALSE );
+/*N*/
+/*N*/ char aCheck[6];
+/*N*/ pStream->Read( aCheck, 6 );
+/*N*/
+/*N*/ // Handelt es sich um die gew"unschte Tabelle?
+/*N*/ if( memcmp( aCheck, aChckDash, sizeof( aChckDash ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckDash0, sizeof( aChckDash0 ) ) == 0 )
+/*N*/ {
+/*N*/ ImpRead( *pStream );
+/*N*/ return( pStream->GetError() == SVSTREAM_OK );
+/*N*/ }
+/*N*/ else if( memcmp( aCheck, aChckXML, sizeof( aChckXML ) ) != 0 )
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< container::XNameContainer > xTable( SvxUnoXDashTable_createInstance( this ), uno::UNO_QUERY );
+/*N*/ return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
+/*N*/ }
+/*N*/ #endif
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashList::Save()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return false;
+
+
+/*
+
+
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ 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 );
+*/
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashList::Create()
+/*N*/ {
+/*N*/ XubString aStr( SVX_RES( RID_SVXSTR_LINESTYLE ) );
+/*N*/ xub_StrLen nLen;
+/*N*/
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(new XDashEntry(XDash(XDASH_RECT,1, 50,1, 50, 50),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(new XDashEntry(XDash(XDASH_RECT,1,500,1,500,500),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr));
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XDashList::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ for( long i = 0; i < Count(); i++)
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+/*N*/ DBG_ASSERT( pBmp, "XDashList: Bitmap(UI) konnte nicht erzeugt werden!" );
+/*N*/
+/*N*/ if( pBmp )
+/*N*/ pBmpList->Insert( pBmp, i );
+/*N*/ }
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XDashList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ Point aZero;
+/*N*/
+/*N*/ if( !pVD ) // und pXOut und pXFSet und pXLSet
+/*N*/ {
+/*N*/ pVD = new VirtualDevice;
+/*N*/ DBG_ASSERT( pVD, "XDashList: Konnte kein VirtualDevice erzeugen!" );
+/*N*/ pVD->SetMapMode( MAP_100TH_MM );
+/*N*/ pVD->SetOutputSize( pVD->PixelToLogic( Size( BITMAP_WIDTH * 2, BITMAP_HEIGHT ) ) );
+/*N*/
+/*N*/ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+/*N*/ pVD->SetFillColor( rStyles.GetFieldColor() );
+/*N*/ pVD->SetLineColor( rStyles.GetFieldColor() );
+/*N*/
+/*N*/ pXOut = new XOutputDevice( pVD );
+/*N*/ DBG_ASSERT( pVD, "XDashList: Konnte kein XOutDevice erzeugen!" );
+/*N*/
+/*N*/ pXFSet = new XFillAttrSetItem( pXPool );
+/*N*/ DBG_ASSERT( pVD, "XDashList: Konnte kein XFillAttrSetItem erzeugen!" );
+/*N*/
+/*N*/ pXLSet = new XLineAttrSetItem( pXPool );
+/*N*/ DBG_ASSERT( pVD, "XDashList: Konnte kein XLineAttrSetItem erzeugen!" );
+/*N*/ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_DASH ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineColorItem( String(), RGB_Color( rStyles.GetFieldTextColor().GetColor() ) ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineWidthItem( 30 ) );
+/*N*/ }
+/*N*/
+/*N*/ Size aVDSize = pVD->GetOutputSize();
+/*N*/ pVD->DrawRect( Rectangle( aZero, aVDSize ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineDashItem( String(), Get( nIndex )->GetDash() ) );
+/*N*/
+/*N*/ //-/ pXOut->SetLineAttr( *pXLSet );
+/*N*/ pXOut->SetLineAttr( pXLSet->GetItemSet() );
+/*N*/
+/*N*/ pXOut->DrawLine( Point( 0, aVDSize.Height() / 2 ),
+/*N*/ Point( aVDSize.Width(), aVDSize.Height() / 2 ) );
+/*N*/
+/*N*/ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( aZero, aVDSize ) );
+/*N*/
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( bDelete )
+/*N*/ {
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+/*N*/ }
+/*N*/ return( pBitmap );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XubString& XDashList::ConvertName( XubString& rStrName )
+/*N*/ {
+/*N*/ static USHORT __READONLY_DATA aDefResId[] =
+/*N*/ {
+/*N*/ RID_SVXSTR_DASH5_DEF,
+/*N*/ RID_SVXSTR_DASH0_DEF,
+/*N*/ RID_SVXSTR_DASH1_DEF,
+/*N*/ RID_SVXSTR_DASH2_DEF,
+/*N*/ RID_SVXSTR_DASH3_DEF,
+/*N*/ RID_SVXSTR_DASH4_DEF,
+/*N*/ RID_SVXSTR_DASH6_DEF,
+/*N*/ RID_SVXSTR_DASH7_DEF,
+/*N*/ RID_SVXSTR_DASH8_DEF,
+/*N*/ RID_SVXSTR_DASH9_DEF,
+/*N*/ RID_SVXSTR_DASH10_DEF
+/*N*/ };
+/*N*/ static USHORT __READONLY_DATA aResId[] =
+/*N*/ {
+/*N*/ RID_SVXSTR_DASH5,
+/*N*/ RID_SVXSTR_DASH0,
+/*N*/ RID_SVXSTR_DASH1,
+/*N*/ RID_SVXSTR_DASH2,
+/*N*/ RID_SVXSTR_DASH3,
+/*N*/ RID_SVXSTR_DASH4,
+/*N*/ RID_SVXSTR_DASH6,
+/*N*/ RID_SVXSTR_DASH7,
+/*N*/ RID_SVXSTR_DASH8,
+/*N*/ RID_SVXSTR_DASH9,
+/*N*/ RID_SVXSTR_DASH10
+/*N*/ };
+/*N*/
+/*N*/ BOOL bFound = FALSE;
+/*N*/
+/*N*/ for( int i=0; i<(sizeof(aDefResId) / sizeof(USHORT)) && !bFound; i++ )
+/*N*/ {
+/*N*/ XubString aStrDefName = SVX_RESSTR( aDefResId[i] );
+/*N*/ if( rStrName.Search( aStrDefName ) == 0 )
+/*N*/ {
+/*N*/ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( aResId[i] ) );
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rStrName;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ SvStream& XDashList::ImpRead( SvStream& rIn )
+/*N*/ {
+/*N*/ // Lesen
+/*N*/ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+/*N*/
+/*N*/ delete pBmpList;
+/*N*/ pBmpList = new List( 16, 16 );
+/*N*/
+/*N*/ XDashEntry* pEntry = NULL;
+/*N*/ long nCount;
+/*N*/ XubString aName;
+/*N*/
+/*N*/ long nStyle;
+/*N*/ long nDots;
+/*N*/ sal_uInt32 nDotLen;
+/*N*/ long nDashes;
+/*N*/ sal_uInt32 nDashLen;
+/*N*/ sal_uInt32 nDistance;
+/*N*/
+/*N*/ rIn >> nCount;
+/*N*/
+/*N*/ if( nCount >= 0 ) // Alte Tabellen (bis 3.00)
+/*N*/ {
+/*N*/ for (long nIndex = 0; nIndex < nCount; nIndex++)
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nDots;
+/*N*/ rIn >> nDotLen;
+/*N*/ rIn >> nDashes;
+/*N*/ rIn >> nDashLen;
+/*N*/ rIn >> nDistance;
+/*N*/ XDash aDash((XDashStyle)nStyle, (BYTE)nDots, nDotLen,
+/*N*/ (BYTE)nDashes, nDashLen, nDistance);
+/*N*/ pEntry = new XDashEntry (aDash, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ else // ab 3.00a
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/
+/*N*/ for (long nIndex = 0; nIndex < nCount; nIndex++)
+/*N*/ {
+/*N*/ // Versionsverwaltung
+/*N*/ XIOCompat aIOC( rIn, STREAM_READ );
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nDots;
+/*N*/ rIn >> nDotLen;
+/*N*/ rIn >> nDashes;
+/*N*/ rIn >> nDashLen;
+/*N*/ rIn >> nDistance;
+/*N*/
+/*N*/ if (aIOC.GetVersion() > 0)
+/*N*/ {
+/*N*/ // lesen neuer Daten ...
+/*N*/ }
+/*N*/
+/*N*/ XDash aDash((XDashStyle)nStyle, (BYTE)nDots, nDotLen,
+/*N*/ (BYTE)nDashes, nDashLen, nDistance);
+/*N*/ pEntry = new XDashEntry (aDash, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ return( rIn );
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtabgrdt.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtabgrdt.cxx
new file mode 100644
index 000000000000..efa3709783a0
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtabgrdt.cxx
@@ -0,0 +1,538 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+#include "XPropertyTable.hxx"
+#include <unotools/ucbstreamhelper.hxx>
+
+#include "xmlxtimp.hxx"
+
+#endif
+
+#include <tools/urlobj.hxx>
+#include <vcl/virdev.hxx>
+#include <bf_svtools/itemset.hxx>
+#include <bf_sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#include <xfillit0.hxx>
+
+#include <xflgrit.hxx>
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+using namespace ::com::sun::star;
+using namespace rtl;
+
+sal_Unicode const pszExtGradient[] = {'s','o','g'};
+
+char const aChckGradient[] = { 0x04, 0x00, 'S','O','G','L'}; // < 5.2
+char const aChckGradient0[] = { 0x04, 0x00, 'S','O','G','0'}; // = 5.2
+char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0
+
+// ---------------------
+// class XGradientTable
+// ---------------------
+
+/************************************************************************/
+
+/*N*/ XGradientTable::~XGradientTable()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientEntry* XGradientTable::Replace(long nIndex, XGradientEntry* pEntry )
+/*N*/ {
+/*N*/ return (XGradientEntry*) XPropertyTable::Replace(nIndex, pEntry);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientEntry* XGradientTable::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XGradientEntry*) XPropertyTable::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientEntry* XGradientTable::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XGradientEntry*) XPropertyTable::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientTable::Load()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientTable::Save()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientTable::Create()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientTable::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XGradientTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+// --------------------
+// class XGradientList
+// --------------------
+
+/*************************************************************************
+|*
+|* XGradientList::XGradientList()
+|*
+*************************************************************************/
+
+/*N*/ XGradientList::XGradientList( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ XPropertyList ( rPath, pInPool, nInitSize, nReSize),
+/*N*/ pVD ( NULL ),
+/*N*/ pXOut ( NULL ),
+/*N*/ pXFSet ( NULL )
+/*N*/ {
+/*N*/ pBmpList = new List( nInitSize, nReSize );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientList::~XGradientList()
+/*N*/ {
+/*N*/ if( pVD ) delete pVD;
+/*N*/ if( pXOut ) delete pXOut;
+/*N*/ if( pXFSet ) delete pXFSet;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientEntry* XGradientList::Replace(XGradientEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ return( (XGradientEntry*) XPropertyList::Replace( pEntry, nIndex ) );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientEntry* XGradientList::Remove(long nIndex)
+/*N*/ {
+/*N*/ return( (XGradientEntry*) XPropertyList::Remove( nIndex, 0 ) );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XGradientEntry* XGradientList::Get(long nIndex) const
+/*N*/ {
+/*N*/ return( (XGradientEntry*) XPropertyList::Get( nIndex, 0 ) );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientList::Load()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ bListDirty = FALSE;
+/*N*/
+/*N*/ INetURLObject aURL( aPath );
+/*N*/
+/*N*/ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+/*N*/ {
+/*N*/ DBG_ASSERT( !aPath.Len(), "invalid URL" );
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ aURL.Append( aName );
+/*N*/
+/*N*/ if( !aURL.getExtension().getLength() )
+/*N*/ aURL.setExtension( rtl::OUString( pszExtGradient, 3 ) );
+/*N*/
+/*N*/ // check if file exists, SfxMedium shows an errorbox else
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler > xHandler;
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+/*N*/
+/*N*/ sal_Bool bOk = pIStm && ( pIStm->GetError() == 0);
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ delete pIStm;
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/ SvStream* pStream = aMedium.GetInStream();
+/*N*/ if( !pStream )
+/*N*/ return( FALSE );
+/*N*/
+/*N*/ char aCheck[6];
+/*N*/ pStream->Read( aCheck, 6 );
+/*N*/
+/*N*/ // Handelt es sich um die gew"unschte Tabelle?
+/*N*/ if( memcmp( aCheck, aChckGradient, sizeof( aChckGradient ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckGradient0, sizeof( aChckGradient0 ) ) == 0 )
+/*N*/ {
+/*N*/ ImpRead( *pStream );
+/*N*/ return( pStream->GetError() == SVSTREAM_OK );
+/*N*/ }
+/*N*/ else if( memcmp( aCheck, aChckXML, sizeof( aChckXML ) ) != 0 )
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< container::XNameContainer > xTable( SvxUnoXGradientTable_createInstance( this ), uno::UNO_QUERY );
+/*N*/ return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
+/*N*/
+/*N*/ }
+/*N*/ #endif
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientList::Save()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return false;
+
+/*
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ 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 );
+*/
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientList::Create()
+/*N*/ {
+/*N*/ XubString aStr( SVX_RES( RID_SVXSTR_GRADIENT ) );
+/*N*/ xub_StrLen nLen;
+/*N*/
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(new XGradientEntry(XGradient(RGB_Color(COL_BLACK ),RGB_Color(COL_WHITE ),XGRAD_LINEAR , 0,10,10, 0,100,100),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(new XGradientEntry(XGradient(RGB_Color(COL_BLUE ),RGB_Color(COL_RED ),XGRAD_AXIAL , 300,20,20,10,100,100),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(new XGradientEntry(XGradient(RGB_Color(COL_RED ),RGB_Color(COL_YELLOW ),XGRAD_RADIAL , 600,30,30,20,100,100),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('4'));
+/*N*/ Insert(new XGradientEntry(XGradient(RGB_Color(COL_YELLOW ),RGB_Color(COL_GREEN ),XGRAD_ELLIPTICAL, 900,40,40,30,100,100),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('5'));
+/*N*/ Insert(new XGradientEntry(XGradient(RGB_Color(COL_GREEN ),RGB_Color(COL_MAGENTA),XGRAD_SQUARE , 1200,50,50,40,100,100),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('6'));
+/*N*/ Insert(new XGradientEntry(XGradient(RGB_Color(COL_MAGENTA),RGB_Color(COL_YELLOW ),XGRAD_RECT , 1900,60,60,50,100,100),aStr));
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XGradientList::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ for( long i = 0; i < Count(); i++)
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+/*N*/ DBG_ASSERT( pBmp, "XGradientList: Bitmap(UI) konnte nicht erzeugt werden!" );
+/*N*/
+/*N*/ if( pBmp )
+/*N*/ pBmpList->Insert( pBmp, i );
+/*N*/ }
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XGradientList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ if( !pVD ) // und pXOut und pXFSet
+/*N*/ {
+/*N*/ pVD = new VirtualDevice;
+/*N*/ DBG_ASSERT( pVD, "XGradientList: Konnte kein VirtualDevice erzeugen!" );
+/*N*/ pVD->SetOutputSizePixel( Size( BITMAP_WIDTH, BITMAP_HEIGHT ) );
+/*N*/
+/*N*/ pXOut = new XOutputDevice( pVD );
+/*N*/ DBG_ASSERT( pVD, "XGradientList: Konnte kein XOutDevice erzeugen!" );
+/*N*/
+/*N*/ pXFSet = new XFillAttrSetItem( pXPool );
+/*N*/ DBG_ASSERT( pVD, "XGradientList: Konnte kein XFillAttrSetItem erzeugen!" );
+/*N*/ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_GRADIENT ) );
+/*N*/ }
+/*N*/
+/*N*/ pXFSet->GetItemSet().Put(
+/*N*/ XFillGradientItem( pXPool, Get( nIndex )->GetGradient() ) );
+/*N*/ //-/ pXOut->SetFillAttr( *pXFSet );
+/*N*/ pXOut->SetFillAttr( pXFSet->GetItemSet() );
+/*N*/
+/*N*/ // #73550#
+/*N*/ pXOut->OverrideLineColor( Color( COL_BLACK ) );
+/*N*/
+/*N*/ Size aVDSize = pVD->GetOutputSizePixel();
+/*N*/ pXOut->DrawRect( Rectangle( Point(), aVDSize ) );
+/*N*/ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( Point(), aVDSize ) );
+/*N*/
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( bDelete )
+/*N*/ {
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/ }
+/*N*/ return( pBitmap );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XubString& XGradientList::ConvertName( XubString& rStrName )
+/*N*/ {
+/*N*/ BOOL bFound = FALSE;
+/*N*/
+/*N*/ for( USHORT i=0; i<(RID_SVXSTR_GRDT_DEF_END-RID_SVXSTR_GRDT_DEF_START+1) && !bFound; i++ )
+/*N*/ {
+/*N*/ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_GRDT_DEF_START + i );
+/*N*/ if( rStrName.Search( aStrDefName ) == 0 )
+/*N*/ {
+/*N*/ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_GRDT_START + i ) );
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rStrName;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ SvStream& XGradientList::ImpRead( SvStream& rIn )
+/*N*/ {
+/*N*/ // Lesen
+/*N*/ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+/*N*/
+/*N*/ delete pBmpList;
+/*N*/ pBmpList = new List( 16, 16 );
+/*N*/
+/*N*/ XGradientEntry* pEntry = NULL;
+/*N*/ long nCheck;
+/*N*/ long nCount;
+/*N*/ XubString aName;
+/*N*/
+/*N*/ long nStyle;
+/*N*/ USHORT nRed;
+/*N*/ USHORT nGreen;
+/*N*/ USHORT nBlue;
+/*N*/ Color aStart;
+/*N*/ Color aEnd;
+/*N*/ long nAngle;
+/*N*/ sal_uInt32 nBorder;
+/*N*/ sal_uInt32 nXOfs;
+/*N*/ sal_uInt32 nYOfs;
+/*N*/ sal_uInt32 nStartIntens;
+/*N*/ sal_uInt32 nEndIntens;
+/*N*/
+/*N*/ // Kennung oder Anzahl
+/*N*/ rIn >> nCheck;
+/*N*/
+/*N*/ if( nCheck >= 0 )
+/*N*/ {
+/*N*/ nCount = nCheck;
+/*N*/
+/*N*/ for (long nIndex = 0; nIndex < nCount; nIndex++)
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aStart = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aEnd = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/
+/*N*/ rIn >> nAngle;
+/*N*/ rIn >> nBorder;
+/*N*/ rIn >> nXOfs;
+/*N*/ rIn >> nYOfs;
+/*N*/
+/*N*/ nStartIntens = 100L;
+/*N*/ nEndIntens = 100L;
+/*N*/
+/*N*/ XGradient aGradient( aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+/*N*/ (USHORT) nXOfs, (USHORT) nYOfs, (USHORT) nBorder,
+/*N*/ (USHORT) nStartIntens, (USHORT) nEndIntens );
+/*N*/ pEntry = new XGradientEntry (aGradient, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ else if( nCheck == -1L )
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for (long nIndex = 0; nIndex < nCount; nIndex++)
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aStart = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aEnd = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/
+/*N*/ rIn >> nAngle;
+/*N*/ rIn >> nBorder;
+/*N*/ rIn >> nXOfs;
+/*N*/ rIn >> nYOfs;
+/*N*/
+/*N*/ rIn >> nStartIntens;
+/*N*/ rIn >> nEndIntens;
+/*N*/
+/*N*/ XGradient aGradient( aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+/*N*/ (USHORT) nXOfs, (USHORT) nYOfs, (USHORT) nBorder,
+/*N*/ (USHORT) nStartIntens, (USHORT) nEndIntens );
+/*N*/ pEntry = new XGradientEntry (aGradient, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ else // ab 3.00a
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for (long nIndex = 0; nIndex < nCount; nIndex++)
+/*N*/ {
+/*N*/ // Versionsverwaltung
+/*N*/ XIOCompat aIOC( rIn, STREAM_READ );
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aStart = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ aEnd = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/
+/*N*/ rIn >> nAngle;
+/*N*/ rIn >> nBorder;
+/*N*/ rIn >> nXOfs;
+/*N*/ rIn >> nYOfs;
+/*N*/
+/*N*/ rIn >> nStartIntens;
+/*N*/ rIn >> nEndIntens;
+/*N*/
+/*N*/ if (aIOC.GetVersion() > 0)
+/*N*/ {
+/*N*/ // lesen neuer Daten ...
+/*N*/ }
+/*N*/
+/*N*/ XGradient aGradient( aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+/*N*/ (USHORT) nXOfs, (USHORT) nYOfs, (USHORT) nBorder,
+/*N*/ (USHORT) nStartIntens, (USHORT) nEndIntens );
+/*N*/ pEntry = new XGradientEntry (aGradient, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ return( rIn );
+/*N*/ }
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtabhtch.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtabhtch.cxx
new file mode 100644
index 000000000000..1d1811cfff8e
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtabhtch.cxx
@@ -0,0 +1,489 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+#include "XPropertyTable.hxx"
+#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/svapp.hxx>
+
+#include "xmlxtimp.hxx"
+
+#endif
+
+#include <tools/urlobj.hxx>
+#include <vcl/virdev.hxx>
+#include <bf_svtools/itemset.hxx>
+#include <bf_sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+#include "dlgutil.hxx"
+
+#include <xflhtit.hxx>
+
+#include <xflclit.hxx>
+
+#include <xfillit0.hxx>
+namespace binfilter {
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+sal_Unicode const pszExtHatch[] = {'s','o','h'};
+
+char const aChckHatch[] = { 0x04, 0x00, 'S','O','H','L'}; // < 5.2
+char const aChckHatch0[] = { 0x04, 0x00, 'S','O','H','0'}; // = 5.2
+char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0
+
+// ------------------
+// class XHatchTable
+// ------------------
+
+/************************************************************************/
+
+/*N*/ XHatchTable::~XHatchTable()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchEntry* XHatchTable::Replace(long nIndex, XHatchEntry* pEntry )
+/*N*/ {
+/*N*/ return (XHatchEntry*) XPropertyTable::Replace(nIndex, pEntry);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchEntry* XHatchTable::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XHatchEntry*) XPropertyTable::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchEntry* XHatchTable::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XHatchEntry*) XPropertyTable::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchTable::Load()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchTable::Save()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchTable::Create()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchTable::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XHatchTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+// -----------------
+// class XHatchList
+// -----------------
+
+/*************************************************************************
+|*
+|* XHatchList::XHatchList()
+|*
+*************************************************************************/
+
+/*N*/ XHatchList::XHatchList( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ XPropertyList ( rPath, pInPool, nInitSize, nReSize),
+/*N*/ pVD ( NULL ),
+/*N*/ pXOut ( NULL ),
+/*N*/ pXFSet ( NULL )
+/*N*/ {
+/*N*/ pBmpList = new List( nInitSize, nReSize );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchList::~XHatchList()
+/*N*/ {
+/*N*/ if( pVD ) delete pVD;
+/*N*/ if( pXOut ) delete pXOut;
+/*N*/ if( pXFSet ) delete pXFSet;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchEntry* XHatchList::Replace(XHatchEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ return (XHatchEntry*) XPropertyList::Replace(pEntry, nIndex);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchEntry* XHatchList::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XHatchEntry*) XPropertyList::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XHatchEntry* XHatchList::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XHatchEntry*) XPropertyList::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchList::Load()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ bListDirty = FALSE;
+/*N*/
+/*N*/ INetURLObject aURL( aPath );
+/*N*/
+/*N*/ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+/*N*/ {
+/*N*/ DBG_ASSERT( !aPath.Len(), "invalid URL" );
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ aURL.Append( aName );
+/*N*/
+/*N*/ if( !aURL.getExtension().getLength() )
+/*N*/ aURL.setExtension( rtl::OUString( pszExtHatch, 3 ) );
+/*N*/
+/*N*/ // check if file exists, SfxMedium shows an errorbox else
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler > xHandler;
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+/*N*/
+/*N*/ sal_Bool bOk = pIStm && ( pIStm->GetError() == 0);
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ delete pIStm;
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/ SvStream* pStream = aMedium.GetInStream();
+/*N*/ if( !pStream )
+/*N*/ return( FALSE );
+/*N*/
+/*N*/ char aCheck[6];
+/*N*/ pStream->Read( aCheck, 6 );
+/*N*/
+/*N*/ // Handelt es sich um die gew"unschte Tabelle?
+/*N*/ if( memcmp( aCheck, aChckHatch, sizeof( aChckHatch ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckHatch0, sizeof( aChckHatch0 ) ) == 0 )
+/*N*/ {
+/*N*/ ImpRead( *pStream );
+/*N*/ return( pStream->GetError() == SVSTREAM_OK );
+/*N*/ }
+/*N*/ else if( memcmp( aCheck, aChckXML, sizeof( aChckXML ) ) != 0 )
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< container::XNameContainer > xTable( SvxUnoXHatchTable_createInstance( this ), uno::UNO_QUERY );
+/*N*/ return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
+/*N*/ }
+/*N*/ #endif
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchList::Save()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return false;
+/*
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ 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 );
+*/
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchList::Create()
+/*N*/ {
+/*N*/ XubString aStr( SVX_RES( RID_SVXSTR_HATCH ) );
+/*N*/ xub_StrLen nLen;
+/*N*/
+/*N*/ aStr.AppendAscii(" 1");
+/*N*/ nLen = aStr.Len() - 1;
+/*N*/ Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLACK),XHATCH_SINGLE,100, 0),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('2'));
+/*N*/ Insert(new XHatchEntry(XHatch(RGB_Color(COL_RED ),XHATCH_DOUBLE, 80,450),aStr));
+/*N*/ aStr.SetChar(nLen, sal_Unicode('3'));
+/*N*/ Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),XHATCH_TRIPLE,120, 0),aStr));
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XHatchList::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ for( long i = 0; i < Count(); i++)
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+/*N*/ DBG_ASSERT( pBmp, "XHatchList: Bitmap(UI) konnte nicht erzeugt werden!" );
+/*N*/
+/*N*/ if( pBmp )
+/*N*/ pBmpList->Insert( pBmp, i );
+/*N*/ }
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XHatchList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ Point aZero;
+/*N*/
+/*N*/ if( !pVD ) // und pXOut und pXFSet
+/*N*/ {
+/*N*/ pVD = new VirtualDevice;
+/*N*/ DBG_ASSERT( pVD, "XHatchList: Konnte kein VirtualDevice erzeugen!" );
+/*N*/ //pVD->SetMapMode( MAP_100TH_MM );
+/*N*/ //pVD->SetOutputSize( pVD->PixelToLogic( Size( BITMAP_WIDTH, BITMAP_HEIGHT ) ) );
+/*N*/ pVD->SetOutputSizePixel( Size( BITMAP_WIDTH, BITMAP_HEIGHT ) );
+/*N*/
+/*N*/ pXOut = new XOutputDevice( pVD );
+/*N*/ DBG_ASSERT( pVD, "XHatchList: Konnte kein XOutDevice erzeugen!" );
+/*N*/
+/*N*/ pXFSet = new XFillAttrSetItem( pXPool );
+/*N*/ DBG_ASSERT( pVD, "XHatchList: Konnte kein XFillAttrSetItem erzeugen!" );
+/*N*/ }
+/*N*/
+/*N*/ if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() != 0 )
+/*N*/ pVD->SetDrawMode( OUTPUT_DRAWMODE_CONTRAST );
+/*N*/ else
+/*N*/ pVD->SetDrawMode( OUTPUT_DRAWMODE_COLOR );
+/*N*/
+/*N*/ // Damit die Schraffuren mit Rahmen angezeigt werden:
+/*N*/ // MapMode-Aenderungen (100th mm <--> Pixel)
+/*N*/ Size aPixelSize = pVD->GetOutputSizePixel();
+/*N*/ pVD->SetMapMode( MAP_PIXEL );
+/*N*/
+/*N*/ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_SOLID ) );
+/*N*/ pXFSet->GetItemSet().Put( XFillColorItem( String(), RGB_Color( COL_WHITE ) ) );
+/*N*/
+/*N*/ //-/ pXOut->SetFillAttr( *pXFSet );
+/*N*/ pXOut->SetFillAttr( pXFSet->GetItemSet() );
+/*N*/
+/*N*/ // #73550#
+/*N*/ pXOut->OverrideLineColor( Color( COL_BLACK ) );
+/*N*/
+/*N*/ pXOut->DrawRect( Rectangle( aZero, aPixelSize ) );
+/*N*/
+/*N*/ pVD->SetMapMode( MAP_100TH_MM );
+/*N*/ Size aVDSize = pVD->GetOutputSize();
+/*N*/ // 1 Pixel (Rahmen) abziehen
+/*N*/ aVDSize.Width() -= (long) ( aVDSize.Width() / aPixelSize.Width() + 1 );
+/*N*/ aVDSize.Height() -= (long) ( aVDSize.Height() / aPixelSize.Height() + 1 );
+/*N*/
+/*N*/ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_HATCH ) );
+/*N*/ pXFSet->GetItemSet().Put( XFillHatchItem( String(), Get( nIndex )->GetHatch() ) );
+
+//-/ pXOut->SetFillAttr( *pXFSet );
+/*N*/ pXOut->SetFillAttr( pXFSet->GetItemSet() );
+/*N*/
+/*N*/ pXOut->DrawRect( Rectangle( aZero, aVDSize ) );
+/*N*/
+/*N*/ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( aZero, pVD->GetOutputSize() ) );
+/*N*/
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( bDelete )
+/*N*/ {
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/ }
+/*N*/
+/*N*/ return( pBitmap );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XubString& XHatchList::ConvertName( XubString& rStrName )
+/*N*/ {
+/*N*/ BOOL bFound = FALSE;
+/*N*/
+/*N*/ for( USHORT i=0; i<(RID_SVXSTR_HATCH_DEF_END-RID_SVXSTR_HATCH_DEF_START+1) && !bFound; i++ )
+/*N*/ {
+/*N*/ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_HATCH_DEF_START + i );
+/*N*/ if( rStrName.Search( aStrDefName ) == 0 )
+/*N*/ {
+/*N*/ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_HATCH_START + i ) );
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rStrName;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ SvStream& XHatchList::ImpRead( SvStream& rIn )
+/*N*/ {
+/*N*/ // Lesen
+/*N*/ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+/*N*/
+/*N*/ delete pBmpList;
+/*N*/ pBmpList = new List( 16, 16 );
+/*N*/
+/*N*/ XHatchEntry* pEntry = NULL;
+/*N*/ long nCount;
+/*N*/ XubString aName;
+/*N*/
+/*N*/ long nStyle;
+/*N*/ USHORT nRed;
+/*N*/ USHORT nGreen;
+/*N*/ USHORT nBlue;
+/*N*/ long nDistance;
+/*N*/ long nAngle;
+/*N*/ Color aColor;
+/*N*/
+/*N*/ rIn >> nCount;
+/*N*/
+/*N*/ if( nCount >= 0 ) // Alte Tabellen (bis 3.00)
+/*N*/ {
+/*N*/ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ // UNICODE:rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ rIn >> nDistance;
+/*N*/ rIn >> nAngle;
+/*N*/
+/*N*/ aColor = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ XHatch aHatch(aColor, (XHatchStyle)nStyle, nDistance, nAngle);
+/*N*/ pEntry = new XHatchEntry (aHatch, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ else // ab 3.00a
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/
+/*N*/ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+/*N*/ {
+/*N*/ // Versionsverwaltung
+/*N*/ XIOCompat aIOC( rIn, STREAM_READ );
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ rIn >> nStyle;
+/*N*/ rIn >> nRed;
+/*N*/ rIn >> nGreen;
+/*N*/ rIn >> nBlue;
+/*N*/ rIn >> nDistance;
+/*N*/ rIn >> nAngle;
+/*N*/
+/*N*/ if (aIOC.GetVersion() > 0)
+/*N*/ {
+/*N*/ // lesen neuer Daten ...
+/*N*/ }
+/*N*/
+/*N*/ aColor = Color( (BYTE) ( nRed >> 8 ),
+/*N*/ (BYTE) ( nGreen >> 8 ),
+/*N*/ (BYTE) ( nBlue >> 8 ) );
+/*N*/ XHatch aHatch(aColor, (XHatchStyle)nStyle, nDistance, nAngle);
+/*N*/ pEntry = new XHatchEntry (aHatch, aName);
+/*N*/ Insert (pEntry, nIndex);
+/*N*/ }
+/*N*/ }
+/*N*/ return( rIn );
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtable.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtable.cxx
new file mode 100644
index 000000000000..1b6b2ce253f6
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtable.cxx
@@ -0,0 +1,426 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "xtable.hxx"
+#include "xpool.hxx"
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+// Vergleichsstrings
+/*N*/ 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.
+/*N*/ Color RGB_Color( ColorData nColorName )
+/*N*/ {
+/*N*/ Color aColor( nColorName );
+/*N*/ Color aRGBColor( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() );
+/*N*/ return aRGBColor;
+/*N*/ }
+
+// ---------------------
+// class XPropertyTable
+// ---------------------
+
+/*************************************************************************
+|*
+|* XPropertyTable::XPropertyTable()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyTable::XPropertyTable( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ aTable ( nInitSize, nReSize ),
+/*N*/ aPath ( rPath ),
+/*N*/ aName ( pszStandard, 8 ),
+/*N*/ pXPool ( pInPool ),
+/*N*/ pBmpTable ( NULL ),
+/*N*/ bTableDirty ( TRUE ),
+/*N*/ bBitmapsDirty ( TRUE ),
+/*N*/ bOwnPool ( FALSE )
+/*N*/ {
+/*N*/ if( !pXPool )
+/*N*/ {
+/*N*/ bOwnPool = TRUE;
+/*N*/ pXPool = new XOutdevItemPool;
+/*N*/ DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPropertyTable::~XPropertyTable()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyTable::~XPropertyTable()
+/*N*/ {
+/*N*/ XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First();
+/*N*/ Bitmap* pBitmap = NULL;
+/*N*/ for (ULONG nIndex = 0; nIndex < aTable.Count(); nIndex++)
+/*N*/ {
+/*N*/ delete pEntry;
+/*N*/ pEntry = (XPropertyEntry*)aTable.Next();
+/*N*/ }
+/*N*/ // Hier wird die Bitmaptabelle geloescht
+/*N*/ if( pBmpTable )
+/*N*/ {
+/*N*/ pBitmap = (Bitmap*) pBmpTable->First();
+/*N*/
+/*N*/ for( ULONG nIndex = 0; nIndex < pBmpTable->Count(); nIndex++ )
+/*N*/ {
+/*N*/ delete pBitmap;
+/*N*/ pBitmap = (Bitmap*) pBmpTable->Next();
+/*N*/ }
+/*N*/ delete pBmpTable;
+/*N*/ pBmpTable = NULL;
+/*N*/ }
+/*N*/ // Eigener Pool wird geloescht
+/*N*/ if( bOwnPool && pXPool )
+/*N*/ {
+/*N*/ delete pXPool;
+/*N*/ }
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ long XPropertyTable::Count() const
+/*N*/ {
+/*N*/ if( bTableDirty )
+/*N*/ {
+/*N*/ // ( (XPropertyTable*) this )->bTableDirty = FALSE; <- im Load()
+/*N*/ if( !( (XPropertyTable*) this )->Load() )
+/*N*/ ( (XPropertyTable*) this )->Create();
+/*N*/ }
+/*N*/ return( aTable.Count() );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPropertyEntry* XPropertyTable::Get()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyEntry* XPropertyTable::Get( long nIndex, USHORT nDummy ) const
+/*N*/ {
+/*N*/ if( bTableDirty )
+/*N*/ {
+/*N*/ // ( (XPropertyTable*) this )->bTableDirty = FALSE; <- im Load()
+/*N*/ if( !( (XPropertyTable*) this )->Load() )
+/*N*/ ( (XPropertyTable*) this )->Create();
+/*N*/ }
+/*N*/ return (XPropertyEntry*) aTable.GetObject( (ULONG) nIndex );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* long XPropertyTable::Get(const String& rName)
+|*
+*************************************************************************/
+
+/*N*/ long XPropertyTable::Get(const XubString& rName)
+/*N*/ {
+/*N*/ if( bTableDirty )
+/*N*/ {
+/*N*/ // bTableDirty = FALSE;
+/*N*/ if( !Load() )
+/*N*/ Create();
+/*N*/ }
+/*N*/ long nPos = 0;
+/*N*/ XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First();
+/*N*/ while (pEntry && pEntry->GetName() != rName)
+/*N*/ {
+/*N*/ nPos++;
+/*N*/ pEntry = (XPropertyEntry*)aTable.Next();
+/*N*/ }
+/*N*/ if (!pEntry) nPos = -1;
+/*N*/ return nPos;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XPropertyTable::Insert()
+|*
+*************************************************************************/
+
+/*N*/ BOOL XPropertyTable::Insert( long nIndex, XPropertyEntry* pEntry )
+/*N*/ {
+/*N*/ BOOL bReturn = aTable.Insert( (ULONG) nIndex, pEntry );
+/*N*/
+/*N*/ if( pBmpTable && !bBitmapsDirty )
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( (ULONG) nIndex );
+/*N*/ pBmpTable->Insert( (ULONG) nIndex, pBmp );
+/*N*/ }
+/*N*/ return bReturn;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XPropertyTable::Replace()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyEntry* XPropertyTable::Replace( long nIndex, XPropertyEntry* pEntry )
+/*N*/ {
+/*N*/ XPropertyEntry* pOldEntry = (XPropertyEntry*) aTable.Replace( (ULONG) nIndex, pEntry );
+/*N*/
+/*N*/ if( pBmpTable && !bBitmapsDirty )
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( (ULONG) nIndex );
+/*N*/ Bitmap* pOldBmp = (Bitmap*) pBmpTable->Replace( (ULONG) nIndex, pBmp );
+/*N*/ if( pOldBmp )
+/*N*/ delete pOldBmp;
+/*N*/ }
+/*N*/ return pOldEntry;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XPropertyTable::Remove()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyEntry* XPropertyTable::Remove( long nIndex, USHORT nDummy )
+/*N*/ {
+/*N*/ if( pBmpTable && !bBitmapsDirty )
+/*N*/ {
+/*N*/ Bitmap* pOldBmp = (Bitmap*) pBmpTable->Remove( (ULONG) nIndex );
+/*N*/ if( pOldBmp )
+/*N*/ delete pOldBmp;
+/*N*/ }
+/*N*/ return (XPropertyEntry*) aTable.Remove((ULONG)nIndex);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ void XPropertyTable::SetName( const String& rString )
+/*N*/ {
+/*N*/ if(rString.Len())
+/*N*/ {
+/*N*/ aName = rString;
+/*N*/ }
+/*N*/ }
+
+// --------------------
+// class XPropertyList
+// --------------------
+
+
+/*************************************************************************
+|*
+|* XPropertyList::XPropertyList()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyList::XPropertyList( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ aList ( nInitSize, nReSize ),
+/*N*/ aPath ( rPath ),
+/*N*/ aName ( pszStandard, 8 ),
+/*N*/ pXPool ( pInPool ),
+/*N*/ pBmpList ( NULL ),
+/*N*/ bListDirty ( TRUE ),
+/*N*/ bBitmapsDirty ( TRUE ),
+/*N*/ bOwnPool ( FALSE )
+/*N*/ {
+/*N*/ if( !pXPool )
+/*N*/ {
+/*N*/ bOwnPool = TRUE;
+/*N*/ pXPool = new XOutdevItemPool;
+/*N*/ DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPropertyList::~XPropertyList()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyList::~XPropertyList()
+/*N*/ {
+/*N*/ XPropertyEntry* pEntry = (XPropertyEntry*)aList.First();
+/*N*/ Bitmap* pBitmap = NULL;
+/*N*/ for( ULONG nIndex = 0; nIndex < aList.Count(); nIndex++ )
+/*N*/ {
+/*N*/ delete pEntry;
+/*N*/ pEntry = (XPropertyEntry*)aList.Next();
+/*N*/ }
+/*N*/
+/*N*/ if( pBmpList )
+/*N*/ {
+/*N*/ pBitmap = (Bitmap*) pBmpList->First();
+/*N*/
+/*N*/ for( ULONG nIndex = 0; nIndex < pBmpList->Count(); nIndex++ )
+/*N*/ {
+/*N*/ delete pBitmap;
+/*N*/ pBitmap = (Bitmap*) pBmpList->Next();
+/*N*/ }
+/*N*/ delete pBmpList;
+/*N*/ pBmpList = NULL;
+/*N*/ }
+/*N*/
+/*N*/ if( bOwnPool && pXPool )
+/*N*/ {
+/*N*/ delete pXPool;
+/*N*/ }
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ long XPropertyList::Count() const
+/*N*/ {
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ // ( (XPropertyList*) this )->bListDirty = FALSE; <- im Load()
+/*N*/ if( !( (XPropertyList*) this )->Load() )
+/*N*/ ( (XPropertyList*) this )->Create();
+/*N*/ }
+/*N*/ return( aList.Count() );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPropertyEntry* XPropertyList::Get()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyEntry* XPropertyList::Get( long nIndex, USHORT nDummy ) const
+/*N*/ {
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ // ( (XPropertyList*) this )->bListDirty = FALSE; <- im Load()
+/*N*/ if( !( (XPropertyList*) this )->Load() )
+/*N*/ ( (XPropertyList*) this )->Create();
+/*N*/ }
+/*N*/ return (XPropertyEntry*) aList.GetObject( (ULONG) nIndex );
+/*N*/ }
+
+/*************************************************************************
+|*
+|* XPropertyList::Get()
+|*
+*************************************************************************/
+
+/*N*/ long XPropertyList::Get(const XubString& rName)
+/*N*/ {
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ //bListDirty = FALSE;
+/*N*/ if( !Load() )
+/*N*/ Create();
+/*N*/ }
+/*N*/ long nPos = 0;
+/*N*/ XPropertyEntry* pEntry = (XPropertyEntry*)aList.First();
+/*N*/ while (pEntry && pEntry->GetName() != rName)
+/*N*/ {
+/*N*/ nPos++;
+/*N*/ pEntry = (XPropertyEntry*)aList.Next();
+/*N*/ }
+/*N*/ if (!pEntry) nPos = -1;
+/*N*/ return nPos;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XPropertyList::Insert()
+|*
+*************************************************************************/
+
+/*N*/ void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ aList.Insert( pEntry, (ULONG) nIndex );
+/*N*/
+/*N*/ if( pBmpList && !bBitmapsDirty )
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI(
+/*N*/ (ULONG) nIndex < aList.Count() ? nIndex : aList.Count() - 1 );
+/*N*/ pBmpList->Insert( pBmp, (ULONG) nIndex );
+/*N*/ }
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XPropertyList::Replace()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ XPropertyEntry* pOldEntry = (XPropertyEntry*) aList.Replace( pEntry, (ULONG) nIndex );
+/*N*/
+/*N*/ if( pBmpList && !bBitmapsDirty )
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( (ULONG) nIndex );
+/*N*/ Bitmap* pOldBmp = (Bitmap*) pBmpList->Replace( pBmp, (ULONG) nIndex );
+/*N*/ if( pOldBmp )
+/*N*/ delete pOldBmp;
+/*N*/ }
+/*N*/ return pOldEntry;
+/*N*/ }
+
+/*************************************************************************
+|*
+|* void XPropertyList::Remove()
+|*
+*************************************************************************/
+
+/*N*/ XPropertyEntry* XPropertyList::Remove( long nIndex, USHORT nDummy )
+/*N*/ {
+/*N*/ if( pBmpList && !bBitmapsDirty )
+/*N*/ {
+/*N*/ Bitmap* pOldBmp = (Bitmap*) pBmpList->Remove( (ULONG) nIndex );
+/*N*/ if( pOldBmp )
+/*N*/ delete pOldBmp;
+/*N*/ }
+/*N*/ return (XPropertyEntry*) aList.Remove( (ULONG) nIndex );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ void XPropertyList::SetName( const String& rString )
+/*N*/ {
+/*N*/ if(rString.Len())
+/*N*/ {
+/*N*/ aName = rString;
+/*N*/ }
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/source/xoutdev/svx_xtablend.cxx b/binfilter/bf_svx/source/xoutdev/svx_xtablend.cxx
new file mode 100644
index 000000000000..550259f1be16
--- /dev/null
+++ b/binfilter/bf_svx/source/xoutdev/svx_xtablend.cxx
@@ -0,0 +1,515 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+#include "XPropertyTable.hxx"
+#include <unotools/ucbstreamhelper.hxx>
+
+#include "xmlxtimp.hxx"
+
+#endif
+
+#include <tools/urlobj.hxx>
+
+#include <vcl/virdev.hxx>
+
+#include <vcl/svapp.hxx>
+
+#include <bf_svtools/itemset.hxx>
+
+#include <bf_sfx2/docfile.hxx>
+
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#include <xfillit0.hxx>
+
+#include <xflclit.hxx>
+
+#include <xlnstwit.hxx>
+
+#include <xlnedwit.hxx>
+
+#include <xlnclit.hxx>
+
+#include <xlineit0.hxx>
+
+#include <xlnstit.hxx>
+
+#include <xlnedit.hxx>
+namespace binfilter {
+
+#define GLOBALOVERFLOW
+
+using namespace ::com::sun::star;
+using namespace rtl;
+
+sal_Unicode const pszExtLineEnd[] = {'s','o','e'};
+
+static char const aChckLEnd[] = { 0x04, 0x00, 'S','O','E','L'}; // < 5.2
+static char const aChckLEnd0[] = { 0x04, 0x00, 'S','O','E','0'}; // = 5.2
+static char const aChckXML[] = { '<', '?', 'x', 'm', 'l' }; // = 6.0
+
+/************************************************************************/
+
+/*N*/ XLineEndTable::~XLineEndTable()
+/*N*/ {
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndEntry* XLineEndTable::Replace(long nIndex, XLineEndEntry* pEntry )
+/*N*/ {
+/*N*/ return (XLineEndEntry*) XPropertyTable::Replace(nIndex, pEntry);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndEntry* XLineEndTable::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XLineEndEntry*) XPropertyTable::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndEntry* XLineEndTable::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XLineEndEntry*) XPropertyTable::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndTable::Load()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndTable::Save()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndTable::Create()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XLineEndTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ return( NULL );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndTable::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ return( FALSE );
+/*N*/ }
+
+// --------------------
+// class XLineEndList
+// --------------------
+
+/*************************************************************************
+|*
+|* XLineEndList::XLineEndList()
+|*
+*************************************************************************/
+
+/*N*/ XLineEndList::XLineEndList( const String& rPath,
+/*N*/ XOutdevItemPool* pInPool,
+/*N*/ USHORT nInitSize, USHORT nReSize ) :
+/*N*/ XPropertyList( rPath, pInPool, nInitSize, nReSize),
+/*N*/ pVD ( NULL ),
+/*N*/ pXOut ( NULL ),
+/*N*/ pXFSet ( NULL ),
+/*N*/ pXLSet ( NULL )
+/*N*/ {
+/*N*/ pBmpList = new List( nInitSize, nReSize );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndList::~XLineEndList()
+/*N*/ {
+/*N*/ if( pVD ) delete pVD;
+/*N*/ if( pXOut ) delete pXOut;
+/*N*/ if( pXFSet ) delete pXFSet;
+/*N*/ if( pXLSet ) delete pXLSet;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndEntry* XLineEndList::Replace(XLineEndEntry* pEntry, long nIndex )
+/*N*/ {
+/*N*/ return (XLineEndEntry*) XPropertyList::Replace(pEntry, nIndex);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndEntry* XLineEndList::Remove(long nIndex)
+/*N*/ {
+/*N*/ return (XLineEndEntry*) XPropertyList::Remove(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XLineEndEntry* XLineEndList::Get(long nIndex) const
+/*N*/ {
+/*N*/ return (XLineEndEntry*) XPropertyList::Get(nIndex, 0);
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndList::Load()
+/*N*/ {
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ if( bListDirty )
+/*N*/ {
+/*N*/ bListDirty = FALSE;
+/*N*/
+/*N*/ INetURLObject aURL( aPath );
+/*N*/
+/*N*/ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+/*N*/ {
+/*N*/ DBG_ASSERT( !aPath.Len(), "invalid URL" );
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/
+/*N*/ aURL.Append( aName );
+/*N*/
+/*N*/ if( !aURL.getExtension().getLength() )
+/*N*/ aURL.setExtension( rtl::OUString( pszExtLineEnd, 3 ) );
+/*N*/
+/*N*/ // check if file exists, SfxMedium shows an errorbox else
+/*N*/ {
+/*N*/ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler > xHandler;
+/*N*/ SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ, xHandler );
+/*N*/
+/*N*/ sal_Bool bOk = pIStm && ( pIStm->GetError() == 0);
+/*N*/
+/*N*/ if( pIStm )
+/*N*/ delete pIStm;
+/*N*/
+/*N*/ if( !bOk )
+/*N*/ return sal_False;
+/*N*/ }
+/*N*/
+/*N*/ {
+/*N*/ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+/*N*/ SvStream* pStream = aMedium.GetInStream();
+/*N*/ if( !pStream )
+/*N*/ return( FALSE );
+/*N*/
+/*N*/ char aCheck[6];
+/*N*/ pStream->Read( aCheck, 6 );
+/*N*/
+/*N*/ // Handelt es sich um die gew'unschte Tabelle?
+/*N*/ if( memcmp( aCheck, aChckLEnd, sizeof( aChckLEnd ) ) == 0 ||
+/*N*/ memcmp( aCheck, aChckLEnd0, sizeof( aChckLEnd0 ) ) == 0 )
+/*N*/ {
+/*N*/ ImpRead( *pStream );
+/*N*/ return( pStream->GetError() == SVSTREAM_OK );
+/*N*/ }
+/*N*/ else if( memcmp( aCheck, aChckXML, sizeof( aChckXML ) ) != 0 )
+/*N*/ {
+/*N*/ return FALSE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ uno::Reference< container::XNameContainer > xTable( SvxUnoXLineEndTable_createInstance( this ), uno::UNO_QUERY );
+/*N*/ return SvxXMLXTableImport::load( aURL.GetMainURL( INetURLObject::NO_DECODE ), xTable );
+/*N*/ }
+/*N*/ #endif
+/*N*/ return( FALSE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndList::Save()
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); return false;
+/*
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, TRUE );
+ 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 );
+*/
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndList::Create()
+/*N*/ {
+/*N*/ XPolygon aTriangle(3);
+/*N*/ aTriangle[0].X()=10; aTriangle[0].Y()= 0;
+/*N*/ aTriangle[1].X()= 0; aTriangle[1].Y()=30;
+/*N*/ aTriangle[2].X()=20; aTriangle[2].Y()=30;
+/*N*/ Insert( new XLineEndEntry( aTriangle, SVX_RESSTR( RID_SVXSTR_ARROW ) ) );
+/*N*/
+/*N*/ XPolygon aSquare(4);
+/*N*/ aSquare[0].X()= 0; aSquare[0].Y()= 0;
+/*N*/ aSquare[1].X()=10; aSquare[1].Y()= 0;
+/*N*/ aSquare[2].X()=10; aSquare[2].Y()=10;
+/*N*/ aSquare[3].X()= 0; aSquare[3].Y()=10;
+/*N*/ Insert( new XLineEndEntry( aSquare, SVX_RESSTR( RID_SVXSTR_SQUARE ) ) );
+/*N*/
+/*N*/ XPolygon aCircle(Point(0,0),100,100);
+/*N*/ Insert( new XLineEndEntry( aCircle, SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) );
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ BOOL XLineEndList::CreateBitmapsForUI()
+/*N*/ {
+/*N*/ for( long i = 0; i < Count(); i++)
+/*N*/ {
+/*N*/ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+/*N*/ DBG_ASSERT( pBmp, "XLineEndList: Bitmap(UI) konnte nicht erzeugt werden!" );
+/*N*/
+/*N*/ if( pBmp )
+/*N*/ pBmpList->Insert( pBmp, i );
+/*N*/ }
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+/*N*/
+/*N*/ return( TRUE );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ Bitmap* XLineEndList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+/*N*/ {
+/*N*/ Point aZero;
+/*N*/ Size aVDSize;
+/*N*/
+/*N*/ if( !pVD ) // und pXOut und pXFSet und pXLSet
+/*N*/ {
+/*N*/ pVD = new VirtualDevice;
+/*N*/ DBG_ASSERT( pVD, "XLineEndList: Konnte kein VirtualDevice erzeugen!" );
+/*N*/ pVD->SetMapMode( MAP_100TH_MM );
+/*N*/ aVDSize = pVD->PixelToLogic( Size( BITMAP_WIDTH * 2, BITMAP_HEIGHT ) );
+/*N*/ pVD->SetOutputSize( aVDSize );
+/*N*/
+/*N*/ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+/*N*/ pVD->SetFillColor( rStyles.GetFieldColor() );
+/*N*/ pVD->SetLineColor( rStyles.GetFieldColor() );
+/*N*/
+/*N*/ pXOut = new XOutputDevice( pVD );
+/*N*/ DBG_ASSERT( pVD, "XLineEndList: Konnte kein XOutDevice erzeugen!" );
+/*N*/
+/*N*/ pXFSet = new XFillAttrSetItem( pXPool );
+/*N*/ DBG_ASSERT( pVD, "XLineEndList: Konnte kein XFillAttrSetItem erzeugen!" );
+/*N*/ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_SOLID ) );
+/*N*/ const StyleSettings& rStyleSettings = pVD->GetSettings().GetStyleSettings();
+/*N*/ pXFSet->GetItemSet().Put( XFillColorItem( String(), rStyleSettings.GetFieldColor() ) );
+/*N*/
+/*N*/ pXLSet = new XLineAttrSetItem( pXPool );
+/*N*/ DBG_ASSERT( pVD, "XLineEndList: Konnte kein XLineAttrSetItem erzeugen!" );
+/*N*/ pXLSet->GetItemSet().Put( XLineStartWidthItem( aVDSize.Height() ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineEndWidthItem( aVDSize.Height() ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineColorItem( String(), RGB_Color( rStyles.GetFieldTextColor().GetColor() ) ) );
+/*N*/
+/*N*/ }
+/*N*/ else
+/*N*/ aVDSize = pVD->GetOutputSize();
+/*N*/
+/*N*/ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+/*N*/ //-/ pXOut->SetLineAttr( *pXLSet );
+/*N*/
+/*N*/ pXOut->SetLineAttr( pXLSet->GetItemSet() );
+/*N*/ //-/ pXOut->SetFillAttr( *pXFSet );
+/*N*/
+/*N*/ pXOut->SetFillAttr( pXFSet->GetItemSet() );
+/*N*/ pXOut->DrawRect( Rectangle( aZero, aVDSize ) );
+/*N*/
+/*N*/ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_SOLID ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineStartItem( String(), Get( nIndex )->GetLineEnd() ) );
+/*N*/ pXLSet->GetItemSet().Put( XLineEndItem( String(), Get( nIndex )->GetLineEnd() ) );
+/*N*/
+/*N*/ //-/ pXOut->SetLineAttr( *pXLSet );
+/*N*/ pXOut->SetLineAttr( pXLSet->GetItemSet() );
+/*N*/
+/*N*/ pXOut->DrawLine( Point( 0, aVDSize.Height() / 2 ),
+/*N*/ Point( aVDSize.Width(), aVDSize.Height() / 2 ) );
+/*N*/
+/*N*/ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( aZero, aVDSize ) );
+/*N*/
+/*N*/ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+/*N*/ if( bDelete )
+/*N*/ {
+/*N*/ if( pVD ) { delete pVD; pVD = NULL; }
+/*N*/ if( pXOut ) { delete pXOut; pXOut = NULL; }
+/*N*/ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+/*N*/ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+/*N*/ }
+/*N*/
+/*N*/ return( pBitmap );
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ XubString& XLineEndList::ConvertName( XubString& rStrName )
+/*N*/ {
+/*N*/ BOOL bFound = FALSE;
+/*N*/
+/*N*/ for( USHORT i=0; i<(RID_SVXSTR_LEND_DEF_END-RID_SVXSTR_LEND_DEF_START+1) && !bFound; i++ )
+/*N*/ {
+/*N*/ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_LEND_DEF_START + i );
+/*N*/ if( rStrName.Search( aStrDefName ) == 0 )
+/*N*/ {
+/*N*/ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_LEND_START + i ) );
+/*N*/ bFound = TRUE;
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ return rStrName;
+/*N*/ }
+
+/************************************************************************/
+
+/*N*/ SvStream& XLineEndList::ImpRead( SvStream& rIn )
+/*N*/ {
+/*N*/ // Lesen
+/*N*/ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+/*N*/
+/*N*/ delete pBmpList;
+/*N*/ pBmpList = new List( 16, 16 );
+/*N*/
+/*N*/ XLineEndEntry* pEntry = NULL;
+/*N*/ long nVersion;
+/*N*/ long nCount;
+/*N*/ XubString aName;
+/*N*/ long nFlags;
+/*N*/
+/*N*/ rIn >> nVersion;
+/*N*/
+/*N*/ if( nVersion >= 0 ) // 1. Version
+/*N*/ {
+/*N*/ nCount = nVersion;
+/*N*/ for( long nI = 0; nI < nCount; nI++ )
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/
+/*N*/ aName = ConvertName( aName );
+/*N*/ USHORT nPoints;
+/*N*/ sal_uInt32 nTemp;
+/*N*/ Point aPoint;
+/*N*/ rIn >> nTemp; nPoints = (USHORT)nTemp;
+/*N*/ XPolygon* pXPoly = new XPolygon(nPoints);
+/*N*/ for (USHORT nPoint = 0; nPoint < nPoints; nPoint++)
+/*N*/ {
+/*N*/ rIn >> aPoint.X();
+/*N*/ rIn >> aPoint.Y();
+/*N*/ rIn >> nFlags;
+/*N*/ pXPoly->Insert(nPoint, aPoint, (XPolyFlags)nFlags);
+/*N*/ }
+/*N*/
+/*N*/ pEntry = new XLineEndEntry( *pXPoly, aName );
+/*N*/ Insert( pEntry, nI );
+/*N*/ }
+/*N*/ }
+/*N*/ else if( nVersion == -1L ) // 2. Version
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for( long nI = 0; nI < nCount; nI++ )
+/*N*/ {
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ aName = ConvertName( aName );
+/*N*/
+/*N*/ XPolygon* pXPoly = new XPolygon;
+/*N*/ rIn >> *pXPoly;
+/*N*/
+/*N*/ pEntry = new XLineEndEntry( *pXPoly, aName );
+/*N*/ Insert( pEntry, nI );
+/*N*/ }
+/*N*/ }
+/*N*/ else // ab 3.00a
+/*N*/ {
+/*N*/ rIn >> nCount;
+/*N*/ for( long nI = 0; nI < nCount; nI++ )
+/*N*/ {
+/*N*/ // Versionsverwaltung
+/*N*/ XIOCompat aIOC( rIn, STREAM_READ );
+/*N*/
+/*N*/ // UNICODE: rIn >> aName;
+/*N*/ rIn.ReadByteString(aName);
+/*N*/ aName = ConvertName( aName );
+/*N*/
+/*N*/ XPolygon aXPoly;
+/*N*/ rIn >> aXPoly;
+/*N*/
+/*N*/ if (aIOC.GetVersion() > 0)
+/*N*/ {
+/*N*/ // lesen neuer Daten ...
+/*N*/ }
+/*N*/
+/*N*/ pEntry = new XLineEndEntry( aXPoly, aName );
+/*N*/ Insert( pEntry, nI );
+/*N*/ }
+/*N*/ }
+/*N*/ return( rIn );
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_svx/util/bf_sfxwin.flt b/binfilter/bf_svx/util/bf_sfxwin.flt
new file mode 100644
index 000000000000..690014f8eac5
--- /dev/null
+++ b/binfilter/bf_svx/util/bf_sfxwin.flt
@@ -0,0 +1,184 @@
+CntSearchLocationsTabPage
+CntSearchDialog
+WEP
+?CreateType@
+??_5
+??_7
+??_8
+??_9
+??_C
+??_E
+??_F
+??_G
+??_H
+??_I
+?CreateImpl@
+?GetGlobalClassName@
+?GetSvFactory@
+?LinkStub
+?nClassId@
+?RegisterInterface@
+::UsrException
+::IllegalArg
+AVIllegalArg
+::Exception
+NoSuchElementException
+__CT
+lcl_translateBasic2Uno
+_Impl
+IMPL_
+AVL_Tree
+BinaryGlobalLoader
+BinaryResLoader
+BitSet
+CntBoxOpenJob
+CntContentPropertiesTabPage
+CntCoreDataComplex_Impl
+CntCoreDataSimple_Impl
+CntDirectory
+CntDirEntry
+CntDirtyItemSet
+CntExplorerFileContent
+CntFTPServerTabPage
+CntGeneralTabPage
+CntHash
+CntIMAPFolderInfoItem
+CntIMAPFolderNode
+CntIMAPRootNode
+CntInterface
+CntItemPool
+CntLazyDelete
+CntLazyWriter
+CntMessageBodyItemImp
+CntMessageNode
+CntNewMessagesControl
+CntNewsBoxGetListJob
+CntNewsBoxNode
+CntNewsBoxNodeImp
+CntNewsBoxOpenJob
+CntNewsBoxPutListJob
+CntNewsGroupNode
+CntNewsGroupOpenJob
+CntNewsGroupMarkJob
+CntNewsMsgOpenJob
+CntCrossReferenceItem
+CntNode
+CntNodeFactory
+CntNodeHint
+CntNodeJob
+CntOutMsgExternalStateItem
+CntOutMsgInternalStateItem
+CntOutTrayNode
+CntPopupMenu
+CntProgress
+CntPOP3Node
+CntPOP3Box
+CntPOP3Msg
+CntPropertyDialog
+CntPropertyTabPage
+CntRangesItem
+CntRecipientInfo
+CntRecipientListItem
+CntRecipientStateTabPage
+CntRootNodeMgr
+CntRootStorageNode
+CntRulesTabPage
+CntSeenStatusItem
+CntServerSettingsTabPage
+CntSortingInfoArr
+CntSortingItem
+CntSubscribeTabPage
+CntThreadData
+CntThreadingInfoArr
+CntThreadingItem
+CntUI
+CntUpdateHint
+CntUpdateInitTimer
+CntUShortListItem
+CntViewDescriptionItem
+DocManager
+FileHeader
+IdPool
+ImportParser_Impl
+ItemListData
+NotesLibrary
+QueryFolderNameDialog
+SbxArrayRef
+SbxObjectRef
+SfxAccelerator
+SfxConfigDialog
+SfxConfigManager
+SfxContextMenuData
+SfxCustomizeToolBox
+SfxDirEntryHint
+SfxDocumentsCollection
+SfxDocumentTemplateDlg
+SfxEnumMenu
+SfxEventConfigPage
+SfxExecuteItem
+SfxExplorerBookmark
+SfxExplorerBrowserConfig
+SfxExplorerContentHint
+SfxExplorerFolderSearchCriteriaTabPage
+SfxExplorerFolderSearchDlg
+SfxExplorerFolderSearchPlaceTabPage
+SfxExplorerFolderSearchWrapper
+SfxExplorerIterator
+SfxExplorerMenuView
+SfxExplorerObjectShell
+SfxExplorerSearchFolder
+SfxExtDirEntryHint
+SfxFilterDialog
+SfxFilterFunc
+SfxFrameProperties
+SfxGenericObjectShell
+SfxGenericViewShell
+SfxHelpTextCache
+SfxHelpViewShell
+SfxIPCServer
+SfxIPCService
+SfxJobQueue
+SfxMailBroadcaster
+SfxMenuBarManager
+SfxMenuManager
+SfxMenuConfig
+SfxMessageServer
+SfxNewHdl
+SfxObjectBarConfigPage
+SfxObjectBarListBox
+SfxObjectList
+SfxObjectVerbsControl
+SfxOfflineURLManager
+SfxPlugInFrame
+SfxPlugInObjectShell
+SfxPlugInViewShell
+SfxPopupMenuManager
+SfxResId
+SfxSlotInfo
+SfxSplitWindow
+SfxSrchDlgBrowseBox
+SfxStateCache
+SfxStatusBarConfigListBox
+SfxStatusBarConfigPage
+SfxTaskBar
+SfxTaskBarWrapper
+SfxTaskButtonBar
+SfxTaskToolBox
+SfxTemplateControllerItem
+SfxTemplateDir
+SfxTemplateDirEntry
+SfxTemplateOrganizeDlg
+SfxToolbox
+SfxToolBoxConfig
+SfxToolboxCustomizer
+SfxToolboxCustomWindow
+SfxToolBoxOptions
+SfxURLFrame
+SfxVirtualMenu
+SfxWindowsCollection
+SfxWorkWindow
+SortedULONGs_SAR
+solver
+_FileListEntry
+InitHelp
+InitTpl
diff --git a/binfilter/bf_svx/util/bf_svx.flt b/binfilter/bf_svx/util/bf_svx.flt
new file mode 100644
index 000000000000..b7ac815272ff
--- /dev/null
+++ b/binfilter/bf_svx/util/bf_svx.flt
@@ -0,0 +1,132 @@
+lcl
++getImplementation
+Impl
+IMPL
+START
+CharAttribList
+CharPosArray
+ContentAttribs
+ContentAttribsInfo
+ContentInfo
+ContentNode
+DeletedNodeInfo
+EditAttrib
+EditCharAttrib
+EditDbg
+EditDoc
+EditEngineItemPool
+EditHTMLParser
+EditLine
+EditNodeIdx
+EditPaM
+EditPosition
+EditRTFParser
+EditSel
+EditSpellWrapper
+EditStyleSheet
+EditUndoConnectParas
+EditUndoDelContent
+EditUndoInsertChars
+EditUndoInsertFeature
+EditUndoManager
+EditUndoMoveParagraphs
+EditUndoRemoveChars
+EditUndoRemoveFeature
+EditUndoSetAttribs
+EditUndoSetParaAttribs
+EditUndoSetStyleSheet
+GlobalEditData
+IdleFormattter
+ImpEditEngine
+ImpEditView
+InternalEditStatus
+ParaPortion
+ParagraphList
+RTFPardAttrMapIds
+RTFPlainAttrMapIds
+SelRange
+SortedPositions_SAR
+SvxACorrChars
+SvxColorList
+SvxFontTable
+SvxRTFStyleType
+SvxTabStopArr_SAR
+TextPortionList
+XEditAttrib
+XParaPortionList
+BinTextObject
+DialogsResMgr
+E3dDragMethod
+E3dTriangle
+GetImp
+ImpA
+ImpB
+ImpBrw
+ImpC
+ImpCheck
+ImpColor
+ImpD
+ImpDrag
+ImpEdCtrl
+ImpEdit
+ImpF
+ImpGet
+ImpH
+ImpHide
+ImpI
+ImpItem
+ImpJ
+ImpL
+ImpList
+ImpM
+ImpMulti
+ImportInfo
+ImpP
+ImpPaint
+ImpPast
+ImpRecalc
+ImpReset
+ImpRemove
+ImpRef
+ImpReset
+ImpS
+ImpScroll
+ImpSdrGDIMetaFileImport
+ImpSet
+ImpShow
+ImpT
+ImpX
+OLUndoAttr
+OLUndoDepth
+OLUndoExpand
+OLUndoHeight
+OutlinerEditEng
+SdrGraphicLink
+SdrItemBrowser
+SdrOleLink
+SpellCache
+SvFileObject
+WrongList
+WrongRanges
+XIOCompat
+_SdrItemBrowserControl
+_SdrItemBrowserWindow
++FmXGridPeer
++FmXGridControl
+FmX
+FmExp
+ODatabaseForm
+WEP
+LIBMAIN
+LibMain
+??_5
+??_7
+??_8
+??_9
+??_C
+??_E
+??_F
+??_G
+??_H
+??_I
+__CT
diff --git a/binfilter/bf_svx/util/dl.flt b/binfilter/bf_svx/util/dl.flt
new file mode 100644
index 000000000000..5194b781bd59
--- /dev/null
+++ b/binfilter/bf_svx/util/dl.flt
@@ -0,0 +1,138 @@
+lcl
++getImplementation
+Impl
+IMPL
+START
+CharAttribList
+CharPosArray
+ContentAttribs
+ContentAttribsInfo
+ContentInfo
+ContentNode
+DeletedNodeInfo
+EditAttrib
+EditCharAttrib
+EditDbg
+EditDoc
+EditEngineItemPool
+EditHTMLParser
+EditLine
+EditNodeIdx
+EditPaM
+EditPosition
+EditRTFParser
+EditSel
+EditSpellWrapper
+EditStyleSheet
+EditUndoConnectParas
+EditUndoDelContent
+EditUndoInsertChars
+EditUndoInsertFeature
+EditUndoManager
+EditUndoMoveParagraphs
+EditUndoRemoveChars
+EditUndoRemoveFeature
+EditUndoSetAttribs
+EditUndoSetParaAttribs
+EditUndoSetStyleSheet
+GlobalEditData
+IdleFormattter
+ImpEditEngine
+ImpEditView
+InternalEditStatus
+ParaPortion
+ParagraphList
+RTFPardAttrMapIds
+RTFPlainAttrMapIds
+SelRange
+SortedPositions_SAR
+SvxACorrChars
+SvxColorList
+SvxFontTable
+SvxRTFStyleType
+SvxTabStopArr_SAR
+TextPortionList
+XEditAttrib
+XParaPortionList
+BinTextObject
+DialogsResMgr
+E3dDragMethod
+E3dTriangle
+GetImp
+ImpA
+ImpB
+ImpBrw
+ImpC
+ImpCheck
+ImpColor
+ImpD
+ImpDrag
+ImpEdCtrl
+ImpEdit
+ImpF
++ImpGetResStr
+ImpGet
+ImpH
+ImpHide
+ImpI
+ImpItem
+ImpJ
+ImpL
+ImpList
+ImpM
+ImpMulti
+ImportInfo
+ImpP
+ImpPaint
+ImpPast
+ImpRecalc
+ImpReset
+ImpRemove
+ImpRef
+ImpReset
+ImpS
+ImpScroll
+ImpSdrGDIMetaFileImport
+ImpSet
+ImpShow
+ImpT
+ImpX
+OLUndoAttr
+OLUndoDepth
+OLUndoExpand
+OLUndoHeight
+OutlinerEditEng
+SdrGraphicLink
+SdrItemBrowser
+SdrOleLink
+SpellCache
+SvFileObject
+WrongList
+WrongRanges
+XIOCompat
+_SdrItemBrowserControl
+_SdrItemBrowserWindow
++FmXGridControl
++FmXGridPeer
+FmX
+FmExp
+ODatabaseForm
+WEP
+LIBMAIN
+LibMain
+??_5
+??_7
+??_8
+??_9
+??_C
+??_E
+??_F
+??_G
+??_H
+??_I
+___CT
+_alloc
+_CT
+exception::exception
+_TI2
+___CT
diff --git a/binfilter/bf_svx/util/gal.dxp b/binfilter/bf_svx/util/gal.dxp
new file mode 100644
index 000000000000..227006cc4e9f
--- /dev/null
+++ b/binfilter/bf_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/binfilter/bf_svx/util/hidother.hrc b/binfilter/bf_svx/util/hidother.hrc
new file mode 100644
index 000000000000..209e5fe97ce3
--- /dev/null
+++ b/binfilter/bf_svx/util/hidother.hrc
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define HID_INTERFACE_BASIDE_VIEWSH 451
diff --git a/binfilter/bf_svx/util/makefile.mk b/binfilter/bf_svx/util/makefile.mk
new file mode 100644
index 000000000000..26bca9ccbc06
--- /dev/null
+++ b/binfilter/bf_svx/util/makefile.mk
@@ -0,0 +1,145 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+PRJ=..$/..
+BFPRJ=..
+
+PRJNAME=binfilter
+TARGET=bf_svx
+
+NO_HIDS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+INC+= -I$(PRJ)$/inc$/bf_svx
+
+# --- Svx - DLL ----------
+
+SHL1TARGET= bf_svx$(DLLPOSTFIX)
+SHL1IMPLIB= bf_svx
+SHL1BASE = 0x1d800000
+
+SHL1STDLIBS= \
+ $(BFSVTOOLLIB) \
+ $(BFXMLOFFLIB) \
+ $(BFGOODIESLIB) \
+ $(BFBASICLIB) \
+ $(BFSO3LIB) \
+ $(TKLIB) \
+ $(VCLLIB) \
+ $(SOTLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(COMPHELPERLIB) \
+ $(UCBHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB) \
+ $(SALHELPERLIB) \
+ $(ICUUCLIB)\
+ $(LEGACYSMGRLIB) \
+ $(SVTOOLLIB) \
+ $(XMLSCRIPTLIB)
+
+.IF "$(GUI)"=="WNT"
+
+SHL1STDLIBS+=\
+ $(OLEAUT32LIB) \
+ $(UWINAPILIB) \
+ $(ADVAPI32LIB) \
+ $(SHELL32LIB) \
+ $(GDI32LIB) \
+ $(OLE32LIB) \
+ $(UUIDLIB)
+
+SHL1STDLIBS+=\
+ $(SHELLLIB)
+
+SHL1DEPN= $(SLB)$/svx_svx.lib
+.ENDIF # WNT
+
+SHL1LIBS= $(SLB)$/svx_svx.lib
+
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+DEF1NAME =$(SHL1TARGET)
+DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
+DEFLIB1NAME=svx_svx
+DEF1DES = Rtf, Edt, Outliner, SvDraw, Form, Fmcomp, Engine3D, MSFilter
+# THB: exports list svx checked for 6.0 Final 6.12.2001
+DEF1EXPORTFILE = svx.dxp
+
+LIB1TARGET =$(SLB)$/svx_svx.lib
+LIB1FILES = \
+ $(SLB)$/svx_dialogs.lib \
+ $(SLB)$/svx_editeng.lib \
+ $(SLB)$/svx_engine3d.lib \
+ $(SLB)$/svx_form.lib \
+ $(SLB)$/svx_items.lib \
+ $(SLB)$/svx_options.lib \
+ $(SLB)$/svx_outliner.lib \
+ $(SLB)$/svx_svdraw.lib \
+ $(SLB)$/svx_svxlink.lib \
+ $(SLB)$/svx_unodraw.lib \
+ $(SLB)$/svx_unoedit.lib \
+ $(SLB)$/svx_xml.lib \
+ $(SLB)$/svx_xout.lib \
+ $(SLB)$/bf_sfx.lib
+
+.IF "(GUIBASE)" == "WIN"
+LIB1FILES += \
+ $(SLB)$/ibrwimp.lib
+.ENDIF
+
+
+SRS1FILELIST=\
+ $(SRS)$/svx_svdstr.srs \
+ $(SRS)$/svx_editeng.srs \
+ $(SRS)$/svx_outliner.srs \
+ $(SRS)$/svx_dialogs.srs \
+ $(SRS)$/svx_drawdlgs.srs \
+ $(SRS)$/svx_svxitems.srs \
+ $(SRS)$/svx_engine3d.srs \
+ $(SRS)$/svx_svxlink.srs
+
+RESLIB1NAME=bf_svx
+RESLIB1SRSFILES= $(SRS1FILELIST)
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+$(MISC)$/$(SHL1TARGET).flt: makefile.mk
+ @echo ------------------------------
+ @echo Making: $@
+ $(TYPE) bf_svx.flt >$@
+ $(TYPE) bf_sfxwin.flt > $@
+
diff --git a/binfilter/bf_svx/util/makefile.pmk b/binfilter/bf_svx/util/makefile.pmk
new file mode 100644
index 000000000000..7653d1c09c73
--- /dev/null
+++ b/binfilter/bf_svx/util/makefile.pmk
@@ -0,0 +1,28 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+
diff --git a/binfilter/bf_svx/util/svx.dxp b/binfilter/bf_svx/util/svx.dxp
new file mode 100644
index 000000000000..9630d7e06768
--- /dev/null
+++ b/binfilter/bf_svx/util/svx.dxp
@@ -0,0 +1,3 @@
+component_getImplementationEnvironment
+component_writeInfo
+component_getFactory
diff --git a/binfilter/bf_svx/util/svx_hidother.src b/binfilter/bf_svx/util/svx_hidother.src
new file mode 100644
index 000000000000..721da4400374
--- /dev/null
+++ b/binfilter/bf_svx/util/svx_hidother.src
@@ -0,0 +1,388 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define NO_LOCALIZE_EXPORT
+#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_COLOR_CTRL { HelpID = HID_POPUP_COLOR_CTRL; };
+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_ESCAPE_PROCESSING { HelpID = HID_PROP_ESCAPE_PROCESSING; };
+hidspecial HID_PROP_IMAGE_ALIGN { HelpID = HID_PROP_IMAGE_ALIGN; };
+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_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_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_APPROVEPARAMETER { HelpID =HID_EVT_APPROVEPARAMETER ;};
+hidspecial HID_EVT_POSITIONING { HelpID =HID_EVT_POSITIONING ;};
+hidspecial HID_EVT_APPROVEROWCHANGE { HelpID =HID_EVT_APPROVEROWCHANGE ;};
+hidspecial HID_EVT_ROWCHANGE { HelpID =HID_EVT_ROWCHANGE ;};
+hidspecial HID_EVT_RELOADING { HelpID =HID_EVT_RELOADING ;};
+hidspecial HID_EVT_UNLOADING { HelpID =HID_EVT_UNLOADING ;};
+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_EVT_ADJUSTMENTVALUECHANGED { HelpID =HID_EVT_ADJUSTMENTVALUECHANGED ;};
+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_PROP_DLG_NUMBER_FORMAT { HelpID = UID_PROP_DLG_NUMBER_FORMAT ;};
+hidspecial UID_EVT_MACRODLG { HelpID = UID_EVT_MACRODLG ;};
+hidspecial UID_PROP_DLG_CONTROLLABEL { HelpID = UID_PROP_DLG_CONTROLLABEL ;};
+hidspecial UID_PROP_DLG_FILLCOLOR { HelpID = UID_PROP_DLG_FILLCOLOR ;};
+
+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_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_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_CHGTOENEMDASH HID_AUTOCORR_HELP_START+7
+#define HID_AUTOCORR_HELP_WORDENEMDASH HID_AUTOCORR_HELP_START+8
+#define HID_AUTOCORR_HELP_SENTENEMDASH HID_AUTOCORR_HELP_START+9
+#define HID_AUTOCORR_HELP_SENTWORDENEMDASH HID_AUTOCORR_HELP_START+10
+#define HID_AUTOCORR_HELP_ACORWORDENEMDASH HID_AUTOCORR_HELP_START+11
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT HID_AUTOCORR_HELP_START+12
+#define HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH HID_AUTOCORR_HELP_START+13
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT HID_AUTOCORR_HELP_START+14
+#define HID_AUTOCORR_HELP_CHGQUOTES HID_AUTOCORR_HELP_START+15
+#define HID_AUTOCORR_HELP_CHGSGLQUOTES HID_AUTOCORR_HELP_START+16
+#define HID_AUTOCORR_HELP_SETINETATTR HID_AUTOCORR_HELP_START+17
+#define HID_AUTOCORR_HELP_INGNOREDOUBLESPACE HID_AUTOCORR_HELP_START+18
+#define HID_AUTOCORR_HELP_CHGWEIGHTUNDERL HID_AUTOCORR_HELP_START+19
+#define HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL HID_AUTOCORR_HELP_START+20
+#define HID_AUTOCORR_HELP_CHGORDINALNUMBER HID_AUTOCORR_HELP_START+21
+
+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_CHGTOENEMDASH { HelpID = HID_AUTOCORR_HELP_CHGTOENEMDASH;};
+hidspecial HID_AUTOCORR_HELP_WORDENEMDASH { HelpID = HID_AUTOCORR_HELP_WORDENEMDASH;};
+hidspecial HID_AUTOCORR_HELP_SENTENEMDASH { HelpID = HID_AUTOCORR_HELP_SENTENEMDASH;};
+hidspecial HID_AUTOCORR_HELP_SENTWORDENEMDASH { HelpID = HID_AUTOCORR_HELP_SENTWORDENEMDASH;};
+hidspecial HID_AUTOCORR_HELP_ACORWORDENEMDASH { HelpID = HID_AUTOCORR_HELP_ACORWORDENEMDASH;};
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT { HelpID = HID_AUTOCORR_HELP_START+4;};
+hidspecial HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH { HelpID = HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH;};
+// 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_CHGORDINALNUMBER { HelpID = HID_AUTOCORR_HELP_CHGORDINALNUMBER;};
+
+hidspecial HID_CLB_EDIT_MODULES_DICS { HelpID = HID_CLB_EDIT_MODULES_DICS ;};
+hidspecial HID_CLB_EDIT_MODULES_MODULES { HelpID = HID_CLB_EDIT_MODULES_MODULES ;};
+hidspecial HID_CLB_LINGU_MODULES { HelpID = HID_CLB_LINGU_MODULES ;};
+hidspecial HID_CLB_LINGU_OPTIONS { HelpID = HID_CLB_LINGU_OPTIONS ;};
+
+hidspecial SID_DSBROWSER_EXPLORER { HelpID = SID_DSBROWSER_EXPLORER ;};
+
+hidspecial UID_FORMPROPBROWSER_FRAME { HelpID = UID_FORMPROPBROWSER_FRAME ;};
+
+hidspecial HID_WARN_NAME_DUPLICATE { HelpID = HID_WARN_NAME_DUPLICATE ;};
+
+hidspecial HID_GALLERY_NEWTHEME { HelpID = HID_GALLERY_NEWTHEME ;};
+hidspecial HID_GALLERY_THEMELIST { HelpID = HID_GALLERY_THEMELIST ;};
+
+hidspecial HID_GALLERY_ICONVIEW { HelpID = HID_GALLERY_ICONVIEW ;};
+hidspecial HID_GALLERY_LISTVIEW { HelpID = HID_GALLERY_LISTVIEW ;};
+hidspecial HID_OPTIONS_COLORCONFIG_SAVE_SCHEME { HelpID = HID_OPTIONS_COLORCONFIG_SAVE_SCHEME ;};
+hidspecial HID_OPTIONS_COLORCONFIG_COLORLIST_WIN { HelpID = HID_OPTIONS_COLORCONFIG_COLORLIST_WIN ;};
+
+hidspecial HID_FILL_ATTR_LISTBOX { HelpID = HID_FILL_ATTR_LISTBOX ;};
+hidspecial HID_FILL_TYPE_LISTBOX { HelpID = HID_FILL_TYPE_LISTBOX ;};
+hidspecial HID_OPTIONS_COLORCONFIG_NAME_SCHEME { HelpID = HID_OPTIONS_COLORCONFIG_NAME_SCHEME ;};
+
+//HID_AUTOCORR_HELP_END
+
+hidspecial HID_OPTIONS_PATHS_SELECTFOLDER { HelpID = HID_OPTIONS_PATHS_SELECTFOLDER; };
+hidspecial HID_GALLERY_NEWTHEME_FINDFILES { HelpID = HID_GALLERY_NEWTHEME_FINDFILES; };
+hidspecial HID_GALLERY_NEWTHEME_ADDFILES { HelpID = HID_GALLERY_NEWTHEME_ADDFILES; };
+hidspecial HID_NUMBERINGOPT_SEL_GRF_FROM_FILE { HelpID = HID_NUMBERINGOPT_SEL_GRF_FROM_FILE; };
+hidspecial HID_REDLINING_VIEW_DG_VIEW_TABLE { HelpID = HID_REDLINING_VIEW_DG_VIEW_TABLE ; };
+hidspecial HID_REDLINING_VIEW_DG_VIEW_HEADER { HelpID = HID_REDLINING_VIEW_DG_VIEW_HEADER; };
+
+hidspecial HID_SPLDLG_BUTTON_CLOSE { HelpID = HID_SPLDLG_BUTTON_CLOSE ; };
+hidspecial HID_SPLDLG_BUTTON_IGNORE { HelpID = HID_SPLDLG_BUTTON_IGNORE ; };
+hidspecial HID_SPLDLG_BUTTON_IGNOREALL { HelpID = HID_SPLDLG_BUTTON_IGNOREALL ; };
+hidspecial HID_SPLDLG_BUTTON_CHANGE { HelpID = HID_SPLDLG_BUTTON_CHANGE ; };
+hidspecial HID_SPLDLG_BUTTON_CHANGEALL { HelpID = HID_SPLDLG_BUTTON_CHANGEALL ; };
+hidspecial HID_HANGULDLG_BUTTON_CLOSE { HelpID = HID_HANGULDLG_BUTTON_CLOSE ; };
+hidspecial HID_HANGULDLG_BUTTON_IGNORE { HelpID = HID_HANGULDLG_BUTTON_IGNORE ; };
+hidspecial HID_HANGULDLG_BUTTON_IGNOREALL { HelpID = HID_HANGULDLG_BUTTON_IGNOREALL; };
+hidspecial HID_HANGULDLG_BUTTON_CHANGE { HelpID = HID_HANGULDLG_BUTTON_CHANGE ; };
+hidspecial HID_HANGULDLG_BUTTON_CHANGEALL { HelpID = HID_HANGULDLG_BUTTON_CHANGEALL; };
+
+hidspecial HID_SPLDLG_EDIT_NEWWORD { HelpID = HID_SPLDLG_EDIT_NEWWORD ; };
+hidspecial HID_HANGULDLG_EDIT_NEWWORD { HelpID = HID_HANGULDLG_EDIT_NEWWORD ; };
+
+
diff --git a/binfilter/bf_svx/util/svx_svxpch.cxx b/binfilter/bf_svx/util/svx_svxpch.cxx
new file mode 100644
index 000000000000..ddb799c0c083
--- /dev/null
+++ b/binfilter/bf_svx/util/svx_svxpch.cxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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 <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>
+
+namespace binfilter {
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */