summaryrefslogtreecommitdiff
path: root/zlib
ModeNameSize
-rw-r--r--README49logplain
-rwxr-xr-xmake_patched_header.pl2058logplain
-rw-r--r--makefile.mk2149logplain
d---------prj103logplain
-rw-r--r--zlib-dmakebuild.patch1674logplain
td>
-rw-r--r--sw/inc/IDocumentContentOperations.hxx206
-rwxr-xr-xsw/inc/IDocumentDeviceAccess.hxx148
-rw-r--r--sw/inc/IDocumentDrawModelAccess.hxx114
-rw-r--r--sw/inc/IDocumentExternalData.hxx72
-rw-r--r--sw/inc/IDocumentFieldsAccess.hxx194
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx81
-rw-r--r--sw/inc/IDocumentLineNumberAccess.hxx54
-rw-r--r--sw/inc/IDocumentLinksAdministration.hxx97
-rw-r--r--sw/inc/IDocumentListItems.hxx64
-rw-r--r--sw/inc/IDocumentListsAccess.hxx60
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx247
-rw-r--r--sw/inc/IDocumentOutlineNodes.hxx60
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx262
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx215
-rw-r--r--sw/inc/IDocumentState.hxx90
-rw-r--r--sw/inc/IDocumentStatistics.hxx63
-rw-r--r--sw/inc/IDocumentStylePoolAccess.hxx90
-rw-r--r--sw/inc/IDocumentTimerAccess.hxx63
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx196
-rw-r--r--sw/inc/IGrammarContact.hxx90
-rw-r--r--sw/inc/IInterface.hxx70
-rw-r--r--sw/inc/IMark.hxx115
-rw-r--r--sw/inc/PostItMgr.hxx273
-rw-r--r--sw/inc/RefreshListenerContainer.hxx41
-rw-r--r--sw/inc/SwAppletImpl.hxx82
-rw-r--r--sw/inc/SwCapObjType.hxx38
-rw-r--r--sw/inc/SwGetPoolIdFromName.hxx47
-rw-r--r--sw/inc/SwNodeNum.hxx121
-rw-r--r--sw/inc/SwNumberTree.hxx777
-rw-r--r--sw/inc/SwNumberTreeTypes.hxx42
-rw-r--r--sw/inc/SwRewriter.hxx53
-rw-r--r--sw/inc/SwSmartTagMgr.hxx68
-rw-r--r--sw/inc/SwStyleNameMapper.hxx207
-rw-r--r--sw/inc/SwUndoField.hxx88
-rw-r--r--sw/inc/SwUndoFmt.hxx253
-rw-r--r--sw/inc/SwUndoPageDesc.hxx93
-rw-r--r--sw/inc/SwUndoTOXChange.hxx50
-rw-r--r--sw/inc/SwXMLSectionList.hxx92
-rw-r--r--sw/inc/TextCursorHelper.hxx57
-rw-r--r--sw/inc/access.hrc64
-rw-r--r--sw/inc/accessibilityoptions.hxx56
-rw-r--r--sw/inc/accmap.hxx399
-rw-r--r--sw/inc/acmplwrd.hxx76
-rw-r--r--sw/inc/anchoreddrawobject.hxx226
-rw-r--r--sw/inc/anchoredobject.hxx645
-rw-r--r--sw/inc/authfld.hxx206
-rw-r--r--sw/inc/authratr.hxx57
-rw-r--r--sw/inc/bparr.hxx129
-rw-r--r--sw/inc/breakit.hxx125
-rw-r--r--sw/inc/calbck.hxx254
-rw-r--r--sw/inc/calc.hxx244
-rw-r--r--sw/inc/ccoll.hxx103
-rw-r--r--sw/inc/cellatr.hxx132
-rw-r--r--sw/inc/cellfml.hxx167
-rw-r--r--sw/inc/charatr.hxx181
-rw-r--r--sw/inc/charfmt.hxx64
-rw-r--r--sw/inc/chcmprse.hxx43
-rw-r--r--sw/inc/checkit.hxx57
-rw-r--r--sw/inc/chpfld.hxx103
-rw-r--r--sw/inc/chrdlg.hrc63
-rw-r--r--sw/inc/cmdid.h1314
-rw-r--r--sw/inc/colwd.hxx65
-rw-r--r--sw/inc/comcore.hrc125
-rw-r--r--sw/inc/crsrsh.hxx950
-rw-r--r--sw/inc/crsskip.hxx45
-rw-r--r--sw/inc/crstate.hxx220
-rw-r--r--sw/inc/cshtyp.hxx122
-rw-r--r--sw/inc/dbfld.hxx340
-rw-r--r--sw/inc/dbgoutsw.hxx132
-rw-r--r--sw/inc/dbmgr.hxx408
-rw-r--r--sw/inc/dbui.hrc129
-rw-r--r--sw/inc/dcontact.hxx564
-rw-r--r--sw/inc/ddefld.hxx120
-rw-r--r--sw/inc/dialog.hrc92
-rw-r--r--sw/inc/dlelstnr.hxx98
-rw-r--r--sw/inc/dobjfac.hxx50
-rw-r--r--sw/inc/doc.hxx2200
-rw-r--r--sw/inc/docary.hxx135
-rw-r--r--sw/inc/docfac.hxx51
-rw-r--r--sw/inc/dochdl.hrc59
-rw-r--r--sw/inc/docsh.hxx312
-rw-r--r--sw/inc/docstat.hxx58
-rw-r--r--sw/inc/docstyle.hxx248
-rw-r--r--sw/inc/docufld.hxx837
-rw-r--r--sw/inc/dpage.hxx67
-rw-r--r--sw/inc/drawdoc.hxx68
-rw-r--r--sw/inc/edglbldc.hxx80
-rw-r--r--sw/inc/edimp.hxx86
-rw-r--r--sw/inc/editsh.hxx986
-rw-r--r--sw/inc/envelp.hrc100
-rw-r--r--sw/inc/errhdl.hxx79
-rw-r--r--sw/inc/error.h53
-rw-r--r--sw/inc/expfld.hxx439
-rw-r--r--sw/inc/extinput.hxx62
-rw-r--r--sw/inc/fchrfmt.hxx86
-rw-r--r--sw/inc/fesh.hxx783
-rw-r--r--sw/inc/fldbas.hxx459
-rw-r--r--sw/inc/flddat.hxx151
-rw-r--r--sw/inc/flddropdown.hxx282
-rw-r--r--sw/inc/fldinit.hxx41
-rw-r--r--sw/inc/fldui.hrc295
-rw-r--r--sw/inc/fldupde.hxx42
-rw-r--r--sw/inc/flyenum.hxx58
-rw-r--r--sw/inc/flypos.hxx63
-rw-r--r--sw/inc/fmtanchr.hxx95
-rw-r--r--sw/inc/fmtautofmt.hxx78
-rw-r--r--sw/inc/fmtclbl.hxx57
-rw-r--r--sw/inc/fmtclds.hxx182
-rw-r--r--sw/inc/fmtcnct.hxx90
-rw-r--r--sw/inc/fmtcntnt.hxx69
-rw-r--r--sw/inc/fmtcol.hxx307
-rw-r--r--sw/inc/fmtcolfunc.hxx92
-rw-r--r--sw/inc/fmteiro.hxx63
-rw-r--r--sw/inc/fmtflcnt.hxx67
-rw-r--r--sw/inc/fmtfld.hxx122
-rw-r--r--sw/inc/fmtfollowtextflow.hxx69
-rw-r--r--sw/inc/fmtfordr.hxx75
-rw-r--r--sw/inc/fmtfsize.hxx116
-rw-r--r--sw/inc/fmtftn.hxx84
-rw-r--r--sw/inc/fmtftntx.hxx140
-rw-r--r--sw/inc/fmthdft.hxx117
-rw-r--r--sw/inc/fmtinfmt.hxx113
-rw-r--r--sw/inc/fmtline.hxx74
-rw-r--r--sw/inc/fmtlsplt.hxx61
-rwxr-xr-xsw/inc/fmtmeta.hxx218
-rw-r--r--sw/inc/fmtornt.hxx146
-rw-r--r--sw/inc/fmtpdsc.hxx102
-rw-r--r--sw/inc/fmtrfmrk.hxx67
-rw-r--r--sw/inc/fmtrowsplt.hxx61
-rw-r--r--sw/inc/fmtruby.hxx94
-rw-r--r--sw/inc/fmtsrnd.hxx96
-rw-r--r--sw/inc/fmtsrndenum.hxx44
-rw-r--r--sw/inc/fmtui.hrc92
-rw-r--r--sw/inc/fmturl.hxx95
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx80
-rw-r--r--sw/inc/format.hxx361
-rw-r--r--sw/inc/frmatr.hxx102
-rw-r--r--sw/inc/frmfmt.hxx315
-rw-r--r--sw/inc/ftnidx.hxx82
-rw-r--r--sw/inc/ftninfo.hxx120
-rw-r--r--sw/inc/globals.hrc292
-rw-r--r--sw/inc/globdoc.hxx56
-rw-r--r--sw/inc/grfatr.hxx373
-rw-r--r--sw/inc/helpid.h986
-rw-r--r--sw/inc/hfspacingitem.hxx62
-rw-r--r--sw/inc/hhcwrp.hxx124
-rw-r--r--sw/inc/hintids.hxx493
-rw-r--r--sw/inc/hints.hxx306
-rw-r--r--sw/inc/htmltbl.hxx494
-rw-r--r--sw/inc/index.hrc69
-rw-r--r--sw/inc/index.hxx220
-rw-r--r--sw/inc/inetfld.hxx112
-rw-r--r--sw/inc/init.hxx51
-rw-r--r--sw/inc/io.hxx179
-rw-r--r--sw/inc/iodetect.hxx130
-rw-r--r--sw/inc/istyleaccess.hxx72
-rw-r--r--sw/inc/itabenum.hxx57
-rw-r--r--sw/inc/lineinfo.hxx112
-rw-r--r--sw/inc/linkenum.hxx42
-rw-r--r--sw/inc/list.hxx77
-rw-r--r--sw/inc/listfunc.hxx41
-rw-r--r--sw/inc/makefile.mk53
-rw-r--r--sw/inc/mdiexp.hxx81
-rw-r--r--sw/inc/modcfg.hxx342
-rw-r--r--sw/inc/modeltoviewhelper.hxx114
-rw-r--r--sw/inc/ndarr.hxx347
-rw-r--r--sw/inc/ndgrf.hxx264
-rw-r--r--sw/inc/ndhints.hxx226
-rw-r--r--sw/inc/ndindex.hxx255
-rw-r--r--sw/inc/ndnotxt.hxx124
-rw-r--r--sw/inc/ndole.hxx174
-rw-r--r--sw/inc/ndtxt.hxx882
-rw-r--r--sw/inc/ndtyp.hxx72
-rw-r--r--sw/inc/newhdl.hxx76
-rw-r--r--sw/inc/node.hxx760
-rw-r--r--sw/inc/numrule.hxx377
-rw-r--r--sw/inc/pagedesc.hxx347
-rw-r--r--sw/inc/pageiter.hxx56
-rw-r--r--sw/inc/pagepreviewlayout.hxx624
-rw-r--r--sw/inc/pam.hxx282
-rw-r--r--sw/inc/paratr.hxx281
-rw-r--r--sw/inc/pausethreadstarting.hxx51
-rw-r--r--sw/inc/pch/precompiled_sw.cxx32
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1010
-rw-r--r--sw/inc/poolfmt.awk73
-rw-r--r--sw/inc/poolfmt.hrc284
-rw-r--r--sw/inc/poolfmt.hxx446
-rw-r--r--sw/inc/postit.hxx417
-rw-r--r--sw/inc/postithelper.hxx142
-rw-r--r--sw/inc/printdata.hxx146
-rw-r--r--sw/inc/pvprtdat.hxx82
-rw-r--r--sw/inc/rcid.hrc271
-rw-r--r--sw/inc/redline.hxx317
-rw-r--r--sw/inc/redlnaut.hxx57
-rw-r--r--sw/inc/reffld.hxx165
-rw-r--r--sw/inc/ring.hxx55
-rw-r--r--sw/inc/rolbck.hxx474
-rw-r--r--sw/inc/rubylist.hxx57
-rw-r--r--sw/inc/section.hxx305
-rw-r--r--sw/inc/shellid.hxx76
-rw-r--r--sw/inc/shellio.hxx678
-rw-r--r--sw/inc/shellres.hxx121
-rw-r--r--sw/inc/sortopt.hxx72
-rw-r--r--sw/inc/splargs.hxx183
-rw-r--r--sw/inc/statstr.hrc57
-rw-r--r--sw/inc/stringhash.hxx107
-rw-r--r--sw/inc/sw.mk44
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx50
-rw-r--r--sw/inc/swabstdlg.hxx501
-rw-r--r--sw/inc/swacorr.hxx62
-rw-r--r--sw/inc/swatrset.hxx356
-rw-r--r--sw/inc/swbaslnk.hxx98
-rw-r--r--sw/inc/swcalwrp.hxx58
-rw-r--r--sw/inc/swcli.hxx61
-rw-r--r--sw/inc/swcrsr.hxx312
-rw-r--r--sw/inc/swdbdata.hxx52
-rw-r--r--sw/inc/swdbtoolsclient.hxx79
-rw-r--r--sw/inc/swddetbl.hxx64
-rw-r--r--sw/inc/swdll.hxx72
-rw-r--r--sw/inc/swdllapi.h13
-rw-r--r--sw/inc/swerror.h115
-rw-r--r--sw/inc/swevent.hxx132
-rw-r--r--sw/inc/swfltopt.hxx45
-rw-r--r--sw/inc/swgstr.hxx151
-rw-r--r--sw/inc/swhints.hxx39
-rw-r--r--sw/inc/swmodule.hxx278
-rw-r--r--sw/inc/swpre.mk50
-rw-r--r--sw/inc/swprtopt.hxx101
-rw-r--r--sw/inc/swrect.hxx380
-rw-r--r--sw/inc/swregion.hxx60
-rw-r--r--sw/inc/swserv.hxx96
-rw-r--r--sw/inc/swstyle.h44
-rw-r--r--sw/inc/swtable.hxx474
-rw-r--r--sw/inc/swtblfmt.hxx102
-rw-r--r--sw/inc/swtypes.hxx341
-rw-r--r--sw/inc/swundo.hxx203
-rw-r--r--sw/inc/swunodef.hxx39
-rw-r--r--sw/inc/swunohelper.hxx84
-rw-r--r--sw/inc/swurl.hxx49
-rw-r--r--sw/inc/swwait.hxx47
-rw-r--r--sw/inc/tabcol.hxx110
-rw-r--r--sw/inc/tblafmt.hxx273
-rw-r--r--sw/inc/tblenum.hxx82
-rw-r--r--sw/inc/tblsel.hxx233
-rw-r--r--sw/inc/tgrditem.hxx123
-rw-r--r--sw/inc/tox.hxx772
-rw-r--r--sw/inc/toxe.hxx128
-rw-r--r--sw/inc/toxinit.hxx40
-rw-r--r--sw/inc/toxwrap.hxx80
-rw-r--r--sw/inc/txatbase.hxx255
-rw-r--r--sw/inc/txatritr.hxx102
-rw-r--r--sw/inc/txtatr.hxx130
-rw-r--r--sw/inc/txtflcnt.hxx71
-rw-r--r--sw/inc/txtfld.hxx83
-rw-r--r--sw/inc/txtftn.hxx84
-rw-r--r--sw/inc/txtinet.hxx84
-rw-r--r--sw/inc/txtrfmrk.hxx64
-rw-r--r--sw/inc/txttxmrk.hxx68
-rw-r--r--sw/inc/undobj.hxx1999
-rw-r--r--sw/inc/unoatxt.hxx309
-rw-r--r--sw/inc/unobaseclass.hxx47
-rw-r--r--sw/inc/unochart.hxx430
-rw-r--r--sw/inc/unocoll.hxx584
-rw-r--r--sw/inc/unocore.hrc51
-rw-r--r--sw/inc/unocrsr.hxx125
-rw-r--r--sw/inc/unocrsrhelper.hxx107
-rw-r--r--sw/inc/unodraw.hxx356
-rw-r--r--sw/inc/unoevent.hxx121
-rw-r--r--sw/inc/unoevtlstnr.hxx61
-rw-r--r--sw/inc/unofield.hxx329
-rw-r--r--sw/inc/unoflatpara.hxx140
-rw-r--r--sw/inc/unoframe.hxx361
-rw-r--r--sw/inc/unoidx.hxx342
-rw-r--r--sw/inc/unomailmerge.hxx209
-rw-r--r--sw/inc/unomap.hxx350
-rw-r--r--sw/inc/unomid.h160
-rw-r--r--sw/inc/unomod.hxx213
-rw-r--r--sw/inc/unoobj.hxx1493
-rw-r--r--sw/inc/unoport.hxx328
-rw-r--r--sw/inc/unoprnms.hxx843
-rw-r--r--sw/inc/unoredline.hxx157
-rw-r--r--sw/inc/unoredlines.hxx107
-rw-r--r--sw/inc/unosett.hxx329
-rw-r--r--sw/inc/unosrch.hxx139
-rw-r--r--sw/inc/unostyle.hxx470
-rw-r--r--sw/inc/unotbl.hxx611
-rw-r--r--sw/inc/unotextmarkup.hxx114
-rw-r--r--sw/inc/unotxdoc.hxx572
-rw-r--r--sw/inc/usrfld.hxx135
-rw-r--r--sw/inc/viewopt.hxx606
-rw-r--r--sw/inc/viewsh.hxx646
-rw-r--r--sw/inc/viscrs.hxx228
-rw-r--r--sw/inc/warnpassword.hxx50
-rw-r--r--sw/inc/wdocsh.hxx66
-rw-r--r--sw/prj/build.lst75
-rw-r--r--sw/prj/d.lst112
-rw-r--r--sw/qa/complex/accessibility/AccessibleRelationSet.java255
-rw-r--r--sw/qa/complex/accessibility/makefile.mk61
-rwxr-xr-xsw/qa/complex/checkColor/CheckChangeColor.java90
-rwxr-xr-xsw/qa/complex/checkColor/makefile.mk79
-rwxr-xr-xsw/qa/complex/indeterminateState/CheckIndeterminateState.java139
-rwxr-xr-xsw/qa/complex/indeterminateState/makefile.mk86
-rw-r--r--sw/qa/complex/writer/CheckBookmarks.java280
-rw-r--r--sw/qa/complex/writer/CheckCrossReferences.java369
-rw-r--r--sw/qa/complex/writer/CheckFlies.java236
-rwxr-xr-xsw/qa/complex/writer/CheckIndexedPropertyValues.java185
-rwxr-xr-xsw/qa/complex/writer/CheckNamedPropertyValues.java199
-rwxr-xr-xsw/qa/complex/writer/TextPortionEnumerationTest.java3858
-rwxr-xr-xsw/qa/complex/writer/makefile.mk112
-rw-r--r--sw/qa/complex/writer/testdocuments/CheckCrossReferences.odtbin0 -> 11628 bytes-rw-r--r--sw/qa/complex/writer/testdocuments/CheckFlies.odtbin0 -> 65022 bytes-rwxr-xr-xsw/qa/complex/writer/testdocuments/TESTMETA.odtbin0 -> 8678 bytes-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx880
-rw-r--r--sw/qa/core/bigpointerarray-new.cxx113
-rw-r--r--sw/qa/core/bigpointerarray-new.hxx162
-rw-r--r--sw/qa/core/export.exp1
-rw-r--r--sw/qa/core/export.map38
-rw-r--r--sw/qa/core/makefile.mk81
-rw-r--r--sw/qa/core/performance-jobfile9
-rw-r--r--sw/qa/unoapi/knownissues.xcl153
-rw-r--r--sw/qa/unoapi/lastCheck.txt1
-rw-r--r--sw/qa/unoapi/makefile.mk43
-rw-r--r--sw/qa/unoapi/sw.sce94
-rw-r--r--sw/qa/unoapi/testdocuments/MailMerge.sxwbin0 -> 5391 bytes-rw-r--r--sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sdwbin0 -> 180736 bytes-rw-r--r--sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sxwbin0 -> 24763 bytes-rw-r--r--sw/qa/unoapi/testdocuments/XDocumentInsertable.sxwbin0 -> 4914 bytes-rw-r--r--sw/qa/unoapi/testdocuments/sForm.sxwbin0 -> 5568 bytes-rwxr-xr-xsw/sdi/_annotsh.sdi394
-rw-r--r--sw/sdi/_basesh.sdi528
-rw-r--r--sw/sdi/_beziers.sdi131
-rw-r--r--sw/sdi/_docsh.sdi144
-rw-r--r--sw/sdi/_drwbase.sdi142
-rw-r--r--sw/sdi/_formsh.sdi47
-rw-r--r--sw/sdi/_frmsh.sdi308
-rw-r--r--sw/sdi/_grfsh.sdi219
-rw-r--r--sw/sdi/_listsh.sdi114
-rw-r--r--sw/sdi/_mediash.sdi54
-rw-r--r--sw/sdi/_olesh.sdi38
-rw-r--r--sw/sdi/_tabsh.sdi412
-rw-r--r--sw/sdi/_textsh.sdi1590
-rw-r--r--sw/sdi/_viewsh.sdi777
-rwxr-xr-xsw/sdi/annotsh.sdi355
-rw-r--r--sw/sdi/basesh.sdi67
-rw-r--r--sw/sdi/beziersh.sdi138
-rw-r--r--sw/sdi/docsh.sdi86
-rw-r--r--sw/sdi/drawsh.sdi480
-rw-r--r--sw/sdi/drwbassh.sdi50
-rw-r--r--sw/sdi/drwtxtsh.sdi636
-rw-r--r--sw/sdi/formsh.sdi43
-rw-r--r--sw/sdi/frmsh.sdi59
-rw-r--r--sw/sdi/grfsh.sdi47
-rw-r--r--sw/sdi/listsh.sdi46
-rw-r--r--sw/sdi/makefile.mk106
-rw-r--r--sw/sdi/mediash.sdi45
-rw-r--r--sw/sdi/olesh.sdi44
-rw-r--r--sw/sdi/swinterf.c252
-rw-r--r--sw/sdi/switems.sdi85
-rw-r--r--sw/sdi/swpatch.txt21
-rw-r--r--sw/sdi/swriter.sdi10343
-rw-r--r--sw/sdi/swslots.hrc34
-rw-r--r--sw/sdi/swslots.sdi125
-rw-r--r--sw/sdi/swslots.src1495
-rw-r--r--sw/sdi/tabsh.sdi70
-rw-r--r--sw/sdi/textsh.sdi127
-rw-r--r--sw/sdi/viewsh.sdi333
-rw-r--r--sw/sdi/wbasesh.sdi47
-rw-r--r--sw/sdi/wbeziers.sdi41
-rw-r--r--sw/sdi/wdocsh.sdi63
-rw-r--r--sw/sdi/wdrwbase.sdi52
-rw-r--r--sw/sdi/wformsh.sdi43
-rw-r--r--sw/sdi/wfrmsh.sdi47
-rw-r--r--sw/sdi/wgrfsh.sdi46
-rw-r--r--sw/sdi/wlistsh.sdi44
-rw-r--r--sw/sdi/wolesh.sdi46
-rw-r--r--sw/sdi/wrtapp.sdi93
-rw-r--r--sw/sdi/wtabsh.sdi43
-rw-r--r--sw/sdi/wtextsh.sdi52
-rw-r--r--sw/sdi/wviewsh.sdi206
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx520
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx1425
-rw-r--r--sw/source/core/SwNumberTree/makefile.mk54
-rw-r--r--sw/source/core/access/acccell.cxx378
-rw-r--r--sw/source/core/access/acccell.hxx140
-rw-r--r--sw/source/core/access/acccontext.cxx1495
-rw-r--r--sw/source/core/access/acccontext.hxx437
-rw-r--r--sw/source/core/access/accdoc.cxx516
-rw-r--r--sw/source/core/access/accdoc.hxx216
-rw-r--r--sw/source/core/access/accembedded.cxx100
-rw-r--r--sw/source/core/access/accembedded.hxx72
-rw-r--r--sw/source/core/access/accfootnote.cxx160
-rw-r--r--sw/source/core/access/accfootnote.hxx87
-rw-r--r--sw/source/core/access/accframe.cxx506
-rw-r--r--sw/source/core/access/accframe.hxx188
-rw-r--r--sw/source/core/access/accframebase.cxx280
-rw-r--r--sw/source/core/access/accframebase.hxx73
-rw-r--r--sw/source/core/access/accfrmobj.cxx66
-rw-r--r--sw/source/core/access/accfrmobj.hxx220
-rw-r--r--sw/source/core/access/accfrmobjmap.cxx125
-rw-r--r--sw/source/core/access/accfrmobjmap.hxx107
-rw-r--r--sw/source/core/access/accfrmobjslist.cxx127
-rw-r--r--sw/source/core/access/accfrmobjslist.hxx147
-rw-r--r--sw/source/core/access/accgraphic.cxx100
-rw-r--r--sw/source/core/access/accgraphic.hxx72
-rw-r--r--sw/source/core/access/accheaderfooter.cxx148
-rw-r--r--sw/source/core/access/accheaderfooter.hxx88
-rw-r--r--sw/source/core/access/acchyperlink.cxx193
-rw-r--r--sw/source/core/access/acchyperlink.hxx94
-rw-r--r--sw/source/core/access/acchypertextdata.cxx58
-rw-r--r--sw/source/core/access/acchypertextdata.hxx54
-rw-r--r--sw/source/core/access/accmap.cxx2767
-rw-r--r--sw/source/core/access/accnotextframe.cxx278
-rw-r--r--sw/source/core/access/accnotextframe.hxx113
-rw-r--r--sw/source/core/access/accpage.cxx202
-rw-r--r--sw/source/core/access/accpage.hxx102
-rw-r--r--sw/source/core/access/accpara.cxx2582
-rw-r--r--sw/source/core/access/accpara.hxx449
-rw-r--r--sw/source/core/access/accportions.cxx751
-rw-r--r--sw/source/core/access/accportions.hxx179
-rw-r--r--sw/source/core/access/accpreview.cxx107
-rw-r--r--sw/source/core/access/accpreview.hxx79
-rw-r--r--sw/source/core/access/accselectionhelper.cxx336
-rw-r--r--sw/source/core/access/accselectionhelper.hxx84
-rw-r--r--sw/source/core/access/acctable.cxx1753
-rw-r--r--sw/source/core/access/acctable.hxx331
-rw-r--r--sw/source/core/access/acctextframe.cxx281
-rw-r--r--sw/source/core/access/acctextframe.hxx118
-rw-r--r--sw/source/core/access/makefile.mk102
-rw-r--r--sw/source/core/access/textmarkuphelper.cxx209
-rw-r--r--sw/source/core/access/textmarkuphelper.hxx79
-rw-r--r--sw/source/core/attr/calbck.cxx637
-rw-r--r--sw/source/core/attr/cellatr.cxx267
-rw-r--r--sw/source/core/attr/fmtfollowtextflow.cxx40
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx169
-rw-r--r--sw/source/core/attr/format.cxx697
-rw-r--r--sw/source/core/attr/hints.cxx323
-rw-r--r--sw/source/core/attr/makefile.mk59
-rw-r--r--sw/source/core/attr/swatrset.cxx407
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx98
-rw-r--r--sw/source/core/bastyp/bparr.cxx583
-rw-r--r--sw/source/core/bastyp/breakit.cxx189
-rw-r--r--sw/source/core/bastyp/calc.cxx1827
-rw-r--r--sw/source/core/bastyp/checkit.cxx54
-rw-r--r--sw/source/core/bastyp/index.cxx596
-rw-r--r--sw/source/core/bastyp/init.cxx921
-rw-r--r--sw/source/core/bastyp/makefile.mk83
-rw-r--r--sw/source/core/bastyp/ring.cxx128
-rw-r--r--sw/source/core/bastyp/swcache.cxx659
-rw-r--r--sw/source/core/bastyp/swrect.cxx328
-rw-r--r--sw/source/core/bastyp/swregion.cxx257
-rw-r--r--sw/source/core/bastyp/swtypes.cxx136
-rw-r--r--sw/source/core/bastyp/tabcol.cxx145
-rw-r--r--sw/source/core/crsr/BlockCursor.cxx109
-rw-r--r--sw/source/core/crsr/BlockCursor.hxx39
-rw-r--r--sw/source/core/crsr/IBlockCursor.hxx98
-rw-r--r--sw/source/core/crsr/bookmrk.cxx296
-rw-r--r--sw/source/core/crsr/callnk.cxx224
-rw-r--r--sw/source/core/crsr/callnk.hxx59
-rw-r--r--sw/source/core/crsr/crbm.cxx263
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx105
-rw-r--r--sw/source/core/crsr/crsrsh.cxx3510
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2191
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx100
-rw-r--r--sw/source/core/crsr/findattr.cxx1312
-rw-r--r--sw/source/core/crsr/findcoll.cxx122
-rw-r--r--sw/source/core/crsr/findfmt.cxx87
-rw-r--r--sw/source/core/crsr/findtxt.cxx707
-rw-r--r--sw/source/core/crsr/makefile.mk86
-rw-r--r--sw/source/core/crsr/pam.cxx1229
-rw-r--r--sw/source/core/crsr/paminit.cxx134
-rw-r--r--sw/source/core/crsr/swcrsr.cxx2305
-rw-r--r--sw/source/core/crsr/trvlcol.cxx136
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx360
-rw-r--r--sw/source/core/crsr/trvlreg.cxx294
-rw-r--r--sw/source/core/crsr/trvltbl.cxx934
-rw-r--r--sw/source/core/crsr/unocrsr.cxx283
-rw-r--r--sw/source/core/crsr/viscrs.cxx1019
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx1145
-rw-r--r--sw/source/core/doc/acmplwrd.cxx475
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx1107
-rw-r--r--sw/source/core/doc/doc.cxx2019
-rw-r--r--sw/source/core/doc/docbasic.cxx279
-rw-r--r--sw/source/core/doc/docbm.cxx1712
-rw-r--r--sw/source/core/doc/docchart.cxx280
-rw-r--r--sw/source/core/doc/doccomp.cxx1829
-rw-r--r--sw/source/core/doc/doccorr.cxx464
-rw-r--r--sw/source/core/doc/docdde.cxx419
-rw-r--r--sw/source/core/doc/docdesc.cxx1020
-rw-r--r--sw/source/core/doc/docdraw.cxx1086
-rw-r--r--sw/source/core/doc/docedt.cxx2806
-rw-r--r--sw/source/core/doc/docfld.cxx2819
-rw-r--r--sw/source/core/doc/docfly.cxx1069
-rw-r--r--sw/source/core/doc/docfmt.cxx2679
-rw-r--r--sw/source/core/doc/docftn.cxx503
-rw-r--r--sw/source/core/doc/docglbl.cxx852
-rw-r--r--sw/source/core/doc/docglos.cxx206
-rw-r--r--sw/source/core/doc/doclay.cxx2287
-rw-r--r--sw/source/core/doc/docnew.cxx1434
-rw-r--r--sw/source/core/doc/docnum.cxx2972
-rw-r--r--sw/source/core/doc/docredln.cxx3856
-rw-r--r--sw/source/core/doc/docruby.cxx367
-rw-r--r--sw/source/core/doc/docsort.cxx1022
-rw-r--r--sw/source/core/doc/docstat.cxx70
-rw-r--r--sw/source/core/doc/doctxm.cxx2476
-rw-r--r--sw/source/core/doc/docxforms.cxx126
-rw-r--r--sw/source/core/doc/extinput.cxx295
-rw-r--r--sw/source/core/doc/fmtcol.cxx720
-rw-r--r--sw/source/core/doc/ftnidx.cxx401
-rw-r--r--sw/source/core/doc/gctable.cxx454
-rw-r--r--sw/source/core/doc/htmltbl.cxx1926
-rw-r--r--sw/source/core/doc/lineinfo.cxx157
-rw-r--r--sw/source/core/doc/list.cxx306
-rw-r--r--sw/source/core/doc/makefile.mk96
-rw-r--r--sw/source/core/doc/notxtfrm.cxx1108
-rw-r--r--sw/source/core/doc/number.cxx1666
-rw-r--r--sw/source/core/doc/poolfmt.cxx2601
-rw-r--r--sw/source/core/doc/sortopt.cxx106
-rw-r--r--sw/source/core/doc/swserv.cxx374
-rw-r--r--sw/source/core/doc/swstylemanager.cxx176
-rw-r--r--sw/source/core/doc/swstylemanager.hxx41
-rw-r--r--sw/source/core/doc/tblafmt.cxx1109
-rw-r--r--sw/source/core/doc/tblcpy.cxx1103
-rw-r--r--sw/source/core/doc/tblrwcl.cxx4772
-rw-r--r--sw/source/core/doc/visiturl.cxx142
-rw-r--r--sw/source/core/docnode/cancellablejob.cxx43
-rw-r--r--sw/source/core/docnode/cancellablejob.hxx56
-rw-r--r--sw/source/core/docnode/finalthreadmanager.cxx552
-rw-r--r--sw/source/core/docnode/makefile.mk86
-rw-r--r--sw/source/core/docnode/ndcopy.cxx1624
-rw-r--r--sw/source/core/docnode/ndindex.cxx171
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx310
-rw-r--r--sw/source/core/docnode/ndnum.cxx228
-rw-r--r--sw/source/core/docnode/ndsect.cxx1506
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4630
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx1608
-rw-r--r--sw/source/core/docnode/node.cxx2144
-rw-r--r--sw/source/core/docnode/node2lay.cxx408
-rw-r--r--sw/source/core/docnode/nodes.cxx2687
-rw-r--r--sw/source/core/docnode/observablethread.cxx100
-rw-r--r--sw/source/core/docnode/pausethreadstarting.cxx58
-rw-r--r--sw/source/core/docnode/retrievedinputstreamdata.cxx170
-rw-r--r--sw/source/core/docnode/retrieveinputstream.cxx89
-rw-r--r--sw/source/core/docnode/retrieveinputstreamconsumer.cxx75
-rw-r--r--sw/source/core/docnode/section.cxx1701
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx535
-rw-r--r--sw/source/core/docnode/swthreadjoiner.cxx64
-rw-r--r--sw/source/core/docnode/swthreadmanager.cxx96
-rw-r--r--sw/source/core/docnode/threadlistener.cxx60
-rw-r--r--sw/source/core/docnode/threadmanager.cxx261
-rw-r--r--sw/source/core/draw/dcontact.cxx2839
-rw-r--r--sw/source/core/draw/dflyobj.cxx967
-rw-r--r--sw/source/core/draw/dobjfac.cxx60
-rw-r--r--sw/source/core/draw/dpage.cxx268
-rw-r--r--sw/source/core/draw/drawdoc.cxx243
-rw-r--r--sw/source/core/draw/dview.cxx1123
-rw-r--r--sw/source/core/draw/makefile.mk64
-rw-r--r--sw/source/core/edit/acorrect.cxx529
-rw-r--r--sw/source/core/edit/autofmt.cxx2823
-rw-r--r--sw/source/core/edit/edatmisc.cxx192
-rw-r--r--sw/source/core/edit/edattr.cxx653
-rw-r--r--sw/source/core/edit/eddel.cxx357
-rw-r--r--sw/source/core/edit/edfcol.cxx164
-rw-r--r--sw/source/core/edit/edfld.cxx600
-rw-r--r--sw/source/core/edit/edfldexp.cxx104
-rw-r--r--sw/source/core/edit/edfmt.cxx200
-rw-r--r--sw/source/core/edit/edglbldc.cxx407
-rw-r--r--sw/source/core/edit/edglss.cxx376
-rw-r--r--sw/source/core/edit/editsh.cxx1200
-rw-r--r--sw/source/core/edit/edlingu.cxx1920
-rw-r--r--sw/source/core/edit/ednumber.cxx838
-rw-r--r--sw/source/core/edit/edredln.cxx153
-rw-r--r--sw/source/core/edit/edsect.cxx459
-rw-r--r--sw/source/core/edit/edtab.cxx495
-rw-r--r--sw/source/core/edit/edtox.cxx484
-rw-r--r--sw/source/core/edit/edundo.cxx283
-rw-r--r--sw/source/core/edit/edws.cxx388
-rw-r--r--sw/source/core/edit/makefile.mk75
-rw-r--r--sw/source/core/except/dbgloop.cxx171
-rw-r--r--sw/source/core/except/errhdl.cxx144
-rw-r--r--sw/source/core/except/makefile.mk66
-rw-r--r--sw/source/core/fields/authfld.cxx834
-rw-r--r--sw/source/core/fields/cellfml.cxx1234
-rw-r--r--sw/source/core/fields/chpfld.cxx312
-rw-r--r--sw/source/core/fields/dbfld.cxx1075
-rw-r--r--sw/source/core/fields/ddefld.cxx453
-rw-r--r--sw/source/core/fields/ddetbl.cxx190
-rw-r--r--sw/source/core/fields/docufld.cxx2757
-rw-r--r--sw/source/core/fields/expfld.cxx1332
-rw-r--r--sw/source/core/fields/fldbas.cxx803
-rw-r--r--sw/source/core/fields/flddat.cxx324
-rw-r--r--sw/source/core/fields/flddropdown.cxx287
-rw-r--r--sw/source/core/fields/fldlst.cxx236
-rw-r--r--sw/source/core/fields/macrofld.cxx269
-rw-r--r--sw/source/core/fields/makefile.mk98
-rw-r--r--sw/source/core/fields/postithelper.cxx188
-rw-r--r--sw/source/core/fields/reffld.cxx1102
-rw-r--r--sw/source/core/fields/scrptfld.cxx156
-rw-r--r--sw/source/core/fields/tblcalc.cxx267
-rwxr-xr-xsw/source/core/fields/textapi.cxx194
-rw-r--r--sw/source/core/fields/usrfld.cxx381
-rw-r--r--sw/source/core/frmedt/fecopy.cxx1548
-rw-r--r--sw/source/core/frmedt/fedesc.cxx294
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2166
-rw-r--r--sw/source/core/frmedt/feflyole.cxx153
-rw-r--r--sw/source/core/frmedt/feshview.cxx3180
-rw-r--r--sw/source/core/frmedt/fetab.cxx2596
-rw-r--r--sw/source/core/frmedt/fews.cxx1301
-rw-r--r--sw/source/core/frmedt/makefile.mk80
-rw-r--r--sw/source/core/frmedt/tblsel.cxx2730
-rw-r--r--sw/source/core/graphic/grfatr.cxx369
-rw-r--r--sw/source/core/graphic/makefile.mk57
-rw-r--r--sw/source/core/graphic/ndgrf.cxx1234
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx57
-rw-r--r--sw/source/core/inc/MarkManager.hxx90
-rw-r--r--sw/source/core/inc/SwGrammarMarkUp.hxx79
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx104
-rw-r--r--sw/source/core/inc/SwXMLBlockExport.hxx76
-rw-r--r--sw/source/core/inc/SwXMLBlockImport.hxx92
-rw-r--r--sw/source/core/inc/SwXMLBlockListContext.hxx129
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx114
-rw-r--r--sw/source/core/inc/SwXTextDefaults.hxx87
-rw-r--r--sw/source/core/inc/acorrect.hxx125
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx491
-rw-r--r--sw/source/core/inc/ascharanchoredobjectposition.hxx174
-rw-r--r--sw/source/core/inc/blink.hxx92
-rw-r--r--sw/source/core/inc/bodyfrm.hxx52
-rw-r--r--sw/source/core/inc/bookmrk.hxx236
-rw-r--r--sw/source/core/inc/cellfrm.hxx70
-rw-r--r--sw/source/core/inc/cntfrm.hxx150
-rw-r--r--sw/source/core/inc/colfrm.hxx45
-rw-r--r--sw/source/core/inc/crossrefbookmark.hxx102
-rw-r--r--sw/source/core/inc/dbg_lay.hxx123
-rw-r--r--sw/source/core/inc/dbgloop.hxx80
-rw-r--r--sw/source/core/inc/dflyobj.hxx139
-rw-r--r--sw/source/core/inc/docfld.hxx196
-rw-r--r--sw/source/core/inc/docsort.hxx179
-rw-r--r--sw/source/core/inc/doctxm.hxx150
-rw-r--r--sw/source/core/inc/drawdev.hxx143
-rw-r--r--sw/source/core/inc/drawfont.hxx597
-rw-r--r--sw/source/core/inc/dview.hxx137
-rw-r--r--sw/source/core/inc/environmentofanchoredobject.hxx120
-rw-r--r--sw/source/core/inc/finalthreadmanager.hxx108
-rw-r--r--sw/source/core/inc/flowfrm.hxx276
-rw-r--r--sw/source/core/inc/flyfrm.hxx290
-rw-r--r--sw/source/core/inc/flyfrms.hxx262
-rw-r--r--sw/source/core/inc/fntcache.hxx163
-rw-r--r--sw/source/core/inc/frame.hxx1263
-rw-r--r--sw/source/core/inc/frminf.hxx88
-rw-r--r--sw/source/core/inc/frmtool.hxx585
-rw-r--r--sw/source/core/inc/ftnboss.hxx140
-rw-r--r--sw/source/core/inc/ftnfrm.hxx153
-rw-r--r--sw/source/core/inc/hffrm.hxx69
-rw-r--r--sw/source/core/inc/ifinishedthreadlistener.hxx58
-rw-r--r--sw/source/core/inc/ithreadlistenerowner.hxx61
-rw-r--r--sw/source/core/inc/layact.hxx248
-rw-r--r--sw/source/core/inc/laycache.hxx80
-rw-r--r--sw/source/core/inc/layfrm.hxx212
-rw-r--r--sw/source/core/inc/layouter.hxx186
-rw-r--r--sw/source/core/inc/makefile.mk30
-rw-r--r--sw/source/core/inc/movedfwdfrmsbyobjpos.hxx73
-rw-r--r--sw/source/core/inc/mvsave.hxx234
-rw-r--r--sw/source/core/inc/node2lay.hxx84
-rw-r--r--sw/source/core/inc/noteurl.hxx79
-rw-r--r--sw/source/core/inc/notxtfrm.hxx81
-rw-r--r--sw/source/core/inc/objectformatter.hxx241
-rw-r--r--sw/source/core/inc/observablethread.hxx108
-rw-r--r--sw/source/core/inc/pagefrm.hxx543
-rw-r--r--sw/source/core/inc/pamtyp.hxx105
-rw-r--r--sw/source/core/inc/prevwpage.hxx36
-rw-r--r--sw/source/core/inc/ptqueue.hxx65
-rw-r--r--sw/source/core/inc/retrievedinputstreamdata.hxx114
-rw-r--r--sw/source/core/inc/retrieveinputstream.hxx71
-rw-r--r--sw/source/core/inc/retrieveinputstreamconsumer.hxx77
-rw-r--r--sw/source/core/inc/rootfrm.hxx372
-rw-r--r--sw/source/core/inc/rowfrm.hxx114
-rw-r--r--sw/source/core/inc/scriptinfo.hxx419
-rw-r--r--sw/source/core/inc/scrrect.hxx128
-rw-r--r--sw/source/core/inc/sectfrm.hxx151
-rw-r--r--sw/source/core/inc/setmapvirtdev.hxx74
-rw-r--r--sw/source/core/inc/sortedobjs.hxx111
-rw-r--r--sw/source/core/inc/sortedobjsimpl.hxx64
-rw-r--r--sw/source/core/inc/swblocks.hxx245
-rw-r--r--sw/source/core/inc/swcache.hxx305
-rw-r--r--sw/source/core/inc/swfntcch.hxx102
-rw-r--r--sw/source/core/inc/swfont.hxx902
-rw-r--r--sw/source/core/inc/swselectionlist.hxx100
-rw-r--r--sw/source/core/inc/swthreadjoiner.hxx54
-rw-r--r--sw/source/core/inc/swthreadmanager.hxx87
-rw-r--r--sw/source/core/inc/tabfrm.hxx236
-rw-r--r--sw/source/core/inc/tblrwcl.hxx231
-rwxr-xr-xsw/source/core/inc/textapi.hxx69
-rw-r--r--sw/source/core/inc/threadlistener.hxx65
-rw-r--r--sw/source/core/inc/threadmanager.hxx175
-rw-r--r--sw/source/core/inc/tocntntanchoredobjectposition.hxx106
-rw-r--r--sw/source/core/inc/tolayoutanchoredobjectposition.hxx69
-rw-r--r--sw/source/core/inc/toxhlp.hxx79
-rw-r--r--sw/source/core/inc/txmsrt.hxx297
-rw-r--r--sw/source/core/inc/txtfrm.hxx836
-rw-r--r--sw/source/core/inc/txttypes.hxx106
-rw-r--r--sw/source/core/inc/undoflystrattr.hxx60
-rw-r--r--sw/source/core/inc/unoclbck.hxx52
-rw-r--r--sw/source/core/inc/unofldmid.h74
-rwxr-xr-xsw/source/core/inc/unometa.hxx345
-rw-r--r--sw/source/core/inc/viewimp.hxx433
-rw-r--r--sw/source/core/inc/visiturl.hxx52
-rw-r--r--sw/source/core/inc/wrong.hxx163
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx913
-rw-r--r--sw/source/core/layout/anchoredobject.cxx1067
-rw-r--r--sw/source/core/layout/atrfrm.cxx3235
-rw-r--r--sw/source/core/layout/calcmove.cxx2107
-rw-r--r--sw/source/core/layout/colfrm.cxx486
-rw-r--r--sw/source/core/layout/dbg_lay.cxx869
-rw-r--r--sw/source/core/layout/findfrm.cxx1830
-rw-r--r--sw/source/core/layout/flowfrm.cxx2737
-rw-r--r--sw/source/core/layout/fly.cxx2824
-rw-r--r--sw/source/core/layout/flycnt.cxx1566
-rw-r--r--sw/source/core/layout/flyincnt.cxx363
-rw-r--r--sw/source/core/layout/flylay.cxx1394
-rw-r--r--sw/source/core/layout/flypos.cxx111
-rw-r--r--sw/source/core/layout/frmtool.cxx3738
-rw-r--r--sw/source/core/layout/ftnfrm.cxx3370
-rw-r--r--sw/source/core/layout/hffrm.cxx798
-rw-r--r--sw/source/core/layout/layact.cxx3071
-rw-r--r--sw/source/core/layout/laycache.cxx1395
-rw-r--r--sw/source/core/layout/layhelp.hxx235
-rw-r--r--sw/source/core/layout/layouter.cxx574
-rw-r--r--sw/source/core/layout/makefile.mk119
-rw-r--r--sw/source/core/layout/movedfwdfrmsbyobjpos.cxx112
-rw-r--r--sw/source/core/layout/newfrm.cxx592
-rw-r--r--sw/source/core/layout/objectformatter.cxx581
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.cxx218
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.hxx84
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx873
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.hxx218
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.cxx76
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.hxx50
-rw-r--r--sw/source/core/layout/pagechg.cxx2495
-rw-r--r--sw/source/core/layout/pagedesc.cxx515
-rw-r--r--sw/source/core/layout/paintfrm.cxx6747
-rw-r--r--sw/source/core/layout/sectfrm.cxx2799
-rw-r--r--sw/source/core/layout/softpagebreak.cxx159
-rw-r--r--sw/source/core/layout/sortedobjs.cxx79
-rw-r--r--sw/source/core/layout/sortedobjsimpl.cxx319
-rw-r--r--sw/source/core/layout/ssfrm.cxx753
-rw-r--r--sw/source/core/layout/swselectionlist.cxx97
-rw-r--r--sw/source/core/layout/tabfrm.cxx6068
-rw-r--r--sw/source/core/layout/trvlfrm.cxx2662
-rw-r--r--sw/source/core/layout/unusedf.cxx96
-rw-r--r--sw/source/core/layout/virtoutp.cxx259
-rw-r--r--sw/source/core/layout/virtoutp.hxx77
-rw-r--r--sw/source/core/layout/wsfrm.cxx4022
-rw-r--r--sw/source/core/makefile.mk114
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx1131
-rw-r--r--sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx460
-rw-r--r--sw/source/core/objectpositioning/environmentofanchoredobject.cxx124
-rw-r--r--sw/source/core/objectpositioning/makefile.mk63
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx1078
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx248
-rw-r--r--sw/source/core/ole/makefile.mk59
-rw-r--r--sw/source/core/ole/ndole.cxx1021
-rw-r--r--sw/source/core/para/makefile.mk58
-rw-r--r--sw/source/core/para/paratr.cxx298
-rw-r--r--sw/source/core/sw3io/makefile.mk53
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx436
-rw-r--r--sw/source/core/sw3io/swacorr.cxx109
-rw-r--r--sw/source/core/swg/SwXMLBlockExport.cxx145
-rw-r--r--sw/source/core/swg/SwXMLBlockImport.cxx121
-rw-r--r--sw/source/core/swg/SwXMLBlockListContext.cxx253
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx153
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx646
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx744
-rw-r--r--sw/source/core/swg/makefile.mk66
-rw-r--r--sw/source/core/swg/swblocks.cxx821
-rw-r--r--sw/source/core/table/makefile.mk52
-rw-r--r--sw/source/core/table/swnewtable.cxx2326
-rw-r--r--sw/source/core/table/swtable.cxx2710
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2221
-rw-r--r--sw/source/core/text/SwGrammarMarkUp.cxx184
-rw-r--r--sw/source/core/text/atrhndl.hxx182
-rw-r--r--sw/source/core/text/atrstck.cxx958
-rw-r--r--sw/source/core/text/blink.cxx201
-rw-r--r--sw/source/core/text/frmcrsr.cxx1747
-rw-r--r--sw/source/core/text/frmform.cxx2176
-rw-r--r--sw/source/core/text/frminf.cxx380
-rw-r--r--sw/source/core/text/frmpaint.cxx820
-rw-r--r--sw/source/core/text/guess.cxx557
-rw-r--r--sw/source/core/text/guess.hxx76
-rw-r--r--sw/source/core/text/inftxt.cxx1967
-rw-r--r--sw/source/core/text/inftxt.hxx904
-rw-r--r--sw/source/core/text/itradj.cxx922
-rw-r--r--sw/source/core/text/itratr.cxx1083
-rw-r--r--sw/source/core/text/itratr.hxx134
-rw-r--r--sw/source/core/text/itrcrsr.cxx1850
-rw-r--r--sw/source/core/text/itrform2.cxx2123
-rw-r--r--sw/source/core/text/itrform2.hxx217
-rw-r--r--sw/source/core/text/itrpaint.cxx721
-rw-r--r--sw/source/core/text/itrpaint.hxx72
-rw-r--r--sw/source/core/text/itrtxt.cxx526
-rw-r--r--sw/source/core/text/itrtxt.hxx343
-rw-r--r--sw/source/core/text/makefile.mk130
-rw-r--r--sw/source/core/text/noteurl.cxx90
-rw-r--r--sw/source/core/text/pordrop.hxx122
-rw-r--r--sw/source/core/text/porexp.cxx315
-rw-r--r--sw/source/core/text/porexp.hxx111
-rw-r--r--sw/source/core/text/porfld.cxx1388
-rw-r--r--sw/source/core/text/porfld.hxx277
-rw-r--r--sw/source/core/text/porfly.cxx458
-rw-r--r--sw/source/core/text/porfly.hxx111
-rw-r--r--sw/source/core/text/porftn.hxx133
-rw-r--r--sw/source/core/text/porglue.cxx321
-rw-r--r--sw/source/core/text/porglue.hxx137
-rw-r--r--sw/source/core/text/porhyph.hxx122
-rw-r--r--sw/source/core/text/porlay.cxx2465
-rw-r--r--sw/source/core/text/porlay.hxx430
-rw-r--r--sw/source/core/text/porlin.cxx429
-rw-r--r--sw/source/core/text/porlin.hxx254
-rw-r--r--sw/source/core/text/pormulti.cxx2418
-rw-r--r--sw/source/core/text/pormulti.hxx271
-rw-r--r--sw/source/core/text/porref.cxx118
-rw-r--r--sw/source/core/text/porref.hxx76
-rw-r--r--sw/source/core/text/porrst.cxx581
-rw-r--r--sw/source/core/text/porrst.hxx190
-rw-r--r--sw/source/core/text/portab.hxx160
-rw-r--r--sw/source/core/text/portox.cxx118
-rw-r--r--sw/source/core/text/portox.hxx78
-rw-r--r--sw/source/core/text/portxt.cxx819
-rw-r--r--sw/source/core/text/portxt.hxx120
-rw-r--r--sw/source/core/text/possiz.hxx87
-rw-r--r--sw/source/core/text/redlnitr.cxx508
-rw-r--r--sw/source/core/text/redlnitr.hxx126
-rw-r--r--sw/source/core/text/txtcache.cxx244
-rw-r--r--sw/source/core/text/txtcache.hxx79
-rw-r--r--sw/source/core/text/txtcfg.hxx57
-rw-r--r--sw/source/core/text/txtdrop.cxx1108
-rw-r--r--sw/source/core/text/txtfld.cxx552
-rw-r--r--sw/source/core/text/txtfly.cxx2520
-rw-r--r--sw/source/core/text/txtfly.hxx262
-rw-r--r--sw/source/core/text/txtfrm.cxx2751
-rw-r--r--sw/source/core/text/txtftn.cxx1702
-rw-r--r--sw/source/core/text/txthyph.cxx698
-rw-r--r--sw/source/core/text/txtinit.cxx104
-rw-r--r--sw/source/core/text/txtio.cxx952
-rw-r--r--sw/source/core/text/txtpaint.cxx140
-rw-r--r--sw/source/core/text/txtpaint.hxx194
-rw-r--r--sw/source/core/text/txttab.cxx666
-rw-r--r--sw/source/core/text/widorp.cxx569
-rw-r--r--sw/source/core/text/widorp.hxx98
-rw-r--r--sw/source/core/text/wrong.cxx647
-rw-r--r--sw/source/core/tox/makefile.mk61
-rw-r--r--sw/source/core/tox/tox.cxx937
-rw-r--r--sw/source/core/tox/toxhlp.cxx196
-rw-r--r--sw/source/core/tox/txmsrt.cxx954
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx224
-rw-r--r--sw/source/core/txtnode/atrfld.cxx392
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx291
-rw-r--r--sw/source/core/txtnode/atrftn.cxx540
-rw-r--r--sw/source/core/txtnode/atrref.cxx106
-rw-r--r--sw/source/core/txtnode/atrtox.cxx99
-rw-r--r--sw/source/core/txtnode/chrfmt.cxx41
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx909
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2913
-rw-r--r--sw/source/core/txtnode/fntcap.cxx858
-rw-r--r--sw/source/core/txtnode/makefile.mk90
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx123
-rw-r--r--sw/source/core/txtnode/ndhints.cxx492
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5007
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx97
-rw-r--r--sw/source/core/txtnode/swfont.cxx1249
-rw-r--r--sw/source/core/txtnode/thints.cxx2905
-rw-r--r--sw/source/core/txtnode/txatbase.cxx87
-rw-r--r--sw/source/core/txtnode/txatritr.cxx249
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx339
-rw-r--r--sw/source/core/txtnode/txtedt.cxx1968
-rw-r--r--sw/source/core/undo/SwRewriter.cxx81
-rw-r--r--sw/source/core/undo/SwUndoField.cxx157
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx513
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx477
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx74
-rw-r--r--sw/source/core/undo/docundo.cxx1030
-rw-r--r--sw/source/core/undo/makefile.mk89
-rw-r--r--sw/source/core/undo/rolbck.cxx1528
-rw-r--r--sw/source/core/undo/unattr.cxx1322
-rw-r--r--sw/source/core/undo/unbkmk.cxx129
-rw-r--r--sw/source/core/undo/undel.cxx1000
-rw-r--r--sw/source/core/undo/undo.hrc188
-rw-r--r--sw/source/core/undo/undo.src660
-rw-r--r--sw/source/core/undo/undobj.cxx1390
-rw-r--r--sw/source/core/undo/undobj1.cxx688
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx107
-rw-r--r--sw/source/core/undo/undraw.cxx646
-rw-r--r--sw/source/core/undo/unfmco.cxx134
-rw-r--r--sw/source/core/undo/unins.cxx1118
-rw-r--r--sw/source/core/undo/unmove.cxx369
-rw-r--r--sw/source/core/undo/unnum.cxx469
-rw-r--r--sw/source/core/undo/unoutl.cxx73
-rw-r--r--sw/source/core/undo/unovwr.cxx523
-rw-r--r--sw/source/core/undo/unredln.cxx501
-rw-r--r--sw/source/core/undo/unsect.cxx458
-rw-r--r--sw/source/core/undo/unsort.cxx305
-rw-r--r--sw/source/core/undo/unspnd.cxx219
-rw-r--r--sw/source/core/undo/untbl.cxx3289
-rw-r--r--sw/source/core/undo/untblk.cxx370
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx294
-rw-r--r--sw/source/core/unocore/TextCursorHelper.cxx62
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx415
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.hxx81
-rw-r--r--sw/source/core/unocore/makefile.mk129
-rw-r--r--sw/source/core/unocore/swunohelper.cxx294
-rw-r--r--sw/source/core/unocore/unobkm.cxx422
-rw-r--r--sw/source/core/unocore/unochart.cxx3096
-rw-r--r--sw/source/core/unocore/unoclbck.cxx119
-rw-r--r--sw/source/core/unocore/unocoll.cxx1966
-rw-r--r--sw/source/core/unocore/unocore.src67
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx1085
-rw-r--r--sw/source/core/unocore/unodraw.cxx3077
-rw-r--r--sw/source/core/unocore/unoevent.cxx336
-rw-r--r--sw/source/core/unocore/unoevtlstnr.cxx121
-rw-r--r--sw/source/core/unocore/unofield.cxx3009
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx509
-rw-r--r--sw/source/core/unocore/unoframe.cxx3423
-rw-r--r--sw/source/core/unocore/unoftn.cxx583
-rw-r--r--sw/source/core/unocore/unoidx.cxx2780
-rw-r--r--sw/source/core/unocore/unomap.cxx3132
-rw-r--r--sw/source/core/unocore/unoobj.cxx2522
-rw-r--r--sw/source/core/unocore/unoobj2.cxx2273
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx1213
-rw-r--r--sw/source/core/unocore/unoport.cxx1074
-rw-r--r--sw/source/core/unocore/unoportenum.cxx1214
-rw-r--r--sw/source/core/unocore/unoprnms.cxx795
-rw-r--r--sw/source/core/unocore/unoredline.cxx790
-rw-r--r--sw/source/core/unocore/unoredlines.cxx235
-rw-r--r--sw/source/core/unocore/unorefmk.cxx1490
-rw-r--r--sw/source/core/unocore/unosect.cxx1630
-rw-r--r--sw/source/core/unocore/unosett.cxx2830
-rw-r--r--sw/source/core/unocore/unosrch.cxx764
-rw-r--r--sw/source/core/unocore/unostyle.cxx4532
-rw-r--r--sw/source/core/unocore/unotbl.cxx5450
-rw-r--r--sw/source/core/unocore/unotext.cxx2635
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx489
-rw-r--r--sw/source/core/view/makefile.mk63
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx1557
-rw-r--r--sw/source/core/view/scrrect.cxx1195
-rw-r--r--sw/source/core/view/vdraw.cxx374
-rw-r--r--sw/source/core/view/viewimp.cxx632
-rw-r--r--sw/source/core/view/viewpg.cxx757
-rw-r--r--sw/source/core/view/viewsh.cxx2740
-rw-r--r--sw/source/core/view/vnew.cxx413
-rw-r--r--sw/source/core/view/vprint.cxx1628
-rw-r--r--sw/source/filter/ascii/ascatr.cxx222
-rw-r--r--sw/source/filter/ascii/makefile.mk60
-rw-r--r--sw/source/filter/ascii/parasc.cxx538
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx228
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx55
-rw-r--r--sw/source/filter/basflt/docfact.cxx88
-rw-r--r--sw/source/filter/basflt/fltini.cxx1010
-rw-r--r--sw/source/filter/basflt/iodetect.cxx595
-rw-r--r--sw/source/filter/basflt/makefile.mk62
-rw-r--r--sw/source/filter/basflt/shellio.cxx987
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx211
-rw-r--r--sw/source/filter/html/css1atr.cxx3864
-rw-r--r--sw/source/filter/html/css1kywd.cxx284
-rw-r--r--sw/source/filter/html/css1kywd.hxx294
-rw-r--r--sw/source/filter/html/htmlatr.cxx3499
-rw-r--r--sw/source/filter/html/htmlbas.cxx372
-rw-r--r--sw/source/filter/html/htmlcss1.cxx2485
-rw-r--r--sw/source/filter/html/htmlctxt.cxx755
-rw-r--r--sw/source/filter/html/htmldraw.cxx860
-rw-r--r--sw/source/filter/html/htmlfld.cxx673
-rw-r--r--sw/source/filter/html/htmlfld.hxx95
-rw-r--r--sw/source/filter/html/htmlfldw.cxx542
-rw-r--r--sw/source/filter/html/htmlfly.cxx1937
-rw-r--r--sw/source/filter/html/htmlfly.hxx140
-rw-r--r--sw/source/filter/html/htmlflyt.cxx519
-rw-r--r--sw/source/filter/html/htmlform.cxx2664
-rw-r--r--sw/source/filter/html/htmlform.hxx55
-rw-r--r--sw/source/filter/html/htmlforw.cxx1454
-rw-r--r--sw/source/filter/html/htmlftn.cxx624
-rw-r--r--sw/source/filter/html/htmlgrin.cxx1456
-rw-r--r--sw/source/filter/html/htmlnum.cxx990
-rw-r--r--sw/source/filter/html/htmlnum.hxx134
-rw-r--r--sw/source/filter/html/htmlplug.cxx1408
-rw-r--r--sw/source/filter/html/htmlsect.cxx873
-rw-r--r--sw/source/filter/html/htmltab.cxx5603
-rw-r--r--sw/source/filter/html/htmltabw.cxx1268
-rw-r--r--sw/source/filter/html/htmlvsh.hxx58
-rw-r--r--sw/source/filter/html/makefile.mk87
-rw-r--r--sw/source/filter/html/parcss1.cxx1429
-rw-r--r--sw/source/filter/html/parcss1.hxx310
-rw-r--r--sw/source/filter/html/svxcss1.cxx3314
-rw-r--r--sw/source/filter/html/svxcss1.hxx438
-rw-r--r--sw/source/filter/html/swcss1.hxx230
-rw-r--r--sw/source/filter/html/swhtml.cxx5529
-rw-r--r--sw/source/filter/html/swhtml.hxx1043
-rw-r--r--sw/source/filter/html/wrthtml.cxx1441
-rw-r--r--sw/source/filter/html/wrthtml.hxx606
-rw-r--r--sw/source/filter/inc/fltbase.hxx130
-rw-r--r--sw/source/filter/inc/fltglbls.hxx127
-rw-r--r--sw/source/filter/inc/fltini.hxx111
-rw-r--r--sw/source/filter/inc/fltshell.hxx633
-rw-r--r--sw/source/filter/inc/makefile.mk30
-rw-r--r--sw/source/filter/inc/msfilter.hxx531
-rw-r--r--sw/source/filter/inc/rtf.hxx135
-rw-r--r--sw/source/filter/inc/wrt_fn.hxx69
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx337
-rw-r--r--sw/source/filter/inc/wwstyles.hxx224
-rw-r--r--sw/source/filter/makefile.mk71
-rw-r--r--sw/source/filter/rtf/makefile.mk69
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx4370
-rw-r--r--sw/source/filter/rtf/rtffld.cxx1234
-rw-r--r--sw/source/filter/rtf/rtffly.cxx1639
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx1463
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx1024
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx4480
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx484
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx1805
-rw-r--r--sw/source/filter/rtf/wrtrtf.hxx256
-rw-r--r--sw/source/filter/writer/makefile.mk58
-rw-r--r--sw/source/filter/writer/writer.cxx633
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx134
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx922
-rw-r--r--sw/source/filter/ww1/fltshell.cxx2091
-rw-r--r--sw/source/filter/ww1/makefile.mk98
-rw-r--r--sw/source/filter/ww1/w1class.cxx1259
-rw-r--r--sw/source/filter/ww1/w1class.hxx1652
-rw-r--r--sw/source/filter/ww1/w1filter.cxx2066
-rw-r--r--sw/source/filter/ww1/w1par.cxx144
-rw-r--r--sw/source/filter/ww1/w1par.hxx48
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx697
-rw-r--r--sw/source/filter/ww1/w1struct.hxx931
-rw-r--r--sw/source/filter/ww8/CREDITS3
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx179
-rw-r--r--sw/source/filter/ww8/WW8FFData.hxx119
-rw-r--r--sw/source/filter/ww8/WW8FibData.cxx65
-rw-r--r--sw/source/filter/ww8/WW8FibData.hxx54
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx121
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx148
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx610
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx186
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx581
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx3324
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx613
-rw-r--r--sw/source/filter/ww8/docxexport.cxx812
-rw-r--r--sw/source/filter/ww8/docxexport.hxx228
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx190
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx65
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx103
-rw-r--r--sw/source/filter/ww8/dump/dump8.cxx174
-rw-r--r--sw/source/filter/ww8/dump/dump8a.cxx2749
-rw-r--r--sw/source/filter/ww8/dump/makefile.mk126
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.cxx539
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.hxx105
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.cxx549
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.hxx46
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.cxx422
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.hxx89
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.cxx6674
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.hxx1492
-rw-r--r--sw/source/filter/ww8/dump/ww8struc.hxx818
-rw-r--r--sw/source/filter/ww8/escher.hxx181
-rw-r--r--sw/source/filter/ww8/fields.cxx155
-rw-r--r--sw/source/filter/ww8/fields.hxx160
-rw-r--r--sw/source/filter/ww8/hash_wrap.hxx127
-rw-r--r--sw/source/filter/ww8/makefile.mk109
-rw-r--r--sw/source/filter/ww8/needed_cast.hxx66
-rw-r--r--sw/source/filter/ww8/sortedarray.hxx124
-rw-r--r--sw/source/filter/ww8/staticassert.hxx74
-rw-r--r--sw/source/filter/ww8/styles.cxx221
-rw-r--r--sw/source/filter/ww8/tracer.cxx212
-rw-r--r--sw/source/filter/ww8/tracer.hxx94
-rw-r--r--sw/source/filter/ww8/types.hxx61
-rw-r--r--sw/source/filter/ww8/typessw.hxx49
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx861
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx990
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx1050
-rw-r--r--sw/source/filter/ww8/writerwordglue.hxx167
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2880
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2654
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx959
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2231
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx3637
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1411
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx889
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx5297
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx456
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx278
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx95
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx3255
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx115
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx827
-rw-r--r--sw/source/filter/ww8/ww8par.cxx5054
-rw-r--r--sw/source/filter/ww8/ww8par.hxx1641
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4735
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx299
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2650
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx590
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx3532
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6167
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx7336
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx1784
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx1062
-rw-r--r--sw/source/filter/xml/DocSettingNames.hxx26
-rw-r--r--sw/source/filter/xml/ForbiddenCharactersEnum.hxx44
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx756
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.hxx167
-rw-r--r--sw/source/filter/xml/makefile.mk98
-rw-r--r--sw/source/filter/xml/swxml.cxx1147
-rw-r--r--sw/source/filter/xml/wrtxml.cxx704
-rw-r--r--sw/source/filter/xml/wrtxml.hxx108
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx260
-rw-r--r--sw/source/filter/xml/xmlbrshe.hxx59
-rw-r--r--sw/source/filter/xml/xmlbrshi.hxx89
-rw-r--r--sw/source/filter/xml/xmlexp.cxx1003
-rw-r--r--sw/source/filter/xml/xmlexp.hxx193
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx1044
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx139
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx1145
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx370
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx105
-rw-r--r--sw/source/filter/xml/xmlimp.cxx1749
-rw-r--r--sw/source/filter/xml/xmlimp.hxx234
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx978
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx113
-rw-r--r--sw/source/filter/xml/xmlitem.cxx93
-rw-r--r--sw/source/filter/xml/xmlitem.hxx83
-rw-r--r--sw/source/filter/xml/xmliteme.cxx260
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx275
-rw-r--r--sw/source/filter/xml/xmlitemm.cxx299
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx425
-rw-r--r--sw/source/filter/xml/xmlithlp.hxx104
-rw-r--r--sw/source/filter/xml/xmlitmap.hxx99
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx94
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx204
-rw-r--r--sw/source/filter/xml/xmlscript.cxx68
-rw-r--r--sw/source/filter/xml/xmltble.cxx1256
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2953
-rw-r--r--sw/source/filter/xml/xmltbli.hxx228
-rw-r--r--sw/source/filter/xml/xmltext.cxx110
-rw-r--r--sw/source/filter/xml/xmltexte.cxx771
-rw-r--r--sw/source/filter/xml/xmltexte.hxx91
-rw-r--r--sw/source/filter/xml/xmltexti.cxx1065
-rw-r--r--sw/source/filter/xml/xmltexti.hxx135
-rw-r--r--sw/source/ui/app/app.src668
-rw-r--r--sw/source/ui/app/appenv.cxx564
-rw-r--r--sw/source/ui/app/apphdl.cxx979
-rw-r--r--sw/source/ui/app/applab.cxx489
-rw-r--r--sw/source/ui/app/appopt.cxx660
-rw-r--r--sw/source/ui/app/docsh.cxx1365
-rw-r--r--sw/source/ui/app/docsh2.cxx1940
-rw-r--r--sw/source/ui/app/docshdrw.cxx87
-rw-r--r--sw/source/ui/app/docshini.cxx837
-rw-r--r--sw/source/ui/app/docst.cxx1315
-rw-r--r--sw/source/ui/app/docstyle.cxx2916
-rw-r--r--sw/source/ui/app/error.src217
-rw-r--r--sw/source/ui/app/mainwn.cxx168
-rw-r--r--sw/source/ui/app/makefile.mk104
-rw-r--r--sw/source/ui/app/mn.src1117
-rw-r--r--sw/source/ui/app/swdll.cxx159
-rw-r--r--sw/source/ui/app/swmodul1.cxx678
-rw-r--r--sw/source/ui/app/swmodule.cxx515
-rw-r--r--sw/source/ui/app/swwait.cxx78
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx141
-rw-r--r--sw/source/ui/cctrl/makefile.mk60
-rw-r--r--sw/source/ui/cctrl/popbox.cxx94
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx234
-rw-r--r--sw/source/ui/chrdlg/break.cxx255
-rw-r--r--sw/source/ui/chrdlg/break.hrc44
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx247
-rw-r--r--sw/source/ui/chrdlg/ccoll.hrc53
-rw-r--r--sw/source/ui/chrdlg/ccoll.src163
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx408
-rw-r--r--sw/source/ui/chrdlg/chardlg.hrc89
-rw-r--r--sw/source/ui/chrdlg/chardlg.src267
-rw-r--r--sw/source/ui/chrdlg/chrdlg.src80
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx897
-rw-r--r--sw/source/ui/chrdlg/drpcps.hrc54
-rw-r--r--sw/source/ui/chrdlg/drpcps.src229
-rw-r--r--sw/source/ui/chrdlg/makefile.mk73
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx367
-rw-r--r--sw/source/ui/chrdlg/numpara.hrc56
-rw-r--r--sw/source/ui/chrdlg/numpara.src232
-rw-r--r--sw/source/ui/chrdlg/paradlg.hrc74
-rw-r--r--sw/source/ui/chrdlg/paradlg.src168
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx272
-rw-r--r--sw/source/ui/chrdlg/swbreak.src175
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx360
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx79
-rw-r--r--sw/source/ui/config/barcfg.cxx153
-rw-r--r--sw/source/ui/config/caption.cxx185
-rw-r--r--sw/source/ui/config/cfgitems.cxx464
-rw-r--r--sw/source/ui/config/config.hrc70
-rw-r--r--sw/source/ui/config/dbconfig.cxx144
-rw-r--r--sw/source/ui/config/fontcfg.cxx360
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx625
-rw-r--r--sw/source/ui/config/mailconfigpage.hrc86
-rw-r--r--sw/source/ui/config/mailconfigpage.src424
-rw-r--r--sw/source/ui/config/makefile.mk91
-rw-r--r--sw/source/ui/config/modcfg.cxx1387
-rw-r--r--sw/source/ui/config/optcomp.cxx631
-rw-r--r--sw/source/ui/config/optcomp.hrc59
-rw-r--r--sw/source/ui/config/optcomp.src143
-rw-r--r--sw/source/ui/config/optdlg.hrc208
-rw-r--r--sw/source/ui/config/optdlg.src937
-rw-r--r--sw/source/ui/config/optload.cxx986
-rw-r--r--sw/source/ui/config/optload.hrc85
-rw-r--r--sw/source/ui/config/optload.src402
-rw-r--r--sw/source/ui/config/optpage.cxx2602
-rw-r--r--sw/source/ui/config/prtopt.cxx184
-rw-r--r--sw/source/ui/config/redlopt.hrc57
-rw-r--r--sw/source/ui/config/redlopt.src282
-rw-r--r--sw/source/ui/config/uinums.cxx676
-rw-r--r--sw/source/ui/config/usrpref.cxx683
-rw-r--r--sw/source/ui/config/viewopt.cxx641
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx755
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hrc51
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx125
-rw-r--r--sw/source/ui/dbui/addresslistdialog.src129
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx838
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hrc67
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx133
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.src228
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx277
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hrc52
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hxx102
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.src165
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx1967
-rw-r--r--sw/source/ui/dbui/dbinsdlg.hrc76
-rw-r--r--sw/source/ui/dbui/dbinsdlg.src312
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx3403
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx147
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hrc38
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx63
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.src64
-rw-r--r--sw/source/ui/dbui/dbtree.cxx625
-rw-r--r--sw/source/ui/dbui/dbui.cxx154
-rw-r--r--sw/source/ui/dbui/dbui.src286
-rw-r--r--sw/source/ui/dbui/maildispatcher.cxx308
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx799
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.hrc64
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.src281
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx1050
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx339
-rw-r--r--sw/source/ui/dbui/mailmergewizard.hrc40
-rw-r--r--sw/source/ui/dbui/mailmergewizard.src82
-rw-r--r--sw/source/ui/dbui/makefile.mk126
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx1830
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hrc118
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx335
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.src635
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx1987
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx227
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hrc40
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx77
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.src103
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx622
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hrc68
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx179
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.src258
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx823
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hrc51
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx117
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.src162
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx126
-rw-r--r--sw/source/ui/dbui/mmmergepage.hrc46
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx76
-rw-r--r--sw/source/ui/dbui/mmmergepage.src104
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx1409
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hrc106
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx245
-rw-r--r--sw/source/ui/dbui/mmoutputpage.src466
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx116
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hrc47
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx70
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.src102
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx207
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hrc49
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx80
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.src128
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx226
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hrc46
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx82
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.src101
-rw-r--r--sw/source/ui/dbui/swdbtoolsclient.cxx251
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx898
-rw-r--r--sw/source/ui/dialog/abstract.cxx95
-rw-r--r--sw/source/ui/dialog/abstract.hrc39
-rw-r--r--sw/source/ui/dialog/abstract.src156
-rw-r--r--sw/source/ui/dialog/addrdlg.cxx72
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx453
-rw-r--r--sw/source/ui/dialog/ascfldlg.hrc47
-rw-r--r--sw/source/ui/dialog/ascfldlg.src180
-rw-r--r--sw/source/ui/dialog/dialog.src65
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx200
-rw-r--r--sw/source/ui/dialog/docstdlg.hrc50
-rw-r--r--sw/source/ui/dialog/docstdlg.src186
-rw-r--r--sw/source/ui/dialog/macassgn.cxx199
-rw-r--r--sw/source/ui/dialog/makefile.mk107
-rw-r--r--sw/source/ui/dialog/regionsw.cxx292
-rw-r--r--sw/source/ui/dialog/regionsw.hrc119
-rw-r--r--sw/source/ui/dialog/regionsw.src860
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx54
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx57
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx1744
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx589
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx58
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx54
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2368
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx102
-rw-r--r--sw/source/ui/dialog/wordcountdialog.hrc46
-rw-r--r--sw/source/ui/dialog/wordcountdialog.src118
-rw-r--r--sw/source/ui/dochdl/dochdl.src88
-rw-r--r--sw/source/ui/dochdl/gloshdl.cxx940
-rw-r--r--sw/source/ui/dochdl/makefile.mk69
-rw-r--r--sw/source/ui/dochdl/selglos.cxx80
-rw-r--r--sw/source/ui/dochdl/selglos.hrc34
-rw-r--r--sw/source/ui/dochdl/selglos.src114
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx3879
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx1949
-rw-r--r--sw/source/ui/docvw/access.src89
-rw-r--r--sw/source/ui/docvw/docvw.hrc107
-rw-r--r--sw/source/ui/docvw/docvw.src340
-rw-r--r--sw/source/ui/docvw/edtdd.cxx530
-rw-r--r--sw/source/ui/docvw/edtwin.cxx5727
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx611
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx219
-rw-r--r--sw/source/ui/docvw/makefile.mk64
-rw-r--r--sw/source/ui/docvw/postit.cxx2486
-rw-r--r--sw/source/ui/docvw/romenu.cxx525
-rw-r--r--sw/source/ui/docvw/romenu.hxx78
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx1102
-rw-r--r--sw/source/ui/envelp/envelp.src90
-rw-r--r--sw/source/ui/envelp/envfmt.cxx638
-rw-r--r--sw/source/ui/envelp/envfmt.hrc85
-rw-r--r--sw/source/ui/envelp/envfmt.hxx115
-rw-r--r--sw/source/ui/envelp/envfmt.src318
-rw-r--r--sw/source/ui/envelp/envimg.cxx381
-rw-r--r--sw/source/ui/envelp/envlop.hrc68
-rw-r--r--sw/source/ui/envelp/envlop.src209
-rw-r--r--sw/source/ui/envelp/envlop1.cxx444
-rw-r--r--sw/source/ui/envelp/envprt.cxx262
-rw-r--r--sw/source/ui/envelp/envprt.hrc99
-rw-r--r--sw/source/ui/envelp/envprt.hxx96
-rw-r--r--sw/source/ui/envelp/envprt.src295
-rw-r--r--sw/source/ui/envelp/label.hrc131
-rw-r--r--sw/source/ui/envelp/label.src717
-rw-r--r--sw/source/ui/envelp/label1.cxx1114
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx302
-rw-r--r--sw/source/ui/envelp/labelexp.cxx284
-rw-r--r--sw/source/ui/envelp/labfmt.cxx715
-rw-r--r--sw/source/ui/envelp/labfmt.hrc92
-rw-r--r--sw/source/ui/envelp/labfmt.hxx178
-rw-r--r--sw/source/ui/envelp/labfmt.src362
-rw-r--r--sw/source/ui/envelp/labimg.cxx483
-rw-r--r--sw/source/ui/envelp/labimp.hxx121
-rw-r--r--sw/source/ui/envelp/labprt.cxx245
-rw-r--r--sw/source/ui/envelp/labprt.hrc62
-rw-r--r--sw/source/ui/envelp/labprt.hxx89
-rw-r--r--sw/source/ui/envelp/labprt.src154
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx944
-rw-r--r--sw/source/ui/envelp/mailmrge.hrc95
-rw-r--r--sw/source/ui/envelp/mailmrge.src431
-rw-r--r--sw/source/ui/envelp/makefile.mk84
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx257
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx115
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx150
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.hrc40
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.src125
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.cxx84
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.hxx47
-rw-r--r--sw/source/ui/fldui/changedb.cxx366
-rw-r--r--sw/source/ui/fldui/changedb.hrc65
-rw-r--r--sw/source/ui/fldui/changedb.src131
-rw-r--r--sw/source/ui/fldui/flddb.cxx586
-rw-r--r--sw/source/ui/fldui/flddb.hxx109
-rw-r--r--sw/source/ui/fldui/flddb.src201
-rw-r--r--sw/source/ui/fldui/flddinf.cxx506
-rw-r--r--sw/source/ui/fldui/flddinf.hxx91
-rw-r--r--sw/source/ui/fldui/flddinf.src141
-rw-r--r--sw/source/ui/fldui/flddok.cxx734
-rw-r--r--sw/source/ui/fldui/flddok.hxx98
-rw-r--r--sw/source/ui/fldui/flddok.src198
-rw-r--r--sw/source/ui/fldui/fldedt.cxx424
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx747
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx116
-rw-r--r--sw/source/ui/fldui/fldfunc.src272
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx1796
-rw-r--r--sw/source/ui/fldui/fldpage.cxx436
-rw-r--r--sw/source/ui/fldui/fldpage.hxx110
-rw-r--r--sw/source/ui/fldui/fldref.cxx1076
-rw-r--r--sw/source/ui/fldui/fldref.hxx117
-rw-r--r--sw/source/ui/fldui/fldref.src148
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx421
-rw-r--r--sw/source/ui/fldui/fldtdlg.hrc174
-rw-r--r--sw/source/ui/fldui/fldtdlg.src121
-rw-r--r--sw/source/ui/fldui/fldui.src687
-rw-r--r--sw/source/ui/fldui/fldvar.cxx1386
-rw-r--r--sw/source/ui/fldui/fldvar.hxx129
-rw-r--r--sw/source/ui/fldui/fldvar.src239
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx215
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx212
-rw-r--r--sw/source/ui/fldui/inpdlg.hrc37
-rw-r--r--sw/source/ui/fldui/inpdlg.src134
-rw-r--r--sw/source/ui/fldui/javaedit.cxx369
-rw-r--r--sw/source/ui/fldui/javaedit.hrc54
-rw-r--r--sw/source/ui/fldui/javaedit.src175
-rw-r--r--sw/source/ui/fldui/makefile.mk97
-rw-r--r--sw/source/ui/fldui/xfldui.cxx187
-rw-r--r--sw/source/ui/fmtui/fmtui.src91
-rw-r--r--sw/source/ui/fmtui/makefile.mk55
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx650
-rw-r--r--sw/source/ui/fmtui/tmpdlg.src383
-rw-r--r--sw/source/ui/frmdlg/colex.cxx613
-rw-r--r--sw/source/ui/frmdlg/colmgr.cxx194
-rw-r--r--sw/source/ui/frmdlg/column.cxx1465
-rw-r--r--sw/source/ui/frmdlg/column.hrc90
-rw-r--r--sw/source/ui/frmdlg/column.src407
-rw-r--r--sw/source/ui/frmdlg/cption.cxx651
-rw-r--r--sw/source/ui/frmdlg/cption.hrc81
-rw-r--r--sw/source/ui/frmdlg/cption.src332
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx222
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx629
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx3250
-rw-r--r--sw/source/ui/frmdlg/frmpage.hrc149
-rw-r--r--sw/source/ui/frmdlg/frmpage.src843
-rw-r--r--sw/source/ui/frmdlg/frmui.src136
-rw-r--r--sw/source/ui/frmdlg/makefile.mk83
-rw-r--r--sw/source/ui/frmdlg/pattern.cxx78
-rw-r--r--sw/source/ui/frmdlg/pattern.hrc49
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx82
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx772
-rw-r--r--sw/source/ui/frmdlg/wrap.hrc69
-rw-r--r--sw/source/ui/frmdlg/wrap.src260
-rw-r--r--sw/source/ui/globdoc/globdoc.cxx94
-rw-r--r--sw/source/ui/globdoc/globdoc.src48
-rw-r--r--sw/source/ui/globdoc/makefile.mk55
-rw-r--r--sw/source/ui/inc/DropDownFieldDialog.hxx74
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx79
-rw-r--r--sw/source/ui/inc/SwXFilterOptions.hxx116
-rw-r--r--sw/source/ui/inc/abstract.hxx76
-rw-r--r--sw/source/ui/inc/actctrl.hxx101
-rw-r--r--sw/source/ui/inc/addrdlg.hxx47
-rwxr-xr-xsw/source/ui/inc/annotsh.hxx80
-rw-r--r--sw/source/ui/inc/app.hrc186
-rw-r--r--sw/source/ui/inc/ascfldlg.hxx81
-rw-r--r--sw/source/ui/inc/autoedit.hxx53
-rw-r--r--sw/source/ui/inc/barcfg.hxx49
-rw-r--r--sw/source/ui/inc/basesh.hxx130
-rw-r--r--sw/source/ui/inc/beziersh.hxx47
-rw-r--r--sw/source/ui/inc/bmpwin.hxx72
-rw-r--r--sw/source/ui/inc/bookctrl.hxx60
-rw-r--r--sw/source/ui/inc/bookmark.hxx91
-rw-r--r--sw/source/ui/inc/break.hxx95
-rw-r--r--sw/source/ui/inc/caption.hxx121
-rw-r--r--sw/source/ui/inc/cfgdesc.hxx72
-rw-r--r--sw/source/ui/inc/cfgid.h43
-rw-r--r--sw/source/ui/inc/cfgitems.hxx245
-rw-r--r--sw/source/ui/inc/changedb.hxx95
-rw-r--r--sw/source/ui/inc/chartins.hxx38
-rw-r--r--sw/source/ui/inc/chldwrap.hxx58
-rw-r--r--sw/source/ui/inc/chrdlg.hxx122
-rw-r--r--sw/source/ui/inc/cnttab.hxx93
-rw-r--r--sw/source/ui/inc/colex.hxx121
-rw-r--r--sw/source/ui/inc/colmgr.hxx134
-rw-r--r--sw/source/ui/inc/column.hxx230
-rw-r--r--sw/source/ui/inc/conarc.hxx60
-rw-r--r--sw/source/ui/inc/concustomshape.hxx75
-rw-r--r--sw/source/ui/inc/condedit.hxx75
-rw-r--r--sw/source/ui/inc/conform.hxx50
-rw-r--r--sw/source/ui/inc/conpoly.hxx58
-rw-r--r--sw/source/ui/inc/conrect.hxx63
-rw-r--r--sw/source/ui/inc/content.hxx228
-rw-r--r--sw/source/ui/inc/conttree.hxx337
-rw-r--r--sw/source/ui/inc/convert.hxx94
-rw-r--r--sw/source/ui/inc/cption.hxx140
-rw-r--r--sw/source/ui/inc/dbconfig.hxx55
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx191
-rw-r--r--sw/source/ui/inc/dbtree.hxx89
-rw-r--r--sw/source/ui/inc/dbui.hxx89
-rw-r--r--sw/source/ui/inc/dialmgr.hxx51
-rw-r--r--sw/source/ui/inc/docfnote.hxx53
-rw-r--r--sw/source/ui/inc/docstdlg.hxx88
-rw-r--r--sw/source/ui/inc/drawbase.hxx93
-rw-r--r--sw/source/ui/inc/drawsh.hxx55
-rw-r--r--sw/source/ui/inc/drformsh.hxx50
-rw-r--r--sw/source/ui/inc/drpcps.hxx128
-rw-r--r--sw/source/ui/inc/drwbassh.hxx67
-rw-r--r--sw/source/ui/inc/drwtxtsh.hxx88
-rw-r--r--sw/source/ui/inc/dselect.hxx55
-rw-r--r--sw/source/ui/inc/edtwin.hxx310
-rw-r--r--sw/source/ui/inc/envimg.hxx102
-rw-r--r--sw/source/ui/inc/envlop.hxx152
-rw-r--r--sw/source/ui/inc/fldedt.hxx69
-rw-r--r--sw/source/ui/inc/fldmgr.hxx237
-rw-r--r--sw/source/ui/inc/fldtdlg.hxx71
-rw-r--r--sw/source/ui/inc/fldwrap.hxx66
-rw-r--r--sw/source/ui/inc/fontcfg.hxx122
-rw-r--r--sw/source/ui/inc/formatclipboard.hxx72
-rw-r--r--sw/source/ui/inc/formedt.hxx111
-rw-r--r--sw/source/ui/inc/frmdlg.hxx69
-rw-r--r--sw/source/ui/inc/frmmgr.hxx196
-rw-r--r--sw/source/ui/inc/frmpage.hxx347
-rw-r--r--sw/source/ui/inc/frmsh.hxx53
-rw-r--r--sw/source/ui/inc/frmui.hrc147
-rw-r--r--sw/source/ui/inc/globals.h40
-rw-r--r--sw/source/ui/inc/globdoc.hrc67
-rw-r--r--sw/source/ui/inc/glosbib.hxx124
-rw-r--r--sw/source/ui/inc/glosdoc.hxx151
-rw-r--r--sw/source/ui/inc/gloshdl.hxx113
-rw-r--r--sw/source/ui/inc/gloslst.hxx92
-rw-r--r--sw/source/ui/inc/glossary.hxx200
-rw-r--r--sw/source/ui/inc/glshell.hxx117
-rw-r--r--sw/source/ui/inc/grfsh.hxx47
-rw-r--r--sw/source/ui/inc/hidfunc.h353
-rw-r--r--sw/source/ui/inc/hyp.hxx70
-rw-r--r--sw/source/ui/inc/idxmrk.hxx76
-rw-r--r--sw/source/ui/inc/imaildsplistener.hxx80
-rw-r--r--sw/source/ui/inc/initui.hxx82
-rw-r--r--sw/source/ui/inc/inpdlg.hxx81
-rw-r--r--sw/source/ui/inc/inputwin.hxx141
-rw-r--r--sw/source/ui/inc/insfnote.hxx100
-rw-r--r--sw/source/ui/inc/insrule.hxx69
-rw-r--r--sw/source/ui/inc/instable.hxx103
-rw-r--r--sw/source/ui/inc/javaedit.hxx121
-rw-r--r--sw/source/ui/inc/label.hxx102
-rw-r--r--sw/source/ui/inc/labelcfg.hxx61
-rw-r--r--sw/source/ui/inc/labimg.hxx133
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx65
-rw-r--r--sw/source/ui/inc/linenum.hxx113
-rw-r--r--sw/source/ui/inc/listsh.hxx47
-rw-r--r--sw/source/ui/inc/macassgn.hxx57
-rw-r--r--sw/source/ui/inc/mailconfigpage.hxx113
-rw-r--r--sw/source/ui/inc/maildispatcher.hxx173
-rw-r--r--sw/source/ui/inc/mailmergechildwindow.hxx69
-rw-r--r--sw/source/ui/inc/mailmergehelper.hxx352
-rw-r--r--sw/source/ui/inc/mailmergewizard.hxx106
-rw-r--r--sw/source/ui/inc/mailmrge.hxx207
-rw-r--r--sw/source/ui/inc/makefile.mk46
-rw-r--r--sw/source/ui/inc/mediash.hxx46
-rw-r--r--sw/source/ui/inc/mergetbl.hxx62
-rw-r--r--sw/source/ui/inc/misc.hrc109
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx282
-rw-r--r--sw/source/ui/inc/multmrk.hxx80
-rw-r--r--sw/source/ui/inc/navicfg.hxx121
-rw-r--r--sw/source/ui/inc/navicont.hxx64
-rw-r--r--sw/source/ui/inc/navipi.hxx201
-rw-r--r--sw/source/ui/inc/num.hxx208
-rw-r--r--sw/source/ui/inc/numberingtypelistbox.hxx61
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx90
-rw-r--r--sw/source/ui/inc/numpara.hxx101
-rw-r--r--sw/source/ui/inc/numprevw.hxx74
-rw-r--r--sw/source/ui/inc/olesh.hxx51
-rw-r--r--sw/source/ui/inc/olmenu.hxx95
-rw-r--r--sw/source/ui/inc/optcomp.hxx90
-rw-r--r--sw/source/ui/inc/optload.hxx216
-rw-r--r--sw/source/ui/inc/optpage.hxx505
-rw-r--r--sw/source/ui/inc/outline.hxx169
-rw-r--r--sw/source/ui/inc/pardlg.hxx42
-rw-r--r--sw/source/ui/inc/pattern.hxx47
-rw-r--r--sw/source/ui/inc/pgfnote.hxx96
-rw-r--r--sw/source/ui/inc/pggrid.hxx116
-rw-r--r--sw/source/ui/inc/popbox.hxx70
-rw-r--r--sw/source/ui/inc/popup.hrc61
-rw-r--r--sw/source/ui/inc/prcntfld.hxx102
-rw-r--r--sw/source/ui/inc/prtopt.hxx57
-rw-r--r--sw/source/ui/inc/pview.hxx342
-rw-r--r--sw/source/ui/inc/redlndlg.hxx192
-rw-r--r--sw/source/ui/inc/regionsw.hxx418
-rw-r--r--sw/source/ui/inc/ribbar.hrc138
-rw-r--r--sw/source/ui/inc/rowht.hxx70
-rw-r--r--sw/source/ui/inc/scroll.hxx74
-rw-r--r--sw/source/ui/inc/selglos.hxx77
-rw-r--r--sw/source/ui/inc/sharedconnection.hxx39
-rw-r--r--sw/source/ui/inc/shdwcrsr.hxx70
-rw-r--r--sw/source/ui/inc/shells.hrc115
-rw-r--r--sw/source/ui/inc/split.hxx79
-rw-r--r--sw/source/ui/inc/splittbl.hxx64
-rw-r--r--sw/source/ui/inc/srcedtw.hxx160
-rw-r--r--sw/source/ui/inc/srcview.hxx127
-rw-r--r--sw/source/ui/inc/srtdlg.hxx121
-rw-r--r--sw/source/ui/inc/stmenu.hxx88
-rw-r--r--sw/source/ui/inc/swcont.hxx116
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx226
-rw-r--r--sw/source/ui/inc/swlbox.hxx131
-rw-r--r--sw/source/ui/inc/swmn_tmpl.hrc386
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx51
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.hxx90
-rw-r--r--sw/source/ui/inc/swtablerep.hxx97
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx92
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx540
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx298
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx54
-rw-r--r--sw/source/ui/inc/swvset.hxx44
-rw-r--r--sw/source/ui/inc/swwrtshitem.hxx55
-rw-r--r--sw/source/ui/inc/syncbtn.hxx74
-rw-r--r--sw/source/ui/inc/table.hrc53
-rw-r--r--sw/source/ui/inc/tabledlg.hxx58
-rw-r--r--sw/source/ui/inc/tablemgr.hxx98
-rw-r--r--sw/source/ui/inc/tabsh.hxx61
-rw-r--r--sw/source/ui/inc/tautofmt.hxx121
-rw-r--r--sw/source/ui/inc/tblctrl.hxx60
-rw-r--r--sw/source/ui/inc/tblnumfm.hxx47
-rw-r--r--sw/source/ui/inc/tbxanchr.hxx52
-rw-r--r--sw/source/ui/inc/tbxmgr.hxx55
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx69
-rw-r--r--sw/source/ui/inc/textsh.hxx93
-rw-r--r--sw/source/ui/inc/tmpdlg.hxx69
-rw-r--r--sw/source/ui/inc/tmplctrl.hxx61
-rw-r--r--sw/source/ui/inc/toolbox_tmpl.hrc566
-rw-r--r--sw/source/ui/inc/toxmgr.hxx327
-rw-r--r--sw/source/ui/inc/uiborder.hxx52
-rw-r--r--sw/source/ui/inc/uiitems.hxx119
-rw-r--r--sw/source/ui/inc/uinums.hxx139
-rw-r--r--sw/source/ui/inc/uitool.hxx95
-rw-r--r--sw/source/ui/inc/uivwimp.hxx194
-rw-r--r--sw/source/ui/inc/unodispatch.hxx137
-rw-r--r--sw/source/ui/inc/unotools.hxx138
-rw-r--r--sw/source/ui/inc/unotxvw.hxx277
-rw-r--r--sw/source/ui/inc/usrpref.hxx276
-rw-r--r--sw/source/ui/inc/utlui.hrc197
-rw-r--r--sw/source/ui/inc/view.hxx694
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx59
-rw-r--r--sw/source/ui/inc/web.hrc77
-rw-r--r--sw/source/ui/inc/wformsh.hxx48
-rw-r--r--sw/source/ui/inc/wfrmsh.hxx51
-rw-r--r--sw/source/ui/inc/wgrfsh.hxx48
-rw-r--r--sw/source/ui/inc/wlistsh.hxx45
-rw-r--r--sw/source/ui/inc/wolesh.hxx51
-rw-r--r--sw/source/ui/inc/wordcountdialog.hxx68
-rw-r--r--sw/source/ui/inc/workctrl.hxx228
-rw-r--r--sw/source/ui/inc/wrap.hxx154
-rw-r--r--sw/source/ui/inc/wrtsh.hxx652
-rw-r--r--sw/source/ui/inc/wtabsh.hxx45
-rw-r--r--sw/source/ui/inc/wtextsh.hxx51
-rw-r--r--sw/source/ui/inc/wview.hxx54
-rw-r--r--sw/source/ui/inc/zoomctrl.hxx55
-rw-r--r--sw/source/ui/index/cntex.cxx519
-rw-r--r--sw/source/ui/index/cnttab.cxx4516
-rw-r--r--sw/source/ui/index/cnttab.hrc287
-rw-r--r--sw/source/ui/index/cnttab.src1281
-rw-r--r--sw/source/ui/index/idxmrk.cxx156
-rw-r--r--sw/source/ui/index/idxmrk.hrc111
-rw-r--r--sw/source/ui/index/idxmrk.src638
-rw-r--r--sw/source/ui/index/makefile.mk72
-rw-r--r--sw/source/ui/index/multmrk.cxx101
-rw-r--r--sw/source/ui/index/multmrk.hrc37
-rw-r--r--sw/source/ui/index/multmrk.src121
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx1962
-rw-r--r--sw/source/ui/index/toxmgr.cxx528
-rw-r--r--sw/source/ui/lingu/cvdata.mac19
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx821
-rw-r--r--sw/source/ui/lingu/hyp.cxx179
-rw-r--r--sw/source/ui/lingu/makefile.mk60
-rw-r--r--sw/source/ui/lingu/olmenu.cxx1001
-rw-r--r--sw/source/ui/lingu/olmenu.hrc70
-rw-r--r--sw/source/ui/lingu/olmenu.src135
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.cxx238
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.hxx72
-rw-r--r--sw/source/ui/makefile.mk105
-rw-r--r--sw/source/ui/misc/autocorr.src32
-rw-r--r--sw/source/ui/misc/bookmark.cxx307
-rw-r--r--sw/source/ui/misc/bookmark.hrc37
-rw-r--r--sw/source/ui/misc/bookmark.src119
-rw-r--r--sw/source/ui/misc/docfnote.cxx503
-rw-r--r--sw/source/ui/misc/docfnote.hrc63
-rw-r--r--sw/source/ui/misc/docfnote.src540
-rw-r--r--sw/source/ui/misc/glosbib.cxx583
-rw-r--r--sw/source/ui/misc/glosbib.hrc44
-rw-r--r--sw/source/ui/misc/glosbib.src181
-rw-r--r--sw/source/ui/misc/glosdoc.cxx809
-rw-r--r--sw/source/ui/misc/glossary.cxx1328
-rw-r--r--sw/source/ui/misc/glossary.hrc94
-rw-r--r--sw/source/ui/misc/glossary.src466
-rw-r--r--sw/source/ui/misc/glshell.cxx356
-rw-r--r--sw/source/ui/misc/impfnote.hxx123
-rw-r--r--sw/source/ui/misc/insfnote.cxx356
-rw-r--r--sw/source/ui/misc/insfnote.hrc44
-rw-r--r--sw/source/ui/misc/insfnote.src170
-rw-r--r--sw/source/ui/misc/insrule.cxx229
-rw-r--r--sw/source/ui/misc/insrule.hrc38
-rw-r--r--sw/source/ui/misc/insrule.src117
-rw-r--r--sw/source/ui/misc/linenum.cxx338
-rw-r--r--sw/source/ui/misc/linenum.hrc53
-rw-r--r--sw/source/ui/misc/linenum.src271
-rw-r--r--sw/source/ui/misc/makefile.mk100
-rw-r--r--sw/source/ui/misc/num.cxx1177
-rw-r--r--sw/source/ui/misc/num.hrc58
-rw-r--r--sw/source/ui/misc/num.src365
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx180
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.src101
-rw-r--r--sw/source/ui/misc/outline.cxx1346
-rw-r--r--sw/source/ui/misc/outline.hrc101
-rw-r--r--sw/source/ui/misc/outline.src376
-rw-r--r--sw/source/ui/misc/pgfnote.cxx376
-rw-r--r--sw/source/ui/misc/pgfnote.hrc47
-rw-r--r--sw/source/ui/misc/pgfnote.src195
-rw-r--r--sw/source/ui/misc/pggrid.cxx524
-rw-r--r--sw/source/ui/misc/pggrid.hrc55
-rw-r--r--sw/source/ui/misc/pggrid.src234
-rw-r--r--sw/source/ui/misc/redlndlg.cxx1421
-rw-r--r--sw/source/ui/misc/redlndlg.hrc41
-rw-r--r--sw/source/ui/misc/redlndlg.src151
-rw-r--r--sw/source/ui/misc/srtdlg.cxx495
-rw-r--r--sw/source/ui/misc/srtdlg.hrc68
-rw-r--r--sw/source/ui/misc/srtdlg.src387
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx150
-rw-r--r--sw/source/ui/ribbar/conarc.cxx164
-rw-r--r--sw/source/ui/ribbar/concustomshape.cxx255
-rw-r--r--sw/source/ui/ribbar/conform.cxx147
-rw-r--r--sw/source/ui/ribbar/conpoly.cxx166
-rw-r--r--sw/source/ui/ribbar/conrect.cxx239
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx739
-rw-r--r--sw/source/ui/ribbar/dselect.cxx105
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx688
-rw-r--r--sw/source/ui/ribbar/inputwin.hrc87
-rw-r--r--sw/source/ui/ribbar/inputwin.src348
-rw-r--r--sw/source/ui/ribbar/makefile.mk70
-rw-r--r--sw/source/ui/ribbar/tblctrl.cxx97
-rw-r--r--sw/source/ui/ribbar/tblctrl.hrc38
-rw-r--r--sw/source/ui/ribbar/tblctrl.src97
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx169
-rw-r--r--sw/source/ui/ribbar/tbxanchr.src110
-rw-r--r--sw/source/ui/ribbar/tbxmgr.cxx183
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx947
-rw-r--r--sw/source/ui/ribbar/workctrl.hrc91
-rw-r--r--sw/source/ui/ribbar/workctrl.src599
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx1637
-rw-r--r--sw/source/ui/shells/basesh.cxx2925
-rw-r--r--sw/source/ui/shells/beziersh.cxx359
-rw-r--r--sw/source/ui/shells/drawdlg.cxx264
-rw-r--r--sw/source/ui/shells/drawsh.cxx500
-rw-r--r--sw/source/ui/shells/drformsh.cxx279
-rw-r--r--sw/source/ui/shells/drwbassh.cxx1000
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx963
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx909
-rw-r--r--sw/source/ui/shells/frmsh.cxx1152
-rw-r--r--sw/source/ui/shells/grfsh.cxx710
-rw-r--r--sw/source/ui/shells/grfshex.cxx173
-rwxr-xr-xsw/source/ui/shells/langhelper.cxx567
-rw-r--r--sw/source/ui/shells/listsh.cxx298
-rw-r--r--sw/source/ui/shells/makefile.mk96
-rw-r--r--sw/source/ui/shells/mediash.cxx225
-rw-r--r--sw/source/ui/shells/olesh.cxx83
-rw-r--r--sw/source/ui/shells/shells.src1142
-rw-r--r--sw/source/ui/shells/slotadd.cxx154
-rw-r--r--sw/source/ui/shells/tabsh.cxx1604
-rw-r--r--sw/source/ui/shells/textdrw.cxx153
-rw-r--r--sw/source/ui/shells/textfld.cxx892
-rw-r--r--sw/source/ui/shells/textglos.cxx148
-rw-r--r--sw/source/ui/shells/textidx.cxx264
-rw-r--r--sw/source/ui/shells/textsh.cxx1269
-rw-r--r--sw/source/ui/shells/textsh1.cxx1738
-rw-r--r--sw/source/ui/shells/textsh2.cxx315
-rw-r--r--sw/source/ui/shells/txtattr.cxx850
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx337
-rw-r--r--sw/source/ui/shells/txtnum.cxx254
-rw-r--r--sw/source/ui/smartmenu/makefile.mk57
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx189
-rw-r--r--sw/source/ui/smartmenu/stmenu.hrc44
-rw-r--r--sw/source/ui/smartmenu/stmenu.src47
-rw-r--r--sw/source/ui/table/chartins.cxx297
-rw-r--r--sw/source/ui/table/chartins.hrc50
-rw-r--r--sw/source/ui/table/chartins.src127
-rw-r--r--sw/source/ui/table/colwd.cxx126
-rw-r--r--sw/source/ui/table/colwd.hrc39
-rw-r--r--sw/source/ui/table/colwd.src147
-rw-r--r--sw/source/ui/table/convert.cxx282
-rw-r--r--sw/source/ui/table/convert.hrc50
-rw-r--r--sw/source/ui/table/convert.src188
-rw-r--r--sw/source/ui/table/instable.cxx256
-rw-r--r--sw/source/ui/table/instable.hrc52
-rw-r--r--sw/source/ui/table/instable.src193
-rw-r--r--sw/source/ui/table/makefile.mk85
-rw-r--r--sw/source/ui/table/mergetbl.cxx69
-rw-r--r--sw/source/ui/table/mergetbl.hrc35
-rw-r--r--sw/source/ui/table/mergetbl.src119
-rw-r--r--sw/source/ui/table/rowht.cxx123
-rw-r--r--sw/source/ui/table/rowht.hrc37
-rw-r--r--sw/source/ui/table/rowht.src124
-rw-r--r--sw/source/ui/table/splittbl.cxx82
-rw-r--r--sw/source/ui/table/splittbl.hrc37
-rw-r--r--sw/source/ui/table/splittbl.src128
-rw-r--r--sw/source/ui/table/swtablerep.cxx244
-rw-r--r--sw/source/ui/table/table.src62
-rw-r--r--sw/source/ui/table/tabledlg.cxx1984
-rw-r--r--sw/source/ui/table/tabledlg.hrc113
-rw-r--r--sw/source/ui/table/tabledlg.src752
-rw-r--r--sw/source/ui/table/tablemgr.cxx385
-rw-r--r--sw/source/ui/table/tablepg.hxx242
-rw-r--r--sw/source/ui/table/tautofmt.cxx1060
-rw-r--r--sw/source/ui/table/tautofmt.hrc81
-rw-r--r--sw/source/ui/table/tautofmt.src299
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx620
-rw-r--r--sw/source/ui/uiview/makefile.mk88
-rw-r--r--sw/source/ui/uiview/pview.cxx2789
-rw-r--r--sw/source/ui/uiview/pview.hrc75
-rw-r--r--sw/source/ui/uiview/pview.src498
-rw-r--r--sw/source/ui/uiview/scroll.cxx163
-rw-r--r--sw/source/ui/uiview/srcview.cxx991
-rw-r--r--sw/source/ui/uiview/swcli.cxx174
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx348
-rw-r--r--sw/source/ui/uiview/view.cxx1997
-rw-r--r--sw/source/ui/uiview/view.hrc94
-rw-r--r--sw/source/ui/uiview/view.src379
-rw-r--r--sw/source/ui/uiview/view0.cxx556
-rw-r--r--sw/source/ui/uiview/view1.cxx222
-rw-r--r--sw/source/ui/uiview/view2.cxx2476
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx101
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx101
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx244
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx847
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx71
-rw-r--r--sw/source/ui/uiview/viewling.cxx933
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx758
-rw-r--r--sw/source/ui/uiview/viewport.cxx1387
-rw-r--r--sw/source/ui/uiview/viewprt.cxx637
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx824
-rw-r--r--sw/source/ui/uiview/viewstat.cxx535
-rw-r--r--sw/source/ui/uiview/viewtab.cxx1850
-rw-r--r--sw/source/ui/uno/RefreshListenerContainer.cxx61
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx1053
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.hxx112
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx220
-rw-r--r--sw/source/ui/uno/SwXPrintPreviewSettings.cxx378
-rw-r--r--sw/source/ui/uno/SwXPrintPreviewSettings.hxx92
-rw-r--r--sw/source/ui/uno/detreg.cxx112
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx207
-rw-r--r--sw/source/ui/uno/makefile.mk87
-rw-r--r--sw/source/ui/uno/swdet2.cxx125
-rw-r--r--sw/source/ui/uno/swdetect.cxx493
-rw-r--r--sw/source/ui/uno/swdetect.hxx98
-rw-r--r--sw/source/ui/uno/unoatxt.cxx1316
-rw-r--r--sw/source/ui/uno/unodefaults.cxx75
-rw-r--r--sw/source/ui/uno/unodefaults.hxx51
-rw-r--r--sw/source/ui/uno/unodispatch.cxx451
-rw-r--r--sw/source/ui/uno/unodoc.cxx133
-rw-r--r--sw/source/ui/uno/unofreg.cxx479
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx1257
-rw-r--r--sw/source/ui/uno/unomod.cxx1066
-rw-r--r--sw/source/ui/uno/unomodule.cxx175
-rw-r--r--sw/source/ui/uno/unomodule.hxx101
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx3792
-rw-r--r--sw/source/ui/uno/unotxvw.cxx2218
-rw-r--r--sw/source/ui/uno/warnpassword.cxx89
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx1355
-rw-r--r--sw/source/ui/utlui/attrdesc.hrc126
-rw-r--r--sw/source/ui/utlui/attrdesc.src387
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx167
-rw-r--r--sw/source/ui/utlui/condedit.cxx111
-rw-r--r--sw/source/ui/utlui/content.cxx3268
-rw-r--r--sw/source/ui/utlui/glbltree.cxx1527
-rw-r--r--sw/source/ui/utlui/gloslst.cxx517
-rw-r--r--sw/source/ui/utlui/gloslst.hrc41
-rw-r--r--sw/source/ui/utlui/gloslst.src111
-rw-r--r--sw/source/ui/utlui/initui.cxx308
-rw-r--r--sw/source/ui/utlui/initui.hrc68
-rw-r--r--sw/source/ui/utlui/initui.src518
-rw-r--r--sw/source/ui/utlui/makefile.mk83
-rw-r--r--sw/source/ui/utlui/navicfg.cxx141
-rw-r--r--sw/source/ui/utlui/navipi.cxx1552
-rw-r--r--sw/source/ui/utlui/navipi.hrc94
-rw-r--r--sw/source/ui/utlui/navipi.src539
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx543
-rw-r--r--sw/source/ui/utlui/poolfmt.src748
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx373
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx138
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx147
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx116
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx177
-rw-r--r--sw/source/ui/utlui/uiitems.cxx327
-rw-r--r--sw/source/ui/utlui/uitool.cxx777
-rw-r--r--sw/source/ui/utlui/unotools.cxx524
-rw-r--r--sw/source/ui/utlui/unotools.hrc44
-rw-r--r--sw/source/ui/utlui/unotools.src133
-rw-r--r--sw/source/ui/utlui/utlui.src477
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx212
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx102
-rw-r--r--sw/source/ui/web/makefile.mk63
-rw-r--r--sw/source/ui/web/wdocsh.cxx117
-rw-r--r--sw/source/ui/web/web.src348
-rw-r--r--sw/source/ui/web/wformsh.cxx74
-rw-r--r--sw/source/ui/web/wfrmsh.cxx98
-rw-r--r--sw/source/ui/web/wgrfsh.cxx77
-rw-r--r--sw/source/ui/web/wlistsh.cxx70
-rw-r--r--sw/source/ui/web/wolesh.cxx71
-rw-r--r--sw/source/ui/web/wtabsh.cxx79
-rw-r--r--sw/source/ui/web/wtextsh.cxx102
-rw-r--r--sw/source/ui/web/wview.cxx340
-rw-r--r--sw/source/ui/wrtsh/delete.cxx573
-rw-r--r--sw/source/ui/wrtsh/makefile.mk66
-rw-r--r--sw/source/ui/wrtsh/move.cxx694
-rw-r--r--sw/source/ui/wrtsh/select.cxx1082
-rw-r--r--sw/source/ui/wrtsh/wrtsh.hrc51
-rw-r--r--sw/source/ui/wrtsh/wrtsh.src55
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx1850
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx494
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx250
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx303
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx185
-rw-r--r--sw/uiconfig/layout/delzip1
-rw-r--r--sw/uiconfig/layout/layout.mk33
-rw-r--r--sw/uiconfig/layout/makefile.mk50
-rw-r--r--sw/uiconfig/layout/wordcount.xml50
-rw-r--r--sw/uiconfig/sglobal/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/sglobal/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/sglobal/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/sglobal/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/sglobal/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml457
-rw-r--r--sw/uiconfig/sglobal/statusbar/statusbar.xml15
-rw-r--r--sw/uiconfig/sglobal/toolbar/alignmentbar.xml11
-rw-r--r--sw/uiconfig/sglobal/toolbar/arrowshapes.xml34
-rw-r--r--sw/uiconfig/sglobal/toolbar/basicshapes.xml29
-rw-r--r--sw/uiconfig/sglobal/toolbar/bezierobjectbar.xml20
-rw-r--r--sw/uiconfig/sglobal/toolbar/calloutshapes.xml11
-rw-r--r--sw/uiconfig/sglobal/toolbar/colorbar.xml15
-rw-r--r--sw/uiconfig/sglobal/toolbar/drawbar.xml34
-rw-r--r--sw/uiconfig/sglobal/toolbar/drawingobjectbar.xml40
-rw-r--r--sw/uiconfig/sglobal/toolbar/drawtextobjectbar.xml34
-rw-r--r--sw/uiconfig/sglobal/toolbar/extrusionobjectbar.xml16
-rw-r--r--sw/uiconfig/sglobal/toolbar/flowchartshapes.xml36
-rw-r--r--sw/uiconfig/sglobal/toolbar/fontworkobjectbar.xml11
-rw-r--r--sw/uiconfig/sglobal/toolbar/fontworkshapetype.xml38
-rw-r--r--sw/uiconfig/sglobal/toolbar/formcontrols.xml26
-rw-r--r--sw/uiconfig/sglobal/toolbar/formdesign.xml31
-rw-r--r--sw/uiconfig/sglobal/toolbar/formsfilterbar.xml8
-rw-r--r--sw/uiconfig/sglobal/toolbar/formsnavigationbar.xml32
-rw-r--r--sw/uiconfig/sglobal/toolbar/formtextobjectbar.xml28
-rw-r--r--sw/uiconfig/sglobal/toolbar/frameobjectbar.xml34
-rw-r--r--sw/uiconfig/sglobal/toolbar/fullscreenbar.xml5
-rw-r--r--sw/uiconfig/sglobal/toolbar/graffilterbar.xml17
-rw-r--r--sw/uiconfig/sglobal/toolbar/graphicobjectbar.xml18
-rw-r--r--sw/uiconfig/sglobal/toolbar/insertbar.xml30
-rw-r--r--sw/uiconfig/sglobal/toolbar/insertobjectbar.xml7
-rw-r--r--sw/uiconfig/sglobal/toolbar/mediaobjectbar.xml7
-rw-r--r--sw/uiconfig/sglobal/toolbar/moreformcontrols.xml23
-rw-r--r--sw/uiconfig/sglobal/toolbar/numobjectbar.xml23
-rw-r--r--sw/uiconfig/sglobal/toolbar/oleobjectbar.xml30
-rw-r--r--sw/uiconfig/sglobal/toolbar/optimizetablebar.xml8
-rw-r--r--sw/uiconfig/sglobal/toolbar/previewobjectbar.xml25
-rw-r--r--sw/uiconfig/sglobal/toolbar/standardbar.xml42
-rw-r--r--sw/uiconfig/sglobal/toolbar/starshapes.xml17
-rw-r--r--sw/uiconfig/sglobal/toolbar/symbolshapes.xml24
-rw-r--r--sw/uiconfig/sglobal/toolbar/tableobjectbar.xml35
-rw-r--r--sw/uiconfig/sglobal/toolbar/textobjectbar.xml44
-rw-r--r--sw/uiconfig/sglobal/toolbar/toolbar.xml13
-rw-r--r--sw/uiconfig/sglobal/toolbar/viewerbar.xml18
-rw-r--r--sw/uiconfig/sweb/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/sweb/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/sweb/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/sweb/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/sweb/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml386
-rw-r--r--sw/uiconfig/sweb/statusbar/statusbar.xml14
-rw-r--r--sw/uiconfig/sweb/toolbar/arrowshapes.xml34
-rw-r--r--sw/uiconfig/sweb/toolbar/basicshapes.xml29
-rw-r--r--sw/uiconfig/sweb/toolbar/bezierobjectbar.xml20
-rw-r--r--sw/uiconfig/sweb/toolbar/calloutshapes.xml11
-rw-r--r--sw/uiconfig/sweb/toolbar/colorbar.xml17
-rw-r--r--sw/uiconfig/sweb/toolbar/drawingobjectbar.xml39
-rw-r--r--sw/uiconfig/sweb/toolbar/drawtextobjectbar.xml34
-rw-r--r--sw/uiconfig/sweb/toolbar/extrusionobjectbar.xml16
-rw-r--r--sw/uiconfig/sweb/toolbar/flowchartshapes.xml36
-rw-r--r--sw/uiconfig/sweb/toolbar/fontworkobjectbar.xml11
-rw-r--r--sw/uiconfig/sweb/toolbar/fontworkshapetype.xml38
-rw-r--r--sw/uiconfig/sweb/toolbar/formcontrols.xml25
-rw-r--r--sw/uiconfig/sweb/toolbar/formdesign.xml31
-rw-r--r--sw/uiconfig/sweb/toolbar/formsfilterbar.xml8
-rw-r--r--sw/uiconfig/sweb/toolbar/formsnavigationbar.xml32
-rw-r--r--sw/uiconfig/sweb/toolbar/formtextobjectbar.xml28
-rw-r--r--sw/uiconfig/sweb/toolbar/frameobjectbar.xml34
-rw-r--r--sw/uiconfig/sweb/toolbar/fullscreenbar.xml5
-rw-r--r--sw/uiconfig/sweb/toolbar/graffilterbar.xml17
-rw-r--r--sw/uiconfig/sweb/toolbar/graphicobjectbar.xml26
-rw-r--r--sw/uiconfig/sweb/toolbar/insertbar.xml25
-rw-r--r--sw/uiconfig/sweb/toolbar/mediaobjectbar.xml7
-rw-r--r--sw/uiconfig/sweb/toolbar/numobjectbar.xml23
-rw-r--r--sw/uiconfig/sweb/toolbar/oleobjectbar.xml30
-rw-r--r--sw/uiconfig/sweb/toolbar/optimizetablebar.xml8
-rw-r--r--sw/uiconfig/sweb/toolbar/previewobjectbar.xml25
-rw-r--r--sw/uiconfig/sweb/toolbar/standardbar.xml45
-rw-r--r--sw/uiconfig/sweb/toolbar/starshapes.xml17
-rw-r--r--sw/uiconfig/sweb/toolbar/symbolshapes.xml24
-rw-r--r--sw/uiconfig/sweb/toolbar/tableobjectbar.xml35
-rw-r--r--sw/uiconfig/sweb/toolbar/textobjectbar.xml44
-rw-r--r--sw/uiconfig/sweb/toolbar/toolbar.xml11
-rw-r--r--sw/uiconfig/sweb/toolbar/viewerbar.xml18
-rw-r--r--sw/uiconfig/swform/accelerator/de/default.xml119
-rw-r--r--sw/uiconfig/swform/accelerator/en-US/default.xml120
-rw-r--r--sw/uiconfig/swform/accelerator/es/default.xml119
-rw-r--r--sw/uiconfig/swform/accelerator/fr/default.xml119
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml452
-rw-r--r--sw/uiconfig/swform/statusbar/statusbar.xml14
-rw-r--r--sw/uiconfig/swform/toolbar/alignmentbar.xml11
-rw-r--r--sw/uiconfig/swform/toolbar/arrowshapes.xml34
-rw-r--r--sw/uiconfig/swform/toolbar/basicshapes.xml29
-rw-r--r--sw/uiconfig/swform/toolbar/bezierobjectbar.xml20
-rw-r--r--sw/uiconfig/swform/toolbar/calloutshapes.xml11
-rw-r--r--sw/uiconfig/swform/toolbar/colorbar.xml15
-rw-r--r--sw/uiconfig/swform/toolbar/drawbar.xml34
-rw-r--r--sw/uiconfig/swform/toolbar/drawingobjectbar.xml40
-rw-r--r--sw/uiconfig/swform/toolbar/drawtextobjectbar.xml34
-rw-r--r--sw/uiconfig/swform/toolbar/extrusionobjectbar.xml16
-rw-r--r--sw/uiconfig/swform/toolbar/flowchartshapes.xml36
-rw-r--r--sw/uiconfig/swform/toolbar/fontworkobjectbar.xml11
-rw-r--r--sw/uiconfig/swform/toolbar/fontworkshapetype.xml38
-rw-r--r--sw/uiconfig/swform/toolbar/formcontrols.xml26
-rw-r--r--sw/uiconfig/swform/toolbar/formdesign.xml33
-rw-r--r--sw/uiconfig/swform/toolbar/formsfilterbar.xml8
-rw-r--r--sw/uiconfig/swform/toolbar/formsnavigationbar.xml33
-rw-r--r--sw/uiconfig/swform/toolbar/formtextobjectbar.xml28
-rw-r--r--sw/uiconfig/swform/toolbar/frameobjectbar.xml34
-rw-r--r--sw/uiconfig/swform/toolbar/fullscreenbar.xml5
-rw-r--r--sw/uiconfig/swform/toolbar/graffilterbar.xml17
-rw-r--r--sw/uiconfig/swform/toolbar/graphicobjectbar.xml18
-rw-r--r--sw/uiconfig/swform/toolbar/insertbar.xml29
-rw-r--r--sw/uiconfig/swform/toolbar/insertobjectbar.xml7
-rw-r--r--sw/uiconfig/swform/toolbar/mediaobjectbar.xml7
-rw-r--r--sw/uiconfig/swform/toolbar/moreformcontrols.xml23
-rw-r--r--sw/uiconfig/swform/toolbar/numobjectbar.xml23
-rw-r--r--sw/uiconfig/swform/toolbar/oleobjectbar.xml30
-rw-r--r--sw/uiconfig/swform/toolbar/optimizetablebar.xml8
-rw-r--r--sw/uiconfig/swform/toolbar/previewobjectbar.xml25
-rw-r--r--sw/uiconfig/swform/toolbar/standardbar.xml42
-rw-r--r--sw/uiconfig/swform/toolbar/starshapes.xml17
-rw-r--r--sw/uiconfig/swform/toolbar/symbolshapes.xml24
-rw-r--r--sw/uiconfig/swform/toolbar/tableobjectbar.xml35
-rw-r--r--sw/uiconfig/swform/toolbar/textobjectbar.xml44
-rw-r--r--sw/uiconfig/swform/toolbar/toolbar.xml13
-rw-r--r--sw/uiconfig/swform/toolbar/viewerbar.xml18
-rw-r--r--sw/uiconfig/swreport/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/swreport/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/swreport/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/swreport/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/swreport/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml452
-rw-r--r--sw/uiconfig/swreport/statusbar/statusbar.xml14
-rw-r--r--sw/uiconfig/swreport/toolbar/alignmentbar.xml11
-rw-r--r--sw/uiconfig/swreport/toolbar/arrowshapes.xml34
-rw-r--r--sw/uiconfig/swreport/toolbar/basicshapes.xml29
-rw-r--r--sw/uiconfig/swreport/toolbar/bezierobjectbar.xml20
-rw-r--r--sw/uiconfig/swreport/toolbar/calloutshapes.xml11
-rw-r--r--sw/uiconfig/swreport/toolbar/colorbar.xml15
-rw-r--r--sw/uiconfig/swreport/toolbar/drawbar.xml34
-rw-r--r--sw/uiconfig/swreport/toolbar/drawingobjectbar.xml40
-rw-r--r--sw/uiconfig/swreport/toolbar/drawtextobjectbar.xml34
-rw-r--r--sw/uiconfig/swreport/toolbar/extrusionobjectbar.xml16
-rw-r--r--sw/uiconfig/swreport/toolbar/flowchartshapes.xml36
-rw-r--r--sw/uiconfig/swreport/toolbar/fontworkobjectbar.xml11
-rw-r--r--sw/uiconfig/swreport/toolbar/fontworkshapetype.xml38
-rw-r--r--sw/uiconfig/swreport/toolbar/formcontrols.xml26
-rw-r--r--sw/uiconfig/swreport/toolbar/formdesign.xml34
-rw-r--r--sw/uiconfig/swreport/toolbar/formsfilterbar.xml8
-rw-r--r--sw/uiconfig/swreport/toolbar/formsnavigationbar.xml32
-rw-r--r--sw/uiconfig/swreport/toolbar/formtextobjectbar.xml28
-rw-r--r--sw/uiconfig/swreport/toolbar/frameobjectbar.xml34
-rw-r--r--sw/uiconfig/swreport/toolbar/fullscreenbar.xml5
-rw-r--r--sw/uiconfig/swreport/toolbar/graffilterbar.xml17
-rw-r--r--sw/uiconfig/swreport/toolbar/graphicobjectbar.xml18
-rw-r--r--sw/uiconfig/swreport/toolbar/insertbar.xml29
-rw-r--r--sw/uiconfig/swreport/toolbar/insertobjectbar.xml7
-rw-r--r--sw/uiconfig/swreport/toolbar/mediaobjectbar.xml7
-rw-r--r--sw/uiconfig/swreport/toolbar/moreformcontrols.xml23
-rw-r--r--sw/uiconfig/swreport/toolbar/numobjectbar.xml23
-rw-r--r--sw/uiconfig/swreport/toolbar/oleobjectbar.xml30
-rw-r--r--sw/uiconfig/swreport/toolbar/optimizetablebar.xml8
-rw-r--r--sw/uiconfig/swreport/toolbar/previewobjectbar.xml25
-rw-r--r--sw/uiconfig/swreport/toolbar/standardbar.xml42
-rw-r--r--sw/uiconfig/swreport/toolbar/starshapes.xml17
-rw-r--r--sw/uiconfig/swreport/toolbar/symbolshapes.xml24
-rw-r--r--sw/uiconfig/swreport/toolbar/tableobjectbar.xml35
-rw-r--r--sw/uiconfig/swreport/toolbar/textobjectbar.xml44
-rw-r--r--sw/uiconfig/swreport/toolbar/toolbar.xml13
-rw-r--r--sw/uiconfig/swreport/toolbar/viewerbar.xml18
-rw-r--r--sw/uiconfig/swriter/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/swriter/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/swriter/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/swriter/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/swriter/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml460
-rw-r--r--sw/uiconfig/swriter/statusbar/statusbar.xml15
-rw-r--r--sw/uiconfig/swriter/toolbar/alignmentbar.xml11
-rw-r--r--sw/uiconfig/swriter/toolbar/arrowshapes.xml34
-rw-r--r--sw/uiconfig/swriter/toolbar/basicshapes.xml29
-rw-r--r--sw/uiconfig/swriter/toolbar/bezierobjectbar.xml20
-rw-r--r--sw/uiconfig/swriter/toolbar/calloutshapes.xml11
-rw-r--r--sw/uiconfig/swriter/toolbar/colorbar.xml15
-rw-r--r--sw/uiconfig/swriter/toolbar/drawbar.xml34
-rw-r--r--sw/uiconfig/swriter/toolbar/drawingobjectbar.xml40
-rw-r--r--sw/uiconfig/swriter/toolbar/drawtextobjectbar.xml34
-rw-r--r--sw/uiconfig/swriter/toolbar/extrusionobjectbar.xml16
-rw-r--r--sw/uiconfig/swriter/toolbar/flowchartshapes.xml36
-rw-r--r--sw/uiconfig/swriter/toolbar/fontworkobjectbar.xml11
-rw-r--r--sw/uiconfig/swriter/toolbar/fontworkshapetype.xml38
-rw-r--r--sw/uiconfig/swriter/toolbar/formcontrols.xml26
-rw-r--r--sw/uiconfig/swriter/toolbar/formdesign.xml33
-rw-r--r--sw/uiconfig/swriter/toolbar/formsfilterbar.xml8
-rw-r--r--sw/uiconfig/swriter/toolbar/formsnavigationbar.xml33
-rw-r--r--sw/uiconfig/swriter/toolbar/formtextobjectbar.xml28
-rw-r--r--sw/uiconfig/swriter/toolbar/frameobjectbar.xml34
-rw-r--r--sw/uiconfig/swriter/toolbar/fullscreenbar.xml5
-rw-r--r--sw/uiconfig/swriter/toolbar/graffilterbar.xml17
-rw-r--r--sw/uiconfig/swriter/toolbar/graphicobjectbar.xml18
-rw-r--r--sw/uiconfig/swriter/toolbar/insertbar.xml31
-rw-r--r--sw/uiconfig/swriter/toolbar/mediaobjectbar.xml7
-rw-r--r--sw/uiconfig/swriter/toolbar/moreformcontrols.xml23
-rw-r--r--sw/uiconfig/swriter/toolbar/numobjectbar.xml23
-rw-r--r--sw/uiconfig/swriter/toolbar/oleobjectbar.xml30
-rw-r--r--sw/uiconfig/swriter/toolbar/optimizetablebar.xml8
-rw-r--r--sw/uiconfig/swriter/toolbar/previewobjectbar.xml25
-rw-r--r--sw/uiconfig/swriter/toolbar/standardbar.xml42
-rw-r--r--sw/uiconfig/swriter/toolbar/starshapes.xml17
-rw-r--r--sw/uiconfig/swriter/toolbar/symbolshapes.xml24
-rw-r--r--sw/uiconfig/swriter/toolbar/tableobjectbar.xml35
-rw-r--r--sw/uiconfig/swriter/toolbar/textobjectbar.xml44
-rw-r--r--sw/uiconfig/swriter/toolbar/toolbar.xml13
-rw-r--r--sw/uiconfig/swriter/toolbar/viewerbar.xml18
-rw-r--r--sw/uiconfig/swxform/accelerator/de/default.xml114
-rw-r--r--sw/uiconfig/swxform/accelerator/en-GB/default.xml115
-rw-r--r--sw/uiconfig/swxform/accelerator/en-US/default.xml115
-rw-r--r--sw/uiconfig/swxform/accelerator/es/default.xml114
-rw-r--r--sw/uiconfig/swxform/accelerator/fr/default.xml114
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml453
-rw-r--r--sw/uiconfig/swxform/statusbar/statusbar.xml15
-rw-r--r--sw/uiconfig/swxform/toolbar/alignmentbar.xml11
-rw-r--r--sw/uiconfig/swxform/toolbar/arrowshapes.xml34
-rw-r--r--sw/uiconfig/swxform/toolbar/basicshapes.xml29
-rw-r--r--sw/uiconfig/swxform/toolbar/bezierobjectbar.xml20
-rw-r--r--sw/uiconfig/swxform/toolbar/calloutshapes.xml11
-rw-r--r--sw/uiconfig/swxform/toolbar/colorbar.xml15
-rw-r--r--sw/uiconfig/swxform/toolbar/drawbar.xml34
-rw-r--r--sw/uiconfig/swxform/toolbar/drawingobjectbar.xml40
-rw-r--r--sw/uiconfig/swxform/toolbar/drawtextobjectbar.xml34
-rw-r--r--sw/uiconfig/swxform/toolbar/extrusionobjectbar.xml16
-rw-r--r--sw/uiconfig/swxform/toolbar/flowchartshapes.xml36
-rw-r--r--sw/uiconfig/swxform/toolbar/fontworkobjectbar.xml11
-rw-r--r--sw/uiconfig/swxform/toolbar/fontworkshapetype.xml38
-rw-r--r--sw/uiconfig/swxform/toolbar/formcontrols.xml23
-rw-r--r--sw/uiconfig/swxform/toolbar/formdesign.xml33
-rw-r--r--sw/uiconfig/swxform/toolbar/formsfilterbar.xml8
-rw-r--r--sw/uiconfig/swxform/toolbar/formsnavigationbar.xml33
-rw-r--r--sw/uiconfig/swxform/toolbar/formtextobjectbar.xml28
-rw-r--r--sw/uiconfig/swxform/toolbar/frameobjectbar.xml34
-rw-r--r--sw/uiconfig/swxform/toolbar/fullscreenbar.xml5
-rw-r--r--sw/uiconfig/swxform/toolbar/graffilterbar.xml17
-rw-r--r--sw/uiconfig/swxform/toolbar/graphicobjectbar.xml18
-rw-r--r--sw/uiconfig/swxform/toolbar/insertbar.xml29
-rw-r--r--sw/uiconfig/swxform/toolbar/insertobjectbar.xml7
-rw-r--r--sw/uiconfig/swxform/toolbar/mediaobjectbar.xml7
-rw-r--r--sw/uiconfig/swxform/toolbar/moreformcontrols.xml12
-rw-r--r--sw/uiconfig/swxform/toolbar/numobjectbar.xml23
-rw-r--r--sw/uiconfig/swxform/toolbar/oleobjectbar.xml30
-rw-r--r--sw/uiconfig/swxform/toolbar/optimizetablebar.xml8
-rw-r--r--sw/uiconfig/swxform/toolbar/previewobjectbar.xml25
-rw-r--r--sw/uiconfig/swxform/toolbar/standardbar.xml42
-rw-r--r--sw/uiconfig/swxform/toolbar/starshapes.xml17
-rw-r--r--sw/uiconfig/swxform/toolbar/symbolshapes.xml24
-rw-r--r--sw/uiconfig/swxform/toolbar/tableobjectbar.xml35
-rw-r--r--sw/uiconfig/swxform/toolbar/textobjectbar.xml44
-rw-r--r--sw/uiconfig/swxform/toolbar/toolbar.xml13
-rw-r--r--sw/uiconfig/swxform/toolbar/viewerbar.xml18
-rw-r--r--sw/util/hidother.hrc34
-rw-r--r--sw/util/hidother.src396
-rw-r--r--sw/util/makefile.mk344
-rw-r--r--sw/util/msword.map10
-rw-r--r--sw/util/sw.flt136
-rw-r--r--sw/util/sw.map8
-rw-r--r--sw/util/swd.map8
-rw-r--r--sw/util/swui.map6
-rw-r--r--sw/xml/writer.xml1244
2171 files changed, 964037 insertions, 0 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
new file mode 100644
index 000000000000..fb4251ffec0c
--- /dev/null
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: EnhancedPDFExportHelper.hxx,v $
+ * $Revision: 1.10.174.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ENHANCEDPDFEXPORTHELPER_HXX
+#define _ENHANCEDPDFEXPORTHELPER_HXX
+
+#include <vcl/pdfextoutdevdata.hxx>
+#include <i18npool/lang.h>
+#include <swrect.hxx>
+#include <swtypes.hxx>
+
+#include <map>
+#include <vector>
+#include <set>
+
+namespace vcl
+{
+ class PDFExtOutDevData;
+}
+class OutputDevice;
+class SwFrm;
+class SwLinePortion;
+class SwTxtPainter;
+class SwEditShell;
+namespace rtl
+{
+ class OUString;
+}
+class MultiSelection;
+class SwTxtNode;
+class SwNumRule;
+class SwTable;
+class SwNumberTreeNode;
+class String;
+class SvxLanguageItem;
+
+
+/*
+ * Mapping of OOo elements to tagged pdf elements:
+ *
+ * OOo element tagged pdf element
+ * ----------- ------------------
+ *
+ * Grouping elements:
+ *
+ * SwRootFrm Document
+ * Part
+ * Art
+ * SwSection Sect
+ * SwFtnContFrm and SwFlyFrm Div
+ * SwFmt "Quotations" BlockQuote
+ * SwFmt "Caption" Caption
+ * SwSection (TOC) TOC
+ * SwTxtNode in TOC TOCI
+ * SwSection (Index) Index
+ *
+ * Block-Level Structure Elements:
+ *
+ * SwTxtNode P
+ * SwFmt "Heading" H
+ * SwTxtNode with Outline H1 - H6
+ * SwTxtNode with NumRule L, LI, LBody
+ * SwTable Table
+ * SwRowFrm TR
+ * SwCellFrm in Headline row or
+ * SwFtm "Table Heading" TH
+ * SwCellFrm TD
+ *
+ * Inline-Level Structure Elements:
+ *
+ * SwTxtPortion Span
+ * SwFmt "Quotation" Quote
+ * SwFtnFrm Note
+ * Form
+ * Reference
+ * SwFldPortion (AuthorityField) BibEntry
+ * SwFmt "Source Text" Code
+ * SwFtnPortion, SwFldPortion (RefField) Link
+ *
+ * Illustration elements:
+ *
+ * SwFlyFrm with SwNoTxtFrm Figure
+ * SwFlyFrm with Math OLE Object Formula
+ *
+ */
+
+struct Num_Info
+{
+ const SwFrm& mrFrm;
+ Num_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {};
+};
+
+struct Frm_Info
+{
+ const SwFrm& mrFrm;
+ Frm_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {};
+};
+
+struct Por_Info
+{
+ const SwLinePortion& mrPor;
+ const SwTxtPainter& mrTxtPainter;
+ Por_Info( const SwLinePortion& rPor, const SwTxtPainter& rTxtPainer )
+ : mrPor( rPor ), mrTxtPainter( rTxtPainer ) {};
+};
+
+struct lt_TableColumn
+{
+ bool operator()( long nVal1, long nVal2 ) const
+ {
+ return nVal1 + ( MINLAY - 1 ) < nVal2;
+ }
+};
+
+/*************************************************************************
+ * class SwTaggedPDFHelper
+ * Analyses a given frame during painting and generates the appropriate
+ * structure elements.
+ *************************************************************************/
+
+class SwTaggedPDFHelper
+{
+ private:
+
+ // This will be incremented for each BeginTag() call.
+ // It denotes the number of tags to close during EndStructureElements();
+ BYTE nEndStructureElement;
+
+ // If an already existing tag is reopened for follows of flow frames,
+ // this value stores the tag id which has to be restored.
+ sal_Int32 nRestoreCurrentTag;
+
+ vcl::PDFExtOutDevData* mpPDFExtOutDevData;
+
+ const Num_Info* mpNumInfo;
+ const Frm_Info* mpFrmInfo;
+ const Por_Info* mpPorInfo;
+
+ void BeginTag( vcl::PDFWriter::StructElement aTagRole, const String& rTagName );
+ void EndTag();
+
+ void SetAttributes( vcl::PDFWriter::StructElement eType );
+
+ // These functions are called by the c'tor, d'tor
+ void BeginNumberedListStructureElements();
+ void BeginBlockStructureElements();
+ void BeginInlineStructureElements();
+ void EndStructureElements();
+
+ bool CheckReopenTag();
+ bool CheckRestoreTag() const;
+
+ public:
+
+ // pFrmInfo != 0 => BeginBlockStructureElement
+ // pPorInfo != 0 => BeginInlineStructureElement
+ // pFrmInfo, pPorInfo = 0 => BeginNonStructureElement
+ SwTaggedPDFHelper( const Num_Info* pNumInfo, const Frm_Info* pFrmInfo, const Por_Info* pPorInfo,
+ OutputDevice& rOut );
+ ~SwTaggedPDFHelper();
+
+ static bool IsExportTaggedPDF( const OutputDevice& rOut );
+};
+
+/*************************************************************************
+ * class SwEnhancedPDFExportHelper
+ * Analyses the document structure and export Notes, Hyperlinks, References,
+ * and Outline. Link ids created during pdf export are stored in
+ * aReferenceIdMap and aHyperlinkIdMap, in order to use them during
+ * tagged pdf output. Therefore the SwEnhancedPDFExportHelper is used
+ * before painting. Unfortunately links from the EditEngine into the
+ * Writer document require to be exported after they have been painted.
+ * Therefore SwEnhancedPDFExportHelper also has to be used after the
+ * painting process, the parameter bEditEngineOnly indicated that only
+ * the bookmarks from the EditEngine have to be processed.
+ *************************************************************************/
+
+typedef std::set< long, lt_TableColumn > TableColumnsMapEntry;
+typedef std::pair< SwRect, sal_Int32 > IdMapEntry;
+typedef std::vector< IdMapEntry > LinkIdMap;
+typedef std::map< const SwTable*, TableColumnsMapEntry > TableColumnsMap;
+typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListIdMap;
+typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListBodyIdMap;
+typedef std::map< const void*, sal_Int32 > FrmTagIdMap;
+
+class SwEnhancedPDFExportHelper
+{
+ private:
+
+ SwEditShell& mrSh;
+ OutputDevice& mrOut;
+
+ MultiSelection* pPageRange;
+
+ bool mbSkipEmptyPages;
+ bool mbEditEngineOnly;
+
+ static TableColumnsMap aTableColumnsMap;
+ static LinkIdMap aLinkIdMap;
+ static NumListIdMap aNumListIdMap;
+ static NumListBodyIdMap aNumListBodyIdMap;
+ static FrmTagIdMap aFrmTagIdMap;
+
+ static LanguageType eLanguageDefault;
+
+ void EnhancedPDFExport();
+ sal_Int32 CalcOutputPageNum( const SwRect& rRect ) const;
+
+ void MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rPDFExtOutDevData,
+ const SwTxtNode& rTNd, const SwRect& rLinkRect,
+ sal_Int32 nDestId, const String& rURL, bool bIntern ) const;
+
+ public:
+
+ SwEnhancedPDFExportHelper( SwEditShell& rSh,
+ OutputDevice& rOut,
+ const rtl::OUString& rPageRange,
+ bool bSkipEmptyPages,
+ bool bEditEngineOnly );
+
+ ~SwEnhancedPDFExportHelper();
+
+ static TableColumnsMap& GetTableColumnsMap() {return aTableColumnsMap; }
+ static LinkIdMap& GetLinkIdMap() { return aLinkIdMap; }
+ static NumListIdMap& GetNumListIdMap() {return aNumListIdMap; }
+ static NumListBodyIdMap& GetNumListBodyIdMap() {return aNumListBodyIdMap; }
+ static FrmTagIdMap& GetFrmTagIdMap() { return aFrmTagIdMap; }
+
+ static LanguageType GetDefaultLanguage() {return eLanguageDefault; }
+};
+
+#endif
diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx
new file mode 100644
index 000000000000..08a1b25e294d
--- /dev/null
+++ b/sw/inc/HandleAnchorNodeChg.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: HandleAnchorNodeChg.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _HANDLEANCHORNODECHG_HXX
+#define _HANDLEANCHORNODECHG_HXX
+
+class SwFlyFrmFmt;
+class SwFmtAnchor;
+class SwFlyFrm;
+
+// OD 2006-02-28 #125892#
+// helper class to track change of anchor node of at-paragraph respectively
+// at-character anchored fly frames
+// if such a change happens, it has to be checked, if the count of the anchor
+// frames also change. if yes, a re-creation of the fly frames is needed:
+// - deletion of existing fly frames before the intrinsic anchor node changes
+// - creation of new fly frames after the intrinsic anchor node change.
+class SwHandleAnchorNodeChg
+{
+public:
+ /** checks, if re-creation of fly frames for an anchor node change at the
+ given fly frame format is necessary, and performs the first part.
+
+ @author OD
+
+ @param _rFlyFrmFmt
+ reference to the fly frame format instance, which is handled.
+
+ @param _rNewAnchorFmt
+ new anchor attribute, which will be applied at the given fly frame format
+
+ @param _pKeepThisFlyFrm
+ optional parameter - pointer to a fly frame of the given fly frame format,
+ which isn't deleted, if re-creation of fly frames is necessary.
+ */
+ SwHandleAnchorNodeChg( SwFlyFrmFmt& _rFlyFrmFmt,
+ const SwFmtAnchor& _rNewAnchorFmt,
+ SwFlyFrm* _pKeepThisFlyFrm = 0L );
+
+ /** calls <SwFlyFrmFmt::MakeFrms>, if re-creation of fly frames is necessary.
+
+ @author OD
+ */
+ ~SwHandleAnchorNodeChg();
+
+private:
+ // fly frame format, which is tracked for a anchor node change.
+ SwFlyFrmFmt& mrFlyFrmFmt;
+ // internal flag, which indicates that the certain anchor node change occurs
+ // and that re-creation of fly frames is necessary.
+ bool mbAnchorNodeChanged;
+
+ // no copy-constructor
+ SwHandleAnchorNodeChg( const SwHandleAnchorNodeChg& );
+ // no assignment-operator
+ void operator=( const SwHandleAnchorNodeChg );
+};
+#endif
diff --git a/sw/inc/IDocumentChartDataProviderAccess.hxx b/sw/inc/IDocumentChartDataProviderAccess.hxx
new file mode 100644
index 000000000000..2b1482dc9732
--- /dev/null
+++ b/sw/inc/IDocumentChartDataProviderAccess.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentChartDataProviderAccess.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+ #define IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+
+#include "com/sun/star/uno/Reference.hxx"
+
+namespace com { namespace sun { namespace star { namespace frame {
+ class XModel;
+}}}}
+
+class SwTable;
+class SwChartDataProvider;
+class SwChartLockController_Helper;
+
+
+ /** Give access to the data-provider for chart
+ */
+ class IDocumentChartDataProviderAccess
+ {
+ public:
+
+ /**
+ returns or creates the data-provider for chart
+ */
+ virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const = 0;
+
+ /**
+ calls createInternalDataProvider for all charts using the specified table
+ */
+ virtual void CreateChartInternalDataProviders( const SwTable *pTable ) = 0;
+
+ /**
+ returns chart controller helper that is used to lock/unlock all
+ charts when relevant parts of tables are changed
+ */
+ virtual SwChartLockController_Helper & GetChartControllerHelper() = 0;
+
+ protected:
+ virtual ~IDocumentChartDataProviderAccess() {};
+ };
+
+ #endif // IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
new file mode 100644
index 000000000000..eb3559f355ed
--- /dev/null
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentContentOperations.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+ #define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+
+ class SwPaM;
+ struct SwPosition;
+ class SwNode;
+ class SwNodeRange;
+ class String;
+ class Graphic;
+ class SfxItemSet;
+ class SfxPoolItem;
+ class GraphicObject;
+ class SdrObject;
+ class SwFrmFmt;
+ class SwDrawFrmFmt;
+ class SwFlyFrmFmt;
+ class SwNodeIndex;
+
+ namespace utl { class TransliterationWrapper; }
+ namespace svt { class EmbeddedObjectRef; }
+
+ /** Text operation/manipulation interface
+ */
+ class IDocumentContentOperations
+ {
+ public:
+ enum SwMoveFlags
+ {
+ DOC_MOVEDEFAULT = 0x00,
+ DOC_MOVEALLFLYS = 0x01,
+ DOC_CREATEUNDOOBJ = 0x02,
+ DOC_MOVEREDLINES = 0x04,
+ DOC_NO_DELFRMS = 0x08
+ };
+
+ // constants for inserting text
+ enum InsertFlags
+ { INS_DEFAULT = 0x00 // no extras
+ , INS_EMPTYEXPAND = 0x01 // expand empty hints at insert position
+ , INS_NOHINTEXPAND = 0x02 // do not expand any hints at insert pos
+ , INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position
+ };
+
+ public:
+ /** Kopieren eines Bereiches im oder in ein anderes Dokument !
+ Die Position kann auch im Bereich liegen !!
+ */
+ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0;
+
+ /** Loesche die Section, in der der Node steht.
+ */
+ virtual void DeleteSection(SwNode* pNode) = 0;
+
+ /** loeschen eines BereichesSwFlyFrmFmt
+ */
+ virtual bool DeleteRange(SwPaM&) = 0;
+
+ /** loeschen gesamter Absaetze
+ */
+ virtual bool DelFullPara(SwPaM&) = 0;
+
+ /** complete delete of a given PaM
+
+ OD 2009-08-20 #i100466#
+ Add optional parameter <bForceJoinNext>, default value <false>
+ Needed for hiding of deletion redlines
+ */
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false ) = 0;
+
+ /** verschieben eines Bereiches
+ */
+ virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) = 0;
+
+ /** verschieben ganzer Nodes
+ */
+ virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) = 0;
+
+ /** verschieben eines Bereiches
+ */
+ virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0;
+
+ /** Ueberschreiben eines Strings in einem bestehenden Textnode.
+ */
+ virtual bool Overwrite(const SwPaM &rRg, const String& rStr) = 0;
+
+ /** Insert string into existing text node at position rRg.Point().
+ */
+ virtual bool InsertString(const SwPaM &rRg, const String&,
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
+
+ /** change text to Upper/Lower/Hiragana/Katagana/...
+ */
+ virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) = 0;
+
+ /** Einfuegen einer Grafik, Formel. Die XXXX werden kopiert.
+ */
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
+ const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ /**
+ */
+ virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ /** austauschen einer Grafik (mit Undo)
+ */
+ virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0;
+
+ /** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
+ angemeldet sein.
+ */
+ virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0;
+
+ /** Einfuegen von OLE-Objecten.
+ */
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ /** Aufspalten eines Nodes an rPos (nur fuer den TxtNode implementiert)
+ */
+ virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart) = 0;
+
+ /**
+ */
+ virtual bool AppendTxtNode(SwPosition& rPos) = 0;
+
+ /** Ersetz einen selektierten Bereich in einem TextNode mit dem
+ String. Ist fuers Suchen&Ersetzen gedacht.
+ bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
+ ein ( nicht \& )
+ z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
+ --> "xx\t<Tab>..zzz..&"
+ */
+ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
+ const bool bRegExReplace) = 0;
+
+ /** Einfuegen eines Attributs. Erstreckt sich rRg ueber
+ mehrere Nodes, wird das Attribut aufgespaltet, sofern
+ dieses Sinn macht. Nodes, in denen dieses Attribut keinen
+ Sinn macht, werden ignoriert. In vollstaendig in der
+ Selektion eingeschlossenen Nodes wird das Attribut zu
+ harter Formatierung, in den anderen (Text-)Nodes wird das
+ Attribut in das Attributearray eingefuegt. Bei einem
+ Zeichenattribut wird ein "leerer" Hint eingefuegt,
+ wenn keine Selektion
+ vorliegt; andernfalls wird das Attribut als harte
+ Formatierung dem durch rRg.Start() bezeichneten Node
+ hinzugefuegt. Wenn das Attribut nicht eingefuegt werden
+ konnte, liefert die Methode sal_False.
+ */
+ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
+ const sal_uInt16 nFlags) = 0;
+
+ /**
+ */
+ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
+ const sal_uInt16 nFlags) = 0;
+
+ /** Removes any leading white space from the paragraph
+ */
+ virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos ) = 0;
+
+ protected:
+ virtual ~IDocumentContentOperations() {};
+};
+
+#endif // IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx
new file mode 100755
index 000000000000..30e698e74d70
--- /dev/null
+++ b/sw/inc/IDocumentDeviceAccess.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentDeviceAccess.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+ #define IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+
+ class SfxPrinter;
+ class JobSetup;
+ struct SwPrintData;
+ class VirtualDevice;
+ class OutputDevice;
+
+ /** Provides access to the formatting devices of a document
+ */
+ class IDocumentDeviceAccess
+ {
+ public:
+
+ /** Return the printer set at the document.
+
+ @param bCreate
+ [in] if set, a printer will be created if not already done.
+
+ @returns
+ the printer set at the document.
+ */
+ virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const = 0;
+
+ /** Set the printer at the document.
+
+ @param pP
+ [in] the new printer or 0.
+
+ @param bDeleteOld
+ [in] if set, the old printer will be deleted.
+
+ @param bCallPrtDataChanged
+ [in] if set, triggers all necessary invalidations.
+
+ @returns
+ the printer set at the document.
+ */
+ virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) = 0;
+
+ /** Return the virtual device set at the document.
+
+ @param bCreate
+ [in] if set, a virtual device will be created if not already done.
+
+ @returns
+ the virtual device set at the document.
+ */
+ virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const = 0;
+
+ /** Sets the current virtual device
+
+ @param pVd
+ [in] the new virtual device.
+
+ @param bDeleteOld
+ [in] if set, the old virtual device will be deleted.
+
+ @param bCallVirDevDataChanged
+ [in] if set, triggers all necessary invalidations.
+ */
+ virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ) = 0;
+
+ /** Returns the current reference device
+
+ @param bCreate
+ [in] if set, the reference device will be created if not already done.
+
+ @returns
+ the current reference device
+ */
+ virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const = 0;
+
+ /** Sets the type of the reference device used for formatting the document
+
+ @param bNewVirtual
+ [in] if set, the reference device will be a virtual device, otherwise
+ the printer is used for formatting the document
+
+ @param bNewHiRes
+ [in] if set, the virtual device will be the HiRes virtual device
+ */
+ virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes ) = 0;
+
+ /** Returns the Jobsetup
+
+ @returns
+ the current Jobsetup
+ */
+ virtual const JobSetup* getJobsetup() const = 0;
+
+ /** Sets the Jobsetup
+
+ @param rJobSetup
+ [in] the new Jobsetup.
+ */
+ virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ) = 0;
+
+ /** Returns the PrintData
+
+ @returns
+ the current PrintData
+ */
+ virtual SwPrintData* getPrintData() const = 0;
+
+ /** Sets the PrintData
+
+ @param rPrtData
+ [in] the new PrintData.
+ */
+ virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData) = 0;
+
+ protected:
+ virtual ~IDocumentDeviceAccess() {};
+ };
+
+ #endif // IDOCUMENTDEVICEACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx
new file mode 100644
index 000000000000..6f020fcbdc71
--- /dev/null
+++ b/sw/inc/IDocumentDrawModelAccess.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentDrawModelAccess.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTDRAWMODEL_HXX_INCLUDED
+#define IDOCUMENTDRAWMODEL_HXX_INCLUDED
+
+#include <svx/svdtypes.hxx>
+
+class SdrModel;
+class SdrPageView;
+
+/** IDocumentDrawModelAccess
+ */
+class IDocumentDrawModelAccess
+{
+public:
+
+ /** Draw Model and id accessors
+ */
+ virtual const SdrModel* GetDrawModel() const = 0;
+ virtual SdrModel* GetDrawModel() = 0;
+ virtual SdrModel* _MakeDrawModel() = 0;
+ virtual SdrModel* GetOrCreateDrawModel() = 0;
+ virtual SdrLayerID GetHeavenId() const = 0;
+ virtual SdrLayerID GetHellId() const = 0;
+ virtual SdrLayerID GetControlsId() const = 0;
+ virtual SdrLayerID GetInvisibleHeavenId() const = 0;
+ virtual SdrLayerID GetInvisibleHellId() const = 0;
+ virtual SdrLayerID GetInvisibleControlsId() const = 0;
+
+ /** method to notify drawing page view about the invisible layers
+ OD 26.06.2003 #108784#
+ @author OD
+ */
+ virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) = 0;
+
+ /** method to determine, if a layer ID belongs to the visible ones.
+ OD 25.06.2003 #108784#
+ Note: If given layer ID is unknown, method asserts and returns <false>.
+ @author OD
+
+ @param _nLayerId
+ input parameter - layer ID, which has to be checked, if it belongs to
+ the visible ones.
+
+ @return bool, indicating, if given layer ID belongs to the visible ones.
+ */
+ virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const = 0;
+
+ /** method to determine, if the corresponding visible layer ID for a invisible one.
+
+ OD 25.06.2003 #108784#
+ Note: If given layer ID is a visible one, method returns given layer ID.
+ Note: If given layer ID is unknown, method returns given layer ID.
+
+ @author OD
+
+ @param _nInvisibleLayerId
+ input parameter - invisible layer ID for which the corresponding
+ visible one has to be returned.
+
+ @return sal_Int8, visible layer ID corresponding to given layer ID
+ */
+ virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId ) = 0;
+
+ /** method to determine, if the corresponding invisible layer ID for a visible one.
+
+ OD 25.06.2003 #108784#
+ Note: If given layer ID is a invisible one, method returns given layer ID.
+ Note: If given layer ID is unknown, method returns given layer ID.
+
+ @author OD
+
+ @param _nVisibleLayerId
+ input parameter - visible layer ID for which the corresponding
+ invisible one has to be returned.
+
+ @return sal_Int8, invisible layer ID corresponding to given layer ID
+ */
+ virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) = 0;
+
+protected:
+
+ virtual ~IDocumentDrawModelAccess() {};
+};
+
+#endif
diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx
new file mode 100644
index 000000000000..d84c07a677d4
--- /dev/null
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision:$
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
+#define INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
+
+#include <hash_map>
+#include <boost/shared_ptr.hpp>
+
+namespace sw
+{
+enum tExternalDataType { FIB, STTBF_ASSOC };
+
+struct ExternalDataTypeHash
+{
+ size_t operator()(tExternalDataType eType) const { return eType; }
+};
+
+class ExternalData
+{
+public:
+ ExternalData() {}
+ virtual ~ExternalData() {}
+};
+
+typedef ::boost::shared_ptr<ExternalData> tExternalDataPointer;
+}
+
+
+class IDocumentExternalData
+{
+protected:
+ typedef ::std::hash_map<sw::tExternalDataType, sw::tExternalDataPointer, sw::ExternalDataTypeHash>
+ tExternalData;
+
+ tExternalData m_externalData;
+
+ virtual ~IDocumentExternalData() {};
+
+public:
+ virtual void setExternalData(sw::tExternalDataType eType,
+ sw::tExternalDataPointer pPayload) = 0;
+ virtual sw::tExternalDataPointer getExternalData(sw::tExternalDataType eType) = 0;
+};
+
+#endif //INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
new file mode 100644
index 000000000000..00ee1283874f
--- /dev/null
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentFieldsAccess.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTFIELDSACCESS_HXX_INCLUDED
+#define IDOCUMENTFIELDSACCESS_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <tools/solar.h>
+
+class SwFldTypes;
+class SwFieldType;
+class SfxPoolItem;
+struct SwPosition;
+class SwDocUpdtFld;
+class SwCalc;
+class SwTxtFld;
+class SwField;
+class SwMsgPoolItem;
+class DateTime;
+class _SetGetExpFld;
+struct SwHash;
+class String;
+class SwNode;
+
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+
+ /** Document fields related interfaces
+ */
+ class IDocumentFieldsAccess
+ {
+ public:
+ /**
+ */
+ virtual const SwFldTypes *GetFldTypes() const = 0;
+
+ /**
+ */
+ virtual SwFieldType *InsertFldType(const SwFieldType &) = 0;
+
+ /**
+ */
+ virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const = 0;
+
+ /**
+ */
+ virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const = 0;
+
+ /**
+ */
+ virtual void RemoveFldType(sal_uInt16 nFld) = 0;
+
+ /**
+ */
+ virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB) = 0;
+
+ /**
+ */
+ virtual void InsDeletedFldType(SwFieldType &) = 0;
+
+ // #111840#
+ /**
+ Puts a value into a field at a certain position.
+
+ A missing field at the given position leads to a failure.
+
+ @param rPosition position of the field
+ @param rVal the value
+ @param nMId
+
+ @retval TRUE putting of value was successful
+ @retval FALSE else
+ */
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich) = 0;
+
+ // rufe das Update der Expression Felder auf; alle Ausdruecke werden
+ // neu berechnet.
+ // #111840#
+
+ /** Updates a field.
+
+ @param rDstFmtFld field to update
+ @param rSrcFld field containing the new values
+ @param pMsgHnt
+ @param bUpdateTblFlds TRUE: update table fields, too.
+
+ @retval TRUE update was successful
+ @retval FALSE else
+ */
+ virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0;
+
+ /**
+ */
+ virtual void UpdateRefFlds(SfxPoolItem* pHt) = 0;
+
+ /**
+ */
+ virtual void UpdateTblFlds(SfxPoolItem* pHt) = 0;
+
+ /**
+ */
+ virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds) = 0;
+
+ /**
+ */
+ virtual void UpdateUsrFlds() = 0;
+
+ /**
+ */
+ virtual void UpdatePageFlds(SfxPoolItem*) = 0;
+
+ /**
+ */
+ virtual void LockExpFlds() = 0;
+
+ /**
+ */
+ virtual void UnlockExpFlds() = 0;
+
+ /**
+ */
+ virtual bool IsExpFldsLocked() const = 0;
+
+
+ virtual SwDocUpdtFld& GetUpdtFlds() const = 0;
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ SwNode (see parameter pChk) is (?) part of the private
+ data structure of SwDoc and should not be exposed
+ */
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen) = 0;
+
+ /**
+ */
+ virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime) = 0;
+
+ // Setze im Calculator alle SetExpresion Felder, die bis zur
+ // angegebenen Position (Node [ + ::com::sun::star::ucb::Content]) gueltig sind. Es kann
+ // eine erzeugte Liste aller Felder mit uebergegeben werden.
+ // (ist die Adresse != 0, und der Pointer == 0 wird eine neue
+ // Liste returnt.)
+ virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt) = 0;
+
+ /**
+ */
+ virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld) = 0;
+
+ /**
+ */
+ virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld) = 0;
+
+ /**
+ */
+ virtual bool IsNewFldLst() const = 0;
+
+ /**
+ */
+ virtual void SetNewFldLst( bool bFlag) = 0;
+
+ /**
+ */
+ virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld) = 0;
+
+protected:
+ virtual ~IDocumentFieldsAccess() {};
+ };
+
+ #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx
new file mode 100644
index 000000000000..d02ff50427d0
--- /dev/null
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentLayoutAccess.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
+#define IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
+
+#include <swtypes.hxx>
+
+class SwRootFrm;
+class SwFrmFmt;
+class SfxItemSet;
+class SwLayouter;
+class SwFmtAnchor;
+
+/** Provides access to the layout of a document.
+*/
+class IDocumentLayoutAccess
+{
+public:
+
+ /** Returns the layout set at the document.
+ */
+ virtual const SwRootFrm* GetRootFrm() const = 0;
+ virtual SwRootFrm* GetRootFrm() = 0;
+
+ /** !!!The old layout must be deleted!!!
+ */
+ virtual void SetRootFrm( SwRootFrm* pNew ) = 0;
+
+ /**
+ */
+ virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ) = 0;
+
+ /**
+ */
+ virtual SwLayouter* GetLayouter() = 0;
+ virtual const SwLayouter* GetLayouter() const = 0;
+ virtual void SetLayouter( SwLayouter* pNew ) = 0;
+
+ /**
+ */
+ virtual void DelLayoutFmt( SwFrmFmt *pFmt ) = 0;
+
+ /**
+ */
+ virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor,
+ bool bSetTxtFlyAtt, bool bMakeFrms ) = 0;
+
+protected:
+
+ virtual ~IDocumentLayoutAccess() {};
+ };
+
+ #endif // IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentLineNumberAccess.hxx b/sw/inc/IDocumentLineNumberAccess.hxx
new file mode 100644
index 000000000000..6ab67a8987f4
--- /dev/null
+++ b/sw/inc/IDocumentLineNumberAccess.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentLineNumberAccess.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+ #define IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+
+class SwLineNumberInfo;
+
+ /** Access to the line number information
+ */
+ class IDocumentLineNumberAccess
+ {
+ public:
+
+ virtual const SwLineNumberInfo& GetLineNumberInfo() const = 0;
+ virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo) = 0;
+
+ protected:
+ virtual ~IDocumentLineNumberAccess() {};
+};
+
+#endif // IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx
new file mode 100644
index 000000000000..7dbb6bc60f5a
--- /dev/null
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentLinksAdministration.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
+#define IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
+
+#include <tools/solar.h>
+
+class String;
+class SvxLinkManager;
+
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+
+namespace sfx2 { class SvLinkSource; }
+
+ /** Document links administration interface
+ */
+ class IDocumentLinksAdministration
+ {
+ public:
+ /** Links un-/sichtbar in LinkManager einfuegen (gelinkte Bereiche)
+ */
+ virtual bool IsVisibleLinks() const = 0;
+
+ /**
+ */
+ virtual void SetVisibleLinks(bool bFlag) = 0;
+
+ /**
+ */
+ virtual SvxLinkManager& GetLinkManager() = 0;
+
+ /**
+ */
+ virtual const SvxLinkManager& GetLinkManager() const = 0;
+
+ /** FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
+ SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
+ */
+ virtual void UpdateLinks(BOOL bUI) = 0;
+
+ /** SS fuers Linken von Dokumentteilen
+ */
+ virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const = 0;
+
+ /**
+ */
+ virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue) = 0;
+
+ /**
+ */
+ virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem) = 0;
+
+ /** embedded alle lokalen Links (Bereiche/Grafiken)
+ */
+ virtual bool EmbedAllLinks() = 0;
+
+ /**
+ */
+ virtual void SetLinksUpdated(const bool bNewLinksUpdated) = 0;
+
+ /**
+ */
+ virtual bool LinksUpdated() const = 0;
+
+protected:
+ virtual ~IDocumentLinksAdministration() {};
+ };
+
+ #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
diff --git a/sw/inc/IDocumentListItems.hxx b/sw/inc/IDocumentListItems.hxx
new file mode 100644
index 000000000000..c2633c1bdd35
--- /dev/null
+++ b/sw/inc/IDocumentListItems.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentListItems.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTLISTITEMS_HXX_INCLUDED
+#define IDOCUMENTLISTITEMS_HXX_INCLUDED
+
+#include <vector>
+#include <tools/string.hxx>
+class SwNodeNum;
+
+/** Provides numbered items of a document.
+*/
+class IDocumentListItems
+{
+public:
+ typedef ::std::vector< const SwNodeNum* > tSortedNodeNumList;
+
+ virtual void addListItem( const SwNodeNum& rNodeNum ) = 0;
+ virtual void removeListItem( const SwNodeNum& rNodeNum ) = 0;
+
+ virtual String getListItemText( const SwNodeNum& rNodeNum,
+ const bool bWithNumber = true,
+ const bool bWithSpacesForLevel = false ) const = 0;
+
+ /** get vector of all list items
+ */
+ virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const = 0;
+
+ /** get vector of all list items, which are numbered
+ */
+ virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const = 0;
+
+protected:
+ virtual ~IDocumentListItems() {};
+};
+
+ #endif // IDOCUMENTLISTITEMS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentListsAccess.hxx b/sw/inc/IDocumentListsAccess.hxx
new file mode 100644
index 000000000000..b0baae221132
--- /dev/null
+++ b/sw/inc/IDocumentListsAccess.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentListsAccess.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTLISTSACCESS_HXX_INCLUDED
+#define IDOCUMENTLISTSACCESS_HXX_INCLUDED
+
+#include <tools/string.hxx>
+
+class SwList;
+
+/** Provides access to the lists of a document.
+*/
+class IDocumentListsAccess
+{
+ public:
+ virtual SwList* createList( String sListId,
+ const String sDefaultListStyleName ) = 0;
+ virtual void deleteList( const String sListId ) = 0;
+ virtual SwList* getListByName( const String sListId ) const = 0;
+
+ virtual SwList* createListForListStyle( const String sListStyleName ) = 0;
+ virtual SwList* getListForListStyle( const String sListStyleName ) const = 0;
+ virtual void deleteListForListStyle( const String sListStyleName ) = 0;
+ // --> OD 2008-07-08 #i91400#
+ virtual void trackChangeOfListStyleName( const String sListStyleName,
+ const String sNewListStyleName ) = 0;
+ // <--
+
+ protected:
+ virtual ~IDocumentListsAccess() {};
+};
+
+#endif // IDOCUMENTLISTSACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
new file mode 100644
index 000000000000..56a6050c09c6
--- /dev/null
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -0,0 +1,247 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentMarkAccess.hxx,v $
+ * $Revision: 1.4.42.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTMARKACCESS_HXX_INCLUDED
+#define IDOCUMENTMARKACCESS_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <IMark.hxx>
+#include <boost/shared_ptr.hpp>
+
+class SwPaM;
+class KeyCode;
+class String;
+struct SwPosition;
+class SwTxtNode;
+
+namespace sw { namespace mark {
+ class SaveBookmark; // FIXME: Ugly: SaveBookmark is a core-internal class, and should not be used in the interface
+}}
+
+/** Provides access to the marks of a document.
+*/
+class IDocumentMarkAccess
+{
+ public:
+ enum MarkType
+ {
+ UNO_BOOKMARK,
+ DDE_BOOKMARK,
+ BOOKMARK,
+ CROSSREF_HEADING_BOOKMARK,
+ CROSSREF_NUMITEM_BOOKMARK,
+ TEXT_FIELDMARK,
+ CHECKBOX_FIELDMARK,
+ NAVIGATOR_REMINDER
+ };
+
+ typedef ::boost::shared_ptr< ::sw::mark::IMark> pMark_t;
+ typedef ::std::vector< pMark_t > container_t;
+ typedef container_t::iterator iterator_t;
+ typedef container_t::const_iterator const_iterator_t;
+ typedef container_t::const_reverse_iterator const_reverse_iterator_t;
+
+ /** Generates a new mark in the document for a certain selection.
+
+ @param rPaM
+ [in] the selection being marked.
+
+ @param rProposedName
+ [in] the proposed name of the new mark.
+
+ @param eMark
+ [in] the type of the new mark.
+
+ @returns
+ a pointer to the new mark (name might have changed).
+ */
+ virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM,
+ const ::rtl::OUString& rProposedName,
+ MarkType eMark) =0;
+
+ /** Returns a mark in the document for a paragraph.
+ If there is none, a mark will be created.
+
+ @param rTxtNode
+ [in] the paragraph being marked (a selection over the paragraph is marked)
+
+ @param eMark
+ [in] the type of the new mark.
+
+ @returns
+ a pointer to the new mark (name might have changed).
+ */
+ virtual ::sw::mark::IMark* getMarkForTxtNode(const SwTxtNode& rTxtNode,
+ MarkType eMark) =0;
+
+ /** Moves an existing mark to a new selection and performs needed updates.
+ @param io_pMark
+ [in/out] the mark to be moved
+
+ @param rPaM
+ [in] new selection to be marked
+ */
+
+ virtual void repositionMark(::sw::mark::IMark* io_pMark,
+ const SwPaM& rPaM) =0;
+
+ /** Renames an existing Mark, if possible.
+ @param io_pMark
+ [in/out] the mark to be renamed
+
+ @param rNewName
+ [in] new name for the mark
+
+ @returns false, if renaming failed (because the name is already in use)
+ */
+ virtual bool renameMark(::sw::mark::IMark* io_pMark,
+ const ::rtl::OUString& rNewName) =0;
+
+ /** Corrects marks (absolute)
+ This method ignores the previous position of the mark in the paragraph
+
+ @param rOldNode
+ [in] the node from which nodes should be moved
+
+ @param rNewPos
+ [in] new position to which marks will be moved, if nOffset == 0
+
+ @param nOffset
+ [in] the offset by which the mark gets positioned of rNewPos
+ */
+ virtual void correctMarksAbsolute(const SwNodeIndex& rOldNode,
+ const SwPosition& rNewPos,
+ const xub_StrLen nOffset) =0;
+
+ /** Corrects marks (relative)
+ This method uses the previous position of the mark in the paragraph as offset
+
+ @param rOldNode
+ [in] the node from which nodes should be moved
+
+ @param rNewPos
+ [in] new position to which marks from the start of the paragraph will be
+ moved, if nOffset == 0
+
+ @param nOffset
+ [in] the offset by which the mark gets positioned of rNewPos in addition to
+ its old position in the paragraph
+ */
+ virtual void correctMarksRelative(const SwNodeIndex& rOldNode,
+ const SwPosition& rNewPos,
+ const xub_StrLen nOffset) =0;
+
+ /** Deletes marks in a range
+ */
+ virtual void deleteMarks(
+ const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd,
+ ::std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, // Ugly: SaveBookmark is core-internal
+ const SwIndex* pSttIdx,
+ const SwIndex* pEndIdx) =0;
+
+ /** Deletes a mark.
+
+ @param ppMark
+ [in] an iterator pointing to the Mark to be deleted.
+ */
+ virtual void deleteMark(const IDocumentMarkAccess::const_iterator_t ppMark) =0;
+
+ /** Deletes a mark.
+
+ @param ppMark
+ [in] the name of the mark to be deleted.
+ */
+ virtual void deleteMark(const ::sw::mark::IMark* const pMark) =0;
+
+ /** Clear (deletes) all marks.
+ */
+ virtual void clearAllMarks() =0;
+
+ /** returns a STL-like random access iterator to the begin of the sequence of marks.
+ */
+ virtual const_iterator_t getMarksBegin() const =0;
+
+ /** returns a STL-like random access iterator to the end of the sequence of marks.
+ */
+ virtual const_iterator_t getMarksEnd() const =0;
+
+ /** returns the number of marks.
+ */
+ virtual sal_Int32 getMarksCount() const =0;
+
+ /** Finds a mark by name.
+
+ @param rName
+ [in] the name of the mark to find.
+
+ @returns
+ an iterator pointing to the mark, or pointing to getMarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findMark(const ::rtl::OUString& rMark) const =0;
+
+
+ // interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK)
+
+ /** returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
+ */
+ virtual const_iterator_t getBookmarksBegin() const =0;
+
+ /** returns a STL-like random access iterator to the end of the sequence of IBookmarks.
+ */
+ virtual const_iterator_t getBookmarksEnd() const =0;
+
+ /** returns the number of IBookmarks.
+ */
+ virtual sal_Int32 getBookmarksCount() const =0;
+
+ /** Finds a bookmark by name.
+
+ @param rName
+ [in] the name of the bookmark to find.
+
+ @returns
+ an iterator pointing to the bookmark, or getBookmarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findBookmark(const ::rtl::OUString& rMark) const =0;
+
+
+ // Fieldmarks
+ virtual ::sw::mark::IFieldmark* getFieldmarkFor(const SwPosition& pos) const =0;
+ virtual ::sw::mark::IFieldmark* getFieldmarkBefore(const SwPosition& pos) const =0;
+ virtual ::sw::mark::IFieldmark* getFieldmarkAfter(const SwPosition& pos) const =0;
+
+ // Returns the MarkType used to create the mark
+ static MarkType SAL_DLLPUBLIC_EXPORT GetType(const ::sw::mark::IMark& rMark);
+ protected:
+ virtual ~IDocumentMarkAccess() {};
+};
+
+#endif // IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx
new file mode 100644
index 000000000000..0648ddb4f608
--- /dev/null
+++ b/sw/inc/IDocumentOutlineNodes.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentOutlineNodes.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTOUTLINENODES_HXX_INCLUDED
+#define IDOCUMENTOUTLINENODES_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <tools/string.hxx>
+#include <vector>
+class SwTxtNode;
+
+/** Provides outline nodes of a document.
+*/
+class IDocumentOutlineNodes
+{
+public:
+ typedef ::std::vector< const SwTxtNode* > tSortedOutlineNodeList;
+
+ virtual sal_Int32 getOutlineNodesCount() const = 0;
+
+ virtual int getOutlineLevel( const sal_Int32 nIdx ) const = 0;
+ virtual String getOutlineText( const sal_Int32 nIdx,
+ const bool bWithNumber = true,
+ const bool bWithSpacesForLevel = false ) const = 0;
+ virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const = 0;
+
+ virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const = 0;
+
+protected:
+ virtual ~IDocumentOutlineNodes() {};
+};
+
+ #endif // IDOCUMENTOUTLINENODES_HXX_INCLUDED
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
new file mode 100644
index 000000000000..7cd6bb57059c
--- /dev/null
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentRedlineAccess.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTREDLINE_HXX_INCLUDED
+ #define IDOCUMENTREDLINE_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+ #ifndef _SOLAR_H
+ #include <tools/solar.h>
+ #endif
+
+ #include <limits.h> // USHRT_MAX
+
+ #ifndef _COM_SUN_STAR_SEQUENCE_HXX_
+ #include <com/sun/star/uno/Sequence.hxx>
+ #endif
+
+ class SwRedline;
+ class SwRedlineTbl;
+ class SwPaM;
+ struct SwPosition;
+ class SwStartNode;
+ class SwNode;
+ class String;
+
+typedef USHORT RedlineMode_t;
+namespace nsRedlineMode_t
+{
+ const RedlineMode_t REDLINE_NONE = 0; // no RedlineMode
+ const RedlineMode_t REDLINE_ON = 0x01;// RedlineMode on
+ const RedlineMode_t REDLINE_IGNORE = 0x02;// ignore Redlines
+ const RedlineMode_t REDLINE_SHOW_INSERT = 0x10;// show all inserts
+ const RedlineMode_t REDLINE_SHOW_DELETE = 0x20;// show all delets
+ const RedlineMode_t REDLINE_SHOW_MASK = REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE;
+
+ // fuer die interne Verwaltung:
+ // die originalen Redlines inclusive des Contents entfernen
+ // (ClipBoard/Textbausteine)
+ const RedlineMode_t REDLINE_DELETE_REDLINES = 0x100;
+ // beim Loeschen innerhalb ein RedlineObjectes, waehrend des Appends,
+ // das DeleteRedline ignorieren
+ const RedlineMode_t REDLINE_IGNOREDELETE_REDLINES = 0x200;
+ // don't combine any readlines. This flags is may only used in the Undo.
+ const RedlineMode_t REDLINE_DONTCOMBINE_REDLINES = 0x400;
+}
+
+typedef USHORT RedlineType_t;
+namespace nsRedlineType_t
+{
+ // die RedlineTypen gehen von 0 bis 127
+ const RedlineType_t REDLINE_INSERT = 0x0;// Inhalt wurde eingefuegt
+ const RedlineType_t REDLINE_DELETE = 0x1;// Inhalt wurde geloescht
+ const RedlineType_t REDLINE_FORMAT = 0x2;// Attributierung wurde angewendet
+ const RedlineType_t REDLINE_TABLE = 0x3;// TabellenStruktur wurde veraendert
+ const RedlineType_t REDLINE_FMTCOLL = 0x4;// FormatVorlage wurde veraendert (Autoformat!)
+
+ // ab 128 koennen Flags hineinverodert werden
+ const RedlineType_t REDLINE_NO_FLAG_MASK = 0x7F;
+ //const RedlineType_t REDLINE_FLAG_MASK = 0xFF80;
+ const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// kann als Flag im RedlineType stehen
+}
+
+/** IDocumentRedlineAccess
+*/
+class IDocumentRedlineAccess
+{
+ // Static helper functions
+public:
+ static bool IsShowChanges(const USHORT eM)
+ { return (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsHideChanges(const USHORT eM)
+ { return nsRedlineMode_t::REDLINE_SHOW_INSERT == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsShowOriginal(const USHORT eM)
+ { return nsRedlineMode_t::REDLINE_SHOW_DELETE == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsRedlineOn(const USHORT eM)
+ { return nsRedlineMode_t::REDLINE_ON == (eM & (nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE )); }
+
+public:
+
+ /*************************************************
+ Query
+ *************************************************/
+
+ /** Query the currently set redline mode
+
+ @returns
+ the currently set redline mode
+ */
+ virtual RedlineMode_t GetRedlineMode() const = 0;
+
+ /** Set a new redline mode.
+
+ @param eMode
+ [in] the new redline mode.
+ */
+ virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode) = 0;
+
+ /** Set a new redline mode.
+
+ @param eMode
+ [in] the new redline mode.
+ */
+ virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode) = 0;
+
+ /** Query if redlining is on.
+
+ @returns
+ </TRUE> if redlining is on </FALSE> otherwise
+ */
+ virtual bool IsRedlineOn() const = 0;
+
+ /**
+ */
+ virtual bool IsIgnoreRedline() const = 0;
+
+ /**
+ */
+ virtual const SwRedlineTbl& GetRedlineTbl() const = 0;
+
+
+ /*
+ */
+ virtual bool IsInRedlines(const SwNode& rNode) const = 0;
+
+ /***************************************************
+ Manipulation
+ ***************************************************/
+
+ /** Append a new redline
+
+ @param pPtr
+
+ @param bCallDelete
+
+ @returns
+ */
+ virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool SplitRedline(/*[in]*/const SwPaM& rPam) = 0;
+
+ /**
+ */
+ virtual bool DeleteRedline(
+ /*[in]*/const SwPaM& rPam,
+ /*[in]*/bool bSaveInUndo,
+ /*[in]*/sal_uInt16 nDelType) = 0;
+
+ /**
+ */
+ virtual bool DeleteRedline(
+ /*[in]*/const SwStartNode& rSection,
+ /*[in]*/bool bSaveInUndo,
+ /*[in]*/sal_uInt16 nDelType) = 0;
+
+ /**
+ */
+ virtual sal_uInt16 GetRedlinePos(
+ /*[in]*/const SwNode& rNode,
+ /*[in]*/sal_uInt16 nType) const = 0;
+
+ virtual void CompressRedlines() = 0;
+
+ /**
+ */
+ virtual const SwRedline* GetRedline(
+ /*[in]*/const SwPosition& rPos,
+ /*[in]*/sal_uInt16* pFndPos) const = 0;
+
+ /**
+ */
+ virtual bool IsRedlineMove() const = 0;
+
+ /**
+ */
+ virtual void SetRedlineMove(/*[in]*/bool bFlag) = 0;
+
+ /**
+ */
+ virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const = 0;
+
+ /**
+ */
+ virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0;
+
+ // alle Redline invalidieren, die Darstellung hat sich geaendert
+ virtual void UpdateRedlineAttr() = 0;
+
+ // legt gegebenenfalls einen neuen Author an
+ virtual sal_uInt16 GetRedlineAuthor() = 0;
+
+ // fuer die Reader usw. - neuen Author in die Tabelle eintragen
+ virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor) = 0;
+
+ // Kommentar am Redline an der Position setzen
+ virtual bool SetRedlineComment(
+ /*[in]*/const SwPaM& rPam,
+ /*[in]*/const String& rComment) = 0;
+
+ /**
+ */
+ virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const = 0;
+
+ /**
+ */
+ virtual void SetRedlinePassword(
+ /*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword) = 0;
+
+ protected:
+ virtual ~IDocumentRedlineAccess() {};
+ };
+
+ #endif
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
new file mode 100644
index 000000000000..9c509f7f052c
--- /dev/null
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentSettingAccess.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTSETTINGACCESS_HXX_INCLUDED
+#define IDOCUMENTSETTINGACCESS_HXX_INCLUDED
+
+#include <tools/solar.h>
+#ifndef _VOS_REF_HXX
+#include <vos/ref.hxx>
+#endif
+#include <chcmprse.hxx>
+#include <fldupde.hxx>
+
+class SvxForbiddenCharactersTable;
+namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
+
+ /** Provides access to settings of a document
+ */
+ class IDocumentSettingAccess
+ {
+ public:
+ enum DocumentSettingId
+ {
+ // COMPATIBILITY FLAGS START
+ PARA_SPACE_MAX,
+ PARA_SPACE_MAX_AT_PAGES,
+
+ TAB_COMPAT,
+
+ ADD_FLY_OFFSETS,
+
+ OLD_NUMBERING,
+
+ ADD_EXT_LEADING,
+ USE_VIRTUAL_DEVICE,
+ USE_HIRES_VIRTUAL_DEVICE,
+ OLD_LINE_SPACING,
+ ADD_PARA_SPACING_TO_TABLE_CELLS,
+ USE_FORMER_OBJECT_POS,
+ USE_FORMER_TEXT_WRAPPING,
+ CONSIDER_WRAP_ON_OBJECT_POSITION,
+
+ IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
+ DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
+ DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
+ OUTLINE_LEVEL_YIELDS_OUTLINE_RULE,
+
+ DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
+ TABLE_ROW_KEEP,
+ IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
+ CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
+
+ UNIX_FORCE_ZERO_EXT_LEADING,
+ USE_OLD_PRINTER_METRICS,
+ TABS_RELATIVE_TO_INDENT,
+ PROTECT_FORM,
+ // --> OD 2008-06-05 #i89181#
+ TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
+ // <--
+ // COMPATIBILITY FLAGS END
+
+ BROWSE_MODE,
+ HTML_MODE,
+ GLOBAL_DOCUMENT,
+ GLOBAL_DOCUMENT_SAVE_LINKS,
+ LABEL_DOCUMENT,
+ PURGE_OLE,
+ KERN_ASIAN_PUNCTUATION
+ };
+
+ public:
+ /** Return the specified document setting.
+
+ @param id
+ [in] the identifier of the document setting to be returned.
+ See above for a list of valid document setting identifiers.
+
+ @returns
+ the value of the requested document setting.
+ */
+ virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
+
+ /** Set the specified document setting.
+
+ @param id
+ [in] the identifier of the document setting to be set.
+ See above for a list of valid document setting identifiers.
+
+ @param value
+ [in] the new value of the specified document setting.
+ */
+ virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
+
+ /** Return the forbidden characters.
+
+ @param nLang
+ [in] the language for which the forbidden character list is returned.
+
+ @param bLocaleData
+ [in] if set and there is no user defined forbidden character list for
+ language lang, the default list for language lang will be returned.
+
+ @returns
+ a list of forbidden characters.
+ */
+ virtual const com::sun::star::i18n::ForbiddenCharacters*
+ getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
+
+ /** Set the forbidden characters.
+
+ @param nLang
+ [in] the language for which the forbidden character list should be set.
+
+ @param rForbiddenCharacters
+ [in] the new list of forbidden characters for language lang.
+ */
+ virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
+ /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
+
+ /** Get the forbidden character table and creates one if necessary.
+
+ @returns
+ the forbidden characters table.
+ */
+ virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
+
+ /** Get the forbidden character table.
+
+ @returns
+ the forbidden characters table.
+ */
+ virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
+
+ /** Get the current link update mode.
+
+ @param bGlobalSettings
+ [in] if set, the link update mode is obtained from the module,
+ if it is set to GLOBALSETTING
+
+ @returns
+ the current link update mode.
+ */
+ virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
+
+ /** Set the current link update mode.
+
+ @param nMode
+ [in] the new link update mode.
+ */
+ virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
+
+ /** Get the current field update mode.
+
+ @param bGlobalSettings
+ [in] if set, the field update mode is obtained from the module,
+ if it is set to GLOBALSETTING
+
+ @returns
+ the current field update mode.
+ */
+ virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
+
+ /** Set the current field update mode.
+
+ @param nMode
+ [in] the new field update mode.
+ */
+ virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode ) = 0;
+
+ /** Get the character compression type for Asian characters.
+
+ @returns
+ the current character compression mode.
+ */
+ virtual SwCharCompressType getCharacterCompressionType() const = 0;
+
+ /** Set the character compression type for Asian characters.
+
+ @param nMode
+ [in] the new character compression type.
+ */
+ virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
+
+protected:
+ virtual ~IDocumentSettingAccess() {};
+ };
+
+ #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentState.hxx b/sw/inc/IDocumentState.hxx
new file mode 100644
index 000000000000..af4b721bc84b
--- /dev/null
+++ b/sw/inc/IDocumentState.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentState.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTSTATE_HXX_INCLUDED
+ #define IDOCUMENTSTATE_HXX_INCLUDED
+
+ #include <tools/solar.h>
+
+ /** Get information about the current document state
+ */
+ class IDocumentState
+ {
+ public:
+ /** Bei Formataenderungen muss das zu Fuss gerufen werden!
+ */
+ virtual void SetModified() = 0;
+
+ /**
+ */
+ virtual void ResetModified() = 0;
+
+ /** Dokumentaenderungen?
+ */
+ virtual bool IsModified() const = 0;
+
+ /** Zustaende ueber Ladezustand
+ frueher DocInfo
+ */
+ virtual bool IsLoaded() const = 0;
+
+ /**
+ */
+ virtual bool IsUpdateExpFld() const = 0;
+
+ /**
+ */
+ virtual bool IsNewDoc() const = 0;
+
+ /**
+ */
+ virtual bool IsPageNums() const = 0;
+
+ /**
+ */
+ virtual void SetPageNums(bool b) = 0;
+
+ /**
+ */
+ virtual void SetNewDoc(bool b) = 0;
+
+ /**
+ */
+ virtual void SetUpdateExpFldStat(bool b) = 0;
+
+ /**
+ */
+ virtual void SetLoaded(bool b = sal_True) = 0;
+
+ protected:
+ virtual ~IDocumentState() {};
+ };
+
+ #endif // IDOCUMENTSTATE_HXX_INCLUDED
diff --git a/sw/inc/IDocumentStatistics.hxx b/sw/inc/IDocumentStatistics.hxx
new file mode 100644
index 000000000000..5b6a4102a01d
--- /dev/null
+++ b/sw/inc/IDocumentStatistics.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentStatistics.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTSTATISTICS_HXX_INCLUDED
+ #define IDOCUMENTSTATISTICS_HXX_INCLUDED
+
+ struct SwDocStat;
+
+ /** Document statistics information
+ */
+ class IDocumentStatistics
+ {
+ public:
+
+ /** die DocInfo hat siche geaendert (Notify ueber die DocShell)
+ stosse die entsp. Felder zum Updaten an.
+ */
+ virtual void DocInfoChgd() = 0;
+
+ /** Dokument - Statistics
+ */
+ virtual const SwDocStat &GetDocStat() const = 0;
+
+ /**
+ */
+ virtual void SetDocStat(const SwDocStat& rStat) = 0;
+
+ /**
+ */
+ virtual void UpdateDocStat(SwDocStat& rStat) = 0;
+
+protected:
+ virtual ~IDocumentStatistics() {};
+ };
+
+ #endif // IDOCUMENTSTATISTICS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentStylePoolAccess.hxx b/sw/inc/IDocumentStylePoolAccess.hxx
new file mode 100644
index 000000000000..ffd3c19a9cb0
--- /dev/null
+++ b/sw/inc/IDocumentStylePoolAccess.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentStylePoolAccess.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+ #define IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+
+ class SwTxtFmtColl;
+ class SwCharFmt;
+ class SwFmt;
+ class SwFrmFmt;
+ class String;
+ class SwNumRule;
+ class SwPageDesc;
+
+ /** Access to the style pool
+ */
+ class IDocumentStylePoolAccess
+ {
+ public:
+
+ /** Gebe die "Auto-Collection" mit der Id zurueck. Existiert
+ sie noch nicht, dann erzuege sie
+ Ist der String-Pointer definiert, dann erfrage nur die
+ Beschreibung der Attribute, !! es legt keine Vorlage an !!
+ */
+ virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0;
+
+ /** return das geforderte automatische Format - Basis-Klasse !
+ */
+ virtual SwFmt* GetFmtFromPool( sal_uInt16 nId ) = 0;
+
+ /** returne das geforderte automatische Format
+ */
+ virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId ) = 0;
+
+ /**
+ */
+ virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId ) = 0;
+
+ /** returne die geforderte automatische Seiten-Vorlage
+ */
+ virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0;
+
+ /**
+ */
+ virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId ) = 0;
+
+ /** pruefe, ob diese "Auto-Collection" in Dokument schon/noch benutzt wird
+ */
+ virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const = 0;
+ virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const = 0;
+ virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const = 0;
+
+ protected:
+ virtual ~IDocumentStylePoolAccess() {};
+};
+
+#endif // IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx
new file mode 100644
index 000000000000..8e73c02962c7
--- /dev/null
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentTimerAccess.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTTIMERACCESS_HXX_INCLUDED
+ #define IDOCUMENTTIMERACCESS_HXX_INCLUDED
+
+ /** Get information about the current document state
+ */
+ class IDocumentTimerAccess
+ {
+ public:
+ /**
+ Set modus to start, i.e. start timer if block count == 0
+ */
+ virtual void StartIdling() = 0;
+
+ /**
+ Set modus to stopped, i.e. stop timer if running
+ */
+ virtual void StopIdling() = 0;
+
+ /**
+ Increment block count, stop timer if running
+ */
+ virtual void BlockIdling() = 0;
+
+ /**
+ Decrement block count, start timer if block count == 0 AND modus == start
+ */
+ virtual void UnblockIdling() = 0;
+
+ protected:
+ virtual ~IDocumentTimerAccess() {};
+ };
+
+ #endif // IDOCUMENTTIMERACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx
new file mode 100644
index 000000000000..8b59eca2d4df
--- /dev/null
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IDocumentUndoRedo.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IDOCUMENTUNDOREDO_HXX_INCLUDED
+#define IDOCUMENTUNDOREDO_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <swundo.hxx>
+
+
+class SwUndoIter;
+class SwRewriter;
+class String;
+class SwUndoIds;
+class SwNodes;
+class SwUndo;
+
+
+typedef sal_uInt16 SwUndoNoModifiedPosition;
+
+/** IDocumentUndoRedo
+*/
+class IDocumentUndoRedo
+{
+public:
+ /**
+ */
+ virtual void SetUndoNoResetModified() = 0;
+
+ /**
+ */
+ virtual bool IsUndoNoResetModified() const = 0;
+
+ /** UndoHistory am Dokument pflegen
+ bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
+ */
+ virtual void DoUndo(bool bUn) = 0;
+
+ /**
+ */
+ virtual bool DoesUndo() const = 0;
+
+ /** Zusammenfassen von Kontinuierlichen Insert/Delete/Overwrite von
+ Charaktern. Default ist ::com::sun::star::sdbcx::Group-Undo.
+ */
+ virtual void DoGroupUndo(bool bUn) = 0;
+
+ /**
+ */
+ virtual bool DoesGroupUndo() const = 0;
+
+ /** macht rueckgaengig:
+ 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId
+ In rUndoRange wird der restaurierte Bereich gesetzt.
+ */
+ virtual bool Undo( SwUndoIter& ) = 0; // -> #111827#
+
+ /** Opens undo block.
+
+ @param nUndoId undo ID for the start object
+ @param pRewriter rewriter for comments @see SwUndo::GetComment
+
+ If the given nUndoId is equal to zero an undo object with ID
+ UNDO_START will be generated.
+
+ @return the undo ID of the created object
+ */
+ virtual SwUndoId StartUndo( SwUndoId eUndoId, const SwRewriter * pRewriter) = 0;
+
+ /**
+ Closes undo block.
+
+ @param nUndoId undo ID for the closure object
+ @param pRewriter rewriter for comments @see SwUndo::GetComment
+
+ If the given nUndoId is equal to zero an undo object with ID
+ UNDO_START will be generated.
+
+ If pRewriter is not equal to zero the given rewriter will be
+ set for the generated closure object and the corresponding
+ start object. Otherwise an existent rewriter in theIDocumentRedlineAccess
+ corresponding start object will be propagated to the generated
+ closure object.
+ */
+ virtual SwUndoId EndUndo( SwUndoId eUndoId, const SwRewriter * pRewriter) = 0;
+
+ /** <- #111827#
+ loescht die gesamten UndoObjecte ( fuer Methoden die am Nodes
+ Array drehen ohne entsprechendes Undo !!)
+ */
+ virtual void DelAllUndoObj() = 0;
+
+ /** liefert die Id der letzten undofaehigen Aktion zurueck
+ oder USHRT_MAX fuellt ggf. VARARR mit ::com::sun::star::sdbcx::User-UndoIds
+ */
+ virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const = 0;
+
+ /**
+ */
+ virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const = 0;
+
+ /** gibt es Klammerung mit der Id?
+ */
+ virtual bool HasUndoId(SwUndoId eId) const = 0;
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ Implementation details made public.
+ die drei folgenden Methoden werden beim Undo und nur dort
+ benoetigt. Sollten sonst nicht aufgerufen werden.
+ */
+ virtual const SwNodes* GetUndoNds() const = 0;
+
+ virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId) = 0;
+
+ /** 2002-05-31 dvo, #95884#: To prevent an undo array overflow when
+ doing nested undos, undo may have to be disabled. Undo-intensive
+ actions (like auto-format) should check this manually.
+ */
+ virtual bool HasTooManyUndos() const = 0;
+
+ /**
+ */
+ virtual bool Redo( SwUndoIter& ) = 0;
+
+ /** liefert die Id der letzten Redofaehigen Aktion zurueck
+ fuellt ggf. VARARR mit RedoIds
+ */
+ virtual SwUndoId GetRedoIds( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /**
+ */
+ virtual String GetRedoIdsStr( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /**
+ */
+ virtual bool Repeat( SwUndoIter&, sal_uInt16 nRepeatCnt) = 0;
+
+ /** liefert die Id der letzten Repeatfaehigen Aktion zurueck
+ fuellt ggf. VARARR mit RedoIds
+ */
+ virtual SwUndoId GetRepeatIds( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /**
+ */
+ virtual String GetRepeatIdsStr( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /** interne Verkuerzung fuer Insert am Ende
+ */
+ virtual void AppendUndo(SwUndo*) = 0;
+
+ /** loescht alle UndoObjecte von nUndoPos
+ bis zum Ende des Undo-Arrays
+ */
+ virtual void ClearRedo() = 0;
+
+ /** Manipulates the position of the undo stack which reset the modified flag
+ */
+ virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition ) = 0;
+
+ /** Gets the position of the undo stack which reset the modified flag
+ */
+ virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const = 0;
+
+protected:
+ virtual ~IDocumentUndoRedo() {};
+};
+
+#endif
+
diff --git a/sw/inc/IGrammarContact.hxx b/sw/inc/IGrammarContact.hxx
new file mode 100644
index 000000000000..1635f6da827c
--- /dev/null
+++ b/sw/inc/IGrammarContact.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IGrammarContact.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IGRAMMARCONTACT_HXX_INCLUDED
+#define IGRAMMARCONTACT_HXX_INCLUDED
+
+struct SwPosition;
+class SwTxtNode;
+class SwGrammarMarkUp;
+class SwDoc;
+
+/** Organizer of the contact between SwTxtNodes and grammar checker
+*/
+class IGrammarContact
+{
+public:
+
+ /** Update cursor position reacts to a change of the current input cursor
+ As long as the cursor in inside a paragraph, the grammar checking does
+ not show new grammar faults. When the cursor leaves the paragraph, these
+ faults are shown.
+ @returns void
+ */
+ virtual void updateCursorPosition( const SwPosition& rNewPos ) = 0;
+
+ /** getGrammarCheck checks if the given text node is blocked by the current cursor
+ if not, the normal markup list is returned
+ if blocked, it will return a markup list "proxy"
+ @returns a markup list (grammar) for the given SwTxtNode
+ */
+ virtual SwGrammarMarkUp* getGrammarCheck( SwTxtNode& rTxtNode, bool bCreate ) = 0;
+
+ /** finishGrammarCheck() has to be called if a grammar checking has been completed
+ for a text node. If this text node has not been hided by the current proxy list
+ it will be repainted. Otherwise the proxy list replaces the old list and the
+ repaint will be triggered by a timer
+ @returns void
+ */
+ virtual void finishGrammarCheck( SwTxtNode& rTxtNode ) = 0;
+
+public:
+ virtual ~IGrammarContact() {}
+};
+
+/** Factory for a grammar contact
+@returns a new created grammar contact object
+*/
+IGrammarContact* createGrammarContact();
+
+/* Helper functions */
+
+/** getGrammarContact() delivers the grammar contact of the document (for a given textnode)
+@returns grammar contact
+*/
+IGrammarContact* getGrammarContact( const SwTxtNode& );
+
+/** finishGrammarCheck() calls the same function of the grammar contact of the document (for a given textnode)
+@returns void
+*/
+void finishGrammarCheck( SwTxtNode& );
+
+#endif // IGRAMMARCONTACT_HXX_INCLUDED
+
diff --git a/sw/inc/IInterface.hxx b/sw/inc/IInterface.hxx
new file mode 100644
index 000000000000..a4b814a3065a
--- /dev/null
+++ b/sw/inc/IInterface.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: IInterface.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 IINTERFACE_HXX_INCLUDED
+ #define IINTERFACE_HXX_INCLUDED
+
+ #include <sal/types.h>
+
+ /** The base interface
+ */
+ class IInterface
+ {
+ public:
+
+ /** Aquire a reference to an instance. A caller shall release
+ the instance by calling 'release' when it is no longer needed.
+ 'acquire' and 'release' calls need to be balanced.
+
+ @returns
+ the current reference count of the instance for debugging purposes.
+ */
+ virtual sal_Int32 acquire() = 0;
+
+ /** Releases a reference to an instance. A caller has to call
+ 'release' when a before aquired reference to an instance
+ is no longer needed. 'acquire' and 'release' calls need to
+ be balanced.
+
+ @returns
+ the current reference count of the instance for debugging purposes.
+ */
+ virtual sal_Int32 release() = 0;
+
+ /** Returns the current reference count. This method should be used for
+ debugging purposes. Using it otherwise is a signal of a design flaw.
+ */
+ virtual sal_Int32 getReferenceCount() const = 0;
+
+protected:
+ virtual ~IInterface() {};
+ };
+
+ #endif // IDOCUMENT_HXX_INCLUDED
diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx
new file mode 100644
index 000000000000..81317d69a369
--- /dev/null
+++ b/sw/inc/IMark.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bookmrk.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _IMARK_HXX
+#define _IMARK_HXX
+
+#include <vcl/keycod.hxx>
+#include <calbck.hxx>
+#include <pam.hxx>
+#include <boost/operators.hpp>
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+
+struct SwPosition;
+
+namespace sw { namespace mark
+{
+ class IMark
+ : virtual public SwModify // inherited as interface
+ , public ::boost::totally_ordered<IMark>
+ {
+ public:
+ //getters
+ virtual const SwPosition& GetMarkPos() const =0;
+ // GetOtherMarkPos() is only guaranteed to return a valid
+ // reference if IsExpanded() returned true
+ virtual const SwPosition& GetOtherMarkPos() const =0;
+ virtual const SwPosition& GetMarkStart() const =0;
+ virtual const SwPosition& GetMarkEnd() const =0;
+ virtual const ::rtl::OUString& GetName() const =0;
+ virtual bool IsExpanded() const =0;
+ virtual bool IsCoveringPosition(const SwPosition& rPos) const =0;
+
+ //setters
+ // not available in IMark
+ // inside core, you can cast to MarkBase and use its setters,
+ // make sure to update the sortings in Markmanager in this case
+
+ //operators and comparisons (non-virtual)
+ bool operator<(const IMark& rOther) const
+ { return GetMarkStart() < rOther.GetMarkStart(); }
+ bool operator==(const IMark& rOther) const
+ { return GetMarkStart() == rOther.GetMarkStart(); }
+ bool StartsBefore(const SwPosition& rPos) const
+ { return GetMarkStart() < rPos; }
+ bool StartsAfter(const SwPosition& rPos) const
+ { return GetMarkStart() > rPos; }
+ bool EndsBefore(const SwPosition& rPos) const
+ { return GetMarkEnd() < rPos; }
+ bool EndsAfter(const SwPosition& rPos) const
+ { return GetMarkEnd() > rPos; }
+ };
+
+ class IBookmark
+ : virtual public IMark
+ {
+ public:
+ virtual const ::rtl::OUString& GetShortName() const =0;
+ virtual const KeyCode& GetKeyCode() const =0;
+ virtual void SetShortName(const ::rtl::OUString&) =0;
+ virtual void SetKeyCode(const KeyCode&) =0;
+ };
+
+ class IFieldmark
+ : virtual public IMark
+ {
+ public:
+ //getters
+ virtual ::rtl::OUString GetFieldname() const =0;
+ virtual ::rtl::OUString GetFieldHelptext() const =0;
+
+ //setters
+ virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0;
+ virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0;
+ };
+
+ class ICheckboxFieldmark
+ : virtual public IFieldmark
+ {
+ public:
+ virtual bool IsChecked() const =0;
+ virtual void SetChecked(bool checked) =0;
+ };
+}}
+#endif
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
new file mode 100644
index 000000000000..e01041edafcd
--- /dev/null
+++ b/sw/inc/PostItMgr.hxx
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PostItMgr.hxx,v $
+ * $Revision: 1.8.84.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _POSTITMGR_HXX
+#define _POSTITMGR_HXX
+
+#include <svtools/lstner.hxx>
+
+#include <list>
+#include <vector>
+#include <svx/outlobj.hxx>
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <tools/debug.hxx>
+#include <swrect.hxx>
+#include <unotools/configitem.hxx>
+#include <com/sun/star/util/SearchOptions.hpp>
+#include <com/sun/star/uno/Any.hxx>
+
+class SwWrtShell;
+class SwDoc;
+class SwView;
+class SwPostItField;
+class SwFmtFld;
+class SwField;
+class SfxBroadcaster;
+class SfxHint;
+class SwEditWin;
+class Color;
+class SvxSearchItem;
+class SvxLanguageItem;
+class SwPostIt;
+class SwMarginWin;
+class SwMarginItem;
+
+#define SORT_POS 1
+#define SORT_AUTHOR 2
+#define SORT_DATE 3
+
+#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0)
+#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
+
+typedef std::list<SwMarginItem*> SwMarginItem_list;
+typedef std::list<SwMarginItem*>::iterator SwMarginItem_iterator;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using ::rtl::OUString;
+
+struct SwPostItPageItem
+{
+ bool bScrollbar;
+ bool bMarginSide;
+ long lOffset;
+ SwRect mPageRect;
+ SwMarginItem_list* mList;
+ SwPostItPageItem(): bScrollbar(false),lOffset(0)
+ {
+ mList = new SwMarginItem_list;
+ }
+ ~SwPostItPageItem()
+ {
+ mList->clear();
+ delete mList;
+ }
+
+};
+
+struct FieldShadowState
+{
+ const SwPostItField* mpShadowFld;
+ bool bCursor;
+ bool bMouse;
+ FieldShadowState(): mpShadowFld(0),bCursor(false),bMouse(false)
+ {
+ }
+};
+
+class SwNoteProps: public utl::ConfigItem
+{
+ private:
+ bool bIsShowAnkor;
+ public:
+ SwNoteProps() : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes")), bIsShowAnkor(false)
+ {
+ const Sequence<OUString>& rNames = GetPropertyNames();
+ Sequence<Any> aValues = GetProperties(rNames);
+ const Any* pValues = aValues.getConstArray();
+ DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ if (aValues.getLength())
+ pValues[0]>>=bIsShowAnkor;
+ }
+
+ bool IsShowAnkor()
+ {
+ return bIsShowAnkor;
+ }
+ Sequence<OUString>& GetPropertyNames()
+ {
+ static Sequence<OUString> aNames;
+ if(!aNames.getLength())
+ {
+ static const char* aPropNames[] =
+ {
+ "ShowAnkor"
+ };
+ const int nCount = sizeof(aPropNames)/sizeof(const char*);
+ aNames.realloc(nCount);
+ OUString* pNames = aNames.getArray();
+ for(int i = 0; i < nCount; i++)
+ pNames[i] = OUString::createFromAscii(aPropNames[i]);
+ }
+ return aNames;
+ }
+};
+
+class SwPostItMgr: public SfxListener
+{
+ private:
+ SwView* mpView;
+ SwWrtShell* mpWrtShell;
+ SwEditWin* mpEditWin;
+ std::list< SwMarginItem*> mvPostItFlds;
+ std::vector<SwPostItPageItem*> mPages;
+ ULONG mnEventId;
+ bool mbWaitingForCalcRects;
+ SwMarginWin* mpActivePostIt;
+ bool mbLayout;
+ long mbLayoutHeight;
+ long mbLayouting;
+ bool mbReadOnly;
+ bool mbDeleteNote;
+ FieldShadowState mShadowState;
+ OutlinerParaObject* mpAnswer;
+ bool mpIsShowAnkor;
+
+ typedef std::list<SwMarginWin*>::iterator SwMarginWin_iterator;
+
+ void AddPostIts(bool bCheckExistance = true,bool bFocus = true);
+ //void AddRedlineComments(bool bCheckExistance, bool bFocus);
+ void RemoveMarginWin();
+ void PreparePageContainer();
+ void Scroll(const long lScroll,const unsigned long aPage );
+ void AutoScroll(const SwMarginWin* pPostIt,const unsigned long aPage );
+ bool ScrollbarHit(const unsigned long aPage,const Point &aPoint);
+ bool LayoutByPage(std::list<SwMarginWin*> &aVisiblePostItList,const Rectangle aBorder,long lNeededHeight);
+ void CheckForRemovedPostIts();
+ bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const;
+ bool BorderOverPageBorder(unsigned long aPage) const;
+ bool HasScrollbars() const;
+ void Focus(SfxBroadcaster& rBC);
+
+ sal_Int32 GetInitialAnchorDistance() const;
+ sal_Int32 GetScrollSize() const;
+ sal_Int32 GetSpaceBetween() const;
+ void SetReadOnlyState();
+ DECL_LINK( CalcHdl, void*);
+ protected:
+
+ public:
+ SwPostItMgr(SwView* aDoc);
+ ~SwPostItMgr();
+
+ typedef std::list< SwMarginItem* >::const_iterator const_iterator;
+ const_iterator begin() const { return mvPostItFlds.begin(); }
+ const_iterator end() const { return mvPostItFlds.end(); }
+
+ void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
+ void RemoveItem( SfxBroadcaster* pBroadcast );
+ void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ void LayoutPostIts();
+ bool CalcRects();
+
+ void MakeVisible(const SwMarginWin* pPostIt,long aPage = -1);
+
+ bool ShowScrollbar(const unsigned long aPage) const;
+ bool HasNotes() const ;
+ bool ShowNotes() const;
+ bool IsShowAnkor() { return mpIsShowAnkor;}
+ unsigned long GetSidebarWidth(bool bPx = false) const;
+ unsigned long GetSidebarBorderWidth(bool bPx = false) const;
+ unsigned long GetNoteWidth();
+
+ void PrepareView(bool bIgnoreCount = false);
+
+ void CorrectPositions();
+
+ void Sort(const short aType);
+
+ void SetLayout() { mbLayout = true; };
+ void Delete(String aAuthor);
+ void Delete();
+
+ void Hide( SwPostItField* pPostItField );
+ void Hide( const String& rAuthor );
+ void Hide();
+ void Show();
+
+ void Rescale();
+
+ Rectangle GetBottomScrollRect(const unsigned long aPage) const;
+ Rectangle GetTopScrollRect(const unsigned long aPage) const;
+
+ bool IsHit(const Point &aPointPixel);
+ Color GetArrowColor(USHORT aDirection,unsigned long aPage) const;
+
+ SwMarginWin* GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt);
+ long GetNextBorder();
+ SwMarginWin* GetActivePostIt() { return mpActivePostIt; }
+ void SetActivePostIt( SwMarginWin* p);
+ sal_Int32 GetMinimumSizeWithMeta() const;
+ sal_Int32 GetSidebarScrollerHeight() const;
+
+ SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const;
+ SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const;
+ SwPostIt* GetPostIt(const SwPostItField* pFld) const;
+ SwPostIt* GetPostIt(SwPostItField* pFld) const;
+
+ void SetShadowState(const SwPostItField* pFld,bool bCursor = true);
+
+ void SetSpellChecking();
+
+ Color GetColorDark(sal_uInt16 aAuthorIndex);
+ Color GetColorLight(sal_uInt16 aAuthorIndex);
+ Color GetColorAnkor(sal_uInt16 aAuthorIndex);
+
+ bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const;
+
+ void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
+ OutlinerParaObject* IsAnswer() {return mpAnswer;}
+ void CheckMetaText();
+ void StartSpelling();
+
+ sal_uInt16 Replace(SvxSearchItem* pItem);
+ sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
+ sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
+
+ void AssureStdModeAtShell();
+};
+
+#endif
+
+
+
+
diff --git a/sw/inc/RefreshListenerContainer.hxx b/sw/inc/RefreshListenerContainer.hxx
new file mode 100644
index 000000000000..f5c328164d99
--- /dev/null
+++ b/sw/inc/RefreshListenerContainer.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: RefreshListenerContainer.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _REFRESH_LISTENER_CONTAINER_HXX_
+#define _REFRESH_LISTENER_CONTAINER_HXX_
+
+#include <unoevtlstnr.hxx>
+
+class SwRefreshListenerContainer : public SwEventListenerContainer
+{
+public:
+ SwRefreshListenerContainer( ::com::sun::star::uno::XInterface* pxParent);
+ void Refreshed();
+};
+#endif
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
new file mode 100644
index 000000000000..fcf9d727f05e
--- /dev/null
+++ b/sw/inc/SwAppletImpl.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwAppletImpl.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_APPLET_IMPL_HXX
+#define _SW_APPLET_IMPL_HXX
+
+#define SWHTML_OPTTYPE_IGNORE 0
+#define SWHTML_OPTTYPE_TAG 1
+#define SWHTML_OPTTYPE_PARAM 2
+#define SWHTML_OPTTYPE_SIZE 3
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+
+#include <tools/string.hxx>
+#include <sfx2/frmhtml.hxx>
+#include <sfx2/frmhtmlw.hxx>
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#include <sot/storage.hxx>
+#include <svtools/itemset.hxx>
+
+#include <svtools/ownlist.hxx>
+
+class SfxItemSet;
+
+#define OOO_STRING_SW_HTML_O_Hidden "HIDDEN"
+
+class SwApplet_Impl
+{
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > xApplet;
+ SvCommandList aCommandList; // und die szugehorige Command-List
+ SfxItemSet aItemSet;
+ String sAlt;
+
+public:
+ static USHORT GetOptionType( const String& rName, BOOL bApplet );
+ SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 );
+ SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {}
+ ~SwApplet_Impl();
+ void CreateApplet( const String& rCode, const String& rName,
+ BOOL bMayScript, const String& rCodeBase,
+ const String& rBaseURL );
+#ifdef SOLAR_JAVA
+ sal_Bool CreateApplet( const String& rBaseURL );
+ void AppendParam( const String& rName, const String& rValue );
+#endif
+ void FinishApplet();
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetApplet() { return xApplet; }
+ SfxItemSet& GetItemSet() { return aItemSet; }
+ const String& GetAltText() { return sAlt; }
+ void SetAltText( const String& rAlt ) {sAlt = rAlt;}
+};
+#endif
diff --git a/sw/inc/SwCapObjType.hxx b/sw/inc/SwCapObjType.hxx
new file mode 100644
index 000000000000..97c4cddd8c49
--- /dev/null
+++ b/sw/inc/SwCapObjType.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwCapObjType.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWCAPOBJTYPE_HXX
+#define _SWCAPOBJTYPE_HXX
+
+enum SwCapObjType
+{
+ FRAME_CAP, GRAPHIC_CAP, TABLE_CAP, OLE_CAP
+};
+
+#endif
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx
new file mode 100644
index 000000000000..24f972bb6c4d
--- /dev/null
+++ b/sw/inc/SwGetPoolIdFromName.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwGetPoolIdFromName.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _GETPOOLIDFROMNAMEENUM_HXX
+#define _GETPOOLIDFROMNAMEENUM_HXX
+
+/* When using the NameMapper to translate pool ids to UI or programmatic
+ * names, this enum is used to define which family is required */
+
+typedef USHORT SwGetPoolIdFromName;
+
+namespace nsSwGetPoolIdFromName
+{
+ const SwGetPoolIdFromName GET_POOLID_TXTCOLL = 0x01;
+ const SwGetPoolIdFromName GET_POOLID_CHRFMT = 0x02;
+ const SwGetPoolIdFromName GET_POOLID_FRMFMT = 0x04;
+ const SwGetPoolIdFromName GET_POOLID_PAGEDESC = 0x08;
+ const SwGetPoolIdFromName GET_POOLID_NUMRULE = 0x10;
+}
+
+#endif
diff --git a/sw/inc/SwNodeNum.hxx b/sw/inc/SwNodeNum.hxx
new file mode 100644
index 000000000000..ca0c890289d3
--- /dev/null
+++ b/sw/inc/SwNodeNum.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwNodeNum.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_NODE_NUM_HXX
+#define _SW_NODE_NUM_HXX
+
+#include <SwNumberTree.hxx>
+
+class SwTxtNode;
+struct SwPosition;
+class SwNumRule;
+class SwNumFmt;
+
+class SW_DLLPUBLIC SwNodeNum : public SwNumberTreeNode
+{
+public:
+ // --> OD 2008-02-19 #refactorlists#
+ explicit SwNodeNum( SwTxtNode* pTxtNode );
+ explicit SwNodeNum( SwNumRule* pNumRule );
+ // <--
+ virtual ~SwNodeNum();
+
+ SwNumRule* GetNumRule() const;
+ void ChangeNumRule( SwNumRule& rNumRule );
+ SwTxtNode* GetTxtNode() const;
+
+ virtual bool IsNotificationEnabled() const;
+
+ virtual bool IsContinuous() const;
+
+ virtual bool IsCounted() const;
+
+ virtual bool LessThan(const SwNumberTreeNode & rNode) const;
+
+ virtual bool IsRestart() const;
+
+ virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const;
+
+// String ToString() const;
+
+ SwPosition GetPosition() const;
+
+ // --> OD 2006-03-07 #131436#
+ // The number tree root node is deleted, when the corresponding numbering
+ // rule is deleted. In this situation the number tree should be empty -
+ // still registered text nodes aren't allowed. But it is possible, that
+ // text nodes of the undo nodes array are still registered. These will be
+ // unregistered.
+ // Text nodes of the document nodes array aren't allowed to be registered
+ // in this situation - this will be asserted.
+ static void HandleNumberTreeRootNodeDelete( SwNodeNum& rNodeNum );
+ // <--
+
+ /** determines the <SwNodeNum> instance, which is preceding the given text node
+
+ OD 2007-09-06 #i81002#
+
+ @author OD
+ */
+ const SwNodeNum* GetPrecedingNodeNumOf( const SwTxtNode& rTxtNode ) const;
+
+protected:
+ virtual SwNumberTreeNode * Create() const;
+
+ // --> OD 2006-04-26 #i64010#
+ virtual bool HasCountedChildren() const;
+ virtual bool IsCountedForNumbering() const;
+ // <--
+
+ // --> OD 2008-02-19 #refactorlists#
+ // method called before this tree node has been added to the list tree
+ virtual void PreAdd();
+ // method called at a child after this child has been removed from the list tree
+ virtual void PostRemove();
+ // <--
+private:
+ SwTxtNode * mpTxtNode;
+ SwNumRule * mpNumRule;
+
+ // --> OD 2006-03-07 #131436#
+ static void _UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum );
+ // <--
+
+ SwNodeNum( const SwNodeNum& ); // no copy constructor
+ SwNodeNum& operator=( const SwNodeNum& ); // no assignment operator
+
+ virtual bool IsCountPhantoms() const;
+
+ virtual bool IsNotifiable() const;
+
+ virtual void NotifyNode();
+};
+
+#endif // _SW_NODE_NUM_HXX
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
new file mode 100644
index 000000000000..03815a265c18
--- /dev/null
+++ b/sw/inc/SwNumberTree.hxx
@@ -0,0 +1,777 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwNumberTree.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_NUMBER_TREE_HXX
+#define _SW_NUMBER_TREE_HXX
+
+#include <set>
+#include <vector>
+#include <tools/string.hxx>
+#include <swdllapi.h>
+#include <SwNumberTreeTypes.hxx>
+
+class SwNumberTreeNode;
+
+bool SwNumberTreeNodeLessThan (const SwNumberTreeNode * pA,
+ const SwNumberTreeNode * pB);
+
+struct compSwNumberTreeNodeLessThan
+{
+ bool operator()(const SwNumberTreeNode * pA,
+ const SwNumberTreeNode * pB) const
+ { return SwNumberTreeNodeLessThan(pA, pB); }
+};
+
+/**
+ A tree of numbered nodes.
+
+ Simple example:
+
+ <pre>
+ 1. kshdkjfs
+ 1.1. lskjf
+ 2. sdfjlksaf
+ 3. fkaslk
+ 3.1. lfjlaskf
+ 3.2. jaslkjflsf
+ 3.2.1. hkljhkjhk
+
+ + R
+ + 1 kshdkjfs
+ | + 1 lskjf
+ + 2 sdfjlksaf
+ + 3 fkaslk
+ + 1 lfjlaskf
+ + 2 jaslkjflsf
+ + 1 hkljhkjhk
+ </pre>
+
+ The root contains the nodes of the first level. Each node A of the
+ first level contains those nodes of the second level that have the
+ same first level number as A and so on for the subsidiary levels.
+
+ The numbering label of a node A is resolved by concatenating the
+ numbers of the nodes on the path from the root to A.
+
+ ------------------------------------------
+
+ Phantoms
+
+ A phantom is an auxiliary node that is used to emulate numberings
+ starting with nodes not at top level. The phantom contains the
+ number for the level but is not considered part of the numbering.
+
+ Constraint 1: A phantom is always the first child node.
+ Constraint 2: At each node there is at most one child that is a phantom.
+ Constraint 3: A phantom is the smallest of all numbering nodes.
+
+ Uncounted Phantoms
+
+ 0.1. dljflskjlasf
+ 5. dsfkas
+ 5.1.
+
+ + R (nStart = 5)
+ + 0 (phantom, not counted)
+ | + 1 dljflskjlasf
+ + 5 dsfkas
+ + 1
+
+ The phantom gets numbered with 0. The first non-phantom node gets
+ numbered with the start value.
+
+ -----------------------------------------
+
+ Counted Phantoms
+
+ 5.1. lgkjjgklg
+ 6. lkjfalskjflsaf
+ 6.1. ljdflaksjflkjasflkjsf
+
+ + R (nStart = 5)
+ + 5 (phantom, counted)
+ | + 1 lgkjjgklg
+ + 6 lkjfalskjflsaf
+ + 1 ljdflaksjflkjasflkjsf
+
+ The phantom gets numbered with the start value.
+*/
+class SW_DLLPUBLIC SwNumberTreeNode
+{
+protected:
+ typedef std::set<SwNumberTreeNode *, compSwNumberTreeNodeLessThan>
+ tSwNumberTreeChildren;
+
+public:
+ SwNumberTreeNode();
+
+ virtual ~SwNumberTreeNode();
+
+ /**
+ Add a child.
+
+ @param pChild child to add
+ @param nDepth depth in which to add the child
+ */
+ void AddChild( SwNumberTreeNode* pChild,
+ const int nDepth = 0 );
+
+ /**
+ Remove a child.
+
+ OD 2008-02-19 #refactorlists# - no longer virtual
+
+ @param pChild child to be removed
+ */
+ void RemoveChild( SwNumberTreeNode* pChild );
+
+ /**
+ Remove this child from the tree.
+ */
+ void RemoveMe();
+
+ /**
+ Returns the parent of this node.
+
+ @return the parent
+ */
+ inline SwNumberTreeNode* GetParent() const
+ {
+ return mpParent;
+ }
+
+ /**
+ Returns the first child of this node.
+
+ @return the child
+ */
+ SwNumberTreeNode* GetFirstChild() const;
+
+ /**
+ Returns number of this node.
+
+ @param bValidate validate the number?
+
+ @return number of this node
+ */
+ SwNumberTree::tSwNumTreeNumber GetNumber( bool bValidate = true ) const;
+
+ // --> OD 2008-11-26 #158694#
+ bool IsContinueingPreviousSubTree() const;
+ // <--
+
+ /**
+ Returns level numbers of this node.
+
+ @return level numbers of this node
+ */
+ SwNumberTree::tNumberVector GetNumberVector() const;
+
+ /**
+ Return if numbering is restartet at this node.
+ */
+ virtual bool IsRestart() const = 0;
+
+ /**
+ Return start value.
+
+ @return start value
+ */
+ virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const = 0;
+
+ /**
+ Return if this node is counted.
+
+ @retval true this node is counted
+ @retval false this node is NOT counted
+ */
+ virtual bool IsCounted() const;
+
+ /**
+ Return if this node is counted continuous.
+
+ @retval true This node is counted continuous.
+ @retval false else
+ */
+ virtual bool IsContinuous() const = 0;
+
+ /**
+ Return if a node is first non-phantom child of this node.
+
+ @param pNode the node to check
+
+ @retval true pNode is first child of this node
+ @retval false else
+ */
+ virtual bool IsFirst(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Return if this node if the first non-phantom node in the tree.
+
+ @retval true this node is the first non-phantom node in the tree
+ @retval false else
+ */
+ virtual bool IsFirst() const;
+
+ /**
+ Return if this node is a phantom.
+
+ @retval true this node is a phantom
+ @retval false this node is NOT a phantom
+ */
+ bool IsPhantom() const;
+
+ /** set level of this node
+
+ OD 2008-03-13 #refactorlists#
+ precondition: node is already member of a list tree
+
+ @author OD
+ */
+ void SetLevelInListTree( const int nLevel );
+
+ /**
+ Return level of this node.
+
+ The level of this node is the length of the path from the root
+ to this node.
+
+ @return the level of this node
+ */
+ int GetLevelInListTree() const;
+
+ /**
+ Returns if this node is less than another node.
+
+ @param rTreeNode node to compare with
+
+ @attention A phantom node is considered the least element with
+ respect to lessThan.
+
+ @retval true this node is less than rTreeNode
+ @retval false else
+ */
+ virtual bool LessThan(const SwNumberTreeNode & rTreeNode) const;
+
+ /**
+ Invalidate this node and all its descendants.
+
+ All iterators holding the last valid node in the according list
+ of childs are set to the end of this list, thereby stating all
+ children in the list are invalid.
+ OD 2007-10-26 #i83479# - made public
+ */
+ void InvalidateTree() const;
+
+ /**
+ Notifies all invalid children of this node.
+ OD 2007-10-26 #i83479# - made public
+ */
+ void NotifyInvalidChildren();
+
+ /**
+ Notifies the node.
+
+ Calls Invalidate(this) on parent.
+ */
+ void InvalidateMe();
+
+ /**
+ Validate the tree.
+
+ Validates all nodes in this subtree.
+ */
+ void ValidateTree();
+
+ /**
+ Validates this node.
+
+ Calls Validate(this) on parent.
+ */
+ void ValidateMe();
+
+ /**
+ Notifies all invalid siblings of this node.
+ */
+ void NotifyInvalidSiblings();
+
+ /** notification of all nodes in the list tree on certain list level
+
+ OD 2008-04-17 #refactorlists#
+ */
+ void NotifyNodesOnListLevel( const int nListLevel );
+
+ /** Invalidation and notification of complete numbering tree
+
+ OD 2006-04-26 #i64010#
+ Usage: on <IsCounted()> state change its needed to invalidate the
+ complete numbering tree due to wide influence of this change.
+ */
+ inline void InvalidateAndNotifyTree()
+ {
+ if ( GetRoot() )
+ {
+ GetRoot()->InvalidateTree();
+ GetRoot()->Notify();
+ }
+ }
+
+ /**
+ Returns the greatest descendant of the root that is smaller than
+ this node, aka the predecessor of this node.
+
+ @return the predecessor
+ */
+ SwNumberTreeNode* GetPred( bool bSibling = false ) const;
+
+ /** determines the node, which is preceding the node
+
+ OD 2007-09-06 #i81002#
+ The search for the preceding node is performed for the tree below the
+ <this> node. To search the complete tree, the method has been called for
+ the root of the tree.
+
+ @author OD
+ */
+ const SwNumberTreeNode* GetPrecedingNodeOf( const SwNumberTreeNode& rNode ) const;
+
+// /**
+// Returns a string representation of this node.
+
+// @return the string representation of this node
+// */
+// virtual String ToString() const = 0;
+
+// /**
+// Print this subtree.
+
+// @param o output stream to direct output to
+// @param rIndent additional indent for the children of this node
+// @param rMyIndent indent to use for this node
+// @param nDepth number of levels to print (-1 means all levels)
+
+// @return output stream after output of this subtree
+// */
+// String print(const String & rIndent = String(" ",
+// RTL_TEXTENCODING_ASCII_US),
+// const String & rMyIndent = String(" ",
+// RTL_TEXTENCODING_ASCII_US),
+// int nDepth = -1) const;
+
+#ifndef PRODUCT
+ static unsigned long GetInstances();
+ unsigned long GetSerial();
+#endif
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ /**
+ Sanity check.
+
+ @param bRecursive descend to children
+
+ @retval true the structure of this node is sane
+ @retval false else
+ */
+ bool IsSane(bool bRecursive) const;
+#endif // __SW_NUMBER_TREE_SANITY_CHECK
+
+protected:
+ /**
+ the children
+ */
+ tSwNumberTreeChildren mChildren;
+
+ /**
+ Returns the root node of the tree this node is part of.
+
+ Important note: method call <GetRoot()->GetRoot()> returns NULL.
+
+ @return the root
+ */
+ SwNumberTreeNode* GetRoot() const;
+
+ /**
+ Return if the notification is not disabled on global conditions
+
+ @retval true Notification enabled in general.
+ @retval false else
+ */
+ virtual bool IsNotificationEnabled() const = 0;
+
+ /**
+ Returns how many children this node has got.
+
+ @return number of children
+ */
+ tSwNumberTreeChildren::size_type GetChildCount() const;
+
+ // --> OD 2006-04-26 #i64010# - made pure virtual
+ virtual bool HasCountedChildren() const = 0;
+ // <--
+
+ // --> OD 2006-04-26 #i64010#
+ virtual bool IsCountedForNumbering() const = 0;
+ // <--
+
+ // --> OD 2008-02-19 #refactorlists#
+ // method called before this tree node has been added to the list tree
+ virtual void PreAdd() = 0;
+ // method called after this tree node has been removed from the list tree
+ virtual void PostRemove() = 0;
+ // <--
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ /**
+ Sanity check with loop detection.
+
+ @param bRecursive descend to children
+ @param rParents vector for recording path
+
+ @retval true this node is sane
+ @retval false else */
+ virtual bool IsSane
+ (bool bRecursive, std::vector<const SwNumberTreeNode *> rParents) const;
+#endif // __SW_NUMBER_TREE_SANITY_CHECK
+
+ /**
+ the parent node
+ */
+ SwNumberTreeNode * mpParent;
+
+ /**
+ the number of the node
+ */
+ mutable SwNumberTree::tSwNumTreeNumber mnNumber;
+
+ // --> OD 2008-11-26 #158694#
+ // boolean indicating, that a node of a not counted parent node is continueing
+ // the numbering of parent's previous node sub tree.
+ // Example:
+ // 1. kshdkjfs
+ // 1.1. lskjf
+ // sdfjlksaf <-- not counted parent node
+ // 1.2. lfjlaskf <-- <mbContinueingPreviousSubTree = true>
+ mutable bool mbContinueingPreviousSubTree;
+ // <--
+
+ /**
+ true this node is a phantom
+ false this node is NOT a phantom
+ */
+ bool mbPhantom;
+
+ /**
+ Iterator to the last valid element. All children that are less
+ than or equal to the referenced child are valid. All children
+ greater than the referenced child are invalid.
+ */
+ mutable tSwNumberTreeChildren::iterator mItLastValid;
+
+#ifndef PRODUCT
+ /**
+ Counter for the number of created instances.
+ */
+ static unsigned long nInstances;
+
+ /**
+ Serial number.
+ */
+ unsigned long mnSerial;
+#endif
+
+ SwNumberTreeNode(const SwNumberTreeNode& );
+ SwNumberTreeNode& operator=( const SwNumberTreeNode& );
+
+ /**
+ Calls _GetNumberVector on parent and adds number of this node
+ at the end.
+
+ @param rVector return value
+ @param bValidate validate the number?
+ */
+ void _GetNumberVector( SwNumberTree::tNumberVector& rVector,
+ bool bValidate = true ) const;
+
+ /**
+ Invalidates a child.
+
+ Calls SetLastValid for the preceeding sibling of the child and
+ notifies all invalid children.
+
+ @param pChild the child to invalidate
+ */
+ void Invalidate( SwNumberTreeNode * pChild );
+
+ /** Invalidation of all children
+
+ OD 2005-10-19 #126009#
+ Usage: on <IsCounted()> state change the children have to be invalidated
+ */
+ inline void InvalidateChildren()
+ {
+ SetLastValid( mChildren.end() );
+ }
+
+ /** Invalidation of parent node, if its not counted.
+
+ OD 2005-10-19 #126009#
+ Usage: on <IsCounted()> state change the parent have to be invalidated
+ */
+ inline void InvalidateNotCountedParent()
+ {
+ if ( GetParent() && !GetParent()->IsCountedForNumbering() )
+ {
+ GetParent()->InvalidateMe();
+ }
+ }
+
+ /**
+ Set the last valid child of this node.
+
+ @param aItLastValid iterator pointing to the new last valid child
+ @param bValidating - true always set the last valid node to
+ aItLastValid
+ - false only set if aItLastValid is preceeding
+ the current last valid node
+ */
+ void SetLastValid(tSwNumberTreeChildren::iterator aItLastValid,
+ bool bValidating = false) const;
+
+ /**
+ Set this node as last valid child of its parent.
+
+ @param bValidation see aboce
+ */
+ void SetLastValid(bool bValidating) const;
+
+ /**
+ Return if this node is notifiable.
+
+ @attention If a not is not notifiable a notify request is *not*
+ forwarded to its descendants.
+
+ @retval true This node is notifiable.
+ @retval false else
+ */
+ virtual bool IsNotifiable() const = 0;
+
+ /**
+ Notifies the node.
+
+ Called when the number of the node got invalid.
+ */
+ virtual void NotifyNode() = 0;
+
+ /**
+ Notifies this node (NotifyNode) and all descendants.
+ */
+ void Notify();
+
+ /** Notification of parent node siblings, if its not counted.
+
+ OD 2005-10-19 #126009#
+ Usage: on <IsCounted()> state change the parent node and its siblings
+ have to be notified.
+ */
+ inline void NotifyNotCountedParentSiblings()
+ {
+ if ( GetParent() && !GetParent()->IsCountedForNumbering() )
+ {
+ GetParent()->NotifyInvalidSiblings();
+ }
+ }
+
+ /** notification of children nodes on certain depth
+
+ OD 2008-04-17 #refactorlists#
+
+ @author OD
+ */
+ void NotifyChildrenOnDepth( const int nDepth );
+
+ /**
+ Returns if a child A this node is valid.
+
+ A is valid if aItLastValid in parent refers to a node
+ greater than of equal to A.
+
+ @param pChild child to be tested
+
+ @retval true this node is valid
+ @retval false this node is NOT valid
+ */
+ bool IsValid(const SwNumberTreeNode * pChild) const;
+
+ /**
+ Returns if this node is valid.
+
+ @retval true this node is valid
+ @retval false else
+ */
+ bool IsValid() const;
+
+ /**
+ Validates a child.
+
+ @param pNode child to be validated
+
+ @attention All invalid children preceding pNode are validated, too.
+ */
+ void Validate(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Validates a child using hierarchical numbering.
+
+ @param pNode child to be validated
+
+ @attention All invalid children preceding pNode are validated, too.
+ */
+ void ValidateHierarchical(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Validates a child using continuous numbering.
+
+ @param pNode child to be validated
+
+ @attention All invalid children preceding pNode are validated, too.
+ */
+ void ValidateContinuous(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Creates a new node of the same class.
+
+ @return the new node
+ */
+ virtual SwNumberTreeNode * Create() const = 0;
+
+ /**
+ Creates a phantom.
+
+ @return the created phantom
+ */
+ SwNumberTreeNode * CreatePhantom();
+
+ /**
+ Set if this node is a phantom.
+
+ @param bPhantom - true this node is a phantom
+ - false this node is a phantom
+ */
+ void SetPhantom(bool bPhantom = true);
+
+ /**
+ Return if phantoms are counted.
+
+ OD 2008-02-19 #refactorlists# - pure virtual now
+
+ @retval true phantoms are counted
+ @retval false else
+ */
+ virtual bool IsCountPhantoms() const = 0;
+
+ /**
+ Return if all descendants of this node are phantoms.
+
+ @retval true all descendants are phantoms
+ @retval false else
+ */
+ bool HasOnlyPhantoms() const;
+
+ // --> OD 2005-10-27 #126009#
+ bool HasPhantomCountedParent() const;
+ // <--
+
+ /**
+ HB, OD : return node, if it isn't a phantom, otherwise return first
+ non-phantom descendant.
+ Returns the first child of this node that is NOT a phantom.
+
+ @return the first non phantom child
+ */
+ SwNumberTreeNode* GetFirstNonPhantomChild();
+
+ /**
+ Removes recursively phantoms that have no children.
+
+ The resulting tree has no phantoms that either have no children or
+ whose descendancy consist entirely of phantoms.
+ */
+ void ClearObsoletePhantoms();
+
+ tSwNumberTreeChildren::iterator GetIterator(const SwNumberTreeNode * pChild) const;
+
+ /**
+ Moves all children to a given destination node.
+
+ @param pDest the destination node
+ */
+ void MoveChildren(SwNumberTreeNode * pDest);
+
+ /** Moves all children of this node that are greater than a given node
+ to the destination node.
+
+ OD 2005-10-14 #125991#
+ distinguish between node for comparing, whose children are greater,
+ and the destination node.
+
+ @param _rCompareNode
+ input parameter - reference to the node, which is used to determine
+ the greater children
+
+ @param _rDestNode
+ input parameter - reference to the node, which is the destination for
+ the greater children
+ */
+ void MoveGreaterChildren( SwNumberTreeNode& _rCompareNode,
+ SwNumberTreeNode& _rDestNode );
+
+ /**
+ Returns the last descendant of a node, if it has children.
+
+ @return last descendant of the node
+ */
+ SwNumberTreeNode* GetLastDescendant() const;
+
+};
+
+/**
+ Functor. Checks if a certain node is less than the functor's member.
+ */
+struct SwNumberTreeNodeIsLessThan
+{
+ const SwNumberTreeNode * pNode;
+
+ SwNumberTreeNodeIsLessThan(const SwNumberTreeNode * _pNode)
+ : pNode(_pNode) {}
+
+ bool operator()(const SwNumberTreeNode * _pNode) const
+ { return SwNumberTreeNodeLessThan(_pNode, pNode); }
+};
+#endif // _SW_NUMBER_TREE_HXX
diff --git a/sw/inc/SwNumberTreeTypes.hxx b/sw/inc/SwNumberTreeTypes.hxx
new file mode 100644
index 000000000000..cb2a5ed98891
--- /dev/null
+++ b/sw/inc/SwNumberTreeTypes.hxx
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwNumberTreeTypes.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_NUMBER_TREE_TYPES_HXX
+#define _SW_NUMBER_TREE_TYPES_HXX
+
+#include <vector>
+
+namespace SwNumberTree
+{
+ typedef long tSwNumTreeNumber;
+ typedef std::vector<tSwNumTreeNumber> tNumberVector;
+}
+
+#endif // _SW_NUMBER_TREE_TYPES_HXX
diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx
new file mode 100644
index 000000000000..63132c1c3c64
--- /dev/null
+++ b/sw/inc/SwRewriter.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwRewriter.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_REWRITER_HXX
+#define _SW_REWRITER_HXX
+
+#include <vector>
+#include <tools/string.hxx>
+
+typedef std::pair<String, String> SwRewriteRule;
+
+class SwRewriter
+{
+ std::vector<SwRewriteRule> mRules;
+
+public:
+ SwRewriter();
+ SwRewriter(const SwRewriter & rSrc);
+ ~SwRewriter();
+
+ void AddRule(const String & rWhat, const String & rWith);
+
+ String Apply(const String & rStr) const;
+};
+
+#endif // _SW_REWRITER_HXX
diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx
new file mode 100644
index 000000000000..360bae8b8069
--- /dev/null
+++ b/sw/inc/SwSmartTagMgr.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwSmartTagMgr.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWSMARTTAGMGR_HXX
+#define _SWSMARTTAGMGR_HXX
+
+#include <svx/SmartTagMgr.hxx>
+
+
+/*************************************************************************
+ * class SwSmartTagMgr
+ *
+ * Wrapper for the svx SmartTagMgr
+ *************************************************************************/
+
+class SwSmartTagMgr : public SmartTagMgr
+{
+private:
+ static SwSmartTagMgr* mpTheSwSmartTagMgr;
+
+ SwSmartTagMgr( const rtl::OUString& rModuleName );
+ virtual ~SwSmartTagMgr();
+
+public:
+ static SwSmartTagMgr& Get();
+
+ // ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XChangesListener
+ virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+/*
+namespace SwSmartTagMgr
+{
+ SmartTagMgr& Get();
+}
+*/
+
+#endif
diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
new file mode 100644
index 000000000000..cf1d7aed0c64
--- /dev/null
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwStyleNameMapper.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWSTYLENAMEMAPPER_HXX
+#define _SWSTYLENAMEMAPPER_HXX
+
+#include <sal/types.h>
+#include <tools/string.hxx>
+#include <SwGetPoolIdFromName.hxx>
+#include "swdllapi.h"
+
+#ifndef INCLUDED_HASH_MAP
+#include <hash_map>
+#define INCLUDED_HASH_MAP
+#endif
+#include <stringhash.hxx>
+
+/* This class holds all data about the names of styles used in the user
+ * interface (UI names...these are localised into different languages).
+ * These UI names are loaded from the resource files on demand.
+ *
+ * It also holds all information about the 'Programmatic' names of styles
+ * which remain static (and are hardcoded in the corresponding cxx file)
+ * for all languages.
+ *
+ * This class also provides static functions which can be used for the
+ * following conversions:
+ *
+ * 1. Programmatic Name -> UI Name
+ * 2. Programmatic Name -> Pool ID
+ * 3. UI Name -> Programmatic Name
+ * 4. UI Name -> Pool ID
+ * 5. Pool ID -> UI Name
+ * 6. Pool ID -> Programmatic Name
+ *
+ * The relationship of these tables to the style families is as follows:
+ *
+ * 1. Paragraph contains the Text, Lists, Extra, Register, Doc and HTML
+ * name arrays.
+ * 2. Character contains the ChrFmt and HTMLChrFmt name arrays.
+ * 3. Page contains the PageDesc name array.
+ * 4. Frame contains the FrmFmt name array.
+ * 5. Numbering Rule contains the NumRule name array.
+ */
+
+/*
+ * There is a further complication that came to light later. If someone enters
+ * a user-defined style name which is the same as a programmatic name, this
+ * name clash must be handled.
+ *
+ * Therefore, when there is a danger of a nameclash, the boolean bDisambiguate
+ * must be set to true in the SwStyleNameMapper call (it defaults to false).
+ * This will cause the following to happen:
+ *
+ * If the UI style name either equals a programmatic name or already ends
+ * with " (user)", then it must append " (user)" to the end.
+ *
+ * When a programmatic name is being converted to a UI name, if it ends in
+ * " (user)", we simply remove it.
+ */
+
+class SvStringsDtor;
+class String;
+struct SwTableEntry;
+
+
+typedef ::std::hash_map < const String*, sal_uInt16, StringHash, StringEq > NameToIdHash;
+
+class SwStyleNameMapper
+{
+ friend void _InitCore();
+ friend void _FinitCore();
+
+protected:
+ // UI Name tables
+ static SvStringsDtor *pTextUINameArray,
+ *pListsUINameArray,
+ *pExtraUINameArray,
+ *pRegisterUINameArray,
+ *pDocUINameArray,
+ *pHTMLUINameArray,
+ *pFrmFmtUINameArray,
+ *pChrFmtUINameArray,
+ *pHTMLChrFmtUINameArray,
+ *pPageDescUINameArray,
+ *pNumRuleUINameArray,
+ // Programmatic Name tables
+ *pTextProgNameArray,
+ *pListsProgNameArray,
+ *pExtraProgNameArray,
+ *pRegisterProgNameArray,
+ *pDocProgNameArray,
+ *pHTMLProgNameArray,
+ *pFrmFmtProgNameArray,
+ *pChrFmtProgNameArray,
+ *pHTMLChrFmtProgNameArray,
+ *pPageDescProgNameArray,
+ *pNumRuleProgNameArray;
+
+ static NameToIdHash *pParaUIMap,
+ *pCharUIMap,
+ *pPageUIMap,
+ *pFrameUIMap,
+ *pNumRuleUIMap,
+
+ *pParaProgMap,
+ *pCharProgMap,
+ *pPageProgMap,
+ *pFrameProgMap,
+ *pNumRuleProgMap;
+
+ static SvStringsDtor* NewUINameArray( SvStringsDtor*&,
+ sal_uInt16 nStt,
+ sal_uInt16 nEnd );
+
+ static SvStringsDtor* NewProgNameArray( SvStringsDtor*&,
+ const SwTableEntry *pTable,
+ sal_uInt8 nCount);
+
+ static void fillNameFromId ( sal_uInt16 nId, String &rName, sal_Bool bProgName );
+ static const String& getNameFromId ( sal_uInt16 nId, const String &rName, sal_Bool bProgName );
+ static const NameToIdHash& getHashTable ( SwGetPoolIdFromName, sal_Bool bProgName );
+ static sal_Bool SuffixIsUser ( const String & rString );
+ static void CheckSuffixAndDelete ( String & rString );
+
+public:
+ // This gets the UI Name from the programmatic name
+ static const String& GetUIName ( const String& rName, SwGetPoolIdFromName );
+ static void FillUIName ( const String& rName, String& rFillName, SwGetPoolIdFromName, sal_Bool bDisambiguate = sal_False );
+
+ // Get the programmatic Name from the UI name
+ static const String& GetProgName ( const String& rName, SwGetPoolIdFromName );
+ static void FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName, sal_Bool bDisambiguate = sal_False );
+
+ // This gets the UI Name from the Pool ID
+ SW_DLLPUBLIC static void FillUIName ( sal_uInt16 nId, String& rFillName );
+ SW_DLLPUBLIC static const String& GetUIName ( sal_uInt16 nId, const String& rName );
+
+ // This gets the programmatic Name from the Pool ID
+ static void FillProgName( sal_uInt16 nId, String& rFillName );
+ SW_DLLPUBLIC static const String& GetProgName ( sal_uInt16 nId, const String& rName );
+
+ // This gets the PoolId from the UI Name
+ SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName );
+
+ // Get the Pool ID from the programmatic name
+ static sal_uInt16 GetPoolIdFromProgName( const String& rName, SwGetPoolIdFromName );
+
+ // used to convert the 4 special ExtraProg/UINames for
+ // RES_POOLCOLL_LABEL_DRAWING, RES_POOLCOLL_LABEL_ABB,
+ // RES_POOLCOLL_LABEL_TABLE, RES_POOLCOLL_LABEL_FRAME
+ // forth and back.
+ // Non-matching names remain unchanged.
+ SW_DLLPUBLIC static const String GetSpecialExtraProgName( const String& rExtraUIName );
+ static const String GetSpecialExtraUIName( const String& rExtraProgName );
+
+ static const SvStringsDtor& GetTextUINameArray();
+ static const SvStringsDtor& GetListsUINameArray();
+ static const SvStringsDtor& GetExtraUINameArray();
+ static const SvStringsDtor& GetRegisterUINameArray();
+ static const SvStringsDtor& GetDocUINameArray();
+ static const SvStringsDtor& GetHTMLUINameArray();
+ static const SvStringsDtor& GetFrmFmtUINameArray();
+ static const SvStringsDtor& GetChrFmtUINameArray();
+ static const SvStringsDtor& GetHTMLChrFmtUINameArray();
+ static const SvStringsDtor& GetPageDescUINameArray();
+ static const SvStringsDtor& GetNumRuleUINameArray();
+
+ static const SvStringsDtor& GetTextProgNameArray();
+ static const SvStringsDtor& GetListsProgNameArray();
+ static const SvStringsDtor& GetExtraProgNameArray();
+ static const SvStringsDtor& GetRegisterProgNameArray();
+ static const SvStringsDtor& GetDocProgNameArray();
+ static const SvStringsDtor& GetHTMLProgNameArray();
+ static const SvStringsDtor& GetFrmFmtProgNameArray();
+ static const SvStringsDtor& GetChrFmtProgNameArray();
+ static const SvStringsDtor& GetHTMLChrFmtProgNameArray();
+ static const SvStringsDtor& GetPageDescProgNameArray();
+ static const SvStringsDtor& GetNumRuleProgNameArray();
+};
+#endif // _NAME_MAPPER_HXX
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
new file mode 100644
index 000000000000..4c90bae4e5c2
--- /dev/null
+++ b/sw/inc/SwUndoField.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwUndoField.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_UNDO_FIELD_HXX
+#define _SW_UNDO_FIELD_HXX
+
+#include <undobj.hxx>
+
+class SwDoc;
+class SwField;
+class SwMsgPoolItem;
+
+class SwUndoField : public SwUndo
+{
+ ULONG nNodeIndex;
+ xub_StrLen nOffset;
+
+protected:
+ SwDoc * pDoc;
+ SwPosition GetPosition();
+
+public:
+ SwUndoField(const SwPosition & rPos, SwUndoId nId = UNDO_FIELD );
+ virtual ~SwUndoField();
+};
+
+class SwUndoFieldFromDoc : public SwUndoField
+{
+ SwField * pOldField, * pNewField;
+ SwMsgPoolItem * pHnt;
+ BOOL bUpdate;
+
+public:
+ SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField,
+ const SwField & aNewField,
+ SwMsgPoolItem * pHnt, BOOL bUpdate,
+ SwUndoId nId = UNDO_FIELD );
+ virtual ~SwUndoFieldFromDoc();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+};
+
+class SwUndoFieldFromAPI : public SwUndoField
+{
+ com::sun::star::uno::Any aOldVal, aNewVal;
+ USHORT nWhich;
+
+public:
+ SwUndoFieldFromAPI(const SwPosition & rPos,
+ const com::sun::star::uno::Any & rOldVal,
+ const com::sun::star::uno::Any & rNewVal,
+ USHORT nWhich);
+ virtual ~SwUndoFieldFromAPI();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+};
+
+#endif // _SW_UNDO_FIELD_HXX
diff --git a/sw/inc/SwUndoFmt.hxx b/sw/inc/SwUndoFmt.hxx
new file mode 100644
index 000000000000..7144ef07e0ad
--- /dev/null
+++ b/sw/inc/SwUndoFmt.hxx
@@ -0,0 +1,253 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwUndoFmt.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_UNDO_TXT_FMT_COLL_HXX
+#define _SW_UNDO_TXT_FMT_COLL_HXX
+
+#include <undobj.hxx>
+#include <swundo.hxx>
+
+class SwDoc;
+class SwTxtFmtColl;
+class String;
+class SwRewriter;
+class SfxItemSet;
+
+class SwUndoFmtCreate : public SwUndo
+{
+protected:
+ SwFmt * pNew;
+ String sDerivedFrom;
+ SwDoc * pDoc;
+ mutable String sNewName;
+ SfxItemSet * pNewSet;
+ USHORT nId; // FmtId related
+ BOOL bAuto;
+
+public:
+
+ SwUndoFmtCreate(SwUndoId nUndoId, SwFmt * pNew, SwFmt * pDerivedFrom,
+ SwDoc * pDoc);
+ virtual ~SwUndoFmtCreate();
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ virtual SwRewriter GetRewriter() const;
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom) = 0;
+ virtual void Delete() = 0;
+ virtual SwFmt * Find(const String & rName) const = 0;
+};
+
+class SwUndoFmtDelete : public SwUndo
+{
+protected:
+ String sDerivedFrom;
+ SwDoc * pDoc;
+ String sOldName;
+ SfxItemSet aOldSet;
+ USHORT nId; // FmtId related
+ BOOL bAuto;
+
+public:
+ SwUndoFmtDelete(SwUndoId nUndoId, SwFmt * pOld, SwDoc * pDoc);
+ ~SwUndoFmtDelete();
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ virtual SwRewriter GetRewriter() const;
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom) = 0;
+ virtual void Delete(SwFmt * pFmt) = 0;
+ virtual SwFmt * Find(const String & rName) const = 0;
+};
+
+class SwUndoRenameFmt : public SwUndo
+{
+protected:
+ String sOldName, sNewName;
+ SwDoc * pDoc;
+// SwUndoId nId;
+
+public:
+ SwUndoRenameFmt(SwUndoId nUndoId, const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+ ~SwUndoRenameFmt();
+
+ void Undo(SwUndoIter & rIter);
+ void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+
+ virtual SwFmt * Find(const String & rName) const = 0;
+};
+
+class SwUndoTxtFmtCollCreate : public SwUndoFmtCreate
+{
+public:
+ SwUndoTxtFmtCollCreate(SwTxtFmtColl * pNew, SwTxtFmtColl * pDerivedFrom,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete();
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoTxtFmtCollDelete : public SwUndoFmtDelete
+{
+public:
+ SwUndoTxtFmtCollDelete(SwTxtFmtColl * pOld, SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete(SwFmt * pFmt);
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoRenameFmtColl : public SwUndoRenameFmt
+{
+public:
+ SwUndoRenameFmtColl(const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoCharFmtCreate : public SwUndoFmtCreate
+{
+public:
+ SwUndoCharFmtCreate(SwCharFmt * pNew, SwCharFmt * pDerivedFrom,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete();
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoCharFmtDelete : public SwUndoFmtDelete
+{
+public:
+ SwUndoCharFmtDelete(SwCharFmt * pOld, SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete(SwFmt * pFmt);
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoRenameCharFmt : public SwUndoRenameFmt
+{
+public:
+ SwUndoRenameCharFmt(const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoFrmFmtCreate : public SwUndoFmtCreate
+{
+ BOOL bAuto;
+
+public:
+ SwUndoFrmFmtCreate(SwFrmFmt * pNew, SwFrmFmt * pDerivedFrom,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete();
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoFrmFmtDelete : public SwUndoFmtDelete
+{
+public:
+ SwUndoFrmFmtDelete(SwFrmFmt * pOld, SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete(SwFmt * pFmt);
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoRenameFrmFmt : public SwUndoRenameFmt
+{
+public:
+ SwUndoRenameFrmFmt(const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoNumruleCreate : public SwUndo
+{
+ const SwNumRule * pNew;
+ mutable SwNumRule aNew;
+ SwDoc * pDoc;
+ mutable bool bInitialized;
+
+public:
+ SwUndoNumruleCreate(const SwNumRule * pNew, SwDoc * pDoc);
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+};
+
+class SwUndoNumruleDelete : public SwUndo
+{
+ SwNumRule aOld;
+ SwDoc * pDoc;
+
+public:
+ SwUndoNumruleDelete(const SwNumRule & aRule, SwDoc * pDoc);
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+};
+
+class SwUndoNumruleRename : public SwUndo
+{
+ String aOldName, aNewName;
+ SwDoc * pDoc;
+
+ public:
+ SwUndoNumruleRename(const String & aOldName, const String & aNewName,
+ SwDoc * pDoc);
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+};
+#endif // _SW_UNDO_TXT_FMT_COLL_HXX
diff --git a/sw/inc/SwUndoPageDesc.hxx b/sw/inc/SwUndoPageDesc.hxx
new file mode 100644
index 000000000000..9dd28e509af7
--- /dev/null
+++ b/sw/inc/SwUndoPageDesc.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwUndoPageDesc.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_UNDO_PAGE_DESC_HXX
+#define _SW_UNDO_PAGE_DESC_HXX
+
+#include <undobj.hxx>
+#include <pagedesc.hxx>
+
+class SwDoc;
+class SwPageDesc;
+
+
+class SwUndoPageDesc : public SwUndo
+{
+ SwPageDescExt aOld, aNew;
+ SwDoc * pDoc;
+ bool bExchange;
+
+ // To avoid duplication of (header/footer)content nodes for simple page desc changes
+ void ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest );
+
+public:
+ SwUndoPageDesc(const SwPageDesc & aOld, const SwPageDesc & aNew,
+ SwDoc * pDoc);
+ virtual ~SwUndoPageDesc();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+class SwUndoPageDescCreate : public SwUndo
+{
+ const SwPageDesc * pDesc; // #116530#
+ SwPageDescExt aNew;
+ SwDoc * pDoc;
+
+public:
+ SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc); // #116530#
+ virtual ~SwUndoPageDescCreate();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+class SwUndoPageDescDelete : public SwUndo
+{
+ SwPageDescExt aOld;
+ SwDoc * pDoc;
+
+public:
+ SwUndoPageDescDelete(const SwPageDesc & aOld, SwDoc * pDoc);
+ virtual ~SwUndoPageDescDelete();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+
+ virtual SwRewriter GetRewriter() const;
+};
+#endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
diff --git a/sw/inc/SwUndoTOXChange.hxx b/sw/inc/SwUndoTOXChange.hxx
new file mode 100644
index 000000000000..b50120a70b91
--- /dev/null
+++ b/sw/inc/SwUndoTOXChange.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwUndoTOXChange.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_UNDO_TOX_CHANGE_HXX
+#define _SW_UNDO_TOX_CHANGE_HXX
+#include <undobj.hxx>
+#include <tox.hxx>
+
+class SwUndoTOXChange : public SwUndo
+{
+ SwTOXBase * pTOX, aOld, aNew;
+
+ void UpdateTOXBaseSection();
+
+public:
+ SwUndoTOXChange(SwTOXBase * pTOX, const SwTOXBase & rNew);
+ virtual ~SwUndoTOXChange();
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+ virtual void Repeat(SwUndoIter & rIter);
+};
+
+#endif //_SW_UNDO_TOX_CHANGE_HXX
diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
new file mode 100644
index 000000000000..83cf4f3c0491
--- /dev/null
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwXMLSectionList.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_XMLSECTIONLIST_HXX
+#define _SW_XMLSECTIONLIST_HXX
+
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/xmlimp.hxx>
+
+class SvStrings;
+
+class SwXMLSectionList : public SvXMLImport
+{
+protected:
+ // This method is called after the namespace map has been updated, but
+ // before a context for the current element has been pushed.
+ virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+public:
+ SvStrings & rSectionList;
+
+ // #110680#
+ SwXMLSectionList(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ SvStrings & rNewSectionList );
+
+ virtual ~SwXMLSectionList ( )
+ throw();
+};
+
+class SvXMLSectionListContext : public SvXMLImportContext
+{
+private:
+ SwXMLSectionList & rLocalRef;
+public:
+ SvXMLSectionListContext ( SwXMLSectionList& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ ~SvXMLSectionListContext ( void );
+};
+
+class SvXMLIgnoreSectionListContext : public SvXMLImportContext
+{
+private:
+ SwXMLSectionList & rLocalRef;
+public:
+ SvXMLIgnoreSectionListContext ( SwXMLSectionList& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ ~SvXMLIgnoreSectionListContext ( void );
+};
+#endif
diff --git a/sw/inc/TextCursorHelper.hxx b/sw/inc/TextCursorHelper.hxx
new file mode 100644
index 000000000000..76390bc3fb5a
--- /dev/null
+++ b/sw/inc/TextCursorHelper.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: TextCursorHelper.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_TEXTCURSORHELPER_HXX
+#define _SW_TEXTCURSORHELPER_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+class SwDoc;
+class SwPaM;
+
+class OTextCursorHelper : public ::cppu::ImplHelper1< ::com::sun::star::lang::XUnoTunnel>
+{
+public:
+
+ OTextCursorHelper(){}
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual const SwPaM* GetPaM() const = 0;
+ virtual SwPaM* GetPaM() = 0;
+ virtual const SwDoc* GetDoc() const = 0;
+ virtual SwDoc* GetDoc() = 0;
+};
+
+#endif // _SW_TEXTCURSORHELPER_HXX
+
+
diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc
new file mode 100644
index 000000000000..9bc9fbf10b87
--- /dev/null
+++ b/sw/inc/access.hrc
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: access.hrc,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCESS_HRC
+#define _ACCESS_HRC
+
+#include "rcid.hrc"
+
+// --> OD 2004-09-27 #117970# - remove STR_ACCESS_PARAGRAPH_NAME, STR_ACCESS_HEADING_NAME
+// STR_ACCESS_PARAGRAPH_DESC and STR_ACCESS_HEADING_DESC
+#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1)
+#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2)
+#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3)
+#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4)
+#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5)
+#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6)
+#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7)
+#define STR_ACCESS_FOOTNOTE_NAME (RC_ACCESS_BEGIN + 8)
+#define STR_ACCESS_FOOTNOTE_DESC (RC_ACCESS_BEGIN + 9)
+#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10)
+#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11)
+#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12)
+#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13)
+#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14)
+#define STR_ACCESS_TABLE_DESC (RC_ACCESS_BEGIN + 15)
+#define STR_ACCESS_PAGE_NAME (RC_ACCESS_BEGIN + 16)
+#define STR_ACCESS_PAGE_DESC (RC_ACCESS_BEGIN + 17)
+// <--
+
+#define ACCESS_ACT_END STR_ACCESS_PAGE_DESC
+
+#if ACCESS_ACT_END > RC_ACCESS_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+
+#endif
diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx
new file mode 100644
index 000000000000..9d5a43cf8eca
--- /dev/null
+++ b/sw/inc/accessibilityoptions.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accessibilityoptions.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCESSIBILITYOPTIONS_HXX
+#define _ACCESSIBILITYOPTIONS_HXX
+
+#include <tools/solar.h>
+
+struct SwAccessibilityOptions
+{
+ BOOL bIsAlwaysAutoColor :1;
+ BOOL bIsStopAnimatedText :1;
+ BOOL bIsStopAnimatedGraphics :1;
+
+ SwAccessibilityOptions() :
+ bIsAlwaysAutoColor(FALSE),
+ bIsStopAnimatedText(FALSE),
+ bIsStopAnimatedGraphics(FALSE) {}
+
+ inline BOOL IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
+ inline void SetAlwaysAutoColor( BOOL b ) { bIsAlwaysAutoColor = b; }
+
+ inline BOOL IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
+ inline void SetStopAnimatedGraphics( BOOL b ) { bIsStopAnimatedText = b; }
+
+ inline BOOL IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
+ inline void SetStopAnimatedText( BOOL b ) { bIsStopAnimatedGraphics = b;}
+};
+#endif
+
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
new file mode 100644
index 000000000000..ba18cf599872
--- /dev/null
+++ b/sw/inc/accmap.hxx
@@ -0,0 +1,399 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accmap.hxx,v $
+ * $Revision: 1.29 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCMAP_HXX
+#define _ACCMAP_HXX
+
+#include <cppuhelper/weakref.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <vos/ref.hxx>
+#include <vos/mutex.hxx>
+#include <svx/IAccessibleViewForwarder.hxx>
+#include <svx/IAccessibleParent.hxx>
+#include "viewsh.hxx"
+#include <tools/debug.hxx>
+#include <tools/fract.hxx>
+
+#include <vector>
+
+class Rectangle;
+class SwFrm;
+class SwPageFrm;
+class SwAccessibleContext;
+class SwAccessibleContextMap_Impl;
+class SwAccessibleEventList_Impl;
+class SwAccessibleEventMap_Impl;
+class SwShapeList_Impl;
+class SdrObject;
+namespace accessibility { class AccessibleShape; }
+class SwAccessibleShapeMap_Impl;
+struct SwAccessibleEvent_Impl;
+// --> OD 2005-12-13 #i27301#
+class SwAccessibleSelectedParas_Impl;
+// <--
+class SwRect;
+class MapMode;
+class SwAccPreviewData;
+// OD 14.01.2003 #103492#
+#ifndef _PREVWPAGE_HXX
+#include <prevwpage.hxx>
+#endif
+
+// helper class that stores preview data
+class SwAccPreviewData
+{
+ typedef std::vector<Rectangle> Rectangles;
+ Rectangles maPreviewRects;
+ Rectangles maLogicRects;
+
+ SwRect maVisArea;
+ Fraction maScale;
+
+ const SwPageFrm *mpSelPage;
+
+ /** adjust logic page retangle to its visible part
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+
+ @param _iorLogicPgSwRect
+ input/output parameter - reference to the logic page rectangle, which
+ has to be adjusted.
+
+ @param _rPrevwPgSwRect
+ input parameter - constant reference to the corresponding preview page
+ rectangle; needed to determine the visible part of the logic page rectangle.
+
+ @param _rPrevwWinSize
+ input paramter - constant reference to the preview window size in TWIP;
+ needed to determine the visible part of the logic page rectangle
+ */
+ void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect,
+ const SwRect& _rPrevwPgSwRect,
+ const Size& _rPrevwWinSize );
+
+public:
+ SwAccPreviewData();
+ ~SwAccPreviewData();
+
+ // OD 14.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ void Update( const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize );
+
+ // OD 14.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ void InvalidateSelection( const SwPageFrm* _pSelectedPageFrm );
+
+ const SwRect& GetVisArea() const;
+
+ MapMode GetMapModeForPreview( ) const;
+
+ /** Adjust the MapMode so that the preview page appears at the
+ * proper position. rPoint identifies the page for which the
+ * MapMode should be adjusted. If bFromPreview is true, rPoint is
+ * a preview coordinate; else it's a document coordinate. */
+ // OD 17.01.2003 #103492# - delete unused 3rd parameter.
+ void AdjustMapMode( MapMode& rMapMode,
+ const Point& rPoint ) const;
+
+ inline const SwPageFrm *GetSelPage() const { return mpSelPage; }
+
+ void DisposePage(const SwPageFrm *pPageFrm );
+};
+
+// real states for events
+#define ACC_STATE_EDITABLE 0x01
+#define ACC_STATE_OPAQUE 0x02
+
+// pseudo states for events
+// --> OD 2009-01-07 #i88069# - pseudo state for event TEXT_ATTRIBUTE_CHANGED
+#define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200
+// <--
+// --> OD 2005-12-12 #i27301# - pseudo state for event TEXT_SELECTION_CHANGED
+#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100
+// <--
+#define ACC_STATE_CARET 0x80
+#define ACC_STATE_RELATION_FROM 0x40
+#define ACC_STATE_RELATION_TO 0x20
+
+#define ACC_STATE_RELATION_MASK 0x60
+
+#define ACC_STATE_MASK 0x1F
+
+// --> OD 2005-12-12 #i27301# - introduce type definition of states
+typedef sal_uInt16 tAccessibleStates;
+// <--
+
+class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
+ public accessibility::IAccessibleParent
+{
+ ::vos::OMutex maMutex;
+ ::vos::OMutex maEventMutex;
+ SwAccessibleContextMap_Impl *mpFrmMap;
+ SwAccessibleShapeMap_Impl *mpShapeMap;
+ SwShapeList_Impl *mpShapes;
+ SwAccessibleEventList_Impl *mpEvents;
+ SwAccessibleEventMap_Impl *mpEventMap;
+ // --> OD 2005-12-13 #i27301# - data structure to keep information about
+ // accessible paragraph, which have a selection.
+ SwAccessibleSelectedParas_Impl* mpSelectedParas;
+ // <--
+ ViewShell *mpVSh;
+ /// for page preview: store preview data, VisArea, and mapping of
+ /// preview-to-display coordinates
+ SwAccPreviewData* mpPreview;
+
+ ::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible > mxCursorContext;
+
+ sal_Int32 mnPara;
+ sal_Int32 mnFootnote;
+ sal_Int32 mnEndnote;
+
+
+ sal_Bool mbShapeSelected;
+
+ void FireEvent( const SwAccessibleEvent_Impl& rEvent );
+
+ void AppendEvent( const SwAccessibleEvent_Impl& rEvent );
+
+ void InvalidateCursorPosition(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rAcc );
+ void DoInvalidateShapeSelection();
+ void DoInvalidateShapeFocus();
+ void InvalidateShapeSelection();
+
+ void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom );
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ _GetDocumentView( sal_Bool bPagePreview );
+
+ /** method to build up a new data structure of the accessible pararaphs,
+ which have a selection
+
+ OD 2005-12-13 #i27301#
+ Important note: method has to used inside a mutual exclusive section
+
+ @author OD
+ */
+ SwAccessibleSelectedParas_Impl* _BuildSelectedParas();
+
+public:
+
+ SwAccessibleMap( ViewShell *pSh );
+ ~SwAccessibleMap();
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetDocumentView();
+
+ // OD 15.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetDocumentPreview(
+ const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize );
+
+ ::vos::ORef < SwAccessibleContext > GetContextImpl(
+ const SwFrm *pFrm,
+ sal_Bool bCreate = sal_True );
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetContext(
+ const SwFrm *pFrm,
+ sal_Bool bCreate = sal_True );
+
+ ::vos::ORef < ::accessibility::AccessibleShape > GetContextImpl(
+ const SdrObject *pObj,
+ SwAccessibleContext *pParentImpl,
+ sal_Bool bCreate = sal_True );
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetContext(
+ const SdrObject *pObj,
+ SwAccessibleContext *pParentImpl,
+ sal_Bool bCreate = sal_True );
+
+ inline ViewShell* GetShell() const
+ {
+ return mpVSh;
+ }
+
+ inline const SwRect& GetVisArea() const
+ {
+ DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
+ "preview without preview data?" );
+ return GetShell()->IsPreView()
+ ? mpPreview->GetVisArea()
+ : GetShell()->VisArea();
+ }
+
+ /** get size of a dedicated preview page
+
+ OD 15.01.2003 #103492#
+ complete re-factoring of previous method due to new page/print preview
+ functionality.
+
+ @author OD
+
+ @param _nPrevwPageNum
+ input parameter - physical page number of page visible in the page preview
+
+ @return an object of class <Size>
+ */
+ Size GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const;
+
+ void RemoveContext( const SwFrm *pFrm );
+ void RemoveContext( const SdrObject *pObj );
+
+ // Dispose frame and its children if bRecursive is set
+ void Dispose( const SwFrm *pFrm, const SdrObject *pObj,
+ sal_Bool bRecursive=sal_False );
+
+ void InvalidatePosOrSize( const SwFrm *pFrm, const SdrObject *pObj,
+ const SwRect& rOldFrm );
+
+ void InvalidateContent( const SwFrm *pFrm );
+
+ // --> OD 2009-01-06 #i88069#
+ void InvalidateAttr( const SwTxtFrm& rTxtFrm );
+ // <--
+
+ void InvalidateCursorPosition( const SwFrm *pFrm );
+ void InvalidateFocus();
+
+ void SetCursorContext(
+ const ::vos::ORef < SwAccessibleContext >& rCursorContext );
+
+ // Invalidate state of whole tree. If an action is open, this call
+ // is processed when the last action ends.
+ // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ void InvalidateStates( tAccessibleStates _nStates,
+ const SwFrm* _pFrm = 0 );
+
+ void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow );
+
+ /** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
+
+ OD 2005-12-01 #i27138#
+
+ @author OD
+
+ @param _rTxtFrm
+ input parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO
+ has to be invalidated.
+
+ @param _bFrom
+ input parameter - boolean indicating, if relation CONTENT_FLOWS_FROM
+ (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated.
+ */
+ void InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
+ const bool _bFrom );
+
+ /** invalidation of text selection of a paragraph
+
+ OD 2005-12-12 #i27301#
+
+ @author OD
+ */
+ void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm );
+
+ /** invalidation of text selection of all paragraphs
+
+ OD 2005-12-13 #i27301#
+
+ @author OD
+ */
+ void InvalidateTextSelectionOfAllParas();
+
+ // update preview data (and fire events if necessary)
+ // OD 15.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize );
+
+ void InvalidatePreViewSelection( sal_uInt16 nSelPage );
+ sal_Bool IsPageSelected( const SwPageFrm *pPageFrm ) const;
+
+ void FireEvents();
+
+
+ // IAccessibleViewForwarder
+
+ virtual sal_Bool IsValid() const;
+ virtual Rectangle GetVisibleArea() const;
+ virtual Point LogicToPixel (const Point& rPoint) const;
+ virtual Size LogicToPixel (const Size& rSize) const;
+ virtual Point PixelToLogic (const Point& rPoint) const;
+ virtual Size PixelToLogic (const Size& rSize) const;
+
+ // IAccessibleParent
+ virtual sal_Bool ReplaceChild (
+ ::accessibility::AccessibleShape* pCurrentChild,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape,
+ const long _nIndex,
+ const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
+ ) throw (::com::sun::star::uno::RuntimeException);
+
+ // additional Core/Pixel conversions for internal use; also works
+ // for preview
+ Point PixelToCore (const Point& rPoint) const;
+ Rectangle CoreToPixel (const Rectangle& rRect) const;
+
+private:
+ /** get mapping mode for LogicToPixel and PixelToLogic conversions
+
+ OD 15.01.2003 #103492#
+ Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
+ Method returns mapping mode of current output device and adjusts it,
+ if the shell is in page/print preview.
+ Necessary, because <PreviewAdjust(..)> changes mapping mode at current
+ output device for mapping logic document positions to page preview window
+ positions and vice versa and doesn't take care to recover its changes.
+
+ @author OD
+
+ @param _rPoint
+ input parameter - constant reference to point to determine the mapping
+ mode adjustments for page/print preview.
+
+ @param _orMapMode
+ output parameter - reference to the mapping mode, which is determined
+ by the method
+ */
+ void GetMapMode( const Point& _rPoint,
+ MapMode& _orMapMode ) const;
+};
+#endif
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
new file mode 100644
index 000000000000..964371ca40da
--- /dev/null
+++ b/sw/inc/acmplwrd.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acmplwrd.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACMPLWRD_HXX
+#define _ACMPLWRD_HXX
+
+
+#define _SVSTDARR_STRINGSISORTDTOR
+#include <svtools/svstdarr.hxx>
+
+class SwDoc;
+class SwAutoCompleteWord_Impl;
+class SwAutoCompleteClient;
+
+class SwAutoCompleteWord
+{
+ friend class SwAutoCompleteClient;
+
+ SvStringsISortDtor aWordLst; // contains extended strings carrying source information
+ SvPtrarr aLRULst;
+
+ SwAutoCompleteWord_Impl* pImpl;
+ USHORT nMaxCount, nMinWrdLen;
+ BOOL bLockWordLst;
+
+ void DocumentDying(const SwDoc& rDoc);
+public:
+ SwAutoCompleteWord( USHORT nWords = 500, USHORT nMWrdLen = 10 );
+ ~SwAutoCompleteWord();
+
+ BOOL InsertWord( const String& rWord, SwDoc& rDoc );
+
+ BOOL GetRange( const String& rWord, USHORT& rStt, USHORT& rEnd ) const;
+
+ const String& operator[]( USHORT n ) const { return *aWordLst[ n ]; }
+
+ BOOL IsLockWordLstLocked() const { return bLockWordLst; }
+ void SetLockWordLstLocked( BOOL bFlag ) { bLockWordLst = bFlag; }
+
+ void SetMaxCount( USHORT n );
+
+ USHORT GetMinWordLen() const { return nMinWrdLen; }
+ void SetMinWordLen( USHORT n );
+
+ const SvStringsISortDtor& GetWordList() const { return aWordLst; }
+ void CheckChangedList( const SvStringsISortDtor& rNewLst );
+};
+
+
+#endif
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
new file mode 100644
index 000000000000..7a52a523d2c2
--- /dev/null
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: anchoreddrawobject.hxx,v $
+ * $Revision: 1.15.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ANCHOREDDRAWOBJECT_HXX
+#define _ANCHOREDDRAWOBJECT_HXX
+
+#include <anchoredobject.hxx>
+#include <tools/gen.hxx>
+
+/** class for the positioning of drawing objects
+
+ OD 2004-03-25 #i26791#
+
+ @author OD
+*/
+class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
+{
+ private:
+ // boolean, indicating that the object position has been invalidated
+ // and that a positioning has to be performed.
+ bool mbValidPos;
+
+ // rectangle, keeping the last object rectangle after the postioning
+ // --> OD 2004-09-29 #i34748# - change <maLastObjRect> to a pointer
+ Rectangle* mpLastObjRect;
+
+ // boolean, indicating that anchored drawing object hasn't been attached
+ // to a anchor frame yet. Once, it is attached to a anchor frame the
+ // boolean changes its state.
+ bool mbNotYetAttachedToAnchorFrame;
+
+ // --> OD 2004-08-09 #i28749# - boolean, indicating that anchored
+ // drawing object hasn't been positioned yet. Once, it's positioned the
+ // boolean changes its state.
+ bool mbNotYetPositioned;
+
+ // --> OD 2006-03-17 #i62875#
+ // boolean, indicating that after change of layout direction the
+ // anchored drawing object has to be captured on the page, if it exceeds
+ // the left or right page margin.
+ // Needed for compatibility option <DoNotCaptureDrawObjsOnPage>
+ bool mbCaptureAfterLayoutDirChange;
+ // <--
+
+ /** method for the intrinsic positioning of a at-paragraph|at-character
+ anchored drawing object
+
+ OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+
+ @author OD
+ */
+ void _MakeObjPosAnchoredAtPara();
+
+ /** method for the intrinsic positioning of a at-page|at-frame anchored
+ drawing object
+
+ OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+
+ @author OD
+ */
+ void _MakeObjPosAnchoredAtLayout();
+
+ /** method to set positioning attributes (not for as-character anchored)
+
+ OD 2004-10-20 #i35798#
+ During load the positioning attributes aren't set.
+ Thus, the positioning attributes are set by the current object geometry.
+ This method is also used for the conversion for drawing objects
+ (not anchored as-character) imported from OpenOffice.org file format
+ once and directly before the first positioning.
+
+ @author OD
+ */
+ void _SetPositioningAttr();
+
+ /** method to set internal anchor position of <SdrObject> instance
+ of the drawing object
+
+ For drawing objects the internal anchor position of the <SdrObject>
+ instance has to be set.
+ Note: This adjustment is not be done for as-character anchored
+ drawing object - the positioning code takes care of this.
+ OD 2004-07-29 #i31698# - API for drawing objects in Writer has
+ been adjusted. Thus, this method will only set the internal anchor
+ position of the <SdrObject> instance to the anchor position given
+ by its anchor frame.
+
+ @author OD
+ */
+ void _SetDrawObjAnchor();
+
+ /** method to invalidate the given page frame
+
+ OD 2004-07-02 #i28701#
+
+ @author OD
+ */
+ void _InvalidatePage( SwPageFrm* _pPageFrm );
+
+ protected:
+ virtual void ObjectAttachedToAnchorFrame();
+
+ /** method to assure that anchored object is registered at the correct
+ page frame
+
+ OD 2004-07-02 #i28701#
+
+ @author OD
+ */
+ virtual void RegisterAtCorrectPage();
+
+ // --> OD 2006-08-10 #i68520#
+ virtual bool _SetObjTop( const SwTwips _nTop);
+ virtual bool _SetObjLeft( const SwTwips _nLeft);
+ // <--
+
+ // --> OD 2006-10-05 #i70122#
+ virtual const SwRect GetObjBoundRect() const;
+ // <--
+ public:
+ TYPEINFO();
+
+ SwAnchoredDrawObject();
+ virtual ~SwAnchoredDrawObject();
+
+ // declaration of pure virtual methods of base class <SwAnchoredObject>
+ virtual void MakeObjPos();
+ virtual void InvalidateObjPos();
+ inline bool IsValidPos() const
+ {
+ return mbValidPos;
+ }
+
+ // accessors to the format
+ virtual SwFrmFmt& GetFrmFmt();
+ virtual const SwFrmFmt& GetFrmFmt() const;
+
+ // accessors to the object area and its position
+ virtual const SwRect GetObjRect() const;
+ // --> OD 2004-09-29 #i34748# - change return type to a pointer.
+ // Return value can be NULL.
+ const Rectangle* GetLastObjRect() const;
+ // <--
+ // --> OD 2004-09-29 #i34748# - change method
+ void SetLastObjRect( const Rectangle& _rNewObjRect );
+ // <--
+
+ /** adjust positioning and alignment attributes for new anchor frame
+
+ OD 2004-04-21
+ Set horizontal and vertical position/alignment to manual position
+ relative to anchor frame area using the anchor position of the
+ new anchor frame and the current absolute drawing object position.
+ Note: For correct Undo/Redo method should only be called inside a
+ Undo-/Redo-action.
+ OD 2004-08-24 #i33313# - add second optional parameter <_pNewObjRect>
+
+ @author OD
+
+ @param <_pNewAnchorFrm>
+ input parameter - new anchor frame for the anchored object.
+
+ @param <_pNewObjRect>
+ optional input parameter - proposed new object rectangle. If not
+ provided the current object rectangle is taken.
+ */
+ void AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm,
+ const SwRect* _pNewObjRect = 0L );
+
+ /** method to notify background of drawing object
+
+ OD 2004-06-30 #i28701#
+
+ @author OD
+ */
+ virtual void NotifyBackground( SwPageFrm* _pPageFrm,
+ const SwRect& _rRect,
+ PrepareHint _eHint );
+
+ // --> OD 2005-08-16 #i53320#
+ inline bool NotYetPositioned() const
+ {
+ return mbNotYetPositioned;
+ }
+ // <--
+
+ // --> OD 2006-03-17 #i62875#
+ // change of layout direction needs to be tracked
+ // for setting <mbCaptureAfterLayoutDirChange>.
+ virtual void UpdateLayoutDir();
+ // <--
+ // --> OD 2006-03-17 #i62875#
+ bool IsOutsidePage() const;
+ // <--
+
+ // new Loop control
+ void ValidateThis() { mbValidPos = true; }
+};
+
+#endif
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
new file mode 100644
index 000000000000..c9c4c55d701e
--- /dev/null
+++ b/sw/inc/anchoredobject.hxx
@@ -0,0 +1,645 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: anchoredobject.hxx,v $
+ * $Revision: 1.22.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ANCHOREDOBJECT_HXX
+#define _ANCHOREDOBJECT_HXX
+
+#include <tools/rtti.hxx>
+#include <swtypes.hxx>
+#include <swrect.hxx>
+
+class SdrObject;
+class SwFrm;
+class SwLayoutFrm;
+// --> OD 2004-07-14 #117380#
+class SwTxtFrm;
+// <--
+// --> OD 2004-06-30 #i28701#
+class SwPageFrm;
+class SwObjPositioningInProgress;
+// <--
+class SwFrmFmt;
+class SwFmtAnchor;
+
+/** wrapper class for the positioning of Writer fly frames and drawing objects
+
+ OD 2004-03-22 #i26791#
+ Purpose of this class is to provide a unified interface for the positioning
+ of Writer fly frames (derived classes of <SwFlyFrm>) and of drawing objects
+ (derived classes of <SwDrawFrm>).
+
+ @author OD
+*/
+class SW_DLLPUBLIC SwAnchoredObject
+{
+ private:
+ // drawing object representing the anchored object in the drawing layer
+ SdrObject* mpDrawObj;
+ // frame the object is anchored at
+ SwFrm* mpAnchorFrm;
+ // --> OD 2004-06-30 #i28701# - page frame the object is registered at
+ // note: no page frame for as-character anchored objects
+ SwPageFrm* mpPageFrm;
+ // <--
+ // current relative position (relative to anchor position of anchor frame)
+ Point maRelPos;
+
+ // for to-character anchored objects:
+ // Last known anchor character retangle.
+ // Used to decide, if invalidation has to been performed, if anchor position
+ // has changed, and used to position object.
+ SwRect maLastCharRect;
+
+ // for to-character anchored objects:
+ // Last known top of line, in which the anchor character is in.
+ // Used to decide, if invalidation has to been performed, if anchor position
+ // has changed, and used to position object.
+ SwTwips mnLastTopOfLine;
+
+ // for to-paragraph and to-character anchored objects:
+ // Layout frame vertical position is orient at - typically its the upper
+ // of the anchor frame, but it could also by the upper of a follow or
+ // a following layout frame in the text flow.
+ const SwLayoutFrm* mpVertPosOrientFrm;
+
+ // --> OD 2004-06-30 #i28701# - boolean, indicating that the object
+ // positioning algorithm is in progress.
+ bool mbPositioningInProgress;
+ // <--
+
+ // --> OD 2004-06-29 #i28701# - Booleans needed for the layout process.
+ // Values only of relevance for to-paragraph and to-character anchored
+ // floating screen object, for whose the 'straight-forward positioning
+ // process are applied
+ // Otherwise value of <mbConsiderForTextWrap> is treated as <true>,
+ // value of <mbPositionLocked> is treated as <false> and
+ // value of <mbRestartLayoutProcess> is treated as <false>.
+ // --> OD 2004-10-22 #i35911# - add boolean <mbClearEnvironment>
+ // Indicates that due to its position and wrapping style its layout
+ // environment is cleared - all content is moved forward.
+ // Treated as <false>, if not the 'straight-forward positioning process"
+ // is applied.
+ bool mbConsiderForTextWrap;
+ bool mbPositionLocked;
+ // --> OD 2005-01-10 #i40147# - boolean needed to keep position of
+ // anchored object locked due to special object positioning for sections.
+ bool mbKeepPositionLockedForSection;
+ // <--
+ bool mbRestartLayoutProcess;
+ bool mbClearedEnvironment;
+ // <--
+
+ // --> OD 2004-08-25 #i3317# - boolean, indicating that temporarly
+ // the wrapping style influence of the anchored object has to be
+ // considered during its positioning.
+ // This boolean is used, if compatibility option 'Consider wrapping style
+ // influence on object positioning' is OFF and a positioning loop is
+ // detected in method <SwFlyAtCntFrm::MakeAll()> or method
+ // <SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()>.
+ // The boolean is reset to <false>, when the layout process for a
+ // page frame starts - see class <NotifyLayoutOfPageInProgress>.
+ bool mbTmpConsiderWrapInfluence;
+ // <--
+
+ // --> OD 2006-06-21 #i68520#
+ mutable SwRect maObjRectWithSpaces;
+ mutable bool mbObjRectWithSpacesValid;
+ mutable SwRect maLastObjRect;
+ // <--
+
+ /** method to indicate, that positioning of anchored object is in progress
+
+ note: method is implemented empty
+
+ @author OD
+ */
+ friend class SwObjPositioningInProgress;
+ inline void SetPositioningInProgress( const bool _bPosInProgress )
+ {
+ mbPositioningInProgress = _bPosInProgress;
+ }
+
+
+ /** check anchor character rectangle
+
+ OD 2004-03-25 #i26791#
+ helper method for method <CheckCharRectAndTopOfLine()>
+ For to-character anchored Writer fly frames the member <maLastCharRect>
+ is updated. This is checked for change and depending on the applied
+ positioning, it's decided, if the Writer fly frame has to be invalidated.
+ OD 2004-07-14 #117380#
+ improvement - add second parameter <_rAnchorCharFrm>
+
+ @author OD
+
+ @param _rAnch
+ input parameter - reference to anchor position
+
+ @param _rAnchorCharFrm
+ input parameter - reference to the text frame containing the anchor
+ character.
+ */
+ void _CheckCharRect( const SwFmtAnchor& _rAnch,
+ const SwTxtFrm& _rAnchorCharFrm );
+
+ /** check top of line
+
+ OD 2004-03-25 #i26791#
+ helper method for method <CheckCharRectAndTopOfLine()>
+ For to-character anchored Writer fly frames the member <mnLastTopOfLine>
+ is updated. This is checked for change and depending on the applied
+ positioning, it's decided, if the Writer fly frame has to be invalidated.
+ OD 2004-07-14 #117380#
+ improvement - add second parameter <_rAnchorCharFrm>
+
+ @author OD
+
+ @param _rAnch
+ input parameter - reference to anchor position
+
+ @param _rAnchorCharFrm
+ input parameter - reference to the text frame containing the anchor
+ character.
+ */
+ void _CheckTopOfLine( const SwFmtAnchor& _rAnch,
+ const SwTxtFrm& _rAnchorCharFrm );
+
+ // --> OD 2005-03-30 #120729# - needed for the hotfix
+ // method <lcl_HideObj(..)> sets needed data structure values for the
+ // object positioning
+ friend bool lcl_HideObj( const SwTxtFrm& _rFrm,
+ const RndStdIds _eAnchorType,
+ const xub_StrLen _nObjAnchorPos,
+ SwAnchoredObject* _pAnchoredObj );
+ // <--
+ protected:
+ SwAnchoredObject();
+
+ void SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm );
+
+ /** method to assure that anchored object is registered at the correct
+ page frame
+
+ OD 2004-07-02 #i28701#
+
+ @author OD
+ */
+ virtual void RegisterAtCorrectPage() = 0;
+
+ /** method to indicate, that anchored object is attached to a anchor frame
+
+ @author OD
+ */
+ virtual void ObjectAttachedToAnchorFrame();
+
+ /** method to determine, if other anchored objects, also attached at
+ to the anchor frame, have to consider its wrap influence.
+
+ // --> OD 2005-02-22 #i43255#
+
+ @author OD
+ */
+ bool ConsiderObjWrapInfluenceOfOtherObjs() const;
+
+ /** method to apply temporary consideration of wrapping style influence
+ to the anchored objects, which are anchored at the same anchor frame
+
+ OD 2006-07-24 #b6449874#
+
+ @author OD
+ */
+ void SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence );
+
+ // --> OD 2006-08-10 #i68520#
+ virtual bool _SetObjTop( const SwTwips _nTop) = 0;
+ virtual bool _SetObjLeft( const SwTwips _nLeft) = 0;
+ // <--
+
+ // --> OD 2006-10-05 #i70122#
+ virtual const SwRect GetObjBoundRect() const = 0;
+ // <--
+ public:
+ TYPEINFO();
+
+ virtual ~SwAnchoredObject();
+
+ // accessors to member <mpDrawObj>
+ void SetDrawObj( SdrObject& _rDrawObj );
+ const SdrObject* GetDrawObj() const;
+ SdrObject* DrawObj();
+
+ // accessors to member <mpAnchorFrm>
+ const SwFrm* GetAnchorFrm() const;
+ SwFrm* AnchorFrm();
+ void ChgAnchorFrm( SwFrm* _pNewAnchorFrm );
+ /** determine anchor frame containing the anchor position
+
+ OD 2004-10-08 #i26945#
+ the anchor frame, which is determined, is <mpAnchorFrm>
+ for an at-page, at-frame or at-paragraph anchored object
+ and the anchor character frame for an at-character and as-character
+ anchored object.
+
+ @author OD
+ */
+ SwFrm* GetAnchorFrmContainingAnchPos();
+
+ // --> OD 2004-06-30 #i28701# - accessors to member <mpPageFrm>
+ SwPageFrm* GetPageFrm();
+ const SwPageFrm* GetPageFrm() const;
+ void SetPageFrm( SwPageFrm* _pNewPageFrm );
+ // <--
+
+ /** method to determine the page frame, on which the 'anchor' of
+ the given anchored object is.
+
+ OD 2004-07-02 #i28701#
+ OD 2004-09-23 #i33751#, #i34060#
+ Adjust meaning of method and thus its name: If the anchored object
+ or its anchor isn't correctly inserted in the layout, no page frame
+ can be found. Thus, the return type changed to be a pointer and can
+ be NULL.
+
+ @author OD
+
+ @param _rAnchoredObj
+ input parameter - anchored object, for which the page frame of its
+ 'anchor' has to be determined.
+
+ @return SwPageFrm&
+ page frame, the 'anchor' of the given anchored object is on
+ */
+ SwPageFrm* FindPageFrmOfAnchor();
+
+ /** get frame, which contains the anchor character, if the object
+ is anchored at-character or as-character.
+
+ OD 2004-10-04 #i26945#
+
+ @author OD
+
+ @return SwTxtFrm*
+ text frame containing the anchor character. It's NULL, if the object
+ isn't anchored at-character resp. as-character.
+ */
+ SwTxtFrm* FindAnchorCharFrm();
+
+ // accessors to data of position calculation:
+ // frame vertical position is orient at
+ inline const SwLayoutFrm* GetVertPosOrientFrm() const
+ {
+ return mpVertPosOrientFrm;
+ }
+ // --> OD 2004-11-29 #115759# - method to clear member <mpVertPosOrientFrm>
+ inline void ClearVertPosOrientFrm()
+ {
+ mpVertPosOrientFrm = 0L;
+ }
+ // <--
+
+ /** check anchor character rectangle and top of line
+
+ OD 2004-03-25 #i26791#
+ For to-character anchored Writer fly frames the members <maLastCharRect>
+ and <maLastTopOfLine> are updated. These are checked for change and
+ depending on the applied positioning, it's decided, if the Writer fly
+ frame has to be invalidated.
+ OD 2004-07-15 #117380#
+ add parameter <_bCheckForParaPorInf>, default value <true>
+
+ @author OD
+
+ @param _bCheckForParaPorInf
+ input parameter - boolean indicating, if check on paragraph portion
+ information has to be done.
+ */
+ void CheckCharRectAndTopOfLine( const bool _bCheckForParaPorInf = true );
+
+ // accessors to member <maLastCharRect>
+ const SwRect& GetLastCharRect() const;
+ SwTwips GetRelCharX( const SwFrm* pFrm ) const;
+ SwTwips GetRelCharY( const SwFrm* pFrm ) const;
+ void AddLastCharY( long nDiff );
+ void ResetLastCharRectHeight();
+
+ // accessor to member <nmLastTopOfLine>
+ SwTwips GetLastTopOfLine() const;
+ // OD 2004-05-18 #i28701# - follow-up of #i22341#
+ void AddLastTopOfLineY( SwTwips _nDiff );
+
+ /** reset members <maLastCharRect> and <mnLastTopOfLine>
+
+ OD 2004-06-29 #i27801#
+
+ @author OD
+ */
+ void ClearCharRectAndTopOfLine();
+
+ /** method to determine position for the object and set the position
+ at the object
+
+ @author OD
+ */
+ virtual void MakeObjPos() = 0;
+
+ /** is positioning of anchored object in progress
+
+ @author OD
+ */
+ inline bool IsPositioningInProgress() const
+ {
+ return mbPositioningInProgress;
+ }
+
+ /** method to determine, if invalidation of position is allowed
+
+ OD 2004-07-01 #i28701#
+
+ @author OD
+ */
+ bool InvalidationOfPosAllowed() const;
+
+ /** method to invalidate position of the anchored object
+
+ @author OD
+ */
+ virtual void InvalidateObjPos() = 0;
+
+ /** method to perform necessary invalidations for the positioning of
+ objects, for whose the wrapping style influence has to be considered
+ on the object positioning.
+
+ OD 2004-06-30 #i28701#
+
+ @author OD
+ */
+ void InvalidateObjPosForConsiderWrapInfluence( const bool _bNotifyBackgrd );
+
+ /** method to trigger notification of 'background'
+
+ OD 2004-07-01 #i28701#
+
+ @author OD
+ */
+ virtual void NotifyBackground( SwPageFrm* _pPageFrm,
+ const SwRect& _rRect,
+ PrepareHint _eHint ) = 0;
+
+ // accessors to the current relative position (relative to anchor
+ // position of anchor frame)
+ const Point GetCurrRelPos() const;
+ void SetCurrRelPos( Point _aRelPos );
+
+ // accessors to the format
+ virtual SwFrmFmt& GetFrmFmt() = 0;
+ virtual const SwFrmFmt& GetFrmFmt() const = 0;
+
+ // accessors to the object area and its position
+ virtual const SwRect GetObjRect() const = 0;
+ // --> OD 2006-08-10 #i68520#
+ void SetObjTop( const SwTwips _nTop);
+ void SetObjLeft( const SwTwips _nLeft);
+ // <--
+
+ /** method update layout direction the layout direction, the anchored
+ object is assigned to
+
+ OD 2004-07-27 #i31698#
+ method has typically to be called, if the anchored object gets its
+ anchor frame assigned and if the anchor frame changes its layout direction
+ OD 2006-03-17 #i62875#
+ made virtual, because it's needed to be overloaded by <SwAnchoredDrawObject>
+
+ @author OD
+ */
+ virtual void UpdateLayoutDir();
+
+ /** method to determine object area inclusive its spacing
+
+ OD 2004-06-30 #i28701#
+ OD 2006-08-10 #i68520# - return constant reference
+
+ @author OD
+ */
+ const SwRect& GetObjRectWithSpaces() const;
+
+ // --> OD 2006-08-10 #i68520#
+ inline void InvalidateObjRectWithSpaces() const
+ {
+ mbObjRectWithSpacesValid = false;
+ }
+ // <--
+
+ /** method to determine, if wrapping style influence of the anchored
+ object has to be considered on the object positioning
+
+ OD 2004-06-30 #i28701#
+ Note: result of this method also decides, if the boolean for the
+ layout process are of relevance.
+
+ @author OD
+ */
+ bool ConsiderObjWrapInfluenceOnObjPos() const;
+
+ // --> OD 2004-06-29 #i28701# - accessors to booleans for layout process
+ bool ConsiderForTextWrap() const;
+ void SetConsiderForTextWrap( const bool _bConsiderForTextWrap );
+ bool PositionLocked() const;
+ inline void LockPosition()
+ {
+ mbPositionLocked = true;
+ }
+ inline void UnlockPosition()
+ {
+ if ( !mbKeepPositionLockedForSection )
+ {
+ mbPositionLocked = false;
+ }
+ }
+ // --> OD 2005-01-10 #i40147#
+ inline void SetKeepPosLocked( const bool _bKeepPosLocked )
+ {
+ mbKeepPositionLockedForSection = _bKeepPosLocked;
+ }
+ // <--
+ bool RestartLayoutProcess() const;
+ void SetRestartLayoutProcess( const bool _bRestartLayoutProcess );
+ // --> OD 2004-10-22 #i35911# - accessors for <mbClearedEnvironment>
+ bool ClearedEnvironment() const;
+ void SetClearedEnvironment( const bool _bClearedEnvironment );
+ // <--
+ // --> OD 2005-03-03 #i43913# - reset booleans for layout process
+ inline void ResetLayoutProcessBools()
+ {
+ mbPositioningInProgress = false;
+ mbConsiderForTextWrap = false;
+ mbPositionLocked = false;
+ mbKeepPositionLockedForSection = false;
+ mbRestartLayoutProcess = false;
+ mbClearedEnvironment = false;
+ mbTmpConsiderWrapInfluence = false;
+ }
+ // <--
+
+ /** method to determine, if due to anchored object size and wrapping
+ style, its layout environment is cleared.
+
+ OD 2004-10-22 #i35911#
+
+ @author OD
+ */
+ bool HasClearedEnvironment() const;
+
+ /** method to update anchored object in the <SwSortedObjs> lists
+
+ OD 2004-07-01 #i28701#
+ Method is not proposed to be called during a layout process is
+ running. It has been used on the change of the anchored object
+ attributes, which belongs the sort criteria of <SwSortedObjs>.
+ If document compatibility option 'Consider wrapping style influence
+ on object positioning' is ON, additionally all anchored objects
+ at the anchor frame and all following anchored objects on the page
+ frame are invalidated.
+
+ @author OD
+ */
+ void UpdateObjInSortedList();
+
+ /** method to determine, if a format on the anchored object is possible
+
+ OD 2004-07-23 #i28701#
+ A format isn't possible, if anchored object is in an invisible layer.
+ Note: method is virtual to refine the conditions for the sub-classes.
+
+ @author OD
+ */
+ virtual bool IsFormatPossible() const;
+
+ // --> OD 2004-08-25 #i3317# - accessors to member <mbTmpConsiderWrapInfluence>
+ void SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrapInfluence );
+ bool IsTmpConsiderWrapInfluence() const;
+ // <--
+
+ /** method to determine, if the anchored object is overlapping with a
+ previous column
+
+ OD 2004-08-25 #i3317#
+ overlapping with a previous column means, that the object overlaps
+ with a column, which is a previous one of the column its anchor
+ frame is in.
+ Only applied for at-paragraph and at-character anchored objects.
+
+ @author OD
+ */
+ bool OverlapsPrevColumn() const;
+
+ /** method to determine position of anchored object relative to
+ anchor frame
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+
+ @author OD
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToAnchorFrm() const;
+
+ /** method to determine position of anchored object relative to
+ page frame
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+ OD 2005-01-27 #i33818# - add parameters <_bFollowTextFlow> and
+ <_obRelToTableCell>
+ If <_bFollowTextFlow> is set and object is anchored inside table,
+ the position relative to the table cell is determined. Output
+ parameter <_obRelToTableCell> reflects this situation
+
+ @author OD
+
+ @param _bFollowTextFlow
+ input parameter - boolean indicating, if the anchored object has to
+ follow the text flow.
+
+ @param _obRelToTableCell
+ output parameter - boolean indicating, the determine position is
+ relative to the table cell
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToPageFrm( const bool _bFollowTextFlow,
+ bool& _obRelToTableCell ) const;
+
+ /** method to determine position of anchored object relative to
+ anchor character
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+
+ @author OD
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToChar() const;
+
+ /** method to determine position of anchored object relative to
+ top of line
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+
+ @author OD
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToLine() const;
+};
+
+// ============================================================================
+// OD 2004-04-13 #i26791#, #i28701#
+// helper class for notify that positioning of an anchored object is in progress
+// ============================================================================
+class SwObjPositioningInProgress
+{
+ private:
+ SwAnchoredObject* mpAnchoredObj;
+ // --> OD 2005-08-09 #i52904# - introduce boolean indicating old state
+ // of anchored object regarding positioning in progress in order to
+ // consider nested usage of class <SwObjPositioningInProgress>
+ bool mbOldObjPositioningInProgress;
+ // <--
+
+ public:
+ SwObjPositioningInProgress( SdrObject& _rSdrObj );
+ SwObjPositioningInProgress( SwAnchoredObject& _rAnchoredObj );
+ ~SwObjPositioningInProgress();
+};
+
+#endif
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
new file mode 100644
index 000000000000..1b209ac0b47c
--- /dev/null
+++ b/sw/inc/authfld.hxx
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: authfld.hxx,v $
+ * $Revision: 1.15 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _AUTHFLD_HXX
+#define _AUTHFLD_HXX
+
+#include "swdllapi.h"
+#include <fldbas.hxx>
+#include <toxe.hxx>
+
+#define _SVSTDARR_LONGS
+#include <svtools/svstdarr.hxx>
+
+class SwAuthDataArr;
+/* -----------------21.09.99 13:32-------------------
+
+ --------------------------------------------------*/
+class SwAuthEntry
+{
+ String aAuthFields[AUTH_FIELD_END];
+ USHORT nRefCount;
+public:
+ SwAuthEntry() : nRefCount(0){}
+ SwAuthEntry( const SwAuthEntry& rCopy );
+ BOOL operator==(const SwAuthEntry& rComp);
+
+ inline const String& GetAuthorField(ToxAuthorityField ePos)const;
+ inline void SetAuthorField(ToxAuthorityField ePos,
+ const String& rField);
+
+ void AddRef() { ++nRefCount; }
+ void RemoveRef() { --nRefCount; }
+ USHORT GetRefCount() { return nRefCount; }
+};
+/* -----------------20.10.99 16:49-------------------
+
+ --------------------------------------------------*/
+struct SwTOXSortKey
+{
+ ToxAuthorityField eField;
+ BOOL bSortAscending;
+ SwTOXSortKey() :
+ eField(AUTH_FIELD_END),
+ bSortAscending(TRUE){}
+};
+
+/* -----------------14.09.99 16:15-------------------
+
+ --------------------------------------------------*/
+class SwAuthorityField;
+class SortKeyArr;
+
+class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
+{
+ SwDoc* m_pDoc;
+ SwAuthDataArr* m_pDataArr;
+ SvLongs* m_pSequArr;
+ SortKeyArr* m_pSortKeyArr;
+ sal_Unicode m_cPrefix;
+ sal_Unicode m_cSuffix;
+ BOOL m_bIsSequence :1;
+ BOOL m_bSortByDocument :1;
+ LanguageType m_eLanguage;
+ String m_sSortAlgorithm;
+
+ // @@@ private copy assignment, but public copy ctor? @@@
+ const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& );
+
+public:
+ SwAuthorityFieldType(SwDoc* pDoc);
+ SwAuthorityFieldType( const SwAuthorityFieldType& );
+ ~SwAuthorityFieldType();
+
+ virtual SwFieldType* Copy() const;
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+
+ inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
+ SwDoc* GetDoc(){ return m_pDoc; }
+ void RemoveField(long nHandle);
+ long AddField(const String& rFieldContents);
+ BOOL AddField(long nHandle);
+ void DelSequenceArray()
+ {
+ m_pSequArr->Remove(0, m_pSequArr->Count());
+ }
+
+ const SwAuthEntry* GetEntryByHandle(long nHandle) const;
+
+ void GetAllEntryIdentifiers( SvStringsDtor& rToFill )const;
+ const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const;
+
+ bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
+ // import interface
+ USHORT AppendField(const SwAuthEntry& rInsert);
+ long GetHandle(USHORT nPos);
+
+ USHORT GetSequencePos(long nHandle);
+
+ BOOL IsSequence() const {return m_bIsSequence;}
+ void SetSequence(BOOL bSet)
+ {
+ DelSequenceArray();
+ m_bIsSequence = bSet;
+ }
+
+ void SetPreSuffix( sal_Unicode cPre, sal_Unicode cSuf)
+ {
+ m_cPrefix = cPre;
+ m_cSuffix = cSuf;
+ }
+ sal_Unicode GetPrefix() const { return m_cPrefix;}
+ sal_Unicode GetSuffix() const { return m_cSuffix;}
+
+ BOOL IsSortByDocument() const {return m_bSortByDocument;}
+ void SetSortByDocument(BOOL bSet)
+ {
+ DelSequenceArray();
+ m_bSortByDocument = bSet;
+ }
+
+ USHORT GetSortKeyCount() const ;
+ const SwTOXSortKey* GetSortKey(USHORT nIdx) const ;
+ void SetSortKeys(USHORT nKeyCount, SwTOXSortKey nKeys[]);
+
+ //initui.cxx
+ static const String& GetAuthFieldName(ToxAuthorityField eType);
+ static const String& GetAuthTypeName(ToxAuthorityType eType);
+
+ LanguageType GetLanguage() const {return m_eLanguage;}
+ void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;}
+
+ const String& GetSortAlgorithm()const {return m_sSortAlgorithm;}
+ void SetSortAlgorithm(const String& rSet) {m_sSortAlgorithm = rSet;}
+
+};
+/* -----------------14.09.99 16:15-------------------
+
+ --------------------------------------------------*/
+class SwAuthorityField : public SwField
+{
+ long m_nHandle;
+ mutable long m_nTempSequencePos;
+public:
+ SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
+ SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
+ ~SwAuthorityField();
+
+ const String& GetFieldText(ToxAuthorityField eField) const;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual void SetPar1(const String& rStr);
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+
+ long GetHandle() const { return m_nHandle; }
+
+ virtual String GetDescription() const;
+};
+
+// --- inlines -----------------------------------------------------------
+inline const String& SwAuthEntry::GetAuthorField(ToxAuthorityField ePos)const
+{
+ DBG_ASSERT(AUTH_FIELD_END > ePos, "wrong index");
+ return aAuthFields[ePos];
+}
+inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const String& rField)
+{
+ DBG_ASSERT(AUTH_FIELD_END > ePos, "wrong index");
+ if(AUTH_FIELD_END > ePos)
+ aAuthFields[ePos] = rField;
+}
+
+#endif
+
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
new file mode 100644
index 000000000000..84fb0d6fbb5b
--- /dev/null
+++ b/sw/inc/authratr.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: authratr.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _AUTHRATR_HXX
+#define _AUTHRATR_HXX
+
+#include <tools/solar.h>
+#include <tools/color.hxx>
+#include "swdllapi.h"
+
+#define COL_NONE TRGB_COLORDATA( 0x80, 0xFF, 0xFF, 0xFF )
+
+class SW_DLLPUBLIC AuthorCharAttr
+{
+public:
+ USHORT nItemId;
+ USHORT nAttr;
+ ColorData nColor;
+
+ AuthorCharAttr();
+
+ inline BOOL operator == ( const AuthorCharAttr& rAttr ) const
+ {
+ return nItemId == rAttr.nItemId && nAttr == rAttr.nAttr &&
+ nColor == rAttr.nColor;
+ }
+};
+
+
+#endif
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
new file mode 100644
index 000000000000..8a2d320382a7
--- /dev/null
+++ b/sw/inc/bparr.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bparr.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _BPARR_HXX
+#define _BPARR_HXX
+
+#include <tools/solar.h>
+#include <tools/debug.hxx>
+#include <swdllapi.h>
+
+struct BlockInfo;
+class BigPtrArray;
+
+class BigPtrEntry
+{
+ friend class BigPtrArray;
+ BlockInfo* pBlock;
+ USHORT nOffset;
+public:
+ virtual ~BigPtrEntry() {}
+protected:
+ BigPtrEntry() : pBlock(0), nOffset(0) {}
+
+ inline ULONG GetPos() const;
+ inline BigPtrArray& GetArray() const;
+};
+typedef BigPtrEntry* ElementPtr;
+
+
+typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
+
+// 1000 Eintrge pro Block = etwas weniger als 4K
+#define MAXENTRY 1000
+
+
+// Anzahl Eintraege, die bei der Kompression frei bleiben duerfen
+// dieser Wert ist fuer den Worst Case, da wir MAXBLOCK mit ca 25%
+// Overhead definiert haben, reichen 80% = 800 Eintraege vollkommen aus
+// Will mann voellige Kompression haben, muss eben 100 angegeben werden.
+
+#define COMPRESSLVL 80
+
+struct BlockInfo { // Block-Info:
+ BigPtrArray* pBigArr; // in diesem Array steht der Block
+ ElementPtr* pData; // Datenblock
+ ULONG nStart, nEnd; // Start- und EndIndex
+ USHORT nElem; // Anzahl Elemente
+};
+
+class SW_DLLPUBLIC BigPtrArray
+{
+ BlockInfo** ppInf; // Block-Infos
+ ULONG nSize; // Anzahl Elemente
+ USHORT nMaxBlock; // akt. max Anzahl Bloecke
+ USHORT nBlock; // Anzahl Bloecke
+ USHORT nCur; // letzter Block
+
+ USHORT Index2Block( ULONG ) const; // Blocksuche
+ BlockInfo* InsBlock( USHORT ); // Block einfuegen
+ void BlockDel( USHORT ); // es wurden Bloecke geloescht
+ void UpdIndex( USHORT ); // Indexe neu berechnen
+
+protected:
+ // fuelle alle Bloecke auf.
+ // Der short gibt in Prozent an, wie voll die Bloecke werden sollen.
+ // Der ReturnWert besagt, das irgendetwas "getan" wurde
+ USHORT Compress( short = COMPRESSLVL );
+
+public:
+ BigPtrArray();
+ ~BigPtrArray();
+
+ ULONG Count() const { return nSize; }
+
+ void Insert( const ElementPtr& r, ULONG pos );
+ void Remove( ULONG pos, ULONG n = 1 );
+ void Move( ULONG from, ULONG to );
+ void Replace( ULONG pos, const ElementPtr& r);
+
+ ElementPtr operator[]( ULONG ) const;
+ void ForEach( FnForEach fn, void* pArgs = NULL )
+ {
+ ForEach( 0, nSize, fn, pArgs );
+ }
+ void ForEach( ULONG nStart, ULONG nEnd, FnForEach fn, void* pArgs = NULL );
+};
+
+
+
+inline ULONG BigPtrEntry::GetPos() const
+{
+ DBG_ASSERT( this == pBlock->pData[ nOffset ], "Element nicht im Block" );
+ return pBlock->nStart + nOffset;
+}
+
+inline BigPtrArray& BigPtrEntry::GetArray() const
+{
+ return *pBlock->pBigArr;
+}
+
+
+#endif
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
new file mode 100644
index 000000000000..3b89f3540d7c
--- /dev/null
+++ b/sw/inc/breakit.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: breakit.hxx,v $
+ * $Revision: 1.12.112.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _BREAKIT_HXX
+#define _BREAKIT_HXX
+
+#include <tools/solar.h>
+#include <i18npool/lang.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/XScriptTypeDetector.hpp>
+#include <com/sun/star/i18n/ForbiddenCharacters.hdl>
+#include <swdllapi.h>
+
+class String;
+
+/*************************************************************************
+ * class SwBreakIt
+ *************************************************************************/
+
+
+class SW_DLLPUBLIC SwBreakIt
+{
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak;
+ com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > xCTLDetect;
+
+
+ com::sun::star::lang::Locale * m_pLocale;
+ com::sun::star::i18n::ForbiddenCharacters * m_pForbidden;
+
+ LanguageType aLast; // language of the current locale
+ LanguageType aForbiddenLang; // language of the current forbiddenChar struct
+
+ void _GetLocale( const LanguageType aLang );
+ void _GetForbidden( const LanguageType aLang );
+
+ void createBreakIterator() const;
+ void createScriptTypeDetector();
+
+ // forbidden and not implemented.
+ SwBreakIt();
+ SwBreakIt( const SwBreakIt &);
+ SwBreakIt & operator= ( const SwBreakIt &);
+
+ // private (see @ _Create, _Delete).
+ explicit SwBreakIt(
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF);
+ ~SwBreakIt();
+
+public:
+ // private (see @ source/core/bastyp/init.cxx).
+ static void _Create(
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF);
+ static void _Delete();
+
+public:
+ static SwBreakIt * Get();
+
+ com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > GetBreakIter()
+ {
+ createBreakIterator();
+ return xBreak;
+ }
+
+ com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > GetScriptTypeDetector()
+ {
+ createScriptTypeDetector();
+ return xCTLDetect;
+ }
+
+ const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang )
+ {
+ if( !m_pLocale || aLast != aLang )
+ _GetLocale( aLang );
+ return *m_pLocale;
+ }
+
+ const com::sun::star::i18n::ForbiddenCharacters& GetForbidden( const LanguageType aLang )
+ {
+ if( !m_pForbidden || aForbiddenLang != aLang )
+ _GetForbidden( aLang );
+ return *m_pForbidden;
+ }
+
+ USHORT GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
+ USHORT GetAllScriptsOfText( const String& rTxt ) const;
+};
+
+#define SW_BREAKITER() SwBreakIt::Get()
+#define SW_XBREAKITER() SW_BREAKITER()->GetBreakIter()
+
+// @@@ backward compatibility @@@
+SW_DLLPUBLIC extern SwBreakIt* pBreakIt;
+
+#endif
+
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
new file mode 100644
index 000000000000..7a8ff7f8f471
--- /dev/null
+++ b/sw/inc/calbck.hxx
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: calbck.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/*************************************************************
+#* Service-Klassen
+ *************************************************************/
+
+/*
+#* Aendert sich ein Attribut in einem Format, so muss diese
+#* Aenderung an alle abhaengigen Formate und ueber sie an
+#* alle betroffenen Nodes propagiert werden. Dabei muss
+#* festgestellt werden, ob die Aenderung einen Effekt haben
+#* kann, oder ob das geaenderte Attribut von dem abhaengigen
+#* Format ueberdefiniert wird (so dass ohnehin der
+#* Attributwert des abhaengigen Formates den geaenderten
+#* Wert verdeckt). Weiterhin kann der betroffene Node
+#* feststellen, ob er von dem geaenderten Attribut Gebrauch
+#* macht (Beispiel: Linienabstand fuer Unterstreichung wurde
+#* geaendert, das Attribut Unterstreichung wurde aber nicht
+#* verwendet). So wird bei Aenderungen der minimale Aufwand
+#* zum Reformatieren erkannt.
+ */
+#ifndef _CALBCK_HXX
+#define _CALBCK_HXX
+
+#include <tools/rtti.hxx>
+#include "swdllapi.h"
+
+class SwModify;
+class SwClientIter;
+class SfxPoolItem;
+class SvStream;
+
+// ----------
+// SwClient
+// ----------
+
+class SW_DLLPUBLIC SwClient
+{
+ friend class SwModify;
+ friend class SwClientIter;
+
+ SwClient *pLeft, *pRight; // fuer die AVL-Sortierung
+ BOOL bModifyLocked : 1; // wird in SwModify::Modify benutzt,
+ // eigentlich ein Member des SwModify
+ // aber aus Platzgruenden hier.
+ BOOL bInModify : 1; // ist in einem Modify. (Debug!!!)
+ BOOL bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
+ BOOL bInCache : 1; // Ist im BorderAttrCache des Layout,
+ // Traegt sich dann im Modify aus!
+ BOOL bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
+
+protected:
+ SwModify *pRegisteredIn;
+
+ // single argument ctors shall be explicit.
+ explicit SwClient(SwModify *pToRegisterIn);
+
+public:
+ inline SwClient();
+ virtual ~SwClient();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
+
+ //rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
+ //kann ueber die Abhaengigkeitsliste eines Modify typsicher gecastet
+ //werden.
+ TYPEINFO();
+
+ void LockModify() { bModifyLocked = TRUE; }
+ void UnlockModify() { bModifyLocked = FALSE; }
+ void SetInCache( BOOL bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
+ BOOL IsModifyLocked() const { return bModifyLocked; }
+ BOOL IsInDocDTOR() const { return bInDocDTOR; }
+ BOOL IsInCache() const { return bInCache; }
+ BOOL IsInSwFntCache() const { return bInSwFntCache; }
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+private:
+ SwClient( const SwClient& );
+ SwClient &operator=( const SwClient& );
+};
+
+inline SwClient::SwClient() :
+ pLeft(0), pRight(0), pRegisteredIn(0)
+{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = FALSE; }
+
+
+// ----------
+// SwModify
+// ----------
+
+// Klasse hat eine doppelt Verkette Liste fuer die Abhaengigen.
+
+class SW_DLLPUBLIC SwModify: public SwClient
+{
+ friend SvStream& operator<<( SvStream& aS, SwModify & );
+
+ friend class SwClientIter;
+ SwClient* pRoot;
+
+ SwClient *_Remove(SwClient *pDepend);
+
+public:
+ SwModify() : pRoot(0) {}
+
+ // single argument ctors shall be explicit.
+ explicit SwModify(SwModify *pToRegisterIn );
+ virtual ~SwModify();
+
+ virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
+ void Add(SwClient *pDepend);
+ SwClient *Remove(SwClient *pDepend)
+ { return bInDocDTOR ? 0 : _Remove( pDepend ); }
+
+ const SwClient* GetDepends() const { return pRoot; }
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ void SetInDocDTOR() { bInDocDTOR = TRUE; }
+
+ void CheckCaching( const USHORT nWhich );
+
+ BOOL IsLastDepend() const
+ { return pRoot && !pRoot->pLeft && !pRoot->pRight; }
+
+private:
+ // forbidden and not implemented (see @ SwClient).
+ SwModify & operator= (const SwModify &);
+
+protected:
+ // forbidden and not implemented (see @ SwClient),
+ // but GCC >= 3.4 needs an accessible "T (const T&)"
+ // to pass a "T" as a "const T&" argument
+ SwModify (const SwModify &);
+};
+
+// ----------
+// SwDepend
+// ----------
+
+/*
+ * Sehr sinnvolle Klasse, wenn ein Objekt von mehreren Objekten
+ * abhaengig ist. Diese sollte fuer jede Abhaengigkeit ein Objekt
+ * der Klasse SwDepend als Member haben.
+ */
+class SW_DLLPUBLIC SwDepend: public SwClient
+{
+ SwClient *pToTell;
+
+public:
+ SwDepend() : pToTell(0) {}
+ SwDepend(SwClient *pTellHim, SwModify *pDepend);
+
+ SwClient* GetToTell() { return pToTell; }
+ virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem & ) const;
+
+private:
+ // forbidden and not implemented (see @ SwClient).
+ SwDepend (const SwDepend &);
+ SwDepend & operator= (const SwDepend &);
+};
+
+
+class SwClientIter
+{
+ friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur
+ friend void SwModify::Add(SwClient *); // nur fuer ASSERT !
+
+ SwModify& rRoot;
+ SwClient *pAkt, *pDelNext;
+ // fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von
+ // Clients, wenn der Iterator gerade draufsteht.
+ SwClientIter *pNxtIter;
+
+ SwClient* mpWatchClient; // if set, SwModify::_Remove checks if this client is removed
+
+ TypeId aSrchId; // fuer First/Next - suche diesen Type
+
+public:
+ SW_DLLPUBLIC SwClientIter( SwModify& );
+ SW_DLLPUBLIC ~SwClientIter();
+
+ const SwModify& GetModify() const { return rRoot; }
+ SwModify& GetModify() { return rRoot; }
+
+#ifndef CFRONT
+ SwClient* operator++(int); // zum Naechsten
+ SwClient* operator--(int); // zum Vorherigen
+#endif
+ SwClient* operator++(); // zum Naechsten
+ SwClient* operator--(); // zum Vorherigen
+
+ SwClient* GoStart(); // zum Anfang
+ SwClient* GoEnd(); // zum Ende
+
+ inline SwClient* GoRoot(); // wieder ab Root (==Start) anfangen
+
+ SwClient* operator()() const
+ { return pDelNext == pAkt ? pAkt : pDelNext; }
+
+ int IsChanged() const { return pDelNext != pAkt; }
+
+ SW_DLLPUBLIC SwClient* First( TypeId nType );
+ SW_DLLPUBLIC SwClient* Next();
+
+ const SwClient* GetWatchClient() const { return mpWatchClient; }
+ void SetWatchClient( SwClient* pWatch ) { mpWatchClient = pWatch; }
+};
+
+inline SwClient* SwClientIter::GoRoot() // wieder ab Root anfangen
+{
+ pAkt = rRoot.pRoot;
+ return (pDelNext = pAkt);
+}
+
+
+
+#endif
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
new file mode 100644
index 000000000000..91f1e538d355
--- /dev/null
+++ b/sw/inc/calc.hxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: calc.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CALC_HXX
+#define _CALC_HXX
+
+#include <svtools/svarray.hxx>
+
+#ifndef __SBX_SBXVALUE //autogen
+#include <basic/sbxvar.hxx>
+#endif
+#include "swdllapi.h"
+
+class CharClass;
+class LocaleDataWrapper;
+class SwFieldType;
+class SwDoc;
+
+#define TBLSZ 47 // sollte Primzahl sein, wegen HashTable
+
+const sal_Unicode cListDelim = '|';
+
+/******************************************************************************
+ * Calculate Operations
+ ******************************************************************************/
+enum SwCalcOper
+{
+ CALC_NAME, CALC_NUMBER, CALC_ENDCALC,
+ CALC_PLUS='+', CALC_MINUS='-', CALC_MUL='*',
+ CALC_DIV='/', CALC_PRINT=';', CALC_ASSIGN='=',
+ CALC_LP='(', CALC_RP=')', CALC_PHD='%',
+ CALC_POW='^',
+ CALC_LISTOP = cListDelim,
+ CALC_NOT=256, CALC_AND=257, CALC_OR=258,
+ CALC_XOR=259, CALC_EQ=260, CALC_NEQ=261,
+ CALC_LEQ=262, CALC_GEQ=263, CALC_LES=264,
+ CALC_GRE=265, CALC_SUM=266, CALC_MEAN=267,
+ CALC_SQRT=268, CALC_MIN=269, CALC_MIN_IN=270,
+ CALC_MAX=271, CALC_MAX_IN=272, CALC_SIN=273,
+ CALC_COS=274, CALC_TAN=275, CALC_ASIN=276,
+ CALC_ACOS=278, CALC_ATAN=279, CALC_TDIF=280,
+ CALC_ROUND=281, CALC_DATE=282, CALC_MONTH=283,
+ CALC_DAY=284
+};
+
+//-- Calculate Operations Strings -----------------------------------------
+
+extern const sal_Char __FAR_DATA sCalc_Add[];
+extern const sal_Char __FAR_DATA sCalc_Sub[];
+extern const sal_Char __FAR_DATA sCalc_Mul[];
+extern const sal_Char __FAR_DATA sCalc_Div[];
+extern const sal_Char __FAR_DATA sCalc_Phd[];
+extern const sal_Char __FAR_DATA sCalc_Sqrt[];
+extern const sal_Char __FAR_DATA sCalc_Pow[];
+extern const sal_Char __FAR_DATA sCalc_Or[];
+extern const sal_Char __FAR_DATA sCalc_Xor[];
+extern const sal_Char __FAR_DATA sCalc_And[];
+extern const sal_Char __FAR_DATA sCalc_Not[];
+extern const sal_Char __FAR_DATA sCalc_Eq[];
+extern const sal_Char __FAR_DATA sCalc_Neq[];
+extern const sal_Char __FAR_DATA sCalc_Leq[];
+extern const sal_Char __FAR_DATA sCalc_Geq[];
+extern const sal_Char __FAR_DATA sCalc_L[];
+extern const sal_Char __FAR_DATA sCalc_G[];
+extern const sal_Char __FAR_DATA sCalc_Sum[];
+extern const sal_Char __FAR_DATA sCalc_Mean[];
+extern const sal_Char __FAR_DATA sCalc_Min[];
+extern const sal_Char __FAR_DATA sCalc_Max[];
+extern const sal_Char __FAR_DATA sCalc_Sin[];
+extern const sal_Char __FAR_DATA sCalc_Cos[];
+extern const sal_Char __FAR_DATA sCalc_Tan[];
+extern const sal_Char __FAR_DATA sCalc_Asin[];
+extern const sal_Char __FAR_DATA sCalc_Acos[];
+extern const sal_Char __FAR_DATA sCalc_Atan[];
+extern const sal_Char __FAR_DATA sCalc_Tdif[];
+extern const sal_Char __FAR_DATA sCalc_Round[];
+extern const sal_Char __FAR_DATA sCalc_Date[];
+
+/******************************************************************************
+ * Calculate ErrorCodes
+ ******************************************************************************/
+enum SwCalcError
+{
+ CALC_NOERR=0,
+ CALC_SYNTAX, // Syntax Fehler
+ CALC_ZERODIV, // Division durch Null
+ CALC_BRACK, // Fehlerhafte Klammerung
+ CALC_POWERR, // Ueberlauf in Quadratfunktion
+ CALC_VARNFND, // Variable wurde nicht gefunden
+ CALC_OVERFLOW, // Ueberlauf
+ CALC_WRONGTIME // falsches Zeitformat
+};
+
+class SwSbxValue : public SbxValue
+{
+ bool bVoid;
+public:
+ //JP 03.02.99: immer auf eine Zahl defaulten, damit auch gerechnet wird.
+ // Ansonsten wird daraus ein SbxEMPTY und damit ist nichts
+ // anzufangen.
+ SwSbxValue( long n = 0 ) : bVoid(false) { PutLong( n ); }
+ SwSbxValue( const double& rD ) : bVoid(false) { PutDouble( rD ); }
+ SwSbxValue( const SwSbxValue& rVal ) :
+ SvRefBase( rVal ),
+ SbxValue( rVal ),
+ bVoid(rVal.bVoid)
+ {}
+ virtual ~SwSbxValue();
+
+
+ // Strings sonderbehandeln
+ BOOL GetBool() const;
+ // Strings sonderbehandeln BOOLs sonderbehandeln
+ double GetDouble() const;
+ SwSbxValue& MakeDouble();
+
+ bool IsVoidValue() {return bVoid;}
+ void SetVoidValue(bool bSet) {bVoid = bSet;}
+};
+
+/******************************************************************************
+ * Calculate HashTables fuer VarTable und Operations
+ ******************************************************************************/
+struct SwHash
+{
+ SwHash( const String& rStr );
+ virtual ~SwHash();
+ String aStr;
+ SwHash *pNext;
+};
+
+struct SwCalcExp : public SwHash
+{
+ SwSbxValue nValue;
+ const SwFieldType* pFldType;
+
+ SwCalcExp( const String& rStr, const SwSbxValue& rVal,
+ const SwFieldType* pFldType = 0 );
+};
+
+SwHash* Find( const String& rSrch, SwHash** ppTable,
+ USHORT nTblSize, USHORT* pPos = 0 );
+
+void DeleteHashTable( SwHash** ppTable, USHORT nTblSize );
+
+// falls _CalcOp != 0, dann ist das ein gueltiger Operator
+struct _CalcOp;
+_CalcOp* FindOperator( const String& rSearch );
+
+/******************************************************************************
+ * class SwCalc
+ ******************************************************************************/
+class SwCalc
+{
+ SwHash* VarTable[ TBLSZ ];
+ String aVarName, sCurrSym;
+ String sCommand;
+ SvPtrarr aRekurStk;
+ SwSbxValue nLastLeft;
+ SwSbxValue nNumberValue;
+ SwCalcExp aErrExpr;
+ xub_StrLen nCommandPos;
+
+ SwDoc& rDoc;
+ const LocaleDataWrapper* pLclData;
+ CharClass* pCharClass;
+
+ USHORT nListPor;
+ SwCalcOper eCurrOper;
+ SwCalcOper eCurrListOper;
+ SwCalcError eError;
+
+
+ SwCalcOper GetToken();
+ SwSbxValue Expr();
+ SwSbxValue Term();
+ SwSbxValue Prim();
+
+ BOOL ParseTime( USHORT*, USHORT*, USHORT* );
+
+ String GetColumnName( const String& rName );
+ String GetDBName( const String& rName );
+
+ // dont call this methods
+ SwCalc( const SwCalc& );
+ SwCalc& operator=( const SwCalc& );
+
+public:
+ SwCalc( SwDoc& rD );
+ ~SwCalc();
+
+ SwSbxValue Calculate( const String &rStr );
+ String GetStrResult( const SwSbxValue& rValue, BOOL bRound = TRUE );
+ String GetStrResult( double, BOOL bRound = TRUE );
+
+ SwCalcExp* VarInsert( const String& r );
+ SwCalcExp* VarLook( const String &rStr, USHORT ins = 0 );
+ void VarChange( const String& rStr, const SwSbxValue& rValue );
+ void VarChange( const String& rStr, double );
+ SwHash** GetVarTable() { return VarTable; }
+
+ BOOL Push( const VoidPtr pPtr );
+ void Pop( const VoidPtr pPtr );
+
+ void SetCalcError( SwCalcError eErr ) { eError = eErr; }
+ BOOL IsCalcError() const { return 0 != eError; }
+
+ static BOOL Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal,
+ const LocaleDataWrapper* pData = 0 );
+ static BOOL Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal, SwDoc* pDoc );
+
+ SW_DLLPUBLIC static BOOL IsValidVarName( const String& rStr,
+ String* pValidName = 0 );
+};
+
+#endif
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
new file mode 100644
index 000000000000..cd25c3c6f892
--- /dev/null
+++ b/sw/inc/ccoll.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ccoll.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CCOLL_HXX
+#define _CCOLL_HXX
+
+#include <svtools/poolitem.hxx>
+#include <tools/string.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#include <svtools/svtabbx.hxx>
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <tools/resary.hxx>
+#include "swdllapi.h"
+#include "cmdid.h"
+
+#include <rtl/string.hxx>
+
+//***********************************************************
+
+struct CollName {
+// const char* pStr;
+ ULONG nCnd;
+ ULONG nSubCond;
+ };
+
+//***********************************************************
+
+#define COND_COMMAND_COUNT 28
+
+struct CommandStruct
+{
+ ULONG nCnd;
+ ULONG nSubCond;
+};
+
+//***********************************************************
+
+sal_Int16 GetCommandContextIndex( const rtl::OUString &rContextName );
+rtl::OUString GetCommandContextByIndex( sal_Int16 nIndex );
+
+//***********************************************************
+
+class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
+{
+ static CommandStruct aCmds[COND_COMMAND_COUNT];
+
+ String sStyles[COND_COMMAND_COUNT];
+
+public:
+ SwCondCollItem(USHORT nWhich = FN_COND_COLL);
+ ~SwCondCollItem();
+
+ TYPEINFO();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ static const CommandStruct* GetCmds();
+
+ const String& GetStyle(USHORT nPos) const;
+ void SetStyle( const String* pStyle, USHORT nPos);
+
+};
+
+#endif
+
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
new file mode 100644
index 000000000000..1ea47d89f8c9
--- /dev/null
+++ b/sw/inc/cellatr.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cellatr.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CELLATR_HXX
+#define _CELLATR_HXX
+
+#include <svtools/intitem.hxx>
+#include <svtools/zforlist.hxx>
+#include "swdllapi.h"
+#include "format.hxx"
+#include "cellfml.hxx"
+
+class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
+{
+ BOOL bAuto; // automatisch vergebenes Flag
+public:
+ SwTblBoxNumFormat( UINT32 nFormat = NUMBERFORMAT_TEXT,
+ BOOL bAuto = FALSE );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ inline SwTblBoxNumFormat& operator=( const SwTblBoxNumFormat& rAttr )
+ {
+ SetValue( rAttr.GetValue() );
+ SetAutoFlag( rAttr.GetAutoFlag() );
+ return *this;
+ }
+
+ BOOL GetAutoFlag() const { return bAuto; }
+ void SetAutoFlag( BOOL bFlag = TRUE ) { bAuto = bFlag; }
+};
+
+class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula
+{
+ SwModify* pDefinedIn; // Modify-Object, in dem die Formel steht
+ // kann nur TablenBoxFormat sein
+
+public:
+ SwTblBoxFormula( const String& rFormula );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ // erfrage und setze den Modify-Pointer
+ inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
+ inline void ChgDefinedIn( const SwModify* pNew )
+ { pDefinedIn = (SwModify*)pNew; }
+ // suche den Node, in dem die Formel steht:
+ // BoxAttribut -> BoxStartNode
+ virtual const SwNode* GetNodeOfFormula() const;
+
+ SwTableBox* GetTableBox();
+ const SwTableBox* GetTableBox() const
+ { return ((SwTblBoxFormula*)this)->GetTableBox(); }
+
+ // Status aendern
+ void ChangeState( const SfxPoolItem* pItem );
+ // berechne die Formel
+ void Calc( SwTblCalcPara& rCalcPara, double& rValue );
+};
+
+class SW_DLLPUBLIC SwTblBoxValue : public SfxPoolItem
+{
+ double nValue;
+public:
+ SwTblBoxValue();
+ SwTblBoxValue( const double aVal );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ inline SwTblBoxValue& operator=( const SwTblBoxValue& rCmp )
+ {
+ nValue = rCmp.nValue;
+ return *this;
+ }
+
+ double GetValue() const { return nValue; }
+};
+
+
+
+//***************************************************************************
+
+inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(BOOL bInP) const
+ { return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); }
+inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(BOOL bInP) const
+ { return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); }
+inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(BOOL bInP) const
+ { return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); }
+
+//***************************************************************************
+
+inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(BOOL bInP) const
+ { return aSet.GetTblBoxNumFmt(bInP); }
+inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(BOOL bInP) const
+ { return aSet.GetTblBoxFormula(bInP); }
+inline const SwTblBoxValue &SwFmt::GetTblBoxValue(BOOL bInP) const
+ { return aSet.GetTblBoxValue(bInP); }
+
+#endif
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
new file mode 100644
index 000000000000..e6977d293693
--- /dev/null
+++ b/sw/inc/cellfml.hxx
@@ -0,0 +1,167 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cellfml.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CELLFML_HXX
+#define _CELLFML_HXX
+
+#include <tools/string.hxx>
+
+class SwTable;
+class SwNode;
+class SwTableSortBoxes;
+class SwSelBoxes;
+class SwCalc;
+class SwTableBox;
+class SwTableFmlUpdate;
+class SwDoc;
+class String;
+
+class SwTblCalcPara
+{
+ const SwTableBox* pLastTblBox;
+ USHORT nStackCnt, nMaxSize;
+
+public:
+ SwTableSortBoxes *pBoxStk; // Stack fuers erkennen von Rekursionen !
+ SwCalc& rCalc; // akt. Calculator
+ const SwTable* pTbl; // akt. Tabelle
+
+ SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable );
+ ~SwTblCalcPara();
+
+ BOOL CalcWithStackOverflow();
+ BOOL IsStackOverFlow() const { return nMaxSize == nStackCnt; }
+ BOOL IncStackCnt() { return nMaxSize == ++nStackCnt; }
+ void DecStackCnt() { if( nStackCnt ) --nStackCnt; }
+ void SetLastTblBox( const SwTableBox* pBox ) { pLastTblBox = pBox; }
+};
+
+
+
+class SwTableFormula
+{
+typedef void (SwTableFormula:: *FnScanFormel)( const SwTable&, String&,
+ String&, String*, void* ) const;
+
+ void BoxNmsToPtr( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void PtrToBoxNms( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void RelNmsToBoxNms( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void RelBoxNmsToPtr( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void BoxNmsToRelNm( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _MakeFormel( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _GetFmlBoxes( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _HasValidBoxes( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _SplitMergeBoxNm( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+
+ void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd,
+ SwSelBoxes& rBoxes ) const;
+ String ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
+ void* = 0 ) const;
+
+ const SwTable* FindTable( SwDoc& rDoc, const String& rNm ) const;
+
+protected:
+ enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME };
+
+ String sFormel; // akt. Formel
+ NameType eNmType; // akt. Darstellungs Art
+ BOOL bValidValue; // TRUE: Formel neu berechnen
+
+ // suche den Node, in dem die Formel steht:
+ // TextFeld -> TextNode,
+ // BoxAttribut -> BoxStartNode
+ // !!! MUSS VON JEDER ABLEITUNG UEBERLADEN WERDEN !!!
+ virtual const SwNode* GetNodeOfFormula() const = 0;
+
+ SwTableFormula( const String& rFormel );
+
+ String MakeFormel( SwTblCalcPara& rCalcPara ) const
+ {
+ return ScanString( &SwTableFormula::_MakeFormel,
+ *rCalcPara.pTbl, &rCalcPara );
+ }
+
+ static USHORT GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
+
+public:
+
+ SwTableFormula( const SwTableFormula& rCpy ) { *this = rCpy; }
+ virtual ~SwTableFormula();
+ SwTableFormula& operator=( const SwTableFormula& rCpy )
+ {
+ sFormel = rCpy.sFormel;
+ eNmType = rCpy.eNmType;
+ bValidValue = rCpy.bValidValue;
+ return *this;
+ }
+
+ // erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel
+ void PtrToBoxNm( const SwTable* pTbl );
+ // erzeuge aus der externen (fuer UI) die interne (fuer CORE) Formel
+ void BoxNmToPtr( const SwTable* pTbl );
+ // erzeuge aus der externen/internen Formel die relative Formel
+ void ToRelBoxNm( const SwTable* pTbl );
+ // wird vorm/nach dem mergen/splitten von Tabellen rerufen
+ void ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd );
+
+ // ist gerade eine intern Darstellung aktiv
+ BOOL IsIntrnlName() const { return eNmType == INTRNL_NAME; }
+ // erfrage die akt. Darstellung der Formel
+ NameType GetNameType() const { return eNmType; }
+
+ // erfrage/setze das Flag, ob der akt. Wert gueltig ist
+ BOOL IsValid() const { return bValidValue; }
+ inline void ChgValid( BOOL bNew ) { bValidValue = bNew; }
+
+ const String& GetFormula() const { return sFormel; }
+ void SetFormula( const String& rNew )
+ {
+ sFormel = rNew;
+ bValidValue = FALSE;
+ eNmType = EXTRNL_NAME;
+ }
+
+ USHORT GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
+ // sind alle Boxen gueltig, auf die sich die Formel bezieht?
+ BOOL HasValidBoxes() const;
+};
+
+
+
+#endif
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
new file mode 100644
index 000000000000..621b88fb9eb1
--- /dev/null
+++ b/sw/inc/charatr.hxx
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charatr.hxx,v $
+ * $Revision: 1.15.210.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CHARATR_HXX
+#define _CHARATR_HXX
+
+#include <format.hxx>
+#include <hintids.hxx> // fuer die WhichIds
+
+
+/******************************************************************************
+ * Implementierung der Charakter-Attribut Methoden vom SwAttrSet
+ * AMA 12.10.94: Umstellung auf SvxItems.
+ ******************************************************************************/
+
+inline const SvxPostureItem &SwAttrSet::GetPosture(BOOL bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
+inline const SvxPostureItem &SwAttrSet::GetCJKPosture(BOOL bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); }
+inline const SvxPostureItem &SwAttrSet::GetCTLPosture(BOOL bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetWeight(BOOL bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetCJKWeight(BOOL bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetCTLWeight(BOOL bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); }
+inline const SvxShadowedItem &SwAttrSet::GetShadowed(BOOL bInP) const
+ { return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); }
+inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(BOOL bInP) const
+ { return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); }
+inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(BOOL bInP) const
+ { return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); }
+inline const SvxContourItem &SwAttrSet::GetContour(BOOL bInP) const
+ { return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); }
+inline const SvxKerningItem &SwAttrSet::GetKerning(BOOL bInP) const
+ { return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); }
+inline const SvxUnderlineItem &SwAttrSet::GetUnderline(BOOL bInP) const
+ { return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); }
+inline const SvxOverlineItem &SwAttrSet::GetOverline(BOOL bInP) const
+ { return (const SvxOverlineItem&)Get( RES_CHRATR_OVERLINE,bInP); }
+inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(BOOL bInP) const
+ { return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetSize(BOOL bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(BOOL bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(BOOL bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); }
+inline const SvxPropSizeItem &SwAttrSet::GetPropSize(BOOL bInP) const
+ { return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); }
+inline const SvxFontItem &SwAttrSet::GetFont(BOOL bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); }
+inline const SvxFontItem &SwAttrSet::GetCJKFont(BOOL bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); }
+inline const SvxFontItem &SwAttrSet::GetCTLFont(BOOL bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); }
+inline const SvxColorItem &SwAttrSet::GetColor(BOOL bInP) const
+ { return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); }
+inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(BOOL bInP) const
+ { return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetLanguage(BOOL bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(BOOL bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(BOOL bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); }
+inline const SvxEscapementItem &SwAttrSet::GetEscapement(BOOL bInP) const
+ { return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); }
+inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(BOOL bInP) const
+ { return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); }
+inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(BOOL bInP) const
+ { return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); }
+inline const SvxBlinkItem &SwAttrSet::GetBlink(BOOL bInP) const
+ { return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); }
+inline const SvxBrushItem &SwAttrSet::GetChrBackground( BOOL bInP ) const
+ { return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); }
+inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( BOOL bInP ) const
+ { return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); }
+inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( BOOL bInP ) const
+ { return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); }
+inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( BOOL bInP ) const
+ { return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); }
+inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( BOOL bInP ) const
+ { return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); }
+inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( BOOL bInP ) const
+ { return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); }
+inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( BOOL bInP ) const
+ { return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); }
+
+/******************************************************************************
+ * Implementierung der Charakter-Attribut Methoden vom SwFmt
+ * AMA: 12.10.94: Umstellung auf SvxItems.
+ ******************************************************************************/
+
+inline const SvxPostureItem &SwFmt::GetPosture(BOOL bInP) const
+ { return aSet.GetPosture(bInP); }
+inline const SvxWeightItem &SwFmt::GetWeight(BOOL bInP) const
+ { return aSet.GetWeight(bInP); }
+inline const SvxShadowedItem &SwFmt::GetShadowed(BOOL bInP) const
+ { return aSet.GetShadowed(bInP); }
+inline const SvxAutoKernItem &SwFmt::GetAutoKern(BOOL bInP) const
+ { return aSet.GetAutoKern(bInP); }
+inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(BOOL bInP) const
+ { return aSet.GetWordLineMode(bInP); }
+inline const SvxContourItem &SwFmt::GetContour(BOOL bInP) const
+ { return aSet.GetContour(bInP); }
+inline const SvxKerningItem &SwFmt::GetKerning(BOOL bInP) const
+ { return aSet.GetKerning(bInP); }
+inline const SvxUnderlineItem &SwFmt::GetUnderline(BOOL bInP) const
+ { return aSet.GetUnderline(bInP); }
+inline const SvxOverlineItem &SwFmt::GetOverline(BOOL bInP) const
+ { return aSet.GetOverline(bInP); }
+inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(BOOL bInP) const
+ { return aSet.GetCrossedOut(bInP); }
+inline const SvxFontHeightItem &SwFmt::GetSize(BOOL bInP) const
+ { return aSet.GetSize(bInP); }
+inline const SvxPropSizeItem &SwFmt::GetPropSize(BOOL bInP) const
+ { return aSet.GetPropSize(bInP); }
+inline const SvxFontItem &SwFmt::GetFont(BOOL bInP) const
+ { return aSet.GetFont(bInP); }
+inline const SvxFontItem &SwFmt::GetCJKFont(BOOL bInP) const
+ { return aSet.GetCJKFont(bInP); }
+inline const SvxFontItem &SwFmt::GetCTLFont(BOOL bInP) const
+ { return aSet.GetCTLFont(bInP); }
+inline const SvxColorItem &SwFmt::GetColor(BOOL bInP) const
+ { return aSet.GetColor(bInP); }
+ inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(BOOL bInP) const
+ { return aSet.GetCharSetColor(bInP); }
+inline const SvxLanguageItem &SwFmt::GetLanguage(BOOL bInP) const
+ { return aSet.GetLanguage(bInP); }
+inline const SvxEscapementItem &SwFmt::GetEscapement(BOOL bInP) const
+ { return aSet.GetEscapement(bInP); }
+inline const SvxCaseMapItem &SwFmt::GetCaseMap(BOOL bInP) const
+ { return aSet.GetCaseMap(bInP); }
+inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(BOOL bInP) const
+ { return aSet.GetNoHyphenHere(bInP); }
+inline const SvxBlinkItem &SwFmt::GetBlink(BOOL bInP) const
+ { return aSet.GetBlink(bInP); }
+inline const SvxBrushItem &SwFmt::GetChrBackground(BOOL bInP) const
+ { return aSet.GetChrBackground(bInP); }
+inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( BOOL bInP ) const
+ { return aSet.GetEmphasisMark(bInP); }
+inline const SvxTwoLinesItem &SwFmt::Get2Lines( BOOL bInP ) const
+ { return aSet.Get2Lines(bInP); }
+inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( BOOL bInP ) const
+ { return aSet.GetCharScaleW(bInP); }
+inline const SvxCharRotateItem &SwFmt::GetCharRotate( BOOL bInP ) const
+ { return aSet.GetCharRotate(bInP); }
+inline const SvxCharReliefItem &SwFmt::GetCharRelief( BOOL bInP ) const
+ { return aSet.GetCharRelief(bInP); }
+inline const SvxCharHiddenItem &SwFmt::GetCharHidden( BOOL bInP ) const
+ { return aSet.GetCharHidden(bInP); }
+
+#endif
diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx
new file mode 100644
index 000000000000..b6890a0179fc
--- /dev/null
+++ b/sw/inc/charfmt.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charfmt.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CHARFMT_HXX
+#define _CHARFMT_HXX
+
+#include <format.hxx>
+
+class SwCharFmt : public SwFmt
+{
+ friend class SwDoc;
+ friend class SwTxtFmtColl;
+
+ SwCharFmt( SwAttrPool& rPool, const sal_Char* pFmtName,
+ SwCharFmt *pDerivedFrom )
+ : SwFmt( rPool, pFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT )
+ {}
+ SwCharFmt( SwAttrPool& rPool, const String &rFmtName,
+ SwCharFmt *pDerivedFrom )
+ : SwFmt( rPool, rFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT )
+ {}
+
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+};
+
+namespace CharFmt
+{
+ extern const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr );
+ extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich );
+ extern BOOL IsItemIncluded( const USHORT nWhich, const SwTxtAttr *pAttr );
+}
+
+#endif
+
+
+
diff --git a/sw/inc/chcmprse.hxx b/sw/inc/chcmprse.hxx
new file mode 100644
index 000000000000..c65e53c81f7b
--- /dev/null
+++ b/sw/inc/chcmprse.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: chcmprse.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CHCMPRSE_HXX
+#define _CHCMPRSE_HXX
+
+enum SwCharCompressType{ CHARCOMPRESS_NONE,
+ CHARCOMPRESS_PUNCTUATION,
+ CHARCOMPRESS_PUNCTUATION_KANA };
+
+
+#endif
+
+
+
+
diff --git a/sw/inc/checkit.hxx b/sw/inc/checkit.hxx
new file mode 100644
index 000000000000..8b1270c7f950
--- /dev/null
+++ b/sw/inc/checkit.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: checkit.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CHECKIT_HXX
+#define _CHECKIT_HXX
+
+#include <com/sun/star/uno/Reference.h>
+
+#ifndef _COM_SUN_STAR_I18N_XEXTENDEDINPUTSEQUENCECHECKER_HDL_
+#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
+#endif
+
+/*************************************************************************
+ * class SwCheckIt
+ *
+ * Wrapper for the XInputSequenceChecker
+ *************************************************************************/
+
+class SwCheckIt
+{
+public:
+ com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedInputSequenceChecker > xCheck;
+
+ SwCheckIt();
+};
+
+extern SwCheckIt* pCheckIt;
+
+#endif
+
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
new file mode 100644
index 000000000000..08ebcf93bd5c
--- /dev/null
+++ b/sw/inc/chpfld.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: chpfld.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CHPFLD_HXX
+#define _CHPFLD_HXX
+
+#include "fldbas.hxx"
+
+class SwFrm;
+class SwTxtNode;
+#include <unoobj.hxx>
+
+enum SwChapterFormat
+{
+ CF_BEGIN,
+ CF_NUMBER = CF_BEGIN, // nur die Kapitelnummer
+ CF_TITLE, // nur die "Ueberschrift"
+ CF_NUM_TITLE, // Kapitelnummer und "Ueberschrift"
+ CF_NUMBER_NOPREPST, // nur die Kapitelnummer ohne Post/Prefix
+ CF_NUM_NOPREPST_TITLE, // Kapitelnummer ohne Post/Prefix und "Ueberschrift"
+ CF_END
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Kapitel
+ --------------------------------------------------------------------*/
+
+class SwChapterFieldType : public SwFieldType
+{
+public:
+ SwChapterFieldType();
+
+ virtual SwFieldType* Copy() const;
+
+};
+
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Kapitelnummer
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwChapterField : public SwField
+{
+ friend class SwChapterFieldType;
+ BYTE nLevel;
+ String sTitle, sNumber, sPre, sPost;
+public:
+ SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
+
+ // --> OD 2008-02-14 #i53420#
+// void ChangeExpansion( const SwFrm*,
+// const SwTxtNode*,
+// BOOL bSrchNum = FALSE);
+ void ChangeExpansion( const SwFrm*,
+ const SwCntntNode*,
+ BOOL bSrchNum = FALSE);
+ // <--
+ void ChangeExpansion(const SwTxtNode &rNd, BOOL bSrchNum);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline BYTE GetLevel() const;
+ inline void SetLevel(BYTE);
+
+ inline const String& GetNumber() const;
+ inline const String& GetTitle() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline BYTE SwChapterField::GetLevel() const { return nLevel; }
+inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; }
+inline const String& SwChapterField::GetNumber() const { return sNumber; }
+inline const String& SwChapterField::GetTitle() const { return sTitle; }
+
+#endif // _CHPFLD_HXX
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
new file mode 100644
index 000000000000..3c7f19744948
--- /dev/null
+++ b/sw/inc/chrdlg.hrc
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: chrdlg.hrc,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CHRDLG_HRC
+#define _CHRDLG_HRC
+
+#include "rcid.hrc"
+
+#define DLG_CHAR (RC_CHRDLG_BEGIN + 1)
+#define DLG_PARA (RC_CHRDLG_BEGIN + 2)
+#define DLG_PAGE (RC_CHRDLG_BEGIN + 3)
+#define DLG_BREAK (RC_CHRDLG_BEGIN + 5)
+#define DLG_PAGENUM (RC_CHRDLG_BEGIN + 6)
+#define DLG_HEADER_FOOTER (RC_CHRDLG_BEGIN + 7)
+#define DLG_DROPCAPS (RC_CHRDLG_BEGIN + 8)
+#define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9)
+#define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10)
+
+// Tabpages -> jetzt in globals.hrc
+
+#define STR_TEXTCOLL_HEADER (RC_CHRDLG_BEGIN + 2)
+#define STR_PAGEFMT_HEADER (RC_CHRDLG_BEGIN + 4)
+#define SW_STR_NONE (RC_CHRDLG_BEGIN + 5)
+//#define STR_NUMFMT (RC_CHRDLG_BEGIN + 6)
+
+#define MSG_ILLEGAL_PAGENUM (RC_CHRDLG_BEGIN + 1)
+
+#define CHRDLG_ACT_END DLG_DRAWPARA
+
+#if CHRDLG_ACT_END > RC_CHRDLG_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define DLG_SWDROPCAPS (RC_CHRDLG_BEGIN + 11)
+
+#endif
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
new file mode 100644
index 000000000000..05ff8add5dd8
--- /dev/null
+++ b/sw/inc/cmdid.h
@@ -0,0 +1,1314 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cmdid.h,v $
+ * $Revision: 1.84.34.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/******************************************************************************
+Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
+ erlaubt, da es von swicli.c included wird!
+******************************************************************************/
+
+#ifndef INCLUDED_SW_CMDID_H
+#define INCLUDED_SW_CMDID_H
+
+#include <sfx2/sfx.hrc>
+
+#ifndef SW_UNOMID_H
+#include <unomid.h>
+#endif
+
+/* Flags die mittels des Disable-Features in den Slot-Definitionen ausgenutzt
+ * werden */
+#define SW_DISABLE_ON_PROTECTED_CURSOR 0x00000001
+#define SW_DISABLE_ON_MAILBOX_EDITOR 0x00000002
+
+
+#define FN_FILE SID_SW_START
+#define FN_EDIT (SID_SW_START + 100)
+#define FN_VIEW (SID_SW_START + 200)
+#define FN_INSERT (SID_SW_START + 300)
+#define FN_FORMAT (SID_SW_START + 400)
+#define FN_EXTRA (SID_SW_START + 600)
+#define FN_WINDOW (SID_SW_START + 700)
+#define FN_HELP (SID_SW_START + 800)
+#define FN_SELECTION (SID_SW_START + 900)
+#define FN_QUERY (SID_SW_START + 1000)
+#define FN_ENVELP (SID_SW_START + 1050)
+#define FN_PARAM (SID_SW_START + 1100)
+#define FN_STAT (SID_SW_START + 1180)
+#define FN_PRNOPT (SID_SW_START + 1200)
+#define FN_PGPREVIEW (SID_SW_START + 1250)
+#define FN_FRAME (SID_SW_START + 1300)
+#define FN_INSERT2 (SID_SW_START + 1400)
+#define FN_FORMAT2 (SID_SW_START + 1600)
+#define FN_EDIT2 (SID_SW_START + 1800)
+#define FN_QUERY2 (SID_SW_START + 2000)
+#define FN_EXTRA2 (SID_SW_START + 2200)
+#define FN_PARAM2 (SID_SW_START + 2400)
+#define FN_NOTES (SID_SW_START + 2500)
+
+ /* More accurately, this range should be from FN_EXTRA2 to FN_PARAM2-1, but
+ * FN_NUMBER_NEWSTART comes from FN_FORMAT2, and FN_PARAM_LINK_DISPLAY_NAME
+ * comes from FN_PARAM2 so we need to include FORMAT2,
+ * EDIT2 and QUERY2 and PARAM2 in the range...hopefully this will be fixed
+ * soon */
+
+#define FN_UNO_RANGE_BEGIN FN_FORMAT2
+#define FN_UNO_RANGE_END (FN_PARAM2 + 199)
+
+
+#define HELP_OFFSET 1100
+#define CMD_STR_OFFSET 2200
+#define CMD_STR_OFFSET_MULTILANG 3300
+#define CMDID_END 5500
+
+/*--------------------------------------------------------------------
+ Bereich: Datei
+ --------------------------------------------------------------------*/
+#define FN_CLOSE_FILE (FN_FILE + 1 ) /* Schliessen */
+#define FN_LAUNCH_REGISTRY (FN_FILE + 2 ) /* Ablage */
+
+
+#define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Globaldokument erzeugen */
+#define FN_NEW_FILE (FN_FILE + 5 ) /* Neu */
+#define FN_NEW_FILE_DLG (FN_FILE + 6 ) /* Neu Dialog */
+#define FN_OPEN_FILE (FN_FILE + 7 ) /* Oeffnen */
+#define FN_EDIT_FILE (FN_FILE + 8 ) /* Oeffnen oder ToTop */
+
+#define FN_INETFILE (FN_FILE + 9 ) /* Internet File-Dialog */
+
+#define FN_PRINT_FILE (FN_FILE + 10) /* Drucken */
+#define FN_PRINT_FILE_OPTIONS (FN_FILE + 11) /* Drucken Optionen */
+#define FN_SAVE_FILE_AS (FN_FILE + 12) /* Speichern unter */
+#define FN_SAVE_FILE (FN_FILE + 13) /* Speichern */
+#define FN_SETUP_PRINTER (FN_FILE + 14) /* Druckereinstellung */
+#define FN_SETUP_PRINTER_DLG (FN_FILE + 15) /* Druckereinstellung */
+#define FN_SHOW_PREVIEW (FN_FILE + 16) /* Druckbild */
+#define FN_EXIT (FN_FILE + 17) /* Writer beenden */
+#define FN_PRINT_CFG_DLG (FN_FILE + 18) /* Optionen Drucken */
+
+
+
+#define FN_SAVE_ALL (FN_FILE + 23) /* Alle Files speichern */
+#define FN_NEW_FILE_DEFAULT (FN_FILE + 24) /* Neue Datei mit Standardvorlage */
+#define FN_PRINT_FILE_DEFAULT (FN_FILE + 25) /* Drucken mit Defaults */
+#define FN_LAUNCH_EQ_EDITOR (FN_FILE + 26) /* Formel Editor */
+#define FN_CHANGE_PRINTER (FN_FILE + 27) /* Drucker einstellen */
+#define FN_FAX_END (FN_FILE + 29) /* Faxen fertig, Id fuer PostMessage */
+
+#define FN_SELECT_DATABASE (FN_FILE + 30) /* Selektion Datenbank */
+#define FN_DOC_INFO_DLG (FN_FILE + 31) /* Dokumentinfo */
+#define FN_DOC_MGR_DLG (FN_FILE + 32) /* Dokument-Manager */
+
+#define FN_GET_DOCSTAT (FN_FILE + 33) /* Dokumentstatistik einzeln auslesen */
+
+
+#define FN_SAVE_SELECTION (FN_FILE + 35) /* Selektion speichern */
+
+#define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Outline zu StarImpress senden */
+#define FN_OUTLINE_TO_CLIPBOARD (FN_FILE + 37) /* Outline in das Clipboad copieren */
+
+#define FN_NEW_HTML_DOC (FN_FILE + 40 ) /* HTML-Dokument "erzeugen" */
+
+#define FN_APP_START (FN_FILE + 98) /* fuer Makro bei App.Start */
+#define FN_APP_END (FN_FILE + 99) /* fuer Makro bei App.Ende */
+
+/*--------------------------------------------------------------------
+ Bereich: Bearbeiten
+ --------------------------------------------------------------------*/
+#define FN_CLEAR (FN_EDIT + 1 ) /* Loeschen */
+#define FN_COPY (FN_EDIT + 2 ) /* Kopieren */
+#define FN_CUT (FN_EDIT + 3 ) /* Ausschneiden */
+#define FN_EDIT_FIELD (FN_EDIT + 4 ) /* Textbefehl bearbeiten */
+#define FN_EDIT_FIELD_DLG (FN_EDIT + 5 ) /* Textbefehl bearbeiten */
+#define FN_EDIT_FILE_INFO (FN_EDIT + 6 ) /* Dokumentinfo */
+#define FN_EDIT_FILE_INFO_DLG (FN_EDIT + 7 ) /* Dokumentinfo Dialog */
+#define FN_EDIT_LINK (FN_EDIT + 8 ) /* Verknuepfungen */
+#define FN_EDIT_LINK_DLG (FN_EDIT + 9 ) /* Verknuepfungen */
+#define FN_GOTO (FN_EDIT + 11) /* Gehe zu */
+
+#define FN_PASTE (FN_EDIT + 13) /* Einfuegen */
+#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Verknuepfung einfuegen */
+#define FN_NUMBER_BULLETS (FN_EDIT + 21) /* Bullets */
+#define FN_REPEAT (FN_EDIT + 22) /* Letzten Befehl wiederholen */
+#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Index-Entry bearbeiten */
+#define FN_UPDATE_FIELDS (FN_EDIT + 26) /* Feldinhalte erneuern */
+#define FN_EXECUTE_MACROFIELD (FN_EDIT + 27) /* Macrofeld ausfuehren */
+#define FN_EDIT_FORMULA (FN_EDIT + 28) /* Formel in RibbonBar bearbeiten */
+#define FN_CALC_TABLE (FN_EDIT + 29) /* Tabelle durchrechnen */
+
+/*--------------------------------------------------------------------
+ Bereich: Bullets
+ --------------------------------------------------------------------*/
+#define FN_NUM_BULLET_DOWN (FN_EDIT + 30) /* Runterstufen */
+#define FN_NUM_BULLET_UP (FN_EDIT + 31) /* Raufstufen */
+#define FN_NUM_BULLET_PREV (FN_EDIT + 32) /* zum vorigen Eintrag */
+#define FN_NUM_BULLET_NEXT (FN_EDIT + 33) /* zum naechsten Eintrag */
+#define FN_NUM_BULLET_MOVEUP (FN_EDIT + 34) /* nach oben schieben */
+#define FN_NUM_BULLET_MOVEDOWN (FN_EDIT + 35) /* nach unten schieben */
+#define FN_NUM_BULLET_NONUM (FN_EDIT + 36) /* Eintrag ohne Nummer */
+#ifndef FN_NUM_BULLET_OFF //in SVX already
+#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* Numerierung aus */
+#endif
+
+
+// schon im SVX
+//#define FN_NUM_BULLET_ON (FN_EDIT + 38) /* Numerierung mit Bullets an */
+
+#define FN_NUM_BULLET_OUTLINE_DOWN (FN_EDIT + 39) /* Runterstufen mit Unterpunkten */
+#define FN_NUM_BULLET_OUTLINE_UP (FN_EDIT + 40) /* Raufstufen mit Unterpunkten */
+#define FN_NUM_BULLET_OUTLINE_MOVEUP (FN_EDIT + 41) /* nach oben schieben mit Unterpunkten */
+#define FN_NUM_BULLET_OUTLINE_MOVEDOWN (FN_EDIT + 42) /* nach unten schieben mit Unterpunkten */
+#define FN_UPDATE_INPUTFIELDS (FN_EDIT + 43) /* Eingabefelder updaten */
+// schon im SVX
+//#define FN_NUM_NUMBERING_ON (FN_EDIT + 44) /* Numerierung an */
+
+#define FN_NUM_OR_NONUM (FN_EDIT + 46) /* Nummer ein-/aus */
+
+#define FN_GOTO_NEXT_INPUTFLD (FN_EDIT + 47) /* zum naechsten EingabeFeld */
+#define FN_GOTO_PREV_INPUTFLD (FN_EDIT + 48) /* zum vorherigen EingabeFeld */
+
+#define FN_REPEAT_SEARCH (FN_EDIT + 50) /* Suche wiederholen */
+#define FN_REPEAT_REPLACE (FN_EDIT + 51) /* Ersetzen wiederholen */
+#define FN_UPDATE_GRAFIC (FN_EDIT + 53) /* Grafik aendern */
+#define FN_SETTAB_ATCURPOS (FN_EDIT + 54) /* Tab an der aktuellen Pos setzen */
+#define FN_SET_LR_IND_ATCURPOS (FN_EDIT + 55) /* EZE und LR setzen */
+#define FN_FRMCNT_TO_BODY (FN_EDIT + 56) /* Rahmeninhalt zu Text */
+#define FN_UPDATE_TOXBASE (FN_EDIT + 57) /* Naechstes Verzeichnis erneuern */
+
+#define FN_REPAGINATE (FN_EDIT + 61) /* Neuformatierung erzwingen */
+#define FN_EDIT_FOOTNOTE (FN_EDIT + 62) /* Fussnote bearbeiten */
+
+#define FN_EDIT_REGION (FN_EDIT + 65) /* Bereiche bearbeiten */
+#define FN_GOTO_REFERENCE (FN_EDIT + 66) /* Von der Refmark zur Referenz */
+
+// schon im Svx definiert
+#define FN_NEXT_BOOKMARK (FN_EDIT + 68) /* */
+#define FN_PREV_BOOKMARK (FN_EDIT + 69) /* */
+
+/*Navigator ToolBoxen*/
+#define FN_SELECT_BOOKMARK (FN_EDIT + 70) /**/
+#define FN_ITEM_DOWN (FN_EDIT + 71) /**/
+#define FN_ITEM_LEFT (FN_EDIT + 72) /**/
+#define FN_ITEM_RIGHT (FN_EDIT + 73) /**/
+#define FN_ITEM_UP (FN_EDIT + 74) /**/
+#define FN_DOWN (FN_EDIT + 75) /**/
+
+#define FN_SELECT_FOOTER (FN_EDIT + 77) /**/
+#define FN_SELECT_FRAME (FN_EDIT + 78) /**/
+#define FN_SELECT_HEADER (FN_EDIT + 79) /**/
+#define FN_PAGENUMBER (FN_EDIT + 80) /**/
+#define FN_SELECT_AUTO_BOOKMARK (FN_EDIT + 81) /**/
+#define FN_SELECT_FOOTNOTE (FN_EDIT + 82) /**/
+#define FN_SELECT_SET_AUTO_BOOKMARK (FN_EDIT + 83) /**/
+#define FN_SELECT_TABLE (FN_EDIT + 84) /**/
+#define FN_SELECT_INDEX (FN_EDIT + 85) /**/
+#define FN_UP (FN_EDIT + 86) /**/
+
+
+//#define FN_DELETE_REGION (FN_EDIT + 89) /* Bereiche loeschen */
+
+
+#define FN_SELECT_PARA (FN_EDIT + 97) /* Absatz selektieren */
+
+#define FN_SELECT_CONTENT (FN_EDIT + 99) /* Navigator - Inhaltstyp */
+
+
+
+
+//#define FN_REDLINE_PROTECT (FN_EDIT2 + 23) /* Redlining password */ ->moved to SVX
+#define FN_UPDATE_ALL_LINKS (FN_EDIT2 + 24) /* alle Links updaten */
+
+//#define FN_REDLINE_ON (FN_EDIT2 + 25) /* Redlining anschalten */ -> moved to SVX
+#define FN_REDLINE_SHOW (FN_EDIT2 + 26) /* Redlining anzeigen */
+#define FN_REDLINE_COMMENT (FN_EDIT2 + 27) /* Redlining kommentieren */
+
+#define FN_UPDATE_ALL (FN_EDIT2 + 28) /* FN_UPDATE_ALL_LINKS,
+ FN_UPDATE_FIELDS,
+ FN_UPDATE_TOX,
+ CalcLayout */
+
+#define FN_REDLINE_ACCEPT (FN_EDIT2 + 29) /* Redlining annehmen/ablehnen */
+#define FN_ATTR_COLUMNS (FN_EDIT2 + 31) /* SlotId fuer SwFmtCol */
+#define FN_EDIT_CURRENT_TOX (FN_EDIT2 + 32) /* edit current index */
+#define FN_EDIT_AUTH_ENTRY_DLG (FN_EDIT2 + 33) /* edit authorities entry*/
+#define FN_UPDATE_CHARTS (FN_EDIT2 + 34) /* update all charts */
+
+#define FN_EDIT_HYPERLINK (FN_EDIT2 + 35) /* edit hyperlink */
+#define FN_NUM_CONTINUE (FN_EDIT2 + 36) /* continue previous numbering */
+#define FN_REDLINE_ACCEPT_DIRECT (FN_EDIT2 + 37) /* accept redline at current position*/
+#define FN_REDLINE_REJECT_DIRECT (FN_EDIT2 + 38) /* reject redline at current position*/
+#define FN_REMOVE_HYPERLINK (FN_EDIT2 + 39) /* remove hyperlink attribute */
+#define FN_COPY_HYPERLINK_LOCATION (FN_EDIT2 + 40) /* copy hyperlink URL to clipboard */
+
+/*--------------------------------------------------------------------
+ Bereich: Bearbeiten
+ --------------------------------------------------------------------*/
+
+#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */
+#define FN_SHOW_OUTLINE_VIEW (FN_VIEW + 2) /* Gliederungsansicht */
+
+#define FN_DRAW_WRAP_DLG (FN_VIEW + 3) /* Draw Umlauf-Dlg */
+
+#define FN_RULER (FN_VIEW + 11) /* Horizontales Lineal */
+
+#define FN_VIEW_GRAPHIC (FN_VIEW + 13) /* Grafiken anzeigen */
+#define FN_VIEW_BOUNDS (FN_VIEW + 14) /* Begrenzungen */
+#define FN_VIEW_FIELDS (FN_VIEW + 15) /* Textbefehle */
+#define FN_VLINEAL (FN_VIEW + 16) /* Vertikales Lineal */
+#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertikaler Scrollbar */
+#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontaler Scrollbar */
+#define FN_TOOLBOX_TOGGLE (FN_VIEW + 19) /* Toolboxinhalte umschalten */
+#define FN_VIEWOPTIONS_ON (FN_VIEW + 20) /* Gruppe Viewoptions an */
+#define FN_VIEWOPTIONS_OFF (FN_VIEW + 21) /* Gruppe Viewoptions aus */
+#define FN_CONTROLS_ON (FN_VIEW + 22) /* Gruppe Bedienelemte an */
+#define FN_CONTROLS_OFF (FN_VIEW + 23) /* Gruppe Bedienelemte aus */
+
+#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* Sonderzeichen anzeigen */
+#define FN_VIEW_MARKS (FN_VIEW + 25) /* Markierungen anzeigen */
+#define FN_VIEW_FIELDNAME (FN_VIEW + 26) /* Feldname anzeigen */
+#define FN_VIEW_TABLEGRID (FN_VIEW + 27) /* Tabellenbegrenzungen anzeigen */
+
+#define FN_SET_PAGE (FN_VIEW + 29) /* Seitenvorlage am Absatz setzen */
+
+#define FN_TOOLBOX_SWITCH (FN_VIEW + 30) /* Auf Textshell umschalten */
+
+
+//noch mehr Navigator
+#define FN_CONTENT_LB (FN_VIEW + 32) /**/
+#define FN_SHOW_CONTENT_BOX (FN_VIEW + 33) /**/
+#define FN_SHOW_ROOT (FN_VIEW + 34) /**/
+#define FN_DROP_REGION (FN_VIEW + 35) /**/
+#define FN_OUTLINE_LEVEL (FN_VIEW + 36) /**/
+
+#define FN_PRINT_LAYOUT (FN_VIEW + 37) /* invertierter BrowseMode */
+
+#define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/
+#define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/
+
+#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigationscontroller am Scrollbar*/
+#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* arbeitet den MoveType ab */
+
+#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* Versteckte Absaetze */
+#define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43)
+
+#define FN_GLOBAL_SWITCH (FN_VIEW + 44) /* umschalten zw. Global und Inhalt*/
+#define FN_GLOBAL_EDIT (FN_VIEW + 45) /* bearbeiten */
+#define FN_GLOBAL_UPDATE (FN_VIEW + 46) /* aktualisieren */
+#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* oeffnen */
+#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* Inhalt der Verknuepfung mitspeichern */
+#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* Navigations-Controller erzeugen */
+#define FN_PREVIEW_PRINT_OPTIONS (FN_VIEW + 50) /* Optionsdialog Preview drucken */
+#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* der Tabellencontroller fuer den Zoom */
+
+#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Zahlenerkennung in Tabellen */
+#define FN_HSCROLL_METRIC (FN_VIEW + 53) /* Metric horizontal scrollbar */
+#define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */
+#define FN_VIEW_NOTES (FN_VIEW + 55)
+
+/*--------------------------------------------------------------------
+ Bereich: Einfuegen
+ --------------------------------------------------------------------*/
+// schon im Svx definiert
+#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Sprungmarke einfuegen */
+
+// schon im SVX unter der gleichen Id
+//#define FN_INSERT_BREAK (FN_INSERT + 3 ) /* Umbruch */
+
+#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Umbruch */
+#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Spaltenumbruch */
+#define FN_INSERT_DATE_TIME (FN_INSERT + 6 ) /* Datum/Uhrzeit */
+#define FN_INSERT_FIELD (FN_INSERT + 8 ) /* Textbefehl */
+#define FN_CHANGE_DBFIELD (FN_INSERT + 9 ) /* Datenbankfeld aendern */
+
+#define FN_INSERT_CAPTION (FN_INSERT + 10) /* Beschriftung */
+#define FN_INSERT_DBFIELD (FN_INSERT + 11) /* Insert database field - for recording */
+#define FN_INSERT_FOOTNOTE_DLG (FN_INSERT + 12) /* Dialog Fussnote */
+
+#define FN_INSERT_REF_FIELD (FN_INSERT + 13) /* Refernzfeld einfuegen */
+
+#define FN_INSERT_HYPERLINK (FN_INSERT + 14) /* Zeichendialog/HyperlinkPage*/
+
+#define FN_INSERT_INDEX (FN_INSERT + 16) /* Stichworteintrag */
+#define FN_INSERT_INDEX_DLG (FN_INSERT + 17) /* Stichworteintrag */
+#define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Zeilenumbruch */
+#define FN_INSERT_FIELD_DATA_ONLY (FN_INSERT + 19) /* field dialog for mail merge*/
+#define FN_INSERT_OBJECT (FN_INSERT + 21) /* Object */
+#define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */
+#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Seitenumbruch */
+#define FN_INSERT_PAGENO (FN_INSERT + 24) /* Seitennummer */
+#define FN_INSERT_PARAGRAPH (FN_INSERT + 25) /* Absatz */
+#define FN_INSERT_RECORD (FN_INSERT + 26) /* Datensatz einfuegen */
+#define FN_MERGE_RECORD (FN_INSERT + 27) /* Datensatz mischen */
+#define FN_INSERT_SYMBOL (FN_INSERT + 28) /* Sonderzeichen */
+#define FN_POSTIT (FN_INSERT + 29) /* PostIt einfuegen/bearbeiten */
+#define FN_INSERT_TABLE (FN_INSERT + 30) /* Tabelle */
+#define FN_INSERT_STRING (FN_INSERT+31)
+#define FN_INSERT_COLS (FN_INSERT + 32) /* Spalten einfuegen */
+#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Rahmen einfuegen aktiv */
+#define FN_INSERT_FRAME (FN_INSERT + 34) /* Rahmen einfuegen */
+
+#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* Verzeichniseintrag einfuegen */
+#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/
+
+//#define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43) /* weicher Trenner */
+//#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hartes Space */
+
+
+#define FN_TOOL_GROUP (FN_INSERT + 47) /* Objekte gruppieren */
+#define FN_TOOL_UNGROUP (FN_INSERT + 48) /* Gruppierng aufheben */
+
+#define FN_TOOL_ANKER (FN_INSERT + 49) /* Draw-Objekt umankern */
+#define FN_TOOL_ANKER_PAGE (FN_INSERT + 50) /* Draw-Objekt an Seite verankern */
+#define FN_TOOL_ANKER_PARAGRAPH (FN_INSERT + 51) /* Draw-Objekt am Absatz verankern */
+#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* Hierarchie aendern */
+
+#define FN_MAILMERGE_WIZARD (FN_INSERT + 64) /* mail merge wizard */
+#define FN_QRY_OPEN_TABLE (FN_INSERT + 65) /* Datenbank oeffnen (Basic) */
+#define FN_TOOL_ANKER_FRAME (FN_INSERT + 66) /* Draw-Objekt am Rahmen verankern */
+#define FN_QRY_MERGE (FN_INSERT + 67) /* Datensatz einfuegen (Serienbrief) */
+#define FN_MAILMERGE_CHILDWINDOW (FN_INSERT + 68) /* back-to-mail-merge-wizard child window*/
+#define FN_INSERT_SMA (FN_INSERT + 69) /* Einfuegen StarMath */
+
+#define FN_QRY_GET_COLUMN_NAME (FN_INSERT + 70) /* Anzahl der Spalten (Basic) */
+#define FN_QRY_GET_COLUMN_TYPE (FN_INSERT + 71) /* Type des Datenbankfeldes ermitteln (Basic) */
+#define FN_QRY_GET_COLUMN_TEXT (FN_INSERT + 72) /* Inhalt des aktuellen Datensatzes (Basic) */
+#define FN_QRY_DEL_DEFINED_DB (FN_INSERT + 75) /* Datenbankdefinition loeschen (Basic) */
+
+#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* DrawText positionieren */
+
+#define FN_QRY_APPEND_RECORD (FN_INSERT + 77) /* Neuen Datensatz anhaengen */
+#define FN_QRY_UPDATE_RECORD (FN_INSERT + 78) /* Datensatzspalte aendern */
+#define FN_QRY_DELETE_RECORD (FN_INSERT + 79) /* Datensatz loeschen */
+#define FN_QRY_GET_PHYS_RECORD_ID (FN_INSERT + 80) /* Physikalische (absolute) Datensatznummer erfragen (Basic) */
+
+#define FN_TOOL_ANKER_CHAR (FN_INSERT + 84) /* DrawObject zeichengebunden */
+//#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* Bindestrich ohne Umbruch*/
+
+#define FN_QRY_INSERT (FN_INSERT + 86) /* Datensatz-Selektion in Text einfuegen */
+#define FN_QRY_MERGE_FIELD (FN_INSERT + 87) /* Datensatz-Selektion in Felder einfuegen */
+#define FN_QRY_INSERT_FIELD (FN_INSERT + 88) /* Datenbankfeld einfuegen */
+
+#define FN_INSERT_CTRL (FN_INSERT + 89) /* Werkzeugleistencontroller Einfuegen*/
+#define FN_INSERT_OBJ_CTRL (FN_INSERT + 90) /* Werkzeugleistencontroller Einfuegen/Objekt*/
+#define FN_INSERT_FIELD_CTRL (FN_INSERT + 91) /* Werkzeugleistencontroller Einfuegen/Feldbefehle*/
+
+#define FN_INSERT_FLD_DATE (FN_INSERT + 92)
+#define FN_INSERT_FLD_TIME (FN_INSERT + 93)
+#define FN_INSERT_FLD_PGNUMBER (FN_INSERT + 94)
+#define FN_INSERT_FLD_PGCOUNT (FN_INSERT + 95)
+#define FN_INSERT_FLD_TOPIC (FN_INSERT + 96)
+#define FN_INSERT_FLD_TITLE (FN_INSERT + 97)
+#define FN_INSERT_FLD_AUTHOR (FN_INSERT + 98)
+#define FN_INSERT_FOOTNOTE (FN_INSERT + 99)
+
+/*--------------------------------------------------------------------
+ Bereich: Einfuegen (2.Teil)
+ --------------------------------------------------------------------*/
+
+#define FN_QRY_GET_ALL_DBNAME (FN_INSERT2 + 1) /* Alle konfigurierten Datenabanknamen ermitteln */
+#define FN_QRY_GET_DBNAME_COUNT (FN_INSERT2 + 2) /* Anzahl aller konfigurierten Datenabanknamen */
+#define FN_QRY_GET_TABLE_NAME (FN_INSERT2 + 3) /* Tabellenname einer Datenbank ermitteln */
+#define FN_QRY_GET_TABLE_COUNT (FN_INSERT2 + 4) /* Anzahl aller Tabellen einer Datenbank ermitteln */
+#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW (FN_INSERT2 + 5) /* child window provided by mailmerge */
+
+
+#define FN_SBA_BRW_UPDATE (FN_INSERT2 + 7) /* Datensaetze in Felder einfuegen */
+#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* Datensaetze in Text einfuegen */
+#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* Serienbriefdruck */
+#define FN_JAVAEDIT (FN_INSERT2 + 10) /* Scriptfeld bearbeiten */
+#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* horiz. Grafiklinie einfuegen */
+#define FN_TOOL_ANKER_AT_CHAR (FN_INSERT2 + 12) /* Object zeichengebunden */
+
+#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* Standard Kopfzeile einfuegen */
+#define FN_INSERT_PAGEFOOTER (FN_INSERT2 + 14) /* Standard Fusszeile einfuegen */
+
+#define FN_INSERT_ENDNOTE (FN_INSERT2 + 18) /* Endnote einfuegen*/
+#define FN_INSERT_REGION (FN_INSERT2 + 19) /* Insert section */
+
+#define FN_INSERT_MULTI_TOX (FN_INSERT2 + 20) /* insert any TOX */
+#define FN_INSERT_AUTH_ENTRY_DLG (FN_INSERT2 + 21) /* insert entry for table of authorities*/
+
+/*--------------------------------------------------------------------
+ Bereich: Format
+ --------------------------------------------------------------------*/
+
+#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* Autoformat-Optionen anwenden */
+#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* Autoformat waehrend der Eingabe */
+#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 ) /* Groesse */
+#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 ) /* Groesse */
+#define FN_UNDERLINE_DOUBLE (FN_FORMAT + 5 ) /* Doppelt unterstreichen */
+#define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* Autoformat mit Redlining anwenden */
+#define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* Hochstellung */
+#define FN_SET_SUB_SCRIPT (FN_FORMAT + 12) /* Tiefstellung */
+
+#define FN_SET_CASEMAP (FN_FORMAT + 14) /* CaseMap */
+#define FN_SET_LANGUAGE (FN_FORMAT + 15) /* Sprache */
+#define FN_SET_KERNING (FN_FORMAT + 16) /* Kerning */
+
+#define FN_INDENT_TO_TABSTOP (FN_FORMAT + 17) /* Einrueckung auf die naechste Tabpostion */
+//schon in svxids.hrc
+//#define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) /* Ausrichtung Absatz */
+#define FN_FLIP_HORZ_GRAFIC (FN_FORMAT + 25) /* Spiegeln horizontal */
+#define FN_FLIP_VERT_GRAFIC (FN_FORMAT + 26) /* Spiegeln vertikal */
+#define FN_SET_LINE_SPACE (FN_FORMAT + 27) /* Zeilenabstand parametrisiert */
+#define FN_SET_ADJUST (FN_FORMAT + 28) /* Ausrichtung parametrisiert */
+#define FN_SET_LRMARGIN (FN_FORMAT + 29) /* linker/rechter Rand */
+#define FN_SET_ULMARGIN (FN_FORMAT + 30) /* oberer/unterer Rand */
+#define FN_UNINDENT_TO_TABSTOP (FN_FORMAT + 31) /* Einrueckung auf die vorgige Tabpostion */
+
+#define FN_SET_HYPHEN_ZONE (FN_FORMAT + 32) /* Silbentrennung */
+#define FN_SET_KEEP_TOGETHER (FN_FORMAT + 34) /* nicht trennen */
+#define FN_SET_KEEP_WITH_NEXT (FN_FORMAT + 35) /* mit folgendem zus. */
+#define FN_SET_WIDOW (FN_FORMAT + 36) /* Widows */
+#define FN_SET_ORPHAN (FN_FORMAT + 37) /* Orphans */
+
+
+#define FN_REGISTER_COLLECTION (FN_FORMAT + 43) /* Referenzvorlage an der Seite */
+#define FN_REGISTER_MODE (FN_FORMAT + 44) /* Registermodus an/aus */
+#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* Zahlenformat in Tabelle */
+#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* Umrandung */
+#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* Spalten pro Seite */
+#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* Hintergrund */
+#define FN_FORMAT_PAGE (FN_FORMAT + 51) /* Seite */
+#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* Seite */
+#define FN_FORMAT_COLUMN (FN_FORMAT + 53) /* Spalten */
+#define FN_FORMAT_DROPCAPS (FN_FORMAT + 54) /* Initialien */
+#define FN_FORMAT_FRAME (FN_FORMAT + 55) /* Rahmen */
+#define FN_FORMAT_FRAME_DLG (FN_FORMAT + 56) /* Rahmen */
+#define FN_FORMAT_GRAFIC (FN_FORMAT + 57) /* Grafik */
+#define FN_FORMAT_GRAFIC_DLG (FN_FORMAT + 58) /* Grafik */
+#define FN_FORMAT_TABLE (FN_FORMAT + 59) /* Tabelle */
+#define FN_FORMAT_TABLE_DLG (FN_FORMAT + 60) /* Tabelle */
+#define FN_FORMAT_OLE_DLG (FN_FORMAT + 61) /* OLE bearbeiten */
+
+#define FN_NEW_STYLE_BY_EXAMPLE (FN_FORMAT + 62) /* Vorlage erzeugen by Example */
+#define FN_UPDATE_STYLE_BY_EXAMPLE (FN_FORMAT + 63) /* Vorlage aktualisieren */
+#define FN_STYLE_SHEET_FRAME_DLG (FN_FORMAT + 64) /* Rahmenvorlage */
+#define FN_STYLE_SHEET_DOC_DLG (FN_FORMAT + 65) /* Dokumentvorlage */
+#define FN_STYLE_SHEET_GRAFIK_DLG (FN_FORMAT + 66) /* Dokumentvorlage */
+#define FN_FORMAT_FOOTNOTE (FN_FORMAT + 67) /* Fussnoten */
+#define FN_FORMAT_FOOTNOTE_DLG (FN_FORMAT + 68) /* Fussnoten-Dialog */
+
+// schon im Svx definiert
+//#define FN_FORMAT_RESET (FN_FORMAT + 69) /* Format zuruecksetzen */
+
+#define FN_FRAME_TO_TOP (FN_FORMAT + 70) /* Rahmen nach oben */
+#define FN_FRAME_TO_BOTTOM (FN_FORMAT + 71) /* Rahmen nach unten */
+
+#define FN_FRAME_NOWRAP (FN_FORMAT + 72) /* Rahmen kein Umlauf */
+#define FN_FRAME_WRAP (FN_FORMAT + 73) /* Rahmen Umlauf */
+#define FN_FRAME_WRAPTHRU (FN_FORMAT + 74) /* Rahmen Durchlauf */
+
+#define FN_FRAME_ALIGN_HORZ_LEFT (FN_FORMAT + 75) /* Rahmen horz. links */
+#define FN_FRAME_ALIGN_HORZ_RIGHT (FN_FORMAT + 76) /* Rahmen horz. rechts */
+#define FN_FRAME_ALIGN_HORZ_CENTER (FN_FORMAT + 77) /* Rahmen horz. zentriert */
+#define FN_FRAME_ALIGN_VERT_TOP (FN_FORMAT + 78) /* Rahmen vert. oben */
+#define FN_FRAME_ALIGN_VERT_BOTTOM (FN_FORMAT + 79) /* Rahmen vert. unten */
+#define FN_FRAME_ALIGN_VERT_CENTER (FN_FORMAT + 80) /* Rahmen vert. zentriert */
+
+#define FN_SET_FRM_POSITION (FN_FORMAT + 82)/* Rahmenposition -- " -- */
+#define FN_SET_FRM_OPTIONS (FN_FORMAT + 86)/* Rahmenoptionen -- " -- */
+
+#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* Anwenden Seitenv. */
+
+
+#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */
+#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* Konvertierung Text <-> Tabelle */
+#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* Tabelle: Zeile einfuegen */
+#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* Tabelle: Spalte einfuegen */
+#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* Tabelle: Zeile loeschen */
+#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* Tabelle: Spalte loeschen */
+#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* Tabelle: Zellen teilen */
+#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* Tabelle: Zellen verbinden */
+#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* Tabelle: Zeilenhoehe setzen */
+#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* Tabelle: Spaltenbreite setzen */
+#define FN_TABLE_SET_ULSPACE (FN_FORMAT + 109) /* Tabelle: oberen / unteren Abstand einstellen */
+#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem fuer Optimierung in Tabellen */
+#define FN_TABLE_SET_SHADOW (FN_FORMAT + 111) /* Tabelle: Schatten einstellen */
+#define FN_TABLE_GOTO_CELL (FN_FORMAT + 112) /* Tabelle: Zelle anspringen */
+#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* Tabelle: Zeile selektieren */
+#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* Tabelle: Spalte selektieren */
+#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* Tabelle: Tabelle selektieren */
+#define FN_TABLE_SET_READ_ONLY (FN_FORMAT + 116) /* Tabelle: Tabelle schuetzen */
+#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* Tabelle: Tabellezellen schuetzen */
+#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* Tabelle: Tabellezellen schuetzen aufheben */
+#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* also used in SwXTextTable*/
+#define FN_TABLE_ADJUST_CELLS (FN_FORMAT + 121) /* Tabelle: Zellen anpassen */
+
+#define FN_FRAME_UP (FN_FORMAT + 122) /* Rahmen um eine Ebene nach oben */
+#define FN_FRAME_DOWN (FN_FORMAT + 123) /* Rahmen um eine Ebene nach unten */
+
+#define FN_TABLE_INSERT_CHART (FN_FORMAT + 124)
+
+#define FN_SET_FRM_LRSPACE (FN_FORMAT + 125) /* Rahmen Seitenabstand */
+#define FN_SET_FRM_ULSPACE (FN_FORMAT + 126) /* Rahmen Kopf-/Fussabstand */
+#define FN_TABLE_SET_LRSPACE (FN_FORMAT + 127) /* Tabelle: linker / rechter Abstand einstellen */
+#define FN_TABLE_OPTIMAL_HEIGHT (FN_FORMAT + 128) /* Zellenhoehe optimal*/
+#define FN_TABLE_DELETE_TABLE (FN_FORMAT + 129) /* remove current table*/
+#define FN_TABLE_SELECT_CELL (FN_FORMAT + 130) /* selects the current table cell */
+#define FN_CONVERT_TEXT_TO_TABLE (FN_FORMAT + 131) /* convert selected text to table */
+#define FN_CONVERT_TABLE_TO_TEXT (FN_FORMAT + 132) /* convert a table to text */
+#define FN_TABLE_SORT_DIALOG (FN_FORMAT + 133) /* sorting in tables*/
+/*--------------------------------------------------------------------
+ Bereich: Seitenvorlage
+ --------------------------------------------------------------------*/
+
+#define FN_NEW_PAGE_STYLE (FN_FORMAT + 129) /* Anlegen Seitenvorlage */
+#define FN_PAGE_STYLE_SET_LR_MARGIN (FN_FORMAT + 130) /* linker / rechter Rand */
+#define FN_PAGE_STYLE_SET_UL_MARGIN (FN_FORMAT + 131) /* oberer / unterer Rand */
+#define FN_PAGE_STYLE_SET_PAGE (FN_FORMAT + 134) /* linke, rechte... */
+#define FN_PAGE_STYLE_SET_PAPER_SIZE (FN_FORMAT + 135) /* Papiergroesse */
+#define FN_PAGE_STYLE_SET_PAPER_BIN (FN_FORMAT + 136) /* Druckerschacht */
+#define FN_PAGE_STYLE_SET_NUMBER_FORMAT (FN_FORMAT + 137) /* Numerierungsart */
+#define FN_PAGE_STYLE_SET_COLS (FN_FORMAT + 138) /* Spaltenanzahl */
+
+
+/* OS: Diese Ids werden nur noch fuer die Hilfe benoetigt und sind fuer den
+ Dialog durch die Ids ohne _DLG ersetzt*/
+#define FN_TABLE_INSERT_COL_DLG (FN_FORMAT + 142) /* Tabelle: Dlg. Spalte einfuegen */
+#define FN_TABLE_INSERT_ROW_DLG (FN_FORMAT + 143) /* Tabelle: Dlg. Zeile einfuegen */
+
+#define FN_GOTO_NEXT_CELL (FN_FORMAT + 145) /* Table: go to next cell */
+#define FN_GOTO_PREV_CELL (FN_FORMAT + 146) /* Table: go to previous cell */
+
+
+#define FN_TABLE_HEADLINE_COUNT (FN_FORMAT + 147) /* number of repeated headlines of tables */
+//hier geht's weiter !
+/*--------------------------------------------------------------------
+ Bereich: Ribbon
+ --------------------------------------------------------------------*/
+
+#define FN_SET_BACKGROUND_COLOR (FN_FORMAT + 150) /* Hintergrundfarbe */
+
+#define FN_SET_BORDER_POS (FN_FORMAT + 152) /* Position Umrandung */
+#define FN_SET_BORDER_LINES (FN_FORMAT + 153) /* Linienart Umrandung */
+#define FN_SET_BORDER_COLOR (FN_FORMAT + 154) /* Farbe Umrandung */
+
+#define FN_FORMULA_CALC (FN_FORMAT + 156) /* Formelauswahl */
+#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* Formel nicht uebernehmen */
+#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* Formel uebernehmen */
+
+#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* Zellenschutz fuer Tab. aufheben */
+
+#define FN_FORMULA_POSITION (FN_FORMAT + 160) /* Positionsanzeige */
+#define FN_FORMULA_EDIT (FN_FORMAT + 161) /* Editfeld */
+
+
+#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 163) /* Rahmen Idealer Umlauf */
+#define FN_FRAME_WRAPTHRU_TRANSP (FN_FORMAT + 164) /* Rahmen Transparenter Durchlauf */
+
+#define FN_FRAME_ALIGN_VERT_ROW_TOP (FN_FORMAT + 165) /* Rahmen vert. Zeile oben */
+#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM (FN_FORMAT + 166) /* Rahmen vert. Zeile unten */
+#define FN_FRAME_ALIGN_VERT_ROW_CENTER (FN_FORMAT + 167) /* Rahmen vert. Zeile zentriert */
+
+#define FN_FRAME_ALIGN_VERT_CHAR_TOP (FN_FORMAT + 168) /* Rahmen vert. Zeichen oben */
+#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM (FN_FORMAT + 169) /* Rahmen vert. Zeichen unten */
+#define FN_FRAME_ALIGN_VERT_CHAR_CENTER (FN_FORMAT + 170) /* Rahmen vert. Zeichen zentriert */
+
+#define FN_TABLE_SET_DEF_BORDER (FN_FORMAT + 171) /* vordefinierte Umrandungen setzen */
+
+#define FN_FRAME_WRAP_LEFT (FN_FORMAT + 172) /* Rahmen Umlauf links */
+#define FN_FRAME_WRAP_RIGHT (FN_FORMAT + 173) /* Rahmen Umlauf links */
+
+#define FN_TABLE_SET_ROW_AUTOHEIGHT (FN_FORMAT + 174) /* Tabelle: Minimale automatische Zeilenhoehe setzen */
+
+
+#define FN_WRAP_ANCHOR_ONLY (FN_FORMAT + 181) /* Umlauf nur fuer ersten Absatz */
+
+#define FN_TABLE_BALANCE_CELLS (FN_FORMAT + 182) /* Spalten gleichmaessig verteilen */
+#define FN_TABLE_BALANCE_ROWS (FN_FORMAT + 183) /* Zeilen gleichmaessig verteilen */
+
+#define FN_FRAME_WRAP_CONTOUR (FN_FORMAT + 184) /* Rahmen Kunturumlauf */
+
+#define FN_TABLE_VERT_NONE (FN_FORMAT + 185) /* vertikale Ausrichtung in Tabellenzellen */
+#define FN_TABLE_VERT_CENTER (FN_FORMAT + 186) /* -"- */
+#define FN_TABLE_VERT_BOTTOM (FN_FORMAT + 187) /* -"- */
+#define FN_TABLE_SET_VERT_ALIGN (FN_FORMAT + 188) /* -"- */
+#define FN_TABLE_MODE_FIX (FN_FORMAT + 189) /* Tabellenmodus */
+#define FN_TABLE_MODE_FIX_PROP (FN_FORMAT + 190) /* -"- */
+#define FN_TABLE_MODE_VARIABLE (FN_FORMAT + 191) /* -"- */
+#define FN_TABLE_BOX_TEXTDIRECTION (FN_FORMAT + 192) /* text direction of table cells */
+
+#define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* Autosumme*/
+#define FN_SET_CONTROL_HANDLER (FN_FORMAT + 199) /* Macro setzen */
+
+#define FN_IS_IMAGE (FN_FORMAT2 + 6) /* Numerierung : mit Grafik?*/
+
+#define FN_GOTO_NEXT_REGION (FN_FORMAT2 + 9) /* Naechsten Bereich anspringen */
+#define FN_GOTO_PREV_REGION (FN_FORMAT2 + 10) /* Vorherigen " */
+
+#define FN_GET_SBXCONTROL (FN_FORMAT2 + 11) /* SbxObject rausreichen */
+#define FN_ABSTRACT_NEWDOC (FN_FORMAT2 + 12) /* Abstract in neuem Doc */
+#define FN_ABSTRACT_STARIMPRESS (FN_FORMAT2 + 13) /* Abstract an StarImpress */
+/* OD 2006-03-09 #i51726# - all drawing objects can be named now. */
+#define FN_NAME_SHAPE (FN_FORMAT2 + 14) /* Name shapes */
+
+// #i68101#
+#define FN_TITLE_DESCRIPTION_SHAPE (FN_FORMAT2 + 15) /* shape title and description */
+
+#define FN_NUMBER_FORMAT (FN_FORMAT2 + 120) /* Boxen/NumberFormatter eistellen */
+#define FN_NUMBER_STANDARD (FN_FORMAT2 + 121)
+#define FN_NUMBER_TWODEC (FN_FORMAT2 + 123)
+#define FN_NUMBER_SCIENTIFIC (FN_FORMAT2 + 124)
+#define FN_NUMBER_DATE (FN_FORMAT2 + 125)
+#define FN_NUMBER_TIME (FN_FORMAT2 + 126)
+#define FN_NUMBER_CURRENCY (FN_FORMAT2 + 127)
+#define FN_NUMBER_PERCENT (FN_FORMAT2 + 128)
+
+
+
+#define FN_FRAME_CHAIN (FN_FORMAT2 + 136)
+#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137)
+
+#define FN_NUMBER_NEWSTART (FN_FORMAT2 + 138)
+#define FN_NUMBER_NEWSTART_AT (FN_FORMAT2 + 139)
+
+#define FN_FRAME_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 140)
+#define FN_GRAPHIC_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 141)
+
+#define FN_TABLE_SPLIT_TABLE (FN_FORMAT2 + 142)
+#define FN_SYNC_LABELS (FN_FORMAT2 + 143)
+
+#define FN_FORMAT_LINENUMBER (FN_FORMAT2 + 144)
+
+#define FN_TABLE_RELATIVE_WIDTH (FN_FORMAT2 + 147) /* Tabelle: relative Breite - UNO */
+#define FN_TABLE_WIDTH (FN_FORMAT2 + 148) /* Tabelle: Breite - UNO */
+#define FN_TABLE_IS_RELATIVE_WIDTH (FN_FORMAT2 + 149) /* Tabelle: ist Breite relativ?- UNO */
+
+#define FN_INC_INDENT_OFFSET (FN_FORMAT2 + 150)
+#define FN_DEC_INDENT_OFFSET (FN_FORMAT2 + 151)
+
+#define FN_TABLE_MERGE_TABLE (FN_FORMAT2 + 152)
+#define FN_TABLE_ROW_SPLIT (FN_FORMAT2 + 153)
+
+#define FN_FORMAT_APPLY_HEAD1 (FN_FORMAT2 + 154)
+#define FN_FORMAT_APPLY_HEAD2 (FN_FORMAT2 + 155)
+#define FN_FORMAT_APPLY_HEAD3 (FN_FORMAT2 + 156)
+#define FN_FORMAT_APPLY_DEFAULT (FN_FORMAT2 + 157)
+#define FN_FORMAT_APPLY_TEXTBODY (FN_FORMAT2 + 158)
+#define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159)
+
+#define FN_SAVE_GRAPHIC (FN_FORMAT2 + 160)
+
+/*--------------------------------------------------------------------
+ Bereich: Extras
+ --------------------------------------------------------------------*/
+
+#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */
+#define FN_THESAURUS_DLG (FN_EXTRA + 3 ) /* Thesaurus */
+#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */
+#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */
+#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */
+#define FN_NUMBERING (FN_EXTRA + 9 ) /* Nummerierung/Bullets */
+#define FN_NUMBERING_DLG (FN_EXTRA + 10) /* Nummerierung/Bullets */
+#define FN_NUMBERING_OUTLINE (FN_EXTRA + 11) /* Gliederungsnumerierung */
+#define FN_NUMBERING_OUTLINE_DLG (FN_EXTRA + 12) /* Gliederungsnumerierung */
+#define FN_SORTING_DLG (FN_EXTRA + 14) /* Sortieren */
+#define FN_CALCULATE (FN_EXTRA + 15) /* Berechnen */
+#define FN_GENERATE_TOC_DLG (FN_EXTRA + 16) /* Inhaltsverzeichnis */
+#define FN_GENERATE_INDEX_DLG (FN_EXTRA + 17) /* Stichwortverzeichnis */
+#define FN_GENERATE_DIR_DLG (FN_EXTRA + 18) /* Verzeichnis */
+#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* Textbausteine */
+#define FN_MACRO_CHOOSER (FN_EXTRA + 21) /* Makro aufnehmen */
+
+
+#define FN_PLAY_MACRO (FN_EXTRA + 23) /* Makro abspielen */
+#define FN_LAUNCH_BASIC (FN_EXTRA + 25) /* Makro abspielen */
+#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* Textbausteine expandieren */
+#define FN_CONFIG_TOOLBOX (FN_EXTRA + 29) /* Konfiguration Toolbox */
+#define FN_CONFIG_MENU (FN_EXTRA + 30) /* Konfiguration Menu */
+#define FN_CONFIG_KEY (FN_EXTRA + 31) /* Konfiguration Tastatur */
+#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* Seitennummer aendern */
+
+#define FN_MACRO_POPUP (FN_EXTRA + 37) /* Alle Macrofunktionen */
+#define FN_BULLET (FN_EXTRA + 38) /* Bullet-Liste */
+
+
+// Bereich: Gloassaries
+
+// schon im Svx definiert
+
+//#define FN_GET_GLOSSARY_GROUP_COUNT (FN_EXTRA + 42) /* Anzahl der Bausteingruppen */
+
+#define FN_AUTO_CORRECT (FN_EXTRA + 49 ) /* Autocorrect aus Basic */
+
+
+#define FN_UPDATE_TOX (FN_EXTRA + 53) /* alle Verzeichnisse aktualisieren */
+#define FN_UPDATE_CUR_TOX (FN_EXTRA + 54) /* aktuelles Verzeichnisse aktualisieren */
+#define FN_REMOVE_CUR_TOX (FN_EXTRA + 55) /* remove the current TOX*/
+
+#define FN_NAVIGATION_PI_GOTO_PAGE (FN_EXTRA + 59 ) /* Seitenanwahl aus Navi-PI */
+
+
+#define FN_LETTER_WIZZARD (FN_EXTRA + 60 )
+#define FN_FAX_WIZZARD (FN_EXTRA + 61 )
+#define FN_MEMO_WIZZARD (FN_EXTRA + 62 )
+#define FN_AGENDA_WIZZARD (FN_EXTRA + 63 )
+
+#define FN_SET_BASIC_METRIC (FN_EXTRA + 80) /* Defaultmetrik Basic setzen */
+
+#define FN_RESERVED_9 (FN_EXTRA + 86) /* Platzhalter */
+#define FN_RESERVED_8 (FN_EXTRA + 87) /* Platzhalter */
+#define FN_RESERVED_7 (FN_EXTRA + 88) /* Platzhalter */
+#define FN_RESERVED_6 (FN_EXTRA + 89) /* Platzhalter */
+#define FN_RESERVED_5 (FN_EXTRA + 90) /* Platzhalter */
+#define FN_RESERVED_4 (FN_EXTRA + 91) /* Platzhalter */
+#define FN_RESERVED_3 (FN_EXTRA + 92) /* Platzhalter */
+#define FN_RESERVED_2 (FN_EXTRA + 93) /* Platzhalter */
+#define FN_RESERVED_1 (FN_EXTRA + 94) /* Platzhalter */
+
+#define FN_COLLECTION_GROUP_CNT (FN_EXTRA + 96)
+#define FN_COLLECTION_GROUP_IDX (FN_EXTRA + 97)
+#define FN_COLL_TYPE (FN_EXTRA + 98) /* Typ fuer GlobalDoc-Collection*/
+#define FN_COLL_ADD (FN_EXTRA + 99)
+
+#define FN_COLL_TITLE (FN_EXTRA2 + 1) /* Bereichsname oder Index-Title */
+#define FN_SHADOWCURSOR (FN_EXTRA2 + 4) /* Shadow Cursor ein/ausschalten */
+
+
+#define FN_VIEW_IN_FRAME (FN_EXTRA2 + 8) /* die View befindet sich in einem FrameDoc*/
+
+#define FN_UNO_PARA_STYLE (FN_EXTRA2 + 9) // jetzt kommen diverse UNO-Ids fuer die
+#define FN_UNO_PAGE_STYLE (FN_EXTRA2 + 10) // PropertyMap
+
+#define FN_UNO_FRAME_STYLE_NAME (FN_EXTRA2 + 12)
+#define FN_UNO_NUM_START_VALUE (FN_EXTRA2 + 13)
+#define FN_UNO_NUM_LEVEL (FN_EXTRA2 + 14)
+#define FN_UNO_NUM_RULES (FN_EXTRA2 + 15)
+#define FN_UNO_DOCUMENT_INDEX_MARK (FN_EXTRA2 + 16)
+#define FN_UNO_DOCUMENT_INDEX (FN_EXTRA2 + 17)
+#define FN_UNO_TEXT_FIELD (FN_EXTRA2 + 18)
+#define FN_UNO_TEXT_TABLE (FN_EXTRA2 + 19)
+#define FN_UNO_CELL (FN_EXTRA2 + 20)
+#define FN_UNO_TEXT_FRAME (FN_EXTRA2 + 21)
+#define FN_UNO_REFERENCE_MARK (FN_EXTRA2 + 22)
+#define FN_UNO_TEXT_SECTION (FN_EXTRA2 + 23)
+#define FN_UNO_FOOTNOTE (FN_EXTRA2 + 24)
+#define FN_UNO_ENDNOTE (FN_EXTRA2 + 25)
+#define FN_UNO_RANGE_COL_LABEL (FN_EXTRA2 + 26)
+#define FN_UNO_RANGE_ROW_LABEL (FN_EXTRA2 + 27)
+#define FN_UNO_TABLE_COLUMS (FN_EXTRA2 + 28)
+#define FN_UNO_TABLE_BORDER (FN_EXTRA2 + 29)
+#define FN_UNO_TABLE_COLUMN_SEPARATORS (FN_EXTRA2 + 30)
+#define FN_UNO_TABLE_COLUMN_RELATIVE_SUM (FN_EXTRA2 + 31)
+#define FN_UNO_TABLE_CELL_BACKGROUND (FN_EXTRA2 + 32)
+#define FN_UNO_ROW_HEIGHT (FN_EXTRA2 + 33)
+#define FN_UNO_ROW_AUTO_HEIGHT (FN_EXTRA2 + 34)
+#define FN_UNO_HEADER (FN_EXTRA2 + 35)
+#define FN_UNO_HEADER_LEFT (FN_EXTRA2 + 36)
+#define FN_UNO_HEADER_RIGHT (FN_EXTRA2 + 37)
+#define FN_UNO_FOOTER (FN_EXTRA2 + 38)
+#define FN_UNO_FOOTER_LEFT (FN_EXTRA2 + 39)
+#define FN_UNO_FOOTER_RIGHT (FN_EXTRA2 + 40)
+#define FN_UNO_HEADER_BACKGROUND (FN_EXTRA2 + 41)
+#define FN_UNO_HEADER_BOX (FN_EXTRA2 + 42)
+#define FN_UNO_HEADER_LR_SPACE (FN_EXTRA2 + 43)
+#define FN_UNO_HEADER_SHADOW (FN_EXTRA2 + 44)
+#define FN_UNO_FOOTER_BACKGROUND (FN_EXTRA2 + 45)
+#define FN_UNO_FOOTER_BOX (FN_EXTRA2 + 46)
+#define FN_UNO_FOOTER_LR_SPACE (FN_EXTRA2 + 47)
+#define FN_UNO_FOOTER_SHADOW (FN_EXTRA2 + 48)
+#define FN_UNO_HEADER_BODY_DISTANCE (FN_EXTRA2 + 49)
+#define FN_UNO_HEADER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 50)
+#define FN_UNO_FOOTER_BODY_DISTANCE (FN_EXTRA2 + 51)
+#define FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 52)
+#define FN_UNO_HEADER_SHARE_CONTENT (FN_EXTRA2 + 53)
+#define FN_UNO_FOOTER_SHARE_CONTENT (FN_EXTRA2 + 54)
+#define FN_UNO_HEADER_HEIGHT (FN_EXTRA2 + 55)
+#define FN_UNO_FOOTER_HEIGHT (FN_EXTRA2 + 56)
+#define FN_UNO_HEADER_ON (FN_EXTRA2 + 57)
+#define FN_UNO_FOOTER_ON (FN_EXTRA2 + 58)
+#define FN_UNO_FOLLOW_STYLE (FN_EXTRA2 + 59)
+
+#define FN_API_CALL (FN_EXTRA2 + 60)
+
+#define FN_UNO_IS_PHYSICAL (FN_EXTRA2 + 61)
+#define FN_UNO_IS_AUTO_UPDATE (FN_EXTRA2 + 62)
+#define FN_UNO_DISPLAY_NAME (FN_EXTRA2 + 63)
+
+#define FN_UNO_WRAP (FN_EXTRA2 + 64)
+#define FN_UNO_ANCHOR_TYPES (FN_EXTRA2 + 65)
+#define FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL (FN_EXTRA2 + 66)
+#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME (FN_EXTRA2 + 67)
+
+#define FN_UNO_CATEGORY (FN_EXTRA2 + 68)
+#define FN_UNO_IS_NUMBER (FN_EXTRA2 + 69)
+#define FN_UNO_TEXT_WRAP (FN_EXTRA2 + 70)
+#define FN_UNO_ANCHOR_TYPE (FN_EXTRA2 + 71)
+#define FN_SKIP_HIDDEN_TEXT (FN_EXTRA2 + 72)
+#define FN_SKIP_PROTECTED_TEXT (FN_EXTRA2 + 73)
+#define FN_UNO_Z_ORDER (FN_EXTRA2 + 74)
+#define FN_UNO_REDLINE_NODE_START (FN_EXTRA2 + 75)
+#define FN_UNO_REDLINE_NODE_END (FN_EXTRA2 + 76)
+#define FN_UNO_TEXT_PORTION_TYPE (FN_EXTRA2 + 77)
+#define FN_UNO_CONTROL_CHARACTER (FN_EXTRA2 + 78)
+#define FN_UNO_BOOKMARK (FN_EXTRA2 + 79)
+#define FN_UNO_IS_COLLAPSED (FN_EXTRA2 + 80)
+#define FN_UNO_IS_START (FN_EXTRA2 + 81)
+#define FN_UNO_IS_AUTOMATIC_CONTOUR (FN_EXTRA2 + 82)
+#define FN_UNO_IS_PIXEL_CONTOUR (FN_EXTRA2 + 83)
+#define FN_UNO_ALTERNATIVE_TEXT (FN_EXTRA2 + 84)
+#define FN_UNO_ACTUAL_SIZE (FN_EXTRA2 + 85)
+#define FN_UNO_GRAPHIC_U_R_L (FN_EXTRA2 + 86)
+#define FN_UNO_GRAPHIC_FILTER (FN_EXTRA2 + 87)
+#define FN_UNO_CELL_NAME (FN_EXTRA2 + 88)
+#define FN_INSERT_GLOSSARY (FN_EXTRA2 + 89)
+#define FN_NEW_GLOSSARY (FN_EXTRA2 + 90)
+#define FN_SET_ACT_GLOSSARY (FN_EXTRA2 + 91)
+
+#define FN_UNO_HEADER_EAT_SPACING (FN_EXTRA2 + 92)
+#define FN_UNO_FOOTER_EAT_SPACING (FN_EXTRA2 + 93)
+#define FN_UNO_CHARFMT_SEQUENCE (FN_EXTRA2 + 94)
+#define FN_UNO_CLSID (FN_EXTRA2 + 95)
+#define FN_UNO_MODEL (FN_EXTRA2 + 96)
+#define FN_UNO_COMPONENT (FN_EXTRA2 + 97)
+#define FN_WORDCOUNT_DIALOG (FN_EXTRA2 + 98)
+
+//#define FN_UNO_DEFAULT_OUTLINE_LEVEL (FN_EXTRA2 + 99)//#outline level,removed by zahojianwei
+
+#define FN_XFORMS_DESIGN_MODE (FN_EXTRA2 + 100)
+
+#define FN_UNO_PARA_STYLE_CONDITIONS (FN_EXTRA2 + 101)
+#define FN_UNO_GRAPHIC (FN_EXTRA2 + 102)
+
+#define FN_UNO_REPLACEMENT_GRAPHIC_URL (FN_EXTRA2 + 102)
+#define FN_UNO_CELL_ROW_SPAN (FN_EXTRA2 + 103)
+#define FN_UNO_TABLE_BORDER_DISTANCES (FN_EXTRA2 + 104)
+#define FN_SPELL_GRAMMAR_DIALOG (FN_EXTRA2 + 105)
+#define FN_UNO_STREAM_NAME (FN_EXTRA2 + 106)
+// --> OD 2008-07-14 #i91601#
+#define FN_UNO_LIST_ID (FN_EXTRA2 + 107)
+// <--
+#define FN_UNO_REPLACEMENT_GRAPHIC (FN_EXTRA2 + 108)
+
+#define FN_UNO_PARA_CONT_PREV_SUBTREE (FN_EXTRA2 + 109)
+#define FN_UNO_PARA_NUM_STRING (FN_EXTRA2 + 110)
+#define FN_UNO_TABLE_NAME (FN_EXTRA2 + 111)
+#define FN_UNO_META (FN_EXTRA2 + 112)
+
+/*--------------------------------------------------------------------
+ Bereich: Hilfe
+ --------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------
+ Bereich: Traveling & Selektion
+ --------------------------------------------------------------------*/
+
+#define FN_CHAR_LEFT (FN_SELECTION + 1 ) /* */
+#define FN_CHAR_RIGHT (FN_SELECTION + 2 ) /* */
+#define FN_LINE_UP (FN_SELECTION + 3 ) /* */
+#define FN_LINE_DOWN (FN_SELECTION + 4 ) /* */
+#define FN_START_OF_LINE (FN_SELECTION + 5 ) /* StartOfLine */
+#define FN_END_OF_LINE (FN_SELECTION + 6 ) /* EndOfLine */
+#define FN_START_OF_DOCUMENT (FN_SELECTION + 7 ) /* StartOfDocument */
+//schon in svxids.hrc
+//#define FN_END_OF_DOCUMENT (FN_SELECTION + 8 ) /* EndOfDocument */
+#define FN_START_OF_NEXT_PAGE (FN_SELECTION + 9 ) /* StartOfNextPage ??? */
+#define FN_END_OF_NEXT_PAGE (FN_SELECTION + 10) /* ??? */
+#define FN_START_OF_PREV_PAGE (FN_SELECTION + 11) /* StartOfPrevPage ??? */
+#define FN_END_OF_PREV_PAGE (FN_SELECTION + 12) /* ??? */
+#define FN_START_OF_PAGE (FN_SELECTION + 13) /* StartOfPage */
+#define FN_END_OF_PAGE (FN_SELECTION + 14) /* EndOfPage */
+#define FN_START_OF_WINDOW (FN_SELECTION + 15) /* StartOfWindow */
+#define FN_END_OF_WINDOW (FN_SELECTION + 16) /* EndOfWindow */
+#define FN_START_OF_COLUMN (FN_SELECTION + 17) /* StartOfColumn */
+#define FN_END_OF_COLUMN (FN_SELECTION + 18) /* EndOfColumn */
+#define FN_START_OF_PARA (FN_SELECTION + 19) /* StartOfPara */
+#define FN_END_OF_PARA (FN_SELECTION + 20) /* EndOfPara */
+#define FN_NEXT_WORD (FN_SELECTION + 21) /* NextWord */
+#define FN_PREV_WORD (FN_SELECTION + 22) /* PrevWord */
+#define FN_NEXT_SENT (FN_SELECTION + 23) /* NextSentence */
+#define FN_PREV_SENT (FN_SELECTION + 24) /* PrevSentence */
+#define FN_DELETE (FN_SELECTION + 25) /* Delete */
+#define FN_BACKSPACE (FN_SELECTION + 26) /* Backspace */
+#define FN_DELETE_SENT (FN_SELECTION + 27) /* DeleteToEndOfSentence */
+#define FN_DELETE_BACK_SENT (FN_SELECTION + 28) /* DeleteToStartOfSentence */
+#define FN_DELETE_WORD (FN_SELECTION + 29) /* DeleteToEndOfWord */
+#define FN_DELETE_BACK_WORD (FN_SELECTION + 30) /* DeleteToStartOfWord */
+#define FN_DELETE_LINE (FN_SELECTION + 31) /* DeleteToEndOfLine */
+#define FN_DELETE_BACK_LINE (FN_SELECTION + 32) /* DeleteToStartOfLine */
+#define FN_DELETE_PARA (FN_SELECTION + 33) /* DeleteToEndOfPara */
+#define FN_DELETE_BACK_PARA (FN_SELECTION + 34) /* DeleteToStartOfPara */
+#define FN_DELETE_WHOLE_LINE (FN_SELECTION + 35) /* DeleteLine ??? */
+#define FN_SET_INS_MODE (FN_SELECTION + 36) /* Einfuegemodus / Overwrite */
+#define FN_PAGEUP (FN_SELECTION + 37) /* PageUpWithCursor */
+#define FN_PAGEDOWN (FN_SELECTION + 38) /* PageDownWithCursor */
+#define FN_SET_ADD_MODE (FN_SELECTION + 39) /* Selektionsmodus */
+#define FN_SET_EXT_MODE (FN_SELECTION + 40) /* Selektionsmodus */
+#define FN_ESCAPE (FN_SELECTION + 41) /* Normal */
+#define FN_SHIFT_BACKSPACE (FN_SELECTION + 42) /* wie Backspace */
+#define FN_SELECT_WORD (FN_SELECTION + 43) /* Wort selektieren */
+
+#define FN_GOTO_NEXT_OBJ (FN_SELECTION + 44) /* N�chstes Objekt anspringen */
+#define FN_GOTO_PREV_OBJ (FN_SELECTION + 45) /* Vorhergehendes Objekt anspringen */
+
+#define FN_START_TABLE (FN_SELECTION + 47) /* an den Anfang der Tabelle */
+#define FN_END_TABLE (FN_SELECTION + 48) /* an das Ende der Tabelle */
+#define FN_NEXT_TABLE (FN_SELECTION + 49) /* zur vorhergehenden Tabelle */
+#define FN_PREV_TABLE (FN_SELECTION + 50) /* zur naechsten Tabelle */
+
+#define FN_START_OF_NEXT_COLUMN (FN_SELECTION + 51) /* zum Anfang der naechsten Spalte */
+#define FN_END_OF_NEXT_COLUMN (FN_SELECTION + 52) /* zum Ende der naechsten Spalte */
+#define FN_START_OF_PREV_COLUMN (FN_SELECTION + 53) /* zum Anfang der vorhergehenden Spalte */
+#define FN_END_OF_PREV_COLUMN (FN_SELECTION + 54) /* zum Ende der vorhergehenden Spalte */
+
+#define FN_FOOTNOTE_TO_ANCHOR (FN_SELECTION + 55) /* aus der Fussnote zum Anchor */
+#define FN_NEXT_FOOTNOTE (FN_SELECTION + 56) /* zur naechsten Fussnote */
+#define FN_PREV_FOOTNOTE (FN_SELECTION + 57) /* zur vorhergehenden Fussnote */
+
+#define FN_CNTNT_TO_NEXT_FRAME (FN_SELECTION + 58) /* aus dem Inhalt zum naechsten Rahmen */
+#define FN_FRAME_TO_ANCHOR (FN_SELECTION + 59) /* vom Rahmen zum Anker */
+
+#define FN_TO_HEADER (FN_SELECTION + 60) /* Toggle zwischen Content und Kopfzeile */
+#define FN_TO_FOOTER (FN_SELECTION + 61) /* Toggle zwischen Content und Fusszeile */
+
+#define FN_IDX_MARK_TO_IDX (FN_SELECTION + 62) /* von der Verzeichnismarkierung zum Verzeichnis */
+
+#define FN_TO_FOOTNOTE_AREA (FN_SELECTION + 63) /* jump into the appropriate footnote area */
+
+#define FN_SET_BLOCK_MODE (FN_SELECTION + 64) /* selection mode: block */
+
+
+
+#define FN_PREV_PARA (FN_SELECTION + 74)
+#define FN_NEXT_PARA (FN_SELECTION + 75)
+
+#define FN_GOTO_NEXT_MARK (FN_SELECTION + 76) /* N�chsten Platzhalter anspringen */
+#define FN_GOTO_PREV_MARK (FN_SELECTION + 77) /* Vorhergehenden Platzhalter anspringen */
+
+// schon im SVX unter der gleichen Id
+//#define FN_START_DOC_DIRECT (FN_SELECTION + 78) /* Direkt zum Dokanfang springen */
+//#define FN_END_DOC_DIRECT (FN_SELECTION + 79) /* Direkt zum Dokanfang springen */
+
+#define FN_NEXT_TOXMARK (FN_SELECTION + 83) /* zur naechsten Verz. Markierung */
+#define FN_PREV_TOXMARK (FN_SELECTION + 84) /* zur vorherigen Verz. Markierung */
+#define FN_NEXT_TBLFML (FN_SELECTION + 85) /* zur naechsten Tabellenformel */
+#define FN_PREV_TBLFML (FN_SELECTION + 86) /* zur vorherigen Tabellenformel */
+#define FN_NEXT_TBLFML_ERR (FN_SELECTION + 87) /* zur naechsten fehl. Tabellenformel */
+#define FN_PREV_TBLFML_ERR (FN_SELECTION + 88) /* zur vorherigen fehl. Tabellenformel */
+
+#define FN_READONLY_SELECTION_MODE (FN_SELECTION + 89) /* switches text selection mode in readonly documents*/
+#define FN_SELECTION_MODE_DEFAULT (FN_SELECTION + 90) /* use default selection mode - not block mode */
+#define FN_SELECTION_MODE_BLOCK (FN_SELECTION + 91) /* switch on block selection */
+
+/*--------------------------------------------------------------------
+ QUERY-Block
+ --------------------------------------------------------------------*/
+
+
+
+#define FN_IS_MODIFIED (FN_QUERY +16) /* Dokument geaendert? */
+#define FN_RESET_MODIFIED (FN_QUERY +17) /* Geaendert-Flag zuruecksetzen */
+
+#define FN_GET_DOC_INFO (FN_QUERY +22) /* Wert Dokumentinfo erfragen */
+#define FN_GET_ERRNO (FN_QUERY +26) /* Error-Nummer abfragen */
+#define FN_GET_DOCMAN_PATH (FN_QUERY +27) /* Pfad zu einer Gruppe im Docmgr erfragen */
+
+#define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribut */
+#define FN_EXECUTE_DRAG (FN_QUERY +30) /* D&D starten */
+
+#define FN_GET_PRINT_AREA (FN_QUERY +32) /* Attribut fuer druckbaren Seitenbereich besorgen */
+
+
+
+// #define FN_IS_START_OF_PAGE (FN_QUERY +40) /**/
+// #define FN_IS_END_OF_PAGE (FN_QUERY +41) /**/
+
+#define FN_GET_PARAGRAPH (FN_QUERY +48) /* Paragraph-Object von der Textshell
+ an die View weiterreichen*/
+// hier ist Schluss!!!
+
+#define FN_DB_FORM_LETTER (FN_QUERY2 + 0) /* form letter */
+#define FN_DB_INSERT_CONTENT (FN_QUERY2 + 1) /* merge data into fields*/
+#define FN_DB_INSERT_COLUMNS (FN_QUERY2 + 2) /* insert data into text/table/as fields*/
+#define FN_DB_CONNECTION_ANY (FN_QUERY2 + 3)
+#define FN_DB_COLUMN_ANY (FN_QUERY2 + 4)
+#define FN_DB_DATA_SOURCE_ANY (FN_QUERY2 + 5)
+#define FN_DB_DATA_COMMAND_ANY (FN_QUERY2 + 6)
+#define FN_DB_DATA_COMMAND_TYPE_ANY (FN_QUERY2 + 7)
+#define FN_DB_DATA_COLUMN_NAME_ANY (FN_QUERY2 + 8)
+#define FN_DB_DATA_SELECTION_ANY (FN_QUERY2 + 9)
+#define FN_DB_DATA_CURSOR_ANY (FN_QUERY2 + 10)
+
+/*--------------------------------------------------------------------
+ Bereich: Envelope
+ --------------------------------------------------------------------*/
+
+#define FN_ENVELOP (FN_ENVELP )
+
+#define FN_DELETE_NOTE (FN_NOTES+0)
+#define FN_DELETE_NOTE_AUTHOR (FN_NOTES+1)
+#define FN_DELETE_ALL_NOTES (FN_NOTES+2)
+#define FN_HIDE_NOTE (FN_NOTES+3)
+#define FN_HIDE_NOTE_AUTHOR (FN_NOTES+4)
+#define FN_HIDE_ALL_NOTES (FN_NOTES+5)
+
+#define FN_DELETE_COMMENT (FN_NOTES+6)
+#define FN_REPLY (FN_NOTES+7)
+
+
+/*--------------------------------------------------------------------
+ Bereich: Parameter
+ --------------------------------------------------------------------*/
+
+#define FN_PARAM_TABLE_COLS (FN_PARAM)
+#define FN_PARAM_TABLE_ROWS (FN_PARAM+1)
+#define FN_PARAM_MOVE_COUNT (FN_PARAM+2)
+#define FN_PARAM_MOVE_SELECTION (FN_PARAM+3)
+
+#define FN_PARAM_SEARCH_WORDONLY (FN_PARAM+5)
+#define FN_PARAM_SEARCH_EXACT (FN_PARAM+6)
+#define FN_PARAM_SEARCH_REGEXP (FN_PARAM+7)
+#define FN_PARAM_SEARCH_BACKWARDS (FN_PARAM+8)
+#define FN_PARAM_SEARCH_FINDALL (FN_PARAM+9)
+#define FN_PARAM_SEARCH_SELECTION (FN_PARAM+10)
+#define FN_PARAM_SEARCH_TEXT (FN_PARAM+11)
+#define FN_PARAM_SEARCH_TEXTREPLACE (FN_PARAM+12)
+
+#define FN_PARAM_PARADLGLIMITS (FN_PARAM+15)
+#define FN_PARAM_FRMMODE (FN_PARAM+16)
+
+#define FN_PARAM_ADDPRINTER (FN_PARAM+18)
+#define FN_PARAM_GRID (FN_PARAM+19)
+#define FN_PARAM_DOCDISP (FN_PARAM+20)
+#define FN_PARAM_ELEM (FN_PARAM+21)
+#define FN_PARAM_SWTEST (FN_PARAM+22)
+
+#define FN_PARAM_FTN_INFO (FN_PARAM+23)
+
+#define FN_PARAM_REGION_NAME (FN_PARAM+24)
+#define FN_PARAM_REGION_CONDITION (FN_PARAM+25)
+#define FN_PARAM_REGION_HIDDEN (FN_PARAM+26)
+#define FN_PARAM_REGION_PROTECT (FN_PARAM+27)
+#define FN_PARAM_REGION_EDIT_IN_READONLY (FN_PARAM+28)
+
+#define FN_PARAM_INSERT_AFTER (FN_PARAM+29)
+//#define FN_PARAM_FILTER (FN_PARAM+30) already defined in svx/svxids.hrc
+#define FN_PARAM_INDEX_NAME (FN_PARAM+31)
+#define FN_PARAM_INDEX_OPTIONS (FN_PARAM+32)
+#define FN_PARAM_INDEX_FORMAT (FN_PARAM+33)
+#define FN_PARAM_INDEX_LEVEL (FN_PARAM+34)
+#define FN_PARAM_INDEX_TEMPLATE (FN_PARAM+35)
+#define FN_PARAM_INDEX_ALTSTR (FN_PARAM+36)
+#define FN_PARAM_INDEX_PRIMKEY (FN_PARAM+37)
+#define FN_PARAM_INDEX_SECKEY (FN_PARAM+38)
+#define FN_PARAM_WIDTH (FN_PARAM+39)
+#define FN_PARAM_LOCATION (FN_PARAM+40)
+#define FN_PARAM_DIR (FN_PARAM+41)
+#define FN_PARAM_COUNT (FN_PARAM+42)
+#define FN_PARAM_COLOR (FN_PARAM+43)
+
+#define FN_PARAM_TABLE_NAME (FN_PARAM+44)
+#define FN_PARAM_TABLE_WIDTH (FN_PARAM+45)
+#define FN_PARAM_TABLE_ULSPACE (FN_PARAM+46)
+#define FN_PARAM_TABLE_LRSPACE (FN_PARAM+47)
+#define FN_PARAM_TABLE_SHADOW (FN_PARAM+48)
+#define FN_PARAM_TABLE_ALIGN (FN_PARAM+49)
+#define FN_PARAM_TABLE_HEADLINE (FN_PARAM+50)
+#define FN_PARAM_TABLE_SPACE (FN_PARAM+51)
+#define FN_PARAM_TABLE_COLUMNS (FN_PARAM+52)
+
+#define FN_PARAM_GRF_CONNECT (FN_PARAM+53)
+#define FN_PARAM_FIELD_TYPE (FN_PARAM+54)
+//already defined in svxids.hrc: #define FN_PARAM_FIELD_CONTENT (FN_PARAM+55)
+#define FN_PARAM_FIELD_SUBTYPE (FN_PARAM+56)
+#define FN_PARAM_FIELD_FORMAT (FN_PARAM+57)
+
+
+#define FN_PARAM_EVENT (FN_PARAM+68)
+#define FN_PARAM_URL (FN_PARAM+69)
+#define FN_PARAM_GRF_REALSIZE (FN_PARAM+70)
+#define FN_PARAM_GRF_DIALOG (FN_PARAM+71)
+#define FN_PARAM_GRF_CLIENTMAP (FN_PARAM+74) /* ClientMap */
+#define FN_PARAM_GRF_SERVERMAP (FN_PARAM+75) /* ServerMap */
+#define FN_PARAM_GRF_TARGETFRAME (FN_PARAM+76) /* TargetFrame */
+#define FN_INET_FIELD_MACRO (FN_PARAM+77) /* Id fuer URL-Feld-Macros*/
+
+#define FN_PARAM_PRINTER (FN_PARAM+78) /* Drucker* */
+#define FN_PARAM_STDFONTS (FN_PARAM+79) /* ConfigItem Standardfonts */
+
+#define FN_PARAM_WRTSHELL (FN_PARAM2) /* SwWrtShell */
+
+#define FN_COND_COLL (FN_PARAM2+1) /* Item fuer bed. Vorlagen */
+#define FN_PARAM_SELECTION (FN_PARAM2+2) /* selektiertes Wort fuer Format/Zeichen/Hyperlink */
+
+#define FN_PARAM_ACT_NUMBER (FN_PARAM2+3) /* PointerItem die aktuelle NumRule */
+#define FN_PARAM_CHILD_LEVELS (FN_PARAM2+4) /* Werden Child-Levels benutzt ?*/
+
+#define FN_PARAM_NUM_PRESET (FN_PARAM2+5) /* vorgewaehlte Numerierung*/
+
+#define FN_PARAM_HEIGHT (FN_PARAM2+6) /* Param fuer Hoehe */
+#define FN_PARAM_DIST (FN_PARAM2+7) /* und Breite, wg. metrischer Umwandlung */
+
+#define FN_PARAM_SHADOWCURSOR (FN_PARAM2+8) /* Fuer ShadowCursor Optionen */
+
+#define FN_PARAM_ACT_NUMLEVEL (FN_PARAM2+9) /* BYTE-Item mit aktuellen NumLevel */
+
+#define FN_PARAM_9 (FN_PARAM2+10)
+#define FN_PARAM_10 (FN_PARAM2+11)
+
+#define FN_TEXT_RANGE (FN_PARAM2+12) /* TextRange Property*/
+
+#define FN_PARAM_CRSR_IN_PROTECTED (FN_PARAM2+13) /* Cursor in geschuetzten Bereichen*/
+#define FN_PARAM_TOX_TYPE (FN_PARAM2+14) /* TOX type in tox dialog*/
+#define FN_PARAM_LINK_DISPLAY_NAME (FN_PARAM2+15) /* LinkDisplayName property*/
+#define FN_PARAM_NUM_LEVEL (FN_PARAM2+16) /* rtf filter*/
+#define FN_PARAM_COUNTOUR_PP (FN_PARAM2+17) /* contour PolyPolygon*/
+
+#define FN_ANCHOR_POSITION (FN_PARAM2+18) /* AnchorPosition property */
+#define FN_DROP_TEXT (FN_PARAM2+18) /* text set in drop caps tab page - for recording */
+#define FN_DROP_CHAR_STYLE_NAME (FN_PARAM2+19) /* character style of drop caps - for recording */
+#define FN_PARAM_CHAIN_PREVIOUS (FN_PARAM2+20) /* Name of frame to be added as chain successor */
+#define FN_PARAM_CHAIN_NEXT (FN_PARAM2+21) /* Name of frame to be added as chain predecessor */
+#define FN_PARAM_DATABASE_PROPERTIES (FN_PARAM2+22) /* transport a Sequence<PropertyValue> containing database properties*/
+// --> OD 2004-08-06 #i28749#
+// com::sun::star::text::Shape::TransformationInHoriL2R property
+#define FN_SHAPE_TRANSFORMATION_IN_HORI_L2R (FN_PARAM2+23)
+// com::sun::star::text::Shape::PositionLayoutDir property
+#define FN_SHAPE_POSITION_LAYOUT_DIR (FN_PARAM2+24)
+// <--
+// --> OD 2004-10-28 #i36248#
+#define FN_SHAPE_STARTPOSITION_IN_HORI_L2R (FN_PARAM2+25)
+#define FN_SHAPE_ENDPOSITION_IN_HORI_L2R (FN_PARAM2+26)
+
+// <--
+/*--------------------------------------------------------------------
+ Bereich: Druckoptionen
+ --------------------------------------------------------------------*/
+
+#define FN_PRNOPT_GRAPHIC (FN_PRNOPT + 1)
+#define FN_PRNOPT_TABLE (FN_PRNOPT + 2)
+#define FN_PRNOPT_LEFT_PAGE (FN_PRNOPT + 3)
+#define FN_PRNOPT_RIGHT_PAGE (FN_PRNOPT + 4)
+#define FN_PRNOPT_REVERSE (FN_PRNOPT + 5)
+#define FN_PRNOPT_PAPER_FROM_SETUP (FN_PRNOPT + 6)
+#define FN_PRNOPT_POSTITS (FN_PRNOPT + 8)
+
+#define FN_PRNOPT_BEGIN FN_PRNOPT_GRAPHIC
+#define FN_PRNOPT_END FN_PRNOPT_POSTITS
+
+/*--------------------------------------------------------------------
+ Beschreibung: Status : nicht mehr als 19!
+ --------------------------------------------------------------------*/
+
+#define FN_STAT_PAGE (FN_STAT + 1)
+#define FN_STAT_TEMPLATE (FN_STAT + 2)
+#define FN_STAT_ZOOM (FN_STAT + 3)
+#define FN_STAT_INSOVER (FN_STAT + 4)
+#define FN_STAT_SELMODE (FN_STAT + 5)
+#define FN_STAT_CONTEXT (FN_STAT + 7)
+#define FN_STAT_BOOKMARK (FN_STAT + 8) /* Fuer Popup Bookmarks*/
+
+/*--------------------------------------------------------------------
+ Bereich: Seitenvorschau
+ --------------------------------------------------------------------*/
+
+#define FN_SHOW_TWO_PAGES (FN_PGPREVIEW + 1)
+//already in svx/svxids.hrc
+#ifndef FN_SHOW_MULTIPLE_PAGES
+#define FN_SHOW_MULTIPLE_PAGES (FN_PGPREVIEW + 2)
+#endif
+#define FN_PRINT_PAGEPREVIEW (FN_PGPREVIEW + 3)
+#define FN_CLOSE_PAGEPREVIEW (FN_PGPREVIEW + 4)
+#define FN_SHOW_BOOKVIEW (FN_PGPREVIEW + 5)
+
+/*--------------------------------------------------------------------
+ Bereich: Rahmenattribute
+ --------------------------------------------------------------------*/
+
+#define FN_OPAQUE (FN_FRAME + 1)
+#define FN_SET_PROTECT (FN_FRAME + 2)
+#define FN_SURROUND (FN_FRAME + 3)
+#define FN_VERT_ORIENT (FN_FRAME + 4)
+#define FN_HORI_ORIENT (FN_FRAME + 5)
+#define FN_SET_FRM_NAME (FN_FRAME + 6)
+#define FN_KEEP_ASPECT_RATIO (FN_FRAME + 7)
+#define FN_GRF_KEEP_ZOOM (FN_FRAME + 8)
+
+#define FN_IID_COL1 (FN_FRAME + 13)
+#define FN_IID_COL2 (FN_FRAME + 14)
+#define FN_IID_COL3 (FN_FRAME + 15)
+#define FN_IID_COLLEFT (FN_FRAME + 16)
+#define FN_IID_COLRIGHT (FN_FRAME + 17)
+
+#define FN_SET_FRM_ALT_NAME (FN_FRAME + 18)
+// --> OD 2009-07-13 #i73249#
+#define FN_UNO_TITLE (FN_FRAME + 19)
+#define FN_UNO_DESCRIPTION (FN_FRAME + 20)
+// <--
+
+
+//Member-Ids fuer Fill/SetVariable an Items
+#define MID_STYLE 0xe0
+#define MID_PWIDTH 0xe1
+#define MID_ADJUST 0xe2
+#define MID_TDIST 0xe3
+#define MID_BDIST 0xe4
+#define MID_LINES 0xe5
+#define MID_CHARS 0xe6
+#define MID_DIST 0xe7
+
+#define MID_1 0xe8
+#define MID_2 0xe9
+#define MID_3 0xea
+#define MID_4 0xeb
+#define MID_5 0xec
+#define MID_6 0xed
+#define MID_7 0xee
+#define MID_8 0xef
+#define MID_9 0xf0
+#define MID_A 0xf1
+#define MID_B 0xf2
+#define MID_C 0xf3
+#define MID_D 0xf4
+#define MID_E 0xf5
+#define MID_F 0xf6
+#define MID_10 0xf7
+#define MID_11 0xf8
+#define MID_12 0xf9
+#define MID_13 0xfa
+
+#ifndef SID_SW_DOCMAN_PATH
+#define SID_SW_DOCMAN_PATH (SID_OFASLOTS_START + 6)
+#endif
+
+// defines fuer Event-Zuweisung per Macro
+#define MAC_EVENT_MOUSEOVER 0x01 //
+#define MAC_EVENT_MOUSECLICK 0x02 // Hyperlink ausloesen
+#define MAC_EVENT_MOUSEOUT 0x03 //
+#define MAC_EVENT_OBJECT_SELECT 0x04 // Obj. selektieren
+#define MAC_EVENT_KEYINPUT_ALPHA 0x05 //
+#define MAC_EVENT_KEYINPUT_NOALPHA 0x06 //
+#define MAC_EVENT_FRM_RESIZE 0x07 //
+#define MAC_EVENT_FRM_MOVE 0x08 //
+#define MAC_EVENT_IMAGE_LOAD 0x09 //
+#define MAC_EVENT_IMAGE_ABORT 0x0a //
+#define MAC_EVENT_IMAGE_ERROR 0x0b //
+
+#endif /* INCLUDED_SW_CMDID_H */
diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx
new file mode 100644
index 000000000000..42bbd8813152
--- /dev/null
+++ b/sw/inc/colwd.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: colwd.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _COLWD_HXX
+#define _COLWD_HXX
+
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+
+
+class SwTableFUNC;
+
+class SwTableWidthDlg : public SvxStandardDialog
+{
+ FixedText aColFT;
+ NumericField aColEdit;
+ FixedText aWidthFT;
+ MetricField aWidthEdit;
+ FixedLine aWidthFL;
+ OKButton aOKBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+ SwTableFUNC &rFnc;
+
+protected:
+ virtual void Apply();
+ DECL_LINK( LoseFocusHdl, Edit* pEdt=0 );
+
+public:
+ SwTableWidthDlg(Window *pParent, SwTableFUNC &rFnc );
+};
+
+#endif
diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc
new file mode 100644
index 000000000000..c02af7ad0070
--- /dev/null
+++ b/sw/inc/comcore.hrc
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: comcore.hrc,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _COMCORE_HRC
+#define _COMCORE_HRC
+
+#include "rcid.hrc"
+
+// ---------------
+// die Strings
+// ---------------
+
+#define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0)
+#define MSG_COMCORE_ASKSEARCH (RC_COMCORE_BEGIN + 1)
+#define STR_TABLE_DEFNAME (RC_COMCORE_BEGIN + 2)
+#define STR_GRAPHIC_DEFNAME (RC_COMCORE_BEGIN + 3)
+#define STR_OBJECT_DEFNAME (RC_COMCORE_BEGIN + 4)
+#define STR_FRAME_DEFNAME (RC_COMCORE_BEGIN + 5)
+#define STR_REGION_DEFNAME (RC_COMCORE_BEGIN + 6)
+#define STR_COMCORE_CANT_SHOW (RC_COMCORE_BEGIN + 7)
+#define RID_GRAPHIC_REPLACEBMP (RC_COMCORE_BEGIN + 8)
+#define RID_GRAPHIC_ERRORBMP (RC_COMCORE_BEGIN + 9)
+#define STR_NUMRULE_DEFNAME (RC_COMCORE_BEGIN + 10)
+#define STR_EMPTYPAGE (RC_COMCORE_BEGIN + 11)
+#define RID_SHELLRES_AUTOFMTSTRS (RC_COMCORE_BEGIN + 12)
+#define STR_MULT_INTERACT_HYPH_WARN (RC_COMCORE_BEGIN + 13)
+#define STR_MULT_INTERACT_SPELL_WARN (RC_COMCORE_BEGIN + 14)
+#define STR_SPELL_TITLE (RC_COMCORE_BEGIN + 15)
+#define STR_HYPH_TITLE (RC_COMCORE_BEGIN + 16)
+#define MSG_DISABLE_UNDO_QUESTION (RC_COMCORE_BEGIN + 17)
+#define MSG_DISABLE_READLINE_QUESTION (RC_COMCORE_BEGIN + 18)
+// -> #111827#
+#define STR_REDLINE_INSERT (RC_COMCORE_BEGIN + 19)
+#define STR_REDLINE_DELETE (RC_COMCORE_BEGIN + 20)
+#define STR_REDLINE_FORMAT (RC_COMCORE_BEGIN + 21)
+#define STR_REDLINE_TABLE (RC_COMCORE_BEGIN + 22)
+#define STR_REDLINE_FMTCOLL (RC_COMCORE_BEGIN + 23)
+#define STR_CLIPBOARD (RC_COMCORE_BEGIN + 24)
+#define STR_START_QUOTE (RC_COMCORE_BEGIN + 25)
+#define STR_END_QUOTE (RC_COMCORE_BEGIN + 26)
+#define STR_LDOTS (RC_COMCORE_BEGIN + 27)
+#define STR_YIELDS (RC_COMCORE_BEGIN + 28)
+#define STR_PARAGRAPHS (RC_COMCORE_BEGIN + 29)
+#define STR_MULTISEL (RC_COMCORE_BEGIN + 30)
+#define STR_REDLINE_MULTIPLE (RC_COMCORE_BEGIN + 31)
+#define STR_N_REDLINES (RC_COMCORE_BEGIN + 32)
+#define STR_FIELD (RC_COMCORE_BEGIN + 33)
+// <- #111827#
+// -> #115575#
+#define STR_FRAME (RC_COMCORE_BEGIN + 34)
+#define STR_OLE (RC_COMCORE_BEGIN + 35)
+#define STR_MATH_FORMULA (RC_COMCORE_BEGIN + 36)
+#define STR_CHART (RC_COMCORE_BEGIN + 37)
+#define STR_NOTE (RC_COMCORE_BEGIN + 38)
+#define STR_REFERENCE (RC_COMCORE_BEGIN + 39)
+#define STR_SCRIPT (RC_COMCORE_BEGIN + 40)
+#define STR_AUTHORITY_ENTRY (RC_COMCORE_BEGIN + 41)
+#define STR_SPECIALCHAR (RC_COMCORE_BEGIN + 42)
+#define STR_FOOTNOTE (RC_COMCORE_BEGIN + 43)
+#define STR_GRAPHIC (RC_COMCORE_BEGIN + 44)
+#define STR_DRAWING_OBJECTS (RC_COMCORE_BEGIN + 45)
+#define STR_TABLE_NAME (RC_COMCORE_BEGIN + 46)
+#define STR_PARAGRAPH_UNDO (RC_COMCORE_BEGIN + 47)
+// <- #115575#
+// -> PB #146850#
+#define RID_GRAPHIC_REPLACEBMP_HC (RC_COMCORE_BEGIN + 48)
+#define RID_GRAPHIC_ERRORBMP_HC (RC_COMCORE_BEGIN + 49)
+// <- #146850#
+
+// defines fuer die Autoformat Redline Kommentare
+#define STR_AUTOFMTREDL_DEL_EMPTY_PARA 0
+#define STR_AUTOFMTREDL_USE_REPLACE 1
+#define STR_AUTOFMTREDL_CPTL_STT_WORD 2
+#define STR_AUTOFMTREDL_CPTL_STT_SENT 3
+#define STR_AUTOFMTREDL_TYPO 4
+#define STR_AUTOFMTREDL_USER_STYLE 5
+#define STR_AUTOFMTREDL_BULLET 6
+#define STR_AUTOFMTREDL_UNDER 7
+#define STR_AUTOFMTREDL_BOLD 8
+#define STR_AUTOFMTREDL_FRACTION 9
+#define STR_AUTOFMTREDL_DETECT_URL 10
+#define STR_AUTOFMTREDL_DASH 11
+#define STR_AUTOFMTREDL_ORDINAL 12
+#define STR_AUTOFMTREDL_RIGHT_MARGIN 13
+#define STR_AUTOFMTREDL_SET_TMPL_TEXT 14
+#define STR_AUTOFMTREDL_SET_TMPL_INDENT 15
+#define STR_AUTOFMTREDL_SET_TMPL_NEG_INDENT 16
+#define STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT 17
+#define STR_AUTOFMTREDL_SET_TMPL_HEADLINE 18
+#define STR_AUTOFMTREDL_SET_NUMBULET 19
+#define STR_AUTOFMTREDL_DEL_MORELINES 20
+// !!!!!!!!!!!!!!!!!!!!!!!!!! das Ende immer richtig setzen !!!!!!!!!!!!
+#define STR_AUTOFMTREDL_END 21
+
+
+#endif
+
+
+
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
new file mode 100644
index 000000000000..85fea8317ef2
--- /dev/null
+++ b/sw/inc/crsrsh.hxx
@@ -0,0 +1,950 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: crsrsh.hxx,v $
+ * $Revision: 1.46 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CRSRSH_HXX
+#define _CRSRSH_HXX
+
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <tools/rtti.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx> // fuer SWPOSDOC
+#include <viewsh.hxx> // fuer ViewShell
+#include <calbck.hxx> // fuer SwClient
+#include <cshtyp.hxx> // fuer die CursorShell Typen
+#include <crstate.hxx> // fuer die CursorMove-Staties
+#include <toxe.hxx> // SwTOXSearchDir
+#include <tblsel.hxx> //SwTblSearchType
+#include <viscrs.hxx>
+#include <node.hxx>
+#include <tblsel.hxx>
+#include <IDocumentMarkAccess.hxx>
+
+
+// einige Forward Deklarationen
+
+class KeyCode;
+class SfxItemSet;
+class SfxPoolItem;
+class SwCntntFrm;
+class SwCrsrShell;
+class SwCursor;
+class SwField;
+class SwFieldType;
+class SwFmt;
+class SwFmtFld;
+class SwNodeIndex;
+class SwPaM;
+class SwShellCrsr;
+class SwShellTableCrsr;
+class SwTableNode;
+class SwTxtFmtColl;
+class SwVisCrsr;
+class SwTxtINetFmt;
+class SwFmtINetFmt;
+class SwTxtAttr;
+class SwTableBox;
+class SwCellFrms;
+class SwTOXMark;
+class SwRedline;
+class IBlockCursor;
+class SwCntntNode; // #i23726#
+// --> OD 2008-06-19 #i90516#
+class SwPostItField;
+// <--
+struct SwPosition;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+namespace com { namespace sun { namespace star { namespace text {
+ class XTextRange;
+}}}}
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XStringKeyMap;
+}}}}
+
+// enum und struktur, um ueber die Doc-Position Informationen zu erfragen
+
+struct SwContentAtPos
+{
+ enum IsAttrAtPos
+ {
+ SW_NOTHING = 0x0000,
+ SW_FIELD = 0x0001,
+ SW_CLICKFIELD = 0x0002,
+ SW_FTN = 0x0004,
+ SW_INETATTR = 0x0008,
+ SW_TABLEBOXFML = 0x0010,
+ SW_REDLINE = 0x0020,
+ SW_OUTLINE = 0x0040,
+ SW_TOXMARK = 0x0080,
+ SW_REFMARK = 0x0100,
+ SW_NUMLABEL = 0x0200, // #i23726#
+ SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <--
+ SW_SMARTTAG = 0x0800
+#ifndef PRODUCT
+ ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen
+ ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen
+#endif
+ } eCntntAtPos;
+
+ union {
+ const SwField* pFld;
+ const SfxPoolItem* pAttr;
+ const SwRedline* pRedl;
+ SwCntntNode * pNode; // #i23726#
+ } aFnd;
+
+ int nDist; // #i23726#
+
+ String sStr;
+ const SwTxtAttr* pFndTxtAttr;
+
+ SwContentAtPos( int eGetAtPos = 0xffff )
+ : eCntntAtPos( (IsAttrAtPos)eGetAtPos )
+ {
+ aFnd.pFld = 0;
+ pFndTxtAttr = 0;
+ nDist = 0; // #i23726#
+ }
+
+ // befindet sich der Node in einem geschuetzten Bereich?
+ BOOL IsInProtectSect() const;
+ bool IsInRTLText()const;
+};
+
+// ReturnWerte von SetCrsr (werden verodert)
+const int CRSR_POSOLD = 0x01, // Cursor bleibt an alter Doc-Position
+ CRSR_POSCHG = 0x02; // Position vom Layout veraendert
+
+// Helperfunction to resolve backward references in regular expressions
+
+String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam );
+
+// die Cursor - Shell
+class SW_DLLPUBLIC SwCrsrShell : public ViewShell, public SwModify
+{
+ friend class SwCallLink;
+ friend class SwVisCrsr;
+ friend class SwSelPaintRects;
+ friend class SwChgLinkFlag;
+
+ //Braucht den Crsr als IntrnlCrsr.
+ friend BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+
+public: // public, damit defaultet werden kann !!
+
+ /* ein enum fuer den Aufruf von UpdateCrsr */
+ enum CrsrFlag {
+ UPDOWN = (1 << 0), // Up/Down auf Spalte halten
+ SCROLLWIN = (1 << 1), // Window Scrollen
+ CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's
+ NOCALRECT = (1 << 3), // CharRect nicht neu berechnen
+ READONLY = (1 << 4) // Sichtbar machen trotz Readonly
+ };
+
+private:
+
+ SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht
+ Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor
+ Point aOldRBPos; // Right/Bottom von letzter VisArea
+ // (wird im Invalidate vom Cursor benutzt)
+
+
+ // um event. Macro was anhaengt auszufuehren.
+ Link aFlyMacroLnk; // Link will be called, if the Crsr is set
+ // into a fly. A macro can be then becalled
+ Link aChgLnk; // link will be called by every attribut/
+ // format changes at cursor position.
+ Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived
+
+
+ SwShellCrsr* pCurCrsr; // der aktuelle Cursor
+ SwShellCrsr* pCrsrStk; // Stack fuer den Cursor
+ SwVisCrsr *pVisCrsr; // der Sichtbare-Cursor
+
+ IBlockCursor *pBlockCrsr; // interface of cursor for block (=rectangular) selection
+
+ SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn
+ // die Selection ueber 2 Spalten liegt
+
+ SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten
+ SwTableBox* pBoxPtr; // Tabellen-Zelle
+
+ long nUpDownX; // versuche den Cursor bei Up/Down immer in
+ // der gleichen Spalte zu bewegen
+ long nLeftFrmPos;
+ ULONG nAktNode; // save CursorPos at Start-Action
+ xub_StrLen nAktCntnt;
+ USHORT nAktNdTyp;
+ bool bAktSelection;
+
+ /*
+ * Mit den Methoden SttCrsrMove und EndCrsrMove wird dieser Zaehler
+ * Inc-/Decrementiert. Solange der Zaehler ungleich 0 ist, erfolgt
+ * auf den akt. Cursor kein Update. Dadurch koennen "komplizierte"
+ * Cursorbewegungen (ueber Find()) realisiert werden.
+ */
+ USHORT nCrsrMove;
+ USHORT nBasicActionCnt; // Actions, die vom Basic geklammert wurden
+ CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
+
+ // --> OD 2008-04-02 #refactorlists#
+ String sMarkedListId;
+ int nMarkedListLevel;
+ // <--
+
+ BOOL bHasFocus : 1; // Shell ist in einem Window "aktiv"
+ BOOL bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
+ BOOL bChgCallFlag : 1; // Attributaenderung innerhalb von
+ // Start- und EndAction
+ BOOL bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
+ // (wird im Invalidate vom Cursor benutzt)
+
+ BOOL bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
+ // TRUE -> ChgLnk callen
+ // Zugriff nur ueber SwChgLinkFlag
+ BOOL bAllProtect : 1; // Flag fuer Bereiche
+ // TRUE -> alles geschuetzt / versteckt
+ BOOL bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
+ // TRUE -> die Sicht wurde verschoben
+ BOOL bGCAttr : 1; // TRUE -> es existieren nichtaufgespannte Attr.
+ BOOL bIgnoreReadonly : 1; // TRUE -> Beim naechsten EndAction trotz
+ // Readonly den Crsr sichtbar machen.
+ BOOL bSelTblCells : 1; // TRUE -> Zellen uebers InputWin selektieren
+ BOOL bAutoUpdateCells : 1; // TRUE -> Zellen werden autoformatiert
+ BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr vom Basic
+ BOOL bSetCrsrInReadOnly : 1;// TRUE -> Cursor darf in ReadOnly-Bereiche
+ BOOL bOverwriteCrsr : 1; // TRUE -> show Overwrite Crsr
+
+ // OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
+ bool mbMacroExecAllowed : 1;
+
+ SW_DLLPRIVATE void UpdateCrsr( USHORT eFlags
+ =SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
+ BOOL bIdleEnd = FALSE );
+
+ SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
+
+ // -> #i27615#
+
+ /** Mark a certain list level of a certain list
+
+ OD 2008-04-02 #refactorlists#
+ levels of a certain lists are marked now
+
+ @param sListId list Id of the list whose level is marked
+ @param nLevel to be marked list level
+
+ An empty sListId denotes that no level of a list is marked.
+ */
+ SW_DLLPRIVATE void MarkListLevel( const String& sListId,
+ const int nLevel );
+ // <- #i27615#
+
+ // private method(s) accessed from public inline method(s) must be exported.
+ BOOL LeftRight( BOOL, USHORT, USHORT, BOOL );
+ SW_DLLPRIVATE BOOL UpDown( BOOL, USHORT );
+ SW_DLLPRIVATE BOOL LRMargin( BOOL, BOOL bAPI = FALSE );
+ SW_DLLPRIVATE BOOL IsAtLRMargin( BOOL, BOOL bAPI = FALSE ) const;
+
+ SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
+
+typedef BOOL (SwCursor:: *FNCrsr)();
+ SW_DLLPRIVATE BOOL CallCrsrFN( FNCrsr );
+
+ SW_DLLPRIVATE const SwRedline* _GotoRedline( USHORT nArrPos, BOOL bSelect );
+
+protected:
+
+ inline SwMoveFnCollection* MakeFindRange( USHORT, USHORT, SwPaM* ) const;
+
+ /*
+ * Compare-Methode for the StackCursor and the current Cursor.
+ * The Methods return -1, 0, 1 for lower, equal, greater. The enum
+ * CrsrCompareType says which position is compared.
+ */
+ enum CrsrCompareType {
+ StackPtStackMk,
+ StackPtCurrPt,
+ StackPtCurrMk,
+ StackMkCurrPt,
+ StackMkCurrMk,
+ CurrPtCurrMk
+ };
+ int CompareCursor( CrsrCompareType eType ) const;
+
+ // Setzt alle PaMs in OldNode auf NewPos + Offset
+ void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos,
+ const xub_StrLen nOffset = 0 );
+
+ // --> FME 2004-07-30 #i32329# Enhanced table selection
+ BOOL _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
+ // <--
+
+ // --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
+ bool SetInFrontOfLabel( BOOL bNew );
+ // <--
+
+ void RefreshBlockCursor();
+
+ /** Updates the marked list level according to the cursor.
+ */
+ SW_DLLPRIVATE void UpdateMarkedListLevel();
+
+public:
+ TYPEINFO();
+ SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
+ // verkleideter Copy-Constructor
+ SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
+ virtual ~SwCrsrShell();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ // neuen Cusror erzeugen und den alten anhaengen
+ SwPaM * CreateCrsr();
+ // loesche den aktuellen Cursor und der folgende wird zum Aktuellen
+ BOOL DestroyCrsr();
+ // TableCursor in normale Cursor verwandeln, Tablemode aufheben
+ void TblCrsrToCursor();
+ // enter block mode, change normal cursor into block cursor
+ void CrsrToBlockCrsr();
+ // leave block mode, change block cursor into normal cursor
+ void BlockCrsrToCrsr();
+
+ // SelAll() selects the document body content
+ // if ExtendedSelect() is called afterwards, the whole nodes array is selected
+ // only for usage in special cases allowed!
+ void ExtendedSelectAll();
+
+ SwPaM* GetCrsr( BOOL bMakeTblCrsr = TRUE ) const;
+ inline SwCursor* GetSwCrsr( BOOL bMakeTblCrsr = TRUE ) const;
+ // nur den akt. Cursor returnen
+ SwShellCrsr* _GetCrsr() { return pCurCrsr; }
+ const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
+
+ // uebergebenen Cursor anzeigen - fuer UNO
+ void SetSelection(const SwPaM& rCrsr);
+
+ // alle Cursor aus den ContentNodes entfernen und auf 0 setzen.
+ // Wurde aus der FEShell hierher verschoben.
+ void ParkCrsr( const SwNodeIndex &rIdx );
+
+ // gebe den akt. Cursor-Stack zurueck.
+ // ( Wird in der EditShell beim Loeschen von Inhalten benoetigt! )
+ inline SwPaM* GetStkCrsr() const;
+
+ // Start der Klammerung, SV-Cursor und selektierte Bereiche hiden
+ void StartAction();
+ // Ende der Klammerung, SV-Cursor und selektierte Bereiche anzeigen
+ void EndAction( const BOOL bIdleEnd = FALSE );
+
+ // Basiscursortravelling
+ long GetUpDownX() const { return nUpDownX; }
+
+ BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
+ { return LeftRight( TRUE, nCnt, nMode, bAllowVisual ); }
+ BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
+ { return LeftRight( FALSE, nCnt, nMode, bAllowVisual ); }
+ BOOL Up( USHORT nCnt = 1 ) { return UpDown( TRUE, nCnt ); }
+ BOOL Down( USHORT nCnt = 1 ) { return UpDown( FALSE, nCnt ); }
+ BOOL LeftMargin() { return LRMargin( TRUE ); }
+ BOOL RightMargin(BOOL bAPI = FALSE) { return LRMargin( FALSE, bAPI ); }
+ BOOL SttEndDoc( BOOL bStt );
+
+ BOOL MovePage( SwWhichPage, SwPosPage );
+ BOOL MovePara( SwWhichPara, SwPosPara );
+ BOOL MoveSection( SwWhichSection, SwPosSection );
+ BOOL MoveTable( SwWhichTable, SwPosTable );
+ BOOL MoveColumn( SwWhichColumn, SwPosColumn );
+ BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+
+ // die Suchfunktionen
+ ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ BOOL bSearchInNotes,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ BOOL& bCancel,
+ FindRanges eRng, int bReplace = FALSE );
+
+ ULONG Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ BOOL& bCancel,
+ FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
+
+ ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ BOOL& bCancel,
+ FindRanges eRng,
+ const com::sun::star::util::SearchOptions* pSearchOpt = 0,
+ const SfxItemSet* rReplSet = 0 );
+
+ // Positionieren des Cursors
+ // returnt
+ // CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde.
+ // CRSR_POSOLD: wenn der Crsr nicht veraendert wurde
+ int SetCrsr( const Point &rPt, BOOL bOnlyText = FALSE, bool bBlock = true );
+
+
+ /*
+ * Benachrichtung, dass der sichtbare Bereich sich geaendert
+ * hat. aVisArea wird neu gesetzt, anschliessend wird
+ * gescrollt. Das uebergebene Rectangle liegt auf
+ * Pixelgrenzen, um Pixelfehler beim Scrollen zu vermeiden.
+ */
+ virtual void VisPortChgd( const SwRect & );
+
+ /*
+ * Virtuelle PaintMethode, damit die Selection nach dem Paint wieder
+ * sichtbar wird.
+ */
+ void Paint( const Rectangle & rRect );
+
+ // Bereiche
+ inline void SetMark();
+ inline BOOL HasMark();
+
+ void ClearMark();
+
+ /**
+ Ensure point and mark of the current PaM are in a specific order.
+
+ @param bPointFirst TRUE: If the point is behind the mark then
+ swap the PaM. FALSE: If the mark is behind the point then swap
+ the PaM.
+ */
+ void NormalizePam(BOOL bPointFirst = TRUE);
+
+ void SwapPam();
+ BOOL ChgCurrPam( const Point & rPt,
+ BOOL bTstOnly = TRUE, //Nur testen, nicht setzen
+ BOOL bTstHit = FALSE ); //Nur genaue Treffer
+ void KillPams();
+
+ // erzeuge eine Kopie vom Cursor und speicher diese im Stack
+ void Push();
+ /*
+ * Loescht einen Cursor (gesteuert durch bOldCrsr)
+ * - vom Stack oder ( bOldCrsr = TRUE )
+ * - den aktuellen und der auf dem Stack stehende wird zum aktuellen
+ *
+ * Return: es war auf dem Stack noch einer vorhanden
+ */
+ BOOL Pop( BOOL bOldCrsr = TRUE );
+ /*
+ * Verbinde zwei Cursor miteinander.
+ * Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
+ */
+ void Combine();
+
+#if defined( PRODUCT )
+ void SttCrsrMove() { ++nCrsrMove; StartAction(); }
+ void EndCrsrMove( const BOOL bIdleEnd = FALSE )
+ { EndAction( bIdleEnd ); --nCrsrMove; }
+#else
+ void SttCrsrMove();
+ void EndCrsrMove( const BOOL bIdleEnd = FALSE );
+#endif
+
+ /*
+ * Beim Abgeben des Focuses werden die selektierten Bereiche nicht mehr
+ * angezeigt; andererseits beim Erhalten des Focuses, werden alle selek-
+ * tierten Bereiche wieder angezeigt. (Bereiche muessen neu berechnet
+ * werden!)
+ */
+ BOOL HasShFcs() const { return bHasFocus; }
+ void ShLooseFcs();
+ void ShGetFcs( BOOL bUpdate = TRUE );
+
+ // Methoden zum Anzeigen bzw. Verstecken des sichtbaren Text-Cursors
+ void ShowCrsr();
+ void HideCrsr();
+ // Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
+ // dem sichtbaren Cursor
+ void ShowCrsrs( BOOL bCrsrVis );
+ void HideCrsrs();
+
+ BOOL IsOverwriteCrsr() const { return bOverwriteCrsr; }
+ void SetOverwriteCrsr( BOOL bFlag ) { bOverwriteCrsr = bFlag; }
+
+ // gebe den aktuellen Frame, in dem der Cursor steht, zurueck
+ SwCntntFrm *GetCurrFrm( const BOOL bCalcFrm = TRUE ) const;
+
+ //TRUE wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
+ //FALSE wenn der arbeitet (trotz Readonly).
+ BOOL IsCrsrReadonly() const;
+ // Cursor steht in etwas geschuetztem oder in die Selektion umspannt
+ // etwas geschuetztes.
+ BOOL HasReadonlySel() const;
+ // darf der Cursor in ReadOnlyBereiche?
+ BOOL IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
+ void SetReadOnlyAvailable( BOOL bFlag );
+ BOOL IsOverReadOnlyPos( const Point& rPt ) const;
+
+ // Methoden fuer aFlyMacroLnk
+ void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
+ const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; }
+
+ // Methoden geben/aendern den Link fuer die Attribut/Format-Aenderungen
+ void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; }
+ const Link& GetChgLnk() const { return aChgLnk; }
+
+ // Methoden geben/aendern den Link fuers "Grafik vollstaendig geladen"
+ void SetGrfArrivedLnk( const Link &rLnk ) { aGrfArrivedLnk = rLnk; }
+ const Link& GetGrfArrivedLnk() const { return aGrfArrivedLnk; }
+
+ //ChgLink callen, innerhalb einer Action wird der Ruf verzoegert.
+ void CallChgLnk();
+
+ // Abfrage, ob der aktuelle Cursor eine Selektion aufspannt,
+ // also, ob Mark gesetzt und SPoint und Mark unterschiedlich sind.
+ BOOL HasSelection() const;
+
+ // Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
+ // aufgespannt oder nicht der einzigste ist.
+ inline BOOL IsSelection() const;
+ // returns if multiple cursors are available
+ inline BOOL IsMultiSelection() const;
+
+ // Abfrage, ob ein kompletter Absatz selektiert wurde
+ BOOL IsSelFullPara() const;
+ // Abfrage, ob die Selektion in einem Absatz ist
+ inline BOOL IsSelOnePara() const;
+
+ //Sollte fuer das Clipboard der WaitPtr geschaltet werden.
+ BOOL ShouldWait() const;
+
+ /*
+ * liefert das SRectangle, auf dem der Cursor steht.
+ */
+ const SwRect &GetCharRect() const { return aCharRect; }
+ /*
+ * liefert zurueck, ob der Cursor sich ganz oder teilweise im
+ * sichtbaren Bereich befindet.
+ */
+ BOOL IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
+
+ // gebe die aktuelle Seitennummer zurueck:
+ // TRUE: in der der Cursor steht
+ // FALSE: die am oberen Rand sichtbar ist
+ void GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
+ BOOL bAtCrsrPos = TRUE, const BOOL bCalcFrm = TRUE );
+ // bestimme in welche Richtung "leere Seiten" behandelt werden!
+ // (wird benutzt im PhyPage.. )
+ USHORT GetNextPrevPageNum( BOOL bNext = TRUE );
+
+ // setze den Cursor auf die Seite "nPage" an den Anfang
+ BOOL GotoPage( USHORT nPage );
+
+ // gebe alle Dokumentseiten zurueck
+ USHORT GetPageCnt();
+
+ // Gehe zur naechsten Selection
+ BOOL GoNextCrsr();
+ // gehe zur vorherigen Selection
+ BOOL GoPrevCrsr();
+
+ // at CurCrsr.SPoint
+ ::sw::mark::IMark* SetBookmark(
+ const KeyCode&,
+ const ::rtl::OUString& rName,
+ const ::rtl::OUString& rShortName,
+ IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::BOOKMARK);
+ bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurCrsr.SPoint
+ bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart );
+ bool GoNextBookmark(); // true, if there was one
+ bool GoPrevBookmark();
+
+ bool IsFormProtected();
+ ::sw::mark::IFieldmark* GetCurrentFieldmark();
+ ::sw::mark::IFieldmark* GetFieldmarkAfter();
+ ::sw::mark::IFieldmark* GetFieldmarkBefore();
+ bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark );
+
+ // aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
+ // Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim
+ // Loeschen von Rahmen irgendwohin gesetzt wurde. Die Position
+ // ergibt sich aus seiner aktuellen Position im Layout !!
+ void UpdateCrsrPos();
+
+ // returne den am akt. Cursor selektierten Text. Dieser wird mit
+ // Felder etc. aufgefuellt!!
+ String GetSelTxt() const;
+ // gebe nur den Text ab der akt. Cursor Position zurueck (bis zum NodeEnde)
+ String GetText() const;
+
+ // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
+ inline const SwTableNode* IsCrsrInTbl( BOOL bIsPtInTbl = TRUE ) const;
+ // erfrage die Document - Layout - Position vom akt. Crsr
+ inline Point& GetCrsrDocPos( BOOL bPoint = TRUE ) const;
+ inline BOOL IsCrsrPtAtEnd() const;
+
+ inline const SwPaM* GetTblCrs() const;
+ inline SwPaM* GetTblCrs();
+
+ BOOL IsTblComplex() const;
+ BOOL IsTblComplexForChart();
+ // erfrage die akt. TabellenSelektion als Text
+ String GetBoxNms() const;
+
+ // setze Crsr in die naechsten/vorherigen Celle
+ BOOL GoNextCell( BOOL bAppendLine = TRUE );
+ BOOL GoPrevCell();
+ // gehe zu dieser Box (wenn vorhanden und in Tabelle!)
+ BOOL GotoTable( const String& rName );
+
+ // select a table row, column or box (based on the current cursor)
+ BOOL SelTblRow() { return _SelTblRowOrCol( true ); }
+ BOOL SelTblCol() { return _SelTblRowOrCol( false ); }
+ BOOL SelTblBox();
+ // --> FME 2004-07-30 #i32329# Enhanced table selection
+ BOOL SelTbl();
+ // <--
+
+ // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
+ BOOL GotoNextNum();
+ BOOL GotoPrevNum();
+
+ // zu diesem Gliederungspunkt
+ BOOL GotoOutline( const String& rName );
+ // zum naechsten/vorhergehenden oder angegebenen OultineNode
+ void GotoOutline( USHORT nIdx );
+ // suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
+ USHORT GetOutlinePos( BYTE nLevel = UCHAR_MAX );
+ // selektiere den angeben Bereich von OutlineNodes. Optional
+ // inclusive der Childs. Die USHORT sind die Positionen im
+ // OutlineNds-Array!! (EditShell)
+ BOOL MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
+ BOOL bWithChilds = FALSE );
+
+ BOOL GotoNextOutline(); // naechster Node mit Outline-Num.
+ BOOL GotoPrevOutline(); // vorheriger Node mit Outline-Num.
+
+ /** Delivers the current shell cursor
+
+ Some operations have to run on the current cursor ring,
+ some on the pTblCrsr (if exist) or the current cursor ring and
+ some on the pTblCrsr or pBlockCrsr or the current cursor ring.
+ This small function checks the existence and delivers the wished cursor.
+
+ @param bBlock [bool]
+ if the block cursor is of interest or not
+
+ @return pTblCrsr if exist,
+ pBlockCrsr if exist and of interest (param bBlock)
+ otherwise pCurCrsr
+ */
+ SwShellCrsr* getShellCrsr( bool bBlock );
+ const SwShellCrsr* getShellCrsr( bool bBlock ) const
+ { return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); }
+
+ FASTBOOL IsBlockMode() const { return 0 != pBlockCrsr; }
+ const IBlockCursor* GetBlockCrsr() const { return pBlockCrsr; }
+ IBlockCursor* GetBlockCrsr() { return pBlockCrsr; }
+
+ // ist der Crsr in einer Tabelle und ist die Selection ueber
+ // zwei Spalten
+ BOOL IsTableMode() const { return 0 != pTblCrsr; }
+
+ // erfrage den Tabellen Crsr; ausserhalb von Tabellen immer 0
+ const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
+ SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
+ USHORT UpdateTblSelBoxes();
+
+ BOOL GotoFtnTxt(); // springe aus dem Content zur Fussnote
+ BOOL GotoFtnAnchor(); // springe aus der Fussnote zum Anker
+ BOOL GotoPrevFtnAnchor();
+ BOOL GotoNextFtnAnchor();
+
+ BOOL GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
+ BOOL GotoHeaderTxt(); // springe aus dem Content zum Header
+ BOOL GotoFooterTxt(); // springe aus dem Content zum Footer
+ // springe in den Header/Footer des angegebenen oder akt. PageDesc
+ BOOL SetCrsrInHdFt( USHORT nDescNo = USHRT_MAX,
+ BOOL bInHeader = TRUE );
+ // is point of cursor in header/footer. pbInHeader return TRUE if it is
+ // in a headerframe otherwise in a footerframe
+ BOOL IsInHeaderFooter( BOOL* pbInHeader = 0 ) const;
+
+ // springe zum naechsten Verzeichnis [mit dem Namen]
+ BOOL GotoNextTOXBase( const String* = 0 );
+ // springe zum vorherigen Verzeichnis [mit dem Namen]
+ BOOL GotoPrevTOXBase( const String* = 0 );
+ BOOL GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
+ // springe zum naechsten (vorherigen) Verzeichniseintrag
+ BOOL GotoNxtPrvTOXMark( BOOL bNext = TRUE );
+ // Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln
+ const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
+
+ // springe zum naechsten (vorherigen) Tabellenformel
+ // optional auch nur zu kaputten Formeln springen
+ BOOL GotoNxtPrvTblFormula( BOOL bNext = TRUE,
+ BOOL bOnlyErrors = FALSE );
+ // jump to the next / previous hyperlink - inside text and also
+ // on graphics
+ BOOL SelectNxtPrvHyperlink( BOOL bNext = TRUE );
+
+ // springe zu dieser Refmark
+ BOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0,
+ USHORT nSeqNo = 0 );
+
+ // hole vom Start/Ende der akt. Selection das nte Zeichen
+ sal_Unicode GetChar( BOOL bEnd = TRUE, long nOffset = 0 );
+ // erweiter die akt. Selection am Anfang/Ende um n Zeichen
+ BOOL ExtendSelection( BOOL bEnd = TRUE, xub_StrLen nCount = 1 );
+ // setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
+ // returnt FALSE: wenn der ob der SPoint vom Layout korrigiert wurde.
+ // (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
+ BOOL SetVisCrsr( const Point &rPt );
+ inline void UnSetVisCrsr();
+
+ // springe zum nachsten/vorherigen Feld des entsprechenden Types
+ BOOL MoveFldType( const SwFieldType* pFldType, BOOL bNext,
+ USHORT nSubType = USHRT_MAX,
+ USHORT nResType = USHRT_MAX );
+ // springe genau zu diesem Feld
+ BOOL GotoFld( const SwFmtFld& rFld );
+
+ // returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
+ // aufgepspannte haben will - sprich etwas selektiert ist (Basic))
+ USHORT GetCrsrCnt( BOOL bAll = TRUE ) const;
+
+ // Char Travelling - Methoden (in crstrvl1.cxx)
+ BOOL GoStartWord();
+ BOOL GoEndWord();
+ BOOL GoNextWord();
+ BOOL GoPrevWord();
+ BOOL GoNextSentence();
+ BOOL GoPrevSentence();
+ BOOL GoStartSentence();
+ BOOL GoEndSentence();
+ BOOL SelectWord( const Point* pPt = 0 );
+
+ // Position vom akt. Cursor erfragen
+ BOOL IsStartWord()const;
+ BOOL IsEndWord() const;
+ BOOL IsInWord() const;
+ BOOL IsStartSentence() const;
+ BOOL IsEndSentence() const;
+ BOOL IsSttPara() const;
+ BOOL IsEndPara() const;
+ BOOL IsStartOfDoc() const;
+ BOOL IsEndOfDoc() const;
+ BOOL IsInFrontOfLabel() const;
+ BOOL IsAtLeftMargin() const { return IsAtLRMargin( TRUE ); }
+ BOOL IsAtRightMargin(BOOL bAPI = FALSE) const { return IsAtLRMargin( FALSE, bAPI ); }
+
+ // loesche alle erzeugten Crsr, setze den Tabellen-Crsr und den letzten
+ // Cursor auf seinen TextNode (oder StartNode?).
+ // Beim naechsten ::GetCrsr werden sie wieder alle erzeugt.
+ // Wird fuers Drag&Drop/ClipBorad-Paste in Tabellen benoetigt.
+ BOOL ParkTblCrsr();
+
+ // gibt es nicht aufgespannte Attribute?
+ BOOL IsGCAttr() const { return bGCAttr; }
+ void ClearGCAttr() { bGCAttr = FALSE; }
+ void UpdateAttr() { bGCAttr = TRUE; }
+
+ // ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
+ BOOL IsAllProtect() const { return bAllProtect; }
+
+#ifdef SW_CRSR_TIMER
+ // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (TRUE)
+ // oder direkt (FALSE) angezeigt wird. (default ist Timer getriggert)
+ BOOL ChgCrsrTimerFlag( BOOL bTimerOn = TRUE );
+#endif
+
+ BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; }
+
+ // springe zum benannten Bereich
+ BOOL GotoRegion( const String& rName );
+
+ // zeige die aktuelle Selektion an
+ virtual void MakeSelVisible();
+
+ // setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
+ BOOL FindValidCntntNode( BOOL bOnlyText = FALSE );
+
+ BOOL GetContentAtPos( const Point& rPt,
+ SwContentAtPos& rCntntAtPos,
+ BOOL bSetCrsr = FALSE,
+ SwRect* pFldRect = 0 );
+
+ // --> OD 2008-06-19 #i90516#
+ const SwPostItField* GetPostItFieldAtCursor() const;
+ // <--
+
+ // get smart tags at point position
+ void GetSmartTagTerm( const Point& rPt,
+ SwRect& rSelectRect,
+ ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
+ ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange );
+
+ // get smart tags at current cursor position
+ void GetSmartTagTerm( ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
+ ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ) const;
+
+ BOOL IsPageAtPos( const Point &rPt ) const;
+
+ // Attribut selelktieren
+ BOOL SelectTxtAttr( USHORT nWhich, BOOL bExpand, const SwTxtAttr* pAttr = 0 );
+ BOOL GotoINetAttr( const SwTxtINetFmt& rAttr );
+ const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
+
+ BOOL CheckTblBoxCntnt( const SwPosition* pPos = 0 );
+ void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+ void ClearTblBoxCntnt();
+ BOOL EndAllTblBoxEdit();
+
+ // wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
+ // ohne das die UI davon etaws weiss
+ virtual void NewCoreSelection();
+
+ void SetSelTblCells( BOOL bFlag ) { bSelTblCells = bFlag; }
+ BOOL IsSelTblCells() const { return bSelTblCells; }
+
+ BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; }
+ void SetAutoUpdateCells( BOOL bFlag ) { bAutoUpdateCells = bFlag; }
+
+ BOOL GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+ SwRect& rRect, short& rOrient );
+ BOOL SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
+
+ const SwRedline* SelNextRedline();
+ const SwRedline* SelPrevRedline();
+ const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE );
+
+ // is cursor or the point in/over a vertical formatted text?
+ BOOL IsInVerticalText( const Point* pPt = 0 ) const;
+ // is cursor or the point in/over a right to left formatted text?
+ BOOL IsInRightToLeftText( const Point* pPt = 0 ) const;
+
+ // If the current cursor position is inside a hidden range, the hidden range
+ // is selected and true is returned:
+ bool SelectHiddenRange();
+
+ // remove all invalid cursors
+ void ClearUpCrsrs();
+
+ // OD 11.02.2003 #100556# - set/get flag to allow/avoid execution of macros
+ inline void SetMacroExecAllowed( const bool _bMacroExecAllowed )
+ {
+ mbMacroExecAllowed = _bMacroExecAllowed;
+ }
+ inline bool IsMacroExecAllowed()
+ {
+ return mbMacroExecAllowed;
+ }
+
+ // #111827#
+ /**
+ Returns textual description of the current selection.
+
+ - If the current selection is a multi-selection the result is
+ STR_MULTISEL.
+ - Else the result is the text of the selection.
+
+ @return the textual description of the current selection
+ */
+ String GetCrsrDescr() const;
+
+ SwRect GetRectOfCurrentChar();
+};
+
+
+// Cursor Inlines:
+inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
+ USHORT nStt, USHORT nEnd, SwPaM* pPam ) const
+{
+ return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
+}
+
+inline SwCursor* SwCrsrShell::GetSwCrsr( BOOL bMakeTblCrsr ) const
+{
+ return (SwCursor*)GetCrsr( bMakeTblCrsr );
+}
+
+inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
+
+inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
+
+inline BOOL SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
+
+inline BOOL SwCrsrShell::IsSelection() const
+{
+ return IsTableMode() || pCurCrsr->HasMark() ||
+ pCurCrsr->GetNext() != pCurCrsr;
+}
+inline BOOL SwCrsrShell::IsMultiSelection() const
+{
+ return pCurCrsr->GetNext() != pCurCrsr;
+}
+
+inline BOOL SwCrsrShell::IsSelOnePara() const
+{
+ return pCurCrsr == pCurCrsr->GetNext() &&
+ pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
+}
+
+inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( BOOL bIsPtInTbl ) const
+{
+ return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
+}
+
+inline BOOL SwCrsrShell::IsCrsrPtAtEnd() const
+{
+ return pCurCrsr->End() == pCurCrsr->GetPoint();
+}
+
+inline Point& SwCrsrShell::GetCrsrDocPos( BOOL bPoint ) const
+{
+ return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos();
+}
+
+inline const SwPaM* SwCrsrShell::GetTblCrs() const
+{
+ return pTblCrsr;
+}
+
+inline SwPaM* SwCrsrShell::GetTblCrs()
+{
+ return pTblCrsr;
+}
+
+inline void SwCrsrShell::UnSetVisCrsr()
+{
+ pVisCrsr->Hide();
+ pVisCrsr->SetDragCrsr( FALSE );
+}
+
+#endif // _CRSRSH_HXX
diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx
new file mode 100644
index 000000000000..bbef972d16ac
--- /dev/null
+++ b/sw/inc/crsskip.hxx
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: crsskip.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CRSSKIP_HXX
+#define _CRSSKIP_HXX
+
+#include <tools/solar.h>
+
+
+// define for cursor travelling normally in western text cells and chars do
+// the same, but in complex text cell skip over legatures and char skip
+// into it.
+// These defines exist only to cut off the dependicies to I18N project.
+const USHORT CRSR_SKIP_CHARS = 0;
+const USHORT CRSR_SKIP_CELLS = 1;
+const USHORT CRSR_SKIP_HIDDEN = 2;
+
+#endif
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
new file mode 100644
index 000000000000..f9b9fa363770
--- /dev/null
+++ b/sw/inc/crstate.hxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: crstate.hxx,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CRSTATE_HXX
+#define _CRSTATE_HXX
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <tools/gen.hxx>
+#include <swtypes.hxx>
+#include <swrect.hxx>
+
+
+enum SwFillMode
+{
+ FILL_TAB, // default, Auffuellen mit Tabulatoren
+ FILL_SPACE, // ... mit Tabulatoren und Spaces
+ FILL_MARGIN, // nur links, zentriert, rechts Ausrichten
+ FILL_INDENT // durch linken Absatzeinzug
+};
+
+struct SwFillCrsrPos
+{
+ SwRect aCrsr; // Position und Groesse des Shadowcursors
+ USHORT nParaCnt; // Anzahl der einzufuegenden Absaetze
+ USHORT nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
+ USHORT nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
+ USHORT nColumnCnt; // Anzahl der notwendigen Spaltenumbrueche
+ sal_Int16 eOrient; // Absatzausrichtung
+ SwFillMode eMode; // Gewuenschte Auffuellregel
+ SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) :
+ nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ),
+ eOrient( com::sun::star::text::HoriOrientation::NONE ), eMode( eMd )
+ {}
+};
+
+// Multiportion types: two lines, bidirectional, 270 degrees rotation,
+// ruby portion and 90 degrees rotation
+#define MT_TWOLINE 0
+#define MT_BIDI 1
+#define MT_ROT_270 3
+#define MT_RUBY 4
+#define MT_ROT_90 7
+
+struct Sw2LinesPos
+{
+ SwRect aLine; // Position and size of the line
+ SwRect aPortion; // Position and size of the multi portion
+ SwRect aPortion2; // needed for nested multi portions
+ BYTE nMultiType; // Multiportion type
+};
+
+/**
+ * SwSpecialPos. This structure is used to pass some additional information
+ * during the call of SwTxtFrm::GetCharRect(). An SwSpecialPos defines a position
+ * inside a portion which does not have a representation in the core string or
+ * which is only represented by one position, e.g., field portions,
+ * number portions, ergo sum and quo vadis portions.
+ *
+ * nCharOfst - The offset inside the special portion. Fields and its
+ * follow fields are treated as one long special portion.
+ * nLineOfst - The number of lines between the beginning of the special
+ * portion and nCharOfst. A line offset required to be
+ * nCharOfst relative to the beginning of the line.
+ * nExtendRange - Setting this identifies portions which are in front or
+ * behind the core string (number portion, quo vadis)
+ *
+ * Examples 1)
+ *
+ * Get the position of the second character inside a number portion:
+ * nCharOfst = 2; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_BEFORE;
+ * Call SwTxtFrm:::GetCharRect with core string position 0.
+ *
+ * Example 2)
+ *
+ * Field A - Length = 5
+ * Follow field B - Length = 9
+ * Get the position of the third character in follow field B, core position
+ * of field A is 33.
+ * nCharOfst = 7; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_NONE;
+ * Call SwTxtFrm:::GetCharRect with core string position 33.
+ */
+
+#define SP_EXTEND_RANGE_NONE 0
+#define SP_EXTEND_RANGE_BEFORE 1
+#define SP_EXTEND_RANGE_BEHIND 2
+
+struct SwSpecialPos
+{
+ xub_StrLen nCharOfst;
+ USHORT nLineOfst;
+ BYTE nExtendRange;
+
+ // #i27615#
+ SwSpecialPos() : nCharOfst(0), nLineOfst(0),
+ nExtendRange(SP_EXTEND_RANGE_NONE)
+ {}
+};
+
+// CrsrTravelling-Staties (fuer GetCrsrOfst)
+enum CrsrMoveState
+{
+ MV_NONE, // default
+ MV_UPDOWN, // Crsr Up/Down
+ MV_RIGHTMARGIN, // an rechten Rand
+ MV_LEFTMARGIN, // an linken Rand
+ MV_SETONLYTEXT, // mit dem Cursr nur im Text bleiben
+ MV_TBLSEL // nicht in wiederholte Headlines
+};
+
+// struct fuer spaetere Erweiterungen
+struct SwCrsrMoveState
+{
+ SwFillCrsrPos *pFill; // fuer das automatische Auffuellen mit Tabs etc.
+ Sw2LinesPos *p2Lines; // for selections inside/around 2line portions
+ SwSpecialPos* pSpecialPos; // for positions inside fields
+ Point aRealHeight; // enthaelt dann die Position/Hoehe des Cursors
+ CrsrMoveState eState;
+ BYTE nCursorBidiLevel;
+ BOOL bStop :1;
+ BOOL bRealHeight :1; // Soll die reale Hoehe berechnet werden?
+ BOOL bFieldInfo :1; // Sollen Felder erkannt werden?
+ BOOL bPosCorr :1; // Point musste korrigiert werden
+ BOOL bFtnNoInfo :1; // Fussnotennumerierung erkannt
+ BOOL bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
+ // suchen lassen, sprich niemals in das
+ // GetCntntPos laufen.
+ BOOL bFillRet :1; // wird nur im FillModus temp. genutzt
+ BOOL bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
+ BOOL bRealWidth :1; // Calculation of the width required
+ BOOL b2Lines :1; // Check 2line portions and fill p2Lines
+ BOOL bNoScroll :1; // No scrolling of undersized textframes
+ BOOL bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ // position if screen position is inside second
+ // have of bound rect
+
+ BOOL bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
+
+ // #i27615#
+ /**
+ cursor in front of label
+ */
+ BOOL bInFrontOfLabel :1;
+ BOOL bInNumPortion :1; // point is in number portion #i23726#
+ int nInNumPostionOffset; // distance from number portion's start
+
+ SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) :
+ pFill( NULL ),
+ p2Lines( NULL ),
+ pSpecialPos( NULL ),
+ eState( eSt ),
+ nCursorBidiLevel( 0 ),
+ bStop( FALSE ),
+ bRealHeight( FALSE ),
+ bFieldInfo( FALSE ),
+ bPosCorr( FALSE ),
+ bFtnNoInfo( FALSE ),
+ bExactOnly( FALSE ),
+ bSetInReadOnly( FALSE ),
+ bRealWidth( FALSE ),
+ b2Lines( FALSE ),
+ bNoScroll( FALSE ),
+ bPosMatchesBounds( FALSE ),
+ bCntntCheck( FALSE ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( FALSE ), // #i27615#
+ bInNumPortion(FALSE), // #i26726#
+ nInNumPostionOffset(0) // #i26726#
+ {}
+ SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
+ pFill( pInitFill ),
+ pSpecialPos( NULL ),
+ eState( MV_SETONLYTEXT ),
+ nCursorBidiLevel( 0 ),
+ bStop( FALSE ),
+ bRealHeight( FALSE ),
+ bFieldInfo( FALSE ),
+ bPosCorr( FALSE ),
+ bFtnNoInfo( FALSE ),
+ bExactOnly( FALSE ),
+ bSetInReadOnly( FALSE ),
+ bRealWidth( FALSE ),
+ b2Lines( FALSE ),
+ bNoScroll( FALSE ),
+ bPosMatchesBounds( FALSE ),
+ bCntntCheck( FALSE ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( FALSE ), // #i27615#
+ bInNumPortion(FALSE), // #i23726#
+ nInNumPostionOffset(0) // #i23726#
+ {}
+};
+
+
+#endif
+
+
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
new file mode 100644
index 000000000000..4669654b6917
--- /dev/null
+++ b/sw/inc/cshtyp.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cshtyp.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _CSHTYP_HXX
+#define _CSHTYP_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+class SwPaM;
+class SwCntntFrm;
+class SwLayoutFrm;
+
+// eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
+// fuer das richtungsabhaengige Bewegen des Cursors.
+struct SwMoveFnCollection;
+typedef SwMoveFnCollection* SwMoveFn;
+
+
+// Type-Definition fuer die CrsrShell
+// Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
+typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
+typedef SwCntntFrm * (*SwPosPage)( const SwLayoutFrm * );
+extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
+extern SwPosPage fnPageStart, fnPageEnd;
+
+// Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
+typedef SwMoveFnCollection* SwPosPara;
+typedef BOOL (*SwWhichPara)( SwPaM&, SwPosPara );
+extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
+extern SwPosPara fnParaStart, fnParaEnd;
+
+// Richtungsparameter fuer MoveSection
+typedef SwMoveFnCollection* SwPosSection;
+typedef BOOL (*SwWhichSection)( SwPaM&, SwPosSection );
+extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
+extern SwPosSection fnSectionStart, fnSectionEnd;
+
+// Richtungsparameter fuer MoveTable
+typedef SwMoveFnCollection* SwPosTable;
+typedef BOOL (*SwWhichTable)( SwPaM&, SwPosTable, BOOL bInReadOnly );
+extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
+extern SwPosTable fnTableStart, fnTableEnd;
+
+// Richtungsparameter fuer MoveColumn
+typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
+typedef SwCntntFrm * (*SwPosColumn)( const SwLayoutFrm * );
+extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
+extern SwPosColumn fnColumnStart, fnColumnEnd;
+
+// Richtungsparameter fuer MoveRegion (Bereiche!)
+typedef SwMoveFnCollection* SwPosRegion;
+typedef BOOL (*SwWhichRegion)( SwPaM&, SwPosRegion, BOOL bInReadOnly );
+extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
+extern SwPosRegion fnRegionStart, fnRegionEnd;
+
+
+
+/*
+ * folgende Kombinationen sind erlaubt:
+ * - suche einen im Body: -> FND_IN_BODY
+ * - suche alle im Body: -> FND_IN_BODYONLY | FND_IN_SELALL
+ * - suche in Selectionen: einen / alle -> FND_IN_SEL [ | FND_IN_SELALL ]
+ * - suche im nicht Body: einen / alle -> FND_IN_OTHER [ | FND_IN_SELALL ]
+ * - suche ueberall alle: -> FND_IN_SELALL
+ */
+enum FindRanges
+{
+ FND_IN_BODY = 0x00, // suche "eins" mur im Body-Text
+ FND_IN_OTHER = 0x02, // suche "alles" in Footer/Header/Fly...
+ FND_IN_SEL = 0x04, // suche in Selectionen
+ FND_IN_BODYONLY = 0x08, // suche nur im Body - nur in Verbindung mit
+ // FND_IN_SELALL !!!
+ FND_IN_SELALL = 0x01 // - alle ( nur im nicht Body und Selectionen)
+};
+
+
+enum SwDocPositions
+{
+ DOCPOS_START,
+ DOCPOS_CURR,
+ DOCPOS_END,
+ DOCPOS_OTHERSTART,
+ DOCPOS_OTHEREND
+};
+
+SW_DLLPUBLIC SwWhichPara GetfnParaCurr();
+SW_DLLPUBLIC SwPosPara GetfnParaStart();
+SW_DLLPUBLIC SwPosPara GetfnParaEnd();
+
+SW_DLLPUBLIC SwWhichTable GetfnTablePrev();
+SW_DLLPUBLIC SwWhichTable GetfnTableCurr();
+SW_DLLPUBLIC SwPosTable GetfnTableStart();
+SW_DLLPUBLIC SwPosTable GetfnTableEnd();
+
+#endif // _CSHTYP_HXX
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
new file mode 100644
index 000000000000..9b61f001ed12
--- /dev/null
+++ b/sw/inc/dbfld.hxx
@@ -0,0 +1,340 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dbfld.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DBFLD_HXX
+#define _DBFLD_HXX
+
+#include "swdllapi.h"
+#include "fldbas.hxx"
+#include "swdbdata.hxx"
+
+class SwDoc;
+class SwTxtFld;
+class SwFrm;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType
+{
+ SwDBData aDBData; //
+ String sName; // only used in ::GetName() !
+ String sColumn;
+ long nRefCnt;
+
+public:
+
+ SwDBFieldType(SwDoc* pDocPtr, const String& rColumnName, const SwDBData& rDBData);
+
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const;
+
+ inline void AddRef() { nRefCnt++; }
+ void ReleaseRef();
+
+ const String& GetColumnName() const {return sColumn;}
+ const SwDBData& GetDBData() const {return aDBData;}
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ von SwFields abgeleitete Klassen. Sie ueberlagern die Expand-Funktion.
+ Der Inhalt wird entsprechend dem Format, soweit vorhanden, formatiert.
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBField : public SwValueField
+{
+ String aContent;
+ String sFieldCode; // contains Word's field code
+ USHORT nSubType;
+ BOOL bIsInBodyTxt : 1;
+ BOOL bValidValue : 1;
+ BOOL bInitialized : 1;
+
+public:
+ SwDBField(SwDBFieldType*, ULONG nFmt = 0);
+ virtual ~SwDBField();
+
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ // Der aktuelle Text
+ inline void SetExpansion(const String& rStr);
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+
+ // Name oder Inhalt
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ // fuer Berechnungen in Ausdruecken
+ void ChgValue( double d, BOOL bVal );
+
+ // Evaluierung ueber den DBMgr String rauspulen
+ void Evaluate();
+
+ // Evaluierung fuer Kopf und Fusszeilen
+ void ChangeExpansion( const SwFrm*, const SwTxtFld* );
+ void InitContent();
+ void InitContent(const String& rExpansion);
+
+ inline void ChgBodyTxtFlag( BOOL bIsInBody );
+
+ inline BOOL IsInitialized() const { return bInitialized; }
+ inline void ClearInitialized() { bInitialized = FALSE; }
+ inline void SetInitialized() { bInitialized = TRUE; }
+
+ // Name erfragen
+ virtual const String& GetPar1() const;
+
+ // access to the command string
+ const String& GetFieldCode() const
+ { return sFieldCode;}
+ void SetFieldCode(const String& rStr)
+ { sFieldCode = rStr; }
+
+ // DBName
+ inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline void SwDBField::SetExpansion(const String& rStr)
+ { aContent = rStr; }
+
+// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
+ { bIsInBodyTxt = bIsInBody; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNameInfField : public SwField
+{
+ SwDBData aDBData;
+ USHORT nSubType;
+
+protected:
+ const SwDBData& GetDBData() const {return aDBData;}
+ SwDBData& GetDBData() {return aDBData;}
+
+ SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt = 0);
+
+public:
+ // DBName
+ inline const SwDBData& GetRealDBData() { return aDBData; }
+
+ SwDBData GetDBData(SwDoc* pDoc);
+ void SetDBData(const SwDBData& rDBData); // #111840#
+
+ // Name oder Inhalt
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld Naechster Satz
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNextSetFieldType : public SwFieldType
+{
+public:
+ SwDBNextSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Naechsten Datensatz mit Bedingung
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField
+{
+ String aCond;
+ BOOL bCondValid;
+
+public:
+ SwDBNextSetField( SwDBNextSetFieldType*,
+ const String& rCond, const String& rDummy, const SwDBData& rDBData);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void Evaluate(SwDoc*);
+ inline void SetCondValid(BOOL bCond);
+ inline BOOL IsCondValid() const;
+
+ // Condition
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline BOOL SwDBNextSetField::IsCondValid() const
+ { return bCondValid; }
+
+inline void SwDBNextSetField::SetCondValid(BOOL bCond)
+ { bCondValid = bCond; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld Naechster Satz
+ --------------------------------------------------------------------*/
+
+class SwDBNumSetFieldType : public SwFieldType
+{
+public:
+ SwDBNumSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datensatz mit Nummer xxx
+ Die Nummer steht in nFormat
+ ! kleiner Missbrauch
+ --------------------------------------------------------------------*/
+
+class SwDBNumSetField : public SwDBNameInfField
+{
+ String aCond;
+ String aPar2;
+ BOOL bCondValid;
+
+public:
+ SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline BOOL IsCondValid() const;
+ inline void SetCondValid(BOOL bCond);
+ void Evaluate(SwDoc*);
+
+ // Condition
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // Datensatznummer
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ // Die Datensatznummer steht in nFormat !!
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline BOOL SwDBNumSetField::IsCondValid() const
+ { return bCondValid; }
+
+inline void SwDBNumSetField::SetCondValid(BOOL bCond)
+ { bCondValid = bCond; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankname
+ --------------------------------------------------------------------*/
+
+class SwDBNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwDBNameFieldType(SwDoc*);
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField
+{
+public:
+ SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datensatznummer
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBSetNumberFieldType : public SwFieldType
+{
+public:
+ SwDBSetNumberFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField
+{
+ long nNumber;
+
+public:
+ SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ void Evaluate(SwDoc*);
+
+ inline long GetSetNumber() const;
+ inline void SetSetNumber(long nNum);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline long SwDBSetNumberField::GetSetNumber() const
+ { return nNumber; }
+
+inline void SwDBSetNumberField::SetSetNumber(long nNum)
+ { nNumber = nNum; }
+
+
+#endif // _DBFLD_HXX
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
new file mode 100644
index 000000000000..7d8d9ca4a5a3
--- /dev/null
+++ b/sw/inc/dbgoutsw.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dbgoutsw.hxx,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 __DBGOUTSW_HXX
+#define __DBGOUTSW_HXX
+
+#ifdef DEBUG
+
+#include <hash_map>
+#include <tox.hxx>
+class String;
+
+namespace rtl
+{
+class OUString;
+}
+class SwNode;
+class SwTxtAttr;
+class SwpHints;
+class SfxPoolItem;
+class SfxItemSet;
+struct SwPosition;
+class SwPaM;
+class SwNodeNum;
+class SwUndo;
+class SwUndos;
+class SwRect;
+class SwFrmFmt;
+class SwFrmFmts;
+class SwNodes;
+class SwRewriter;
+class SwNumRuleTbl;
+class SwNumRule;
+class SwOutlineNodes;
+class SwTxtFmtColl;
+class SwNodeRange;
+
+#define DBG_OUT_HERE printf("%s(%d):", __FILE__, __LINE__)
+#define DBG_OUT_HERE_FN printf("%s(%d) %s:", __FILE__, __LINE__, __FUNCTION__)
+#define DBG_OUT_HERE_LN printf("%s(%d)\n", __FILE__, __LINE__)
+#define DBG_OUT_HERE_FN_LN printf("%s(%d) %s\n", __FILE__, __LINE__, __FUNCTION__)
+#define DBG_OUT(x) printf("%s\n", dbg_out(x))
+#define DBG_OUT_LN(x) printf("%s(%d): %s\n", __FILE__, __LINE__, dbg_out(x))
+#define DBG_OUT_FN_LN(x) printf("%s: %s\n", __FUNCTION__, dbg_out(x))
+
+extern bool bDbgOutStdErr;
+extern bool bDbgOutPrintAttrSet;
+
+SW_DLLPUBLIC const char * dbg_out(const void * pVoid);
+SW_DLLPUBLIC const char * dbg_out(const String & aStr);
+SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr);
+SW_DLLPUBLIC const char * dbg_out(const SwRect & rRect);
+SW_DLLPUBLIC const char * dbg_out(const SwFrmFmt & rFrmFmt);
+SW_DLLPUBLIC const char * dbg_out(const SwNode & rNode);
+SW_DLLPUBLIC const char * dbg_out(const SwTxtAttr & rAttr);
+SW_DLLPUBLIC const char * dbg_out(const SwpHints &rHints);
+SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem & rItem);
+SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem * pItem);
+SW_DLLPUBLIC const char * dbg_out(const SfxItemSet & rSet);
+SW_DLLPUBLIC const char * dbg_out(SwNodes & rNodes);
+// const char * dbg_out(SwOutlineNodes & rNodes);
+SW_DLLPUBLIC const char * dbg_out(const SwPosition & rPos);
+SW_DLLPUBLIC const char * dbg_out(const SwPaM & rPam);
+SW_DLLPUBLIC const char * dbg_out(const SwNodeNum & rNum);
+SW_DLLPUBLIC const char * dbg_out(const SwUndo & rUndo);
+SW_DLLPUBLIC const char * dbg_out(const SwUndos & rUndos);
+SW_DLLPUBLIC const char * dbg_out(const SwRewriter & rRewriter);
+SW_DLLPUBLIC const char * dbg_out(const SwNumRule & rRule);
+SW_DLLPUBLIC const char * dbg_out(const SwTxtFmtColl & rFmt);
+SW_DLLPUBLIC const char * dbg_out(const SwFrmFmts & rFrmFmts);
+SW_DLLPUBLIC const char * dbg_out(const SwNumRuleTbl & rTbl);
+SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange);
+
+template<typename tKey, typename tMember, typename fHashFunction>
+String lcl_dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+{
+ String aResult("[", RTL_TEXTENCODING_ASCII_US);
+
+ typename std::hash_map<tKey, tMember, fHashFunction>::const_iterator aIt;
+
+ for (aIt = rMap.begin(); aIt != rMap.end(); aIt++)
+ {
+ if (aIt != rMap.begin())
+ aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
+
+ aResult += aIt->first;
+
+ char sBuffer[256];
+ sprintf(sBuffer, "(%p)", aIt->second);
+ aResult += String(sBuffer, RTL_TEXTENCODING_ASCII_US);
+ }
+
+ aResult += String("]", RTL_TEXTENCODING_ASCII_US);
+
+ return aResult;
+}
+
+template<typename tKey, typename tMember, typename fHashFunction>
+const char * dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+{
+ return dbg_out(lcl_dbg_out(rMap));
+}
+SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken);
+SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens);
+#endif // DEBUG
+#endif // __DBGOUTSW_HXX
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
new file mode 100644
index 000000000000..0c359bd05cdb
--- /dev/null
+++ b/sw/inc/dbmgr.hxx
@@ -0,0 +1,408 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dbmgr.hxx,v $
+ * $Revision: 1.37 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWDBMGR_HXX
+#define _SWDBMGR_HXX
+
+
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <svtools/svarray.hxx>
+#include <com/sun/star/util/Date.hpp>
+#include "swdllapi.h"
+#include <swdbdata.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+namespace com{namespace sun{namespace star{
+ namespace sdbc{
+ class XConnection;
+ class XStatement;
+ class XDataSource;
+ class XResultSet;
+ }
+ namespace beans{
+
+ class XPropertySet;
+ struct PropertyValue;
+ }
+ namespace sdbcx{
+ class XColumnsSupplier;
+ }
+ namespace util{
+ class XNumberFormatter;
+ }
+ namespace mail{
+ class XSmtpService;
+ }
+}}}
+namespace svx {
+ class ODataAccessDescriptor;
+}
+
+struct SwDBFormatData
+{
+ com::sun::star::util::Date aNullDate;
+ com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter> xFormatter;
+ com::sun::star::lang::Locale aLocale;
+};
+
+class SwView;
+class SwWrtShell;
+class SwPrtOptions;
+class SfxProgress;
+class ListBox;
+class Button;
+class SvNumberFormatter;
+class SwDbtoolsClient;
+class SwXMailMerge;
+class SwMailMergeConfigItem;
+
+// -----------------------------------------------------------------------
+
+enum DBMgrOptions
+{
+ DBMGR_MERGE, // Datensaetze in Felder
+ DBMGR_INSERT, // Datensaetze in Text
+ DBMGR_MERGE_MAILMERGE, // Serienbriefe drucken
+ DBMGR_MERGE_MAILING, // Serienbriefe als email versenden
+ DBMGR_MERGE_MAILFILES, // Serienbriefe als Datei(en) speichern
+ DBMGR_MERGE_DOCUMENTS, // Print merged documents
+ DBMGR_MERGE_SINGLE_FILE // save merge as single file
+};
+
+// -----------------------------------------------------------------------
+
+/*--------------------------------------------------------------------
+ Beschreibung: (neue) Logische Datenbanken verwalten
+ --------------------------------------------------------------------*/
+#define SW_DB_SELECT_UNKNOWN 0
+#define SW_DB_SELECT_TABLE 1
+#define SW_DB_SELECT_QUERY 2
+
+struct SwDSParam : public SwDBData
+{
+ com::sun::star::util::Date aNullDate;
+
+ ::com::sun::star::uno::Reference<com::sun::star::util::XNumberFormatter> xFormatter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement> xStatement;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSelection;
+ BOOL bScrollable;
+ BOOL bEndOfDB;
+ BOOL bAfterSelection;
+ long nSelectionIndex;
+
+ SwDSParam(const SwDBData& rData) :
+ SwDBData(rData),
+ bScrollable(FALSE),
+ bEndOfDB(FALSE),
+ bAfterSelection(FALSE),
+ nSelectionIndex(0)
+ {}
+
+ SwDSParam(const SwDBData& rData,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& xResSet,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection) :
+ SwDBData(rData),
+ xResultSet(xResSet),
+ aSelection(rSelection),
+ bScrollable(TRUE),
+ bEndOfDB(FALSE),
+ bAfterSelection(FALSE),
+ nSelectionIndex(0)
+ {}
+
+ void CheckEndOfDB()
+ {
+ if(bEndOfDB)
+ bAfterSelection = TRUE;
+ }
+};
+typedef SwDSParam* SwDSParamPtr;
+SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5)
+
+struct SwMergeDescriptor
+{
+ USHORT nMergeType;
+ SwWrtShell& rSh;
+ const ::svx::ODataAccessDescriptor& rDescriptor;
+ String sSaveToFilter; //export filter to save resulting files
+ String sSaveToFilterOptions; //
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveToFilterData;
+
+ String sSubject;
+ String sAddressFromColumn;
+ String sMailBody;
+ String sAttachmentName;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aCopiesTo;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aBlindCopiesTo;
+
+ ::com::sun::star::uno::Reference< com::sun::star::mail::XSmtpService > xSmtpServer;
+
+ sal_Bool bSendAsHTML;
+ sal_Bool bSendAsAttachment;
+
+ sal_Bool bPrintAsync;
+ sal_Bool bCreateSingleFile;
+
+ SwMailMergeConfigItem* pMailMergeConfigItem;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintOptions;
+
+ SwMergeDescriptor( USHORT nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
+ nMergeType(nType),
+ rSh(rShell),
+ rDescriptor(rDesc),
+ bSendAsHTML( sal_True ),
+ bSendAsAttachment( sal_False ),
+ bPrintAsync( sal_True ),
+ bCreateSingleFile( sal_False ),
+ pMailMergeConfigItem(0)
+ {}
+
+};
+
+struct SwNewDBMgr_Impl;
+class SwConnectionDisposedListener_Impl;
+class AbstractMailMergeDlg;
+
+class SW_DLLPUBLIC SwNewDBMgr
+{
+friend class SwConnectionDisposedListener_Impl;
+
+ static SwDbtoolsClient* pDbtoolsClient;
+
+ String sEMailAddrFld; // Mailing: Spaltenname der E-Mail Adresse
+ String sSubject; // Mailing: Subject
+ String sAttached; // Mailing: Attachte Files
+ USHORT nMergeType;
+ BOOL bInitDBFields : 1; // TRUE: Datenbank an Feldern beim Mergen
+ BOOL bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
+ BOOL bCancel : 1; // Serienbrief-Save abgebrochen
+
+ BOOL bInMerge : 1; //merge process active
+ BOOL bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
+ BOOL bMergeLock : 1; // prevent update of database fields while document is
+ // actually printed at the ViewShell
+ SwDSParamArr aDataSourceParams;
+ SwNewDBMgr_Impl* pImpl;
+ const SwXMailMerge* pMergeEvtSrc; // != 0 if mail merge events are to be send
+
+ SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, BOOL bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, BOOL bCreate);
+
+
+ SW_DLLPRIVATE DECL_LINK( PrtCancelHdl, Button * );
+
+ // Datensaetze als Text ins Dokument einfuegen
+ SW_DLLPRIVATE void ImportFromConnection( SwWrtShell* pSh);
+
+ // Einzelnen Datensatz als Text ins Dokument einfuegen
+ SW_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh);
+
+ // merge to file _and_ merge to e-Mail
+ SW_DLLPRIVATE BOOL MergeMailFiles(SwWrtShell* pSh,
+ const SwMergeDescriptor& rMergeDescriptor );
+ SW_DLLPRIVATE BOOL ToNextRecord(SwDSParam* pParam);
+
+public:
+ SwNewDBMgr();
+ ~SwNewDBMgr();
+
+ // Art des aktellen Mergens. Siehe DBMgrOptions-enum
+ inline USHORT GetMergeType() const { return nMergeType; }
+ inline void SetMergeType( USHORT nTyp ) { nMergeType = nTyp; }
+
+ // MailMergeEvent source
+ const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; }
+ void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; }
+
+ inline BOOL IsMergeSilent() const { return bMergeSilent != 0; }
+ inline void SetMergeSilent( BOOL bVal ) { bMergeSilent = bVal; }
+
+ // Mischen von Datensaetzen in Felder
+ BOOL MergeNew( const SwMergeDescriptor& rMergeDesc );
+ BOOL Merge(SwWrtShell* pSh);
+ // Mischen von Datensaetzen in Felder, dann drucken
+ BOOL MergePrint( SwView& rView,
+ SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI );
+ // printing parts of a merge result document
+ BOOL MergePrintDocuments( SwView& rView,
+ SwPrtOptions& rOpt, SfxProgress& rProgress, BOOL bIsAPI );
+
+ // Datenbankfelder mit fehlendem Datenbankname initialisieren
+ inline BOOL IsInitDBFields() const { return bInitDBFields; }
+ inline void SetInitDBFields(BOOL b) { bInitDBFields = b; }
+
+ // Serienbriefe einzelnd oder alle zusammen drucken/speichern
+ inline BOOL IsSingleJobs() const { return bSingleJobs; }
+ inline void SetSingleJobs(BOOL b) { bSingleJobs = b; }
+
+ // Mailing
+ // email-Daten setzen
+ inline void SetEMailColumn(const String& sColName) { sEMailAddrFld = sColName; }
+ inline void SetSubject(const String& sSbj) { sSubject = sSbj; }
+ inline void SetAttachment(const String& sAtt) { sAttached = sAtt; }
+
+
+ // Listbox mit allen Tabellennamen einer Datenbank fuellen
+ BOOL GetTableNames(ListBox* pListBox, const String& rDBName );
+
+ // Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
+ BOOL GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, BOOL bAppend = FALSE);
+ BOOL GetColumnNames(ListBox* pListBox,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ const String& rTableName, BOOL bAppend = FALSE);
+
+ ULONG GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn,
+ SvNumberFormatter* pNFmtr,
+ long nLanguage );
+
+ ULONG GetColumnFmt( const String& rDBName,
+ const String& rTableName,
+ const String& rColNm,
+ SvNumberFormatter* pNFmtr,
+ long nLanguage );
+ sal_Int32 GetColumnType( const String& rDBName,
+ const String& rTableName,
+ const String& rColNm );
+
+ inline BOOL IsInMerge() const { return bInMerge; }
+ void EndMerge();
+
+ void ExecuteFormLetter(SwWrtShell& rSh,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties,
+ BOOL bWithDataSourceBrowser = FALSE);
+
+ void InsertText(SwWrtShell& rSh,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties);
+
+ // check if a data source is open
+ BOOL IsDataSourceOpen(const String& rDataSource,
+ const String& rTableOrQuery, sal_Bool bMergeOnly);
+
+ // open the source while fields are updated - for the calculator only!
+ BOOL OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+ sal_Int32 nCommandType = -1, bool bCreate = false);
+ sal_uInt32 GetSelectedRecordId(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+ BOOL GetColumnCnt(const String& rSourceName, const String& rTableName,
+ const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
+ String& rResult, double* pNumber);
+ //create and store or find an already stored connection to a data source for use
+ //in SwFldMgr and SwDBTreeList
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
+ RegisterConnection(::rtl::OUString& rSource);
+
+ const SwDSParam* CreateDSData(const SwDBData& rData)
+ {return FindDSData(rData, TRUE);}
+ const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;}
+
+
+ //close all data sources - after fields were updated
+ void CloseAll(BOOL bIncludingMerge = TRUE);
+
+ BOOL GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+ String &rResult, double *pNumber, sal_uInt32 *pFormat);
+ BOOL ToNextMergeRecord();
+ BOOL ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+
+ BOOL ExistsNextRecord()const;
+ sal_uInt32 GetSelectedRecordId();
+ sal_Bool ToRecordId(sal_Int32 nSet);
+
+ const SwDBData& GetAddressDBName();
+
+ static String GetDBField(
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumnProp,
+ const SwDBFormatData& rDBFormatData,
+ double *pNumber = NULL);
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
+ GetConnection(const String& rDataSource,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& rxSource);
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>
+ GetColumnSupplier(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>,
+ const String& rTableOrQuery,
+ BYTE eTableOrQuery = SW_DB_SELECT_UNKNOWN);
+
+ static ::com::sun::star::uno::Sequence<rtl::OUString> GetExistingDatabaseNames();
+
+ /**
+ Loads a data source from file and registers it. Returns the registered name.
+ */
+ static String LoadAndRegisterDataSource();
+
+ static SwDbtoolsClient& GetDbtoolsClient();
+ // has to be called from _FinitUI()
+ static void RemoveDbtoolsClient();
+
+ /** try to get the data source from the given connection through the XChild interface.
+ If this is not possible, the data source will be created through its name.
+ @param _xConnection
+ The connection which should support the XChild interface. (not a must)
+ @param _sDataSourceName
+ The data source name will be used to create the data source when the connection can not be used for it.
+ @return
+ The data source.
+ */
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>
+ getDataSourceAsParent(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,const ::rtl::OUString& _sDataSourceName);
+
+ /** creates a RowSet, which must be disposed after use.
+ @param _sDataSourceName
+ The data source name
+ @param _sCommand
+ The command.
+ @param _nCommandType
+ The type of the command.
+ @param _xConnection
+ The active connection which may be <NULL/>.
+ @return
+ The new created RowSet.
+
+ */
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>
+ createCursor( const ::rtl::OUString& _sDataSourceName,
+ const ::rtl::OUString& _sCommand,
+ sal_Int32 _nCommandType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection
+ );
+ //merge into one document - returns the number of merged docs
+ sal_Int32 MergeDocuments( SwMailMergeConfigItem& rMMConfig, SwView& rSourceView );
+};
+
+#endif
+
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
new file mode 100644
index 000000000000..df99aa0570e5
--- /dev/null
+++ b/sw/inc/dbui.hrc
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dbui.hrc,v $
+ * $Revision: 1.8.66.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DBUI_HRC
+#define _DBUI_HRC
+
+// #include *****************************************************************
+
+#include "rcid.hrc"
+
+// Dialoge --------------------------------------------------------------------
+
+#define DLG_DBSELECTION (RC_DBUI_BEGIN)
+#define DLG_PRINTMONITOR (RC_DBUI_BEGIN + 1)
+#define DLG_AP_INSERT_DB_SEL (RC_DBUI_BEGIN + 2)
+
+#define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3)
+#define DLG_MM_DOCSELECT_PAGE (RC_DBUI_BEGIN + 4)
+#define DLG_MM_OUTPUTTYPE_PAGE (RC_DBUI_BEGIN + 5)
+#define DLG_MM_ADDRESSBLOCK_PAGE (RC_DBUI_BEGIN + 6)
+#define DLG_MM_GREETINGS_PAGE (RC_DBUI_BEGIN + 7)
+#define DLG_MM_PREPAREMERGE_PAGE (RC_DBUI_BEGIN + 8)
+#define DLG_MM_MERGE_PAGE (RC_DBUI_BEGIN + 9)
+#define DLG_MM_OUTPUT_PAGE (RC_DBUI_BEGIN + 10)
+#define DLG_MM_ADDRESSLISTDIALOG (RC_DBUI_BEGIN + 11)
+#define DLG_MM_SELECTDBTABLEDDIALOG (RC_DBUI_BEGIN + 12)
+#define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13)
+#define DLG_MM_CREATEADDRESSLIST (RC_DBUI_BEGIN + 14)
+#define DLG_MM_FIND_ENTRY (RC_DBUI_BEGIN + 15)
+#define DLG_MM_ADD_RENAME_ENTRY (RC_DBUI_BEGIN + 16)
+#define DLG_MM_CUSTOMIZE_ADDRESS_LIST (RC_DBUI_BEGIN + 17)
+#define DLG_MM_CUSTOMIZEADDRESSBLOCK (RC_DBUI_BEGIN + 18)
+#define DLG_MM_SELECTADDRESSBLOCK (RC_DBUI_BEGIN + 19)
+#define DLG_MM_ASSIGNFIELDS (RC_DBUI_BEGIN + 20)
+
+#define DLG_MM_LAYOUT_PAGE (RC_DBUI_BEGIN + 22)
+#define DLG_MM_COPYTO (RC_DBUI_BEGIN + 23)
+#define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24)
+#define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25)
+#define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26)
+#define DLG_MM_SAVEWARNING (RC_DBUI_BEGIN + 27)
+#define DLG_MM_QUERY (RC_DBUI_BEGIN + 28)
+#define DLG_MM_SENDWARNING (RC_DBUI_BEGIN + 29)
+#define DLG_MM_CREATIONMONITOR (RC_DBUI_BEGIN + 30)
+// Strings ------------------------------------------------------------------
+
+#define STR_DB_EMAIL (RC_DBUI_BEGIN)
+#define SA_ADDRESS_HEADER (RC_DBUI_BEGIN + 1)
+#define STR_NOTASSIGNED (RC_DBUI_BEGIN + 2)
+#define STR_FILTER_ALL (RC_DBUI_BEGIN + 3)
+#define STR_FILTER_SXB (RC_DBUI_BEGIN + 4)
+#define STR_FILTER_SXC (RC_DBUI_BEGIN + 5)
+#define STR_FILTER_DBF (RC_DBUI_BEGIN + 6)
+#define STR_FILTER_XLS (RC_DBUI_BEGIN + 7)
+#define STR_FILTER_TXT (RC_DBUI_BEGIN + 8)
+#define STR_FILTER_CSV (RC_DBUI_BEGIN + 9)
+#define STR_FILTER_ALL_DATA (RC_DBUI_BEGIN + 10)
+#define STR_FILTER_MDB (RC_DBUI_BEGIN + 11)
+#define STR_FILTER_ACCDB (RC_DBUI_BEGIN + 12)
+
+// Bitmaps ------------------------------------------------------------------
+
+
+// Elemente -----------------------------------------------------------------
+
+#define TLB_DBLIST 1
+#define BTN_OK 2
+#define BTN_CANCEL 3
+#define BTN_HELP 4
+
+#define FT_DOCNAME 5
+#define FT_PRINTING 6
+#define FT_PRINTER 7
+#define FT_PRINTINFO 8
+#define PB_CANCELPRNMON 9
+#define FT_SENDING 10
+#define STR_EMAILMON 11
+#define FT_STATUS 12
+#define FT_CREATEDOCUMENTS 13
+#define FT_PROGRESS 14
+#define FT_COUNTING 15
+#define STR_SAVEMON 16
+#define FT_SAVING 17
+
+#define MM_PART_TITLE 0
+#define MM_PART_FIRSTNAME 1
+#define MM_PART_LASTNAME 2
+#define MM_PART_COMPANY 3
+#define MM_PART_ADDRESS_1 4
+#define MM_PART_ADDRESS_2 5
+#define MM_PART_CITY 6
+#define MM_PART_REGION 7
+#define MM_PART_ZIP 8
+#define MM_PART_COUNTRY 9
+#define MM_PART_PHONE_PRIVATE 10
+#define MM_PART_PHONE_BUSINESS 11
+#define MM_PART_E_MAIL 12
+#define MM_PART_GENDER 13
+
+#endif
+
+
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
new file mode 100644
index 000000000000..e1f20183deca
--- /dev/null
+++ b/sw/inc/dcontact.hxx
@@ -0,0 +1,564 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dcontact.hxx,v $
+ * $Revision: 1.26.210.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DCONTACT_HXX
+#define _DCONTACT_HXX
+
+#include <svx/svdobj.hxx>
+// OD 14.05.2003 #108784#
+#include <svx/svdovirt.hxx>
+// OD 2004-01-16 #110582#
+#include <swtypes.hxx>
+#include <fmtanchr.hxx>
+#include <frmfmt.hxx>
+
+// OD 17.06.2003 #108784#
+#include <list>
+
+#include "calbck.hxx"
+
+class SfxPoolItem;
+class SwFrmFmt;
+class SwFlyFrmFmt;
+class SwFlyFrm;
+class SwFrm;
+class SwPageFrm;
+class SwVirtFlyDrawObj;
+class SwFmtAnchor;
+class SwFlyDrawObj;
+class SwRect;
+// OD 17.06.2003 #108784# - forward declaration for class <SwDrawVirtObj>
+class SwDrawContact;
+// OD 2004-01-16 #110582#
+struct SwPosition;
+class SwIndex;
+// OD 2004-03-25 #i26791#
+#include <anchoreddrawobject.hxx>
+
+//Der Umgekehrte Weg: Sucht das Format zum angegebenen Objekt.
+//Wenn das Object ein SwVirtFlyDrawObj ist so wird das Format von
+//selbigem besorgt.
+//Anderfalls ist es eben ein einfaches Zeichenobjekt. Diese hat einen
+//UserCall und der ist Client vom gesuchten Format.
+//Implementierung in dcontact.cxx
+SW_DLLPUBLIC SwFrmFmt *FindFrmFmt( SdrObject *pObj );
+inline const SwFrmFmt *FindFrmFmt( const SdrObject *pObj )
+{ return ::FindFrmFmt( (SdrObject*)pObj ); }
+sal_Bool HasWrap( const SdrObject* pObj );
+
+void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor );
+
+//Bei Aenderungen das Objekt aus dem ContourCache entfernen.
+//Implementierung in TxtFly.Cxx
+void ClrContourCache( const SdrObject *pObj );
+
+// liefert BoundRect inklusive Abstand
+// --> OD 2006-08-15 #i68520# - change naming
+SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj );
+// <--
+
+//Liefert den UserCall ggf. vom Gruppenobjekt
+// OD 2004-03-31 #i26791# - change return type
+SwContact* GetUserCall( const SdrObject* );
+
+// liefert TRUE falls das SrdObject ein Marquee-Object (Lauftext) ist
+BOOL IsMarqueeTextObj( const SdrObject& rObj );
+
+//Basisklasse fuer die folgenden KontaktObjekte (Rahmen+Zeichenobjekte)
+class SwContact : public SdrObjUserCall, public SwClient
+{
+ // OD 05.09.2003 #112039# - boolean, indicating destruction of contact object
+ // important note: boolean has to be set at the beginning of each destructor
+ // in the subclasses using method <SetInDTOR()>.
+ bool mbInDTOR;
+
+ /** method to move object to visible/invisible layer
+
+ OD 21.08.2003 #i18447#
+ Implementation for the public method <MoveObjToVisibleLayer(..)>
+ and <MoveObjToInvisibleLayer(..)>
+ If object is in invisble respectively visible layer, its moved to
+ the corresponding visible respectively invisible layers.
+ For group object the members are individually moved to the corresponding
+ layer, because <SdrObjGroup::GetLayer()> does return 0, if members
+ aren't on the same layer as the group object, and
+ <SdrObjGroup::SetLayer(..)|NbcSetLayer(..)> sets also the layer of
+ the members.
+ OD 2004-01-15 #110582# - moved from subclass <SwDrawContact>
+
+ @author OD
+
+ @param _bToVisible
+ input parameter - boolean indicating, if object has to be moved to
+ visible (== true) or invisible (== false) layer.
+
+ @param _pDrawObj
+ input parameter, which will be changed - drawing object, which will
+ change its layer.
+ */
+ void _MoveObjToLayer( const bool _bToVisible,
+ SdrObject* _pDrawObj );
+
+protected:
+ // OD 05.09.2003 #112039# - accessor to set member <mbInDTOR>
+ void SetInDTOR();
+
+public:
+ TYPEINFO();
+
+ //Fuer den Reader, es wir nur die Verbindung hergestellt.
+ SwContact( SwFrmFmt *pToRegisterIn );
+ virtual ~SwContact();
+
+ // OD 2004-03-29 #i26791#
+ virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const = 0;
+ virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) = 0;
+
+ // OD 13.05.2003 #108784# - made methods virtual and not inline
+ // OD 2004-04-01 #i26791# - made methods pure virtual
+ virtual const SdrObject *GetMaster() const = 0;
+ virtual SdrObject *GetMaster() = 0;
+ virtual void SetMaster( SdrObject* _pNewMaster ) = 0;
+
+ SwFrmFmt *GetFmt(){ return (SwFrmFmt*)GetRegisteredIn(); }
+ const SwFrmFmt *GetFmt() const
+ { return (const SwFrmFmt*)GetRegisteredIn(); }
+
+ // OD 05.09.2003 #112039# - accessor for member <mbInDTOR>
+ bool IsInDTOR() const;
+
+ /** method to move drawing object to corresponding visible layer
+
+ OD 21.08.2003 #i18447#
+ uses method <_MoveObjToLayer(..)>
+ OD 2004-01-15 #110582# - moved from subclass <SwDrawContact> and made virtual
+
+ @author OD
+
+ @param _pDrawObj
+ drawing object, which will be moved to the visible layer
+ */
+ virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj );
+
+ /** method to move drawing object to corresponding invisible layer
+
+ OD 21.08.2003 #i18447#
+ uses method <_MoveObjToLayer(..)>
+ OD 2004-01-15 #110582# - moved from subclass <SwDrawContact> and made virtual.
+
+ @author OD
+
+ @param _pDrawObj
+ drawing object, which will be moved to the visible layer
+ */
+ virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
+
+ // -------------------------------------------------------------------------
+ // OD 2004-01-16 #110582# - some virtual helper methods for information
+ // about the object (Writer fly frame resp. drawing object)
+ const SwFmtAnchor& GetAnchorFmt() const
+ {
+ ASSERT( GetFmt(),
+ "<SwContact::GetAnchorFmt()> - no frame format -> crash" );
+
+ return GetFmt()->GetAnchor();
+ }
+
+ RndStdIds GetAnchorId() const { return GetAnchorFmt().GetAnchorId(); }
+ bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_PAGE; }
+ bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; }
+ bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_CNTNT; }
+ bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AUTO_CNTNT; }
+ bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_IN_CNTNT; }
+
+ const SwPosition& GetCntntAnchor() const
+ {
+ ASSERT( GetAnchorFmt().GetCntntAnchor(),
+ "<SwContact::GetCntntAnchor()> - no content anchor -> crash" );
+
+ return *(GetAnchorFmt().GetCntntAnchor());
+ }
+
+ const SwIndex& GetCntntAnchorIndex() const;
+
+ // -------------------------------------------------------------------------
+
+ /** get data collection of anchored objects, handled by with contact
+
+ OD 2004-08-23 #110810#
+
+ @author
+ */
+ virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
+
+ /** get minimum order number of anchored objects handled by with contact
+
+ OD 2004-08-24 #110810#
+
+ @author
+ */
+ sal_uInt32 GetMinOrdNum() const;
+
+ /** get maximum order number of anchored objects handled by with contact
+
+ OD 2004-08-24 #110810#
+
+ @author
+ */
+ sal_uInt32 GetMaxOrdNum() const;
+};
+
+//KontactObjekt fuer die Verbindung zwischen Rahmen bzw. deren Formaten
+//im StarWriter (SwClient) und den Zeichenobjekten des Drawing (SdrObjUserCall)
+
+class SW_DLLPUBLIC SwFlyDrawContact : public SwContact
+{
+private:
+ // OD 2004-04-01 #i26791#
+ SwFlyDrawObj* mpMasterObj;
+
+ /** method to determine new order number for new instance of <SwVirtFlyDrawObj>
+
+ OD 2004-08-16 #i27030#
+ Used in method <CreateNewRef(..)>.
+
+ @author OD
+ */
+ sal_uInt32 _GetOrdNumForNewRef( const SwFlyFrm* pFlyFrm );
+
+public:
+ TYPEINFO();
+
+ //Legt das DrawObjekt an und meldet es beim Model an.
+ SwFlyDrawContact( SwFlyFrmFmt* pToRegisterIn, SdrModel* pMod );
+ virtual ~SwFlyDrawContact();
+
+ // OD 2004-03-29 #i26791#
+ virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const;
+ virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj );
+
+ // OD 2004-04-01 #i26791#
+ virtual const SdrObject* GetMaster() const;
+ virtual SdrObject* GetMaster();
+ virtual void SetMaster( SdrObject* _pNewMaster );
+
+ SwVirtFlyDrawObj* CreateNewRef( SwFlyFrm* pFly );
+
+ // virtuelle Methoden von SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // OD 2004-01-16 #110582# - override methods to control Writer fly frames,
+ // which are linked, and to assure that all objects anchored at/inside the
+ // Writer fly frame are also made visible/invisible.
+ virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj );
+ virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
+
+ /** get data collection of anchored objects handled by with contact
+
+ OD 2004-08-23 #110810#
+
+ @author
+ */
+ virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+};
+
+// OD 16.05.2003 #108784# - new class for re-direct methods calls at a 'virtual'
+// drawing object to its referenced object.
+class SwDrawVirtObj : public SdrVirtObj
+{
+ private:
+ // data for connection to writer layout
+ // OD 2004-03-25 #i26791# - anchored drawing object instance for the
+ // 'virtual' drawing object
+ SwAnchoredDrawObject maAnchoredDrawObj;
+
+ // writer-drawing contact object the 'virtual' drawing object is controlled by.
+ // This object is also the <UserCall> of the drawing object, if it's
+ // inserted into the drawing layer.
+ SwDrawContact& mrDrawContact;
+
+ using SdrVirtObj::GetPlusHdl;
+
+ private:
+ // AW: Need own sdr::contact::ViewContact since AnchorPos from parent is
+ // not used but something own (top left of new SnapRect minus top left
+ // of original SnapRect)
+ virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+
+ public:
+ TYPEINFO();
+
+ SwDrawVirtObj( SdrObject& _rNewObj,
+ SwDrawContact& _rDrawContact );
+ virtual ~SwDrawVirtObj();
+
+ // access to offset
+ // OD 30.06.2003 #108784# - virtual!!!
+ virtual const Point GetOffset() const;
+
+ virtual SdrObject* Clone() const;
+ virtual void operator=( const SdrObject& rObj );
+
+ // connection to writer layout
+ // OD 2004-03-29 #i26791#
+ const SwAnchoredObject* GetAnchoredObj() const;
+ SwAnchoredObject* AnchoredObj();
+ const SwFrm* GetAnchorFrm() const;
+ SwFrm* AnchorFrm();
+ void RemoveFromWriterLayout();
+
+ // connection to drawing layer
+ void AddToDrawingPage();
+ void RemoveFromDrawingPage();
+
+ // is 'virtual' drawing object connected to writer layout and
+ // to drawing layer.
+ bool IsConnected() const;
+
+ virtual void NbcSetAnchorPos(const Point& rPnt);
+
+ // #108784#
+ // All overloaded methods which need to use the offset
+ virtual void RecalcBoundRect();
+ virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
+ virtual ::basegfx::B2DPolyPolygon TakeContour() const;
+ virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
+ virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const;
+ virtual void NbcMove(const Size& rSiz);
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
+ virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
+ virtual void Move(const Size& rSiz);
+ virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual void Rotate(const Point& rRef, long nWink, double sn, double cs);
+ virtual void Mirror(const Point& rRef1, const Point& rRef2);
+ virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
+ virtual void RecalcSnapRect();
+ virtual const Rectangle& GetSnapRect() const;
+ virtual void SetSnapRect(const Rectangle& rRect);
+ virtual void NbcSetSnapRect(const Rectangle& rRect);
+ virtual const Rectangle& GetLogicRect() const;
+ virtual void SetLogicRect(const Rectangle& rRect);
+ virtual void NbcSetLogicRect(const Rectangle& rRect);
+ virtual Point GetSnapPoint(sal_uInt32 i) const;
+ virtual Point GetPoint(sal_uInt32 i) const;
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
+
+ // #108784#
+ virtual FASTBOOL HasTextEdit() const;
+
+ // OD 17.06.2003 #108784# - overload 'layer' methods
+ virtual SdrLayerID GetLayer() const;
+ virtual void NbcSetLayer(SdrLayerID nLayer);
+ virtual void SetLayer(SdrLayerID nLayer);
+
+ // FullDrag support
+ virtual bool supportsFullDrag() const;
+ virtual SdrObject* getFullDragClone() const;
+
+ // #i97197#
+ virtual void SetBoundRectDirty();
+ virtual const Rectangle& GetCurrentBoundRect() const;
+ virtual const Rectangle& GetLastBoundRect() const;
+};
+
+// OD 26.06.2003 #108784#
+bool CheckControlLayer( const SdrObject *pObj );
+
+//KontactObjekt fuer die Verbindung von Formaten als Repraesentanten der
+//Zeichenobjekte im StarWriter (SwClient) und den Objekten selbst im Drawing
+//(SdrObjUserCall).
+
+// --> OD 2006-01-18 #129959#
+class NestedUserCallHdl;
+// <--
+
+class SwDrawContact : public SwContact
+{
+ private:
+ // OD 2004-03-25 #i26791# - anchored drawing object instance for the
+ // 'master' drawing object
+ SwAnchoredDrawObject maAnchoredDrawObj;
+
+ // OD 16.05.2003 #108784# - data structure for collecting 'virtual'
+ // drawing object supporting drawing objects in headers/footers.
+ std::list<SwDrawVirtObj*> maDrawVirtObjs;
+
+ // OD 2004-04-01 #i26791# - boolean indicating set 'master' drawing
+ // object has been cleared.
+ bool mbMasterObjCleared : 1;
+
+ // OD 10.10.2003 #112299# - internal flag to indicate that disconnect
+ // from layout is in progress
+ bool mbDisconnectInProgress : 1;
+
+ // --> OD 2006-01-18 #129959#
+ // Needed data for handling of nested <SdrObjUserCall> events in
+ // method <_Changed(..)>
+ bool mbUserCallActive : 1;
+ // event type, which is handled for <mpSdrObjHandledByCurrentUserCall>.
+ // Note: value only valid, if <mbUserCallActive> is TRUE.
+ SdrUserCallType meEventTypeOfCurrentUserCall;
+
+ friend class NestedUserCallHdl;
+ // <--
+
+ // unary function used by <list> iterator to find a disconnected 'virtual'
+ // drawing object
+ struct UsedOrUnusedVirtObjPred
+ {
+ bool mbUsedPred;
+ UsedOrUnusedVirtObjPred( bool _bUsed ) : mbUsedPred( _bUsed ) {};
+ bool operator() ( const SwDrawVirtObj* _pDrawVirtObj )
+ {
+ if ( mbUsedPred )
+ {
+ return _pDrawVirtObj->IsConnected();
+ }
+ else
+ {
+ return !_pDrawVirtObj->IsConnected();
+ }
+ }
+ };
+
+ // unary function used by <list> iterator to find a 'virtual' drawing
+ // object anchored at a given frame
+ struct VirtObjAnchoredAtFrmPred
+ {
+ const SwFrm* mpAnchorFrm;
+ VirtObjAnchoredAtFrmPred( const SwFrm& _rAnchorFrm );
+ bool operator() ( const SwDrawVirtObj* _pDrawVirtObj );
+ };
+
+ // OD 16.05.2003 #108784# - method for adding/removing 'virtual' drawing object.
+ SwDrawVirtObj* CreateVirtObj();
+ void DestroyVirtObj( SwDrawVirtObj* pVirtObj );
+ void RemoveAllVirtObjs();
+
+ // OD 2004-03-31 #i26791#
+ void _InvalidateObjs( const bool _bUpdateSortedObjsList = false );
+
+ // --> OD 2006-01-23 #124157#
+ // no copy-constructor and no assignment operator
+ SwDrawContact( const SwDrawContact& );
+ SwDrawContact& operator=( const SwDrawContact& );
+ // <--
+ public:
+ TYPEINFO();
+
+ SwDrawContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj );
+ virtual ~SwDrawContact();
+
+ // OD 2004-03-29 #i26791#
+ // --> OD 2005-01-06 #i30669# - no default value for parameter <_pSdrObj>
+ virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const;
+ virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj );
+ // <--
+
+ // OD 2004-04-01 #i26791#
+ virtual const SdrObject* GetMaster() const;
+ virtual SdrObject* GetMaster();
+ virtual void SetMaster( SdrObject* _pNewMaster );
+
+ // OD 2004-03-29 #i26791#
+ const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = 0L ) const;
+ SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = 0L );
+
+ // --> OD 2004-06-30 #i28701# - page frame is now stored at member <maAnchoredDrawObj>
+ inline const SwPageFrm* GetPageFrm() const
+ {
+ return maAnchoredDrawObj.GetPageFrm();
+ }
+ inline SwPageFrm* GetPageFrm()
+ {
+ return maAnchoredDrawObj.GetPageFrm();
+ }
+ void SetPageFrm( SwPageFrm* _pNewPageFrm )
+ {
+ return maAnchoredDrawObj.SetPageFrm( _pNewPageFrm );
+ }
+ // <--
+ void ChkPage();
+ SwPageFrm* FindPage( const SwRect &rRect );
+
+ //Fuegt das SdrObject in die Arrays (SwPageFrm und SwFrm) des Layouts ein.
+ //Der Anker wird Anhand des Attributes SwFmtAnchor bestimmt.
+ //Das Objekt wird ggf. beim alten Anker abgemeldet.
+ void ConnectToLayout( const SwFmtAnchor *pAnch = 0 );
+ // OD 27.06.2003 #108784# - method to insert 'master' drawing object
+ // into drawing page
+ void InsertMasterIntoDrawPage();
+
+ void DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer = true );
+ // OD 19.06.2003 #108784# - disconnect for a dedicated drawing object -
+ // could be 'master' or 'virtual'.
+ void DisconnectObjFromLayout( SdrObject* _pDrawObj );
+ // OD 26.06.2003 #108784# - method to remove 'master' drawing object
+ // from drawing page.
+ // To be used by the undo for delete of object. Call it after method
+ // <DisconnectFromLayout( bool = true )> is already performed.
+ // Note: <DisconnectFromLayout( bool )> no longer removes the 'master'
+ // drawing object from drawing page.
+ void RemoveMasterFromDrawPage();
+
+ // OD 19.06.2003 #108784# - get drawing object ('master' or 'virtual')
+ // by frame.
+ SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm );
+
+ // virtuelle Methoden von SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // virtuelle Methoden von SdrObjUserCall
+ virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
+
+ // wird von Changed() und auch vom UndoDraw benutzt, uebernimmt
+ // das Notifien von Absaetzen, die ausweichen muessen
+ void _Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect);
+
+ //Moved alle SW-Verbindungen zu dem neuen Master.
+ void ChangeMasterObject( SdrObject *pNewMaster );
+
+ // OD 19.06.2003 #108784#
+ SwDrawVirtObj* AddVirtObj();
+
+ // OD 20.06.2003 #108784#
+ void NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect );
+
+ /** get data collection of anchored objects, handled by with contact
+
+ OD 2004-08-23 #110810#
+
+ @author
+ */
+ virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+};
+
+#endif
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
new file mode 100644
index 000000000000..e7d52cbdc9bb
--- /dev/null
+++ b/sw/inc/ddefld.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ddefld.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DDEFLD_HXX
+#define _DDEFLD_HXX
+
+#include <sfx2/lnkbase.hxx>
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: FieldType fuer DDE
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
+{
+ String aName;
+ String aExpansion;
+
+ ::sfx2::SvBaseLinkRef refLink;
+ SwDoc* pDoc;
+
+ USHORT nRefCnt;
+ BOOL bCRLFFlag : 1;
+ BOOL bDeleted : 1;
+
+ SW_DLLPRIVATE void _RefCntChgd();
+
+public:
+ SwDDEFieldType( const String& rName, const String& rCmd,
+ USHORT = sfx2::LINKUPDATE_ONCALL );
+ ~SwDDEFieldType();
+
+ const String& GetExpansion() const { return aExpansion; }
+ void SetExpansion( const String& rStr ) { aExpansion = rStr,
+ bCRLFFlag = FALSE; }
+
+ virtual SwFieldType* Copy() const;
+ virtual const String& GetName() const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ String GetCmd() const;
+ void SetCmd( const String& rStr );
+
+ USHORT GetType() const { return refLink->GetUpdateMode(); }
+ void SetType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
+
+ BOOL IsDeleted() const { return bDeleted; }
+ void SetDeleted( BOOL b ) { bDeleted = b; }
+
+ void UpdateNow() { refLink->Update(); }
+ void Disconnect() { refLink->Disconnect(); }
+
+ const ::sfx2::SvBaseLink& GetBaseLink() const { return *refLink; }
+ ::sfx2::SvBaseLink& GetBaseLink() { return *refLink; }
+
+ const SwDoc* GetDoc() const { return pDoc; }
+ SwDoc* GetDoc() { return pDoc; }
+ void SetDoc( SwDoc* pDoc );
+
+ void IncRefCnt() { if( !nRefCnt++ && pDoc ) _RefCntChgd(); }
+ void DecRefCnt() { if( !--nRefCnt && pDoc ) _RefCntChgd(); }
+
+ void SetCRLFDelFlag( BOOL bFlag = TRUE ) { bCRLFFlag = bFlag; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: DDE-Feld
+ --------------------------------------------------------------------*/
+
+class SwDDEField : public SwField
+{
+public:
+ SwDDEField(SwDDEFieldType*);
+ ~SwDDEField();
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // ueber Typen Parameter ermitteln
+ // Name kann nicht geaendert werden
+ virtual const String& GetPar1() const;
+
+ // Commando
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+};
+
+
+#endif // _DDEFLD_HXX
diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc
new file mode 100644
index 000000000000..deed99451d94
--- /dev/null
+++ b/sw/inc/dialog.hrc
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dialog.hrc,v $
+ * $Revision: 1.7.240.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DIALOG_HRC
+#define _DIALOG_HRC
+
+// #include *****************************************************************
+
+#include "rcid.hrc"
+
+// Dialoge ******************************************************************
+
+#define DLG_SAVE_REGISTRY_FILE (RC_DIALOG_BEGIN + 1)
+
+#define DLG_PASSWD (RC_DIALOG_BEGIN + 3)
+#define DLG_PASTESPECIAL (RC_DIALOG_BEGIN + 5)
+#define DLG_LINKS (RC_DIALOG_BEGIN + 6)
+#define DLG_LINKEDIT (RC_DIALOG_BEGIN + 7)
+#define DLG_INSERT_ABSTRACT (RC_DIALOG_BEGIN + 8)
+#define DLG_ASCII_FILTER (RC_DIALOG_BEGIN + 9)
+#define DLG_WORDCOUNT (RC_DIALOG_BEGIN + 10)
+#define RID_QB_SPELL_CONTINUE (RC_DIALOG_BEGIN + 11)
+#define STR_SPELLING_COMPLETED (RC_DIALOG_BEGIN + 12)
+
+// Strings ******************************************************************
+
+#define STR_LINKEDIT_TEXT (RC_DIALOG_BEGIN + 1)
+
+#define STR_CLOSELINKMSG (RC_DIALOG_BEGIN + 3)
+#define STR_PATH_NOT_FOUND (RC_DIALOG_BEGIN + 4)
+
+#define STR_FLT_SGV (RC_DIALOG_BEGIN + 8)
+
+#define STR_NEWDLG_NAME (RC_DIALOG_BEGIN + 10)
+
+// Controls *****************************************************************
+
+#define CB_USE_PASSWD (RC_DIALOG_BEGIN )
+#define CB_READ_ONLY (RC_DIALOG_BEGIN + 1)
+
+// Bereiche *****************************************************************
+
+
+#define RC_REGIONSW_BEGIN (RC_DIALOG_BEGIN + 60)
+#define RC_REGIONSW_END (RC_DIALOG_BEGIN + 79)
+
+#define RC_MACASSGN_BEGIN (RC_DIALOG_BEGIN + 80)
+#define RC_MACASSGN_END (RC_DIALOG_BEGIN + 89)
+
+#define RC_DLG_ADDR (RC_DIALOG_BEGIN + 90)
+#define RC_SWDLG_BACKGROUND (RC_DIALOG_BEGIN + 91)
+#define RC_DLG_SWNUMFMTDLG (RC_DIALOG_BEGIN + 92)
+#define RC_DLG_SWBORDERDLG (RC_DIALOG_BEGIN + 93)
+#define RC_DLG_SWWRAPDLG (RC_DIALOG_BEGIN + 94)
+#define RC_DLG_SWFLDEDITDLG (RC_DIALOG_BEGIN + 95)
+// Ueberlaufpruefung ********************************************************
+
+#define DIALOG_ACT_END RC_MACASSGN_END
+
+#if DIALOG_ACT_END > RC_DIALOG_END
+#error Resource-Ueberlauf in #file, #line
+#endif
+
+#endif
+
diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx
new file mode 100644
index 000000000000..0fa2063e1d72
--- /dev/null
+++ b/sw/inc/dlelstnr.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlelstnr.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DLELSTNR_HXX_
+#define _DLELSTNR_HXX_
+
+#include <cppuhelper/weak.hxx>
+#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
+#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+
+
+namespace com { namespace sun { namespace star {
+ namespace linguistic2 {
+ class XDictionaryList;
+ class XLinguServiceManager;
+ class XProofreadingIterator;
+ }
+ namespace frame {
+ class XTerminateListener;
+ }
+} } }
+
+///////////////////////////////////////////////////////////////////////////
+// SwLinguServiceEventListener
+// is a EventListener that triggers spellchecking
+// and hyphenation when relevant changes (to the
+// dictionaries of the dictionary list, or properties) were made.
+//
+
+class SwLinguServiceEventListener :
+ public cppu::WeakImplHelper2
+ <
+ com::sun::star::linguistic2::XLinguServiceEventListener,
+ com::sun::star::frame::XTerminateListener
+ >
+{
+ com::sun::star::uno::Reference<
+ com::sun::star::frame::XDesktop > xDesktop;
+ com::sun::star::uno::Reference<
+ com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr;
+ com::sun::star::uno::Reference<
+ com::sun::star::linguistic2::XProofreadingIterator > xGCIterator;
+
+ // disallow use of copy-constructor and assignment operator
+ SwLinguServiceEventListener(const SwLinguServiceEventListener &);
+ SwLinguServiceEventListener & operator = (const SwLinguServiceEventListener &);
+
+public:
+ SwLinguServiceEventListener();
+ virtual ~SwLinguServiceEventListener();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XDictionaryListEventListener
+ virtual void SAL_CALL processDictionaryListEvent( const ::com::sun::star::linguistic2::DictionaryListEvent& rDicListEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XLinguServiceEventListener
+ virtual void SAL_CALL processLinguServiceEvent( const ::com::sun::star::linguistic2::LinguServiceEvent& rLngSvcEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTerminateListener
+ virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
+
diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx
new file mode 100644
index 000000000000..678a1791bad4
--- /dev/null
+++ b/sw/inc/dobjfac.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dobjfac.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOBJFAC_HXX
+#define _DOBJFAC_HXX
+
+#include <tools/link.hxx>
+
+//-----------------------
+// class SwObjectFactory
+//-----------------------
+class SdrObjFactory;
+
+class SwObjectFactory
+{
+public:
+ DECL_LINK( MakeObject, SdrObjFactory * );
+};
+
+extern SwObjectFactory aSwObjectFactory;
+
+
+#endif // _DOBJFAC_HXX
+
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
new file mode 100644
index 000000000000..de82d9056ff9
--- /dev/null
+++ b/sw/inc/doc.hxx
@@ -0,0 +1,2200 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: doc.hxx,v $
+ * $Revision: 1.157 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOC_HXX
+#define _DOC_HXX
+
+/** SwDoc interfaces */
+
+#include <IInterface.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <IDocumentDeviceAccess.hxx>
+#include <IDocumentMarkAccess.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <IDocumentUndoRedo.hxx>
+#include <IDocumentLinksAdministration.hxx>
+#include <IDocumentFieldsAccess.hxx>
+#include <IDocumentContentOperations.hxx>
+#include <IDocumentStylePoolAccess.hxx>
+#include <IDocumentLineNumberAccess.hxx>
+#include <IDocumentStatistics.hxx>
+#include <IDocumentState.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <IDocumentTimerAccess.hxx>
+#include <IDocumentChartDataProviderAccess.hxx>
+// --> OD 2007-10-26 #i83479#
+#include <IDocumentOutlineNodes.hxx>
+#include <IDocumentListItems.hxx>
+#include <set>
+// <--
+// --> OD 2008-03-12 #refactorlists#
+#include <IDocumentListsAccess.hxx>
+class SwList;
+// <--
+#include <IDocumentExternalData.hxx>
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <vcl/timer.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <ndarr.hxx>
+#include <swatrset.hxx>
+#include <toxe.hxx> // enums
+#include <flyenum.hxx>
+#include <itabenum.hxx>
+#include <swdbdata.hxx>
+#include <chcmprse.hxx>
+#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
+#include <vos/ref.hxx>
+#include <svx/svdtypes.hxx>
+#include <svtools/style.hxx>
+#include <svx/numitem.hxx>
+#include "comphelper/implementationreference.hxx"
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+
+#include <hash_map>
+#include <stringhash.hxx>
+
+#include <svtools/embedhlp.hxx>
+#include <vector>
+#include <memory>
+
+#include <boost/scoped_ptr.hpp>
+
+class SfxObjectShell;
+class SfxObjectShellRef;
+class SvxForbiddenCharactersTable;
+class SwExtTextInput;
+class DateTime;
+class EditFieldInfo;
+class JobSetup;
+class Color;
+class KeyCode;
+class Outliner;
+class OutputDevice;
+class Point;
+class SbxArray;
+class SdrModel;
+class SdrObject;
+class SdrUndoAction;
+class VirtualDevice;
+class SfxPrinter;
+class SvNumberFormatter;
+class SvStringsSort;
+class SvUShorts;
+class SvUShortsSort;
+class SvxLinkManager;
+class SvxMacro;
+class SvxMacroTableDtor;
+class SvxBorderLine;
+class SwAutoCompleteWord;
+class SwAutoCorrExceptWord;
+class SwCalc;
+class SwCellFrm;
+class SwCharFmt;
+class SwCharFmts;
+class SwConditionTxtFmtColl;
+class SwCrsrShell;
+class SwCursor;
+class SwDBNameInfField;
+class SwDocShell;
+class SwDocUpdtFld;
+class SwDrawFrmFmt;
+class SwDrawView;
+class SwEditShell;
+class SwFieldType;
+class SwField;
+class SwTxtFld;
+class SwFldTypes;
+class SwFlyFrmFmt;
+class SwFmt;
+class SwFmtINetFmt;
+class SwFmtRefMark;
+class SwFrmFmt;
+class SwFrmFmts;
+class SwFtnIdxs;
+class SwFtnInfo;
+class SwEndNoteInfo;
+class GraphicObject;
+class SwGrfFmtColl;
+class SwGrfFmtColls;
+class SwLineNumberInfo;
+class SwNewDBMgr;
+class SwNoTxtNode;
+class SwNodeIndex;
+class SwNodeRange;
+class SwNumRule;
+class SwNumRuleTbl;
+class SwPageDesc;
+class SwPosFlyFrms;
+class SwPagePreViewPrtData;
+class SwRedline;
+class SwRedlineTbl;
+class SwRootFrm;
+class SwRubyList;
+class SwRubyListEntry;
+class SwSectionFmt;
+class SwSectionFmts;
+class SwSelBoxes;
+class SwSpzFrmFmts;
+class SwTOXBase;
+class SwTOXBaseSection;
+class SwTOXMark;
+class SwTOXMarks;
+class SwTOXType;
+class SwTOXTypes;
+class SwTabCols;
+class SwTable;
+class SwTableAutoFmt;
+class SwTableBox;
+class SwTableBoxFmt;
+class SwTableFmt;
+class SwTableLineFmt;
+class SwTableNode;
+class SwTextBlocks;
+class SwTxtFmtColl;
+class SwTxtFmtColls;
+class SwURLStateChanged;
+class SwUndo;
+class SwUndoIds;
+class SwUndoIter;
+class SwUndos;
+class SwUnoCrsr;
+class SwUnoCrsrTbl;
+class ViewShell;
+class _SetGetExpFld;
+class SwDrawContact;
+class SwLayouter;
+class SdrView;
+class SdrMarkList;
+class SwAuthEntry;
+class SwUnoCallBack;
+class SwLayoutCache;
+class IStyleAccess;
+struct SwCallMouseEvent;
+struct SwDocStat;
+struct SwHash;
+struct SwSortOptions;
+struct SwDefTOXBase_Impl;
+struct SwPrintData;
+class SdrPageView;
+struct SwConversionArgs;
+class SwRewriter;
+class SwMsgPoolItem;
+class SwChartDataProvider;
+class SwChartLockController_Helper;
+class IGrammarContact;
+
+namespace sw { namespace mark {
+ class MarkManager;
+}}
+namespace sw {
+ class MetaFieldManager;
+}
+
+namespace com { namespace sun { namespace star {
+namespace i18n {
+ struct ForbiddenCharacters; // comes from the I18N UNO interface
+}
+namespace uno {
+ template < class > class Sequence;
+}
+namespace container {
+ class XNameContainer; // for getXForms()/isXForms()/initXForms() methods
+}
+}}}
+
+namespace sfx2 {
+ class SvLinkSource;
+ class IXmlIdRegistry;
+}
+
+//PageDescriptor-Schnittstelle, Array hier wegen inlines.
+typedef SwPageDesc* SwPageDescPtr;
+SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 )
+
+// forward declartion
+void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
+
+// global function to start grammar checking in the document
+void StartGrammarChecking( SwDoc &rDoc );
+
+class SW_DLLPUBLIC SwDoc :
+ public IInterface,
+ public IDocumentSettingAccess,
+ public IDocumentDeviceAccess,
+ public IDocumentRedlineAccess,
+ public IDocumentUndoRedo,
+ public IDocumentLinksAdministration,
+ public IDocumentFieldsAccess,
+ public IDocumentContentOperations,
+ public IDocumentStylePoolAccess,
+ public IDocumentLineNumberAccess,
+ public IDocumentStatistics,
+ public IDocumentState,
+ public IDocumentDrawModelAccess,
+ public IDocumentLayoutAccess,
+ public IDocumentTimerAccess,
+ public IDocumentChartDataProviderAccess,
+ // --> OD 2007-10-26 #i83479#
+ public IDocumentListItems,
+ public IDocumentOutlineNodes,
+ // <--
+ // --> OD 2008-03-12 #refactorlists#
+ public IDocumentListsAccess,
+ // <--
+ public IDocumentExternalData
+{
+
+ friend void _InitCore();
+ friend void _FinitCore();
+
+ //---------------- private Member --------------------------------
+
+ // -------------------------------------------------------------------
+ // die Objecte
+ SwNodes aNodes; // Inhalt des Dokumentes
+ SwNodes aUndoNodes; // Inhalt fuer das Undo
+ SwAttrPool* mpAttrPool; // der Attribut Pool
+ SwPageDescs aPageDescs; // PageDescriptoren
+ Link aOle2Link; // OLE 2.0-Benachrichtigung
+ /* @@@MAINTAINABILITY-HORROR@@@
+ Timer should not be members of the model
+ */
+ Timer aIdleTimer; // der eigene IdleTimer
+ Timer aOLEModifiedTimer; // Timer for update modified OLE-Objecs
+ SwDBData aDBData; // database descriptor
+ ::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd;
+ String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file
+ SvStringsDtor aPatternNms; // Array fuer die Namen der Dokument-Vorlagen
+ com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
+ xXForms; // container with XForms models
+ mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator;
+
+ const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager;
+ const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
+
+ // -------------------------------------------------------------------
+ // die Pointer
+ //Defaultformate
+ SwFrmFmt *pDfltFrmFmt;
+ SwFrmFmt *pEmptyPageFmt; // Format fuer die Default-Leerseite.
+ SwFrmFmt *pColumnContFmt; // Format fuer Spaltencontainer
+ SwCharFmt *pDfltCharFmt;
+ SwTxtFmtColl *pDfltTxtFmtColl; // Defaultformatcollections
+ SwGrfFmtColl *pDfltGrfFmtColl;
+
+ SwFrmFmts *pFrmFmtTbl; // Formattabellen
+ SwCharFmts *pCharFmtTbl;
+ SwSpzFrmFmts *pSpzFrmFmtTbl;
+ SwSectionFmts *pSectionFmtTbl;
+ SwFrmFmts *pTblFrmFmtTbl; // spz. fuer Tabellen
+ SwTxtFmtColls *pTxtFmtCollTbl; // FormatCollections
+ SwGrfFmtColls *pGrfFmtCollTbl;
+
+ SwTOXTypes *pTOXTypes; // Verzeichnisse
+ SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's
+
+ SwRootFrm *pLayout; // Rootframe des spezifischen Layouts.
+ SdrModel *pDrawModel; // StarView Drawing
+
+ SwUndos *pUndos; // Undo/Redo History
+
+ SwDocUpdtFld *pUpdtFlds; // Struktur zum Field-Update
+ SwFldTypes *pFldTypes; // Feldtypen
+ SwNewDBMgr *pNewDBMgr; // Pointer auf den neuen DBMgr fuer
+ // Evaluierung der DB-Fields
+
+ VirtualDevice *pVirDev; // can be used for formatting
+ SfxPrinter *pPrt; // can be used for formatting
+ SwPrintData *pPrtData; // Print configuration
+
+ SwDoc *pGlossaryDoc; // Pointer auf das Glossary-Dokument. Dieses
+
+ SwNumRule *pOutlineRule;
+ SwFtnInfo *pFtnInfo;
+ SwEndNoteInfo *pEndNoteInfo;
+ SwLineNumberInfo*pLineNumberInfo;
+ SwFtnIdxs *pFtnIdxs;
+ SwDocStat *pDocStat; // Statistic Informationen
+ SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros
+
+ SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc
+ SfxObjectShellRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine
+ // DocShell gesetzt ist, muss dieser
+ // Ref-Pointer gesetzt sein!!!!)
+ SvxLinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE)
+
+ SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von
+ // autokorrigierten Woertern, die "zurueck"
+ // verbessert werden
+ SwURLStateChanged *pURLStateChgd; // SfxClient fuer Aenderungen in der
+ // INetHistory
+ SvNumberFormatter *pNumberFormatter; // NumFormatter fuer die Tabellen/Felder
+
+ mutable SwNumRuleTbl *pNumRuleTbl; // Liste aller benannten NumRules
+
+ // Hash map to find numrules by name
+ mutable std::hash_map<String, SwNumRule *, StringHash> maNumRuleMap;
+
+ // --> OD 2008-03-12 #refactorlists#
+ typedef std::hash_map< String, SwList*, StringHash > tHashMapForLists;
+ // container to hold the lists of the text document
+ tHashMapForLists maLists;
+ // relation between list style and its default list
+ tHashMapForLists maListStyleLists;
+ // <--
+
+ SwRedlineTbl *pRedlineTbl; // Liste aller Redlines
+ String *pAutoFmtRedlnComment; // Kommentar fuer Redlines, die
+ // uebers Autoformat eingefuegt werden
+ SwUnoCrsrTbl *pUnoCrsrTbl;
+
+ SwPagePreViewPrtData *pPgPViewPrtData; // Einzuege/Abstaende fuers
+ // Drucken der Seitenansicht
+ SwPaM *pExtInputRing;
+
+ SwLayouter *pLayouter; // ::com::sun::star::frame::Controller for complex layout formatting
+ // like footnote/endnote in sections
+ IStyleAccess *pStyleAccess; // handling of automatic styles
+ SwLayoutCache *pLayoutCache; // Layout cache to read and save with the
+ // document for a faster formatting
+
+ SwUnoCallBack *pUnoCallBack;
+ IGrammarContact *mpGrammarContact; // for grammar checking in paragraphs during editing
+
+ mutable comphelper::ImplementationReference< SwChartDataProvider
+ , ::com::sun::star::chart2::data::XDataProvider >
+ aChartDataProviderImplRef;
+ SwChartLockController_Helper *pChartControllerHelper;
+
+ // table of forbidden characters of this document
+ vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable;
+
+ // --> OD 2007-10-26 #i83479#
+public:
+ struct lessThanNodeNum
+ {
+ bool operator()( const SwNodeNum* pNodeNumOne,
+ const SwNodeNum* pNodeNumTwo ) const;
+ };
+
+ typedef ::std::set< const SwNodeNum*, lessThanNodeNum > tImplSortedNodeNumList;
+private:
+ tImplSortedNodeNumList* mpListItemsList;
+ // <--
+
+ ::std::auto_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry;
+
+ // -------------------------------------------------------------------
+ // sonstige
+ sal_uInt16 nUndoPos; // akt. Undo-InsertPosition (fuers Redo!)
+ sal_uInt16 nUndoSavePos; // Position im Undo-Array, ab der das Doc
+ // nicht als modifiziert gilt
+ sal_uInt16 nUndoCnt; // Anzahl von Undo Aktionen
+ sal_uInt16 nUndoSttEnd; // != 0 -> innerhalb einer Klammerung
+
+ sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo fuers UI-seitige zusammenfassen
+ // von AutoFmt-Redlines. Wird vom SwAutoFmt
+ // verwaltet!
+ sal_uInt16 nLinkUpdMode; // UpdateMode fuer Links
+ SwFldUpdateFlags eFldUpdMode; // Mode fuer Felder/Charts automatisch aktualisieren
+ RedlineMode_t eRedlineMode; // aktueller Redline Modus
+ SwCharCompressType eChrCmprType; // for ASIAN: compress punctuation/kana
+
+ sal_Int32 mReferenceCount;
+ sal_Int32 mIdleBlockCount;
+ sal_Int8 nLockExpFld; // Wenn != 0 hat UpdateExpFlds() keine Wirkung
+
+ /* Draw Model Layer IDs
+ * LayerIds, Heaven == ueber dem Dokument
+ * Hell == unter dem Dokument
+ * Controls == ganz oben
+ */
+ SdrLayerID nHeaven;
+ SdrLayerID nHell;
+ SdrLayerID nControls;
+ SdrLayerID nInvisibleHeaven;
+ SdrLayerID nInvisibleHell;
+ SdrLayerID nInvisibleControls;
+
+ bool mbGlossDoc : 1; //TRUE: ist ein Textbaustein Dokument
+ bool mbModified : 1; //TRUE: Dokument ist veraendert
+ bool mbDtor : 1; //TRUE: ist im SwDoc DTOR
+ // leider auch temporaer von
+ // SwSwgReader::InLayout(), wenn fehlerhafte
+ // Frames geloescht werden muessen
+ bool mbUndo : 1; // TRUE: Undo eingeschaltet
+ bool mbGroupUndo : 1; // TRUE: Undos werden gruppiert
+ bool mbPageNums : 1; // TRUE: es gibt virtuelle Seitennummern
+ bool mbLoaded : 1; // TRUE: ein geladenes Doc
+ bool mbUpdateExpFld : 1; // TRUE: Expression-Felder updaten
+ bool mbNewDoc : 1; // TRUE: neues Doc
+ bool mbNewFldLst : 1; // TRUE: Felder-Liste neu aufbauen
+ bool mbCopyIsMove : 1; // TRUE: Copy ist ein verstecktes Move
+ bool mbNoDrawUndoObj : 1; // TRUE: keine DrawUndoObjecte speichern
+ bool mbVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt
+ bool mbBrowseMode : 1; // TRUE: Dokument im BrowseModus anzeigen
+ bool mbInReading : 1; // TRUE: Dokument wird gerade gelesen
+ bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary
+ bool mbUpdateTOX : 1; // TRUE: nach Dokument laden die TOX Updaten
+ bool mbInLoadAsynchron : 1; // TRUE: Dokument wird gerade asynchron geladen
+ bool mbHTMLMode : 1; // TRUE: Dokument ist im HTMLMode
+ bool mbInCallModified : 1; // TRUE: im Set/Reset-Modified Link
+ bool mbIsGlobalDoc : 1; // TRUE: es ist ein GlobalDokument
+ bool mbGlblDocSaveLinks : 1; // TRUE: im GlobalDoc. gelinkte Sect. mit speichern
+ bool mbIsLabelDoc : 1; // TRUE: es ist ein Etiketten-Dokument
+ bool mbIsAutoFmtRedline : 1; // TRUE: die Redlines werden vom Autoformat aufgezeichnet
+ bool mbOLEPrtNotifyPending : 1; // TRUE: Printer ist geaendert und beim
+ // Erzeugen der ::com::sun::star::sdbcx::View ist eine Benachrichtigung
+ // der OLE-Objekte PrtOLENotify() notwendig.
+ bool mbAllOLENotify : 1; // True: Benachrichtigung aller Objekte ist notwendig
+ bool mbIsRedlineMove : 1; // True: die Redlines werden in/aus der Section verschoben
+ bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc
+ bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage
+ bool mbPurgeOLE : 1; // TRUE: Purge OLE-Objects
+ bool mbKernAsianPunctuation : 1; // TRUE: kerning also for ASIAN punctuation
+ bool mbReadlineChecked : 1; // TRUE: if the query was already shown
+ bool mbLinksUpdated : 1; // OD 2005-02-11 #i38810#
+ // flag indicating, that the links have been updated.
+ bool mbClipBoard : 1; // true: this document represents the clipboard
+ bool mbColumnSelection : 1; // true: this content has bee created by a column selection
+ // (clipboard docs only)
+
+#ifndef PRODUCT
+ bool mbXMLExport : 1; // TRUE: during XML export
+#endif
+
+ // --> OD 2006-03-21 #b6375613#
+ // Document flag to trigger conversion, which applys the workaround for documents,
+ // which uses a certain layout defect in OOo 1.x to layout the documents.
+ // This conversion is performed, when the frames for the layout are created.
+ // Thus, this document flag has to be set after load a document and before
+ // creating the document view.
+ bool mbApplyWorkaroundForB6375613 : 1;
+ // <--
+
+ //
+ // COMPATIBILITY FLAGS START
+ //
+ //
+ // HISTORY OF THE COMPATIBILITY FLAGS:
+ //
+ // SO5:
+ // mbParaSpaceMax def = FALSE, TRUE since SO8
+ // mbParaSpaceMaxAtPages def = FALSE, TRUE since SO8
+ //
+ // SO6:
+ // mbTabCompat def = FALSE, TRUE since SO8
+ //
+ // SO7:
+ // mbUseVirtualDevice def = TRUE
+ // mbAddFlyOffsets def = FALSE, hidden
+ //
+ // SO7pp1:
+ // bOldNumbering def = FALSE, hidden
+ //
+ // SO8:
+ // mbAddExternalLeading def = TRUE
+ // mbUseHiResolutionVirtualDevice def = TRUE, hidden
+ // mbOldLineSpacing def = FALSE
+ // mbAddParaSpacingToTableCells def = TRUE
+ // mbUseFormerObjectPos def = FALSE
+ // mbUseFormerTextWrapping def = FALSE
+ // mbConsiderWrapOnObjPos def = FALSE
+ //
+ // SO8pp1:
+ // mbIgnoreFirstLineIndentInNumbering def = FALSE, hidden
+ // mbDoNotJustifyLinesWithManualBreak def = FALSE, hidden
+ // mbDoNotResetParaAttrsForNumFont def = FALSE, hidden
+ //
+ // SO8pp3
+ // mbDoNotCaptureDrawObjsOnPage def = FALSE, hidden
+ // - Relevant for drawing objects, which don't follow the text flow, but
+ // whose position is outside the page area:
+ // FALSE: Such drawing objects are captured on the page area of its anchor.
+ // TRUE: Such drawing objects can leave the page area, they aren't captured.
+ // mbTableRowKeep def = FALSE, hidden
+ // mbIgnoreTabsAndBlanksForLineCalculation def = FALSE, hidden
+ // mbClipAsCharacterAnchoredWriterFlyFrame def = FALSE, hidden
+ // - Introduced in order to re-activate clipping of as-character anchored
+ // Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents,
+ // which are created with version prior SO8/OOo 2.0
+ //
+ // SO8pp4
+ // mbUnixForceZeroExtLeading def = FALSE, hidden
+ //
+ // SO8pu8
+ // mbOldPrinterMetrics def = FALSE, hidden
+ //
+ // SO9
+ // #i24363# tab stops relative to indent
+ // mbTabRelativeToIndent def = TRUE, hidden
+ // #i89181# suppress tab stop at left indent for paragraphs in lists, whose
+ // list level position and space mode equals LABEL_ALIGNMENT and whose list
+ // label is followed by a tab character.
+ // mbTabAtLeftIndentForParagraphsInList def = FALSE, hidden
+
+ bool mbParaSpaceMax : 1;
+ bool mbParaSpaceMaxAtPages : 1;
+ bool mbTabCompat : 1;
+ bool mbUseVirtualDevice : 1;
+ bool mbAddFlyOffsets : 1;
+ bool mbAddExternalLeading : 1;
+ bool mbUseHiResolutionVirtualDevice : 1;
+ bool mbOldLineSpacing : 1; // OD 2004-01-06 #i11859#
+ bool mbAddParaSpacingToTableCells : 1; // OD 2004-02-16 #106629#
+ bool mbUseFormerObjectPos : 1; // OD 2004-03-12 #i11860#
+ bool mbUseFormerTextWrapping : 1; // FME 2005-05-11 #108724#
+ bool mbConsiderWrapOnObjPos : 1; // OD 2004-05-05 #i28701#
+ // TRUE: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
+
+ // non-ui-compatibility flags:
+ bool mbOldNumbering : 1; // HBRINKM #111955#
+ bool mbIgnoreFirstLineIndentInNumbering : 1; // FME 2005-05-30# i47448#
+ bool mbDoNotJustifyLinesWithManualBreak : 1; // FME 2005-06-08 #i49277#
+ bool mbDoNotResetParaAttrsForNumFont : 1; // FME 2005-08-11 #i53199#
+ bool mbTableRowKeep : 1; // FME 2006-02-10 #131283#
+ bool mbIgnoreTabsAndBlanksForLineCalculation : 1; // FME 2006-03-01 #i3952#
+ bool mbDoNotCaptureDrawObjsOnPage : 1; // OD 2006-03-14 #i62875#
+ bool mbOutlineLevelYieldsOutlineRule : 1;
+ bool mbClipAsCharacterAnchoredWriterFlyFrames : 1; // OD 2006-04-13 #b6402800#
+ bool mbUnixForceZeroExtLeading : 1; // FME 2006-10-09 #i60945#
+ bool mbOldPrinterMetrics : 1; // FME 2007-05-14 #147385#
+ bool mbTabRelativeToIndent : 1; // #i24363# tab stops relative to indent
+ bool mbProtectForm : 1;
+ bool mbTabAtLeftIndentForParagraphsInList; // OD 2008-06-05 #i89181# - see above
+
+ // #i78591#
+ sal_uInt32 n32DummyCompatabilityOptions1;
+ sal_uInt32 n32DummyCompatabilityOptions2;
+ //
+ // COMPATIBILITY FLAGS END
+ //
+
+ sal_Bool mbStartIdleTimer ; // idle timer mode start/stop
+
+ static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete
+ static sal_uInt16 nUndoActions; // anzahl von Undo ::com::sun::star::chaos::Action
+
+ //---------------- private Methoden ------------------------------
+ void checkRedlining(RedlineMode_t& _rReadlineMode);
+
+ sal_Bool DelUndoObj( sal_uInt16 nEnde ); // loescht alle UndoObjecte vom Anfang
+ // bis zum angegebenen Ende
+ DECL_LINK( AddDrawUndo, SdrUndoAction * );
+ // DrawModel
+ void DrawNotifyUndoHdl(); // wegen CLOOKs
+
+ // nur fuer den internen Gebrauch deshalb privat.
+ // Kopieren eines Bereiches im oder in ein anderes Dokument !
+ // Die Position darf nicht im Bereich liegen !!
+ bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */,
+ const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const;
+
+ SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos,
+ const SwCntntNode& rNode, RndStdIds eRequestId,
+ const SfxItemSet* pFlyAttrSet,
+ SwFrmFmt* = 0 );
+
+ SwFlyFrmFmt* _InsNoTxtNode( const SwPosition&rPos, SwNoTxtNode*,
+ const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet,
+ SwFrmFmt* = 0 );
+
+ void CopyFlyInFlyImpl( const SwNodeRange& rRg,
+ const xub_StrLen nEndContentIndex,
+ const SwNodeIndex& rStartIdx,
+ const bool bCopyFlyAtFly = false ) const;
+ sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
+
+ // --> OD 2005-01-13 #i40550#
+ typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, BOOL, BOOL );
+ // <--
+ SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
+ FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
+ void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr,
+ FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt );
+ void CopyPageDescHeaderFooterImpl( bool bCpyHeader,
+ const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt );
+ SwFmt* FindFmtByName( const SvPtrarr& rFmtArr,
+ const String& rName ) const;
+
+ VirtualDevice& CreateVirtualDevice_() const;
+ SfxPrinter& CreatePrinter_() const;
+ void PrtDataChanged(); //Printer oder JobSetup geandert, es muss
+ //fuer entsprechende Invalidierungen und
+ //Benachrichtigungen gesorgt werden.
+
+ // gcc: aFtnInfo::CopyCtor ist private, also muessen wir uns auch schuetzen
+ SwDoc( const SwDoc &);
+
+ // fuer Felder:
+ void _InitFieldTypes(); // wird vom CTOR gerufen!!
+ void _MakeFldList( int eMode );
+
+ // Datenbankfelder:
+ void UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc );
+ void AddUsedDBToList( SvStringsDtor& rDBNameList,
+ const SvStringsDtor& rUsedDBNames );
+ void AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName );
+ sal_Bool IsNameInArray( const SvStringsDtor& rOldNames, const String& rName );
+ void GetAllDBNames( SvStringsDtor& rAllDBNames );
+ void ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
+ const String& rNewName, String& rFormel );
+ SvStringsDtor& FindUsedDBs( const SvStringsDtor& rAllDBNames,
+ const String& rFormel,
+ SvStringsDtor& rUsedDBNames );
+
+ void InitDrawModel();
+ void ReleaseDrawModel();
+
+ void _CreateNumberFormatter();
+
+ sal_Bool _UnProtectTblCells( SwTable& rTbl );
+
+ // erzeuge Anhand der vorgebenen Collection Teildokumente
+ // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
+ sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath,
+ const SwTxtFmtColl* pSplitColl );
+ sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaijianwei.
+
+
+ // Charts der angegebenen Tabelle updaten
+ void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
+
+ BOOL _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
+ USHORT nMode );
+
+ // unser eigener 'IdlTimer' ruft folgende Methode
+ DECL_LINK( DoIdleJobs, Timer * );
+ // der CharTimer ruft diese Methode
+ DECL_LINK( DoUpdateAllCharts, Timer * );
+ DECL_LINK( DoUpdateModifiedOLE, Timer * );
+
+ SwFmt *_MakeCharFmt(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL );
+
+ void InitTOXTypes();
+ void Paste( const SwDoc& );
+ bool DeleteAndJoinImpl(SwPaM&, const bool);
+ bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false);
+ bool DeleteRangeImpl(SwPaM&, const bool unused = false);
+ bool ReplaceRangeImpl(SwPaM&, String const&, const bool);
+
+public:
+
+ /** Life cycle
+ */
+ SwDoc();
+ ~SwDoc();
+
+ inline bool IsInDtor() const { return mbDtor; }
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ Implementation details made public.
+ */
+ SwNodes& GetNodes() { return aNodes; }
+ const SwNodes& GetNodes() const { return aNodes; }
+
+ /** IInterface
+ */
+ virtual sal_Int32 acquire();
+ virtual sal_Int32 release();
+ virtual sal_Int32 getReferenceCount() const;
+
+ /** IDocumentSettingAccess
+ */
+ virtual bool get(/*[in]*/ DocumentSettingId id) const;
+ virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
+ virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const;
+ virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
+ virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
+ virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
+ virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
+ virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode );
+ virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const;
+ virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags eMode );
+ virtual SwCharCompressType getCharacterCompressionType() const;
+ virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType );
+
+ /** IDocumentDeviceAccess
+ */
+ virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const;
+ virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged );
+ virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const;
+ virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged );
+ virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const;
+ virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes );
+ virtual const JobSetup* getJobsetup() const;
+ virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup );
+ virtual SwPrintData* getPrintData() const;
+ virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData);
+
+ /** IDocumentMarkAccess
+ */
+ IDocumentMarkAccess* getIDocumentMarkAccess();
+ const IDocumentMarkAccess* getIDocumentMarkAccess() const;
+
+ /** IDocumentRedlineAccess
+ */
+ virtual RedlineMode_t GetRedlineMode() const;
+ virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode);
+ virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode);
+ virtual bool IsRedlineOn() const;
+ virtual bool IsIgnoreRedline() const;
+ virtual bool IsInRedlines(const SwNode& rNode) const;
+ virtual const SwRedlineTbl& GetRedlineTbl() const;
+ virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete);
+ virtual bool SplitRedline(const SwPaM& rPam);
+ virtual bool DeleteRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
+ virtual bool DeleteRedline(/*[in]*/const SwStartNode& rSection, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
+ virtual sal_uInt16 GetRedlinePos(/*[in]*/const SwNode& rNode, /*[in]*/sal_uInt16 nType) const;
+ virtual void CompressRedlines();
+ virtual const SwRedline* GetRedline(/*[in]*/const SwPosition& rPos, /*[in]*/sal_uInt16* pFndPos) const;
+ virtual bool IsRedlineMove() const;
+ virtual void SetRedlineMove(/*[in]*/bool bFlag);
+ virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
+ virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
+ virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
+ virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
+ virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const;
+ virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const;
+ virtual void UpdateRedlineAttr();
+ virtual sal_uInt16 GetRedlineAuthor();
+ virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor);
+ virtual bool SetRedlineComment(/*[in]*/const SwPaM& rPam, /*[in]*/const String& rComment);
+ virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const;
+ virtual void SetRedlinePassword(/*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword);
+
+ /** IDocumentUndoRedo
+ */
+ virtual void SetUndoNoResetModified();
+ virtual bool IsUndoNoResetModified() const;
+ virtual void DoUndo(bool bUn);
+ virtual bool DoesUndo() const;
+ virtual void DoGroupUndo(bool bUn);
+ virtual bool DoesGroupUndo() const;
+ virtual bool Undo(SwUndoIter& );
+ virtual SwUndoId StartUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
+ virtual SwUndoId EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
+ virtual void DelAllUndoObj();
+ virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const;
+ virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const;
+ virtual bool HasUndoId(SwUndoId eId) const;
+ virtual const SwNodes* GetUndoNds() const;
+ virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId);
+ virtual bool HasTooManyUndos() const;
+ virtual bool Redo(SwUndoIter&);
+ virtual SwUndoId GetRedoIds(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual String GetRedoIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual bool Repeat(SwUndoIter&, sal_uInt16 nRepeatCnt);
+ virtual SwUndoId GetRepeatIds(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual String GetRepeatIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual void AppendUndo(SwUndo*);
+ virtual void ClearRedo();
+ virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition );
+ virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const;
+
+
+ /** abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions */
+ static sal_uInt16 GetUndoActionCount();
+ static void SetUndoActionCount(sal_uInt16 nNew);
+
+ /** IDocumentLinksAdministration
+ */
+ virtual bool IsVisibleLinks() const;
+ virtual void SetVisibleLinks(bool bFlag);
+ virtual SvxLinkManager& GetLinkManager();
+ virtual const SvxLinkManager& GetLinkManager() const;
+ virtual void UpdateLinks(BOOL bUI);
+ virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const;
+ virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue);
+ virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem);
+ virtual bool EmbedAllLinks();
+ virtual void SetLinksUpdated(const bool bNewLinksUpdated);
+ virtual bool LinksUpdated() const;
+
+ /** IDocumentFieldsAccess
+ */
+ virtual const SwFldTypes *GetFldTypes() const;
+ virtual SwFieldType *InsertFldType(const SwFieldType &);
+ virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const;
+ virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const;
+ virtual void RemoveFldType(sal_uInt16 nFld);
+ virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB);
+ virtual void InsDeletedFldType(SwFieldType &);
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich);
+ virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds);
+ virtual void UpdateRefFlds(SfxPoolItem* pHt);
+ virtual void UpdateTblFlds(SfxPoolItem* pHt);
+ virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds);
+ virtual void UpdateUsrFlds();
+ virtual void UpdatePageFlds(SfxPoolItem*);
+ virtual void LockExpFlds();
+ virtual void UnlockExpFlds();
+ virtual bool IsExpFldsLocked() const;
+ virtual SwDocUpdtFld& GetUpdtFlds() const;
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen);
+ virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
+ virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt);
+ virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld);
+ virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld);
+ virtual bool IsNewFldLst() const;
+ virtual void SetNewFldLst( bool bFlag);
+ virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld);
+
+ /** Returns the field at a certain position.
+ @param rPos position to search at
+ @return pointer to field at the given position or NULL in case no field is found
+ */
+ static SwField* GetField(const SwPosition& rPos);
+
+ /** Returns the field at a certain position.
+ @param rPos position to search at
+ @return pointer to field at the given position or NULL in case no field is found
+ */
+ static SwTxtFld* GetTxtFld(const SwPosition& rPos);
+
+ /** IDocumentContentOperations
+ */
+ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll) const;
+ virtual void DeleteSection(SwNode* pNode);
+ virtual bool DeleteRange(SwPaM&);
+ virtual bool DelFullPara(SwPaM&);
+ // --> OD 2009-08-20 #i100466#
+ // Add optional parameter <bForceJoinNext>, default value <false>
+ // Needed for hiding of deletion redlines
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false );
+ // <--
+ virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags);
+ virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
+ virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
+ virtual bool Overwrite(const SwPaM &rRg, const String& rStr);
+ virtual bool InsertString(const SwPaM &rRg, const String&,
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND );
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
+ const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
+ const SetAttrMode nFlags);
+ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
+ const SetAttrMode nFlags);
+ virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj);
+ virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&);
+ virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart);
+ virtual bool AppendTxtNode(SwPosition& rPos);
+ virtual void SetModified(SwPaM &rPaM);
+ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
+ const bool bRegExReplace);
+ virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos );
+
+ /** IDocumentStylePoolAccess
+ */
+ virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true );
+ virtual SwFmt* GetFmtFromPool( sal_uInt16 nId );
+ virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId );
+ virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId );
+ virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true );
+ virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId );
+ virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const;
+ virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const;
+ virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const;
+
+ /** IDocumentLineNumberAccess
+ */
+ virtual const SwLineNumberInfo& GetLineNumberInfo() const;
+ virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo);
+
+ /** IDocumentStatistics
+ */
+ virtual void DocInfoChgd();
+ virtual const SwDocStat &GetDocStat() const;
+ virtual void SetDocStat(const SwDocStat& rStat);
+ virtual void UpdateDocStat(SwDocStat& rStat);
+
+ /** IDocumentState
+ */
+ virtual void SetModified();
+ virtual void ResetModified();
+ virtual bool IsModified() const;
+ virtual bool IsLoaded() const;
+ virtual bool IsUpdateExpFld() const;
+ virtual bool IsNewDoc() const;
+ virtual bool IsPageNums() const;
+ virtual void SetPageNums(bool b);
+ virtual void SetNewDoc(bool b);
+ virtual void SetUpdateExpFldStat(bool b);
+ virtual void SetLoaded(bool b);
+
+ /** IDocumentDrawModelAccess
+ */
+ virtual const SdrModel* GetDrawModel() const;
+ virtual SdrModel* GetDrawModel();
+ virtual SdrLayerID GetHeavenId() const;
+ virtual SdrLayerID GetHellId() const;
+ virtual SdrLayerID GetControlsId() const;
+ virtual SdrLayerID GetInvisibleHeavenId() const;
+ virtual SdrLayerID GetInvisibleHellId() const;
+ virtual SdrLayerID GetInvisibleControlsId() const;
+ virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView );
+ virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const;
+ virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId );
+ virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId );
+ virtual SdrModel* _MakeDrawModel();
+ virtual SdrModel* GetOrCreateDrawModel();
+
+ /** IDocumentLayoutAccess
+ */
+ virtual const SwRootFrm* GetRootFrm() const ;
+ virtual SwRootFrm* GetRootFrm();
+ virtual void SetRootFrm( SwRootFrm* pNew );
+ virtual SwLayouter* GetLayouter();
+ virtual const SwLayouter* GetLayouter() const;
+ virtual void SetLayouter( SwLayouter* pNew );
+ virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet );
+ virtual void DelLayoutFmt( SwFrmFmt *pFmt );
+ virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, bool bSetTxtFlyAtt, bool bMakeFrms );
+
+ /** IDocumentTimerAccess
+ */
+ virtual void StartIdling();
+ virtual void StopIdling();
+ virtual void BlockIdling();
+ virtual void UnblockIdling();
+
+ /** IDocumentChartDataProviderAccess
+ */
+ virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const;
+ virtual void CreateChartInternalDataProviders( const SwTable *pTable );
+ virtual SwChartLockController_Helper & GetChartControllerHelper();
+
+ /** IDocumentListItems
+
+ OD 2007-10-26 #i83479#
+ */
+ virtual void addListItem( const SwNodeNum& rNodeNum );
+ virtual void removeListItem( const SwNodeNum& rNodeNum );
+ virtual String getListItemText( const SwNodeNum& rNodeNum,
+ const bool bWithNumber = true,
+ const bool bWithSpacesForLevel = false ) const;
+ virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
+ virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
+
+ /** IDocumentOutlineNodes
+
+ OD 2007-11-15 #i83479#
+ */
+ virtual sal_Int32 getOutlineNodesCount() const;
+ virtual int getOutlineLevel( const sal_Int32 nIdx ) const;
+ virtual String getOutlineText( const sal_Int32 nIdx,
+ const bool bWithNumber,
+ const bool bWithSpacesForLevel ) const;
+ virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const;
+ virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const;
+
+ /** IDocumentListsAccess
+
+ OD 2008-03-26 #refactorlists#
+ */
+ virtual SwList* createList( String sListId,
+ const String sDefaultListStyleName );
+ virtual void deleteList( const String sListId );
+ virtual SwList* getListByName( const String sListId ) const;
+ virtual SwList* createListForListStyle( const String sListStyleName );
+ virtual SwList* getListForListStyle( const String sListStyleName ) const;
+ virtual void deleteListForListStyle( const String sListStyleName );
+ // --> OD 2008-07-08 #i91400#
+ virtual void trackChangeOfListStyleName( const String sListStyleName,
+ const String sNewListStyleName );
+ // <--
+
+ /** IDocumentExternalData */
+ virtual void setExternalData(::sw::tExternalDataType eType,
+ ::sw::tExternalDataPointer pPayload);
+ virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType);
+
+
+ /** INextInterface here
+ */
+
+ DECL_STATIC_LINK( SwDoc, BackgroundDone, SvxBrushItem *);
+ DECL_LINK(CalcFieldValueHdl, EditFieldInfo*);
+
+ /** OLE ???
+ */
+ bool IsOLEPrtNotifyPending() const { return mbOLEPrtNotifyPending; }
+ inline void SetOLEPrtNotifyPending( bool bSet = true );
+ void PrtOLENotify( sal_Bool bAll ); //Alle oder nur Markierte
+
+#ifndef PRODUCT
+ bool InXMLExport() const { return mbXMLExport; }
+ void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; }
+#endif
+
+ // liefert zu allen fliegenden Rahmen die Position im Dokument.
+ // Wird ein Pam-Pointer uebergeben, muessen die absatzgebundenen
+ // FlyFrames von der ::com::sun::star::awt::Selection vollstaendig umschlossen sein
+ // ( Start < Pos < End ) !!!
+ // (wird fuer die Writer benoetigt)
+ void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0,
+ sal_Bool bDrawAlso = sal_False ) const;
+
+ // wegen swrtf.cxx und define private public, jetzt hier
+ SwFlyFrmFmt *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom);
+ SwDrawFrmFmt *MakeDrawFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
+
+ // JP 08.05.98: fuer Flys muss jetzt diese Schnittstelle benutzt
+ // werden. pAnchorPos muss gesetzt sein, wenn keine
+ // Seitenbindung vorliegt UND der ::com::sun::star::chaos::Anchor nicht schon
+ // im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist
+ /* #109161# new parameter bCalledFromShell
+
+ TRUE: An existing adjust item at pAnchorPos is propagated to
+ the content node of the new fly section. That propagation only
+ takes place if there is no adjust item in the paragraph style
+ for the new fly section.
+
+ FALSE: no propagation
+ */
+ SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
+ const SwPosition* pAnchorPos,
+ const SfxItemSet* pSet = 0,
+ SwFrmFmt *pParent = 0,
+ BOOL bCalledFromShell = FALSE );
+ SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
+ const SwSelBoxes* pSelBoxes = 0,
+ SwFrmFmt *pParent = 0 );
+
+ void CopyWithFlyInFly( const SwNodeRange& rRg,
+ const xub_StrLen nEndContentIndex,
+ const SwNodeIndex& rInsPos,
+ sal_Bool bMakeNewFrms = sal_True,
+ sal_Bool bDelRedlines = sal_True,
+ sal_Bool bCopyFlyAtFly = sal_False ) const;
+
+ sal_Bool SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet );
+
+ sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
+ SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False );
+ // --> OD 2009-07-20 #i73249#
+ void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
+ const String& sNewTitle );
+ void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
+ const String& sNewDescription );
+ // <--
+
+ /** Footnotes
+ */
+ // Fussnoten Informationen
+ const SwFtnInfo& GetFtnInfo() const { return *pFtnInfo; }
+ void SetFtnInfo(const SwFtnInfo& rInfo);
+ const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; }
+ void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
+ SwFtnIdxs& GetFtnIdxs() { return *pFtnIdxs; }
+ const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; }
+ // change footnotes in area
+ bool SetCurFtn( const SwPaM& rPam, const String& rNumStr,
+ sal_uInt16 nNumber, bool bIsEndNote );
+
+ /** Operations on the content of the document e.g.
+ spell-checking/hyphenating/word-counting
+ */
+ ::com::sun::star::uno::Any
+ Spell( SwPaM&, ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &,
+ sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck,
+ SwConversionArgs *pConvArgs = 0 ) const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord >
+ Hyphenate( SwPaM *pPam, const Point &rCrsrPos,
+ sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
+
+ // count words in pam
+ void CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const;
+
+
+ /** ???
+ */
+ // Textbaustein Dokument?
+ void SetGlossDoc( bool bGlssDc = true ) { mbGlossDoc = bGlssDc; }
+ bool IsInsOnlyTextGlossary() const { return mbInsOnlyTxtGlssry; }
+
+ // Abstakt fuellen
+ void Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress );
+
+ void ChangeAuthorityData(const SwAuthEntry* pNewData);
+
+ bool IsInCallModified() const { return mbInCallModified; }
+ sal_Bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const;
+ short GetTextDirection( const SwPosition& rPos,
+ const Point* pPt = 0 ) const;
+ sal_Bool IsInVerticalText( const SwPosition& rPos,
+ const Point* pPt = 0 ) const;
+ /** Database ???
+ */
+
+ /* Datenbank && DB-Manager */
+ void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { pNewDBMgr = pNewMgr; }
+ SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; }
+ void ChangeDBFields( const SvStringsDtor& rOldNames,
+ const String& rNewName );
+ void SetInitDBFields(sal_Bool b);
+ // Von Feldern verwendete Datenbanken herausfinden
+ void GetAllUsedDB( SvStringsDtor& rDBNameList,
+ const SvStringsDtor* pAllDBNames = 0 );
+
+ void ChgDBData( const SwDBData& rNewData );
+ SwDBData GetDBData();
+ const SwDBData& GetDBDesc();
+ const SwDBData& _GetDBDesc() const { return aDBData; }
+
+ /** Some helper functions
+ */
+ String GetUniqueGrfName() const;
+ String GetUniqueOLEName() const;
+ String GetUniqueFrameName() const;
+
+ void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName );
+ const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const;
+
+ void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
+ String* pFltName ) const;
+
+ // setze bei allen Flys ohne Namen einen gueltigen (Wird von den Readern
+ // nach dem Einlesen gerufen )
+ void SetAllUniqueFlyNames();
+
+ //Zuruecksetzen der Attribute; es werden alle TxtHints und bei
+ //vollstaendiger Selektion harte Formatierung (AUTO-Formate) entfernt
+ // --> OD 2008-11-28 #i96644#
+ // introduce new optional parameter <bSendDataChangedEvents> in order to
+ // control, if the side effect "send data changed events" is triggered or not.
+ void ResetAttrs( const SwPaM &rRg,
+ sal_Bool bTxtAttr = sal_True,
+ const SvUShortsSort* = 0,
+ const bool bSendDataChangedEvents = true );
+ // <--
+ void RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark = FALSE );
+
+ // Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird
+ // das alte in die Undo-History aufgenommen
+ void SetAttr( const SfxPoolItem&, SwFmt& );
+ void SetAttr( const SfxItemSet&, SwFmt& );
+
+ // --> OD 2008-02-12 #newlistlevelattrs#
+ // method to reset a certain attribute at the given format
+ void ResetAttrAtFormat( const USHORT nWhichId,
+ SwFmt& rChangedFormat );
+ // <--
+
+ // Setze das Attribut als neues default Attribut in diesem Dokument.
+ // Ist Undo aktiv, wird das alte in die Undo-History aufgenommen
+ void SetDefault( const SfxPoolItem& );
+ void SetDefault( const SfxItemSet& );
+
+ // Erfrage das Default Attribut in diesem Dokument.
+ const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
+ // TextAttribute nicht mehr aufspannen lassen
+ sal_Bool DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag = sal_True );
+
+ /* Formate */
+ const SwFrmFmts* GetFrmFmts() const { return pFrmFmtTbl; }
+ SwFrmFmts* GetFrmFmts() { return pFrmFmtTbl; }
+ const SwCharFmts* GetCharFmts() const { return pCharFmtTbl;}
+
+ /* LayoutFormate (Rahmen, DrawObjecte), mal const mal nicht */
+ const SwSpzFrmFmts* GetSpzFrmFmts() const { return pSpzFrmFmtTbl; }
+ SwSpzFrmFmts* GetSpzFrmFmts() { return pSpzFrmFmtTbl; }
+
+ const SwFrmFmt *GetDfltFrmFmt() const { return pDfltFrmFmt; }
+ SwFrmFmt *GetDfltFrmFmt() { return pDfltFrmFmt; }
+ const SwFrmFmt *GetEmptyPageFmt() const { return pEmptyPageFmt; }
+ SwFrmFmt *GetEmptyPageFmt() { return pEmptyPageFmt; }
+ const SwFrmFmt *GetColumnContFmt() const{ return pColumnContFmt; }
+ SwFrmFmt *GetColumnContFmt() { return pColumnContFmt; }
+ const SwCharFmt *GetDfltCharFmt() const { return pDfltCharFmt;}
+ SwCharFmt *GetDfltCharFmt() { return pDfltCharFmt;}
+
+ // Returns the interface of the management of (auto)styles
+ IStyleAccess& GetIStyleAccess() { return *pStyleAccess; }
+
+ // Remove all language dependencies from all existing formats
+ void RemoveAllFmtLanguageDependencies();
+
+ SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom,
+ BOOL bBroadcast = FALSE, BOOL bAuto = TRUE);
+ void DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast = FALSE );
+ SwFrmFmt* FindFrmFmtByName( const String& rName ) const
+ { return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
+
+ // --> OD 2005-01-13 #i40550#
+ SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
+ BOOL bBroadcast = FALSE,
+ BOOL bAuto = TRUE );
+ // <--
+ void DelCharFmt(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
+ void DelCharFmt(SwCharFmt* pFmt, BOOL bBroadcast = FALSE);
+ SwCharFmt* FindCharFmtByName( const String& rName ) const
+ { return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
+
+ /* Formatcollections (Vorlagen) */
+ // TXT
+ const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; }
+ const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; }
+ // --> OD 2005-01-13 #i40550#
+ SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
+ SwTxtFmtColl *pDerivedFrom,
+ BOOL bBroadcast = FALSE,
+ BOOL bAuto = TRUE );
+ // <--
+ SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
+ SwTxtFmtColl *pDerivedFrom,
+ BOOL bBroadcast = FALSE);
+ void DelTxtFmtColl(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
+ void DelTxtFmtColl( SwTxtFmtColl* pColl, BOOL bBroadcast = FALSE );
+ // --> OD 2007-11-06 #i62675#
+ // Add 4th optional parameter <bResetListAttrs>.
+ // 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
+ // attributes of the affected text nodes are cleared, except the break
+ // attribute, the page description attribute and the list style attribute.
+ // The new parameter <bResetListAttrs> indicates, if the list attributes
+ // (list style, restart at and restart with) are cleared as well in case
+ // that <bReset = true> and the paragraph style has a list style attribute set.
+ sal_Bool SetTxtFmtColl( const SwPaM &rRg, SwTxtFmtColl *pFmt,
+ bool bReset = true,
+ bool bResetListAttrs = false );
+ // <--
+ SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const
+ { return (SwTxtFmtColl*)FindFmtByName( (SvPtrarr&)*pTxtFmtCollTbl, rName ); }
+
+ void ChkCondColls();
+
+ // GRF
+ const SwGrfFmtColl* GetDfltGrfFmtColl() const { return pDfltGrfFmtColl; }
+ const SwGrfFmtColls *GetGrfFmtColls() const { return pGrfFmtCollTbl; }
+ SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName,
+ SwGrfFmtColl *pDerivedFrom);
+ SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const
+ { return (SwGrfFmtColl*)FindFmtByName( (SvPtrarr&)*pGrfFmtCollTbl, rName ); }
+
+ // Tabellen-Formate
+ const SwFrmFmts* GetTblFrmFmts() const { return pTblFrmFmtTbl; }
+ SwFrmFmts* GetTblFrmFmts() { return pTblFrmFmtTbl; }
+ sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed ) const;
+ SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const;
+ SwTableFmt* MakeTblFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
+ void DelTblFrmFmt( SwTableFmt* pFmt );
+ SwTableFmt* FindTblFmtByName( const String& rName, sal_Bool bAll = sal_False ) const;
+
+ //Rahmenzugriff
+ //iterieren ueber Flys - fuer Basic-Collections
+ sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL) const;
+ SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL);
+
+
+ // kopiere die Formate in die eigenen Arrays und returne diese
+ SwFrmFmt *CopyFrmFmt ( const SwFrmFmt& );
+ SwCharFmt *CopyCharFmt( const SwCharFmt& );
+ SwTxtFmtColl* CopyTxtColl( const SwTxtFmtColl& rColl );
+ SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl );
+
+ // ersetze alle Formate mit denen aus rSource
+ void ReplaceStyles( SwDoc& rSource );
+
+ // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ sal_Bool IsUsed( const SwModify& ) const;
+ sal_Bool IsUsed( const SwNumRule& ) const;
+
+ // setze den Namen der neu geladenen Dokument-Vorlage
+ sal_uInt16 SetDocPattern( const String& rPatternName );
+ // gebe den Dok-VorlagenNamen zurueck. !!! Kann auch 0 sein !!!
+ String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; }
+
+ // Loesche alle nicht referenzierten FeldTypen
+ void GCFieldTypes(); // impl. in docfld.cxx
+
+ // akt. Dokument mit Textbausteindokument verbinden/erfragen
+ void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; }
+
+ // travel over PaM Ring
+ sal_Bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
+ SwPaM& rPaM, SwCrsrShell* pShell = 0);
+
+ sal_uInt16 GetPageCount() const;
+ const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
+
+ //PageDescriptor-Schnittstelle
+ sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); }
+ const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; }
+ SwPageDesc* FindPageDescByName( const String& rName,
+ sal_uInt16* pPos = 0 ) const;
+
+ // kopiere den gesamten PageDesc - ueber Dokumentgrenzen und "tief"!
+ // optional kann das kopieren der PoolFmtId, -HlpId verhindert werden
+ void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
+ sal_Bool bCopyPoolIds = sal_True );
+
+ // kopiere die Kopzeile (mit dem Inhalt!) aus dem SrcFmt
+ // ins DestFmt ( auch ueber Doc grenzen hinaus!)
+ void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
+ { CopyPageDescHeaderFooterImpl( true, rSrcFmt, rDestFmt ); }
+ // kopiere die Fusszeile (mit dem Inhalt!) aus dem SrcFmt
+ // ins DestFmt ( auch ueber Doc grenzen hinaus!)
+ void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
+ { CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); }
+
+ //fuer Reader
+
+ SwPageDesc * GetPageDesc( const String & rName );
+ SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
+ void ChgPageDesc( const String & rName, const SwPageDesc& );
+ void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
+ BOOL FindPageDesc( const String & rName, sal_uInt16 * pFound );
+ // -> #116530#
+ void DelPageDesc( const String & rName, BOOL bBroadcast = FALSE);
+ void DelPageDesc( sal_uInt16 i, BOOL bBroadcast = FALSE );
+ // <- #116530#
+ void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
+ // -> #116530#
+ sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
+ BOOL bRegardLanguage = TRUE,
+ BOOL bBroadcast = FALSE);
+ void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
+ USHORT nOp);
+ // <- #116530#
+
+
+ // --> FME 2005-03-16 #i44963# The html import sometimes overwrites the
+ // page sizes set in the page descriptions. This function is used to
+ // correct this.
+ void CheckDefaultPageFmt();
+ // <--
+
+ // Methoden fuer die Verzeichnisse:
+ // - Verzeichnismarke einfuegen loeschen travel
+ sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const;
+ void DeleteTOXMark( const SwTOXMark* pTOXMark );
+ const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark,
+ SwTOXSearch eDir, sal_Bool bInReadOnly );
+
+ // - Verzeichnis einfuegen, und bei Bedarf erneuern
+ const SwTOXBaseSection* InsertTableOf( const SwPosition& rPos,
+ const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0,
+ sal_Bool bExpand = sal_False );
+ const SwTOXBaseSection* InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+ const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0 );
+ const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
+ const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const;
+
+ sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
+ String GetUniqueTOXBaseName( const SwTOXType& rType,
+ const String* pChkStr = 0 ) const;
+
+ sal_Bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName);
+ void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect);
+
+ // nach einlesen einer Datei alle Verzeichnisse updaten
+ void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; }
+ bool IsUpdateTOX() const { return mbUpdateTOX; }
+
+ const String& GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;}
+ void SetTOIAutoMarkURL(const String& rSet) {sTOIAutoMarkURL = rSet;}
+ void ApplyAutoMark();
+
+ bool IsInReading() const { return mbInReading; }
+ void SetInReading( bool bNew ) { mbInReading = bNew; }
+
+ bool IsClipBoard() const { return mbClipBoard; }
+ // N.B.: must be called right after constructor! (@see GetXmlIdRegistry)
+ void SetClipBoard( bool bNew ) { mbClipBoard = bNew; }
+
+ bool IsColumnSelection() const { return mbColumnSelection; }
+ void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
+
+ bool IsInXMLImport() const { return mbInXMLImport; }
+ void SetInXMLImport( bool bNew ) { mbInXMLImport = bNew; }
+
+ // - Verzeichnis-Typen verwalten
+ sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const;
+ const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const;
+ sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId );
+ const SwTOXType* InsertTOXType( const SwTOXType& rTyp );
+ const SwTOXTypes& GetTOXTypes() const { return *pTOXTypes; }
+
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
+ void SetDefaultTOXBase(const SwTOXBase& rBase);
+
+ // - Schluessel fuer die Indexverwaltung
+ sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+
+ // Sortieren Tabellen Text
+ sal_Bool SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions&);
+ sal_Bool SortText(const SwPaM&, const SwSortOptions&);
+
+ // korrigiere die im Dokument angemeldeten SwPosition-Objecte,
+ // wie z.B. die ::com::sun::star::text::Bookmarks oder die Verzeichnisse.
+ // JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr
+
+ // Setzt alles in rOldNode auf rNewPos + Offset
+ void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
+ const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
+ // Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
+ void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode,
+ const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False );
+ // Setzt alles im Bereich von rRange nach rNewPos
+ void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos,
+ sal_Bool bMoveCrsr = sal_False );
+ // Setzt alles in rOldNode auf relative Pos
+ void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
+ const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
+
+ // GliederungsRegeln erfragen / setzen
+ // --> OD 2005-11-02 #i51089 - TUNING#
+ inline SwNumRule* GetOutlineNumRule() const
+ {
+ return pOutlineRule;
+ }
+ // <--
+ void SetOutlineNumRule( const SwNumRule& rRule );
+ void PropagateOutlineRule();
+
+ // Gliederung - hoch-/runterstufen
+ sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 );
+ // Gliederung - hoch-/runtermoven
+ sal_Bool MoveOutlinePara( const SwPaM& rPam, short nOffset = 1);
+ // zu diesem Gliederungspunkt
+ sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const;
+ // die Aenderungen an den Gliederungsvorlagen in die OutlineRule uebernehmen
+
+ // setzt, wenn noch keine Numerierung, sonst wird geaendert
+ // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
+ // --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // Add optional parameter <bResetIndentAttrs> - default value FALSE.
+ // If <bResetIndentAttrs> equals true, the indent attributes "before text"
+ // and "first line indent" are additionally reset at the provided PaM, if
+ // the list style makes use of the new list level attributes.
+ // --> OD 2008-03-17 #refactorlists#
+ // introduce parameters <bCreateNewList> and <sContinuedListId>
+ // <bCreateNewList> indicates, if a new list is created by applying the
+ // given list style.
+ void SetNumRule( const SwPaM&,
+ const SwNumRule&,
+ const bool bCreateNewList,
+ const String sContinuedListId = String(),
+ sal_Bool bSetItem = sal_True,
+ const bool bResetIndentAttrs = false );
+ // <--
+ void SetCounted( const SwPaM&, bool bCounted);
+
+ // --> OD 2009-08-25 #i86492#
+ // no longer needed.
+ // SwDoc::SetNumRule( rPaM, rNumRule, false, <ListId>, sal_True, true ) have to be used instead.
+// /**
+// Replace numbering rules in a PaM by another numbering rule.
+
+// \param rPaM PaM to replace the numbering rules in
+// \param rNumRule numbering rule to replace the present numbering rules
+// */
+// void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
+
+ void MakeUniqueNumRules(const SwPaM & rPaM);
+
+ void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True );
+ void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt );
+
+ SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const;
+
+ const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; }
+
+ // #i36749#
+ /**
+ Add numbering rule to document.
+
+ @param pRule rule to add
+ */
+ void AddNumRule(SwNumRule * pRule);
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
+ sal_uInt16 MakeNumRule( const String &rName,
+ const SwNumRule* pCpy = 0,
+ BOOL bBroadcast = FALSE,
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
+ SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
+ // <--
+ sal_uInt16 FindNumRule( const String& rName ) const;
+ SwNumRule* FindNumRulePtr( const String& rName ) const;
+
+ // loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt!
+ // #106897#
+ sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
+ BOOL bBroadcast = FALSE);
+ sal_Bool DelNumRule( const String& rName, BOOL bBroadCast = FALSE );
+ String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
+
+ void UpdateNumRule(); // alle invaliden Updaten
+ // #106897#
+ void ChgNumRuleFmts( const SwNumRule& rRule, const String * pOldName = 0 );
+ sal_Bool ReplaceNumRule( const SwPosition& rPos, const String& rOldRule,
+ const String& rNewRule );
+
+ // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
+ sal_Bool GotoNextNum( SwPosition&, sal_Bool bOverUpper = sal_True,
+ sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
+ sal_Bool GotoPrevNum( SwPosition&, sal_Bool bOverUpper = sal_True,
+ sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
+
+ // #i23731#
+ /** Searches for a text node with a numbering rule.
+
+ OD 2005-10-24 #i55391# - add optional parameter <bInvestigateStartNode>
+ OD 2008-03-18 #refactorlists# - add output parameter <sListId>
+
+ \param rPos position to start search
+ \param bForward - TRUE: search forward
+ - FALSE: search backward
+ \param bNum - TRUE: search for enumeration
+ - FALSE: search for itemize
+ \param bOutline - TRUE: search for outline numbering rule
+ - FALSE: search for non-outline numbering rule
+ \param nNonEmptyAllowed number of non-empty paragraphs allowed between
+ rPos and found paragraph
+
+ @param sListId
+ output parameter - in case a list style is found, <sListId> holds the
+ list id, to which the text node belongs, which applies the found list style.
+
+ @param bInvestigateStartNode
+ input parameter - boolean, indicating, if start node, determined by given
+ start position has to be investigated or not.
+ */
+ const SwNumRule * SearchNumRule(const SwPosition & rPos,
+ const bool bForward,
+ const bool bNum,
+ const bool bOutline,
+ int nNonEmptyAllowed,
+ String& sListId,
+ const bool bInvestigateStartNode = false );
+
+ // Absaetze ohne Numerierung, aber mit Einzuegen
+ sal_Bool NoNum( const SwPaM& );
+ // Loeschen, Splitten der Aufzaehlungsliste
+ void DelNumRules( const SwPaM& );
+
+ // Invalidates all numrules
+ void InvalidateNumRules();
+
+ // Hoch-/Runterstufen
+ sal_Bool NumUpDown( const SwPaM&, sal_Bool bDown = sal_True );
+ // Bewegt selektierte Absaetze (nicht nur Numerierungen)
+ // entsprechend des Offsets. (negativ: zum Doc-Anf.)
+ sal_Bool MoveParagraph( const SwPaM&, long nOffset = 1, sal_Bool bIsOutlMv = sal_False );
+ // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+ sal_Bool NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel = sal_False);
+ // Animation der Grafiken stoppen
+ void StopNumRuleAnimations( OutputDevice* );
+
+ // fuege eine neue Tabelle auf der Position rPos ein. (es
+ // wird vor dem Node eingefuegt !!)
+ //JP 28.10.96:
+ // fuer AutoFormat bei der Eingabe: dann muessen die Spalten
+ // auf die vordefinierten Breite gesetzt werden. Im Array stehen die
+ // Positionen der Spalten!! (nicht deren Breite!)
+ /* #109161# new parameter bCalledFromShell:
+
+ TRUE: called from shell -> propagate existing adjust item at
+ rPos to every new cell. A existing adjust item in the table
+ heading or table contents paragraph style prevent that
+ propagation.
+
+ FALSE: do not propagate
+ */
+ const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
+ const SwPosition& rPos, sal_uInt16 nRows,
+ sal_uInt16 nCols, short eAdjust,
+ const SwTableAutoFmt* pTAFmt = 0,
+ const SvUShorts* pColArr = 0,
+ BOOL bCalledFromShell = FALSE,
+ BOOL bNewModel = TRUE );
+
+ // steht der Index in einer Tabelle, dann returne den TableNode sonst 0
+ SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
+ inline const SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ) const;
+
+ // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
+ const SwTable* TextToTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER,
+ const SwPaM& rRange, sal_Unicode cCh,
+ short eAdjust,
+ const SwTableAutoFmt* = 0 );
+ // text to table conversion - API support
+ const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes );
+ // erzeuge aus der Tabelle wieder normalen Text
+ sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh );
+ // einfuegen von Spalten/Zeilen in der Tabelle
+ sal_Bool InsertCol( const SwCursor& rCursor,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertCol( const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( const SwCursor& rCursor,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ // loeschen von Spalten/Zeilen in der Tabelle
+ sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false );
+ sal_Bool DeleteRow( const SwCursor& rCursor );
+ sal_Bool DeleteCol( const SwCursor& rCursor );
+ // teilen / zusammenfassen von Boxen in der Tabelle
+ sal_Bool SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert = sal_True,
+ sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
+ // returnt den enum TableMergeErr
+ sal_uInt16 MergeTbl( SwPaM& rPam );
+ String GetUniqueTblName() const;
+ sal_Bool IsInsTblFormatNum() const;
+ sal_Bool IsInsTblChangeNumFormat() const;
+ sal_Bool IsInsTblAlignNum() const;
+
+ // aus der FEShell wg.. Undo und bModified
+ void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
+ const SwCellFrm* pBoxFrm = 0 ) const;
+ void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
+ const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
+ void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
+ const SwCellFrm* pBoxFrm = 0 ) const;
+ void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor* pCrsr,
+ const SwCellFrm* pBoxFrm = 0 );
+
+
+ // Direktzugriff fuer Uno
+ void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, sal_Bool bCurRowOnly);
+
+ void SetRowsToRepeat( SwTable &rTable, USHORT nSet );
+
+ // AutoFormat fuer die Tabelle/TabellenSelection
+ sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
+ // Erfrage wie attributiert ist
+ sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
+ // setze das InsertDB als Tabelle Undo auf:
+ void AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable );
+ // setze die Spalten/Zeilen/ZTellen Breite/Hoehe
+ sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff );
+ SwTableBoxFmt* MakeTableBoxFmt();
+ SwTableLineFmt* MakeTableLineFmt();
+ // teste ob die Box ein numerischen Wert darstellt und aender dann ggfs.
+ // das Format der Box
+ void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate );
+ void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
+ void ClearBoxNumAttrs( const SwNodeIndex& rNode );
+
+ sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
+ const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False,
+ sal_Bool bCorrPos = sal_False );
+
+ sal_Bool UnProtectCells( const String& rTblName );
+ sal_Bool UnProtectCells( const SwSelBoxes& rBoxes );
+ sal_Bool UnProtectTbls( const SwPaM& rPam );
+ sal_Bool HasTblAnyProtection( const SwPosition* pPos,
+ const String* pTblName = 0,
+ sal_Bool* pFullTblProtection = 0 );
+
+ // Tabelle an der Position in der GrundLine aufsplitten, sprich eine
+ // neue Tabelle erzeugen.
+ sal_Bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0,
+ sal_Bool bCalcNewSize = sal_False );
+ // und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen
+ // bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter
+ // stehenden vereint wird.
+ sal_Bool MergeTable( const SwPosition& rPos, sal_Bool bWithPrev = sal_True,
+ sal_uInt16 nMode = 0 );
+
+ // Charts der angegebenen Tabelle zum Update bewegen
+ void UpdateCharts( const String &rName ) const;
+ // update all charts, for that exists any table
+ void UpdateAllCharts() { DoUpdateAllCharts( 0 ); }
+ // Tabelle wird umbenannt und aktualisiert die Charts
+ void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
+
+ // returne zum Namen die im Doc gesetzte Referenz
+ const SwFmtRefMark* GetRefMark( const String& rName ) const;
+ // returne die RefMark per Index - fuer Uno
+ const SwFmtRefMark* GetRefMark( sal_uInt16 nIndex ) const;
+ // returne die Namen aller im Doc gesetzten Referenzen.
+ // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
+ // gesetzt ist
+ sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
+
+ //Einfuegen einer Beschriftung - falls ein FlyFormat erzeugt wird, so
+ // returne dieses.
+ SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
+ const String& rNumberingSeparator,
+ const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nIdx,
+ const String& rCharacterStyle,
+ const sal_Bool bCpyBrd = sal_True );
+ SwFlyFrmFmt* InsertDrawLabel(
+ const String &rTxt, const String& rSeparator, const String& rNumberSeparator,
+ const sal_uInt16 nId, const String& rCharacterStyle, SdrObject& rObj );
+
+ // erfrage den Attribut Pool
+ const SwAttrPool& GetAttrPool() const { return *mpAttrPool; }
+ SwAttrPool& GetAttrPool() { return *mpAttrPool; }
+
+ // suche ueber das Layout eine EditShell und ggfs. eine ViewShell
+ SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const;
+
+ // OLE 2.0-Benachrichtung
+ inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
+ inline const Link& GetOle2Link() const {return aOle2Link;}
+
+ // insert section (the ODF kind of section, not the nodesarray kind)
+ SwSection* InsertSwSection( const SwPaM& rRange, const SwSection& rNew,
+ const SfxItemSet* pAttr = 0, bool bUpdate = true);
+ sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange,
+ const SwNode** ppSttNd = 0 ) const;
+ SwSection* GetCurrSection( const SwPosition& rPos ) const;
+ SwSectionFmts& GetSections() { return *pSectionFmtTbl; }
+ const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; }
+ SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom );
+ void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False );
+ void ChgSection( sal_uInt16 nSect, const SwSection&, const SfxItemSet* = 0, sal_Bool bPreventLinkUpdate = FALSE);
+ String GetUniqueSectionName( const String* pChkStr = 0 ) const;
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ The model should not have anything to do with a shell.
+ Unnecessary compile/link time dependency.
+ */
+ // Pointer auf die SfxDocShell vom Doc, kann 0 sein !!!
+ SwDocShell* GetDocShell() { return pDocShell; }
+ const SwDocShell* GetDocShell() const { return pDocShell; }
+ void SetDocShell( SwDocShell* pDSh );
+
+ // falls beim Kopieren von OLE-Nodes eine DocShell angelegt werden muss,
+ // dann MUSS der Ref-Pointer besetzt sein!!!!
+ SfxObjectShellRef* GetRefForDocShell() { return pDocShRef; }
+ void SetRefForDocShell( SfxObjectShellRef* p ) { pDocShRef = p; }
+
+ // fuer die TextBausteine - diese habe nur ein SvPersist zur
+ // Verfuegung
+ SfxObjectShell* GetPersist() const;
+
+ // Pointer auf den Storage des SfxDocShells, kann 0 sein !!!
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetDocStorage();
+
+ // abfrage/setze Flag, ob das Dokument im asynchronen Laden ist
+ bool IsInLoadAsynchron() const { return mbInLoadAsynchron; }
+ void SetInLoadAsynchron( bool bFlag ) { mbInLoadAsynchron = bFlag; }
+
+ // erzeuge um das zu Servende Object eine Selektion
+ sal_Bool SelectServerObj( const String& rStr, SwPaM*& rpPam,
+ SwNodeRange*& rpRange ) const;
+
+ // fuer Drag&Move: ( z.B. RefMarks "verschieben" erlauben )
+ bool IsCopyIsMove() const { return mbCopyIsMove; }
+ void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; }
+
+ // fuers Draw-Undo: Aktionen auf Flys wollen wir selbst behandeln
+ bool IsNoDrawUndoObj() const { return mbNoDrawUndoObj; }
+ void SetNoDrawUndoObj( bool bFlag ) { mbNoDrawUndoObj = bFlag; }
+ SwDrawContact* GroupSelection( SdrView& );
+ void UnGroupSelection( SdrView& );
+ sal_Bool DeleteSelection( SwDrawView& );
+
+ // Invalidiert OnlineSpell-WrongListen
+ void SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags );
+ void InvalidateAutoCompleteFlag();
+
+ // <--
+ void SetCalcFieldValueHdl(Outliner* pOutliner);
+
+ // erfrage ob die ::com::sun::star::util::URL besucht war. Uebers Doc, falls nur ein ::com::sun::star::text::Bookmark
+ // angegeben ist. Dann muss der Doc. Name davor gesetzt werden!
+ sal_Bool IsVisitedURL( const String& rURL ) const;
+
+ // speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen
+ // in die Autokorrektur
+ void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew );
+ SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return pACEWord; }
+
+ const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
+
+ // rufe ins dunkle Basic, mit evt. Return String
+ sal_Bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
+ // rufe ins dunkle Basic/JavaScript
+ sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bChkPtr = sal_False, SbxArray* pArgs = 0,
+ const Link* pCallBack = 0 );
+
+ // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
+ // Numerierungen), optional kann man "um" den Offset stufen oder "auf"
+ // die Position gestuft werden (bModulus = sal_True)
+ void MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight = sal_True,
+ sal_Bool bModulus = sal_True );
+
+ // Numberformatter erfragen
+ inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True );
+ inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const;
+
+ // loesche den nicht sichtbaren ::com::sun::star::ucb::Content aus dem Document, wie z.B.:
+ // versteckte Bereiche, versteckte Absaetze
+ sal_Bool RemoveInvisibleContent();
+ //restore the invisible content if it's available on the undo stack
+ sal_Bool RestoreInvisibleContent();
+ // replace fields by text - mailmerge support
+ BOOL ConvertFieldsToText();
+
+ // erzeuge Anhand der vorgebenen Collection Teildokumente
+ // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
+ sal_Bool GenerateGlobalDoc( const String& rPath,
+ const SwTxtFmtColl* pSplitColl = 0 );
+ sal_Bool GenerateGlobalDoc( const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaojianwei
+ sal_Bool GenerateHTMLDoc( const String& rPath,
+ const SwTxtFmtColl* pSplitColl = 0 );
+ sal_Bool GenerateHTMLDoc( const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaojianwei
+
+ // vergleiche zwei Dokument miteinander
+ long CompareDoc( const SwDoc& rDoc );
+ // merge zweier Dokumente
+ long MergeDoc( const SwDoc& rDoc );
+ // setze Kommentar-Text fuers Redline, das dann per AppendRedline
+ // hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus
+ // wieder zurueck. Die SequenceNummer ist fuers UI-seitige zusammen-
+ // fassen von Redlines.
+ void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 );
+
+ bool IsAutoFmtRedline() const { return mbIsAutoFmtRedline; }
+ void SetAutoFmtRedline( bool bFlag ) { mbIsAutoFmtRedline = bFlag; }
+
+ // fuer AutoFormat: mit Undo/Redlining - Behandlung
+ void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
+ const SfxItemSet* pSet = 0 );
+ void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& );
+
+ // !!!NUR fuer die SW-Textblocks!! beachtet kein LAYOUT!!!
+ void ClearDoc(); // loescht den gesamten Inhalt.
+
+ // erfrage / setze die Daten fuer die PagePreView
+ const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; }
+ // wenn der Pointer == 0 ist, dann wird im Doc der Pointer zerstoert,
+ // ansonsten wird das Object kopiert.
+ // Der Pointer geht NICHT in den Besitz des Doc's!!
+ void SetPreViewPrtData( const SwPagePreViewPrtData* pData );
+
+ // update all modified OLE-Objects. The modification is called over the
+ // StarOne - Interface --> Bug 67026
+ void SetOLEObjModified()
+ { if( GetRootFrm() ) aOLEModifiedTimer.Start(); }
+
+ // -------------------- Uno - Schnittstellen ---------------------------
+ const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; }
+ SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr = sal_False );
+ // -------------------- Uno - Schnittstellen ---------------------------
+
+ // -------------------- FeShell - Schnittstellen -----------------------
+ // !!!!! diese gehen immer davon aus, das ein Layout existiert !!!!
+ sal_Bool ChgAnchor( const SdrMarkList& _rMrkList,
+ RndStdIds _eAnchorType,
+ const sal_Bool _bSameOnly,
+ const sal_Bool _bPosCorr );
+
+ void SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew );
+ void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const;
+ void SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew );
+ void GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const;
+ sal_Bool BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly = sal_True );
+ void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew );
+ sal_Bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const;
+ void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet );
+ void SetTabLineStyle( const SwCursor& rCursor,
+ const Color* pColor, sal_Bool bSetLine,
+ const SvxBorderLine* pBorderLine );
+ void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const;
+ void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew );
+ sal_Bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ) const;
+ void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign );
+ sal_uInt16 GetBoxAlign( const SwCursor& rCursor ) const;
+ void AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance = sal_False );
+
+ int Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest );
+ int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
+ void Unchain( SwFrmFmt &rFmt );
+
+ // fuers Copy/Move aus der FrmShell
+ SdrObject* CloneSdrObj( const SdrObject&, sal_Bool bMoveWithinDoc = sal_False,
+ sal_Bool bInsInPage = sal_True );
+
+ //
+ // -------------------- FeShell - Schnittstellen Ende ------------------
+
+
+ // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
+ // von japanischen/chinesischen Zeichen)
+ SwExtTextInput* CreateExtTextInput( const SwPaM& rPam );
+ void DeleteExtTextInput( SwExtTextInput* pDel );
+ SwExtTextInput* GetExtTextInput( const SwNode& rNd,
+ xub_StrLen nCntntPos = STRING_NOTFOUND) const;
+ SwExtTextInput* GetExtTextInput() const;
+
+ // Schnistelle fuer den Zugriff auf die AutoComplete-Liste
+ static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; }
+
+ bool ContainsMSVBasic() const { return mbContains_MSVBasic; }
+ void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; }
+
+ // Interface for the list of Ruby - texts/attributes
+ USHORT FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ USHORT nMode );
+ USHORT SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ USHORT nMode );
+
+ void ReadLayoutCache( SvStream& rStream );
+ void WriteLayoutCache( SvStream& rStream );
+ SwLayoutCache* GetLayoutCache() const { return pLayoutCache; }
+
+ /** Checks if any of the text node contains hidden characters.
+ Used for optimization. Changing the view option 'view hidden text'
+ has to trigger a reformatting only if some of the text is hidden.
+ */
+ bool ContainsHiddenChars() const;
+
+ // call back for API wrapper
+ SwModify* GetUnoCallBack() const;
+
+ IGrammarContact* getGrammarContact() const { return mpGrammarContact; }
+
+ // -> #i27615#
+ /** Marks/Unmarks a list level of a certain list
+
+ OD 2008-04-02 #refactorlists#
+ levels of a certain lists are marked now
+
+ @param sListId list Id of the list whose level has to be marked/unmarked
+ @param nListLevel level to mark
+ @param bValue - TRUE mark the level
+ - FALSE unmark the level
+ */
+ void MarkListLevel( const String& sListId,
+ const int nListLevel,
+ const BOOL bValue );
+
+ /** Marks/Unmarks a list level of a certain list
+
+ OD 2008-04-02 #refactorlists#
+ levels of a certain lists are marked now
+
+ @param rList list whose level has to be marked/unmarked
+ @param nListLevel level to mark
+ @param bValue - TRUE mark the level
+ - FALSE unmark the level
+ */
+ void MarkListLevel( SwList& rList,
+ const int nListLevel,
+ const BOOL bValue );
+ // <- #i27615#
+
+ // Change a format undoable.
+ void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
+
+ void RenameFmt(SwFmt & rFmt, const String & sNewName,
+ BOOL bBroadcast = FALSE);
+
+ // Change a TOX undoable.
+ void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
+
+ // #111827#
+ /**
+ Returns a textual description of a PaM.
+
+ @param rPaM the PaM to describe
+
+ If rPaM only spans one paragraph the result is:
+
+ '<text in the PaM>'
+
+ <text in the PaM> is shortened to nUndoStringLength characters.
+
+ If rPaM spans more than one paragraph the result is:
+
+ paragraphs (STR_PARAGRAPHS)
+
+ @return the textual description of rPaM
+ */
+ String GetPaMDescr(const SwPaM & rPaM) const;
+
+ // -> #i23726#
+ BOOL IsFirstOfNumRule(SwPosition & rPos);
+ // <- #i23726#
+
+ // --> #i31958# access methods for XForms model(s)
+
+ /// access container for XForms model; will be NULL if !isXForms()
+ com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
+ getXForms() const;
+
+ com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > GetGCIterator() const;
+
+ /// is this an XForms document?
+ bool isXForms() const;
+
+ /// initialize XForms models; turn this into an XForms document
+ void initXForms( bool bCreateDefaultModel );
+ // <-- #i31958# access methods for XForms model(s)
+
+ // --> OD 2006-03-21 #b6375613#
+ inline bool ApplyWorkaroundForB6375613() const
+ {
+ return mbApplyWorkaroundForB6375613;
+ }
+ void SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 );
+ // <--
+
+ //Update all the page masters
+ void SetDefaultPageMode(bool bSquaredPageMode);
+ sal_Bool IsSquaredPageMode() const;
+
+ // i#78591#
+ void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 )
+ {
+ n32DummyCompatabilityOptions1 = CompatabilityOptions1;
+ }
+ sal_uInt32 Getn32DummyCompatabilityOptions1( )
+ {
+ return n32DummyCompatabilityOptions1;
+ }
+ void Setn32DummyCompatabilityOptions2( sal_uInt32 CompatabilityOptions2 )
+ {
+ n32DummyCompatabilityOptions2 = CompatabilityOptions2;
+ }
+ sal_uInt32 Getn32DummyCompatabilityOptions2( )
+ {
+ return n32DummyCompatabilityOptions2;
+ }
+
+ ::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
+ ::sw::MetaFieldManager & GetMetaFieldManager();
+ SwDoc* CreateCopy() const;
+};
+
+
+// Diese Methode wird im Dtor vom SwDoc gerufen und loescht den Cache
+// der Konturobjekte
+void ClrContourCache();
+
+
+//------------------ inline impl. ---------------------------------
+
+inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const
+{
+ return ((SwDoc*)this)->IsIdxInTbl( rIdx );
+}
+
+inline SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate )
+{
+ if( bCreate && !pNumberFormatter )
+ _CreateNumberFormatter();
+ return pNumberFormatter;
+}
+
+inline const SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) const
+{
+ return ((SwDoc*)this)->GetNumberFormatter( bCreate );
+}
+
+inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
+{
+ mbOLEPrtNotifyPending = bSet;
+ if( !bSet )
+ mbAllOLENotify = sal_False;
+}
+
+// --> OD 2006-03-14 #i62875#
+// namespace <docfunc> for functions and procedures working on a Writer document.
+namespace docfunc
+{
+ /** method to check, if given Writer document contains at least one drawing object
+
+ OD 2006-03-17 #i62875#
+
+ @author OD
+
+ @param p_rDoc
+ input parameter - reference to the Writer document, which is investigated.
+ */
+ bool ExistsDrawObjs( SwDoc& p_rDoc );
+
+ /** method to check, if given Writer document contains only drawing objects,
+ which are completely on its page.
+
+ OD 2006-03-17 #i62875#
+
+ @author OD
+
+ @param p_rDoc
+ input parameter - reference to the Writer document, which is investigated.
+ */
+ bool AllDrawObjsOnPage( SwDoc& p_rDoc );
+
+ /** method to check, if the outline style has to written as a normal list style
+
+ OD 2006-09-27 #i69627#
+ The outline style has to written as a normal list style, if a parent
+ paragraph style of one of the paragraph styles, which are assigned to
+ the list levels of the outline style, has a list style set or inherits
+ a list style from its parent paragraphs style.
+ This information is needed for the OpenDocument file format export.
+
+ @author OD
+
+ @param rDoc
+ input parameter - reference to the text document, which is investigated.
+
+ @return boolean
+ indicating, if the outline style has to written as a normal list style
+ */
+ bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc );
+}
+// <--
+#endif //_DOC_HXX
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
new file mode 100644
index 000000000000..c8ffcba549ab
--- /dev/null
+++ b/sw/inc/docary.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docary.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOCARY_HXX
+#define _DOCARY_HXX
+
+#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
+
+class SwFieldType;
+class SwFrmFmt;
+class SwCharFmt;
+class SwTOXType;
+class SwUndo;
+class SwSectionFmt;
+class SwNumRule;
+class SwRedline;
+class SwUnoCrsr;
+class SwOLENode;
+
+namespace com { namespace sun { namespace star { namespace i18n {
+ struct ForbiddenCharacters; // comes from the I18N UNO interface
+}}}}
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+#include <swtypes.hxx>
+#include <svtools/svarray.hxx>
+
+typedef SwFieldType* SwFldTypePtr;
+#define GROW_FLDTYPES 16
+
+//PageDescriptor-Schnittstelle
+//typedef SwPageDesc * SwPageDescPtr;
+//SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1);
+
+typedef SwFrmFmt* SwFrmFmtPtr;
+SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4)
+
+//Spezifische Frameformate (Rahmen, DrawObjecte)
+SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4)
+
+typedef SwCharFmt* SwCharFmtPtr;
+SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4)
+
+SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES )
+
+typedef SwTOXType* SwTOXTypePtr;
+SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 )
+
+// Undo
+#define INIT_UNDOS 5
+#define GROW_UNDOS 5
+// Das Array der Undo-History
+typedef SwUndo* SwUndoPtr;
+SV_DECL_PTRARR_DEL( SwUndos, SwUndoPtr, INIT_UNDOS, GROW_UNDOS )
+
+typedef SwSectionFmt* SwSectionFmtPtr;
+SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4)
+
+
+typedef SwNumRule* SwNumRulePtr;
+SV_DECL_PTRARR_DEL_VISIBILITY( SwNumRuleTbl, SwNumRulePtr, 0, 5, SW_DLLPUBLIC )
+
+typedef SwRedline* SwRedlinePtr;
+SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 )
+
+class SwRedlineTbl : private _SwRedlineTbl
+{
+public:
+ SwRedlineTbl( BYTE nSize = 0, BYTE nG = 16 )
+ : _SwRedlineTbl( nSize, nG ) {}
+ ~SwRedlineTbl() {}
+
+ BOOL SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
+
+ BOOL Insert( SwRedlinePtr& p, BOOL bIns = TRUE );
+ BOOL Insert( SwRedlinePtr& p, USHORT& rInsPos, BOOL bIns = TRUE );
+ BOOL InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos = 0 );
+
+ void Remove( USHORT nP, USHORT nL = 1 );
+ void DeleteAndDestroy( USHORT nP, USHORT nL=1 );
+
+ // suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
+ // Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
+ // USHRT_MAX suchen im gesamten Array.
+ USHORT FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
+ USHORT FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
+ USHORT FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
+ USHORT nLookahead = 20 ) const;
+ USHORT FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
+ USHORT nLookahead = 20 ) const;
+
+ using _SwRedlineTbl::Count;
+ using _SwRedlineTbl::operator[];
+ using _SwRedlineTbl::GetObject;
+ using _SwRedlineTbl::Seek_Entry;
+ using _SwRedlineTbl::GetPos;
+};
+
+typedef SwUnoCrsr* SwUnoCrsrPtr;
+SV_DECL_PTRARR_DEL( SwUnoCrsrTbl, SwUnoCrsrPtr, 0, 4 )
+
+typedef SwOLENode* SwOLENodePtr;
+SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16)
+
+
+#endif //_DOCARY_HXX
+
diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx
new file mode 100644
index 000000000000..e0b5d8195264
--- /dev/null
+++ b/sw/inc/docfac.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docfac.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOCFAC_HXX
+#define _DOCFAC_HXX
+
+#include <tools/solar.h>
+
+class SwDoc;
+
+class SwDocFac
+{
+protected:
+ SwDoc* pDoc;
+
+public:
+ SwDocFac( SwDoc *pDoc = 0 );
+ ~SwDocFac();
+
+ // Das Dokument ist nach dem Aufruf von Read(..) angelegt
+ SwDoc* GetDoc();
+};
+
+#endif
+
diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc
new file mode 100644
index 000000000000..1ee4b68efe10
--- /dev/null
+++ b/sw/inc/dochdl.hrc
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dochdl.hrc,v $
+ * $Revision: 1.5.240.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOCHDL_HRC
+#define _DOCHDL_HRC
+
+#include "rcid.hrc"
+
+#define STR_NOGLOS (RC_DOCHDL_BEGIN + 1)
+#define MSG_ERR_INSERT_GLOS (RC_DOCHDL_BEGIN + 3)
+#define MSG_CLPBRD_FORMAT_ERROR (RC_DOCHDL_BEGIN + 4)
+#define MSG_UPDATE_NEW_GLOS_FMT (RC_DOCHDL_BEGIN + 5)
+
+#define DLG_SEL_GLOS (RC_DOCHDL_BEGIN + 6)
+#define STR_NO_TABLE (RC_DOCHDL_BEGIN + 7)
+
+#define STR_PRIVATETEXT (RC_DOCHDL_BEGIN + 8)
+#define STR_PRIVATEGRAPHIC (RC_DOCHDL_BEGIN + 9)
+#define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10)
+#define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11)
+
+#define BMP_SW_TEAM_MUGSHOT (RC_DOCHDL_BEGIN + 12)
+#define STR_SW_TEAM_NAMES (RC_DOCHDL_BEGIN + 13)
+
+#define DOCHDL_ACT_END STR_SW_TEAM_NAMES
+
+#if DOCHDL_ACT_END > RC_DOCHDL_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
new file mode 100644
index 000000000000..6ed3f6d652bd
--- /dev/null
+++ b/sw/inc/docsh.hxx
@@ -0,0 +1,312 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docsh.hxx,v $
+ * $Revision: 1.48.72.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWDOCSH_HXX
+#define _SWDOCSH_HXX
+
+#include <rtl/ref.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <vcl/timer.hxx>
+#include <sfx2/docfac.hxx>
+#include <sfx2/objsh.hxx>
+#include "swdllapi.h"
+#include <swdll.hxx>
+#include <shellid.hxx>
+
+#include <svtools/lstner.hxx>
+#include <svtools/embedhlp.hxx>
+
+class SwDoc;
+class SfxDocumentInfoDialog;
+class SfxStyleSheetBasePool;
+class SfxInPlaceClient;
+class FontList;
+class SwView;
+class SwWrtShell;
+class SwFEShell;
+class Reader;
+class SwReader;
+class SwCrsrShell;
+class SwSrcView;
+class SwPaM;
+class SwgReaderOption;
+class SwOLEObj;
+class IDocumentDeviceAccess;
+class IDocumentSettingAccess;
+class IDocumentTimerAccess;
+class IDocumentChartDataProviderAccess;
+
+
+class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
+{
+ SwDoc* pDoc; // Document
+ rtl::Reference< SfxStyleSheetBasePool > mxBasePool; // Durchreiche fuer Formate
+ FontList* pFontList; // aktuelle FontListe
+
+ // Nix geht ohne die WrtShell (historische Gruende)
+ // RuekwaertsPointer auf die View (historische Gruende)
+ // Dieser gilt solange bis im Activate ein neuer gesetzt wird
+ // oder dieser im Dtor der View geloescht wird
+ //
+ SwView* pView;
+ SwWrtShell* pWrtShell;
+
+ Timer aFinishedTimer; // Timer fuers ueberpriefen der
+ // Grafik-Links. Sind alle da,
+ // dann ist Doc voll. geladen
+
+ //SvPersistRef xOLEChildList; // fuers RemoveOLEObjects
+ comphelper::EmbeddedObjectContainer* pOLEChildList;
+ sal_Int16 nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
+ bool bInUpdateFontList; //prevent nested calls of UpdateFontList
+ // Methoden fuer den Zugriff aufs Doc
+ SW_DLLPRIVATE void AddLink();
+ SW_DLLPRIVATE void RemoveLink();
+
+ // Hint abfangen fuer DocInfo
+ SW_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ // FileIO
+ SW_DLLPRIVATE virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ SW_DLLPRIVATE virtual sal_Bool Load( SfxMedium& rMedium );
+ SW_DLLPRIVATE virtual sal_Bool LoadFrom( SfxMedium& rMedium );
+ SW_DLLPRIVATE virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+ SW_DLLPRIVATE virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ SW_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium );
+ SW_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+
+ SW_DLLPRIVATE virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+
+ // DocInfo dem Doc melden
+ //
+ SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
+ Window *pParent, const SfxItemSet &);
+ // OLE-Geraffel
+ SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, USHORT);
+
+ // Methoden fuer StyleSheets
+ SW_DLLPRIVATE USHORT Edit( const String &rName, const String& rParent, USHORT nFamily,
+ USHORT nMask, BOOL bNew,
+ BOOL bColumn = FALSE,
+ SwWrtShell* pActShell = 0,
+ BOOL bBasic = FALSE );
+ SW_DLLPRIVATE USHORT Delete(const String &rName, USHORT nFamily);
+ SW_DLLPRIVATE USHORT ApplyStyles(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0,
+ USHORT nMode = 0 );
+ SW_DLLPRIVATE USHORT DoWaterCan( const String &rName, USHORT nFamily);
+ SW_DLLPRIVATE USHORT UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0);
+ SW_DLLPRIVATE USHORT MakeByExample(const String &rName,
+ USHORT nFamily, USHORT nMask, SwWrtShell* pShell = 0);
+
+ SW_DLLPRIVATE void InitDraw();
+ SW_DLLPRIVATE void SubInitNew(); // fuer InitNew und HtmlSourceModus
+
+ SW_DLLPRIVATE void RemoveOLEObjects();
+ SW_DLLPRIVATE void CalcLayoutForOLEObjects();
+
+ SW_DLLPRIVATE void Init_Impl();
+ SW_DLLPRIVATE DECL_STATIC_LINK( SwDocShell, IsLoadFinished, void* );
+
+
+ using SfxObjectShell::GetVisArea;
+ using SfxObjectShell::GetStyleFamilyBitmap;
+
+protected:
+ /// override to update text fields
+ virtual void DoFlushDocInfo();
+
+public:
+ using SotObject::GetInterface;
+
+ // aber selbst implementieren
+ SFX_DECL_INTERFACE(SW_DOCSHELL)
+ SFX_DECL_OBJECTFACTORY()
+ TYPEINFO();
+
+ static SfxInterface *_GetInterface() { return GetStaticInterface(); }
+
+ static rtl::OUString GetEventName( sal_Int32 nId );
+
+ //Das Doc wird fuer SO-Datenaustausch benoetigt!
+ SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, sal_Bool _bScriptingSupport = sal_True );
+ SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD );
+ ~SwDocShell();
+
+ // OLE 2.0-Benachrichtigung
+ DECL_LINK( Ole2ModifiedHdl, void * );
+
+ // OLE-Geraffel
+ virtual void SetVisArea( const Rectangle &rRect );
+ virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Printer *GetDocumentPrinter();
+ virtual OutputDevice* GetDocumentRefDev();
+ virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
+ virtual ULONG GetMiscStatus() const;
+
+ virtual void PrepareReload();
+ virtual void SetModified( BOOL = TRUE );
+
+ // Dispatcher
+ void Execute(SfxRequest &);
+ void ExecStyleSheet(SfxRequest&);
+ void ExecDB(SfxRequest&);
+
+ void GetState(SfxItemSet &);
+ void StateAlways(SfxItemSet &);
+ void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
+
+ // Doc rausreichen aber VORSICHT
+ inline SwDoc* GetDoc() { return pDoc; }
+ IDocumentDeviceAccess* getIDocumentDeviceAccess();
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+ IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
+
+
+ void UpdateFontList();
+ void UpdateChildWindows();
+
+ // globaler IO
+ virtual BOOL Save();
+
+ // fuer VorlagenPI
+ virtual SfxStyleSheetBasePool* GetStyleSheetPool();
+
+ // Fuer Organizer
+ virtual BOOL Insert(SfxObjectShell &rSource,
+ USHORT nSourceIdx1,
+ USHORT nSourceIdx2,
+ USHORT nSourceIdx3,
+ USHORT& nIdx1,
+ USHORT& nIdx2,
+ USHORT& nIdx3,
+ USHORT& nRemovedIdx);
+
+ virtual BOOL Remove(USHORT nIdx1,
+ USHORT nIdx2 = INDEX_IGNORE,
+ USHORT nIdx3 = INDEX_IGNORE);
+
+ virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode );
+
+ // View setzen fuer Aktionen ueber Shell
+ void SetView(SwView* pVw);
+ const SwView *GetView() const { return pView; }
+ SwView *GetView() { return pView; }
+
+ // Zugriff auf die zur SwView gehoerige SwWrtShell
+ SwWrtShell *GetWrtShell() { return pWrtShell; }
+ const SwWrtShell *GetWrtShell() const { return pWrtShell; }
+
+ // fuer die Core - die kennt die DocShell aber keine WrtShell!
+ SwFEShell *GetFEShell();
+ const SwFEShell *GetFEShell() const
+ { return ((SwDocShell*)this)->GetFEShell(); }
+
+
+ // Fuer Einfuegen Dokument
+ Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
+ SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0);
+
+ virtual long DdeGetData( const String& rItem, const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+ virtual long DdeSetData( const String& rItem, const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pClipFormat,
+ String * pAppName,
+ String * pLongUserName,
+ String * pUserName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+
+ virtual void LoadStyles( SfxObjectShell& rSource );
+
+ void _LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument );
+
+ // Seitenvorlagedialog anzeigen, ggf. auf Spaltenpage
+ void FormatPage( const String& rPage,
+ BOOL bColumn = FALSE,
+ SwWrtShell* pActShell = 0 );
+
+ // --> OD 2006-11-07 #i59688#
+ // linked graphics are now loaded on demand.
+ // Thus, loading of linked graphics no longer needed and necessary for
+ // the load of document being finished.
+// // Timer starten fuers ueberpruefen der Grafik-Links. Sind alle
+// // vollstaendig geladen, dann ist das Doc fertig
+// void StartLoadFinishedTimer();
+ void LoadingFinished();
+ // <--
+
+ // eine Uebertragung wird abgebrochen (wird aus dem SFX gerufen)
+ virtual void CancelTransfers();
+
+ // Doc aus Html-Source neu laden
+ void ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView );
+
+ sal_Int16 GetUpdateDocMode() const {return nUpdateDocMode;}
+
+ //Activate wait cursor for all windows of this document
+ //Optionally all dispatcher could be Locked
+ //Usually locking should be done using the class: SwWaitObject!
+ void EnterWait( BOOL bLockDispatcher );
+ void LeaveWait( BOOL bLockDispatcher );
+
+ void ToggleBrowserMode(BOOL bOn, SwView* pView = 0);
+
+ ULONG LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
+ BOOL bUnoCall );
+ void InvalidateModel();
+ void ReactivateModel();
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames();
+
+ // --> FME 2004-08-05 #i20883# Digital Signatures and Encryption
+ virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates );
+ // <--
+
+ // --> FME 2005-02-25 #i42634# Overwrites SfxObjectShell::UpdateLinks
+ // This new function is necessary to trigger update of links in docs
+ // read by the binary filter:
+ virtual void UpdateLinks();
+ // <--
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
+ GetController();
+
+ SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef );
+
+ virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const;
+};
+
+class Graphic;
+//implemented in source/ui/docvw/romenu.cxx
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName );
+
+#endif
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
new file mode 100644
index 000000000000..9e03f57d5a97
--- /dev/null
+++ b/sw/inc/docstat.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docstat.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOCSTAT_HXX
+#define _DOCSTAT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+///////////////////////////////////////////////////////////////////////////
+// PRODUCT: struct SwInternStat ist nur fuer CORE Interne Statistics und
+// hat nichts in einer ProductVersion zu suchen.
+///////////////////////////////////////////////////////////////////////////
+
+struct SwInternStat;
+
+struct SW_DLLPUBLIC SwDocStat
+{
+ USHORT nTbl;
+ USHORT nGrf;
+ USHORT nOLE;
+ ULONG nPage;
+ ULONG nPara;
+ ULONG nWord;
+ ULONG nChar;
+ BOOL bModified;
+ SwInternStat* pInternStat;
+ SwDocStat();
+ void Reset();
+};
+
+#endif
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
new file mode 100644
index 000000000000..e93972690e66
--- /dev/null
+++ b/sw/inc/docstyle.hxx
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docstyle.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOCSTYLE_HXX
+#define _DOCSTYLE_HXX
+
+#include <rtl/ref.hxx>
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+#endif
+#include <svtools/style.hxx>
+#include <svtools/itemset.hxx>
+#include "swdllapi.h"
+
+class SwDoc;
+class SwDocStyleSheetPool;
+class SwPageDesc;
+class SwCharFmt;
+class SwTxtFmtColl;
+class SwFrmFmt;
+class SwNumRule;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Lokale Hilfsklasse
+ --------------------------------------------------------------------*/
+class SwPoolFmtList : public SvStringsDtor
+{
+public:
+ SwPoolFmtList() {}
+ void Append( char cChar, const String& rStr );
+ void Erase();
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: temp. StyleSheet
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
+{
+ friend class SwDocStyleSheetPool;
+ friend class SwStyleSheetIterator;
+
+ SwCharFmt* pCharFmt;
+ SwTxtFmtColl* pColl;
+ SwFrmFmt* pFrmFmt;
+ const SwPageDesc* pDesc;
+ const SwNumRule* pNumRule;
+
+ SwDoc& rDoc;
+ SfxItemSet aCoreSet;
+
+ BOOL bPhysical;
+
+
+ // leere Huelse zum richtigen StyleSheet (Core) machen
+ SW_DLLPRIVATE void Create();
+
+ // den StyleSheet mit Daten fuellen
+ enum FillStyleType {
+ FillOnlyName,
+ FillAllInfo,
+ FillPhysical
+ };
+
+ SW_DLLPRIVATE BOOL FillStyleSheet( FillStyleType eFType );
+
+protected:
+ virtual ~SwDocStyleSheet();
+
+public:
+ SwDocStyleSheet( SwDoc& rDoc,
+ const String& rName,
+ SwDocStyleSheetPool& rPool,
+ SfxStyleFamily eFam,
+ USHORT nMask);
+
+ SwDocStyleSheet( const SwDocStyleSheet& );
+
+ void Reset();
+
+ void SetMask(USHORT nMsk) { nMask = nMsk; }
+ void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; }
+
+ BOOL IsPhysical() const { return bPhysical; }
+ void SetPhysical(BOOL bPhys);
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value FALSE,
+ // which indicates that the indent attributes at a paragraph style should
+ // be reset in case that a list style is applied to the paragraph style and
+ // no indent attributes are applied.
+ void SetItemSet( const SfxItemSet& rSet,
+ const bool bResetIndentAttrsAtParagraphStyle = false );
+ // <--
+
+ virtual SfxItemSet& GetItemSet();
+ // --> OD 2008-02-12 #newlistlevelattrs#
+ // new method for paragraph styles to merge indent attributes of applied list
+ // style into the given item set, if the list style indent attributes are applicable.
+ void MergeIndentAttrsOfListStyle( SfxItemSet& rSet );
+ // <--
+ virtual const String& GetParent() const;
+ virtual const String& GetFollow() const;
+
+ virtual ULONG GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, ULONG nId );
+
+ // Vorbelegen der member ohne physikalischen Zugriff
+ // wird vom StyleSheetPool benutzt
+ //
+ void PresetName(const String& rName) { aName = rName; }
+ void PresetNameAndFamily(const String& rName);
+ void PresetParent(const String& rName){ aParent = rName; }
+ void PresetFollow(const String& rName){ aFollow = rName; }
+
+ virtual BOOL SetName( const String& rStr);
+ virtual BOOL SetParent( const String& rStr);
+ virtual BOOL SetFollow( const String& rStr);
+
+ virtual BOOL HasFollowSupport() const;
+ virtual BOOL HasParentSupport() const;
+ virtual BOOL HasClearParentSupport() const;
+ virtual String GetDescription();
+ virtual String GetDescription(SfxMapUnit eUnit);
+
+ SwCharFmt* GetCharFmt();
+ SwTxtFmtColl* GetCollection();
+ SwFrmFmt* GetFrmFmt();
+ const SwPageDesc* GetPageDesc();
+ const SwNumRule* GetNumRule();
+ void SetNumRule(const SwNumRule& rRule);
+
+ virtual BOOL IsUsed() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Iterator fuer den Pool
+ --------------------------------------------------------------------*/
+
+class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
+{
+ rtl::Reference< SwDocStyleSheet > mxIterSheet;
+ rtl::Reference< SwDocStyleSheet > mxStyleSheet;
+ SwPoolFmtList aLst;
+ USHORT nLastPos;
+ BOOL bFirstCalled;
+
+ void AppendStyleList(const SvStringsDtor& rLst,
+ BOOL bUsed,
+ USHORT nSection,
+ char cType);
+
+public:
+ SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
+ SfxStyleFamily eFam, USHORT n=0xFFFF );
+ virtual ~SwStyleSheetIterator();
+
+ virtual USHORT Count();
+ virtual SfxStyleSheetBase *operator[](USHORT nIdx);
+ virtual SfxStyleSheetBase* First();
+ virtual SfxStyleSheetBase* Next();
+ virtual SfxStyleSheetBase* Find(const UniString& rStr);
+
+ virtual void Notify( SfxBroadcaster&, const SfxHint& );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Pool fuer
+ --------------------------------------------------------------------*/
+
+class SwDocStyleSheetPool : public SfxStyleSheetBasePool
+{
+ rtl::Reference< SwDocStyleSheet > mxStyleSheet;
+ SwDoc& rDoc;
+ BOOL bOrganizer : 1; // TRUE: fuer den Organizer
+
+
+ virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, USHORT nMask);
+ virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
+
+ using SfxStyleSheetBasePool::Find;
+
+public:
+ SwDocStyleSheetPool( SwDoc&, BOOL bOrganizer = FALSE );
+
+ virtual void Replace( SfxStyleSheetBase& rSource,
+ SfxStyleSheetBase& rTarget );
+ virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, USHORT nMask, USHORT nPos = 0xffff);
+
+ virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
+ USHORT n=0xFFFF );
+
+ virtual BOOL SetParent( SfxStyleFamily eFam, const String &rStyle,
+ const String &rParent );
+
+ virtual void Remove( SfxStyleSheetBase* pStyle);
+
+ void SetOrganizerMode( BOOL bMode ) { bOrganizer = bMode; }
+ BOOL IsOrganizerMode() const { return bOrganizer; }
+
+ virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily,
+ USHORT nMask );
+
+ SwDoc& GetDoc() const { return rDoc; }
+
+ void dispose();
+
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
+protected:
+ virtual ~SwDocStyleSheetPool();
+
+ //Fuer die daemlicheren Compiler
+private:
+ SwDocStyleSheetPool( const SwDocStyleSheetPool& );
+};
+
+
+#endif
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
new file mode 100644
index 000000000000..88c4e650cfd0
--- /dev/null
+++ b/sw/inc/docufld.hxx
@@ -0,0 +1,837 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docufld.hxx,v $
+ * $Revision: 1.17.82.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DOCUFLD_HXX
+#define _DOCUFLD_HXX
+
+
+#include <tools/date.hxx>
+#include <tools/datetime.hxx>
+
+
+#include <svtools/macitem.hxx>
+
+#include "fldbas.hxx"
+#include "numrule.hxx"
+
+class _SetGetExpFlds;
+class SwTxtFld;
+class SwFrm;
+class OutlinerParaObject;
+class SwTextAPIObject;
+
+enum SwAuthorFormat
+{
+ AF_BEGIN,
+ AF_NAME = AF_BEGIN,
+ AF_SHORTCUT,
+ AF_END,
+ AF_FIXED = 0x8000
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Untertyp der Dokumentstatistik
+ --------------------------------------------------------------------*/
+
+enum SwDocStatSubType
+{
+ DS_BEGIN,
+ DS_PAGE = DS_BEGIN,
+ DS_PARA,
+ DS_WORD,
+ DS_CHAR,
+ DS_TBL,
+ DS_GRF,
+ DS_OLE,
+ DS_END
+};
+
+typedef sal_uInt16 SwDocInfoSubType;
+namespace nsSwDocInfoSubType
+{
+ // NB: these must denote consecutive integers!
+ // NB2: these are extended by 4 DI_INFO values for backward compatibility
+ // in filter/html/htmlfld.cxx, so make sure that DI_SUBTYPE_END
+ // really is the end, and is at least 4 less than DI_SUB_*!
+ const SwDocInfoSubType DI_SUBTYPE_BEGIN = 0;
+ const SwDocInfoSubType DI_TITEL = DI_SUBTYPE_BEGIN;
+ const SwDocInfoSubType DI_THEMA = 1;
+ const SwDocInfoSubType DI_KEYS = 2;
+ const SwDocInfoSubType DI_COMMENT = 3;
+ const SwDocInfoSubType DI_CREATE = 4;
+ const SwDocInfoSubType DI_CHANGE = 5;
+ const SwDocInfoSubType DI_PRINT = 6;
+ const SwDocInfoSubType DI_DOCNO = 7;
+ const SwDocInfoSubType DI_EDIT = 8;
+ const SwDocInfoSubType DI_CUSTOM = 9;
+ const SwDocInfoSubType DI_SUBTYPE_END = 10;
+
+
+ const SwDocInfoSubType DI_SUB_AUTHOR = 0x0100;
+ const SwDocInfoSubType DI_SUB_TIME = 0x0200;
+ const SwDocInfoSubType DI_SUB_DATE = 0x0300;
+ const SwDocInfoSubType DI_SUB_FIXED = 0x1000;
+ const SwDocInfoSubType DI_SUB_MASK = 0xff00;
+}
+
+
+enum RegInfoFormat // Nur noch zum laden alter Dokumente!!!
+{
+ RF_AUTHOR,
+ RF_TIME,
+ RF_DATE,
+ RF_ALL
+};
+
+enum SwPageNumSubType
+{
+ PG_RANDOM,
+ PG_NEXT,
+ PG_PREV
+};
+
+enum SwExtUserSubType
+{
+ EU_COMPANY /*EU_FIRMA*/,
+ EU_FIRSTNAME /*EU_VORNAME*/,
+ EU_NAME /*EU_NAME*/,
+ EU_SHORTCUT /*EU_ABK*/,
+ EU_STREET /*EU_STRASSE*/,
+ EU_COUNTRY /*EU_LAND*/,
+ EU_ZIP /*EU_PLZ*/,
+ EU_CITY /*EU_ORT*/,
+ EU_TITLE /*EU_TITEL*/,
+ EU_POSITION /*EU_POS*/,
+ EU_PHONE_PRIVATE /*EU_TELPRIV*/,
+ EU_PHONE_COMPANY /*EU_TELFIRMA*/,
+ EU_FAX,
+ EU_EMAIL,
+ EU_STATE,
+ EU_FATHERSNAME,
+ EU_APARTMENT
+};
+
+enum SwJumpEditFormat
+{
+ JE_FMT_TEXT,
+ JE_FMT_TABLE,
+ JE_FMT_FRAME,
+ JE_FMT_GRAPHIC,
+ JE_FMT_OLE
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Seitennummer
+ --------------------------------------------------------------------*/
+
+class SwPageNumberFieldType : public SwFieldType
+{
+ sal_Int16 nNumberingType;
+ USHORT nNum, nMax;
+ BOOL bVirtuell;
+
+public:
+ SwPageNumberFieldType();
+
+ String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const;
+ void ChangeExpansion( SwDoc* pDoc, USHORT nNum, USHORT nMax,
+ BOOL bVirtPageNum, const sal_Int16* pNumFmt = 0 );
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Seitennummerierung
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwPageNumberField : public SwField
+{
+ String sUserStr;
+ USHORT nSubType;
+ short nOffset;
+
+public:
+ SwPageNumberField(SwPageNumberFieldType*, USHORT nSub = PG_RANDOM,
+ sal_uInt32 nFmt = 0, short nOff = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual USHORT GetSubType() const;
+ // virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ const String& GetUserString() const { return sUserStr; }
+ void SetUserString( const String& rS ) { sUserStr = rS; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Autoren
+ --------------------------------------------------------------------*/
+
+class SwAuthorFieldType : public SwFieldType
+{
+public:
+ SwAuthorFieldType();
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: AutorenFeld
+ --------------------------------------------------------------------*/
+
+class SwAuthorField : public SwField
+{
+ String aContent;
+
+public:
+ SwAuthorField(SwAuthorFieldType*, sal_uInt32 nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ inline const String& GetContent() const { return aContent; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Filename
+ --------------------------------------------------------------------*/
+
+class SwFileNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwFileNameFieldType(SwDoc*);
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: FileName
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwFileNameField : public SwField
+{
+ String aContent;
+
+public:
+ SwFileNameField(SwFileNameFieldType*, sal_uInt32 nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ inline const String& GetContent() const { return aContent; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: TemplName
+ --------------------------------------------------------------------*/
+
+class SwTemplNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwTemplNameFieldType(SwDoc*);
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: TemplName
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwTemplNameField : public SwField
+{
+public:
+ SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Docstatistik
+ --------------------------------------------------------------------*/
+
+class SwDocStatFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Int16 nNumberingType;//com::sun::star::style::NumberingType
+
+public:
+ SwDocStatFieldType(SwDoc*);
+ String Expand(USHORT nSubType, sal_uInt32 nFmt) const;
+ virtual SwFieldType* Copy() const;
+
+ inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Dokumentstatistik
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDocStatField : public SwField
+{
+ USHORT nSubType;
+
+public:
+ SwDocStatField( SwDocStatFieldType*,
+ USHORT nSubType = 0, sal_uInt32 nFmt = 0);
+
+ void ChangeExpansion( const SwFrm* pFrm );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: versteckter Text
+ --------------------------------------------------------------------*/
+
+class SwHiddenTxtFieldType : public SwFieldType
+{
+ BOOL bHidden;
+public:
+ SwHiddenTxtFieldType(BOOL bSetHidden = TRUE);
+
+ virtual SwFieldType* Copy() const;
+
+ void SetHiddenFlag( BOOL bSetHidden = TRUE );
+ inline BOOL GetHiddenFlag() const { return bHidden; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Versteckter Text
+ --------------------------------------------------------------------*/
+
+class SwHiddenTxtField : public SwField
+{
+ String aTRUETxt; // Text wenn Bedingung TRUE
+ String aFALSETxt; // Wenn Bedingung falsch
+ String aContent; // Ausgewerteter DB-Text
+
+ String aCond; // Bedingung
+ USHORT nSubType;
+
+ BOOL bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
+ BOOL bIsHidden : 1; // ist es nicht sichtbar?
+ BOOL bValid : 1; // DB-Feld evaluiert?
+
+public:
+ SwHiddenTxtField( SwHiddenTxtFieldType*,
+ BOOL bConditional,
+ const String& rCond,
+ const String& rTxt,
+ BOOL bHidden = FALSE,
+ USHORT nSubType = TYP_HIDDENTXTFLD);
+
+ SwHiddenTxtField( SwHiddenTxtFieldType*,
+ const String& rCond,
+ const String& rTrue,
+ const String& rFalse,
+ USHORT nSubType = TYP_HIDDENTXTFLD);
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void Evaluate(SwDoc*);
+
+ inline void SetValue(BOOL bHidden) { bIsHidden = bHidden; }
+ String GetColumnName(const String& rName);
+ String GetDBName(const String& rName, SwDoc *pDoc);
+
+ // Condition
+ virtual void SetPar1(const String& rStr);
+ virtual const String& GetPar1() const;
+
+ // True/False - String
+ virtual void SetPar2(const String& rStr);
+ virtual String GetPar2() const;
+
+
+ virtual USHORT GetSubType() const;
+ // virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Feld das zu einer Leerzeile (ohne Hoehe) expandiert
+ --------------------------------------------------------------------*/
+
+class SwHiddenParaFieldType : public SwFieldType
+{
+public:
+ SwHiddenParaFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Versteckter Absatz
+ --------------------------------------------------------------------*/
+
+class SwHiddenParaField : public SwField
+{
+ String aCond;
+ BOOL bIsHidden:1;
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void SetHidden(BOOL bHidden) { bIsHidden = bHidden; }
+ BOOL IsHidden() const { return bIsHidden; }
+
+ // Bedingung erfragen/setzen
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Macro ausfuehren
+ --------------------------------------------------------------------*/
+
+class SwMacroFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+
+public:
+ SwMacroFieldType(SwDoc*);
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Macrofeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwMacroField : public SwField
+{
+ String aMacro;
+ String aText;
+ BOOL bIsScriptURL;
+
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwMacroField( SwMacroFieldType*, const String& rLibAndName,
+ const String& rTxt);
+
+ inline const String& GetMacro() const { return aMacro; }
+ String GetLibName() const;
+ String GetMacroName() const;
+ SvxMacro GetSvxMacro() const;
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Library und FileName
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // Macrotext
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ static void CreateMacroString( String& rMacro,
+ const String& rMacroName,
+ const String& rLibraryName );
+
+ static BOOL isScriptURL( const String& str );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: PostIts
+ --------------------------------------------------------------------*/
+
+class SwPostItFieldType : public SwFieldType
+{
+private:
+ SwDoc* mpDoc;
+public:
+ SwPostItFieldType(SwDoc* pDoc);
+
+ virtual SwFieldType* Copy() const;
+ SwDoc* GetDoc() {return mpDoc;};
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: PostIt
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwPostItField : public SwField
+{
+ String sTxt; // die Anmerkung
+ String sAuthor; // der Author
+ DateTime aDateTime; // Datum und Zeit der Anmerkung
+ OutlinerParaObject* mpText;
+ SwTextAPIObject* m_pTextObject;
+
+public:
+ SwPostItField( SwPostItFieldType*,
+ const String& rAuthor, const String& rTxt, const DateTime& rDate);
+ ~SwPostItField();
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline const Date GetDate() const { return aDateTime.GetDate(); }
+ inline const Time GetTime() const { return aDateTime.GetTime(); }
+
+ // Author
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // Text
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ const String& GetTxt() const { return sTxt; }
+
+ const OutlinerParaObject* GetTextObject() const;
+ void SetTextObject( OutlinerParaObject* pText );
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual String GetDescription() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: DokumentInfo
+ --------------------------------------------------------------------*/
+
+class SwDocInfoFieldType : public SwValueFieldType
+{
+public:
+ SwDocInfoFieldType(SwDoc* pDc);
+
+ String Expand(USHORT nSubType, sal_uInt32 nFormat, USHORT nLang, const String& rName) const;
+ virtual SwFieldType* Copy() const;
+};
+
+class SW_DLLPUBLIC SwDocInfoField : public SwValueField
+{
+ USHORT nSubType;
+ String aContent;
+ String aName;
+
+public:
+ SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, sal_uInt32 nFmt=0);
+ SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
+
+ virtual void SetSubType(USHORT);
+ virtual USHORT GetSubType() const;
+ virtual void SetLanguage(USHORT nLng);
+ virtual String Expand() const;
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual SwField* Copy() const;
+ String GetName() const { return aName; }
+ void SetName( const String& rName ) { aName = rName; }
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: erweiterte Benutzereinstellung
+ --------------------------------------------------------------------*/
+
+
+class SwExtUserFieldType : public SwFieldType
+{
+ String aData;
+public:
+ SwExtUserFieldType();
+
+ inline void SetData(const String& rStr) { aData = rStr; }
+
+ String Expand(USHORT nSubType, sal_uInt32 nFormat) const;
+ virtual SwFieldType* Copy() const;
+};
+
+class SwExtUserField : public SwField
+{
+ String aContent;
+ USHORT nType;
+
+public:
+ SwExtUserField(SwExtUserFieldType*, USHORT nSub, sal_uInt32 nFmt=0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relatives Seitennummern - Feld
+ --------------------------------------------------------------------*/
+
+class SwRefPageSetFieldType : public SwFieldType
+{
+public:
+ SwRefPageSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+ // ueberlagert, weil es nichts zum Updaten gibt!
+ virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relative Seitennummerierung
+ --------------------------------------------------------------------*/
+
+class SwRefPageSetField : public SwField
+{
+ short nOffset;
+ BOOL bOn;
+
+public:
+ SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
+ BOOL bOn = TRUE );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ BOOL IsOn() const { return bOn; }
+
+ short GetOffset() const { return nOffset; }
+ void SetOffset( short nOff ) { nOffset = nOff; }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: relatives Seitennummern - Abfrage Feld
+ --------------------------------------------------------------------*/
+
+class SwRefPageGetFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Int16 nNumberingType;
+
+ void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
+
+public:
+ SwRefPageGetFieldType( SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ // ueberlagert, um alle RefPageGet-Felder zu updaten
+ virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+ USHORT MakeSetList( _SetGetExpFlds& rTmpLst );
+
+ SwDoc* GetDoc() const { return pDoc; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relative Seitennummerierung Abfragen
+ --------------------------------------------------------------------*/
+
+class SwRefPageGetField : public SwField
+{
+ String sTxt;
+public:
+ SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFmt );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void SetText( const String& rTxt ) { sTxt = rTxt; }
+
+ void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Feld zum Anspringen und Editieren
+ --------------------------------------------------------------------*/
+
+class SwJumpEditFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ SwDepend aDep;
+
+public:
+ SwJumpEditFieldType( SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ SwCharFmt* GetCharFmt();
+};
+
+class SwJumpEditField : public SwField
+{
+ String sTxt, sHelp;
+public:
+ SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
+ const String& sText, const String& sHelp );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Platzhalter-Text
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // HinweisText
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ SwCharFmt* GetCharFmt() const
+ { return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Script Fieldtype
+ --------------------------------------------------------------------*/
+
+class SwScriptFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+public:
+ SwScriptFieldType( SwDoc* pDoc );
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Script Field
+ --------------------------------------------------------------------*/
+
+class SwScriptField : public SwField
+{
+ String sType; // Type von Code (Java/VBScript/...)
+ String sCode; // der Code als Text
+ // der Code als JavaCode ?
+
+ BOOL bCodeURL; // Code enthaelt URL eines Scripts
+
+public:
+ SwScriptField( SwScriptFieldType*, const String& rType,
+ const String& rCode, BOOL bURL=FALSE );
+
+ virtual String GetDescription() const;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Type
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ // Text
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ BOOL IsCodeURL() const { return bCodeURL; }
+ void SetCodeURL( BOOL bURL ) { bCodeURL = bURL; }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Combined Character Fieldtype
+ --------------------------------------------------------------------*/
+
+class SwCombinedCharFieldType : public SwFieldType
+{
+public:
+ SwCombinedCharFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Script Field
+ --------------------------------------------------------------------*/
+
+#define MAX_COMBINED_CHARACTERS 6
+
+class SW_DLLPUBLIC SwCombinedCharField : public SwField
+{
+ String sCharacters; // combine these characters
+
+public:
+ SwCombinedCharField( SwCombinedCharFieldType*, const String& rChars );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Characters
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+#endif // _DOCUFLD_HXX
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
new file mode 100644
index 000000000000..33cad58df09f
--- /dev/null
+++ b/sw/inc/dpage.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dpage.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DPAGE_HXX
+#define _DPAGE_HXX
+
+#ifndef _FM_FMPAGE_HXX
+#include <svx/fmpage.hxx>
+#endif
+#include <svx/svdobj.hxx>
+
+class SdrPageGridFrameList;
+class SwDrawDocument;
+class SwDoc;
+
+class SwDPage : public FmFormPage, public SdrObjUserCall
+{
+ SdrPageGridFrameList* pGridLst;
+ SwDoc& rDoc;
+
+public:
+ SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage=FALSE);
+ ~SwDPage();
+
+ // #i3694#
+ // This GetOffset() method is not needed anymore, it even leads to errors.
+ // virtual Point GetOffset() const;
+ virtual SdrObject* ReplaceObject( SdrObject* pNewObj, ULONG nObjNum );
+
+ virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
+ const Rectangle *pRect) const;
+
+ BOOL RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
+};
+
+#endif // _DPAGE_HXX
+
+
+
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
new file mode 100644
index 000000000000..5a80bd1ae37f
--- /dev/null
+++ b/sw/inc/drawdoc.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: drawdoc.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _DRAWDOC_HXX
+#define _DRAWDOC_HXX
+
+#ifndef _FM_FMMODEL_HXX
+#include <svx/fmmodel.hxx>
+#endif
+
+class SwDoc;
+class SwDocShell;
+
+//==================================================================
+
+class SwDrawDocument : public FmFormModel
+{
+ SwDoc* pDoc;
+public:
+ SwDrawDocument( SwDoc* pDoc );
+ ~SwDrawDocument();
+
+ const SwDoc& GetDoc() const { return *pDoc; }
+ SwDoc& GetDoc() { return *pDoc; }
+
+ virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
+
+ // fuers "load on demand" von Grafiken im DrawingLayer
+ virtual SvStream* GetDocumentStream( SdrDocumentStreamInfo& rInfo ) const;
+
+ // fuers Speicher von Rechtecken als Control-Ersatz fuker Versionen < 5.0
+ virtual SdrLayerID GetControlExportLayerId( const SdrObject & ) const;
+
+protected:
+ // --> OD 2006-03-01 #b6382898#
+ // overload of <SdrModel::createUnoModel()> is needed to provide corresponding uno model.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
+ // <--
+};
+
+
+#endif
diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx
new file mode 100644
index 000000000000..b2c5d411f07a
--- /dev/null
+++ b/sw/inc/edglbldc.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: edglbldc.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _EDGLBLDC_HXX
+#define _EDGLBLDC_HXX
+
+#include <svtools/svarray.hxx>
+
+class SwSection;
+class SwTOXBase;
+class SwTOXBaseSection;
+
+enum GlobalDocContentType {
+ GLBLDOC_UNKNOWN,
+ GLBLDOC_TOXBASE,
+ GLBLDOC_SECTION
+};
+
+class SwGlblDocContent
+{
+ GlobalDocContentType eType;
+ ULONG nDocPos;
+ union {
+ const SwTOXBase* pTOX;
+ const SwSection* pSect;
+ } PTR;
+
+public:
+ SwGlblDocContent( ULONG nPos );
+ SwGlblDocContent( const SwTOXBaseSection* pTOX );
+ SwGlblDocContent( const SwSection* pSect );
+
+ // Inhalte abfragen
+ GlobalDocContentType GetType() const { return eType; }
+ const SwSection* GetSection() const
+ { return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
+ const SwTOXBase* GetTOX() const
+ { return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
+ ULONG GetDocPos() const { return nDocPos; }
+
+ // fuers Sortieren
+ inline int operator==( const SwGlblDocContent& rCmp ) const
+ { return GetDocPos() == rCmp.GetDocPos(); }
+ inline int operator<( const SwGlblDocContent& rCmp ) const
+ { return GetDocPos() < rCmp.GetDocPos(); }
+};
+
+
+typedef SwGlblDocContent* SwGlblDocContentPtr;
+SV_DECL_PTRARR_SORT_DEL( SwGlblDocContents, SwGlblDocContentPtr, 10, 10 )
+
+
+
+#endif
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
new file mode 100644
index 000000000000..8cfa04648cf7
--- /dev/null
+++ b/sw/inc/edimp.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: edimp.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _EDIMP_HXX
+#define _EDIMP_HXX
+
+#include <tools/solar.h>
+#include <svtools/svarray.hxx>
+
+class SwPaM;
+class SwNodeIndex;
+
+/*
+ * MACROS um ueber alle Bereiche zu iterieren
+ */
+#define PCURCRSR (_pStartCrsr)
+
+#define FOREACHPAM_START(pCURSH) \
+ {\
+ SwPaM *_pStartCrsr = (pCURSH)->GetCrsr(), *__pStartCrsr = _pStartCrsr; \
+ do {
+
+#define FOREACHPAM_END() \
+ } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr ); \
+ }
+
+
+
+struct SwPamRange
+{
+ ULONG nStart, nEnd;
+
+ SwPamRange() : nStart( 0 ), nEnd( 0 ) {}
+ SwPamRange( ULONG nS, ULONG nE ) : nStart( nS ), nEnd( nE ) {}
+
+ BOOL operator==( const SwPamRange& rRg )
+ { return nStart == rRg.nStart ? TRUE : FALSE; }
+ BOOL operator<( const SwPamRange& rRg )
+ { return nStart < rRg.nStart ? TRUE : FALSE; }
+};
+
+SV_DECL_VARARR_SORT( _SwPamRanges, SwPamRange, 0, 1 )
+
+class SwPamRanges : private _SwPamRanges
+{
+public:
+ SwPamRanges( const SwPaM& rRing );
+
+ void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 );
+ SwPaM& SetPam( USHORT nArrPos, SwPaM& rPam );
+
+ USHORT Count() const
+ { return _SwPamRanges::Count(); }
+ SwPamRange operator[]( USHORT nPos ) const
+ { return _SwPamRanges::operator[](nPos); }
+};
+
+
+#endif
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
new file mode 100644
index 000000000000..1ce87e0df410
--- /dev/null
+++ b/sw/inc/editsh.hxx
@@ -0,0 +1,986 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: editsh.hxx,v $
+ * $Revision: 1.70 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _EDITSH_HXX
+#define _EDITSH_HXX
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <tools/string.hxx>
+#include <svtools/svarray.hxx>
+#include <vcl/font.hxx>
+#include <svx/swafopt.hxx>
+#include "swdllapi.h"
+#include <crsrsh.hxx> // fuer Basisklasse
+#include <itabenum.hxx>
+#include <swdbdata.hxx>
+#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
+#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
+#include <fldupde.hxx>
+#include <tblenum.hxx>
+
+#include <vector>
+#include <swundo.hxx>
+#include <svtools/embedhlp.hxx>
+
+class PolyPolygon;
+class SwDoc;
+class DateTime;
+class CommandExtTextInputData;
+
+class SvUShortsSort;
+class SvNumberFormatter;
+class SfxPoolItem;
+class SfxItemSet;
+class SvxLinkManager;
+class SvxAutoCorrect;
+
+class SwField; // fuer Felder
+class SwFieldType;
+class SwDDEFieldType;
+class SwNewDBMgr;
+
+struct SwDocStat;
+class SvStringsDtor;
+class SvStringsSort;
+class SwAutoCompleteWord;
+
+class SwFmtRefMark;
+
+class SwNumRule; // Numerierung
+//class SwNodeNum; // Numerierung
+
+class SwUndoIds; // fuer Undo
+class SwTxtFmtColl;
+class SwGrfNode;
+class SwFlyFrmFmt;
+
+class SwFrmFmt; // fuer GetTxtNodeFmts()
+class SwCharFmt;
+class SwExtTextInput;
+class SwRootFrm; // fuer CTOR
+class Graphic; // fuer GetGraphic
+class GraphicObject; // fuer GetGraphicObj
+class SwFmtINetFmt; // InsertURL
+class SwTable;
+class SwTextBlocks; // fuer GlossaryRW
+class SwFmtFtn;
+class SwSection;
+class SwSectionFmt;
+class SwTOXMarks;
+class SwTOXBase;
+class SwTOXType;
+class SwTableAutoFmt;
+class SwPageDesc;
+class SwTxtINetFmt;
+class SwSeqFldList;
+class SwGlblDocContent;
+class SwGlblDocContents;
+class SwRedline;
+class SwRedlineData;
+class SwFtnInfo;
+class SwEndNoteInfo;
+class SwLineNumberInfo;
+class SwAuthEntry;
+class SwRewriter;
+struct SwConversionArgs;
+
+
+namespace com { namespace sun { namespace star { namespace uno {
+ template < class > class Sequence;
+}}}}
+
+namespace svx{
+struct SpellPortion;
+typedef std::vector<SpellPortion> SpellPortions;
+}
+
+
+
+#define GETSELTXT_PARABRK_TO_BLANK 0
+#define GETSELTXT_PARABRK_KEEP 1
+#define GETSELTXT_PARABRK_TO_ONLYCR 2
+
+/****************************************************************
+ * zum Abfragen der INet-Attribute fuer den Navigator
+ ****************************************************************/
+struct SwGetINetAttr
+{
+ String sText;
+ const SwTxtINetFmt& rINetAttr;
+
+ SwGetINetAttr( const String& rTxt, const SwTxtINetFmt& rAttr )
+ : sText( rTxt ), rINetAttr( rAttr )
+ {}
+};
+SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 )
+
+/****************************************************************
+ * Typen der Inhaltsformen
+ ****************************************************************/
+#define CNT_TXT 0x0001
+#define CNT_GRF 0x0002
+#define CNT_OLE 0x0010
+/* Teste einen USHORT auf eine bestimmte Inhaltsform */
+#define CNT_HasTxt(USH) ((USH)&CNT_TXT)
+#define CNT_HasGrf(USH) ((USH)&CNT_GRF)
+#define CNT_HasOLE(USH) ((USH)&CNT_OLE)
+
+class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
+{
+ static SvxSwAutoFmtFlags* pAutoFmtFlags;
+
+ // fuer die privaten Methoden DelRange und die vom AutoCorrect
+ friend class SwAutoFormat;
+ friend void _InitCore();
+ friend void _FinitCore();
+ // fuer die PamCorrAbs/-Rel Methoden
+ friend class SwUndo;
+
+ SW_DLLPRIVATE SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const;
+
+ /*
+ * liefert einen Pointer auf einen SwGrfNode; dieser wird von
+ * GetGraphic() und GetGraphicSize() verwendet.
+ */
+ SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
+
+ SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, BOOL* pUndo = 0 );
+
+ SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
+
+ using ViewShell::UpdateFlds;
+ using SwModify::GetInfo;
+
+public:
+ // Editieren (immer auf allen selektierten Bereichen)
+ void Insert( sal_Unicode, BOOL bOnlyCurrCrsr = FALSE );
+ void Insert2( const String &, const bool bForceExpandHints = false );
+ void Overwrite( const String & );
+
+ // Ersetz einen selektierten Bereich in einem TextNode mit dem
+ // String. Ist fuers Suchen&Ersetzen gedacht.
+ // bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
+ // ein ( nicht \& )
+ // z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
+ // --> "xx\t<Tab>..zzz..&"
+ BOOL Replace( const String& rNewStr, BOOL bRegExpRplc = FALSE );
+
+ // loescht den Inhalt aller Bereiche;
+ // werden ganze Nodes selektiert, werden die Nodes geloescht
+ long Delete();
+
+ // remove a complete paragraph
+ BOOL DelFullPara();
+
+ // change text to Upper/Lower/Hiragana/Katagana/...
+ void TransliterateText( sal_uInt32 nType );
+
+ // count words in current selection
+ void CountWords( SwDocStat& rStat ) const;
+
+ // loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
+ // versteckte Bereiche, versteckte Absaetze
+ BOOL RemoveInvisibleContent();
+
+ // replace fields by text - mailmerge support
+ BOOL ConvertFieldsToText();
+ // set all numbering start points to a fixed value - mailmerge support
+ void SetNumberingRestart();
+
+ // embedded alle lokalen Links (Bereiche/Grafiken)
+ USHORT GetLinkUpdMode(BOOL bDocSettings = FALSE) const;
+ void SetLinkUpdMode( USHORT nMode );
+
+ // kopiere den Inhalt aller Bereiche an die akt. Cursor-Position
+ // in die angegebene Shell
+ long Copy( SwEditShell* pDestShell = 0 );
+
+ // fuers Kopieren uebers ClipBoard:
+ // wird Tabelle in Tabelle kopiert, verschiebe aus dieser dann
+ // alle Cursor. Copy und Paste muss aufgrund der FlyFrames in
+ // der FEShell stehen!
+ // kopiere alle Selectionen und das Doc
+ //JP 21.10.96: und fuer die SVX-Autokorrektur
+ BOOL _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
+
+ long SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
+ sal_Bool AppendTxtNode();
+ void AutoFmtBySplitNode();
+
+ // ist der Cursor in einem INetAttribut, dann wird das komplett
+ // geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
+ BOOL DelINetAttrWithText();
+
+ // ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
+ // noch nicht gesetzt ist, wird dies gesetzt ( => return TRUE; )
+ BOOL DontExpandFmt();
+
+ // Anwenden / Entfernen von Attributen
+ // liefert Attribute im angeforderten AttributSet. Wenn nicht eindeutig
+ // steht im Set ein DONT_CARE !!
+ // --> OD 2008-01-16 #newlistlevelattrs#
+ // Renaming method to <GetCurAttr(..)> indicating that the attributes at
+ // the current cursors are retrieved.
+ // Introduce 2nd optional parameter <bMergeIndentValuesOfNumRule>.
+ // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // the corresponding list level of an applied list style is merged into
+ // the requested item set as a LR-SPACE item, if corresponding node has not
+ // its own indent attributes and the position-and-space mode of the list
+ // level is SvxNumberFormat::LABEL_ALIGNMENT.
+ BOOL GetCurAttr( SfxItemSet& ,
+ const bool bMergeIndentValuesOfNumRule = false ) const;
+ // <--
+ void SetAttr( const SfxPoolItem&, USHORT nFlags = 0 );
+ void SetAttr( const SfxItemSet&, USHORT nFlags = 0 );
+
+ // Setze das Attribut als neues default Attribut im Dokument.
+ void SetDefault( const SfxPoolItem& );
+
+ // Erfrage das Default Attribut vom Dokument.
+ const SfxPoolItem& GetDefault( USHORT nFmtHint ) const;
+
+ void ResetAttr( const SvUShortsSort* pAttrs = 0 );
+ void GCAttr();
+
+ // returns the scripttpye of the selection
+ USHORT GetScriptType() const;
+
+ // returns the language at current cursor position
+ USHORT GetCurLang() const;
+
+ // TABLE
+ USHORT GetTblFrmFmtCount( BOOL bUsed = FALSE ) const;
+ SwFrmFmt& GetTblFrmFmt(USHORT nFmt, BOOL bUsed = FALSE ) const;
+ String GetUniqueTblName() const;
+
+ // CHAR
+ USHORT GetCharFmtCount() const;
+ SwCharFmt& GetCharFmt(USHORT nFmt) const;
+ SwCharFmt* GetCurCharFmt() const;
+ void FillByEx(SwCharFmt*, BOOL bReset = FALSE);
+ SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
+ SwCharFmt* FindCharFmtByName( const String& rName ) const;
+
+
+ /* Formatcollections, neu */
+ /* GetXXXCount() liefert die Anzahl der im Dokument vorhandenen XXX
+ * GetXXX(i) liefert das i-te XXX (ERR_RAISE bei Ueberindizierung!)
+ * DelXXX(i) loescht das i-te XXX (ERR_RAISE bei Ueberindizierung!)
+ * GetCurXXX() liefert das am Cursor oder in den Bereichen
+ * geltende XXX (0, wenn nicht eindeutig!)
+ * SetXXX() setzt am Cursor oder in den Bereichen das XXX
+ * MakeXXX() macht ein XXX, abgeleitet vom pDerivedFrom
+ */
+
+ // TXT
+ SwTxtFmtColl& GetDfltTxtFmtColl() const;
+ USHORT GetTxtFmtCollCount() const;
+ SwTxtFmtColl& GetTxtFmtColl( USHORT nTxtFmtColl) const;
+ SwTxtFmtColl* GetCurTxtFmtColl() const;
+ // --> OD 2007-11-06 #i62675#
+ // Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)>
+ void SetTxtFmtColl( SwTxtFmtColl*,
+ bool bResetListAttrs = false );
+ // <--
+ SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
+ SwTxtFmtColl *pDerivedFrom = 0);
+ void FillByEx(SwTxtFmtColl*, BOOL bReset = FALSE);
+ SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
+
+ // Gebe die "Auto-Collection" mit der Id zurueck. Existiert
+ // sie noch nicht, dann erzuege sie
+ SwTxtFmtColl* GetTxtCollFromPool( USHORT nId );
+ // return das geforderte automatische Format - Basis-Klasse !
+ SwFmt* GetFmtFromPool( USHORT nId );
+ // returne die geforderte automatische Seiten-Vorlage
+ SwPageDesc* GetPageDescFromPool( USHORT nId );
+
+ // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ BOOL IsUsed( const SwModify& ) const;
+
+ // returne das geforderte automatische Format
+ SwFrmFmt* GetFrmFmtFromPool( USHORT nId )
+ { return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
+ SwCharFmt* GetCharFmtFromPool( USHORT nId )
+ { return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
+
+ // Felder
+ void Insert2(SwField&, const bool bForceExpandHints = false);
+ SwField* GetCurFld() const;
+
+ void UpdateFlds( SwField & ); // ein einzelnes Feld
+
+ USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
+ SwFieldType* GetFldType(USHORT nId, USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
+ SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+
+ void RemoveFldType(USHORT nId, USHORT nResId = USHRT_MAX);
+ void RemoveFldType(USHORT nResId, const String& rName);
+
+ void FieldToText( SwFieldType* pType );
+
+ void ChangeAuthorityData(const SwAuthEntry* pNewData);
+
+ // Datenbankinfo
+ SwDBData GetDBData() const;
+ const SwDBData& GetDBDesc() const;
+ void ChgDBData(const SwDBData& SwDBData);
+ void ChangeDBFields( const SvStringsDtor& rOldNames,
+ const String& rNewName );
+ void GetAllUsedDB( SvStringsDtor& rDBNameList,
+ SvStringsDtor* pAllDBNames = 0 );
+
+ BOOL IsAnyDatabaseFieldInDoc()const;
+ //check whether DB fields point to an available data source and returns it
+ BOOL IsFieldDataSourceAvailable(String& rUsedDataSource) const;
+ void UpdateExpFlds(BOOL bCloseDB = FALSE);// nur alle ExpressionFelder updaten
+ void SetFixFields( BOOL bOnlyTimeDate = FALSE,
+ const DateTime* pNewDateTime = 0 );
+ void LockExpFlds();
+ void UnlockExpFlds();
+
+ SwFldUpdateFlags GetFldUpdateFlags(BOOL bDocSettings = FALSE) const;
+ void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
+
+ // fuer die Evaluierung der DBFelder (neuer DB-Manager)
+ SwNewDBMgr* GetNewDBMgr() const;
+
+ SwFieldType* InsertFldType(const SwFieldType &);
+
+ // Aenderungen am Dokument?
+ BOOL IsModified() const;
+ void SetModified();
+ void ResetModified();
+ void SetUndoNoResetModified();
+
+ // Dokument - Statistics
+ void UpdateDocStat( SwDocStat& rStat );
+
+ // Verzeichnismarke einfuegen loeschen
+ void Insert(const SwTOXMark& rMark);
+ void DeleteTOXMark(SwTOXMark* pMark);
+
+ // Alle Markierungen am aktuellen SPoint ermitteln
+ USHORT GetCurTOXMarks(SwTOXMarks& rMarks) const ;
+
+ // Verzeichnis einfuegen, und bei Bedarf erneuern
+ void InsertTableOf(const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0);
+ BOOL UpdateTableOf(const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0);
+ const SwTOXBase* GetCurTOX() const;
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate = FALSE );
+ void SetDefaultTOXBase(const SwTOXBase& rBase);
+
+ BOOL IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
+ void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly);
+
+ USHORT GetTOXCount() const;
+ const SwTOXBase* GetTOX( USHORT nPos ) const;
+ BOOL DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes = FALSE );
+
+ // nach einlesen einer Datei alle Verzeichnisse updaten
+ void SetUpdateTOX( BOOL bFlag = TRUE );
+ BOOL IsUpdateTOX() const;
+
+ // Verzeichnis-Typen verwalten
+ USHORT GetTOXTypeCount(TOXTypes eTyp) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ void InsertTOXType(const SwTOXType& rTyp);
+
+ //AutoMark file
+ const String& GetTOIAutoMarkURL() const;
+ void SetTOIAutoMarkURL(const String& rSet);
+ void ApplyAutoMark();
+
+ // Schluessel fuer die Indexverwaltung
+ USHORT GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+
+ void SetOutlineNumRule(const SwNumRule&);
+ const SwNumRule* GetOutlineNumRule() const;
+ // Gliederung - hoch-/runterstufen
+ BOOL OutlineUpDown( short nOffset = 1 );
+ // Gliederung - hoch-/runtermoven
+ BOOL MoveOutlinePara( short nOffset = 1);
+ // Outlines and SubOutline are protected ?
+ BOOL IsProtectedOutlinePara() const;
+
+ // Numerierung Aufzaehlunglisten
+ // liefert Regelwerk der aktuellen Aufzaehlung (FALSE sonst)
+ const SwNumRule* GetCurNumRule() const;
+
+ // setzt, wenn noch keine Numerierung, sonst wird geaendert
+ // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // Add optional parameter <bResetIndentAttrs> (default value FALSE).
+ // If <bResetIndentAttrs> equals true, the indent attributes "before text"
+ // and "first line indent" are additionally reset at the current selection,
+ // if the list style makes use of the new list level attributes.
+ // --> OD 2008-03-17 #refactorlists#
+ // introduce parameters <bCreateNewList> and <sContinuedListId>
+ // <bCreateNewList> indicates, if a new list is created by applying the
+ // given list style.
+ // If <bCreateNewList> equals FALSE, <sContinuedListId> may contain the
+ // list Id of a list, which has to be continued by applying the given list style
+ void SetCurNumRule( const SwNumRule&,
+ const bool bCreateNewList /*= false*/,
+ const String sContinuedListId = String(),
+ const bool bResetIndentAttrs = false );
+ // <--
+ // Absaetze ohne Numerierung, aber mit Einzuegen
+ BOOL NoNum();
+ // Loeschen, Splitten der Aufzaehlungsliste
+ void DelNumRules();
+ // Hoch-/Runterstufen
+ BOOL NumUpDown( BOOL bDown = TRUE );
+ // Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
+ BOOL MoveParagraph( long nOffset = 1);
+ BOOL MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft );
+ // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+ BOOL NumOrNoNum( BOOL bDelete = FALSE, BOOL bChkStart = TRUE);
+ // -> #i23726#
+ // --> OD 2008-06-09 #i90078#
+ // Remove unused default parameter <nLevel> and <bRelative>.
+ // Adjust method name and parameter name
+ void ChangeIndentOfAllListLevels( short nDiff );
+ // Adjust method name
+ void SetIndent(short nIndent, const SwPosition & rPos);
+ // <--
+ BOOL IsFirstOfNumRule() const;
+ BOOL IsFirstOfNumRule(const SwPaM & rPaM) const;
+ // <- #i23726#
+
+ BOOL IsNoNum( BOOL bChkStart = TRUE ) const;
+ // returne den Num-Level des Nodes, in dem sich der Point vom
+ // Cursor befindet. Return kann sein :
+ // - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
+ // --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
+// BYTE GetNumLevel( BOOL* pHasChilds = 0 ) const;
+ BYTE GetNumLevel() const;
+ // <--
+ // detect highest and lowest level to check moving of outline levels
+ void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
+
+
+ // get Outline level of current paragraph
+ int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
+
+ // -> i29560
+ BOOL HasNumber() const;
+ BOOL HasBullet() const;
+ // <- i29560
+
+ String GetUniqueNumRuleName( const String* pChkStr = 0, BOOL bAutoNum = TRUE ) const;
+ void ChgNumRuleFmts( const SwNumRule& rRule );
+ // setze und erfrage, ob an aktueller PointPos eine Numerierung mit
+ // dem StartFlag startet
+ void SetNumRuleStart( BOOL bFlag = TRUE );
+ BOOL IsNumRuleStart() const;
+ void SetNodeNumStart( USHORT nStt );
+ // --> OD 2008-02-29 #refactorlists#
+ USHORT GetNodeNumStart() const;
+ // <--
+ BOOL ReplaceNumRule( const String& rOldRule, const String& rNewRule );
+ // Searches for a text node with a numbering rule.
+ // --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
+ // in case a list style is found, <sListId> holds the list id, to which the
+ // text node belongs, which applies the found list style.
+ const SwNumRule * SearchNumRule(const bool bForward,
+ const bool bNum,
+ const bool bOutline,
+ int nNonEmptyAllowed,
+ String& sListId );
+ // <--
+
+ // Undo
+ // UndoHistory am Dokument pflegen
+ // bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
+ void DoUndo( BOOL bOn = TRUE );
+ BOOL DoesUndo() const;
+ void DoGroupUndo( BOOL bUn = TRUE );
+ BOOL DoesGroupUndo() const;
+ void DelAllUndoObj();
+
+ // macht rueckgaengig:
+ // setzt Undoklammerung auf, liefert nUndoId der Klammerung
+ SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
+ // schliesst Klammerung der nUndoId, nicht vom UI benutzt
+ SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
+ // liefert die Id der letzten undofaehigen Aktion zurueck
+ // fuellt ggf. VARARR mit User-UndoIds
+ SwUndoId GetUndoIds( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
+ String GetUndoIdsStr( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
+
+ // abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
+ static USHORT GetUndoActionCount();
+ static void SetUndoActionCount( USHORT nNew );
+
+ // Redo
+ // liefert die Id der letzten Redofaehigen Aktion zurueck
+ // fuellt ggf. VARARR mit RedoIds
+ SwUndoId GetRedoIds( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
+ String GetRedoIdsStr( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
+
+ // Repeat
+ // liefert die Id der letzten Repeatfaehigen Aktion zurueck
+ // fuellt ggf. VARARR mit RedoIds
+ SwUndoId GetRepeatIds( String* pRepeatStr = 0, SwUndoIds *pRedoIds = 0) const;
+ String GetRepeatIdsStr( String* pRepeatStr = 0,
+ SwUndoIds *pRedoIds = 0) const;
+
+ // 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId
+ // mit KillPaMs, ClearMark
+ BOOL Undo(SwUndoId nUndoId = UNDO_EMPTY, USHORT nCnt = 1 );
+ // wiederholt
+ USHORT Repeat( USHORT nCount );
+ // wiederholt
+ USHORT Redo( USHORT nCnt = 1 );
+ // fuer alle Sichten auf dieses Dokument
+ void StartAllAction();
+ void EndAllAction();
+
+ //Damit Start-/EndActions aufgesetzt werden koennen.
+ void CalcLayout();
+
+ // Inhaltsform bestimmen, holen, liefert Type am CurCrsr->SPoint
+ USHORT GetCntType() const;
+ BOOL HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
+
+ /* Anwenden der ViewOptions mit Start-/EndAction */
+ inline void ApplyViewOptions( const SwViewOption &rOpt );
+
+ // Text innerhalb der Selektion erfragen
+ // Returnwert liefert FALSE, wenn der selektierte Bereich
+ // zu gross ist, um in den Stringpuffer kopiert zu werden
+ // oder andere Fehler auftreten
+ BOOL GetSelectedText( String &rBuf,
+ int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
+
+ /*
+ * liefert eine Graphic, wenn CurCrsr->Point() auf einen
+ * SwGrfNode zeigt (und Mark nicht gesetzt ist oder auf die
+ * gleiche Graphic zeigt), sonst gibt's was auf die Finger
+ */
+ // --> OD 2005-02-09 #119353# - robust
+ const Graphic* GetGraphic( BOOL bWait = TRUE ) const;
+ const GraphicObject* GetGraphicObj() const;
+ // <--
+ BOOL IsGrfSwapOut( BOOL bOnlyLinked = FALSE ) const;
+ USHORT GetGraphicType() const;
+
+ const PolyPolygon *GetGraphicPolygon() const;
+ void SetGraphicPolygon( const PolyPolygon *pPoly );
+
+ // If there's an automatic, not manipulated polygon at the selected
+ // notxtnode, it has to be deleted, e.g. cause the object has changed.
+ void ClearAutomaticContour();
+
+ /*
+ * liefert die Groesse einer Graphic in Twips, wenn der Cursor
+ * auf einer Graphic steht; BOOL liefert FALSE, wenn s.o.
+ */
+ BOOL GetGrfSize(Size&) const;
+ /*
+ * liefert den Namen und den Filter einer Graphic, wenn der Cursor
+ * auf einer Graphic steht, sonst gibt's was auf die Finger!
+ * Ist ein String-Ptr != 0 dann returne den entsp. Namen
+ */
+ void GetGrfNms( String* pGrfName, String* pFltName,
+ const SwFlyFrmFmt* = 0 ) const;
+ /*
+ * erneutes Einlesen, falls Graphic nicht Ok ist. Die
+ * aktuelle wird durch die neue ersetzt.
+ */
+ void ReRead( const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const GraphicObject* pGrafObj = 0 );
+
+// // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
+// const String& GetAlternateText() const;
+// void SetAlternateText( const String& rTxt );
+
+ //eindeutige Identifikation des Objektes (fuer ImageMapDlg)
+ void *GetIMapInventor() const;
+ // --> OD 2007-03-01 #i73788#
+ // remove default parameter, because method always called this default value
+ Graphic GetIMapGraphic() const; //liefert eine Graphic fuer alle Flys!
+ // <--
+ const SwFlyFrmFmt* FindFlyByName( const String& rName, BYTE nNdTyp = 0 ) const;
+
+ //liefert ein ClientObject, wenn CurCrsr->Point() auf einen
+ //SwOLENode zeigt (und Mark nicht gesetzt ist oder auf das
+ //gleiche ClientObject zeigt), sonst gibt's was auf die
+ //Finger.
+ svt::EmbeddedObjectRef& GetOLEObject() const;
+ //Gibt es ein OleObject mit diesem Namen (SwFmt)?
+ BOOL HasOLEObj( const String &rName ) const;
+
+ //Liefert den Pointer auf die Daten des Chart, indem sich der Crsr
+ //befindet.
+ void SetChartName( const String &rName );
+
+ //Updaten der Inhalte aller Charts zu der Tabelle mit dem angegeben Namen
+ void UpdateCharts( const String &rName );
+
+ // aktuelles Wort erfragen
+ String GetCurWord();
+
+ // Textbaustein aus dem Textbausteindokument in
+ // das aktuelle Dokument, Vorlagen nur wenn es nicht schon gibt
+ void InsertGlossary( SwTextBlocks& rGlossary, const String& );
+ // aktuelle Selektion zum Textbaustein machen und ins
+ // Textbausteindokument einfuegen, einschliesslich Vorlagen
+ USHORT MakeGlossary( SwTextBlocks& rToFill, const String& rName,
+ const String& rShortName, BOOL bSaveRelFile = FALSE,
+ const String* pOnlyTxt=0 );
+ // speicher den gesamten Inhalt des Docs als Textbaustein
+ USHORT SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
+ const String& rShortName,
+ BOOL bSaveRelFile = FALSE,
+ BOOL bOnlyTxt = FALSE );
+
+ // Linguistik
+ // Selektionen sichern
+ void HyphStart( SwDocPositions eStart, SwDocPositions eEnde );
+ // Selektionen wiederherstellen
+ void HyphEnd();
+ com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
+ HyphContinue( USHORT* pPageCnt, USHORT* pPageSt );
+ // zu trennendes Wort ignorieren
+ void HyphIgnore();
+
+ // zum Einfuegen des SoftHyphens, Position ist der Offset
+ // innerhalb des getrennten Wortes.
+ void InsertSoftHyph( const xub_StrLen nHyphPos );
+
+ //Tabelle
+ const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR
+ USHORT nRows, USHORT nCols,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
+ const SwTableAutoFmt* pTAFmt = 0 );
+
+ void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
+ SwDDEFieldType* pDDEType,
+ USHORT nRows, USHORT nCols,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
+
+ void UpdateTable();
+ void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
+
+ SwFrmFmt *GetTableFmt();
+ BOOL TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
+ sal_Unicode cCh,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
+ const SwTableAutoFmt* pTAFmt = 0 );
+ BOOL TableToText( sal_Unicode cCh );
+ BOOL IsTextToTableAvailable() const;
+
+ BOOL GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
+ void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
+
+ BOOL IsTableBoxTextFormat() const;
+ String GetTableBoxText() const;
+
+ // Change Modus erfragen/setzen
+ TblChgMode GetTblChgMode() const;
+ void SetTblChgMode( TblChgMode eMode );
+
+ // Tabelle an der Cursor Position aufsplitten
+ BOOL SplitTable( USHORT eMode );
+ // Tabellen verbinden
+ // CanMerge kann feststellen, ob Prev oder Next moeglich ist. Wird
+ // der Pointer pChkNxtPrv uebergeben, wird festgestellt in welche
+ // Richtung es moeglich ist.
+ BOOL CanMergeTable( BOOL bWithPrev = TRUE, BOOL* pChkNxtPrv = 0 ) const;
+ BOOL MergeTable( BOOL bWithPrev = TRUE, USHORT nMode = 0 );
+ // setze das InsertDB als Tabelle Undo auf:
+ void AppendUndoForInsertFromDB( BOOL bIsTable );
+
+ /*
+ functions used for spell checking and text conversion
+ */
+
+ // Selektionen sichern
+ void SpellStart( SwDocPositions eStart, SwDocPositions eEnde,
+ SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 );
+ // Selektionen wiederherstellen
+ void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
+ ::com::sun::star::uno::Any SpellContinue(
+ USHORT* pPageCnt, USHORT* pPageSt,
+ SwConversionArgs *pConvArgs = 0 );
+
+ // spells on a sentence basis - the SpellPortions are needed
+ // returns false if no error could be found
+ bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck );
+ // make SpellIter start with the current sentence when called next time
+ void PutSpellingToSentenceStart();
+ //applies a changed sentence
+ void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck);
+
+ // Is text conversion active somewhere else?
+ BOOL HasConvIter() const;
+ // Is hyphenation active somewhere else?
+ BOOL HasHyphIter() const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellAlternatives >
+ GetCorrection( const Point* pPt, SwRect& rSelectRect );
+
+
+ bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult,
+ sal_Int32 /*out*/ &rErrorPosInText,
+ sal_Int32 /*out*/ &rErrorIndexInResult,
+ ::com::sun::star::uno::Sequence< rtl::OUString > /*out*/ &rSuggestions,
+ const Point* pPt, SwRect& rSelectRect );
+
+ void IgnoreGrammarErrorAt( SwPaM& rErrorPosition );
+ void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde );
+
+ // returne zum Namen die im Doc gesetzte Referenz
+ const SwFmtRefMark* GetRefMark( const String& rName ) const;
+ // returne die Namen aller im Doc gesetzten Referenzen
+ // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
+ // gesetzt ist
+ USHORT GetRefMarks( SvStringsDtor* = 0 ) const;
+
+ // rufe die Autokorrektur auf
+ void AutoCorrect( SvxAutoCorrect& rACorr, BOOL bInsertMode = TRUE,
+ sal_Unicode cChar = ' ' );
+ BOOL GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
+
+ // dann setze nach entsprechenden Regeln unsere Vorlagen
+ void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
+
+ static SvxSwAutoFmtFlags* GetAutoFmtFlags();
+ static void SetAutoFmtFlags(SvxSwAutoFmtFlags *);
+
+ // errechnet die Selektion
+ String Calculate();
+
+ BOOL InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
+ BOOL bKeepSelection = FALSE );
+ USHORT GetINetAttrs( SwGetINetAttrs& rArr );
+
+ //SS Fuer holen/ersetzen DropCap-Inhalt
+ String GetDropTxt( const USHORT nChars ) const;
+ void ReplaceDropTxt( const String &rStr );
+
+ // may an outline be moved or copied?
+ // Check whether it's in text body, not in table, and not read-only (move)
+ BOOL IsOutlineMovable( USHORT nIdx ) const;
+ BOOL IsOutlineCopyable( USHORT nIdx ) const;
+
+ USHORT GetLineCount( BOOL bActPos = TRUE );
+
+ // erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
+ BOOL GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
+ bool SetCurFtn( const SwFmtFtn& rFillFtn );
+ bool HasFtns( bool bEndNotes = false ) const;
+//z.Zt nicht benoetigt USHORT GetFtnCnt( BOOL bEndNotes = FALSE ) const;
+ // gebe Liste aller Fussnoten und deren Anfangstexte
+ USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
+
+ // SS fuer Bereiche
+ const SwSection* InsertSection( const SwSection& rNew,
+ const SfxItemSet* = 0 );
+ BOOL IsInsRegionAvailable() const;
+ const SwSection* GetCurrSection() const;
+ // liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
+ // ueber die Frames und erwischt dabei auch den Bereich, wenn der Cursor in einer
+ // Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
+ // Wenn man bOutOfTab setzt, wird der Bereich gesucht,
+ // der die Tabelle umfasst, nicht etwa ein innerer.
+ const SwSection* GetAnySection( BOOL bOutOfTab = FALSE, const Point* pPt = 0 ) const;
+
+ USHORT GetSectionFmtCount() const;
+ USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
+ const SwSectionFmt& GetSectionFmt(USHORT nFmt) const;
+ void DelSectionFmt( USHORT nFmt );
+ void ChgSection( USHORT nSect, const SwSection&, const SfxItemSet* = 0 );
+ BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE,
+ BOOL bChkHidden = FALSE,
+ BOOL BChkTOX = FALSE ) const;
+
+ String GetUniqueSectionName( const String* pChkStr = 0 ) const;
+
+ //Attribute setzen
+ void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0);
+
+ // search inside the cursor selection for full selected sections.
+ // if any part of section in the selection return 0.
+ // if more than one in the selection return the count
+ USHORT GetFullSelectedSectionCount() const;
+
+ // special insert: Insert a new text node just before or after a section or
+ // table, if the cursor is positioned at the start/end of said
+ // section/table. The purpose of the method is to allow users to inert text
+ // at certain 'impossible' position, e.g. before a table at the document
+ // start or between to sections.
+ bool DoSpecialInsert();
+ bool CanSpecialInsert() const;
+
+ // Optimierung UI
+ void SetNewDoc(BOOL bNew = TRUE);
+
+ SvxLinkManager& GetLinkManager();
+ inline const SvxLinkManager& GetLinkManager() const;
+
+ // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
+ // Numerierungen), optional kann man "um" den Offset stufen oder "auf"
+ // die Position gestuft werden (bModulus = TRUE)
+ BOOL IsMoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE ) const;
+ void MoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE );
+
+ // Numberformatter vom Doc erfragen
+ SvNumberFormatter* GetNumberFormatter();
+ const SvNumberFormatter* GetNumberFormatter() const
+ { return ((SwEditShell*)this)->GetNumberFormatter(); }
+
+ // Schnitstellen fuers GlobalDokument
+ BOOL IsGlobalDoc() const;
+ void SetGlblDocSaveLinks( BOOL bFlag = TRUE );
+ BOOL IsGlblDocSaveLinks() const;
+ USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const;
+ BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ const SwSection& rNew );
+ BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ const SwTOXBase& rTOX );
+ BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos );
+ BOOL DeleteGlobalDocContent( const SwGlblDocContents& rArr,
+ USHORT nPos );
+ BOOL MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ USHORT nFromPos, USHORT nToPos,
+ USHORT nNewPos );
+ BOOL GotoGlobalDocContent( const SwGlblDocContent& rPos );
+
+ // alles fuers Redlining
+ USHORT GetRedlineMode() const;
+ void SetRedlineMode( USHORT eMode );
+ BOOL IsRedlineOn() const;
+ USHORT GetRedlineCount() const;
+ const SwRedline& GetRedline( USHORT nPos ) const;
+ BOOL AcceptRedline( USHORT nPos );
+ BOOL RejectRedline( USHORT nPos );
+ // suche das Redline zu diesem Data und returne die Pos im Array
+ // USHRT_MAX wird returnt, falls nicht vorhanden
+ USHORT FindRedlineOfData( const SwRedlineData& ) const;
+
+ // Kommentar am Redline an der Position setzen
+ BOOL SetRedlineComment( const String& rS );
+ const SwRedline* GetCurrRedline() const;
+
+ // Redline Anzeigeattribute wurden geaendert, Views updaten
+ void UpdateRedlineAttr();
+
+ // vergleiche zwei Dokument mit einander
+ long CompareDoc( const SwDoc& rDoc );
+ // merge zweier Dokumente
+ long MergeDoc( const SwDoc& rDoc );
+
+ // Dokumentglobale Fussnoteneigenschaften
+ const SwFtnInfo& GetFtnInfo() const;
+ void SetFtnInfo(const SwFtnInfo& rInfo);
+ const SwEndNoteInfo& GetEndNoteInfo() const;
+ void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
+
+ //Einstellungen fuer Zeilennummierung
+ const SwLineNumberInfo &GetLineNumberInfo() const;
+ void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
+
+ // Etiketten: Bereiche synchronisieren
+ void SetLabelDoc( BOOL bFlag = TRUE );
+ BOOL IsLabelDoc() const;
+
+ // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
+ // von japanischen/chinesischen Zeichen)
+ SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
+ String DeleteExtTextInput( SwExtTextInput* pDel = 0, BOOL bInsText = TRUE);
+// SwExtTextInput* GetExtTextInput() const;
+ void SetExtTextInputData( const CommandExtTextInputData& );
+
+ // Schnistelle fuer den Zugriff auf die AutoComplete-Liste
+ static SwAutoCompleteWord& GetAutoCompleteWords();
+
+ // returns a scaling factor of selected text. Used for the rotated
+ // character attribut dialog.
+ USHORT GetScalingOfSelectedText() const;
+
+ // ctor/dtor
+ SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
+ // verkleideter Copy-Constructor
+ SwEditShell( SwEditShell&, Window* );
+ virtual ~SwEditShell();
+
+private:
+ // fuer METWARE:
+ // es wird nicht kopiert und nicht zugewiesen
+ SwEditShell(const SwEditShell &);
+ const SwEditShell &operator=(const SwEditShell &);
+};
+
+inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt )
+{
+ SwCrsrShell::StartAction();
+ ViewShell::ApplyViewOptions( rOpt );
+ SwEditShell::EndAction();
+}
+
+inline const SvxLinkManager& SwEditShell::GetLinkManager() const
+{ return ((SwEditShell*)this)->GetLinkManager(); }
+
+/*
+ * Klasse fuer den automatisierten Aufruf von Start- und
+ * EndAction();
+ */
+class SwActKontext {
+ SwEditShell *pSh;
+public:
+ SwActKontext(SwEditShell *pShell);
+ ~SwActKontext();
+};
+
+#define ACT_KONTEXT(x) SwActKontext _aActKontext_(x)
+
+/*
+ * Klasse fuer den automatisierten Aufruf von Start- und
+ * EndCrsrMove();
+ */
+class SwMvKontext {
+ SwEditShell *pSh;
+public:
+ SwMvKontext(SwEditShell *pShell );
+ ~SwMvKontext();
+};
+
+#define MV_KONTEXT(x) SwMvKontext _aMvKontext_(x)
+
+
+
+#endif
diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc
new file mode 100644
index 000000000000..81a5a00a5180
--- /dev/null
+++ b/sw/inc/envelp.hrc
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: envelp.hrc,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ENVELP_HRC
+#define _ENVELP_HRC
+
+// #include -------------------------------------------------------------------
+
+#include "rcid.hrc"
+
+// Dialoge --------------------------------------------------------------------
+
+#define DLG_ENV (RC_ENVELP_BEGIN )
+#define DLG_LAB (RC_ENVELP_BEGIN + 1)
+
+#define TP_ENV_ENV (RC_ENVELP_BEGIN + 2)
+#define TP_ENV_FMT (RC_ENVELP_BEGIN + 3)
+#define TP_ENV_PRT (RC_ENVELP_BEGIN + 4)
+
+#define TP_LAB_LAB (RC_ENVELP_BEGIN + 5)
+#define TP_LAB_FMT (RC_ENVELP_BEGIN + 6)
+#define TP_LAB_PRT (RC_ENVELP_BEGIN + 7)
+
+#define DLG_MAILMERGE (RC_ENVELP_BEGIN + 8)
+
+#define DLG_SYNC_BTN (RC_ENVELP_BEGIN + 9)
+#define DLG_SAVE_LABEL (RC_ENVELP_BEGIN + 10)
+
+// Bereiche -------------------------------------------------------------------
+
+#define RC_ENVLOP_BEGIN (RC_ENVELP_BEGIN )
+#define RC_ENVLOP_END (RC_ENVELP_BEGIN + 9)
+
+#define RC_ENVFMT_BEGIN (RC_ENVELP_BEGIN + 10)
+#define RC_ENVFMT_END (RC_ENVELP_BEGIN + 19)
+
+#define RC_ENVPRT_BEGIN (RC_ENVELP_BEGIN + 20)
+#define RC_ENVPRT_END (RC_ENVELP_BEGIN + 39)
+
+#define RC_LABEL_BEGIN (RC_ENVELP_BEGIN + 40)
+#define RC_LABEL_END (RC_ENVELP_BEGIN + 49)
+
+#define RC_LABFMT_BEGIN (RC_ENVELP_BEGIN + 50)
+#define RC_LABFMT_END (RC_ENVELP_BEGIN + 59)
+
+#define RC_LABPRT_BEGIN (RC_ENVELP_BEGIN + 60)
+#define RC_LABPRT_END (RC_ENVELP_BEGIN + 69)
+
+// Strings --------------------------------------------------------------------
+
+#define STR_DATABASE_NOT_OPENED (RC_ENVLOP_BEGIN + 60)
+#define STR_NO_DRIVERS (RC_ENVLOP_BEGIN + 61)
+#define DLG_MERGE_CREATE (RC_ENVLOP_BEGIN + 62)
+#define DLG_MERGE_FIELD_CONNECTIONS (RC_ENVLOP_BEGIN + 63)
+
+#define STR_BTN_NEW_DOC (RC_ENVLOP_BEGIN + 64)
+#define STR_BTN_NEWDOC (RC_ENVLOP_BEGIN + 65)
+#define STR_SENDER_TOKENS (RC_ENVLOP_BEGIN + 66)
+
+#define RC_ENVPRT_HC_BEGIN (RC_ENVLOP_BEGIN + 70)
+#define RC_ENVPRT_HC_END (RC_ENVLOP_BEGIN + 82)
+
+// Ueberlaufpruefung ----------------------------------------------------------
+
+#define ENVELP_ACT_END STR_SENDER_TOKENS
+
+#if ENVELP_ACT_END > RC_ENVPRT_HC_END
+#error Resource-Ueberlauf in #file, #line
+#endif
+
+#endif
+
+
diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx
new file mode 100644
index 000000000000..f9fae69e7358
--- /dev/null
+++ b/sw/inc/errhdl.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: errhdl.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ERRHDL_HXX
+#define _ERRHDL_HXX
+
+#ifndef PRODUCT
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include "swdllapi.h"
+
+extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam
+
+
+// -----------------------------------------------------------------------
+// Ausgabe einer Fehlermeldung inkl. Dateiname und Zeilennummer
+// wo der Fehler auftrat.
+// Die Funktion darf nicht direkt benutzt werden!
+// -----------------------------------------------------------------------
+SW_DLLPUBLIC void AssertFail( const sal_Char*, const sal_Char*, USHORT );
+SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT );
+
+#define ASSERT( cond, message ) \
+ if( !(cond) ) { \
+ const char *_pErrorText = #message; \
+ const char *_pFileName = __FILE__; \
+ ::AssertFail( _pErrorText, _pFileName, __LINE__ ); \
+ }
+
+// -----------------------------------------------------------------------
+// Prueft ob die angegebene Bedingung wahr ist, wenn nicht wird eine
+// Fehlermeldung die ueber die ID Identifiziert wird, ausgegeben.
+// -----------------------------------------------------------------------
+#define ASSERT_ID( cond, id ) \
+ if( !(cond) ) { \
+ const char *_pFileName = __FILE__; \
+ ::AssertFail( (USHORT)id, _pFileName, __LINE__ ); \
+ }
+
+
+// -----------------------------------------------------------------------
+// Beim Bilden der Produktversion werden alle Debug-Utilities automatisch
+// ignoriert
+// -----------------------------------------------------------------------
+#else
+#define ASSERT( cond, message ) ;
+#define ASSERT_ID( cond, id ) ;
+#endif // PRODUCT
+
+
+
+#endif
diff --git a/sw/inc/error.h b/sw/inc/error.h
new file mode 100644
index 000000000000..ddf599f4c7b9
--- /dev/null
+++ b/sw/inc/error.h
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: error.h,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWERROR_H
+#define _SWERROR_H
+
+#define ERR_SWGBASE 25000
+
+/*** Error Codes **********************************************************/
+#define ERR_VAR_IDX (ERR_SWGBASE+ 0)
+#define ERR_OUTOFSCOPE (ERR_SWGBASE+ 1)
+
+/* Error Codes fuer Numerierungsregeln */
+#define ERR_NUMLEVEL (ERR_SWGBASE+ 2)
+
+/* Error Codes fuer TxtNode */
+#define ERR_NOHINTS (ERR_SWGBASE+ 3)
+
+// von _START bis _END sind in der COREDL.DLL entsprechende Strings
+// abgelegt, die erfragt werden koennen.
+#define ERR_SWGMSG_START (ERR_VAR_IDX)
+#define ERR_SWGMSG_END (ERR_NOHINTS)
+
+
+
+#endif
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
new file mode 100644
index 000000000000..83629f8cf6d5
--- /dev/null
+++ b/sw/inc/expfld.hxx
@@ -0,0 +1,439 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: expfld.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _EXPFLD_HXX
+#define _EXPFLD_HXX
+
+#include <svtools/svarray.hxx>
+#include "swdllapi.h"
+#include <fldbas.hxx>
+#include <cellfml.hxx>
+
+class SfxPoolItem;
+class SwTxtNode;
+class SwFrm;
+struct SwPosition;
+class SwTxtFld;
+class SwDoc;
+class SwFmtFld;
+class _SetGetExpFlds;
+class SwEditShell;
+
+// Vorwaertsdeklaration: besorge den "Body-TextNode", fuer Exp.Fld in Fly's
+// Header/Footers/Footnodes
+const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos,
+ const SwFrm& rFrm );
+// Wandlung Address -> Adressen
+void ReplacePoint(String& sTmpName, BOOL bWithCommandType = FALSE);
+
+struct _SeqFldLstElem
+{
+ String sDlgEntry;
+ USHORT nSeqNo;
+
+ _SeqFldLstElem( const String& rStr, USHORT nNo )
+ : sDlgEntry( rStr ), nSeqNo( nNo )
+ {}
+};
+SV_DECL_PTRARR_DEL( _SwSeqFldList, _SeqFldLstElem*, 10, 10 )
+
+class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList
+{
+public:
+ SwSeqFldList() : _SwSeqFldList( 10, 10 ) {}
+
+ BOOL InsertSort( _SeqFldLstElem* );
+ BOOL SeekEntry( const _SeqFldLstElem& , USHORT* pPos = 0 );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck
+ --------------------------------------------------------------------*/
+
+class SwGetExpFieldType : public SwValueFieldType
+{
+public:
+ SwGetExpFieldType(SwDoc* pDoc);
+ virtual SwFieldType* Copy() const;
+
+ // ueberlagert, weil das Get-Field nicht veraendert werden kann
+ // und dann auch nicht aktualisiert werden muss. Aktualisierung
+ // erfolgt beim Aendern von Set-Werten !
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: GetExperession
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
+{
+ String sExpand;
+ BOOL bIsInBodyTxt;
+ USHORT nSubType;
+
+ bool bLateInitialization; // #i82544#
+
+public:
+ SwGetExpField( SwGetExpFieldType*, const String& rFormel,
+ USHORT nSubType = nsSwGetSetExpType::GSE_EXPR, ULONG nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+ virtual void SetLanguage(USHORT nLng);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline const String& GetExpStr() const;
+ inline void ChgExpStr(const String& rExpand);
+
+ // wird von der Formatierung abgefragt
+ inline BOOL IsInBodyTxt() const;
+ // wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+ inline void ChgBodyTxtFlag( BOOL bIsInBody );
+ // fuer Felder in Header/Footer/Footnotes/Flys:
+ // (wird nur von der Formatierung aufgerufen!!)
+ void ChangeExpansion( const SwFrm&, const SwTxtFld& );
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ // Die Formel aendern
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ static USHORT GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
+ // #i82544#
+ void SetLateInitialization() { bLateInitialization = true;}
+};
+
+inline void SwGetExpField::ChgExpStr(const String& rExpand)
+ { sExpand = rExpand;}
+
+inline const String& SwGetExpField::GetExpStr() const
+ { return sExpand; }
+
+// wird von der Formatierung abgefragt
+inline BOOL SwGetExpField::IsInBodyTxt() const
+ { return bIsInBodyTxt; }
+
+// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+inline void SwGetExpField::ChgBodyTxtFlag( BOOL bIsInBody )
+ { bIsInBodyTxt = bIsInBody; }
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck setzen
+ --------------------------------------------------------------------*/
+
+class SwSetExpField;
+
+class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
+{
+ String sName;
+ const SwNode* pOutlChgNd;
+// sal_Unicode cDelim;
+ String sDelim;
+ USHORT nType;
+ BYTE nLevel;
+ BOOL bDeleted;
+
+public:
+ SwSetExpFieldType( SwDoc* pDoc, const String& rName,
+ USHORT nType = nsSwGetSetExpType::GSE_EXPR );
+ virtual SwFieldType* Copy() const;
+ virtual const String& GetName() const;
+
+ inline void SetType(USHORT nTyp);
+ inline USHORT GetType() const;
+
+ void SetSeqFormat(ULONG nFormat);
+ ULONG GetSeqFormat();
+
+ BOOL IsDeleted() const { return bDeleted; }
+ void SetDeleted( BOOL b ) { bDeleted = b; }
+
+ // ueberlagert, weil das Set-Field selbst dafuer sorgt, das
+ // es aktualisiert wird.
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+ inline const String& GetSetRefName() const;
+
+ USHORT SetSeqRefNo( SwSetExpField& rFld );
+
+ USHORT GetSeqFldList( SwSeqFldList& rList );
+ String MakeSeqName( USHORT nSeqNo );
+
+ // Seqencefelder ggfs. Kapitelweise numerieren
+// sal_Unicode GetDelimiter() const { return cDelim; }
+// void SetDelimiter( sal_Unicode c ) { cDelim = c; }
+ const String& GetDelimiter() const { return sDelim; }
+ void SetDelimiter( const String& s ) { sDelim = s; }
+ BYTE GetOutlineLvl() const { return nLevel; }
+ void SetOutlineLvl( BYTE n ) { nLevel = n; }
+ void SetChapter( SwSetExpField& rFld, const SwNode& rNd );
+ // Member nur fuers SwDoc::UpdateExpFld - wird nur waehrend der Laufzeit
+ // von SequencefeldTypen benoetigt!!!
+ const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
+ void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline void SwSetExpFieldType::SetType( USHORT nTyp )
+{
+ nType = nTyp;
+ EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
+}
+
+inline USHORT SwSetExpFieldType::GetType() const
+ { return nType; }
+
+inline const String& SwSetExpFieldType::GetSetRefName() const
+ { return sName; }
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
+{
+ String sExpand;
+ String aPText;
+ String aSeqText;
+ BOOL bInput;
+ USHORT nSeqNo;
+ USHORT nSubType;
+
+public:
+ SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline const String& GetExpStr() const;
+
+ inline void ChgExpStr( const String& rExpand );
+
+ inline void SetPromptText(const String& rStr);
+ inline const String& GetPromptText() const;
+
+ inline void SetInputFlag(BOOL bInp);
+ inline BOOL GetInputFlag() const;
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+
+ inline BOOL IsSequenceFld() const;
+
+ // fuer SequenceFelder - logische Nummer
+ inline void SetSeqNumber( USHORT n ) { nSeqNo = n; }
+ inline USHORT GetSeqNumber() const { return nSeqNo; }
+
+ // Der Name nur erfragen
+ virtual const String& GetPar1() const;
+
+ // Die Formel
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline const String& SwSetExpField::GetExpStr() const
+ { return sExpand; }
+
+inline void SwSetExpField::ChgExpStr( const String& rExpand )
+ { sExpand = rExpand; }
+
+inline void SwSetExpField::SetPromptText(const String& rStr)
+ { aPText = rStr; }
+
+inline const String& SwSetExpField::GetPromptText() const
+ { return aPText; }
+
+inline void SwSetExpField::SetInputFlag(BOOL bInp)
+ { bInput = bInp; }
+
+inline BOOL SwSetExpField::GetInputFlag() const
+ { return bInput; }
+
+inline BOOL SwSetExpField::IsSequenceFld() const
+ { return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eingabe im Text/Variable setzen
+ --------------------------------------------------------------------*/
+
+class SwInputFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+public:
+ SwInputFieldType( SwDoc* pDoc );
+
+ virtual SwFieldType* Copy() const;
+
+ SwDoc* GetDoc() const { return pDoc; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eingabefeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwInputField : public SwField
+{
+ String aContent;
+ String aPText;
+ String aHelp;
+ String aToolTip;
+ USHORT nSubType;
+public:
+ // Direkte Eingabe ueber Dialog alten Wert loeschen
+ SwInputField(SwInputFieldType*, const String& rContent ,
+ const String& rPrompt, USHORT nSubType = 0,
+ ULONG nFmt = 0);
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Content
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // aPromptText
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual String GetHelp() const;
+ virtual void SetHelp(const String & rStr);
+
+ virtual String GetToolTip() const;
+ virtual void SetToolTip(const String & rStr);
+
+ virtual BOOL isFormField() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Description: Sorted list of input fields and DropDown fields
+ --------------------------------------------------------------------*/
+
+class SwInputFieldList
+{
+public:
+ SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst = FALSE );
+ ~SwInputFieldList();
+
+ USHORT Count() const;
+ SwField* GetField(USHORT nId);
+
+ void GotoFieldPos(USHORT nId);
+ void PushCrsr();
+ void PopCrsr();
+
+ // vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
+ // damit sie geupdatet werden koennen. Returnt die Anzahl.
+ // (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
+ USHORT BuildSortLst();
+
+ // Alle unselektierten Felder aus Liste entfernen
+ void RemoveUnselectedFlds();
+
+private:
+ SwEditShell* pSh;
+ _SetGetExpFlds* pSrtLst;
+ SvPtrarr aTmpLst;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Tabellen-Formelfeld
+ (Implementierung steht in tblcalc.cxx)
+ --------------------------------------------------------------------*/
+
+class SwTblFieldType : public SwValueFieldType
+{
+public:
+ SwTblFieldType(SwDoc* pDocPtr);
+ virtual SwFieldType* Copy() const;
+};
+
+
+// MSC will den hier nicht
+//typedef void (SwField:: *FnScanFormel)( const SwTable&, String&,
+// String&, String* = 0, void* = 0 );
+
+
+class SwTblField : public SwValueField, public SwTableFormula
+{
+ String sExpand;
+ USHORT nSubType;
+
+ // suche den TextNode, in dem das Feld steht
+ virtual const SwNode* GetNodeOfFormula() const;
+
+public:
+ SwTblField( SwTblFieldType*, const String& rFormel,
+ USHORT nSubType = 0, ULONG nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ const String& GetExpStr() const { return sExpand; }
+ void ChgExpStr(const String& rStr) { sExpand = rStr; }
+
+ // berechne sich selbst
+ void CalcField( SwTblCalcPara& rCalcPara );
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ // Die Formel
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+#endif // _EXPFLD_HXX
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
new file mode 100644
index 000000000000..c11c6b9ecaf0
--- /dev/null
+++ b/sw/inc/extinput.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: extinput.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _EXTINPUT_HXX
+#define _EXTINPUT_HXX
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+#endif
+#include <pam.hxx>
+#include <i18npool/lang.h>
+
+class CommandExtTextInputData;
+
+class SwExtTextInput : public SwPaM
+{
+ SvUShorts aAttrs;
+ String sOverwriteText;
+ BOOL bInsText : 1;
+ BOOL bIsOverwriteCursor : 1;
+ LanguageType eInputLanguage;
+public:
+ SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 );
+ virtual ~SwExtTextInput();
+
+ void SetInputData( const CommandExtTextInputData& rData );
+ const SvUShorts& GetAttrs() const { return aAttrs; }
+ void SetInsText( BOOL bFlag ) { bInsText = bFlag; }
+ BOOL IsOverwriteCursor() const { return bIsOverwriteCursor; }
+ void SetOverwriteCursor( BOOL bFlag );
+ void SetLanguage(LanguageType eSet) { eInputLanguage = eSet;}
+};
+
+#endif //_EXTINPUT_HXX
+
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
new file mode 100644
index 000000000000..c34d6f484037
--- /dev/null
+++ b/sw/inc/fchrfmt.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fchrfmt.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FCHRFMT_HXX
+#define _FCHRFMT_HXX
+
+
+#include <svtools/poolitem.hxx>
+#include <calbck.hxx>
+#include <format.hxx>
+
+class SwCharFmt;
+class SwTxtCharFmt;
+class IntlWrapper;
+
+// ATT_CHARFMT *********************************************
+
+
+class SW_DLLPUBLIC SwFmtCharFmt: public SfxPoolItem, public SwClient
+{
+ friend class SwTxtCharFmt;
+ SwTxtCharFmt* pTxtAttr; // mein TextAttribut
+
+public:
+ SwFmtCharFmt() : pTxtAttr(0) {}
+
+ // single argument ctors shall be explicit.
+ explicit SwFmtCharFmt( SwCharFmt *pFmt );
+ virtual ~SwFmtCharFmt();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtCharFmt( const SwFmtCharFmt& rAttr );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtCharFmt & operator= (const SwFmtCharFmt &);
+public:
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ // an das SwTxtCharFmt weiterleiten (vom SwClient)
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+};
+#endif
+
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
new file mode 100644
index 000000000000..e75d4baec8d0
--- /dev/null
+++ b/sw/inc/fesh.hxx
@@ -0,0 +1,783 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fesh.hxx,v $
+ * $Revision: 1.63.212.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FESH_HXX
+#define _FESH_HXX
+
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/embed/XClassifiedObject.hpp>
+
+#include <svx/svdobj.hxx>
+#include "swdllapi.h"
+#include <editsh.hxx>
+#include <flyenum.hxx>
+
+// OD 25.06.2003 #108784#
+#include <svx/svdtypes.hxx>
+
+#include <svtools/embedhlp.hxx>
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+
+
+class SwFlyFrm;
+class SwTabCols;
+class SvxBrushItem;
+class SvxFrameDirectionItem;
+class SwTableAutoFmt;
+class SwFrm;
+class SwFmtFrmSize;
+class SwFmtRowSplit;
+class SvxBorderLine;
+class SdrObject;
+class Color;
+class Outliner;
+class SotDataObject;
+class SwFrmFmt;
+struct SwSortOptions;
+class SdrMarkList;
+
+
+// return values for GetFrmType() und GetSelFrmType().
+//! values can be combined via logival or
+#define FRMTYPE_NONE (USHORT) 0
+#define FRMTYPE_PAGE (USHORT) 1
+#define FRMTYPE_HEADER (USHORT) 2
+#define FRMTYPE_FOOTER (USHORT) 4
+#define FRMTYPE_BODY (USHORT) 8
+#define FRMTYPE_COLUMN (USHORT) 16
+#define FRMTYPE_TABLE (USHORT) 32
+#define FRMTYPE_FLY_FREE (USHORT) 64
+#define FRMTYPE_FLY_ATCNT (USHORT) 128
+#define FRMTYPE_FLY_INCNT (USHORT) 256
+#define FRMTYPE_FOOTNOTE (USHORT) 512
+#define FRMTYPE_FTNPAGE (USHORT) 1024
+#define FRMTYPE_FLY_ANY (USHORT) 2048
+#define FRMTYPE_DRAWOBJ (USHORT) 4096
+#define FRMTYPE_COLSECT (USHORT) 8192
+#define FRMTYPE_COLSECTOUTTAB (USHORT) 16384
+
+#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB )
+
+//! values can be combined via logival or
+#define GOTOOBJ_DRAW_CONTROL (USHORT) 1
+#define GOTOOBJ_DRAW_SIMPLE (USHORT) 2
+#define GOTOOBJ_DRAW_ANY (USHORT) 3
+#define GOTOOBJ_FLY_FRM (USHORT) 4
+#define GOTOOBJ_FLY_GRF (USHORT) 8
+#define GOTOOBJ_FLY_OLE (USHORT) 16
+#define GOTOOBJ_FLY_ANY (USHORT) 28
+#define GOTOOBJ_GOTO_ANY (USHORT) 31
+
+//! values can be combined via logival or
+#define FLYPROTECT_CONTENT (USHORT) 1 // kann verodert werden!
+#define FLYPROTECT_SIZE (USHORT) 2
+#define FLYPROTECT_POS (USHORT) 4
+#define FLYPROTECT_PARENT (USHORT) 8 // nur Parents untersuchen
+#define FLYPROTECT_FIXED (USHORT) 16 // nur nicht aufhebbarer Schutz
+ // z.B. durch OLE-Server, gilt auch
+ // fuer Dialog
+
+
+enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D)
+{
+ OBJCNT_NONE,
+ OBJCNT_FLY,
+ OBJCNT_GRF,
+ OBJCNT_OLE,
+ OBJCNT_SIMPLE,
+ OBJCNT_CONTROL,
+ OBJCNT_URLBUTTON,
+
+ OBJCNT_GROUPOBJ,
+ OBJCNT_DONTCARE // nicht bestimmbar - unterschiedliche Objecte selektiert
+};
+
+//fuer GetAnyCurRect
+enum CurRectType
+{
+ RECT_PAGE, //Rect der aktuellen Seite.
+ RECT_PAGE_CALC, //... Seite wird ggf. Formatiert
+ RECT_PAGE_PRT, //Rect der aktuellen PrtArea der Seite
+ RECT_FRM, //Rect des aktuellen Rahmen
+ RECT_FLY_EMBEDDED, //Rect des aktuellen FlyFrm
+ RECT_FLY_PRT_EMBEDDED, //Rect der PrtArea des FlyFrm
+ RECT_SECTION, //Rect des aktuellen Bereichs
+ RECT_OUTTABSECTION, //Rect des aktuellen Bereichs,
+ // aber ausserhalb der Tabelle
+ RECT_SECTION_PRT, //Rect der aktuellen PrtArea des Bereichs
+ RECT_OUTTABSECTION_PRT, //Rect der aktuellen PrtArea des Bereichs,
+ // aber ausserhalb der Tabelle
+ RECT_HEADERFOOTER, //Rect des aktuellen Headers/Footer
+ RECT_HEADERFOOTER_PRT, //Rect der PrtArea des aktuellen Headers/Footers
+
+ RECT_PAGES_AREA //Rect covering the pages area
+};
+
+struct SwGetCurColNumPara
+{
+ const SwFrmFmt* pFrmFmt;
+ const SwRect* pPrtRect, *pFrmRect;
+ SwGetCurColNumPara() : pFrmFmt( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {}
+};
+
+#define SW_PASTESDR_INSERT 1
+#define SW_PASTESDR_REPLACE 2
+#define SW_PASTESDR_SETATTR 3
+
+#define SW_ADD_SELECT 1
+#define SW_ENTER_GROUP 2
+#define SW_LEAVE_FRAME 4
+
+#define SW_MOVE_UP 0
+#define SW_MOVE_DOWN 1
+#define SW_MOVE_LEFT 2
+#define SW_MOVE_RIGHT 3
+
+#define SW_TABCOL_NONE 0
+#define SW_TABCOL_HORI 1
+#define SW_TABCOL_VERT 2
+#define SW_TABROW_HORI 3
+#define SW_TABROW_VERT 4
+// --> FME 2004-07-30 #i32329# Enhanced table selection
+#define SW_TABSEL_HORI 5
+#define SW_TABSEL_HORI_RTL 6
+#define SW_TABROWSEL_HORI 7
+#define SW_TABROWSEL_HORI_RTL 8
+#define SW_TABCOLSEL_HORI 9
+#define SW_TABSEL_VERT 10
+#define SW_TABROWSEL_VERT 11
+#define SW_TABCOLSEL_VERT 12
+// <--
+
+class SdrDropMarkerOverlay;
+
+class SW_DLLPUBLIC SwFEShell : public SwEditShell
+{
+ SdrDropMarkerOverlay *pChainFrom, *pChainTo;
+ BOOL bCheckForOLEInCaption;
+
+ SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const;
+ SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
+
+ //Actions fuer alle Shells beenden und ChangeLink rufen.
+ SW_DLLPRIVATE void EndAllActionAndCall();
+
+ SW_DLLPRIVATE void ScrollTo( const Point &rPt );
+
+ // OD 25.06.2003 #108784# - correct type of 1st parameter
+ SW_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId );
+
+ // Used for mouse operations on a table:
+ // Returns a cell frame that is 'close' to rPt.
+ SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const;
+
+ //0 == in keiner Spalte
+ SW_DLLPRIVATE USHORT _GetCurColNum( const SwFrm *pFrm,
+ SwGetCurColNumPara* pPara ) const;
+
+ SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const;
+ SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const;
+
+ SW_DLLPRIVATE BOOL ImpEndCreate();
+
+ SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const;
+
+ // Methoden fuers kopieren von DrawObjecten
+ SW_DLLPRIVATE BOOL CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, BOOL bIsMove,
+ BOOL bSelectInsert );
+
+ // get list of marked SdrObjects;
+ // helper method for GetSelFrmType, IsSelContainsControl
+ SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const;
+
+ SW_DLLPRIVATE BOOL CheckHeadline( bool bRepeat ) const;
+
+ using SwEditShell::Copy;
+
+public:
+
+ using SwEditShell::Insert;
+
+ TYPEINFO();
+ SwFEShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
+ SwFEShell( SwEditShell& rShell, Window *pWin );
+ virtual ~SwFEShell();
+
+ // Copy und Paste Methoden fuer das interne Clipboard
+ BOOL Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
+ BOOL Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames = sal_False);
+ //paste some pages into another doc - used in mailmerge
+ BOOL PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage);
+ // Copy-Methode fuer Drag&Drop
+ BOOL Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
+ BOOL bIsMove = FALSE, BOOL bSelectInsert = TRUE );
+
+ void SelectFlyFrm( SwFlyFrm& rFrm, BOOL bNew = FALSE );
+
+ // befindet sich der selektierte Rahmen innerhalb eines anderen?
+ const SwFrmFmt* IsFlyInFly();
+
+//SS fuer DrawObjekte und Rahmen-----------------------------
+
+ //Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt
+ //ueber die Position zu suchen.
+ BOOL SelectObj( const Point& rSelPt, BYTE nFlag = 0, SdrObject *pObj = 0 );
+ void DelSelectedObj();
+
+ //Selektion nach oben unten bewegen (Z-Order).
+ //TRUE == ganz nach oben/unten
+ //FALSE == einen ueberholen
+ void SelectionToTop ( BOOL bTop = TRUE );
+ void SelectionToBottom( BOOL bBottom = TRUE );
+
+ short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig
+ void SelectionToHeaven(); //Ueber dem Dokument
+ void SelectionToHell(); //Unter dem Dokument
+
+ // folgende zwei Methoden returnen den enum SdrHdlKind, um sich ein
+ // includen von SVDRAW.HXX zu ersparen als int deklariert.
+ bool IsObjSelectable( const Point& rPt );
+ int IsInsideSelectedObj( const Point& rPt ); //!! returns enum values
+
+ // #107513#
+ // Test if there is a draw object at that position and if it should be selected.
+ // The 'should' is aimed at Writer text fly frames which may be in front of
+ // the draw object.
+ sal_Bool ShouldObjectBeSelected(const Point& rPt);
+
+ sal_Bool MoveAnchor( USHORT nDir );
+
+ // Returns if Upper of frame at current position is section frame
+ // Currently only used by the rules. To be replaced by something more
+ // sophisticated one day.
+ bool IsDirectlyInSection() const;
+
+ //Returnwerte siehe oben FrmType.
+ //pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen
+ // Obgleich (0,TRUE) eine Art Standard ist, sind die Parameter nicht defaultet, damit
+ // bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird.
+ USHORT GetFrmType( const Point *pPt, BOOL bStopAtFly ) const;
+ USHORT GetSelFrmType() const; //Selektion (Drawing)
+
+ /** #108784# check whether selected frame contains a control;
+ * companion method to GetSelFrmType, used for preventing
+ * drag&drop of controls into header */
+ bool IsSelContainsControl() const;
+
+ ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
+ ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const;
+
+ //Zum Anpassen der PosAttr bei Ankerwechseln.
+ SwRect GetObjRect() const;
+ //Zum Verschieben von Flys mit der Tastatur
+ SwRect GetFlyRect() const;
+ // OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments to allow
+ // negative vertical positions for fly frames anchored
+ // to paragraph or to character.
+ // OD 02.10.2003 #i18732# - adjustments for new option 'FollowTextFlow'
+ // OD 12.11.2003 #i22341# - adjustments for new vertical alignment at top of line
+ void CalcBoundRect( SwRect& _orRect,
+ const RndStdIds _nAnchorId,
+ const sal_Int16 _eHoriRelOrient = com::sun::star::text::RelOrientation::FRAME,
+ const sal_Int16 _eVertRelOrient = com::sun::star::text::RelOrientation::FRAME,
+ const SwPosition* _pToCharCntntPos = NULL,
+ const bool _bFollowTextFlow = false,
+ bool _bMirror = false,
+ Point* _opRef = NULL,
+ Size* _opPercent = NULL ) const;
+
+ // Groesse von Drawobjekten setzen
+ void SetObjRect( const SwRect& rRect );
+
+ long BeginDrag( const Point *pPt, BOOL bProp );
+ long Drag ( const Point *pPt, BOOL bProp );
+ long EndDrag ( const Point *pPt, BOOL bProp );
+ void BreakDrag();
+
+ //Methoden fuer die Statuszeile.
+ Point GetAnchorObjDiff() const; //Abstand zum Anker
+ Point GetObjAbsPos() const; //Absolute Position
+ Size GetObjSize() const; //Groesse, ggf. die umschliessende
+
+ //SS fuer die BriefUmschlaege: hole alle Seitengebundenen Objekte
+ //und setze diese auf eine neue Seite.
+ void GetPageObjs( SvPtrarr& rFillArr );
+ void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 );
+
+ // zeige die aktuelle Selektion an ( ggfs. den Rahmen/DrawObject)
+ virtual void MakeSelVisible();
+
+ // returne das FrmFmt von dem evt. unter dem Point stehenden Object.
+ // Das Object wird nicht selektiert!
+ const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const;
+ // returns a format too, if the point is over the text of any fly
+ const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const;
+
+ //Welcher Schutz ist am selektierten Objekt gesetzt?
+ //!! returns several flags in BYTE
+ BYTE IsSelObjProtected( USHORT /*FLYPROTECT_...*/ eType ) const;
+
+ //Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit
+ //Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken.
+ const Graphic *GetGrfAtPos( const Point &rDocPos,
+ String &rName, BOOL &rbLink ) const;
+
+ // --> OD 2009-07-13 #i73249#
+ const String GetObjTitle() const;
+ void SetObjTitle( const String& rTitle );
+ const String GetObjDescription() const;
+ void SetObjDescription( const String& rDescription );
+ // <--
+
+//SS fuer Rahmen --------------------------------------------
+
+ BOOL IsFrmSelected() const;
+ BOOL GetFlyFrmAttr( SfxItemSet &rSet ) const;
+ BOOL SetFlyFrmAttr( SfxItemSet &rSet );
+ BOOL ResetFlyFrmAttr( USHORT nWhich, const SfxItemSet* pSet = 0 );
+ const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, BOOL bAnchValid = FALSE,
+ SwFrmFmt *pParent = 0 );
+ void SetFlyPos( const Point &rAbsPos);
+ Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE );
+ // determines whether a frame or its environment is vertically formatted and right-to-left
+ BOOL IsFrmVertical(BOOL bEnvironment, BOOL& bRightToLeft) const;
+
+ SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0
+ void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen
+ const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); }
+
+ // finde/loeschen den Fly, in dem der Cursor steht
+ SwFrmFmt* WizzardGetFly();
+
+ //Selebstaendiges selektieren von Flys
+ BOOL GotoNextFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
+ { return GotoObj( TRUE, eType ); }
+ BOOL GotoPrevFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
+ { return GotoObj( FALSE, eType); }
+
+ //iterieren ueber Flys - fuer Basic-Collections
+ USHORT GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
+ const SwFrmFmt* GetFlyNum(USHORT nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
+
+ //Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm
+ const SwFrmFmt* SelFlyGrabCrsr();
+
+ //Get FlyFrameFormat; fuer UI Macro Anbindung an Flys
+ const SwFrmFmt* GetFlyFrmFmt() const;
+ SwFrmFmt* GetFlyFrmFmt();
+
+ //OLE, Server fordert neue Groesse an, die gewuenschten Werte werden
+ //als Rahmenattribute eingestellt. Wenn die Werte nicht erlaubt sind,
+ //so wird von der Formatierung geclippt und eine Scalierung eingestellt.
+ //siehe CalcAndSetScale().
+ // The return value is the applied size.
+ Size RequestObjectResize( const SwRect &rRect, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
+
+ //The layout has been changed, so the active object has to be moved after that
+ virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
+
+ //Der Client fuer das OleObject muss bezueglich der Scalierung auf dem
+ //neuesten Stand gehalten werden. Impl in der WrtShell.
+ //Wird ein Pointer auf eine Size uebergeben, so ist diese die aktuelle
+ //Core-Groesse des Objectes. Anderfalls wird die Groesse per GetCurFlyRect()
+ //besorgt.
+ virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
+ const SwRect *pFlyPrtRect = 0,
+ const SwRect *pFlyFrmRect = 0 ) = 0;
+
+ //Objekte mit ActivateWhenVisible werden beim Paint Connected.
+ //gerufen von notxtfrm::Paint, impl in wrtsh
+ virtual void ConnectObj( svt::EmbeddedObjectRef&,
+ const SwRect &rPrt,
+ const SwRect &rFrm ) = 0;
+
+ //Sichbaren Bereich auf das Object setzen, wenn es noch nicht sichtbar ist.
+ void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
+
+ // check resize of OLE-Object
+ BOOL IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
+ void SetCheckForOLEInCaption( BOOL bFlag ) { bCheckForOLEInCaption = bFlag; }
+
+ // setze am selektierten FlyFrame einen Namen
+ void SetFlyName( const String& rName );
+ const String& GetFlyName() const;
+
+ // erezeuge eindeutige Namen fuer Rahmen
+ String GetUniqueGrfName() const;
+ String GetUniqueOLEName() const;
+ String GetUniqueFrameName() const;
+
+ // springe zum benannten Rahmen (Grafik/OLE)
+ BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ BOOL bSelFrame = TRUE );
+ // steht an der Position eine Grafik mit einer URL ?
+ const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0,
+ String *pTargetFrameName = 0,
+ String *pURLDescription = 0 ) const;
+
+ //Fuer das Chain wird immer der durch das Format spezifizierte Fly
+ //mit dem durch den Point getroffenen verbunden.
+ //In rRect wird das Rect des Flys geliefert (fuer Highlight desselben)
+ int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const;
+ int Chain( SwFrmFmt &rSource, const Point &rPt );
+ int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
+ void Unchain( SwFrmFmt &rFmt );
+ void HideChainMarker();
+ void SetChainMarker();
+
+ Size GetGraphicDefaultSize() const;
+
+//SS fuer DrawObjekte ---------------------
+
+ //Temporaer um Bug zu umgehen.
+ void CheckUnboundObjects();
+
+ //Achtung: Uneindeutikeiten bei Mehrfachselektionen.
+ BOOL GetObjAttr( SfxItemSet &rSet ) const;
+ BOOL SetObjAttr( const SfxItemSet &rSet );
+
+ BOOL GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
+
+ //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
+ void SetDragMode( UINT16 eSdrDragMode );
+
+ USHORT IsObjSelected() const; //Liefert gleich die Anzahl der Objekte,
+ //zaehlt aber nicht die Objekte in Gruppen.
+ sal_Bool IsObjSelected( const SdrObject& rObj ) const;
+
+ void EndTextEdit(); //Loescht ggf. das Objekt.
+
+ //Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder
+ //Rahmenselektion; FLY_PAGE bzw. FLY_AT_CNTNT aus frmatr.hxx sonst.
+ short GetAnchorId() const;
+
+ //Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben.
+ //Beim End kann ein Cmd mitgegeben werden, hier ist ggf.
+ //SDRCREATE_RESTRAINTEND fuer Ende oder SDRCREATE_NEXTPOINT fuer ein
+ //Polygon relevant. Nach dem RESTRAINTEND ist das Objekt erzeugt und
+ //selektiert.
+ //Mit BreakCreate wird der Vorgang abgebrochen, dann ist kein Objekt
+ //mehr selektiert.
+ BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
+ BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor, const Point &);
+ void MoveCreate ( const Point &rPos );
+ BOOL EndCreate ( UINT16 eSdrCreateCmd );
+ void BreakCreate();
+ BOOL IsDrawCreate() const;
+ void CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, USHORT nSlotId);
+
+ // Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren
+ BOOL BeginMark( const Point &rPos );
+ void MoveMark ( const Point &rPos );
+ BOOL EndMark ();
+ void BreakMark();
+
+ //Gruppe erzeugen, aufloesen, nix bei Rahmenselektion.
+ BOOL IsGroupSelected(); //Kann auch eine Mischselektion sein!
+ void GroupSelection(); //Hinterher ist die Gruppe selektiert.
+ void UnGroupSelection(); //Die Einzelobjekte sind Selektiert
+ //Es koennen noch immer Gruppen dabei sein.
+
+ // OD 27.06.2003 #108784# - change return type.
+ bool IsGroupAllowed() const;
+
+ void MirrorSelection( BOOL bHorizontal ); //Bei FALSE Vertikal
+
+ //frmatr.hxx. Hier kein enum wg. Abhaengigkeiten
+ //Der BOOL ist nur fuer internen Gebrauch! Anker wird nur - anhand der
+ //aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt.
+ void ChgAnchor( int eAnchorId, BOOL bSameOnly = FALSE,
+ BOOL bPosCorr = TRUE );
+
+ BOOL SetDrawingAttr( SfxItemSet &rSet );
+
+ // hole die selectierten DrawObj als Grafik (MetaFile/Bitmap)
+ // Return-Wert besagt ob konvertiert wurde!!
+ BOOL GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const;
+
+ void Paste( SvStream& rStm, USHORT nAction, const Point* pPt = 0 );
+ BOOL Paste( const Graphic &rGrf );
+ BOOL Paste( SotDataObject& rObj, const Point& rPt );
+
+ BOOL IsAlignPossible() const;
+ void SetCalcFieldValueHdl(Outliner* pOutliner);
+
+ void Insert(const String& rGrfName,
+ const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const SfxItemSet* pFlyAttrSet = 0,
+ const SfxItemSet* pGrfAttrSet = 0,
+ SwFrmFmt* = 0 );
+ //Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
+ // angemeldet sein.
+ void Insert( SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet = 0,
+ SwFrmFmt* = 0, const Point* = 0 );
+
+ BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName,
+ const Graphic* pGrf = 0 );
+
+//------------------------------------------
+
+ //Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point
+ Point GetCntntPos( const Point& rPoint, BOOL bNext ) const;
+
+ //convert document position into position relative to the current page
+ Point GetRelativePagePosition(const Point& rDocPos);
+
+ //Layout-Selektion Hiden/Zeigen und aufruf an die CrsrSh weiterreichen.
+ void ShLooseFcs();
+ void ShGetFcs( BOOL bUpdate = TRUE );
+
+ //PageDescriptor-Schnittstelle
+ void ChgCurPageDesc( const SwPageDesc& );
+ USHORT GetCurPageDesc( const BOOL bCalcFrm = TRUE ) const;
+ USHORT GetMousePageDesc( const Point &rPt ) const;
+ USHORT GetPageDescCnt() const;
+ SwPageDesc* FindPageDescByName( const String& rName,
+ BOOL bGetFromPool = FALSE,
+ USHORT* pPos = 0 );
+
+ const SwPageDesc& GetPageDesc( USHORT i ) const;
+ void ChgPageDesc( USHORT i, const SwPageDesc& );
+ // if inside all selection only one PageDesc, return this.
+ // Otherwise return 0 pointer
+ const SwPageDesc* GetSelectedPageDescs() const;
+
+ const SwRect& GetAnyCurRect( CurRectType eType,
+ const Point* pPt = 0,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& =
+ ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >() ) const;
+
+ //Seitennummer der Seite in der der Point liegt, 0 wenn keine
+ //getroffen ist.
+ USHORT GetPageNumber( const Point &rPoint ) const;
+ BOOL GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay ) const;
+
+ SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&,
+ const SfxItemSet* pFlyAttrSet = 0,
+ const SfxItemSet* pGrfAttrSet = 0,
+ SwFrmFmt* = 0 );
+ BOOL FinishOLEObj(); // Server wird beendet
+
+ //Attribute der Tabelle besorgen/setzen.
+ void GetTblAttr( SfxItemSet & ) const;
+ void SetTblAttr( const SfxItemSet & );
+
+ //Tabelle vollstaendig selektiert?
+ BOOL HasWholeTabSelection() const;
+ //Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle
+ //vollstaendig selektiert ist
+ BOOL HasBoxSelection() const;
+
+ BOOL InsertRow( USHORT nCnt, BOOL bBehind );
+ BOOL InsertCol( USHORT nCnt, BOOL bBehind ); // 0 == am Ende
+ BOOL DeleteCol();
+ BOOL DeleteRow();
+
+ BOOL DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
+
+ USHORT MergeTab(); //Merged selektierte Tabellenteile zusammen
+ //Fehler ueber enum zurueck
+ // Zelle Vertikal oder Horizontal splitten.
+ BOOL SplitTab( BOOL nVert = TRUE, USHORT nCnt = 1, BOOL bSameHeight = FALSE );
+ BOOL Sort(const SwSortOptions&); //Sortieren.
+
+ void SetRowHeight( const SwFmtFrmSize &rSz );
+ //Der Pointer muss vom Aufrufer zerstoert werden wenn != 0
+ void GetRowHeight( SwFmtFrmSize *&rpSz ) const;
+
+ void SetRowSplit( const SwFmtRowSplit &rSz );
+ void GetRowSplit( SwFmtRowSplit *&rpSz ) const;
+
+ void SetBoxAlign( USHORT nOrient );
+ USHORT GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
+
+ //Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine
+ //Zeile markiert ist.
+ BOOL BalanceRowHeight( BOOL bTstOnly );
+
+ void SetTabBorders( const SfxItemSet& rSet );
+ void GetTabBorders( SfxItemSet& rSet) const;
+ void SetTabLineStyle(const Color* pColor, BOOL bSetLine = FALSE, const SvxBorderLine* pBorderLine = NULL);
+
+ void SetTabBackground( const SvxBrushItem &rNew );
+ void GetTabBackground( SvxBrushItem &rToFill ) const;
+
+ void SetBoxBackground( const SvxBrushItem &rNew );
+ BOOL GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
+
+ void SetBoxDirection( const SvxFrameDirectionItem& rNew );
+ BOOL GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE uneindeutig
+
+ void SetRowBackground( const SvxBrushItem &rNew );
+ BOOL GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
+
+ BYTE WhichMouseTabCol( const Point &rPt ) const;
+ void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo.
+ void SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly = TRUE );
+ void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
+ void SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+ const Point &rPt );
+
+ // --> FME 2004-07-30 #i20126# Enhanced table selection
+ // pEnd will be used during MouseMove
+ bool SelTblRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ // <--
+
+ // #i24134# adjustment of table rows via Ruler
+ void GetTabRows( SwTabCols &rToFill ) const;
+ void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly );
+ void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
+ void SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt );
+
+ void ProtectCells(); //Falls eine Tabselektion besteht, wird sie ver-
+ // nichtet, wenn der Cursor nicht in Readonly darf
+ void UnProtectCells(); // auf die Tabellenselektin
+ void UnProtectTbls(); //bei allen Tabellen in der Selektion den Schutz aufheben
+ BOOL HasTblAnyProtection( const String* pTblName = 0,
+ BOOL* pFullTblProtection = 0 );
+ BOOL CanUnProtectCells() const;
+
+ USHORT GetRowsToRepeat() const;
+ void SetRowsToRepeat( USHORT nNumOfRows );
+ USHORT GetVirtPageNum( const BOOL bCalcFrm = TRUE );
+ //returns the number of table rows currently selected
+ //if the selection start at the top of the table
+ USHORT GetRowSelectionFromTop() const;
+
+ BOOL IsInRepeatedHeadline() const { return CheckHeadline( true ); }
+ BOOL IsInHeadline() const { return CheckHeadline( false ); }
+
+ //Stellt die Breiten der Zellen so ein, dass der Inhalt moeglichst
+ //nicht umgebrochen werden muss.
+ //bBalance sorgt fuer einen Ausgleich der markierten Spalten.
+ void AdjustCellWidth( BOOL bBalance = FALSE );
+ //Nicht erlaubt, wenn nur leere Zellen selektiert sind.
+ BOOL IsAdjustCellWidthAllowed( BOOL bBalance = FALSE ) const;
+
+ //Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als
+ //eine Zelle markiert ist.
+ BOOL BalanceCellWidth( BOOL bTstOnly );
+
+ // AutoFormat fuer die Tabelle/TabellenSelection
+ BOOL SetTableAutoFmt( const SwTableAutoFmt& rNew );
+ // Erfrage wie attributiert ist
+ BOOL GetTableAutoFmt( SwTableAutoFmt& rGet );
+ // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
+ BOOL SetColRowWidthHeight( USHORT eType, USHORT nDiff = 283 );
+ // Autosumme
+ BOOL GetAutoSum( String& rFml ) const;
+
+ //Phy: Tatsaechliche Seitenanzahl.
+ //Virt: Vom User evtl. gesetzten Offset mit einbeziehen.
+ USHORT GetPhyPageNum();
+
+ // Setzt an der aktuellen Postion einen neuen Page Offset
+ void SetNewPageOffset( USHORT nOffset );
+ void SetPageOffset( USHORT nOffset ); //Aendert den letzten Page Offset
+ USHORT GetPageOffset() const; //Liefert den letzten Page Offset
+
+ //SS fuer Beschriftungen
+ void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
+ const String& rNumberSeparator,
+ const BOOL bBefore, const USHORT nId,
+ const String& rCharacterStyle,
+ const BOOL bCpyBrd = TRUE );
+
+ //Das Lineal will auch noch etwas von uns wissen.
+ USHORT GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
+ USHORT GetCurMouseColNum( const Point &rPt,
+ SwGetCurColNumPara* pPara = 0 ) const;
+ USHORT GetCurTabColNum() const; //0 == in keiner Tabelle
+ USHORT GetCurMouseTabColNum( const Point &rPt ) const;
+ USHORT GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
+
+ BOOL IsTableRightToLeft() const;
+ BOOL IsMouseTableRightToLeft( const Point &rPt ) const;
+ BOOL IsTableVertical() const;
+
+ BOOL IsLastCellInRow() const;
+ // Die Breite des aktuellen Bereichs fuer Spaltendialog
+ long GetSectionWidth( SwFmt& rFmt ) const;
+
+ void GetConnectableFrmFmts
+ (SwFrmFmt & rFmt, const String & rReference, BOOL bSuccessors,
+ ::std::vector< String > & aPrevPageVec,
+ ::std::vector< String > & aThisPageVec,
+ ::std::vector< String > & aNextPageVec,
+ ::std::vector< String > & aRestVec);
+
+ /** SwFEShell::GetShapeBackgrd
+
+ OD 02.09.2002 for #102450#:
+ method determines background color of the page the selected drawing
+ object is on and returns this color.
+ If no color is found, because no drawing object is selected or ...,
+ color COL_BLACK (default color on constructing object of class Color)
+ is returned.
+
+ @author OD
+
+ @returns an object of class Color
+ */
+ const Color GetShapeBackgrd() const;
+
+ /** Is default horizontal text direction for selected drawing object right-to-left
+
+ OD 09.12.2002 #103045#
+ Because drawing objects only painted for each page only, the default
+ horizontal text direction of a drawing object is given by the corresponding
+ page property.
+
+ @author OD
+
+ @returns boolean, indicating, if the horizontal text direction of the
+ page, the selected drawing object is on, is right-to-left.
+ */
+ bool IsShapeDefaultHoriTextDirR2L() const;
+
+ void ParkCursorInTab();
+
+ // -> #i23726#
+ SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot);
+ BOOL IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
+ // <- #i23726#
+ // --> OD 2005-02-21 #i42921#
+ bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
+ const Point& _rDocPos ) const;
+ // <--
+
+};
+
+#endif
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
new file mode 100644
index 000000000000..11213224844c
--- /dev/null
+++ b/sw/inc/fldbas.hxx
@@ -0,0 +1,459 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fldbas.hxx,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLDBAS_HXX
+#define _FLDBAS_HXX
+
+#ifndef FIELDIDS_ONLY // SWG-Testreader!!
+
+#include <i18npool/lang.h>
+#include <tools/debug.hxx>
+#include <tools/string.hxx>
+#include "swdllapi.h"
+#include <calbck.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+class SwDoc;
+class SvStringsDtor;
+class SvNumberFormatter;
+
+#endif // FIELDIDS_ONLY
+
+/*--------------------------------------------------------------------
+ Beschreibung: die ID's fuer die Feldtypen
+ --------------------------------------------------------------------*/
+
+enum RES_FIELDS
+{
+// Fuer die alten Dokumente muessen die Field-Which IDS erhalten bleiben !!!!
+ RES_FIELDS_BEGIN,
+ RES_DBFLD = RES_FIELDS_BEGIN,
+ RES_USERFLD,
+ RES_FILENAMEFLD,
+ RES_DBNAMEFLD,
+ RES_DATEFLD,
+ RES_TIMEFLD,
+ RES_PAGENUMBERFLD,
+ RES_AUTHORFLD,
+ RES_CHAPTERFLD,
+ RES_DOCSTATFLD,
+ RES_GETEXPFLD,
+ RES_SETEXPFLD,
+ RES_GETREFFLD,
+ RES_HIDDENTXTFLD,
+ RES_POSTITFLD,
+ RES_FIXDATEFLD,
+ RES_FIXTIMEFLD,
+ RES_REGFLD,
+ RES_VARREGFLD,
+ RES_SETREFFLD,
+ RES_INPUTFLD,
+ RES_MACROFLD,
+ RES_DDEFLD,
+ RES_TABLEFLD,
+ RES_HIDDENPARAFLD,
+ RES_DOCINFOFLD,
+ RES_TEMPLNAMEFLD,
+ RES_DBNEXTSETFLD,
+ RES_DBNUMSETFLD,
+ RES_DBSETNUMBERFLD,
+ RES_EXTUSERFLD,
+ RES_REFPAGESETFLD,
+ RES_REFPAGEGETFLD,
+ RES_INTERNETFLD,
+ RES_JUMPEDITFLD,
+ RES_SCRIPTFLD,
+ RES_DATETIMEFLD,
+ RES_AUTHORITY, //Table of authorities
+ RES_COMBINED_CHARS,
+ RES_DROPDOWN,
+ RES_FIELDS_END
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Liste der FieldTypes am UI
+ --------------------------------------------------------------------*/
+
+enum SwFldTypesEnum
+{
+ TYP_BEGIN,
+ TYP_DATEFLD = TYP_BEGIN, // 0
+ TYP_TIMEFLD,
+ TYP_FILENAMEFLD,
+ TYP_DBNAMEFLD,
+ TYP_CHAPTERFLD,
+ TYP_PAGENUMBERFLD,
+ TYP_DOCSTATFLD,
+ TYP_AUTHORFLD,
+ TYP_SETFLD,
+ TYP_GETFLD,
+ TYP_FORMELFLD, // 10
+ TYP_HIDDENTXTFLD,
+ TYP_SETREFFLD,
+ TYP_GETREFFLD,
+ TYP_DDEFLD,
+ TYP_MACROFLD,
+ TYP_INPUTFLD,
+ TYP_HIDDENPARAFLD,
+ TYP_DOCINFOFLD,
+ TYP_DBFLD,
+ TYP_USERFLD, // 20
+ TYP_POSTITFLD,
+ TYP_TEMPLNAMEFLD,
+ TYP_SEQFLD,
+ TYP_DBNEXTSETFLD,
+ TYP_DBNUMSETFLD,
+ TYP_DBSETNUMBERFLD,
+ TYP_CONDTXTFLD,
+ TYP_NEXTPAGEFLD,
+ TYP_PREVPAGEFLD,
+ TYP_EXTUSERFLD, // 30
+ TYP_FIXDATEFLD,
+ TYP_FIXTIMEFLD,
+ TYP_SETINPFLD,
+ TYP_USRINPFLD,
+ TYP_SETREFPAGEFLD,
+ TYP_GETREFPAGEFLD,
+ TYP_INTERNETFLD,
+ TYP_JUMPEDITFLD,
+ TYP_SCRIPTFLD, // 40
+ TYP_AUTHORITY,
+ TYP_COMBINED_CHARS,
+ TYP_DROPDOWN,
+ TYP_END
+};
+
+
+enum SwFileNameFormat
+{
+ FF_BEGIN,
+ FF_NAME = FF_BEGIN,
+ FF_PATHNAME,
+ FF_PATH,
+ FF_NAME_NOEXT,
+ FF_UI_NAME,
+ FF_UI_RANGE,
+ FF_END,
+ FF_FIXED = 0x8000
+};
+
+enum SwVarFormat
+{
+ VVF_CMD = 0x0010, // Kommando anzeigen
+ VVF_INVISIBLE = 0x0040, // unsichtbar
+ VVF_XXP = 0x0400, // 1234%
+ VVF_XX_XXP = 0x0800, // 1.234,56%
+ VVF_CLEAR = 0x000f,
+
+// ab hier neue Formate
+ VVF_SYS = 0x2000, //Zahlenformat aus der Systemeinstellung
+ VVF_X = 0x2100, // 1234
+ VVF_X_X = 0x2200, // 1234,5
+ VVF_X_XX = 0x2300, // 1245,56
+ VVF_XX_X = 0x2400, // 1.234,5
+ VVF_XX_XX = 0x2500, // 1.234,56
+ VVF_XX_XXX = 0x2600, // 1.234,567
+ VVF_SYS_CUR = 0x2700, // W???hrungsformat aus der Systemeinstellung
+ VVF_CUR_X = 0x2800, // DM 1234
+ VVF_CUR_XX_XX = 0x2900, // DM 1234,56 DM 1234,00
+ VVF_CUR_XX_X0 = 0x2a00, // DM 1234,56 DM 1234,--
+ VVF_X_CUR = 0x2b00, // 1234 DM
+ VVF_XX_XX_CUR = 0x2c00, // 1234,56 DM 1234,00 DM
+ VVF_XX_X0_CUR = 0x2d00, // 1234,56 DM 1234,-- DM
+// Kompatibilitaet:
+ VF_CMD = VVF_CMD,
+ VF_INVISIBLE = VVF_INVISIBLE,
+ VF_XXP = VVF_XXP,
+ VF_XX_XXP = VVF_XX_XXP,
+ VF_VISIBLE = VVF_SYS,
+ VF_XX = VVF_X,
+ VF_XX_XX = VVF_XX_XX,
+ VF_XX_XX_CUR = VVF_SYS_CUR,
+ VF_CLEAR = VVF_CLEAR
+
+};
+
+typedef USHORT SwGetSetExpType;
+namespace nsSwGetSetExpType
+{
+ const SwGetSetExpType GSE_STRING = 0x0001; // String
+ const SwGetSetExpType GSE_EXPR = 0x0002; // Expression
+ const SwGetSetExpType GSE_INP = 0x0004; // InputField
+ const SwGetSetExpType GSE_SEQ = 0x0008; // Sequence
+ const SwGetSetExpType GSE_FORMULA = 0x0010; // Formel
+}
+
+typedef USHORT SwExtendedSubType;
+namespace nsSwExtendedSubType
+{
+ const SwExtendedSubType SUB_CMD = 0x0100; // Kommando anzeigen
+ const SwExtendedSubType SUB_INVISIBLE = 0x0200; // unsichtbar
+ const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Uebernimmt Formatierung nicht
+ // aus Datenbank
+}
+
+enum SwInputFieldSubType
+{
+ INP_TXT = 0x01,
+ INP_USR = 0x02,
+ INP_VAR = 0x03
+};
+
+
+enum SwUserType
+{
+ UF_STRING = 0x01,
+ UF_EXPR = 0x02
+};
+
+enum SwDateTimeSubType
+{
+ FIXEDFLD = 1,
+ DATEFLD = 2,
+ TIMEFLD = 4
+};
+
+#ifndef FIELDIDS_ONLY // SWG-Testreader!!
+
+
+extern USHORT __FAR_DATA aTypeTab[];
+
+/*--------------------------------------------------------------------
+ Beschreibung: Allgemeine Tools
+ --------------------------------------------------------------------*/
+
+String GetResult(double nVal, sal_uInt32 nNumFmt, USHORT nLang = LANGUAGE_SYSTEM);
+void SetErrorStr(const String& rStr);
+//String ExpandDate(const Date& rDate, ULONG nFmt, USHORT nLang);
+//String ExpandTime(const Time& rTime, ULONG nFmt, USHORT nLang);
+String FormatNumber(USHORT nNum, sal_uInt32 nFormat);
+
+/*--------------------------------------------------------------------
+ Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor.
+ Zu jeder Klasse SwFields existiert
+ 1 Instanz der zugehoerigen Typenklasse
+ Basisklasse aller Feldtypen ist SwFieldType
+ --------------------------------------------------------------------*/
+
+DBG_NAMEEX(SwFieldType)
+
+class SW_DLLPUBLIC SwFieldType : public SwModify
+{
+ USHORT nWhich;
+
+ friend void _FinitUI(); // um den Pointer zu loeschen!
+ static SvStringsDtor* pFldNames;
+
+ static void _GetFldName(); // legt die FldNames an, fldmgr.cxx!
+
+protected:
+ // single argument ctors shall be explicit.
+ explicit SwFieldType( USHORT nWhichId );
+
+public:
+
+#ifndef PRODUCT
+ virtual ~SwFieldType();
+#endif
+ static const String& GetTypeStr( USHORT nTypeId );
+
+ // nur in abgeleiteten Klassen
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const = 0;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ USHORT Which() const { return nWhich; }
+
+ inline void UpdateFlds() const;
+};
+
+inline void SwFieldType::UpdateFlds() const
+{
+ ((SwFieldType*)this)->Modify( 0, 0 );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse aller Felder.
+ Ueber Which wird der Typ des Feldes abgefragt.
+ Ueber Expand() wird der expandierte Inhalt
+ des Feldes in Erfahrung gebracht.
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwField
+{
+ USHORT nLang; // Immer ueber SetLanguage aendern!
+ BOOL bIsAutomaticLanguage;
+ sal_uInt32 nFormat;
+
+ SwFieldType* pType;
+
+protected:
+ void SetFormat(sal_uInt32 nSet) {nFormat = nSet;}
+
+ SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM);
+
+public:
+ virtual ~SwField();
+
+ // Typ feststellen
+ inline SwFieldType* GetTyp() const;
+
+ // neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt)
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ // Expandierung fuer die Anzeige
+ virtual String Expand() const = 0;
+
+ // liefert den Namen oder den Inhalt
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual SwField* Copy() const = 0;
+
+ // ResId
+ USHORT Which() const
+#ifdef PRODUCT
+ { return pType->Which(); }
+#else
+ ; // in fldbas.cxx implementiert
+#endif
+
+ // TYP_ID
+ USHORT GetTypeId() const;
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT);
+
+ // Sprache an der Feldposition
+ inline USHORT GetLanguage() const;
+ virtual void SetLanguage(USHORT nLng);
+
+ // Parameter fuer Dialog und BASIC erfragen
+ inline sal_uInt32 GetFormat() const;
+ virtual const String& GetPar1() const;
+ virtual String GetPar2() const;
+
+ virtual String GetFormula() const;
+
+ virtual void ChangeFormat(sal_uInt32 n);
+ virtual void SetPar1(const String& rStr);
+ virtual void SetPar2(const String& rStr);
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ // hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
+ BOOL HasClickHdl() const;
+ // ist es ein Fix-Feld?
+ BOOL IsFixed() const;
+
+ BOOL IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
+ void SetAutomaticLanguage(BOOL bSet){bIsAutomaticLanguage = bSet;}
+
+ virtual String GetDescription() const;
+};
+
+inline SwFieldType* SwField::GetTyp() const
+ { return pType; }
+
+inline sal_uInt32 SwField::GetFormat() const
+ { return nFormat; }
+
+inline USHORT SwField::GetLanguage() const
+ { return nLang; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Felder mit Values, die ueber der Numberformatter
+ formatiert werden muessen
+ --------------------------------------------------------------------*/
+
+class SwValueFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ BOOL bUseFormat; // Numberformatter verwenden
+
+protected:
+ SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId );
+ SwValueFieldType( const SwValueFieldType& rTyp );
+
+public:
+ inline SwDoc* GetDoc() const { return pDoc; }
+ inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
+
+ inline BOOL UseFormat() const { return bUseFormat; }
+ inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; }
+
+ String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const;
+ void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const;
+ void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const;
+};
+
+class SW_DLLPUBLIC SwValueField : public SwField
+{
+ double fValue;
+// String sExpand;
+
+protected:
+ SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
+ SwValueField( const SwValueField& rFld );
+
+public:
+ virtual ~SwValueField();
+
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+ virtual void SetLanguage(USHORT nLng);
+// os: wozu war das denn da?
+// virtual void ChangeFormat(ULONG n);
+
+ inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
+
+ virtual double GetValue() const;
+ virtual void SetValue( const double& rVal );
+
+ inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const
+ { return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); }
+
+ static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt);
+};
+
+class SW_DLLPUBLIC SwFormulaField : public SwValueField
+{
+ String sFormula;
+
+protected:
+ SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 );
+ SwFormulaField( const SwFormulaField& rFld );
+
+public:
+ virtual String GetFormula() const;
+ void SetFormula(const String& rStr);
+
+ void SetExpandedFormula(const String& rStr);
+ String GetExpandedFormula() const;
+};
+
+#endif // FIELDIDS_ONLY
+#endif // _FLDBAS_HXX
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
new file mode 100644
index 000000000000..e2c61cfe8809
--- /dev/null
+++ b/sw/inc/flddat.hxx
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: flddat.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLDDAT_HXX
+#define _FLDDAT_HXX
+
+#include <tools/string.hxx>
+
+#include "fldbas.hxx"
+
+class DateTime;
+class Date;
+class Time;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Formate
+ --------------------------------------------------------------------*/
+
+enum SwDateFormat
+{
+ DF_BEGIN,
+ //neue Formate:
+ DFF_SSYS = DF_BEGIN,
+ DFF_LSYS ,
+ DFF_DMY ,
+ DFF_DMYY ,
+ DFF_DMMY ,
+ DFF_DMMYY,
+ DFF_DMMMY ,
+ DFF_DMMMYY,
+ DFF_DDMMY ,
+ DFF_DDMMMY ,
+ DFF_DDMMMYY ,
+ DFF_DDDMMMY ,
+ DFF_DDDMMMYY ,
+ DFF_MY ,
+ DFF_MD ,
+ DFF_YMD ,
+ DFF_YYMD ,
+ DF_END ,
+// Kompatibilitaet:
+ DF_SSYS = DFF_SSYS,
+ DF_LSYS = DFF_LSYS,
+ DF_SHORT = DFF_DMY,
+ DF_SCENT = DFF_DMYY,
+ DF_LMON = DFF_DMMYY,
+ DF_LMONTH = DFF_DMMMYY,
+ DF_LDAYMON = DFF_DDMMMYY,
+ DF_LDAYMONTH= DFF_DDDMMMYY
+};
+
+enum SwTimeFormat
+{
+ TF_BEGIN,
+ TF_SYSTEM=TF_BEGIN,
+ TF_SSMM_24,
+ TF_SSMM_12,
+ TF_END
+};
+
+enum SwTimeSubFormat
+{
+ TIME_FIX,
+ TIME_VAR
+};
+
+enum SwDateSubFormat
+{
+ DATE_FIX,
+ DATE_VAR
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datum/Uhrzeitfeld
+ --------------------------------------------------------------------*/
+
+class SwDateTimeFieldType : public SwValueFieldType
+{
+public:
+ SwDateTimeFieldType(SwDoc* pDoc);
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datum/Uhrzeitfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDateTimeField : public SwValueField
+{
+ USHORT nSubType;
+ long nOffset; // Offset in Minuten
+
+public:
+ SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD,
+ ULONG nFmt = 0, USHORT nLng = 0);
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+
+ virtual double GetValue() const;
+
+ virtual void SetPar2(const String& rStr);
+ virtual String GetPar2() const;
+
+ inline BOOL IsDate() const
+ { return (nSubType & DATEFLD) != 0; }
+
+ inline void SetOffset(long nMinutes) { nOffset = nMinutes; }
+ inline long GetOffset() const { return nOffset; }
+
+ Date GetDate(BOOL bUseOffset = FALSE) const;
+ Time GetTime(BOOL bUseOffset = FALSE) const;
+ void SetDateTime(const DateTime& rDT);
+ static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+};
+
+#endif // _FLDDAT_HXX
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
new file mode 100644
index 000000000000..4efad6ae8d3f
--- /dev/null
+++ b/sw/inc/flddropdown.hxx
@@ -0,0 +1,282 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: flddropdown.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLDDROPDOWN_HXX
+#define _FLDDROPDOWN_HXX
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX
+#include "com/sun/star/uno/Sequence.hxx"
+#endif
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+
+/**
+ Field type for dropdown boxes.
+*/
+class SwDropDownFieldType : public SwFieldType
+{
+public:
+ /**
+ Constructor
+ */
+ SwDropDownFieldType();
+
+ /**
+ Destructor
+ */
+ virtual ~SwDropDownFieldType();
+
+ /**
+ Create a copy of this field type.
+
+ @return a copy of this type
+ */
+ virtual SwFieldType * Copy () const;
+};
+
+/**
+ Dropdown field.
+
+ The dropdown field contains a list of strings. At most one of them
+ can be selected.
+*/
+class SW_DLLPUBLIC SwDropDownField : public SwField
+{
+ /**
+ the possible values (aka items) of the dropdown box
+ */
+ std::vector<String> aValues;
+
+ /**
+ the selected item
+ */
+ String aSelectedItem;
+
+ /**
+ the name of the field
+ */
+ String aName;
+
+ /**
+ help text
+ */
+ String aHelp;
+
+ /**
+ tool tip string
+ */
+ String aToolTip;
+
+public:
+ /**
+ Constructor
+
+ @param pTyp field type for this field
+ */
+ SwDropDownField(SwFieldType * pTyp);
+
+ /**
+ Copy constructor
+
+ @param rSrc dropdown field to copy
+ */
+ SwDropDownField(const SwDropDownField & rSrc);
+
+ /**
+ Destructor
+ */
+ virtual ~SwDropDownField();
+
+ /**
+ Expands the field.
+
+ The expanded value of the field is the value of the selected
+ item. If no item is selected, an empty string is returned.
+
+ @return the expanded value of the field
+ */
+ virtual String Expand() const;
+
+ /**
+ Creates a copy of this field.
+
+ @return the copy of this field
+ */
+ virtual SwField * Copy() const;
+
+ /**
+ Returns the selected value.
+
+ @see Expand
+
+ @return the selected value
+ */
+ virtual const String & GetPar1() const;
+
+ /**
+ Returns the name of the field.
+
+ @return the name of the field
+ */
+ virtual String GetPar2() const;
+
+ /**
+ Sets the selected value.
+
+ If rStr is an item of the field that item will be
+ selected. Otherwise no item will be selected, i.e. the
+ resulting selection will be empty.
+ */
+ virtual void SetPar1(const String & rStr);
+
+ /**
+ Sets the name of the field.
+
+ @param rStr the new name of the field
+ */
+ virtual void SetPar2(const String & rStr);
+
+ /**
+ Sets the items of the dropdown box.
+
+ After setting the items the selection will be empty.
+
+ @param rItems the new items
+ */
+ void SetItems(const std::vector<String> & rItems);
+
+ /**
+ Sets the items of the dropdown box.
+
+ After setting the items the selection will be empty.
+
+ @param rItems the new items
+ */
+ void SetItems(const com::sun::star::uno::Sequence<rtl::OUString> & rItems);
+
+ /**
+ Returns the items of the dropdown box.
+
+ @return the items of the dropdown box
+ */
+ com::sun::star::uno::Sequence<rtl::OUString> GetItemSequence() const;
+
+ /**
+ Returns the selected item.
+
+ @return the selected item
+ */
+ const String & GetSelectedItem() const;
+
+ /**
+ Returns the name of the field.
+
+ @return the name of the field
+ */
+ const String & GetName() const;
+
+ /**
+ Returns the help text of the field.
+
+ @return the help text of the field
+ */
+ const String & GetHelp() const;
+
+ /**
+ Returns the tool tip of the field.
+
+ @return the tool tip of the field
+ */
+ const String & GetToolTip() const;
+
+ /**
+ Sets the selected item.
+
+ If rItem is found in this dropdown field it is selected. If
+ rItem is not found the selection will be empty.
+
+ @param rItem the item to be set
+
+ @retval TRUE the selected item was successfully set
+ @retval TRUE failure (empty selection)
+ */
+ BOOL SetSelectedItem(const String & rItem);
+
+ /**
+ Sets the name of the field.
+
+ @param rName the new name of the field
+ */
+ void SetName(const String & rName);
+
+ /**
+ Sets the help text of the field.
+
+ @param rHelp the help text
+ */
+ void SetHelp(const String & rHelp);
+
+ /**
+ Sets the tool tip of the field.
+
+ @param rToolTip the tool tip
+ */
+ void SetToolTip(const String & rToolTip);
+
+ /**
+ API: Gets a property value from the dropdown field.
+
+ @param rVal return value
+ @param nMId
+ - FIELD_PROP_PAR1 Get selected item (String)
+ - FIELD_PROP_STRINGS Get all items (Sequence)
+ - FIELD_PROP_PAR3 Get the help text of the field.
+ - FIELD_PROP_PAR4 Get the tool tip of the field.
+ */
+ virtual BOOL QueryValue(com::sun::star::uno::Any &rVal, USHORT nWhichId) const;
+
+ /**
+ API: Sets a property value on the dropdown field.
+
+ @param rVal value to set
+ @param nMId
+ - FIELD_PROP_PAR1 Set selected item (String)
+ - FIELD_PROP_STRINGS Set all items (Sequence)
+ - FIELD_PROP_PAR3 Set the help text of the field.
+ - FIELD_PROP_PAR4 Set the tool tip of the field.
+ */
+ virtual BOOL PutValue(const com::sun::star::uno::Any &rVal, USHORT nWhichId);
+};
+
+#endif
diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx
new file mode 100644
index 000000000000..3a025d491ace
--- /dev/null
+++ b/sw/inc/fldinit.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fldinit.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLDINIT_HXX
+#define _FLDINIT_HXX
+
+/*--------------------------------------------------------------------
+ Beschreibung: Tabelle aller FeldInfos
+ --------------------------------------------------------------------*/
+
+void InitFieldInfo();
+void FinitFieldInfo();
+
+
+#endif // _FLDINIT_HXX
diff --git a/sw/inc/fldui.hrc b/sw/inc/fldui.hrc
new file mode 100644
index 000000000000..5fc8b2bb1a9d
--- /dev/null
+++ b/sw/inc/fldui.hrc
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fldui.hrc,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLDUI_HRC
+#define _FLDUI_HRC
+
+#include "rcid.hrc"
+
+
+#define DLG_FLD RC_FLDDLG_BEGIN
+#define DLG_RECORD_MRG (RC_FLDDLG_BEGIN + 1)
+#define DLG_RECORD_INS (RC_FLDDLG_BEGIN + 2)
+#define DLG_FLD_EDIT (RC_FLDDLG_BEGIN + 3)
+#define DLG_POSTIT (RC_FLDDLG_BEGIN + 4)
+#define DLG_FLD_INPUT (RC_FLDDLG_BEGIN + 5)
+#define DLG_BRCFG (RC_FLDDLG_BEGIN + 6)
+#define DLG_BRSEEK (RC_FLDDLG_BEGIN + 7)
+#define DLG_BRSORT (RC_FLDDLG_BEGIN + 8)
+#define DLG_CHANGE_DB (RC_FLDDLG_BEGIN + 9)
+#define DLG_JAVAEDIT (RC_FLDDLG_BEGIN + 10)
+#define DLG_FLD_INSERT (RC_FLDDLG_BEGIN + 11)
+#define DLG_FLD_DROPDOWN (RC_FLDDLG_BEGIN + 12)
+
+/*--------------------------------------------------------------------
+ Beschreibung: TypeId
+ --------------------------------------------------------------------*/
+
+#define STR_TYPE_BEGIN RC_FLDDLG_BEGIN
+#define STR_DATEFLD STR_TYPE_BEGIN
+#define STR_TIMEFLD (STR_TYPE_BEGIN + 1)
+#define STR_FILENAMEFLD (STR_TYPE_BEGIN + 2)
+#define STR_DBNAMEFLD (STR_TYPE_BEGIN + 3)
+#define STR_CHAPTERFLD (STR_TYPE_BEGIN + 4)
+#define STR_PAGENUMBERFLD (STR_TYPE_BEGIN + 5)
+#define STR_DOCSTATFLD (STR_TYPE_BEGIN + 6)
+#define STR_AUTHORFLD (STR_TYPE_BEGIN + 7)
+#define STR_SETFLD (STR_TYPE_BEGIN + 8)
+#define STR_GETFLD (STR_TYPE_BEGIN + 9)
+#define STR_FORMELFLD (STR_TYPE_BEGIN + 10)
+#define STR_CONDTXTFLD (STR_TYPE_BEGIN + 11)
+#define STR_SETREFFLD (STR_TYPE_BEGIN + 12)
+#define STR_GETREFFLD (STR_TYPE_BEGIN + 13)
+#define STR_DDEFLD (STR_TYPE_BEGIN + 14)
+#define STR_MACROFLD (STR_TYPE_BEGIN + 15)
+#define STR_INPUTFLD (STR_TYPE_BEGIN + 16)
+#define STR_DOCINFOFLD (STR_TYPE_BEGIN + 17)
+#define STR_DBFLD (STR_TYPE_BEGIN + 19)
+#define STR_USERFLD (STR_TYPE_BEGIN + 20)
+#define STR_POSTITFLD (STR_TYPE_BEGIN + 21)
+#define STR_HIDDENPARAFLD (STR_TYPE_BEGIN + 22)
+
+#define STR_TEMPLNAMEFLD (STR_TYPE_BEGIN + 24)
+#define STR_SEQFLD (STR_TYPE_BEGIN + 25)
+#define STR_DBNEXTSETFLD (STR_TYPE_BEGIN + 26)
+#define STR_DBNUMSETFLD (STR_TYPE_BEGIN + 27)
+#define STR_DBSETNUMBERFLD (STR_TYPE_BEGIN + 28)
+#define STR_PREVPAGEFLD (STR_TYPE_BEGIN + 29)
+#define STR_NEXTPAGEFLD (STR_TYPE_BEGIN + 30)
+#define STR_HIDDENTXTFLD (STR_TYPE_BEGIN + 31)
+#define STR_EXTUSERFLD (STR_TYPE_BEGIN + 32)
+#define STR_SETINPUTFLD (STR_TYPE_BEGIN + 33)
+#define STR_USRINPUTFLD (STR_TYPE_BEGIN + 34)
+#define STR_SETREFPAGEFLD (STR_TYPE_BEGIN + 35)
+#define STR_GETREFPAGEFLD (STR_TYPE_BEGIN + 36)
+#define STR_INTERNETFLD (STR_TYPE_BEGIN + 37)
+#define STR_JUMPEDITFLD (STR_TYPE_BEGIN + 38)
+#define STR_SCRIPTFLD (STR_TYPE_BEGIN + 39)
+#define STR_AUTHORITY (STR_TYPE_BEGIN + 40)
+#define STR_COMBINED_CHARS (STR_TYPE_BEGIN + 41)
+#define STR_DROPDOWN (STR_TYPE_BEGIN + 42)
+#define STR_CUSTOM (STR_TYPE_BEGIN + 43)
+#define STR_TYPE_END (STR_TYPE_BEGIN + 44)
+
+/*--------------------------------------------------------------------
+ Beschreibung: SubTypes
+ --------------------------------------------------------------------*/
+
+#define FLD_DATE_BEGIN STR_TYPE_END
+#define FLD_DATE_FIX FLD_DATE_BEGIN
+#define FLD_DATE_STD (FLD_DATE_BEGIN + 1)
+#define FLD_DATE_END (FLD_DATE_BEGIN + 2)
+
+#define FLD_TIME_BEGIN FLD_DATE_END
+#define FLD_TIME_FIX FLD_TIME_BEGIN
+#define FLD_TIME_STD (FLD_TIME_BEGIN + 1)
+#define FLD_TIME_END (FLD_TIME_BEGIN + 2)
+
+#define FLD_STAT_BEGIN FLD_TIME_END
+#define FLD_STAT_PAGE FLD_STAT_BEGIN
+#define FLD_STAT_PARA (FLD_STAT_BEGIN + 1)
+#define FLD_STAT_WORD (FLD_STAT_BEGIN + 2)
+#define FLD_STAT_CHAR (FLD_STAT_BEGIN + 3)
+#define FLD_STAT_TABLE (FLD_STAT_BEGIN + 4)
+#define FLD_STAT_GRF (FLD_STAT_BEGIN + 5)
+#define FLD_STAT_OBJ (FLD_STAT_BEGIN + 6)
+#define FLD_STAT_END (FLD_STAT_BEGIN + 7)
+
+#define FLD_INPUT_BEGIN FLD_STAT_END
+#define FLD_INPUT_TEXT FLD_INPUT_BEGIN
+#define FLD_INPUT_END (FLD_INPUT_BEGIN + 1)
+
+#define FLD_EU_BEGIN FLD_INPUT_END
+#define FLD_EU_FIRMA FLD_EU_BEGIN
+#define FLD_EU_VORNAME (FLD_EU_BEGIN + 1)
+#define FLD_EU_NAME (FLD_EU_BEGIN + 2)
+#define FLD_EU_ABK (FLD_EU_BEGIN + 3)
+#define FLD_EU_STRASSE (FLD_EU_BEGIN + 4)
+#define FLD_EU_LAND (FLD_EU_BEGIN + 5)
+#define FLD_EU_PLZ (FLD_EU_BEGIN + 6)
+#define FLD_EU_ORT (FLD_EU_BEGIN + 7)
+#define FLD_EU_TITEL (FLD_EU_BEGIN + 8)
+#define FLD_EU_POS (FLD_EU_BEGIN + 9)
+#define FLD_EU_TELPRIV (FLD_EU_BEGIN + 10)
+#define FLD_EU_TELFIRMA (FLD_EU_BEGIN + 11)
+#define FLD_EU_FAX (FLD_EU_BEGIN + 12)
+#define FLD_EU_EMAIL (FLD_EU_BEGIN + 13)
+#define FLD_EU_STATE (FLD_EU_BEGIN + 14)
+#define FLD_EU_END (FLD_EU_BEGIN + 15)
+
+#define FLD_PAGEREF_BEGIN FLD_EU_END
+#define FLD_PAGEREF_OFF FLD_PAGEREF_BEGIN
+#define FLD_PAGEREF_ON (FLD_PAGEREF_BEGIN+1)
+#define FLD_PAGEREF_END (FLD_PAGEREF_BEGIN+2)
+
+/*----------------------------------------------------------
+ Format-Id's
+ ----------------------------------------------------------*/
+// Text
+#define FMT_TEXT FLD_PAGEREF_END
+
+// Nummern
+#define FMT_NUM_BEGIN (FMT_TEXT + 1)
+#define FMT_NUM_ABC FMT_NUM_BEGIN
+#define FMT_NUM_SABC (FMT_NUM_BEGIN + 1)
+#define FMT_NUM_ABC_N (FMT_NUM_BEGIN + 2)
+#define FMT_NUM_SABC_N (FMT_NUM_BEGIN + 3)
+#define FMT_NUM_ROMAN (FMT_NUM_BEGIN + 4)
+#define FMT_NUM_SROMAN (FMT_NUM_BEGIN + 5)
+#define FMT_NUM_ARABIC (FMT_NUM_BEGIN + 6)
+#define FMT_NUM_PAGEDESC (FMT_NUM_BEGIN + 7)
+#define FMT_NUM_PAGESPECIAL (FMT_NUM_BEGIN + 8)
+#define FMT_NUM_END (FMT_NUM_BEGIN + 9)
+
+// AuthorFormat
+#define FMT_AUTHOR_BEGIN FMT_NUM_END
+#define FMT_AUTHOR_NAME FMT_AUTHOR_BEGIN
+#define FMT_AUTHOR_SCUT (FMT_AUTHOR_BEGIN + 1)
+#define FMT_AUTHOR_END (FMT_AUTHOR_BEGIN + 2)
+
+// Variable setzen
+#define FMT_SETVAR_BEGIN FMT_AUTHOR_END
+#define FMT_SETVAR_SYS (FMT_SETVAR_BEGIN + 0)
+#define FMT_SETVAR_TEXT (FMT_SETVAR_BEGIN + 1)
+#define FMT_SETVAR_END (FMT_SETVAR_BEGIN + 2)
+
+// Variable einfuegen
+#define FMT_GETVAR_BEGIN FMT_SETVAR_END
+#define FMT_GETVAR_TEXT (FMT_GETVAR_BEGIN + 0)
+#define FMT_GETVAR_NAME (FMT_GETVAR_BEGIN + 1)
+#define FMT_GETVAR_END (FMT_GETVAR_BEGIN + 2)
+
+// Userfeld einfuegen
+#define FMT_USERVAR_BEGIN FMT_GETVAR_END
+#define FMT_USERVAR_TEXT (FMT_USERVAR_BEGIN + 0)
+#define FMT_USERVAR_CMD (FMT_USERVAR_BEGIN + 1)
+#define FMT_USERVAR_END (FMT_USERVAR_BEGIN + 2)
+
+// Datenbankfeld einfuegen
+#define FMT_DBFLD_BEGIN FMT_USERVAR_END
+#define FMT_DBFLD_DB (FMT_DBFLD_BEGIN + 0)
+#define FMT_DBFLD_SYS (FMT_DBFLD_BEGIN + 1)
+#define FMT_DBFLD_END (FMT_DBFLD_BEGIN + 2)
+
+//FileNameFormat
+// Achtung die letzten 4 Formate gibt es in RTF nicht (Verlust!)
+#define FMT_FF_BEGIN FMT_DBFLD_END
+#define FMT_FF_NAME FMT_FF_BEGIN
+#define FMT_FF_PATHNAME (FMT_FF_BEGIN + 1)
+#define FMT_FF_PATH (FMT_FF_BEGIN + 2)
+#define FMT_FF_NAME_NOEXT (FMT_FF_BEGIN + 3)
+#define FMT_FF_UI_NAME (FMT_FF_BEGIN + 4)
+#define FMT_FF_UI_RANGE (FMT_FF_BEGIN + 5)
+#define FMT_FF_END (FMT_FF_BEGIN + 6)
+
+// Registry-Format
+#define FMT_REG_BEGIN FMT_FF_END
+#define FMT_REG_AUTHOR FMT_REG_BEGIN
+#define FMT_REG_TIME (FMT_REG_BEGIN + 1)
+#define FMT_REG_DATE (FMT_REG_BEGIN + 2)
+#define FMT_REG_END (FMT_REG_BEGIN + 3)
+
+// Kapitel
+#define FMT_CHAPTER_BEGIN FMT_REG_END
+#define FMT_CHAPTER_NO FMT_CHAPTER_BEGIN
+#define FMT_CHAPTER_NAME (FMT_CHAPTER_BEGIN + 1)
+#define FMT_CHAPTER_NAMENO (FMT_CHAPTER_BEGIN + 2)
+#define FMT_CHAPTER_NO_NOSEPARATOR (FMT_CHAPTER_BEGIN + 3)
+#define FMT_CHAPTER_END (FMT_CHAPTER_BEGIN + 4)
+
+// DDE-Formate
+#define FMT_DDE_BEGIN FMT_CHAPTER_END
+#define FMT_DDE_NORMAL FMT_DDE_BEGIN
+#define FMT_DDE_HOT (FMT_DDE_BEGIN + 1)
+#define FMT_DDE_END (FMT_DDE_BEGIN + 2)
+
+#define FMT_REF_BEGIN FMT_DDE_END
+#define FMT_REF_PAGE FMT_REF_BEGIN
+#define FMT_REF_CHAPTER (FMT_REF_BEGIN + 1)
+#define FMT_REF_TEXT (FMT_REF_BEGIN + 2)
+#define FMT_REF_UPDOWN (FMT_REF_BEGIN + 3)
+#define FMT_REF_PAGE_PGDSC (FMT_REF_BEGIN + 4)
+#define FMT_REF_ONLYNUMBER (FMT_REF_BEGIN + 5)
+#define FMT_REF_ONLYCAPTION (FMT_REF_BEGIN + 6)
+#define FMT_REF_ONLYSEQNO (FMT_REF_BEGIN + 7)
+#define FMT_REF_NUMBER (FMT_REF_BEGIN + 8)
+#define FMT_REF_NUMBER_NO_CONTEXT (FMT_REF_BEGIN + 9)
+#define FMT_REF_NUMBER_FULL_CONTEXT (FMT_REF_BEGIN + 10)
+#define FMT_REF_END (FMT_REF_BEGIN + 11)
+
+// Platzhalter
+#define FMT_MARK_BEGIN FMT_REF_END
+#define FMT_MARK_TEXT FMT_MARK_BEGIN
+#define FMT_MARK_TABLE (FMT_MARK_BEGIN + 1)
+#define FMT_MARK_FRAME (FMT_MARK_BEGIN + 2)
+#define FMT_MARK_GRAFIC (FMT_MARK_BEGIN + 3)
+#define FMT_MARK_OLE (FMT_MARK_BEGIN + 4)
+#define FMT_MARK_END (FMT_MARK_BEGIN + 5)
+
+/*--------------------------------------------------------------------
+ Beschreibung: globale String-Ressourcen
+ --------------------------------------------------------------------*/
+
+#define STR_FLDUI FMT_MARK_END
+#define STR_INSERT STR_FLDUI
+#define STR_ALL (STR_FLDUI + 1)
+#define STR_EXTRA (STR_FLDUI + 2)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Buttons fuer Field-Edit-Dlg
+ --------------------------------------------------------------------*/
+
+#define BTN_FLDEDT_PREV STR_EXTRA
+#define BTN_FLDEDT_NEXT (STR_EXTRA + 1)
+#define PB_FLDEDT_ADDRESS (STR_EXTRA + 2)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Zusaetzliche Strings
+ --------------------------------------------------------------------*/
+
+#define STR_COND STR_EXTRA
+#define STR_TEXT (STR_EXTRA + 1)
+#define STR_DDE_CMD (STR_EXTRA + 2)
+#define STR_INSTEXT (STR_EXTRA + 3)
+#define STR_COMBCHRS_FT (STR_EXTRA + 4)
+#define STR_PROMPT (STR_EXTRA + 5)
+#define STR_MACNAME (STR_EXTRA + 6)
+#define STR_SETNO (STR_EXTRA + 7)
+#define STR_OFFSET (STR_EXTRA + 8)
+#define STR_VALUE (STR_EXTRA + 9)
+
+#define STR_URLPROMPT (STR_EXTRA + 11)
+#define STR_FORMULA (STR_EXTRA + 12)
+#define STR_ALL_DATABASE (STR_EXTRA + 13)
+#define STR_FLD_EDIT_DLG (STR_EXTRA + 14)
+
+#define FLDDLG_ACT_END (STR_FLD_EDIT_DLG)
+
+
+#endif
diff --git a/sw/inc/fldupde.hxx b/sw/inc/fldupde.hxx
new file mode 100644
index 000000000000..72cb44d0224c
--- /dev/null
+++ b/sw/inc/fldupde.hxx
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fldupde.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLDUPDE_HXX
+#define _FLDUPDE_HXX
+
+enum SwFldUpdateFlags
+{
+ AUTOUPD_OFF,
+ AUTOUPD_FIELD_ONLY,
+ AUTOUPD_FIELD_AND_CHARTS,
+ AUTOUPD_GLOBALSETTING
+};
+
+
+#endif
diff --git a/sw/inc/flyenum.hxx b/sw/inc/flyenum.hxx
new file mode 100644
index 000000000000..3c1af69f1aa0
--- /dev/null
+++ b/sw/inc/flyenum.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: flyenum.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLYENUM_HXX
+#define _FLYENUM_HXX
+
+enum FlyCntType
+{
+ FLYCNTTYPE_ALL = 0,
+ FLYCNTTYPE_FRM,
+ FLYCNTTYPE_GRF,
+ FLYCNTTYPE_OLE
+
+};
+
+//Returnwerte fuer Chainable und Chain
+#define SW_CHAIN_OK 0
+#define SW_CHAIN_NOT_EMPTY 1 //Nur leere Frames duerfen connected werden
+#define SW_CHAIN_IS_IN_CHAIN 2 //Destination ist bereits in einer chain
+#define SW_CHAIN_WRONG_AREA 3 //Destination steht in einer nicht erlaubten
+ //Section (Kopf-/Fusszeile)
+#define SW_CHAIN_NOT_FOUND 4 //Destination und/oder Source nicht gefunden
+#define SW_CHAIN_SOURCE_CHAINED 5 //Source hat bereits einen Follow
+#define SW_CHAIN_SELF 6 //Sich selbst zu verketten ist
+ //natuerlich nicht erleubt.
+
+
+
+#endif
+
+
diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx
new file mode 100644
index 000000000000..287e6544712b
--- /dev/null
+++ b/sw/inc/flypos.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: flypos.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FLYPOS_HXX
+#define _FLYPOS_HXX
+
+
+#include <svtools/svarray.hxx>
+#include <swdllapi.h>
+
+class SwFrmFmt;
+class SwNodeIndex;
+
+// Struktur zum Erfragen der akt. freifliegenden Rahmen am Dokument.
+class SW_DLLPUBLIC SwPosFlyFrm
+{
+ const SwFrmFmt* pFrmFmt; // das FlyFrmFmt
+// SwPosition* pPos; // Position in den ContentNode
+ SwNodeIndex* pNdIdx; // es reicht ein Index auf den Node
+ UINT32 nOrdNum;
+public:
+ SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, USHORT nArrPos );
+ virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!)
+
+ // operatoren fuer das Sort-Array
+ BOOL operator==( const SwPosFlyFrm& );
+ BOOL operator<( const SwPosFlyFrm& );
+
+ const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
+ const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
+ UINT32 GetOrdNum() const { return nOrdNum; }
+};
+
+typedef SwPosFlyFrm* SwPosFlyFrmPtr;
+SV_DECL_PTRARR_SORT_VISIBILITY( SwPosFlyFrms, SwPosFlyFrmPtr, 0, 40, SW_DLLPUBLIC )
+
+#endif // _FLYPOS_HXX
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
new file mode 100644
index 000000000000..fd6975205347
--- /dev/null
+++ b/sw/inc/fmtanchr.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtanchr.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTANCHR_HXX
+#define _FMTANCHR_HXX
+
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <format.hxx>
+#include <svtools/poolitem.hxx>
+
+struct SwPosition;
+class IntlWrapper;
+#define IVER_FMTANCHOR_LONGIDX ((USHORT)1)
+
+//FlyAnchor, Anker des Freifliegenden Rahmen ----
+
+class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
+{
+ SwPosition *pCntntAnchor; //0 Fuer Seitengebundene Rahmen.
+ //Index fuer Absatzgebundene Rahmen.
+ //Position fuer Zeichengebundene Rahmen
+ RndStdIds nAnchorId;
+ USHORT nPageNum; //Seitennummer bei Seitengeb. Rahmen.
+
+ // OD 2004-05-05 #i28701# - getting anchor positions ordered
+ sal_uInt32 mnOrder;
+ static sal_uInt32 mnOrderCounter;
+
+public:
+ SwFmtAnchor( RndStdIds eRnd = FLY_PAGE, USHORT nPageNum = 0 );
+ SwFmtAnchor( const SwFmtAnchor &rCpy );
+ ~SwFmtAnchor();
+
+ // Zuweisungsoperator
+ SwFmtAnchor &operator=( const SwFmtAnchor& );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ RndStdIds GetAnchorId() const { return nAnchorId; }
+ USHORT GetPageNum() const { return nPageNum; }
+ const SwPosition *GetCntntAnchor() const { return pCntntAnchor; }
+ // OD 2004-05-05 #i28701#
+ sal_uInt32 GetOrder() const;
+
+ void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
+ void SetPageNum( USHORT nNew ) { nPageNum = nNew; }
+ void SetAnchor( const SwPosition *pPos );
+};
+
+inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const
+ { return (const SwFmtAnchor&)Get( RES_ANCHOR,bInP); }
+
+ inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const
+ { return aSet.GetAnchor(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
new file mode 100644
index 000000000000..1d4df2210f15
--- /dev/null
+++ b/sw/inc/fmtautofmt.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtautofmt.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTAUTOFMT_HXX
+#define _FMTAUTOFMT_HXX
+
+
+#include <svtools/poolitem.hxx>
+#include <format.hxx>
+#include <boost/shared_ptr.hpp>
+
+// ATT_AUTOFMT *********************************************
+
+
+class SwFmtAutoFmt: public SfxPoolItem
+{
+ boost::shared_ptr<SfxItemSet> mpHandle;
+
+public:
+ SwFmtAutoFmt( USHORT nWhich = RES_TXTATR_AUTOFMT );
+
+ // single argument ctors shall be explicit.
+ virtual ~SwFmtAutoFmt();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtAutoFmt( const SwFmtAutoFmt& rAttr );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtAutoFmt & operator= (const SwFmtAutoFmt &);
+public:
+
+ TYPEINFO();
+
+ // "pure virtual methods" of SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ void SetStyleHandle( boost::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; }
+ const boost::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; }
+ boost::shared_ptr<SfxItemSet> GetStyleHandle() { return mpHandle; }
+};
+
+#endif
+
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
new file mode 100644
index 000000000000..c10898ca5716
--- /dev/null
+++ b/sw/inc/fmtclbl.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtclbl.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTCLBL_HXX
+#define _FMTCLBL_HXX
+
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class SW_DLLPUBLIC SwFmtNoBalancedColumns : public SfxBoolItem
+{
+public:
+ SwFmtNoBalancedColumns( BOOL bFlag = FALSE )
+ : SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+
+inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(BOOL bInP) const
+ { return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
+
+inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(BOOL bInP) const
+ { return aSet.GetBalancedColumns( bInP ); }
+
+#endif
+
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
new file mode 100644
index 000000000000..3a4069f22acb
--- /dev/null
+++ b/sw/inc/fmtclds.hxx
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtclds.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTCLDS_HXX
+#define _FMTCLDS_HXX
+
+#include <tools/color.hxx>
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+//Der ColumnDescriptor --------------------------
+
+class SwColumn
+{
+ USHORT nWish; //Wunschbreite incl. Raender.
+ //Verhaelt sich proportional zum Verhaeltniss:
+ //Wunschbreite der Umgebung / aktuelle Breite der Spalte
+ USHORT nUpper; //Oberer Rand
+ USHORT nLower; //Unterer Rand
+ USHORT nLeft; //Linker Rand
+ USHORT nRight; //Rechter Rand
+
+public:
+ SwColumn();
+
+ BOOL operator==( const SwColumn & );
+
+
+ void SetWishWidth( USHORT nNew ) { nWish = nNew; }
+ void SetUpper( USHORT nNew ) { nUpper = nNew; }
+ void SetLower( USHORT nNew ) { nLower = nNew; }
+ void SetLeft ( USHORT nNew ) { nLeft = nNew; }
+ void SetRight( USHORT nNew ) { nRight = nNew; }
+
+ USHORT GetWishWidth() const { return nWish; }
+ USHORT GetUpper() const { return nUpper; }
+ USHORT GetLower() const { return nLower; }
+ USHORT GetLeft () const { return nLeft; }
+ USHORT GetRight() const { return nRight; }
+};
+
+typedef SwColumn* SwColumnPtr;
+SV_DECL_PTRARR_DEL( SwColumns, SwColumnPtr, 0, 2 )
+
+enum SwColLineAdj
+{
+ COLADJ_NONE,
+ COLADJ_TOP,
+ COLADJ_CENTER,
+ COLADJ_BOTTOM
+};
+
+class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
+{
+// Pen aPen; //Pen fuer die Linine zwischen den Spalten
+ ULONG nLineWidth; //width of the separator line
+ Color aLineColor; //color of the separator line
+
+ BYTE nLineHeight; //Prozentuale Hoehe der Linien
+ //(Relativ zu der Hoehe der Spalten incl. UL).
+ SwColLineAdj eAdj; //Linie wird oben, mittig oder unten ausgerichtet.
+
+ SwColumns aColumns; //Informationen fuer die einzelnen Spalten.
+ USHORT nWidth; //Gesamtwunschbreite aller Spalten.
+
+ BOOL bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
+ //der GutterWidth eine 'optische Verteilung'
+ //vorgenommen.
+ //Es muss zurueckgesetzt werden wenn an den
+ //Spaltenbreiten bzw. den Raendern gedreht wird.
+ //Wenn es wieder gesetzt wird wird automatisch neu
+ //gemischt (optisch verteilt).
+ //Das Flag ist initial gesetzt.
+
+ SW_DLLPRIVATE void Calc( USHORT nGutterWidth, USHORT nAct );
+
+public:
+ SwFmtCol();
+ SwFmtCol( const SwFmtCol& );
+ ~SwFmtCol();
+
+ SwFmtCol& operator=( const SwFmtCol& );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ const SwColumns &GetColumns() const { return aColumns; }
+ SwColumns &GetColumns() { return aColumns; }
+ USHORT GetNumCols() const { return aColumns.Count(); }
+// const Pen& GetLinePen() const { return aPen; }
+ ULONG GetLineWidth() const { return nLineWidth;}
+ const Color& GetLineColor() const { return aLineColor;}
+
+
+ SwColLineAdj GetLineAdj() const { return eAdj; }
+ BOOL IsOrtho() const { return bOrtho; }
+ USHORT GetWishWidth() const { return nWidth; }
+ BYTE GetLineHeight()const { return nLineHeight; }
+
+ //Return USHRT_MAX wenn uneindeutig.
+ //Return die kleinste Breite wenn bMin True ist.
+ USHORT GetGutterWidth( BOOL bMin = FALSE ) const;
+
+// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
+ void SetLineWidth(ULONG nLWidth) { nLineWidth = nLWidth;}
+ void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
+ void SetLineHeight( BYTE nNew ) { nLineHeight = nNew; }
+ void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
+ void SetWishWidth( USHORT nNew ) { nWidth = nNew; }
+
+ //Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
+ //werden. Das Ortho Flag wird automatisch gesetzt.
+ void Init( USHORT nNumCols, USHORT nGutterWidth, USHORT nAct );
+
+ //Stellt die Raender fuer die Spalten in aColumns ein.
+ //Wenn das Flag bOrtho gesetzt ist, werden die Spalten neu optisch
+ //verteilt. Ist das Flag nicht gesetzt werden die Spaltenbreiten nicht
+ //veraendert und die Raender werden einfach eingestellt.
+ void SetGutterWidth( USHORT nNew, USHORT nAct );
+
+ //Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
+ //nur dann wird auch der zweite Param. benoetigt und beachtet.
+ void SetOrtho( BOOL bNew, USHORT nGutterWidth, USHORT nAct );
+
+ //Fuer den Reader
+ void _SetOrtho( BOOL bNew ) { bOrtho = bNew; }
+
+ //Berechnet die aktuelle Breite der Spalte nCol.
+ //Das Verhaeltniss von Wunschbreite der Spalte zum Returnwert ist
+ //proportional zum Verhaeltniss des Gesamtwunschwertes zu nAct.
+ USHORT CalcColWidth( USHORT nCol, USHORT nAct ) const;
+
+ //Wie oben, aber es wir die Breite der PrtArea - also das was fuer
+ //den Anwender die Spalte ist - geliefert.
+ USHORT CalcPrtColWidth( USHORT nCol, USHORT nAct ) const;
+};
+
+inline const SwFmtCol &SwAttrSet::GetCol(BOOL bInP) const
+ { return (const SwFmtCol&)Get( RES_COL,bInP); }
+
+inline const SwFmtCol &SwFmt::GetCol(BOOL bInP) const
+ { return aSet.GetCol(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
new file mode 100644
index 000000000000..d229f91b8b78
--- /dev/null
+++ b/sw/inc/fmtcnct.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtcnct.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTCNCT_HXX
+#define _FMTCNCT_HXX
+
+#include <hintids.hxx>
+#include <svtools/poolitem.hxx>
+#include <format.hxx>
+#include <calbck.hxx>
+
+
+class SwFlyFrmFmt;
+class IntlWrapper;
+
+//Verbindung (Textfluss) zwischen zwei FlyFrms
+
+class SW_DLLPUBLIC SwFmtChain: public SfxPoolItem
+{
+ SwClient aPrev, //Vorgaenger (SwFlyFrmFmt), wenn es diesen gibt.
+ aNext; //Nachfolger (SwFlyFrmFmt), wenn es diesen gibt.
+
+
+public:
+ SwFmtChain() : SfxPoolItem( RES_CHAIN ) {}
+ SwFmtChain( const SwFmtChain &rCpy );
+
+ inline SwFmtChain &operator=( const SwFmtChain& );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+
+ SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
+ SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
+
+
+ void SetPrev( SwFlyFrmFmt *pFmt );
+ void SetNext( SwFlyFrmFmt *pFmt );
+};
+
+SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
+{
+ SetPrev( rCpy.GetPrev() );
+ SetNext( rCpy.GetNext() );
+ return *this;
+}
+
+
+inline const SwFmtChain &SwAttrSet::GetChain(BOOL bInP) const
+ { return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
+
+inline const SwFmtChain &SwFmt::GetChain(BOOL bInP) const
+ { return aSet.GetChain(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
new file mode 100644
index 000000000000..c5b262331e44
--- /dev/null
+++ b/sw/inc/fmtcntnt.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtcntnt.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTCNTNT_HXX
+#define _FMTCNTNT_HXX
+
+#include <svtools/poolitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+class SwNodeIndex;
+class SwStartNode;
+
+//Cntnt, Inhalt des Frame (Header, Footer, Fly) ----
+
+class SW_DLLPUBLIC SwFmtCntnt: public SfxPoolItem
+{
+ SwNodeIndex *pStartNode;
+
+ SwFmtCntnt &operator=( const SwFmtCntnt & ); //Kopieren verboten
+
+public:
+// SwFmtCntnt( const SwNodeIndex *pStartNodeIdx = 0 );
+ SwFmtCntnt( const SwStartNode* pStartNode = 0 );
+ SwFmtCntnt( const SwFmtCntnt &rCpy );
+ ~SwFmtCntnt();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ const SwNodeIndex *GetCntntIdx() const { return pStartNode; }
+ void SetNewCntntIdx( const SwNodeIndex *pIdx );
+};
+
+inline const SwFmtCntnt &SwAttrSet::GetCntnt(BOOL bInP) const
+ { return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
+
+inline const SwFmtCntnt &SwFmt::GetCntnt(BOOL bInP) const
+ { return aSet.GetCntnt(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
new file mode 100644
index 000000000000..d06a64cf9bfd
--- /dev/null
+++ b/sw/inc/fmtcol.hxx
@@ -0,0 +1,307 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtcol.hxx,v $
+ * $Revision: 1.13.144.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTCOL_HXX
+#define _FMTCOL_HXX
+
+#include <svtools/svarray.hxx>
+#include "swdllapi.h"
+#include <format.hxx>
+#include <swtypes.hxx> // fuer MAXLEVEL
+
+class SwDoc; // fuer friend
+
+class SwFmtColl : public SwFmt
+{
+protected:
+ SwFmtColl( SwAttrPool& rPool, const sal_Char* pFmtName,
+ const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
+ USHORT nFmtWhich )
+ : SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
+ { SetAuto( FALSE ); }
+
+ SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
+ const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
+ USHORT nFmtWhich )
+ : SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
+ { SetAuto( FALSE ); }
+
+
+private:
+ // erstmal wird nicht kopiert und nicht zugewiesen
+ SwFmtColl(const SwFmtColl & );
+ const SwFmtColl &operator=(const SwFmtColl &);
+};
+
+
+class SW_DLLPUBLIC SwTxtFmtColl: public SwFmtColl
+{
+ friend class SwDoc;
+
+ SwTxtFmtColl(const SwTxtFmtColl & rRef);
+
+ // --> OD 2007-01-24 #i73790#
+ bool mbStayAssignedToListLevelOfOutlineStyle;
+ // <--
+
+protected:
+ //BYTE nOutlineLevel; //<-#outline level, removed by zhaojianwei
+ bool mbAssignedToOutlineStyle;//<-#outline level added by zhaojianwei
+
+ SwTxtFmtColl *pNextTxtFmtColl;
+
+ SwTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0,
+ USHORT nFmtWh = RES_TXTFMTCOLL )
+ : SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange,
+ pDerFrom, nFmtWh ),
+ // --> OD 2007-01-24 #i73790#
+ mbStayAssignedToListLevelOfOutlineStyle( false ),
+ // <--
+ //nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
+ mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
+ { pNextTxtFmtColl = this; }
+
+ SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0,
+ USHORT nFmtWh = RES_TXTFMTCOLL )
+ : SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
+ pDerFrom, nFmtWh ),
+ // --> OD 2007-01-24 #i73790#
+ mbStayAssignedToListLevelOfOutlineStyle( false ),
+ // <--
+ //nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
+ mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
+ { pNextTxtFmtColl = this; }
+public:
+
+ // zum "abfischen" von UL-/LR-/FontHeight Aenderungen
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
+ SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
+
+ BOOL IsAtDocNodeSet() const;
+
+ // --> OD 2006-11-22 #i71574#
+ //<-#outline level,zhaojianwei
+ void SetAttrOutlineLevel( int );
+ int GetAttrOutlineLevel() const;
+ int GetAssignedOutlineStyleLevel() const;
+ inline bool IsAssignedToListLevelOfOutlineStyle() const
+ {
+ return mbAssignedToOutlineStyle;
+ }
+ void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel);
+ void DeleteAssignmentToListLevelOfOutlineStyle();
+ //<-end
+ // <--
+
+ // --> OD 2008-03-04 #refactorlists#
+ // override to recognize changes on the <SwNumRuleItem> and register/unregister
+ // the paragragh style at the corresponding <SwNumRule> instance
+ virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ // <--
+
+ // --> OD 2007-01-24 #i73790#
+ // override <ResetAllFmtAttr()> to stay assigned to list level of outline style
+ virtual USHORT ResetAllFmtAttr();
+
+ inline bool StayAssignedToListLevelOfOutlineStyle() const
+ {
+ return mbStayAssignedToListLevelOfOutlineStyle;
+ }
+ // <--
+
+ // --> OD 2008-02-13 #newlistleveattrs#
+ bool AreListLevelIndentsApplicable() const;
+ // <--
+
+/*----------------- JP 09.08.94 17:36 -------------------
+ wird die Funktionalitaet von Zeichenvorlagen an Absatzvorlagen
+ ueberhaupt benoetigt ??
+
+ Wenn, ja dann muessen im TextNode und hier in der TxtCollection ein 2.
+ Attset fuer die Char-Attribute angelegt werden; damit die Vererbung
+ und der Zugriff auf die gesetzen Attribute richtig funktioniert!!
+
+ virtual BOOL SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
+
+ inline SwCharFmt* GetCharFmt() const;
+ inline BOOL IsCharFmtSet() const;
+ void SetCharFmt(SwCharFmt *);
+ void ResetCharFmt();
+inline BOOL SwTxtFmtColl::IsCharFmtSet() const
+{
+ return aCharDepend.GetRegisteredIn() ? TRUE : FALSE;
+}
+inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
+{
+ return (SwCharFmt*)aCharDepend.GetRegisteredIn();
+}
+--------------------------------------------------*/
+};
+
+typedef SwTxtFmtColl* SwTxtFmtCollPtr;
+SV_DECL_PTRARR(SwTxtFmtColls,SwTxtFmtCollPtr,2,4)
+
+
+class SwGrfFmtColl: public SwFmtColl
+{
+ friend class SwDoc;
+protected:
+ SwGrfFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
+ SwGrfFmtColl* pDerFrom = 0 )
+ : SwFmtColl( rPool, pFmtCollName, aGrfFmtCollSetRange,
+ pDerFrom, RES_GRFFMTCOLL )
+ {}
+
+ SwGrfFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwGrfFmtColl* pDerFrom = 0 )
+ : SwFmtColl( rPool, rFmtCollName, aGrfFmtCollSetRange,
+ pDerFrom, RES_GRFFMTCOLL )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+};
+
+typedef SwGrfFmtColl* SwGrfFmtCollPtr;
+SV_DECL_PTRARR(SwGrfFmtColls,SwGrfFmtCollPtr,2,4)
+
+
+
+//FEATURE::CONDCOLL
+// --------- Bedingte Vorlagen -------------------------------
+
+enum Master_CollConditions
+{
+ PARA_IN_LIST = 0x0001,
+ PARA_IN_OUTLINE = 0x0002,
+ PARA_IN_FRAME = 0x0004,
+ PARA_IN_TABLEHEAD = 0x0008,
+ PARA_IN_TABLEBODY = 0x0010,
+ PARA_IN_SECTION = 0x0020,
+ PARA_IN_FOOTENOTE = 0x0040,
+ PARA_IN_FOOTER = 0x0080,
+ PARA_IN_HEADER = 0x0100,
+ PARA_IN_ENDNOTE = 0x0200,
+ // ...
+ USRFLD_EXPRESSION = (int)0x8000
+};
+
+
+class SW_DLLPUBLIC SwCollCondition : public SwClient
+{
+ ULONG nCondition;
+ union
+ {
+ ULONG nSubCondition;
+ String* pFldExpression;
+ } aSubCondition;
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+
+ SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+ ULONG nSubCond = 0 );
+ SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+ const String& rSubExp );
+ virtual ~SwCollCondition();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwCollCondition( const SwCollCondition& rCpy );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwCollCondition & operator= (const SwCollCondition &);
+public:
+
+ int operator==( const SwCollCondition& rCmp ) const;
+ int operator!=( const SwCollCondition& rCmp ) const
+ { return ! (*this == rCmp); }
+
+ ULONG GetCondition() const { return nCondition; }
+ ULONG GetSubCondition() const { return aSubCondition.nSubCondition; }
+ const String* GetFldExpression() const
+ { return aSubCondition.pFldExpression; }
+
+ void SetCondition( ULONG nCond, ULONG nSubCond );
+ SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
+};
+
+
+typedef SwCollCondition* SwCollConditionPtr;
+SV_DECL_PTRARR_DEL( SwFmtCollConditions, SwCollConditionPtr, 0, 5 )
+
+class SW_DLLPUBLIC SwConditionTxtFmtColl : public SwTxtFmtColl
+{
+ friend class SwDoc;
+protected:
+ SwFmtCollConditions aCondColls;
+
+ SwConditionTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0 )
+ : SwTxtFmtColl( rPool, pFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL )
+ {}
+ SwConditionTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0 )
+ : SwTxtFmtColl( rPool, rFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual ~SwConditionTxtFmtColl();
+
+ // zum "abfischen" von Aenderungen
+// virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
+ const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
+ void InsertCondition( const SwCollCondition& rCond );
+ BOOL RemoveCondition( const SwCollCondition& rCond );
+
+ void SetConditions( const SwFmtCollConditions& );
+};
+
+//FEATURE::CONDCOLL
+
+// ------------- Inline Implementierungen --------------------
+
+inline void SwTxtFmtColl::SetNextTxtFmtColl( SwTxtFmtColl& rNext )
+{
+ pNextTxtFmtColl = &rNext;
+}
+#endif
+
diff --git a/sw/inc/fmtcolfunc.hxx b/sw/inc/fmtcolfunc.hxx
new file mode 100644
index 000000000000..e0fd8d490ee5
--- /dev/null
+++ b/sw/inc/fmtcolfunc.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtcolfunc.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTCOLFUNC_HXX
+#define _FMTCOLFUNC_HXX
+
+class SwFmt;
+class SwNumRuleItem;
+
+// namespace <TxtFmtCollFunc> for functions and procedures working on
+// paragraph styles (instances of <SwTxtFmtColl>
+namespace TxtFmtCollFunc
+{
+ /** Checks, if assignment of paragraph style to list level of outline style
+ has to be deleted, and deletes the assignment, if needed.
+
+ OD 2006-11-22 #i71574#
+ The assignment of a paragraph style to a list level of the outline style
+ has to be deleted, if the numbering rule, which is set at the paragraph
+ style isn't the outline style.
+
+ @author OD
+ */
+ void CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle(
+ SwFmt* pFmt,
+ const SwNumRuleItem* pNewNumRuleItem = 0L );
+
+ /** determines the list style, which directly set at the given paragraph style
+
+ OD 2008-03-04 #refactorlists#
+
+ @author OD
+
+ @param rTxtFmtColl
+ input parameter - paragraph style for which the list style should be retrieved
+
+ @return pointer to <SwNumRule> instance, if the given paragraph style
+ has directly set a list style, 0 otherwise
+ */
+ SwNumRule* GetNumRule( SwTxtFmtColl& rTxtFmtColl );
+
+ /** adds the given paragraph style at the directly set list style
+
+ OD 2008-03-04 #refactorlists#
+ Note: If the given paragraph style has no directly set list style, nothing happens
+
+ @param rTxtFmtColl
+ input parameter - paragraph style which is added to its directly set list style
+
+ @author OD
+ */
+ void AddToNumRule( SwTxtFmtColl& rTxtFmtColl );
+
+ /** removes te given paragraph style from the directly set list style
+
+ OD 2008-03-04 #refactorlists#
+ Note: If the given paragraph style has no directly set list style, nothing happens
+
+ @param rTxtFmtColl
+ input parameter - paragraph style which is removed from its directly set list style
+
+ @author OD
+ */
+ void RemoveFromNumRule( SwTxtFmtColl& rTxtFmtColl );
+}
+#endif
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
new file mode 100644
index 000000000000..a45e9fafc495
--- /dev/null
+++ b/sw/inc/fmteiro.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmteiro.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTEIRO_HXX
+#define _FMTEIRO_HXX
+
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtEditInReadonly : public SfxBoolItem
+{
+public:
+ SwFmtEditInReadonly( USHORT nId = RES_EDIT_IN_READONLY,
+ BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(BOOL bInP) const
+ { return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
+
+inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(BOOL bInP) const
+ { return aSet.GetEditInReadonly(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
new file mode 100644
index 000000000000..c018e8c31c14
--- /dev/null
+++ b/sw/inc/fmtflcnt.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtflcnt.hxx,v $
+ * $Revision: 1.6.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFLCNT_HXX
+#define _FMTFLCNT_HXX
+
+
+#include <svtools/poolitem.hxx>
+
+class SwFrmFmt;
+class SwTxtFlyCnt;
+// ATT_FLYCNT *******************************************************
+
+class SwFmtFlyCnt : public SfxPoolItem
+{
+ friend class SwTxtFlyCnt;
+ SwTxtFlyCnt* pTxtAttr; // mein TextAttribut
+ SwFrmFmt* pFmt; // mein Fly/DrawFrame-Format
+ // geschuetzter CopyCtor
+ SwFmtFlyCnt& operator=(const SwFmtFlyCnt& rFlyCnt);
+
+public:
+ SwFmtFlyCnt( SwFrmFmt *pFrmFmt );
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ inline SwFrmFmt *GetFrmFmt() const { return pFmt; }
+ // fuer Undo: loesche "logisch" das FlyFrmFormat, wird sich im
+ // Undo-Object gemerkt.
+ inline void SetFlyFmt( SwFrmFmt* pNew = 0 ) { pFmt = pNew; }
+
+ const SwTxtFlyCnt *GetTxtFlyCnt() const { return pTxtAttr; }
+ SwTxtFlyCnt *GetTxtFlyCnt() { return pTxtAttr; }
+
+ // OD 27.06.2003 #108784#
+ bool Sw3ioExportAllowed() const;
+};
+
+#endif
+
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
new file mode 100644
index 000000000000..2ca982e80c0b
--- /dev/null
+++ b/sw/inc/fmtfld.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtfld.hxx,v $
+ * $Revision: 1.9.118.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFLD_HXX
+#define _FMTFLD_HXX
+
+#include <svtools/poolitem.hxx>
+#include <svtools/brdcst.hxx>
+#include <svtools/smplhint.hxx>
+
+#include "swdllapi.h"
+#include <calbck.hxx>
+
+class SwField;
+class SwTxtFld;
+class SwView;
+
+// ATT_FLD ***********************************
+class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
+{
+ friend class SwTxtFld;
+ friend void _InitCore();
+
+ SwField *pField;
+ SwTxtFld* pTxtAttr; // mein TextAttribut
+
+ SwFmtFld(); // das default-Attibut
+
+ // geschuetzter CopyCtor
+ // @@@ copy construction allowed, but copy assignment is not? @@@
+ SwFmtFld& operator=(const SwFmtFld& rFld);
+
+public:
+ TYPEINFO();
+
+ // single argument constructors shall be explicit.
+ explicit SwFmtFld( const SwField &rFld );
+
+ // @@@ copy construction allowed, but copy assignment is not? @@@
+ SwFmtFld( const SwFmtFld& rAttr );
+
+ virtual ~SwFmtFld();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ const SwField *GetFld() const { return pField; }
+ SwField *GetFld() { return pField; }
+
+ // #111840#
+ /**
+ Sets current field.
+
+ @param pField new field
+
+ @attention The current field will be destroyed before setting the new field.
+ */
+ void SetFld(SwField * pField);
+
+ const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
+ SwTxtFld *GetTxtFld() { return pTxtAttr; }
+
+ BOOL IsFldInDoc() const;
+ BOOL IsProtect() const;
+};
+
+class SW_DLLPUBLIC SwFmtFldHint : public SfxHint
+{
+#define SWFMTFLD_INSERTED 1
+#define SWFMTFLD_REMOVED 2
+#define SWFMTFLD_FOCUS 3
+#define SWFMTFLD_CHANGED 4
+#define SWFMTFLD_LANGUAGE 5
+
+ const SwFmtFld* pFld;
+ sal_Int16 nWhich;
+ const SwView* pView;
+
+public:
+ SwFmtFldHint( const SwFmtFld* p, sal_Int16 n, const SwView* pV = 0)
+ : pFld(p)
+ , nWhich(n)
+ , pView(pV)
+ {}
+
+ TYPEINFO();
+ const SwFmtFld* GetField() const { return pFld; }
+ sal_Int16 Which() const { return nWhich; }
+ const SwView* GetView() const { return pView; }
+};
+
+#endif
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
new file mode 100644
index 000000000000..a33cf8a16475
--- /dev/null
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtfollowtextflow.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFOLLOWTEXTFLOW_HXX
+#define _FMTFOLLOWTEXTFLOW_HXX
+
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtFollowTextFlow : public SfxBoolItem
+{
+public:
+ SwFmtFollowTextFlow( BOOL bFlag = FALSE )
+ : SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag ) {}
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+
+#if !(defined(MACOSX) && ( __GNUC__ < 3 ))
+// GrP moved to gcc_outl.cxx; revisit with gcc3
+inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(BOOL bInP) const
+ { return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
+
+inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(BOOL bInP) const
+ { return aSet.GetFollowTextFlow( bInP ); }
+#endif
+
+#endif
+
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
new file mode 100644
index 000000000000..93107807d1cd
--- /dev/null
+++ b/sw/inc/fmtfordr.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtfordr.hxx,v $
+ * $Revision: 1.8.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFORDR_HXX
+#define _FMTFORDR_HXX
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+//Die FillOrder ---------------------------------
+
+enum SwFillOrder
+{
+ SW_FILL_ORDER_BEGIN,
+ ATT_TOP_DOWN = SW_FILL_ORDER_BEGIN,
+ ATT_BOTTOM_UP,
+ ATT_LEFT_TO_RIGHT,
+ ATT_RIGHT_TO_LEFT,
+ SW_FILL_ORDER_END
+};
+
+class SwFmtFillOrder: public SfxEnumItem
+{
+public:
+ SwFmtFillOrder( SwFillOrder = ATT_TOP_DOWN );
+ inline SwFmtFillOrder &operator=( const SwFmtFillOrder &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual USHORT GetValueCount() const;
+
+ SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
+};
+
+inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(BOOL bInP) const
+ { return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
+
+inline const SwFmtFillOrder &SwFmt::GetFillOrder(BOOL bInP) const
+ { return aSet.GetFillOrder(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
new file mode 100644
index 000000000000..b28e3ac94be1
--- /dev/null
+++ b/sw/inc/fmtfsize.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtfsize.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFSIZE_HXX
+#define _FMTFSIZE_HXX
+
+#include <tools/gen.hxx>
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+//Die Framesize ---------------------------------
+
+enum SwFrmSize
+{
+ ATT_VAR_SIZE, //Frm ist in der Var-Richtung variabel
+ ATT_FIX_SIZE, //Frm ist in der Var-Richtung unbeweglich
+ ATT_MIN_SIZE //Der Wert in der Var-Richtung beschreibt eine
+ //Minimalgroesse, die nicht unter- wohl aber
+ //ueberschritten werden kann.
+};
+
+class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
+{
+ Size aSize;
+ SwFrmSize eFrmHeightType;
+ SwFrmSize eFrmWidthType;
+ BYTE nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
+ BYTE nHeightPercent; //angegeben sein.
+ //Fuer Rahmen koennen Hoehe und/oder Breite
+ //in Prozent angegeben sein. Wenn nur eine
+ //der Angaben in Prozent angeben ist, kann
+ //durch den ausgezeichneten Wert 0xFF in der
+ //anderen Prozentangabe bestimmt werden, das
+ //sich diese Richtung proportional zur anderen
+ //verhaelt. Basis fuer die Umrechnung sind fuer
+ //diesen Fall die Angaben in der Size.
+ //Die Prozentwerte beziehen sich immer auf die
+ //Umgebung in der das Objekt steht (PrtArea)
+ //Auf die Bildschirmbreite abzueglich Raender
+ //in der BrowseView wenn die Umgebung die Seite
+ //ist.
+public:
+ SwFmtFrmSize( SwFrmSize eSize = ATT_VAR_SIZE,
+ SwTwips nWidth = 0, SwTwips nHeight = 0 );
+ SwFmtFrmSize& operator=( const SwFmtFrmSize& rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ SwFrmSize GetHeightSizeType() const { return eFrmHeightType; }
+ void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; }
+
+ SwFrmSize GetWidthSizeType() const { return eFrmWidthType; }
+ void SetWidthSizeType( SwFrmSize eSize ) { eFrmWidthType = eSize; }
+
+ const Size& GetSize() const { return aSize; }
+ void SetSize( const Size &rNew ) { aSize = rNew; }
+
+ SwTwips GetHeight() const { return aSize.Height(); }
+ SwTwips GetWidth() const { return aSize.Width(); }
+ void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; }
+ void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; }
+
+ BYTE GetHeightPercent() const{ return nHeightPercent; }
+ BYTE GetWidthPercent() const { return nWidthPercent; }
+ void SetHeightPercent( BYTE n ) { nHeightPercent = n; }
+ void SetWidthPercent ( BYTE n ) { nWidthPercent = n; }
+};
+
+inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(BOOL bInP) const
+ { return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
+
+inline const SwFmtFrmSize &SwFmt::GetFrmSize(BOOL bInP) const
+ { return aSet.GetFrmSize(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
new file mode 100644
index 000000000000..e31001ced75f
--- /dev/null
+++ b/sw/inc/fmtftn.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtftn.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFTN_HXX
+#define _FMTFTN_HXX
+
+#include <tools/string.hxx>
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+
+class SwDoc;
+class SwTxtFtn;
+
+// ATT_FTN **********************************************************
+
+class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
+{
+ friend class SwTxtFtn;
+ SwTxtFtn* pTxtAttr; //mein TextAttribut
+ String aNumber; //Benutzerdefinierte 'Nummer'
+ USHORT nNumber; //Automatische Nummerierung
+ bool m_bEndNote; // is it an End note?
+
+ // geschuetzter CopyCtor
+ SwFmtFtn& operator=(const SwFmtFtn& rFtn);
+ SwFmtFtn( const SwFmtFtn& );
+
+public:
+ SwFmtFtn( bool bEndNote = false );
+ virtual ~SwFmtFtn();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ const String &GetNumStr() const { return aNumber; }
+ const USHORT &GetNumber() const { return nNumber; }
+ bool IsEndNote() const { return m_bEndNote;}
+
+ void SetNumStr( const String& rStr ) { aNumber = rStr; }
+ void SetNumber( USHORT nNo ) { nNumber = nNo; }
+ void SetEndNote( bool b );
+
+ void SetNumber( const SwFmtFtn& rFtn )
+ { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
+
+ const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; }
+ SwTxtFtn *GetTxtFtn() { return pTxtAttr; }
+
+ void GetFtnText( String& rStr ) const;
+
+ // returnt den anzuzeigenden String der Fuss-/Endnote
+ String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
new file mode 100644
index 000000000000..8e95c4e7128a
--- /dev/null
+++ b/sw/inc/fmtftntx.hxx
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtftntx.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTFTNTX_HXX
+#define _FMTFTNTX_HXX
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include <numrule.hxx>
+#include "swdllapi.h"
+
+enum SwFtnEndPosEnum
+{
+ FTNEND_ATPGORDOCEND, // at page or document end
+ FTNEND_ATTXTEND, // at end of the current text end
+ FTNEND_ATTXTEND_OWNNUMSEQ, // -""- and with own number sequence
+ FTNEND_ATTXTEND_OWNNUMANDFMT, // -""- and with onw numberformat
+ FTNEND_ATTXTEND_END
+};
+
+
+class SW_DLLPUBLIC SwFmtFtnEndAtTxtEnd : public SfxEnumItem
+{
+ String sPrefix;
+ String sSuffix;
+ SvxNumberType aFmt;
+ USHORT nOffset;
+
+protected:
+ SwFmtFtnEndAtTxtEnd( USHORT nWhichL, SwFtnEndPosEnum ePos )
+ : SfxEnumItem( nWhichL, sal::static_int_cast< USHORT >(ePos) ), nOffset( 0 )
+ {}
+ SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr )
+ : SfxEnumItem( rAttr ), sPrefix( rAttr.sPrefix ),
+ sSuffix( rAttr.sSuffix ), aFmt( rAttr.aFmt ),
+ nOffset( rAttr.nOffset )
+ {}
+
+public:
+ virtual USHORT GetValueCount() const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+// will be used at time??
+// void FillVariable( SbxVariable &rVar,
+// SfxMapUnit eCoreMetric,
+// SfxMapUnit eUserMetric ) const;
+// virtual SfxArgumentError SetVariable( const SbxVariable &rVal,
+// SfxMapUnit eCoreMetric,
+// SfxMapUnit eUserMetric );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ inline BOOL IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
+
+ SwFmtFtnEndAtTxtEnd & operator=( const SwFmtFtnEndAtTxtEnd & rAttr );
+
+ sal_Int16 GetNumType() const { return aFmt.GetNumberingType(); }
+ void SetNumType( sal_Int16 eType ) { aFmt.SetNumberingType(eType); }
+
+ const SvxNumberType& GetSwNumType() const { return aFmt; }
+
+ USHORT GetOffset() const { return nOffset; }
+ void SetOffset( USHORT nOff ) { nOffset = nOff; }
+
+ const String& GetPrefix() const { return sPrefix; }
+ void SetPrefix(const String& rSet) { sPrefix = rSet; }
+
+ const String& GetSuffix() const { return sSuffix; }
+ void SetSuffix(const String& rSet) { sSuffix = rSet; }
+};
+
+class SW_DLLPUBLIC SwFmtFtnAtTxtEnd : public SwFmtFtnEndAtTxtEnd
+{
+public:
+ SwFmtFtnAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND )
+ : SwFmtFtnEndAtTxtEnd( RES_FTN_AT_TXTEND, ePos )
+ {}
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwFmtEndAtTxtEnd : public SwFmtFtnEndAtTxtEnd
+{
+public:
+ SwFmtEndAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND )
+ : SwFmtFtnEndAtTxtEnd( RES_END_AT_TXTEND, ePos )
+ {
+ SetNumType( SVX_NUM_ROMAN_LOWER );
+ }
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(BOOL bInP) const
+ { return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
+inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(BOOL bInP) const
+ { return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
+
+
+inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(BOOL bInP) const
+ { return aSet.GetFtnAtTxtEnd(bInP); }
+inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(BOOL bInP) const
+ { return aSet.GetEndAtTxtEnd(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
new file mode 100644
index 000000000000..d6661c9d4ddc
--- /dev/null
+++ b/sw/inc/fmthdft.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmthdft.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTHDFT_HXX
+#define _FMTHDFT_HXX
+
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svtools/poolitem.hxx>
+#include <calbck.hxx>
+
+class SwFrmFmt;
+class IntlWrapper;
+
+
+//Kopfzeile, fuer Seitenformate
+//Client von FrmFmt das den Header beschreibt.
+
+class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
+{
+ BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+
+public:
+ SwFmtHeader( BOOL bOn = FALSE );
+ SwFmtHeader( SwFrmFmt *pHeaderFmt );
+ SwFmtHeader( const SwFmtHeader &rCpy );
+ ~SwFmtHeader();
+ SwFmtHeader& operator=( const SwFmtHeader &rCpy );
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
+
+ BOOL IsActive() const { return bActive; }
+ void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+};
+
+//Fusszeile, fuer Seitenformate
+//Client von FrmFmt das den Footer beschreibt.
+
+class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
+{
+ BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+
+public:
+ SwFmtFooter( BOOL bOn = FALSE );
+ SwFmtFooter( SwFrmFmt *pFooterFmt );
+ SwFmtFooter( const SwFmtFooter &rCpy );
+ ~SwFmtFooter();
+ SwFmtFooter& operator=( const SwFmtFooter &rCpy );
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
+
+ BOOL IsActive() const { return bActive; }
+ void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+};
+
+inline const SwFmtHeader &SwAttrSet::GetHeader(BOOL bInP) const
+ { return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
+inline const SwFmtFooter &SwAttrSet::GetFooter(BOOL bInP) const
+ { return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
+
+inline const SwFmtHeader &SwFmt::GetHeader(BOOL bInP) const
+ { return aSet.GetHeader(bInP); }
+inline const SwFmtFooter &SwFmt::GetFooter(BOOL bInP) const
+ { return aSet.GetFooter(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
new file mode 100644
index 000000000000..8efd538ca6e3
--- /dev/null
+++ b/sw/inc/fmtinfmt.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtinfmt.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTINFMT_HXX
+#define _FMTINFMT_HXX
+
+#include <tools/string.hxx>
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+
+class SvxMacro;
+class SvxMacroTableDtor;
+class SwTxtINetFmt;
+class IntlWrapper;
+
+// ATT_INETFMT *********************************************
+
+class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
+{
+ friend class SwTxtINetFmt;
+
+ String aURL; // die URL
+ String aTargetFrame; // in diesen Frame soll die URL
+ String aINetFmt;
+ String aVisitedFmt;
+ String aName; // Name des Links
+ SvxMacroTableDtor* pMacroTbl;
+ SwTxtINetFmt* pTxtAttr; // mein TextAttribut
+ USHORT nINetId;
+ USHORT nVisitedId;
+public:
+ SwFmtINetFmt( const String& rURL, const String& rTarget );
+ SwFmtINetFmt( const SwFmtINetFmt& rAttr );
+ SwFmtINetFmt(); // for TypeInfo
+ virtual ~SwFmtINetFmt();
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+
+
+ const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
+ SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; }
+
+ const String& GetValue() const { return aURL; }
+
+ const String& GetName() const { return aName; }
+ void SetName( const String& rNm ) { aName = rNm; }
+
+ const String& GetTargetFrame() const { return aTargetFrame; }
+
+ const String& GetINetFmt() const { return aINetFmt; }
+ void SetINetFmt( const String& rNm ) { aINetFmt = rNm; }
+
+ const String& GetVisitedFmt() const { return aVisitedFmt; }
+ void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
+
+ USHORT GetINetFmtId() const { return nINetId; }
+ void SetINetFmtId( USHORT nNew ) { nINetId = nNew; }
+
+ USHORT GetVisitedFmtId() const { return nVisitedId; }
+ void SetVisitedFmtId( USHORT nNew ) { nVisitedId = nNew; }
+
+ // setze eine neue oder loesche die akt. MakroTabelle
+ void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
+ const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
+
+ // setze / erfrage ein Makro
+ void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( USHORT nEvent ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
new file mode 100644
index 000000000000..357e6cd743b3
--- /dev/null
+++ b/sw/inc/fmtline.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtline.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_FMTLINE_HXX
+#define SW_FMTLINE_HXX
+
+
+#include <svtools/poolitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
+{
+ ULONG nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
+ ULONG bCountLines :1; //Zeilen des Absatzes sollen mitgezaehlt werden.
+
+public:
+ SwFmtLineNumber();
+ ~SwFmtLineNumber();
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ ULONG GetStartValue() const { return nStartValue; }
+ BOOL IsCount() const { return bCountLines != 0; }
+
+ void SetStartValue( ULONG nNew ) { nStartValue = nNew; }
+ void SetCountLines( BOOL b ) { bCountLines = b; }
+};
+
+inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(BOOL bInP) const
+ { return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
new file mode 100644
index 000000000000..43e7ef090df5
--- /dev/null
+++ b/sw/inc/fmtlsplt.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtlsplt.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTTSPLT_HXX
+#define _FMTTSPLT_HXX
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem
+{
+public:
+ SwFmtLayoutSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(BOOL bInP) const
+ { return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
+
+inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(BOOL bInP) const
+ { return aSet.GetLayoutSplit(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
new file mode 100755
index 000000000000..952181d0498c
--- /dev/null
+++ b/sw/inc/fmtmeta.hxx
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtmeta.hxx,v $
+ * $Revision: 1.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_FMTMETA_HXX
+#define SW_FMTMETA_HXX
+
+#include <svtools/poolitem.hxx>
+#include <sfx2/Metadatable.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+#include <vector>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextField;
+ }
+}}}
+
+
+/**
+ * The classes that make up a meta entity are:
+ * <dl>
+ * <dt>SwTxtMeta</dt><dd>the text hint</dd>
+ * <dt>SwFmtMeta</dt><dd>the pool item</dd>
+ * <dt>sw::Meta</dt><dd>the metadatable entity itself</dd>
+ * <dt>SwXMeta</dt><dd>the UNO wrapper object</dd>
+ * </dl>
+ *
+ * The text hint contains the pool item (as usual) and has a pointer to the
+ * text node at which it is attached.
+ * The pool item has a shared pointer to the metadatable entity, and a reverse
+ * pointer to the text attribute at which it is attached.
+ * The pool item is non-poolable; it may only be attached to one text
+ * attribute.
+ * Of all the pool items that refer to a metadatable entity, only one may be
+ * in the document content at any time. Others may be in the undo array, or in
+ * undo objects.
+ * The metadatable entity has a reverse pointer to the pool item that is
+ * currently in the document. It also registers as a client at the text node
+ * at which it is attached via this pool item and its text attribute.
+ * The UNO wrapper object registers as a client at the metadatable entity.
+ *
+ * Copying the metadatable entity proceeds in the following way:
+ * <ol>
+ * <li>The pool item is cloned (because it is non-poolable); the clone
+ * points to the same metadatable entity, but the metadatable entity's
+ * reverse pointer is unchanged.</li>
+ * <li>A new text hint is created, taking over the new pool item.
+ * Unfortunately, this also makes the metadatable entity point at the
+ * cloned pool item.</li>
+ * <li>The text hint is inserted into the hints array of some text node.</li>
+ * <li>The DoCopy() method must be called at the new pool item:
+ * it will clone the metadatable entity (using RegisterAsCopyOf),
+ * and fix the reverse pointer of the original to point at the
+ * original pool item.
+ * This is necessary, because first, a metadatable entity may
+ * only be inserted once into a document, and second, the copy may be
+ * inserted into a different document than the source document!</li>
+ * </ol>
+ */
+
+class SwTxtMeta;
+class SwXMeta;
+class SwXMetaField;
+namespace sw {
+ class Meta;
+}
+
+class SwFmtMeta
+ : public SfxPoolItem
+{
+private:
+ friend class SwTxtMeta; // needs SetTxtAttr
+ friend class ::sw::Meta; // needs m_pTxtAttr
+
+ ::boost::shared_ptr< ::sw::Meta > m_pMeta;
+ SwTxtMeta * m_pTxtAttr;
+
+ SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; }
+ void SetTxtAttr(SwTxtMeta * const i_pTxtAttr);
+
+ explicit SwFmtMeta( const USHORT i_nWhich );
+
+public:
+ // takes ownership
+ explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
+ const USHORT i_nWhich );
+ virtual ~SwFmtMeta();
+
+ // SfxPoolItem
+ virtual int operator==( const SfxPoolItem & ) const;
+ virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const;
+// TYPEINFO();
+
+ // notify clients registered at m_pMeta that this meta is being removed
+ void NotifyRemoval();
+ static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich );
+ ::sw::Meta * GetMeta() { return m_pMeta.get(); }
+ /// this method <em>must</em> be called when the hint is actually copied
+ void DoCopy( SwFmtMeta & rOriginalMeta );
+};
+
+
+namespace sw {
+
+class MetaFieldManager;
+
+class Meta
+ : public ::sfx2::Metadatable
+ , public SwModify
+{
+protected:
+ friend class ::SwFmtMeta; // SetFmtMeta
+ friend class ::SwXMeta; // GetTxtNode, GetTxtAttr
+
+ SwFmtMeta * m_pFmt;
+
+ SwTxtMeta * GetTxtAttr() const;
+ SwTxtNode * GetTxtNode() const; // returns 0 if not in document (undo)
+
+ SwFmtMeta * GetFmtMeta() const { return m_pFmt; }
+ void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; };
+
+public:
+ explicit Meta(SwFmtMeta * const i_pFmt = 0);
+ virtual ~Meta();
+
+ // SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // sfx2::Metadatable
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry();
+ virtual bool IsInClipboard() const;
+ virtual bool IsInUndo() const;
+ virtual bool IsInContent() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+};
+
+class MetaField
+ : public Meta
+{
+private:
+ friend class ::SwFmtMeta;
+ friend class ::SwXMetaField;
+ friend class ::sw::MetaFieldManager;
+
+ sal_uInt32 m_nNumberFormat;
+ bool m_bIsFixedLanguage;
+
+ sal_uInt32 GetNumberFormat(::rtl::OUString const & rContent) const;
+ void SetNumberFormat(sal_uInt32 nNumberFormat);
+ bool IsFixedLanguage() const { return m_bIsFixedLanguage; }
+ void SetIsFixedLanguage(bool b) { m_bIsFixedLanguage = b; }
+
+ explicit MetaField(SwFmtMeta * const i_pFmt = 0,
+ const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
+ const bool bIsFixedLanguage = false );
+
+public:
+ /// get prefix/suffix from the RDF repository. @throws RuntimeException
+ void GetPrefixAndSuffix(
+ ::rtl::OUString *const o_pPrefix, ::rtl::OUString *const o_pSuffix);
+};
+
+/** knows all meta-fields in the document. */
+class MetaFieldManager
+ : private ::boost::noncopyable
+{
+private:
+ typedef ::std::vector< ::boost::weak_ptr<MetaField> > MetaFieldList_t;
+ MetaFieldList_t m_MetaFields;
+
+public:
+ MetaFieldManager();
+ ::boost::shared_ptr<MetaField> makeMetaField(
+ SwFmtMeta * const i_pFmt = 0,
+ const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
+ const bool bIsFixedLanguage = false );
+ /// get all meta fields
+ ::std::vector< ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> > getMetaFields();
+};
+
+} // namespace sw
+
+#endif // SW_FMTMETA_HXX
+
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
new file mode 100644
index 000000000000..8c2dcaff59bd
--- /dev/null
+++ b/sw/inc/fmtornt.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtornt.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTORNT_HXX
+#define _FMTORNT_HXX
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <format.hxx>
+#include <svtools/poolitem.hxx>
+
+
+class IntlWrapper;
+
+#define IVER_VERTORIENT_REL ((USHORT)0x0001)
+
+class SW_DLLPUBLIC SwFmtVertOrient: public SfxPoolItem
+{
+ SwTwips nYPos; //Enthaelt _immer_ die aktuelle RelPos.
+ sal_Int16 eOrient;
+ sal_Int16 eRelation;
+public:
+ TYPEINFO();
+ SwFmtVertOrient( SwTwips nY = 0, sal_Int16 eVert = com::sun::star::text::VertOrientation::NONE,
+ sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA );
+ inline SwFmtVertOrient &operator=( const SwFmtVertOrient &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ sal_Int16 GetVertOrient() const { return eOrient; }
+ sal_Int16 GetRelationOrient() const { return eRelation; }
+ void SetVertOrient( sal_Int16 eNew ) { eOrient = eNew; }
+ void SetRelationOrient( sal_Int16 eNew ) { eRelation = eNew; }
+
+ SwTwips GetPos() const { return nYPos; }
+ void SetPos( SwTwips nNew ) { nYPos = nNew; }
+};
+
+//SwFmtHoriOrient, wie und woran orientiert --
+// sich der FlyFrm in der Hoizontalen ----------
+
+#define IVER_HORIORIENT_TOGGLE ((USHORT)0x0001)
+#define IVER_HORIORIENT_REL ((USHORT)0x0002)
+
+class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
+{
+ SwTwips nXPos; //Enthaelt _immer_ die aktuelle RelPos.
+ sal_Int16 eOrient;
+ sal_Int16 eRelation;
+ BOOL bPosToggle : 1; // auf geraden Seiten Position spiegeln
+public:
+ TYPEINFO();
+ SwFmtHoriOrient( SwTwips nX = 0, sal_Int16 eHori = com::sun::star::text::HoriOrientation::NONE,
+ sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, BOOL bPos = FALSE );
+ inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ sal_Int16 GetHoriOrient() const { return eOrient; }
+ sal_Int16 GetRelationOrient() const { return eRelation; }
+ void SetHoriOrient( sal_Int16 eNew ) { eOrient = eNew; }
+ void SetRelationOrient( sal_Int16 eNew ) { eRelation = eNew; }
+
+ SwTwips GetPos() const { return nXPos; }
+ void SetPos( SwTwips nNew ) { nXPos = nNew; }
+
+ BOOL IsPosToggle() const { return bPosToggle; }
+ void SetPosToggle( BOOL bNew ) { bPosToggle = bNew; }
+};
+
+inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
+{
+ nYPos = rCpy.GetPos();
+ eOrient = rCpy.GetVertOrient();
+ eRelation = rCpy.GetRelationOrient();
+ return *this;
+}
+inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy )
+{
+ nXPos = rCpy.GetPos();
+ eOrient = rCpy.GetHoriOrient();
+ eRelation = rCpy.GetRelationOrient();
+ bPosToggle = rCpy.IsPosToggle();
+ return *this;
+}
+
+inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(BOOL bInP) const
+ { return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
+inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(BOOL bInP) const
+ { return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
+
+inline const SwFmtVertOrient &SwFmt::GetVertOrient(BOOL bInP) const
+ { return aSet.GetVertOrient(bInP); }
+inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(BOOL bInP) const
+ { return aSet.GetHoriOrient(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
new file mode 100644
index 000000000000..2c3f88f962b2
--- /dev/null
+++ b/sw/inc/fmtpdsc.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtpdsc.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTPDSC_HXX
+#define _FMTPDSC_HXX
+
+
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+#include <calbck.hxx>
+
+class SwPageDesc;
+class SwHistory;
+class SwPaM;
+class IntlWrapper;
+
+//Pagedescriptor
+//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
+
+#define IVER_FMTPAGEDESC_NOAUTO ((USHORT)0x0001)
+#define IVER_FMTPAGEDESC_LONGPAGE ((USHORT)0x0002)
+
+class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
+{
+ // diese "Doc"-Funktion ist friend, um nach dem kopieren das
+ // Auto-Flag setzen zu koennen !!
+ friend BOOL InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, USHORT,
+ SwHistory* );
+ USHORT nNumOffset; // Seitennummer Offset
+ USHORT nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
+ SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
+ // Attribut gesetzt wurde (CntntNode/Format)
+
+public:
+ SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
+ SwFmtPageDesc( const SwFmtPageDesc &rCpy );
+ SwFmtPageDesc &operator=( const SwFmtPageDesc &rCpy );
+ ~SwFmtPageDesc();
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
+ const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
+
+ USHORT GetNumOffset() const { return nNumOffset; }
+ void SetNumOffset( USHORT nNum ) { nNumOffset = nNum; }
+
+ // erfrage/setze, wo drin das Attribut verankert ist
+ inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
+ void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
+};
+
+
+inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(BOOL bInP) const
+ { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
+
+inline const SwFmtPageDesc &SwFmt::GetPageDesc(BOOL bInP) const
+ { return aSet.GetPageDesc(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
new file mode 100644
index 000000000000..cb12e38cf582
--- /dev/null
+++ b/sw/inc/fmtrfmrk.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtrfmrk.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTRFMRK_HXX
+#define _FMTRFMRK_HXX
+
+
+#include <tools/string.hxx>
+#include <svtools/poolitem.hxx>
+
+class SwTxtRefMark;
+
+// ATT_REFMARK *******************************************************
+
+class SwFmtRefMark : public SfxPoolItem
+{
+ friend class SwTxtRefMark;
+ SwTxtRefMark* pTxtAttr; // mein TextAttribut
+
+ // geschuetzter CopyCtor
+ SwFmtRefMark& operator=(const SwFmtRefMark& rRefMark);
+ String aRefName;
+
+public:
+ SwFmtRefMark( const String& rTxt );
+ SwFmtRefMark( const SwFmtRefMark& rRefMark );
+ ~SwFmtRefMark( );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ const SwTxtRefMark *GetTxtRefMark() const { return pTxtAttr; }
+ SwTxtRefMark *GetTxtRefMark() { return pTxtAttr; }
+
+ inline String &GetRefName() { return aRefName; }
+ inline const String &GetRefName() const { return aRefName; }
+};
+
+#endif
+
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
new file mode 100644
index 000000000000..b398721e6246
--- /dev/null
+++ b/sw/inc/fmtrowsplt.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtrowsplt.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTROWSPLT_HXX
+#define _FMTROWSPLT_HXX
+
+#include <svtools/eitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem
+{
+public:
+ SwFmtRowSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(BOOL bInP) const
+ { return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); }
+
+inline const SwFmtRowSplit &SwFmt::GetRowSplit(BOOL bInP) const
+ { return aSet.GetRowSplit(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
new file mode 100644
index 000000000000..516d5c3d8eed
--- /dev/null
+++ b/sw/inc/fmtruby.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtruby.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTRUBY_HXX
+#define _FMTRUBY_HXX
+
+
+#include <tools/string.hxx>
+#include <svtools/poolitem.hxx>
+
+class SwTxtRuby;
+
+class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
+{
+ friend class SwTxtRuby;
+
+ String sRubyTxt; // the ruby txt
+ String sCharFmtName; // name of the charformat
+ SwTxtRuby* pTxtAttr; // the TextAttribut
+ USHORT nCharFmtId; // PoolId of the charformat
+ USHORT nPosition; // Position of the Ruby-Character
+ USHORT nAdjustment; // specific adjustment of the Ruby-Ch.
+
+public:
+ SwFmtRuby( const String& rRubyTxt );
+ SwFmtRuby( const SwFmtRuby& rAttr );
+ virtual ~SwFmtRuby();
+
+ SwFmtRuby& operator=( const SwFmtRuby& rAttr );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+
+
+ const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; }
+ SwTxtRuby* GetTxtRuby() { return pTxtAttr; }
+
+ const String& GetText() const { return sRubyTxt; }
+ void SetText( const String& rTxt ) { sRubyTxt = rTxt; }
+
+ const String& GetCharFmtName() const { return sCharFmtName; }
+ void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; }
+
+ USHORT GetCharFmtId() const { return nCharFmtId; }
+ void SetCharFmtId( USHORT nNew ) { nCharFmtId = nNew; }
+
+ USHORT GetPosition() const { return nPosition; }
+ void SetPosition( USHORT nNew ) { nPosition = nNew; }
+
+ USHORT GetAdjustment() const { return nAdjustment; }
+ void SetAdjustment( USHORT nNew ) { nAdjustment = nNew; }
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
new file mode 100644
index 000000000000..ec6abe89e936
--- /dev/null
+++ b/sw/inc/fmtsrnd.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtsrnd.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTSRND_HXX
+#define _FMTSRND_HXX
+
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svtools/eitem.hxx>
+
+// --> OD 2006-08-15 #i68520# - refactoring
+// separate enumeration <SwSurround> in own header file
+#include <fmtsrndenum.hxx>
+// <--
+class IntlWrapper;
+
+//SwFmtSurround, wie soll sich der ---------------
+// Dokumentinhalt unter dem Rahmen verhalten ---
+
+class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem
+{
+ BOOL bAnchorOnly :1;
+ BOOL bContour :1;
+ BOOL bOutside :1;
+public:
+ SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL );
+ SwFmtSurround( const SwFmtSurround & );
+ inline SwFmtSurround &operator=( const SwFmtSurround &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual USHORT GetValueCount() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+
+ SwSurround GetSurround()const { return SwSurround( GetValue() ); }
+ BOOL IsAnchorOnly() const { return bAnchorOnly; }
+ BOOL IsContour() const { return bContour; }
+ BOOL IsOutside() const { return bOutside; }
+ void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( USHORT( eNew ) ); }
+ void SetAnchorOnly( BOOL bNew ) { bAnchorOnly = bNew; }
+ void SetContour( BOOL bNew ) { bContour = bNew; }
+ void SetOutside( BOOL bNew ) { bOutside = bNew; }
+};
+
+inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
+{
+ bAnchorOnly = rCpy.IsAnchorOnly();
+ bContour = rCpy.IsContour();
+ bOutside = rCpy.IsOutside();
+ SfxEnumItem::SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+inline const SwFmtSurround &SwAttrSet::GetSurround(BOOL bInP) const
+ { return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
+
+inline const SwFmtSurround &SwFmt::GetSurround(BOOL bInP) const
+ { return aSet.GetSurround(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtsrndenum.hxx b/sw/inc/fmtsrndenum.hxx
new file mode 100644
index 000000000000..31301a779355
--- /dev/null
+++ b/sw/inc/fmtsrndenum.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtsrndenum.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTSRNDENUM_HXX
+#define _FMTSRNDENUM_HXX
+
+enum SwSurround {
+ SURROUND_BEGIN,
+ SURROUND_NONE = SURROUND_BEGIN,
+ SURROUND_THROUGHT,
+ SURROUND_PARALLEL,
+ SURROUND_IDEAL,
+ SURROUND_LEFT,
+ SURROUND_RIGHT,
+ SURROUND_END
+};
+
+#endif
diff --git a/sw/inc/fmtui.hrc b/sw/inc/fmtui.hrc
new file mode 100644
index 000000000000..0800dbf1ac05
--- /dev/null
+++ b/sw/inc/fmtui.hrc
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtui.hrc,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTUI_HRC
+#define _FMTUI_HRC
+
+#include "rcid.hrc"
+
+
+#define DLG_FMTENTRY (RC_FMTUI_BEGIN)
+#define DLG_NEW_FILE (RC_FMTUI_BEGIN + 1)
+#define STR_PAGE_STD (RC_FMTUI_BEGIN + 2)
+#define STR_PAGE_BORDER (RC_FMTUI_BEGIN + 3)
+#define STR_PAGE_HEADER (RC_FMTUI_BEGIN + 4)
+#define STR_PAGE_FOOTER (RC_FMTUI_BEGIN + 5)
+#define STR_PAGE_COLUMN (RC_FMTUI_BEGIN + 6)
+#define STR_PAGE_FOOTNOTE (RC_FMTUI_BEGIN + 7)
+#define STR_PAGE_TEXTGRID (RC_FMTUI_BEGIN + 8)
+
+#define DLG_STD_CHAR (RC_FMTUI_BEGIN + 15)
+
+#define MN_TEXT (RC_FMTUI_BEGIN + 20)
+#define MN_GRAFIC (RC_FMTUI_BEGIN + 21)
+#define MN_TABLE (RC_FMTUI_BEGIN + 22)
+
+#define MN_REGION (RC_FMTUI_BEGIN + 24)
+#define MN_REGION_SUB (RC_FMTUI_BEGIN + 25)
+
+
+#define DLG_DOC_STYLE (RC_FMTUI_BEGIN + 26)
+#define DLG_NEW_COLL (RC_FMTUI_BEGIN + 28)
+
+#define DLG_TEMPLATE_PI (RC_FMTUI_BEGIN + 29)
+#define DLG_HELP_ID (RC_FMTUI_BEGIN + 30)
+
+#define STR_OVERWRITE (RC_FMTUI_BEGIN + 32)
+#define ST_CUSTOMIZE 1
+
+// die Abstaende zur Basis 2 nicht aendern !!!!
+#define DLG_TEMPLATE_BASE (RC_FMTUI_BEGIN + 40)
+#define DLG_TEMPLATE_1 (RC_FMTUI_BEGIN + 41)
+#define DLG_TEMPLATE_2 (RC_FMTUI_BEGIN + 42)
+#define DLG_TEMPLATE_3 (RC_FMTUI_BEGIN + 44)
+#define DLG_TEMPLATE_4 (RC_FMTUI_BEGIN + 48)
+#define DLG_TEMPLATE_5 (RC_FMTUI_BEGIN + 56)
+
+
+#if DLG_TEMPLATE_5 > RC_FMTUI_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define TEMPLATEPI_IDX_ALL 1
+#define TEMPLATEPI_IDX_USED 2
+#define TEMPLATEPI_IDX_USER 3
+#define TEMPLATEPI_IDX_AUTOMATIC 4
+#define TEMPLATEPI_IDX_TEXT 5
+#define TEMPLATEPI_IDX_CHAPTER 6
+#define TEMPLATEPI_IDX_LIST 7
+#define TEMPLATEPI_IDX_IDX 8
+#define TEMPLATEPI_IDX_EXTRA 9
+
+
+
+#endif
+
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
new file mode 100644
index 000000000000..bfc82fd4913a
--- /dev/null
+++ b/sw/inc/fmturl.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmturl.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTURL_HXX
+#define _FMTURL_HXX
+
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class ImageMap;
+class IntlWrapper;
+
+// URL, ServerMap und ClientMap
+
+class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
+{
+ String sTargetFrameName; // in diesen Frame soll die URL
+ String sURL; //Einfache URL
+ String sName; // Name des Anchors
+ ImageMap *pMap; //ClientSide Images
+
+ BOOL bIsServerMap; //mit der URL eine ServerSideImageMap
+
+ SwFmtURL& operator=( const SwFmtURL& );
+
+public:
+ SwFmtURL();
+
+ // @@@ copy construction allowed, but assigment is not? @@@
+ SwFmtURL( const SwFmtURL& );
+
+ virtual ~SwFmtURL();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
+ void SetURL( const String &rURL, BOOL bServerMap );
+ void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
+
+ const String &GetTargetFrameName()const { return sTargetFrameName; }
+ const String &GetURL() const { return sURL; }
+ BOOL IsServerMap() const { return bIsServerMap; }
+ const ImageMap *GetMap() const { return pMap; }
+ ImageMap *GetMap() { return pMap; }
+
+ const String& GetName() const { return sName; }
+ void SetName( const String& rNm ) { sName = rNm; }
+};
+
+
+inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
+ { return (const SwFmtURL&)Get( RES_URL,bInP); }
+
+inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
+ { return aSet.GetURL(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
new file mode 100644
index 000000000000..b9ece15840e7
--- /dev/null
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fmtwrapinfluenceonobjpos.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FMTWRAPINFLUENCEONOBJPOS_HXX
+#define _FMTWRAPINFLUENCEONOBJPOS_HXX
+
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svtools/poolitem.hxx>
+#include <com/sun/star/text/WrapInfluenceOnPosition.hpp>
+
+class SW_DLLPUBLIC SwFmtWrapInfluenceOnObjPos: public SfxPoolItem
+{
+private:
+ sal_Int16 mnWrapInfluenceOnPosition;
+
+public:
+ TYPEINFO();
+
+ // --> OD 2004-10-18 #i35017# - constant name has changed
+ SwFmtWrapInfluenceOnObjPos(
+ sal_Int16 _nWrapInfluenceOnPosition =
+ com::sun::star::text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
+ // <--
+ SwFmtWrapInfluenceOnObjPos(
+ const SwFmtWrapInfluenceOnObjPos& _rCpy );
+ ~SwFmtWrapInfluenceOnObjPos();
+
+ SwFmtWrapInfluenceOnObjPos& operator=(
+ const SwFmtWrapInfluenceOnObjPos& _rSource );
+
+ // pure virtual methods of class <SfxPoolItem>
+ virtual int operator==( const SfxPoolItem& _rAttr ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ // direct accessors to data
+ void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition );
+ // --> OD 2004-10-18 #i35017# - add parameter <_bIterativeAsOnceConcurrent>
+ // to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
+ sal_Int16 GetWrapInfluenceOnObjPos(
+ const bool _bIterativeAsOnceConcurrent = false ) const;
+ // <--
+};
+
+inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(BOOL bInP) const
+ { return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
+
+ inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(BOOL bInP) const
+ { return aSet.GetWrapInfluenceOnObjPos(bInP); }
+
+#endif
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
new file mode 100644
index 000000000000..5451ec78003c
--- /dev/null
+++ b/sw/inc/format.hxx
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: format.hxx,v $
+ * $Revision: 1.32.140.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FORMAT_HXX
+#define _FORMAT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+#include <errhdl.hxx> // fuer ASSERT
+#include <swatrset.hxx> // fuer SfxItemPool/-Set, Attr forward decl.
+#include <calbck.hxx> // fuer SwModify
+#include <hintids.hxx>
+
+class IDocumentSettingAccess;
+class IDocumentDrawModelAccess;
+class IDocumentLayoutAccess;
+class IDocumentTimerAccess;
+class IDocumentFieldsAccess;
+class IDocumentChartDataProviderAccess;
+class SwDoc;
+
+class SW_DLLPUBLIC SwFmt : public SwModify
+{
+// friend class SwSwgReader;
+// friend class SwSwgWriter;
+
+ String aFmtName;
+ SwAttrSet aSet;
+
+ USHORT nWhichId;
+ USHORT nFmtId; // Format-ID fuer Lesen/Schreiben
+ USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
+ // (ist keine harte Attributierung !!)
+ USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ BOOL bWritten : 1; // TRUE: bereits geschrieben
+ BOOL bAutoFmt : 1; // FALSE: es handelt sich um eine Vorlage
+ // ist dflt immer auf TRUE !
+ BOOL bFmtInDTOR : 1; // TRUE: das Format wird geloscht. Damit man in
+ // der FmtChg-Message das erkennen kann!!!
+ BOOL bAutoUpdateFmt : 1; // TRUE: am Format werden die Attribute
+ // eines kompletten Absatzes gesetzt (UI-seitig!)
+
+protected:
+ SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich );
+ SwFmt( SwAttrPool& rPool, const String &rFmtNm, const USHORT* pWhichRanges,
+ SwFmt *pDrvdFrm, USHORT nFmtWhich );
+ SwFmt( const SwFmt& rFmt );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual ~SwFmt();
+ SwFmt &operator=(const SwFmt&);
+
+ // fuer die Abfrage der Writer-Funktionen
+ USHORT Which() const { return nWhichId; }
+
+ virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
+ // erfrage vom Format Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // kopiere Attribute; auch ueber Dokumentgrenzen hinweg
+ void CopyAttrs( const SwFmt&, BOOL bReplace=TRUE );
+
+ // loesche alle Attribute, die nicht in rFmt stehen
+ void DelDiffs( const SfxItemSet& rSet );
+ void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); }
+
+ // Umhaengen des Formats (0 = Default)
+ BOOL SetDerivedFrom(SwFmt *pDerivedFrom = 0);
+
+ // Ist bInParents FALSE,
+ // wird nur in diesem Format nach dem Attribut gesucht.
+ inline const SfxPoolItem& GetFmtAttr( USHORT nWhich,
+ BOOL bInParents = TRUE ) const;
+ inline SfxItemState GetItemState( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ const SfxPoolItem **ppItem = 0 ) const;
+ // --> OD 2008-03-03 #refactorlists#
+ // methods renamed and made virtual
+ virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ // <--
+
+ // --> OD 2007-01-24 #i73790#
+ // Method renamed and made virtual
+ // Nimmt alle Hints aus dem Delta-Array,
+ // liefert die Anzahl der geloeschten Hints
+ virtual USHORT ResetAllFmtAttr();
+ // <--
+
+ inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
+ inline BOOL IsDefault() const { return DerivedFrom() == 0; }
+
+ inline const String& GetName() const { return aFmtName; }
+ void SetName( const String& rNewName, sal_Bool bBroadcast=sal_False );
+ inline void SetName( const sal_Char* pNewName,
+ sal_Bool bBroadcast=sal_False);
+
+ // zur Abfrage des Attribute Arrays
+ inline const SwAttrSet& GetAttrSet() const { return aSet; }
+
+ // Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer
+ // im Zugriff.
+ const SwDoc *GetDoc() const { return aSet.GetDoc(); }
+ SwDoc *GetDoc() { return aSet.GetDoc(); }
+
+ /** Provides access to the document settings interface
+ */
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+
+ /** Provides access to the document draw model interface
+ */
+ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
+ IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
+
+ /** Provides access to the document layout interface
+ */
+ const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
+ IDocumentLayoutAccess* getIDocumentLayoutAccess();
+
+ /** Provides access to the document idle timer interface
+ */
+ IDocumentTimerAccess* getIDocumentTimerAccess();
+
+ /** Provides access to the document idle timer interface
+ */
+ IDocumentFieldsAccess* getIDocumentFieldsAccess();
+
+ /** gives access to the chart data-provider
+ */
+ IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
+
+ // erfragen und setzen der Poolvorlagen-Id's
+ USHORT GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+
+ // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ USHORT GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
+ BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+ // erfrage die Attribut-Beschreibung, returnt den reingereichten String
+ void GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const
+ { aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
+ // Das Format-ID fuer Lesen/Schreiben:
+ void ResetWritten() { bWritten = FALSE; }
+
+ // Abfragen/Setzen vom AutoFmt-Flag
+ BOOL IsAuto() const { return bAutoFmt; }
+ void SetAuto( BOOL bNew = FALSE ) { bAutoFmt = bNew; }
+
+ // Abfragen/Setzen vom bAutoUpdateFmt-Flag
+ BOOL IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
+ void SetAutoUpdateFmt( BOOL bNew = TRUE ) { bAutoUpdateFmt = bNew; }
+
+ BOOL IsFmtInDTOR() const { return bFmtInDTOR; }
+
+ // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // den Parents gesucht werden soll. Wird nichts gefunden,
+ // wird das deflt. Attribut returnt.
+ // Charakter-Attribute - impl. steht im charatr.hxx
+ // AMA 12.10.94: Umstellung von SwFmt... auf Svx...
+ inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
+ inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
+ inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
+ inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
+ inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
+ inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
+ inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
+ inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
+ inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
+ inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
+ inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
+ inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
+
+ inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
+ inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
+ inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
+ inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
+ inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+
+ // Frame-Attribute - impl. steht im frmatr.hxx,
+ inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
+ inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
+ inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
+ inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
+ inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
+ inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
+ inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
+ inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
+ inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
+ inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
+ inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
+ inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
+ inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
+ inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
+ inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
+ inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
+ inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
+ inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
+ inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
+ inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
+ inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
+ inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
+ inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
+ inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
+ inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ // OD 18.09.2003 #i18732#
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ // OD 2004-05-05 #i28701#
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+
+ // Grafik-Attribute - impl. steht im grfatr.hxx
+ inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
+ inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
+ inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
+ inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
+ inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
+ inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+
+ // Paragraph-Attribute - impl. steht im paratr.hxx
+ inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
+ inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
+ inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
+ inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
+ inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
+ inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
+ inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
+ inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
+ inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
+ inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+
+ // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+
+ /** SwFmt::IsBackgroundTransparent - for feature #99657#
+
+ OD 22.08.2002
+ Virtual method to determine, if background of format is transparent.
+ Default implementation returns false. Thus, subclasses have to overload
+ method, if the specific subclass can have a transparent background.
+
+ @author OD
+
+ @return false, default implementation
+ */
+ virtual sal_Bool IsBackgroundTransparent() const;
+
+ /** SwFmt::IsShadowTransparent - for feature #99657#
+
+ OD 22.08.2002
+ Virtual method to determine, if shadow of format is transparent.
+ Default implementation returns false. Thus, subclasses have to overload
+ method, if the specific subclass can have a transparent shadow.
+
+ @author OD
+
+ @return false, default implementation
+ */
+ virtual sal_Bool IsShadowTransparent() const;
+};
+
+// --------------- inline Implementierungen ------------------------
+
+inline const SfxPoolItem& SwFmt::GetFmtAttr( USHORT nWhich,
+ BOOL bInParents ) const
+{
+ return aSet.Get( nWhich, bInParents );
+}
+
+inline void SwFmt::SetName( const sal_Char* pNewName,
+ sal_Bool bBroadcast )
+{
+ String aTmp( String::CreateFromAscii( pNewName ) );
+ SetName( aTmp, bBroadcast );
+}
+
+inline SfxItemState SwFmt::GetItemState( USHORT nWhich, BOOL bSrchInParent,
+ const SfxPoolItem **ppItem ) const
+{
+ return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
+}
+
+#undef inline
+
+#endif // _FORMAT_HXX
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
new file mode 100644
index 000000000000..3276e53a459e
--- /dev/null
+++ b/sw/inc/frmatr.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: frmatr.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FRMATR_HXX
+#define _FRMATR_HXX
+
+#include <hintids.hxx> //die Ids der Attribute, vor frmitems damit die
+#include <format.hxx> //fuer Implementierung der inlines
+
+//------------------------ Inlines ---------------------------------
+
+
+/******************************************************************************
+ * Implementierung der FrameAttribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(BOOL bInP) const
+ { return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
+inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(BOOL bInP) const
+ { return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); }
+inline const SvxULSpaceItem &SwAttrSet::GetULSpace(BOOL bInP) const
+ { return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); }
+inline const SvxPrintItem &SwAttrSet::GetPrint(BOOL bInP) const
+ { return (const SvxPrintItem&)Get( RES_PRINT,bInP); }
+inline const SvxOpaqueItem &SwAttrSet::GetOpaque(BOOL bInP) const
+ { return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); }
+inline const SvxProtectItem &SwAttrSet::GetProtect(BOOL bInP) const
+ { return (const SvxProtectItem&)Get( RES_PROTECT,bInP); }
+inline const SvxBoxItem &SwAttrSet::GetBox(BOOL bInP) const
+ { return (const SvxBoxItem&)Get( RES_BOX,bInP); }
+inline const SvxFmtKeepItem &SwAttrSet::GetKeep(BOOL bInP) const
+ { return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
+inline const SvxBrushItem &SwAttrSet::GetBackground(BOOL bInP) const
+ { return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
+inline const SvxShadowItem &SwAttrSet::GetShadow(BOOL bInP) const
+ { return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
+inline const SvxFmtBreakItem &SwAttrSet::GetBreak(BOOL bInP) const
+ { return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); }
+inline const SvxMacroItem &SwAttrSet::GetMacro(BOOL bInP) const
+ { return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); }
+inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(BOOL bInP) const
+ { return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); }
+
+
+/******************************************************************************
+ * Implementierung der FrameAttribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SvxPaperBinItem &SwFmt::GetPaperBin(BOOL bInP) const
+ { return aSet.GetPaperBin(bInP); }
+inline const SvxLRSpaceItem &SwFmt::GetLRSpace(BOOL bInP) const
+ { return aSet.GetLRSpace(bInP); }
+inline const SvxULSpaceItem &SwFmt::GetULSpace(BOOL bInP) const
+ { return aSet.GetULSpace(bInP); }
+inline const SvxPrintItem &SwFmt::GetPrint(BOOL bInP) const
+ { return aSet.GetPrint(bInP); }
+inline const SvxOpaqueItem &SwFmt::GetOpaque(BOOL bInP) const
+ { return aSet.GetOpaque(bInP); }
+inline const SvxProtectItem &SwFmt::GetProtect(BOOL bInP) const
+ { return aSet.GetProtect(bInP); }
+inline const SvxBoxItem &SwFmt::GetBox(BOOL bInP) const
+ { return aSet.GetBox(bInP); }
+inline const SvxFmtKeepItem &SwFmt::GetKeep(BOOL bInP) const
+ { return aSet.GetKeep(bInP); }
+inline const SvxBrushItem &SwFmt::GetBackground(BOOL bInP) const
+ { return aSet.GetBackground(bInP); }
+inline const SvxShadowItem &SwFmt::GetShadow(BOOL bInP) const
+ { return aSet.GetShadow(bInP); }
+inline const SvxFmtBreakItem &SwFmt::GetBreak(BOOL bInP) const
+ { return aSet.GetBreak(bInP); }
+inline const SvxMacroItem &SwFmt::GetMacro(BOOL bInP) const
+ { return aSet.GetMacro(bInP); }
+inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(BOOL bInP) const
+ { return aSet.GetFrmDir(bInP); }
+
+#endif //_FRMATR_HXX
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
new file mode 100644
index 000000000000..a86b1c6689a0
--- /dev/null
+++ b/sw/inc/frmfmt.hxx
@@ -0,0 +1,315 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: frmfmt.hxx,v $
+ * $Revision: 1.15.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FRMFMT_HXX
+#define _FRMFMT_HXX
+
+#include <format.hxx>
+
+// --> OD 2004-08-06 #i28749#
+#include <com/sun/star/text/PositionLayoutDir.hpp>
+// <--
+#include "swdllapi.h"
+
+class SwFlyFrm;
+class SwAnchoredObject;
+class Graphic;
+class Point;
+class ImageMap;
+class IMapObject;
+class SwRect;
+class SwContact;
+class SdrObject;
+
+class SW_DLLPUBLIC SwFrmFmt: public SwFmt
+{
+ friend class SwDoc;
+ friend class SwPageDesc; //darf den protected CTor rufen.
+// friend class SwSwgReader; // der SW2-Reader auch!
+// friend class Sw3IoImp; // der SW3-Reader auch!
+
+protected:
+ SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
+ const USHORT* pWhichRange = 0 )
+ : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+ SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
+ const USHORT* pWhichRange = 0 )
+ : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ //Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
+ virtual void DelFrms();
+
+ //Erzeugt die Ansichten
+ virtual void MakeFrms();
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
+
+ // returnt das IMapObject, das an dem Format (Fly), in der ImageMap
+ // an der Point Position definiert ist.
+ // rPoint - teste auf der DocPosition
+ // pFly - optionaler FlyFrame, falls der schon bekannt ist.
+ IMapObject* GetIMapObject( const Point& rPoint,
+ const SwFlyFrm *pFly = 0 ) const;
+
+ // Gibt die tatsaechlche Groesse des Frames zurueck bzw. ein leeres
+ // Rechteck, wenn kein Layout existiert. Wird pPoint angegeben, dann
+ // wird der am dichtesten liegende Frame gesucht.
+ SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ const Point* pPoint = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+
+ // Sucht das SdrObject. Der SdrObjUserCall ist Client vom Format.
+ // Der UserCall kennt sein SdrObject.
+ SwContact *FindContactObj();
+ const SwContact *FindContactObj() const
+ { return ((SwFrmFmt*)this)->FindContactObj(); }
+
+ // returns the SdrObject, that ist connected to the ContactObject.
+ // Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts
+ // are connected to a Master and all FlyFrms has the "real SdrObject".
+ // "Real SdrObject" has position and a Z-order.
+ SdrObject *FindSdrObject();
+ const SdrObject *FindSdrObject() const
+ { return ((SwFrmFmt*)this)->FindSdrObject(); }
+
+ SdrObject *FindRealSdrObject();
+ const SdrObject *FindRealSdrObject() const
+ { return ((SwFrmFmt*)this)->FindRealSdrObject(); }
+
+ BOOL IsLowerOf( const SwFrmFmt& rFmt ) const;
+
+ // --> OD 2004-07-27 #i31698#
+ enum tLayoutDir
+ {
+ HORI_L2R,
+ HORI_R2L,
+ VERT_R2L,
+ VERT_L2R // not supported yet
+ };
+
+ virtual SwFrmFmt::tLayoutDir GetLayoutDir() const;
+ virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir );
+ // <--
+
+ // --> OD 2004-08-06 #i28749#
+ virtual sal_Int16 GetPositionLayoutDir() const;
+ virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir );
+ // <--
+
+ virtual String GetDescription() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
+};
+
+//Das FlyFrame-Format ------------------------------
+
+class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt
+{
+ friend class SwDoc;
+
+ //Beide nicht vorhanden.
+ SwFlyFrmFmt( const SwFlyFrmFmt &rCpy );
+ SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy );
+
+protected:
+ SwFlyFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FLYFRMFMT )
+ {}
+ SwFlyFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FLYFRMFMT )
+ {}
+
+public:
+ TYPEINFO();
+ ~SwFlyFrmFmt();
+
+ //Erzeugt die Ansichten
+ virtual void MakeFrms();
+
+ SwFlyFrm* GetFrm( const Point* pDocPos = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+
+ SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // --> OD 2009-07-14 #i73249#
+ const String GetObjTitle() const;
+ void SetObjTitle( const String& rTitle,
+ bool bBroadcast = false );
+ const String GetObjDescription() const;
+ void SetObjDescription( const String& rDescription,
+ bool bBroadcast = false );
+ // <--
+
+ /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657#
+
+ OD 22.08.2002 - overloading virtual method and its default implementation,
+ because format of fly frame provides transparent backgrounds.
+ Method determines, if background of fly frame is transparent.
+
+ @author OD
+
+ @return true, if background color is transparent, but not "no fill"
+ or a existing background graphic is transparent.
+ */
+ virtual sal_Bool IsBackgroundTransparent() const;
+
+ /** SwFlyFrmFmt::IsBackgroundBrushInherited - for #103898#
+
+ OD 08.10.2002 - method to determine, if the brush for drawing the
+ background is "inherited" from its parent/grandparent.
+ This is the case, if no background graphic is set and the background
+ color is "no fill"/"auto fill"
+
+ @author OD
+
+ @return true, if background brush is "inherited" from parent/grandparent
+ */
+ sal_Bool IsBackgroundBrushInherited() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt)
+};
+
+//Das DrawFrame-Format -----------------------------
+
+class SW_DLLPUBLIC SwDrawFrmFmt: public SwFrmFmt
+{
+ friend class SwDoc;
+
+ mutable const SdrObject * pSdrObjCached;
+ mutable String sSdrObjCachedComment;
+
+ //Beide nicht vorhanden.
+ SwDrawFrmFmt( const SwDrawFrmFmt &rCpy );
+ SwDrawFrmFmt &operator=( const SwDrawFrmFmt &rCpy );
+
+ // --> OD 2004-07-27 #i31698#
+ SwFrmFmt::tLayoutDir meLayoutDir;
+ // <--
+ // --> OD 2004-08-06 #i28749#
+ sal_Int16 mnPositionLayoutDir;
+ // <--
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ bool mbPosAttrSet;
+ // <--
+protected:
+ SwDrawFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_DRAWFRMFMT ),
+ pSdrObjCached(NULL),
+ // --> OD 2004-07-28 #i31698#
+ meLayoutDir( SwFrmFmt::HORI_L2R ),
+ // <--
+ // --> OD 2004-08-06 #i28749#
+ // --> OD 2005-03-10 #i44344#, #i44681# - undo change of issue #i36010#
+ mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
+ // <--
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ mbPosAttrSet( false )
+ // <--
+
+ {}
+ SwDrawFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_DRAWFRMFMT ),
+ pSdrObjCached(NULL),
+ // --> OD 2004-07-28 #i31698#
+ meLayoutDir( SwFrmFmt::HORI_L2R ),
+ // <--
+ // --> OD 2004-08-06 #i28749#
+ // --> OD 2005-03-10 #i44344#, #i44681# - undo change of issue #i36010#
+ mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
+ // <--
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ mbPosAttrSet( false )
+ // <--
+ {}
+
+public:
+ TYPEINFO();
+ ~SwDrawFrmFmt();
+
+ //DrawObjecte werden aus den Arrays am Layout entfernt. Die DrawObjecte
+ //werden als geloescht gekennzeichnet.
+ virtual void DelFrms();
+
+ //Anmelden der DrawObjecte in den Arrays am Layout. Loeschkennzeichen
+ //werden zurueckgesetzt.
+ virtual void MakeFrms();
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ // --> OD 2004-07-27 #i31698#
+ virtual SwFrmFmt::tLayoutDir GetLayoutDir() const;
+ virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir );
+ // <--
+
+ // --> OD 2004-08-06 #i28749#
+ virtual sal_Int16 GetPositionLayoutDir() const;
+ virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir );
+ // <--
+
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ inline bool IsPosAttrSet() const { return mbPosAttrSet; }
+ inline void PosAttrSet() { mbPosAttrSet = true; }
+ // <--
+
+ // --> OD 2005-08-16 #i53320#
+ inline void ResetPosAttr()
+ {
+ mbPosAttrSet = false;
+ }
+ // <--
+
+ virtual String GetDescription() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt);
+};
+
+
+#endif
+
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
new file mode 100644
index 000000000000..15ab804b5ee0
--- /dev/null
+++ b/sw/inc/ftnidx.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ftnidx.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FTNIDX_HXX
+#define _FTNIDX_HXX
+
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+class SwTxtFtn;
+class SwNodeIndex;
+class SwSectionNode;
+
+// ueberall, wo der NodeIndex gebraucht wird, werden die hier fehlenden
+// Headerfiles schon includes. Darum hier nur als define und nicht als
+// inline Methode (spart Compile-Zeit)
+#define _SwTxtFtn_GetIndex( pFIdx ) (pFIdx->GetTxtNode().GetIndex())
+
+
+typedef SwTxtFtn* SwTxtFtnPtr;
+SV_DECL_PTRARR_SORT( _SwFtnIdxs, SwTxtFtnPtr, 0, 10 )
+
+class SwFtnIdxs : public _SwFtnIdxs
+{
+public:
+ SwFtnIdxs() {}
+
+ void UpdateFtn( const SwNodeIndex& rStt ); // ab Pos. alle Updaten
+ void UpdateAllFtn(); // alle Fussnoten updaten
+
+ SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, USHORT* pPos = 0 ) const;
+};
+
+
+class SwUpdFtnEndNtAtEnd
+{
+ SvPtrarr aFtnSects, aEndSects;
+ SvUShorts aFtnNums, aEndNums;
+
+public:
+ SwUpdFtnEndNtAtEnd() : aFtnSects( 0, 4 ), aEndSects( 0, 4 ),
+ aFtnNums( 0, 4 ), aEndNums( 0, 4 )
+ {}
+
+ static const SwSectionNode* FindSectNdWithEndAttr(
+ const SwTxtFtn& rTxtFtn );
+
+ USHORT GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
+ USHORT ChkNumber( const SwTxtFtn& rTxtFtn );
+};
+
+
+
+#endif // _FTNIDX_HXX
+
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
new file mode 100644
index 000000000000..6e84f3ead81b
--- /dev/null
+++ b/sw/inc/ftninfo.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ftninfo.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _FTNINFO_HXX
+#define _FTNINFO_HXX
+
+#include <tools/string.hxx>
+#include "swdllapi.h"
+//#ifndef _NUMRULE_HXX
+//#include <numrule.hxx>
+//#endif
+#include <calbck.hxx>
+#include <svx/numitem.hxx>
+
+class SwTxtFmtColl;
+class SwPageDesc;
+class SwCharFmt;
+class SwDoc;
+
+class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
+{
+ SwDepend aPageDescDep;
+ SwDepend aCharFmtDep, aAnchorCharFmtDep;
+ String sPrefix;
+ String sSuffix;
+protected:
+ bool m_bEndNote;
+public:
+ SvxNumberType aFmt;
+ USHORT nFtnOffset;
+
+ void ChgPageDesc( SwPageDesc *pDesc );
+ SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
+ SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
+
+ void SetFtnTxtColl(SwTxtFmtColl& rColl);
+ SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
+
+ SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
+ void SetCharFmt( SwCharFmt* );
+ SwClient *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
+
+ SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
+ void SetAnchorCharFmt( SwCharFmt* );
+ SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ SwEndNoteInfo & operator=(const SwEndNoteInfo&);
+ BOOL operator==( const SwEndNoteInfo &rInf ) const;
+
+ SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
+ SwEndNoteInfo(const SwEndNoteInfo&);
+
+ const String& GetPrefix() const { return sPrefix; }
+ const String& GetSuffix() const { return sSuffix; }
+
+ void SetPrefix(const String& rSet) { sPrefix = rSet; }
+ void SetSuffix(const String& rSet) { sSuffix = rSet; }
+};
+
+enum SwFtnPos
+{
+ //Derzeit nur PAGE und CHAPTER. CHAPTER == Dokumentendenoten.
+ FTNPOS_PAGE = 1,
+ FTNPOS_CHAPTER = 8
+};
+
+enum SwFtnNum
+{
+ FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
+};
+
+class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
+{
+ using SwEndNoteInfo::operator ==;
+
+public:
+ String aQuoVadis;
+ String aErgoSum;
+ SwFtnPos ePos;
+ SwFtnNum eNum;
+
+
+ SwFtnInfo& operator=(const SwFtnInfo&);
+
+ BOOL operator==( const SwFtnInfo &rInf ) const;
+
+ SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
+ SwFtnInfo(const SwFtnInfo&);
+};
+
+
+#endif
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
new file mode 100644
index 000000000000..0dc7f4e06be0
--- /dev/null
+++ b/sw/inc/globals.hrc
@@ -0,0 +1,292 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: globals.hrc,v $
+ * $Revision: 1.18 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _GLOBALS_HRC
+#define _GLOBALS_HRC
+
+
+// Versions-Definition wie in solar.h und swtypes.hxx
+//#define SW_FILEFORMAT_40 3580
+
+#include "rcid.hrc"
+
+// STRINGS -----------------------------------------------------------
+
+#define STR_DLLNOTFOUND (RC_GLOBALS_BEGIN + 0)
+#define STR_FMT_STD (RC_GLOBALS_BEGIN + 1)
+#define STR_LOAD_GLOBAL_DOC (RC_GLOBALS_BEGIN + 2)
+
+#define STR_SEPARATOR (RC_GLOBALS_BEGIN + 4)
+
+
+#define STR_BASIC_IMPORT (RC_GLOBALS_BEGIN + 5)
+#define STR_BASIC_BEGIN (RC_GLOBALS_BEGIN + 6)
+#define STR_BASIC_END (RC_GLOBALS_BEGIN + 7)
+#define STR_BASIC_REC_LIB (RC_GLOBALS_BEGIN + 8)
+#define STR_TEMPLATE_WILDCARD (RC_GLOBALS_BEGIN + 9)
+#define STR_DOC_STAT (RC_GLOBALS_BEGIN + 10)
+
+#define STR_PAGE (RC_GLOBALS_BEGIN + 14)
+
+//EventStrings
+
+#define STR_EVENT_OBJECT_SELECT ( RC_GLOBALS_BEGIN + 17 )
+#define STR_EVENT_START_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 18 )
+#define STR_EVENT_END_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 19 )
+#define STR_EVENT_MOUSEOVER_OBJECT ( RC_GLOBALS_BEGIN + 20 )
+#define STR_EVENT_MOUSECLICK_OBJECT ( RC_GLOBALS_BEGIN + 21 )
+#define STR_EVENT_MOUSEOUT_OBJECT ( RC_GLOBALS_BEGIN + 22 )
+#define STR_EVENT_IMAGE_LOAD ( RC_GLOBALS_BEGIN + 23 )
+#define STR_EVENT_IMAGE_ABORT ( RC_GLOBALS_BEGIN + 24 )
+#define STR_EVENT_IMAGE_ERROR ( RC_GLOBALS_BEGIN + 25 )
+#define STR_EVENT_FRM_KEYINPUT_A ( RC_GLOBALS_BEGIN + 26 )
+#define STR_EVENT_FRM_KEYINPUT_NOA ( RC_GLOBALS_BEGIN + 27 )
+#define STR_EVENT_FRM_RESIZE ( RC_GLOBALS_BEGIN + 28 )
+#define STR_EVENT_FRM_MOVE ( RC_GLOBALS_BEGIN + 29 )
+
+// Strings fuer Rahmenausrichtungen im Popup
+#define STR_TOP_BASE (RC_GLOBALS_BEGIN + 30)
+#define STR_BOTTOM_BASE (RC_GLOBALS_BEGIN + 31)
+#define STR_CENTER_BASE (RC_GLOBALS_BEGIN + 32)
+#define STR_TOP (RC_GLOBALS_BEGIN + 33)
+#define STR_BOTTOM (RC_GLOBALS_BEGIN + 34)
+#define STR_CENTER_HORI (RC_GLOBALS_BEGIN + 35)
+#define STR_CENTER_VERT (RC_GLOBALS_BEGIN + 36)
+
+#define STR_LOAD_HTML_DOC (RC_GLOBALS_BEGIN + 37)
+
+#define STR_AUTH (RC_GLOBALS_BEGIN + 38)
+#define STR_TBL (RC_GLOBALS_BEGIN + 39)
+#define STR_TOO (RC_GLOBALS_BEGIN + 40)
+#define STR_TOILL (RC_GLOBALS_BEGIN + 41)
+
+// more Strings
+
+// BITMAPS -----------------------------------------------------------
+
+#define RES_TABL (RC_GLOBALS_BEGIN + 1)
+#define RES_TABR (RC_GLOBALS_BEGIN + 2)
+#define RES_TABD (RC_GLOBALS_BEGIN + 3)
+#define RES_TABC (RC_GLOBALS_BEGIN + 4)
+
+// DIALOGE -----------------------------------------------------------
+
+#define DLG_LISTBOX (RC_GLOBALS_BEGIN + 1)
+#define DLG_THESAURUS (RC_GLOBALS_BEGIN + 2)
+#define DLG_SPECIAL (RC_GLOBALS_BEGIN + 3)
+
+// QUERYBOX ---------------------------------------------------------
+
+#define DLG_WRAP (RC_GLOBALS_BEGIN + 4)
+#define DLG_BODY (RC_GLOBALS_BEGIN + 5)
+#define DLG_PRT_FIELDNAME (RC_GLOBALS_BEGIN + 6)
+
+// INFOBOX ------------------------------------------------------------
+
+#define ERR_CLPBRD_READ (RC_GLOBALS_BEGIN + 1)
+#define ERR_CLPBRD_WRITE (RC_GLOBALS_BEGIN + 2)
+#define MSG_ERROR_PASSWD (RC_GLOBALS_BEGIN + 3)
+
+
+// ACC ---------------------------------------------------------------
+
+#define FN_CHAR_LEFT_SEL (RC_GLOBALS_BEGIN + 1) //
+#define FN_CHAR_RIGHT_SEL (RC_GLOBALS_BEGIN + 2) //
+#define FN_LINE_UP_SEL (RC_GLOBALS_BEGIN + 3) //
+#define FN_LINE_DOWN_SEL (RC_GLOBALS_BEGIN + 4) //
+#define FN_START_OF_LINE_SEL (RC_GLOBALS_BEGIN + 5) // StartOfLine
+#define FN_END_OF_LINE_SEL (RC_GLOBALS_BEGIN + 6) // EndOfLine
+#define FN_START_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 7) // StartOfDocument
+#define FN_END_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 8) // EndOfDocument
+#define FN_START_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 9) // StartOfNextPage ???
+#define FN_END_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 10) // ???
+#define FN_START_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 11) // StartOfPrevPage ???
+#define FN_END_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 12) // ???
+#define FN_START_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 13) // StartOfPage
+#define FN_END_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 14) // EndOfPage
+#define FN_START_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 15) // StartOfWindow
+#define FN_END_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 16) // EndOfWindow
+#define FN_START_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 17) // StartOfColumn
+#define FN_END_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 18) // EndOfColumn
+#define FN_START_OF_PARA_SEL (RC_GLOBALS_BEGIN + 19) // StartOfPara
+#define FN_END_OF_PARA_SEL (RC_GLOBALS_BEGIN + 20) // EndOfPara
+#define FN_NEXT_WORD_SEL (RC_GLOBALS_BEGIN + 21) // NextWord
+#define FN_PREV_WORD_SEL (RC_GLOBALS_BEGIN + 22) // PrevWord
+#define FN_NEXT_SENT_SEL (RC_GLOBALS_BEGIN + 23) // NextSentence
+#define FN_PREV_SENT_SEL (RC_GLOBALS_BEGIN + 24) // PrevSentence
+
+#define FN_START_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 25)
+#define FN_END_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 26)
+#define FN_START_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 27)
+#define FN_END_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 28)
+#define FN_PAGEUP_SEL (RC_GLOBALS_BEGIN + 29)
+#define FN_PAGEDOWN_SEL (RC_GLOBALS_BEGIN + 30)
+
+// TABPAGES -----------------------------------------------------------
+
+#define TP_PAGE_STD (RC_GLOBALS_BEGIN + 1)
+#define TP_PAGE_EXT (RC_GLOBALS_BEGIN + 2)
+
+#define TP_PARA_STD (RC_GLOBALS_BEGIN + 3)
+#define TP_PARA_EXT (RC_GLOBALS_BEGIN + 4)
+
+#define TP_FRAME_STD (RC_GLOBALS_BEGIN + 5)
+#define TP_FRAME_EXT (RC_GLOBALS_BEGIN + 6)
+
+#define TP_CHAR_STD (RC_GLOBALS_BEGIN + 7)
+#define TP_CHAR_EXT (RC_GLOBALS_BEGIN + 8)
+
+#define TP_TABULATOR (RC_GLOBALS_BEGIN + 9)
+#define TP_DROPCAPS (RC_GLOBALS_BEGIN + 10)
+#define TP_BACKGROUND (RC_GLOBALS_BEGIN + 11)
+#define TP_BORDER (RC_GLOBALS_BEGIN + 12)
+#define TP_COLUMN (RC_GLOBALS_BEGIN + 13)
+
+#define TP_DOC_STAT (RC_GLOBALS_BEGIN + 15)
+
+#define TP_HEADER_PAGE (RC_GLOBALS_BEGIN + 16)
+#define TP_FOOTER_PAGE (RC_GLOBALS_BEGIN + 17)
+#define TP_FOOTNOTE_PAGE (RC_GLOBALS_BEGIN + 18)
+
+#define TP_OPTGENERAL_PAGE (RC_GLOBALS_BEGIN + 19) //Sfx-Seiten
+#define TP_OPTSAVE_PAGE (RC_GLOBALS_BEGIN + 20)
+#define TP_OPTPATH_PAGE (RC_GLOBALS_BEGIN + 21)
+#define TP_OPTSPELL_PAGE (RC_GLOBALS_BEGIN + 22)
+ //Sw-Seiten
+#define SW_EDIT_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 23)
+#define SW_BROWSER_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 24)
+#define TP_OPTTEST_PAGE (RC_GLOBALS_BEGIN + 25)
+#define TP_OPTPRINT_PAGE (RC_GLOBALS_BEGIN + 26)
+#define TP_OPTCOLOR_PAGE (RC_GLOBALS_BEGIN + 27)
+
+#define SW_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 28)
+#define SW_OPTIONS_TDLG_ELEM (RC_GLOBALS_BEGIN + 29)
+#define SW_OPTIONS_TDLG_PRINT (RC_GLOBALS_BEGIN + 30)
+
+#define TP_FRM_STD (RC_GLOBALS_BEGIN + 31)
+
+#define TP_OPTGRID_PAGE (RC_GLOBALS_BEGIN + 33)
+
+#define TP_FORMAT_TABLE (RC_GLOBALS_BEGIN + 34)
+#define TP_GRF_EXT (RC_GLOBALS_BEGIN + 35)
+
+#define DLG_FRM_STD (RC_GLOBALS_BEGIN + 36)
+#define DLG_FRM_GRF (RC_GLOBALS_BEGIN + 37)
+#define DLG_FRM_OLE (RC_GLOBALS_BEGIN + 38)
+
+#define RID_INPUT_TOOLBOX (RC_GLOBALS_BEGIN + 39)
+
+#define TP_MACRO_ASSIGN (RC_GLOBALS_BEGIN + 40)
+#define TP_FRM_URL (RC_GLOBALS_BEGIN + 42)
+#define TP_CHAR_URL (RC_GLOBALS_BEGIN + 43)
+
+#define TP_LAYOUT_OPT (RC_GLOBALS_BEGIN + 44)
+#define TP_CONTENT_OPT (RC_GLOBALS_BEGIN + 45)
+#define TP_HTML_OPT (RC_GLOBALS_BEGIN + 46)
+#define TP_STD_FONT (RC_GLOBALS_BEGIN + 47)
+#define TP_CONDCOLL (RC_GLOBALS_BEGIN + 48)
+
+#define TP_FRM_WRAP (RC_GLOBALS_BEGIN + 49)
+#define TP_FRM_ADD (RC_GLOBALS_BEGIN + 51)
+
+#define TP_TABLE_TEXTFLOW (RC_GLOBALS_BEGIN + 52)
+
+#define TP_AUTOFMT_BY_INPUT (RC_GLOBALS_BEGIN + 53)
+#define TP_AUTOFMT_APPLY (RC_GLOBALS_BEGIN + 54)
+
+#define TP_PARA_ALIGN (RC_GLOBALS_BEGIN + 55)
+#define TP_OPTTABLE_PAGE (RC_GLOBALS_BEGIN + 56)
+
+#define TP_NUMBER (RC_GLOBALS_BEGIN + 57)
+
+#define DLG_NUM_BULLET (RC_GLOBALS_BEGIN + 58)
+#define TP_PICK_SINGLE_NUM (RC_GLOBALS_BEGIN + 59)
+#define TP_PICK_BULLET (RC_GLOBALS_BEGIN + 60)
+#define TP_PICK_NUM (RC_GLOBALS_BEGIN + 61)
+#define TP_PICK_BMP (RC_GLOBALS_BEGIN + 62)
+
+#define TP_FLD_DB (RC_GLOBALS_BEGIN + 64)
+#define TP_FLD_DOKINF (RC_GLOBALS_BEGIN + 65)
+#define TP_FLD_VAR (RC_GLOBALS_BEGIN + 66)
+#define TP_FLD_DOK (RC_GLOBALS_BEGIN + 67)
+#define TP_FLD_FUNC (RC_GLOBALS_BEGIN + 68)
+#define TP_FLD_REF (RC_GLOBALS_BEGIN + 69)
+
+#define TP_OPTSHDWCRSR (RC_GLOBALS_BEGIN + 70)
+#define TP_NUM_OPTIONS (RC_GLOBALS_BEGIN + 71)
+#define TP_NUM_POSITION (RC_GLOBALS_BEGIN + 72)
+#define TP_NUMPARA (RC_GLOBALS_BEGIN + 73)
+
+#define TP_REDLINE_OPT (RC_GLOBALS_BEGIN + 74)
+
+#define TP_LINENUMBERING (RC_GLOBALS_BEGIN + 75)
+#define TP_OUTLINE_NUM (RC_GLOBALS_BEGIN + 76)
+
+#define TP_OPTINSERT_PAGE (RC_GLOBALS_BEGIN + 77)
+#define TP_OPTCAPTION_PAGE (RC_GLOBALS_BEGIN + 78)
+#define DLG_SVXTEST_NUM_BULLET (RC_GLOBALS_BEGIN + 79)
+#define TP_OPTLOAD_PAGE (RC_GLOBALS_BEGIN + 80)
+#define TP_INSERT_TOX (RC_GLOBALS_BEGIN + 81)
+#define TP_TOX_FORM_ENTRY (RC_GLOBALS_BEGIN + 82)
+#define TP_TOX_FORM_STYLES (RC_GLOBALS_BEGIN + 83)
+#define DLG_INSERT_TOX_TABDLG (RC_GLOBALS_BEGIN + 84)
+#define TP_INSERT_SECTION (RC_GLOBALS_BEGIN + 85)
+#define DLG_INSERT_SECTION (RC_GLOBALS_BEGIN + 86)
+#define DLG_SECTION_PROPERTIES (RC_GLOBALS_BEGIN + 87)
+#define DLG_RENAME_XNAMED (RC_GLOBALS_BEGIN + 88)
+#define DLG_MULTI_TOX (RC_GLOBALS_BEGIN + 89)
+#define TP_TOX_SELECT (RC_GLOBALS_BEGIN + 90)
+#define TP_TOX_ENTRY (RC_GLOBALS_BEGIN + 91)
+#define TP_TOX_STYLES (RC_GLOBALS_BEGIN + 92)
+#define TP_VISITING_CARDS (RC_GLOBALS_BEGIN + 93)
+#define DLG_ADD_IDX_STYLES (RC_GLOBALS_BEGIN + 94)
+#define TP_PRIVATE_DATA (RC_GLOBALS_BEGIN + 95)
+#define TP_BUSINESS_DATA (RC_GLOBALS_BEGIN + 96)
+#define TP_SECTION_FTNENDNOTES (RC_GLOBALS_BEGIN + 97)
+#define TP_CHAR_POS (RC_GLOBALS_BEGIN + 98)
+#define TP_CHAR_TWOLN (RC_GLOBALS_BEGIN + 99)
+#define TP_PARA_ASIAN (RC_GLOBALS_BEGIN + 100)
+#define TP_TEXTGRID_PAGE (RC_GLOBALS_BEGIN + 101)
+#define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102)
+#define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103)
+#define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104)
+//maximum: RC_GLOBALS_BEGIN + 119
+
+#if STR_DOC_STAT > RC_GLOBALS_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define SID_PREVIEWFLAG_TYPE (RC_GLOBALS_BEGIN + 114)
+#define SID_FONTMODE_TYPE (RC_GLOBALS_BEGIN + 115)
+#define SID_FAX_LIST (RC_GLOBALS_BEGIN + 116)
+#define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117)
+
+#define DLG_LINE_NUMBERING (RC_GLOBALS_BEGIN + 118)
+#endif // _GLOBALS_HRC
diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx
new file mode 100644
index 000000000000..23f92c473453
--- /dev/null
+++ b/sw/inc/globdoc.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: globdoc.hxx,v $
+ * $Revision: 1.8.146.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWGLOBDOCSH_HXX
+#define _SWGLOBDOCSH_HXX
+
+#include <swdll.hxx>
+#include "docsh.hxx"
+
+class SwGlobalDocShell : public SwDocShell
+{
+public:
+
+ SFX_DECL_OBJECTFACTORY();
+ TYPEINFO();
+
+ SwGlobalDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ ~SwGlobalDocShell();
+
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pClipFormat,
+ String * pAppName,
+ String * pLongUserName,
+ String * pUserName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+};
+
+#endif
+
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
new file mode 100644
index 000000000000..f9a232bae0ef
--- /dev/null
+++ b/sw/inc/grfatr.hxx
@@ -0,0 +1,373 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: grfatr.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _GRFATR_HXX
+#define _GRFATR_HXX
+
+#include <hintids.hxx> // fuer die WhichIds @@@ must be included first @@@
+#include <tools/gen.hxx>
+#include <svtools/eitem.hxx>
+#include <svtools/intitem.hxx>
+#include <svx/grfcrop.hxx>
+#include "swdllapi.h"
+#include <swatrset.hxx> // fuer inlines
+#include <format.hxx> // fuer inlines
+
+/******************************************************************************
+ * class SwMirrorGrf
+ ******************************************************************************/
+
+enum MirrorGraph
+{
+RES_MIRROR_GRAPH_BEGIN,
+ RES_MIRROR_GRAPH_DONT = RES_MIRROR_GRAPH_BEGIN,
+ RES_MIRROR_GRAPH_VERT,
+ RES_MIRROR_GRAPH_HOR,
+ RES_MIRROR_GRAPH_BOTH,
+RES_MIRROR_GRAPH_END
+};
+
+class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem
+{
+ BOOL bGrfToggle; // auf geraden Seiten Grafiken spiegeln
+
+public:
+ SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< USHORT >(eMiro) ), bGrfToggle( sal_False )
+ {}
+ SwMirrorGrf( const SwMirrorGrf &rMirrorGrf )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, rMirrorGrf.GetValue()),
+ bGrfToggle( rMirrorGrf.IsGrfToggle() )
+ {}
+
+ // pure virtual-Methoden von SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ // pure virtual-Methiden von SfxEnumItem
+ virtual USHORT GetValueCount() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+
+ inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
+ {
+ SfxEnumItem::SetValue( rMirrorGrf.GetValue() );
+ bGrfToggle = rMirrorGrf.IsGrfToggle();
+ return *this;
+ }
+
+ inline BOOL IsGrfToggle() const { return bGrfToggle; }
+ inline void SetGrfToggle( BOOL bNew ) { bGrfToggle = bNew; }
+};
+
+
+/******************************************************************************
+ * class SwAttrCropGrf
+ ******************************************************************************/
+
+class SW_DLLPUBLIC SwCropGrf : public SvxGrfCrop
+{
+public:
+ TYPEINFO();
+ SwCropGrf();
+ SwCropGrf( sal_Int32 nLeft, sal_Int32 nRight,
+ sal_Int32 nTop, sal_Int32 nBottom );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SwRotationGrf : public SfxUInt16Item
+{
+ Size aUnrotatedSize;
+public:
+ SwRotationGrf( sal_Int16 nVal = 0 )
+ : SfxUInt16Item( RES_GRFATR_ROTATION, nVal )
+ {}
+ SwRotationGrf( sal_Int16 nVal, const Size& rSz )
+ : SfxUInt16Item( RES_GRFATR_ROTATION, nVal ), aUnrotatedSize( rSz )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+
+ void SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; }
+ const Size& GetUnrotatedSize() const { return aUnrotatedSize; }
+};
+
+class SW_DLLPUBLIC SwLuminanceGrf : public SfxInt16Item
+{
+public:
+ SwLuminanceGrf( sal_Int16 nVal = 0 )
+ : SfxInt16Item( RES_GRFATR_LUMINANCE, nVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwContrastGrf : public SfxInt16Item
+{
+public:
+ SwContrastGrf( sal_Int16 nVal = 0 )
+ : SfxInt16Item( RES_GRFATR_CONTRAST, nVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SwChannelGrf : public SfxInt16Item
+{
+protected:
+ SwChannelGrf( sal_Int16 nVal, USHORT nWhichL )
+ : SfxInt16Item( nWhichL, nVal )
+ {}
+
+public:
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SwChannelRGrf : public SwChannelGrf
+{
+public:
+ SwChannelRGrf( sal_Int16 nVal = 0 )
+ : SwChannelGrf( nVal, RES_GRFATR_CHANNELR )
+ {}
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+class SwChannelGGrf : public SwChannelGrf
+{
+public:
+ SwChannelGGrf( sal_Int16 nVal = 0 )
+ : SwChannelGrf( nVal, RES_GRFATR_CHANNELG )
+ {}
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+class SwChannelBGrf : public SwChannelGrf
+{
+public:
+ SwChannelBGrf( sal_Int16 nVal = 0 )
+ : SwChannelGrf( nVal, RES_GRFATR_CHANNELB )
+ {}
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem
+{
+ double nValue;
+public:
+ TYPEINFO();
+ SwGammaGrf() : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( 1.0 )
+ {}
+
+ SwGammaGrf( const double& rVal )
+ : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( rVal )
+ {}
+
+ inline SwGammaGrf& operator=( const SwGammaGrf& rCopy )
+ {
+ SetValue( rCopy.GetValue() );
+ return *this;
+ }
+
+ // pure virtual-Methiden von SfxEnumItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+
+
+ const double& GetValue() const { return nValue; }
+ void SetValue( const double& rVal ) { nValue = rVal; }
+};
+
+class SwInvertGrf: public SfxBoolItem
+{
+public:
+ SwInvertGrf( sal_Bool bVal = sal_False )
+ : SfxBoolItem( RES_GRFATR_INVERT, bVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SwTransparencyGrf : public SfxByteItem
+{
+public:
+ SwTransparencyGrf( sal_Int8 nVal = 0 )
+ : SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+};
+
+class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem
+{
+public:
+ SwDrawModeGrf( USHORT nMode = 0 )
+ : SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
+ {}
+
+ // pure virtual-Methoden von SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ // pure virtual-Methiden von SfxEnumItem
+ virtual USHORT GetValueCount() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
+ BYTE nMemberId = 0 );
+};
+
+
+
+/******************************************************************************
+ * Implementierung der GrafikAttribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(BOOL bInP) const
+ { return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
+inline const SwCropGrf &SwAttrSet::GetCropGrf(BOOL bInP) const
+ { return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
+inline const SwRotationGrf &SwAttrSet::GetRotationGrf(BOOL bInP) const
+ { return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
+inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(BOOL bInP) const
+ { return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
+inline const SwContrastGrf &SwAttrSet::GetContrastGrf(BOOL bInP) const
+ { return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
+inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(BOOL bInP) const
+ { return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
+inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(BOOL bInP) const
+ { return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
+inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(BOOL bInP) const
+ { return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
+inline const SwGammaGrf &SwAttrSet::GetGammaGrf(BOOL bInP) const
+ { return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
+inline const SwInvertGrf &SwAttrSet::GetInvertGrf(BOOL bInP) const
+ { return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
+inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(BOOL bInP) const
+ { return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
+inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(BOOL bInP) const
+ { return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
+
+/******************************************************************************
+ * Implementierung der GrafikAttribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SwMirrorGrf &SwFmt::GetMirrorGrf(BOOL bInP) const
+ { return aSet.GetMirrorGrf(bInP); }
+inline const SwCropGrf &SwFmt::GetCropGrf(BOOL bInP) const
+ { return aSet.GetCropGrf(bInP); }
+inline const SwRotationGrf &SwFmt::GetRotationGrf(BOOL bInP) const
+ { return aSet.GetRotationGrf(bInP); }
+inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(BOOL bInP) const
+ { return aSet.GetLuminanceGrf( bInP); }
+inline const SwContrastGrf &SwFmt::GetContrastGrf(BOOL bInP) const
+ { return aSet.GetContrastGrf( bInP); }
+inline const SwChannelRGrf &SwFmt::GetChannelRGrf(BOOL bInP) const
+ { return aSet.GetChannelRGrf( bInP); }
+inline const SwChannelGGrf &SwFmt::GetChannelGGrf(BOOL bInP) const
+ { return aSet.GetChannelGGrf( bInP); }
+inline const SwChannelBGrf &SwFmt::GetChannelBGrf(BOOL bInP) const
+ { return aSet.GetChannelBGrf( bInP); }
+inline const SwGammaGrf &SwFmt::GetGammaGrf(BOOL bInP) const
+ { return aSet.GetGammaGrf( bInP); }
+inline const SwInvertGrf &SwFmt::GetInvertGrf(BOOL bInP) const
+ { return aSet.GetInvertGrf( bInP); }
+inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(BOOL bInP) const
+ { return aSet.GetTransparencyGrf( bInP); }
+inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(BOOL bInP) const
+ { return aSet.GetDrawModeGrf(bInP); }
+
+
+#endif // _GRFATR_HXX
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
new file mode 100644
index 000000000000..f709c95038f0
--- /dev/null
+++ b/sw/inc/helpid.h
@@ -0,0 +1,986 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: helpid.h,v $
+ * $Revision: 1.32 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SOLAR_HRC
+#include <svtools/solar.hrc>
+#endif
+
+#define HID_BASE HID_APP_START
+
+#define HID_BIB_BASE (HID_BASE + 1)
+#define HID_DBSEL (HID_BASE + 2)
+#define HID_DBEDIT (HID_BASE + 3)
+#define HID_PRINT_OPTION (HID_BASE + 4)
+#define HID_MERGE_PRINTMONITOR (HID_BASE + 5)
+#define HID_FLD_INPUT (HID_BASE + 6)
+#define HID_CONFIG_MISC (HID_BASE + 7)
+#define HID_CONFIG_PATH (HID_BASE + 8)
+#define HID_CONFIG_TB (HID_BASE + 9)
+#define HID_PG_FOOTNOTE (HID_BASE + 10)
+#define HID_FORMAT_GRAPHIC (HID_BASE + 11)
+#define HID_FILTERSTATUS (HID_BASE + 12)
+#define HID_DOCINFO_EDT (HID_BASE + 13)
+#define HID_DBLOGON (HID_BASE + 14)
+#define HID_MAC_ASSIGN (HID_BASE + 15)
+#define HID_CONFIG_MN (HID_BASE + 16)
+#define HID_PAPERSIZE (HID_BASE + 17)
+#define HID_PASSWD (HID_BASE + 18)
+#define HID_SPELLING_OPTIONS (HID_BASE + 19)
+#define HID_HYPHENATE_OPTIONS (HID_BASE + 20)
+#define HID_FORMAT_COLUMN (HID_BASE + 21)
+#define HID_CONFIG_SAVE (HID_BASE + 22)
+#define HID_NUM_NAMES (HID_BASE + 23)
+#define HID_SYMBOL_SELECT (HID_BASE + 24)
+#define HID_CONFIG_KY (HID_BASE + 25)
+#define HID_LINKEDIT (HID_BASE + 26)
+#define HID_GRAPHIC_PREVIEW (HID_BASE + 28)
+#define HID_DICTIONARY (HID_BASE + 29)
+#define HID_SET_STYLE (HID_BASE + 30)
+#define HID_RIBBONBAR (HID_BASE + 31)
+#define HID_STATUSLINE (HID_BASE + 32)
+#define HID_DOCBAR (HID_BASE + 33)
+#define HID_VRULER (HID_BASE + 34)
+#define HID_MAKRO_WINDOW (HID_BASE + 35)
+#define HID_ENVELOP_FORMAT (HID_BASE + 37)
+#define HID_ENVELOP_PRINTER (HID_BASE + 38)
+
+#define HID_HEADER_FOOTER_DLG (HID_BASE + 39)
+#define HID_GRID_DLG (HID_BASE + 40)
+#define HID_USER_ADDRESS_DLG (HID_BASE + 41)
+#define HID_SELECT_FAX_DLG (HID_BASE + 42)
+
+#define HID_LABEL_FORMAT (HID_BASE + 43)
+#define HID_BRSORT (HID_BASE + 44)
+#define HID_BRSEEK (HID_BASE + 45)
+#define HID_BRCFG (HID_BASE + 46)
+
+#define HID_FORMEDT_CONTENT (HID_BASE + 47)
+#define HID_FORMEDT_USER (HID_BASE + 48)
+#define HID_FORMEDT_INDEX (HID_BASE + 49)
+
+#define HID_SCRL_PAGEUP (HID_BASE + 50)
+#define HID_SCRL_PAGEDOWN (HID_BASE + 51)
+
+#define HID_DRAW_WIN (HID_BASE + 52)
+#define HID_EDIT_WIN (HID_BASE + 53)
+
+#define HID_INSERT_CTRL (HID_BASE + 54) // TbxControl Einfuegen
+#define HID_INSERT_OBJ_CTRL (HID_BASE + 55)
+#define HID_INSERT_FIELD_CTRL (HID_BASE + 56)
+
+#define HID_SOURCEVIEW (HID_BASE + 57)
+#define HID_TBL_OPT_CTRL (HID_BASE + 58)
+#define HID_AUTOFORMAT_CLB (HID_BASE + 59)
+
+#define HID_SCRL_NAVI (HID_BASE + 60)
+#define HID_NAVI_DRAG_HYP (HID_BASE + 61)
+#define HID_NAVI_DRAG_LINK (HID_BASE + 62)
+#define HID_NAVI_DRAG_COPY (HID_BASE + 63)
+#define HID_NAVI_OUTLINES (HID_BASE + 64)
+
+#define HID_AUTOFORMAT_EXEC (HID_BASE + 65)
+#define HID_AUTOFORMAT_CLOSE (HID_BASE + 66)
+
+#define HID_PAGEPREVIEW (HID_BASE + 67)
+#define HID_SOURCE_EDITWIN (HID_BASE + 68)
+
+// Dialog Help-IDs **********************************************************
+
+#define HID_CONVERT_FROM (HID_BASE + 200)
+#define HID_CONVERT_TO (HID_BASE + 201)
+#define HID_EDIT_POSTIT (HID_BASE + 202)
+#define HID_INSERT_CHART (HID_BASE + 203)
+#define HID_PAGE_PREVIEW (HID_BASE + 204)
+#define HID_INSERT_HYPERLINK (HID_BASE + 205)
+#define HID_NAVIGATOR_TREELIST (HID_BASE + 206)
+#define HID_DLG_CAPTION (HID_BASE + 207)
+#define HID_DLG_GLOSS_DECIDE (HID_BASE + 208)
+#define HID_NAVIGATOR_TOOLBOX (HID_BASE + 209)
+#define HID_NAVIGATOR_LISTBOX (HID_BASE + 210)
+#define HID_NUM_BULLET_DLG (HID_BASE + 211)
+#define HID_VS_SINGLENUM (HID_BASE + 212)
+#define HID_VS_NUM (HID_BASE + 213)
+#define HID_VS_BULLET (HID_BASE + 214)
+#define HID_VS_NUMBMP (HID_BASE + 215)
+#define HID_VS_RULER (HID_BASE + 216)
+#define HID_RULER_DIALOG (HID_BASE + 217)
+#define HID_INSERT_ABSTRACT (HID_BASE + 218)
+#define HID_NAVI_TBX1 (HID_BASE + 219)
+#define HID_NAVI_TBX2 (HID_BASE + 220)
+#define HID_NAVI_TBX3 (HID_BASE + 221)
+#define HID_NAVI_TBX4 (HID_BASE + 222)
+#define HID_NAVI_TBX5 (HID_BASE + 223)
+#define HID_NAVI_TBX6 (HID_BASE + 224)
+#define HID_NAVI_TBX7 (HID_BASE + 225)
+#define HID_NAVI_TBX8 (HID_BASE + 226)
+#define HID_NAVI_TBX9 (HID_BASE + 227)
+#define HID_NAVI_TBX10 (HID_BASE + 228)
+#define HID_NAVI_TBX11 (HID_BASE + 229)
+#define HID_NAVI_TBX12 (HID_BASE + 230)
+#define HID_NAVI_TBX13 (HID_BASE + 231)
+#define HID_NAVI_TBX14 (HID_BASE + 232)
+#define HID_NAVI_TBX15 (HID_BASE + 233)
+#define HID_NAVI_VS (HID_BASE + 234)
+#define HID_NUM_FORMAT_BTN (HID_BASE + 235)
+#define HID_PPREV_ZOOM (HID_BASE + 236)
+#define HID_NAVI_TBX16 (HID_BASE + 237)
+#define HID_LTEMPL_TEXT (HID_BASE + 238)
+#define HID_LTEMPL_FRAME (HID_BASE + 239)
+#define HID_LTEMPL_PAGE (HID_BASE + 240)
+#define HID_LTEMPL_OVERRIDE (HID_BASE + 241)
+#define HID_LTEMPL_TEMPLATES (HID_BASE + 242)
+#define HID_NAVI_TBX17 (HID_BASE + 243)
+#define HID_NAVI_TBX18 (HID_BASE + 244)
+#define HID_NAVI_TBX19 (HID_BASE + 245)
+#define HID_NAVI_TBX20 (HID_BASE + 246)
+#define HID_NAVI_TBX21 (HID_BASE + 247)
+#define HID_NAVI_TBX22 (HID_BASE + 248)
+#define HID_NAVI_TBX23 (HID_BASE + 249)
+#define HID_NAVI_TBX24 (HID_BASE + 250)
+#define HID_NAVIGATOR_GLOBAL_TOOLBOX (HID_BASE + 251)
+#define HID_NAVIGATOR_GLOB_TREELIST (HID_BASE + 252)
+#define HID_GLOS_GROUP_TREE (HID_BASE + 253)
+#define HID_GLBLTREE_UPDATE (HID_BASE + 254)
+#define HID_GLBLTREE_INSERT (HID_BASE + 255)
+#define HID_GLBLTREE_EDIT (HID_BASE + 256)
+#define HID_GLBLTREE_DEL (HID_BASE + 257)
+#define HID_GLBLTREE_INS_IDX (HID_BASE + 258)
+#define HID_GLBLTREE_INS_CNTIDX (HID_BASE + 259)
+#define HID_GLBLTREE_INS_USRIDX (HID_BASE + 260)
+#define HID_GLBLTREE_INS_FILE (HID_BASE + 261)
+#define HID_GLBLTREE_INS_NEW_FILE (HID_BASE + 262)
+#define HID_GLBLTREE_INS_TEXT (HID_BASE + 263)
+#define HID_GLBLTREE_UPD_SEL (HID_BASE + 264)
+#define HID_GLBLTREE_UPD_IDX (HID_BASE + 265)
+#define HID_GLBLTREE_UPD_LINK (HID_BASE + 266)
+#define HID_GLBLTREEUPD_ALL (HID_BASE + 267)
+#define HID_NUM_OUTL_NAMED_NUMS (HID_BASE + 268)
+#define HID_NUM_OUTL_NUM_SAVEAS (HID_BASE + 269)
+#define HID_NUM_NAMED_NUMS (HID_BASE + 270)
+#define HID_NUM_NUM_SAVEAS (HID_BASE + 271)
+#define HID_NUM_STD_NUMBER (HID_BASE + 272)
+#define HID_NUM_DEL_NUMBER (HID_BASE + 273)
+#define HID_NUM_STD_BULLET (HID_BASE + 274)
+#define HID_NUM_DEL_BULLET (HID_BASE + 275)
+#define HID_NAVI_CONTENT (HID_BASE + 276)
+#define HID_NAVI_GLOBAL (HID_BASE + 277)
+#define HID_LTEMPL_NUMBERING (HID_BASE + 278)
+#define HID_FLDVAR_APPLY (HID_BASE + 279)
+#define HID_FLDVAR_DELETE (HID_BASE + 280)
+#define HID_FLDEDT_ADDRESS (HID_BASE + 281)
+#define HID_SORT_ACTION (HID_BASE + 282)
+#define HID_SORT_AUTHOR (HID_BASE + 283)
+#define HID_SORT_DATE (HID_BASE + 284)
+#define HID_SORT_COMMENT (HID_BASE + 285)
+#define HID_SW_SORT_POSITION (HID_BASE + 286)
+#define HID_SYNC_BTN (HID_BASE + 287)
+#define HID_EDIT_COMMENT (HID_BASE + 288)
+#define HID_SEL_TEMPLATE (HID_BASE + 289)
+#define HID_DLG_SEQUENCE_OPTION (HID_BASE + 290)
+#define HID_DLG_FLDEDT_NEXT (HID_BASE + 291)
+#define HID_DLG_FLDEDT_PREV (HID_BASE + 292)
+#define HID_DLG_FLDEDT_ADDRESS (HID_BASE + 293)
+#define HID_DLG_PRV_PRT_OPTIONS (HID_BASE + 294)
+
+#define HID_FILEDLG_CHARDLG (HID_BASE + 295)
+#define HID_FILEDLG_LOADTEMPLATE (HID_BASE + 296)
+#define HID_FILEDLG_ROMENU (HID_BASE + 297)
+#define HID_FILEDLG_MAILMRGE1 (HID_BASE + 298)
+#define HID_FILEDLG_MAILMRGE2 (HID_BASE + 299)
+#define HID_FILEDLG_FRMPAGE (HID_BASE + 300)
+#define HID_FILEDLG_SRCVIEW (HID_BASE + 301)
+#define HID_FILEDLG_WIZDOKU (HID_BASE + 302)
+#define HID_PREVIEW_ZOOM (HID_BASE + 303)
+
+#define HID_REDLINE_AUTOFMT_ACCEPT (HID_BASE + 304)
+#define HID_MULTI_TOX_DLG (HID_BASE + 305)
+#define HID_ASCII_FILTER (HID_BASE + 306)
+#define HID_GLBLTREE_EDIT_LINK (HID_BASE + 307)
+#define HID_FORMAT_NAME_OBJECT_NAME (HID_BASE + 308)// #100286#
+#define HID_REFSELECTION_TOOLTIP (HID_BASE + 309) // #i83479#
+
+
+// TabPage Help-IDs *********************************************************
+
+#define HID_DROPCAPS (HID_BASE + 400)
+#define HID_FRM_EXT (HID_BASE + 401)
+#define HID_FRM_STD (HID_BASE + 402)
+#define HID_GRF_EXT (HID_BASE + 403)
+#define HID_COLUMN (HID_BASE + 404)
+#define HID_DOC_STAT (HID_BASE + 405)
+#define HID_MACROASSIGN (HID_BASE + 406)
+#define HID_FOOTNOTE_PAGE (HID_BASE + 407)
+#define HID_OPTDOCDISP_PAGE (HID_BASE + 408)
+#define HID_OPTGRID_PAGE (HID_BASE + 409)
+#define HID_OPTTEST_PAGE (HID_BASE + 410)
+#define HID_OPTPRINT_PAGE (HID_BASE + 411)
+#define HID_FORMAT_TABLE (HID_BASE + 412)
+#define HID_TABLE_COLUMN (HID_BASE + 413)
+#define HID_LAB_LAB (HID_BASE + 414)
+#define HID_LAB_PRT (HID_BASE + 415)
+#define HID_ENV_PRT (HID_BASE + 416)
+#define HID_LAB_FMT (HID_BASE + 417)
+#define HID_ENV_ENV (HID_BASE + 418)
+#define HID_ENV_FMT (HID_BASE + 419)
+#define HID_FRM_URL (HID_BASE + 421)
+#define HID_CHAR_URL (HID_BASE + 422)
+#define HID_CONTENT_OPT (HID_BASE + 423)
+#define HID_LAYOUT_OPT (HID_BASE + 424)
+#define HID_STD_FONT (HID_BASE + 425)
+#define HID_COND_COLL (HID_BASE + 426)
+#define HID_FRM_ADD (HID_BASE + 427)
+#define HID_TABLE_TEXTFLOW (HID_BASE + 428)
+#define HID_AUTOFMT_BY_INPUT (HID_BASE + 429)
+#define HID_AUTOFMT_APPLY (HID_BASE + 430)
+#define HID_OPTTABLE_PAGE (HID_BASE + 431)
+#define HID_PICK_SINGLE_NUM (HID_BASE + 432)
+#define HID_PICK_BULLET (HID_BASE + 433)
+#define HID_PICK_NUM (HID_BASE + 434)
+#define HID_PICK_BMP (HID_BASE + 435)
+
+#define HID_FLD_DB (HID_BASE + 437)
+#define HID_FLD_DOKINF (HID_BASE + 438)
+#define HID_FLD_VAR (HID_BASE + 439)
+#define HID_FLD_DOK (HID_BASE + 440)
+#define HID_FLD_FUNC (HID_BASE + 441)
+#define HID_FLD_REF (HID_BASE + 442)
+#define HID_OPTSHDWCRSR (HID_BASE + 443)
+#define HID_NUM_OPTIONS (HID_BASE + 444)
+#define HID_NUM_POSITION (HID_BASE + 445)
+#define HID_NUMPARA (HID_BASE + 446)
+#define HID_FOOTNOTE_OPTIONS (HID_BASE + 447)
+#define HID_ENDNOTE_OPTIONS (HID_BASE + 448)
+#define HID_REDLINE_OPT (HID_BASE + 449)
+#define HID_LINENUMBERING (HID_BASE + 450)
+#define HID_REDLINE_ACCEPT (HID_BASE + 451)
+#define HID_EDIT_FLD_DB (HID_BASE + 452)
+#define HID_EDIT_FLD_DOKINF (HID_BASE + 453)
+#define HID_EDIT_FLD_VAR (HID_BASE + 454)
+#define HID_EDIT_FLD_DOK (HID_BASE + 455)
+#define HID_EDIT_FLD_FUNC (HID_BASE + 456)
+#define HID_EDIT_FLD_REF (HID_BASE + 457)
+#define HID_REDLINE_CTRL (HID_BASE + 458)
+#define HID_TP_OUTLINE_NUM (HID_BASE + 459)
+#define HID_OPTINSERT_PAGE (HID_BASE + 460)
+#define HID_OPTCAPTION_PAGE (HID_BASE + 461)
+#define HID_OPTLOAD_PAGE (HID_BASE + 462)
+#define HID_INSERT_TOX_PAGE (HID_BASE + 463)
+#define HID_TOX_FORM_ENTRY_PAGE (HID_BASE + 464)
+#define HID_TOX_FORM_STYLES_PAGE (HID_BASE + 465)
+#define HID_INSERT_TOX_TABDLG (HID_BASE + 466)
+#define HID_INSERT_SECTION_PAGE (HID_BASE + 467)
+#define HID_INSERT_SECTION_DLG (HID_BASE + 468)
+#define HID_SECTION_PROPERTIES_DLG (HID_BASE + 469)
+#define HID_RENAME_XNAMED (HID_BASE + 470)
+#define HID_TP_TOX_SELECT (HID_BASE + 471)
+#define HID_TP_TOX_ENTRY (HID_BASE + 472)
+#define HID_TOX_STYLES_PAGE (HID_BASE + 473)
+#define HID_TP_VISITING_CARDS (HID_BASE + 474)
+#define HID_DLG_ADD_IDX_STYLES (HID_BASE + 475)
+#define HID_ADD_STYLES_TLB (HID_BASE + 476)
+#define HID_OLE_CHECKLB (HID_BASE + 477)
+#define HID_DLG_CREATE_AUTH_ENTRY (HID_BASE + 478)
+#define HID_TP_PRIVATE_DATA (HID_BASE + 479)
+
+#define HID_TP_BUSINESS_DATA (HID_BASE + 480)
+#define HID_SECTION_FTNENDNOTES_PAGE (HID_BASE + 481)
+#define HID_TEXTGRID_PAGE (HID_BASE + 482)
+#define HID_OPTCOMPATIBILITY_PAGE (HID_BASE + 483)
+#define HID_COMPATIBILITY_OPTIONS_BOX (HID_BASE + 484)
+
+// AutoPilot Help-IDs *********************************************************
+
+#define HID_LETTER_PAGE1 (HID_BASE + 501)
+#define HID_LETTER_PAGE2 (HID_BASE + 502)
+#define HID_LETTER_PAGE3 (HID_BASE + 503)
+#define HID_LETTER_PAGE4 (HID_BASE + 504)
+#define HID_LETTER_PAGE5 (HID_BASE + 505)
+#define HID_LETTER_PAGE6 (HID_BASE + 506)
+#define HID_LETTER_PAGE7 (HID_BASE + 507)
+#define HID_LETTER_PAGE8 (HID_BASE + 508)
+#define HID_LETTER_PAGE9 (HID_BASE + 509)
+
+#define HID_FAX_PAGE1 (HID_BASE + 511)
+#define HID_FAX_PAGE2 (HID_BASE + 512)
+#define HID_FAX_PAGE3 (HID_BASE + 513)
+#define HID_FAX_PAGE4 (HID_BASE + 514)
+#define HID_FAX_PAGE5 (HID_BASE + 515)
+#define HID_FAX_PAGE6 (HID_BASE + 516)
+#define HID_FAX_PAGE7 (HID_BASE + 517)
+#define HID_FAX_PAGE8 (HID_BASE + 518)
+
+#define HID_MEMO_PAGE1 (HID_BASE + 521)
+#define HID_MEMO_PAGE2 (HID_BASE + 522)
+#define HID_MEMO_PAGE3 (HID_BASE + 523)
+#define HID_MEMO_PAGE4 (HID_BASE + 524)
+#define HID_MEMO_PAGE5 (HID_BASE + 525)
+
+#define HID_AGENDA_PAGE1 (HID_BASE + 531)
+#define HID_AGENDA_PAGE2 (HID_BASE + 532)
+#define HID_AGENDA_PAGE3 (HID_BASE + 533)
+#define HID_AGENDA_PAGE4 (HID_BASE + 534)
+#define HID_AGENDA_PAGE5 (HID_BASE + 535)
+#define HID_AGENDA_PAGE6 (HID_BASE + 536)
+
+#define HID_AUTOPILOT_NEXT (HID_BASE + 537)
+#define HID_AUTOPILOT_PREV (HID_BASE + 538)
+#define HID_AUTOPILOT_OK (HID_BASE + 539)
+
+// HelpIds fuers Menue *****************************************************
+
+#define HID_MN_SUB_TBLROW (HID_BASE + 600)
+#define HID_MN_SUB_TBLCOL (HID_BASE + 601)
+#define HID_MN_SUB_AUTOFORMAT (HID_BASE + 602)
+#define HID_MN_SUB_TOOLBAR (HID_BASE + 603)
+#define HID_MN_SUB_FIELD (HID_BASE + 604)
+#define HID_MN_SUB_GRAPHIC (HID_BASE + 605)
+#define HID_MN_SUB_TEMPLATES (HID_BASE + 606)
+#define HID_MN_SUB_ARRANGE (HID_BASE + 607)
+#define HID_MN_SUB_SPELLING (HID_BASE + 608)
+#define HID_MN_SUB_UPDATE (HID_BASE + 609)
+#define HID_MN_SUB_MIRROR (HID_BASE + 610)
+#define HID_MN_SUB_ALIGN (HID_BASE + 611)
+#define HID_MN_SUB_OPTIONS (HID_BASE + 612)
+
+#define HID_MN_CALC_PHD (HID_BASE + 613)
+#define HID_MN_CALC_SQRT (HID_BASE + 614)
+#define HID_MN_CALC_OR (HID_BASE + 615)
+#define HID_MN_CALC_XOR (HID_BASE + 616)
+#define HID_MN_CALC_AND (HID_BASE + 617)
+#define HID_MN_CALC_NOT (HID_BASE + 618)
+#define HID_MN_CALC_EQ (HID_BASE + 619)
+#define HID_MN_CALC_NEQ (HID_BASE + 620)
+#define HID_MN_CALC_LEQ (HID_BASE + 621)
+#define HID_MN_CALC_GEQ (HID_BASE + 622)
+#define HID_MN_CALC_LES (HID_BASE + 623)
+#define HID_MN_CALC_GRE (HID_BASE + 624)
+#define HID_MN_CALC_SUM (HID_BASE + 625)
+#define HID_MN_CALC_MEAN (HID_BASE + 626)
+#define HID_MN_CALC_MIN (HID_BASE + 627)
+#define HID_MN_CALC_MAX (HID_BASE + 628)
+#define HID_MN_CALC_SIN (HID_BASE + 629)
+#define HID_MN_CALC_COS (HID_BASE + 630)
+#define HID_MN_CALC_TAN (HID_BASE + 631)
+#define HID_MN_CALC_ASIN (HID_BASE + 632)
+#define HID_MN_CALC_ACOS (HID_BASE + 633)
+#define HID_MN_CALC_ATAN (HID_BASE + 634)
+#define HID_MN_CALC_POW (HID_BASE + 635)
+#define HID_MN_CALC_LISTSEP (HID_BASE + 636)
+#define HID_MN_POP_OPS (HID_BASE + 637)
+#define HID_MN_POP_STATISTICS (HID_BASE + 638)
+#define HID_MN_POP_FUNC (HID_BASE + 639)
+#define HID_MN_RSC_END (HID_BASE + 640)
+#define HID_MN_CALC_ROUND (HID_BASE + 641)
+#define HID_MN_SUB_MACRO (HID_BASE + 642)
+
+#define HID_MN_READONLY_SAVEGRAPHIC (HID_BASE + 645)
+#define HID_MN_READONLY_GRAPHICTOGALLERY (HID_BASE + 646)
+#define HID_MN_READONLY_TOGALLERYLINK (HID_BASE + 647)
+#define HID_MN_READONLY_TOGALLERYCOPY (HID_BASE + 648)
+#define HID_MN_READONLY_SAVEBACKGROUND (HID_BASE + 649)
+#define HID_MN_READONLY_BACKGROUNDTOGALLERY (HID_BASE + 650)
+#define HID_MN_READONLY_COPYLINK (HID_BASE + 651)
+#define HID_MN_READONLY_COPYGRAPHIC (HID_BASE + 652)
+#define HID_MN_READONLY_LOADGRAPHIC (HID_BASE + 653)
+#define HID_MN_READONLY_GRAPHICOFF (HID_BASE + 654)
+#define HID_MN_READONLY_PLUGINOFF (HID_BASE + 655)
+
+#define HID_MD_GLOS_DEFINE (HID_BASE + 656)
+#define HID_MD_GLOS_REPLACE (HID_BASE + 657)
+#define HID_MD_GLOS_RENAME (HID_BASE + 658)
+#define HID_MD_GLOS_DELETE (HID_BASE + 659)
+#define HID_MD_GLOS_EDIT (HID_BASE + 660)
+#define HID_MD_GLOS_MACRO (HID_BASE + 661)
+#define HID_LINGU_ADD_WORD (HID_BASE + 662)
+#define HID_LINGU_IGNORE_WORD (HID_BASE + 663)
+#define HID_LINGU_SPELLING_DLG (HID_BASE + 664)
+#define HID_LINGU_AUTOCORR (HID_BASE + 665)
+#define HID_LINGU_REPLACE (HID_BASE + 666)
+#define HID_MD_GLOS_CATEGORY (HID_BASE + 667)
+#define HID_REGION_TREE (HID_BASE + 668)
+#define HID_LINGU_WORD_LANGUAGE (HID_BASE + 669)
+#define HID_LINGU_PARA_LANGUAGE (HID_BASE + 670)
+#define HID_MD_GLOS_DEFINE_TEXT (HID_BASE + 671)
+#define HID_DLG_PASSWD_SECTION (HID_BASE + 672)
+#define HID_MD_COPY_TO_CLIPBOARD (HID_BASE + 673)
+#define HID_MD_GLOS_IMPORT (HID_BASE + 674)
+#define HID_SMARTTAG_MAIN (HID_BASE + 675) // SMARTTAGS
+#define HID_LINGU_IGNORE_SELECTION (HID_BASE + 676) // grammar check context menu
+
+// Weiter Help-IDs **********************************************************
+
+#define HID_CLOSE_FILE (HID_BASE + 1001)
+#define HID_LAUNCH_REGISTRY (HID_BASE + 1002)
+#define HID_MERGE_FILE (HID_BASE + 1003)
+#define HID_MERGE_FILE_DLG (HID_BASE + 1004)
+#define HID_NEW_FILE (HID_BASE + 1005)
+#define HID_OPEN_FILE (HID_BASE + 1007)
+#define HID_OPEN_LASTVERSION (HID_BASE + 1009)
+#define HID_PRINT_FILE (HID_BASE + 1010)
+#define HID_PRINT_FILE_OPTIONS (HID_BASE + 1011)
+#define HID_SAVE_FILE_AS (HID_BASE + 1012)
+#define HID_SAVE_FILE (HID_BASE + 1013)
+#define HID_SETUP_PRINTER_DLG (HID_BASE + 1015)
+#define HID_EXIT (HID_BASE + 1017)
+#define HID_CREATE_DOCUMENT (HID_BASE + 1019)
+#define HID_DOCSTAT_DLG (HID_BASE + 1020)
+#define HID_LOAD_TEMPLATE_DLG (HID_BASE + 1021)
+#define HID_SAVE_ALL (HID_BASE + 1023)
+#define HID_NEW_FILE_DEFAULT (HID_BASE + 1024)
+#define HID_PRINT_FILE_DEFAULT (HID_BASE + 1025)
+#define HID_FAX (HID_BASE + 1028)
+#define HID_SELECT_DATABASE (HID_BASE + 1030)
+#define HID_DOC_INFO_DLG (HID_BASE + 1031)
+#define HID_DOC_MGR_DLG (HID_BASE + 1032)
+#define HID_OPTCAPTION_CLB (HID_BASE + 1033)
+
+#define HID_COPY (HID_BASE + 1102)
+#define HID_CUT (HID_BASE + 1103)
+#define HID_EDIT_FIELD (HID_BASE + 1104)
+#define HID_EDIT_FILE_INFO_DLG (HID_BASE + 1107)
+#define HID_EDIT_LINK_DLG (HID_BASE + 1109)
+#define HID_EDIT_OBJECT (HID_BASE + 1110)
+#define HID_GOTO (HID_BASE + 1111)
+#define HID_SET_FIELD_VALUE (HID_BASE + 1112)
+#define HID_PASTE (HID_BASE + 1113)
+#define HID_REDO (HID_BASE + 1116)
+#define HID_SEARCH (HID_BASE + 1117)
+#define HID_REPLACE (HID_BASE + 1118)
+#define HID_SELECT_ALL (HID_BASE + 1119)
+#define HID_UNDO (HID_BASE + 1120)
+#define HID_REPEAT (HID_BASE + 1122)
+#define HID_BUFFER_UPDATE (HID_BASE + 1124)
+#define HID_UPDATE_FIELDS (HID_BASE + 1126)
+#define HID_EXECUTE_MACROFIELD (HID_BASE + 1127)
+#define HID_EDIT_FORMULA (HID_BASE + 1128)
+#define HID_CALC_TABLE (HID_BASE + 1129)
+#define HID_NUM_BULLET_DOWN (HID_BASE + 1130)
+#define HID_NUM_BULLET_UP (HID_BASE + 1131)
+#define HID_NUM_BULLET_PREV (HID_BASE + 1132)
+#define HID_NUM_BULLET_NEXT (HID_BASE + 1133)
+#define HID_NUM_BULLET_MOVEUP (HID_BASE + 1134)
+#define HID_NUM_BULLET_MOVEDOWN (HID_BASE + 1135)
+#define HID_NUM_BULLET_NONUM (HID_BASE + 1136)
+#define HID_NUM_BULLET_OFF (HID_BASE + 1137)
+#define HID_NUM_BULLET_ON (HID_BASE + 1138)
+#define HID_NUM_BULLET_OUTLINE_DOWN (HID_BASE + 1139)
+#define HID_NUM_BULLET_OUTLINE_UP (HID_BASE + 1140)
+#define HID_NUM_BULLET_OUTLINE_MOVEUP (HID_BASE + 1141)
+#define HID_NUM_BULLET_OUTLINE_MOVEDOWN (HID_BASE + 1142)
+#define HID_UPDATE_INPUTFIELDS (HID_BASE + 1143)
+#define HID_NUM_NUMBERING_ON (HID_BASE + 1144)
+#define HID_REPEAT_SEARCH (HID_BASE + 1150)
+#define HID_REPAGINATE (HID_BASE + 1161)
+
+#define HID_REFRESH_VIEW (HID_BASE + 1201)
+#define HID_RIBBON (HID_BASE + 1210)
+#define HID_RULER (HID_BASE + 1211)
+#define HID_STATUSBAR (HID_BASE + 1212)
+#define HID_TOOLBOX (HID_BASE + 1213)
+#define HID_VIEW_BOUNDS (HID_BASE + 1214)
+#define HID_VIEW_FIELDS (HID_BASE + 1215)
+#define HID_VLINEAL (HID_BASE + 1216)
+#define HID_VSCROLLBAR (HID_BASE + 1217)
+#define HID_HSCROLLBAR (HID_BASE + 1218)
+#define HID_VIEW_META_CHARS (HID_BASE + 1224)
+#define HID_VIEW_MARKS (HID_BASE + 1225)
+#define HID_VIEW_FIELDNAME (HID_BASE + 1226)
+#define HID_VIEW_TABLEGRID (HID_BASE + 1227)
+#define HID_ZOOM (HID_BASE + 1231)
+
+#define HID_DELETE_BOOKMARK (HID_BASE + 1301)
+#define HID_INSERT_BREAK (HID_BASE + 1303)
+#define HID_INSERT_COLUMN_BREAK (HID_BASE + 1305)
+#define HID_INSERT_FILE (HID_BASE + 1309)
+#define HID_INSERT_FOOTNOTE (HID_BASE + 1311)
+#define HID_INSERT_GRAFIC (HID_BASE + 1315)
+#define HID_INSERT_LINEBREAK (HID_BASE + 1318)
+#define HID_INSERT_MERGEFIELD_DLG (HID_BASE + 1320)
+#define HID_INSERT_OBJECT_DLG (HID_BASE + 1322)
+#define HID_INSERT_PAGEBREAK (HID_BASE + 1323)
+#define HID_INSERT_RECORD (HID_BASE + 1326)
+#define HID_MERGE_RECORD (HID_BASE + 1327)
+#define HID_INSERT_SYMBOL (HID_BASE + 1328)
+#define HID_INSERT_STRING (HID_BASE + 1331)
+#define HID_INSERT_COLS (HID_BASE + 1332)
+#define HID_INSERT_FRAME_INTERACT (HID_BASE + 1333)
+#define HID_INSERT_FRAME (HID_BASE + 1334)
+#define HID_INSERT_IDX_ENTRY (HID_BASE + 1340)
+#define HID_INSERT_USERIDX_ENTRY (HID_BASE + 1341)
+#define HID_INSERT_CNTNTIDX_ENTRY (HID_BASE + 1342)
+#define HID_INSERT_SOFT_HYPHEN (HID_BASE + 1350)
+#define HID_INSERT_HARD_SPACE (HID_BASE + 1351)
+
+#define HID_SET_FONT (HID_BASE + 1401)
+#define HID_SET_FONT_SIZE (HID_BASE + 1402)
+#define HID_GROW_FONT_SIZE (HID_BASE + 1403)
+#define HID_SHRINK_FONT_SIZE (HID_BASE + 1404)
+#define HID_SET_BOLD (HID_BASE + 1405)
+#define HID_SET_ITALIC (HID_BASE + 1406)
+#define HID_SET_SHADOW (HID_BASE + 1407)
+#define HID_SET_OUTLINE (HID_BASE + 1408)
+#define HID_SET_UNDERLINE (HID_BASE + 1409)
+#define HID_SET_STRIKEOUT (HID_BASE + 1410)
+#define HID_SET_SUPER_SCRIPT (HID_BASE + 1411)
+#define HID_SET_SUB_SCRIPT (HID_BASE + 1412)
+#define HID_SET_COLOR (HID_BASE + 1413)
+#define HID_SET_CASEMAP (HID_BASE + 1414)
+#define HID_SET_LANGUAGE (HID_BASE + 1415)
+#define HID_SET_KERNING (HID_BASE + 1416)
+#define HID_INDENT_TO_TABSTOP (HID_BASE + 1417)
+#define HID_SET_LEFT_PARA (HID_BASE + 1418)
+#define HID_SET_RIGHT_PARA (HID_BASE + 1419)
+#define HID_SET_CENTER_PARA (HID_BASE + 1420)
+#define HID_SET_JUSTIFY_PARA (HID_BASE + 1421)
+#define HID_SET_LINE_SPACE_1 (HID_BASE + 1422)
+#define HID_SET_LINE_SPACE_15 (HID_BASE + 1423)
+#define HID_SET_LINE_SPACE_2 (HID_BASE + 1424)
+#define HID_FLIP_HORZ_GRAFIC (HID_BASE + 1425)
+#define HID_FLIP_VERT_GRAFIC (HID_BASE + 1426)
+#define HID_SET_ADJUST (HID_BASE + 1428)
+#define HID_SET_LRMARGIN (HID_BASE + 1429)
+#define HID_SET_ULMARGIN (HID_BASE + 1430)
+#define HID_UNINDENT_TO_TABSTOP (HID_BASE + 1431)
+#define HID_SET_HYPHEN_ZONE (HID_BASE + 1432)
+#define HID_SET_PAGE_BREAK (HID_BASE + 1433)
+#define HID_SET_KEEP_TOGETHER (HID_BASE + 1434)
+#define HID_SET_WIDOW (HID_BASE + 1436)
+#define HID_SET_ORPHAN (HID_BASE + 1437)
+#define HID_FORMAT_SHADOW (HID_BASE + 1438)
+#define HID_FORMAT_BORDER (HID_BASE + 1439)
+#define HID_FORMAT_CHAR_DLG (HID_BASE + 1441)
+#define HID_FORMAT_PARA_DLG (HID_BASE + 1443)
+#define HID_FORMAT_TAB (HID_BASE + 1444)
+#define HID_FORMAT_TAB_DLG (HID_BASE + 1445)
+#define HID_FORMAT_BORDER_DLG (HID_BASE + 1447)
+#define HID_FORMAT_BACKGROUND (HID_BASE + 1448)
+#define HID_FORMAT_BACKGROUND_DLG (HID_BASE + 1450)
+#define HID_FORMAT_PAGE (HID_BASE + 1451)
+#define HID_FORMAT_PAGE_DLG (HID_BASE + 1452)
+#define HID_FORMAT_DROPCAPS (HID_BASE + 1454)
+#define HID_FORMAT_FRAME_DLG (HID_BASE + 1456)
+#define HID_FORMAT_GRAFIC_DLG (HID_BASE + 1458)
+#define HID_FORMAT_TABLE_DLG (HID_BASE + 1460)
+#define HID_NEW_STYLE_BY_EXAMPLE (HID_BASE + 1462)
+#define HID_UPDATE_STYLE_BY_EXAMPLE (HID_BASE + 1463)
+#define HID_STYLE_SHEET_FRAME_DLG (HID_BASE + 1464)
+#define HID_STYLE_SHEET_DOC_DLG (HID_BASE + 1465)
+#define HID_FORMAT_RESET (HID_BASE + 1469)
+#define HID_FRAME_TO_TOP (HID_BASE + 1470)
+#define HID_FRAME_TO_BOTTOM (HID_BASE + 1471)
+#define HID_FRAME_NOWRAP (HID_BASE + 1472)
+#define HID_FRAME_WRAP (HID_BASE + 1473)
+#define HID_FRAME_WRAPTHRU (HID_BASE + 1474)
+#define HID_FRAME_ALIGN_HORZ_LEFT (HID_BASE + 1475)
+#define HID_FRAME_ALIGN_HORZ_RIGHT (HID_BASE + 1476)
+#define HID_FRAME_ALIGN_HORZ_CENTER (HID_BASE + 1477)
+#define HID_FRAME_ALIGN_VERT_TOP (HID_BASE + 1478)
+#define HID_FRAME_ALIGN_VERT_BOTTOM (HID_BASE + 1479)
+#define HID_FRAME_ALIGN_VERT_CENTER (HID_BASE + 1480)
+#define HID_SET_FRM_SIZE (HID_BASE + 1481)
+#define HID_SET_FRM_POSITION (HID_BASE + 1482)
+#define HID_SET_FRM_ANCHOR (HID_BASE + 1483)
+#define HID_SET_FRM_WRAP (HID_BASE + 1484)
+#define HID_SET_FRM_DIST (HID_BASE + 1485)
+#define HID_SET_FRM_OPTIONS (HID_BASE + 1486)
+#define HID_SET_GRF_MIRROR (HID_BASE + 1488)
+#define HID_SET_TABLE_WIDTH (HID_BASE + 1489)
+#define HID_SET_TABLE_ALIGN (HID_BASE + 1490)
+#define HID_SET_CHAR_STYLE (HID_BASE + 1491)
+#define HID_SET_PARA_STYLE (HID_BASE + 1492)
+#define HID_SET_PAGE_STYLE (HID_BASE + 1493)
+#define HID_SET_FRM_MACRO (HID_BASE + 1494)
+#define HID_SET_FRM_COLUMNS (HID_BASE + 1495)
+#define HID_SET_FRM_COLUMN_WIDTH (HID_BASE + 1496)
+#define HID_UPDATE_STYLES_DIRECT (HID_BASE + 1497)
+
+#define HID_TABLE_INSERT_ROW (HID_BASE + 1501)
+#define HID_TABLE_DELETE_ROW (HID_BASE + 1503)
+#define HID_TABLE_DELETE_COL (HID_BASE + 1504)
+#define HID_TABLE_MERGE_CELLS (HID_BASE + 1506)
+#define HID_AUTOFMT_TABLE (HID_BASE + 1507)
+#define HID_SWDLG_STRINPUT (HID_BASE + 1508)
+#define HID_TABLE_SET_ULSPACE (HID_BASE + 1509)
+#define HID_TABLE_SET_GRID (HID_BASE + 1510)
+#define HID_TABLE_SET_SHADOW (HID_BASE + 1511)
+#define HID_TABLE_SELECT_ROW (HID_BASE + 1513)
+#define HID_TABLE_SELECT_COL (HID_BASE + 1514)
+#define HID_TABLE_SELECT_ALL (HID_BASE + 1515)
+#define HID_TABLE_SET_READ_ONLY_CELLS (HID_BASE + 1517)
+#define HID_TABLE_UNSET_READ_ONLY_CELLS (HID_BASE + 1519)
+#define HID_PAGE_STYLE_SET_COLS (HID_BASE + 1538)
+#define HID_SET_PROP_LINE_SPACE (HID_BASE + 1540)
+#define HID_SET_ABS_LINE_SPACE (HID_BASE + 1541)
+
+#define HID_SPELLING_DLG (HID_BASE + 1601)
+#define HID_THESAURUS_DLG (HID_BASE + 1604)
+#define HID_HYPHENATE_OPT_DLG (HID_BASE + 1607)
+#define HID_SORTING (HID_BASE + 1613)
+#define HID_SORTING_DLG (HID_BASE + 1614)
+#define HID_CALCULATE (HID_BASE + 1615)
+#define HID_RECORD_MACRO_DLG (HID_BASE + 1622)
+#define HID_PLAY_MACRO_DLG (HID_BASE + 1624)
+#define HID_CONFIG_DLG (HID_BASE + 1627)
+#define HID_EXPAND_GLOSSARY (HID_BASE + 1628)
+#define HID_RENAME_GLOSSARY (HID_BASE + 1629)
+#define HID_CONFIG_MENU (HID_BASE + 1630)
+#define HID_CONFIG_KEY (HID_BASE + 1631)
+#define HID_ASSIGN_LOCAL_MACRO_DLG (HID_BASE + 1632)
+#define HID_COMPILE_MACRO (HID_BASE + 1633)
+#define HID_CONFIG_VIEWOPTIONS (HID_BASE + 1635)
+#define HID_CONFIG_COLORS (HID_BASE + 1636)
+#define HID_INSERT_GLOSSARY (HID_BASE + 1640)
+#define HID_AUTO_CORRECT (HID_BASE + 1649)
+#define HID_AUTO_CORRECT_DLG (HID_BASE + 1650)
+#define HID_HELP_PI (HID_BASE + 1655)
+#define HID_NAVIGATION_PI (HID_BASE + 1656)
+#define HID_TEMPLATE_PI (HID_BASE + 1657)
+#define HID_ADDR_PI (HID_BASE + 1658)
+#define HID_NAVIGATION_PI_GOTO_PAGE (HID_BASE + 1659)
+#define HID_LETTER_WIZZARD (HID_BASE + 1660)
+#define HID_FAX_WIZZARD (HID_BASE + 1661)
+#define HID_MEMO_WIZZARD (HID_BASE + 1662)
+#define HID_AGENDA_WIZZARD (HID_BASE + 1663)
+
+#define HID_NEW_WINDOW (HID_BASE + 1701)
+#define HID_ARRANGE_ALL_WIN (HID_BASE + 1702)
+#define HID_ARRANGE_CASCADE_WIN (HID_BASE + 1703)
+#define HID_ARRANGE_HORZ_WIN (HID_BASE + 1704)
+#define HID_ARRANGE_VERT_WIN (HID_BASE + 1705)
+
+#define HID_SHOW_HELP_INDEX (HID_BASE + 1802)
+#define HID_SHOW_KEYBOARD_HELP (HID_BASE + 1803)
+#define HID_SHOW_HELP_MANUAL (HID_BASE + 1804)
+#define HID_SHOW_UPDATE_HELP (HID_BASE + 1805)
+
+#define HID_CHAR_LEFT (HID_BASE + 1901)
+#define HID_CHAR_RIGHT (HID_BASE + 1902)
+#define HID_LINE_UP (HID_BASE + 1903)
+#define HID_LINE_DOWN (HID_BASE + 1904)
+#define HID_START_OF_LINE (HID_BASE + 1905)
+#define HID_END_OF_LINE (HID_BASE + 1906)
+#define HID_START_OF_DOCUMENT (HID_BASE + 1907)
+#define HID_END_OF_DOCUMENT (HID_BASE + 1908)
+#define HID_START_OF_NEXT_PAGE (HID_BASE + 1909)
+#define HID_END_OF_NEXT_PAGE (HID_BASE + 1910)
+#define HID_START_OF_PREV_PAGE (HID_BASE + 1911)
+#define HID_END_OF_PREV_PAGE (HID_BASE + 1912)
+#define HID_START_OF_PAGE (HID_BASE + 1913)
+#define HID_END_OF_PAGE (HID_BASE + 1914)
+#define HID_START_OF_COLUMN (HID_BASE + 1917)
+#define HID_END_OF_COLUMN (HID_BASE + 1918)
+#define HID_START_OF_PARA (HID_BASE + 1919)
+#define HID_END_OF_PARA (HID_BASE + 1920)
+#define HID_NEXT_WORD (HID_BASE + 1921)
+#define HID_PREV_WORD (HID_BASE + 1922)
+#define HID_NEXT_SENT (HID_BASE + 1923)
+#define HID_PREV_SENT (HID_BASE + 1924)
+#define HID_DELETE (HID_BASE + 1925)
+#define HID_BACKSPACE (HID_BASE + 1926)
+#define HID_DELETE_SENT (HID_BASE + 1927)
+#define HID_DELETE_BACK_SENT (HID_BASE + 1928)
+#define HID_DELETE_WORD (HID_BASE + 1929)
+#define HID_DELETE_BACK_WORD (HID_BASE + 1930)
+#define HID_DELETE_LINE (HID_BASE + 1931)
+#define HID_DELETE_BACK_LINE (HID_BASE + 1932)
+#define HID_DELETE_PARA (HID_BASE + 1933)
+#define HID_DELETE_BACK_PARA (HID_BASE + 1934)
+#define HID_DELETE_WHOLE_LINE (HID_BASE + 1935)
+#define HID_SET_INS_MODE (HID_BASE + 1936)
+#define HID_PAGEUP (HID_BASE + 1937)
+#define HID_PAGEDOWN (HID_BASE + 1938)
+#define HID_SET_ADD_MODE (HID_BASE + 1939)
+#define HID_SET_EXT_MODE (HID_BASE + 1940)
+#define HID_ESCAPE (HID_BASE + 1941)
+#define HID_SELECT_WORD (HID_BASE + 1943)
+#define HID_START_TABLE (HID_BASE + 1947)
+#define HID_END_TABLE (HID_BASE + 1948)
+#define HID_NEXT_TABLE (HID_BASE + 1949)
+#define HID_PREV_TABLE (HID_BASE + 1950)
+#define HID_START_OF_NEXT_COLUMN (HID_BASE + 1951)
+#define HID_END_OF_NEXT_COLUMN (HID_BASE + 1952)
+#define HID_START_OF_PREV_COLUMN (HID_BASE + 1953)
+#define HID_END_OF_PREV_COLUMN (HID_BASE + 1954)
+#define HID_FOOTNOTE_TO_ANCHOR (HID_BASE + 1955)
+#define HID_NEXT_FOOTNOTE (HID_BASE + 1956)
+#define HID_PREV_FOOTNOTE (HID_BASE + 1957)
+#define HID_CNTNT_TO_NEXT_FRAME (HID_BASE + 1958)
+#define HID_FRAME_TO_ANCHOR (HID_BASE + 1959)
+#define HID_TO_HEADER (HID_BASE + 1960)
+#define HID_TO_FOOTER (HID_BASE + 1961)
+#define HID_IDX_MARK_TO_IDX (HID_BASE + 1962)
+
+#define HID_ENVELOP (HID_BASE + 2050)
+#define HID_LABEL (HID_BASE + 2051)
+#define HID_ENVELOP_PRINT (HID_BASE + 2052)
+
+#define HID_NAVIGATION_IMGBTN (HID_BASE + 2054)
+#define HID_ENVELOP_INSERT (HID_BASE + 2055)
+
+#define HID_WEBTOOLS_TOOLBOX (HID_BASE + 2056)
+#define HID_WEBTEXT_TOOLBOX (HID_BASE + 2057)
+#define HID_WEBFRAME_TOOLBOX (HID_BASE + 2058)
+#define HID_TEXT_TOOLBOX (HID_BASE + 2059)
+#define HID_TABLE_TOOLBOX (HID_BASE + 2060)
+#define HID_FRAME_TOOLBOX (HID_BASE + 2061)
+#define HID_GRAFIK_TOOLBOX (HID_BASE + 2062)
+#define HID_OLE_TOOLBOX (HID_BASE + 2063)
+#define HID_DRAW_TOOLBOX (HID_BASE + 2064)
+#define HID_BEZIER_TOOLBOX (HID_BASE + 2066)
+#define HID_DRAW_TEXT_TOOLBOX (HID_BASE + 2067)
+#define HID_NUM_TOOLBOX (HID_BASE + 2068)
+#define HID_TOOLS_TOOLBOX (HID_BASE + 2069)
+#define HID_SRCVIEW_TOOLBOX (HID_BASE + 2070)
+
+#define HID_LABEL_INSERT (HID_BASE + 2071)
+#define HID_CALC_TOOLBOX (HID_BASE + 2072)
+#define HID_PVIEW_TOOLBOX (HID_BASE + 2073)
+
+#define HID_FIELD_INSERT (HID_BASE + 2074)
+#define HID_FIELD_CLOSE (HID_BASE + 2075)
+
+#define HID_COND_COLL_TABLIST (HID_BASE + 2076)
+
+#define HID_DB_SELECTION_TLB (HID_BASE + 2077)
+#define HID_FIELD_DINF_TYPE (HID_BASE + 2078)
+
+#define HID_DRAWFORM_TOOLBOX (HID_BASE + 2079)
+#define HID_SELECT_TEMPLATE (HID_BASE + 2080)
+
+#define HID_AP_INSERT_DB_SEL (HID_BASE + 2081)
+#define HID_WEBGRAPHIC_TOOLBOX (HID_BASE + 2082)
+#define HID_OUTLINE_FORM (HID_BASE + 2083)
+#define HID_NUM_RESET (HID_BASE + 2084)
+
+#define HID_AUTOFORMAT_REJECT (HID_BASE + 2085)
+#define HID_AUTOFORMAT_ACCEPT (HID_BASE + 2086)
+#define HID_AUTOFORMAT_EDIT_CHG (HID_BASE + 2087)
+
+//insert index/entries/Pattern buttons and edits
+#define HID_TOX_ENTRY_BUTTON (HID_BASE + 2088)
+#define HID_TOX_ENTRY_EDIT (HID_BASE + 2089)
+
+#define HID_DLG_NEW_USER_IDX (HID_BASE + 2090)
+#define HID_INSERT_IDX_MRK_OK (HID_BASE + 2091)
+#define HID_INSERT_IDX_MRK_CLOSE (HID_BASE + 2092)
+#define HID_INSERT_AUTH_MRK_OK (HID_BASE + 2093)
+#define HID_INSERT_AUTH_MRK_CLOSE (HID_BASE + 2094)
+#define HID_INSERT_IDX_MRK_DELETE (HID_BASE + 2095)
+#define HID_INSERT_IDX_MRK_NEW (HID_BASE + 2096)
+#define HID_INSERT_IDX_MRK_PREV (HID_BASE + 2097)
+#define HID_INSERT_IDX_MRK_PREV_SAME (HID_BASE + 2098)
+#define HID_INSERT_IDX_MRK_NEXT (HID_BASE + 2099)
+#define HID_INSERT_IDX_MRK_NEXT_SAME (HID_BASE + 2100)
+#define HID_INSERT_IDX_MRK_TYPE (HID_BASE + 2101)
+#define HID_INSERT_IDX_MRK_ENTRY (HID_BASE + 2102)
+#define HID_INSERT_IDX_MRK_PRIM_KEY (HID_BASE + 2103)
+#define HID_INSERT_IDX_MRK_SEC_KEY (HID_BASE + 2104)
+#define HID_INSERT_IDX_MRK_LEVEL (HID_BASE + 2105)
+#define HID_INSERT_IDX_MRK_MAIN_ENTRY (HID_BASE + 2106)
+#define HID_INSERT_IDX_MRK_APPLY_ALL (HID_BASE + 2107)
+#define HID_INSERT_AUTH_MRK_ENTRY (HID_BASE + 2108)
+#define HID_INSERT_AUTH_MRK_CREATE_ENTRY (HID_BASE + 2109)
+#define HID_INSERT_AUTH_MRK_EDIT_ENTRY (HID_BASE + 2110)
+#define HID_TOKEN_WINDOW (HID_BASE + 2111)
+
+#define HID_AUTH_FIELD_IDENTIFIER (HID_BASE + 2112 )
+#define HID_AUTH_FIELD_AUTHORITY_TYPE (HID_BASE + 2113 )
+#define HID_AUTH_FIELD_ADDRESS (HID_BASE + 2114 )
+#define HID_AUTH_FIELD_ANNOTE (HID_BASE + 2115 )
+#define HID_AUTH_FIELD_AUTHOR (HID_BASE + 2116 )
+#define HID_AUTH_FIELD_BOOKTITLE (HID_BASE + 2117 )
+#define HID_AUTH_FIELD_CHAPTER (HID_BASE + 2118 )
+#define HID_AUTH_FIELD_EDITION (HID_BASE + 2119 )
+#define HID_AUTH_FIELD_EDITOR (HID_BASE + 2120 )
+#define HID_AUTH_FIELD_HOWPUBLISHED (HID_BASE + 2121 )
+#define HID_AUTH_FIELD_INSTITUTION (HID_BASE + 2122 )
+#define HID_AUTH_FIELD_JOURNAL (HID_BASE + 2123 )
+#define HID_AUTH_FIELD_MONTH (HID_BASE + 2124 )
+#define HID_AUTH_FIELD_NOTE (HID_BASE + 2125 )
+#define HID_AUTH_FIELD_NUMBER (HID_BASE + 2126 )
+#define HID_AUTH_FIELD_ORGANIZATIONS (HID_BASE + 2127 )
+#define HID_AUTH_FIELD_PAGES (HID_BASE + 2128 )
+#define HID_AUTH_FIELD_PUBLISHER (HID_BASE + 2129 )
+#define HID_AUTH_FIELD_SCHOOL (HID_BASE + 2130 )
+#define HID_AUTH_FIELD_SERIES (HID_BASE + 2131 )
+#define HID_AUTH_FIELD_TITLE (HID_BASE + 2132 )
+#define HID_AUTH_FIELD_REPORT_TYPE (HID_BASE + 2133 )
+#define HID_AUTH_FIELD_VOLUME (HID_BASE + 2134 )
+#define HID_AUTH_FIELD_YEAR (HID_BASE + 2135 )
+#define HID_AUTH_FIELD_URL (HID_BASE + 2136 )
+#define HID_AUTH_FIELD_CUSTOM1 (HID_BASE + 2137 )
+#define HID_AUTH_FIELD_CUSTOM2 (HID_BASE + 2138 )
+#define HID_AUTH_FIELD_CUSTOM3 (HID_BASE + 2139 )
+#define HID_AUTH_FIELD_CUSTOM4 (HID_BASE + 2140 )
+#define HID_AUTH_FIELD_CUSTOM5 (HID_BASE + 2141 )
+#define HID_AUTH_FIELD_ISBN (HID_BASE + 2142 )
+
+#define HID_AUTH_MARK_DLG_FROM_COMP_RB (HID_BASE + 2143 )
+#define HID_AUTH_MARK_DLG_FROM_DOC_RB (HID_BASE + 2144 )
+#define HID_AUTH_MARK_DLG_ID_LISTBOX (HID_BASE + 2145 )
+
+#define HID_INSERT_INDEX_ENTRY_LEVEL_LB (HID_BASE + 2146 )
+#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE (HID_BASE + 2147 )
+#define HID_INSERT_IDX_MRK_SRCH_WORDONLY (HID_BASE + 2148 )
+#define HID_DLG_CREATE_AUTOMARK (HID_BASE + 2149 )
+#define HID_BUSINESS_CARD_CONTENT (HID_BASE + 2150 )
+#define HID_SAVE_LABEL_DLG (HID_BASE + 2151 )
+#define HID_BUSINESS_FMT_PAGE (HID_BASE + 2152 )
+#define HID_BUSINESS_FMT_PAGE_CONT (HID_BASE + 2153 )
+#define HID_BUSINESS_FMT_PAGE_SHEET (HID_BASE + 2154 )
+#define HID_BUSINESS_FMT_PAGE_BRAND (HID_BASE + 2155 )
+#define HID_BUSINESS_FMT_PAGE_TYPE (HID_BASE + 2156 )
+#define HID_SEND_MASTER_DIALOG (HID_BASE + 2157 )
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK (HID_BASE + 2158 )
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2159 )
+#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER (HID_BASE + 2160 )
+#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW (HID_BASE + 2161 )
+#define HID_SEND_MASTER_CTRL_EDIT_FILEURL (HID_BASE + 2162 )
+#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2163 )
+#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2164 )
+#define HID_SEND_MASTER_CTRL_DUMMY (HID_BASE + 2165 )
+
+#define HID_SEND_HTML_DIALOG (HID_BASE + 2166 )
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK (HID_BASE + 2167 )
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2168 )
+#define HID_SEND_HTML_CTRL_LISTBOX_FILTER (HID_BASE + 2169 )
+#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW (HID_BASE + 2170 )
+#define HID_SEND_HTML_CTRL_EDIT_FILEURL (HID_BASE + 2171 )
+#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2172 )
+#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2173 )
+#define HID_SEND_HTML_CTRL_DUMMY (HID_BASE + 2174 )
+
+#define HID_INSERT_IDX_MRK_PHONETIC_READING (HID_BASE + 2175 )
+#define HID_COLUMN_VALUESET (HID_BASE + 2176 )
+#define HID_PVIEW_ZOOM_LB (HID_BASE + 2177 )
+#define HID_MAIL_MERGE_SELECT (HID_BASE + 2178 )
+#define HID_MAIL_MERGE_CREATE_FROM (HID_BASE + 2179 )
+#define HID_MAIL_MERGE_INSERT_FIELDS (HID_BASE + 2180 )
+#define HID_PRINT_AS_MERGE (HID_BASE + 2181 )
+#define HID_MERGE_SOURCE_UNAVAILABLE (HID_BASE + 2182 )
+#define HID_DATA_SOURCES_UNAVAILABLE (HID_BASE + 2183 )
+#define HID_MODULE_TOOLBOX (HID_BASE + 2184 )
+#define HID_SECTION_INDENTS_PAGE (HID_BASE + 2185 )
+
+#define HID_FLD_DROPDOWN (HID_BASE + 2186 )
+#define HID_MM_DOCSELECTPAGE (HID_BASE + 2187 )
+#define HID_MM_OUTPUTTYPEPAGE (HID_BASE + 2188 )
+#define HID_MM_ADDRESSBLOCKPAGE (HID_BASE + 2189 )
+#define HID_MM_GREETINGSPAGE (HID_BASE + 2190 )
+#define HID_MM_PREPAREMERGEPAGE (HID_BASE + 2191 )
+#define HID_MM_MERGEPAGE (HID_BASE + 2192 )
+#define HID_MM_OUTPUTPAGE (HID_BASE + 2193 )
+#define HID_MM_ADDRESSLISTDIALOG (HID_BASE + 2194 )
+#define HID_MM_SELECTDBTABLEDDIALOG (HID_BASE + 2195 )
+#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX (HID_BASE + 2196 )
+#define HID_MM_DBTABLEPREVIEWDIALOG (HID_BASE + 2197 )
+#define HID_MM_CREATEADDRESSLIST (HID_BASE + 2198 )
+#define HID_MM_FIND_ENTRY (HID_BASE + 2199 )
+#define HID_MM_ADD_RENAME_ENTRY (HID_BASE + 2200 )
+#define HID_MM_CUSTOMIZE_ADDRESS_LIST (HID_BASE + 2201 )
+#define HID_MM_CUSTOMIZEADDRESSBLOCK (HID_BASE + 2202 )
+#define HID_MM_SELECTADDRESSBLOCK (HID_BASE + 2203 )
+#define HID_MM_ASSIGNFIELDS (HID_BASE + 2204 )
+#define HID_MM_MAILNOTINSTALLED (HID_BASE + 2205 )
+#define HID_MM_LAYOUT_PAGE (HID_BASE + 2206 )
+#define HID_MM_COPYTO (HID_BASE + 2207 )
+#define HID_MM_ADDRESSLIST_HB (HID_BASE + 2208 )
+#define HID_MM_ADDRESSLIST_TLB (HID_BASE + 2209 )
+#define HID_TP_MAILCONFIG (HID_BASE + 2210 )
+#define HID_MM_TESTACCOUNTSETTINGS (HID_BASE + 2211 )
+#define HID_MM_TESTACCOUNTSETTINGS_TLB (HID_BASE + 2212 )
+#define HID_MM_TESTACCOUNTSETTINGS_HB (HID_BASE + 2213 )
+#define HID_MM_MAILBODY (HID_BASE + 2214 )
+#define HID_MM_SENDMAILS (HID_BASE + 2215 )
+#define HID_MM_SENDMAILS_STATUSLB (HID_BASE + 2216 )
+#define HID_MAILMERGECHILD (HID_BASE + 2217 )
+#define HID_MM_CUSTOMFIELDS (HID_BASE + 2218 )
+#define HID_DLG_WORDCOUNT (HID_BASE + 2219 )
+#define HID_MM_MAILSTATUS_TLB (HID_BASE + 2220 )
+#define HID_RETURN_TO_MAILMERGE (HID_BASE + 2221 )
+#define HID_MM_SAVEWARNING (HID_BASE + 2222 )
+#define HID_MM_QUERY (HID_BASE + 2223 )
+#define HID_MM_SENDWARNING (HID_BASE + 2224 )
+#define HID_MM_SERVERAUTHENTICATION (HID_BASE + 2225 )
+
+#define HID_MEDIA_TOOLBOX (HID_BASE + 2227)
+#define HID_NID_TBL (HID_BASE + 2228)
+#define HID_NID_FRM (HID_BASE + 2229)
+#define HID_NID_GRF (HID_BASE + 2230)
+#define HID_NID_OLE (HID_BASE + 2231)
+#define HID_NID_PGE (HID_BASE + 2232)
+#define HID_NID_OUTL (HID_BASE + 2233)
+#define HID_NID_MARK (HID_BASE + 2234)
+#define HID_NID_DRW (HID_BASE + 2235)
+#define HID_NID_CTRL (HID_BASE + 2236)
+#define HID_NID_PREV (HID_BASE + 2237)
+#define HID_NID_REG (HID_BASE + 2238)
+#define HID_NID_BKM (HID_BASE + 2239)
+#define HID_NID_SEL (HID_BASE + 2240)
+#define HID_NID_FTN (HID_BASE + 2241)
+#define HID_NID_POSTIT (HID_BASE + 2242)
+#define HID_NID_SRCH_REP (HID_BASE + 2243)
+#define HID_NID_INDEX_ENTRY (HID_BASE + 2244)
+#define HID_NID_TABLE_FORMULA (HID_BASE + 2245)
+#define HID_NID_TABLE_FORMULA_ERROR (HID_BASE + 2246)
+#define HID_NID_NEXT (HID_BASE + 2247)
+#define HID_MM_NEXT_PAGE (HID_BASE + 2248)
+#define HID_MM_PREV_PAGE (HID_BASE + 2249)
+#define HID_MM_GREETINGS_CB_PERSONALIZED (HID_BASE + 2250)
+#define HID_MM_GREETINGS_LB_FEMALE (HID_BASE + 2251)
+#define HID_MM_GREETINGS_PB_FEMALE (HID_BASE + 2252)
+#define HID_MM_GREETINGS_LB_MALE (HID_BASE + 2253)
+#define HID_MM_GREETINGS_PB_MALE (HID_BASE + 2254)
+#define HID_MM_GREETINGS_LB_FEMALECOLUMN (HID_BASE + 2255)
+#define HID_MM_GREETINGS_CB_FEMALEFIELD (HID_BASE + 2256)
+#define HID_MM_GREETINGS_CB_NEUTRAL (HID_BASE + 2257)
+#define HID_MM_BODY_CB_PERSONALIZED (HID_BASE + 2258)
+#define HID_MM_BODY_LB_FEMALE (HID_BASE + 2259)
+#define HID_MM_BODY_PB_FEMALE (HID_BASE + 2260)
+#define HID_MM_BODY_LB_MALE (HID_BASE + 2261)
+#define HID_MM_BODY_PB_MALE (HID_BASE + 2262)
+#define HID_MM_BODY_LB_FEMALECOLUMN (HID_BASE + 2263)
+#define HID_MM_BODY_CB_FEMALEFIELD (HID_BASE + 2264)
+#define HID_MM_BODY_CB_NEUTRAL (HID_BASE + 2265)
+#define HID_MM_ASSIGN_FIELDS (HID_BASE + 2266)
+#define HID_MM_HEADER_0 (HID_BASE + 2267)
+#define HID_MM_HEADER_1 (HID_BASE + 2268)
+#define HID_MM_HEADER_2 (HID_BASE + 2269)
+#define HID_MM_HEADER_3 (HID_BASE + 2270)
+#define HID_MM_HEADER_4 (HID_BASE + 2271)
+#define HID_MM_HEADER_5 (HID_BASE + 2272)
+#define HID_MM_HEADER_6 (HID_BASE + 2273)
+#define HID_MM_HEADER_7 (HID_BASE + 2274)
+#define HID_MM_HEADER_8 (HID_BASE + 2275)
+#define HID_MM_HEADER_9 (HID_BASE + 2276)
+#define HID_MM_HEADER_10 (HID_BASE + 2277)
+#define HID_MM_HEADER_11 (HID_BASE + 2278)
+#define HID_MM_HEADER_12 (HID_BASE + 2279)
+#define HID_MM_HEADER_13 (HID_BASE + 2280)
+
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
new file mode 100644
index 000000000000..17b62c0d4760
--- /dev/null
+++ b/sw/inc/hfspacingitem.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hfspacingitem.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_HF_EAT_SPACINGITEM_HXX
+#define _SW_HF_EAT_SPACINGITEM_HXX
+
+
+#include <svtools/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
+{
+public:
+ SwHeaderAndFooterEatSpacingItem( USHORT nId = RES_HEADER_FOOTER_EAT_SPACING,
+ BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+ { return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
+
+inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+ { return aSet.GetHeaderAndFooterEatSpacing(bInP); }
+
+#endif
+
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
new file mode 100644
index 000000000000..f146513336ff
--- /dev/null
+++ b/sw/inc/hhcwrp.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hhcwrp.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _HHCWRP_HXX
+#define _HHCWRP_HXX
+
+#include <svx/hangulhanja.hxx>
+#include <pam.hxx>
+
+class SwView;
+class Window;
+class SwWrtShell;
+struct SwConversionArgs;
+
+//////////////////////////////////////////////////////////////////////
+
+class SwHHCWrapper : public svx::HangulHanjaConversion
+{
+ SwView * pView;
+ Window* pWin;
+ SwWrtShell &rWrtShell;
+
+ SwConversionArgs *pConvArgs; // object for arguments (and results) needed
+ // to find of next convertible text portion
+
+ xub_StrLen nLastPos; // starting position of the last found text part
+ // (needs to be sth that gets not moved like
+ // SwPaM or SwPosition by replace operations!)
+ sal_Int32 nUnitOffset;
+
+ USHORT nPageCount; // page count for progress bar
+ USHORT nPageStart; // first checked page
+
+ sal_Bool bIsDrawObj;
+ sal_Bool bIsStart;
+ sal_Bool bIsOtherCntnt;
+ sal_Bool bStartChk;
+ sal_Bool bIsSelection; // true if only the selected text should be converted
+ sal_Bool bInfoBox; // true if message should be displayed at the end
+ sal_Bool bIsConvSpecial; // true if special regions: header, footer, ... should be converted
+ sal_Bool bStartDone;
+ sal_Bool bEndDone;
+// sal_Bool bLastRet;
+
+ // from SvxSpellWrapper copied and modified
+ sal_Bool ConvNext_impl(); // former SpellNext
+ sal_Bool FindConvText_impl(); // former FindSpellError
+
+ // from SwSpellWrapper copied and modified
+ sal_Bool HasOtherCnt_impl();
+ void ConvStart_impl( SwConversionArgs *pConvArgs, SvxSpellArea eSpell ); // former SpellStart
+ void ConvEnd_impl( SwConversionArgs *pConvArgs ); // former SpellEnd
+ sal_Bool ConvContinue_impl( SwConversionArgs *pConvArgs ); // former SpellContinue
+
+ void SelectNewUnit_impl( const sal_Int32 nUnitStart,
+ const sal_Int32 nUnitEnd );
+ void ChangeText( const String &rNewText,
+ const ::rtl::OUString& rOrigText,
+ const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets,
+ SwPaM *pCrsr );
+ void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes );
+
+ inline BOOL IsDrawObj() { return bIsDrawObj; }
+ inline void SetDrawObj( BOOL bNew ) { bIsDrawObj = bNew; }
+
+protected:
+ virtual void GetNextPortion( ::rtl::OUString& rNextPortion,
+ LanguageType& rLangOfPortion,
+ sal_Bool bAllowImplicitChangesForNotConvertibleText );
+ virtual void HandleNewUnit( const sal_Int32 nUnitStart,
+ const sal_Int32 nUnitEnd );
+ virtual void ReplaceUnit(
+ const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd,
+ const ::rtl::OUString& rOrigText,
+ const ::rtl::OUString& rReplaceWith,
+ const ::com::sun::star::uno::Sequence< sal_Int32 > &rOffsets,
+ ReplacementAction eAction,
+ LanguageType *pNewUnitLanguage );
+
+ virtual sal_Bool HasRubySupport() const;
+
+public:
+ SwHHCWrapper(
+ SwView* pView,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF,
+ LanguageType nSourceLanguage, LanguageType nTargetLanguage,
+ const Font *pTargetFont,
+ sal_Int32 nConvOptions, sal_Bool bIsInteractive,
+ sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection );
+
+ virtual ~SwHHCWrapper();
+
+ void Convert();
+};
+
+
+#endif
+
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
new file mode 100644
index 000000000000..1dc28e197107
--- /dev/null
+++ b/sw/inc/hintids.hxx
@@ -0,0 +1,493 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hintids.hxx,v $
+ * $Revision: 1.36.136.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _HINTIDS_HXX
+#define _HINTIDS_HXX
+
+#include <tools/solar.h> // fuer __FAR_DATA
+#include <sal/types.h> // for sal_Unicode
+#include "swdllapi.h"
+
+// fuer SwTxtHints ohne Endindex wird folgendes Zeichen eingefuegt:
+//JP 24.05.00: for the new UniCode Version:
+#define CH_TXTATR_BREAKWORD ((sal_Unicode)0x01)
+#define CH_TXTATR_INWORD ((sal_Unicode)0x02)
+#define CH_TXTATR_TAB ((sal_Unicode)'\t')
+#define CH_TXTATR_NEWLINE ((sal_Unicode)'\n')
+#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x04)
+#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x05)
+#define CH_TXT_ATR_SUBST_FIELDSTART ("[")
+#define CH_TXT_ATR_SUBST_FIELDEND ("]")
+//#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)'#')
+#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06)
+/*
+#define FIELD_BOOKMARK_PREFIX "__"
+#define FIELD_FORM_BOOKMARK_PREFIX "__FORM"
+*/
+/*
+ * Hier kommen erst mal die enums fuer die Hints
+ */
+
+#define HINT_BEGIN 1
+
+#define POOLATTR_BEGIN HINT_BEGIN
+#define POOLATTR_END RES_UNKNOWNATR_END
+
+// Bereiche fuer die Id's der einzelnen Format-Attribute
+// die Which-Werte fuer die Charakter-Format Attribute
+enum RES_CHRATR
+{
+RES_CHRATR_BEGIN = HINT_BEGIN,
+ RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN, // 1
+ RES_CHRATR_CHARSETCOLOR, // 2
+ RES_CHRATR_COLOR, // 3
+ RES_CHRATR_CONTOUR, // 4
+ RES_CHRATR_CROSSEDOUT, // 5
+ RES_CHRATR_ESCAPEMENT, // 6
+ RES_CHRATR_FONT, // 7
+ RES_CHRATR_FONTSIZE, // 8
+ RES_CHRATR_KERNING, // 9
+ RES_CHRATR_LANGUAGE, // 10
+ RES_CHRATR_POSTURE, // 11
+ RES_CHRATR_PROPORTIONALFONTSIZE, // 12
+ RES_CHRATR_SHADOWED, // 13
+ RES_CHRATR_UNDERLINE, // 14
+ RES_CHRATR_WEIGHT, // 15
+ RES_CHRATR_WORDLINEMODE, // 16
+ RES_CHRATR_AUTOKERN, // 17
+ RES_CHRATR_BLINK, // 18
+ RES_CHRATR_NOHYPHEN, // 19
+ RES_CHRATR_NOLINEBREAK, // 20
+ RES_CHRATR_BACKGROUND, // 21
+ RES_CHRATR_CJK_FONT, // 22
+ RES_CHRATR_CJK_FONTSIZE, // 23
+ RES_CHRATR_CJK_LANGUAGE, // 24
+ RES_CHRATR_CJK_POSTURE, // 25
+ RES_CHRATR_CJK_WEIGHT, // 26
+ RES_CHRATR_CTL_FONT, // 27
+ RES_CHRATR_CTL_FONTSIZE, // 28
+ RES_CHRATR_CTL_LANGUAGE, // 29
+ RES_CHRATR_CTL_POSTURE, // 30
+ RES_CHRATR_CTL_WEIGHT, // 31
+ RES_CHRATR_ROTATE, // 32
+ RES_CHRATR_EMPHASIS_MARK, // 33
+ RES_CHRATR_TWO_LINES, // 34
+ RES_CHRATR_SCALEW, // 35
+ RES_CHRATR_RELIEF, // 36
+ RES_CHRATR_HIDDEN, // 37
+ RES_CHRATR_OVERLINE, // 38
+ RES_CHRATR_DUMMY1, // 39
+ RES_CHRATR_DUMMY2, // 40
+RES_CHRATR_END
+};
+
+// diese Attribute stehen nur im SwpAttr-Array vom TextNode
+enum RES_TXTATR
+{
+RES_TXTATR_BEGIN = RES_CHRATR_END,
+
+/** text attributes with start and end.
+ #i105453#:
+ Hints (SwTxtAttr) with the same start and end position are sorted by
+ WhichId, i.e., the TXTATR constants defined here.
+ The text formatting (SwAttrIter) poses some requirements on TXTATR order:
+ - AUTOFMT must precede CHARFMT, so that auto style can overwrite char style.
+ - INETFMT must precede CHARFMT, so that link style can overwrite char style.
+ (this is actually surprising: CHARFMT hints are not split at INETFMT
+ hints on insertion, but on exporting to ODF. if CHARFMT would precede
+ INETFMT, then exporting and importing will effectively change precedence)
+
+ Nesting hints (SwTxtAttrNesting) also have requirements on TXTATR order,
+ to ensure proper nesting (because CJK_RUBY and INETFMT have no CH_TXTATR):
+ - INETFMT should precede CJK_RUBY (for UNO API it does not matter...)
+ - META and METAFIELD must precede CJK_RUBY and INETFMT
+ */
+RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
+ RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 41
+ RES_TXTATR_TOXMARK, // 42
+ RES_TXTATR_META, // 43
+ RES_TXTATR_METAFIELD, // 44
+ RES_TXTATR_AUTOFMT, // 45
+ RES_TXTATR_INETFMT, // 46
+ RES_TXTATR_CHARFMT, // 47
+ RES_TXTATR_CJK_RUBY, // 48
+ RES_TXTATR_UNKNOWN_CONTAINER, // 49
+ RES_TXTATR_DUMMY5, // 50
+RES_TXTATR_WITHEND_END,
+
+// alle TextAttribute ohne ein Ende
+RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
+ RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 51
+ RES_TXTATR_FLYCNT, // 52
+ RES_TXTATR_FTN, // 53
+ RES_TXTATR_DUMMY4, // 54
+ RES_TXTATR_DUMMY3, // 55
+ RES_TXTATR_DUMMY1, // 56
+ RES_TXTATR_DUMMY2, // 57
+RES_TXTATR_NOEND_END,
+RES_TXTATR_END = RES_TXTATR_NOEND_END
+};
+
+enum RES_PARATR
+{
+RES_PARATR_BEGIN = RES_TXTATR_END,
+ RES_PARATR_LINESPACING = RES_PARATR_BEGIN, // 58
+ RES_PARATR_ADJUST, // 59
+ RES_PARATR_SPLIT, // 60
+ RES_PARATR_ORPHANS, // 61
+ RES_PARATR_WIDOWS, // 62
+ RES_PARATR_TABSTOP, // 63
+ RES_PARATR_HYPHENZONE, // 64
+ RES_PARATR_DROP, // 65
+ RES_PARATR_REGISTER, // 66
+ RES_PARATR_NUMRULE, // 67
+ RES_PARATR_SCRIPTSPACE, // 68
+ RES_PARATR_HANGINGPUNCTUATION, // 69
+ RES_PARATR_FORBIDDEN_RULES, // 70
+ RES_PARATR_VERTALIGN, // 71
+ RES_PARATR_SNAPTOGRID, // 72
+ RES_PARATR_CONNECT_BORDER, // 73
+ RES_PARATR_OUTLINELEVEL, // 74
+RES_PARATR_END
+};
+
+// --> OD 2008-02-25 #refactorlists#
+// list attributes for paragraphs.
+// intentionally these list attributes are not contained in paragraph styles
+enum RES_PARATR_LIST
+{
+RES_PARATR_LIST_BEGIN = RES_PARATR_END,
+ RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN, // 75
+ RES_PARATR_LIST_LEVEL, // 76
+ RES_PARATR_LIST_ISRESTART, // 77
+ RES_PARATR_LIST_RESTARTVALUE, // 78
+ RES_PARATR_LIST_ISCOUNTED, // 79
+RES_PARATR_LIST_END
+};
+// <--
+
+enum RES_FRMATR
+{
+RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
+ RES_FILL_ORDER = RES_FRMATR_BEGIN, // 80
+ RES_FRM_SIZE, // 81
+ RES_PAPER_BIN, // 82
+ RES_LR_SPACE, // 83
+ RES_UL_SPACE, // 84
+ RES_PAGEDESC, // 85
+ RES_BREAK, // 86
+ RES_CNTNT, // 87
+ RES_HEADER, // 88
+ RES_FOOTER, // 89
+ RES_PRINT, // 90
+ RES_OPAQUE, // 91
+ RES_PROTECT, // 92
+ RES_SURROUND, // 93
+ RES_VERT_ORIENT, // 94
+ RES_HORI_ORIENT, // 95
+ RES_ANCHOR, // 96
+ RES_BACKGROUND, // 97
+ RES_BOX, // 98
+ RES_SHADOW, // 99
+ RES_FRMMACRO, // 100
+ RES_COL, // 101
+ RES_KEEP, // 102
+ RES_URL, // 103
+ RES_EDIT_IN_READONLY, // 104
+ RES_LAYOUT_SPLIT, // 105
+ RES_CHAIN, // 106
+ RES_TEXTGRID, // 107
+ RES_LINENUMBER , // 108
+ RES_FTN_AT_TXTEND, // 109
+ RES_END_AT_TXTEND, // 110
+ RES_COLUMNBALANCE, // 111
+ RES_FRAMEDIR, // 112
+ RES_HEADER_FOOTER_EAT_SPACING, // 113
+ RES_ROW_SPLIT, // 114
+ // OD 18.09.2003 #i18732# - insert new item and 5 dummies
+ RES_FOLLOW_TEXT_FLOW, // 115
+// --> collapsing borders FME 2005-05-27 #i29550#
+ RES_COLLAPSING_BORDERS, // 116
+// <-- collapsing
+ // OD 2004-05-04 #i28701# - use dummy1 for new item
+ RES_WRAP_INFLUENCE_ON_OBJPOS, // 117
+ RES_AUTO_STYLE, // 118
+ RES_FRMATR_STYLE_NAME, // 119
+ RES_FRMATR_CONDITIONAL_STYLE_NAME, // 120
+RES_FRMATR_END
+};
+
+enum RES_GRFATR
+{
+RES_GRFATR_BEGIN = RES_FRMATR_END,
+ RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN, // 121
+ RES_GRFATR_CROPGRF, // 122
+
+ RES_GRFATR_ROTATION, // 123
+ RES_GRFATR_LUMINANCE, // 124
+ RES_GRFATR_CONTRAST, // 125
+ RES_GRFATR_CHANNELR, // 126
+ RES_GRFATR_CHANNELG, // 127
+ RES_GRFATR_CHANNELB, // 128
+ RES_GRFATR_GAMMA, // 129
+ RES_GRFATR_INVERT, // 130
+ RES_GRFATR_TRANSPARENCY, // 131
+ RES_GRFATR_DRAWMODE, // 132
+
+ RES_GRFATR_DUMMY1, // 133
+ RES_GRFATR_DUMMY2, // 134
+ RES_GRFATR_DUMMY3, // 135
+ RES_GRFATR_DUMMY4, // 136
+ RES_GRFATR_DUMMY5, // 137
+RES_GRFATR_END
+};
+
+enum RES_BOXATR
+{
+RES_BOXATR_BEGIN = RES_GRFATR_END,
+ RES_BOXATR_FORMAT = RES_BOXATR_BEGIN, // 138
+ RES_BOXATR_FORMULA, // 139
+ RES_BOXATR_VALUE, // 140
+RES_BOXATR_END
+};
+
+enum RES_UNKNOWNATR
+{
+RES_UNKNOWNATR_BEGIN = RES_BOXATR_END,
+ RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 141
+RES_UNKNOWNATR_END
+};
+
+
+
+// ID-s fuer die Formate
+enum RES_FMT
+{
+RES_FMT_BEGIN = RES_UNKNOWNATR_END,
+ RES_CHRFMT = RES_FMT_BEGIN,
+ RES_FRMFMT,
+ RES_FLYFRMFMT,
+ RES_TXTFMTCOLL,
+ RES_GRFFMTCOLL,
+ RES_DRAWFRMFMT,
+ RES_CONDTXTFMTCOLL,
+RES_FMT_END
+};
+
+// die ID's fuer Messages in den Formaten
+enum RES_MSG
+{
+RES_MSG_BEGIN = RES_FMT_END,
+ RES_OBJECTDYING = RES_MSG_BEGIN,
+ RES_FMT_CHG,
+ RES_ATTRSET_CHG,
+ RES_FRM_SIZECHG,
+ RES_TXTATR_FLDCHG,
+ RES_TXTATR_EMPTYCHG,
+ RES_INS_CHR,
+ RES_INS_TXT,
+ RES_DEL_CHR,
+ RES_DEL_TXT,
+ RES_UPDATE_ATTR,
+ RES_PAGEDESC_FTNINFO,
+ RES_REFMARKFLD_UPDATE,
+ RES_DOCPOS_UPDATE,
+ RES_TABLEFML_UPDATE,
+ RES_UPDATEDDETBL,
+ RES_TBLHEADLINECHG,
+ RES_AUTOFMT_DOCNODE,
+ RES_REPAINT,
+ RES_DOC_DTOR,
+ RES_SECTION_HIDDEN,
+ RES_SECTION_NOT_HIDDEN,
+ RES_GRAPHIC_ARRIVED,
+ RES_GRAPHIC_PIECE_ARRIVED,
+ RES_HIDDENPARA_PRINT,
+ RES_CONDCOLL_CONDCHG,
+ RES_VIRTPAGENUM_INFO,
+ // --> OD 2008-02-25 #refactorlists#
+// RES_GETNUMNODES,
+ // <--
+ RES_GETLOWERNUMLEVEL,
+ RES_RESET_FMTWRITTEN,
+ RES_REMOVE_UNO_OBJECT,
+ RES_GRF_REREAD_AND_INCACHE,
+ RES_SECTION_RESETHIDDENFLAG,
+ RES_FINDNEARESTNODE,
+ RES_CONTENT_VISIBLE,
+ RES_FOOTNOTE_DELETED,
+ RES_REFMARK_DELETED,
+ RES_TOXMARK_DELETED,
+ RES_GRAPHIC_SWAPIN,
+ RES_FIELD_DELETED,
+ RES_NAME_CHANGED,
+ RES_TITLE_CHANGED,
+ RES_DESCRIPTION_CHANGED,
+ RES_UNOCURSOR_LEAVES_SECTION,
+ RES_LINKED_GRAPHIC_STREAM_ARRIVED,
+RES_MSG_END
+};
+
+
+// eine ID fuer den RTF-Reader. Die Stylesheets werden wie
+// Attribute behandelt, d.H. es gibt ein StyleSheet Attribut. Um
+// nicht mit anderen Which()-Werten zu kollidieren, ist der Wert
+// hier mit aufgefuehrt. (Auch das Hilfesystem definiert neue
+// Attribute !!)
+enum RES_FLTRATTR
+{
+RES_FLTRATTR_BEGIN = RES_MSG_END,
+ RES_FLTR_STYLESHEET = RES_FLTRATTR_BEGIN,
+ RES_FLTR_BOOKMARK,
+ RES_FLTR_ANCHOR,
+ RES_FLTR_BORDER,
+ RES_FLTR_NUMRULE,
+ RES_FLTR_NUMRULE_NUM,
+ RES_FLTR_SDR_ANCHOR,
+ RES_FLTR_TOX,
+ RES_FLTR_SECTION,
+ RES_FLTR_REDLINE,
+ RES_FLTR_SCRIPTTYPE,
+RES_FLTRATTR_END
+};
+
+#define RES_TBX_DUMMY RES_FLTRATTR_END + 1
+
+#define HINT_END RES_TBX_DUMMY
+
+// Fehler-Erkennung !!
+#define INVALID_HINT HINT_END
+#define RES_WHICHHINT_END HINT_END
+
+
+inline bool isATR(const USHORT nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+inline bool isCHRATR(const USHORT nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
+}
+inline bool isTXTATR_WITHEND(const USHORT nWhich)
+{
+ return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
+ && (RES_TXTATR_WITHEND_END > nWhich);
+}
+inline bool isTXTATR_NOEND(const USHORT nWhich)
+{
+ return (RES_TXTATR_NOEND_BEGIN <= nWhich)
+ && (RES_TXTATR_NOEND_END > nWhich);
+}
+inline bool isTXTATR(const USHORT nWhich)
+{
+ return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
+}
+inline bool isPARATR(const USHORT nWhich)
+{
+ return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
+}
+inline bool isPARATR_LIST(const USHORT nWhich)
+{
+ return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); }
+inline bool isFRMATR(const USHORT nWhich)
+{
+ return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
+}
+inline bool isGRFATR(const USHORT nWhich)
+{
+ return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
+}
+inline bool isBOXATR(const USHORT nWhich)
+{
+ return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
+}
+inline bool isUNKNOWNATR(const USHORT nWhich)
+{
+ return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+
+
+/*
+ * hole aus der statischen Default-Attribut Tabelle ueber den Which-Wert
+ * das entsprechende default Attribut.
+ * Ist keines vorhanden, returnt ein 0-Pointer !!!
+ *
+ * Diese Funktion ist im Init.CXX implementiert. Damit die Formate darauf
+ * zugreifen koennen, ist sie hier als extern deklariert.
+ * Im PRODUCT ist das Teil inline.
+ */
+class SfxPoolItem;
+struct SfxItemInfo;
+typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ];
+
+extern SwDfltAttrTab __FAR_DATA aAttrTab;
+extern SfxItemInfo __FAR_DATA aSlotTab[];
+
+SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( USHORT nWhich );
+
+SW_DLLPUBLIC USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript );
+
+// return for the given TextAttribut without an end the correct character.
+// This function returns
+// CH_TXTATR_BREAKWORD for Textattribut which breaks a word (default)
+// CH_TXTATR_INWORD for Textattribut which dont breaks a word
+class SwTxtAttr;
+sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr );
+
+// alle Sets stehen im init.cxx
+
+// AttrSet-Range fuer die 3 Break-Attribute
+extern USHORT __FAR_DATA aBreakSetRange[];
+// AttrSet-Range fuer die TxtFmtColl
+extern USHORT __FAR_DATA aTxtFmtCollSetRange[];
+// AttrSet-Range fuer die GrfFmtColl
+extern USHORT __FAR_DATA aGrfFmtCollSetRange[];
+// AttrSet-Range fuer die TextNode
+SW_DLLPUBLIC extern USHORT __FAR_DATA aTxtNodeSetRange[];
+// AttrSet-Range fuer die NoTxtNode
+extern USHORT __FAR_DATA aNoTxtNodeSetRange[];
+// AttrSet-Range fuer die SwTable
+extern USHORT __FAR_DATA aTableSetRange[];
+// AttrSet-Range fuer die SwTableLine
+extern USHORT __FAR_DATA aTableLineSetRange[];
+// AttrSet-Range fuer die SwTableBox
+extern USHORT __FAR_DATA aTableBoxSetRange[];
+// AttrSet-Range fuer die SwFrmFmt
+SW_DLLPUBLIC extern USHORT __FAR_DATA aFrmFmtSetRange[];
+// AttrSet-Range fuer die SwCharFmt
+extern USHORT __FAR_DATA aCharFmtSetRange[];
+// AttrSet-Range fuer die character autostyles
+extern USHORT __FAR_DATA aCharAutoFmtSetRange[];
+// AttrSet-Range fuer die SwPageDescFmt
+extern USHORT __FAR_DATA aPgFrmFmtSetRange[];
+
+// check if ID is InRange of AttrSet-Ids
+BOOL IsInRange( const USHORT* pRange, const USHORT nId );
+
+#endif
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
new file mode 100644
index 000000000000..f1911ce7f0c1
--- /dev/null
+++ b/sw/inc/hints.hxx
@@ -0,0 +1,306 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hints.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _HINTS_HXX
+#define _HINTS_HXX
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+#include <swatrset.hxx>
+
+class SwFmt;
+class OutputDevice;
+class SwTable;
+class SwNode;
+class SwNodes;
+class SwCntntNode;
+class SwPageFrm;
+class SwFrm;
+class SwTxtNode;
+class SwHistory;
+
+// Basis-Klasse fuer alle Message-Hints:
+// "Overhead" vom SfxPoolItem wird hier behandelt
+class SwMsgPoolItem : public SfxPoolItem
+{
+public:
+ SwMsgPoolItem( USHORT nWhich );
+
+ // "Overhead" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+};
+
+
+// ---------------------------------------
+// SwPtrMsgPoolItem (altes SwObjectDying!)
+// ---------------------------------------
+
+class SwPtrMsgPoolItem : public SwMsgPoolItem
+{
+public:
+ void * pObject;
+
+ SwPtrMsgPoolItem( USHORT nId, void * pObj )
+ : SwMsgPoolItem( nId ), pObject( pObj )
+ {}
+};
+
+
+
+/*
+ * SwFmtChg wird verschickt, wenn ein Format gegen ein anderes
+ * Format ausgewechselt worden ist. Es werden immer 2. Hints verschickt,
+ * das alte und neue Format.
+ */
+class SwFmtChg: public SwMsgPoolItem
+{
+public:
+ SwFmt *pChangedFmt;
+ SwFmtChg( SwFmt *pFmt );
+};
+
+
+class SwInsChr: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nPos;
+
+ SwInsChr( USHORT nP );
+};
+
+class SwInsTxt: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nPos;
+ xub_StrLen nLen;
+
+ SwInsTxt( xub_StrLen nP, xub_StrLen nL );
+};
+
+class SwDelChr: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nPos;
+
+ SwDelChr( xub_StrLen nP );
+};
+
+class SwDelTxt: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nStart;
+ xub_StrLen nLen;
+
+ SwDelTxt( xub_StrLen nS, xub_StrLen nL );
+};
+
+class SwUpdateAttr: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nStart;
+ xub_StrLen nEnd;
+ USHORT nWhichAttr;
+ SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW );
+};
+
+
+// SwRefMarkFldUpdate wird verschickt, wenn sich die ReferenzMarkierungen
+// Updaten sollen. Um Seiten-/KapitelNummer feststellen zu koennen, muss
+// der akt. Frame befragt werden. Dafuer wird das akt. OutputDevice benoetigt.
+class SwRefMarkFldUpdate : public SwMsgPoolItem
+{
+public:
+ const OutputDevice* pOut; // Pointer auf das aktuelle Output-Device
+ SwRefMarkFldUpdate( const OutputDevice* );
+};
+
+// SwDocPosUpdate wird verschickt, um zu signalisieren, dass nur die
+// Frames ab oder bis zu einer bestimmten dokument-globalen Position
+// geupdated werden brauchen. Zur Zeit wird dies nur beim Updaten
+// von Seitennummernfeldern benoetigt.
+
+class SwDocPosUpdate : public SwMsgPoolItem
+{
+public:
+ const long nDocPos;
+ SwDocPosUpdate( const long nDocPos );
+};
+
+// SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll
+// JP 16.02.99: oder wenn die Tabelle selbst gemergt oder gesplittet wird
+enum TableFmlUpdtFlags { TBL_CALC = 0,
+ TBL_BOXNAME,
+ TBL_BOXPTR,
+ TBL_RELBOXNAME,
+ TBL_MERGETBL,
+ TBL_SPLITTBL
+ };
+class SwTableFmlUpdate : public SwMsgPoolItem
+{
+public:
+ const SwTable* pTbl; // Pointer auf die zu aktuelle Tabelle
+ union {
+ const SwTable* pDelTbl; // Merge: Ptr auf die zu loeschende Tabelle
+ const String* pNewTblNm; // Split: der Name der neuen Tabelle
+ } DATA;
+ SwHistory* pHistory;
+ USHORT nSplitLine; // Split: ab dieser BaseLine wird gespl.
+ TableFmlUpdtFlags eFlags;
+ BOOL bModified : 1;
+ BOOL bBehindSplitLine : 1;
+
+ SwTableFmlUpdate( const SwTable* );
+};
+
+
+class SwAutoFmtGetDocNode: public SwMsgPoolItem
+{
+public:
+ const SwCntntNode* pCntntNode;
+ const SwNodes* pNodes;
+
+ SwAutoFmtGetDocNode( const SwNodes* pNds );
+};
+
+/*
+ * SwAttrSetChg wird verschicht, wenn sich in dem SwAttrSet rTheChgdSet
+ * etwas veraendert hat. Es werden immer 2. Hints
+ * verschickt, die alten und neuen Items in dem rTheChgdSet.
+ */
+class SwAttrSetChg: public SwMsgPoolItem
+{
+ BOOL bDelSet;
+ SwAttrSet* pChgSet; // was sich veraendert hat
+ const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !!
+public:
+ SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
+ SwAttrSetChg( const SwAttrSetChg& );
+ ~SwAttrSetChg();
+
+ // was sich veraendert hat
+ const SwAttrSet* GetChgSet() const { return pChgSet; }
+ SwAttrSet* GetChgSet() { return pChgSet; }
+
+ // wo es sich geaendert hat
+ const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
+
+ USHORT Count() const { return pChgSet->Count(); }
+ void ClearItem( USHORT nWhichL = 0 )
+#ifdef PRODUCT
+ { pChgSet->ClearItem( nWhichL ); }
+#else
+ ;
+#endif
+};
+
+class SwCondCollCondChg: public SwMsgPoolItem
+{
+public:
+ SwFmt *pChangedFmt;
+ SwCondCollCondChg( SwFmt *pFmt );
+};
+
+class SwVirtPageNumInfo: public SwMsgPoolItem
+{
+ const SwPageFrm *pPage;
+ const SwPageFrm *pOrigPage;
+ const SwFrm *pFrm; //An einem Absatz/Tabelle koennen mehrere
+ //Attribute sitzen. Der Frame muss dann
+ //muss dann letztlich bei bestimmen
+ //welches Attribut gilt und um welche physikalische
+ //Seite es sich handelt.
+public:
+ SwVirtPageNumInfo( const SwPageFrm *pPg );
+
+ const SwPageFrm *GetPage() { return pPage; }
+ const SwPageFrm *GetOrigPage() { return pOrigPage;}
+ const SwFrm *GetFrm() { return pFrm; }
+ void SetInfo( const SwPageFrm *pPg,
+ const SwFrm *pF ) { pFrm = pF, pPage = pPg; }
+};
+
+
+// --> OD 2008-02-19 #refactorlists#
+//DECLARE_TABLE( SwTxtNodeTable, SwTxtNode* )
+
+//class SwNumRuleInfo : public SwMsgPoolItem
+//{
+// SwTxtNodeTable aList;
+// const String& rName;
+//public:
+// SwNumRuleInfo( const String& rRuleName );
+
+// const String& GetName() const { return rName; }
+// void AddNode( SwTxtNode& rNd );
+
+// // erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc
+// // Der Code steht im docnum.cxx
+// // #111955#
+// void MakeList( SwDoc& rDoc, BOOL bOutline = FALSE );
+
+// const SwTxtNodeTable& GetTxtNodeList() const { return aList; }
+//};
+// <--
+
+class SwNRuleLowerLevel : public SwMsgPoolItem
+{
+ const String& rName;
+ BYTE nLvl;
+public:
+ SwNRuleLowerLevel( const String& rRuleName, BYTE nLevel );
+
+ const String& GetName() const { return rName; }
+ BYTE GetLevel() const { return nLvl; }
+};
+
+class SwFindNearestNode : public SwMsgPoolItem
+{
+ const SwNode *pNd, *pFnd;
+public:
+ SwFindNearestNode( const SwNode& rNd );
+ void CheckNode( const SwNode& rNd );
+
+ const SwNode* GetFoundNode() const { return pFnd; }
+};
+
+class SwStringMsgPoolItem : public SwMsgPoolItem
+{
+ String sStr;
+public:
+
+ const String& GetString() const { return sStr; }
+
+ SwStringMsgPoolItem( USHORT nId, const String& rStr )
+ : SwMsgPoolItem( nId ), sStr( rStr )
+ {}
+};
+
+#endif
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
new file mode 100644
index 000000000000..d6fe0765bad0
--- /dev/null
+++ b/sw/inc/htmltbl.hxx
@@ -0,0 +1,494 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: htmltbl.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _HTMLTBL_HXX
+#define _HTMLTBL_HXX
+
+
+#include <vcl/timer.hxx>
+#include <svx/svxenum.hxx>
+
+#include "swtypes.hxx"
+#include "node.hxx" // Fuer SwStartNode
+
+
+class SwTableBox;
+class SwTable;
+class SwHTMLTableLayout;
+class SwDoc;
+class SwFrmFmt;
+
+#define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
+
+class SwHTMLTableLayoutCnts
+{
+ SwHTMLTableLayoutCnts *pNext; // der naechste Inhalt
+
+ // von den beiden naechsten Pointern darf nur einer gesetzt sein!
+ SwTableBox *pBox; // ein Box
+ SwHTMLTableLayout *pTable; // eine "Tabelle in der Tabelle"
+
+ // Beim ersten Durchlauf gibt es noch keine Boxen. Es wird dann
+ // pStartNode anstelle von pBox verwendet.
+ const SwStartNode *pStartNode;
+
+ // Die folgenden Zahler geben an, wie oft ein Pass bereits fuer diesen
+ // Inhalt durchgefuehrt wurde. Dazu werden sie mit einer Soll-Vorgabe
+ // verglichen. Wird 255 erreicht laufen sie bei 0 weiter. So wird
+ // eine Reinitialisierung bei jedem Resize vermieden.
+ BYTE nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
+ BYTE nWidthSet; // Wieoft wurde die Breite gesetzt?
+
+ BOOL bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
+
+public:
+
+ SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
+ BOOL bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
+
+ ~SwHTMLTableLayoutCnts();
+
+ void SetTableBox( SwTableBox *pBx ) { pBox = pBx; }
+ SwTableBox *GetTableBox() const { return pBox; }
+
+ SwHTMLTableLayout *GetTable() const { return pTable; }
+
+ const SwStartNode *GetStartNode() const;
+
+ // Ermitteln des naechsten Knotens
+ SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
+
+ void SetWidthSet( BYTE nRef ) { nWidthSet = nRef; }
+ BOOL IsWidthSet( BYTE nRef ) const { return nRef==nWidthSet; }
+
+ void SetPass1Done( BYTE nRef ) { nPass1Done = nRef; }
+ BOOL IsPass1Done( BYTE nRef ) const { return nRef==nPass1Done; }
+
+ BOOL HasNoBreakTag() const { return bNoBreakTag; }
+};
+
+/* */
+
+class SwHTMLTableLayoutCell
+{
+ SwHTMLTableLayoutCnts *pContents; // der Inhalt der Zelle
+
+ USHORT nRowSpan; // ROWSPAN der Zelle
+ USHORT nColSpan; // COLSPAN der Zelle
+ USHORT nWidthOption;// angegebene Breite der Zelle in Twip oder %
+
+ BOOL bPrcWidthOption : 1;// nWidth ist %-Angabe
+ BOOL bNoWrapOption : 1; // NOWRAP-Option
+
+public:
+
+ SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
+ USHORT nRSpan, USHORT nCSpan,
+ USHORT nWidthOpt, BOOL bPrcWdthOpt,
+ BOOL nNWrapOpt );
+
+ ~SwHTMLTableLayoutCell();
+
+ // Setzen/Ermitteln des Inhalts einer Zelle
+ void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; }
+ SwHTMLTableLayoutCnts *GetContents() const { return pContents; }
+
+ inline void SetProtected();
+
+ // ROWSPAN/COLSPAN der Zelle Setzen/Ermitteln
+ void SetRowSpan( USHORT nRSpan ) { nRowSpan = nRSpan; }
+ USHORT GetRowSpan() const { return nRowSpan; }
+ USHORT GetColSpan() const { return nColSpan; }
+
+ USHORT GetWidthOption() const { return nWidthOption; }
+ BOOL IsPrcWidthOption() const { return bPrcWidthOption; }
+
+ BOOL HasNoWrapOption() const { return bNoWrapOption; }
+};
+
+/* */
+
+class SwHTMLTableLayoutColumn
+{
+ // Zwischenwerte von AutoLayoutPass1
+ ULONG nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
+
+ // Ergebnisse von AutoLayoutPass1
+ ULONG nMin, nMax;
+
+ // Ergibnisse von Pass 2
+ USHORT nAbsColWidth; // in Twips
+ USHORT nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
+
+ USHORT nWidthOption; // Optionen von <COL> oder <TD>/<TH>
+
+ BOOL bRelWidthOption : 1;
+ BOOL bLeftBorder : 1;
+
+public:
+
+ SwHTMLTableLayoutColumn( USHORT nColWidthOpt, BOOL bRelColWidthOpt,
+ BOOL bLBorder );
+
+ ~SwHTMLTableLayoutColumn() {}
+
+ inline void MergeCellWidthOption( USHORT nWidth, BOOL bPrc );
+ inline void SetWidthOption( USHORT nWidth, BOOL bRelWidth, BOOL bTest );
+
+ USHORT GetWidthOption() const { return nWidthOption; }
+ BOOL IsRelWidthOption() const { return bRelWidthOption; }
+
+ inline void MergeMinMaxNoAlign( ULONG nMin, ULONG nMax, ULONG nAbsMin );
+ ULONG GetMinNoAlign() const { return nMinNoAlign; }
+ ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
+ ULONG GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
+ inline void ClearPass1Info( BOOL bWidthOpt );
+
+ inline void SetMinMax( ULONG nMin, ULONG nMax );
+ void SetMax( ULONG nVal ) { nMax = nVal; }
+ void AddToMin( ULONG nVal ) { nMin += nVal; }
+ void AddToMax( ULONG nVal ) { nMax += nVal; }
+ ULONG GetMin() const { return nMin; }
+ ULONG GetMax() const { return nMax; }
+
+ void SetAbsColWidth( USHORT nWidth ) { nAbsColWidth = nWidth; }
+ USHORT GetAbsColWidth() const { return nAbsColWidth; }
+
+ void SetRelColWidth( USHORT nWidth ) { nRelColWidth = nWidth; }
+ USHORT GetRelColWidth() const { return nRelColWidth; }
+
+ BOOL HasLeftBorder() const { return bLeftBorder; }
+};
+
+/* */
+
+class SwHTMLTableLayout
+{
+ Timer aResizeTimer; // Timer fuer DelayedResize
+
+ SwHTMLTableLayoutColumn **aColumns;
+ SwHTMLTableLayoutCell **aCells;
+
+ const SwTable *pSwTable; // die SwTable (nur Top-Table)
+ SwTableBox *pLeftFillerBox; // linke Filler-Zelle (nur Tab in Tab)
+ SwTableBox *pRightFillerBox; // rechte Filler-Zelle (nur Tab-in Tab)
+
+ ULONG nMin; // minimale Breite der Tabelle (Twips)
+ ULONG nMax; // maximale Breite der Tabelle (Twips)
+
+ USHORT nRows; // Anzahl Zeilen
+ USHORT nCols; // Anzahl Spalten
+
+ USHORT nLeftMargin; // Abstand zum linken Rand (aus Absatz)
+ USHORT nRightMargin; // Abstand zum rechten Rand (aus Absatz)
+
+ USHORT nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
+ USHORT nInhAbsRightSpace; // der Zellen zugeschlagen wurde
+
+ USHORT nRelLeftFill; // relative Breiten der Zellen zur
+ USHORT nRelRightFill; // Ausrichtung von Tabellen in Tabellen
+
+ USHORT nRelTabWidth; // Die relative Breite der Tabelle
+
+ USHORT nWidthOption; // die Breite der Tabelle (in Twip oder %)
+ USHORT nCellPadding; // Abstand zum Inhalt (in Twip)
+ USHORT nCellSpacing; // Absatnd zwischen Zellen (in Twip)
+ USHORT nBorder; // Dicke der ausseren Umrandung bzw.
+ // Platz, den Netscape hierfuer einrechnet.
+
+ USHORT nLeftBorderWidth;
+ USHORT nRightBorderWidth;
+ USHORT nInhLeftBorderWidth;
+ USHORT nInhRightBorderWidth;
+ USHORT nBorderWidth;
+
+ USHORT nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
+ USHORT nLastResizeAbsAvail;
+
+ BYTE nPass1Done; // Vorgabe-Werte fuer die einzelen
+ BYTE nWidthSet; // Schleifen-Durchlauefe
+
+ SvxAdjust eTableAdjust; // Die Ausrichtung der Tabelle
+
+ BOOL bColsOption : 1; // Tabelle besitzt eine COLS-Option
+ BOOL bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
+ BOOL bPrcWidthOption : 1; // Breite ist eine %-Angabe
+ BOOL bUseRelWidth : 1; // SwTable bekommt relative Breite
+
+ BOOL bMustResize : 1; // Tabelle muss in der Breite ang. werden
+ BOOL bExportable : 1; // Layout kann zum Export genutzt werden
+ BOOL bBordersChanged : 1; // Umrandung wurde geaendert
+ BOOL bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
+
+ BOOL bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
+ BOOL bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
+ BOOL bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
+ // werden
+
+// USHORT GetLeftBorderWidth( USHORT nCol ) const;
+// USHORT GetRightBorderWidth( USHORT nCol, USHORT nColSpan ) const;
+
+ void AddBorderWidth( ULONG &rMin, ULONG &rMax, ULONG& rAbsMin,
+ USHORT nCol, USHORT nColSpan,
+ BOOL bSwBorders=TRUE ) const;
+ void SetBoxWidth( SwTableBox *pBox, USHORT nCol, USHORT nColSpan ) const;
+
+ const SwStartNode *GetAnyBoxStartNode() const;
+ SwFrmFmt *FindFlyFrmFmt() const;
+ const SwDoc *GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); }
+
+ void ClearPass1Info() { nMin = nMax = 0; }
+
+ void _Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+
+ DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
+
+public:
+
+ SwHTMLTableLayout( const SwTable *pSwTbl,
+ USHORT nRows, USHORT nCols, BOOL bColsOpt, BOOL ColTgs,
+ USHORT nWidth, BOOL bPrcWidth, USHORT nBorderOpt,
+ USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
+ USHORT nLMargin, USHORT nRMargin, USHORT nBWidth,
+ USHORT nLeftBWidth, USHORT nRightBWidth,
+ USHORT nInhLeftBWidth, USHORT nInhRightBWidth );
+
+ ~SwHTMLTableLayout();
+
+ USHORT GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
+ BOOL bSwBorders=TRUE ) const;
+ USHORT GetRightCellSpace( USHORT nCol, USHORT nColSpan,
+ BOOL bSwBorders=TRUE ) const;
+ inline USHORT GetInhCellSpace( USHORT nCol, USHORT nColSpan ) const;
+
+ inline void SetInhBorderWidths( USHORT nLeft, USHORT nRight );
+
+
+ void GetAvail( USHORT nCol, USHORT nColSpan, USHORT& rAbsAvail,
+ USHORT& rRelAvail ) const;
+
+ void AutoLayoutPass1();
+ void AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
+ USHORT nAbsLeftSpace, USHORT nAbsRightSpace,
+ USHORT nParentInhSpace );
+ void SetWidths( BOOL bCallPass2=FALSE, USHORT nAbsAvail=0,
+ USHORT nRelAvail=0, USHORT nAbsLeftSpace=0,
+ USHORT nAbsRightSpace=0,
+ USHORT nParentInhSpace=0 );
+
+ inline SwHTMLTableLayoutColumn *GetColumn( USHORT nCol ) const;
+ inline void SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol );
+
+ inline SwHTMLTableLayoutCell *GetCell( USHORT nRow, USHORT nCol ) const;
+ inline void SetCell( SwHTMLTableLayoutCell *pCell, USHORT nRow, USHORT nCol );
+
+ void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
+ void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
+
+ ULONG GetMin() const { return nMin; }
+ ULONG GetMax() const { return nMax; }
+ USHORT GetRelLeftFill() const { return nRelLeftFill; }
+ USHORT GetRelRightFill() const { return nRelRightFill; }
+
+ inline long GetBrowseWidthMin() const;
+
+ BOOL HasColsOption() const { return bColsOption; }
+ BOOL HasColTags() const { return bColTags; }
+
+ BOOL IsTopTable() const { return pSwTable != 0; }
+
+ void SetMustResize( BOOL bSet ) { bMustResize = bSet; }
+ void SetMustNotResize( BOOL bSet ) { bMustNotResize = bSet; }
+ void SetMustNotRecalc( BOOL bSet ) { bMustNotRecalc = bSet; }
+
+ // Neueberechnung der Tabellenbreiten fuer die uebergebene verfuegbare
+ // Breite.
+ // - Wenn bRecalc gesetzt ist, werden auch der Inhalt der Boxen
+ // zur Berechnung herangezogen.
+ // neu berechnet.
+ // - Wenn bForce gesetzt ist, wird die Tabelle auch neu berechnet, wenn
+ // dies mit SetMustNotResize unterdrueckt werden soll.
+ // - Wenn nDelay>0 wird die Berechnung entsprechend verzoegert.
+ // Innerhalb der Verzeoegerung auftretende Resize-Aufrufe werden
+ // ignoriert, die Verzeogerung wird aber ggf. uebernommen.
+ // - Wenn nDelay==HTMLTABLE_RESIZE_NOW ist, wird sofort Resized und
+ // eventuell noch asstehende Resize-Aufrufe werden nicht mehr
+ // ausgefuehrt.
+ // - Der Rueckgabewert gibt an, ob sich die Tabelle geaendert hat.
+ BOOL Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE, BOOL bForce=FALSE,
+ ULONG nDelay=0 );
+
+ void BordersChanged( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+
+ // Ermitteln der verfuegbaren Breite. Das geht nur, wenn ein Layout
+ // oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben.
+ // (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.)
+ static USHORT GetBrowseWidth( const SwDoc& rDoc );
+ static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
+
+ // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
+ USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
+
+ // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame oder
+ // das statische GetBrowseWidth, wenn kein Layout existiert.
+ USHORT GetBrowseWidthByTable( const SwDoc& rDoc ) const;
+
+ // Fuer Export
+ USHORT GetWidthOption() const { return nWidthOption; }
+ BOOL HasPrcWidthOption() const { return bPrcWidthOption; }
+
+ USHORT GetCellPadding() const { return nCellPadding; }
+ USHORT GetCellSpacing() const { return nCellSpacing; }
+ USHORT GetBorder() const { return nBorder; }
+
+ USHORT GetRowCount() const { return nRows; }
+ USHORT GetColCount() const { return nCols; }
+
+ void SetExportable( BOOL bSet ) { bExportable = bSet; }
+ BOOL IsExportable() const { return bExportable; }
+
+ BOOL HaveBordersChanged() const { return bBordersChanged; }
+
+ void SetMayBeInFlyFrame( BOOL bSet ) { bMayBeInFlyFrame = bSet; }
+ BOOL MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
+};
+
+/* */
+
+inline void SwHTMLTableLayoutCell::SetProtected()
+{
+ nRowSpan = 1;
+ nColSpan = 1;
+
+ pContents = 0;
+}
+
+/* */
+
+inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nCMin,
+ ULONG nCMax, ULONG nAbsMin )
+{
+ if( nCMin > nMinNoAlign )
+ nMinNoAlign = nCMin;
+ if( nCMax > nMaxNoAlign )
+ nMaxNoAlign = nCMax;
+ if( nAbsMin > nAbsMinNoAlign )
+ nAbsMinNoAlign = nAbsMin;
+}
+
+inline void SwHTMLTableLayoutColumn::ClearPass1Info( BOOL bWidthOpt )
+{
+ nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
+ nMin = nMax = 0;
+ if( bWidthOpt )
+ {
+ nWidthOption = 0;
+ bRelWidthOption = FALSE;
+ }
+}
+
+inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
+ USHORT nWidth, BOOL bRel )
+{
+ if( !nWidthOption ||
+ (bRel==bRelWidthOption && nWidthOption < nWidth) )
+ {
+ nWidthOption = nWidth;
+ bRelWidthOption = bRel;
+ }
+}
+
+inline void SwHTMLTableLayoutColumn::SetMinMax( ULONG nMn, ULONG nMx )
+{
+ nMin = nMn;
+ nMax = nMx;
+}
+
+/* */
+
+inline USHORT SwHTMLTableLayout::GetInhCellSpace( USHORT nCol,
+ USHORT nColSpan ) const
+{
+ USHORT nSpace = 0;
+ if( nCol==0 )
+ nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsLeftSpace);
+ if( nCol+nColSpan==nCols )
+ nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsRightSpace);
+
+ return nSpace;
+}
+
+inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( USHORT nCol ) const
+{
+ return aColumns[nCol];
+}
+
+inline void SwHTMLTableLayoutColumn::SetWidthOption(
+ USHORT nWidth, BOOL bRelWidth, BOOL bTest )
+{
+ if( bTest && bRelWidthOption==bRelWidth )
+ {
+ if( nWidth > nWidthOption )
+ nWidthOption = nWidth;
+ }
+ else
+ nWidthOption = nWidth;
+ bRelWidthOption = bRelWidth;
+}
+
+inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol )
+{
+ aColumns[nCol] = pCol;
+}
+
+inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( USHORT nRow, USHORT nCol ) const
+{
+ return aCells[nRow*nCols+nCol];
+}
+
+inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
+ USHORT nRow, USHORT nCol )
+{
+ aCells[nRow*nCols+nCol] = pCell;
+}
+
+inline long SwHTMLTableLayout::GetBrowseWidthMin() const
+{
+ return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
+}
+
+void SwHTMLTableLayout::SetInhBorderWidths( USHORT nLeft, USHORT nRight )
+{
+ nInhLeftBorderWidth = nLeft;
+ nInhRightBorderWidth = nRight;
+}
+
+
+#endif
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
new file mode 100644
index 000000000000..b75579244f70
--- /dev/null
+++ b/sw/inc/index.hrc
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: index.hrc,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+/* fuer den DesignEditor
+#define RC_INDEX_BEGIN 256
+*/
+
+#ifndef _INDEX_HRC
+#define _INDEX_HRC
+
+#include "rcid.hrc"
+
+#define DLG_FORMEDT (RC_INDEX_BEGIN + 0)
+#define DLG_IDX (RC_INDEX_BEGIN + 1)
+#define DLG_USRIDX (RC_INDEX_BEGIN + 2)
+#define DLG_INSIDXMARK (RC_INDEX_BEGIN + 3)
+#define DLG_CNTTABLE (RC_INDEX_BEGIN + 4)
+#define DLG_MULTMRK (RC_INDEX_BEGIN + 5)
+
+#define STR_TITLE (RC_INDEX_BEGIN + 6)
+#define STR_ALPHA (RC_INDEX_BEGIN + 7)
+#define STR_LEVEL (RC_INDEX_BEGIN + 8)
+
+#define DLG_INSAUTHMARK (RC_INDEX_BEGIN + 9)
+#define DLG_CREATE_AUTH_ENTRY (RC_INDEX_BEGIN + 10)
+#define DLG_EDIT_IDXMARK (RC_INDEX_BEGIN + 11)
+#define DLG_EDIT_AUTHMARK (RC_INDEX_BEGIN + 12)
+
+#define STR_IDXMRK_INSERT (RC_INDEX_BEGIN + 13)
+#define STR_IDXMRK_EDIT (RC_INDEX_BEGIN + 14)
+#define STR_AUTHMRK_EDIT (RC_INDEX_BEGIN + 15)
+#define STR_AUTHMRK_INSERT (RC_INDEX_BEGIN + 16)
+
+#define DLG_NEW_USER_IDX (RC_INDEX_BEGIN + 17)
+
+#define STR_FILE_NOT_FOUND (RC_INDEX_BEGIN + 18)
+#define DLG_CHANGE_AUTH_ENTRY (RC_INDEX_BEGIN + 19)
+#define DLG_CREATE_AUTOMARK (RC_INDEX_BEGIN + 20)
+
+#define DLG_EDIT_IDXMARK_CJK (RC_INDEX_BEGIN + 21)
+#define DLG_INSIDXMARK_CJK (RC_INDEX_BEGIN + 22)
+#endif // _INDEX_HRC
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
new file mode 100644
index 000000000000..9837a4e664bc
--- /dev/null
+++ b/sw/inc/index.hxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: index.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _INDEX_HXX
+#define _INDEX_HXX
+
+#include <limits.h>
+#include <tools/solar.h>
+#include <tools/rtti.hxx> // for RTTI of SwIndexReg
+#include <tools/string.hxx> // for xub_StrLen
+#include <swdllapi.h>
+
+#define INVALID_INDEX STRING_NOTFOUND
+
+// Maximale Anzahl von Indizies im IndexArray (zum Abtesten auf Ueberlaeufe)
+class SwIndex;
+class SwIndexReg;
+struct SwPosition;
+
+#ifdef PRODUCT
+#define INLINE inline
+#else
+#define INLINE
+#endif
+
+class SW_DLLPUBLIC SwIndex
+{
+ friend class SwIndexReg;
+
+#ifndef PRODUCT
+ static int nSerial;
+ int MySerial;
+#endif
+
+ xub_StrLen nIndex;
+ SwIndexReg* pArray;
+ SwIndex *pNext, *pPrev;
+
+ SwIndex& ChgValue( const SwIndex& rIdx, xub_StrLen nNewValue );
+ void Remove(); // Ausketten
+
+public:
+ SwIndex( SwIndexReg * pReg, xub_StrLen nIdx = 0 );
+ SwIndex( const SwIndex & );
+ SwIndex( const SwIndex &, short nDiff );
+ ~SwIndex() { Remove(); }
+
+ INLINE xub_StrLen operator++();
+ INLINE xub_StrLen operator--();
+#ifndef CFRONT
+ INLINE xub_StrLen operator++(int);
+ INLINE xub_StrLen operator--(int);
+#endif
+
+ INLINE xub_StrLen operator+=( xub_StrLen );
+ INLINE xub_StrLen operator-=( xub_StrLen );
+ INLINE xub_StrLen operator+=( const SwIndex& );
+ INLINE xub_StrLen operator-=( const SwIndex& );
+
+ INLINE BOOL operator<( const SwIndex& ) const;
+ INLINE BOOL operator<=( const SwIndex& ) const;
+ INLINE BOOL operator>( const SwIndex& ) const;
+ INLINE BOOL operator>=( const SwIndex& ) const;
+ BOOL operator==( const SwIndex& rSwIndex ) const
+ { return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); }
+
+ BOOL operator!=( const SwIndex& rSwIndex ) const
+ { return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); }
+
+ BOOL operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
+ BOOL operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
+ BOOL operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
+ BOOL operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
+ BOOL operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
+ BOOL operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
+
+ INLINE SwIndex& operator=( xub_StrLen );
+ SwIndex& operator=( const SwIndex & );
+
+ // gebe den Wert vom Index als xub_StrLen zurueck
+ xub_StrLen GetIndex() const { return nIndex; }
+
+ // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren
+ // Objektes
+ SwIndex &Assign(SwIndexReg *,xub_StrLen);
+
+ // Herausgabe des Pointers auf das IndexArray,
+ // (fuers RTTI am SwIndexReg)
+ const SwIndexReg* GetIdxReg() const { return pArray; }
+};
+
+#undef INLINE
+
+class SwIndexReg
+{
+ friend class SwIndex;
+ friend bool lcl_PosOk(const SwPosition & aPos);
+
+ const SwIndex *pFirst, *pLast, *pMiddle;
+
+ // ein globales Array, in das Indizies verschoben werden, die mal
+ // temporaer "ausgelagert" werden muessen; oder die zum Zeitpunkt des
+ // anlegens kein gueltiges Array kennen (SwPaM/SwPosition!)
+ friend void _InitCore();
+ friend void _FinitCore();
+ static SwIndexReg* pEmptyIndexArray;
+
+protected:
+ virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
+ const bool bNegative = false, const bool bDelete = false );
+
+ void ChkArr();
+
+ BOOL HasAnyIndex() const { return 0 != pFirst; }
+
+public:
+ SwIndexReg();
+ virtual ~SwIndexReg();
+
+ // rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
+ // kann ueber das SwIndexReg typsicher gecastet werden.
+ TYPEINFO();
+
+ void MoveTo( SwIndexReg& rArr );
+};
+
+#ifdef PRODUCT
+
+inline xub_StrLen SwIndex::operator++()
+{
+ return ChgValue( *this, nIndex+1 ).nIndex;
+}
+inline xub_StrLen SwIndex::operator--()
+{
+ return ChgValue( *this, nIndex-1 ).nIndex;
+}
+#ifndef CFRONT
+inline xub_StrLen SwIndex::operator++(int)
+{
+ xub_StrLen nOldIndex = nIndex;
+ ChgValue( *this, nIndex+1 );
+ return nOldIndex;
+}
+inline xub_StrLen SwIndex::operator--(int)
+{
+ xub_StrLen nOldIndex = nIndex;
+ ChgValue( *this, nIndex-1 );
+ return nOldIndex;
+}
+#endif
+
+inline xub_StrLen SwIndex::operator+=( xub_StrLen nWert )
+{
+ return ChgValue( *this, nIndex + nWert ).nIndex;
+}
+inline xub_StrLen SwIndex::operator-=( xub_StrLen nWert )
+{
+ return ChgValue( *this, nIndex - nWert ).nIndex;
+}
+inline xub_StrLen SwIndex::operator+=( const SwIndex& rIndex )
+{
+ return ChgValue( *this, nIndex + rIndex.nIndex ).nIndex;
+}
+inline xub_StrLen SwIndex::operator-=( const SwIndex& rIndex )
+{
+ return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex;
+}
+
+inline BOOL SwIndex::operator<( const SwIndex& rIndex ) const
+{
+ return nIndex < rIndex.nIndex;
+}
+inline BOOL SwIndex::operator<=( const SwIndex& rIndex ) const
+{
+ return nIndex <= rIndex.nIndex;
+}
+inline BOOL SwIndex::operator>( const SwIndex& rIndex ) const
+{
+ return nIndex > rIndex.nIndex;
+}
+inline BOOL SwIndex::operator>=( const SwIndex& rIndex ) const
+{
+ return nIndex >= rIndex.nIndex;
+}
+inline SwIndex& SwIndex::operator=( xub_StrLen nWert )
+{
+ if( nIndex != nWert )
+ ChgValue( *this, nWert );
+ return *this;
+}
+
+#endif // PRODUCT
+
+#endif
diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx
new file mode 100644
index 000000000000..a427e50b9981
--- /dev/null
+++ b/sw/inc/inetfld.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: inetfld.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _INETFLD_HXX
+#define _INETFLD_HXX
+
+
+#include "fldbas.hxx"
+
+class SvxMacro;
+class SvxMacroTableDtor;
+class SwINetField;
+class SwCharFmt;
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: InterNet-FieldType -> Lade Document mit der URL
+ --------------------------------------------------------------------*/
+
+class SwINetFieldType : public SwFieldType
+{
+ SwDepend aNormalFmt;
+ SwDepend aVisitFmt;
+ SwDoc* pDoc;
+
+public:
+ SwINetFieldType( SwDoc* pDoc );
+
+ virtual SwFieldType* Copy() const;
+
+ SwCharFmt* GetCharFmt( const SwINetField& rFld );
+
+ SwDoc* GetDoc() const { return pDoc; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: InterNet-Field -> Lade Document mit der URL
+ --------------------------------------------------------------------*/
+
+class SwINetField : public SwField
+{
+ friend class SwINetFieldType;
+
+ String sTargetFrameName; // in diesen Frame soll die URL
+ String sURL;
+ String sText;
+ SvxMacroTableDtor* pMacroTbl;
+
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
+ const String& rURL, const String& rText );
+ virtual ~SwINetField();
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // URL
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // HinweisText
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ // das ist das akt. Zeichenformat
+ SwCharFmt* GetCharFmt();
+ const SwCharFmt* GetCharFmt() const
+ { return ((SwINetField*)this)->GetCharFmt(); }
+
+ const String& GetTargetFrameName() const { return sTargetFrameName; }
+ void SetTargetFrameName( const String& rNm ) { sTargetFrameName = rNm; }
+
+ // setze eine neue oder loesche die akt. MakroTabelle
+ void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
+ const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
+
+ // setze / erfrage ein Makro
+ void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( USHORT nEvent ) const;
+};
+
+
+#endif // _INETFLD_HXX
+
diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx
new file mode 100644
index 000000000000..ecee1bdce174
--- /dev/null
+++ b/sw/inc/init.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: init.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _INIT_HXX
+#define _INIT_HXX
+
+class ViewShell;
+
+void _InitCore(); // bastyp/init.cxx
+void _FinitCore();
+
+void _InitFilter(); // basflt/fltini.cxx
+void _FinitFilter();
+
+// layout/newfrm.cxx
+void _FrmInit();
+void _FrmFinit();
+void SetShell( ViewShell *pSh );
+
+// text/txtfrm.cxx
+void _TextInit();
+void _TextFinit();
+
+
+#endif
diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx
new file mode 100644
index 000000000000..7e912f3bba33
--- /dev/null
+++ b/sw/inc/io.hxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: io.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+// eigene Klasse fuer IO, die die systemunabhaengige Darstellung
+// uebernimmt (bytes dreht, Character konvertiert)
+// das Schreiben erfolgt aus Effizienzgruenden binaer
+#ifndef _IO_HXX
+#define _IO_HXX
+
+#ifdef UNX
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+
+#include <fcntl.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
+#ifndef _KEYCOD_HXX //autogen
+#include <vcl/keycod.hxx>
+#endif
+#include <tools/stream.hxx>
+
+/*$
+class BinaryFile {
+ int fd;
+public:
+ enum IO_OpenMode {
+ BF_READ = O_RDONLY,
+ BF_WRITE = O_RDWR,
+ BF_CREATE = O_CREAT,
+ BF_TRUNC = O_TRUNC
+ };
+ // ctor oeffnet File im BinearMode, dtor schliesst es
+ BinaryFile(const String &, int eOpenMode);
+ ~BinaryFile();
+ BOOL Ok() const {
+ return -1 != fd;
+ }
+ operator int() const { return fd; }
+};
+*/
+
+class SwIOin {
+private:
+ SvFileStream aStr; //$ ifstream
+public:
+ // Stream wird im entsprechenden Mode erzeugt.
+ SwIOin(const String &rFilename, StreamMode nMode =
+ STREAM_READ | STREAM_NOCREATE );
+
+ SwIOin& operator>>(char& val);
+ SwIOin& operator>>(unsigned char& val);
+ SwIOin& operator>>(char* val);
+ SwIOin& operator>>(unsigned char* val);
+ SwIOin& operator>>(short& val);
+ SwIOin& operator>>(unsigned short& val);
+ SwIOin& operator>>(long& val);
+ SwIOin& operator>>(unsigned long& val);
+ String ReadString();
+ KeyCode ReadKeyCode();
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOin& Read(char *buf, unsigned nLen);
+
+ int operator!() { return aStr.GetError() != SVSTREAM_OK; }
+ SvFileStream &operator()() {
+ return aStr;
+ }
+};
+
+class SwIOout {
+private:
+ void _write(const char *buf, unsigned size);
+ SvFileStream aStr; //$ ofstream
+public:
+ // Stream wird im entsprechenden Mode erzeugt.
+ SwIOout( const String &rFilename, StreamMode nMode =
+ STREAM_WRITE | STREAM_NOCREATE );
+ SwIOout& operator<<(char val);
+ SwIOout& operator<<(unsigned char val);
+ SwIOout& operator<<(char* val);
+ SwIOout& operator<<(unsigned char* val);
+ SwIOout& operator<<(short val);
+ SwIOout& operator<<(unsigned short val);
+ SwIOout& operator<<(long val);
+ SwIOout& operator<<(unsigned long val);
+ SwIOout& operator<<(const String &);
+ SwIOout& operator<<(const KeyCode &);
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOout& Write(const char *buf, unsigned nLen);
+
+ int operator!() { return aStr.GetError() != SVSTREAM_OK; }
+ SvFileStream &operator()() {
+ return aStr;
+ }
+};
+
+
+class SwIOinout {
+private:
+ SvFileStream aStr; //$ fstream
+
+public:
+ // Stream wird im entsprechenden Mode erzeugt.
+ SwIOinout(const String &rFilename, StreamMode nMode =
+ STREAM_READWRITE | STREAM_NOCREATE );
+
+ SwIOinout& operator>>(char& val);
+ SwIOinout& operator>>(unsigned char& val);
+ SwIOinout& operator>>(char* val);
+ SwIOinout& operator>>(unsigned char* val);
+ SwIOinout& operator>>(short& val);
+ SwIOinout& operator>>(unsigned short& val);
+ SwIOinout& operator>>(long& val);
+ SwIOinout& operator>>(unsigned long& val);
+ String ReadString();
+ KeyCode ReadKeyCode();
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOinout& Read(char *buf, unsigned nLen);
+ SwIOinout& Read(unsigned short *buf, unsigned nLen );
+
+ SwIOinout& operator<<(char val);
+ SwIOinout& operator<<(unsigned char val);
+ SwIOinout& operator<<(char* val);
+ SwIOinout& operator<<(unsigned char* val);
+ SwIOinout& operator<<(short val);
+ SwIOinout& operator<<(unsigned short val);
+ SwIOinout& operator<<(long val);
+ SwIOinout& operator<<(unsigned long val);
+ SwIOinout& operator<<(const String &);
+ SwIOinout& operator<<(const KeyCode &);
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOinout& Write(const char *buf, unsigned nLen);
+
+ int operator!() { return aStr.GetError() != SVSTREAM_OK; }
+ SvFileStream &operator()() {
+ return aStr;
+ }
+
+ BOOL Ok();
+};
+
+
+
+#endif
+
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
new file mode 100644
index 000000000000..24467f7ad537
--- /dev/null
+++ b/sw/inc/iodetect.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: iodetect.cxx,v $
+ * $Revision: 1.31 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _IODETECT_HXX_
+#define _IODETECT_HXX_
+
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <osl/endian.h>
+#include <errhdl.hxx> // for ASSERT
+#include <tools/string.hxx>
+#include <swdllapi.h>
+
+#define FILTER_RTF "RTF" // RTF-Filter
+#define sRtfWH "WH_RTF"
+#define FILTER_TEXT "TEXT" // Text-Filter mit Default-CodeSet
+#define FILTER_BAS "BAS" // StarBasic (identisch mit ANSI)
+#define FILTER_WW8 "CWW8" // WinWord 97-Filter
+#define FILTER_TEXT_DLG "TEXT_DLG" // text filter with encoding dialog
+#define FILTER_XML "CXML" // XML filter
+#define FILTER_XMLV "CXMLV" // XML filter
+#define FILTER_XMLVW "CXMLVWEB" // XML filter
+#define sHTML "HTML"
+#define sWW1 "WW1"
+#define sWW5 "WW6"
+#define sWW6 "CWW6"
+
+#define sSWRITER "swriter"
+#define sSWRITERWEB "swriter/web"
+
+struct SwIoDetect
+{
+ const sal_Char* pName;
+ USHORT nLen;
+
+ inline SwIoDetect( const sal_Char *pN, USHORT nL )
+ : pName( pN ), nLen( nL )
+ {}
+
+ inline int IsFilter( const String& rNm ) const
+ {
+ return pName && rNm.EqualsAscii( pName, 0, nLen );
+ }
+
+ const sal_Char* IsReader( const sal_Char* pHeader, ULONG nLen_,
+ const String &rFileName, const String& rUserData ) const;
+};
+
+enum ReaderWriterEnum {
+ READER_WRITER_RTF,
+ READER_WRITER_BAS,
+ READER_WRITER_WW6,
+ READER_WRITER_WW8,
+ READER_WRITER_RTF_WH,
+ READER_WRITER_HTML,
+ READER_WRITER_WW1,
+ READER_WRITER_WW5,
+ READER_WRITER_XML,
+ READER_WRITER_TEXT_DLG,
+ READER_WRITER_TEXT,
+ MAXFILTER
+};
+
+extern SwIoDetect aFilterDetect[];
+
+// Die folgende Klasse ist ein Wrappe fuer die Basic-I/O-Funktionen
+// des Writer 3.0. Alles ist statisch. Alle u.a. Filternamen sind die
+// Writer-internen Namen, d.h. die namen, die in INSTALL.INI vor dem
+// Gleichheitszeichen stehen, z.b. SWG oder ASCII.
+
+class SwIoSystem
+{
+public:
+ // suche ueber den internen FormatNamen den Filtereintrag
+ SW_DLLPUBLIC static const SfxFilter* GetFilterOfFormat( const String& rFormat,
+ const SfxFilterContainer* pCnt = 0 );
+
+ // Feststellen des zu verwendenden Filters fuer die uebergebene
+ // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter
+ // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert!
+ static const SfxFilter* GetFileFilter( const String& rFileName,
+ const String& rPrefFltName,
+ SfxMedium* pMedium = 0 );
+
+ // Feststellen ob das File in dem vorgegebenen Format vorliegt.
+ // Z.z werden nur unsere eigene Filter unterstuetzt!!
+ static BOOL IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+ const SfxFilter** ppFlt = 0 );
+
+ static BOOL IsValidStgFilter( SotStorage& , const SfxFilter& );
+ static BOOL IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
+
+ static bool IsDetectableText( const sal_Char* pBuf, ULONG &rLen,
+ CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
+ // static bool IsDetectableW4W(const String& rFileName, const String& rUserData);
+
+ static const SfxFilter* GetTextFilter( const sal_Char* pBuf, ULONG nLen );
+
+ static const String GetSubStorageName( const SfxFilter& rFltr );
+};
+
+#endif
diff --git a/sw/inc/istyleaccess.hxx b/sw/inc/istyleaccess.hxx
new file mode 100644
index 000000000000..8a770d5b012c
--- /dev/null
+++ b/sw/inc/istyleaccess.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: istyleaccess.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ISTYLEACCESS_HXX
+#define _ISTYLEACCESS_HXX
+
+#include <vector>
+#include <svtools/stylepool.hxx>
+
+/*--------------------------------------------------------------------
+ Management of (automatic) styles
+ --------------------------------------------------------------------*/
+
+class SwStyleHandle;
+
+class IStyleAccess
+{
+public:
+
+ enum SwAutoStyleFamily
+ {
+ AUTO_STYLE_CHAR,
+ AUTO_STYLE_RUBY,
+ AUTO_STYLE_PARA,
+ AUTO_STYLE_NOTXT
+ };
+
+ virtual ~IStyleAccess() {}
+
+ virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet,
+ SwAutoStyleFamily eFamily ) = 0;
+ virtual void getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t> &rStyles,
+ SwAutoStyleFamily eFamily ) = 0;
+ // It's slow to iterate through a stylepool looking for a special name, but if
+ // the style has been inserted via "cacheAutomaticStyle" instead of "getAutomaticStyle",
+ // it's faster
+ virtual StylePool::SfxItemSet_Pointer_t getByName( const rtl::OUString& rName,
+ SwAutoStyleFamily eFamily ) = 0;
+ // insert the style to the pool and the cache (used during import)
+ virtual StylePool::SfxItemSet_Pointer_t cacheAutomaticStyle( const SfxItemSet& rSet,
+ SwAutoStyleFamily eFamily ) = 0;
+ // To release the cached styles (shared_pointer!)
+ virtual void clearCaches() = 0;
+};
+
+#endif // _ISTYLEACCESS_HXX
diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx
new file mode 100644
index 000000000000..3022b274d07d
--- /dev/null
+++ b/sw/inc/itabenum.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: itabenum.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ITABENUM_HXX
+#define _ITABENUM_HXX
+
+#include <tools/solar.h>
+
+namespace tabopts
+{
+ const USHORT DEFAULT_BORDER = 0x01;
+ const USHORT HEADLINE = 0x02;
+// const USHORT REPEAT = 0x04;
+// const USHORT HEADLINE_REPEAT = 0x06; // Headline + Repeat
+ const USHORT SPLIT_LAYOUT = 0x08;
+ const USHORT HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
+ const USHORT ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
+}
+
+struct SwInsertTableOptions
+{
+ USHORT mnInsMode;
+ USHORT mnRowsToRepeat;
+
+ SwInsertTableOptions( USHORT nInsMode, USHORT nRowsToRepeat ) :
+ mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {};
+};
+
+
+#endif
+
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
new file mode 100644
index 000000000000..5da9c9a1a489
--- /dev/null
+++ b/sw/inc/lineinfo.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: lineinfo.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_LINEINFO_HXX
+#define SW_LINEINFO_HXX
+
+#include "calbck.hxx"
+//#ifndef _NUMRULE_HXX
+//#include <numrule.hxx>
+//#endif
+#include <svx/numitem.hxx>
+#include "swdllapi.h"
+
+class SwCharFmt;
+class IDocumentStylePoolAccess;
+
+enum LineNumberPosition
+{
+ LINENUMBER_POS_LEFT,
+ LINENUMBER_POS_RIGHT,
+ LINENUMBER_POS_INSIDE,
+ LINENUMBER_POS_OUTSIDE
+};
+
+class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation from SwClient:
+ //character style for displaying the numbers.
+{
+ SvxNumberType aType; //e.g. roman linenumbers
+ String aDivider; //String for aditional interval (vert. lines user defined)
+ USHORT nPosFromLeft; //Position for paint
+ USHORT nCountBy; //Paint only for every n line
+ USHORT nDividerCountBy; //Interval for display of an user defined
+ //string every n lines
+ LineNumberPosition ePos; //Where should the display occur (number and divicer)
+ BOOL bPaintLineNumbers; //Should anything be displayed?
+ BOOL bCountBlankLines; //Count empty lines?
+ BOOL bCountInFlys; //Count also within FlyFrames?
+ BOOL bRestartEachPage; //Restart counting at the first paragraph of each page
+ //(even on follows when paragraphs are splitted)
+
+public:
+ SwLineNumberInfo();
+ SwLineNumberInfo(const SwLineNumberInfo&);
+
+ SwLineNumberInfo& operator=(const SwLineNumberInfo&);
+ BOOL operator==( const SwLineNumberInfo& rInf ) const;
+
+ SwCharFmt *GetCharFmt( IDocumentStylePoolAccess& rIDSPA ) const;
+ void SetCharFmt( SwCharFmt* );
+
+ const SvxNumberType &GetNumType() const { return aType; }
+ void SetNumType( SvxNumberType aNew ){ aType = aNew; }
+
+ const String &GetDivider() const { return aDivider; }
+ void SetDivider( const String &r ) { aDivider = r; }
+ USHORT GetDividerCountBy() const { return nDividerCountBy; }
+ void SetDividerCountBy( USHORT n ) { nDividerCountBy = n; }
+
+ USHORT GetPosFromLeft() const { return nPosFromLeft; }
+ void SetPosFromLeft( USHORT n) { nPosFromLeft = n; }
+
+ USHORT GetCountBy() const { return nCountBy; }
+ void SetCountBy( USHORT n) { nCountBy = n; }
+
+ LineNumberPosition GetPos() const { return ePos; }
+ void SetPos( LineNumberPosition eP ){ ePos = eP; }
+
+ BOOL IsPaintLineNumbers() const { return bPaintLineNumbers; }
+ void SetPaintLineNumbers( BOOL b ){ bPaintLineNumbers = b; }
+
+ BOOL IsCountBlankLines() const { return bCountBlankLines; }
+ void SetCountBlankLines( BOOL b ) { bCountBlankLines = b; }
+
+ BOOL IsCountInFlys() const { return bCountInFlys; }
+ void SetCountInFlys( BOOL b ) { bCountInFlys = b; }
+
+ BOOL IsRestartEachPage() const { return bRestartEachPage; }
+ void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
+
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+};
+
+
+
+#endif
+
diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx
new file mode 100644
index 000000000000..445829122b1f
--- /dev/null
+++ b/sw/inc/linkenum.hxx
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: linkenum.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _LINKENUM_HXX
+#define _LINKENUM_HXX
+
+enum UpdateLinks
+{
+ NEVER,
+ MANUAL,
+ AUTOMATIC,
+ GLOBALSETTING
+};
+
+#endif
+
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
new file mode 100644
index 000000000000..c3017735829f
--- /dev/null
+++ b/sw/inc/list.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: list.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 LIST_HXX_INCLUDED
+#define LIST_HXX_INCLUDED
+
+#include <tools/string.hxx>
+
+class SwNumRule;
+class SwNodes;
+class SwNodeNum;
+
+class SwListImpl;
+
+class SwList
+{
+ public:
+ SwList( const String sListId,
+ SwNumRule& rDefaultListStyle,
+ const SwNodes& rNodes );
+ ~SwList();
+
+ const String GetListId() const;
+
+ const String GetDefaultListStyleName() const;
+
+ void InsertListItem( SwNodeNum& rNodeNum,
+ const int nLevel );
+ void RemoveListItem( SwNodeNum& rNodeNum );
+
+ void InvalidateListTree();
+ void ValidateListTree();
+
+ void MarkListLevel( const int nListLevel,
+ const BOOL bValue );
+
+ bool IsListLevelMarked( const int nListLevel ) const;
+
+// void ContinueList( SwList& rList );
+// const SwList* GetContinuedList() const;
+// void ClearContinuation();
+
+ private:
+ // no copy constructor and no assignment operator
+ SwList( const SwList& );
+ SwList& operator=( const SwList& );
+
+ SwListImpl* mpListImpl;
+};
+#endif // LIST_HXX_INCLUDED
diff --git a/sw/inc/listfunc.hxx b/sw/inc/listfunc.hxx
new file mode 100644
index 000000000000..b867e87ebe5d
--- /dev/null
+++ b/sw/inc/listfunc.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: listfunc.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 LISTFUNC_HXX_INCLUDED
+#define LISTFUNC_HXX_INCLUDED
+
+class SwDoc;
+
+namespace listfunc
+{
+ const String CreateUniqueListId( const SwDoc& rDoc );
+}
+
+#endif // LISTFUNC_HXX_INCLUDED
diff --git a/sw/inc/makefile.mk b/sw/inc/makefile.mk
new file mode 100644
index 000000000000..36aa66102618
--- /dev/null
+++ b/sw/inc/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.4 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+PRJ=..
+
+PRJNAME=sw
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : $(PRJ)$/inc$/swpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/inc$/sw.mk
+
+# --- Files --------------------------------------------------------
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!="" && ( "$(PRJNAME)"!="sw" || "$(BUILD_SPECIAL)"!="TRUE" )
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
new file mode 100644
index 000000000000..babf6c91436a
--- /dev/null
+++ b/sw/inc/mdiexp.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: mdiexp.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _MDIEXP_HXX
+#define _MDIEXP_HXX
+
+#include <tools/solar.h>
+#include <tblenum.hxx>
+#include <layout/layout.hxx>
+#include <swdllapi.h>
+
+class UniString;
+class SwRect;
+class Size;
+class Dialog;
+class ViewShell;
+class SwDoc;
+class SwDocShell;
+
+extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, USHORT nRangeX, USHORT nRangeY);
+extern BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect &);
+extern void SizeNotify(ViewShell* pVwSh, const Size &);
+
+//Update der Statusleiste, waehrend einer Action.
+extern void PageNumNotify( ViewShell* pVwSh,
+ USHORT nPhyNum,
+ USHORT nVirtNum,
+ const UniString& rPg );
+
+enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
+extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
+
+SW_DLLPUBLIC void StartProgress ( USHORT nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell *pDocShell );
+void SetProgressText ( USHORT nMessId, SwDocShell *pDocShell );
+void RescheduleProgress( SwDocShell *pDocShell );
+
+void EnableCmdInterface(BOOL bEnable = TRUE);
+
+LAYOUT_NS Dialog* GetSearchDialog();
+
+void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect );
+
+// ndgrf.cxx
+// alle QuickDraw-Bitmaps des speziellen Docs loeschen
+void DelAllGrfCacheEntries( SwDoc* pDoc );
+
+// ChgMode fuer Tabellen aus der Konfiguration lesen
+TblChgMode GetTblChgDefaultMode();
+
+BOOL JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
+
+
+#endif
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
new file mode 100644
index 000000000000..d17311027111
--- /dev/null
+++ b/sw/inc/modcfg.hxx
@@ -0,0 +1,342 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: modcfg.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _MODOPT_HXX
+#define _MODOPT_HXX
+
+#include <tools/string.hxx>
+#include <vcl/wintypes.hxx>
+#include <vcl/field.hxx>
+#include <svtools/svarray.hxx>
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+#include "authratr.hxx"
+#include <SwCapObjType.hxx>
+#include "tblenum.hxx"
+#include "itabenum.hxx"
+#include <tools/globname.hxx>
+class SwModuleOptions;
+
+//-----------------------------------------------------------------------------
+class InsCaptionOpt;
+typedef InsCaptionOpt* InsCaptionOptPtr;
+SV_DECL_PTRARR_SORT_DEL(InsCapOptArr, InsCaptionOptPtr, 0, 5)
+
+class InsCaptionOptArr : public InsCapOptArr
+{
+ friend class SwModuleOptions;
+ friend class SwInsertConfig;
+protected:
+ InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = 0) const;
+};
+
+/* -----------------------------10.10.00 16:14--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwRevisionConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ AuthorCharAttr aInsertAttr; //Revision/TextDisplay/Insert/Attribute // Redlining: Author-Zeichenattribute
+ //Revision/TextDisplay/Insert/Color
+ AuthorCharAttr aDeletedAttr; //Revision/TextDisplay/Delete/Attribute
+ //Revision/TextDisplay/Delete/Color
+ AuthorCharAttr aFormatAttr; //Revision/TextDisplay/ChangeAttribute/Attribute
+ //Revision/TextDisplay/ChangeAttribute/Color
+ USHORT nMarkAlign; //Revision/LinesChanged/Mark
+ Color aMarkColor; //Revision/LinesChanged/Color
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwRevisionConfig();
+ ~SwRevisionConfig();
+
+ virtual void Commit();
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------11.10.00 09:00--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwInsertConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ InsCaptionOptArr* pCapOptions;
+ InsCaptionOpt* pOLEMiscOpt;
+
+ SvGlobalName aGlobalNames[5];
+
+ sal_Bool bInsWithCaption; //Insert/Caption/Automatic // Objekte beschriftet einfuegen
+ sal_Bool bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering
+// sal_uInt16 nInsTblFlags; //Insert/Table/Header // Flags fuer Tabellen einfuegen
+ //Insert/Table/RepeatHeader
+ //Insert/Table/Split
+ //Insert/Table/Border
+ SwInsertTableOptions aInsTblOpts;
+ sal_Bool bIsWeb;
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwInsertConfig(sal_Bool bWeb);
+ ~SwInsertConfig();
+
+ virtual void Commit();
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------11.10.00 09:00--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwTableConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ USHORT nTblHMove; //int Table/Shift/Row
+ USHORT nTblVMove; //int Table/Shift/Column
+ USHORT nTblHInsert; //int Table/Insert/Row
+ USHORT nTblVInsert; //int Table/Insert/Column
+ TblChgMode eTblChgMode; //int Table/Change/Effect
+
+ sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatische Zahlenerkennung
+ sal_Bool bInsTblChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatische Zahlenformaterkennung
+ sal_Bool bInsTblAlignNum; // Table/Input/Alignment // Zahlen ausrichten
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwTableConfig(sal_Bool bWeb);
+ ~SwTableConfig();
+
+ virtual void Commit();
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------18.01.01 16:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwMiscConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ String sWordDelimiter; // Statistics/WordNumber/Delimiter
+ BOOL bDefaultFontsInCurrDocOnly; // DefaultFont/Document
+ BOOL bShowIndexPreview ; // Index/ShowPreview
+ BOOL bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
+ BOOL bNumAlignSize; // Numbering/Graphic/KeepRatio
+ BOOL bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
+ BOOL bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
+ BOOL bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged'
+ sal_Int16 nMailingFormats; // FormLetter/MailingOutput/Formats
+ String sNameFromColumn; // FormLetter/FileOutput/FileName/FromDatabaseField (string!)
+ String sMailingPath; // FormLetter/FileOutput/Path
+ String sMailName; // FormLetter/FileOutput/FileName/FromManualSetting (string!)
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwMiscConfig();
+ ~SwMiscConfig();
+
+ virtual void Commit();
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+/* ---------------------------------------------------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwModuleOptions
+{
+ SwRevisionConfig aRevisionConfig;
+ SwInsertConfig aInsertConfig;
+ SwInsertConfig aWebInsertConfig;
+
+ SwTableConfig aTableConfig;
+ SwTableConfig aWebTableConfig;
+
+ SwMiscConfig aMiscConfig;
+
+ //fiscus: don't show tips of text fields - it's not part of the configuration!
+ BOOL bHideFieldTips : 1;
+
+public:
+ SwModuleOptions();
+
+ TblChgMode GetTblMode() const { return aTableConfig.eTblChgMode;}
+ void SetTblMode( TblChgMode eSet ) { aTableConfig.eTblChgMode = eSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblHMove() const { return aTableConfig.nTblHMove;}
+ void SetTblHMove( USHORT nSet ) { aTableConfig.nTblHMove = nSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblVMove() const { return aTableConfig.nTblVMove;}
+ void SetTblVMove( USHORT nSet ) { aTableConfig.nTblVMove = nSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblHInsert() const {return aTableConfig.nTblHInsert;}
+ void SetTblHInsert( USHORT nSet ) { aTableConfig.nTblHInsert = nSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblVInsert() const {return aTableConfig.nTblVInsert;}
+ void SetTblVInsert( USHORT nSet ) { aTableConfig.nTblVInsert = nSet;
+ aTableConfig.SetModified();}
+
+ const AuthorCharAttr &GetInsertAuthorAttr() const { return aRevisionConfig.aInsertAttr; }
+ void SetInsertAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aInsertAttr = rAttr;
+ aRevisionConfig.SetModified();}
+
+ const AuthorCharAttr &GetDeletedAuthorAttr() const { return aRevisionConfig.aDeletedAttr; }
+ void SetDeletedAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aDeletedAttr = rAttr;
+ aRevisionConfig.SetModified();}
+
+ const AuthorCharAttr &GetFormatAuthorAttr() const { return aRevisionConfig.aFormatAttr; }
+ void SetFormatAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aFormatAttr = rAttr;
+ aRevisionConfig.SetModified();}
+
+ USHORT GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
+ void SetMarkAlignMode(USHORT nMode) { aRevisionConfig.nMarkAlign = nMode;
+ aRevisionConfig.SetModified();}
+
+ const Color& GetMarkAlignColor() const { return aRevisionConfig.aMarkColor; }
+ void SetMarkAlignColor(const Color &rColor) { aRevisionConfig.aMarkColor = rColor;
+ aRevisionConfig.SetModified();}
+
+ BOOL IsInsWithCaption(BOOL bHTML) const
+ { return bHTML ? FALSE : aInsertConfig.bInsWithCaption; }
+ void SetInsWithCaption( BOOL bHTML, BOOL b )
+ { if(!bHTML)
+ aInsertConfig.bInsWithCaption = b;
+ aInsertConfig.SetModified();}
+
+ sal_Bool IsCaptionOrderNumberingFirst() const { return aInsertConfig.bCaptionOrderNumberingFirst; }
+ void SetCaptionOrderNumberingFirst( sal_Bool bSet )
+ {
+ if(aInsertConfig.bCaptionOrderNumberingFirst != bSet)
+ {
+ aInsertConfig.bCaptionOrderNumberingFirst = bSet;
+ aInsertConfig.SetModified();
+ }
+ }
+
+ BOOL IsInsTblFormatNum(BOOL bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblFormatNum : aTableConfig.bInsTblFormatNum; }
+ void SetInsTblFormatNum( BOOL bHTML, BOOL b )
+ { bHTML ? (aWebTableConfig.bInsTblFormatNum = b) : (aTableConfig.bInsTblFormatNum = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
+
+ BOOL IsInsTblChangeNumFormat(BOOL bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblChangeNumFormat : aTableConfig.bInsTblChangeNumFormat; }
+ void SetInsTblChangeNumFormat( BOOL bHTML, BOOL b )
+ { bHTML ? (aWebTableConfig.bInsTblChangeNumFormat = b) : (aTableConfig.bInsTblChangeNumFormat = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
+
+
+ BOOL IsInsTblAlignNum(BOOL bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblAlignNum : aTableConfig.bInsTblAlignNum; }
+ void SetInsTblAlignNum( BOOL bHTML, BOOL b )
+ { bHTML ? (aWebTableConfig.bInsTblAlignNum = b) : (aTableConfig.bInsTblAlignNum = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;}
+
+ SwInsertTableOptions GetInsTblFlags(BOOL bHTML) const
+ { return bHTML ? aWebInsertConfig.aInsTblOpts : aInsertConfig.aInsTblOpts;}
+ void SetInsTblFlags( BOOL bHTML, const SwInsertTableOptions& rOpts ) {
+ bHTML ? (aWebInsertConfig.aInsTblOpts = rOpts) : (aInsertConfig.aInsTblOpts = rOpts);
+ bHTML ? aWebInsertConfig.SetModified() : aInsertConfig.SetModified();}
+
+ const InsCaptionOpt* GetCapOption(BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
+ BOOL SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt);
+
+
+ BOOL IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
+ void SetGrfToGalleryAsLnk( BOOL b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
+ aMiscConfig.SetModified();}
+
+ sal_Int16 GetMailingFormats() const { return aMiscConfig.nMailingFormats;}
+ void SetMailingFormats( sal_Int16 nSet ) { aMiscConfig.nMailingFormats = nSet;
+ aMiscConfig.SetModified();}
+
+ BOOL IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
+ void SetSinglePrintJob( BOOL b ) { aMiscConfig.bSinglePrintJob = b;
+ aMiscConfig.SetModified();}
+
+ BOOL IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
+ void SetNumAlignSize( BOOL b ) { aMiscConfig.bNumAlignSize = b;
+ aMiscConfig.SetModified();}
+
+ BOOL IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
+ void SetIsNameFromColumn( BOOL bSet )
+ {
+ aMiscConfig.SetModified();
+ aMiscConfig.bIsNameFromColumn = bSet;
+ }
+
+ BOOL IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
+ void SetAskForMailMerge(BOOL bSet)
+ {
+ aMiscConfig.SetModified();
+ aMiscConfig.bAskForMailMergeInPrint = bSet;
+ }
+
+
+ const String& GetNameFromColumn() const { return aMiscConfig.sNameFromColumn; }
+ void SetNameFromColumn( const String& rSet ) { aMiscConfig.sNameFromColumn = rSet;
+ aMiscConfig.SetModified();}
+
+ String GetMailingPath() const { return aMiscConfig.sMailingPath; }
+ void SetMailingPath(const String& sPath) { aMiscConfig.sMailingPath = sPath;
+ aMiscConfig.SetModified();}
+
+ String GetMailName() const { return aMiscConfig.sMailName; }
+ void SetMailName(const String& sName){ aMiscConfig.sMailName = sName;
+ aMiscConfig.SetModified();}
+
+ const String &GetWordDelimiter() const { return aMiscConfig.sWordDelimiter; }
+ void SetWordDelimiter(const String& sDelim) { aMiscConfig.sWordDelimiter = sDelim;
+ aMiscConfig.SetModified();}
+
+ //convert word delimiter from or to user interface
+ static String ConvertWordDelimiter(const String& rDelim, BOOL bFromUI);
+
+ BOOL IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
+ void SetShowIndexPreview(BOOL bSet)
+ {aMiscConfig.bShowIndexPreview = bSet;
+ aMiscConfig.SetModified();}
+
+ BOOL IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
+ void SetDefaultFontInCurrDocOnly(BOOL bSet)
+ {
+ aMiscConfig.bDefaultFontsInCurrDocOnly = bSet;
+ aMiscConfig.SetModified();
+ }
+
+ BOOL IsHideFieldTips() const {return bHideFieldTips;}
+ void SetHideFieldTips(BOOL bSet) {bHideFieldTips = bSet;}
+};
+#endif
+
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
new file mode 100644
index 000000000000..880c720631ab
--- /dev/null
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: modeltoviewhelper.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _MODELTOVIEWHELPER_HXX
+#define _MODELTOVIEWHELPER_HXX
+
+#include <sal/types.h>
+
+#include <vector>
+
+/** Some helpers for converting model strings to view strings.
+
+ A paragraph string does not have its fields expanded, i.e., they are
+ represented by a special character inside the string with an additional
+ attribute assigned to it. For some tasks (e.g., SmartTags) it is required
+ to expand the fields to get the string as it appears in the view. Two
+ helper functions are provided to convert model positions to view positions
+ and vice versa.
+*/
+namespace ModelToViewHelper
+{
+ /** For each field in the model string, there is an entry in the conversion
+ map. The first value of the ConversionMapEntry points to the field
+ position in the model string, the second value points to the associated
+ position in the view string. The last entry in the conversion map
+ denotes the lengths of the model resp. view string.
+ */
+ typedef std::pair< sal_uInt32 , sal_uInt32 > ConversionMapEntry;
+ typedef std::vector< ConversionMapEntry > ConversionMap;
+
+ /** This struct defines a position in the model string.
+
+ The 'main' position is given by mnPos. If there's a field located at
+ this position, mbIsField is set and mnSubPos denotes the position inside
+ that field.
+ */
+ struct ModelPosition
+ {
+ sal_uInt32 mnPos;
+ sal_uInt32 mnSubPos;
+ bool mbIsField;
+
+ ModelPosition() : mnPos(0), mnSubPos(0), mbIsField(false) {}
+ };
+
+ /** Converts a model position into a view position
+
+ @param pMap
+ pMap is the conversion map required for the calculation. If pMap is
+ 0, no conversion takes place, i.e., it is assumed that the model
+ string is identical to the view string.
+
+ @param nPos
+ nPos denotes a position in the model string which should be
+ converted. Note that converting model positions inside fields is
+ not supported, therefore nPos is not of type ModelPosition.
+
+ @return
+ the position of nPos in the view string. In case the conversion
+ could not be performed (e.g., because there is not ConversionMap or
+ nPos is behind the last entry in the conversion map) nPos will
+ be returned.
+ */
+ sal_uInt32 ConvertToViewPosition( const ConversionMap* pMap, sal_uInt32 nModelPos );
+
+ /** Converts a view position into a model position
+
+ @param pMap
+ pMap is the conversion map required for the calculation. If pMap is
+ 0, no conversion takes place, i.e., it is assumed that the model
+ string is identical to the view string.
+
+ @param nPos
+ nPos denotes a position in the view string which should be
+ converted.
+
+ @return
+ the position of nPos in the model string. In case the conversion
+ could not be performed (e.g., because there is not ConversionMap or
+ nPos is behind the last entry in the conversion map) a model
+ model position with mnPos = nPos and mnIsField = false will be
+ returned.
+ */
+ ModelPosition ConvertToModelPosition( const ConversionMap* pMap, sal_uInt32 nViewPos );
+}
+
+#endif
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
new file mode 100644
index 000000000000..6bbd72778498
--- /dev/null
+++ b/sw/inc/ndarr.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndarr.hxx,v $
+ * $Revision: 1.20 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDARR_HXX
+#define _NDARR_HXX
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <svtools/svarray.hxx>
+
+#ifndef _BPARR_HXX
+#include <bparr.hxx>
+#endif
+#include <ndtyp.hxx>
+
+#include <svtools/embedhlp.hxx>
+#include <vector>
+
+class Graphic;
+class GraphicObject;
+class String;
+class SwAttrSet;
+class SfxItemSet;
+class SwCntntNode;
+class SwDoc;
+class SwGrfFmtColl;
+class SwGrfNode;
+class SwHistory;
+class SwNode;
+class SwNodeIndex;
+class SwNodeRange;
+class SwOLENode;
+class SwOutlineNodes;
+class SwPaM;
+class SwSection;
+class SwSectionFmt;
+class SwSectionNode;
+class SwStartNode;
+class SwTableBoxFmt;
+class SwTableFmt;
+class SwTableLine;
+class SwTableLineFmt;
+class SwTableNode;
+class SwTblToTxtSaves;
+class SwTxtFmtColl;
+class SwTxtNode;
+class SwUndoTblToTxt;
+class SwUndoTxtToTbl;
+struct SwPosition;
+
+
+// --------------------
+// class SwNodes
+// --------------------
+
+typedef SwNode * SwNodePtr;
+typedef BOOL (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
+
+SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 )
+
+class SW_DLLPUBLIC SwNodes: private BigPtrArray
+{
+ friend class SwDoc;
+ friend class SwNode;
+ friend class SwNodeIndex;
+
+ SwNodeIndex* pRoot; // Liste aller Indizies auf Nodes
+
+ // --> OD 2008-05-14 #refactorlists# - removed <bSyncNumberAndNumRule>
+ void InsertNode( const SwNodePtr pNode,
+ const SwNodeIndex& rPos );
+ void InsertNode( const SwNodePtr pNode,
+ ULONG nPos );
+ // <--
+
+
+ SwDoc* pMyDoc; // in diesem Doc ist das Nodes-Array
+
+ SwNode *pEndOfPostIts, *pEndOfInserts, // das sind die festen Bereiche
+ *pEndOfAutotext, *pEndOfRedlines,
+ *pEndOfContent;
+
+ mutable SwOutlineNodes* pOutlineNds; // Array aller GliederiungsNodes
+
+ BOOL bInNodesDel : 1; // falls rekursiv aufgerufen wird
+ // Num/Outline nicht aktualisierem
+ BOOL bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
+ BOOL bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
+
+ // fuer dier Verwaltung der Indizies
+ void RegisterIndex( SwNodeIndex& rIdx );
+ void DeRegisterIndex( SwNodeIndex& rIdx );
+ void RemoveNode( ULONG nDelPos, ULONG nLen, BOOL bDel );
+
+ // Aktionen auf die Nodes
+ void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
+ void DelNodes( const SwNodeIndex& rStart, ULONG nCnt = 1 );
+
+ void ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
+ SwNodeIndex& rInsPos, BOOL bNewFrms );
+
+ void UpdtOutlineIdx( const SwNode& ); // Update ab Node alle OutlineNodes
+
+ void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
+ BOOL bNewFrms = TRUE, BOOL bTblInsDummyNode = FALSE ) const;
+ void _DelDummyNodes( const SwNodeRange& rRg );
+
+protected:
+ SwNodes( SwDoc* pDoc );
+
+public:
+ ~SwNodes();
+
+ SwNodePtr operator[]( ULONG n ) const
+ { return (SwNodePtr)BigPtrArray::operator[] ( n ); }
+
+//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
+// neue Schnittstelle angepasst werden
+ inline SwNodePtr operator[]( const SwNodeIndex& rIdx ) const;
+
+ ULONG Count() const { return BigPtrArray::Count(); }
+ void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ {
+ BigPtrArray::ForEach( 0, BigPtrArray::Count(),
+ (FnForEach) fnForEach, pArgs );
+ }
+ void ForEach( ULONG nStt, ULONG nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ {
+ BigPtrArray::ForEach( nStt, nEnd, (FnForEach) fnForEach, pArgs );
+ }
+ void ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd,
+ FnForEach_SwNodes fnForEach, void* pArgs = 0 );
+
+ // eine noch leere Section
+ SwNode& GetEndOfPostIts() const { return *pEndOfPostIts; }
+ // Section fuer alle Fussnoten
+ SwNode& GetEndOfInserts() const { return *pEndOfInserts; }
+ // Section fuer alle Flys/Header/Footers
+ SwNode& GetEndOfAutotext() const { return *pEndOfAutotext; }
+ // Section fuer alle Redlines
+ SwNode& GetEndOfRedlines() const { return *pEndOfRedlines; }
+ // das ist der letzte EndNode einer SonderSection. Hier nach kommt nur
+ // noch die normale ContentSection (also der BodyText)
+ SwNode& GetEndOfExtras() const { return *pEndOfRedlines; }
+ // die normale ContentSection (also der BodyText)
+ SwNode& GetEndOfContent() const { return *pEndOfContent; }
+
+ // ist das NodesArray das normale vom Doc? (nicht das UndoNds, .. )
+ // Implementierung steht im doc.hxx (weil man dazu Doc kennen muss) !
+ BOOL IsDocNodes() const;
+
+ USHORT GetSectionLevel(const SwNodeIndex &rIndex) const;
+ void Delete(const SwNodeIndex &rPos, ULONG nNodes = 1);
+
+ BOOL _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
+ BOOL bNewFrms = TRUE );
+ void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes );
+
+ void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
+ BOOL bNewFrms = TRUE ) const
+ { _CopyNodes( rRg, rInsPos, bNewFrms ); }
+
+ void SectionUp( SwNodeRange *);
+ void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode );
+
+ BOOL CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
+
+ void GoStartOfSection(SwNodeIndex *) const;
+ void GoEndOfSection(SwNodeIndex *) const;
+
+ SwCntntNode* GoNext(SwNodeIndex *) const;
+ SwCntntNode* GoPrevious(SwNodeIndex *) const;
+
+ //Gehe zum naechsten/vorherigen Cntnt/Tabellennode, fuer den
+ //es LayoutFrames gibt, dabei Kopf-/Fusszeilen/Rahmen etc. nicht verlassen
+ SwNode* GoNextWithFrm(SwNodeIndex *) const;
+ SwNode* GoPreviousWithFrm(SwNodeIndex *) const;
+
+ // zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
+ // (beides auf FALSE ==> GoNext/GoPrevious!!!)
+ SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = TRUE,
+ int bSkipProtect = TRUE ) const;
+ SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = TRUE,
+ int bSkipProtect = TRUE ) const;
+
+ // erzeuge ein leere Section von Start und EndNode. Darf nur gerufen
+ // werden, wenn eine neue Section mit Inhalt erzeugt werden soll.
+ // Zum Beispiel bei den Filtern/Undo/...
+ SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx,
+ SwStartNodeType = SwNormalStartNode );
+
+ // die Impl. von "Make...Node" stehen in den angegebenen .ccx-Files
+ SwTxtNode *MakeTxtNode( const SwNodeIndex & rWhere,
+ SwTxtFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 ); // in ndtxt.cxx
+ SwStartNode* MakeTextSection( const SwNodeIndex & rWhere,
+ SwStartNodeType eSttNdTyp,
+ SwTxtFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
+ const String& rGrfName,
+ const String& rFltName,
+ const Graphic* pGraphic,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0,
+ BOOL bDelayed = FALSE ); // in ndgrf.cxx
+
+ SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
+ const GraphicObject& rGrfObj,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 ); // in ndgrf.cxx
+
+ SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
+ const svt::EmbeddedObjectRef&,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 ); // in ndole.cxx
+ SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
+ const String &rName,
+ sal_Int64 nAspect,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr ); // in ndole.cxx
+
+ // Array aller GliederiungsNodes;
+ const SwOutlineNodes& GetOutLineNds() const;
+
+ //void UpdateOutlineNode( const SwNode&, BYTE nOldLevel, BYTE nNewLevel );//#outline level,removed by zhaojianwei
+ // alle Nodes Updaten - Rule/Format-Aenderung
+ void UpdateOutlineNode(SwNode & rNd);
+
+ // fuege die Nodes fuer die Tabelle ein
+ // wenn Lines angegeben, erzeuge die Matrix aus Lines & Boxen
+ // ansonsten nur die Anzahl von Boxen.
+ /* #109161#
+
+ New parameter pAttrSet: If pAttrSet is non-null and contains an
+ adjust item it is propagated to the table cells. If there is an
+ adjust in pCntntTxtColl or pHeadlineTxtColl this adjust item
+ overrides the item in pAttrSet.
+
+ */
+ SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
+ USHORT nBoxes, SwTxtFmtColl* pCntntTxtColl,
+ USHORT nLines = 0, USHORT nRepeat = 0,
+ SwTxtFmtColl* pHeadlineTxtColl = 0,
+ const SwAttrSet * pAttrSet = 0);
+
+ // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
+ SwTableNode* TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
+ SwTableFmt* pTblFmt,
+ SwTableLineFmt* pLineFmt,
+ SwTableBoxFmt* pBoxFmt,
+ SwTxtFmtColl* pTxtColl,
+ SwUndoTxtToTbl* pUndo = 0 );
+ //create a table from a vector of NodeRanges - API support
+ SwTableNode* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes,
+ SwTableFmt* pTblFmt,
+ SwTableLineFmt* pLineFmt,
+ SwTableBoxFmt* pBoxFmt,
+ SwTxtFmtColl* pTxtColl
+ /*, SwUndo... pUndo*/ );
+
+ // erzeuge aus der Tabelle wieder normalen Text
+ BOOL TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+ SwUndoTblToTxt* = 0 );
+ // steht im untbl.cxx und darf nur vom Undoobject gerufen werden
+ SwTableNode* UndoTableToText( ULONG nStt, ULONG nEnd,
+ const SwTblToTxtSaves& rSavedData );
+
+ // fuege in der Line, vor der InsPos eine neue Box ein. Das Format
+ // wird von der nachfolgenden (vorhergenden;wenn an Ende) genommen
+ // in der Line muss schon eine Box vorhanden sein !
+ BOOL InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
+ // Formate fuer den TextNode der Box
+ SwTxtFmtColl*, const SfxItemSet* pAutoAttr,
+ USHORT nInsPos, USHORT nCnt = 1 );
+ // Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
+ // Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
+ // Ist das Flag bCalcNewSize auf TRUE, wird fuer beide neuen Tabellen
+ // die neue SSize aus dem Max der Boxen errechnet; vorrausgesetzt,
+ // die SSize ist "absolut" gesetzt (LONG_MAX)
+ // (Wird zur Zeit nur fuer den RTF-Parser benoetigt)
+ SwTableNode* SplitTable( const SwNodeIndex& rPos, BOOL bAfter = TRUE,
+ BOOL bCalcNewSize = FALSE );
+ // fuegt 2 Tabellen, die hintereinander stehen, wieder zusammen
+ BOOL MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev = TRUE,
+ USHORT nMode = 0, SwHistory* pHistory = 0 );
+
+ // fuege eine neue SwSection ein
+ SwSectionNode* InsertSection( const SwNodeIndex& rNdIdx,
+ SwSectionFmt& rSectionFmt,
+ const SwSection&,
+ const SwNodeIndex* pEnde,
+ BOOL bInsAtStart = TRUE,
+ BOOL bCreateFrms = TRUE );
+
+ // in welchem Doc steht das Nodes-Array ?
+ SwDoc* GetDoc() { return pMyDoc; }
+ const SwDoc* GetDoc() const { return pMyDoc; }
+
+ // suche den vorhergehenden [/nachfolgenden ] ContentNode oder
+ // TabellenNode mit Frames. Wird kein Ende angeben, dann wird mit
+ // dem FrameIndex begonnen; ansonsten, wird mit dem vor rFrmIdx und
+ // dem hintern pEnd die Suche gestartet. Sollte kein gueltiger Node
+ // gefunden werden, wird 0 returnt. rFrmIdx zeigt auf dem Node mit
+ // Frames
+ SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
+ const SwNode* pEnd = 0 ) const;
+
+ //-> #112139#
+ SwNode * DocumentSectionStartNode(SwNode * pNode) const;
+ SwNode * DocumentSectionEndNode(SwNode * pNode) const;
+ //<- #112139#
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwNodes( const SwNodes & rNodes );
+};
+
+
+
+#endif
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
new file mode 100644
index 000000000000..45ecea30a9c0
--- /dev/null
+++ b/sw/inc/ndgrf.hxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndgrf.hxx,v $
+ * $Revision: 1.23 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDGRF_HXX
+#define _NDGRF_HXX
+#include <sfx2/lnkbase.hxx>
+#include <goodies/grfmgr.hxx>
+#include <ndnotxt.hxx>
+// --> OD, MAV 2005-08-17 #i53025#
+#include <com/sun/star/embed/XStorage.hpp>
+// <--
+// --> OD 2007-03-28 #i73788#
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+class SwAsyncRetrieveInputStreamThreadConsumer;
+// <--
+
+class SwGrfFmtColl;
+class SwDoc;
+class GraphicAttr;
+class SvStorage;
+// --------------------
+// SwGrfNode
+// --------------------
+class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
+{
+ friend class SwNodes;
+
+ GraphicObject aGrfObj;
+ ::sfx2::SvBaseLinkRef refLink; // falls Grafik nur als Link, dann Pointer gesetzt
+ Size nGrfSize;
+// String aStrmName; // SW3: Name des Storage-Streams fuer Embedded
+ String aNewStrmName; // SW3/XML: new stream name (either SW3 stream
+ // name or package url)
+ String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
+ // die normale (HighRes) geladen ist.
+ BOOL bTransparentFlagValid :1;
+ BOOL bInSwapIn :1;
+
+ BOOL bGrafikArrived :1;
+ BOOL bChgTwipSize :1;
+ BOOL bChgTwipSizeFromPixel :1;
+ BOOL bLoadLowResGrf :1;
+ BOOL bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
+ //SwapIn zu verhindern.
+ BOOL bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
+
+ // --> OD 2007-01-19 #i73788#
+ boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer;
+ bool mbLinkedInputStreamReady;
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream> mxInputStream;
+ sal_Bool mbIsStreamReadOnly;
+ // <--
+
+ SwGrfNode( const SwNodeIndex& rWhere,
+ const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic,
+ SwGrfFmtColl* pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+ // Ctor fuer Einlesen (SW/G) ohne Grafik
+ SwGrfNode( const SwNodeIndex& rWhere,
+ const String& rGrfName, const String& rFltName,
+ SwGrfFmtColl* pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+ SwGrfNode( const SwNodeIndex& rWhere,
+ const GraphicObject& rGrfObj,
+ SwGrfFmtColl* pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ void InsertLink( const String& rGrfName, const String& rFltName );
+ BOOL ImportGraphic( SvStream& rStrm );
+ BOOL HasStreamName() const { return aGrfObj.HasUserData(); }
+ // --> OD 2005-05-04 #i48434# - adjust return type and rename method to
+ // indicate that its an private one.
+ // --> OD 2005-08-17 #i53025#
+ // embedded graphic stream couldn't be inside a 3.1 - 5.2 storage any more.
+ // Thus, return value isn't needed any more.
+ void _GetStreamStorageNames( String& rStrmName, String& rStgName ) const;
+ // <--
+ void DelStreamName();
+ DECL_LINK( SwapGraphic, GraphicObject* );
+
+ /** helper method to determine stream for the embedded graphic.
+
+ OD 2005-05-04 #i48434#
+ Important note: caller of this method has to handle the thrown exceptions
+ OD, MAV 2005-08-17 #i53025#
+ Storage, which should contain the stream of the embedded graphic, is
+ provided via parameter. Otherwise the returned stream will be closed
+ after the the method returns, because its parent stream is closed and deleted.
+ Proposed name of embedded graphic stream is also provided by parameter.
+
+ @author OD
+
+ @param _refPics
+ input parameter - reference to storage, which should contain the
+ embedded graphic stream.
+
+ @param _aStrmName
+ input parameter - proposed name of the embedded graphic stream.
+
+ @return SvStream*
+ new created stream of the embedded graphic, which has to be destroyed
+ after its usage. Could be NULL, if the stream isn't found.
+ */
+ SvStream* _GetStreamForEmbedGrf(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _refPics,
+ String& _aStrmName ) const;
+
+ /** helper method to get a substorage of the document storage for readonly access.
+
+ OD, MAV 2005-08-17 #i53025#
+ A substorage with the specified name will be opened readonly. If the provided
+ name is empty the root storage will be returned.
+
+ @param _aStgName
+ input parameter - name of substorage. Can be empty.
+
+ @return XStorage
+ reference to substorage or the root storage
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > _GetDocSubstorageOrRoot(
+ const String& aStgName ) const;
+
+public:
+ virtual ~SwGrfNode();
+ const Graphic& GetGrf() const { return aGrfObj.GetGraphic(); }
+ const GraphicObject& GetGrfObj() const { return aGrfObj; }
+ GraphicObject& GetGrfObj() { return aGrfObj; }
+
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+
+ virtual Size GetTwipSize() const;
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ void SetTwipSize( const Size& rSz );
+
+ BOOL IsTransparent() const;
+
+ inline BOOL IsAnimated() const { return aGrfObj.IsAnimated(); }
+
+ inline BOOL IsChgTwipSize() const { return bChgTwipSize; }
+ inline BOOL IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
+ inline void SetChgTwipSize( BOOL b, BOOL bFromPx=FALSE ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
+
+ inline BOOL IsGrafikArrived() const { return bGrafikArrived; }
+ inline void SetGrafikArrived( BOOL b ) { bGrafikArrived = b; }
+
+ inline BOOL IsFrameInPaint() const { return bFrameInPaint; }
+ inline void SetFrameInPaint( BOOL b ) { bFrameInPaint = b; }
+
+ inline BOOL IsScaleImageMap() const { return bScaleImageMap; }
+ inline void SetScaleImageMap( BOOL b ) { bScaleImageMap = b; }
+#endif
+ // steht in ndcopy.cxx
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+
+ // erneutes Einlesen, falls Graphic nicht Ok ist. Die
+ // aktuelle wird durch die neue ersetzt.
+ BOOL ReRead( const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const GraphicObject* pGrfObj = 0,
+ BOOL bModify = TRUE );
+ // Laden der Grafik unmittelbar vor der Anzeige
+ short SwapIn( BOOL bWaitForData = FALSE );
+ // Entfernen der Grafik, um Speicher freizugeben
+ short SwapOut();
+ // Zugriff auf den Storage-Streamnamen
+ void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); }
+ void SetNewStreamName( const String& r ) { aNewStrmName = r; }
+ // is this node selected by any shell?
+ BOOL IsSelected() const;
+#endif
+
+ // Der Grafik sagen, dass sich der Node im Undobereich befindet
+ virtual BOOL SavePersistentData();
+ virtual BOOL RestorePersistentData();
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ // Abfrage der Link-Daten
+ BOOL IsGrfLink() const { return refLink.Is(); }
+ inline BOOL IsLinkedFile() const;
+ inline BOOL IsLinkedDDE() const;
+ ::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
+ BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+ void ReleaseLink();
+
+ // Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link
+ // ein FileObject gesetzt hat
+ void SetTransferPriority( USHORT nPrio );
+
+ // Skalieren einer Image-Map: Die Image-Map wird um den Faktor
+ // zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert
+ void ScaleImageMap();
+
+ // returns the with our graphic attributes filled Graphic-Attr-Structure
+ GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const;
+
+#endif
+ // --> OD 2007-01-18 #i73788#
+ boost::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer();
+ bool IsLinkedInputStreamReady() const;
+ void TriggerAsyncRetrieveInputStream();
+ void ApplyInputStream(
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream,
+ const sal_Bool bIsStreamReadOnly );
+ void UpdateLinkWithInputStream();
+ // <--
+ // --> OD 2008-07-21 #i90395#
+ bool IsAsyncRetrieveInputStreamPossible() const;
+ // <--
+};
+
+
+// ----------------------------------------------------------------------
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwGrfNode *SwNode::GetGrfNode()
+{
+ return ND_GRFNODE == nNodeType ? (SwGrfNode*)this : 0;
+}
+inline const SwGrfNode *SwNode::GetGrfNode() const
+{
+ return ND_GRFNODE == nNodeType ? (const SwGrfNode*)this : 0;
+}
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+inline BOOL SwGrfNode::IsLinkedFile() const
+{
+ return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
+}
+inline BOOL SwGrfNode::IsLinkedDDE() const
+{
+ return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType();
+}
+#endif
+
+
+#endif
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
new file mode 100644
index 000000000000..e5a3ee794e0b
--- /dev/null
+++ b/sw/inc/ndhints.hxx
@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndhints.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDHINTS_HXX
+#define _NDHINTS_HXX
+
+
+#include <svtools/svarray.hxx>
+#include <tools/mempool.hxx>
+
+#include "swtypes.hxx"
+
+//#include "numrule.hxx"
+
+class SwTxtNode;
+class SwRegHistory; // steht im RolBck.hxx
+class SwTxtAttr;
+class SwTxtAttrNesting;
+
+class SfxPoolItem;
+class SfxItemSet;
+class SwDoc;
+
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew,
+ xub_StrLen nStt, xub_StrLen nEnd );
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, const SfxItemSet & rSet,
+ xub_StrLen nStt, xub_StrLen nEnd );
+
+// create redline dummy text hint that must not be inserted into hints array
+SW_DLLPRIVATE SwTxtAttr*
+MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr );
+
+
+/*
+ * Ableitung der Klasse SwpHints ueber den Umweg ueber SwpHts, da
+ * lediglich die Klasse SwTxtNode Attribute einfuegen und
+ * loeschen koennen soll. Anderen Klassen wie den Frames steht
+ * lediglich ein lesender Zugriff ueber den Index-Operator zur
+ * Verfuegung.
+ * Groesse beim Anlegen gleich 1, weil nur dann ein Array erzeug wird, wenn
+ * auch ein Hint eingefuegt wird.
+ */
+
+/*************************************************************************
+ * class SwpHtStart/End
+ *************************************************************************/
+
+SV_DECL_PTRARR_SORT(SwpHtStart,SwTxtAttr*,1,1)
+SV_DECL_PTRARR_SORT(SwpHtEnd,SwTxtAttr*,1,1)
+
+/*************************************************************************
+ * class SwpHintsArr
+ *************************************************************************/
+
+/// the Hints array
+class SwpHintsArray
+{
+
+protected:
+ SwpHtStart m_HintStarts;
+ SwpHtEnd m_HintEnds;
+
+ //FIXME: why are the non-const methods public?
+public:
+ void Insert( const SwTxtAttr *pHt );
+ void DeleteAtPos( const USHORT nPosInStart );
+ bool Resort();
+ SwTxtAttr * Cut( const USHORT nPosInStart );
+
+ inline const SwTxtAttr * GetStart( const USHORT nPos ) const
+ { return m_HintStarts[nPos]; }
+ inline const SwTxtAttr * GetEnd ( const USHORT nPos ) const
+ { return m_HintEnds [nPos]; }
+ inline SwTxtAttr * GetStart( const USHORT nPos )
+ { return m_HintStarts[nPos]; }
+ inline SwTxtAttr * GetEnd ( const USHORT nPos )
+ { return m_HintEnds [nPos]; }
+
+ inline USHORT GetEndCount() const { return m_HintEnds .Count(); }
+ inline USHORT GetStartCount() const { return m_HintStarts.Count(); }
+
+ inline USHORT GetStartOf( const SwTxtAttr *pHt ) const;
+ inline USHORT GetPos( const SwTxtAttr *pHt ) const
+ { return m_HintStarts.GetPos( pHt ); }
+
+ inline SwTxtAttr * GetTextHint( const USHORT nIdx )
+ { return GetStart(nIdx); }
+ inline const SwTxtAttr * operator[]( const USHORT nIdx ) const
+ { return m_HintStarts[nIdx]; }
+ inline USHORT Count() const { return m_HintStarts.Count(); }
+
+#ifndef PRODUCT
+ bool Check() const;
+#endif
+};
+
+/*************************************************************************
+ * class SwpHints
+ *************************************************************************/
+
+// public interface
+class SwpHints : public SwpHintsArray
+{
+private:
+ SwRegHistory* m_pHistory; // for Undo
+
+ bool m_bFontChange : 1; // font change
+ // true: the Node is in Split and Frames are moved
+ bool m_bInSplitNode : 1;
+ // m_bHasHiddenParaField is invalid, call CalcHiddenParaField()
+ bool m_bCalcHiddenParaField : 1;
+ bool m_bHasHiddenParaField : 1; // HiddenParaFld
+ bool m_bFootnote : 1; // footnotes
+ bool m_bDDEFields : 1; // the TextNode has DDE fields
+
+ // records a new attibute in m_pHistory.
+ void NoteInHistory( SwTxtAttr *pAttr, const bool bNew = false );
+
+ void CalcFlags( );
+
+ // Delete methods may only be called by the TextNode!
+ // Because the TextNode also guarantees removal of the Character for
+ // attributes without an end.
+ friend class SwTxtNode;
+ void DeleteAtPos( const USHORT nPos );
+ // Delete the given Hint. The Hint must actually be in the array!
+ void Delete( SwTxtAttr* pTxtHt );
+
+ inline void SetInSplitNode(bool bInSplit) { m_bInSplitNode = bInSplit; }
+ inline void SetCalcHiddenParaField() { m_bCalcHiddenParaField = true; }
+ inline void SetHiddenParaField( const bool bNew )
+ { m_bHasHiddenParaField = bNew; }
+ inline bool HasHiddenParaField() const
+ {
+ if ( m_bCalcHiddenParaField )
+ {
+ (const_cast<SwpHints*>(this))->CalcHiddenParaField();
+ }
+ return m_bHasHiddenParaField;
+ }
+
+ void InsertNesting(SwTxtAttrNesting & rNewHint);
+ bool TryInsertNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNewHint);
+ void BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
+ const SetAttrMode nMode );
+ bool MergePortions( SwTxtNode& rNode );
+
+public:
+ SwpHints();
+
+ inline bool CanBeDeleted() const { return !Count(); }
+
+ // register a History, which receives all attribute changes (for Undo)
+ void Register( SwRegHistory* pHist ) { m_pHistory = pHist; }
+ // deregister the currently registered History
+ void DeRegister() { Register(0); }
+ SwRegHistory* GetHistory() const { return m_pHistory; }
+
+ /// try to insert the hint
+ /// @return true iff hint successfully inserted
+ bool TryInsertHint( SwTxtAttr * const pHint, SwTxtNode & rNode,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+
+ inline bool HasFtn() const { return m_bFootnote; }
+ inline bool IsInSplitNode() const { return m_bInSplitNode; }
+
+ // calc current value of m_bHasHiddenParaField, returns true iff changed
+ bool CalcHiddenParaField();
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwpHints)
+};
+
+// Ausgabeoperator fuer die Texthints
+SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
+
+/*************************************************************************
+ * Inline Implementations
+ *************************************************************************/
+
+inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
+{
+ USHORT nPos;
+ if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) )
+ {
+ nPos = USHRT_MAX;
+ }
+ return nPos;
+}
+
+inline SwTxtAttr *SwpHintsArray::Cut( const USHORT nPosInStart )
+{
+ SwTxtAttr *pHt = GetTextHint(nPosInStart);
+ DeleteAtPos( nPosInStart );
+ return pHt;
+}
+
+
+#endif
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
new file mode 100644
index 000000000000..0942621991e8
--- /dev/null
+++ b/sw/inc/ndindex.hxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndindex.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDINDEX_HXX
+#define _NDINDEX_HXX
+
+#include <limits.h>
+#include <tools/solar.h>
+
+#include "node.hxx"
+#include "ndarr.hxx"
+
+class SwNode;
+class SwNodes;
+
+class SW_DLLPUBLIC SwNodeIndex
+{
+ friend void SwNodes::RegisterIndex( SwNodeIndex& );
+ friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
+ friend void SwNodes::RemoveNode( ULONG, ULONG, BOOL );
+
+#ifndef PRODUCT
+ static int nSerial;
+ int MySerial;
+#endif
+
+ SwNode* pNd;
+ SwNodeIndex *pNext, *pPrev;
+
+ void Remove(); // Ausketten
+
+ // diese sind nicht erlaubt!
+ SwNodeIndex( SwNodes& rNds, USHORT nIdx );
+ SwNodeIndex( SwNodes& rNds, int nIdx );
+
+public:
+ SwNodeIndex( SwNodes& rNds, ULONG nIdx = 0 );
+ SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
+ SwNodeIndex( const SwNode&, long nDiff = 0 );
+ ~SwNodeIndex() { Remove(); }
+
+ inline ULONG operator++();
+ inline ULONG operator--();
+#ifndef CFRONT
+ inline ULONG operator++(int);
+ inline ULONG operator--(int);
+#endif
+
+ inline ULONG operator+=( ULONG );
+ inline ULONG operator-=( ULONG );
+ inline ULONG operator+=( const SwNodeIndex& );
+ inline ULONG operator-=( const SwNodeIndex& );
+
+ inline BOOL operator< ( const SwNodeIndex& ) const;
+ inline BOOL operator<=( const SwNodeIndex& ) const;
+ inline BOOL operator> ( const SwNodeIndex& ) const;
+ inline BOOL operator>=( const SwNodeIndex& ) const;
+ inline BOOL operator==( const SwNodeIndex& ) const;
+ inline BOOL operator!=( const SwNodeIndex& ) const;
+
+ inline BOOL operator< ( ULONG nWert ) const;
+ inline BOOL operator<=( ULONG nWert ) const;
+ inline BOOL operator> ( ULONG nWert ) const;
+ inline BOOL operator>=( ULONG nWert ) const;
+ inline BOOL operator==( ULONG nWert ) const;
+ inline BOOL operator!=( ULONG nWert ) const;
+
+ inline SwNodeIndex& operator=( ULONG );
+ SwNodeIndex& operator=( const SwNodeIndex& );
+ SwNodeIndex& operator=( const SwNode& );
+
+ // gebe den Wert vom Index als ULONG zurueck
+ inline ULONG GetIndex() const;
+
+ // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
+ SwNodeIndex& Assign( SwNodes& rNds, ULONG );
+ SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
+
+ // Herausgabe des Pointers auf das NodesArray,
+ inline const SwNodes& GetNodes() const;
+ inline SwNodes& GetNodes();
+
+ SwNode& GetNode() const { return *pNd; }
+};
+
+/*
+ * SwRange
+ */
+class SW_DLLPUBLIC SwNodeRange
+{
+public:
+ SwNodeIndex aStart;
+ SwNodeIndex aEnd;
+
+ SwNodeRange( const SwNodeIndex &rS, const SwNodeIndex &rE );
+ SwNodeRange( const SwNodeRange &rRange );
+
+ SwNodeRange( SwNodes& rArr, ULONG nSttIdx = 0, ULONG nEndIdx = 0 );
+ SwNodeRange( const SwNodeIndex& rS, long nSttDiff,
+ const SwNodeIndex& rE, long nEndDiff = 0 );
+ SwNodeRange( const SwNode& rS, long nSttDiff,
+ const SwNode& rE, long nEndDiff = 0 );
+};
+
+
+
+
+// fuer die inlines wird aber der node.hxx benoetigt. Dieses braucht aber
+// auch wieder dieses. Also alle Inlines, die auf pNd zugreifen werden
+// hier implementiert.
+
+inline ULONG SwNodeIndex::GetIndex() const
+{
+ return pNd->GetIndex();
+}
+inline const SwNodes& SwNodeIndex::GetNodes() const
+{
+ return pNd->GetNodes();
+}
+inline SwNodes& SwNodeIndex::GetNodes()
+{
+ return pNd->GetNodes();
+}
+inline BOOL SwNodeIndex::operator< ( ULONG nWert ) const
+{
+ return pNd->GetIndex() < nWert;
+}
+inline BOOL SwNodeIndex::operator<=( ULONG nWert ) const
+{
+ return pNd->GetIndex() <= nWert;
+}
+inline BOOL SwNodeIndex::operator> ( ULONG nWert ) const
+{
+ return pNd->GetIndex() > nWert;
+}
+inline BOOL SwNodeIndex::operator>=( ULONG nWert ) const
+{
+ return pNd->GetIndex() >= nWert;
+}
+inline BOOL SwNodeIndex::operator==( ULONG nWert ) const
+{
+ return pNd->GetIndex() == nWert;
+}
+inline BOOL SwNodeIndex::operator!=( ULONG nWert ) const
+{
+ return pNd->GetIndex() != nWert;
+}
+inline BOOL SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() < rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() <= rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() > rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() >= rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
+{
+ return pNd == rIdx.pNd;
+}
+inline BOOL SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
+{
+ return pNd != rIdx.pNd;
+}
+
+inline ULONG SwNodeIndex::operator++()
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator--()
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
+}
+#ifndef CFRONT
+inline ULONG SwNodeIndex::operator++(int)
+{
+ ULONG nOldIndex = pNd->GetIndex();
+ pNd = GetNodes()[ nOldIndex + 1 ];
+ return nOldIndex;
+}
+inline ULONG SwNodeIndex::operator--(int)
+{
+ ULONG nOldIndex = pNd->GetIndex();
+ pNd = GetNodes()[ nOldIndex - 1 ];
+ return nOldIndex;
+}
+#endif
+
+inline ULONG SwNodeIndex::operator+=( ULONG nWert )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator-=( ULONG nWert )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex();
+}
+
+inline SwNodeIndex& SwNodeIndex::operator=( ULONG nWert )
+{
+ pNd = GetNodes()[ nWert ];
+ return *this;
+}
+
+
+
+//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
+// neue Schnittstelle angepasst werden
+inline SwNode* SwNodes::operator[]( const SwNodeIndex& rIdx ) const
+{
+ return &rIdx.GetNode();
+}
+
+
+#endif
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
new file mode 100644
index 000000000000..7150e1319c30
--- /dev/null
+++ b/sw/inc/ndnotxt.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndnotxt.hxx,v $
+ * $Revision: 1.10.212.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDNOTXT_HXX
+#define _NDNOTXT_HXX
+
+#include "node.hxx"
+
+class PolyPolygon;
+
+// --------------------
+// SwNoTxtNode
+// --------------------
+
+class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
+{
+ friend class SwNodes;
+ friend class SwNoTxtFrm;
+
+// String aAlternateText; // alternativer Text (HTML)
+
+ PolyPolygon *pContour; // Polygon fuer Konturumlauf
+ BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
+ BOOL bContourMapModeValid : 1; // contour map mode is not the graphics's
+ // prefered map mode, but either
+ // MM100 or or pixel
+ BOOL bPixelContour : 1; // contour map mode is invalid and pixel.
+
+ // erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
+ // fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
+ virtual void NewAttrSet( SwAttrPool& );
+
+ SwNoTxtNode( const SwNoTxtNode& ); //nicht erlaubt
+ SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
+
+protected:
+ SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+ SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
+
+public:
+ ~SwNoTxtNode();
+
+ virtual SwCntntFrm *MakeFrm();
+
+ inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
+
+ virtual Size GetTwipSize() const = 0;
+
+ virtual BOOL SavePersistentData();
+ virtual BOOL RestorePersistentData();
+
+ const String GetTitle() const;
+ void SetTitle( const String& rTitle,
+ bool bBroadcast = false );
+ const String GetDescription() const;
+ void SetDescription( const String& rDescription,
+ bool bBroadcast = false );
+
+// const String GetAlternateText() const;
+// void SetAlternateText( const String& rTxt,
+// sal_Bool bBroadcast=sal_False );
+
+ void SetContour( const PolyPolygon *pPoly,
+ BOOL bAutomatic = FALSE );
+ const PolyPolygon *HasContour() const;
+ BOOL _HasContour() const { return pContour!=0; };
+ void GetContour( PolyPolygon &rPoly ) const;
+ void CreateContour();
+
+ void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
+ BOOL HasAutomaticContour() const { return bAutomaticContour; }
+
+ // set either a MM100 or pixel contour
+ void SetContourAPI( const PolyPolygon *pPoly );
+
+ // get either a MM100 or pixel contour, return FALSE if no contour is set.
+ BOOL GetContourAPI( PolyPolygon &rPoly ) const;
+
+ void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
+ BOOL IsPixelContour() const;
+
+ BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
+
+ //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
+ Graphic GetGraphic() const;
+};
+
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwNoTxtNode *SwNode::GetNoTxtNode()
+{
+ return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
+}
+inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
+{
+ return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
+}
+
+#endif // _NDNOTXT_HXX
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
new file mode 100644
index 000000000000..49e0e724f10c
--- /dev/null
+++ b/sw/inc/ndole.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndole.hxx,v $
+ * $Revision: 1.19 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDOLE_HXX
+#define _NDOLE_HXX
+
+#include <ndnotxt.hxx>
+
+#include <svtools/embedhlp.hxx>
+
+class SwGrfFmtColl;
+class SwDoc;
+class SwOLENode;
+
+class SwOLEListener_Impl;
+class SwEmbedObjectLink;
+class SW_DLLPUBLIC SwOLEObj
+{
+ friend class SwOLENode;
+
+ const SwOLENode* pOLENd;
+ SwOLEListener_Impl* pListener;
+
+ //Entweder Ref oder Name sind bekannt, wenn nur der Name bekannt ist, wird
+ //dir Ref bei Anforderung durch GetOleRef() vom Sfx besorgt.
+ svt::EmbeddedObjectRef xOLERef;
+ String aName;
+
+ SwOLEObj( const SwOLEObj& rObj ); //nicht erlaubt.
+ SwOLEObj();
+
+ void SetNode( SwOLENode* pNode );
+
+public:
+ SwOLEObj( const svt::EmbeddedObjectRef& pObj );
+ SwOLEObj( const String &rName, sal_Int64 nAspect );
+ ~SwOLEObj();
+
+ BOOL UnloadObject();
+ static BOOL UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj,
+ const SwDoc* pDoc,
+ sal_Int64 nAspect );
+
+ String GetDescription();
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
+ svt::EmbeddedObjectRef& GetObject();
+ const String& GetCurrentPersistName() const { return aName; }
+ BOOL IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
+#endif
+};
+
+
+// --------------------
+// SwOLENode
+// --------------------
+
+class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
+{
+ friend class SwNodes;
+ mutable SwOLEObj aOLEObj;
+ Graphic* pGraphic;
+ String sChartTblName; // bei Chart Objecten: Name der ref. Tabelle
+ BOOL bOLESizeInvalid; //Soll beim SwDoc::PrtOLENotify beruecksichtig
+ //werden (zum Beispiel kopiert). Ist nicht
+ //Persistent.
+
+ SwEmbedObjectLink* mpObjectLink;
+ String maLinkURL;
+
+ SwOLENode( const SwNodeIndex &rWhere,
+ const svt::EmbeddedObjectRef&,
+ SwGrfFmtColl *pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ SwOLENode( const SwNodeIndex &rWhere,
+ const String &rName,
+ sal_Int64 nAspect,
+ SwGrfFmtColl *pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ // aOLEObj besitzt einen privaten Copy-CTOR, wir brauchen auch einen:
+ SwOLENode( const SwOLENode & );
+
+ using SwNoTxtNode::GetGraphic;
+
+public:
+ const SwOLEObj& GetOLEObj() const { return aOLEObj; }
+ SwOLEObj& GetOLEObj() { return aOLEObj; }
+ ~SwOLENode();
+
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+ // steht in ndcopy.cxx
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+
+ virtual Size GetTwipSize() const;
+
+ Graphic* GetGraphic();
+
+ Graphic* GetHCGraphic(); // tries to retrieve HighContrast representation if possible
+ void GetNewReplacement();
+
+ virtual BOOL SavePersistentData();
+ virtual BOOL RestorePersistentData();
+
+ BOOL IsInGlobalDocSection() const;
+ BOOL IsOLEObjectDeleted() const;
+
+ BOOL IsOLESizeInvalid() const { return bOLESizeInvalid; }
+ void SetOLESizeInvalid( BOOL b ){ bOLESizeInvalid = b; }
+
+ sal_Int64 GetAspect() const { return aOLEObj.GetObject().GetViewAspect(); }
+ void SetAspect( sal_Int64 nAspect) { aOLEObj.GetObject().SetViewAspect( nAspect ); }
+
+ // OLE-Object aus dem "Speicher" entfernen
+ // inline void Unload() { aOLEObj.Unload(); }
+ String GetDescription() const { return aOLEObj.GetDescription(); }
+
+ sal_Bool UpdateLinkURL_Impl();
+ void BreakFileLink_Impl();
+ void DisconnectFileLink_Impl();
+
+ void CheckFileLink_Impl();
+
+ // --> OD 2009-03-05 #i99665#
+ bool IsChart() const;
+ // <--
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ const String& GetChartTblName() const { return sChartTblName; }
+ void SetChartTblName( const String& rNm ) { sChartTblName = rNm; }
+#endif
+};
+
+
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwOLENode *SwNode::GetOLENode()
+{
+ return ND_OLENODE == nNodeType ? (SwOLENode*)this : 0;
+}
+inline const SwOLENode *SwNode::GetOLENode() const
+{
+ return ND_OLENODE == nNodeType ? (const SwOLENode*)this : 0;
+}
+
+#endif // _NDOLE_HXX
+
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
new file mode 100644
index 000000000000..d4d59afa3d9c
--- /dev/null
+++ b/sw/inc/ndtxt.hxx
@@ -0,0 +1,882 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndtxt.hxx,v $
+ * $Revision: 1.61 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDTXT_HXX
+#define _NDTXT_HXX
+
+#include "swdllapi.h"
+#include <error.h>
+#include <node.hxx>
+#include <hintids.hxx>
+#include <ndhints.hxx>
+#include <errhdl.hxx>
+#include <modeltoviewhelper.hxx>
+#include <SwNumberTreeTypes.hxx>
+#include <IDocumentContentOperations.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <vector>
+#include <set>
+
+
+class SwNumRule;
+class SwNodeNum;
+// --> OD 2008-05-06 #refactorlists#
+class SwList;
+// <--
+// --> OD 2008-12-02 #i96772#
+class SvxLRSpaceItem;
+// <--
+
+namespace utl {
+ class TransliterationWrapper;
+}
+
+class SwTxtFmtColl;
+class SwCntntFrm;
+class SwTxtFld; // Fuer GetTxtFld()
+class SfxItemSet;
+class SwUndoTransliterate;
+
+
+struct SwSpellArgs; // for Spell(), splargs.hxx
+struct SwConversionArgs; // for Convert(), splargs.hxx
+class SwInterHyphInfo; // for Hyphenate(), splargs.hxx
+class SwWrongList; // fuer OnlineSpelling
+class SwGrammarMarkUp;
+class OutputDevice;
+class SwScriptInfo;
+struct SwDocStat;
+struct SwParaIdleData_Impl;
+
+namespace com { namespace sun { namespace star { namespace uno {
+ template < class > class Sequence;
+}}}}
+
+typedef std::set< xub_StrLen > SwSoftPageBreakList;
+
+// --------------------
+// SwTxtNode
+// --------------------
+class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
+{
+
+ // fuer das Erzeugen des ersten TextNode
+ friend class SwDoc; // CTOR und AppendTxtNode()
+ friend class SwNodes;
+ friend class SwTxtFrm;
+ friend class SwScriptInfo;
+
+ //Kann 0 sein, nur dann nicht 0 wenn harte Attribute drin stehen.
+ //Also niemals direkt zugreifen!
+ SwpHints *m_pSwpHints;
+
+ // --> OD 2005-11-02 #i51089 - TUNING#
+ mutable SwNodeNum* mpNodeNum; // Numerierung fuer diesen Absatz
+ // <--
+ XubString m_Text;
+
+ SwParaIdleData_Impl* m_pParaIdleData_Impl;
+
+ // Some of the chars this para are hidden. Paragraph has to be reformatted
+ // on changing the view to print preview.
+ mutable bool m_bContainsHiddenChars : 1;
+ // The whole paragraph is hidden because of the hidden text attribute
+ mutable bool m_bHiddenCharsHidePara : 1;
+ // The last two flags have to be recalculated if this flag is set:
+ mutable bool m_bRecalcHiddenCharFlags : 1;
+
+ mutable bool m_bLastOutlineState : 1;
+ bool m_bNotifiable;
+
+ // BYTE nOutlineLevel; //#outline level, removed by zhaojianwei.
+ // --> OD 2008-11-19 #i70748#
+ bool mbEmptyListStyleSetDueToSetOutlineLevelAttr;
+ // <--
+
+ // --> OD 2008-03-27 #refactorlists#
+ // boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or
+ // <ResetAllAttr(..)> method is running.
+ // Needed to avoid duplicate handling of attribute change actions.
+ bool mbInSetOrResetAttr;
+ // <--
+ // --> OD 2008-05-06 #refactorlists#
+ // pointer to the list, to whose the text node is added to
+ SwList* mpList;
+ // <--
+
+
+ SW_DLLPRIVATE SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl,
+ const SfxItemSet* pAutoAttr = 0 );
+
+ // Kopiert die Attribute an nStart nach pDest.
+ SW_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos);
+
+ SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, BOOL bNext = TRUE,
+ BOOL bChgFollow = TRUE );
+
+ SW_DLLPRIVATE void CutImpl(
+ SwTxtNode * const pDest, const SwIndex & rDestStart,
+ const SwIndex & rStart, /*const*/ xub_StrLen nLen,
+ const bool bUpdate = true );
+
+ // Verlagere alles umfassende harte Attribute in den AttrSet des Absatzes
+ SW_DLLPRIVATE void MoveTxtAttr_To_AttrSet(); // wird von SplitNode gerufen.
+
+ // lege den spz. AttrSet an
+ SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
+
+ SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
+ xub_StrLen nEndPos, BOOL bExpandFlds ) const;
+
+ // Optimization: Asking for information about hidden characters at SwScriptInfo
+ // updates these flags.
+ inline bool IsCalcHiddenCharFlags() const
+ { return m_bRecalcHiddenCharFlags; }
+ inline void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
+ {
+ m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
+ m_bContainsHiddenChars = bNewContainsHiddenChars;
+ m_bRecalcHiddenCharFlags = false;
+ }
+
+ SW_DLLPRIVATE void CalcHiddenCharFlags() const;
+
+ SW_DLLPRIVATE SwNumRule * _GetNumRule(BOOL bInParent = TRUE) const;
+
+ SW_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
+ LanguageType nLang, USHORT nLangWhichId,
+ const Font *pFont, USHORT nFontWhichId );
+
+ //
+ // Start: Data collected during idle time
+ //
+ SW_DLLPRIVATE void SetParaNumberOfWords( ULONG nTmpWords ) const;
+ SW_DLLPRIVATE ULONG GetParaNumberOfWords() const;
+ SW_DLLPRIVATE void SetParaNumberOfChars( ULONG nTmpChars ) const;
+ SW_DLLPRIVATE ULONG GetParaNumberOfChars() const;
+ SW_DLLPRIVATE void InitSwParaStatistics( bool bNew );
+
+ /** create number for this text node, if not already existing
+
+ OD 2005-11-02 #i51089 - TUNING#
+ OD 2007-10-26 #i83479# - made private
+
+ @return number of this node
+ */
+ SwNodeNum* CreateNum() const;
+
+ inline void TryDeleteSwpHints();
+
+public:
+ bool IsWordCountDirty() const;
+ bool IsWrongDirty() const;
+ bool IsGrammarCheckDirty() const;
+ bool IsSmartTagDirty() const; // SMARTTAGS
+ bool IsAutoCompleteWordDirty() const;
+ void SetWordCountDirty( bool bNew ) const;
+ void SetWrongDirty( bool bNew ) const;
+ void SetGrammarCheckDirty( bool bNew ) const;
+ void SetSmartTagDirty( bool bNew ) const; // SMARTTAGS
+ void SetAutoCompleteWordDirty( bool bNew ) const;
+ void SetWrong( SwWrongList* pNew, bool bDelete = true );
+ SwWrongList* GetWrong();
+ // --> OD 2008-05-23 #i71360#
+ const SwWrongList* GetWrong() const;
+ // <--
+ void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true );
+ SwGrammarMarkUp* GetGrammarCheck();
+ // SMARTTAGS
+ void SetSmartTags( SwWrongList* pNew, bool bDelete = true );
+ SwWrongList* GetSmartTags();
+
+ //
+ // End: Data collected during idle time
+ //
+
+public:
+ using SwCntntNode::GetAttr;
+
+ const String& GetTxt() const { return m_Text; }
+
+ // getters for SwpHints
+ inline SwpHints &GetSwpHints();
+ inline const SwpHints &GetSwpHints() const;
+ inline SwpHints *GetpSwpHints() { return m_pSwpHints; }
+ inline const SwpHints *GetpSwpHints() const { return m_pSwpHints; }
+ inline bool HasHints() const { return m_pSwpHints ? true : false; }
+ inline SwpHints &GetOrCreateSwpHints();
+
+ virtual ~SwTxtNode();
+
+ virtual xub_StrLen Len() const;
+
+ // steht in itratr
+ void GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, ULONG &rAbs,
+ OutputDevice* pOut = 0 ) const;
+
+ // --> OD 2008-03-13 #refactorlists#
+ // overriding to handle change of certain paragraph attributes
+ virtual BOOL SetAttr( const SfxPoolItem& );
+ virtual BOOL SetAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
+ virtual USHORT ResetAllAttr();
+ // <--
+
+ /// insert text content
+ void InsertText( const XubString & rStr, const SwIndex & rIdx,
+ const enum IDocumentContentOperations::InsertFlags nMode
+ = IDocumentContentOperations::INS_DEFAULT );
+
+ /** delete text content
+ ATTENTION: must not be called with a range that overlaps the start of
+ an attribute with both extent and dummy char
+ */
+ void EraseText ( const SwIndex &rIdx, const xub_StrLen nCount = STRING_LEN,
+ const enum IDocumentContentOperations::InsertFlags nMode
+ = IDocumentContentOperations::INS_DEFAULT );
+
+ /** delete all attributes.
+ If neither pSet nor nWhich is given, delete all attributes (except
+ refmarks, toxmarks, meta) in range.
+ @param rIdx start position
+ @param nLen range in which attributes will be deleted
+ @param pSet if not 0, delete only attributes contained in pSet
+ @param nWhich if not 0, delete only attributes with matching which
+ @param bInclRefToxMark
+ refmarks, toxmarks, and metas will be ignored unless this is true
+ ATTENTION: setting bInclRefToxMark is only allowed from UNDO!
+ */
+ void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich = 0,
+ const SfxItemSet* pSet = 0, BOOL bInclRefToxMark = FALSE );
+ void GCAttr();
+
+ // loesche das Text-Attribut (muss beim Pool abgemeldet werden!)
+ void DestroyAttr( SwTxtAttr* pAttr );
+
+ // loesche alle Attribute aus dem SwpHintsArray.
+ void ClearSwpHintsArr( bool bDelFields );
+
+ /// Insert pAttr into hints array. @return true iff inserted successfully
+ bool InsertHint( SwTxtAttr * const pAttr,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+ /// create new text attribute from rAttr and insert it
+ /// @return inserted hint; 0 if not sure the hint is inserted
+ SwTxtAttr* InsertItem( SfxPoolItem& rAttr,
+ const xub_StrLen nStart, const xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+
+ // setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
+ // dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
+ BOOL SetAttr( const SfxItemSet& rSet,
+ xub_StrLen nStt, xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+ // erfrage die Attribute vom TextNode ueber den Bereich
+ // --> OD 2008-01-16 #newlistlevelattrs#
+ // Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
+ // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // the corresponding list level of an applied list style is merged into
+ // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == FALSE,
+ // corresponding node has not its own indent attributes and the
+ // position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT.
+ BOOL GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ BOOL bOnlyTxtAttr = FALSE,
+ BOOL bGetFromChrFmt = TRUE,
+ const bool bMergeIndentValuesOfNumRule = false ) const;
+ // <--
+
+ // uebertrage Attribute eines AttrSets ( AutoFmt ) in das SwpHintsArray
+ void FmtToTxtAttr( SwTxtNode* pNd );
+
+ /// delete all attributes of type nWhich at nStart (opt. end nEnd)
+ void DeleteAttributes( const USHORT nWhich,
+ const xub_StrLen nStart, const xub_StrLen nEnd = 0 );
+ /// delete the attribute pTxtAttr
+ void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
+
+ // Aktionen auf Text und Attributen
+ // --> OD 2008-11-18 #i96213#
+ // introduce optional parameter to control, if all attributes have to be copied.
+ void CopyText( SwTxtNode * const pDest,
+ const SwIndex &rStart,
+ const xub_StrLen nLen,
+ const bool bForceCopyOfAllAttrs = false );
+ void CopyText( SwTxtNode * const pDest,
+ const SwIndex &rDestStart,
+ const SwIndex &rStart,
+ xub_StrLen nLen,
+ const bool bForceCopyOfAllAttrs = false );
+ // <--
+
+ void CutText(SwTxtNode * const pDest,
+ const SwIndex & rStart, const xub_StrLen nLen);
+ inline void CutText(SwTxtNode * const pDest, const SwIndex &rDestStart,
+ const SwIndex & rStart, const xub_StrLen nLen);
+
+ /// replace nDelLen characters at rStart with rText
+ void ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
+ const XubString& rText );
+ void ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen, const XubString& rText,
+ const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
+
+ // virtuelle Methoden aus dem CntntNode
+ virtual SwCntntFrm *MakeFrm();
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+ virtual SwCntntNode *JoinNext();
+ virtual SwCntntNode *JoinPrev();
+
+ SwCntntNode *AppendNode( const SwPosition & );
+
+ // setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
+ BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
+ BOOL bFmtToTxtAttributes = TRUE );
+
+ // gebe das vorgegebene Attribut, welches an der TextPosition (rIdx)
+ // gesetzt ist zurueck. Gibt es keines, returne 0-Pointer
+ // gesetzt heisst: Start <= rIdx < End
+ // FIXME: this function does not seem to be well-defined for those
+ // hints of which several may cover a single position, like TOXMark,
+ // or CharFmt
+ SwTxtAttr *GetTxtAttr( const SwIndex& rIdx, USHORT nWhichHt,
+ BOOL bExpand = FALSE ) const;
+
+ /** get the text attribute at position nIndex which owns
+ the dummy character CH_TXTATR_* at that position, if one exists.
+ @param nIndex the position in the text
+ @param nWhich if different from RES_TXTATR_END, return only
+ attribute with given which id
+ @return the text attribute at nIndex of type nWhich, if it exists
+ */
+ SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex,
+ const RES_TXTATR nWhich = RES_TXTATR_END ) const;
+
+ // Aktuelles Wort zurueckliefern
+ XubString GetCurWord(xub_StrLen) const;
+ USHORT Spell(SwSpellArgs*);
+ USHORT Convert( SwConversionArgs & );
+
+ inline SwTxtFmtColl *GetTxtColl() const;
+ virtual SwFmtColl *ChgFmtColl( SwFmtColl* );
+ void _ChgTxtCollUpdateNum( const SwTxtFmtColl* pOld,
+ const SwTxtFmtColl* pNew );
+
+ // kopiere die Collection mit allen Autoformaten zum Dest-Node
+ // dieser kann auch in einem anderen Dokument stehen!
+ // (Methode steht im ndcopy.cxx!!)
+ void CopyCollFmt( SwTxtNode& rDestNd );
+
+ //const SwNodeNum* _GetNodeNum() const { return pNdNum; }
+
+ //
+ // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
+ //
+
+ /**
+ Returns numbering rule of this text node.
+
+ @param bInParent serach in parent attributes, too
+
+ @return numbering rule of this text node or NULL if none is set
+ */
+ SwNumRule *GetNumRule(BOOL bInParent = TRUE) const;
+
+ inline const SwNodeNum* GetNum() const
+ {
+ return mpNodeNum;
+ }
+
+ SwNumberTree::tNumberVector GetNumberVector() const;
+
+ /**
+ Returns if this text node is an outline.
+
+ @retval true this text node is an outline
+ @retval false else
+ */
+ bool IsOutline() const;
+
+ bool IsOutlineStateChanged() const;
+
+ void UpdateOutlineState();
+
+ /** -> #i23730#
+
+ Returns if this text node may be numbered.
+
+ A text node may be numbered if
+ - it has no SwNodeNum
+ - it has a SwNodeNum and it has a numbering rule and the according
+ SwNumFmt defines a numbering type that is an enumeration.
+
+ @retval TRUE this text node may be numbered
+ @retval FALSE else
+ */
+ //BOOL MayBeNumbered() const;
+
+ /**
+ Notify this textnode that its numbering rule has changed.
+ */
+ void NumRuleChgd();
+
+ /** Returns outline of numbering string
+
+ OD 2005-11-17 #128041#
+ Introduce parameter <_bInclPrefixAndSuffixStrings> in order to control,
+ if the prefix and the suffix strings have to been included or not.
+
+ @param _bInclPrefixAndSuffixStrings
+ optional input parameter - boolean indicating, if the prefix and the
+ suffix strings have to been included or not. default value = <true>
+
+ @param _nRestrictToThisLevel
+ optional input parameter - unsigned integer indicating the maximum outline
+ level to which the output string must be restricted to. Default value is
+ MAXLEVEL
+ */
+ XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true, const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
+
+ /**
+ Returns the additional indents of this text node and its numbering.
+
+ @param bTxtLeft ???
+
+ @return additional indents
+ */
+ long GetLeftMarginWithNum( BOOL bTxtLeft = FALSE ) const;
+
+ /**
+ Returns the combined first line indent of this text node and
+ its numbering.
+
+ @param the first line indent of this text node taking the
+ numbering into account (return parameter)
+
+ @retval TRUE this node has SwNodeNum and has numbering rule
+ @retval FALSE else
+ */
+ BOOL GetFirstLineOfsWithNum( short& rFirstOffset ) const;
+
+ // --> OD 2008-12-02 #i96772#
+ void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const;
+ // <--
+
+ /** return left margin for tab stop position calculation
+
+ OD 2008-06-30 #i91133#
+ Needed for text formatting
+ Method considers new list level attributes, which also can provide a left margin value
+
+ @author OD
+ */
+ long GetLeftMarginForTabCalculation() const;
+
+ /** -> #i29560
+ Returns if this text node has a number.
+
+ This text node has a number if it has a SwNodeNum and a
+ numbering rule and the numbering format specified for the
+ level of the SwNodeNum is of an enumeration type.
+
+ @retval TRUE This text node has a number.
+ @retval FALSE else
+ */
+ BOOL HasNumber() const;
+
+ /** -> #i29560
+ Returns if this text node has a bullet.
+
+ This text node has a bullet if it has a SwNodeNum and a
+ numbering rule and the numbering format specified for the
+ level of the SwNodeNum is of a bullet type.
+
+ @retval TRUE This text node has a bullet.
+ @retval FALSE else
+ */
+ BOOL HasBullet() const;
+
+ /** -> #i27615#
+ Returns is this text node is numbered.
+
+ This node is numbered if it has a SwNodeNum and it has a
+ numbering rule and has not a hidden SwNodeNum.
+
+ ATTENTION: Returns TRUE even if the SwNumFmt has type
+ SVX_NUM_NUMBER_NONE.
+
+ @retval TRUE This node is numbered.
+ @retval FALSE else
+ */
+ BOOL IsNumbered() const;
+
+ /** -> #i27615#
+ Returns if this text node has a marked label.
+
+ @retval true This text node has a marked label.
+ @retval false else
+ */
+ bool HasMarkedLabel() const;
+
+ /** Sets the list level of this text node.
+
+ Side effect, when the text node is a list item:
+ The text node's representation in the list tree (<SwNodeNum> instance)
+ is updated.
+
+ @param nLevel level to set
+ */
+ void SetAttrListLevel(int nLevel);
+
+ bool HasAttrListLevel() const;
+
+ int GetAttrListLevel() const;
+
+ /** Returns the actual list level of this text node, when it is a list item
+
+ @return the actual list level of this text node, if it is a list item,
+ -1 otherwise
+ */
+ int GetActualListLevel() const;
+
+ /**
+ Returns outline level of this text node.
+
+ If a text node has an outline number (i.e. it has an SwNodeNum
+ and a outline numbering rule) the outline level is the level of
+ this SwNodeNum.
+
+ If a text node has no outline number and has a paragraph style
+ attached the outline level is the outline level of the
+ paragraph style.
+
+ Otherwise the text node has no outline level (NO_NUMBERING).
+
+ NOTE: The outline level of text nodes is subject to change. The
+ plan is to have an SwTxtNode::nOutlineLevel member that is
+ updated from a paragraph style upon appliance of that paragraph
+ style.
+
+ @return outline level or NO_NUMBERING if there is no outline level
+ */
+ int GetAttrOutlineLevel() const;//#OutlineLevel,added by zhaojianwei
+
+ /**
+ Sets the out line level *at* a text node.
+
+ @param nLevel the level to be set
+
+ If the text node has an outline number the level is set at the
+ outline number.
+
+ If the text node has no outline number but has a paragraph
+ style applied the outline level is set at the paragraph style.
+
+ NOTE: This is subject to change, see GetOutlineLevel.
+ */
+ //void SetOutlineLevel(int nLevel);
+ void SetAttrOutlineLevel(int nLevel);//#OutlineLevel,added by zhaojianwei
+
+ // --> OD 2008-11-19 #i70748#
+ bool IsEmptyListStyleDueToSetOutlineLevelAttr();
+ void SetEmptyListStyleDueToSetOutlineLevelAttr();
+ void ResetEmptyListStyleDueToResetOutlineLevelAttr();
+ // <--
+
+ /**
+ Returns the width of leading tabs/blanks in this paragraph.
+ This space will be converted into numbering indent if the paragraph
+ is set to be numbered.
+
+ @return the width of the leading whitespace
+ */
+ USHORT GetWidthOfLeadingTabs() const;
+
+
+ /**
+ Returns if the paragraph has a visible numbering or bullet.
+ This includes all kinds of numbering/bullet/outlines.
+ Note: This function returns false, if the numbering format is
+ SVX_NUM_NUMBER_NONE or if the numbering/bullet has been deleted.
+
+ @return TRUE if the paragraph has a visible numbering/bullet/outline
+ */
+ bool HasVisibleNumberingOrBullet() const;
+
+ // --> OD 2008-02-19 #refactorlists#
+ void SetListId( const String sListId );
+ String GetListId() const;
+ // <--
+
+ /** Determines, if the list level indent attributes can be applied to the
+ paragraph.
+
+ OD 2008-01-17 #newlistlevelattrs#
+ The list level indents can be applied to the paragraph under the one
+ of following conditions:
+ - the list style is directly applied to the paragraph and the paragraph
+ has no own indent attributes.
+ - the list style is applied to the paragraph through one of its paragraph
+ styles, the paragraph has no own indent attributes and on the paragraph
+ style hierarchy from the paragraph to the paragraph style with the
+ list style no indent attributes are found.
+
+ @author OD
+
+ @return boolean
+ */
+ bool AreListLevelIndentsApplicable() const;
+
+ /** Retrieves the list tab stop position, if the paragraph's list level defines
+ one and this list tab stop has to merged into the tap stops of the paragraph
+
+ OD 2008-01-17 #newlistlevelattrs#
+
+ @author OD
+
+ @param nListTabStopPosition
+ output parameter - containing the list tab stop position
+
+ @return boolean - indicating, if a list tab stop position is provided
+ */
+ bool GetListTabStopPosition( long& nListTabStopPosition ) const;
+
+ /** Retrieves the character following the list label, if the paragraph's
+ list level defines one.
+
+ OD 2008-01-17 #newlistlevelattrs#
+
+ @author OD
+
+ @return XubString - the list tab stop position
+ */
+ XubString GetLabelFollowedBy() const;
+
+ //
+ // END OF BULLET/NUMBERING/OUTLINE STUFF:
+ //
+
+ void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
+
+ USHORT GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
+ USHORT nScript = 0 ) const;
+
+ // steht in ndcopy.cxx
+ BOOL IsSymbol( const xub_StrLen nBegin ) const; // steht in itratr.cxx
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+
+ // interaktive Trennung: wir finden den TxtFrm und rufen sein CalcHyph
+ BOOL Hyphenate( SwInterHyphInfo &rHyphInf );
+ void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd );
+
+ // --> OD 2007-11-15 #i83479#
+ // add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating,
+ // when <bWithNum = true> that a space is inserted after the string for
+ // the list label.
+ // add 5th optional parameter <bWithSpacesForLevel> indicating, if additional
+ // spaces are inserted in front of the expanded text string depending on
+ // the list level.
+ XubString GetExpandTxt( const xub_StrLen nIdx = 0,
+ const xub_StrLen nLen = STRING_LEN,
+ const bool bWithNum = false,
+ const bool bAddSpaceAfterListLabelStr = false,
+ const bool bWithSpacesForLevel = false ) const;
+ // <--
+ BOOL GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
+ xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
+ BOOL bWithNum = FALSE, BOOL bWithFtn = TRUE,
+ BOOL bReplaceTabsWithSpaces = FALSE ) const;
+
+ /*
+ *
+ */
+ const ModelToViewHelper::ConversionMap*
+ BuildConversionMap( rtl::OUString& rExpandText ) const;
+
+ XubString GetRedlineTxt( xub_StrLen nIdx = 0,
+ xub_StrLen nLen = STRING_LEN,
+ BOOL bExpandFlds = FALSE,
+ BOOL bWithNum = FALSE ) const;
+ //Liefert fuer die Initalfunktion tatsaechliche Anzahl der Initialzeichen
+ //bei nWishLen == 0 die des ersten Wortes
+ USHORT GetDropLen( USHORT nWishLen) const;
+
+ // Passes back info needed on the dropcap dimensions
+ bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
+
+ // Hidden Paragraph Field:
+ inline bool CalcHiddenParaField()
+ { return m_pSwpHints ? m_pSwpHints->CalcHiddenParaField() : false; }
+ // set CalcVisible flags
+ inline void SetCalcHiddenParaField()
+ { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
+
+ // is the paragraph visible?
+ inline bool HasHiddenParaField() const
+ { return m_pSwpHints ? m_pSwpHints->HasHiddenParaField() : false; }
+
+ //
+ // Hidden Paragraph Field:
+ //
+ inline bool HasHiddenCharAttribute( bool bWholePara ) const
+ {
+ if ( m_bRecalcHiddenCharFlags )
+ CalcHiddenCharFlags();
+ return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
+ }
+
+ inline void SetCalcHiddenCharFlags() const
+ { m_bRecalcHiddenCharFlags = true; }
+
+// --> FME 2004-06-08 #i12836# enhanced pdf
+ //
+ // Returns if the node is hidden due to
+ // 1. HiddenParaField
+ // 2. HiddenCharAttribute
+ // 3. HiddenSection
+ //
+ bool IsHidden() const;
+// <--
+
+ TYPEINFO(); // fuer rtti
+
+ // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ // override SwIndexReg
+ virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
+ const bool bNegative = false, const bool bDelete = false );
+
+ // change text to Upper/Lower/Hiragana/Katagana/...
+ void TransliterateText( utl::TransliterationWrapper& rTrans,
+ xub_StrLen nStart, xub_StrLen nEnd,
+ SwUndoTransliterate* pUndo = 0 );
+
+ // count words in given range
+ void CountWords( SwDocStat& rStat, xub_StrLen nStart, xub_StrLen nEnd ) const;
+
+ // Checks some global conditions like loading or destruction of document
+ // to economize notifications
+ bool IsNotificationEnabled() const;
+
+ // Checks a temporary notification blocker and the global conditons of IsNotificationEnabled()
+ bool IsNotifiable() const;
+
+ void SetListRestart( bool bRestart );
+ // --> OD 2005-11-02 #i51089 - TUNING#
+ bool IsListRestart() const;
+ // <--
+
+ void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
+ bool HasAttrListRestartValue() const;
+ SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
+ SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
+
+ void SetCountedInList( bool bCounted );
+ bool IsCountedInList() const;
+
+ // --> OD 2008-03-13 #refactorlists#
+// void SyncNumberAndNumRule();
+// void UnregisterNumber();
+ void AddToList();
+ void RemoveFromList();
+ bool IsInList() const;
+ // <--
+
+ bool IsFirstOfNumRule() const;
+
+ USHORT GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
+
+ // sfx2::Metadatable
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry();
+ virtual bool IsInClipboard() const;
+ virtual bool IsInUndo() const;
+ virtual bool IsInContent() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
+};
+
+//-----------------------------------------------------------------------------
+
+inline SwpHints & SwTxtNode::GetSwpHints()
+{
+ ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ return *m_pSwpHints;
+}
+inline const SwpHints &SwTxtNode::GetSwpHints() const
+{
+ ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ return *m_pSwpHints;
+}
+
+inline SwpHints& SwTxtNode::GetOrCreateSwpHints()
+{
+ if ( !m_pSwpHints )
+ {
+ m_pSwpHints = new SwpHints;
+ }
+ return *m_pSwpHints;
+}
+
+inline void SwTxtNode::TryDeleteSwpHints()
+{
+ if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
+ {
+ DELETEZ( m_pSwpHints );
+ }
+}
+
+inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const
+{
+ return static_cast<SwTxtFmtColl*>(const_cast<SwModify*>(GetRegisteredIn()));
+}
+
+// fuer den IBM-Compiler nicht inlinen wg. 42876
+#ifndef ICC
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwTxtNode *SwNode::GetTxtNode()
+{
+ return ND_TEXTNODE == nNodeType ? static_cast<SwTxtNode*>(this) : 0;
+}
+inline const SwTxtNode *SwNode::GetTxtNode() const
+{
+ return ND_TEXTNODE == nNodeType ? static_cast<const SwTxtNode*>(this) : 0;
+}
+#endif
+
+inline void
+SwTxtNode::CutText(SwTxtNode * const pDest, const SwIndex & rDestStart,
+ const SwIndex & rStart, const xub_StrLen nLen)
+{
+ CutImpl( pDest, rDestStart, rStart, nLen, true );
+}
+
+#endif
diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx
new file mode 100644
index 000000000000..85299590ad74
--- /dev/null
+++ b/sw/inc/ndtyp.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ndtyp.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NDTYP_HXX
+#define _NDTYP_HXX
+
+#include <tools/solar.h>
+
+// Ids fuer die verschiedenden Nodes; in der Basisklasse steht der Member,
+// der angibt, um was fuer einen es sich handelt
+const BYTE ND_ENDNODE = 0x01;
+const BYTE ND_STARTNODE = 0x02;
+const BYTE ND_TABLENODE = 0x06;
+const BYTE ND_TEXTNODE = 0x08;
+const BYTE ND_GRFNODE = 0x10;
+const BYTE ND_OLENODE = 0x20;
+
+const BYTE ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
+const BYTE ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
+
+const BYTE ND_SECTIONNODE = 0x42;
+// nur fuer internen Gebrauch!!
+const BYTE ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
+
+// spezielle Types der StartNodes, die keine Ableitungen sind, aber
+// "Bereiche" zusammenhalten.
+enum SwStartNodeType
+{
+ SwNormalStartNode = 0,
+ SwTableBoxStartNode,
+ SwFlyStartNode,
+ SwFootnoteStartNode,
+ SwHeaderStartNode,
+ SwFooterStartNode
+};
+
+// is the node the first and/or last node of a section?
+// This information is used for the export filters. Our layout never have a
+// distance before or after if the node is the first or last in a section.
+const BYTE ND_HAS_PREV_LAYNODE = 0x01;
+const BYTE ND_HAS_NEXT_LAYNODE = 0x02;
+
+
+
+#endif
diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx
new file mode 100644
index 000000000000..20be29129fd9
--- /dev/null
+++ b/sw/inc/newhdl.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: newhdl.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NEWHDL_HXX
+#define _NEWHDL_HXX
+
+#include <tools/link.hxx>
+
+#include "errhdl.hxx" // hier kommt auch swtypes rein, was ich brauche
+
+// ----------------------------------------------------------------------------
+
+extern void SW_NEW_HDL();
+
+class SwNewHdl
+{
+ friend void SW_NEW_HDL();
+private:
+ char* pWarnMem;
+ char* pExceptMem;
+ Link aWarnLnk;
+ Link aErrLnk;
+public:
+ void SetWarnLnk( const Link &rLink );
+ void SetErrLnk( const Link &rLink );
+
+ BOOL TryWarnMem();
+
+ BOOL Flush_WarnMem();
+ BOOL Flush_ExceptMem();
+
+ SwNewHdl();
+ ~SwNewHdl();
+};
+
+/******************************************************************************
+ * INLINE
+ ******************************************************************************/
+inline void SwNewHdl::SetWarnLnk( const Link &rLink )
+{
+ aWarnLnk = rLink;
+}
+
+inline void SwNewHdl::SetErrLnk( const Link &rLink )
+{
+ aErrLnk = rLink;
+}
+
+#endif
+
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
new file mode 100644
index 000000000000..5aa259b68c06
--- /dev/null
+++ b/sw/inc/node.hxx
@@ -0,0 +1,760 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: node.hxx,v $
+ * $Revision: 1.22.144.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NODE_HXX
+#define _NODE_HXX
+
+#include <tools/mempool.hxx>
+#include <tools/gen.hxx>
+#include "swdllapi.h"
+#include <ndarr.hxx>
+#include <ndtyp.hxx>
+#include <index.hxx>
+#include <fmtcol.hxx>
+#include <boost/shared_ptr.hpp>
+#include <vector>
+// ---------------------
+// forward Deklarationen
+// ---------------------
+
+class SvUShorts;
+class SwCntntFrm;
+class SwCntntNode;
+class SwDoc;
+class SwEndNode;
+class SwFrm;
+class SwFrmFmt;
+class SwGrfNode;
+class SwNoTxtNode;
+class SwNodeIndex;
+class SwOLENode;
+class SwRect;
+class SwSection;
+class SwSectionFmt;
+class SwSectionNode;
+class SwStartNode;
+class SwTabFrm;
+class SwTable;
+class SwTableNode;
+class SwTableBox;
+class SwTxtNode;
+class SwPageDesc;
+class ViewShell;
+struct SwPosition;
+class IStyleAccess;
+class IDocumentSettingAccess;
+class IDocumentDeviceAccess;
+class IDocumentMarkAccess;
+class IDocumentRedlineAccess;
+class IDocumentStylePoolAccess;
+class IDocumentLineNumberAccess;
+class IDocumentLinksAdministration;
+class IDocumentFieldsAccess;
+class IDocumentContentOperations;
+// --> OD 2007-10-31 #i83479#
+class IDocumentListItems;
+// <--
+
+// --------------------
+// class SwNode
+// --------------------
+class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
+{
+ friend class SwNodes;
+
+#ifndef PRODUCT
+ static long nSerial;
+ long nMySerial;
+#endif
+
+ BYTE nNodeType;
+
+ // JP 28.03.96
+ // fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
+ // gelandet, weil noch Bits frei sind
+ BYTE nAFmtNumLvl : 3;
+ BOOL bSetNumLSpace : 1; // fuer Numerierung: TRUE Einzug setzen
+ BOOL bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
+
+protected:
+ SwStartNode* pStartOfSection;
+
+ SwNode( const SwNodeIndex &rWhere, const BYTE nNodeId );
+
+ // fuer den initialen StartNode
+ SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNodeId );
+
+public:
+ virtual ~SwNode();
+
+#ifndef PRODUCT
+ long int GetSerial() const { return nMySerial; }
+#endif
+
+ USHORT GetSectionLevel() const;
+
+ inline ULONG StartOfSectionIndex() const;
+ inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; }
+ inline SwStartNode* StartOfSectionNode() { return pStartOfSection; }
+
+ inline ULONG EndOfSectionIndex() const;
+ inline const SwEndNode* EndOfSectionNode() const;
+ inline SwEndNode* EndOfSectionNode();
+
+ inline BYTE GetAutoFmtLvl() const { return nAFmtNumLvl; }
+ inline void SetAutoFmtLvl( BYTE nVal ) { nAFmtNumLvl = nVal; }
+
+ inline BOOL IsSetNumLSpace() const { return bSetNumLSpace; }
+ inline void SetNumLSpace( BOOL bFlag ) { bSetNumLSpace = bFlag; }
+
+ inline BOOL IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
+ inline void SetIgnoreDontExpand( BOOL bNew ) { bIgnoreDontExpand = bNew; }
+
+ BYTE GetNodeType() const { return nNodeType; }
+
+ inline SwStartNode *GetStartNode();
+ inline const SwStartNode *GetStartNode() const;
+ inline SwCntntNode *GetCntntNode();
+ inline const SwCntntNode *GetCntntNode() const;
+ inline SwEndNode *GetEndNode();
+ inline const SwEndNode *GetEndNode() const;
+#ifndef ICC
+ inline
+#endif
+ SwTxtNode *GetTxtNode();
+
+#ifndef ICC
+ inline
+#endif
+ const SwTxtNode *GetTxtNode() const;
+ inline SwOLENode *GetOLENode();
+ inline const SwOLENode *GetOLENode() const;
+ inline SwNoTxtNode *GetNoTxtNode();
+ inline const SwNoTxtNode *GetNoTxtNode() const;
+ inline SwGrfNode *GetGrfNode();
+ inline const SwGrfNode *GetGrfNode() const;
+ inline SwTableNode *GetTableNode();
+ inline const SwTableNode *GetTableNode() const;
+ inline SwSectionNode *GetSectionNode();
+ inline const SwSectionNode *GetSectionNode() const;
+
+ inline BOOL IsStartNode() const;
+ inline BOOL IsCntntNode() const;
+ inline BOOL IsEndNode() const;
+ inline BOOL IsTxtNode() const;
+ inline BOOL IsTableNode() const;
+ inline BOOL IsSectionNode() const;
+ inline BOOL IsOLENode() const;
+ inline BOOL IsNoTxtNode() const;
+ inline BOOL IsGrfNode() const;
+
+ /**
+ Checks if this node is in redlines.
+
+ @retval TRUE this node is in redlines
+ @retval FALSE else
+ */
+ BOOL IsInRedlines() const;
+
+ // suche den TabellenNode, in dem dieser steht. Wenn in keiner
+ // Tabelle wird 0 returnt.
+ SwTableNode *FindTableNode();
+ inline const SwTableNode *FindTableNode() const;
+
+ // suche den SectionNode, in dem dieser steht. Wenn es in keiner
+ // Section steht wird 0 returnt.
+ SwSectionNode *FindSectionNode();
+ inline const SwSectionNode *FindSectionNode() const;
+
+ SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
+ inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
+
+ const SwStartNode* FindTableBoxStartNode() const
+ { return FindSttNodeByType( SwTableBoxStartNode ); }
+ const SwStartNode* FindFlyStartNode() const
+ { return FindSttNodeByType( SwFlyStartNode ); }
+ const SwStartNode* FindFootnoteStartNode() const
+ { return FindSttNodeByType( SwFootnoteStartNode ); }
+ const SwStartNode* FindHeaderStartNode() const
+ { return FindSttNodeByType( SwHeaderStartNode ); }
+ const SwStartNode* FindFooterStartNode() const
+ { return FindSttNodeByType( SwFooterStartNode ); }
+
+ // in welchem Nodes-Array/Doc steht der Node ?
+ inline SwNodes& GetNodes();
+ inline const SwNodes& GetNodes() const;
+ inline SwDoc* GetDoc();
+ inline const SwDoc* GetDoc() const;
+
+ /** Provides access to the document setting interface
+ */
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+
+ /** Provides access to the document device interface
+ */
+ const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
+
+ /** Provides access to the document bookmark interface
+ */
+ const IDocumentMarkAccess* getIDocumentMarkAccess() const;
+
+ /** Provides access to the document redline interface
+ */
+ const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
+
+ /** Provides access to the document style pool interface
+ */
+ const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const;
+
+ /** Provides access to the document line number information interface
+ */
+ const IDocumentLineNumberAccess* getIDocumentLineNumberAccess() const;
+
+ /** Provides access to the document draw model interface
+ */
+ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
+
+ /** Provides access to the document layout interface
+ */
+ const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
+ IDocumentLayoutAccess* getIDocumentLayoutAccess();
+
+ /** Provides access to the document links administration interface
+ */
+ const IDocumentLinksAdministration* getIDocumentLinksAdministration() const;
+ IDocumentLinksAdministration* getIDocumentLinksAdministration();
+
+ /** Provides access to the document fields administration interface
+ */
+ const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
+ IDocumentFieldsAccess* getIDocumentFieldsAccess();
+
+ /** Provides access to the document content operations interface
+ */
+ IDocumentContentOperations* getIDocumentContentOperations();
+
+ /** Provides access to the document automatic styles interface
+ */
+ IStyleAccess& getIDocumentStyleAccess();
+
+ /** Provides access to the document's numbered items interface
+
+ OD 2007-10-31 #i83479#
+
+ @author OD
+ */
+ IDocumentListItems& getIDocumentListItems();
+
+ // liegt der Node im Sichtbarenbereich der Shell ?
+ BOOL IsInVisibleArea( ViewShell* pSh = 0 ) const;
+ // befindet sich der Node in einem geschuetzten Bereich?
+ BOOL IsInProtectSect() const;
+ // befindet sich der Node in irgendetwas geschuetzten ?
+ // (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
+ // Rahmen/Fussnoten/..)
+ BOOL IsProtect() const;
+ // suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
+ // Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
+ // die harte Tour ueber die Nodes nach vorne suchen!!
+ // OD 18.03.2003 #106326#
+ const SwPageDesc* FindPageDesc( BOOL bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
+
+ // falls der Node in einem Fly steht, dann wird das entsprechende Format
+ // returnt
+ SwFrmFmt* GetFlyFmt() const;
+
+ // falls der Node in einer Tabelle steht, dann wird die entsprechende
+ // TabellenBox returnt
+ SwTableBox* GetTblBox() const;
+
+ inline ULONG GetIndex() const { return GetPos(); }
+
+ const SwTxtNode* FindOutlineNodeOfLevel( BYTE nLvl ) const;
+
+ BYTE HasPrevNextLayNode() const;
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwNode( const SwNode & rNodes );
+ SwNode & operator= ( const SwNode & rNodes );
+};
+
+// --------------------
+// class SwStartNode
+// --------------------
+class SwStartNode: public SwNode
+{
+ friend class SwNode;
+ friend class SwNodes;
+ friend class SwEndNode; // um theEndOfSection zu setzen !!
+
+ SwEndNode* pEndOfSection;
+ SwStartNodeType eSttNdTyp;
+
+ // fuer den initialen StartNode
+ SwStartNode( SwNodes& rNodes, ULONG nPos );
+
+protected:
+ SwStartNode( const SwNodeIndex &rWhere,
+ const BYTE nNodeType = ND_STARTNODE,
+ SwStartNodeType = SwNormalStartNode );
+public:
+ DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
+
+ SwStartNodeType GetStartNodeType() const { return eSttNdTyp; }
+
+ // an alle ContentNodes der Section das ChkCondColl rufen
+ void CheckSectionCondColl() const;
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwStartNode( const SwStartNode & rNode );
+ SwStartNode & operator= ( const SwStartNode & rNode );
+};
+
+
+// --------------------
+// class SwEndNode
+// --------------------
+class SwEndNode : public SwNode
+{
+ friend class SwNodes;
+ friend class SwTableNode; // um seinen EndNode anlegen zukoennen
+ friend class SwSectionNode; // um seinen EndNode anlegen zukoennen
+
+ // fuer den initialen StartNode
+ SwEndNode( SwNodes& rNodes, ULONG nPos, SwStartNode& rSttNd );
+
+protected:
+ SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwEndNode)
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwEndNode( const SwEndNode & rNode );
+ SwEndNode & operator= ( const SwEndNode & rNode );
+};
+
+
+// --------------------
+// SwCntntNode
+// --------------------
+class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexReg
+{
+ // Der Reader darf NewAttrSet() aufrufen!
+// friend class SwSwgReader;
+// friend class Sw3IoImp;
+
+//FEATURE::CONDCOLL
+ SwDepend* pCondColl;
+//FEATURE::CONDCOLL
+ mutable bool mbSetModifyAtAttr;
+
+protected:
+ SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNodeType,
+ SwFmtColl *pFmtColl );
+ virtual ~SwCntntNode();
+
+ // Attribut-Set fuer alle AUTO-Attribute eines CntntNodes
+ // ( z.B: TxtNode oder NoTxtNode
+ boost::shared_ptr<const SfxItemSet> mpAttrSet;
+
+ // lasse von den entsprechenden Nodes die spz. AttrSets anlegen
+ virtual void NewAttrSet( SwAttrPool& ) = 0;
+
+ // There some functions that like to remove items from the internal
+ // SwAttrSet (handle):
+ USHORT ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ virtual SwCntntFrm *MakeFrm() = 0;
+ virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0;
+ virtual SwCntntNode *JoinNext();
+ virtual SwCntntNode *JoinPrev();
+ // koennen 2 Nodes zusammengefasst werden ?
+ // in pIdx kann die 2. Position returnt werden.
+ int CanJoinNext( SwNodeIndex* pIdx =0 ) const;
+ int CanJoinPrev( SwNodeIndex* pIdx =0 ) const;
+
+ void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
+ void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
+
+ BOOL GoNext(SwIndex *, USHORT nMode ) const;
+ BOOL GoPrevious(SwIndex *, USHORT nMode ) const;
+
+ SwCntntFrm *GetFrm( const Point* pDocPos = 0,
+ const SwPosition *pPos = 0,
+ const BOOL bCalcFrm = TRUE ) const;
+ // Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
+ // Rechteck, wenn kein Layout existiert.
+ // Wird fuer die Export Filter benoetigt.
+ SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ const Point* pPoint = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+ SwRect FindPageFrmRect( const BOOL bPrtArea = FALSE,
+ const Point* pPoint = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+ /*
+ * Methode erzeugt fuer den angegebenen Node alle Ansichten vom
+ * Dokument. Die erzeugten Contentframes werden in das entsprechende
+ * Layout gehaengt.
+ */
+ void MakeFrms( SwCntntNode& rNode );
+ /*
+ * Methode loescht fuer den Node alle Ansichten vom
+ * Dokument. Die Contentframes werden aus dem entsprechenden
+ * Layout ausgehaengt.
+ */
+ void DelFrms();
+
+ /*
+ * liefert die Anzahl der Elemente des Inhalts des Nodes;
+ * Default ist 1, Unterschiede gibt es beim TextNode und beim
+ * Formelnode.
+ */
+ virtual xub_StrLen Len() const;
+
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
+
+ // Ist bInParent FALSE, wird nur in diesem Node nach dem Attribut gesucht.
+ const SfxPoolItem& GetAttr( USHORT nWhich, BOOL bInParent=TRUE ) const;
+ BOOL GetAttr( SfxItemSet& rSet, BOOL bInParent=TRUE ) const;
+ // --> OD 2008-03-13 #refactorlists#
+ // made virtual
+ virtual BOOL SetAttr( const SfxPoolItem& );
+ virtual BOOL SetAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
+ virtual USHORT ResetAllAttr();
+ // <--
+
+ // liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
+ const SfxPoolItem* GetNoCondAttr( USHORT nWhich, BOOL bInParents ) const;
+
+ // hat der Node schon eigene Auto-Attribute ?
+ // Zugriff auf SwAttrSet
+ inline const SwAttrSet &GetSwAttrSet() const;
+ inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
+ inline BOOL HasSwAttrSet() const { return mpAttrSet ? TRUE : FALSE; }
+
+ virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
+ SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
+
+//FEATURE::CONDCOLL
+ inline SwFmtColl& GetAnyFmtColl() const;
+ void SetCondFmtColl( SwFmtColl* );
+ inline SwFmtColl* GetCondFmtColl() const;
+
+ BOOL IsAnyCondition( SwCollCondition& rTmp ) const;
+ void ChkCondColl();
+//FEATURE::CONDCOLL
+
+ // invalidiert die am Node gesetzte NumRule. Diese wird
+ // spaetestend in EndAction einer Shell geupdatet
+ BOOL InvalidateNumRule();
+
+ // --> OD 2005-02-21 #i42921# - determines the text direction for a certain
+ // position. Return -1, if text direction could *not* be determined.
+ short GetTextDirection( const SwPosition& rPos,
+ const Point* pPt ) const;
+ // <--
+
+ inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
+ inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwCntntNode( const SwCntntNode & rNode );
+ SwCntntNode & operator= ( const SwCntntNode & rNode );
+
+};
+
+
+
+//---------
+// SwTableNode
+//---------
+class SW_DLLPUBLIC SwTableNode : public SwStartNode, public SwModify
+{
+ friend class SwNodes;
+ SwTable* pTable;
+protected:
+ virtual ~SwTableNode();
+
+public:
+ SwTableNode( const SwNodeIndex & );
+
+ const SwTable& GetTable() const { return *pTable; }
+ SwTable& GetTable() { return *pTable; }
+ SwTabFrm *MakeFrm();
+
+ //Legt die Frms fuer den TableNode (also die TabFrms) an.
+ void MakeFrms( SwNodeIndex* pIdxBehind );
+
+ //Methode loescht fuer den Node alle Ansichten vom
+ //Dokument. Die Contentframes werden aus dem entsprechenden
+ //Layout ausgehaengt.
+ void DelFrms();
+
+ //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
+ //Dokument. Die erzeugten Contentframes werden in das entsprechende
+ //Layout gehaengt.
+ void MakeFrms( const SwNodeIndex & rIdx );
+
+ SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+ void SetNewTable( SwTable* , BOOL bNewFrames=TRUE );
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwTableNode( const SwTableNode & rNode );
+ SwTableNode & operator= ( const SwTableNode & rNode );
+};
+
+
+//---------
+// SwSectionNode
+//---------
+class SwSectionNode : public SwStartNode
+{
+ friend class SwNodes;
+ SwSection* pSection;
+protected:
+ virtual ~SwSectionNode();
+
+public:
+ SwSectionNode( const SwNodeIndex&, SwSectionFmt& rFmt );
+
+ const SwSection& GetSection() const { return *pSection; }
+ SwSection& GetSection() { return *pSection; }
+
+ // setze ein neues SectionObject. Erstmal nur gedacht fuer die
+ // neuen VerzeichnisSections. Der geht ueber in den Besitz des Nodes!
+ void SetNewSection( SwSection* pNewSection );
+
+ SwFrm *MakeFrm();
+
+ //Legt die Frms fuer den SectionNode (also die SectionFrms) an.
+ //Im Defaultfall wird bis die Frames bis zum Ende des Bereichs angelegt,
+ //uebergibt man einen weiteren NodeIndex pEnd, so wird bis zu diesem
+ //ein MakeFrms gerufen, genutzt wird dies von TableToText
+ void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL );
+
+ //Methode loescht fuer den Node alle Ansichten vom
+ //Dokument. Die Contentframes werden aus dem entsprechenden
+ //Layout ausgehaengt.
+ void DelFrms();
+
+ //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
+ //Dokument. Die erzeugten Contentframes werden in das entsprechende
+ //Layout gehaengt.
+ void MakeFrms( const SwNodeIndex & rIdx );
+
+ SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+
+ // setze den Verweis im Format der Section auf sich selbst
+ void NodesArrChgd();
+
+ // ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der
+ // _nicht_ in einem versteckten (Unter-)Bereich liegt
+ BOOL IsCntntHidden() const;
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwSectionNode( const SwSection& rNode );
+ SwSectionNode & operator= ( const SwSection& rNode );
+};
+
+
+
+// ---------------------- einige inline Methoden ----------------------
+inline SwEndNode *SwNode::GetEndNode()
+{
+ return ND_ENDNODE == nNodeType ? (SwEndNode*)this : 0;
+}
+inline const SwEndNode *SwNode::GetEndNode() const
+{
+ return ND_ENDNODE == nNodeType ? (const SwEndNode*)this : 0;
+}
+inline SwStartNode *SwNode::GetStartNode()
+{
+ return ND_STARTNODE & nNodeType ? (SwStartNode*)this : 0;
+}
+inline const SwStartNode *SwNode::GetStartNode() const
+{
+ return ND_STARTNODE & nNodeType ? (const SwStartNode*)this : 0;
+}
+inline SwTableNode *SwNode::GetTableNode()
+{
+ return ND_TABLENODE == nNodeType ? (SwTableNode*)this : 0;
+}
+inline const SwTableNode *SwNode::GetTableNode() const
+{
+ return ND_TABLENODE == nNodeType ? (const SwTableNode*)this : 0;
+}
+inline SwSectionNode *SwNode::GetSectionNode()
+{
+ return ND_SECTIONNODE == nNodeType ? (SwSectionNode*)this : 0;
+}
+inline const SwSectionNode *SwNode::GetSectionNode() const
+{
+ return ND_SECTIONNODE == nNodeType ? (const SwSectionNode*)this : 0;
+}
+inline SwCntntNode *SwNode::GetCntntNode()
+{
+ return ND_CONTENTNODE & nNodeType ? (SwCntntNode*)this : 0;
+}
+inline const SwCntntNode *SwNode::GetCntntNode() const
+{
+ return ND_CONTENTNODE & nNodeType ? (const SwCntntNode*)this : 0;
+}
+
+
+inline BOOL SwNode::IsStartNode() const
+{
+ return ND_STARTNODE & nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsCntntNode() const
+{
+ return ND_CONTENTNODE & nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsEndNode() const
+{
+ return ND_ENDNODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsTxtNode() const
+{
+ return ND_TEXTNODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsTableNode() const
+{
+ return ND_TABLENODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsSectionNode() const
+{
+ return ND_SECTIONNODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsNoTxtNode() const
+{
+ return ND_NOTXTNODE & nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsOLENode() const
+{
+ return ND_OLENODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsGrfNode() const
+{
+ return ND_GRFNODE == nNodeType ? TRUE : FALSE;
+}
+
+inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
+{
+ return ((SwNode*)this)->FindSttNodeByType( eTyp );
+}
+inline const SwTableNode* SwNode::FindTableNode() const
+{
+ return ((SwNode*)this)->FindTableNode();
+}
+inline const SwSectionNode* SwNode::FindSectionNode() const
+{
+ return ((SwNode*)this)->FindSectionNode();
+}
+inline ULONG SwNode::StartOfSectionIndex() const
+{
+ return pStartOfSection->GetIndex();
+}
+inline ULONG SwNode::EndOfSectionIndex() const
+{
+ const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
+ return pStNd->pEndOfSection->GetIndex();
+}
+inline const SwEndNode* SwNode::EndOfSectionNode() const
+{
+ const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
+ return pStNd->pEndOfSection;
+}
+inline SwEndNode* SwNode::EndOfSectionNode()
+{
+ SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
+ return pStNd->pEndOfSection;
+}
+
+inline SwNodes& SwNode::GetNodes()
+{
+ return (SwNodes&)GetArray();
+}
+inline const SwNodes& SwNode::GetNodes() const
+{
+ return (SwNodes&)GetArray();
+}
+
+inline SwDoc* SwNode::GetDoc()
+{
+ return GetNodes().GetDoc();
+}
+inline const SwDoc* SwNode::GetDoc() const
+{
+ return GetNodes().GetDoc();
+}
+
+inline SwFmtColl* SwCntntNode::GetCondFmtColl() const
+{
+ return pCondColl ? (SwFmtColl*)pCondColl->GetRegisteredIn() : 0;
+}
+
+
+inline SwFmtColl& SwCntntNode::GetAnyFmtColl() const
+{
+ return pCondColl && pCondColl->GetRegisteredIn()
+ ? *(SwFmtColl*)pCondColl->GetRegisteredIn()
+ : *(SwFmtColl*)GetRegisteredIn();
+}
+
+inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const
+{
+ return mpAttrSet ? *GetpSwAttrSet() : GetAnyFmtColl().GetAttrSet();
+}
+
+//FEATURE::CONDCOLL
+
+inline const SfxPoolItem& SwCntntNode::GetAttr( USHORT nWhich,
+ BOOL bInParents ) const
+{
+ return GetSwAttrSet().Get( nWhich, bInParents );
+}
+#endif
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
new file mode 100644
index 000000000000..9b3714c806bf
--- /dev/null
+++ b/sw/inc/numrule.hxx
@@ -0,0 +1,377 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: numrule.hxx,v $
+ * $Revision: 1.39.78.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _NUMRULE_HXX
+#define _NUMRULE_HXX
+
+#include <tools/link.hxx>
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <svx/svxenum.hxx>
+#include <svx/numitem.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <errhdl.hxx> // Fuer die inline-ASSERTs
+#include <error.h> // Fuer die inline-ASSERTs
+#include <hints.hxx>
+#include <hash_map>
+#include <stringhash.hxx>
+// --> OD 2008-02-21 #refactorlists#
+class SwNodeNum;
+#include <SwNumberTreeTypes.hxx>
+// <--
+// --> OD 2008-02-19 #refactorlists#
+#include <vector>
+class SwTxtFmtColl;
+// <--
+// --> OD 2008-07-08 #i91400#
+class IDocumentListsAccess;
+// <--
+
+class Font;
+class SvxBrushItem;
+class SvxNumRule;
+class SwCharFmt;
+class SwDoc;
+class SwFmtVertOrient;
+class SwTxtNode;
+
+const sal_Unicode cBulletChar = 0x2022; // Charakter fuer Aufzaehlungen
+
+class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
+{
+ SwFmtVertOrient* pVertOrient;
+
+ SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc );
+ SW_DLLPRIVATE virtual void NotifyGraphicArrived();
+
+ using SvxNumberFormat::operator ==;
+ using SvxNumberFormat::operator !=;
+
+public:
+ SwNumFmt();
+ SwNumFmt( const SwNumFmt& );
+ SwNumFmt( const SvxNumberFormat&, SwDoc* pDoc);
+
+ virtual ~SwNumFmt();
+
+ SwNumFmt& operator=( const SwNumFmt& );
+
+ BOOL operator==( const SwNumFmt& ) const;
+ BOOL operator!=( const SwNumFmt& r ) const { return !(*this == r); }
+
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
+ void SetCharFmt( SwCharFmt* );
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ virtual void SetCharFmtName(const String& rSet);
+ virtual const String& GetCharFmtName()const;
+
+ virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0);
+
+ virtual void SetVertOrient(sal_Int16 eSet);
+ virtual sal_Int16 GetVertOrient() const;
+ const SwFmtVertOrient* GetGraphicOrientation() const;
+
+ BOOL IsEnumeration() const; // #i22362#
+ BOOL IsItemize() const; // #i29560#
+};
+
+class SwPaM;
+enum SwNumRuleType { OUTLINE_RULE = 0, NUM_RULE = 1, RULE_END = 2 };
+class SW_DLLPUBLIC SwNumRule
+{
+// --> OD 2008-02-19 #refactorlists#
+public:
+ typedef std::vector< SwTxtNode* > tTxtNodeList;
+ typedef std::vector< SwTxtFmtColl* > tParagraphStyleList;
+// <--
+private:
+ friend void _FinitCore();
+
+#ifndef PRODUCT
+ long int nSerial;
+ static long int nInstances;
+#endif
+
+ static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
+ static USHORT aDefNumIndents[ MAXLEVEL ];
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // default list level properties for position-and-space mode LABEL_ALIGNMENT
+ static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ];
+ // <--
+ static USHORT nRefCount;
+ static char* pDefOutlineName;
+
+ SwNumFmt* aFmts[ MAXLEVEL ];
+
+ /** container for associated text nodes
+
+ */
+ // --> OD 2008-02-19 #refactorlists#
+// SwTxtNodeTable* pTxtNodeList;
+ tTxtNodeList maTxtNodeList;
+ // <--
+
+ /** container for associated paragraph styles
+
+ OD 2008-03-03 #refactorlists#
+ */
+ tParagraphStyleList maParagraphStyleList;
+
+ // #i36749#
+ /**
+ hash_map containing "name->rule" relation
+ */
+ std::hash_map<String, SwNumRule *, StringHash> * pNumRuleMap;
+
+ String sName;
+ SwNumRuleType eRuleType;
+ USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
+ USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ BOOL bAutoRuleFlag : 1;
+ BOOL bInvalidRuleFlag : 1;
+ BOOL bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
+ BOOL bAbsSpaces : 1; // die Ebenen repraesentieren absol. Einzuege
+ bool mbCountPhantoms;
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
+ // <--
+
+ // --> OD 2008-04-03 #refactorlists#
+ String msDefaultListId;
+ // <--
+
+ // forbidden and not implemented.
+ SwNumRule();
+
+public:
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // add parameter <eDefaultNumberFormatPositionAndSpaceMode>
+ SwNumRule( const String& rNm,
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
+ SwNumRuleType = NUM_RULE,
+ BOOL bAutoFlg = TRUE );
+
+ SwNumRule( const SwNumRule& );
+ ~SwNumRule();
+
+ SwNumRule& operator=( const SwNumRule& );
+ BOOL operator==( const SwNumRule& ) const;
+ BOOL operator!=( const SwNumRule& r ) const { return !(*this == r); }
+
+ const SwNumFmt* GetNumFmt( USHORT i ) const;
+ const SwNumFmt& Get( USHORT i ) const;
+
+ void Set( USHORT i, const SwNumFmt* );
+ void Set( USHORT i, const SwNumFmt& );
+ String MakeNumString( const SwNodeNum&, BOOL bInclStrings = TRUE,
+ BOOL bOnlyArabic = FALSE ) const;
+ // --> OD 2005-10-17 #126238#
+ // - add optional parameter <_nRestrictToThisLevel> in order to
+ // restrict returned string to this level.
+ String MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
+ const BOOL bInclStrings = TRUE,
+ const BOOL bOnlyArabic = FALSE,
+ const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
+ // <--
+ // --> OD 2007-08-24 #i81002#
+ String MakeRefNumString( const SwNodeNum& rNodeNum,
+ const bool bInclSuperiorNumLabels = false,
+ const sal_uInt8 nRestrictInclToThisLevel = 0 ) const;
+ // <--
+
+ /** Returns list of associated text nodes.
+
+ OD 2008-02-19 #refactorlists#
+
+ @return list of associated text nodes
+ */
+// const SwTxtNodeTable * GetTxtNodeList() const { return pTxtNodeList; }
+ void GetTxtNodeList( SwNumRule::tTxtNodeList& rTxtNodeList ) const;
+ SwNumRule::tTxtNodeList::size_type GetTxtNodeListSize() const;
+
+ // --> OD 2008-02-19 #refactorlists#
+ void AddTxtNode( SwTxtNode& rTxtNode );
+ void RemoveTxtNode( SwTxtNode& rTxtNode );
+ // <--
+
+ // --> OD 2008-03-03 #refactorlists#
+ SwNumRule::tParagraphStyleList::size_type GetParagraphStyleListSize() const;
+ void AddParagraphStyle( SwTxtFmtColl& rTxtFmtColl );
+ void RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl );
+ // <--
+
+ // --> OD 2008-04-03 #refactorlists#
+ inline void SetDefaultListId( const String sDefaultListId )
+ {
+ msDefaultListId = sDefaultListId;
+ }
+ inline String GetDefaultListId() const
+ {
+ return msDefaultListId;
+ }
+ // <--
+ // #i36749#
+ /**
+ Register this rule in a "name->numrule" map.
+
+ @param pNumRuleMap map to register in
+ */
+ void SetNumRuleMap(
+ std::hash_map<String, SwNumRule *, StringHash>* pNumRuleMap );
+
+ static char* GetOutlineRuleName() { return pDefOutlineName; }
+
+ static USHORT GetNumIndent( BYTE nLvl );
+ static USHORT GetBullIndent( BYTE nLvl );
+
+ SwNumRuleType GetRuleType() const { return eRuleType; }
+ void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
+ bInvalidRuleFlag = TRUE; }
+
+ // eine Art Copy-Constructor, damit die Num-Formate auch an den
+ // richtigen CharFormaten eines Dokumentes haengen !!
+ // (Kopiert die NumFormate und returnt sich selbst)
+ SwNumRule& CopyNumRule( SwDoc*, const SwNumRule& );
+
+ // testet ob die CharFormate aus dem angegeben Doc sind und kopiert
+ // die gegebenfalls
+ void CheckCharFmts( SwDoc* pDoc );
+
+ const String& GetName() const { return sName; }
+ // --> OD 2008-07-08 #i91400#
+ void SetName( const String& rNm,
+ IDocumentListsAccess& rDocListAccess ); // #i36749#
+ // <--
+
+ BOOL IsAutoRule() const { return bAutoRuleFlag; }
+ void SetAutoRule( BOOL bFlag ) { bAutoRuleFlag = bFlag; }
+
+ BOOL IsInvalidRule() const { return bInvalidRuleFlag; }
+ void SetInvalidRule( BOOL bFlag );
+
+ BOOL IsContinusNum() const { return bContinusNum; }
+ void SetContinusNum( BOOL bFlag ) { bContinusNum = bFlag; }
+
+ BOOL IsAbsSpaces() const { return bAbsSpaces; }
+ void SetAbsSpaces( BOOL bFlag ) { bAbsSpaces = bFlag; }
+
+ // #115901#
+ BOOL IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
+
+ bool IsCountPhantoms() const;
+ void SetCountPhantoms(bool bCountPhantoms);
+
+ // erfragen und setzen der Poolvorlagen-Id's
+ USHORT GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+
+ // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ USHORT GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
+ BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+
+ void SetSvxRule(const SvxNumRule&, SwDoc* pDoc);
+ SvxNumRule MakeSvxNumRule() const;
+
+ // #i23726#, #i23725#
+ // --> OD 2008-06-09 #i90078#
+ // refactoring: provide certain method for certain purpose
+// void Indent(short aAmount, int nLevel = -1,
+// int nReferenceLevel = -1, BOOL bRelative = TRUE,
+// BOOL bFirstLine = TRUE, BOOL bCheckGtZero = TRUE);
+ // change indent of all list levels by given difference
+ void ChangeIndent( const short nDiff );
+ // set indent of certain list level to given value
+ void SetIndent( const short nNewIndent,
+ const USHORT nListLevel );
+ // set indent of first list level to given value and change other list level's
+ // indents accordingly
+ void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
+ // <--
+
+ void Validate();
+};
+
+// --> OD 2006-06-27 #b6440955#
+// namespace for static functions and methods for numbering and bullets
+namespace numfunc
+{
+ /** retrieve font family name used for the default bullet list characters
+
+ @author OD
+ */
+ const String& GetDefBulletFontname();
+
+ /** determine if default bullet font is user defined
+
+ OD 2008-06-06 #i63395#
+ The default bullet font is user defined, if it is given in the user configuration
+
+ @author OD
+ */
+ bool IsDefBulletFontUserDefined();
+
+ /** retrieve font used for the default bullet list characters
+
+ @author OD
+ */
+ SW_DLLPUBLIC const Font& GetDefBulletFont();
+
+ /** retrieve unicode of character used for the default bullet list for the given list level
+
+ @author OD
+ */
+ sal_Unicode GetBulletChar( BYTE nLevel );
+
+ /** configuration, if at first position of the first list item the <TAB>-key
+ increased the indent of the complete list or only demotes this list item.
+ The same for <SHIFT-TAB>-key at the same position for decreasing the
+ indent of the complete list or only promotes this list item.
+
+ OD 2007-10-01 #b6600435#
+
+ @author OD
+ */
+ sal_Bool ChangeIndentOnTabAtFirstPosOfFirstListItem();
+
+ /**
+ OD 2008-06-06 #i89178#
+
+ @author OD
+ */
+ SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode();
+}
+
+#endif // _NUMRULE_HXX
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
new file mode 100644
index 000000000000..40d8874f912d
--- /dev/null
+++ b/sw/inc/pagedesc.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pagedesc.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _PAGEDESC_HXX
+#define _PAGEDESC_HXX
+
+#include <tools/fract.hxx>
+#include <tools/color.hxx>
+#include <tools/string.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx> //fuer SwTwips
+#include <frmfmt.hxx>
+//#ifndef _NUMRULE_HXX
+//#include <numrule.hxx>
+//#endif
+#include <svx/numitem.hxx>
+
+class SfxPoolItem;
+class SwTxtFmtColl;
+class SwNode;
+
+//Separator line adjustment
+enum SwFtnAdj
+{
+ FTNADJ_LEFT,
+ FTNADJ_CENTER,
+ FTNADJ_RIGHT
+};
+
+//footnote information
+class SW_DLLPUBLIC SwPageFtnInfo
+{
+ SwTwips nMaxHeight; //maximum height of the footnote area.
+ ULONG nLineWidth; //width of separator line
+ Color aLineColor; //color of the separator line
+ Fraction aWidth; //percentage width of the separator line.
+ SwFtnAdj eAdj; //line adjustment.
+ SwTwips nTopDist; //distance between body and separator.
+ SwTwips nBottomDist; //distance between separator and first footnote
+
+public:
+ SwTwips GetHeight() const { return nMaxHeight; }
+ ULONG GetLineWidth() const { return nLineWidth; }
+ const Color& GetLineColor() const { return aLineColor;}
+ const Fraction& GetWidth() const { return aWidth; }
+ SwFtnAdj GetAdj() const { return eAdj; }
+ SwTwips GetTopDist()const { return nTopDist; }
+ SwTwips GetBottomDist() const { return nBottomDist; }
+
+ void SetHeight( SwTwips nNew ) { nMaxHeight = nNew; }
+ void SetLineWidth(ULONG nSet ) { nLineWidth = nSet; }
+ void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
+ void SetWidth( const Fraction &rNew){ aWidth = rNew; }
+ void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; }
+ void SetTopDist ( SwTwips nNew ) { nTopDist = nNew; }
+ void SetBottomDist( SwTwips nNew ) { nBottomDist = nNew; }
+
+ SwPageFtnInfo();
+ SwPageFtnInfo( const SwPageFtnInfo& );
+ SwPageFtnInfo& operator=( const SwPageFtnInfo& );
+
+ BOOL operator ==( const SwPageFtnInfo& ) const;
+};
+
+/*
+ * Verwendung des UseOnPage (eUse) und der FrmFmt'e
+ *
+ * RIGHT - aMaster nur fuer rechte Seiten, linke Seiten immer leer.
+ * LEFT - aLeft fuer linke Seiten, rechte Seiten immer leer.
+ * aLeft ist eine Kopie des Master.
+ * ALL - aMaster fuer rechte Seiten, aLeft fuer Linke Seiten.
+ * aLeft ist eine Kopie des Master.
+ * MIRROR - aMaster fuer rechte Seiten, aLeft fuer linke Seiten.
+ * aLeft ist eine Kopie des Master, Raender sind gespiegelt.
+ *
+ * UI dreht auschliesslich am Master! aLeft wird beim Chg am Dokument
+ * enstprechend dem eUse eingestellt.
+ *
+ * Damit es die Filter etwas einfacher haben werden weitere Werte im
+ * eUse untergebracht:
+ *
+ * HEADERSHARE - Headerinhalt auf beiden Seiten gleich
+ * FOOTERSHARE - Footerinhalt auf beiden Seiten gleich
+ *
+ * Die Werte werden bei den entsprechenden Get-/Set-Methden ausmaskiert.
+ * Zugriff auf das volle eUse inclusive der Header-Footer information
+ * per ReadUseOn(), WriteUseOn() (fuer Filter und CopyCTor)!
+ *
+ * Die FrmFormate fuer Header/Footer werden anhand der Attribute fuer
+ * Header/Footer vom UI am Master eingestellt (Hoehe, Raender, Hintergrund...);
+ * Header/Footer fuer die Linke Seite werden entsprechen kopiert bzw.
+ * gespielt (Chg am Dokument).
+ * Das jew. Attribut fuer den Inhalt wird automatisch beim Chg am
+ * Dokument versorgt (entsprechen den SHARE-informationen werden Inhalte
+ * erzeugt bzw. entfernt).
+ *
+ */
+
+typedef USHORT UseOnPage;
+namespace nsUseOnPage
+{
+ const UseOnPage PD_NONE = 0x0000; //for internal use only.
+ const UseOnPage PD_LEFT = 0x0001;
+ const UseOnPage PD_RIGHT = 0x0002;
+ const UseOnPage PD_ALL = 0x0003;
+ const UseOnPage PD_MIRROR = 0x0007;
+ const UseOnPage PD_HEADERSHARE = 0x0040;
+ const UseOnPage PD_FOOTERSHARE = 0x0080;
+ const UseOnPage PD_NOHEADERSHARE = 0x00BF; //for internal use only
+ const UseOnPage PD_NOFOOTERSHARE = 0x007F; //for internal use only
+}
+
+class SW_DLLPUBLIC SwPageDesc : public SwModify
+{
+ friend class SwDoc;
+ friend class SwUndoPageDescExt;
+
+ String aDescName;
+ SvxNumberType aNumType;
+ SwFrmFmt aMaster;
+ SwFrmFmt aLeft;
+ SwDepend aDepend; // wg. Registerhaltigkeit
+ SwPageDesc *pFollow;
+ USHORT nRegHeight; // Zeilenabstand und Fontascent der Vorlage
+ USHORT nRegAscent; // fuer die Registerhaltigkeit
+ UseOnPage eUse;
+ BOOL bLandscape;
+
+ //Fussnoteninformationen
+ SwPageFtnInfo aFtnInfo;
+
+ //Wird zum Spiegeln vom Chg (Doc) gerufen.
+ //Kein Abgleich an anderer Stelle.
+ SW_DLLPRIVATE void Mirror();
+
+ SW_DLLPRIVATE void ResetAllAttr( sal_Bool bLeft );
+
+ SW_DLLPRIVATE SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc );
+
+public:
+ const String &GetName() const { return aDescName; }
+ void SetName( const String& rNewName ) { aDescName = rNewName; }
+
+ BOOL GetLandscape() const { return bLandscape; }
+ void SetLandscape( BOOL bNew ) { bLandscape = bNew; }
+
+ const SvxNumberType &GetNumType() const { return aNumType; }
+ void SetNumType( const SvxNumberType& rNew ) { aNumType = rNew; }
+
+ const SwPageFtnInfo &GetFtnInfo() const { return aFtnInfo; }
+ SwPageFtnInfo &GetFtnInfo() { return aFtnInfo; }
+ void SetFtnInfo( const SwPageFtnInfo &rNew ) { aFtnInfo = rNew; }
+
+ inline BOOL IsHeaderShared() const;
+ inline BOOL IsFooterShared() const;
+ inline void ChgHeaderShare( BOOL bNew );
+ inline void ChgFooterShare( BOOL bNew );
+
+ inline void SetUseOn( UseOnPage eNew );
+ inline UseOnPage GetUseOn() const;
+
+ void WriteUseOn( UseOnPage eNew ) { eUse = eNew; }
+ UseOnPage ReadUseOn () const { return eUse; }
+
+ SwFrmFmt &GetMaster() { return aMaster; }
+ SwFrmFmt &GetLeft() { return aLeft; }
+ const SwFrmFmt &GetMaster() const { return aMaster; }
+ const SwFrmFmt &GetLeft() const { return aLeft; }
+
+ // Reset all attrs of the format but keep the ones a pagedesc
+ // cannot live without.
+ inline void ResetAllMasterAttr();
+ inline void ResetAllLeftAttr();
+
+ //Mit den folgenden Methoden besorgt sich das Layout ein Format
+ //um eine Seite erzeugen zu koennen
+ inline SwFrmFmt *GetRightFmt();
+ inline const SwFrmFmt *GetRightFmt() const;
+ inline SwFrmFmt *GetLeftFmt();
+ inline const SwFrmFmt *GetLeftFmt() const;
+
+ USHORT GetRegHeight() const { return nRegHeight; }
+ USHORT GetRegAscent() const { return nRegAscent; }
+ void SetRegHeight( USHORT nNew ){ nRegHeight = nNew; }
+ void SetRegAscent( USHORT nNew ){ nRegAscent = nNew; }
+
+ inline void SetFollow( const SwPageDesc* pNew );
+ const SwPageDesc* GetFollow() const { return pFollow; }
+ SwPageDesc* GetFollow() { return pFollow; }
+
+ void SetRegisterFmtColl( const SwTxtFmtColl* rFmt );
+ const SwTxtFmtColl* GetRegisterFmtColl() const;
+ virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
+ void RegisterChange();
+
+ // erfragen und setzen der PoolFormat-Id
+ USHORT GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
+ void SetPoolFmtId( USHORT nId ) { aMaster.SetPoolFmtId( nId ); }
+ USHORT GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
+ void SetPoolHelpId( USHORT nId ) { aMaster.SetPoolHelpId( nId ); }
+ BYTE GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
+ void SetPoolHlpFileId( BYTE nId ) { aMaster.SetPoolHlpFileId( nId ); }
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd,
+ BOOL bCheckForThisPgDc = TRUE ) const;
+ BOOL IsFollowNextPageOfNode( const SwNode& rNd ) const;
+
+ //Given a SwNode return the pagedesc in use at that location.
+ static const SwPageDesc* GetPageDescOfNode(const SwNode& rNd);
+
+ SwPageDesc& operator=( const SwPageDesc& );
+
+ SwPageDesc( const SwPageDesc& );
+ ~SwPageDesc();
+};
+
+inline void SwPageDesc::SetFollow( const SwPageDesc* pNew )
+{
+ pFollow = pNew ? (SwPageDesc*)pNew : this;
+}
+
+inline BOOL SwPageDesc::IsHeaderShared() const
+{
+ return eUse & nsUseOnPage::PD_HEADERSHARE ? TRUE : FALSE;
+}
+inline BOOL SwPageDesc::IsFooterShared() const
+{
+ return eUse & nsUseOnPage::PD_FOOTERSHARE ? TRUE : FALSE;
+}
+inline void SwPageDesc::ChgHeaderShare( BOOL bNew )
+{
+ if ( bNew )
+ eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE);
+ // (USHORT&)eUse |= (USHORT)nsUseOnPage::PD_HEADERSHARE;
+ else
+ eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE);
+ // (USHORT&)eUse &= (USHORT)nsUseOnPage::PD_NOHEADERSHARE;
+}
+inline void SwPageDesc::ChgFooterShare( BOOL bNew )
+{
+ if ( bNew )
+ eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE);
+ // (USHORT&)eUse |= (USHORT)nsUseOnPage::PD_FOOTERSHARE;
+ else
+ eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHARE);
+ // (USHORT&)eUse &= (USHORT)nsUseOnPage::PD_NOFOOTERSHARE;
+}
+inline void SwPageDesc::SetUseOn( UseOnPage eNew )
+{
+ UseOnPage eTmp = nsUseOnPage::PD_NONE;
+ if ( eUse & nsUseOnPage::PD_HEADERSHARE )
+ eTmp = nsUseOnPage::PD_HEADERSHARE;
+ // (USHORT&)eTmp |= (USHORT)nsUseOnPage::PD_HEADERSHARE;
+ if ( eUse & nsUseOnPage::PD_FOOTERSHARE )
+ eTmp = (UseOnPage) (eTmp | nsUseOnPage::PD_FOOTERSHARE);
+ // (USHORT&)eTmp |= (USHORT)nsUseOnPage::PD_FOOTERSHARE;
+ eUse = (UseOnPage) (eTmp | eNew);
+ // (USHORT&)eUse = eTmp | eNew;
+}
+inline UseOnPage SwPageDesc::GetUseOn() const
+{
+ UseOnPage eRet = eUse;
+ eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE);
+ // (USHORT&)eRet &= (USHORT)nsUseOnPage::PD_NOHEADERSHARE;
+ eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE);
+ // (USHORT&)eRet &= (USHORT)nsUseOnPage::PD_NOFOOTERSHARE;
+ return eRet;
+}
+
+inline void SwPageDesc::ResetAllMasterAttr()
+{
+ ResetAllAttr( sal_False );
+}
+
+inline void SwPageDesc::ResetAllLeftAttr()
+{
+ ResetAllAttr( sal_True );
+}
+
+inline SwFrmFmt *SwPageDesc::GetRightFmt()
+{
+ return nsUseOnPage::PD_RIGHT & eUse ? &aMaster : 0;
+}
+inline const SwFrmFmt *SwPageDesc::GetRightFmt() const
+{
+ return nsUseOnPage::PD_RIGHT & eUse ? &aMaster : 0;
+}
+inline SwFrmFmt *SwPageDesc::GetLeftFmt()
+{
+ return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0;
+}
+inline const SwFrmFmt *SwPageDesc::GetLeftFmt() const
+{
+ return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0;
+}
+
+class SwPageDescExt
+{
+ SwPageDesc aPageDesc;
+ SwDoc * pDoc;
+ String sFollow;
+
+ void SetPageDesc(const SwPageDesc & aPageDesc);
+
+public:
+ SwPageDescExt(const SwPageDesc & rPageDesc, SwDoc * pDoc);
+ SwPageDescExt(const SwPageDescExt & rSrc);
+ ~SwPageDescExt();
+
+ SwPageDescExt & operator = (const SwPageDescExt & rSrc);
+ SwPageDescExt & operator = (const SwPageDesc & rSrc);
+
+ const String & GetName() const;
+
+ operator SwPageDesc() const; // #i7983#
+};
+
+#endif //_PAGEDESC_HXX
diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx
new file mode 100644
index 000000000000..a1c8ed5e6a50
--- /dev/null
+++ b/sw/inc/pageiter.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pageiter.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _PAGEITER_HXX
+#define _PAGEITER_HXX
+
+#include <tools/solar.h>
+
+class SwDoc;
+class SwPageFrm;
+struct SwPosition;
+class SwPageDesc;
+
+class SwPageIter {
+ const SwDoc &rPDoc;
+ const SwPageFrm *pPage;
+
+public:
+ SwPageIter( const SwDoc &rDoc, const SwPosition &rStartPos );
+
+ BOOL IsEnd() const { return 0 == pPage; }
+ BOOL NextPage();
+ const SwPageDesc* GetPageDesc() const;
+ BOOL Seek( const SwPosition &rPos );
+ BOOL GetPosition( SwPosition &rPos ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
new file mode 100644
index 000000000000..589e2850b1ab
--- /dev/null
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -0,0 +1,624 @@
+#ifndef _PAGEPREVIEWLAYOUT_HXX
+#define _PAGEPREVIEWLAYOUT_HXX
+
+// template class <std::vector>
+#include <vector>
+// datatypes sal_xyz
+#include <sal/types.h>
+// classes <Point>, <Size> and <Rectangle>
+#include <tools/gen.hxx>
+// datatype <SwTwips>
+#include <swtypes.hxx>
+
+class ViewShell;
+class SwRootFrm;
+class SwPageFrm;
+class Fraction;
+struct PrevwPage;
+
+// =============================================================================
+/** page preview functionality in the writer
+
+ OD 11.12.2002 #103492# - class <SwPagePreviewLayout>
+
+ @author OD
+*/
+class SwPagePreviewLayout
+{
+private:
+ friend class ViewShell;
+
+ // number of horizontal and vertical twips for spacing between the pages.
+ const SwTwips mnXFree;
+ const SwTwips mnYFree;
+
+ // view shell the print preview is generated for.
+ ViewShell& mrParentViewShell;
+ // top layout frame of the layout for accessing the pages
+ const SwRootFrm& mrLayoutRootFrm;
+
+ // boolean indicating, if the layout information (number of columns and rows)
+ // are valid.
+ bool mbLayoutInfoValid;
+ // boolean indicating, if the the calculated print preview layout sizes
+ // ( windows size in twips, maximal page size, column width, row height,
+ // width and height of a print preview page, size of the print preview
+ // document ) are valid
+ bool mbLayoutSizesValid;
+ // boolean indicating, if the the paint information ( physical number of
+ // start page, start column and row, paint offsets, rectangle visible of
+ // the print preview document.
+ bool mbPaintInfoValid;
+
+ Size maWinSize;
+ sal_uInt16 mnCols;
+ sal_uInt16 mnRows;
+ sal_uInt16 mnPages;
+ // OD 19.02.2003 #107369# - new flag for leaving blank left-top-corner
+ // OD 2004-03-05 #i18143# - the book preview is controlled by this flag
+ bool mbBookPreview;
+ bool mbBookPreviewModeToggled;
+
+ Size maMaxPageSize;
+ Rectangle maPreviewDocRect;
+ SwTwips mnColWidth;
+ SwTwips mnRowHeight;
+ SwTwips mnPrevwLayoutWidth;
+ SwTwips mnPrevwLayoutHeight;
+ bool mbDoesLayoutColsFitIntoWindow;
+ bool mbDoesLayoutRowsFitIntoWindow;
+
+ sal_uInt16 mnPaintPhyStartPageNum;
+ sal_uInt16 mnPaintStartCol;
+ sal_uInt16 mnPaintStartRow;
+ bool mbNoPageVisible;
+ Point maPaintStartPageOffset;
+ Point maPaintPreviewDocOffset;
+ Point maAdditionalPaintOffset;
+ Rectangle maPaintedPrevwDocRect;
+ sal_uInt16 mnSelectedPageNum;
+
+ std::vector<PrevwPage*> maPrevwPages;
+
+ // OD 07.11.2003 #i22014# - internal booleans to indicate, that a new print
+ // preview layout has been created during a paint.
+ mutable bool mbInPaint;
+ mutable bool mbNewLayoutDuringPaint;
+
+ bool mbPrintEmptyPages;
+
+ /** clear internal data about current page preview
+
+ OD 11.12.2002 #103492#
+
+ @author OD
+ */
+ void _Clear();
+
+ /** helper method to clear preview page layout sizes
+
+ OD 18.12.2002 #103492#
+
+ @author OD
+ */
+ void _ClearPrevwLayoutSizes();
+
+ /** helper method to clear data in preview page vectors
+
+ OD 13.12.2002 #103492#
+
+ @author OD
+ */
+ void _ClearPrevwPageData();
+
+ /** calculate page preview layout sizes
+
+ OD 18.12.2002 #103492#
+
+ @author OD
+ */
+ void _CalcPrevwLayoutSizes();
+
+ /** apply new zoom at given view shell
+
+ OD 11.12.2002 #103492#
+
+ @author OD
+
+ @param _aNewZoom
+ input parameter - new zoom percentage
+ */
+ void _ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom );
+
+ /** calculate additional paint offset
+
+ OD 12.12.2002 #103492#
+ helper method called by <Prepare> in order to calculate an additional
+ paint offset to center output in given window size.
+ The booleans <mbDoesLayoutRowsFitIntoWindow> and <mbDoesLayoutColsFitIntoWindow>
+ are also determined.
+ preconditions:
+ (1) preview layout is given (number of rows and columns).
+ (2) window size is given.
+ (3) height of row and width of column are calculated.
+ (4) paint offset of start page is calculated.
+
+ @author OD
+ */
+ void _CalcAdditionalPaintOffset();
+
+ /** calculate painted preview document rectangle
+
+ OD 12.12.2002 #103492#
+ helper method called by <Prepare> in order to calculate the rectangle,
+ which will be painted for the document arranged by the given preview
+ layout.
+ preconditions:
+ (1) paint offset of document preview is calculated.
+ (2) size of document preview is calculated.
+ (3) additional paint offset is calculated - see <_CalcAdditionalPaintOffset>.
+
+ @author OD
+ */
+ void _CalcDocPrevwPaintRect();
+
+ /** determines preview data for a given page and a given preview offset
+
+ OD 13.12.2002 #103492#
+
+ @author OD
+
+ @param _rPage
+ input parameter - constant reference to page frame, for which the
+ preview data will be calculated.
+
+ @param _rPrevwOffset
+ input parameter - constant reference to the offset the given page has
+ in the current preview window.
+ Note: Offset can be negative.
+
+ @param _opPrevwPage
+ output parameter - calculated preview data.
+
+ @return boolean, indicating, if calculation was successful.
+ */
+ bool _CalcPreviewDataForPage( const SwPageFrm& _rPage,
+ const Point& _rPrevwOffset,
+ PrevwPage* _opPrevwPage );
+
+ /** calculate preview pages
+
+ OD 12.12.2002 #103492#
+ helper method called by <Prepare> in order to determine which pages
+ will be visible in the current preview and calculate the data needed
+ to paint these pages. Also the accessible pages with its needed data
+ are determined.
+
+ @author OD
+ */
+ void _CalcPreviewPages();
+
+ /** get preview page by physical page number
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical page number of page, for which the preview
+ page will be returned.
+
+ @return pointer to preview page of current preview pages. If page doesn't
+ belongs to current preview pages, <0> is returned.
+ */
+ const PrevwPage* _GetPrevwPageByPageNum( const sal_uInt16 _nPageNum ) const;
+
+ /** paint selection mark at page
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+ */
+ void _PaintSelectMarkAtPage( const PrevwPage* _aSelectedPrevwPage ) const;
+
+public:
+ /** constructor of <SwPagePreviewLayout>
+
+ OD 11.12.2002 #103492#
+
+ @author OD
+
+ @param _rParentViewShell
+ input parameter - reference to the view shell the page preview
+ layout belongs to. Reference will be hold as member <mrParentViewShell>.
+ Adjustments/Changes at this view shell:
+ (1) Adjustment of the mapping mode at the output device.
+ (2) Change of the zoom at the view options.
+ (3) Preparations for paint of the page preview.
+
+ @param _rLayoutRootFrm
+ input parameter - constant reference to the root frame of the layout.
+ Reference will be hold as member <mrLayoutRootFrm> in order to get
+ access to the page frames.
+ */
+ SwPagePreviewLayout( ViewShell& _rParentViewShell,
+ const SwRootFrm& _rLayoutRootFrm );
+
+ /** destructor of <SwPagePreviewLayout>
+
+ OD 17.12.2002 #103492#
+
+ @author
+ */
+ inline ~SwPagePreviewLayout()
+ {
+ _ClearPrevwPageData();
+ }
+
+ /** init page preview layout
+
+ OD 11.12.2002 #103492#
+ initialize the page preview settings for a given layout.
+ side effects:
+ (1) If parameter <_bCalcScale> is true, mapping mode with calculated
+ scaling is set at the output device and the zoom at the view options of
+ the given view shell is set with the calculated scaling.
+
+ @author OD
+
+ @param _nCols
+ input parameter - initial number of page columns in the preview.
+
+ @param _nRows
+ input parameter - initial number of page rows in the preview.
+
+ @param _rPxWinSize
+ input parameter - window size in which the preview will be displayed and
+ for which the scaling will be calculated.
+
+ @param _bCalcScale
+ input parameter - control, if method should calculate the needed
+ scaling for the proposed preview layout for the given window size
+ and sets the scaling at the output device and the view options.
+
+ @return boolean, indicating, if preview layout is successful initialized.
+ */
+ bool Init( const sal_uInt16 _nCols,
+ const sal_uInt16 _nRows,
+ const Size& _rPxWinSize,
+ const bool _bCalcScale
+ );
+
+ /** method to adjust page preview layout to document changes
+
+ OD 18.12.2002 #103492#
+
+ @author OD
+
+ @return boolean, indicating, if preview layout is successful initialized.
+ */
+ bool ReInit();
+
+ /** prepare paint of page preview
+
+ OD 12.12.2002 #103492#
+ With the valid preview layout settings - calculated and set by method
+ <Init(..)> - the paint of a specific part of the virtual preview
+ document is prepared. The corresponding part is given by either
+ a start page (parameter <_nProposedStartPageNum>) or a absolute position
+ (parameter <_aProposedStartPoint>).
+ The accessibility preview will also be updated via a corresponding
+ method call.
+ OD 21.03.2003 #108282# - delete parameter _onStartPageVirtNum
+
+ @author OD
+
+ @param _nProposedStartPageNum [0..<number of document pages>]
+ input parameter - proposed number of page, which should be painted in
+ the left-top-corner in the current output device. input parameter
+ <_bStartWithPageAtFirstCol> influences, if proposed page is actual
+ painted in the left-top-corner.
+
+ @param _nProposedStartPos [(0,0)..<PreviewDocumentSize>]
+ input parameter - proposed absolute position in the virtual preview
+ document, which should be painted in the left-top-corner in the current
+ output device.
+
+ @param _rPxWinSize
+ input parameter - pixel size of window the preview will be painted in.
+
+ @param _onStartPageNum
+ output parameter - physical number of page, which will be painted in the
+ left-top-corner in the current output device.
+
+ @param _orDocPreviewPaintRect
+ output parameter - rectangle of preview document, which will be painted.
+
+ @param _bStartWithPageAtFirstCol
+ input parameter with default value "true" - controls, if start page
+ is set to page in first column the proposed start page is located.
+
+ @return boolean, indicating, if prepare of preview paint was successful.
+ */
+ bool Prepare( const sal_uInt16 _nProposedStartPageNum,
+ const Point _aProposedStartPos,
+ const Size& _rPxWinSize,
+ sal_uInt16& _onStartPageNum,
+ Rectangle& _orDocPreviewPaintRect,
+ const bool _bStartWithPageAtFirstCol = true
+ );
+
+ /** get selected page number
+
+ OD 13.12.2002 #103492#
+
+ @author OD
+ */
+ inline sal_uInt16 SelectedPage()
+ {
+ return mnSelectedPageNum;
+ }
+
+ /** set selected page number
+
+ OD 14.01.2003 #103492#
+
+ @author OD
+ */
+ inline void SetSelectedPage( sal_uInt16 _nSelectedPageNum )
+ {
+ mnSelectedPageNum = _nSelectedPageNum;
+ }
+
+ /** paint prepared preview
+
+ OD 12.12.2002 #103492#
+
+ @author OD
+
+ @param _aOutRect
+ input parameter - Twip rectangle of window, which should be painted.
+
+ @return boolean, indicating, if paint of preview was performed
+ */
+ bool Paint( const Rectangle _aOutRect ) const;
+
+ /** repaint pages on page preview
+
+ OD 18.12.2002 #103492#
+ method to invalidate visible pages due to changes in a different
+ view shell.
+
+ @author OD
+ */
+ void Repaint( const Rectangle _aInvalidCoreRect ) const;
+
+ /** paint to mark new selected page
+
+ OD 17.12.2002 #103492#
+ Perform paint for current selected page in order to unmark it.
+ Set new selected page and perform paint to mark this page.
+
+ @author OD
+
+ @param _nNewSelectedPage
+ input parameter - physical number of page, which will be marked as selected.
+ */
+ void MarkNewSelectedPage( const sal_uInt16 _nSelectedPage );
+
+ /** calculate start position for new scale
+
+ OD 12.12.2002 #103492#
+ calculate new start position for a new scale. Calculation bases on the
+ current visible part of the document arranged in the given preview layout.
+ preconditions:
+ (1) new scaling is already set at the given output device.
+
+ @author OD
+
+ @return Point, start position for new scale
+ */
+ Point GetPreviewStartPosForNewScale( const Fraction& _aNewScale,
+ const Fraction& _aOldScale,
+ const Size& _aNewWinSize ) const;
+
+ /** determines, if page with given page number is visible in preview
+
+ OD 12.12.2002 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical number of page, for which it will be
+ determined, if it is visible.
+
+ @return boolean, indicating, if page with given page number is visible
+ in preview.
+ */
+ bool IsPageVisible( const sal_uInt16 _nPageNum ) const;
+
+ /** calculate data to bring new selected page into view.
+
+ OD 12.12.2002 #103492#
+
+ @author OD
+
+ @param _nHoriMove
+ input parameter - positive/negative number of columns the current
+ selected page have to be moved.
+
+ @param _nVertMove
+ input parameter - positive/negative number of rows the current
+ selected page have to be moved.
+
+ @param _orNewSelectedPage
+ output parameter - number of new selected page
+
+ @param _orNewStartPage
+ output parameter - number of new start page
+
+ @param _orNewStartPos
+ output parameter - new start position in document preview
+
+ @return boolean - indicating, that move was sucessful.
+ */
+ bool CalcStartValuesForSelectedPageMove( const sal_Int16 _nHoriMove,
+ const sal_Int16 _nVertMove,
+ sal_uInt16& _orNewSelectedPage,
+ sal_uInt16& _orNewStartPage,
+ Point& _orNewStartPos ) const;
+
+ /** checks, if given position is inside a shown document page
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+
+ @param _aPrevwPos
+ input parameter - position inside the visible preview window.
+
+ @param _orDocPos
+ output parameter - corresponding position in the document, if given
+ preview position is inside a shown document page, not an empty page.
+ If not, it's value is <Point( 0, 0 )>.
+
+ @param _obPosInEmptyPage
+ output parameter - indicates, that given preview position lays inside
+ an shown empty page.
+
+ @param _onPageNum
+ output parameter - corresponding physical number of page, if given
+ preview position is inside a shown document page, considers also empty
+ pages. If not, it's value is <0>.
+
+ @return boolean - indicating, that given preview position lays inside
+ a shown document preview page, not an empty page.
+ */
+ bool IsPrevwPosInDocPrevwPage( const Point _aPrevwPos,
+ Point& _orDocPos,
+ bool& _obPosInEmptyPage,
+ sal_uInt16& _onPageNum ) const;
+
+ inline bool DoesPreviewLayoutRowsFitIntoWindow() const
+ {
+ return mbDoesLayoutRowsFitIntoWindow;
+ }
+
+ inline bool DoesPreviewLayoutColsFitIntoWindow() const
+ {
+ return mbDoesLayoutColsFitIntoWindow;
+ }
+
+ inline bool PreviewLayoutValid() const
+ {
+ return mbLayoutInfoValid && mbLayoutSizesValid && mbPaintInfoValid;
+ }
+
+ /** determine preview window page scroll amount
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+
+ @param _nWinPagesToScroll
+ input parameter - number of preview window pages the scroll amount has
+ to be calculated for. Negative values for preview window page up
+ scrolling, positive values for preview window page down scrolling.
+
+ @return scroll amount in SwTwips
+ */
+ SwTwips GetWinPagesScrollAmount( const sal_Int16 _nWinPagesToScroll ) const;
+
+ /** determine row the page with the given number is in
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical page number of page, for which the row in
+ preview layout has to be calculated.
+
+ @return number of row the page with the given physical page number is in
+ */
+ sal_uInt16 GetRowOfPage( sal_uInt16 _nPageNum ) const;
+
+ /** determine column the page with the given number is in
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical page number of page, for which the column in
+ preview layout has to be calculated.
+
+ @return number of column the page with the given physical page number is in
+ */
+ sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const;
+
+ // OD 18.12.2002 #103492#
+ Size GetMaxPageSize() const;
+
+ // OD 18.12.2002 #103492#
+ Size GetPrevwDocSize() const;
+
+ /** get size of a preview page by its physical page number
+
+ OD 15.01.2003 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - pysical page number of preview page, for which the
+ page size has to be returned.
+
+ @return an object of class <Size>
+ */
+ Size GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const;
+
+ /** get virtual page number by its physical page number
+
+ OD 21.03.2003 #108282#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - pysical page number of preview page, for which the
+ virtual page number has to be determined.
+
+ @return virtual page number of page given by its physical page number,
+ if the page is in the current preview pages vector, otherwise 0.
+ */
+ sal_uInt16 GetVirtPageNumByPageNum( sal_uInt16 _nPageNum ) const;
+
+ /** enable/disable book preview
+
+ OD 2004-03-04 #i18143#
+
+ @author OD
+ */
+ bool SetBookPreviewMode( const bool _bEnableBookPreview,
+ sal_uInt16& _onStartPageNum,
+ Rectangle& _orDocPreviewPaintRect );
+
+ /** Convert relative to absolute page numbers (see PrintEmptyPages)
+
+ @author FME
+ */
+ sal_uInt16 ConvertRelativeToAbsolutePageNum( sal_uInt16 _nRelPageNum ) const;
+
+ /** Convert absolute to relative page numbers (see PrintEmptyPages)
+
+ @author FME
+ */
+ sal_uInt16 ConvertAbsoluteToRelativePageNum( sal_uInt16 _nAbsPageNum ) const;
+
+ /** get the number of preview pages
+
+ @author FME
+ */
+ sal_uInt16 GetNumberOfPreviewPages() { return sal::static_int_cast< sal_uInt16 >(maPrevwPages.size()); }
+};
+
+#endif // _PAGEPREVIEWLAYOUT_HXX
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
new file mode 100644
index 000000000000..18579f1a918b
--- /dev/null
+++ b/sw/inc/pam.hxx
@@ -0,0 +1,282 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pam.hxx,v $
+ * $Revision: 1.19.172.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _PAM_HXX
+#define _PAM_HXX
+
+#include <stddef.h> // fuer MemPool
+#include <tools/gen.hxx>
+#include <tools/mempool.hxx>
+#include <cshtyp.hxx> // fuer die Funktions-Definitionen
+#include <ring.hxx> // Superklasse
+#include <index.hxx> // fuer SwIndex
+#include <ndindex.hxx> // fuer SwNodeIndex
+#include "swdllapi.h"
+
+class SwFmt;
+class SfxPoolItem;
+class SfxItemSet;
+class SwDoc;
+class SwNode;
+class SwCntntNode;
+class SwPaM;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+namespace utl {
+ class TextSearch;
+}
+
+struct SW_DLLPUBLIC SwPosition
+{
+ SwNodeIndex nNode;
+ SwIndex nContent;
+
+ SwPosition( const SwNodeIndex &rNode, const SwIndex &rCntnt );
+ explicit SwPosition( const SwNodeIndex &rNode );
+ explicit SwPosition( const SwNode& rNode );
+ explicit SwPosition( SwCntntNode& rNode, const xub_StrLen nOffset = 0 );
+
+ SwPosition( const SwPosition & );
+ SwPosition &operator=(const SwPosition &);
+
+ // #111827#
+ /**
+ Returns the document this position is in.
+
+ @return the document this position is in.
+ */
+ SwDoc * GetDoc() const;
+
+ BOOL operator < (const SwPosition &) const;
+ BOOL operator > (const SwPosition &) const;
+ BOOL operator <=(const SwPosition &) const;
+ BOOL operator >=(const SwPosition &) const;
+ BOOL operator ==(const SwPosition &) const;
+ BOOL operator !=(const SwPosition &) const;
+};
+
+
+// das Ergebnis eines Positions Vergleiches
+enum SwComparePosition {
+ POS_BEFORE, // Pos1 liegt vor Pos2
+ POS_BEHIND, // Pos1 liegt hinter Pos2
+ POS_INSIDE, // Pos1 liegt vollstaendig in Pos2
+ POS_OUTSIDE, // Pos2 liegt vollstaendig in Pos1
+ POS_EQUAL, // Pos1 ist genauso gross wie Pos2
+ POS_OVERLAP_BEFORE, // Pos1 ueberlappt Pos2 am Anfang
+ POS_OVERLAP_BEHIND, // Pos1 ueberlappt Pos2 am Ende
+ POS_COLLIDE_START, // Pos1 Start stoesst an Pos2 Ende
+ POS_COLLIDE_END // Pos1 End stoesst an Pos2 Start
+};
+SwComparePosition ComparePosition(
+ const SwPosition& rStt1, const SwPosition& rEnd1,
+ const SwPosition& rStt2, const SwPosition& rEnd2 );
+
+SwComparePosition ComparePosition(
+ const unsigned long nStt1, const unsigned long nEnd1,
+ const unsigned long nStt2, const unsigned long nEnd2 );
+
+
+// SwPointAndMark / SwPaM
+struct SwMoveFnCollection;
+typedef SwMoveFnCollection* SwMoveFn;
+SW_DLLPUBLIC extern SwMoveFn fnMoveForward; // SwPam::Move()/Find() default argument.
+SW_DLLPUBLIC extern SwMoveFn fnMoveBackward;
+
+typedef BOOL (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
+SW_DLLPUBLIC extern SwGoInDoc fnGoDoc;
+extern SwGoInDoc fnGoSection;
+SW_DLLPUBLIC extern SwGoInDoc fnGoNode;
+SW_DLLPUBLIC extern SwGoInDoc fnGoCntnt; // SwPam::Move() default argument.
+extern SwGoInDoc fnGoCntntCells;
+extern SwGoInDoc fnGoCntntSkipHidden;
+extern SwGoInDoc fnGoCntntCellsSkipHidden;
+
+void _InitPam();
+
+class SW_DLLPUBLIC SwPaM : public Ring
+{
+ SwPosition m_Bound1;
+ SwPosition m_Bound2;
+ SwPosition * m_pPoint; // points at either m_Bound1 or m_Bound2
+ SwPosition * m_pMark; // points at either m_Bound1 or m_Bound2
+ bool m_bIsInFrontOfLabel;
+
+ SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = 0 );
+
+public:
+ SwPaM( const SwPosition& rPos, SwPaM* pRing = 0 );
+ SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = 0 );
+ SwPaM( const SwNodeIndex& rMk, const SwNodeIndex& rPt,
+ long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 );
+ SwPaM( const SwNode& rMk, const SwNode& rPt,
+ long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 );
+ SwPaM( const SwNodeIndex& rMk, xub_StrLen nMkCntnt,
+ const SwNodeIndex& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 );
+ SwPaM( const SwNode& rMk, xub_StrLen nMkCntnt,
+ const SwNode& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 );
+ SwPaM( const SwNode& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 );
+ SwPaM( const SwNodeIndex& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 );
+ virtual ~SwPaM();
+
+ // @@@ semantic: no copy ctor.
+ SwPaM( SwPaM & );
+ // @@@ semantic: no copy assignment for super class Ring.
+ SwPaM& operator=( const SwPaM & );
+
+ // Bewegen des Cursors
+ BOOL Move( SwMoveFn fnMove = fnMoveForward,
+ SwGoInDoc fnGo = fnGoCntnt );
+
+ // Suchen
+ BYTE Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ BOOL bSearchInNotes,
+ utl::TextSearch& rSTxt,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
+ BOOL Find( const SwFmt& rFmt,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
+ BOOL Find( const SfxPoolItem& rAttr, BOOL bValue = TRUE,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, BOOL bInReadOnly = FALSE );
+ BOOL Find( const SfxItemSet& rAttr, BOOL bNoColls,
+ SwMoveFn fnMove,
+ const SwPaM *pPam, BOOL bInReadOnly, BOOL bMoveFirst );
+
+ bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
+ SwMoveFn fnMove, BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
+ xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam);
+
+ inline bool IsInFrontOfLabel() const { return m_bIsInFrontOfLabel; }
+ inline void _SetInFrontOfLabel( bool bNew ) { m_bIsInFrontOfLabel = bNew; }
+
+ virtual void SetMark();
+
+ void DeleteMark()
+ {
+ if (m_pMark != m_pPoint)
+ {
+ // clear the mark position; this helps if mark's SwIndex is
+ // registered at some node, and that node is then deleted
+ *m_pMark = SwPosition( SwNodeIndex( GetNode()->GetNodes() ) );
+ m_pMark = m_pPoint;
+ }
+ }
+
+#ifdef PRODUCT
+ void Exchange()
+ {
+ if (m_pPoint != m_pMark)
+ {
+ SwPosition *pTmp = m_pPoint;
+ m_pPoint = m_pMark;
+ m_pMark = pTmp;
+ }
+ }
+#else
+ void Exchange();
+#endif
+
+ /** A PaM marks a selection if Point and Mark are distinct positions.
+ @return true iff the PaM spans a selection
+ */
+ bool HasMark() const { return m_pPoint == m_pMark ? false : true; }
+
+ const SwPosition *GetPoint() const { return m_pPoint; }
+ SwPosition *GetPoint() { return m_pPoint; }
+ const SwPosition *GetMark() const { return m_pMark; }
+ SwPosition *GetMark() { return m_pMark; }
+
+ const SwPosition *Start() const
+ { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
+ SwPosition *Start()
+ { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
+
+ const SwPosition *End() const
+ { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
+ SwPosition *End()
+ { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
+
+ /// @return current Node at Point/Mark
+ SwNode * GetNode ( bool bPoint = true ) const
+ {
+ return &( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode();
+ }
+
+ /// @return current ContentNode at Point/Mark
+ SwCntntNode* GetCntntNode( bool bPoint = true ) const
+ {
+ return GetNode(bPoint)->GetCntntNode();
+ }
+
+ /**
+ Normalizes PaM, i.e. sort point and mark.
+
+ @param bPointFirst TRUE: If the point is behind the mark then swap.
+ FALSE: If the mark is behind the point then swap.
+ */
+ SwPaM & Normalize(BOOL bPointFirst = TRUE);
+
+ /// @return the document (SwDoc) at which the PaM is registered
+ SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); }
+
+ SwPosition& GetBound( bool bOne = true )
+ { return bOne ? m_Bound1 : m_Bound2; }
+ const SwPosition& GetBound( bool bOne = true ) const
+ { return bOne ? m_Bound1 : m_Bound2; }
+
+ // erfrage die Seitennummer auf der der Cursor steht
+ USHORT GetPageNum( BOOL bAtPoint = TRUE, const Point* pLayPos = 0 );
+
+ // steht in etwas geschuetztem oder in die Selektion umspannt
+ // etwas geschuetztes.
+ BOOL HasReadonlySel( bool bFormView ) const;
+
+ BOOL ContainsPosition(const SwPosition & rPos)
+ { return *Start() <= rPos && rPos <= *End(); }
+
+ static BOOL Overlap(const SwPaM & a, const SwPaM & b);
+
+ static BOOL LessThan(const SwPaM & a, const SwPaM & b);
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
+
+ String GetTxt() const;
+};
+
+
+BOOL CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, BOOL );
+BOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
+
+
+#endif // _PAM_HXX
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
new file mode 100644
index 000000000000..3f65056e1cd5
--- /dev/null
+++ b/sw/inc/paratr.hxx
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: paratr.hxx,v $
+ * $Revision: 1.16 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _PARATR_HXX
+#define _PARATR_HXX
+#include <svtools/eitem.hxx>
+#include <svtools/stritem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <calbck.hxx>
+#include <swatrset.hxx>
+#include <format.hxx>
+#include <swtypes.hxx>
+
+class SwCharFmt;
+class IntlWrapper;
+
+/*************************************************************************
+|* class SwFmtDrop
+*************************************************************************/
+
+#define DROP_WHOLEWORD ((USHORT)0x0001)
+
+//Wenn ein SwFmtDrop Client ist, so ist dies das CharFmt welches den Font fuer
+//die DropCaps beschreibt. Ist es kein Client, so wird von der Formatierung
+//das CharFmt des Absatzes benutzt.
+//Wird das CharFmt verandert, so wird diese Aenderung ueber das Modify des
+//SwFmtDrop an die Absatze propagiert.
+class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient
+{
+ SwModify* pDefinedIn; // Modify-Object, in dem der DropCaps steht
+ // kann nur TxtFmtCollection/TxtNode sein
+ USHORT nDistance; // Abstand zum Textbeginn
+ USHORT nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
+ BYTE nLines; // Anzahl der Zeilen
+ BYTE nChars; // Anzahl der Zeichen
+ BOOL bWholeWord; // Erstes Wort als Initialen
+public:
+ TYPEINFO(); //Bereits in der Basisklasse SwClient
+
+ SwFmtDrop();
+ virtual ~SwFmtDrop();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtDrop( const SwFmtDrop & );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtDrop & operator= (const SwFmtDrop &);
+public:
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ inline BYTE GetLines() const { return nLines; }
+ inline BYTE &GetLines() { return nLines; }
+
+ inline BYTE GetChars() const { return nChars; }
+ inline BYTE &GetChars() { return nChars; }
+
+ inline BOOL GetWholeWord() const { return bWholeWord; }
+ inline BYTE &GetWholeWord() { return bWholeWord; }
+
+ inline USHORT GetDistance() const { return nDistance; }
+ inline USHORT &GetDistance() { return nDistance; }
+
+ inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
+ inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
+ void SetCharFmt( SwCharFmt *pNew );
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // erfrage und setze den Modify-Pointer
+ inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
+ inline void ChgDefinedIn( const SwModify* pNew )
+ { pDefinedIn = (SwModify*)pNew; }
+};
+
+class SwRegisterItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ inline SwRegisterItem( const BOOL bRegister = FALSE );
+
+ // @@@ public copy assignment, but no copy ctor?
+ inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline SwRegisterItem::SwRegisterItem( const BOOL bRegister ) :
+ SfxBoolItem( RES_PARATR_REGISTER, bRegister )
+{}
+
+inline SwRegisterItem& SwRegisterItem::operator=(
+ const SwRegisterItem& rRegister )
+{
+ SetValue( rRegister.GetValue() );
+ return *this;
+}
+
+class SW_DLLPUBLIC SwNumRuleItem : public SfxStringItem
+{
+public:
+ TYPEINFO();
+
+ // --> OD 2008-03-04 #refactorlists# - removed <pDefinedIn>
+ SwNumRuleItem()
+ : SfxStringItem( RES_PARATR_NUMRULE, aEmptyStr ) {}
+
+ SwNumRuleItem( const String& rRuleName )
+ : SfxStringItem( RES_PARATR_NUMRULE, rRuleName ) {}
+
+ SwNumRuleItem( const SwNumRuleItem& rCpy )
+ : SfxStringItem( RES_PARATR_NUMRULE, rCpy.GetValue() ) {}
+
+ SwNumRuleItem& operator=( const SwNumRuleItem& rCpy )
+ { SetValue( rCpy.GetValue() ); return *this; }
+ // <--
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId );
+};
+
+class SwParaConnectBorderItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ inline SwParaConnectBorderItem( const BOOL bConnect = TRUE );
+
+ // @@@ public copy assignment, but no copy ctor?
+ inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline SwParaConnectBorderItem::SwParaConnectBorderItem( const BOOL bConnect ) :
+ SfxBoolItem( RES_PARATR_CONNECT_BORDER, bConnect )
+{}
+
+inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=(
+ const SwParaConnectBorderItem& rConnect )
+{
+ SetValue( rConnect.GetValue() );
+ return *this;
+}
+
+
+
+/******************************************************************************
+ * Implementierung der Paragraph-Attribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(BOOL bInP) const
+ { return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); }
+inline const SvxAdjustItem &SwAttrSet::GetAdjust(BOOL bInP) const
+ { return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); }
+inline const SvxFmtSplitItem &SwAttrSet::GetSplit(BOOL bInP) const
+ { return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); }
+inline const SwRegisterItem &SwAttrSet::GetRegister(BOOL bInP) const
+ { return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); }
+inline const SvxWidowsItem &SwAttrSet::GetWidows(BOOL bInP) const
+ { return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); }
+inline const SvxOrphansItem &SwAttrSet::GetOrphans(BOOL bInP) const
+ { return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); }
+inline const SvxTabStopItem &SwAttrSet::GetTabStops(BOOL bInP) const
+ { return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); }
+inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(BOOL bInP) const
+ { return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); }
+inline const SwFmtDrop &SwAttrSet::GetDrop(BOOL bInP) const
+ { return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); }
+inline const SwNumRuleItem &SwAttrSet::GetNumRule(BOOL bInP) const
+ { return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); }
+inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(BOOL bInP) const
+ { return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); }
+inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(BOOL bInP) const
+ { return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); }
+inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(BOOL bInP) const
+ { return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
+inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(BOOL bInP) const
+ { return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); }
+inline const SvxParaGridItem &SwAttrSet::GetParaGrid(BOOL bInP) const
+ { return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); }
+inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(BOOL bInP) const
+ { return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
+
+/******************************************************************************
+ * Implementierung der Paragraph-Attribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(BOOL bInP) const
+ { return aSet.GetLineSpacing(bInP); }
+inline const SvxAdjustItem &SwFmt::GetAdjust(BOOL bInP) const
+ { return aSet.GetAdjust(bInP); }
+inline const SvxFmtSplitItem &SwFmt::GetSplit(BOOL bInP) const
+ { return aSet.GetSplit(bInP); }
+inline const SwRegisterItem &SwFmt::GetRegister(BOOL bInP) const
+ { return aSet.GetRegister(bInP); }
+inline const SvxWidowsItem &SwFmt::GetWidows(BOOL bInP) const
+ { return aSet.GetWidows(bInP); }
+inline const SvxOrphansItem &SwFmt::GetOrphans(BOOL bInP) const
+ { return aSet.GetOrphans(bInP); }
+inline const SvxTabStopItem &SwFmt::GetTabStops(BOOL bInP) const
+ { return aSet.GetTabStops(bInP); }
+inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(BOOL bInP) const
+ { return aSet.GetHyphenZone(bInP); }
+inline const SwFmtDrop &SwFmt::GetDrop(BOOL bInP) const
+ { return aSet.GetDrop(bInP); }
+inline const SwNumRuleItem &SwFmt::GetNumRule(BOOL bInP) const
+ { return aSet.GetNumRule(bInP); }
+inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(BOOL bInP) const
+ { return aSet.GetScriptSpace(bInP) ; }
+inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(BOOL bInP) const
+ { return aSet.GetHangingPunctuation(bInP) ; }
+inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(BOOL bInP) const
+ { return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
+inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(BOOL bInP) const
+ { return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); }
+inline const SvxParaGridItem &SwFmt::GetParaGrid(BOOL bInP) const
+ { return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); }
+inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(BOOL bInP) const
+ { return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); }
+
+#endif
diff --git a/sw/inc/pausethreadstarting.hxx b/sw/inc/pausethreadstarting.hxx
new file mode 100644
index 000000000000..a48717b0bd3b
--- /dev/null
+++ b/sw/inc/pausethreadstarting.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pausethreadstarting.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _PAUSETHREADSTARTING_HXX
+#define _PAUSETHREADSTARTING_HXX
+
+/** Helper class to pause starting of threads during existence of an instance
+ of this class
+
+ OD 2007-03-16 #i73788#
+
+ @author OD
+*/
+class SwPauseThreadStarting
+{
+ public:
+
+ SwPauseThreadStarting();
+ ~SwPauseThreadStarting();
+
+ private:
+
+ bool mbPausedThreadStarting;
+};
+#endif
diff --git a/sw/inc/pch/precompiled_sw.cxx b/sw/inc/pch/precompiled_sw.cxx
new file mode 100644
index 000000000000..458d9e2a21c6
--- /dev/null
+++ b/sw/inc/pch/precompiled_sw.cxx
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: precompiled_sw.cxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sw.hxx"
+
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
new file mode 100644
index 000000000000..0a43d2c73d96
--- /dev/null
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -0,0 +1,1010 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: precompiled_sw.hxx,v $
+ * $Revision: 1.5.222.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): Generated on 2006-09-01 17:50:13.279643
+
+#ifdef PRECOMPILED_HEADERS
+
+//---MARKER---
+#include "sal/config.h"
+#include "sal/types.h"
+
+#include "avmedia/mediaitem.hxx"
+#include "avmedia/mediaplayer.hxx"
+#include "avmedia/mediatoolbox.hxx"
+#include "avmedia/mediawindow.hxx"
+
+#include "basegfx/numeric/ftools.hxx"
+
+#include "basic/basmgr.hxx"
+#include "basic/sbmeth.hxx"
+#include "basic/sbmod.hxx"
+#include "basic/sbstar.hxx"
+#include "basic/sbx.hxx"
+#include "basic/sbxobj.hxx"
+#include "basic/sbxvar.hxx"
+
+#include "boost/shared_ptr.hpp"
+
+#include "com/sun/star/accessibility/AccessibleEventId.hpp"
+#include "com/sun/star/accessibility/AccessibleRelation.hpp"
+#include "com/sun/star/accessibility/AccessibleRelationType.hpp"
+#include "com/sun/star/accessibility/AccessibleRole.hpp"
+#include "com/sun/star/accessibility/AccessibleStateType.hpp"
+#include "com/sun/star/accessibility/AccessibleTableModelChange.hpp"
+#include "com/sun/star/accessibility/AccessibleTableModelChangeType.hpp"
+#include "com/sun/star/accessibility/AccessibleTextType.hpp"
+#include "com/sun/star/accessibility/XAccessible.hpp"
+#include "com/sun/star/accessibility/XAccessibleEditableText.hpp"
+#include "com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp"
+#include "com/sun/star/accessibility/XAccessibleHyperlink.hpp"
+#include "com/sun/star/accessibility/XAccessibleHypertext.hpp"
+#include "com/sun/star/accessibility/XAccessibleImage.hpp"
+#include "com/sun/star/accessibility/XAccessibleRelationSet.hpp"
+#include "com/sun/star/accessibility/XAccessibleSelection.hpp"
+#include "com/sun/star/accessibility/XAccessibleStateSet.hpp"
+#include "com/sun/star/accessibility/XAccessibleTable.hpp"
+#include "com/sun/star/accessibility/XAccessibleTextAttributes.hpp"
+#include "com/sun/star/accessibility/XAccessibleValue.hpp"
+#include "com/sun/star/awt/MessageBoxCommand.hpp"
+#include "com/sun/star/awt/PosSize.hpp"
+#include "com/sun/star/awt/ScrollBarOrientation.hpp"
+#include "com/sun/star/awt/Size.hpp"
+#include "com/sun/star/awt/Style.hpp"
+#include "com/sun/star/awt/TextAlign.hpp"
+#include "com/sun/star/awt/VclWindowPeerAttribute.hpp"
+#include "com/sun/star/awt/XBitmap.hpp"
+#include "com/sun/star/awt/XButton.hpp"
+#include "com/sun/star/awt/XCheckBox.hpp"
+#include "com/sun/star/awt/XComboBox.hpp"
+#include "com/sun/star/awt/XControlModel.hpp"
+#include "com/sun/star/awt/XCurrencyField.hpp"
+#include "com/sun/star/awt/XDateField.hpp"
+#include "com/sun/star/awt/XDialog.hpp"
+#include "com/sun/star/awt/XFileDialog.hpp"
+#include "com/sun/star/awt/XFixedText.hpp"
+#include "com/sun/star/awt/XImageButton.hpp"
+#include "com/sun/star/awt/XLayoutConstrains.hpp"
+#include "com/sun/star/awt/XListBox.hpp"
+#include "com/sun/star/awt/XMessageBox.hpp"
+#include "com/sun/star/awt/XNumericField.hpp"
+#include "com/sun/star/awt/XPatternField.hpp"
+#include "com/sun/star/awt/XRadioButton.hpp"
+#include "com/sun/star/awt/XScrollBar.hpp"
+#include "com/sun/star/awt/XSpinField.hpp"
+#include "com/sun/star/awt/XTabControllerModel.hpp"
+#include "com/sun/star/awt/XTextArea.hpp"
+#include "com/sun/star/awt/XTextComponent.hpp"
+#include "com/sun/star/awt/XTextEditField.hpp"
+#include "com/sun/star/awt/XTextLayoutConstrains.hpp"
+#include "com/sun/star/awt/XTimeField.hpp"
+#include "com/sun/star/awt/XVclContainer.hpp"
+#include "com/sun/star/awt/XVclContainerPeer.hpp"
+#include "com/sun/star/beans/NamedValue.hpp"
+#include "com/sun/star/beans/PropertyAttribute.hpp"
+#include "com/sun/star/beans/PropertyChangeEvent.hpp"
+#include "com/sun/star/beans/PropertyState.hpp"
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XFastPropertySet.hpp"
+#include "com/sun/star/beans/XMultiPropertySet.hpp"
+#include "com/sun/star/beans/XMultiPropertyStates.hpp"
+#include "com/sun/star/beans/XPropertyAccess.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertyContainer.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XPropertyState.hpp"
+#include "com/sun/star/beans/XPropertyStateChangeListener.hpp"
+#include "com/sun/star/chart/XChartData.hpp"
+#include "com/sun/star/chart/XChartDataArray.hpp"
+#include "com/sun/star/container/XChild.hpp"
+#include "com/sun/star/container/XContainer.hpp"
+#include "com/sun/star/container/XContainerListener.hpp"
+#include "com/sun/star/container/XContentEnumerationAccess.hpp"
+#include "com/sun/star/container/XElementAccess.hpp"
+#include "com/sun/star/container/XEnumeration.hpp"
+#include "com/sun/star/container/XEnumerationAccess.hpp"
+#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/container/XIndexContainer.hpp"
+#include "com/sun/star/container/XIndexReplace.hpp"
+#include "com/sun/star/container/XNameAccess.hpp"
+#include "com/sun/star/container/XNameContainer.hpp"
+#include "com/sun/star/container/XNamed.hpp"
+#include "com/sun/star/container/XSet.hpp"
+#include "com/sun/star/datatransfer/XTransferable.hpp"
+#include "com/sun/star/datatransfer/XTransferableSupplier.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboardListener.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp"
+#include "com/sun/star/document/PrinterIndependentLayout.hpp"
+#include "com/sun/star/document/RedlineDisplayType.hpp"
+#include "com/sun/star/document/UpdateDocMode.hpp"
+#include "com/sun/star/document/XDocumentInfoSupplier.hpp"
+#include "com/sun/star/document/XDocumentInsertable.hpp"
+#include "com/sun/star/document/XEmbeddedObjectSupplier.hpp"
+#include "com/sun/star/document/XEmbeddedObjectSupplier2.hpp"
+#include "com/sun/star/document/XEventBroadcaster.hpp"
+#include "com/sun/star/document/XEventsSupplier.hpp"
+#include "com/sun/star/document/XExporter.hpp"
+#include "com/sun/star/document/XExtendedFilterDetection.hpp"
+#include "com/sun/star/document/XFilter.hpp"
+#include "com/sun/star/document/XImporter.hpp"
+#include "com/sun/star/document/XLinkTargetSupplier.hpp"
+#include "com/sun/star/document/XRedlinesSupplier.hpp"
+#include "com/sun/star/drawing/ColorMode.hpp"
+#include "com/sun/star/drawing/HomogenMatrix3.hpp"
+#include "com/sun/star/drawing/PointSequence.hpp"
+#include "com/sun/star/drawing/PointSequenceSequence.hpp"
+#include "com/sun/star/drawing/XConnectableShape.hpp"
+#include "com/sun/star/drawing/XConnectorShape.hpp"
+#include "com/sun/star/drawing/XControlShape.hpp"
+#include "com/sun/star/drawing/XDrawPage.hpp"
+#include "com/sun/star/drawing/XDrawPageSupplier.hpp"
+#include "com/sun/star/drawing/XShape.hpp"
+#include "com/sun/star/drawing/XShapeAligner.hpp"
+#include "com/sun/star/drawing/XShapeArranger.hpp"
+#include "com/sun/star/drawing/XShapeGroup.hpp"
+#include "com/sun/star/drawing/XShapeMirror.hpp"
+#include "com/sun/star/drawing/XShapes.hpp"
+#include "com/sun/star/drawing/XUniversalShapeDescriptor.hpp"
+#include "com/sun/star/embed/Aspects.hpp"
+#include "com/sun/star/embed/ElementModes.hpp"
+#include "com/sun/star/embed/EmbedMisc.hpp"
+#include "com/sun/star/embed/EmbedStates.hpp"
+#include "com/sun/star/embed/NoVisualAreaSizeException.hpp"
+#include "com/sun/star/embed/XClassifiedObject.hpp"
+#include "com/sun/star/embed/XComponentSupplier.hpp"
+#include "com/sun/star/embed/XEmbedObjectClipboardCreator.hpp"
+#include "com/sun/star/embed/XEmbedObjectCreator.hpp"
+#include "com/sun/star/embed/XEmbedPersist.hpp"
+#include "com/sun/star/embed/XEmbeddedObject.hpp"
+#include "com/sun/star/embed/XLinkCreator.hpp"
+#include "com/sun/star/embed/XLinkageSupport.hpp"
+#include "com/sun/star/embed/XStorage.hpp"
+#include "com/sun/star/embed/XTransactedObject.hpp"
+#include "com/sun/star/embed/XVisualObject.hpp"
+#include "com/sun/star/form/FormButtonType.hpp"
+#include "com/sun/star/form/FormComponentType.hpp"
+#include "com/sun/star/form/FormSubmitEncoding.hpp"
+#include "com/sun/star/form/FormSubmitMethod.hpp"
+#include "com/sun/star/form/ListSourceType.hpp"
+#include "com/sun/star/form/XForm.hpp"
+#include "com/sun/star/form/XFormComponent.hpp"
+#include "com/sun/star/form/XFormsSupplier.hpp"
+#include "com/sun/star/form/XImageProducerSupplier.hpp"
+#include "com/sun/star/frame/DispatchDescriptor.hpp"
+#include "com/sun/star/frame/DispatchResultState.hpp"
+#include "com/sun/star/frame/FrameSearchFlag.hpp"
+#include "com/sun/star/frame/XComponentLoader.hpp"
+#include "com/sun/star/frame/XController.hpp"
+#include "com/sun/star/frame/XDesktop.hpp"
+#include "com/sun/star/frame/XDispatch.hpp"
+#include "com/sun/star/frame/XDispatchHelper.hpp"
+#include "com/sun/star/frame/XDispatchProvider.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterception.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterceptor.hpp"
+#include "com/sun/star/frame/XFrame.hpp"
+#include "com/sun/star/frame/XLayoutManager.hpp"
+#include "com/sun/star/frame/XModel.hpp"
+#include "com/sun/star/frame/XNotifyingDispatch.hpp"
+#include "com/sun/star/frame/XStorable.hpp"
+#include "com/sun/star/frame/XTerminateListener.hpp"
+#include "com/sun/star/i18n/Boundary.hpp"
+#include "com/sun/star/i18n/BreakType.hpp"
+#include "com/sun/star/i18n/CharacterIteratorMode.hpp"
+#include "com/sun/star/i18n/CollatorOptions.hpp"
+#include "com/sun/star/i18n/ForbiddenCharacters.hpp"
+#include "com/sun/star/i18n/InputSequenceCheckMode.hpp"
+#include "com/sun/star/i18n/ScriptType.hpp"
+#include "com/sun/star/i18n/TextConversionOption.hpp"
+#include "com/sun/star/i18n/TransliterationModules.hpp"
+#include "com/sun/star/i18n/WordType.hpp"
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp"
+#include "com/sun/star/i18n/XExtendedInputSequenceChecker.hpp"
+#include "com/sun/star/i18n/XForbiddenCharacters.hpp"
+#include "com/sun/star/io/XActiveDataControl.hpp"
+#include "com/sun/star/io/XActiveDataSource.hpp"
+#include "com/sun/star/io/XInputStream.hpp"
+#include "com/sun/star/io/XOutputStream.hpp"
+#include "com/sun/star/io/XSeekable.hpp"
+#include "com/sun/star/lang/DisposedException.hpp"
+#include "com/sun/star/lang/EventObject.hpp"
+#include "com/sun/star/lang/Locale.hpp"
+#include "com/sun/star/lang/ServiceNotRegisteredException.hpp"
+#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
+#include "com/sun/star/lang/XComponent.hpp"
+#include "com/sun/star/lang/XEventListener.hpp"
+#include "com/sun/star/lang/XInitialization.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/XSingleServiceFactory.hpp"
+#include "com/sun/star/lang/XUnoTunnel.hpp"
+#include "com/sun/star/linguistic2/DictionaryListEventFlags.hpp"
+#include "com/sun/star/linguistic2/LinguServiceEventFlags.hpp"
+#include "com/sun/star/linguistic2/XDictionary.hpp"
+#include "com/sun/star/linguistic2/XDictionaryList.hpp"
+#include "com/sun/star/linguistic2/XDictionaryListEventListener.hpp"
+#include "com/sun/star/linguistic2/XHyphenatedWord.hpp"
+#include "com/sun/star/linguistic2/XHyphenator.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceEventListener.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceManager.hpp"
+#include "com/sun/star/linguistic2/XSpellAlternatives.hpp"
+#include "com/sun/star/linguistic2/XSpellChecker1.hpp"
+#include "com/sun/star/linguistic2/XThesaurus.hpp"
+#include "com/sun/star/mail/MailAttachment.hpp"
+#include "com/sun/star/mail/MailServiceType.hpp"
+#include "com/sun/star/mail/XAuthenticator.hpp"
+#include "com/sun/star/mail/XConnectionListener.hpp"
+#include "com/sun/star/mail/XMailMessage.hpp"
+#include "com/sun/star/mail/XMailService.hpp"
+#include "com/sun/star/mail/XSmtpService.hpp"
+#include "com/sun/star/packages/WrongPasswordException.hpp"
+#include "com/sun/star/packages/zip/ZipIOException.hpp"
+#include "com/sun/star/scanner/ScannerContext.hpp"
+#include "com/sun/star/scanner/XScannerManager.hpp"
+#include "com/sun/star/script/XEventAttacher.hpp"
+#include "com/sun/star/script/XEventAttacherManager.hpp"
+#include "com/sun/star/script/XLibraryContainer.hpp"
+#include "com/sun/star/sdb/CommandType.hpp"
+#include "com/sun/star/sdb/SQLContext.hpp"
+#include "com/sun/star/sdb/XColumn.hpp"
+#include "com/sun/star/sdb/XCompletedConnection.hpp"
+#include "com/sun/star/sdb/XCompletedExecution.hpp"
+#include "com/sun/star/sdb/XDatabaseAccess.hpp"
+#include "com/sun/star/sdb/XDocumentDataSource.hpp"
+#include "com/sun/star/sdb/XQueriesSupplier.hpp"
+#include "com/sun/star/sdb/XResultSetAccess.hpp"
+#include "com/sun/star/sdb/XSingleSelectQueryComposer.hpp"
+#include "com/sun/star/sdbc/DataType.hpp"
+#include "com/sun/star/sdbc/ResultSetType.hpp"
+#include "com/sun/star/sdbc/XCloseable.hpp"
+#include "com/sun/star/sdbc/XConnection.hpp"
+#include "com/sun/star/sdbc/XDataSource.hpp"
+#include "com/sun/star/sdbc/XResultSet.hpp"
+#include "com/sun/star/sdbc/XRow.hpp"
+#include "com/sun/star/sdbc/XRowSet.hpp"
+#include "com/sun/star/sdbcx/XColumnsSupplier.hpp"
+#include "com/sun/star/sdbcx/XRowLocate.hpp"
+#include "com/sun/star/sdbcx/XTablesSupplier.hpp"
+#include "com/sun/star/sheet/XCellRangeData.hpp"
+#include "com/sun/star/style/BreakType.hpp"
+#include "com/sun/star/style/DropCapFormat.hpp"
+#include "com/sun/star/style/GraphicLocation.hpp"
+#include "com/sun/star/style/LineNumberPosition.hpp"
+#include "com/sun/star/style/LineSpacing.hpp"
+#include "com/sun/star/style/LineSpacingMode.hpp"
+#include "com/sun/star/style/NumberingType.hpp"
+#include "com/sun/star/style/PageStyleLayout.hpp"
+#include "com/sun/star/style/ParagraphAdjust.hpp"
+#include "com/sun/star/style/ParagraphStyleCategory.hpp"
+#include "com/sun/star/style/VerticalAlignment.hpp"
+#include "com/sun/star/style/XStyle.hpp"
+#include "com/sun/star/style/XStyleFamiliesSupplier.hpp"
+#include "com/sun/star/style/XStyleLoader.hpp"
+#include "com/sun/star/table/CellContentType.hpp"
+#include "com/sun/star/table/TableSortField.hpp"
+#include "com/sun/star/table/XAutoFormattable.hpp"
+#include "com/sun/star/table/XCellRange.hpp"
+#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XJob.hpp"
+#include "com/sun/star/task/XStatusIndicatorFactory.hpp"
+#include "com/sun/star/text/BibliographyDataField.hpp"
+#include "com/sun/star/text/ChapterFormat.hpp"
+#include "com/sun/star/text/ControlCharacter.hpp"
+#include "com/sun/star/text/DocumentStatistic.hpp"
+#include "com/sun/star/text/FilenameDisplayFormat.hpp"
+#include "com/sun/star/text/FootnoteNumbering.hpp"
+#include "com/sun/star/text/GraphicCrop.hpp"
+#include "com/sun/star/text/HoriOrientation.hpp"
+#include "com/sun/star/text/HoriOrientationFormat.hpp"
+#include "com/sun/star/text/HorizontalAdjust.hpp"
+#include "com/sun/star/text/InvalidTextContentException.hpp"
+#include "com/sun/star/text/MailMergeEvent.hpp"
+#include "com/sun/star/text/MailMergeType.hpp"
+#include "com/sun/star/text/NotePrintMode.hpp"
+#include "com/sun/star/text/PageNumberType.hpp"
+#include "com/sun/star/text/PlaceholderType.hpp"
+#include "com/sun/star/text/PositionLayoutDir.hpp"
+#include "com/sun/star/text/ReferenceFieldPart.hpp"
+#include "com/sun/star/text/ReferenceFieldSource.hpp"
+#include "com/sun/star/text/RelOrientation.hpp"
+#include "com/sun/star/text/RubyAdjust.hpp"
+#include "com/sun/star/text/SectionFileLink.hpp"
+#include "com/sun/star/text/SetVariableType.hpp"
+#include "com/sun/star/text/SizeType.hpp"
+#include "com/sun/star/text/TableColumnSeparator.hpp"
+#include "com/sun/star/text/TemplateDisplayFormat.hpp"
+#include "com/sun/star/text/TextContentAnchorType.hpp"
+#include "com/sun/star/text/TextGridMode.hpp"
+#include "com/sun/star/text/UserDataPart.hpp"
+#include "com/sun/star/text/UserFieldFormat.hpp"
+#include "com/sun/star/text/VertOrientation.hpp"
+#include "com/sun/star/text/VertOrientationFormat.hpp"
+#include "com/sun/star/text/WrapInfluenceOnPosition.hpp"
+#include "com/sun/star/text/WrapTextMode.hpp"
+#include "com/sun/star/text/XAutoTextContainer.hpp"
+#include "com/sun/star/text/XAutoTextEntry.hpp"
+#include "com/sun/star/text/XAutoTextGroup.hpp"
+#include "com/sun/star/text/XBookmarksSupplier.hpp"
+#include "com/sun/star/text/XChapterNumberingSupplier.hpp"
+#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
+#include "com/sun/star/text/XDependentTextField.hpp"
+#include "com/sun/star/text/XDocumentIndex.hpp"
+#include "com/sun/star/text/XDocumentIndexMark.hpp"
+#include "com/sun/star/text/XDocumentIndexesSupplier.hpp"
+#include "com/sun/star/text/XEndnotesSettingsSupplier.hpp"
+#include "com/sun/star/text/XEndnotesSupplier.hpp"
+#include "com/sun/star/text/XFootnote.hpp"
+#include "com/sun/star/text/XFootnotesSettingsSupplier.hpp"
+#include "com/sun/star/text/XFootnotesSupplier.hpp"
+#include "com/sun/star/text/XLineNumberingProperties.hpp"
+#include "com/sun/star/text/XMailMergeBroadcaster.hpp"
+#include "com/sun/star/text/XMailMergeListener.hpp"
+#include "com/sun/star/text/XModule.hpp"
+#include "com/sun/star/text/XNumberingTypeInfo.hpp"
+#include "com/sun/star/text/XPageCursor.hpp"
+#include "com/sun/star/text/XPagePrintable.hpp"
+#include "com/sun/star/text/XParagraphCursor.hpp"
+#include "com/sun/star/text/XReferenceMarksSupplier.hpp"
+#include "com/sun/star/text/XRelativeTextContentInsert.hpp"
+#include "com/sun/star/text/XRelativeTextContentRemove.hpp"
+#include "com/sun/star/text/XRubySelection.hpp"
+#include "com/sun/star/text/XSentenceCursor.hpp"
+#include "com/sun/star/text/XText.hpp"
+#include "com/sun/star/text/XTextColumns.hpp"
+#include "com/sun/star/text/XTextContent.hpp"
+#include "com/sun/star/text/XTextCursor.hpp"
+#include "com/sun/star/text/XTextDocument.hpp"
+#include "com/sun/star/text/XTextEmbeddedObject.hpp"
+#include "com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp"
+#include "com/sun/star/text/XTextField.hpp"
+#include "com/sun/star/text/XTextFieldsSupplier.hpp"
+#include "com/sun/star/text/XTextFrame.hpp"
+#include "com/sun/star/text/XTextFramesSupplier.hpp"
+#include "com/sun/star/text/XTextGraphicObjectsSupplier.hpp"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/text/XTextRangeCompare.hpp"
+#include "com/sun/star/text/XTextSection.hpp"
+#include "com/sun/star/text/XTextSectionsSupplier.hpp"
+#include "com/sun/star/text/XTextTable.hpp"
+#include "com/sun/star/text/XTextTableCursor.hpp"
+#include "com/sun/star/text/XTextTablesSupplier.hpp"
+#include "com/sun/star/text/XTextViewCursor.hpp"
+#include "com/sun/star/text/XTextViewCursorSupplier.hpp"
+#include "com/sun/star/text/XWordCursor.hpp"
+#include "com/sun/star/ucb/CommandAbortedException.hpp"
+#include "com/sun/star/ucb/InteractiveAppException.hpp"
+#include "com/sun/star/ucb/TransferInfo.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+#include "com/sun/star/ucb/XContent.hpp"
+#include "com/sun/star/ucb/XContentIdentifier.hpp"
+#include "com/sun/star/ucb/XContentProvider.hpp"
+#include "com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
+#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/ListboxControlActions.hpp"
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include "com/sun/star/ui/dialogs/XExecutableDialog.hpp"
+#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp"
+#include "com/sun/star/ui/dialogs/XFilterManager.hpp"
+#include "com/sun/star/ui/dialogs/XFolderPicker.hpp"
+#include "com/sun/star/uno/Any.h"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.h"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "com/sun/star/uno/XNamingService.hpp"
+#include "com/sun/star/uri/XUriReferenceFactory.hpp"
+#include "com/sun/star/uri/XVndSunStarScriptUrl.hpp"
+#include "com/sun/star/util/CloseVetoException.hpp"
+#include "com/sun/star/util/Date.hpp"
+#include "com/sun/star/util/DateTime.hpp"
+#include "com/sun/star/util/DateTimeRange.hpp"
+#include "com/sun/star/util/SearchFlags.hpp"
+#include "com/sun/star/util/SearchOptions.hpp"
+#include "com/sun/star/util/Time.hpp"
+#include "com/sun/star/util/XArchiver.hpp"
+#include "com/sun/star/util/XCloseable.hpp"
+#include "com/sun/star/util/XLinkUpdate.hpp"
+#include "com/sun/star/util/XModifiable.hpp"
+#include "com/sun/star/util/XModifyBroadcaster.hpp"
+#include "com/sun/star/util/XModifyListener.hpp"
+#include "com/sun/star/util/XNumberFormatTypes.hpp"
+#include "com/sun/star/util/XNumberFormatsSupplier.hpp"
+#include "com/sun/star/util/XPropertyReplace.hpp"
+#include "com/sun/star/util/XRefreshListener.hpp"
+#include "com/sun/star/util/XRefreshable.hpp"
+#include "com/sun/star/util/XReplaceDescriptor.hpp"
+#include "com/sun/star/util/XReplaceable.hpp"
+#include "com/sun/star/util/XSortable.hpp"
+#include "com/sun/star/util/XURLTransformer.hpp"
+#include "com/sun/star/util/XUpdatable.hpp"
+#include "com/sun/star/view/DocumentZoomType.hpp"
+#include "com/sun/star/view/XLineCursor.hpp"
+#include "com/sun/star/view/XPrintSettingsSupplier.hpp"
+#include "com/sun/star/view/XRenderable.hpp"
+#include "com/sun/star/view/XScreenCursor.hpp"
+#include "com/sun/star/view/XSelectionChangeListener.hpp"
+#include "com/sun/star/view/XSelectionSupplier.hpp"
+#include "com/sun/star/view/XViewCursor.hpp"
+#include "com/sun/star/view/XViewSettingsSupplier.hpp"
+#include "com/sun/star/xforms/XFormsSupplier.hpp"
+#include "com/sun/star/xforms/XFormsUIHelper1.hpp"
+#include "com/sun/star/xforms/XModel.hpp"
+#include "com/sun/star/xml/sax/InputSource.hpp"
+#include "com/sun/star/xml/sax/XAttributeList.hpp"
+#include "com/sun/star/xml/sax/XDocumentHandler.hpp"
+#include "com/sun/star/xml/sax/XParser.hpp"
+
+#include "comphelper/ChainablePropertySet.hxx"
+#include "comphelper/ChainablePropertySetInfo.hxx"
+#include "comphelper/MasterPropertySet.hxx"
+#include "comphelper/MasterPropertySetInfo.hxx"
+#include "comphelper/SettingsHelper.hxx"
+#include "comphelper/TypeGeneration.hxx"
+#include "comphelper/accessibleeventnotifier.hxx"
+#include "comphelper/accessiblekeybindinghelper.hxx"
+#include "comphelper/classids.hxx"
+#include "comphelper/embeddedobjectcontainer.hxx"
+#include "comphelper/mediadescriptor.hxx"
+#include "comphelper/processfactory.hxx"
+#include "comphelper/seqstream.hxx"
+#include "comphelper/storagehelper.hxx"
+#include "comphelper/types.hxx"
+#include "comphelper/uno3.hxx"
+
+
+#include "cppuhelper/bootstrap.hxx"
+#include "cppuhelper/compbase1.hxx"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase10.hxx"
+#include "cppuhelper/implbase11.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implbase3.hxx"
+#include "cppuhelper/implbase4.hxx"
+#include "cppuhelper/implbase5.hxx"
+#include "cppuhelper/implbase6.hxx"
+#include "cppuhelper/implbase7.hxx"
+#include "cppuhelper/implbase8.hxx"
+#include "cppuhelper/implbase9.hxx"
+#include "cppuhelper/implbase_ex.hxx"
+#include "cppuhelper/implbase_ex_post.hxx"
+#include "cppuhelper/implbase_ex_pre.hxx"
+#include "cppuhelper/interfacecontainer.hxx"
+#include "cppuhelper/weak.hxx"
+#include "cppuhelper/weakref.hxx"
+
+#include "cppunit/simpleheader.hxx"
+
+#include "framework/interaction.hxx"
+
+#include "goodies/grfmgr.hxx"
+#include "goodies/mailenum.hxx"
+
+#include "i18npool/lang.h"
+#include "i18npool/mslangid.hxx"
+
+#include "linguistic/lngprops.hxx"
+
+#include "osl/conditn.hxx"
+#include "osl/diagnose.h"
+#include "osl/endian.h"
+#include "osl/file.hxx"
+#include "osl/interlck.h"
+#include "osl/module.h"
+#include "osl/module.hxx"
+#include "osl/mutex.hxx"
+#include "osl/thread.hxx"
+
+#include "rsc/rscsfx.hxx"
+
+#include "rtl/logfile.hxx"
+#include "rtl/math.hxx"
+#include "rtl/memory.h"
+#include "rtl/string.h"
+#include "rtl/string.hxx"
+#include "rtl/tencinfo.h"
+#include "rtl/textenc.h"
+#include "rtl/ustrbuf.hxx"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "rtl/uuid.h"
+
+#include "salhelper/condition.hxx"
+
+#include "sfx2/app.hxx"
+#include "sfx2/appuno.hxx"
+#include "sfx2/basedlgs.hxx"
+#include "sfx2/bindings.hxx"
+#include "sfx2/childwin.hxx"
+#include "sfx2/ctrlitem.hxx"
+#include "sfx2/dinfdlg.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfx2/docfilt.hxx"
+#include "sfx2/docinf.hxx"
+#include "sfx2/dockwin.hxx"
+#include "sfx2/doctempl.hxx"
+#include "sfx2/event.hxx"
+#include "sfx2/fcontnr.hxx"
+#include "sfx2/filedlghelper.hxx"
+#include "sfx2/frame.hxx"
+#include "sfx2/frmdescr.hxx"
+#include "sfx2/imagemgr.hxx"
+#include "sfx2/imgmgr.hxx"
+#include "sfx2/linkmgr.hxx"
+#include "sfx2/linksrc.hxx"
+#include "sfx2/lnkbase.hxx"
+#include "sfx2/mieclip.hxx"
+#include "sfx2/mnumgr.hxx"
+#include "sfx2/module.hxx"
+#include "sfx2/msg.hxx"
+#include "sfx2/msgpool.hxx"
+#include "sfx2/new.hxx"
+#include "sfx2/newstyle.hxx"
+#include "sfx2/objface.hxx"
+#include "sfx2/objitem.hxx"
+#include "sfx2/passwd.hxx"
+#include "sfx2/printer.hxx"
+#include "sfx2/prnmon.hxx"
+#include "sfx2/progress.hxx"
+#include "sfx2/request.hxx"
+#include "sfx2/sfx.hrc"
+#include "sfx2/sfxdefs.hxx"
+#include "sfx2/sfxdlg.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include "sfx2/sfxsids.hrc"
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/shell.hxx"
+#include "sfx2/styfitem.hxx"
+#include "sfx2/styledlg.hxx"
+#include "sfx2/tabdlg.hxx"
+#include "sfx2/tbxctrl.hxx"
+#include "sfx2/templdlg.hxx"
+#include "sfx2/topfrm.hxx"
+#include "sfx2/tplpitem.hxx"
+#include "sfx2/viewfac.hxx"
+#include "sfx2/viewfrm.hxx"
+#include "sfx2/viewsh.hxx"
+
+#include "sot/clsids.hxx"
+#include "sot/exchange.hxx"
+#include "sot/factory.hxx"
+#include "sot/filelist.hxx"
+#include "sot/formats.hxx"
+#include "sot/stg.hxx"
+#include "sot/storage.hxx"
+#include "sot/storinfo.hxx"
+
+#include "svtools/FilterConfigItem.hxx"
+#include "svtools/PasswordHelper.hxx"
+#include "svtools/accessibilityoptions.hxx"
+#include "svtools/aeitem.hxx"
+#include "svtools/cjkoptions.hxx"
+#include "svtools/cmdoptions.hxx"
+#include "svtools/cntnrsrt.hxx"
+#include "svtools/collatorres.hxx"
+#include "svtools/colorcfg.hxx"
+#include "svtools/compatibility.hxx"
+#include "svtools/controldims.hrc"
+#include "svtools/ctloptions.hxx"
+#include "svtools/ctrlbox.hxx"
+#include "svtools/ctrltool.hxx"
+#include "svtools/editbrowsebox.hxx"
+#include "svtools/ehdl.hxx"
+#include "svtools/eitem.hxx"
+#include "svtools/embedhlp.hxx"
+#include "svtools/embedtransfer.hxx"
+#include "svtools/filter.hxx"
+#include "svtools/flagitem.hxx"
+#include "svtools/fltrcfg.hxx"
+#include "svtools/fstathelper.hxx"
+#include "svtools/globalnameitem.hxx"
+#include "svtools/headbar.hxx"
+#include "svtools/htmlkywd.hxx"
+#include "svtools/htmltokn.h"
+#include "svtools/imageitm.hxx"
+#include "svtools/imap.hxx"
+#include "svtools/indexentryres.hxx"
+#include "svtools/inethist.hxx"
+#include "svtools/inetimg.hxx"
+#include "svtools/insdlg.hxx"
+#include "svtools/intitem.hxx"
+#include "svtools/isethint.hxx"
+#include "svtools/itemiter.hxx"
+#include "svtools/itempool.hxx"
+#include "svtools/itemprop.hxx"
+#include "svtools/itemset.hxx"
+#include "svtools/languageoptions.hxx"
+#include "svtools/lckbitem.hxx"
+#include "svtools/lingucfg.hxx"
+#include "svtools/linguprops.hxx"
+#include "svtools/lstner.hxx"
+#include "svtools/misccfg.hxx"
+#include "svtools/moduleoptions.hxx"
+#include "svtools/numuno.hxx"
+#include "svtools/ownlist.hxx"
+#include "svtools/parhtml.hxx"
+#include "svtools/pathoptions.hxx"
+#include "svtools/poolitem.hxx"
+#include "svtools/prgsbar.hxx"
+#include "svtools/printdlg.hxx"
+#include "svtools/prnsetup.hxx"
+#include "svtools/ptitem.hxx"
+#include "svtools/rectitem.hxx"
+#include "svtools/rtfkeywd.hxx"
+#include "svtools/rtfout.hxx"
+#include "svtools/rtftoken.h"
+#include "svtools/ruler.hxx"
+#include "svtools/saveopt.hxx"
+#include "svtools/scriptedtext.hxx"
+#include "svtools/sfxecode.hxx"
+#include "svtools/slstitm.hxx"
+#include "svtools/smplhint.hxx"
+#include "svtools/soerr.hxx"
+#include "svtools/solar.hrc"
+#include "svtools/sourceviewconfig.hxx"
+#include "svtools/stdctrl.hxx"
+#include "svtools/stritem.hxx"
+#include "svtools/style.hrc"
+#include "svtools/style.hxx"
+#include "svtools/svarray.hxx"
+#include "svtools/svmedit.hxx"
+#include "svtools/svparser.hxx"
+#include "svtools/svstdarr.hxx"
+#include "svtools/svtabbx.hxx"
+#include "svtools/svtreebx.hxx"
+#include "svtools/syslocale.hxx"
+#include "svtools/templdlg.hxx"
+#include "svtools/textview.hxx"
+#include "svtools/transfer.hxx"
+#include "svtools/txtattr.hxx"
+#include "svtools/txtcmp.hxx"
+#include "svtools/undo.hxx"
+#include "svtools/undoopt.hxx"
+#include "svtools/unoevent.hxx"
+#include "svtools/unoimap.hxx"
+#include "svtools/urihelper.hxx"
+#include "svtools/urlbmk.hxx"
+#include "svtools/useroptions.hxx"
+#include "svtools/valueset.hxx"
+#include "svtools/visitem.hxx"
+#include "svtools/whiter.hxx"
+#include "svtools/xtextedt.hxx"
+
+#include "svx/IAccessibleParent.hxx"
+#include "svx/IAccessibleViewForwarder.hxx"
+#include "svx/SpellDialogChildWindow.hxx"
+#include "svx/SpellPortions.hxx"
+#include "svx/UnoForbiddenCharsTable.hxx"
+#include "svx/acorrcfg.hxx"
+#include "svx/anchorid.hxx"
+#include "svx/asiancfg.hxx"
+#include "svx/checklbx.hxx"
+#include "svx/clipboardctl.hxx"
+#include "svx/clipfmtitem.hxx"
+#include "svx/contdlg.hxx"
+#include "svx/ctredlin.hxx"
+#include "svx/dataaccessdescriptor.hxx"
+#include "svx/dialmgr.hxx"
+#include "svx/dialogs.hrc"
+#include "svx/dlgutil.hxx"
+#include "svx/editdata.hxx"
+#include "svx/editeng.hxx"
+#include "svx/editobj.hxx"
+#include "svx/editstat.hxx"
+#include "svx/editview.hxx"
+#include "svx/eeitem.hxx"
+#include "svx/escherex.hxx"
+#include "svx/extrusionbar.hxx"
+#include "svx/extrusioncontrols.hxx"
+#include "svx/fillctrl.hxx"
+#include "svx/flagsdef.hxx"
+#include "svx/flstitem.hxx"
+#include "svx/fmdmod.hxx"
+#include "svx/fmglob.hxx"
+#include "svx/fmobjfac.hxx"
+#include "svx/fmpage.hxx"
+#include "svx/fntctrl.hxx"
+#include "svx/fontwork.hxx"
+#include "svx/fontworkbar.hxx"
+#include "svx/fontworkgallery.hxx"
+#include "svx/forbiddencharacterstable.hxx"
+#include "svx/formatpaintbrushctrl.hxx"
+#include "svx/frmdir.hxx"
+#include "svx/galbrws.hxx"
+#include "svx/gallery.hxx"
+#include "svx/globlmn.hrc"
+#include "svx/grafctrl.hxx"
+#include "svx/hangulhanja.hxx"
+#include "svx/hdft2.hxx"
+#include "svx/htmlcfg.hxx"
+#include "svx/htmlmode.hxx"
+#include "svx/hyperdlg.hxx"
+#include "svx/hyprlink.hxx"
+#include "svx/imapdlg.hxx"
+#include "svx/impgrf.hxx"
+#include "svx/itemtype.hxx"
+#include "svx/langbox.hxx"
+#include "svx/layctrl.hxx"
+#include "svx/lboxctrl.hxx"
+#include "svx/linectrl.hxx"
+#include "svx/linkmgr.hxx"
+#include "svx/mscodec.hxx"
+#include "svx/msdffimp.hxx"
+#include "svx/msfiltertracer.hxx"
+#include "svx/msocximex.hxx"
+#include "svx/msoleexp.hxx"
+#include "svx/numitem.hxx"
+#include "svx/numvset.hxx"
+#include "svx/objfac3d.hxx"
+#include "svx/ofaitem.hxx"
+#include "svx/optgenrl.hxx"
+#include "svx/optgrid.hxx"
+#include "svx/outliner.hxx"
+#include "svx/outlobj.hxx"
+#include "svx/pagectrl.hxx"
+#include "svx/paperinf.hxx"
+#include "svx/paraprev.hxx"
+#include "svx/pfiledlg.hxx"
+#include "svx/prtqry.hxx"
+#include "svx/rectenum.hxx"
+#include "svx/rotmodit.hxx"
+#include "svx/rubydialog.hxx"
+#include "svx/ruler.hxx"
+#include "svx/rulritem.hxx"
+#include "svx/scripttypeitem.hxx"
+#include "svx/sdgcoitm.hxx"
+#include "svx/sdggaitm.hxx"
+#include "svx/sdginitm.hxx"
+#include "svx/sdgluitm.hxx"
+#include "svx/sdgmoitm.hxx"
+#include "svx/sdgtritm.hxx"
+#include "svx/sdr/contact/displayinfo.hxx"
+#include "svx/sdr/contact/objectcontactofobjlistpainter.hxx"
+#include "svx/sdr/contact/viewcontactofsdrmediaobj.hxx"
+#include "svx/sdr/properties/defaultproperties.hxx"
+#include "svx/sdtaaitm.hxx"
+#include "svx/sdtacitm.hxx"
+#include "svx/sdtaditm.hxx"
+#include "svx/sdtagitm.hxx"
+#include "svx/sdtaitm.hxx"
+#include "svx/sdtakitm.hxx"
+#include "svx/simptabl.hxx"
+#include "svx/splwrap.hxx"
+#include "svx/srchdlg.hxx"
+#include "svx/stddlg.hxx"
+#include "svx/strarray.hxx"
+#include "svx/xflasit.hxx"
+#include "svx/xflclit.hxx"
+#include "svx/xflgrit.hxx"
+#include "svx/xflhtit.hxx"
+#include "svx/xfltrit.hxx"
+#include "svx/xftadit.hxx"
+#include "svx/xftdiit.hxx"
+#include "svx/xftmrit.hxx"
+#include "svx/xftouit.hxx"
+#include "svx/xftsfit.hxx"
+#include "svx/xftshcit.hxx"
+#include "svx/xftshit.hxx"
+#include "svx/xftshxy.hxx"
+#include "svx/xftstit.hxx"
+#include "svx/xgrad.hxx"
+#include "svx/xlineit.hxx"
+#include "svx/xlineit0.hxx"
+#include "svx/xlnclit.hxx"
+#include "svx/xlndsit.hxx"
+#include "svx/xlnedit.hxx"
+#include "svx/xlnstit.hxx"
+#include "svx/xlnwtit.hxx"
+#include "svx/xmleohlp.hxx"
+#include "svx/xmlexchg.hxx"
+#include "svx/xmlgrhlp.hxx"
+#include "svx/xoutbmp.hxx"
+#include "svx/xpoly.hxx"
+#include "svx/xtable.hxx"
+#include "svx/xtextit0.hxx"
+#include "svx/zoomitem.hxx"
+
+#include "sys/stat.h"
+#include "sys/types.h"
+
+#include "toolkit/helper/vclunohelper.hxx"
+#include "toolkit/unohlp.hxx"
+
+#include "tools/bigint.hxx"
+#include "tools/cachestr.hxx"
+#include "tools/color.hxx"
+#include "tools/date.hxx"
+#include "tools/datetime.hxx"
+#include "tools/debug.hxx"
+#include "tools/errcode.hxx"
+#include "tools/errinf.hxx"
+#include "tools/fract.hxx"
+#include "tools/gen.hxx"
+#include "tools/globname.hxx"
+#include "tools/link.hxx"
+#include "tools/list.hxx"
+#include "tools/mempool.hxx"
+#include "tools/multisel.hxx"
+#include "tools/poly.hxx"
+#include "tools/pstm.hxx"
+#include "tools/rc.hxx"
+#include "tools/ref.hxx"
+#include "tools/resary.hxx"
+#include "tools/resid.hxx"
+#include "tools/resmgr.hxx"
+#include "tools/rtti.hxx"
+#include "tools/shl.hxx"
+#include "tools/solar.h"
+#include "tools/stream.hxx"
+#include "tools/string.hxx"
+#include "tools/table.hxx"
+#include "tools/tempfile.hxx"
+#include "tools/time.hxx"
+#include "tools/urlobj.hxx"
+
+#include "ucbhelper/commandenvironment.hxx"
+#include "ucbhelper/content.hxx"
+#include "ucbhelper/contentbroker.hxx"
+#include "ucbhelper/contentidentifier.hxx"
+
+#include "unicode/ubidi.h"
+
+#include "uno/lbnames.h"
+
+#include "unotools/accessiblerelationsethelper.hxx"
+#include "unotools/accessiblestatesethelper.hxx"
+#include "unotools/calendarwrapper.hxx"
+#include "unotools/charclass.hxx"
+#include "unotools/collatorwrapper.hxx"
+#include "unotools/configitem.hxx"
+#include "unotools/configmgr.hxx"
+#include "unotools/confignode.hxx"
+#include "unotools/configpathes.hxx"
+#include "unotools/intlwrapper.hxx"
+#include "unotools/localedatawrapper.hxx"
+#include "unotools/localfilehelper.hxx"
+#include "unotools/processfactory.hxx"
+#include "unotools/streamwrap.hxx"
+#include "unotools/tempfile.hxx"
+#include "unotools/transliterationwrapper.hxx"
+#include "unotools/ucbstreamhelper.hxx"
+
+#include "vcl/bitmap.hxx"
+#include "vcl/button.hxx"
+#include "vcl/cmdevt.h"
+#include "vcl/cmdevt.hxx"
+#include "vcl/combobox.hxx"
+#include "vcl/cursor.hxx"
+#include "vcl/cvtgrf.hxx"
+#include "vcl/dialog.hxx"
+#include "vcl/edit.hxx"
+#include "vcl/event.hxx"
+#include "vcl/field.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/fldunit.hxx"
+#include "vcl/font.hxx"
+#include "vcl/fontcvt.hxx"
+#include "vcl/graph.hxx"
+#include "vcl/group.hxx"
+#include "vcl/help.hxx"
+#include "vcl/image.hxx"
+#include "vcl/imagebtn.hxx"
+#include "vcl/imgcons.hxx"
+#include "vcl/inputctx.hxx"
+#include "vcl/jobset.hxx"
+#include "vcl/keycod.hxx"
+#include "vcl/keycodes.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/mapmod.hxx"
+#include "vcl/menu.hxx"
+#include "vcl/menubtn.hxx"
+#include "vcl/metric.hxx"
+#include "vcl/mnemonic.hxx"
+#include "vcl/morebtn.hxx"
+#include "vcl/msgbox.hxx"
+#include "vcl/outdev.hxx"
+#include "vcl/pdfextoutdevdata.hxx"
+#include "vcl/print.hxx"
+#include "vcl/region.hxx"
+#include "vcl/salbtype.hxx"
+#include "vcl/scrbar.hxx"
+#include "vcl/settings.hxx"
+#include "vcl/sound.hxx"
+#include "vcl/status.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/syswin.hxx"
+#include "vcl/timer.hxx"
+#include "vcl/toolbox.hxx"
+#include "vcl/vclenum.hxx"
+#include "vcl/virdev.hxx"
+#include "vcl/waitobj.hxx"
+#include "vcl/window.hxx"
+#include "vcl/wintypes.hxx"
+#include "vcl/wrkwin.hxx"
+
+#include "vos/mutex.hxx"
+#include "vos/ref.hxx"
+
+#include "xmloff/DocumentSettingsContext.hxx"
+#include "xmloff/ProgressBarHelper.hxx"
+#include "xmloff/XMLBase64ImportContext.hxx"
+#include "xmloff/XMLFilterServiceNames.h"
+#include "xmloff/XMLFontAutoStylePool.hxx"
+#include "xmloff/XMLFontStylesContext.hxx"
+#include "xmloff/XMLGraphicsDefaultStyle.hxx"
+#include "xmloff/XMLTextListAutoStylePool.hxx"
+#include "xmloff/XMLTextMasterPageExport.hxx"
+#include "xmloff/XMLTextMasterStylesContext.hxx"
+#include "xmloff/XMLTextShapeImportHelper.hxx"
+#include "xmloff/XMLTextShapeStyleContext.hxx"
+#include "xmloff/XMLTextTableContext.hxx"
+#include "xmloff/attrlist.hxx"
+#include "xmloff/families.hxx"
+#include "xmloff/functional.hxx"
+#include "xmloff/i18nmap.hxx"
+#include "xmloff/maptype.hxx"
+#include "xmloff/nmspmap.hxx"
+#include "xmloff/numehelp.hxx"
+#include "xmloff/prhdlfac.hxx"
+#include "xmloff/prstylei.hxx"
+#include "xmloff/txtparae.hxx"
+#include "xmloff/txtprmap.hxx"
+#include "xmloff/txtstyli.hxx"
+#include "xmloff/uniref.hxx"
+#include "xmloff/xformsimport.hxx"
+#include "xmloff/xmlaustp.hxx"
+#include "xmloff/xmlement.hxx"
+#include "xmloff/xmlexp.hxx"
+#include "xmloff/xmlictxt.hxx"
+#include "xmloff/xmlmetae.hxx"
+#include "xmloff/xmlmetai.hxx"
+#include "xmloff/xmlnmspe.hxx"
+#include "xmloff/xmlprmap.hxx"
+#include "xmloff/xmlscripti.hxx"
+#include "xmloff/xmlstyle.hxx"
+#include "xmloff/xmltabe.hxx"
+#include "xmloff/xmltkmap.hxx"
+#include "xmloff/xmltoken.hxx"
+#include "xmloff/xmltypes.hxx"
+#include "xmloff/xmluconv.hxx"
+//---MARKER---
+
+#endif
diff --git a/sw/inc/poolfmt.awk b/sw/inc/poolfmt.awk
new file mode 100644
index 000000000000..810d714dff95
--- /dev/null
+++ b/sw/inc/poolfmt.awk
@@ -0,0 +1,73 @@
+#*************************************************************************
+#*
+#* $Workfile: dbgxtor.awk
+#*
+#* Ersterstellung JP 05.10.95
+#* Letzte Aenderung $Author: hr $ $Date: 2000-09-18 17:14:27 $
+#* $Revision: 1.1.1.1 $
+#*
+#* $Logfile: T:/sw/inc/poolfmt.awv $
+#*
+#* Copyright (c) 1990-1996, STAR DIVISION
+#*
+#*************************************************************************
+
+#
+# Dieses awk-script generiert ein cxx-file, das alle PoolIds der Vorlage dumpt.
+# wird fuer den HelpPI gebraucht.
+# Aufruf: awk -f poolid.awk poolfmt.hxx > poolid.cxx
+# cl poolid.cxx
+# poolid.exe > ???.hrc
+#
+
+function Header() {
+ print "// This is an outputfile of an awk-script: $Workfile: poolfmt.awk $"
+ print "#include <solar.h> "
+ print
+ print "#include <stdio.h>"
+ print "#include <stdlib.h>"
+ print
+ print "#pragma hdrstop"
+ print
+ print "#include <iostream.hxx> "
+ print "#include \"poolfmt.hxx\""
+ print
+}
+
+function Main() {
+ print
+ print "void main( int , char *[] ) {"
+ sStr = "#define"
+ print " int nSize = (sizeof(ppPoolIds) / sizeof(PoolFmtIds)) - 1;"
+ print " for( int n = 0; n < nSize; n++ )"
+ print " printf( \"" sStr " %s\\t%8d\\n\", ppPoolIds[ n ].pStr, ppPoolIds[ n ].nId );"
+ print "}"
+}
+
+function TableHead() {
+ print
+ print "struct PoolFmtIds { int nId; const char* pStr; };"
+ print "static PoolFmtIds ppPoolIds[] = {"
+}
+
+function TableTail() {
+ print " 0, \"\" };"
+ print
+}
+
+BEGIN {
+ Header();
+ TableHead();
+}
+
+/^[ \t]*RES_/ && !index( $1, "_BEGIN" ) && !index( $1, "_END" ) && !index( $1, "_POOL_" ) {
+ sStr = $1;
+ split( $1, sStr, "," );
+ print " " sStr[1] ", \"" sStr[1] "\","
+}
+
+END {
+ TableTail();
+ Main();
+}
+
diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc
new file mode 100644
index 000000000000..03450d714ece
--- /dev/null
+++ b/sw/inc/poolfmt.hrc
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: poolfmt.hrc,v $
+ * $Revision: 1.7.224.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _POOLFMT_HRC
+#define _POOLFMT_HRC
+
+#include "rcid.hrc"
+
+// ---------------
+// die Formate
+// ---------------
+
+// Zeichenvorlagen:
+#define STR_POOLCHR_FOOTNOTE (RC_POOLCHRFMT_BEGIN+ 0)
+#define STR_POOLCHR_PAGENO (RC_POOLCHRFMT_BEGIN+ 1)
+#define STR_POOLCHR_LABEL (RC_POOLCHRFMT_BEGIN+ 2)
+#define STR_POOLCHR_DROPCAPS (RC_POOLCHRFMT_BEGIN+ 3)
+#define STR_POOLCHR_NUM_LEVEL (RC_POOLCHRFMT_BEGIN+ 4)
+#define STR_POOLCHR_BUL_LEVEL (RC_POOLCHRFMT_BEGIN+ 5)
+#define STR_POOLCHR_INET_NORMAL (RC_POOLCHRFMT_BEGIN+ 6)
+#define STR_POOLCHR_INET_VISIT (RC_POOLCHRFMT_BEGIN+ 7)
+#define STR_POOLCHR_JUMPEDIT (RC_POOLCHRFMT_BEGIN+ 8)
+#define STR_POOLCHR_TOXJUMP (RC_POOLCHRFMT_BEGIN+ 9)
+#define STR_POOLCHR_ENDNOTE (RC_POOLCHRFMT_BEGIN+ 10)
+#define STR_POOLCHR_LINENUM (RC_POOLCHRFMT_BEGIN+ 11)
+#define STR_POOLCHR_IDX_MAIN_ENTRY (RC_POOLCHRFMT_BEGIN+ 12)
+#define STR_POOLCHR_FOOTNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 13)
+#define STR_POOLCHR_ENDNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 14)
+#define STR_POOLCHR_RUBYTEXT (RC_POOLCHRFMT_BEGIN+ 15)
+#define STR_POOLCHR_VERT_NUM (RC_POOLCHRFMT_BEGIN+ 16)
+
+#define STR_POOLCHR_HTML_EMPHASIS (RC_POOLCHRFMT_HTML_BEGIN+ 0)
+#define STR_POOLCHR_HTML_CITIATION (RC_POOLCHRFMT_HTML_BEGIN+ 1)
+#define STR_POOLCHR_HTML_STRONG (RC_POOLCHRFMT_HTML_BEGIN+ 2)
+#define STR_POOLCHR_HTML_CODE (RC_POOLCHRFMT_HTML_BEGIN+ 3)
+#define STR_POOLCHR_HTML_SAMPLE (RC_POOLCHRFMT_HTML_BEGIN+ 4)
+#define STR_POOLCHR_HTML_KEYBOARD (RC_POOLCHRFMT_HTML_BEGIN+ 5)
+#define STR_POOLCHR_HTML_VARIABLE (RC_POOLCHRFMT_HTML_BEGIN+ 6)
+#define STR_POOLCHR_HTML_DEFINSTANCE (RC_POOLCHRFMT_HTML_BEGIN+ 7)
+#define STR_POOLCHR_HTML_TELETYPE (RC_POOLCHRFMT_HTML_BEGIN+ 8)
+
+// Rahmen-Vorlagen:
+#define STR_POOLFRM_FRAME (RC_POOLFRMFMT_BEGIN+ 0)
+#define STR_POOLFRM_GRAPHIC (RC_POOLFRMFMT_BEGIN+ 1)
+#define STR_POOLFRM_OLE (RC_POOLFRMFMT_BEGIN+ 2)
+#define STR_POOLFRM_FORMEL (RC_POOLFRMFMT_BEGIN+ 3)
+#define STR_POOLFRM_MARGINAL (RC_POOLFRMFMT_BEGIN+ 4)
+#define STR_POOLFRM_WATERSIGN (RC_POOLFRMFMT_BEGIN+ 5)
+#define STR_POOLFRM_LABEL (RC_POOLFRMFMT_BEGIN+ 6)
+
+// ---------------
+// die Vorlagen
+// ---------------
+// Gruppe Text
+#define STR_POOLCOLL_STANDARD (RC_POOLCOLL_TEXT_BEGIN+ 0)
+#define STR_POOLCOLL_TEXT (RC_POOLCOLL_TEXT_BEGIN+ 1)
+#define STR_POOLCOLL_TEXT_IDENT (RC_POOLCOLL_TEXT_BEGIN+ 2)
+#define STR_POOLCOLL_TEXT_NEGIDENT (RC_POOLCOLL_TEXT_BEGIN+ 3)
+#define STR_POOLCOLL_TEXT_MOVE (RC_POOLCOLL_TEXT_BEGIN+ 4)
+#define STR_POOLCOLL_GREETING (RC_POOLCOLL_TEXT_BEGIN+ 5)
+#define STR_POOLCOLL_SIGNATURE (RC_POOLCOLL_TEXT_BEGIN+ 6)
+#define STR_POOLCOLL_CONFRONTATION (RC_POOLCOLL_TEXT_BEGIN+ 7)
+#define STR_POOLCOLL_MARGINAL (RC_POOLCOLL_TEXT_BEGIN+ 8)
+
+ // Untergruppierung Ueberschriften
+#define STR_POOLCOLL_HEADLINE_BASE (RC_POOLCOLL_TEXT_BEGIN+ 9)
+#define STR_POOLCOLL_HEADLINE1 (RC_POOLCOLL_TEXT_BEGIN+ 10)
+#define STR_POOLCOLL_HEADLINE2 (RC_POOLCOLL_TEXT_BEGIN+ 11)
+#define STR_POOLCOLL_HEADLINE3 (RC_POOLCOLL_TEXT_BEGIN+ 12)
+#define STR_POOLCOLL_HEADLINE4 (RC_POOLCOLL_TEXT_BEGIN+ 13)
+#define STR_POOLCOLL_HEADLINE5 (RC_POOLCOLL_TEXT_BEGIN+ 14)
+#define STR_POOLCOLL_HEADLINE6 (RC_POOLCOLL_TEXT_BEGIN+ 15)
+#define STR_POOLCOLL_HEADLINE7 (RC_POOLCOLL_TEXT_BEGIN+ 16)
+#define STR_POOLCOLL_HEADLINE8 (RC_POOLCOLL_TEXT_BEGIN+ 17)
+#define STR_POOLCOLL_HEADLINE9 (RC_POOLCOLL_TEXT_BEGIN+ 18)
+#define STR_POOLCOLL_HEADLINE10 (RC_POOLCOLL_TEXT_BEGIN+ 19)
+
+// Gruppe Listen
+#define STR_POOLCOLL_NUMBUL_BASE (RC_POOLCOLL_LISTS_BEGIN+ 0)
+ // Untergruppe Nummerierung
+#define STR_POOLCOLL_NUM_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 1)
+#define STR_POOLCOLL_NUM_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 2)
+#define STR_POOLCOLL_NUM_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 3)
+#define STR_POOLCOLL_NUM_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 4)
+#define STR_POOLCOLL_NUM_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 5)
+#define STR_POOLCOLL_NUM_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 6)
+#define STR_POOLCOLL_NUM_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 7)
+#define STR_POOLCOLL_NUM_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 8)
+#define STR_POOLCOLL_NUM_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 9)
+#define STR_POOLCOLL_NUM_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 10)
+#define STR_POOLCOLL_NUM_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 11)
+#define STR_POOLCOLL_NUM_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 12)
+#define STR_POOLCOLL_NUM_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 13)
+#define STR_POOLCOLL_NUM_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 14)
+#define STR_POOLCOLL_NUM_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 15)
+#define STR_POOLCOLL_NUM_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 16)
+#define STR_POOLCOLL_NUM_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 17)
+#define STR_POOLCOLL_NUM_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 18)
+#define STR_POOLCOLL_NUM_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 19)
+#define STR_POOLCOLL_NUM_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 20)
+
+ // Untergruppe Aufzaehlung
+#define STR_POOLCOLL_BUL_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 21)
+#define STR_POOLCOLL_BUL_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 22)
+#define STR_POOLCOLL_BUL_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 23)
+#define STR_POOLCOLL_BUL_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 24)
+#define STR_POOLCOLL_BUL_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 25)
+#define STR_POOLCOLL_BUL_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 26)
+#define STR_POOLCOLL_BUL_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 27)
+#define STR_POOLCOLL_BUL_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 28)
+#define STR_POOLCOLL_BUL_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 29)
+#define STR_POOLCOLL_BUL_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 30)
+#define STR_POOLCOLL_BUL_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 31)
+#define STR_POOLCOLL_BUL_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 32)
+#define STR_POOLCOLL_BUL_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 33)
+#define STR_POOLCOLL_BUL_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 34)
+#define STR_POOLCOLL_BUL_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 35)
+#define STR_POOLCOLL_BUL_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 36)
+#define STR_POOLCOLL_BUL_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 37)
+#define STR_POOLCOLL_BUL_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 38)
+#define STR_POOLCOLL_BUL_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 39)
+#define STR_POOLCOLL_BUL_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 40)
+
+// Sonderbereiche
+ // Untergruppe Header
+#define STR_POOLCOLL_HEADER (RC_POOLCOLL_EXTRA_BEGIN+ 0)
+#define STR_POOLCOLL_HEADERL (RC_POOLCOLL_EXTRA_BEGIN+ 1)
+#define STR_POOLCOLL_HEADERR (RC_POOLCOLL_EXTRA_BEGIN+ 2)
+
+ // Untergruppe Footer
+#define STR_POOLCOLL_FOOTER (RC_POOLCOLL_EXTRA_BEGIN+ 3)
+#define STR_POOLCOLL_FOOTERL (RC_POOLCOLL_EXTRA_BEGIN+ 4)
+#define STR_POOLCOLL_FOOTERR (RC_POOLCOLL_EXTRA_BEGIN+ 5)
+
+ // Untergruppe Tabelle
+#define STR_POOLCOLL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 6)
+#define STR_POOLCOLL_TABLE_HDLN (RC_POOLCOLL_EXTRA_BEGIN+ 7)
+
+ // Untergruppe Labels
+#define STR_POOLCOLL_LABEL (RC_POOLCOLL_EXTRA_BEGIN+ 8)
+#define STR_POOLCOLL_LABEL_ABB (RC_POOLCOLL_EXTRA_BEGIN+ 9)
+#define STR_POOLCOLL_LABEL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 10)
+#define STR_POOLCOLL_LABEL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 11)
+
+ // sonstiges
+#define STR_POOLCOLL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 12)
+#define STR_POOLCOLL_FOOTNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 13)
+#define STR_POOLCOLL_JAKETADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 14)
+#define STR_POOLCOLL_SENDADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 15)
+#define STR_POOLCOLL_ENDNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 16)
+
+#define STR_POOLCOLL_LABEL_DRAWING (RC_POOLCOLL_EXTRA_BEGIN+ 17)
+
+// Gruppe Verzeichnisse
+#define STR_POOLCOLL_REGISTER_BASE (RC_POOLCOLL_REGISTER_BEGIN+ 0)
+ // Untergruppe Index-Verzeichnisse
+#define STR_POOLCOLL_TOX_IDXH (RC_POOLCOLL_REGISTER_BEGIN+ 1)
+#define STR_POOLCOLL_TOX_IDX1 (RC_POOLCOLL_REGISTER_BEGIN+ 2)
+#define STR_POOLCOLL_TOX_IDX2 (RC_POOLCOLL_REGISTER_BEGIN+ 3)
+#define STR_POOLCOLL_TOX_IDX3 (RC_POOLCOLL_REGISTER_BEGIN+ 4)
+#define STR_POOLCOLL_TOX_IDXBREAK (RC_POOLCOLL_REGISTER_BEGIN+ 5)
+
+ // Untergruppe Inhalts-Verzeichnisse
+#define STR_POOLCOLL_TOX_CNTNTH (RC_POOLCOLL_REGISTER_BEGIN+ 6)
+#define STR_POOLCOLL_TOX_CNTNT1 (RC_POOLCOLL_REGISTER_BEGIN+ 7)
+#define STR_POOLCOLL_TOX_CNTNT2 (RC_POOLCOLL_REGISTER_BEGIN+ 8)
+#define STR_POOLCOLL_TOX_CNTNT3 (RC_POOLCOLL_REGISTER_BEGIN+ 9)
+#define STR_POOLCOLL_TOX_CNTNT4 (RC_POOLCOLL_REGISTER_BEGIN+ 10)
+#define STR_POOLCOLL_TOX_CNTNT5 (RC_POOLCOLL_REGISTER_BEGIN+ 11)
+
+ // Untergruppe Benutzer-Verzeichnisse:
+#define STR_POOLCOLL_TOX_USERH (RC_POOLCOLL_REGISTER_BEGIN+ 12)
+#define STR_POOLCOLL_TOX_USER1 (RC_POOLCOLL_REGISTER_BEGIN+ 13)
+#define STR_POOLCOLL_TOX_USER2 (RC_POOLCOLL_REGISTER_BEGIN+ 14)
+#define STR_POOLCOLL_TOX_USER3 (RC_POOLCOLL_REGISTER_BEGIN+ 15)
+#define STR_POOLCOLL_TOX_USER4 (RC_POOLCOLL_REGISTER_BEGIN+ 16)
+#define STR_POOLCOLL_TOX_USER5 (RC_POOLCOLL_REGISTER_BEGIN+ 17)
+
+ // Untergruppe Inhalts-Verzeichnisse mehr Ebenen 5 - 10
+#define STR_POOLCOLL_TOX_CNTNT6 (RC_POOLCOLL_REGISTER_BEGIN+ 18)
+#define STR_POOLCOLL_TOX_CNTNT7 (RC_POOLCOLL_REGISTER_BEGIN+ 19)
+#define STR_POOLCOLL_TOX_CNTNT8 (RC_POOLCOLL_REGISTER_BEGIN+ 20)
+#define STR_POOLCOLL_TOX_CNTNT9 (RC_POOLCOLL_REGISTER_BEGIN+ 21)
+#define STR_POOLCOLL_TOX_CNTNT10 (RC_POOLCOLL_REGISTER_BEGIN+ 22)
+
+// illustrations index
+#define STR_POOLCOLL_TOX_ILLUSH (RC_POOLCOLL_REGISTER_BEGIN+ 23)
+#define STR_POOLCOLL_TOX_ILLUS1 (RC_POOLCOLL_REGISTER_BEGIN+ 24)
+
+// object index
+#define STR_POOLCOLL_TOX_OBJECTH (RC_POOLCOLL_REGISTER_BEGIN+ 25)
+#define STR_POOLCOLL_TOX_OBJECT1 (RC_POOLCOLL_REGISTER_BEGIN+ 26)
+
+// tables index
+#define STR_POOLCOLL_TOX_TABLESH (RC_POOLCOLL_REGISTER_BEGIN+ 27)
+#define STR_POOLCOLL_TOX_TABLES1 (RC_POOLCOLL_REGISTER_BEGIN+ 28)
+
+// index of authorities
+#define STR_POOLCOLL_TOX_AUTHORITIESH (RC_POOLCOLL_REGISTER_BEGIN+ 29)
+#define STR_POOLCOLL_TOX_AUTHORITIES1 (RC_POOLCOLL_REGISTER_BEGIN+ 30)
+
+ // Untergruppe Benutzer-Verzeichnisse mehr Ebenen 5 - 10
+#define STR_POOLCOLL_TOX_USER6 (RC_POOLCOLL_REGISTER_BEGIN+ 31)
+#define STR_POOLCOLL_TOX_USER7 (RC_POOLCOLL_REGISTER_BEGIN+ 32)
+#define STR_POOLCOLL_TOX_USER8 (RC_POOLCOLL_REGISTER_BEGIN+ 33)
+#define STR_POOLCOLL_TOX_USER9 (RC_POOLCOLL_REGISTER_BEGIN+ 34)
+#define STR_POOLCOLL_TOX_USER10 (RC_POOLCOLL_REGISTER_BEGIN+ 35)
+
+
+// Gruppe Kapitel/Dokument
+#define STR_POOLCOLL_DOC_TITEL (RC_POOLCOLL_DOC_BEGIN+ 0)
+#define STR_POOLCOLL_DOC_SUBTITEL (RC_POOLCOLL_DOC_BEGIN+ 1)
+
+// Gruppe HTML-Vorlagen
+#define STR_POOLCOLL_HTML_BLOCKQUOTE (RC_POOLCOLL_HTML_BEGIN+ 0)
+#define STR_POOLCOLL_HTML_PRE (RC_POOLCOLL_HTML_BEGIN+ 1)
+#define STR_POOLCOLL_HTML_HR (RC_POOLCOLL_HTML_BEGIN+ 2)
+#define STR_POOLCOLL_HTML_DD (RC_POOLCOLL_HTML_BEGIN+ 3)
+#define STR_POOLCOLL_HTML_DT (RC_POOLCOLL_HTML_BEGIN+ 4)
+
+//-----------------
+// Page styles
+//-----------------
+#define STR_POOLPAGE_STANDARD (RC_POOLPAGEDESC_BEGIN+ 0)
+#define STR_POOLPAGE_FIRST (RC_POOLPAGEDESC_BEGIN+ 1)
+#define STR_POOLPAGE_LEFT (RC_POOLPAGEDESC_BEGIN+ 2)
+#define STR_POOLPAGE_RIGHT (RC_POOLPAGEDESC_BEGIN+ 3)
+#define STR_POOLPAGE_JAKET (RC_POOLPAGEDESC_BEGIN+ 4)
+#define STR_POOLPAGE_REGISTER (RC_POOLPAGEDESC_BEGIN+ 5)
+#define STR_POOLPAGE_HTML (RC_POOLPAGEDESC_BEGIN+ 6)
+#define STR_POOLPAGE_FOOTNOTE (RC_POOLPAGEDESC_BEGIN+ 7)
+#define STR_POOLPAGE_ENDNOTE (RC_POOLPAGEDESC_BEGIN+ 8)
+#define STR_POOLPAGE_LANDSCAPE (RC_POOLPAGEDESC_BEGIN+ 9)
+
+//-----------------
+// Numbering styles
+//-----------------
+#define STR_POOLNUMRULE_NUM1 (RC_POOLNUMRULE_BEGIN+ 0)
+#define STR_POOLNUMRULE_NUM2 (RC_POOLNUMRULE_BEGIN+ 1)
+#define STR_POOLNUMRULE_NUM3 (RC_POOLNUMRULE_BEGIN+ 2)
+#define STR_POOLNUMRULE_NUM4 (RC_POOLNUMRULE_BEGIN+ 3)
+#define STR_POOLNUMRULE_NUM5 (RC_POOLNUMRULE_BEGIN+ 4)
+#define STR_POOLNUMRULE_BUL1 (RC_POOLNUMRULE_BEGIN+ 5)
+#define STR_POOLNUMRULE_BUL2 (RC_POOLNUMRULE_BEGIN+ 6)
+#define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7)
+#define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8)
+#define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9)
+
+//-----------------
+// Paragraph styles
+//-----------------
+#define STR_POOLPARSTYLE_HEAD1 (STR_POOLPARSTYLE_BEGIN+ 0)
+#define STR_POOLPARSTYLE_HEAD2 (STR_POOLPARSTYLE_BEGIN+ 1)
+#define STR_POOLPARSTYLE_HEAD3 (STR_POOLPARSTYLE_BEGIN+ 2)
+#define STR_POOLPARSTYLE_DEFAULT (STR_POOLPARSTYLE_BEGIN+ 3)
+#define STR_POOLPARSTYLE_TEXTBODY (STR_POOLPARSTYLE_BEGIN+ 4)
+
+#endif
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
new file mode 100644
index 000000000000..0526732fd00c
--- /dev/null
+++ b/sw/inc/poolfmt.hxx
@@ -0,0 +1,446 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: poolfmt.hxx,v $
+ * $Revision: 1.7.224.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _POOLFMT_HXX
+#define _POOLFMT_HXX
+
+#include <limits.h>
+#include <tools/solar.h>
+#include <svx/frmdir.hxx>
+
+// POOLCOLL-IDs:
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+// !User! Bereich ! 0 ! Offset !
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+//
+// Bereich: 1 - Text
+// 2 - Listen
+// 3 - Sonderbereiche
+// 4 - Verzeichnisse
+// 5 - Kapitel / Dokument
+// 6 - HTML-Vorlagen
+
+// Andere IDs:
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+// !User! Bereich ! 1 ! Offset !
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+// Bereich: 0 - Zeichenvorlagen
+// 1 - Frame-Vorlagen
+// 2 - Seitenvorlagen
+// 3 - Absatzformate (?)
+// 4 - Grafikformate (?)
+
+// Fr alle IDs gilt:
+// Herkunft: 0 -Pool
+// 1 -Benutzer
+// Offset: innerhalb der Gruppe
+
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//
+// ACHTUNG: neue ID's koennen nur noch am Ende der jeweiligen Gruppe
+// zugefuegt werden. Diese Id's werden vom Reader/Writer ge-
+// lesen und geschrieben. Diese kennen nur den Offset zum Start
+//
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+// Maske fuer Erkennung von COLLPOOL-Ids:
+
+const USHORT POOLGRP_NOCOLLID = (1 << 10);
+
+// POLLCOLL-Gruppen:
+
+const USHORT USER_FMT = (1 << 15);
+const USHORT POOL_FMT = (0 << 15);
+
+const USHORT COLL_TEXT_BITS = (1 << 11);
+const USHORT COLL_LISTS_BITS = (2 << 11);
+const USHORT COLL_EXTRA_BITS = (3 << 11);
+const USHORT COLL_REGISTER_BITS = (4 << 11);
+const USHORT COLL_DOC_BITS = (5 << 11);
+const USHORT COLL_HTML_BITS = (6 << 11);
+const USHORT COLL_GET_RANGE_BITS = (15 << 11);
+
+// Sonstige Gruppen:
+
+const USHORT POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
+const USHORT POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
+const USHORT POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
+const USHORT POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
+//const USHORT POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ?
+
+// fuer Erkennung ob Benutzer-Vorlage oder nicht:
+const USHORT POOL_IDUSER_FMT =
+ USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID);
+
+inline BOOL IsPoolUserFmt( USHORT nId )
+{
+ return POOL_IDUSER_FMT ==
+ (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID))
+ ? TRUE : FALSE;
+}
+
+
+// ID-s fuer die Bereiche
+enum RES_POOLFMT
+{
+RES_POOLFMT_BEGIN = 1, // HIER GEHT'S LOS !!!
+RES_POOL_CHRFMT = RES_POOLFMT_BEGIN,
+RES_POOL_FRMFMT,
+RES_POOL_TXTCOLL,
+RES_POOL_PAGEFMT,
+
+RES_POOL_PARFMT, // ???
+RES_POOL_GRFFMT, // ???
+RES_POOLFMT_END
+};
+
+// Bereiche fuer die Id's der einzelnen Formate
+
+// die Id's fuer die Zeichen-Vorlagen
+enum RES_POOL_CHRFMT_TYPE
+{
+RES_POOLCHR_BEGIN = POOLGRP_CHARFMT,
+RES_POOLCHR_NORMAL_BEGIN = POOLGRP_CHARFMT,
+
+RES_POOLCHR_FOOTNOTE = RES_POOLCHR_NORMAL_BEGIN, // Fussnote
+RES_POOLCHR_PAGENO, // Seiten/Feld
+RES_POOLCHR_LABEL, // Beschriftung
+RES_POOLCHR_DROPCAPS, // Initialienzeichen
+RES_POOLCHR_NUM_LEVEL, // Nummerierungszeichen
+RES_POOLCHR_BUL_LEVEL, // Aufzaehlungszeichen
+
+RES_POOLCHR_INET_NORMAL, // Internet normal
+RES_POOLCHR_INET_VISIT, // Internet besucht
+RES_POOLCHR_JUMPEDIT, // Platzhalter
+RES_POOLCHR_TOXJUMP, // Sprung aus Verzeichnis
+RES_POOLCHR_ENDNOTE, // Endnote
+RES_POOLCHR_LINENUM, // Zeilennummerierung
+RES_POOLCHR_IDX_MAIN_ENTRY, // main entry in indexes
+RES_POOLCHR_FOOTNOTE_ANCHOR, // Fussnotenanker
+RES_POOLCHR_ENDNOTE_ANCHOR, // Endnotenanker
+RES_POOLCHR_RUBYTEXT, // Rubytext
+RES_POOLCHR_VERT_NUM, // Vertical numbering symbols
+
+RES_POOLCHR_NORMAL_END,
+
+RES_POOLCHR_HTML_BEGIN = RES_POOLCHR_BEGIN + 50, // HTML-Vorlagen
+RES_POOLCHR_HTML_EMPHASIS= RES_POOLCHR_HTML_BEGIN,
+RES_POOLCHR_HTML_CITIATION,
+RES_POOLCHR_HTML_STRONG,
+RES_POOLCHR_HTML_CODE,
+RES_POOLCHR_HTML_SAMPLE,
+RES_POOLCHR_HTML_KEYBOARD,
+RES_POOLCHR_HTML_VARIABLE,
+RES_POOLCHR_HTML_DEFINSTANCE,
+RES_POOLCHR_HTML_TELETYPE,
+RES_POOLCHR_HTML_END,
+
+RES_POOLCHR_END = RES_POOLCHR_HTML_END
+};
+
+
+// die Id's fuer die Rahmen-Vorlagen
+enum RES_POOL_FRMFMT_TYPE
+{
+RES_POOLFRM_BEGIN = POOLGRP_FRAMEFMT,
+
+RES_POOLFRM_FRAME = RES_POOLFRM_BEGIN, // Rahmen
+RES_POOLFRM_GRAPHIC, // Graphic
+RES_POOLFRM_OLE, // OLE
+RES_POOLFRM_FORMEL, // Formeln
+RES_POOLFRM_MARGINAL, // Marginalen
+RES_POOLFRM_WATERSIGN, // Wasserzeichen
+RES_POOLFRM_LABEL, // Etikette
+
+RES_POOLFRM_END
+};
+
+// die Id's fuer die Seiten-Vorlagen
+enum RES_POOL_PAGEFMT_TYPE
+{
+RES_POOLPAGE_BEGIN = POOLGRP_PAGEDESC,
+
+RES_POOLPAGE_STANDARD = RES_POOLPAGE_BEGIN, // Standard-Seite
+RES_POOLPAGE_FIRST, // Erste Seite
+RES_POOLPAGE_LEFT, // Linke Seite
+RES_POOLPAGE_RIGHT, // Rechte Seite
+RES_POOLPAGE_JAKET, // Umschlag
+RES_POOLPAGE_REGISTER, // Verzeichnis
+RES_POOLPAGE_HTML, // HTML
+RES_POOLPAGE_FOOTNOTE, // Fussnote bei Dokumentende
+RES_POOLPAGE_ENDNOTE, // Endnotensseite
+RES_POOLPAGE_LANDSCAPE, // Landscape Page Style
+
+RES_POOLPAGE_END
+};
+
+// die Id's fuer die NumRule-Vorlagen
+enum RES_POOL_NUMRULE_TYPE
+{
+RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE,
+RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN, // NumRule Numerierung 1
+RES_POOLNUMRULE_NUM2, // NumRule Numerierung 2
+RES_POOLNUMRULE_NUM3, // NumRule Numerierung 3
+RES_POOLNUMRULE_NUM4, // NumRule Numerierung 4
+RES_POOLNUMRULE_NUM5, // NumRule Numerierung 5
+RES_POOLNUMRULE_BUL1, // NumRule Bullets 1
+RES_POOLNUMRULE_BUL2, // NumRule Bullets 2
+RES_POOLNUMRULE_BUL3, // NumRule Bullets 3
+RES_POOLNUMRULE_BUL4, // NumRule Bullets 4
+RES_POOLNUMRULE_BUL5, // NumRule Bullets 5
+RES_POOLNUMRULE_END
+};
+
+// die Id's fuer die Absatz-Vorlagen
+enum RES_POOL_COLLFMT_TYPE
+{
+// Gruppe Text
+RES_POOLCOLL_TEXT_BEGIN = COLL_TEXT_BITS,
+
+RES_POOLCOLL_STANDARD = RES_POOLCOLL_TEXT_BEGIN, // Standard
+RES_POOLCOLL_TEXT, // Textkoerper
+RES_POOLCOLL_TEXT_IDENT, // Textkoerper Einzug
+RES_POOLCOLL_TEXT_NEGIDENT, // Textkoerper neg. Einzug
+RES_POOLCOLL_TEXT_MOVE, // Textkoerper Einrueckung
+RES_POOLCOLL_GREETING, // Grussformel
+RES_POOLCOLL_SIGNATURE, // Unterschrift
+RES_POOLCOLL_CONFRONTATION, // Gegenueberstellung
+RES_POOLCOLL_MARGINAL, // Marginalie
+
+ // Untergruppierung Ueberschriften
+RES_POOLCOLL_HEADLINE_BASE, // Basis-Ueberschrift
+RES_POOLCOLL_HEADLINE1, // Ueberschrift 1
+RES_POOLCOLL_HEADLINE2, // Ueberschrift 2
+RES_POOLCOLL_HEADLINE3, // Ueberschrift 3
+RES_POOLCOLL_HEADLINE4, // Ueberschrift 4
+RES_POOLCOLL_HEADLINE5, // Ueberschrift 5
+RES_POOLCOLL_HEADLINE6, // Ueberschrift 6
+RES_POOLCOLL_HEADLINE7, // Ueberschrift 7
+RES_POOLCOLL_HEADLINE8, // Ueberschrift 8
+RES_POOLCOLL_HEADLINE9, // Ueberschrift 9
+RES_POOLCOLL_HEADLINE10, // Ueberschrift 10
+
+RES_POOLCOLL_TEXT_END,
+
+
+// Gruppe Listen
+RES_POOLCOLL_LISTS_BEGIN = COLL_LISTS_BITS,
+
+RES_POOLCOLL_NUMBUL_BASE = RES_POOLCOLL_LISTS_BEGIN, // Basis-Liste
+
+ // Untergruppe Nummerierung
+RES_POOLCOLL_NUM_LEVEL1S, // Start Level1
+RES_POOLCOLL_NUM_LEVEL1, // 1. Level
+RES_POOLCOLL_NUM_LEVEL1E, // Ende Level1
+RES_POOLCOLL_NUM_NONUM1, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL2S, // Start 2. Level
+RES_POOLCOLL_NUM_LEVEL2, // 2. Level
+RES_POOLCOLL_NUM_LEVEL2E, // Ende 2. Level
+RES_POOLCOLL_NUM_NONUM2, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL3S, // Start 3. Level
+RES_POOLCOLL_NUM_LEVEL3, // 3. Level
+RES_POOLCOLL_NUM_LEVEL3E, // Ende 3. Level
+RES_POOLCOLL_NUM_NONUM3, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL4S, // Start 4. Level
+RES_POOLCOLL_NUM_LEVEL4, // 4. Level
+RES_POOLCOLL_NUM_LEVEL4E, // Ende 4. Level
+RES_POOLCOLL_NUM_NONUM4, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL5S, // Start 5. Level
+RES_POOLCOLL_NUM_LEVEL5, // 5. Level
+RES_POOLCOLL_NUM_LEVEL5E, // Ende 5. Level
+RES_POOLCOLL_NUM_NONUM5, // keine Nummerierung
+
+ // Untergruppe Aufzaehlung
+RES_POOLCOLL_BUL_LEVEL1S, // Start Level1
+RES_POOLCOLL_BUL_LEVEL1, // 1. Level
+RES_POOLCOLL_BUL_LEVEL1E, // Ende Level1
+RES_POOLCOLL_BUL_NONUM1, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL2S, // Start 2. Level
+RES_POOLCOLL_BUL_LEVEL2, // 2. Level
+RES_POOLCOLL_BUL_LEVEL2E, // Ende 2. Level
+RES_POOLCOLL_BUL_NONUM2, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL3S, // Start 3. Level
+RES_POOLCOLL_BUL_LEVEL3, // 3. Level
+RES_POOLCOLL_BUL_LEVEL3E, // Ende 3. Level
+RES_POOLCOLL_BUL_NONUM3, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL4S, // Start 4. Level
+RES_POOLCOLL_BUL_LEVEL4, // 4. Level
+RES_POOLCOLL_BUL_LEVEL4E, // Ende 4. Level
+RES_POOLCOLL_BUL_NONUM4, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL5S, // Start 5. Level
+RES_POOLCOLL_BUL_LEVEL5, // 5. Level
+RES_POOLCOLL_BUL_LEVEL5E, // Ende 5. Level
+RES_POOLCOLL_BUL_NONUM5, // keine Nummerierung
+
+RES_POOLCOLL_LISTS_END,
+
+
+// Sonderbereiche
+RES_POOLCOLL_EXTRA_BEGIN = COLL_EXTRA_BITS,
+
+ // Untergruppe Header
+RES_POOLCOLL_HEADER = RES_POOLCOLL_EXTRA_BEGIN, // Header Left&Right
+RES_POOLCOLL_HEADERL, // Header Left
+RES_POOLCOLL_HEADERR, // Header Right
+
+ // Untergruppe Footer
+RES_POOLCOLL_FOOTER, // Footer Left&Right
+RES_POOLCOLL_FOOTERL, // Footer Left
+RES_POOLCOLL_FOOTERR, // Footer Right
+
+ // Untergruppe Tabelle
+RES_POOLCOLL_TABLE, // Tabelle "Inhalt"
+RES_POOLCOLL_TABLE_HDLN, // Tabellen-Headline
+
+
+ // Untergruppe Beschriftung
+RES_POOLCOLL_LABEL, // Beschriftung-Basis
+RES_POOLCOLL_LABEL_ABB, // Beschriftung-Abbildung
+RES_POOLCOLL_LABEL_TABLE, // Beschriftung-Tabelle
+RES_POOLCOLL_LABEL_FRAME, // Beschriftung-Rahmen
+
+ // sonstiges
+RES_POOLCOLL_FRAME, // Rahmen
+RES_POOLCOLL_FOOTNOTE, // Fussnoten
+RES_POOLCOLL_JAKETADRESS, // UmschlagAdresse
+RES_POOLCOLL_SENDADRESS, // AbsenderAdresse
+RES_POOLCOLL_ENDNOTE, // Endnoten
+
+RES_POOLCOLL_LABEL_DRAWING, // Beschriftung-Zeichen-Objekte
+RES_POOLCOLL_EXTRA_END,
+
+
+// Gruppe Verzeichnisse
+RES_POOLCOLL_REGISTER_BEGIN = COLL_REGISTER_BITS,
+
+RES_POOLCOLL_REGISTER_BASE = RES_POOLCOLL_REGISTER_BEGIN, // Basis-Verzeichnis
+
+ // Untergruppe Index-Verzeichnisse
+RES_POOLCOLL_TOX_IDXH, // Header
+RES_POOLCOLL_TOX_IDX1, // 1. Ebene
+RES_POOLCOLL_TOX_IDX2, // 2. Ebene
+RES_POOLCOLL_TOX_IDX3, // 3. Ebene
+RES_POOLCOLL_TOX_IDXBREAK, // Trenner
+
+ // Untergruppe Inhalts-Verzeichnisse
+RES_POOLCOLL_TOX_CNTNTH, // Header
+RES_POOLCOLL_TOX_CNTNT1, // 1. Ebene
+RES_POOLCOLL_TOX_CNTNT2, // 2. Ebene
+RES_POOLCOLL_TOX_CNTNT3, // 3. Ebene
+RES_POOLCOLL_TOX_CNTNT4, // 4. Ebene
+RES_POOLCOLL_TOX_CNTNT5, // 5. Ebene
+
+ // Untergruppe Benutzer-Verzeichnisse:
+RES_POOLCOLL_TOX_USERH, // Header
+RES_POOLCOLL_TOX_USER1, // 1. Ebene
+RES_POOLCOLL_TOX_USER2, // 2. Ebene
+RES_POOLCOLL_TOX_USER3, // 3. Ebene
+RES_POOLCOLL_TOX_USER4, // 4. Ebene
+RES_POOLCOLL_TOX_USER5, // 5. Ebene
+
+
+RES_POOLCOLL_TOX_CNTNT6, // Inhalt 6. Ebene
+RES_POOLCOLL_TOX_CNTNT7, // Inhalt 7. Ebene
+RES_POOLCOLL_TOX_CNTNT8, // Inhalt 8. Ebene
+RES_POOLCOLL_TOX_CNTNT9, // Inhalt 9. Ebene
+RES_POOLCOLL_TOX_CNTNT10, // Inhalt 10. Ebene
+
+// illustrations index
+RES_POOLCOLL_TOX_ILLUSH, // illustrations header
+RES_POOLCOLL_TOX_ILLUS1, // illustrations all levels
+
+// object index
+RES_POOLCOLL_TOX_OBJECTH, // objects header
+RES_POOLCOLL_TOX_OBJECT1, // objects all levels
+
+// tables index
+RES_POOLCOLL_TOX_TABLESH, // tables header
+RES_POOLCOLL_TOX_TABLES1, // tables all levels
+
+// index of authorities
+RES_POOLCOLL_TOX_AUTHORITIESH, // authorities header
+RES_POOLCOLL_TOX_AUTHORITIES1, // authorities all levels
+
+// user index 6..10
+RES_POOLCOLL_TOX_USER6, // level 6
+RES_POOLCOLL_TOX_USER7, // level 7
+RES_POOLCOLL_TOX_USER8, // level 8
+RES_POOLCOLL_TOX_USER9, // level 9
+RES_POOLCOLL_TOX_USER10, // level 10
+
+RES_POOLCOLL_REGISTER_END,
+
+
+// Gruppe Kapitel/Dokument
+RES_POOLCOLL_DOC_BEGIN = COLL_DOC_BITS,
+
+RES_POOLCOLL_DOC_TITEL = RES_POOLCOLL_DOC_BEGIN, // Doc. Titel
+RES_POOLCOLL_DOC_SUBTITEL, // Doc. UnterTitel
+
+RES_POOLCOLL_DOC_END,
+
+// Gruppe HTML-Vorlagen
+RES_POOLCOLL_HTML_BEGIN = COLL_HTML_BITS,
+
+RES_POOLCOLL_HTML_BLOCKQUOTE = RES_POOLCOLL_HTML_BEGIN,
+RES_POOLCOLL_HTML_PRE,
+RES_POOLCOLL_HTML_HR,
+RES_POOLCOLL_HTML_DD,
+RES_POOLCOLL_HTML_DT,
+
+RES_POOLCOLL_HTML_END
+
+// Ende der Textformat-Vorlagen Sammlung
+};
+
+
+
+// erfrage den definierten Parent zu einer POOL-Id
+// returnt: 0 -> Standard
+// USHRT_MAX -> kein Parent
+// sonst -> den Parent
+USHORT GetPoolParent( USHORT nId );
+
+SvxFrameDirection GetDefaultFrameDirection(ULONG nLanguage);
+
+inline BOOL IsConditionalByPoolId(USHORT nId)
+ {
+ return RES_POOLCOLL_TEXT == nId;
+ }
+// die Id's fuer die Grafik-Formate
+/*enum RES_POOL_GRFFMT_TYPE
+{
+RES_POOLGRF_BEGIN = RES_POOLPAR_END,
+RES_POOLGRF_1 = RES_POOLGRF_BEGIN,
+RES_POOLGRF_END
+};
+*/
+
+#endif
diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx
new file mode 100644
index 000000000000..5ddf9c1458fb
--- /dev/null
+++ b/sw/inc/postit.hxx
@@ -0,0 +1,417 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postit.hxx,v $
+ *
+ * $Revision: 1.8.84.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _POSTIT_HXX
+#define _POSTIT_HXX
+
+#include <postithelper.hxx>
+
+#include <vcl/window.hxx>
+#include <swrect.hxx>
+#include <svx/sdr/overlay/overlayobject.hxx>
+
+#include <tools/datetime.hxx>
+#include <tools/date.hxx>
+
+#include <vcl/lineinfo.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <svx/editstat.hxx>
+
+class SwPostItMgr;
+class SwPostItField;
+class SwFmtFld;
+class OutlinerView;
+class Outliner;
+class ScrollBar;
+class SwEditWin;
+class SwView;
+class SwPostIt;
+class Edit;
+class MultiLineEdit;
+class PopupMenu;
+class SvxLanguageItem;
+class SwRedline;
+class OutlinerParaObject;
+
+#define ANKORLINE_WIDTH 1
+
+enum AnkorState {AS_ALL, AS_START, AS_END,AS_TRI};
+
+class SwPostItAnkor: public sdr::overlay::OverlayObjectWithBasePosition
+{
+ protected:
+ /* 6------------7
+ 1 /
+ /4\ ---------------5
+ 2 - 3
+ */
+
+ basegfx::B2DPoint maSecondPosition;
+ basegfx::B2DPoint maThirdPosition;
+ basegfx::B2DPoint maFourthPosition;
+ basegfx::B2DPoint maFifthPosition;
+ basegfx::B2DPoint maSixthPosition;
+ basegfx::B2DPoint maSeventhPosition;
+
+ // helpers to fill and reset geometry
+ void implEnsureGeometry();
+ void implResetGeometry();
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ private:
+ // object's geometry
+ basegfx::B2DPolygon maTriangle;
+ basegfx::B2DPolygon maLine;
+ basegfx::B2DPolygon maLineTop;
+ unsigned long mHeight;
+ AnkorState mAnkorState;
+
+ // bitfield
+ unsigned mbShadowedEffect : 1;
+ unsigned mbLineSolid : 1;
+
+ public:
+ SwPostItAnkor(const basegfx::B2DPoint& rBasePos,
+ const basegfx::B2DPoint& rSecondPos,
+ const basegfx::B2DPoint& rThirdPos,
+ const basegfx::B2DPoint& rFourthPos,
+ const basegfx::B2DPoint& rFifthPos,
+ const basegfx::B2DPoint& rSixthPos,
+ const basegfx::B2DPoint& rSeventhPos,
+ Color aBaseColor,
+ bool bShadowedEffect,
+ bool bLineSolid);
+ virtual ~SwPostItAnkor();
+
+ const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
+ const basegfx::B2DPoint& GetThirdPosition() const { return maThirdPosition; }
+ const basegfx::B2DPoint& GetFourthPosition() const { return maFourthPosition; }
+ const basegfx::B2DPoint& GetFifthPosition() const { return maFifthPosition; }
+ const basegfx::B2DPoint& GetSixthPosition() const { return maSixthPosition; }
+ const basegfx::B2DPoint& GetSeventhPosition() const { return maSeventhPosition; }
+
+ void SetAllPosition(const basegfx::B2DPoint& rPoint1, const basegfx::B2DPoint& rPoint2, const basegfx::B2DPoint& rPoint3,
+ const basegfx::B2DPoint& rPoint4, const basegfx::B2DPoint& rPoint5, const basegfx::B2DPoint& rPoint6, const basegfx::B2DPoint& rPoint7);
+ void SetTriPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2,const basegfx::B2DPoint& rPoint3,
+ const basegfx::B2DPoint& rPoint4,const basegfx::B2DPoint& rPoint5);
+ void SetSixthPosition(const basegfx::B2DPoint& rNew);
+ void SetSeventhPosition(const basegfx::B2DPoint& rNew);
+
+ bool getLineSolid() const { return mbLineSolid; }
+ void setLineSolid(bool bNew);
+
+ void SetHeight(const unsigned long aHeight) {mHeight = aHeight;};
+
+ bool getShadowedEffect() const { return mbShadowedEffect; }
+
+ void SetAnkorState(AnkorState aState);
+ AnkorState GetAnkorState() const {return mAnkorState;}
+};
+
+enum ShadowState {SS_NORMAL, SS_VIEW, SS_EDIT};
+
+class SwPostItShadow: public sdr::overlay::OverlayObjectWithBasePosition
+{
+ protected:
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ private:
+ basegfx::B2DPoint maSecondPosition;
+ ShadowState mShadowState;
+
+ public:
+ SwPostItShadow(const basegfx::B2DPoint& rBasePos, const basegfx::B2DPoint& rSecondPosition, Color aBaseColor,ShadowState aState);
+ virtual ~SwPostItShadow();
+
+ void SetShadowState(ShadowState aState);
+ ShadowState GetShadowState() {return mShadowState;}
+
+ const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; }
+ void SetSecondPosition(const basegfx::B2DPoint& rNew);
+ void SetPosition(const basegfx::B2DPoint& rPoint1,const basegfx::B2DPoint& rPoint2);
+};
+
+class PostItTxt : public Window
+{
+ private:
+ OutlinerView* mpOutlinerView;
+ SwMarginWin* mpMarginWin;
+
+ bool mMouseOver;
+ BOOL mbShowPopup;
+
+ protected:
+ virtual void Paint( const Rectangle& rRect);
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void DataChanged( const DataChangedEvent& aData);
+ virtual void LoseFocus();
+ virtual void RequestHelp(const HelpEvent &rEvt);
+ virtual XubString GetSurroundingText() const;
+ virtual Selection GetSurroundingTextSelection() const;
+
+ DECL_LINK( Select, Menu* );
+
+ public:
+ PostItTxt(Window* pParent, WinBits nBits);
+ ~PostItTxt();
+
+ virtual void GetFocus();
+ void SetTextView( OutlinerView* aEditView ) { mpOutlinerView = aEditView; }
+
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+ DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
+};
+
+typedef sal_Int64 SwPostItBits;
+
+#define PB_Preview ((SwPostItBits)0x00000001)
+
+
+class SwMarginWin : public Window
+{
+ private:
+ ULONG mnEventId;
+ SwView* mpView;
+ sdr::overlay::OverlayManager* pOverlayManager;
+ OutlinerView* mpOutlinerView;
+ Outliner* mpOutliner;
+ PostItTxt* mpPostItTxt;
+ MultiLineEdit* mpMeta;
+ ScrollBar* mpVScrollbar;
+ SwPostItAnkor* mpAnkor;
+ SwPostItShadow* mpShadow;
+ SwPostItMgr* mpMgr;
+ bool mbMeta;
+ Color mColorAnkor;
+ Color mColorDark;
+ Color mColorLight;
+ basegfx::B2DPolygon aPopupTriangle;
+ bool mbMarginSide;
+ Rectangle mPosSize;
+ SwRect mAnkorRect;
+ long mPageBorder;
+ SwPostItBits nFlags;
+ bool mbMouseOverButton;
+
+ protected:
+ bool mbReadonly;
+ PopupMenu* mpButtonPopup;
+ bool mbIsFollow;
+ Rectangle mRectMetaButton;
+ virtual void DataChanged( const DataChangedEvent& aEvent);
+ virtual void LoseFocus();
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& rRect);
+ virtual void GetFocus();
+
+ void SetSizePixel( const Size& rNewSize );
+ SfxItemSet DefaultItem();
+
+ DECL_LINK(ModifyHdl, void*);
+ DECL_LINK(ScrollHdl, ScrollBar*);
+ DECL_LINK(DeleteHdl, void*);
+
+ public:
+ TYPEINFO();
+ SwMarginWin( Window* pParent, WinBits nBits, SwPostItMgr* aMgr,SwPostItBits aBits);
+ virtual ~SwMarginWin();
+
+ void SetSize( const Size& rNewSize );
+ void SetPosSizePixelRect( long nX, long nY,long nWidth, long nHeight,const SwRect &aRect,const long PageBorder);
+ void SetPosAndSize();
+ void TranslateTopPosition(const long aAmount);
+ virtual void CheckMetaText();
+
+ PostItTxt* PostItText() { return mpPostItTxt;}
+ ScrollBar* Scrollbar() { return mpVScrollbar;}
+ SwPostItAnkor* Ankor() { return mpAnkor;}
+ SwPostItShadow* Shadow() { return mpShadow;}
+ OutlinerView* View() { return mpOutlinerView;}
+ SwView* DocView() { return mpView;}
+ Outliner* Engine() { return mpOutliner;}
+ SwPostItMgr* Mgr() { return mpMgr; }
+
+ SwRect GetAnkorRect() { return mAnkorRect; }
+ SwEditWin* EditWin();
+
+ long GetPostItTextHeight();
+
+ void SwitchToPostIt(USHORT aDirection);
+ //void SwitchToPostIt(bool aDirection);
+ virtual void SwitchToFieldPos();
+ virtual sal_uInt32 MoveCaret() { return 0;};
+
+ virtual void UpdateData() = 0;
+ virtual void SetPostItText() = 0;
+ virtual void Delete();
+ virtual void GotoPos() = 0;
+ virtual void SetPopup() = 0;
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ void ExecuteCommand(USHORT nSlot);
+ void InitControls();
+ void HidePostIt();
+ void DoResize();
+ void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
+ void SetScrollbar();
+
+ void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
+ const Point VirtualPos() { return mPosSize.TopLeft(); }
+ const Size VirtualSize() { return mPosSize.GetSize(); }
+
+ void ShowAnkorOnly(const Point &aPoint);
+ void ShowNote();
+ void HideNote();
+
+ void ResetAttributes();
+
+ void SetMarginSide(bool aMarginSide);
+ void SetReadonly(BOOL bSet);
+ BOOL IsReadOnly() { return mbReadonly;}
+ bool IsPreview() { return nFlags & PB_Preview;}
+
+ void SetLanguage(const SvxLanguageItem aNewItem);
+ virtual SvxLanguageItem GetLanguage(void);
+
+ void SetColor(Color aColorDark,Color aColorLight, Color aColorAnkor);
+ Color ColorDark() { return mColorDark; }
+ Color ColorLight() { return mColorLight; }
+ void Rescale();
+
+ void SetViewState(ShadowState bState);
+
+ bool IsFollow() { return mbIsFollow; }
+ void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow;};
+ virtual bool CalcFollow();
+
+ SwMarginWin* GetTopReplyNote();
+ bool IsAnyStackParentVisible();
+
+ sal_Int32 GetMetaHeight();
+ sal_Int32 GetMinimumSizeWithMeta();
+ sal_Int32 GetMinimumSizeWithoutMeta();
+ sal_Int32 GetMetaButtonAreaWidth();
+ sal_Int32 GetScrollbarWidth();
+
+ void SetSpellChecking();
+
+ void ToggleInsMode();
+
+ virtual void ActivatePostIt();
+ virtual void DeactivatePostIt();
+
+ virtual SwPostItHelper::SwLayoutStatus GetStatus() { return SwPostItHelper::NONE; }
+
+ virtual bool IsProtected() {return mbReadonly;};
+};
+
+// implementation for change tracking comments, fully functional, but not yet used
+/*
+class SwRedComment : public SwMarginWin
+{
+ private:
+ SwRedline* pRedline;
+
+ protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ public:
+ TYPEINFO();
+ SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed);
+ virtual ~SwRedComment() {};
+
+ virtual void UpdateData();
+ virtual void SetPostItText();
+ virtual void Delete();
+ virtual void GotoPos();
+ virtual void SetPopup();
+ virtual void ActivatePostIt();
+ virtual void DeactivatePostIt();
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ virtual bool IsProtected();
+};
+*/
+class SwPostIt : public SwMarginWin
+{
+ private:
+ SwFmtFld* mpFmtFld;
+ SwPostItField* mpFld;
+ SwPostItHelper::SwLayoutStatus mStatus;
+ Color mChangeColor;
+
+ protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ public:
+ TYPEINFO();
+ SwPostIt( Window* pParent, WinBits nBits,SwFmtFld* aField,SwPostItMgr* aMgr,SwPostItBits aBits);
+ virtual ~SwPostIt() {};
+
+ virtual void UpdateData();
+ virtual void SetPostItText();
+ virtual void Delete();
+ virtual void GotoPos();
+ virtual void SetPopup();
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ virtual sal_uInt32 MoveCaret();
+
+ void SetChangeTracking(SwPostItHelper::SwLayoutStatus& aStatus,Color aColor);
+ virtual SwPostItHelper::SwLayoutStatus GetStatus() { return mStatus; }
+ Color GetChangeColor() { return mChangeColor; }
+
+ sal_uInt32 CountFollowing();
+ virtual bool CalcFollow();
+ void InitAnswer(OutlinerParaObject* pText);
+
+ virtual SvxLanguageItem GetLanguage(void);
+
+ virtual bool IsProtected();
+};
+
+#endif
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
new file mode 100644
index 000000000000..3f36c6015f6c
--- /dev/null
+++ b/sw/inc/postithelper.hxx
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: postithelper.hxx,v $
+ * $Revision: 1.2.118.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _POSTITHELPER_HXX
+#define _POSTITHELPER_HXX
+
+#include <swrect.hxx>
+#include <fmtfld.hxx>
+#include <redline.hxx>
+#include <vector>
+#include <vcl/window.hxx>
+#include <svtools/brdcst.hxx>
+
+class SwTxtFld;
+class SwRootFrm;
+class SwPostIt;
+class String;
+class SwMarginWin;
+class SwPostItMgr;
+
+struct SwPosition;
+
+typedef sal_Int64 SwPostItBits;
+
+struct SwLayoutInfo
+{
+ SwRect mPosition;
+ SwRect mPageFrame;
+ SwRect mPagePrtArea;
+ unsigned long mnPageNumber;
+ bool mbMarginSide;
+ USHORT mRedlineAuthor;
+};
+
+namespace SwPostItHelper
+{
+ enum SwLayoutStatus
+ {
+ INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN
+ };
+
+ SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& );
+ SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwTxtFld* );
+ long getLayoutHeight( const SwRootFrm* pRoot );
+ void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode );
+ unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& );
+}
+
+class SwMarginItem
+{
+public:
+ SwMarginWin* pPostIt;
+ bool bShow;
+ bool bFocus;
+ bool bMarginSide;
+ SwRect mPos;
+ SwRect mFramePos;
+ SwRect mPagePos;
+ unsigned long mnPageNumber;
+ SwPostItHelper::SwLayoutStatus mLayoutStatus;
+ USHORT mRedlineAuthor;
+ SwMarginItem(bool aShow, bool aFocus)
+ : pPostIt(0),
+ bShow(aShow),
+ bFocus(aFocus),
+ bMarginSide(false),
+ mnPageNumber(1),
+ mLayoutStatus( SwPostItHelper::INVISIBLE ),
+ mRedlineAuthor(0)
+ {}
+ virtual ~SwMarginItem(){}
+ virtual SwPosition GetPosition() = 0;
+ virtual bool UseElement() = 0;
+ virtual SwFmtFld* GetFmtFld() = 0;
+ virtual SfxBroadcaster* GetBroadCaster() const = 0;
+ virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits) = 0;
+};
+/*
+class SwRedCommentItem: public SwMarginItem
+{
+private:
+ SwRedline* pRedline;
+public:
+
+ SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
+ : SwMarginItem(aShow,aFocus),
+ pRedline(pRed) {}
+ virtual ~SwRedCommentItem() {}
+ virtual SwPosition GetPosition();
+ virtual bool UseElement();
+ virtual SwFmtFld* GetFmtFld() {return 0; }
+ virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
+ virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits);
+};
+*/
+
+class SwPostItItem: public SwMarginItem
+{
+ private:
+ SwFmtFld* pFmtFld;
+
+ public:
+ SwPostItItem( SwFmtFld* p, bool aShow, bool aFocus)
+ : SwMarginItem(aShow,aFocus) ,
+ pFmtFld(p)
+ {
+ }
+ virtual ~SwPostItItem() {}
+ virtual SwPosition GetPosition();
+ virtual bool UseElement();
+ virtual SwFmtFld* GetFmtFld() {return pFmtFld;}
+ virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); }
+ virtual SwMarginWin* GetMarginWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits);
+};
+
+#endif // _POSTITHELPER_HXX
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
new file mode 100644
index 000000000000..03a79281932c
--- /dev/null
+++ b/sw/inc/printdata.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: printdata.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_PRINTDATA_HXX
+#define _SW_PRINTDATA_HXX
+
+
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+
+struct SwPrintData
+{
+ sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground,
+ bPrintBlackFont,
+ //#i81434# - printing of hidden text
+ bPrintHiddenText, bPrintTextPlaceholder,
+ bPrintLeftPage, bPrintRightPage, bPrintReverse, bPrintProspect,
+ bPrintProspect_RTL,
+ bPrintSingleJobs, bPaperFromSetup,
+ // --> FME 2005-12-13 #b6354161# Print empty pages
+ bPrintEmptyPages,
+ // <--
+ // #i56195# no field update while printing mail merge documents
+ bUpdateFieldsInPrinting,
+ bModified;
+
+ sal_Int16 nPrintPostIts;
+ rtl::OUString sFaxName;
+
+ SwPrintData()
+ {
+ bPrintGraphic =
+ bPrintTable =
+ bPrintDraw =
+ bPrintControl =
+ bPrintLeftPage =
+ bPrintRightPage =
+ bPrintPageBackground =
+ bPrintEmptyPages =
+ bUpdateFieldsInPrinting = sal_True;
+
+ bPaperFromSetup =
+ bPrintReverse =
+ bPrintProspect =
+ bPrintProspect_RTL =
+ bPrintSingleJobs =
+ bModified =
+ bPrintBlackFont =
+ bPrintHiddenText =
+ bPrintTextPlaceholder = sal_False;
+
+ nPrintPostIts = 0;
+ }
+
+ virtual ~SwPrintData() {}
+
+ sal_Bool operator==(const SwPrintData& rData)const
+ {
+ return
+ bPrintGraphic == rData.bPrintGraphic &&
+ bPrintTable == rData.bPrintTable &&
+ bPrintDraw == rData.bPrintDraw &&
+ bPrintControl == rData.bPrintControl &&
+ bPrintPageBackground== rData.bPrintPageBackground&&
+ bPrintBlackFont == rData.bPrintBlackFont &&
+ bPrintLeftPage == rData.bPrintLeftPage &&
+ bPrintRightPage == rData.bPrintRightPage &&
+ bPrintReverse == rData.bPrintReverse &&
+ bPrintProspect == rData.bPrintProspect &&
+ bPrintProspect_RTL == rData.bPrintProspect_RTL &&
+ bPrintSingleJobs == rData.bPrintSingleJobs &&
+ bPaperFromSetup == rData.bPaperFromSetup &&
+ bPrintEmptyPages == rData.bPrintEmptyPages &&
+ bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting &&
+ nPrintPostIts == rData.nPrintPostIts &&
+ sFaxName == rData.sFaxName &&
+ bPrintHiddenText == rData.bPrintHiddenText &&
+ bPrintTextPlaceholder == rData.bPrintTextPlaceholder;
+ }
+ sal_Bool IsPrintGraphic() const { return bPrintGraphic; }
+ sal_Bool IsPrintTable() const { return bPrintTable; }
+ sal_Bool IsPrintDraw() const { return bPrintDraw; }
+ sal_Bool IsPrintControl() const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage() const { return bPrintLeftPage; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPage; }
+ sal_Bool IsPrintReverse() const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const{ return bPrintEmptyPages; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspect_RTL() const { return bPrintProspect_RTL; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont;}
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs;}
+ sal_Int16 GetPrintPostIts() const { return nPrintPostIts; }
+ const rtl::OUString GetFaxName() const{return sFaxName;}
+ sal_Bool IsPrintHiddenText() const {return bPrintHiddenText;}
+ sal_Bool IsPrintTextPlaceholder() const {return bPrintTextPlaceholder;}
+
+ void SetPrintGraphic ( sal_Bool b ) { doSetModified(); bPrintGraphic = b;}
+ void SetPrintTable ( sal_Bool b ) { doSetModified(); bPrintTable = b;}
+ void SetPrintDraw ( sal_Bool b ) { doSetModified(); bPrintDraw = b;}
+ void SetPrintControl ( sal_Bool b ) { doSetModified(); bPrintControl = b; }
+ void SetPrintLeftPage ( sal_Bool b ) { doSetModified(); bPrintLeftPage = b;}
+ void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPage = b;}
+ void SetPrintReverse ( sal_Bool b ) { doSetModified(); bPrintReverse = b;}
+ void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b;}
+ void SetPrintEmptyPages(sal_Bool b ) { doSetModified(); bPrintEmptyPages = b;}
+ void SetPrintPostIts ( sal_Int16 n){ doSetModified(); nPrintPostIts = n; }
+ void SetPrintProspect ( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
+ void SetPrintProspect_RTL ( sal_Bool b ) { doSetModified(); bPrintProspect_RTL = b; }
+ void SetPrintPageBackground(sal_Bool b){ doSetModified(); bPrintPageBackground = b;}
+ void SetPrintBlackFont(sal_Bool b){ doSetModified(); bPrintBlackFont = b;}
+ void SetPrintSingleJobs(sal_Bool b){ doSetModified(); bPrintSingleJobs = b;}
+ void SetFaxName(const rtl::OUString& rSet){sFaxName = rSet;}
+ void SetPrintHiddenText(sal_Bool b){ doSetModified(); bPrintHiddenText = b;}
+ void SetPrintTextPlaceholder(sal_Bool b){ doSetModified(); bPrintTextPlaceholder = b;}
+ virtual void doSetModified () { bModified = sal_True;}
+};
+
+#endif //_SW_PRINTDATA_HXX
diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx
new file mode 100644
index 000000000000..dce5a19b52f9
--- /dev/null
+++ b/sw/inc/pvprtdat.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pvprtdat.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _PVPRTDAT_HXX
+#define _PVPRTDAT_HXX
+
+
+#include <tools/solar.h>
+
+class SwPagePreViewPrtData
+{
+ ULONG nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
+ nHorzSpace, nVertSpace;
+ BYTE nRow, nCol;
+ BOOL bLandscape : 1;
+ BOOL bStretch : 1;
+public:
+ SwPagePreViewPrtData()
+ : nLeftSpace(0), nRightSpace(0), nTopSpace(0), nBottomSpace(0),
+ nHorzSpace(0), nVertSpace(0), nRow(1), nCol(1),
+ bLandscape(0),bStretch(0)
+ {}
+
+ ULONG GetLeftSpace() const { return nLeftSpace; }
+ void SetLeftSpace( ULONG n ) { nLeftSpace = n; }
+
+ ULONG GetRightSpace() const { return nRightSpace; }
+ void SetRightSpace( ULONG n ) { nRightSpace = n; }
+
+ ULONG GetTopSpace() const { return nTopSpace; }
+ void SetTopSpace( ULONG n ) { nTopSpace = n; }
+
+ ULONG GetBottomSpace() const { return nBottomSpace; }
+ void SetBottomSpace( ULONG n ) { nBottomSpace = n; }
+
+ ULONG GetHorzSpace() const { return nHorzSpace; }
+ void SetHorzSpace( ULONG n ) { nHorzSpace = n; }
+
+ ULONG GetVertSpace() const { return nVertSpace; }
+ void SetVertSpace( ULONG n ) { nVertSpace = n; }
+
+ BYTE GetRow() const { return nRow; }
+ void SetRow(BYTE n ) { nRow = n; }
+
+ BYTE GetCol() const { return nCol; }
+ void SetCol( BYTE n ) { nCol = n; }
+
+ BOOL GetLandscape() const { return bLandscape; }
+ void SetLandscape( BOOL b ) { bLandscape = b; }
+};
+
+
+#endif
+
+
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
new file mode 100644
index 000000000000..3c0dbf7007d9
--- /dev/null
+++ b/sw/inc/rcid.hrc
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: rcid.hrc,v $
+ * $Revision: 1.15 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _RDIC_HRC
+#define _RDIC_HRC
+
+#ifndef _SFXSIDS_HRC //autogen
+#include <sfx2/sfxsids.hrc>
+#endif
+
+#define IMAGE_MASK_COLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }
+// ----------------------------------------------------------------
+// Bereiche fuer die UI-Verzeichnisse
+// ----------------------------------------------------------------
+
+#define RC_BASE RID_SW_START // aus solar.hrc
+
+#define RC_APP RC_BASE
+#define RC_DIALOG (RC_BASE + 200)
+#define RC_DOCVW (RC_BASE + 300)
+#define RC_WEB (RC_BASE + 400)
+#define RC_GLOBDOC (RC_BASE + 500)
+#define RC_VIEW (RC_BASE + 600)
+#define RC_CHRDLG (RC_BASE + 700)
+#define RC_RIBBAR (RC_BASE + 720)
+#define RC_GLOBALS (RC_BASE + 800)
+#define RC_FMTUI (RC_BASE + 920)
+#define RC_FRMDLG (RC_BASE + 1000)
+#define RC_FLDDLG (RC_BASE + 1100)
+#define RC_UTLUI (RC_BASE + 1250)
+#define RC_ATTR (RC_BASE + 1350)
+#define RC_TABLE (RC_BASE + 1450)
+#define RC_CONFIG (RC_BASE + 1550)
+#define RC_MISC (RC_BASE + 1650)
+#define RC_WRTSH (RC_BASE + 1750)
+#define RC_INDEX (RC_BASE + 1950)
+#define RC_DBUI (RC_BASE + 2050)
+#define RC_DOCHDL (RC_BASE + 2150)
+#define RC_POOLCHRFMT (RC_BASE + 2250)
+#define RC_POOLHTMLCHRFMT (RC_BASE + 2290)
+#define RC_POOLFRMFMT (RC_BASE + 2330)
+#define RC_POOLTXTCOLL (RC_BASE + 2360)
+#define RC_POOLPAGEDESC (RC_BASE + 2550)
+#define RC_POOLNUMRULE (RC_BASE + 2650)
+#define RC_ENVELP (RC_BASE + 2750)
+#define RC_STATLIN_STR (RC_BASE + 2850)
+#define RC_COMMON_CORE (RC_BASE + 2950)
+#define RC_WIZARD (RC_BASE + 3050)
+#define RC_POPUPS (RC_BASE + 3150)
+#define RC_SHELLS (RC_BASE + 3250)
+#define RC_CFGITEMS (RC_BASE + 3350)
+#define RC_LINGU (RC_BASE + 3450)
+#define RC_ACCESS (RC_BASE + 3550)
+#define STR_POOLPARSTYLE (RC_BASE + 3650)
+#define RC_UNDO (RC_BASE + 3750)
+#define RC_SMARTTAG (RC_BASE + 3950) // SMARTTAGS
+#define RC_UNOCORE (RC_BASE + 4050)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Bereiche ausspannen
+ --------------------------------------------------------------------*/
+
+// App-Verzeichnis
+#define RC_APP_BEGIN RC_APP
+#define RC_APP_END (RC_APP_BEGIN + 199)
+
+
+
+// Dialog-Verzeichnis
+#define RC_DIALOG_BEGIN RC_DIALOG
+#define RC_DIALOG_END (RC_DIALOG_BEGIN + 99)
+
+// Editwin & Co
+#define RC_DOCVW_BEGIN RC_DOCVW
+#define RC_DOCVW_END (RC_DOCVW_BEGIN + 99)
+
+// SW/Web
+#define RC_WEB_BEGIN RC_WEB
+#define RC_WEB_END (RC_WEB_BEGIN + 199)
+
+//Globaldocument
+#define RC_GLOBDOC_BEGIN RC_GLOBDOC
+#define RC_GLOBDOC_END (RC_GLOBDOC_BEGIN + 99)
+
+// UI-View
+#define RC_VIEW_BEGIN RC_VIEW
+#define RC_VIEW_END (RC_VIEW_BEGIN + 99)
+
+// Zeichen Absatz Tab-Dialog
+#define RC_CHRDLG_BEGIN RC_CHRDLG
+#define RC_CHRDLG_END (RC_CHRDLG_BEGIN + 19)
+
+// Unsere Shell
+#define RC_WRTSH_BEGIN RC_WRTSH
+#define RC_WRTSH_END (RC_WRTSH_BEGIN + 49)
+
+// Verzeichnisse
+#define RC_INDEX_BEGIN RC_INDEX
+#define RC_INDEX_END (RC_INDEX + 99)
+
+//
+#define RC_RIBBAR_BEGIN RC_RIBBAR
+#define RC_RIBBAR_END (RC_RIBBAR_BEGIN + 79)
+
+// globale Ressourcen
+#define RC_GLOBALS_BEGIN RC_GLOBALS
+#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 119)
+
+// Format-Vorlagen
+#define RC_FMTUI_BEGIN RC_FMTUI
+#define RC_FMTUI_END (RC_FMTUI_BEGIN + 69)
+
+
+// Grafik Dialoge
+#define RC_GRFDLG_BEGIN RC_GRFDLG
+#define RC_GRFDLG_END (RC_GRFDLG_BEGIN + 99)
+
+// ????
+#define RC_FSTDLG_BEGIN RC_FSTDLG
+#define RC_FSTDLG_END (RC_FSTDLG_BEGIN + 99)
+
+// Rahmen Dialoge
+#define RC_FRMDLG_BEGIN RC_FRMDLG
+#define RC_FRMDLG_END (RC_FRMDLG_BEGIN + 99)
+
+// Feld Dialoge
+#define RC_FLDDLG_BEGIN RC_FLDDLG
+#define RC_FLDDLG_END (RC_FLDDLG_BEGIN + 149)
+
+// Utilities UI
+#define RC_UTLUI_BEGIN RC_UTLUI
+#define RC_UTLUI_END (RC_UTLUI + 99)
+
+// Utilities UI-Attribute
+#define RC_ATTR_BEGIN RC_ATTR
+#define RC_ATTR_END (RC_ATTR + 99)
+
+// Tabellen
+#define RC_TABLE_BEGIN RC_TABLE
+#define RC_TABLE_END (RC_TABLE + 99)
+
+// Konfiguration
+#define RC_CONFIG_BEGIN RC_CONFIG
+#define RC_CONFIG_END (RC_CONFIG + 99)
+
+
+// Verschiedenes
+#define RC_MISC_BEGIN RC_MISC
+#define RC_MISC_END (RC_MISC + 99)
+
+// DBMgr
+#define RC_DBUI_BEGIN RC_DBUI
+#define RC_DBUI_END (RC_DBUI + 99)
+
+// Der Rest der Imp-Klassen
+#define RC_DOCHDL_BEGIN RC_DOCHDL
+#define RC_DOCHDL_END (RC_DOCHDL + 99)
+
+// Zeichenvorlagen
+#define RC_POOLCHRFMT_BEGIN RC_POOLCHRFMT
+#define RC_POOLCHRFMT_END (RC_POOLCHRFMT + 29)
+#define RC_POOLCHRFMT_HTML_BEGIN RC_POOLHTMLCHRFMT
+#define RC_POOLCHRFMT_HTML_END (RC_POOLHTMLCHRFMT+ 30)
+
+
+// Rahmenvorlagen
+#define RC_POOLFRMFMT_BEGIN RC_POOLFRMFMT
+#define RC_POOLFRMFMT_END (RC_POOLFRMFMT + 20)
+
+// Collections
+#define RC_POOLTXTCOLL_BEGIN RC_POOLTXTCOLL
+
+#define RC_POOLCOLL_TEXT_BEGIN RC_POOLTXTCOLL
+#define RC_POOLCOLL_TEXT_END (RC_POOLTXTCOLL + 19)
+#define RC_POOLCOLL_LISTS_BEGIN (RC_POOLTXTCOLL + 20)
+#define RC_POOLCOLL_LISTS_END (RC_POOLTXTCOLL + 69)
+#define RC_POOLCOLL_EXTRA_BEGIN (RC_POOLTXTCOLL + 70)
+#define RC_POOLCOLL_EXTRA_END (RC_POOLTXTCOLL + 89)
+#define RC_POOLCOLL_REGISTER_BEGIN (RC_POOLTXTCOLL + 90)
+#define RC_POOLCOLL_REGISTER_END (RC_POOLTXTCOLL + 119)
+#define RC_POOLCOLL_DOC_BEGIN (RC_POOLTXTCOLL + 130)
+#define RC_POOLCOLL_DOC_END (RC_POOLTXTCOLL + 139)
+#define RC_POOLCOLL_HTML_BEGIN (RC_POOLTXTCOLL + 140)
+#define RC_POOLCOLL_HTML_END (RC_POOLTXTCOLL + 169)
+
+#define RC_POOLTXTCOLL_END RC_POOLCOLL_HTML_END
+
+// Poolvorlagen Seite
+#define RC_POOLPAGEDESC_BEGIN RC_POOLPAGEDESC
+#define RC_POOLPAGEDESC_END (RC_POOLPAGEDESC + 10)
+
+// Poolvorlagen Numerierung
+#define RC_POOLNUMRULE_BEGIN RC_POOLNUMRULE
+#define RC_POOLNUMRULE_END (RC_POOLNUMRULE + 10)
+
+// Pooltemplate Paragraph
+#define STR_POOLPARSTYLE_BEGIN STR_POOLPARSTYLE
+#define STR_POOLPARSTYLE_END (STR_POOLPARSTYLE + 9)
+
+// Envelp-Verzeichnis
+#define RC_ENVELP_BEGIN (RC_ENVELP )
+#define RC_ENVELP_END (RC_ENVELP + 99)
+
+// Statuszeile mit Laufbalken
+#define RC_STATLIN_STR_BEGIN (RC_STATLIN_STR)
+#define RC_STATLIN_STR_END (RC_STATLIN_STR + 49)
+
+// Gemeinsame Core-Strings
+#define RC_COMCORE_BEGIN (RC_COMMON_CORE)
+#define RC_COMCORE_END (RC_COMMON_CORE + 59)
+
+// Shell-Verzeichnis
+#define RC_SHELLS_BEGIN RC_SHELLS
+#define RC_SHELLS_END (RC_SHELLS + 99)
+
+// PopUpMenu's
+#define RC_POPUPS_BEGIN RC_POPUPS
+#define RC_POPUPS_END (RC_POPUPS + 99)
+
+// Strings fuer ConfigItems in div. Verzeichnissen
+#define RC_CFGITEMS_BEGIN RC_CFGITEMS
+#define RC_CFGITEMS_END (RC_CFGITEMS + 99)
+
+// Lingu
+#define RC_LINGU_BEGIN RC_LINGU
+#define RC_LINGU_END (RC_LINGU + 99)
+
+// Accessibility
+#define RC_ACCESS_BEGIN RC_ACCESS
+#define RC_ACCESS_END (RC_ACCESS + 99)
+
+// Undos
+#define RC_UNDO_BEGIN RC_UNDO
+#define RC_UNDO_END (RC_UNDO + 199)
+
+// SMARTTAGS
+// Smarttags
+#define RC_SMARTTAG_BEGIN RC_SMARTTAG
+#define RC_SMARTTAG_END (RC_SMARTTAG + 99)
+
+// unocore
+#define RC_UNOCORE_BEGIN RC_UNOCORE
+#define RC_UNOCORE_END (RC_UNOCORE + 10)
+
+#endif
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
new file mode 100644
index 000000000000..ebf6e8cd9325
--- /dev/null
+++ b/sw/inc/redline.hxx
@@ -0,0 +1,317 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: redline.hxx,v $
+ * $Revision: 1.14.180.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _REDLINE_HXX
+#define _REDLINE_HXX
+
+#include <tools/datetime.hxx>
+#include <tools/string.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+#include <pam.hxx>
+
+#include <IDocumentRedlineAccess.hxx>
+
+#include <svtools/smplhint.hxx>
+
+class SfxItemSet;
+class SwView;
+
+class SwRedlineExtraData
+{
+ SwRedlineExtraData( const SwRedlineExtraData& );
+ SwRedlineExtraData& operator=( const SwRedlineExtraData& );
+
+protected:
+ SwRedlineExtraData() {}
+
+public:
+ virtual ~SwRedlineExtraData();
+ virtual SwRedlineExtraData* CreateNew() const = 0;
+
+ virtual void Accept( SwPaM& rPam ) const;
+ virtual void Reject( SwPaM& rPam ) const;
+ virtual int operator == ( const SwRedlineExtraData& ) const;
+};
+
+class SwRedlineExtraData_FmtColl : public SwRedlineExtraData
+{
+ String sFmtNm;
+ SfxItemSet* pSet;
+ USHORT nPoolId;
+public:
+ SwRedlineExtraData_FmtColl( const String& rColl, USHORT nPoolFmtId,
+ const SfxItemSet* pSet = 0 );
+ virtual ~SwRedlineExtraData_FmtColl();
+ virtual SwRedlineExtraData* CreateNew() const;
+ virtual void Reject( SwPaM& rPam ) const;
+ virtual int operator == ( const SwRedlineExtraData& ) const;
+
+ void SetItemSet( const SfxItemSet& rSet );
+};
+
+class SwRedlineExtraData_Format : public SwRedlineExtraData
+{
+ SvUShorts aWhichIds;
+
+ SwRedlineExtraData_Format( const SwRedlineExtraData_Format& rCpy );
+
+public:
+ SwRedlineExtraData_Format( const SfxItemSet& rSet );
+ virtual ~SwRedlineExtraData_Format();
+ virtual SwRedlineExtraData* CreateNew() const;
+ virtual void Reject( SwPaM& rPam ) const;
+ virtual int operator == ( const SwRedlineExtraData& ) const;
+};
+
+
+class SW_DLLPUBLIC SwRedlineData
+{
+ friend class SwRedline;
+ SwRedlineData* pNext; // Verweis auf weitere Daten
+ SwRedlineExtraData* pExtraData;
+
+ String sComment;
+ DateTime aStamp;
+ RedlineType_t eType;
+ USHORT nAuthor, nSeqNo;
+
+public:
+ SwRedlineData( RedlineType_t eT, USHORT nAut );
+ SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext = TRUE );
+
+ // fuer sw3io: pNext/pExtraData gehen in eigenen Besitz ueber!
+ SwRedlineData( RedlineType_t eT, USHORT nAut, const DateTime& rDT,
+ const String& rCmnt, SwRedlineData* pNxt,
+ SwRedlineExtraData* pExtraData = 0 );
+
+ ~SwRedlineData();
+
+ int operator==( const SwRedlineData& rCmp ) const
+ {
+ return nAuthor == rCmp.nAuthor &&
+ eType == rCmp.eType &&
+ sComment == rCmp.sComment &&
+ (( !pNext && !rCmp.pNext ) ||
+ ( pNext && rCmp.pNext && *pNext == *rCmp.pNext )) &&
+ (( !pExtraData && !rCmp.pExtraData ) ||
+ ( pExtraData && rCmp.pExtraData &&
+ *pExtraData == *rCmp.pExtraData ));
+ }
+ int operator!=( const SwRedlineData& rCmp ) const
+ { return !operator==( rCmp ); }
+
+ RedlineType_t GetType() const
+ { return ((RedlineType_t)(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ RedlineType_t GetRealType() const { return eType; }
+ USHORT GetAuthor() const { return nAuthor; }
+ const String& GetComment() const { return sComment; }
+ const DateTime& GetTimeStamp() const { return aStamp; }
+ inline const SwRedlineData* Next() const{ return pNext; }
+
+ void SetComment( const String& rS ) { sComment = rS; }
+ void SetTimeStamp( const DateTime& rDT ) { aStamp = rDT; }
+
+ void SetAutoFmtFlag()
+ { eType = (RedlineType_t)(eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); }
+ int CanCombine( const SwRedlineData& rCmp ) const
+ {
+ return nAuthor == rCmp.nAuthor &&
+ eType == rCmp.eType &&
+ sComment == rCmp.sComment &&
+ GetTimeStamp() == rCmp.GetTimeStamp() &&
+ (( !pNext && !rCmp.pNext ) ||
+ ( pNext && rCmp.pNext &&
+ pNext->CanCombine( *rCmp.pNext ))) &&
+ (( !pExtraData && !rCmp.pExtraData ) ||
+ ( pExtraData && rCmp.pExtraData &&
+ *pExtraData == *rCmp.pExtraData ));
+ }
+
+ // ExtraData wird kopiert, der Pointer geht also NICHT in den Besitz
+ // des RedlineObjectes!
+ void SetExtraData( const SwRedlineExtraData* pData );
+ const SwRedlineExtraData* GetExtraData() const { return pExtraData; }
+
+ // fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
+ // fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
+ // das es noch weitere geben kann!
+ USHORT GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( USHORT nNo ) { nSeqNo = nNo; }
+
+ String GetDescr() const;
+};
+
+
+class SW_DLLPUBLIC SwRedline : public SwPaM
+{
+ SwRedlineData* pRedlineData;
+ SwNodeIndex* pCntntSect;
+ BOOL bDelLastPara : 1;
+ BOOL bIsLastParaDelete : 1;
+ BOOL bIsVisible : 1;
+
+ void MoveToSection();
+ void CopyToSection();
+ void DelCopyOfSection();
+ void MoveFromSection();
+
+public:
+ SwRedline( RedlineType_t eType, const SwPaM& rPam );
+ SwRedline( const SwRedlineData& rData, const SwPaM& rPam );
+ SwRedline( const SwRedlineData& rData, const SwPosition& rPos );
+ // fuer sw3io: pData geht in eigenen Besitz ueber!
+ SwRedline(SwRedlineData* pData, const SwPosition& rPos, BOOL bVsbl,
+ BOOL bDelLP, BOOL bIsPD) :
+ SwPaM( rPos ), pRedlineData( pData ), pCntntSect( 0 ),
+ bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
+ {}
+ SwRedline( const SwRedline& );
+ virtual ~SwRedline();
+
+ SwNodeIndex* GetContentIdx() const { return pCntntSect; }
+ // fuers Undo
+ void SetContentIdx( const SwNodeIndex* );
+
+ BOOL IsVisible() const { return bIsVisible; }
+ BOOL IsDelLastPara() const { return bDelLastPara; }
+
+ // das BOOL besagt, ob nach dem setzen der Pos kein Bereich mehr
+ // aufgespannt ist. -> TRUE, ansonten Bereich und FALSE
+ void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 )
+ {
+ if( !pSttPtr ) pSttPtr = Start();
+ *pSttPtr = rPos;
+ }
+ void SetEnd( const SwPosition& rPos, SwPosition* pEndPtr = 0 )
+ {
+ if( !pEndPtr ) pEndPtr = End();
+ *pEndPtr = rPos;
+ }
+ // liegt eine gueltige Selektion vor?
+ BOOL HasValidRange() const;
+
+ const SwRedlineData& GetRedlineData(USHORT nPos = 0) const;
+ int operator==( const SwRedlineData& rCmp ) const
+ { return *pRedlineData == rCmp; }
+ int operator!=( const SwRedlineData& rCmp ) const
+ { return *pRedlineData != rCmp; }
+ void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); }
+
+ USHORT GetStackCount() const;
+ USHORT GetAuthor( USHORT nPos = 0) const;
+ const String& GetAuthorString( USHORT nPos = 0 ) const;
+ const DateTime& GetTimeStamp( USHORT nPos = 0) const;
+ RedlineType_t GetRealType( USHORT nPos = 0 ) const;
+ RedlineType_t GetType( USHORT nPos = 0) const
+ { return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ const String& GetComment( USHORT nPos = 0 ) const;
+
+ void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); }
+
+ // ExtraData wird kopiert, der Pointer geht also NICHT in den Besitz
+ // des RedlineObjectes!
+ void SetExtraData( const SwRedlineExtraData* pData )
+ { pRedlineData->SetExtraData( pData ); }
+ const SwRedlineExtraData* GetExtraData() const
+ { return pRedlineData->GetExtraData(); }
+
+ // fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
+ // fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
+ // das es noch weitere geben kann!
+ USHORT GetSeqNo() const { return pRedlineData->GetSeqNo(); }
+ void SetSeqNo( USHORT nNo ) { pRedlineData->SetSeqNo( nNo ); }
+
+ // Beim Hide/ShowOriginal wird 2 mal ueber die Liste gelaufen, damit
+ // die Del-Redlines per Copy und Delete versteckt werden. Beim Move
+ // wird sonst die Attributierung falsch behandelt.
+ // Alle anderen Aufrufer muessen immer 0 angeben.
+ void CallDisplayFunc( USHORT nLoop = 0 );
+ void Show( USHORT nLoop = 0 );
+ void Hide( USHORT nLoop = 0 );
+ void ShowOriginal( USHORT nLoop = 0 );
+
+ // calculates the intersection with text node number nNdIdx
+ void CalcStartEnd( ULONG nNdIdx, USHORT& nStart, USHORT& nEnd ) const;
+
+ void InvalidateRange(); // das Layout anstossen
+
+ BOOL IsOwnRedline( const SwRedline& rRedl ) const
+ { return GetAuthor() == rRedl.GetAuthor(); }
+ BOOL CanCombine( const SwRedline& rRedl ) const;
+
+ void PushData( const SwRedline& rRedl, BOOL bOwnAsNext = TRUE );
+ BOOL PopData();
+
+ // #111827#
+ /**
+ Returns textual description of this a redline data element of
+ this redline.
+
+ @param nPos index of the redline data element to describe
+
+ The textual description of the selected element contains the
+ kind of redline and the possibly shortened text of the redline.
+
+ @return textual description of the selected redline data element
+ */
+ String GetDescr(USHORT nPos = 0);
+
+ int operator==( const SwRedline& ) const;
+ int operator<( const SwRedline& ) const;
+};
+
+class SW_DLLPUBLIC SwRedlineHint : public SfxHint
+{
+#define SWREDLINE_INSERTED 1
+#define SWREDLINE_REMOVED 2
+#define SWREDLINE_FOCUS 3
+#define SWREDLINE_CHANGED 4
+#define SWREDLINE_LANGUAGE 5
+
+ const SwRedline* pRedline;
+ sal_Int16 nWhich;
+ const SwView* pView;
+
+public:
+ SwRedlineHint( const SwRedline* p, sal_Int16 n, const SwView* pV = 0)
+ : pRedline(p)
+ , nWhich(n)
+ , pView(pV)
+ {}
+
+ TYPEINFO();
+ const SwRedline* GetRedline() const { return pRedline; }
+ sal_Int16 Which() const { return nWhich; }
+ const SwView* GetView() const { return pView; }
+};
+
+
+#endif
diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx
new file mode 100644
index 000000000000..30f86b3246d7
--- /dev/null
+++ b/sw/inc/redlnaut.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: redlnaut.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _REDLNAUT_HXX
+#define _REDLNAUT_HXX
+
+#include <tools/string.hxx>
+#include <tools/color.hxx>
+
+#include "swtypes.hxx"
+
+class SfxItemSet;
+class SwAttrPool;
+
+class SwRedlineAuthor
+{
+ String sAuthor;
+ Color aChgLineColor;
+ SfxItemSet *pInsAttrSet, *pDelAttrSet, *pFmtAttrSet;
+ short eChgLineOrient;
+ BYTE cDelChar;
+public:
+ SwRedlineAuthor( SwAttrPool& rPool, const String& );
+ SwRedlineAuthor( const SwRedlineAuthor& );
+ ~SwRedlineAuthor();
+
+ SwRedlineAuthor& operator=( const SwRedlineAuthor& );
+};
+
+
+#endif
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
new file mode 100644
index 000000000000..813b288ab31f
--- /dev/null
+++ b/sw/inc/reffld.hxx
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: reffld.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _REFFLD_HXX
+#define _REFFLD_HXX
+
+#include <fldbas.hxx>
+
+class SfxPoolItem;
+class SwDoc;
+class SwTxtNode;
+class SwTxtFld;
+
+enum REFERENCESUBTYPE
+{
+ REF_SETREFATTR = 0,
+ REF_SEQUENCEFLD,
+ REF_BOOKMARK,
+ REF_OUTLINE,
+ REF_FOOTNOTE,
+ REF_ENDNOTE
+};
+
+enum REFERENCEMARK
+{
+ REF_BEGIN,
+ REF_PAGE = REF_BEGIN,
+ REF_CHAPTER,
+ REF_CONTENT,
+ REF_UPDOWN,
+ REF_PAGE_PGDESC,
+ REF_ONLYNUMBER,
+ REF_ONLYCAPTION,
+ REF_ONLYSEQNO,
+ // --> OD 2007-08-24 #i81002#
+ // new reference format types for referencing bookmarks and set references
+ REF_NUMBER,
+ REF_NUMBER_NO_CONTEXT,
+ REF_NUMBER_FULL_CONTEXT,
+ // <--
+ REF_END
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Referenz holen
+ --------------------------------------------------------------------*/
+
+class SwGetRefFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+public:
+ SwGetRefFieldType(SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ SwDoc* GetDoc() const { return pDoc; }
+ // ueberlagert, um alle Ref-Felder zu updaten
+ virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+
+ void MergeWithOtherDoc( SwDoc& rDestDoc );
+
+ static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark,
+ USHORT nSubType, USHORT nSeqNo,
+ USHORT* pStt, USHORT* pEnd = 0 );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Referenzfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwGetRefField : public SwField
+{
+private:
+ String sSetRefName;
+ String sTxt;
+ USHORT nSubType;
+ USHORT nSeqNo;
+
+ // --> OD 2007-08-24 #i81002#
+ String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
+ const SwTxtNode& rTxtNodeOfReferencedItem,
+ const sal_uInt32 nRefNumFormat ) const;
+ // <--
+public:
+ SwGetRefField( SwGetRefFieldType*, const String& rSetRef,
+ USHORT nSubType, USHORT nSeqNo, ULONG nFmt );
+
+ virtual ~SwGetRefField();
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ const String& GetSetRefName() const { return sSetRefName; }
+
+ // --> OD 2007-09-06 #i81002#
+ // The <SwTxtFld> instance, which represents the text attribute for the
+ // <SwGetRefField> instance, has to be passed to the method.
+ // This <SwTxtFld> instance is needed for the reference format type REF_UPDOWN
+ // and REF_NUMBER.
+ // Note: This instance may be NULL (field in Undo/Redo). This will cause
+ // no update for these reference format types.
+ void UpdateField( const SwTxtFld* pFldTxtAttr );
+ // <--
+ void SetExpand( const String& rStr ) { sTxt = rStr; }
+
+ // SubType erfragen/setzen
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType( USHORT n );
+
+ // --> OD 2007-11-09 #i81002#
+ bool IsRefToHeadingCrossRefBookmark() const;
+ bool IsRefToNumItemCrossRefBookmark() const;
+ const SwTxtNode* GetReferencedTxtNode() const;
+ // <--
+ // --> OD 2008-01-09 #i85090#
+ String GetExpandedTxtOfReferencedTxtNode() const;
+ // <--
+
+ // SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant)
+ USHORT GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( USHORT n ) { nSeqNo = n; }
+
+ // Name der Referenz
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ virtual String GetPar2() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+
+ void ConvertProgrammaticToUIName();
+
+ virtual String GetDescription() const;
+};
+
+
+#endif // _REFFLD_HXX
+
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
new file mode 100644
index 000000000000..b3f855df167b
--- /dev/null
+++ b/sw/inc/ring.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ring.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _RING_HXX
+#define _RING_HXX
+
+#include <swtypes.hxx>
+
+class Ring
+{
+ Ring *pNext;
+ Ring* pPrev; // zur Optimierung, damit das ein/ausketten schneller geht!
+
+protected:
+ Ring() { pNext = this; pPrev = this; }
+ Ring( Ring * );
+public:
+ virtual ~Ring();
+ void MoveTo( Ring *pDestRing );
+ void MoveRingTo( Ring *pDestRing );
+
+ Ring* GetNext() const { return pNext; }
+ Ring* GetPrev() const { return pPrev; }
+
+ sal_uInt32 numberOf() const;
+};
+
+
+#endif
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
new file mode 100644
index 000000000000..f910a44ca859
--- /dev/null
+++ b/sw/inc/rolbck.hxx
@@ -0,0 +1,474 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: rolbck.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ROLBCK_HXX
+#define _ROLBCK_HXX
+
+#include <tools/solar.h>
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_USHORTSSORT
+#include <svtools/svstdarr.hxx>
+#endif
+#include <svtools/itemset.hxx>
+
+//Nur die History anziehen, um das docnew.cxx gegen die CLOOK's zu behaupten.
+
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
+class SwDoc;
+class SwFmt;
+class SwFmtColl;
+class SwHistoryHint;
+class SwTxtAttr;
+class SfxPoolItem;
+class SwTxtNode;
+class SwUndoSaveSection;
+class SwTxtFtn;
+class SwTxtFlyCnt;
+class SwUndoDelLayFmt;
+class SwFlyFrmFmt;
+class SwFmtFld;
+class SwTxtFld;
+class SwFieldType;
+class SwTxtTOXMark;
+class SwTxtRefMark;
+class SwFrmFmt;
+class SwpHints;
+class SwFmtChain;
+class SwNode;
+class SwCharFmt;
+
+#ifndef ROLBCK_HISTORY_ONLY
+
+#include <tox.hxx>
+
+#include <SwNumberTreeTypes.hxx>
+// --> OD 2007-10-17 #i81002#
+#include <IDocumentMarkAccess.hxx>
+// <--
+
+#include <memory>
+
+
+#ifndef PRODUCT
+class Writer;
+#define OUT_HSTR_HINT( name ) \
+ friend Writer& OutUndo_Hstr_ ## name( Writer&, const SwHistoryHint& );
+#else
+#define OUT_HSTR_HINT( name )
+#endif
+
+enum HISTORY_HINT {
+ HSTRY_SETFMTHNT,
+ HSTRY_RESETFMTHNT,
+ HSTRY_SETTXTHNT,
+ HSTRY_SETTXTFLDHNT,
+ HSTRY_SETREFMARKHNT,
+ HSTRY_SETTOXMARKHNT,
+ HSTRY_RESETTXTHNT,
+ HSTRY_SETFTNHNT,
+ HSTRY_CHGFMTCOLL,
+ HSTRY_FLYCNT,
+ HSTRY_BOOKMARK,
+ HSTRY_SETATTRSET,
+ HSTRY_RESETATTRSET,
+ HSTRY_CHGFLYANCHOR,
+ HSTRY_CHGFLYCHAIN,
+ HSTRY_CHGCHARFMT, // #i27615#
+ HSTRY_END
+};
+
+class SwHistoryHint
+{
+ const HISTORY_HINT m_eWhichId;
+
+public:
+ SwHistoryHint( HISTORY_HINT eWhich ) : m_eWhichId( eWhich ) {}
+ virtual ~SwHistoryHint() {}
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) = 0;
+ HISTORY_HINT Which() const { return m_eWhichId; }
+ virtual String GetDescription() const;
+};
+
+class SwHistorySetFmt : public SwHistoryHint
+{
+ ::std::auto_ptr<SfxPoolItem> m_pAttr;
+ const ULONG m_nNodeIndex;
+
+public:
+ SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNode );
+ virtual ~SwHistorySetFmt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ virtual String GetDescription() const;
+
+ OUT_HSTR_HINT(SetFmtHnt)
+};
+
+class SwHistoryResetFmt : public SwHistoryHint
+{
+ const ULONG m_nNodeIndex;
+ const USHORT m_nWhich;
+
+public:
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ SwHistoryResetFmt( const SfxPoolItem* pFmtHt, ULONG nNodeIdx );
+ // <--
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(ResetFmtHnt)
+};
+
+class SwHistorySetTxt : public SwHistoryHint
+{
+ ::std::auto_ptr<SfxPoolItem> m_pAttr;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
+public:
+ SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNode );
+ virtual ~SwHistorySetTxt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(SetTxtHnt)
+};
+
+class SwHistorySetTxtFld : public SwHistoryHint
+{
+ ::std::auto_ptr<SwFieldType> m_pFldType;
+ const ::std::auto_ptr<SwFmtFld> m_pFld;
+ ULONG m_nNodeIndex;
+ xub_StrLen m_nPos;
+ USHORT m_nFldWhich;
+
+public:
+ SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNode );
+ virtual ~SwHistorySetTxtFld();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ virtual String GetDescription() const;
+
+ OUT_HSTR_HINT(SetTxtFldHnt)
+};
+
+class SwHistorySetRefMark : public SwHistoryHint
+{
+ const String m_RefName;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
+public:
+ SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(SetRefMarkHnt)
+};
+
+class SwHistorySetTOXMark : public SwHistoryHint
+{
+ SwTOXMark m_TOXMark;
+ const String m_TOXName;
+ const TOXTypes m_eTOXTypes;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
+public:
+ SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ int IsEqual( const SwTOXMark& rCmp ) const;
+
+ OUT_HSTR_HINT(SetToxMarkHnt)
+};
+
+class SwHistoryResetTxt : public SwHistoryHint
+{
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+ const USHORT m_nAttr;
+
+public:
+ SwHistoryResetTxt( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd,
+ ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ USHORT GetWhich() const { return m_nAttr; }
+ ULONG GetNode() const { return m_nNodeIndex; }
+ xub_StrLen GetCntnt() const { return m_nStart; }
+
+ OUT_HSTR_HINT(ResetTxtHnt)
+};
+
+class SwHistorySetFootnote : public SwHistoryHint
+{
+ const ::std::auto_ptr<SwUndoSaveSection> m_pUndo;
+ const String m_FootnoteNumber;
+ ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const bool m_bEndNote;
+
+public:
+ SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNode );
+ SwHistorySetFootnote( const SwTxtFtn& );
+ virtual ~SwHistorySetFootnote();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ virtual String GetDescription() const;
+
+ OUT_HSTR_HINT(SetFtnHnt)
+};
+
+class SwHistoryChangeFmtColl : public SwHistoryHint
+{
+ SwFmtColl * const m_pColl;
+ const ULONG m_nNodeIndex;
+ const BYTE m_nNodeType;
+
+public:
+ SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(ChangeFmtColl)
+};
+
+class SwHistoryTxtFlyCnt : public SwHistoryHint
+{
+ ::std::auto_ptr<SwUndoDelLayFmt> m_pUndo;
+
+public:
+ SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt );
+ virtual ~SwHistoryTxtFlyCnt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ SwUndoDelLayFmt* GetUDelLFmt() { return m_pUndo.get(); }
+
+ OUT_HSTR_HINT(FlyCnt)
+};
+
+class SwHistoryBookmark : public SwHistoryHint
+{
+ public:
+ SwHistoryBookmark(const ::sw::mark::IMark& rBkmk,
+ bool bSavePos, bool bSaveOtherPos);
+ virtual void SetInDoc(SwDoc * pDoc, bool);
+
+ bool IsEqualBookmark(const ::sw::mark::IMark& rBkmk);
+ const ::rtl::OUString& GetName() const;
+
+ OUT_HSTR_HINT(Bookmark)
+
+ private:
+ const ::rtl::OUString m_aName;
+ ::rtl::OUString m_aShortName;
+ KeyCode m_aKeycode;
+ const ULONG m_nNode;
+ const ULONG m_nOtherNode;
+ const xub_StrLen m_nCntnt;
+ const xub_StrLen m_nOtherCntnt;
+ const bool m_bSavePos;
+ const bool m_bSaveOtherPos;
+ const bool m_bHadOtherPos;
+ const IDocumentMarkAccess::MarkType m_eBkmkType;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo;
+};
+
+class SwHistorySetAttrSet : public SwHistoryHint
+{
+ SfxItemSet m_OldSet;
+ SvUShorts m_ResetArray;
+ const ULONG m_nNodeIndex;
+
+public:
+ SwHistorySetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ const SvUShortsSort& rSetArr );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(SetAttrSet)
+};
+
+
+class SwHistoryResetAttrSet : public SwHistoryHint
+{
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+ SvUShorts m_Array;
+
+public:
+ SwHistoryResetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ xub_StrLen nStt = STRING_MAXLEN,
+ xub_StrLen nEnd = STRING_MAXLEN );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ const SvUShorts& GetArr() const { return m_Array; }
+ ULONG GetNode() const { return m_nNodeIndex; }
+ xub_StrLen GetCntnt() const { return m_nStart; }
+
+ OUT_HSTR_HINT(ResetAttrSet)
+};
+
+class SwHistoryChangeFlyAnchor : public SwHistoryHint
+{
+ SwFrmFmt & m_rFmt;
+ const ULONG m_nOldNodeIndex;
+ const xub_StrLen m_nOldContentIndex;
+
+public:
+ SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+};
+
+class SwHistoryChangeFlyChain : public SwHistoryHint
+{
+ SwFlyFrmFmt * const m_pPrevFmt;
+ SwFlyFrmFmt * const m_pNextFmt;
+ SwFlyFrmFmt * const m_pFlyFmt;
+
+public:
+ SwHistoryChangeFlyChain( SwFlyFrmFmt& rFmt, const SwFmtChain& rAttr );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+};
+
+// #i27615#
+class SwHistoryChangeCharFmt : public SwHistoryHint
+{
+ const SfxItemSet m_OldSet;
+ const String m_Fmt;
+
+public:
+ SwHistoryChangeCharFmt( const SfxItemSet& rSet, const String & sFmt);
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ OUT_HSTR_HINT(SetAttrSet)
+};
+
+
+#endif
+
+typedef SwHistoryHint* SwHistoryHintPtr;
+SV_DECL_PTRARR_DEL( SwpHstry, SwHistoryHintPtr, 0, 2 )
+
+class SwHistory
+{
+ friend class SwDoc; // actually only SwDoc::DelUndoObj may access
+ friend class SwUndoWriter; // for Undo/Redo Writer
+ friend class SwRegHistory; // for inserting History attributes
+
+ SwpHstry m_SwpHstry;
+ USHORT m_nEndDiff;
+
+public:
+ SwHistory( USHORT nInitSz = 0, USHORT nGrowSz = 2 );
+ ~SwHistory();
+
+ // delete History from nStart to array end
+ void Delete( USHORT nStart = 0 );
+ // call and delete all objects between nStart and array end
+ bool Rollback( SwDoc* pDoc, USHORT nStart = 0 );
+ // call all objects between nStart and TmpEnd; store nStart as TmpEnd
+ bool TmpRollback( SwDoc* pDoc, USHORT nStart, bool ToFirst = true );
+
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
+ ULONG nNodeIdx );
+ // <--
+ void Add( SwTxtAttr* pTxtHt, ULONG nNodeIdx, bool bNewAttr = true );
+ void Add( SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd );
+ void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos );
+ void Add( SwFrmFmt& rFmt );
+ void Add( SwFlyFrmFmt&, USHORT& rSetPos );
+ void Add( const SwTxtFtn& );
+ void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt); // #i27615#
+
+ USHORT Count() const { return m_SwpHstry.Count(); }
+ USHORT GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
+ USHORT SetTmpEnd( USHORT nTmpEnd ); // return previous value
+ SwHistoryHint * operator[]( USHORT nPos ) { return m_SwpHstry[nPos]; }
+ SwHistoryHint const* operator[]( USHORT nPos ) const
+ { return m_SwpHstry[nPos]; }
+
+ // for SwUndoDelete::Undo/Redo
+ void Move( USHORT nPos, SwHistory *pIns,
+ USHORT nStart = 0, USHORT nEnd = USHRT_MAX )
+ {
+ m_SwpHstry.Insert( &pIns->m_SwpHstry, nPos, nStart, nEnd );
+ pIns->m_SwpHstry.Remove( nStart, (nEnd == USHRT_MAX)
+ ? pIns->Count() - nStart
+ : nEnd );
+ }
+
+ // helper methods for recording attribute in History
+ // used by Undo classes (Delete/Overwrite/Inserts)
+ void CopyAttr( SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStart,
+ xub_StrLen nEnd, bool bFields );
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ void CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx );
+ // <--
+};
+
+#ifndef ROLBCK_HISTORY_ONLY
+
+class SwRegHistory : public SwClient
+{
+private:
+ SvUShortsSort m_WhichIdSet;
+ SwHistory * const m_pHistory;
+ ULONG m_nNodeIndex;
+
+ void _MakeSetWhichIds();
+
+public:
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ SwRegHistory( SwHistory* pHst );
+ // <--
+ SwRegHistory( const SwNode& rNd, SwHistory* pHst );
+ SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst );
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ /// @return true iff at least 1 item was inserted
+ bool InsertItems( const SfxItemSet& rSet,
+ xub_StrLen const nStart, xub_StrLen const nEnd,
+ SetAttrMode const nFlags );
+
+ void AddHint( SwTxtAttr* pHt, const bool bNew = false );
+
+ void RegisterInModify( SwModify* pRegIn, const SwNode& rNd );
+ void ChangeNodeIndex( ULONG nNew ) { m_nNodeIndex = nNew; }
+};
+
+#endif
+
+
+#endif // _ROLBCK_HXX
+
diff --git a/sw/inc/rubylist.hxx b/sw/inc/rubylist.hxx
new file mode 100644
index 000000000000..a175159fc418
--- /dev/null
+++ b/sw/inc/rubylist.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: rubylist.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _RUBYLIST_HXX
+#define _RUBYLIST_HXX
+
+#include <svtools/svarray.hxx>
+#include <swtypes.hxx>
+#include <fmtruby.hxx>
+
+class SwRubyListEntry
+{
+ String sText;
+ SwFmtRuby aRubyAttr;
+public:
+ SwRubyListEntry() : aRubyAttr( aEmptyStr ) {}
+ ~SwRubyListEntry();
+
+ const String& GetText() const { return sText; }
+ void SetText( const String& rStr ) { sText = rStr; }
+
+ const SwFmtRuby& GetRubyAttr() const { return aRubyAttr; }
+ SwFmtRuby& GetRubyAttr() { return aRubyAttr; }
+ void SetRubyAttr( const SwFmtRuby& rAttr ) { aRubyAttr = rAttr; }
+};
+
+typedef SwRubyListEntry* SwRubyListEntryPtr;
+SV_DECL_PTRARR_DEL( SwRubyList, SwRubyListEntryPtr, 0, 32 )
+
+
+#endif //_RUBYLIST_HXX
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
new file mode 100644
index 000000000000..c530c8280870
--- /dev/null
+++ b/sw/inc/section.hxx
@@ -0,0 +1,305 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: section.hxx,v $
+ * $Revision: 1.13.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SECTION_HXX
+#define _SECTION_HXX
+
+
+#include <com/sun/star/uno/Sequence.h>
+#include <sfx2/lnkbase.hxx>
+#include <tools/rtti.hxx>
+#ifndef _TOOLS_REF_HXX
+#include <tools/ref.hxx>
+#endif
+#include <svtools/svarray.hxx>
+#include <frmfmt.hxx>
+
+// Forward Deklaration
+class SwSectionFmt;
+class SwDoc;
+class SwSection;
+class SwSectionNode;
+class SwTOXBase;
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+SV_DECL_PTRARR( SwSections, SwSection*, 0, 4 )
+
+enum SectionType { CONTENT_SECTION,
+ TOX_HEADER_SECTION,
+ TOX_CONTENT_SECTION,
+ DDE_LINK_SECTION = OBJECT_CLIENT_DDE,
+ FILE_LINK_SECTION = OBJECT_CLIENT_FILE
+/*
+// verbleiben noch:
+ OBJECT_CLIENT_SO = 0x80,
+ OBJECT_CLIENT_OLE = 0x82,
+ OBJECT_CLIENT_OLE_CACHE = 0x83,
+*/
+ };
+
+enum LinkCreateType
+{
+ CREATE_NONE, // nichts weiter tun
+ CREATE_CONNECT, // Link gleich connecten
+ CREATE_UPDATE // Link connecten und updaten
+};
+
+
+class SW_DLLPUBLIC SwSection : public SwClient
+{
+ // damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird!
+ friend class SwSectionNode;
+ // the "read CTOR" of SwSectionFrm have to change the Hiddenflag
+ friend class SwSectionFrm;
+
+ String sSectionNm;
+ String sCondition; // erstmal, vielleicht auch mal ein Feld ??
+ String sLinkFileName,
+ sLinkFilePassWd; // JP 27.02.2001: must later changed to Sequence
+ ::com::sun::star::uno::Sequence <sal_Int8> aPasswd;
+
+ SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
+ ::sfx2::SvBaseLinkRef refLink;
+
+ SectionType eType;
+
+ BOOL bProtectFlag : 1; // Flags fuer schnelle Abfragen, wird ueber
+ // Attribut im Format gesetzt
+ BOOL bHiddenFlag : 1; // Flag: Absaetze versteckt ?
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ BOOL bEditInReadonlyFlag : 1;
+ // <--
+ BOOL bHidden : 1; // alle Absaetze nicht sichtbar ?
+ BOOL bCondHiddenFlag : 1; // Hiddenflag fuer die Bedingung ?
+ BOOL bConnectFlag : 1; // Flag: "Verbindung zum Server" vorhanden?
+
+
+ SW_DLLPRIVATE void _SetHiddenFlag( BOOL bHidden, BOOL bCondition );
+ SW_DLLPRIVATE void _SetProtectFlag( BOOL bFlag ) { bProtectFlag = bFlag; }
+ /* SW_DLLPUBLIC */ BOOL _IsProtect() const;
+
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ void _SetEditInReadonlyFlag( BOOL bFlag ) { bEditInReadonlyFlag = bFlag; }
+ BOOL _IsEditInReadonly() const;
+ // <--
+
+public:
+ TYPEINFO(); // rtti
+
+ SwSection( SectionType eType, const String& rName,
+ SwSectionFmt* pFmt = 0 );
+ ~SwSection();
+
+ // kopiere nur die Daten der Section!
+ // Ableitung bleibt (beim Left) erhalten.
+ SwSection& operator=( const SwSection& );
+ BOOL operator==( const SwSection& rCmp ) const;
+
+ const String& GetName() const { return sSectionNm; }
+ void SetName( const String& rName ) { sSectionNm = rName; }
+ SectionType GetType() const { return eType; }
+ void SetType( SectionType eNew ) { eType = eNew; }
+
+ SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; }
+ SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; }
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ // setze die Hidden/Protected -> gesamten Baum updaten !
+ // (Attribute/Flags werden gesetzt/erfragt)
+ BOOL IsHidden() const { return bHidden; }
+ BOOL IsProtect() const { return GetFmt() ? _IsProtect()
+ : IsProtectFlag(); }
+
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ BOOL IsEditInReadonly()const { return GetFmt() ? _IsEditInReadonly() : IsEditInReadonlyFlag(); }
+ void SetEditInReadonly( BOOL bFlag = TRUE );
+ // <--
+
+ void SetHidden( BOOL bFlag = TRUE );
+ void SetProtect( BOOL bFlag = TRUE );
+
+ // erfrage die internen Flags (Zustand inklusive Parents nicht, was
+ // aktuell an der Section gesetzt ist!!)
+ BOOL IsHiddenFlag() const { return bHiddenFlag; }
+ BOOL IsProtectFlag() const { return bProtectFlag; }
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ BOOL IsEditInReadonlyFlag() const { return bEditInReadonlyFlag; }
+ // <--
+
+ void SetCondHidden( BOOL bFlag = TRUE );
+ BOOL IsCondHidden() const { return bCondHiddenFlag; }
+ // erfrage (auch ueber die Parents), ob diese Section versteckt sein soll.
+ BOOL CalcHiddenFlag() const;
+
+
+ inline SwSection* GetParent() const;
+
+ // setze/erfrage die Bedingung
+ const String& GetCondition() const { return sCondition; }
+ void SetCondition( const String& rNew ) { sCondition = rNew; }
+
+ // setze/erfrage den gelinkten FileNamen
+ const String& GetLinkFileName() const;
+ void SetLinkFileName( const String& rNew, const String* pPassWd = 0 );
+ // Passwort des gelinkten Files (nur waehrend der Laufzeit gueltig!)
+ const String& GetLinkFilePassWd() const { return sLinkFilePassWd; }
+ void SetLinkFilePassWd( const String& rS ) { sLinkFilePassWd = rS; }
+
+ // get / set password of this section
+ const ::com::sun::star::uno::Sequence <sal_Int8>&
+ GetPasswd() const { return aPasswd; }
+ void SetPasswd( const ::com::sun::star::uno::Sequence <sal_Int8>& rNew )
+ { aPasswd = rNew; }
+
+ // Daten Server-Methoden
+ void SetRefObject( SwServerObject* pObj );
+ const SwServerObject* GetObject() const { return &refObj; }
+ SwServerObject* GetObject() { return &refObj; }
+ BOOL IsServer() const { return refObj.Is(); }
+
+ // Methoden fuer gelinkte Bereiche
+ USHORT GetUpdateType() const { return refLink->GetUpdateMode(); }
+ void SetUpdateType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
+
+ BOOL IsConnected() const { return refLink.Is(); }
+ void UpdateNow() { refLink->Update(); }
+ void Disconnect() { refLink->Disconnect(); }
+
+ const ::sfx2::SvBaseLink& GetBaseLink() const { return *refLink; }
+ ::sfx2::SvBaseLink& GetBaseLink() { return *refLink; }
+
+ void CreateLink( LinkCreateType eType );
+
+ void MakeChildLinksVisible( const SwSectionNode& rSectNd );
+
+ BOOL IsLinkType() const
+ { return DDE_LINK_SECTION == eType || FILE_LINK_SECTION == eType; }
+
+ // Flags fuer UI - Verbindung geklappt?
+ BOOL IsConnectFlag() const { return bConnectFlag; }
+ void SetConnectFlag( BOOL bFlag = TRUE ) { bConnectFlag = bFlag; }
+
+ // return the TOX base class if the section is a TOX section
+ const SwTOXBase* GetTOXBase() const;
+
+ // --> OD 2007-02-14 #b6521322#
+ void BreakLink();
+ // <--
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwSection( const SwSection& );
+ // @@@ but copy assignment "SwSection & operator= ( const SwSection& )" is public? @@@
+};
+
+
+enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS };
+
+class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+ /* SW_DLLPUBLIC */ SwSection* _GetSection() const;
+ SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert
+
+protected:
+ SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+ ~SwSectionFmt();
+
+ //Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
+ virtual void DelFrms();
+
+ //Erzeugt die Ansichten
+ virtual void MakeFrms();
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ // erfrage vom Format Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ SwSection* GetSection() const { return (SwSection*)_GetSection(); }
+ inline SwSectionFmt* GetParent() const;
+ inline SwSection* GetParentSection() const;
+
+ // alle Sections, die von dieser abgeleitet sind
+ // - sortiert nach : Name oder Position oder unsortiert
+ // - alle oder nur die, die sich im normalten Nodes-Array befinden
+ USHORT GetChildSections( SwSections& rArr,
+ SectionSort eSort = SORTSECT_NOT,
+ BOOL bAllSections = TRUE ) const;
+
+ // erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
+ // befindet.
+ BOOL IsInNodesArr() const;
+
+ SwSectionNode* GetSectionNode( BOOL bAlways = FALSE );
+ const SwSectionNode* GetSectionNode( BOOL bAlways = FALSE ) const
+ { return ((SwSectionFmt*)this)->GetSectionNode( bAlways ); }
+
+ // ist die Section eine gueltige fuers GlobalDocument?
+ const SwSection* GetGlobalDocSection() const;
+};
+
+// -------------- inlines ---------------------------------
+
+inline SwSection* SwSection::GetParent() const
+{
+ SwSectionFmt* pFmt = GetFmt();
+ SwSection* pRet = 0;
+ if( pFmt )
+ pRet = pFmt->GetParentSection();
+ return pRet;
+}
+
+inline SwSectionFmt* SwSectionFmt::GetParent() const
+{
+ SwSectionFmt* pRet = 0;
+ if( GetRegisteredIn() )
+ pRet = PTR_CAST( SwSectionFmt, GetRegisteredIn() );
+ return pRet;
+}
+
+inline SwSection* SwSectionFmt::GetParentSection() const
+{
+ SwSectionFmt* pParent = GetParent();
+ SwSection* pRet = 0;
+ if( pParent )
+ pRet = pParent->_GetSection();
+ return pRet;
+}
+
+
+#endif /* _SECTION_HXX */
diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx
new file mode 100644
index 000000000000..59d870fee531
--- /dev/null
+++ b/sw/inc/shellid.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: shellid.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SHELLID_HXX
+#define _SHELLID_HXX
+
+#include <sfx2/shell.hxx>
+
+/*--------------------------------------------------------------------
+ Beschreibung: Mapping fuer UI-Parameter
+ --------------------------------------------------------------------*/
+
+#define SW_BASESHELL (SFX_INTERFACE_SW_START + 1)
+#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + 2)
+#define SW_LISTSHELL (SFX_INTERFACE_SW_START + 3)
+#define SW_TABSHELL (SFX_INTERFACE_SW_START + 4)
+#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + 5)
+#define SW_GRFSHELL (SFX_INTERFACE_SW_START + 6)
+#define SW_OLESHELL (SFX_INTERFACE_SW_START + 7)
+#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + 8)
+#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + 9)
+
+#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + 10)
+#define SW_DOCSHELL (SFX_INTERFACE_SW_START + 11)
+#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + 12)
+#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + 13)
+#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + 14)
+#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + 15)
+
+#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + 16)
+#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + 17)
+#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + 18)
+
+#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + 19)
+#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + 20)
+#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + 21)
+#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + 22)
+#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + 23)
+#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + 24)
+#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + 25)
+#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + 26)
+#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + 27)
+#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + 28)
+#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + 29)
+#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + 30)
+
+#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + 31)
+#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + 32)
+
+#endif // _UIPARAM_HXX
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
new file mode 100644
index 000000000000..3be5406cf62c
--- /dev/null
+++ b/sw/inc/shellio.hxx
@@ -0,0 +1,678 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: shellio.hxx,v $
+ * $Revision: 1.39 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SHELLIO_HXX
+#define _SHELLIO_HXX
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <sfx2/docfile.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <sot/formats.hxx>
+#include <sot/storage.hxx>
+#include <svtools/parhtml.hxx>
+#include <tools/string.hxx>
+#include <tools/date.hxx>
+#include <tools/time.hxx>
+#include <tools/datetime.hxx>
+#include <tools/ref.hxx>
+#include <tools/urlobj.hxx>
+#include <swdllapi.h>
+#include <swtypes.hxx>
+#include <docfac.hxx> // SwDocFac
+#include <errhdl.hxx>
+#include <iodetect.hxx>
+
+// einige Forward - Deklarationen
+class SfxFilterContainer;
+class SfxFilter;
+class SfxItemPool;
+class SfxItemSet;
+class SfxMedium;
+class SvPtrarr;
+class SvStream;
+class SvStrings;
+class SvxFontItem;
+class SvxMacroTableDtor;
+//class Sw3Io;
+class SwCntntNode;
+class SwCrsrShell;
+class SwDoc;
+class SwPaM;
+class SwTextBlocks;
+struct SwPosition;
+struct Writer_Impl;
+
+// ab so vielen chars wird ein mit einem ASCII/W4W-Reader eingelesener
+// Absatz zwangsweise umgebrochen. Muss immer groesser als 200 sein !!!
+#define MAX_ASCII_PARA 10000
+
+
+class SW_DLLPUBLIC SwAsciiOptions
+{
+ String sFont;
+ rtl_TextEncoding eCharSet;
+ USHORT nLanguage;
+ LineEnd eCRLF_Flag;
+
+public:
+
+ const String& GetFontName() const { return sFont; }
+ void SetFontName( const String& rFont ) { sFont = rFont; }
+
+ rtl_TextEncoding GetCharSet() const { return eCharSet; }
+ void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; }
+
+ USHORT GetLanguage() const { return nLanguage; }
+ void SetLanguage( USHORT nVal ) { nLanguage = nVal; }
+
+ LineEnd GetParaFlags() const { return eCRLF_Flag; }
+ void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
+
+ void Reset()
+ {
+ sFont.Erase();
+ eCRLF_Flag = GetSystemLineEnd();
+ eCharSet = ::gsl_getSystemTextEncoding();
+ nLanguage = 0;
+ }
+ // for the automatic conversion (mail/news/...)
+ void ReadUserData( const String& );
+ void WriteUserData( String& );
+
+ SwAsciiOptions() { Reset(); }
+};
+
+/**************** SwReader/Reader ************************/
+// Basisklasse der moeglichen Optionen fuer einen speziellen Reader
+class Reader;
+// Ruft den Reader mit seinen Optionen, Dokument, Cursor etc.
+class SwReader;
+// SwRead ist der Pointer auf die Read-Optionen-Basisklasse
+typedef Reader *SwRead;
+
+class SwgReaderOption
+{
+ SwAsciiOptions aASCIIOpts;
+ union
+ {
+ BOOL bFmtsOnly;
+ struct
+ {
+ BOOL bFrmFmts: 1;
+ BOOL bPageDescs: 1;
+ BOOL bTxtFmts: 1;
+ BOOL bNumRules: 1;
+ BOOL bMerge:1;
+ } Fmts;
+ } What;
+
+public:
+ void ResetAllFmtsOnly() { What.bFmtsOnly = 0; }
+ BOOL IsFmtsOnly() const { return What.bFmtsOnly; }
+
+ BOOL IsFrmFmts() const { return What.Fmts.bFrmFmts; }
+ void SetFrmFmts( const BOOL bNew) { What.Fmts.bFrmFmts = bNew; }
+
+ BOOL IsPageDescs() const { return What.Fmts.bPageDescs; }
+ void SetPageDescs( const BOOL bNew) { What.Fmts.bPageDescs = bNew; }
+
+ BOOL IsTxtFmts() const { return What.Fmts.bTxtFmts; }
+ void SetTxtFmts( const BOOL bNew) { What.Fmts.bTxtFmts = bNew; }
+
+ BOOL IsNumRules() const { return What.Fmts.bNumRules; }
+ void SetNumRules( const BOOL bNew) { What.Fmts.bNumRules = bNew; }
+
+ BOOL IsMerge() const { return What.Fmts.bMerge; }
+ void SetMerge( const BOOL bNew ) { What.Fmts.bMerge = bNew; }
+
+ const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; }
+ void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; }
+ void ResetASCIIOpts() { aASCIIOpts.Reset(); }
+
+ SwgReaderOption()
+ { ResetAllFmtsOnly(); aASCIIOpts.Reset(); }
+};
+
+class SwReader: public SwDocFac
+{
+ SvStream* pStrm;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+ SfxMedium* pMedium; // wer ein Medium haben will (W4W)
+
+ SwPaM* pCrsr;
+ String aFileName;
+ String sBaseURL;
+
+public:
+ /*
+ * Initiales Einlesen. Dokument wird erst beim Read(..) angelegt.
+ * JP 25.04.95: oder falls es mitgegeben wird, in dieses.
+ * Sonderfall fuer Load mit Sw3Reader
+ */
+ //SwReader( SotStorage&, const String& rFilename, SwDoc *pDoc = 0 );
+ //SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwDoc *pDoc = 0 );
+ SwReader( SfxMedium&, const String& rFilename, SwDoc *pDoc = 0 );
+ /*
+ * In ein existierendes Dokument einlesen, Dokument und
+ * Position im Dokument werden aus dem SwPaM uebernommen.
+ */
+ SwReader( SvStream&, const String& rFilename, const String& rBaseURL, SwPaM& );
+ //SwReader( SotStorage&, const String& rFilename, SwPaM& );
+ SwReader( SfxMedium&, const String& rFilename, SwPaM& );
+ SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwPaM& );
+
+ /*
+ * Nur SwReader::Read(...) ist die Export-Schnittstelle!!!
+ */
+ BOOL NeedsPasswd( const Reader& );
+ BOOL CheckPasswd( const String&, const Reader& );
+ ULONG Read( const Reader& );
+
+ // ask for glossaries
+ BOOL HasGlossaries( const Reader& );
+ BOOL ReadGlossaries( const Reader&, SwTextBlocks&, BOOL bSaveRelFiles );
+
+ const String& GetBaseURL() const { return sBaseURL;}
+
+protected:
+ void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
+};
+
+
+
+/* */
+/**************** SPEZIELLE Reader ************************/
+
+// spezielle - Reader koennen beides sein !! (Excel, W4W, .. )
+#define SW_STREAM_READER 1
+#define SW_STORAGE_READER 2
+
+class SW_DLLPUBLIC Reader
+{
+ friend class SwReader;
+ SwDoc* pTemplate;
+ String aTemplateNm;
+ //String sBaseURL;
+
+ Date aDStamp;
+ Time aTStamp;
+ DateTime aChkDateTime;
+
+protected:
+ SvStream* pStrm;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+ SfxMedium* pMedium; // wer ein Medium haben will (W4W)
+
+ SwgReaderOption aOpt;
+ BOOL bInsertMode : 1;
+ BOOL bTmplBrowseMode : 1;
+ BOOL bReadUTF8: 1; // Stream als UTF-8 interpretieren
+ BOOL bBlockMode: 1;
+ BOOL bOrganizerMode : 1;
+ BOOL bHasAskTemplateName : 1;
+ BOOL bIgnoreHTMLComments : 1;
+
+ virtual String GetTemplateName() const;
+
+public:
+ Reader();
+ virtual ~Reader();
+
+ virtual int GetReaderType();
+ SwgReaderOption& GetReaderOpt() { return aOpt; }
+
+ virtual void SetFltName( const String& rFltNm );
+ static void SetNoOutlineNum( SwDoc& rDoc );
+
+ // den Item-Set eines Frm-Formats an das alte Format anpassen
+ static void ResetFrmFmtAttrs( SfxItemSet &rFrmSet );
+
+ // die Rahmen-/Grafik-/OLE-Vorlagen an das alte Format (ohne
+ // Umrandung etc.) anpassen
+ static void ResetFrmFmts( SwDoc& rDoc );
+
+ // Die Filter-Vorlage laden, setzen und wieder freigeben
+ SwDoc* GetTemplateDoc();
+ BOOL SetTemplate( SwDoc& rDoc );
+ void ClearTemplate();
+ void SetTemplateName( const String& rDir );
+ void MakeHTMLDummyTemplateDoc();
+
+ BOOL IsReadUTF8() const { return bReadUTF8; }
+ void SetReadUTF8( BOOL bSet ) { bReadUTF8 = bSet; }
+
+ BOOL IsBlockMode() const { return bBlockMode; }
+ void SetBlockMode( BOOL bSet ) { bBlockMode = bSet; }
+
+ BOOL IsOrganizerMode() const { return bOrganizerMode; }
+ void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+
+ void SetIgnoreHTMLComments( BOOL bSet ) { bIgnoreHTMLComments = bSet; }
+
+ virtual BOOL HasGlossaries() const;
+ virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+
+ // read the sections of the document, which is equal to the medium.
+ // returns the count of it
+ virtual USHORT GetSectionList( SfxMedium& rMedium,
+ SvStrings& rStrings ) const;
+
+ SotStorageRef getSotStorageRef() { return pStg; };
+ void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
+
+private:
+ virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
+
+ // alle die die Streams / Storages nicht geoeffnet brauchen,
+ // muessen die Methode ueberladen (W4W!!)
+ virtual int SetStrmStgPtr();
+};
+
+class AsciiReader: public Reader
+{
+ friend class SwReader;
+ virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+public:
+ AsciiReader(): Reader() {}
+};
+
+/*class SwgReader: public Reader
+{
+ virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+};
+*/
+class SW_DLLPUBLIC StgReader : public Reader
+{
+ String aFltName;
+
+protected:
+ ULONG OpenMainStream( SotStorageStreamRef& rRef, USHORT& rBuffSize );
+
+public:
+ virtual int GetReaderType();
+ const String& GetFltName() { return aFltName; }
+ virtual void SetFltName( const String& r );
+};
+
+
+/*class Sw3Reader : public StgReader
+{
+ Sw3Io* pIO;
+ virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+public:
+ Sw3Reader() : pIO( 0 ) {}
+
+ void SetSw3Io( Sw3Io* pIo ) { pIO = pIo; }
+
+ // read the sections of the document, which is equal to the medium.
+ // returns the count of it
+ virtual USHORT GetSectionList( SfxMedium& rMedium,
+ SvStrings& rStrings ) const;
+};*/
+
+/* */
+////////////////////////////////////////////////////////////////////////////
+
+// Der uebergebene Stream muss dynamisch angelegt werden und
+// vor dem Loeschen der Instanz per Stream() angefordert
+// und geloescht werden!
+
+class SwImpBlocks;
+
+class SW_DLLPUBLIC SwTextBlocks
+{
+// friend class Sw2TextBlocks;
+// friend class Sw3IoImp;
+ SwImpBlocks* pImp;
+ ULONG nErr;
+
+public:
+ SwTextBlocks( const String& );
+ ~SwTextBlocks();
+
+ void Flush(){}
+
+ SwDoc* GetDoc();
+ void ClearDoc(); // Doc-Inhalt loeschen
+ const String& GetName();
+ void SetName( const String& );
+ ULONG GetError() const { return nErr; }
+
+ String GetBaseURL() const;
+ void SetBaseURL( const String& rURL );
+
+ BOOL IsOld() const;
+ ULONG ConvertToNew(); // Textbausteine konvertieren
+
+ USHORT GetCount() const; // Anzahl Textbausteine ermitteln
+ USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
+
+ BOOL Delete( USHORT ); // Loeschen
+ USHORT Rename( USHORT, const String*, const String* ); // Umbenennen
+ ULONG CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+ const String& rLong ); // Block kopieren
+
+ BOOL BeginGetDoc( USHORT ); // Textbaustein einlesen
+ void EndGetDoc(); // Textbaustein wieder loslassen
+
+ BOOL BeginPutDoc( const String&, const String& ); // Speichern Beginn
+ USHORT PutDoc(); // Speichern Ende
+
+ USHORT PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
+
+ BOOL IsOnlyTextBlock( USHORT ) const;
+ BOOL IsOnlyTextBlock( const String& rShort ) const;
+
+ const String& GetFileName() const; // Dateiname von pImp
+ BOOL IsReadOnly() const; // ReadOnly-Flag von pImp
+
+ BOOL GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl );
+ BOOL SetMacroTable( USHORT nIdx, const SvxMacroTableDtor& rMacroTbl );
+
+ BOOL StartPutMuchBlockEntries();
+ void EndPutMuchBlockEntries();
+};
+
+// BEGIN source/filter/basflt/fltini.cxx
+
+extern void _InitFilter();
+extern void _FinitFilter();
+
+extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML;
+
+//SW_DLLPUBLIC SwRead SwGetReaderSw3();
+SW_DLLPUBLIC SwRead SwGetReaderXML();
+
+// END source/filter/basflt/fltini.cxx
+
+
+extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
+
+
+/* */
+/////////////////////////////////////////////////////////////////////////////
+
+/*
+ * Schreiben, Writer
+ */
+
+
+/* Basis-Klasse aller Writer */
+
+class IDocumentSettingAccess;
+class IDocumentStylePoolAccess;
+
+class SW_DLLPUBLIC Writer : public SvRefBase
+{
+ SwAsciiOptions aAscOpts;
+ String sBaseURL;
+
+ void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
+ void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
+
+protected:
+ Writer_Impl* pImpl;
+
+ SvStream* pStrm;
+ SwPaM* pOrigPam; // der letze zu bearbeitende Pam
+ const String* pOrigFileName;
+
+ void ResetWriter();
+ BOOL CopyNextPam( SwPaM ** );
+
+ void PutNumFmtFontsInAttrPool();
+ void PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL = TRUE );
+ void PutCJKandCTLFontsInAttrPool();
+
+ virtual ULONG WriteStream() = 0;
+ void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
+
+ IDocumentSettingAccess* getIDocumentSettingAccess();
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+
+ IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
+ const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const;
+
+public:
+ SwDoc* pDoc;
+ SwPaM* pCurPam;
+ BOOL bWriteAll : 1;
+ BOOL bShowProgress : 1;
+ BOOL bWriteClipboardDoc : 1;
+ BOOL bWriteOnlyFirstTable : 1;
+ BOOL bASCII_ParaAsCR : 1;
+ BOOL bASCII_ParaAsBlanc : 1;
+ BOOL bASCII_NoLastLineEnd : 1;
+ BOOL bUCS2_WithStartChar : 1;
+ BOOL bExportPargraphNumbering : 1;
+
+ BOOL bBlock : 1;
+ BOOL bOrganizerMode : 1;
+
+ Writer();
+ virtual ~Writer();
+
+ virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ ULONG Write( SwPaM&, SvStream&, const String* = 0 );
+ virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+
+ virtual void SetPasswd( const String& );
+ virtual void SetVersion( const String&, long );
+ virtual BOOL IsStgWriter() const;
+// virtual BOOL IsSw3Writer() const;
+
+ void SetShowProgress( BOOL bFlag = FALSE ) { bShowProgress = bFlag; }
+
+ const String* GetOrigFileName() const { return pOrigFileName; }
+
+ const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; }
+ void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; }
+
+ const String& GetBaseURL() const { return sBaseURL;}
+
+ // suche die naechste Bookmark-Position aus der Bookmark-Tabelle
+ sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const;
+ // build a bookmark table, which is sort by the node position. The
+ // OtherPos of the bookmarks also inserted.
+ void CreateBookmarkTbl();
+ // search alle Bookmarks in the range and return it in the Array
+ USHORT GetBookmarks( const SwCntntNode& rNd,
+ xub_StrLen nStt, xub_StrLen nEnd,
+ SvPtrarr& rArr );
+
+ // lege einen neuen PaM an der Position an
+ static SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
+ BOOL bNodesArray = TRUE );
+
+ // kopiere ggfs. eine lokale Datei ins Internet
+ BOOL CopyLocalFileToINet( String& rFileNm );
+
+ // Stream-spezifische Routinen, im Storage-Writer NICHT VERWENDEN!
+
+ // Optimierung der Ausgabe auf den Stream.
+ SvStream& OutLong( SvStream& rStrm, long nVal );
+ SvStream& OutULong( SvStream& rStrm, ULONG nVal );
+
+ // Hex-Zahl ausgeben, default ist 2.stellige Zahl
+ SvStream& OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen = 2 );
+ // 4-st. Hex-Zahl ausgeben
+ inline SvStream& OutHex4( SvStream& rStrm, USHORT nHex )
+ { return OutHex( rStrm, nHex, 4 ); }
+
+ inline SvStream& OutHex( USHORT nHex, BYTE nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
+ inline SvStream& OutHex4( USHORT nHex ) { return OutHex( Strm(), nHex, 4 ); }
+ inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
+ inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); }
+
+ void SetStrm( SvStream& rStrm ) { pStrm = &rStrm; }
+#ifdef PRODUCT
+ SvStream& Strm() { return *pStrm; }
+#else
+ SvStream& Strm();
+#endif
+
+ void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+};
+
+#ifndef SW_DECL_WRITER_DEFINED
+#define SW_DECL_WRITER_DEFINED
+SV_DECL_REF(Writer)
+#endif
+SV_IMPL_REF(Writer)
+
+// Basisklasse fuer alle Storage-Writer
+class SW_DLLPUBLIC StgWriter : public Writer
+{
+protected:
+ String aFltName;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+
+ // Fehler beim Aufruf erzeugen
+ virtual ULONG WriteStream();
+ virtual ULONG WriteStorage() = 0;
+ virtual ULONG WriteMedium( SfxMedium& ) = 0;
+
+ using Writer::Write;
+
+public:
+ StgWriter() : Writer() {}
+
+ virtual BOOL IsStgWriter() const;
+
+ virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+
+ SotStorage& GetStorage() const { return *pStg; }
+};
+
+/*class Sw3Writer : public StgWriter
+{
+ Sw3Io* pIO;
+ BOOL bSaveAs : 1;
+
+ virtual ULONG WriteStorage();
+ virtual ULONG WriteMedium( SfxMedium& );
+
+public:
+ Sw3Writer() : pIO( 0 ), bSaveAs( FALSE ) {}
+
+ virtual BOOL IsSw3Writer() const;
+};
+
+*/
+
+// Schnittstellenklasse fuer den allgemeinen Zugriff auf die
+// speziellen Writer
+
+class SwWriter
+{
+ SvStream* pStrm;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+ SfxMedium* pMedium;
+
+ SwPaM* pOutPam;
+ SwCrsrShell *pShell;
+ SwDoc &rDoc;
+
+ //String sBaseURL;
+
+ BOOL bWriteAll;
+
+public:
+ ULONG Write( WriterRef& rxWriter, const String* = 0);
+
+ SwWriter( SvStream&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SvStream&, SwDoc & );
+ SwWriter( SvStream&, SwPaM &, BOOL bWriteAll = FALSE );
+
+// SwWriter( SotStorage&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
+// SwWriter( SotStorage&, SwPaM&, BOOL bWriteAll = FALSE );
+
+ SwWriter( SfxMedium&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SfxMedium&, SwDoc & );
+// SwWriter( SfxMedium&, SwPaM&, BOOL bWriteAll = FALSE );
+
+ //const String& GetBaseURL() const { return sBaseURL;}
+};
+
+
+/* */
+/////////////////////////////////////////////////////////////////////////////
+
+typedef Reader* (*FnGetReader)();
+typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
+
+struct SwReaderWriterEntry
+{
+ Reader* pReader;
+ FnGetReader fnGetReader;
+ FnGetWriter fnGetWriter;
+ BOOL bDelReader;
+
+ SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, BOOL bDel )
+ : pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
+ {}
+
+ /// Get access to the reader
+ Reader* GetReader();
+
+ /// Get access to the writer
+ void GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const;
+};
+
+namespace SwReaderWriter
+{
+ /// Return reader based on ReaderWriterEnum
+ Reader* GetReader( ReaderWriterEnum eReader );
+
+ /// Return reader based on the name
+ Reader* GetReader( const String& rFltName );
+
+ /// Return writer based on the name
+ void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xWrt );
+}
+
+void GetRTFWriter( const String&, const String&, WriterRef& );
+void GetASCWriter( const String&, const String&, WriterRef& );
+//void GetSw3Writer( const String&, const String&, WriterRef& );
+void GetHTMLWriter( const String&, const String&, WriterRef& );
+void GetXMLWriter( const String&, const String&, WriterRef& );
+void GetWW8Writer( const String&, const String&, WriterRef& );
+
+#endif
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
new file mode 100644
index 000000000000..4c7bb09ebe45
--- /dev/null
+++ b/sw/inc/shellres.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: shellres.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SHELLRES_HXX
+#define _SHELLRES_HXX
+
+
+#include <tools/string.hxx>
+
+#ifndef _BITMAP_HXX //autogen
+#include <vcl/bitmap.hxx>
+#endif
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+#endif
+
+struct SW_DLLPUBLIC ShellResource : public Resource
+{
+ String aPostItAuthor;
+ String aPostItPage;
+ String aPostItLine;
+
+ // Calc Fehlerstrings
+ String aCalc_Syntax;
+ String aCalc_ZeroDiv;
+ String aCalc_Brack;
+ String aCalc_Pow;
+ String aCalc_VarNFnd;
+ String aCalc_Overflow;
+ String aCalc_WrongTime;
+ String aCalc_Default;
+ String aCalc_Error;
+
+ // fuers GetRefFeld - oben/unten
+ String aGetRefFld_Up;
+ String aGetRefFld_Down;
+ // --> OD 2007-09-13 #i81002#
+ // for GetRefField - referenced item not found
+ String aGetRefFld_RefItemNotFound;
+ // <--
+ // fuer dynamisches Menu - String "alle"
+ String aStrAllPageHeadFoot;
+ // fuer einige Listboxen - String "keine"
+ String aStrNone;
+ // fuer Felder, die Fixiert sind
+ String aFixedStr;
+
+ //names of TOXs
+ String aTOXIndexName;
+ String aTOXUserName;
+ String aTOXContentName;
+ String aTOXIllustrationsName;
+ String aTOXObjectsName;
+ String aTOXTablesName;
+ String aTOXAuthoritiesName;
+
+ String aHyperlinkClick;
+
+ SvStringsDtor aDocInfoLst;
+
+ // Fly-Anker Bmps
+// Bitmap aAnchorBmp;
+// Bitmap aDragAnchorBmp;
+
+ // die AutoFormat-Redline-Kommentare
+ inline const SvStringsDtor& GetAutoFmtNameLst() const;
+
+ // returns for the specific filter the new names of pagedescs
+ // This method is for the old code of the specific filters with
+ // now localized names
+ String GetPageDescName( USHORT nNo, BOOL bFirst = FALSE,
+ BOOL bFollow = FALSE );
+
+ ShellResource();
+ ~ShellResource();
+
+private:
+ void _GetAutoFmtNameLst() const;
+ SvStringsDtor *pAutoFmtNameLst;
+ String sPageDescFirstName;
+ String sPageDescFollowName;
+ String sPageDescName;
+};
+
+inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const
+{
+ if( !pAutoFmtNameLst )
+ _GetAutoFmtNameLst();
+ return *pAutoFmtNameLst;
+}
+
+
+#endif //_SHELLRES_HXX
diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx
new file mode 100644
index 000000000000..103b58ed71b9
--- /dev/null
+++ b/sw/inc/sortopt.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sortopt.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SORTOPT_HXX
+#define _SORTOPT_HXX
+
+
+#include <svtools/svarray.hxx>
+#include <tools/string.hxx>
+#include "swdllapi.h"
+
+enum SwSortOrder { SRT_ASCENDING, SRT_DESCENDING };
+enum SwSortDirection { SRT_COLUMNS, SRT_ROWS };
+
+/*--------------------------------------------------------------------
+ Beschreibung: SortierSchluessel
+ --------------------------------------------------------------------*/
+struct SW_DLLPUBLIC SwSortKey
+{
+ SwSortKey();
+ SwSortKey( USHORT nId, const String& rSrtType, SwSortOrder eOrder );
+ SwSortKey( const SwSortKey& rOld );
+
+ String sSortType;
+ SwSortOrder eSortOrder;
+ USHORT nColumnId;
+ BOOL bIsNumeric;
+};
+
+SV_DECL_PTRARR(SwSortKeys, SwSortKey*, 3, 1)
+
+struct SW_DLLPUBLIC SwSortOptions
+{
+ SwSortOptions();
+ ~SwSortOptions();
+ SwSortOptions(const SwSortOptions& rOpt);
+
+ SwSortKeys aKeys;
+ SwSortDirection eDirection;
+ sal_Unicode cDeli;
+ USHORT nLanguage;
+ BOOL bTable;
+ BOOL bIgnoreCase;
+};
+
+#endif // _SORTOPT_HXX
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
new file mode 100644
index 000000000000..abe0265ea39f
--- /dev/null
+++ b/sw/inc/splargs.hxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: splargs.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SPLARGS_HXX
+#define _SPLARGS_HXX
+
+#include <i18npool/lang.h>
+#include <tools/solar.h>
+#include <tools/gen.hxx>
+#include <limits.h> // USHRT_MAX
+#include <tools/string.hxx>
+
+class SwTxtNode;
+class SwIndex;
+class SpellCheck;
+class Font;
+#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
+#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
+
+/*************************************************************************
+ * struct SwArgsBase
+ *************************************************************************/
+
+
+struct SwArgsBase // used for text conversion (Hangul/Hanja, ...)
+{
+ SwTxtNode *pStartNode;
+ SwIndex *pStartIdx;
+ SwTxtNode *pEndNode;
+ SwIndex *pEndIdx;
+
+ SwArgsBase(
+ SwTxtNode* pStart, SwIndex& rStart,
+ SwTxtNode* pEnd, SwIndex& rEnd )
+ : pStartNode( pStart ), pStartIdx( &rStart ),
+ pEndNode( pEnd ), pEndIdx( &rEnd )
+ {}
+
+ void SetStart(SwTxtNode* pStart, SwIndex& rStart )
+ {
+ pStartNode = pStart; pStartIdx = &rStart ;
+ }
+
+ void SetEnd( SwTxtNode* pEnd, SwIndex& rEnd )
+ {
+ pEndNode = pEnd; pEndIdx = &rEnd ;
+ }
+};
+
+/*************************************************************************
+ * struct SwConversionArgs
+ * used for text conversion (Hangul/Hanja, Simplified/Traditional Chinese, ...)
+ *************************************************************************/
+
+struct SwConversionArgs : SwArgsBase
+{
+ rtl::OUString aConvText; // convertible text found
+ LanguageType nConvSrcLang; // (source) language to look for
+ LanguageType nConvTextLang; // language of aConvText (if the latter one was found)
+
+ // used for chinese translation
+ LanguageType nConvTargetLang; // target language of text to be changed
+ const Font *pTargetFont; // target font of text to be changed
+ // explicitly enables or disables application of the above two
+ sal_Bool bAllowImplicitChangesForNotConvertibleText;
+
+ SwConversionArgs( LanguageType nLang,
+ SwTxtNode* pStart, SwIndex& rStart,
+ SwTxtNode* pEnd, SwIndex& rEnd )
+ : SwArgsBase( pStart, rStart, pEnd, rEnd ),
+ nConvSrcLang( nLang ),
+ nConvTextLang( LANGUAGE_NONE ),
+ nConvTargetLang( LANGUAGE_NONE ),
+ pTargetFont( NULL ),
+ bAllowImplicitChangesForNotConvertibleText( sal_False )
+ {}
+};
+
+/*************************************************************************
+ * struct SwSpellArgs
+ *************************************************************************/
+
+struct SwSpellArgs : SwArgsBase
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > xSpeller;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
+
+ bool bIsGrammarCheck;
+
+ SwSpellArgs(::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &rxSplChk,
+ SwTxtNode* pStart, SwIndex& rStart,
+ SwTxtNode* pEnd, SwIndex& rEnd,
+ bool bGrammar )
+ : SwArgsBase( pStart, rStart, pEnd, rEnd ),
+ xSpeller( rxSplChk ),
+ bIsGrammarCheck( bGrammar )
+ {}
+};
+
+/*************************************************************************
+ * class SwInterHyphInfo
+ *************************************************************************/
+
+// Parameter-Klasse fuer Hyphenate
+// docedt.cxx: SwDoc::Hyphenate()
+// txtedt.cxx: SwTxtNode::Hyphenate()
+// txthyph.cxx: SwTxtFrm::Hyphenate()
+
+class SwInterHyphInfo
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord;
+ const Point aCrsrPos;
+ sal_Bool bAuto : 1;
+ sal_Bool bNoLang : 1;
+ sal_Bool bCheck : 1;
+public:
+ xub_StrLen nStart;
+ xub_StrLen nLen;
+ xub_StrLen nWordStart;
+ xub_StrLen nWordLen;
+ xub_StrLen nHyphPos;
+ sal_uInt16 nMinTrail;
+
+ inline SwInterHyphInfo( const Point &rCrsrPos,
+ const sal_uInt16 nStartPos = 0,
+ const sal_uInt16 nLength = USHRT_MAX )
+ : aCrsrPos( rCrsrPos ),
+ bAuto(sal_False), bNoLang(sal_False), bCheck(sal_False),
+ nStart(nStartPos), nLen(nLength),
+ nWordStart(0), nWordLen(0),
+ nHyphPos(0), nMinTrail(0)
+ { }
+ inline xub_StrLen GetEnd() const
+ { return STRING_LEN == nLen ? nLen : nStart + nLen; }
+ inline const Point *GetCrsrPos() const
+ { return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : 0; }
+ inline sal_Bool IsCheck() const { return bCheck; }
+ inline void SetCheck( const sal_Bool bNew ) { bCheck = bNew; }
+ inline void SetNoLang( const sal_Bool bNew ) { bNoLang = bNew; }
+
+ inline void
+ SetHyphWord(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > &rxHW)
+ { xHyphWord = rxHW; }
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord >
+ GetHyphWord() { return xHyphWord; }
+};
+
+
+#endif
diff --git a/sw/inc/statstr.hrc b/sw/inc/statstr.hrc
new file mode 100644
index 000000000000..0726b40199c0
--- /dev/null
+++ b/sw/inc/statstr.hrc
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: statstr.hrc,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _STATSTR_HRC
+#define _STATSTR_HRC
+
+#include "rcid.hrc"
+
+#define STR_STATSTR_W4WREAD (RC_STATLIN_STR + 0)
+#define STR_STATSTR_W4WWRITE (RC_STATLIN_STR + 1)
+#define STR_STATSTR_SWGREAD (RC_STATLIN_STR + 2)
+#define STR_STATSTR_SWGWRITE (RC_STATLIN_STR + 3)
+#define STR_STATSTR_REFORMAT (RC_STATLIN_STR + 4)
+#define STR_STATSTR_AUTOFORMAT (RC_STATLIN_STR + 5)
+#define STR_STATSTR_IMPGRF (RC_STATLIN_STR + 6)
+#define STR_STATSTR_SEARCH (RC_STATLIN_STR + 7)
+#define STR_STATSTR_FORMAT (RC_STATLIN_STR + 8)
+#define STR_STATSTR_PRINT (RC_STATLIN_STR + 9)
+#define STR_STATSTR_LAYOUTINIT (RC_STATLIN_STR + 10)
+#define STR_STATSTR_LETTER (RC_STATLIN_STR + 11)
+#define STR_STATSTR_SPELL (RC_STATLIN_STR + 12)
+#define STR_STATSTR_HYPHEN (RC_STATLIN_STR + 13)
+#define STR_STATSTR_TOX_INSERT (RC_STATLIN_STR + 14)
+#define STR_STATSTR_TOX_UPDATE (RC_STATLIN_STR + 15)
+#define STR_STATSTR_SUMMARY (RC_STATLIN_STR + 16)
+#define STR_STATSTR_SWGPRTOLENOTIFY (RC_STATLIN_STR + 17)
+
+#endif
+
+
+
diff --git a/sw/inc/stringhash.hxx b/sw/inc/stringhash.hxx
new file mode 100644
index 000000000000..1fb153b1bf21
--- /dev/null
+++ b/sw/inc/stringhash.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: stringhash.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _STRINGHASH_HXX
+#define _STRINGHASH_HXX
+
+#include <tools/string.hxx>
+
+struct StringEq
+{
+ sal_Bool operator() ( const String *r1,
+ const String *r2) const
+ {
+ return r1->Equals(*r2);
+ }
+};
+
+struct StringEqRef
+{
+ sal_Bool operator() (const String &r1, const String &r2) const
+ {
+ return r1.Equals(r2);
+ }
+};
+
+struct StringHash
+{
+ size_t operator() ( const String *rString) const
+ {
+ sal_Int32 h, nLen;
+ h = nLen = rString->Len();
+ const sal_Unicode *pStr = rString->GetBuffer();
+
+ if ( nLen < 16 )
+ while ( nLen-- > 0 )
+ h = (h*37) + *(pStr++);
+ else
+ {
+ sal_Int32 nSkip;
+ const sal_Unicode* pEndStr = pStr+nLen-5;
+
+ /* only sample some characters */
+ /* the first 3, some characters between, and the last 5 */
+ h = (h*39) + *(pStr++);
+ h = (h*39) + *(pStr++);
+ h = (h*39) + *(pStr++);
+
+ nSkip = nLen / nLen < 32 ? 4 : 8;
+ nLen -= 8;
+ while ( nLen > 0 )
+ {
+ h = (h*39) + ( *pStr );
+ pStr += nSkip;
+ nLen -= nSkip;
+ }
+
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ }
+ return h;
+ }
+
+ size_t operator() (const String & rStr) const
+ {
+ return (*this)(&rStr);
+ }
+};
+
+struct StringHashRef
+{
+ size_t operator () (const String &rStr) const
+ {
+ StringHash aStrHash;
+
+ return aStrHash(&rStr);
+ }
+};
+#endif // _STRINGHASH_HXX
diff --git a/sw/inc/sw.mk b/sw/inc/sw.mk
new file mode 100644
index 000000000000..e827ec156025
--- /dev/null
+++ b/sw/inc/sw.mk
@@ -0,0 +1,44 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: sw.mk,v $
+#
+# $Revision: 1.15 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# CDEFS=$(CDEFS) -DXXX
+
+# Bereiche aktivieren
+
+#CDEFS+=-DXML_CORE_API
+CDEFS+=-DACCESSIBLE_LAYOUT
+
+# define SW_DLLIMPLEMENTATION (see @ swdllapi.h)
+.IF "$(MAKING_LIBMSWORD)" != "TRUE"
+CDEFS += -DSW_DLLIMPLEMENTATION
+.ENDIF
+
+VISIBILITY_HIDDEN=TRUE
diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
new file mode 100644
index 000000000000..1a2a9dadbe70
--- /dev/null
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sd_primitivetypes2d.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 INCLUDED_SW_PRIMITIVETYPES2D_HXX
+#define INCLUDED_SW_PRIMITIVETYPES2D_HXX
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVETYPES2D_HXX
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0)
+#define PRIMITIVE2D_ID_SWPOSTITANKORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
+#define PRIMITIVE2D_ID_SWPOSTITSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2)
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // INCLUDED_SW_PRIMITIVETYPES2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
new file mode 100644
index 000000000000..78f05d419d0b
--- /dev/null
+++ b/sw/inc/swabstdlg.hxx
@@ -0,0 +1,501 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swabstdlg.hxx,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SW_ABSTDLG_HXX
+#define _SW_ABSTDLG_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/solar.h>
+#include <tools/string.hxx>
+#include <sfx2/sfxdlg.hxx>
+#include <svx/svxdlg.hxx>
+#include <vcl/syswin.hxx>
+#ifndef _GLOBALS_HRC
+#include <globals.hrc>
+#endif
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include "swunodef.hxx"
+#include "itabenum.hxx"
+
+class SfxViewFrame;
+class SfxBindings;
+class SfxItemSet;
+class ResId;
+class Window;
+class String;
+class SfxItemPool;
+class SfxStyleSheetBase;
+class SwGlossaryHdl;
+class SwField;
+
+class SwLabFmtPage;
+class SwLabRec;
+class SwAsciiOptions;
+class SwDocShell;
+class SvStream;
+class SwWrtShell;
+class SfxRequest;
+class SwView;
+class SwTableAutoFmt;
+class SwTOXMgr;
+class SwForm;
+struct CurTOXType;
+class SwTOXDescription;
+class SwTOXBase;
+class SwSection;
+struct SwDBData;
+class SwField;
+class Printer;
+class SwLabItem;
+class SwNewDBMgr;
+class SwTableFUNC;
+class SwChildWinWrapper;
+struct SfxChildWinInfo;
+class SwTOXMark;
+struct SwDocStat;
+#include <cnttab.hxx> //add for struct CurTOXType
+
+namespace com{namespace sun{namespace star{
+ namespace frame{
+ class XFrame;
+ }
+ namespace sdbcx{
+ class XColumnsSupplier;
+ }
+ namespace sdbc{
+ class XDataSource;
+ class XConnection;
+ class XResultSet;
+ }
+}}}
+
+typedef void (*SwLabDlgMethod) (::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel, const SwLabItem& rItem);
+
+typedef String (*GlossaryGetCurrGroup)();
+typedef void (*GlossarySetActGroup)(const String& rNewGroup);
+
+class AbstractGlossaryDlg : public VclAbstractDialog //add for SwGlossaryDlg
+{
+public:
+ virtual String GetCurrGrpName() const = 0;
+ virtual String GetCurrShortName() const = 0;
+};
+
+class AbstractFldInputDlg : public VclAbstractDialog //add for SwFldInputDlg
+{
+public:
+ //from class SalFrame
+ virtual void SetWindowState( const ByteString& rStr ) = 0;
+ virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0;
+};
+
+class AbstractInsFootNoteDlg : public VclAbstractDialog //add for SwInsFootNoteDlg
+{
+public:
+ virtual String GetFontName() = 0;
+ virtual BOOL IsEndNote() = 0;
+ virtual String GetStr() = 0;
+ //from class Window
+ virtual void SetHelpId( ULONG nHelpId ) = 0;
+ virtual void SetText( const XubString& rStr ) = 0;
+};
+
+class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGrfRulerDlg
+{
+public:
+ virtual String GetGraphicName() = 0;
+ virtual BOOL IsSimpleLine() = 0;
+ virtual BOOL HasImages() const = 0;
+};
+
+class AbstractInsTableDlg : public VclAbstractDialog //add for SwInsTableDlg
+{
+public:
+ virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
+ SwTableAutoFmt *& prTAFmt ) = 0;
+};
+
+class AbstractJavaEditDialog : public VclAbstractDialog //add for SwJavaEditDialog
+{
+public:
+ virtual String GetText() = 0;
+ virtual String GetType() = 0;
+ virtual BOOL IsUrl() = 0;
+ virtual BOOL IsNew() = 0;
+ virtual BOOL IsUpdate() = 0;
+};
+
+class AbstractMailMergeDlg : public VclAbstractDialog //add for SwMailMergeDlg
+{
+public:
+ virtual USHORT GetMergeType() = 0;
+ virtual const ::rtl::OUString& GetSaveFilter() const = 0;
+ virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0;
+};
+class AbstractMailMergeCreateFromDlg : public VclAbstractDialog //add for SwMailMergeCreateFromDlg
+{
+public:
+ virtual BOOL IsThisDocument() const = 0;
+};
+class AbstractMailMergeFieldConnectionsDlg : public VclAbstractDialog //add for SwMailMergeFieldConnectionsDlg
+{
+public:
+ virtual BOOL IsUseExistingConnections() const = 0;
+};
+
+class AbstractMultiTOXTabDialog : public VclAbstractDialog //add for SwMultiTOXTabDialog
+{
+public:
+ virtual SwForm* GetForm(CurTOXType eType) = 0;
+ virtual CurTOXType GetCurrentTOXType() const = 0;
+ virtual SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes) = 0;
+ //from SfxTabDialog
+ virtual const SfxItemSet* GetOutputItemSet() const = 0;
+};
+
+class AbstractEditRegionDlg : public VclAbstractDialog //add for SwEditRegionDlg
+{
+public:
+ virtual void SelectSection(const String& rSectionName) = 0;
+};
+class AbstractInsertSectionTabDialog : public VclAbstractDialog //add for SwInsertSectionTabDialog
+{
+public:
+ virtual void SetSection(const SwSection& rSect) = 0;
+};
+
+class AbstractSwWordCountDialog : public VclAbstractDialog
+{
+public:
+ virtual void SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc) = 0;
+};
+
+class AbstractSwInsertAbstractDlg : public VclAbstractDialog // add for SwInsertAbstractDlg
+{
+public:
+ virtual BYTE GetLevel() const = 0;
+ virtual BYTE GetPara() const = 0;
+};
+
+class AbstractSwAsciiFilterDlg : public VclAbstractDialog // add for SwAsciiFilterDlg
+{
+public:
+ virtual void FillOptions( SwAsciiOptions& rOptions ) = 0;
+
+};
+
+class AbstractSwBreakDlg : public VclAbstractDialog // add for SwBreakDlg
+{
+public:
+ virtual String GetTemplateName() = 0;
+ virtual USHORT GetKind() = 0;
+ virtual USHORT GetPageNumber() = 0;
+
+};
+
+class AbstractSplitTableDialog : public VclAbstractDialog // add for
+{
+public:
+ virtual sal_uInt16 GetSplitMode() = 0;
+};
+
+class AbstractSwConvertTableDlg : public VclAbstractDialog // add for SwConvertTableDlg
+{
+public:
+ virtual void GetValues( sal_Unicode& rDelim,
+ SwInsertTableOptions& rInsTblFlags,
+ SwTableAutoFmt *& prTAFmt ) = 0;
+};
+
+class AbstractSwInsertDBColAutoPilot : public VclAbstractDialog // add for SwInsertDBColAutoPilot
+{
+public:
+
+ virtual void DataToDoc( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xResultSet) = 0;
+};
+
+class AbstractDropDownFieldDialog : public VclAbstractDialog //add for DropDownFieldDialog
+{
+public:
+ virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow
+ virtual void SetWindowState( const ByteString& rStr ) =0;//this method inherit from SystemWindow
+};
+
+class AbstarctSwLabDlg : public SfxAbstractTabDialog //add for SwLabDlg
+{
+public:
+ virtual const String& GetBusinessCardStr() const = 0;
+ virtual Printer *GetPrt() =0;
+};
+
+class AbstarctSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossaryDlg
+{
+public:
+ virtual void InsertGlos(const String &rRegion, const String &rGlosName) = 0; // inline
+ virtual USHORT GetSelectedIdx() const = 0; // inline
+ virtual void SelectEntryPos(USHORT nIdx) = 0; // inline
+};
+
+class AbstractSwSplitTableDlg :public VclAbstractDialog //add for SwSplitTableDlg
+{
+public:
+ virtual BOOL IsHorizontal() const = 0;
+ virtual BOOL IsProportional() const = 0;
+ virtual long GetCount() const = 0;
+};
+
+class AbstractSwAutoFormatDlg : public VclAbstractDialog //add for SwAutoFormatDlg
+{
+public:
+ virtual void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const = 0;
+};
+
+class AbstractSwFldDlg : public SfxAbstractTabDialog //add for SwFldDlg
+{
+public:
+ virtual void Start( BOOL bShow = TRUE ) = 0; //this method from sfxtabdialog
+ virtual void Initialize(SfxChildWinInfo *pInfo) = 0;
+ virtual void ReInitDlg() = 0;
+ virtual void ActivateDatabasePage() = 0;
+ virtual void ShowPage( USHORT nId ) = 0;// this method from SfxTabDialog
+ virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer
+};
+
+class AbstractSwRenameXNamedDlg : public VclAbstractDialog //add for SwRenameXNamedDlg
+{
+public:
+ virtual void SetForbiddenChars( const String& rSet ) = 0;
+ virtual void SetAlternativeAccess(
+ STAR_REFERENCE( container::XNameAccess ) & xSecond,
+ STAR_REFERENCE( container::XNameAccess ) & xThird ) = 0;
+};
+
+class AbstractSwModalRedlineAcceptDlg : public VclAbstractDialog //add for SwModalRedlineAcceptDlg
+{
+public:
+ virtual void AcceptAll( BOOL bAccept ) = 0;
+};
+
+class AbstractMarkFloatDlg : public VclAbstractDialog //add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg
+{
+public:
+ virtual void ReInitDlg(SwWrtShell& rWrtShell) = 0;
+ virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer
+};
+
+#define RET_LOAD_DOC 100
+#define RET_EDIT_DOC 101
+#define RET_EDIT_RESULT_DOC 102
+#define RET_TARGET_CREATED 103
+#define RET_REMOVE_TARGET 104
+
+class SwView;
+class SwMailMergeConfigItem;
+
+class AbstractMailMergeWizard : public VclAbstractDialog2
+{
+public:
+ virtual void SetReloadDocument(const String& rURL) = 0;
+ virtual const String& GetReloadDocument() const = 0;
+ virtual BOOL ShowPage( USHORT nLevel ) = 0;
+ virtual sal_uInt16 GetRestartPage() const = 0;
+};
+
+
+//-------Swabstract fractory
+class SwAbstractDialogFactory
+{
+public:
+ static SwAbstractDialogFactory* Create();
+
+ virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog
+ const SfxItemSet& rAttr,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame,
+ sal_uInt32 nResId
+ ) = 0;
+ virtual AbstractSwWordCountDialog* CreateSwWordCountDialog( Window* pWindow ) = 0;
+ virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg ( Window* pParent, int nResId) = 0; // add for SwInsertAbstractDlg
+ virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh,
+ SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg
+ virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0;// add for SwInsertBookmarkDlg
+
+ virtual AbstractSwBreakDlg * CreateSwBreakDlg( Window *pParent, SwWrtShell &rSh,int nResId ) = 0; // add for SwBreakDlg
+ virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ) = 0; //add for SwChangeDBDlg
+ virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
+ const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE) = 0;
+ virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView , int nResId, bool bToTable) = 0; //add for SwConvertTableDlg
+ virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog
+
+ virtual AbstractSwInsertDBColAutoPilot* CreateSwInsertDBColAutoPilot( SwView& rView, // add for SwInsertDBColAutoPilot
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource,
+ com::sun::star::uno::Reference<com::sun::star::sdbcx::XColumnsSupplier> xColSupp,
+ const SwDBData& rData, int nResId) = 0;
+ virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) = 0;//add for SwFootNoteOptionDlg
+
+ virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
+ SwField* pField,int nResId, BOOL bNextButton = FALSE ) = 0;
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ) = 0; //add for SwEnvDlg
+
+
+ virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
+ SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId ) = 0;
+
+ virtual SwLabDlgMethod GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
+
+ virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg
+ SwView& rVw,
+ const SfxItemSet& rCoreSet,
+ BYTE nDialogMode,
+ int nResId,
+ const String *pCollName = 0,
+ BOOL bDraw = FALSE,
+ UINT16 nDefPage = 0) = 0;
+
+ virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg
+
+ virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ) = 0; //add for SwTableHeightDlg SwSortDlg
+ virtual AbstractSplitTableDialog * CreateSplitTblDialog ( Window * pParent, SwWrtShell &rSh ) = 0; //add for SwSplitTblDlg
+
+ virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
+ int nResId,
+ BOOL bSetAutoFmt = TRUE,
+ const SwTableAutoFmt* pSelFmt = 0 ) = 0;
+ virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, USHORT nType, int nResId ) = 0;//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) = 0; //add for SwWrapDlg
+
+ virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ) = 0; //add for SwTableWidthDlg
+ virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
+ const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ) = 0; //add for SwTableTabDlg
+
+ virtual AbstractSwFldDlg * CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId ) = 0; //add for SwFldDlg
+ virtual SfxAbstractDialog* CreateSwFldEditDlg ( SwView& rVw, int nResId ) = 0; //add for SwFldEditDlg
+ virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg( Window* pParent, //add for SwRenameXNamedDlg
+ STAR_REFERENCE( container::XNamed ) & xNamed,
+ STAR_REFERENCE( container::XNameAccess ) & xNameAccess, int nResId ) = 0;
+ virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ) = 0; //add for SwModalRedlineAcceptDlg
+
+ virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, BOOL& rWithPrev ) = 0; //add for SwMergeTblDlg
+ virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
+ SfxViewFrame *pFrame, Window *pParent,
+ const SfxItemSet& rCoreSet,
+ BOOL bNewFrm = TRUE,
+ USHORT nResType = DLG_FRM_STD,
+ BOOL bFmt = FALSE,
+ UINT16 nDefPage = 0,
+ const String* pFmtStr = 0) = 0; //add for SwFrmDlg
+ virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
+ Window* pParent,
+ SfxStyleSheetBase& rBase,
+ USHORT nRegion,
+ BOOL bColumn = FALSE,
+ SwWrtShell* pActShell = 0,
+ BOOL bNew = FALSE ) = 0; //add for SwTemplateDlg
+ virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
+ SfxViewFrame* pViewFrame,
+ SwGlossaryHdl* pGlosHdl,
+ SwWrtShell *pWrtShell) = 0; //add for SwGlossaryDlg
+ virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
+ Window *pParent, SwWrtShell &rSh,
+ SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
+ virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
+ Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
+ virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
+ SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
+ virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
+ Window * pParent ) = 0; //add for SwInsertGrfRulerDlg
+ virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
+ SwView& rView ) = 0; //add for SwInsTableDlg
+ virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId,
+ Window* pParent, SwWrtShell* pWrtSh ) = 0; //add for SwJavaEditDialog
+ virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId,
+ Window* pParent, SwWrtShell& rSh,
+ const String& rSourceName,
+ const String& rTblName,
+ sal_Int32 nCommandType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0 ) = 0; //add for SwMailMergeDlg
+ virtual AbstractMailMergeCreateFromDlg* CreateMailMergeCreateFromDlg( int nResId,
+ Window* pParent ) = 0; //add for SwMailMergeCreateFromDlg
+ virtual AbstractMailMergeFieldConnectionsDlg* CreateMailMergeFieldConnectionsDlg( int nResId,
+ Window* pParent ) = 0; //add for SwMailMergeFieldConnectionsDlg
+ virtual VclAbstractDialog* CreateMultiTOXMarkDlg( int nResId,
+ Window* pParent, SwTOXMgr &rTOXMgr ) = 0; //add for SwMultiTOXMarkDlg
+ virtual SfxAbstractTabDialog* CreateSwTabDialog( int nResId,
+ Window* pParent,
+ const SfxItemSet* pSwItemSet,
+ SwWrtShell &) = 0; //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog
+ virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
+ Window* pParent, const SfxItemSet& rSet,
+ SwWrtShell &rShell,
+ SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
+ BOOL bGlobal = FALSE) = 0; //add for SwMultiTOXTabDialog
+ virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
+ Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg
+ virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
+ Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh ) = 0; //add for SwInsertSectionTabDialog
+ virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( int nResId,
+ SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo,
+ sal_Bool bNew=sal_True) = 0; //add for SwIndexMarkFloatDlg
+ virtual AbstractMarkFloatDlg* CreateAuthMarkFloatDlg( int nResId,
+ SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo,
+ sal_Bool bNew=sal_True) = 0; //add for SwAuthMarkFloatDlg
+ virtual VclAbstractDialog * CreateIndexMarkModalDlg( int nResId,
+ Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) = 0; //add for SwIndexMarkModalDlg
+
+ virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0;
+
+ //add for static func in SwGlossaryDlg
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId ) = 0;
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId ) = 0;
+
+ // for tabpage
+ virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
+};
+#endif
+
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
new file mode 100644
index 000000000000..b4a492436bd3
--- /dev/null
+++ b/sw/inc/swacorr.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swacorr.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWACORR_HXX
+#define _SWACORR_HXX
+
+#include <svx/svxacorr.hxx>
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/embed/XStorage.hpp>
+
+class SwAutoCorrect : public SvxAutoCorrect
+{
+ using SvxAutoCorrect::PutText;
+
+protected:
+ // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
+ // koennen aus der Wortliste herausgeholt werden!)
+ // rShort ist der Stream-Name - gecryptet!
+ virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong );
+
+ // - Text mit Attributierung (kann nur der SWG - SWG-Format!)
+ // rShort ist der Stream-Name - gecryptet!
+ virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& ,
+ String& );
+
+public:
+ TYPEINFO();
+
+ SwAutoCorrect( const SvxAutoCorrect& rACorr );
+ virtual ~SwAutoCorrect();
+};
+
+
+#endif
+
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
new file mode 100644
index 000000000000..3042f1def0c9
--- /dev/null
+++ b/sw/inc/swatrset.hxx
@@ -0,0 +1,356 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swatrset.hxx,v $
+ * $Revision: 1.27.210.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWATRSET_HXX
+#define _SWATRSET_HXX
+#include <tools/solar.h>
+#include <tools/mempool.hxx>
+#include <svtools/itemset.hxx>
+#include <svtools/itempool.hxx>
+#include <swdllapi.h>
+
+class SwModify;
+class SwDoc;
+class OutputDevice;
+class IDocumentSettingAccess;
+class SfxBoolItem;
+class SvxPostureItem;
+class SvxWeightItem;
+class SvxShadowedItem;
+class SvxAutoKernItem;
+class SvxWordLineModeItem;
+class SvxContourItem;
+class SvxKerningItem;
+class SvxUnderlineItem;
+class SvxOverlineItem;
+class SvxCrossedOutItem;
+class SvxFontHeightItem;
+class SvxPropSizeItem;
+class SvxFontItem;
+class SvxColorItem;
+class SvxCharSetColorItem;
+class SvxLanguageItem;
+class SvxEscapementItem;
+class SvxCaseMapItem;
+class SvxNoHyphenItem;
+class SvxBlinkItem;
+class SvxEmphasisMarkItem;
+class SvxTwoLinesItem;
+class SvxCharScaleWidthItem;
+class SvxCharRotateItem;
+class SvxCharReliefItem;
+class SvxCharHiddenItem;
+
+// Frame-Attribute
+class SwFmtFillOrder;
+class SwFmtFrmSize;
+class SvxPaperBinItem;
+class SvxLRSpaceItem;
+class SvxULSpaceItem;
+class SwFmtCntnt;
+class SwFmtHeader;
+class SwFmtFooter;
+class SvxPrintItem;
+class SvxOpaqueItem;
+class SvxProtectItem;
+class SwFmtSurround;
+class SwFmtVertOrient;
+class SwFmtHoriOrient;
+class SwFmtAnchor;
+class SvxBoxItem;
+class SvxBrushItem;
+class SvxShadowItem;
+class SwFmtPageDesc;
+class SvxFmtBreakItem;
+class SwFmtCol;
+class SvxMacroItem;
+class SvxFmtKeepItem;
+class SwFmtURL;
+class SwFmtLineNumber;
+class SwFmtEditInReadonly;
+class SwFmtLayoutSplit;
+class SwFmtRowSplit;
+class SwFmtChain;
+class SwFmtFtnAtTxtEnd;
+class SwFmtEndAtTxtEnd;
+class SwFmtNoBalancedColumns;
+class SvxFrameDirectionItem;
+class SwTextGridItem;
+class SwHeaderAndFooterEatSpacingItem;
+// OD 18.09.2003 #i18732#
+class SwFmtFollowTextFlow;
+// OD 2004-05-05 #i28701#
+class SwFmtWrapInfluenceOnObjPos;
+
+// Grafik-Attribute
+class SwMirrorGrf;
+class SwCropGrf;
+class SwRotationGrf;
+class SwLuminanceGrf;
+class SwContrastGrf;
+class SwChannelRGrf;
+class SwChannelGGrf;
+class SwChannelBGrf;
+class SwGammaGrf;
+class SwInvertGrf;
+class SwTransparencyGrf;
+class SwDrawModeGrf;
+
+// Paragraph-Attribute
+class SvxLineSpacingItem;
+class SvxAdjustItem;
+class SvxFmtSplitItem;
+class SwRegisterItem;
+class SwNumRuleItem;
+class SvxWidowsItem;
+class SvxOrphansItem;
+class SvxTabStopItem;
+class SvxHyphenZoneItem;
+class SwFmtDrop;
+class SvxScriptSpaceItem;
+class SvxHangingPunctuationItem;
+class SvxForbiddenRuleItem;
+class SvxParaVertAlignItem;
+class SvxParaGridItem;
+class SwParaConnectBorderItem;
+
+// TabellenBox-Attribute
+class SwTblBoxNumFormat;
+class SwTblBoxFormula;
+class SwTblBoxValue;
+
+class SwAttrPool : public SfxItemPool
+{
+ friend void _InitCore(); // fuers anlegen/zerstoeren der
+ friend void _FinitCore(); // Versionsmaps
+ static USHORT* pVersionMap1;
+ static USHORT* pVersionMap2;
+ static USHORT* pVersionMap3;
+ static USHORT* pVersionMap4;
+ // OD 2004-01-21 #i18732# - due to extension of attribute set a new version
+ // map for binary filter is necessary (version map 5).
+ static USHORT* pVersionMap5;
+ static USHORT* pVersionMap6;
+
+ SwDoc* pDoc;
+
+public:
+ SwAttrPool( SwDoc* pDoc );
+protected:
+ virtual ~SwAttrPool();
+public:
+
+ SwDoc* GetDoc() { return pDoc; }
+ const SwDoc* GetDoc() const { return pDoc; }
+
+ static USHORT* GetVersionMap1() { return pVersionMap1; }
+ static USHORT* GetVersionMap2() { return pVersionMap2; }
+ static USHORT* GetVersionMap3() { return pVersionMap3; }
+ static USHORT* GetVersionMap6() { return pVersionMap4; }
+};
+
+
+class SW_DLLPUBLIC SwAttrSet : public SfxItemSet
+{
+ // Pointer fuers Modify-System
+ SwAttrSet *pOldSet, *pNewSet;
+
+ // Notification-Callback
+ virtual void Changed( const SfxPoolItem& rOld, const SfxPoolItem& rNew );
+
+ void PutChgd( const SfxPoolItem& rI ) { SfxItemSet::PutDirect( rI ); }
+public:
+ SwAttrSet( SwAttrPool&, USHORT nWhich1, USHORT nWhich2 );
+ SwAttrSet( SwAttrPool&, const USHORT* nWhichPairTable );
+ SwAttrSet( const SwAttrSet& );
+
+ virtual SfxItemSet* Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+
+ int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew );
+ int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
+
+ // ein Item oder einen Bereich loeschen
+ USHORT ClearItem_BC( USHORT nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
+ USHORT ClearItem_BC( USHORT nWhich1, USHORT nWhich2,
+ SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 );
+
+ int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
+
+ void GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const;
+
+ SwAttrPool* GetPool() const { return (SwAttrPool*)SfxItemSet::GetPool(); }
+
+ // kopiere die Attribute ggfs. ueber Dokumentgrenzen
+ void CopyToModify( SwModify& rMod ) const;
+
+ // ----------------------------------------------------------------
+ // Sonderbehandlung fuer einige Attribute
+ // Setze den Modify-Pointer (alten pDefinedIn) bei folgenden Attributen:
+ // - SwFmtDropCaps
+ // - SwFmtPageDesc
+ // (Wird beim Einfuegen in Formate/Nodes gerufen)
+ // Second version is for the SwAttrSet handles of SwCntntNode.
+ bool SetModifyAtAttr( const SwModify* pModify );
+
+ // Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer
+ // im Zugriff.
+ const SwDoc *GetDoc() const { return GetPool()->GetDoc(); }
+ SwDoc *GetDoc() { return GetPool()->GetDoc(); }
+
+ // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // den Parents gesucht werden soll. Wird nichts gefunden,
+ // wird das deflt. Attribut returnt.
+ // Charakter-Attribute - impl. steht im charatr.hxx
+ // AMA 12.10.94: Umstellung von SwFmt... auf Svx...
+ inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
+ inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
+ inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
+ inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
+ inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
+ inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
+ inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
+ inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
+ inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
+ inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
+ inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
+ inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
+ inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
+ inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
+ inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
+ inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+
+ // Frame-Attribute - impl. steht im frmatr.hxx
+ inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
+ inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
+ inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
+ inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
+ inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
+ inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
+ inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
+ inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
+ inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
+ inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
+ inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
+ inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
+ inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
+ inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
+ inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
+ inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
+ inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
+ inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
+ inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
+ inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
+ inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
+ inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
+ inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
+ inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
+ inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ // OD 18.09.2003 #i18732#
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ // OD 2004-05-05 #i28701#
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+
+ // Grafik-Attribute - impl. steht im grfatr.hxx
+ inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
+ inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
+ inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
+ inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
+ inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
+ inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+
+ // Paragraph-Attribute - impl. steht im paratr.hxx
+ inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
+ inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
+ inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
+ inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
+ inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
+ inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
+ inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
+ inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
+ inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
+ inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+
+ // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwAttrSet)
+};
+
+//Helper for filters to find true lineheight of a font
+SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
+ const SwAttrSet &rSet,
+ const OutputDevice &rOut, sal_Int16 nScript);
+#endif
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
new file mode 100644
index 000000000000..979cea067648
--- /dev/null
+++ b/sw/inc/swbaslnk.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swbaslnk.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWBASLNK_HXX
+#define _SWBASLNK_HXX
+
+#include <sfx2/lnkbase.hxx>
+
+class SwNode;
+class SwCntntNode;
+class ReReadThread;
+long GrfNodeChanged( void* pLink, void* pCaller );
+
+class SwBaseLink : public ::sfx2::SvBaseLink
+{
+ friend long GrfNodeChanged( void* pLink, void* pCaller );
+
+ SwCntntNode* pCntntNode;
+ BOOL bSwapIn : 1;
+ BOOL bNoDataFlag : 1;
+ BOOL bIgnoreDataChanged : 1;
+ ReReadThread* m_pReReadThread;
+
+protected:
+ SwBaseLink(): m_pReReadThread(0) {}
+
+ SwBaseLink( const String& rNm, USHORT nObjectType, ::sfx2::SvLinkSource* pObj,
+ SwCntntNode* pNode = 0 )
+ : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
+ bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ m_pReReadThread(0)
+ {}
+
+public:
+ TYPEINFO();
+
+ SwBaseLink( USHORT nMode, USHORT nFormat, SwCntntNode* pNode = 0 )
+ : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
+ bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ m_pReReadThread(0)
+ {}
+ virtual ~SwBaseLink();
+
+ virtual void DataChanged( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+
+ virtual void Closed();
+
+ virtual const SwNode* GetAnchor() const;
+
+ SwCntntNode *GetCntntNode() { return pCntntNode; }
+
+ // nur fuer Grafiken
+ BOOL SwapIn( BOOL bWaitForData = FALSE, BOOL bNativFormat = FALSE );
+
+ BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+
+ // nur fuer Grafik-Links ( zum Umschalten zwischen DDE / Grf-Link)
+ void SetObjType( USHORT nType ) { SvBaseLink::SetObjType( nType ); }
+
+ BOOL IsRecursion( const SwBaseLink* pChkLnk ) const;
+ virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ xub_StrLen nEnd = STRING_NOTFOUND ) const;
+
+ void SetNoDataFlag() { bNoDataFlag = TRUE; }
+ BOOL ChkNoDataFlag() { BOOL bRet = bNoDataFlag; bNoDataFlag = FALSE; return bRet; }
+ BOOL IsNoDataFlag() const { return bNoDataFlag; }
+};
+
+
+#endif
+
diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
new file mode 100644
index 000000000000..b136752d4825
--- /dev/null
+++ b/sw/inc/swcalwrp.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swcalwrp.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWCALWRP_HXX
+#define _SWCALWRP_HXX
+
+#include <i18npool/lang.h>
+#include <tools/string.hxx>
+#include <unotools/calendarwrapper.hxx>
+#include <salhelper/singletonref.hxx>
+
+class SwCalendarWrapper : public CalendarWrapper
+{
+ String sUniqueId;
+ USHORT nLang;
+
+public:
+ SwCalendarWrapper( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xMSF = ::comphelper::getProcessServiceFactory() )
+ : CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM )
+ {}
+
+ void LoadDefaultCalendar( USHORT nLang );
+};
+
+
+salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper();
+
+
+#endif
+
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
new file mode 100644
index 000000000000..ee0a7414d78c
--- /dev/null
+++ b/sw/inc/swcli.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swcli.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWCLI_HXX
+#define _SWCLI_HXX
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+#include <svtools/embedhlp.hxx>
+
+#ifndef _SFX_CLIENTSH_HXX //autogen
+#include <sfx2/ipclient.hxx>
+#endif
+
+class SwView;
+class SwEditWin;
+
+class SwOleClient : public SfxInPlaceClient
+{
+ BOOL bInDoVerb;
+ BOOL bOldCheckForOLEInCaption;
+
+ virtual void ObjectAreaChanged();
+ virtual void RequestNewObjectArea( Rectangle& );
+ virtual void ViewChanged();
+ virtual void MakeVisible();
+
+public:
+ SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& );
+
+ void SetInDoVerb( BOOL bFlag ) { bInDoVerb = bFlag; }
+
+ BOOL IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
+};
+
+#endif
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
new file mode 100644
index 000000000000..42597cb62559
--- /dev/null
+++ b/sw/inc/swcrsr.hxx
@@ -0,0 +1,312 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swcrsr.hxx,v $
+ * $Revision: 1.22 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWCRSR_HXX
+#define _SWCRSR_HXX
+#include <com/sun/star/i18n/WordType.hpp>
+#include <pam.hxx>
+#include <tblsel.hxx>
+#include <cshtyp.hxx>
+
+
+struct _SwCursor_SavePos;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+
+// ein Basis-Struktur fuer die Parameter der Find-Methoden
+// return - Werte vom Found-Aufruf.
+const int FIND_NOT_FOUND = 0;
+const int FIND_FOUND = 1;
+const int FIND_NO_RING = 2;
+
+struct SwFindParas
+{
+ virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, BOOL ) = 0;
+ virtual int IsReplaceMode() const = 0;
+};
+
+typedef USHORT SwCursorSelOverFlags;
+namespace nsSwCursorSelOverFlags
+{
+ const SwCursorSelOverFlags SELOVER_NONE = 0x00;
+ const SwCursorSelOverFlags SELOVER_CHECKNODESSECTION = 0x01;
+ const SwCursorSelOverFlags SELOVER_TOGGLE = 0x02;
+ const SwCursorSelOverFlags SELOVER_ENABLEREVDIREKTION = 0x04;
+ const SwCursorSelOverFlags SELOVER_CHANGEPOS = 0x08;
+}
+
+class SwCursor : public SwPaM
+{
+ friend class SwCrsrSaveState;
+
+ _SwCursor_SavePos* pSavePos;
+ long mnRowSpanOffset; // required for travelling in tabs with rowspans
+ BYTE nCursorBidiLevel; // bidi level of the cursor
+ bool mbColumnSelection; // true: cursor is aprt of a column selection
+
+ ULONG FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, BOOL& bCancel );
+
+ using SwPaM::Find;
+
+protected:
+ virtual _SwCursor_SavePos* CreateNewSavePos() const;
+ void SaveState();
+ void RestoreState();
+
+ const _SwCursor_SavePos* GetSavePos() const { return pSavePos; }
+
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ virtual void DoSetBidiLevelUpDown();
+ virtual bool IsSelOvrCheck(int eFlags);
+
+public:
+ // single argument ctors shall be explicit.
+ SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel );
+ virtual ~SwCursor();
+
+ // @@@ semantic: no copy ctor.
+ SwCursor( SwCursor& rCpy);
+private:
+ // forbidden and not implemented.
+ //SwCursor( const SwCursor& );
+ // @@@ used e.g. in core/frmedt/fetab.cxx @@@
+ // SwCursor & operator= ( const SwCursor& );
+public:
+
+ virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
+ virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+
+ void FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const;
+ SwMoveFnCollection* MakeFindRange( SwDocPositions, SwDocPositions,
+ SwPaM* ) const;
+
+
+ ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ BOOL bSearchInNotes,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ BOOL& bCancel,
+ FindRanges = FND_IN_BODY,
+ int bReplace = FALSE );
+ ULONG Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ BOOL& bCancel,
+ FindRanges = FND_IN_BODY,
+ const SwTxtFmtColl* pReplFmt = 0 );
+ ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ BOOL& bCancel,
+ FindRanges = FND_IN_BODY,
+ const com::sun::star::util::SearchOptions* pSearchOpt = 0,
+ const SfxItemSet* rReplSet = 0 );
+
+ // UI versions
+ BOOL IsStartWord() const;
+ BOOL IsEndWord() const;
+ BOOL IsStartEndSentence( bool bEnd ) const;
+ BOOL IsInWord() const;
+ BOOL GoStartWord();
+ BOOL GoEndWord();
+ BOOL GoNextWord();
+ BOOL GoPrevWord();
+ BOOL SelectWord( const Point* pPt = 0 );
+
+ // API versions of above functions (will be used with a different
+ // WordType for the break iterator)
+ BOOL IsStartWordWT( sal_Int16 nWordType ) const;
+ BOOL IsEndWordWT( sal_Int16 nWordType ) const;
+ BOOL IsInWordWT( sal_Int16 nWordType ) const;
+ BOOL GoStartWordWT( sal_Int16 nWordType );
+ BOOL GoEndWordWT( sal_Int16 nWordType );
+ BOOL GoNextWordWT( sal_Int16 nWordType );
+ BOOL GoPrevWordWT( sal_Int16 nWordType );
+ BOOL SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
+
+ enum SentenceMoveType
+ {
+ NEXT_SENT,
+ PREV_SENT,
+ START_SENT,
+ END_SENT
+ };
+ BOOL GoSentence(SentenceMoveType eMoveType);
+ BOOL GoNextSentence(){return GoSentence(NEXT_SENT);}
+ BOOL GoEndSentence(){return GoSentence(END_SENT);}
+ BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
+ BOOL GoStartSentence(){return GoSentence(START_SENT);}
+
+ virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
+ BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
+ BOOL UpDown( BOOL bUp, USHORT nCnt, Point* pPt, long nUpDownX );
+ BOOL LeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE );
+ BOOL IsAtLeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ) const;
+ BOOL SttEndDoc( BOOL bSttDoc );
+ BOOL GoPrevNextCell( BOOL bNext, USHORT nCnt );
+
+ BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
+ { return LeftRight( TRUE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
+ BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
+ { return LeftRight( FALSE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
+ BOOL GoNextCell( USHORT nCnt = 1 ) { return GoPrevNextCell( TRUE, nCnt ); }
+ BOOL GoPrevCell( USHORT nCnt = 1 ) { return GoPrevNextCell( FALSE, nCnt ); }
+ virtual BOOL GotoTable( const String& rName );
+ BOOL GotoTblBox( const String& rName );
+ BOOL GotoRegion( const String& rName );
+ BOOL GotoFtnAnchor();
+ BOOL GotoFtnTxt();
+ BOOL GotoNextFtnAnchor();
+ BOOL GotoPrevFtnAnchor();
+ BOOL GotoNextFtnCntnt();
+ BOOL GotoPrevFtnCntnt();
+
+ BOOL MovePara( SwWhichPara, SwPosPara );
+ BOOL MoveSection( SwWhichSection, SwPosSection );
+ BOOL MoveTable( SwWhichTable, SwPosTable );
+ BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+
+
+ // gibt es eine Selection vom Content in die Tabelle
+ // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+ virtual BOOL IsInProtectTable( BOOL bMove = FALSE,
+ BOOL bChgCrsr = TRUE );
+ BOOL IsNoCntnt() const;
+
+ void RestoreSavePos(); // Point auf die SavePos setzen
+
+ // TRUE: an die Position kann der Cursor gesetzt werden
+ virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+
+ // darf der Cursor in ReadOnlyBereiche?
+ virtual bool IsReadOnlyAvailable() const;
+
+ virtual BOOL IsSkipOverProtectSections() const;
+ virtual BOOL IsSkipOverHiddenSections() const;
+
+ BYTE GetCrsrBidiLevel() const { return nCursorBidiLevel; }
+ void SetCrsrBidiLevel( BYTE nNewLevel ) { nCursorBidiLevel = nNewLevel; }
+
+ bool IsColumnSelection() const { return mbColumnSelection; }
+ void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
+
+ long GetCrsrRowSpanOffset() const { return mnRowSpanOffset; }
+ void SetCrsrRowSpanOffset( long nNew ) { mnRowSpanOffset = nNew; }
+
+ DECL_FIXEDMEMPOOL_NEWDEL( SwCursor )
+};
+
+
+class SwCrsrSaveState
+{
+ SwCursor& rCrsr;
+public:
+ SwCrsrSaveState( SwCursor& rC ) : rCrsr( rC ) { rC.SaveState(); }
+ ~SwCrsrSaveState() { rCrsr.RestoreState(); }
+};
+
+struct _SwCursor_SavePos
+{
+ ULONG nNode;
+ xub_StrLen nCntnt;
+ _SwCursor_SavePos* pNext;
+
+ _SwCursor_SavePos( const SwCursor& rCrsr )
+ : nNode( rCrsr.GetPoint()->nNode.GetIndex() ),
+ nCntnt( rCrsr.GetPoint()->nContent.GetIndex() ),
+ pNext( 0 )
+ {}
+ virtual ~_SwCursor_SavePos() {}
+
+ DECL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos )
+};
+
+
+
+class SwTableCursor : public virtual SwCursor
+{
+
+protected:
+ ULONG nTblPtNd, nTblMkNd;
+ xub_StrLen nTblPtCnt, nTblMkCnt;
+ SwSelBoxes aSelBoxes;
+ BOOL bChg : 1;
+ BOOL bParked : 1; // Tabellen-Cursor wurde geparkt
+
+ virtual bool IsSelOvrCheck(int eFlags);
+
+public:
+ SwTableCursor( const SwPosition &rPos, SwPaM* pRing = 0 );
+ SwTableCursor( SwTableCursor& );
+ virtual ~SwTableCursor();
+
+ virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
+ BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
+ virtual BOOL GotoTable( const String& rName );
+
+ void InsertBox( const SwTableBox& rTblBox );
+ void DeleteBox( USHORT nPos ) { aSelBoxes.Remove( nPos ); bChg = TRUE; }
+ USHORT GetBoxesCount() const { return aSelBoxes.Count(); }
+ const SwSelBoxes& GetBoxes() const { return aSelBoxes; }
+
+ // Baut fuer alle Boxen die Cursor auf
+ SwCursor* MakeBoxSels( SwCursor* pAktCrsr );
+ // sind irgendwelche Boxen mit einem Schutz versehen?
+ BOOL HasReadOnlyBoxSel() const;
+
+ // wurde der TabelleCursor veraendert ? Wenn ja speicher gleich
+ // die neuen Werte.
+ BOOL IsCrsrMovedUpdt();
+ // wurde der TabelleCursor veraendert ?
+ BOOL IsCrsrMoved() const
+ {
+ return nTblMkNd != GetMark()->nNode.GetIndex() ||
+ nTblPtNd != GetPoint()->nNode.GetIndex() ||
+ nTblMkCnt != GetMark()->nContent.GetIndex() ||
+ nTblPtCnt != GetPoint()->nContent.GetIndex();
+ }
+
+ BOOL IsChgd() const { return bChg; }
+
+ // Parke den Tabellen-Cursor auf dem StartNode der Boxen.
+ void ParkCrsr();
+
+ bool NewTableSelection();
+ void ActualizeSelection( const SwSelBoxes &rBoxes );
+};
+
+#endif
+
diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx
new file mode 100644
index 000000000000..a389c5f91849
--- /dev/null
+++ b/sw/inc/swdbdata.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swdbdata.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWDBDATA_HXX
+#define _SWDBDATA_HXX
+
+#include <tools/solar.h>
+#include <rtl/ustring.hxx>
+
+// contains the description of a data source
+struct SwDBData
+{
+ ::rtl::OUString sDataSource;
+ ::rtl::OUString sCommand; //table, query or statement
+ sal_Int32 nCommandType; //com::sun::star::sdb::CommandType
+ SwDBData() :
+ nCommandType(0){}
+
+ BOOL operator !=(const SwDBData& rCmp) const
+ {return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;}
+ BOOL operator ==(const SwDBData& rCmp) const
+ {return rCmp.sDataSource == sDataSource && rCmp.sCommand == sCommand && rCmp.nCommandType == nCommandType;}
+};
+
+#endif
+
diff --git a/sw/inc/swdbtoolsclient.hxx b/sw/inc/swdbtoolsclient.hxx
new file mode 100644
index 000000000000..f955a7e3d562
--- /dev/null
+++ b/sw/inc/swdbtoolsclient.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swdbtoolsclient.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWDBTOOLSCLIENT_HXX
+#define _SWDBTOOLSCLIENT_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include <osl/mutex.hxx>
+#include <osl/module.h>
+#include "swdllapi.h"
+
+/* -----------------------------30.08.2001 11:01------------------------------
+ Client to use the dbtools library as load-on-call
+ ---------------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwDbtoolsClient
+{
+private:
+ ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools;
+ ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > m_xAccessTypeConversion;
+ ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory > m_xDataAccessFactory;
+
+ SW_DLLPRIVATE static void registerClient();
+ SW_DLLPRIVATE static void revokeClient();
+ SW_DLLPRIVATE void getFactory();
+
+ SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTools > getDataAccessTools();
+ SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > getAccessTypeConversion();
+
+public:
+ SwDbtoolsClient();
+ ~SwDbtoolsClient();
+
+ ::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
+ );
+
+ sal_Int32 getDefaultNumberFormat(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _rxTypes,
+ const ::com::sun::star::lang::Locale& _rLocale
+ );
+
+ ::rtl::OUString getValue(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter,
+ const ::com::sun::star::lang::Locale& _rLocale,
+ const ::com::sun::star::util::Date& _rNullDate
+ );
+};
+
+#endif
+
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
new file mode 100644
index 000000000000..1dea8b26cdb1
--- /dev/null
+++ b/sw/inc/swddetbl.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swddetbl.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWDDETBL_HXX
+#define _SWDDETBL_HXX
+
+#include "swtable.hxx"
+
+class SwDDEFieldType;
+
+class SwDDETable : public SwTable
+{
+ SwDepend aDepend;
+public:
+ TYPEINFO();
+ // Constructor movet alle Lines/Boxen aus der SwTable zu sich.
+ // Die SwTable ist danach Leer und muss geloescht werden.
+ SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
+ BOOL bUpdate = TRUE );
+ ~SwDDETable();
+
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+ void ChangeContent();
+ BOOL NoDDETable();
+
+ SwDDEFieldType* GetDDEFldType();
+ inline const SwDDEFieldType* GetDDEFldType() const;
+};
+
+
+// ----------- Inlines -----------------------------
+
+inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const
+{
+ return ((SwDDETable*)this)->GetDDEFldType();
+}
+
+#endif
diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx
new file mode 100644
index 000000000000..5d17344dc698
--- /dev/null
+++ b/sw/inc/swdll.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swdll.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_SWDLL_HXX
+#define SW_SWDLL_HXX
+
+class StatusBar;
+
+#include <sfx2/sfxdefs.hxx>
+#include <sfx2/module.hxx>
+
+#include <tools/shl.hxx>
+
+//-------------------------------------------------------------------------
+
+class SwDLL
+
+/* [Description]
+
+ This class is a wrapper for a Load-On-Demand-DLL. One instance
+ per SfxApplication will be created for the runtime of
+ SfxApplication-subclass::Main().
+
+ Remember: Do export this class! It is used by the application.
+*/
+
+{
+
+ static void RegisterFactories();
+ static void RegisterInterfaces();
+ static void RegisterControls();
+public:
+ // Ctor/Dtor must be linked to the application
+ SwDLL();
+ ~SwDLL();
+
+ static void Init(); // called directly after loading the DLL
+ static void Exit(); // called directly befor unloading the DLL
+};
+
+//-------------------------------------------------------------------------
+
+#define SW_DLL() ( *(SwModule**) GetAppData(SHL_WRITER) )
+
+#endif
+
diff --git a/sw/inc/swdllapi.h b/sw/inc/swdllapi.h
new file mode 100644
index 000000000000..f4c9e30020e6
--- /dev/null
+++ b/sw/inc/swdllapi.h
@@ -0,0 +1,13 @@
+#ifndef INCLUDED_SWDLLAPI_H
+#define INCLUDED_SWDLLAPI_H
+
+#include "sal/types.h"
+
+#if defined(SW_DLLIMPLEMENTATION)
+#define SW_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SW_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define SW_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif /* INCLUDED_SWDLLAPI_H */
diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h
new file mode 100644
index 000000000000..a5727a03f96f
--- /dev/null
+++ b/sw/inc/swerror.h
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swerror.h,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWSWERROR_H
+#define _SWSWERROR_H
+
+#include <tools/errcode.hxx>
+
+#define ERROR_SW_BASE (ERRCODE_AREA_SW)
+#define ERROR_SW_READ_BASE (ERROR_SW_BASE | ERRCODE_CLASS_READ)
+#define ERROR_SW_WRITE_BASE (ERROR_SW_BASE | ERRCODE_CLASS_WRITE)
+
+#define WARN_SW_BASE (ERRCODE_AREA_SW | ERRCODE_WARNING_MASK)
+#define WARN_SW_READ_BASE (WARN_SW_BASE | ERRCODE_CLASS_READ )
+#define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE )
+
+
+// Import Fehler
+#define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 )
+#define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 )
+
+#define ERR_SW6_INPUT_FILE (ERROR_SW_READ_BASE | 4 )
+#define ERR_SW6_NOWRITER_FILE (ERROR_SW_READ_BASE | 5 )
+#define ERR_SW6_UNEXPECTED_EOF (ERROR_SW_READ_BASE | 6 )
+#define ERR_SW6_PASSWD (ERROR_SW_READ_BASE | 7 )
+
+#define ERR_WW6_NO_WW6_FILE_ERR (ERROR_SW_READ_BASE | 8 )
+#define ERR_WW6_FASTSAVE_ERR (ERROR_SW_READ_BASE | 9 )
+
+#define ERR_FORMAT_ROWCOL (ERROR_SW_READ_BASE | 12)
+
+#define ERR_SWG_NEW_VERSION (ERROR_SW_READ_BASE | 13)
+#define ERR_WW8_NO_WW8_FILE_ERR (ERROR_SW_READ_BASE | 14)
+
+#define ERR_FORMAT_FILE_ROWCOL (ERROR_SW_READ_BASE | 15)
+
+// Export Fehler
+#define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 )
+#define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 )
+#define ERR_WRITE_ERROR_FILE (ERROR_SW_WRITE_BASE | 35 )
+
+// Import/Export Fehler
+#define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 )
+
+#define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 )
+
+// weitere Fehler und Fehlerklassen
+#define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 )
+#define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 )
+#define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 )
+#define ERR_TBLDDECHG_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 )
+
+// ----- Warnings ---------------------------
+
+// Import - Warnings
+#define WARN_SWG_NO_DRAWINGS (WARN_SW_READ_BASE | 70 )
+#define WARN_WW6_FASTSAVE_ERR (WARN_SW_READ_BASE | 71 )
+// continued below
+
+// Import & Export - Warnings
+#define WARN_SWG_FEATURES_LOST (WARN_SW_BASE | 72 )
+#define WARN_SWG_OLE (WARN_SW_BASE | 73 )
+#define WARN_SWG_POOR_LOAD (WARN_SW_BASE | 74 )
+
+// Export warnings
+#define WARN_SWG_HTML_NO_MACROS (WARN_SW_WRITE_BASE |75)
+#define WARN_WRITE_ERROR_FILE (WARN_SW_WRITE_BASE |76)
+
+// More Import & Export - Warnings
+#define WARN_FORMAT_FILE_ROWCOL (WARN_SW_READ_BASE | 77)
+
+#ifndef __RSC
+
+inline FASTBOOL IsWarning( ULONG nErr )
+{
+ return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
+}
+
+inline FASTBOOL IsError( ULONG nErr )
+{
+ return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
+}
+
+#endif
+
+
+#endif
+
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
new file mode 100644
index 000000000000..7d57e6e2dc52
--- /dev/null
+++ b/sw/inc/swevent.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swevent.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWEVENT_HXX
+#define _SWEVENT_HXX
+
+// #include *****************************************************************
+
+#include <tools/solar.h>
+#include <sfx2/sfx.hrc>
+
+#define SW_EVENT_OBJECT_SELECT ( EVENT_APP_START + 0 )
+#define SW_EVENT_START_INS_GLOSSARY ( EVENT_APP_START + 1 )
+#define SW_EVENT_END_INS_GLOSSARY ( EVENT_APP_START + 2 )
+#define SW_EVENT_MAIL_MERGE ( EVENT_APP_START + 3 )
+#define SW_EVENT_FRM_KEYINPUT_ALPHA ( EVENT_APP_START + 4 )
+#define SW_EVENT_FRM_KEYINPUT_NOALPHA ( EVENT_APP_START + 5 )
+#define SW_EVENT_FRM_RESIZE ( EVENT_APP_START + 6 )
+#define SW_EVENT_FRM_MOVE ( EVENT_APP_START + 7 )
+#define SW_EVENT_PAGE_COUNT ( EVENT_APP_START + 8 )
+#define SW_EVENT_MAIL_MERGE_END ( EVENT_APP_START + 9 )
+#define SW_EVENT_FIELD_MERGE ( EVENT_APP_START + 10 )
+#define SW_EVENT_FIELD_MERGE_FINISHED ( EVENT_APP_START + 11 )
+#define SW_EVENT_LAYOUT_FINISHED ( EVENT_APP_START + 12 )
+
+#define STR_SW_EVENT_PAGE_COUNT 0
+#define STR_SW_EVENT_MAIL_MERGE 1
+#define STR_SW_EVENT_MAIL_MERGE_END 2
+#define STR_SW_EVENT_FIELD_MERGE 3
+#define STR_SW_EVENT_FIELD_MERGE_FINISHED 4
+#define STR_SW_EVENT_LAYOUT_FINISHED 5
+#define STR_SW_EVENT_OBJECT_SELECT 6
+#define STR_SW_EVENT_START_INS_GLOSSARY 7
+#define STR_SW_EVENT_END_INS_GLOSSARY 8
+#define STR_SW_EVENT_FRM_KEYINPUT_ALPHA 9
+#define STR_SW_EVENT_FRM_KEYINPUT_NOALPHA 10
+#define STR_SW_EVENT_FRM_RESIZE 11
+#define STR_SW_EVENT_FRM_MOVE 12
+
+class SwFrmFmt;
+class SwFmtINetFmt;
+class IMapObject;
+
+// enum fuer Objecte die Events ins Basic oder in JavaScript Callen
+enum SwCallEventObjectType
+{
+ EVENT_OBJECT_NONE = 0, // Null ist garnichts
+ EVENT_OBJECT_IMAGE,
+ EVENT_OBJECT_INETATTR,
+ EVENT_OBJECT_URLITEM,
+ EVENT_OBJECT_IMAGEMAP
+};
+
+// structur fuer den Austausch zwischen UI/CORE
+
+struct SwCallMouseEvent
+{
+ SwCallEventObjectType eType;
+ union
+ {
+ // EVENT_OBJECT_IMAGE/EVENT_OBJECT_URLITEM
+ const SwFrmFmt* pFmt;
+
+ // EVENT_OBJECT_INETATTR
+ const SwFmtINetFmt* pINetAttr;
+
+ // EVENT_OBJECT_IMAGEMAP
+ struct
+ {
+ const SwFrmFmt* pFmt;
+ const IMapObject* pIMapObj;
+ } IMAP;
+ } PTR;
+
+ SwCallMouseEvent()
+ : eType( EVENT_OBJECT_NONE )
+ { PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; }
+
+ void Set( SwCallEventObjectType eTyp, const SwFrmFmt* pFmt )
+ { eType = eTyp; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = 0; }
+
+ void Set( const SwFrmFmt* pFmt, const IMapObject* pIMapObj )
+ { eType = EVENT_OBJECT_IMAGEMAP; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = pIMapObj; }
+
+ void Set( const SwFmtINetFmt* pINetAttr )
+ { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = 0; }
+
+ int operator==( const SwCallMouseEvent& rEvent ) const
+ {
+ return eType == rEvent.eType &&
+ PTR.pFmt == rEvent.PTR.pFmt &&
+ PTR.IMAP.pIMapObj == rEvent.PTR.IMAP.pIMapObj;
+ }
+ int operator!=( const SwCallMouseEvent& rEvent ) const
+ { return !( *this == rEvent ); }
+
+ void Clear()
+ { eType = EVENT_OBJECT_NONE; PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; }
+
+ BOOL HasEvent() const { return EVENT_OBJECT_NONE != eType; }
+};
+
+
+#endif
+
diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx
new file mode 100644
index 000000000000..8b7e9c2ea451
--- /dev/null
+++ b/sw/inc/swfltopt.hxx
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swfltopt.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWFTLOPT_HXX
+#define _SWFTLOPT_HXX
+
+#include <unotools/configitem.hxx>
+
+class SW_DLLPUBLIC SwFilterOptions : public utl::ConfigItem
+{
+public:
+ SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues );
+
+ void GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues );
+};
+
+#endif
diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx
new file mode 100644
index 000000000000..68e686f51cb4
--- /dev/null
+++ b/sw/inc/swgstr.hxx
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swgstr.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWGSTR_HXX
+#define _SWGSTR_HXX
+
+#include <tools/stream.hxx>
+
+typedef long long3; // Zur Dokumentation: 3-byte-Longs
+
+#define MAX_BEGIN 64 // Maximale Blockschachtelung
+#define PASSWDLEN 16 // Maximale Passwortlaenge
+
+// Neue Version mit SvStreams
+
+// Passwort- und Codierungs-Funktionalitaet
+
+class swcrypter {
+protected:
+ sal_Char cPasswd[ PASSWDLEN ]; // Passwort-Puffer
+ BOOL bPasswd; // TRUE wenn mit Passwort
+ void encode( sal_Char*, USHORT ); // Puffer codieren/decodieren
+public:
+ swcrypter();
+ BOOL setpasswd( const String& ); // Passwort setzen
+ void copypasswd( const sal_Char* ); // Passwort direkt setzen
+ const sal_Char* getpasswd() { return cPasswd; }
+};
+
+// Reader/Writer-Stream-Basisklasse mit Pufferverwaltung fuer Texte
+// und Spezial-I/O fuer 3-Byte-Longs
+
+class swstreambase : public swcrypter {
+protected:
+ SvStream* pStrm; // eigentlicher Stream
+ sal_Char* pBuf; // Zwischenpuffer
+ USHORT nBuflen; // Laenge des Zwischenpuffers
+ short nLong; // Long-Laenge (3 oder 4)
+ BOOL bTempStrm; // TRUE: Stream loeschen
+ void checkbuf( USHORT ); // Testen der Pufferlaenge
+
+ swstreambase( SvStream& );
+
+ swstreambase( const swstreambase& );
+ int operator=( const swstreambase& );
+public:
+ ~swstreambase();
+ SvStream& Strm() { return *pStrm; }
+ void clear(); // Puffer loeschen
+
+ // Zusatzfunktionen zur I/O von LONGs als 3-Byte-Zahlen
+
+ void long3() { nLong = 3; }
+ void long4() { nLong = 4; }
+
+ // Alias- und Hilfsfunktionen
+
+ void seek( long nPos ) { pStrm->Seek( nPos ); }
+ long tell() { return pStrm->Tell(); }
+ long filesize(); // Dateigroesse
+
+ void setbad();
+ int good() { return ( pStrm->GetError() == SVSTREAM_OK ); }
+ int operator!() { return ( pStrm->GetError() != SVSTREAM_OK ); }
+ int eof() { return pStrm->IsEof(); }
+
+ BYTE get();
+ void get( void* p, USHORT n ) { pStrm->Read( (sal_Char*) p, n ); }
+
+ inline swstreambase& operator>>( sal_Char& );
+ inline swstreambase& operator>>( BYTE& );
+ inline swstreambase& operator>>( short& );
+ inline swstreambase& operator>>( USHORT& );
+ swstreambase& operator>>( long& );
+ inline swstreambase& operator>>( ULONG& );
+};
+
+inline swstreambase& swstreambase::operator>>( sal_Char& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( BYTE& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( short& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( USHORT& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( ULONG& c )
+{
+ return *this >> (long&) c;
+}
+
+class swistream : public swstreambase {
+ BYTE cType; // Record-Typ
+ ULONG nOffset; // Record-Offset-Portion
+public:
+ swistream( SvStream& );
+
+ BYTE peek(); // 1 Byte testen
+ BYTE next(); // Blockstart
+ BYTE cur() { return cType; } // aktueller Block
+ BYTE skipnext(); // Record ueberspringen
+ void undonext(); // next() rueckgaengig machen
+ long getskip() { return nOffset; }
+ void skip( long = -1L ); // Block ueberspringen
+ sal_Char* text(); // Textstring lesen (nach BEGIN)
+ long size(); // aktuelle Record-Laenge
+
+private:
+ swistream( const swistream& );
+ int operator=( const swistream& );
+};
+
+
+#endif
diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx
new file mode 100644
index 000000000000..c4090cbe54f3
--- /dev/null
+++ b/sw/inc/swhints.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swhints.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_HINTS_HXX
+#define SW_HINTS_HXX
+
+#include <svtools/smplhint.hxx>
+
+#define SW_BROADCASTID_START SFX_HINT_USER00
+#define SW_BROADCAST_DRAWVIEWS_CREATED SW_BROADCASTID_START
+
+
+#endif
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
new file mode 100644
index 000000000000..57e8a3a1a31a
--- /dev/null
+++ b/sw/inc/swmodule.hxx
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swmodule.hxx,v $
+ * $Revision: 1.34 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWMODULE_HXX
+#define _SWMODULE_HXX
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+#include <vcl/fldunit.hxx>
+#include <svtools/lstner.hxx>
+#include <sfx2/module.hxx>
+
+#include <tools/shl.hxx>
+#include <svtools/lstner.hxx>
+#include "swdllapi.h"
+#include "shellid.hxx"
+#include <fldupde.hxx>
+#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
+#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
+
+class SvStringsDtor;
+class Color;
+class SfxItemSet;
+class SfxRequest;
+class SfxErrorHandler;
+class SwDBConfig;
+class SwModuleOptions;
+class SwMasterUsrPref;
+class SwViewOption;
+class SwView;
+class SwWrtShell;
+class SwPrintOptions;
+class SwChapterNumRules;
+class SwStdFontConfig;
+class SwNavigationConfig;
+class SwTransferable;
+class SwToolbarConfigItem;
+class SwAttrPool;
+namespace svtools{ class ColorConfig;}
+class SvtAccessibilityOptions;
+class SvtCTLOptions;
+class SvtUserOptions;
+class SvtUndoOptions;
+
+struct SwDBData;
+#define VIEWOPT_DEST_VIEW 0
+#define VIEWOPT_DEST_TEXT 1
+#define VIEWOPT_DEST_WEB 2
+#define VIEWOPT_DEST_VIEW_ONLY 3 //ViewOptions werden nur an der ::com::sun::star::sdbcx::View, nicht an der Appl. gesetzt
+
+namespace com{ namespace sun{ namespace star{ namespace scanner{
+ class XScannerManager;
+}}}}
+
+class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener
+{
+ String sActAuthor;
+
+ // ConfigItems
+ SwModuleOptions* pModuleConfig;
+ SwMasterUsrPref* pUsrPref;
+ SwMasterUsrPref* pWebUsrPref;
+ SwPrintOptions* pPrtOpt;
+ SwPrintOptions* pWebPrtOpt;
+ SwChapterNumRules* pChapterNumRules;
+ SwStdFontConfig* pStdFontConfig;
+ SwNavigationConfig* pNavigationConfig;
+ SwToolbarConfigItem*pToolbarConfig; //fuer gestackte Toolbars, welche
+ SwToolbarConfigItem*pWebToolbarConfig; //war sichtbar?
+ SwDBConfig* pDBConfig;
+ svtools::ColorConfig* pColorConfig;
+ SvtAccessibilityOptions* pAccessibilityOptions;
+ SvtCTLOptions* pCTLOptions;
+ SvtUserOptions* pUserOptions;
+ SvtUndoOptions* pUndoOptions;
+
+ SfxErrorHandler* pErrorHdl;
+
+ SwAttrPool *pAttrPool;
+
+ // Die aktuelle View wird hier gehalten um nicht ueber
+ // GetActiveView arbeiten zu muessen
+ // Die View ist solange gueltig bis Sie im Activate
+ // zerstoert oder ausgetauscht wird
+ SwView* pView;
+
+ // Liste aller Redline-Autoren
+ SvStringsDtor* pAuthorNames;
+
+ // DictionaryList listener to trigger spellchecking or hyphenation
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener > xLngSvcEvtListener;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::scanner::XScannerManager > m_xScannerManager;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser;
+
+ sal_Bool bAuthorInitialised : 1;
+ sal_Bool bEmbeddedLoadSave : 1;
+
+ // Hint abfangen fuer DocInfo
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+protected:
+ // Briefumschlaege, Etiketten
+ void InsertEnv(SfxRequest&);
+ void InsertLab(SfxRequest&, sal_Bool bLabel);
+
+public:
+ // public Data - used for internal Clipboard / Drag & Drop / XSelection
+ SwTransferable *pClipboard, *pDragDrop, *pXSelection;
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SW_INTERFACE_MODULE)
+
+ // dieser Ctor nur fuer SW-Dll
+ SwModule( SfxObjectFactory* pFact,
+ SfxObjectFactory* pWebFact,
+ SfxObjectFactory* pGlobalFact );
+
+ ~SwModule();
+
+ // View setzen nur fuer internen Gebrauch,
+ // aus techn. Gruenden public
+ //
+ inline void SetView(SwView* pVw) { pView = pVw; }
+ inline SwView* GetView() { return pView; }
+
+ //Die Handler fuer die Slots
+ void StateOther(SfxItemSet &); // andere
+
+ void ExecOther(SfxRequest &); // Felder, Formel ..
+
+ // Benutzereinstellungen modifizieren
+ const SwMasterUsrPref *GetUsrPref(sal_Bool bWeb) const;
+ const SwViewOption* GetViewOption(sal_Bool bWeb);
+ void ApplyUsrPref(const SwViewOption &, SwView*,
+ sal_uInt16 nDest = VIEWOPT_DEST_VIEW );
+ void ApplyUserMetric( FieldUnit eMetric, BOOL bWeb );
+ void ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb );
+ void ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags);
+ void ApplyLinkMode(sal_Int32 nNewLinkMode);
+
+ //default page mode for text grid
+ void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode);
+
+ // ConfigItems erzeugen
+ SwModuleOptions* GetModuleConfig() { return pModuleConfig;}
+ SwPrintOptions* GetPrtOptions(sal_Bool bWeb);
+ SwChapterNumRules* GetChapterNumRules();
+ SwStdFontConfig* GetStdFontConfig() { return pStdFontConfig; }
+ SwNavigationConfig* GetNavigationConfig();
+ SwToolbarConfigItem*GetToolbarConfig() { return pToolbarConfig; }
+ SwToolbarConfigItem*GetWebToolbarConfig() { return pWebToolbarConfig; }
+ SwDBConfig* GetDBConfig();
+ svtools::ColorConfig& GetColorConfig();
+ SvtAccessibilityOptions& GetAccessibilityOptions();
+ SvtCTLOptions& GetCTLOptions();
+ SvtUserOptions& GetUserOptions();
+ SvtUndoOptions& GetUndoOptions();
+
+ // Ueber Sichten iterieren
+ static SwView* GetFirstView();
+ static SwView* GetNextView(SwView*);
+
+ sal_Bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; }
+ void SetEmbeddedLoadSave( sal_Bool bFlag ) { bEmbeddedLoadSave = bFlag; }
+
+ void ShowDBObj( SwView& rView, const SwDBData& rData, BOOL bOnlyIfAvailable = FALSE);
+
+ // Tabellenmodi
+ sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const;
+ sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const;
+ sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const;
+
+ // Redlining
+ sal_uInt16 GetRedlineAuthor();
+ const String& GetRedlineAuthor(sal_uInt16 nPos);
+ sal_uInt16 InsertRedlineAuthor(const String& rAuthor);
+
+ void GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+ void GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+ void GetFormatAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+
+ sal_uInt16 GetRedlineMarkPos();
+ const Color& GetRedlineMarkColor();
+
+ // returne den definierten DocStat - WordDelimiter
+ const String& GetDocStatWordDelim() const;
+
+ // Durchreichen der Metric von der ModuleConfig (fuer HTML-Export)
+ sal_uInt16 GetMetric( sal_Bool bWeb ) const;
+
+ // Update-Stati durchreichen
+ sal_uInt16 GetLinkUpdMode( sal_Bool bWeb ) const;
+ SwFldUpdateFlags GetFldUpdateFlags( sal_Bool bWeb ) const;
+
+ //virtuelle Methoden fuer den Optionendialog
+ virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
+ virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
+ virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
+
+ //hier wird der Pool angelegt und an der SfxShell gesetzt
+ void InitAttrPool();
+ //Pool loeschen bevor es zu spaet ist
+ void RemoveAttrPool();
+
+ // Invalidiert ggf. OnlineSpell-WrongListen
+ void CheckSpellChanges( sal_Bool bOnlineSpelling,
+ sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain, sal_Bool bSmartTags );
+
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >
+ GetLngSvcEvtListener();
+ inline void SetLngSvcEvtListener( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr);
+ void CreateLngSvcEvtListener();
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::scanner::XScannerManager >
+ GetScannerManager();
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLanguageGuessing >
+ GetLanguageGuesser();
+};
+
+
+inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >
+ SwModule::GetLngSvcEvtListener()
+{
+ return xLngSvcEvtListener;
+}
+
+inline void SwModule::SetLngSvcEvtListener(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr)
+{
+ xLngSvcEvtListener = xLstnr;
+}
+
+
+/*-----------------08.07.97 10.33-------------------
+ Zugriff auf das SwModule, die ::com::sun::star::sdbcx::View und die Shell
+--------------------------------------------------*/
+
+#define SW_MOD() ( *(SwModule**) GetAppData(SHL_WRITER))
+
+SW_DLLPUBLIC SwView* GetActiveView();
+SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
+
+#endif
diff --git a/sw/inc/swpre.mk b/sw/inc/swpre.mk
new file mode 100644
index 000000000000..1e974475f88e
--- /dev/null
+++ b/sw/inc/swpre.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: swpre.mk,v $
+#
+# $Revision: 1.4 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+
+#======================================================================
+# standardmaessig mit Optimierung, muss explizit mit nopt=t ausgeschaltet
+# werden, wenn nicht gewuenscht
+#----------------------------------------------------------------------
+
+.IF "$(nopt)"!="" || "$(NOPT)"!=""
+nopt=true
+NOPT=TRUE
+optimize=
+OPTIMIZE=
+.ELSE
+.IF "$(debug)$(DEBUG)"==""
+optimize=true
+OPTIMIZE=TRUE
+.ENDIF
+.ENDIF
+
+
diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx
new file mode 100644
index 000000000000..38250fe7f28d
--- /dev/null
+++ b/sw/inc/swprtopt.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swprtopt.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWPRTOPT_HXX
+#define _SWPRTOPT_HXX
+
+#include <tools/multisel.hxx>
+#include <printdata.hxx>
+
+#define POSTITS_NONE 0
+#define POSTITS_ONLY 1
+#define POSTITS_ENDDOC 2
+#define POSTITS_ENDPAGE 3
+
+class SwPrtOptions : public SwPrintData
+{
+ USHORT nJobNo;
+ String sJobName;
+
+public:
+ MultiSelection aMulti;
+ Point aOffset;
+ ULONG nMergeCnt; // Anzahl der Serienbriefe
+ ULONG nMergeAct; // Aktueller Serienbriefnr.
+ USHORT nCopyCount;
+
+ BOOL bCollate,
+ bPrintSelection, // Markierung drucken
+ bJobStartet;
+
+ SwPrtOptions( const String& rJobName ) :
+ nJobNo( 1 ),
+ sJobName( rJobName ),
+ aOffset( Point(0,0) ),
+ nMergeCnt( 0 ),
+ nMergeAct( 0 ),
+ bCollate(FALSE),
+ bPrintSelection (FALSE),
+ bJobStartet(FALSE)
+ {}
+
+ const String& MakeNextJobName(); // steht in vprint.cxx
+ const String& GetJobName() const { return sJobName; }
+
+#if defined(TCPP)
+ // seit neuestem (SV 223) kann der keinen mehr generieren
+ inline SwPrtOptions(const SwPrtOptions& rNew) {*this = rNew;}
+#endif
+
+
+ SwPrtOptions& operator=(const SwPrintData& rData)
+ {
+ SwPrintData::operator=(rData);
+ return *this;
+ }
+};
+
+
+#endif //_SWPRTOPT_HXX
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
new file mode 100644
index 000000000000..fc6d0238820e
--- /dev/null
+++ b/sw/inc/swrect.hxx
@@ -0,0 +1,380 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swrect.hxx,v $
+ * $Revision: 1.14 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWRECT_HXX
+#define _SWRECT_HXX
+#include "errhdl.hxx"
+#include <tools/gen.hxx>
+class SvStream;
+
+class SwRect
+{
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+
+
+public:
+ inline SwRect();
+ inline SwRect( const SwRect &rRect );
+ inline SwRect( const Point& rLT, const Size& rSize );
+ inline SwRect( const Point& rLT, const Point& rRB );
+ inline SwRect( long X, long Y, long Width, long Height );
+
+ //SV-SS z.B. SwRect( pWin->GetClipRect() );
+ SwRect( const Rectangle &rRect );
+
+ //Set-Methoden
+ inline void Chg( const Point& rNP, const Size &rNS );
+ inline void Pos( const Point& rNew );
+ inline void Pos( const long nNewX, const long nNewY );
+ inline void SSize( const Size& rNew );
+ inline void SSize( const long nHeight, const long nWidth );
+ inline void Width( long nNew );
+ inline void Height( long nNew );
+ inline void Left( const long nLeft );
+ inline void Right( const long nRight );
+ inline void Top( const long nTop );
+ inline void Bottom( const long nBottom );
+
+ //Get-Methoden
+ inline const Point &Pos() const;
+ inline const Size &SSize() const;
+ inline long Width() const;
+ inline long Height() const;
+ inline long Left() const;
+ inline long Right() const;
+ inline long Top() const;
+ inline long Bottom() const;
+
+ //Damit Layoutseitig per Memberpointer auf die Member von Pos und SSize
+ //zugegriffen werden kann.
+ inline Point &Pos();
+ inline Size &SSize();
+
+ Point Center() const;
+
+ void Justify();
+
+ SwRect &Union( const SwRect& rRect );
+ SwRect &Intersection( const SwRect& rRect );
+ //Wie Intersection nur wird davon ausgegangen, dass die Rects ueberlappen!
+ SwRect &_Intersection( const SwRect &rRect );
+ inline SwRect GetIntersection( const SwRect& rRect ) const;
+
+ BOOL IsInside( const Point& rPOINT ) const;
+ BOOL IsNear(const Point& rPoint, long nTolerance ) const;
+ BOOL IsInside( const SwRect& rRect ) const;
+ BOOL IsOver( const SwRect& rRect ) const;
+ inline BOOL HasArea() const;
+ inline BOOL IsEmpty() const;
+ inline void Clear();
+
+ inline SwRect &operator = ( const SwRect &rRect );
+
+ inline BOOL operator == ( const SwRect& rRect ) const;
+ inline BOOL operator != ( const SwRect& rRect ) const;
+
+ inline SwRect &operator+=( const Point &rPt );
+ inline SwRect &operator-=( const Point &rPt );
+
+ inline SwRect &operator+=( const Size &rSz );
+ inline SwRect &operator-=( const Size &rSz );
+
+ //SV-SS z.B. pWin->DrawRect( aSwRect.SVRect() );
+ inline Rectangle SVRect() const;
+
+ //Zortech wuerde hier fehlerhaften Code erzeugen.
+// inline operator SRectangle() const;
+// inline operator Rectangle() const { return Rectangle( aPos, aSize ); }
+
+ // Ausgabeoperator fuer die Debugging-Gemeinde
+ friend SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
+
+
+ void _Top( const long nTop );
+ void _Bottom( const long nBottom );
+ void _Left( const long nLeft );
+ void _Right( const long nRight );
+ void _Width( const long nNew );
+ void _Height( const long nNew );
+ long _Top() const;
+ long _Bottom() const;
+ long _Left() const;
+ long _Right() const;
+ long _Width() const;
+ long _Height() const;
+ void SubTop( const long nSub );
+ void AddBottom( const long nAdd );
+ void SubLeft( const long nSub );
+ void AddRight( const long nAdd );
+ void AddWidth( const long nAdd );
+ void AddHeight( const long nAdd );
+ void SetPosX( const long nNew );
+ void SetPosY( const long nNew );
+ void SetLeftAndWidth( long nLeft, long nNew );
+ void SetTopAndHeight( long nTop, long nNew );
+ void SetRightAndWidth( long nRight, long nNew );
+ void SetBottomAndHeight( long nBottom, long nNew );
+ void SetUpperLeftCorner( const Point& rNew );
+ void SetUpperRightCorner( const Point& rNew );
+ void SetLowerLeftCorner( const Point& rNew );
+ const Size _Size() const;
+ const Point TopLeft() const;
+ const Point TopRight() const;
+ const Point BottomLeft() const;
+ const Point BottomRight() const;
+ const Size SwappedSize() const;
+ long GetLeftDistance( long ) const;
+ long GetBottomDistance( long ) const;
+ long GetRightDistance( long ) const;
+ long GetTopDistance( long ) const;
+ BOOL OverStepLeft( long ) const;
+ BOOL OverStepBottom( long ) const;
+ BOOL OverStepTop( long ) const;
+ BOOL OverStepRight( long ) const;
+};
+
+// Implementation in in swrect.cxx
+extern SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
+
+typedef void (SwRect:: *SwRectSet)( const long nNew );
+typedef long (SwRect:: *SwRectGet)() const;
+typedef const Point (SwRect:: *SwRectPoint)() const;
+typedef const Size (SwRect:: *SwRectSize)() const;
+typedef BOOL (SwRect:: *SwRectMax)( long ) const;
+typedef long (SwRect:: *SwRectDist)( long ) const;
+typedef void (SwRect:: *SwRectSetTwice)( long, long );
+typedef void (SwRect:: *SwRectSetPos)( const Point& );
+
+//---------------------------------- Set-Methoden
+inline void SwRect::Chg( const Point& rNP, const Size &rNS )
+{
+ nX = rNP.X(); nY = rNP.Y();
+ nWidth = rNS.Width(); nHeight = rNS.Height();
+}
+inline void SwRect::Pos( const Point& rNew )
+{
+ nX = rNew.X(); nY = rNew.Y();
+}
+inline void SwRect::Pos( const long nNewX, const long nNewY )
+{
+ nX = nNewX; nY = nNewY;
+}
+inline void SwRect::SSize( const Size& rNew )
+{
+ nWidth = rNew.Width(); nHeight = rNew.Height();
+}
+inline void SwRect::SSize( const long nNewHeight, const long nNewWidth )
+{
+ nWidth = nNewWidth; nHeight = nNewHeight;
+}
+inline void SwRect::Width( long nNew )
+{
+ nWidth = nNew;
+}
+inline void SwRect::Height( long nNew )
+{
+ nHeight = nNew;
+}
+inline void SwRect::Left( const long nLeft )
+{
+ nWidth += nX - nLeft;
+ nX = nLeft;
+}
+inline void SwRect::Right( const long nRight )
+{
+ nWidth = nRight - nX + 1;
+}
+inline void SwRect::Top( const long nTop )
+{
+ nHeight += nY - nTop;
+ nY = nTop;
+}
+inline void SwRect::Bottom( const long nBottom )
+{
+ nHeight = nBottom - nY + 1;
+}
+
+//----------------------------------- Get-Methoden
+inline const Point &SwRect::Pos() const
+{
+ return *(Point*)(&nX);
+}
+inline Point &SwRect::Pos()
+{
+ return *(Point*)(&nX);
+}
+inline const Size &SwRect::SSize() const
+{
+ return *(Size*)(&nWidth);
+}
+inline Size &SwRect::SSize()
+{
+ return *(Size*)(&nWidth);
+}
+inline long SwRect::Width() const
+{
+ return nWidth;
+}
+inline long SwRect::Height() const
+{
+ return nHeight;
+}
+inline long SwRect::Left() const
+{
+ return nX;
+}
+inline long SwRect::Right() const
+{
+ return nWidth ? nX + nWidth - 1 : nX;
+}
+inline long SwRect::Top() const
+{
+ return nY;
+}
+inline long SwRect::Bottom() const
+{
+ return nHeight ? nY + nHeight - 1 : nY;
+}
+
+//----------------------------------- operatoren
+inline SwRect &SwRect::operator = ( const SwRect &rRect )
+{
+ nX = rRect.Left();
+ nY = rRect.Top();
+ nWidth = rRect.Width();
+ nHeight = rRect.Height();
+ return *this;
+}
+inline BOOL SwRect::operator == ( const SwRect& rRect ) const
+{
+ return (nX == rRect.Left() &&
+ nY == rRect.Top() &&
+ nWidth == rRect.Width() &&
+ nHeight == rRect.Height());
+}
+inline BOOL SwRect::operator != ( const SwRect& rRect ) const
+{
+ return (nX != rRect.Left() ||
+ nY != rRect.Top() ||
+ nWidth != rRect.Width() ||
+ nHeight != rRect.Height());
+}
+
+inline SwRect &SwRect::operator+=( const Point &rPt )
+{
+ nX += rPt.X(); nY += rPt.Y();
+ return *this;
+}
+inline SwRect &SwRect::operator-=( const Point &rPt )
+{
+ nX -= rPt.X(); nY -= rPt.Y();
+ return *this;
+}
+
+inline SwRect &SwRect::operator+=( const Size &rSz )
+{
+ nWidth += rSz.Width(); nHeight += rSz.Height();
+ return *this;
+}
+inline SwRect &SwRect::operator-=( const Size &rSz )
+{
+ nWidth -= rSz.Width(); nHeight -= rSz.Height();
+ return *this;
+}
+
+
+//--------------------------- Sonstiges
+inline Rectangle SwRect::SVRect() const
+{
+ ASSERT( nWidth && nHeight, "SVRect() ohne Widht oder Height" );
+ return Rectangle( nX, nY,
+ nX + nWidth - 1, //Right()
+ nY + nHeight - 1 ); //Bottom()
+}
+
+inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const
+{
+ return SwRect( *this ).Intersection( rRect );
+}
+
+inline BOOL SwRect::HasArea() const
+{
+ return nHeight && nWidth;
+}
+inline BOOL SwRect::IsEmpty() const
+{
+ return !(nHeight && nWidth);
+}
+inline void SwRect::Clear()
+{
+ nX = nY = nWidth = nHeight = 0;
+}
+
+//-------------------------- CToren
+inline SwRect::SwRect() :
+ nX( 0 ),
+ nY( 0 ),
+ nWidth ( 0 ),
+ nHeight( 0 )
+{
+}
+inline SwRect::SwRect( const SwRect &rRect ) :
+ nX( rRect.Left() ),
+ nY( rRect.Top() ),
+ nWidth ( rRect.Width() ),
+ nHeight( rRect.Height() )
+{
+}
+inline SwRect::SwRect( const Point& rLT, const Size& rSize ) :
+ nX( rLT.X() ),
+ nY( rLT.Y() ),
+ nWidth ( rSize.Width() ),
+ nHeight( rSize.Height())
+{
+}
+inline SwRect::SwRect( const Point& rLT, const Point& rRB ) :
+ nX( rLT.X() ),
+ nY( rLT.Y() ),
+ nWidth ( rRB.X() - rLT.X() + 1 ),
+ nHeight( rRB.Y() - rLT.Y() + 1 )
+{
+}
+inline SwRect::SwRect( long X, long Y, long W, long H ) :
+ nX( X ),
+ nY( Y ),
+ nWidth ( W ),
+ nHeight( H )
+{
+}
+
+
+#endif //_SWRECT_HXX
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
new file mode 100644
index 000000000000..0b1e42070101
--- /dev/null
+++ b/sw/inc/swregion.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swregion.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWREGION_HXX
+#define _SWREGION_HXX
+
+#include <svtools/svarray.hxx>
+
+#include "swrect.hxx"
+
+SV_DECL_VARARR( SwRects, SwRect, 20, 8 )
+
+class SwRegionRects : public SwRects
+{
+ SwRect aOrigin; // die Kopie des StartRects
+
+ inline void InsertRect( const SwRect &rRect, const USHORT nPos, BOOL &rDel);
+
+public:
+ SwRegionRects( const SwRect& rStartRect, USHORT nInit = 20,
+ USHORT nGrow = 8 );
+ // Zum Ausstanzen aus aOrigin.
+ void operator-=( const SwRect& rRect );
+
+ // Aus Loechern werden Flaechen, aus Flaechen werden Loecher.
+ void Invert();
+ // Benachbarte Rechtecke zusammenfassen.
+ void Compress( BOOL bFuzzy = TRUE );
+
+ inline const SwRect &GetOrigin() const { return aOrigin; }
+ inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; }
+};
+
+#endif //_SWREGION_HXX
diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx
new file mode 100644
index 000000000000..b421bee29af9
--- /dev/null
+++ b/sw/inc/swserv.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swserv.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWSERV_HXX
+#define _SWSERV_HXX
+
+#include <sfx2/linksrc.hxx>
+#include <IMark.hxx>
+
+class SwSectionNode;
+class SwBaseLink;
+class SwTableNode;
+struct SwPosition;
+class SwPaM;
+
+class SwServerObject : public ::sfx2::SvLinkSource
+{
+ using sfx2::SvLinkSource::SendDataChanged;
+
+protected:
+ enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } eType;
+ union {
+ ::sw::mark::IMark* pBkmk;
+ SwTableNode* pTblNd;
+ SwSectionNode* pSectNd;
+ } CNTNT_TYPE;
+
+ SwServerObject();
+
+public:
+ SwServerObject( ::sw::mark::IMark& rBookmark )
+ : eType( BOOKMARK_SERVER )
+ {
+ CNTNT_TYPE.pBkmk = &rBookmark;
+ }
+ SwServerObject( SwTableNode& rTableNd )
+ : eType( TABLE_SERVER )
+ {
+ CNTNT_TYPE.pTblNd = &rTableNd;
+ }
+ SwServerObject( SwSectionNode& rSectNd )
+ : eType( SECTION_SERVER )
+ {
+ CNTNT_TYPE.pSectNd = &rSectNd;
+ }
+ virtual ~SwServerObject();
+
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData,
+ const String & rMimeType,
+ BOOL bSynchron = FALSE );
+
+ BOOL SetData( const String & rMimeType,
+ const ::com::sun::star::uno::Any& rData );
+
+ virtual void SendDataChanged( const SwPosition& rPos );
+ virtual void SendDataChanged( const SwPaM& rRange );
+
+ BOOL IsLinkInServer( const SwBaseLink* ) const;
+
+ void SetNoServer();
+ void SetDdeBookmark( ::sw::mark::IMark& rBookmark);
+};
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+#endif // _SWSERV_HXX
+
diff --git a/sw/inc/swstyle.h b/sw/inc/swstyle.h
new file mode 100644
index 000000000000..d9c64db3e47a
--- /dev/null
+++ b/sw/inc/swstyle.h
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swstyle.h,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWSTYLE_H
+#define _SWSTYLE_H
+
+
+#define SWSTYLEBIT_TEXT 0x0001
+#define SWSTYLEBIT_CHAPTER 0x0002
+#define SWSTYLEBIT_LIST 0x0004
+#define SWSTYLEBIT_IDX 0x0008
+#define SWSTYLEBIT_EXTRA 0x0010
+#define SWSTYLEBIT_HTML 0x0020
+#define SWSTYLEBIT_CONDCOLL 0x0040
+
+
+#endif
+
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
new file mode 100644
index 000000000000..1a62bb3d4dfd
--- /dev/null
+++ b/sw/inc/swtable.hxx
@@ -0,0 +1,474 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swtable.hxx,v $
+ * $Revision: 1.26 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWTABLE_HXX
+#define _SWTABLE_HXX
+#include <tools/mempool.hxx>
+#ifndef _TOOLS_REF_HXX
+#include <tools/ref.hxx>
+#endif
+#include <svtools/svarray.hxx>
+#include <tblenum.hxx>
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <swrect.hxx>
+#ifdef PRODUCT
+#include <node.hxx> // fuer StartNode->GetMyIndex
+#else
+class SwStartNode;
+#endif
+
+class Color;
+class SwFrmFmt;
+class SwTableFmt;
+class SwTableLineFmt;
+class SwTableBoxFmt;
+class SwHTMLTableLayout;
+class SwTableLine;
+class SwTableBox;
+class SwTableNode;
+class SwTabCols;
+class SwDoc;
+class SwSelBoxes;
+class SwTblCalcPara;
+class SwChartLines;
+struct SwPosition;
+class SwNodeIndex;
+class SwNode;
+class SfxPoolItem;
+class SwUndoTblMerge;
+class SwUndo;
+class SwPaM;
+class SwTableBox_Impl;
+class SwUndoTblCpyTbl;
+class SwBoxSelection;
+struct SwSaveRowSpan;
+struct Parm;
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+SV_DECL_PTRARR_DEL(SwTableLines, SwTableLine*, 10, 20)
+SV_DECL_PTRARR_DEL(SwTableBoxes, SwTableBox*, 25, 50)
+
+// speicher die Inhaltstragenden Box-Pointer zusaetzlich in einem
+// sortierten Array (fuers rechnen in der Tabelle)
+typedef SwTableBox* SwTableBoxPtr;
+SV_DECL_PTRARR_SORT( SwTableSortBoxes, SwTableBoxPtr, 25, 50 )
+typedef SwTableLine* SwTableLinePtr;
+
+class SW_DLLPUBLIC SwTable: public SwClient //Client vom FrmFmt
+{
+ using SwClient::IsModifyLocked;
+
+protected:
+ SwTableLines aLines;
+ SwTableSortBoxes aSortCntBoxes;
+ SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
+
+ SwHTMLTableLayout *pHTMLLayout;
+
+ // Usually, the table node of a SwTable can be accessed by getting a box
+ // out of aSortCntBoxes, which know their SwStartNode. But in some rare
+ // cases, we need to know the table node of a SwTable, before the table
+ // boxes have been build (SwTableNode::MakeCopy with tables in tables).
+ SwTableNode* pTableNode;
+
+//SOLL das fuer jede Tabelle einstellbar sein?
+ TblChgMode eTblChgMode;
+
+ USHORT nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
+ // noch ein Resize der Tbl. anstossen
+ USHORT nRowsToRepeat; // number of rows to repeat on every page
+
+ BOOL bModifyLocked :1;
+ BOOL bNewModel :1; // FALSE: old SubTableModel; TRUE: new RowSpanModel
+#ifndef PRODUCT
+ bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
+#endif
+
+ BOOL IsModifyLocked(){ return bModifyLocked;}
+
+public:
+ enum SearchType
+ {
+ SEARCH_NONE, // Default: expand to rectangle
+ SEARCH_ROW, // row selection
+ SEARCH_COL // column selection
+ };
+
+ TYPEINFO();
+
+ // single argument ctors shall be explicit.
+ explicit SwTable( SwTableFmt* );
+ virtual ~SwTable();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwTable( const SwTable& rTable ); // kein Copy der Lines !!
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwTable & operator= (const SwTable &);
+ // no default ctor.
+ SwTable();
+ BOOL OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
+ BOOL OldSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
+ BOOL NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
+ SwTableBox*, SwUndoTblMerge* );
+ BOOL NewSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
+ SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const;
+ void InsertSpannedRow( SwDoc* pDoc, USHORT nIdx, USHORT nCnt );
+ BOOL _InsertRow( SwDoc*, const SwSelBoxes&, USHORT nCnt, BOOL bBehind );
+ BOOL NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL );
+ void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* );
+ void AdjustWidths( const long nOld, const long nNew );
+ void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, BOOL bCurRowOnly );
+
+public:
+
+ SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; }
+ const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
+ void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang!
+
+ USHORT IncGrfsThatResize() { return ++nGrfsThatResize; }
+ USHORT DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
+
+ void LockModify() { bModifyLocked = TRUE; } //Muessen _immer_ paarig
+ void UnlockModify() { bModifyLocked = FALSE;} //benutzt werden!
+
+ void SetTableModel( BOOL bNew ){ bNewModel = bNew; }
+ BOOL IsNewModel() const { return bNewModel; }
+
+ USHORT GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
+ USHORT _GetRowsToRepeat() const { return nRowsToRepeat; }
+ void SetRowsToRepeat( USHORT nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
+
+ bool IsHeadline( const SwTableLine& rLine ) const;
+
+ SwTableLines &GetTabLines() { return aLines; }
+ const SwTableLines &GetTabLines() const { return aLines; }
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
+ BOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const;
+ void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, BOOL bCurRowOnly );
+
+// The following functions are for new table model only...
+ void CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
+ const SearchType eSearchType, bool bProtect ) const;
+ void CreateSelection( const SwNode* pStart, const SwNode* pEnd,
+ SwSelBoxes& rBoxes, const SearchType eSearchType, bool bProtect ) const;
+ void ExpandSelection( SwSelBoxes& rBoxes ) const;
+ // When a table is splitted into two tables, the row spans which overlaps
+ // the split have to be corrected and stored for undo
+ // SwSavRowSpan is the structure needed by Undo to undo the split operation
+ // CleanUpRowSpan corrects the (top of the) second table and delviers the structure
+ // for Undo
+ SwSaveRowSpan* CleanUpTopRowSpan( USHORT nSplitLine );
+ // RestoreRowSpan is called by Undo to restore the old row span values
+ void RestoreRowSpan( const SwSaveRowSpan& );
+ // CleanUpBottomRowSpan corrects the overhanging row spans at the end of the first table
+ void CleanUpBottomRowSpan( USHORT nDelLines );
+
+
+// The following functions are "pseudo-virtual", i.e. they are different for old and new table model
+// It's not allowed to change the table model after the first call of one of these functions.
+
+ BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
+ SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
+ {
+#ifndef PRODUCT
+ bDontChangeModel = true;
+#endif
+ return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
+ OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
+ }
+ BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1,
+ BOOL bSameHeight = FALSE )
+ {
+#ifndef PRODUCT
+ bDontChangeModel = true;
+#endif
+ return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
+ OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight );
+ }
+ bool PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
+ SwSelBoxes& rMerged, SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo );
+ void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const;
+ void PrepareDeleteCol( long nMin, long nMax );
+
+ BOOL InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
+ USHORT nCnt = 1, BOOL bBehind = TRUE );
+ BOOL InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
+ USHORT nCnt = 1, BOOL bBehind = TRUE );
+ BOOL AppendRow( SwDoc* pDoc, USHORT nCnt = 1 );
+ void PrepareDelBoxes( const SwSelBoxes& rBoxes );
+ BOOL DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
+ SwUndo* pUndo, const BOOL bDelMakeFrms, const BOOL bCorrBorder );
+ BOOL SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 );
+ BOOL Merge( const SwSelBoxes& rBoxes,
+ SwTableBox* pMergeBox, SwUndoTblMerge* = 0 );
+
+ void FindSuperfluousRows( SwSelBoxes& rBoxes )
+ { _FindSuperfluousRows( rBoxes, 0, 0 ); }
+ void CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const;
+
+ SwTableSortBoxes& GetTabSortBoxes() { return aSortCntBoxes; }
+ const SwTableSortBoxes& GetTabSortBoxes() const { return aSortCntBoxes; }
+
+ // lese die 1. Nummer und loesche sie aus dem String
+ // (wird von GetTblBox und SwTblFld benutzt)
+ // --> OD 2007-08-03 #i80314#
+ // add 3rd parameter in order to control validation check on <rStr>
+ static USHORT _GetBoxNum( String& rStr,
+ BOOL bFirst = FALSE,
+ const bool bPerformValidCheck = false );
+ // <--
+ // suche die Inhaltstragende Box mit dem Namen
+ // --> OD 2007-08-03 #i80314#
+ // add 2nd parameter in order to control validation check in called method
+ // <_GetBoxNum(..)>
+ const SwTableBox* GetTblBox( const String& rName,
+ const bool bPerformValidCheck = false ) const;
+ // <--
+ // kopiere die selektierten Boxen in ein anderes Dokument.
+ BOOL MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
+ BOOL bCpyNds = TRUE, BOOL bCpyName = FALSE ) const;
+ // kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX)
+ BOOL InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
+ SwUndoTblCpyTbl* pUndo = 0 );
+ BOOL InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ SwUndoTblCpyTbl* pUndo = 0 );
+ BOOL InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ SwUndoTblCpyTbl* pUndo );
+ // kopiere die Headline (mit Inhalt!) der Tabelle in eine andere
+ BOOL CopyHeadlineIntoTable( SwTableNode& rTblNd );
+
+ // erfrage die Box, dessen Start-Index auf nBoxStt steht
+ SwTableBox* GetTblBox( ULONG nSttIdx );
+ const SwTableBox* GetTblBox( ULONG nSttIdx ) const
+ { return ((SwTable*)this)->GetTblBox( nSttIdx ); }
+
+ // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
+ BOOL IsTblComplex() const;
+
+ //returnt TRUE wenn die Tabelle oder Selektion ausgeglichen ist
+ BOOL IsTblComplexForChart( const String& rSel,
+ SwChartLines* pGetCLines = 0 ) const;
+
+ // suche alle Inhaltstragenden-Boxen der Grundline in der diese Box
+ // steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen
+ //JP 31.01.97: bToTop = TRUE -> hoch bis zur Grundline,
+ // FALSE-> sonst nur die Line der Box
+ SwSelBoxes& SelLineFromBox( const SwTableBox* pBox,
+ SwSelBoxes& rBoxes, BOOL bToTop = TRUE ) const;
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // suche im Format nach der angemeldeten Tabelle
+ static SwTable* FindTable( SwFrmFmt* pFmt );
+
+ // Struktur ein wenig aufraeumen
+ void GCLines();
+
+ // returns the table node via aSortCntBoxes or pTableNode
+ SwTableNode* GetTableNode() const;
+ void SetTableNode( SwTableNode* pNode ) { pTableNode = pNode; }
+
+ // Daten Server-Methoden
+ void SetRefObject( SwServerObject* );
+ const SwServerObject* GetObject() const { return &refObj; }
+ SwServerObject* GetObject() { return &refObj; }
+
+ //Daten fuer das Chart fuellen.
+ void UpdateCharts() const;
+
+ TblChgMode GetTblChgMode() const { return eTblChgMode; }
+ void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; }
+
+ BOOL SetColWidth( SwTableBox& rAktBox, USHORT eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+ BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+#ifndef PRODUCT
+ void CheckConsistency() const;
+#endif
+};
+
+class SW_DLLPUBLIC SwTableLine: public SwClient // Client vom FrmFmt
+{
+ SwTableBoxes aBoxes;
+ SwTableBox *pUpper;
+
+public:
+ TYPEINFO();
+
+ SwTableLine() : pUpper(0) {}
+
+ SwTableLine( SwTableLineFmt*, USHORT nBoxes, SwTableBox *pUp );
+ virtual ~SwTableLine();
+
+ SwTableBoxes &GetTabBoxes() { return aBoxes; }
+ const SwTableBoxes &GetTabBoxes() const { return aBoxes; }
+
+ SwTableBox *GetUpper() { return pUpper; }
+ const SwTableBox *GetUpper() const { return pUpper; }
+ void SetUpper( SwTableBox *pNew ) { pUpper = pNew; }
+
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+
+ //Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen.
+ SwFrmFmt* ClaimFrmFmt();
+ void ChgFrmFmt( SwTableLineFmt* pNewFmt );
+
+ // suche nach der naechsten/vorherigen Box mit Inhalt
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+
+ SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
+
+ bool hasSoftPageBreak() const;
+};
+
+class SW_DLLPUBLIC SwTableBox: public SwClient //Client vom FrmFmt
+{
+ friend class SwNodes; // um den Index umzusetzen !
+ friend void DelBoxNode(SwTableSortBoxes&); // um den StartNode* zu loeschen !
+ friend class SwXMLTableContext;
+
+ //nicht (mehr) implementiert.
+ SwTableBox( const SwTableBox & );
+ SwTableBox &operator=( const SwTableBox &); //gibts nicht.
+
+ SwTableLines aLines;
+ const SwStartNode * pSttNd;
+ SwTableLine *pUpper;
+ SwTableBox_Impl* pImpl;
+
+ // falls das Format schon Formeln/Values enthaelt, muss ein neues
+ // fuer die neue Box erzeugt werden.
+ SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* );
+
+public:
+ TYPEINFO();
+
+ SwTableBox() : pSttNd(0), pUpper(0), pImpl(0) {}
+
+ SwTableBox( SwTableBoxFmt*, USHORT nLines, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 );
+ virtual ~SwTableBox();
+
+ SwTableLines &GetTabLines() { return aLines; }
+ const SwTableLines &GetTabLines() const { return aLines; }
+
+ SwTableLine *GetUpper() { return pUpper; }
+ const SwTableLine *GetUpper() const { return pUpper; }
+ void SetUpper( SwTableLine *pNew ) { pUpper = pNew; }
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+
+ //Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen.
+ SwFrmFmt* ClaimFrmFmt();
+ void ChgFrmFmt( SwTableBoxFmt *pNewFmt );
+
+ const SwStartNode *GetSttNd() const { return pSttNd; }
+ ULONG GetSttIdx() const
+#ifdef PRODUCT
+ { return pSttNd ? pSttNd->GetIndex() : 0; }
+#else
+ ;
+#endif
+
+ // suche nach der naechsten/vorherigen Box mit Inhalt
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+ // gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
+ // und ergibt sich aus der Position in den Lines/Boxen/Tabelle
+ String GetName() const;
+ // gebe den "Wert" der Box zurueck (fuers rechnen in der Tabelle)
+ double GetValue( SwTblCalcPara& rPara ) const;
+
+ BOOL IsInHeadline( const SwTable* pTbl = 0 ) const;
+
+ // enthaelt die Box Inhalt, der als Nummer formatiert werden kann?
+ BOOL HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ BOOL& rIsEmptyTxtNd ) const;
+ ULONG IsValidNumTxtNd( BOOL bCheckAttr = TRUE ) const;
+ // teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine
+ // Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!)
+ BOOL IsNumberChanged() const;
+
+ // ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
+ // Was es ist, besagt der ReturnWert - die WhichId des Attributes
+ // Leere Boxen haben den ReturnWert USHRT_MAX !!
+ USHORT IsFormulaOrValueBox() const;
+
+ // Loading of a document requires an actualisation of cells with values
+ void ActualiseValueBox();
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableBox)
+
+ // zugriff auf interne Daten - z.Z. benutzt fuer den NumFormatter
+ inline const Color* GetSaveUserColor() const;
+ inline const Color* GetSaveNumFmtColor() const;
+ inline void SetSaveUserColor(const Color* p );
+ inline void SetSaveNumFmtColor( const Color* p );
+
+ long getRowSpan() const;
+ void setRowSpan( long nNewRowSpan );
+ bool getDummyFlag() const;
+ void setDummyFlag( bool bDummy );
+
+ SwTableBox& FindStartOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ const SwTableBox& FindStartOfRowSpan( const SwTable& rTable,
+ USHORT nMaxStep = USHRT_MAX ) const
+ { return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); }
+
+ SwTableBox& FindEndOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
+ USHORT nMaxStep = USHRT_MAX ) const
+ { return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
+};
+
+#endif //_SWTABLE_HXX
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
new file mode 100644
index 000000000000..09fe43fb87ce
--- /dev/null
+++ b/sw/inc/swtblfmt.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swtblfmt.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWTBLFMT_HXX
+#define _SWTBLFMT_HXX
+
+#include <frmfmt.hxx>
+
+class SwDoc;
+
+class SwTableFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+protected:
+ SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange )
+ {}
+ SwTableFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange )
+ {}
+
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableFmt)
+};
+
+class SwTableLineFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+protected:
+ SwTableLineFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange )
+ {}
+ SwTableLineFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableLineFmt)
+};
+
+class SW_DLLPUBLIC SwTableBoxFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+protected:
+ SwTableBoxFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange )
+ {}
+ SwTableBoxFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
+ virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt)
+};
+
+
+#endif
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
new file mode 100644
index 000000000000..64cd8231f0ef
--- /dev/null
+++ b/sw/inc/swtypes.hxx
@@ -0,0 +1,341 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swtypes.hxx,v $
+ * $Revision: 1.27 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWTYPES_HXX
+#define _SWTYPES_HXX
+#include <tools/solar.h>
+#include <SwGetPoolIdFromName.hxx>
+
+#ifndef INCLUDED_LIMITS_H
+#include <limits.h> //fuer LONG_MAX
+#define INCLUDED_LIMITS_H
+#endif
+
+#ifdef PM20
+#include <stdlib.h>
+#endif
+#include <com/sun/star/uno/Reference.h>
+#include "swdllapi.h"
+#include <i18npool/lang.h>
+// wenn das hier geaendert wird, dann auch im globals.hrc aendern!!!
+//#define SW_FILEFORMAT_40 SOFFICE_FILEFORMAT_40
+
+namespace com { namespace sun { namespace star {
+ namespace linguistic2{
+ class XDictionaryList;
+ class XSpellChecker1;
+ class XHyphenator;
+ class XThesaurus;
+ }
+ namespace beans{
+ class XPropertySet;
+ }
+}}}
+namespace utl{
+ class TransliterationWrapper;
+}
+
+class Size;
+class ResMgr;
+class UniString;
+class ByteString;
+class SwPathFinder;
+class Graphic;
+class OutputDevice;
+class CharClass;
+class LocaleDataWrapper;
+class CollatorWrapper;
+
+typedef long SwTwips;
+#define INVALID_TWIPS LONG_MAX
+#define TWIPS_MAX (LONG_MAX - 1)
+
+#define MM50 283 // 1/2 cm in TWIPS
+// --> OD 2004-06-18 #i19922# - constant for minimal page header/footer height of 1mm
+const SwTwips cMinHdFtHeight = 56;
+
+#define MINFLY 23 //Minimalgroesse fuer FlyFrms
+#define MINLAY 23 //Minimalgroesse anderer Frms
+
+// Default-Spaltenabstand zweier Textspalten entspricht 0.3 cm
+#define DEF_GUTTER_WIDTH (MM50 / 5 * 3)
+
+//Minimale Distance (Abstand zum Text) fuer das BorderAttribut, damit
+//die aligned'en Linien nicht geplaettet werden.
+//28 Twips == 0,4mm
+#define MIN_BORDER_DIST 28
+
+ /* minimaler Dokmentrand */
+const SwTwips lMinBorder = 1134;
+
+//Die Wiesenbreite links neben und ueber dem Dokument.
+//Die halbe Wiesenbreite ist der Abstand zwischen den Seiten.
+#define DOCUMENTBORDER 568L
+#define GAPBETWEENPAGES 284L
+
+//initiale UndoActionCount
+#define UNDO_ACTION_COUNT 20
+
+// Konstante Strings
+SW_DLLPUBLIC extern UniString aEmptyStr; // ""
+extern ByteString aEmptyByteStr; // ""
+SW_DLLPUBLIC extern UniString aDotStr; // '.'
+
+//Zum Einfuegen von Beschriftungen (wie bzw. wo soll eingefuegt werden).
+//Hier weil ein eigenes hxx nicht lohnt und es sonst nirgendwo so recht
+//hinpasst.
+enum SwLabelType
+{
+ LTYPE_TABLE, //Beschriftung einer Tabelle
+ LTYPE_OBJECT, //Beschriftung von Grafik oder OLE
+ LTYPE_FLY, //Beschriftung eines (Text-)Rahmens
+ LTYPE_DRAW //Beschriftung eines Zeichen-Objektes
+};
+
+
+const BYTE OLD_MAXLEVEL = 5;
+const BYTE MAXLEVEL = 10; //Ehemals numrule.hxx
+const BYTE NO_NUM = 200; //Ehemals numrule.hxx
+//const BYTE NO_NUMBERING = 201; //Ehemals numrule.hxx //#outline level,removed by zhaojianwei
+//const BYTE NO_INIT = 202; //Ehemals numrule.hxx
+
+// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln
+// DAMIT entfaellt das NO_NUM !!!!
+const BYTE NO_NUMLEVEL = 0x20; // wird mit den Levels verodert
+
+
+/*
+ * Nette Funktionen als MACRO oder inline
+ */
+
+/* ein KiloByte sind 1024 Byte */
+#define KB 1024
+
+#define SET_CURR_SHELL( shell ) CurrShell aCurr( shell )
+
+// pPathFinder wird von der UI initialisiert. Die Klasse liefert alle
+// benoetigten Pfade.
+extern SwPathFinder *pPathFinder;
+
+// Werte fuer die Einzuege an der Nummerierung und BulletListe
+// (fuer die weiteren Ebenen sind die Werte mit den Ebenen+1 zu
+// multiplizieren; Ebenen 0..4 !!!)
+
+// -> #i30312#
+const USHORT lBullIndent = 1440/4;
+const short lBullFirstLineOffset = -lBullIndent;
+const USHORT lNumIndent = 1440/4;
+const short lNumFirstLineOffset = -lNumIndent;
+const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
+// <- #i30312#
+
+// Anzahl der SystemField-Types vom SwDoc
+#define INIT_FLDTYPES 32
+// Anzahl der vordefinierten Seq-Feldtypen. Es handelt sich dabei
+// immer um die letzen Felder vor INIT_FLDTYPES
+#define INIT_SEQ_FLDTYPES 4
+
+//Die ehemaligen Rendevouz-Ids leben weiter:
+//Es gibt Ids fuer die Anker (SwFmtAnchor) und ein paar weitere die nur fuer
+//Schnittstellen Bedeutung haben (SwDoc).
+enum RndStdIds
+{
+ FLY_AT_CNTNT, //Absatzgebundener Rahmen
+ FLY_IN_CNTNT, //Zeichengebundener Rahmen
+ FLY_PAGE, //Seitengebundener Rahmen
+ FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL )
+ FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen
+ //Der Rest wird nur fuer SS benutzt.
+ RND_STD_HEADER,
+ RND_STD_FOOTER,
+ RND_STD_HEADERL,
+ RND_STD_HEADERR,
+ RND_STD_FOOTERL,
+ RND_STD_FOOTERR,
+
+ RND_DRAW_OBJECT // ein Draw-Object !! nur fuer die SwDoc-Schnittstelle!
+};
+
+
+extern ResMgr* pSwResMgr; // steht in swapp0.cxx
+#define SW_RES(i) ResId(i,*pSwResMgr)
+#define SW_RESSTR(i) UniString(ResId(i,*pSwResMgr))
+
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > GetSpellChecker();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator > GetHyphenator();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XThesaurus > GetThesaurus();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > GetLinguPropertySet();
+
+// reutns the twip size of this graphic
+SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev );
+
+
+// Seperator fuer Sprunge im Dokument auf verschiedene Inhalttype
+const sal_Unicode cMarkSeperator = '|';
+extern const sal_Char* __FAR_DATA pMarkToTable; // Strings stehen
+extern const sal_Char* __FAR_DATA pMarkToFrame; // im Init.cxx
+extern const sal_Char* __FAR_DATA pMarkToRegion;
+SW_DLLPUBLIC extern const sal_Char* __FAR_DATA pMarkToOutline;
+extern const sal_Char* __FAR_DATA pMarkToText;
+extern const sal_Char* __FAR_DATA pMarkToGraphic;
+extern const sal_Char* __FAR_DATA pMarkToOLE;
+
+#ifndef DB_DELIM // Ist in OFA definiert!!!
+#define DB_DELIM ((sal_Unicode)0xff) // Datenbank <-> Tabellen-Trenner
+#endif
+
+
+typedef USHORT SetAttrMode;
+
+namespace nsSetAttrMode
+{
+ const SetAttrMode SETATTR_DEFAULT = 0x0000; // default
+ const SetAttrMode SETATTR_DONTEXPAND = 0x0001; // TextAttribute nicht weiter expand.
+ const SetAttrMode SETATTR_DONTREPLACE = 0x0002; // kein anderes TextAttrib verdraengen
+
+ const SetAttrMode SETATTR_NOTXTATRCHR = 0x0004; // bei Attr ohne Ende kein 0xFF einfuegen
+ const SetAttrMode SETATTR_NOHINTADJUST = 0x0008; // keine Zusammenfassung von Bereichen.
+ const SetAttrMode SETATTR_NOFORMATATTR = 0x0010; // nicht zum FormatAttribut umwandeln
+ const SetAttrMode SETATTR_DONTCHGNUMRULE = 0x0020; // nicht die NumRule veraendern
+ const SetAttrMode SETATTR_APICALL = 0x0040; // called from API (all UI related
+ // functionality will be disabled)
+ /// force hint expand (only matters for hints with CH_TXTATR)
+ const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080;
+}
+
+//Umrechnung Twip<-> 1/100 mm 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))
+#define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L))
+#define MM100_TO_TWIP_UNSIGNED(MM100) ((((MM100)*72L+63L)/127L))
+
+#define SW_ISPRINTABLE( c ) ( c >= ' ' && 127 != c )
+
+#ifndef SW_CONSTASCII_DECL
+#define SW_CONSTASCII_DECL( n, s ) n[sizeof(s)]
+#endif
+#ifndef SW_CONSTASCII_DEF
+#define SW_CONSTASCII_DEF( n, s ) n[sizeof(s)] = s
+#endif
+
+
+#define CHAR_HARDBLANK ((sal_Unicode)0x00A0)
+#define CHAR_HARDHYPHEN ((sal_Unicode)0x2011)
+#define CHAR_SOFTHYPHEN ((sal_Unicode)0x00AD)
+#define CHAR_RLM ((sal_Unicode)0x200F)
+#define CHAR_LRM ((sal_Unicode)0x200E)
+#define CHAR_ZWSP ((sal_Unicode)0x200B)
+#define CHAR_ZWNBSP ((sal_Unicode)0x2060)
+
+
+// returns the APP - CharClass instance - used for all ToUpper/ToLower/...
+SW_DLLPUBLIC CharClass& GetAppCharClass();
+SW_DLLPUBLIC LanguageType GetAppLanguage();
+
+
+#if 0
+// I18N doesn't get this right, can't specify more than one to ignore
+#define SW_COLLATOR_IGNORES ( \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE | \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_KANA | \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_WIDTH )
+#else
+#define SW_COLLATOR_IGNORES ( \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE )
+#endif
+
+SW_DLLPUBLIC CollatorWrapper& GetAppCollator();
+SW_DLLPUBLIC CollatorWrapper& GetAppCaseCollator();
+
+SW_DLLPUBLIC const ::utl::TransliterationWrapper& GetAppCmpStrIgnore();
+
+// --> OD 2004-06-30 #i28701# - moved from <frame.hxx>
+//fuer Prepare() zur Benachrichtigung des Inhaltes durch das Layout auf
+//dem kurzen Dienstweg.
+//Der Inhalt sorgt dafuer, dass beim naechsten Aufruf von ::Format() das
+//minimal notwendige berechnet wird.
+enum PrepareHint
+{
+ PREP_BEGIN, //BEGIN
+ PREP_CLEAR = PREP_BEGIN,//Komplett neuformatieren.
+ PREP_WIDOWS_ORPHANS, //Nur Witwen- und Waisen-Regelung pruefen und ggf.
+ //Aufspalten.
+ PREP_FIXSIZE_CHG, //Die FixSize hat sich veraendert.
+ PREP_FOLLOW_FOLLOWS, //Follow ist jetzt moeglicherweise direkter
+ //Nachbar.
+ PREP_ADJUST_FRM, //Groesse per Grow/Shrink Ausrichten ohne zu
+ //Formatieren.
+ PREP_FLY_CHGD, //Ein FlyFrm hat sich (Groesse) veraendert.
+ PREP_FLY_ATTR_CHG, //Ein FlyFrm hat seine Attribute veraendert
+ //(z.B. Umlauf)
+ PREP_FLY_ARRIVE, //Ein FlyFrm ueberlappt den Bereich jetzt neu.
+ PREP_FLY_LEAVE, //Ein FlyFrm hat den Bereich verlassen.
+ PREP_FTN, //Fussnoten-Invalidierung
+ PREP_POS_CHGD, //Position des Frm hat sich verandert
+ //(Zum Fly-Umbruch pruefen). Im void* des Prepare()
+ //wird ein BOOL& uebergeben, dieser zeigt mit TRUE,
+ //dass ein Format ausgefuehrt wurde.
+ PREP_UL_SPACE, //UL-Space hat sich veraendert, TxtFrms muessen
+ //den Zeilenabstand neu kalkulieren.
+ PREP_MUST_FIT, //Frm passen machen (aufspalten) auch wenn die
+ //Attribute es nicht erlauben (z.B. zusammenhalten).
+ PREP_WIDOWS, // Ein Follow stellt fest, dass in ihm die Orphans-
+ // regel zuschlaegt und verschickt an seinen
+ // Vorgaenger (Master/Follow) ein PREP_WIDOWS
+ PREP_QUOVADIS, // Wenn eine Fussnote _zwischen_ zwei Absaetzen
+ // aufgespalten werden muss, dann muss der
+ // letzte auf der Seite noch ein QUOVADIS bekommen
+ // damit er den Text hineinformatiert.
+ PREP_BOSS_CHGD, // Wenn ein Frm die Spalte/Seite wechselt, wird dieses
+ // Zusatzprepare zum POS_CHGD im MoveFwd/Bwd
+ // verschickt (Ftn-Nummern joinen etc.)
+ // Die Richtung wird ueber pVoid mitgeteilt:
+ // MoveFwd: pVoid == 0
+ // MoveBwd: pVoid == pOldPage
+ PREP_SWAP, //Grafiken Swappen, fuer Grafiken im sichtbaren
+ //Bereich.
+ PREP_REGISTER, //Registerhaltige Frames invalidieren
+ PREP_FTN_GONE, //Ein Follow verliert eine Fussnote, ggf. kann seine erste
+ //Zeile hochrutschen
+ PREP_MOVEFTN, //eine Fussnote wechselt die Seite, der Inhalt bekommt
+ //zunaechst eine Hoehe von Null, damit nicht zuviel
+ //Unruhe entsteht. Beim Formatieren prueft er, ob er
+ //ueberhaupt passt und wechselt ggf. unbemerkt wieder
+ //die Seite.
+ PREP_ERGOSUM, //wg. Bewegung in FtnFrms QuoVadis/ErgoSum pruefen
+ PREP_END //END
+};
+// <--
+
+#endif
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
new file mode 100644
index 000000000000..ce997cc3f43d
--- /dev/null
+++ b/sw/inc/swundo.hxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swundo.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWUNDO_HXX
+#define _SWUNDO_HXX
+
+#include <svtools/svarray.hxx>
+
+// die Ids fuer StdAktionen
+enum SwUndoId
+{
+ UNDO_EMPTY = 0,
+ UNDO_STD_BEGIN = 1,
+ UNDO_START = UNDO_STD_BEGIN, // 1
+ UNDO_END, // 2
+ REPEAT_START, // alle UndoIds zwischen REPEAT_START und
+ // REPEAT_END sind Repeat-Faehig !!
+ UNDO_DELETE = REPEAT_START, // 3
+ UNDO_INSERT, // 4
+ UNDO_OVERWRITE, // 5
+ UNDO_SPLITNODE, // 6
+ UNDO_INSATTR, // 7
+ UNDO_SETFMTCOLL, // 8
+ UNDO_RESETATTR, // 9
+ UNDO_INSFMTATTR, // 10
+ UNDO_INSDOKUMENT, // 11
+ UNDO_COPY, // 12
+ UNDO_INSTABLE, // 13
+ UNDO_TABLETOTEXT, // 14
+ UNDO_TEXTTOTABLE, // 15
+ UNDO_SORT_TXT, // 16
+ UNDO_INSLAYFMT, // 17
+ UNDO_TABLEHEADLINE, // 18
+ UNDO_INSSECTION, // 19
+ UNDO_OUTLINE_LR, // 20
+ UNDO_OUTLINE_UD, // 21
+ UNDO_INSNUM, // 22
+ UNDO_NUMUP, // 23
+ UNDO_MOVENUM, // 24
+ UNDO_INSDRAWFMT, // 25
+ UNDO_NUMORNONUM, // 26
+ UNDO_INC_LEFTMARGIN, // 27
+ UNDO_DEC_LEFTMARGIN, // 28
+ UNDO_INSERTLABEL, // 29
+ UNDO_SETNUMRULESTART, // 30
+ UNDO_CHGFTN, // 31
+ UNDO_REDLINE, // 32
+ UNDO_ACCEPT_REDLINE, // 33
+ UNDO_REJECT_REDLINE, // 34
+ UNDO_SPLIT_TABLE, // 35
+ UNDO_DONTEXPAND, // 36
+ UNDO_AUTOCORRECT, // 37
+ UNDO_MERGE_TABLE, // 38
+ UNDO_TRANSLITERATE, // 39
+
+ // -> #111827#
+ UNDO_PASTE_CLIPBOARD, // 40
+ UNDO_TYPING, // 41
+ // <- #111827#
+ UNDO_REPEAT_DUMMY_6, // 42
+ UNDO_REPEAT_DUMMY_7, // 43
+ UNDO_REPEAT_DUMMY_8, // 44
+ UNDO_REPEAT_DUMMY_9, // 45
+ REPEAT_END,
+
+ UNDO_MOVE = REPEAT_END, // 46
+ UNDO_INSGLOSSARY, // 47
+ UNDO_DELBOOKMARK, // 48
+ UNDO_INSBOOKMARK, // 49
+ UNDO_SORT_TBL, // 50
+ UNDO_DELLAYFMT, // 51
+ UNDO_AUTOFORMAT, // 52
+ UNDO_REPLACE, // 53
+ UNDO_DELSECTION, // 54
+ UNDO_CHGSECTION, // 55
+ UNDO_CHGSECTIONPASSWD, // 56
+ UNDO_SETDEFTATTR, // 57
+ UNDO_DELNUM, // 58
+ UNDO_DRAWUNDO, // 59
+ UNDO_DRAWGROUP, // 60
+ UNDO_DRAWUNGROUP, // 61
+ UNDO_DRAWDELETE, // 62
+ UNDO_REREAD, // 63
+ UNDO_DELGRF, // 64
+ UNDO_DELOLE, // 65
+ UNDO_TABLE_ATTR, // 66
+ UNDO_TABLE_AUTOFMT, // 67
+ UNDO_TABLE_INSCOL, // 68
+ UNDO_TABLE_INSROW, // 69
+ UNDO_TABLE_DELBOX, // 70
+ UNDO_TABLE_SPLIT, // 71
+ UNDO_TABLE_MERGE, // 72
+ UNDO_TBLNUMFMT, // 73
+ UNDO_INSTOX, // 74
+ UNDO_CLEARTOXRANGE, // 75
+ UNDO_TBLCPYTBL, // 76
+ UNDO_CPYTBL, // 77
+ UNDO_INS_FROM_SHADOWCRSR, // 78
+ UNDO_CHAINE, // 79
+ UNDO_UNCHAIN, // 80
+ UNDO_FTNINFO, // 81
+ UNDO_ENDNOTEINFO, // 82
+ UNDO_COMPAREDOC, // 83
+ UNDO_SETFLYFRMFMT, // 84
+ UNDO_SETRUBYATTR, // 85
+
+ UNDO_TMPAUTOCORR, // 86 #102505#
+ UNDO_TOXCHANGE, // 87
+ UNDO_CREATE_PAGEDESC, // 88
+ UNDO_CHANGE_PAGEDESC, // 89
+ UNDO_DELETE_PAGEDESC, // 90
+ UNDO_HEADER_FOOTER, // 91 #i7983#
+ UNDO_FIELD, // 92 #111840#
+ UNDO_TXTFMTCOL_CREATE, // 93
+ UNDO_TXTFMTCOL_DELETE, // 94
+ UNDO_TXTFMTCOL_RENAME, // 95
+ UNDO_CHARFMT_CREATE, // 96
+ UNDO_CHARFMT_DELETE, // 97
+ UNDO_CHARFMT_RENAME, // 98
+ UNDO_FRMFMT_CREATE, // 99
+ UNDO_FRMFMT_DELETE, // 100
+ UNDO_FRMFMT_RENAME, // 101
+ UNDO_NUMRULE_CREATE,// 102
+ UNDO_NUMRULE_DELETE,// 103
+ UNDO_NUMRULE_RENAME,// 104
+ UNDO_BOOKMARK_RENAME, // 105
+ UNDO_INDEX_ENTRY_INSERT, // 106
+ UNDO_INDEX_ENTRY_DELETE, // 107
+ UNDO_COL_DELETE, // 108
+ UNDO_ROW_DELETE, // 109
+ UNDO_RENAME_PAGEDESC, // 110
+ UNDO_NUMDOWN, // 111
+ // --> OD 2009-07-16 #i73249#
+ UNDO_FLYFRMFMT_TITLE, // 112
+ UNDO_FLYFRMFMT_DESCRIPTION, // 113
+ // <--
+ UNDO_STD_END= UNDO_FLYFRMFMT_DESCRIPTION,
+
+ // UI undo ID's...
+ UNDO_UI_REPLACE = UNDO_STD_END + 1,
+ UNDO_UI_INSERT_PAGE_BREAK,
+ UNDO_UI_INSERT_COLUMN_BREAK,
+ UNDO_UI_PLAY_MACRO,
+ UNDO_UI_INSERT_ENVELOPE,
+ UNDO_UI_DRAG_AND_COPY,
+ UNDO_UI_DRAG_AND_MOVE,
+ UNDO_UI_INSERT_RULER,
+ UNDO_UI_INSERT_CHART,
+ UNDO_UI_INSERT_FOOTNOTE,
+ UNDO_UI_INSERT_URLBTN,
+ UNDO_UI_INSERT_URLTXT,
+ UNDO_UI_DELETE_INVISIBLECNTNT,
+ UNDO_UI_REPLACE_STYLE
+};
+
+
+#define INIT_UNDOIDS 20
+#define GROW_UNDOIDS 32
+// Das Array der verwendeten Undo-Ids
+class String;
+class SwUndoIdAndName
+{
+ SwUndoId eUndoId;
+ String* pUndoStr;
+
+public:
+ SwUndoIdAndName() : eUndoId( UNDO_EMPTY ), pUndoStr( 0 ) {}
+ SwUndoIdAndName( SwUndoId nId, const String* pStr = 0 );
+ ~SwUndoIdAndName();
+
+ SwUndoId GetUndoId() const { return eUndoId; }
+ const String* GetUndoStr() const { return pUndoStr; }
+};
+typedef SwUndoIdAndName* SwUndoIdAndNamePtr;
+SV_DECL_PTRARR_DEL( SwUndoIds, SwUndoIdAndNamePtr, INIT_UNDOIDS, GROW_UNDOIDS )
+
+#endif
diff --git a/sw/inc/swunodef.hxx b/sw/inc/swunodef.hxx
new file mode 100644
index 000000000000..8164514fadec
--- /dev/null
+++ b/sw/inc/swunodef.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swunodef.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWUNODEF_HXX
+#define _SWUNODEF_HXX
+
+#define STAR_NMSPC ::com::sun::star
+#define UNO_NMSPC STAR_NMSPC::uno
+#define CLIP_NMSPC STAR_NMSPC::datatransfer::clipboard
+
+#define STAR_REFERENCE(aType) UNO_NMSPC::Reference< STAR_NMSPC::aType >
+
+#endif
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
new file mode 100644
index 000000000000..ebf27999b0aa
--- /dev/null
+++ b/sw/inc/swunohelper.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swunohelper.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWUNOHELPER_HXX
+#define _SWUNOHELPER_HXX
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include "swdllapi.h"
+
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class Any;
+ }
+}}}
+
+class String;
+class SvStrings;
+class SvPtrarr;
+
+namespace SWUnoHelper {
+
+// calls over the compherl the getEnumAsInt32 function and handle the
+// exceptions.
+sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
+
+
+// methods for UCB actions:
+ // delete the file under this URL
+SW_DLLPUBLIC BOOL UCB_DeleteFile( const String& rURL );
+
+ // copy/move the file to a new location
+BOOL UCB_CopyFile( const String& rURL, const String& rNewURL,
+ BOOL bCopyIsMove = FALSE );
+
+ // is the URL on the current system case sentive?
+SW_DLLPUBLIC BOOL UCB_IsCaseSensitiveFileName( const String& rURL );
+
+ // is the URL readonly?
+SW_DLLPUBLIC BOOL UCB_IsReadOnlyFileName( const String& rURL );
+
+ // get a list of files from the folder of the URL
+ // options: pExtension = 0 -> all, else this specific extension
+ // pDateTime != 0 -> returns also the modified date/time of
+ // the files in a SvPtrarr -->
+ // !! objects must be deleted from the caller!!
+BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+ const String* pExtension = 0,
+ SvPtrarr* pDateTimeList = 0 );
+
+ // is the URL an existing file?
+SW_DLLPUBLIC BOOL UCB_IsFile( const String& rURL );
+
+ // is the URL a existing directory?
+BOOL UCB_IsDirectory( const String& rURL );
+}
+
+#endif
diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx
new file mode 100644
index 000000000000..83acfcb05dd2
--- /dev/null
+++ b/sw/inc/swurl.hxx
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swurl.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWURL_HXX
+#define _SWURL_HXX
+
+#include <tools/solar.h>
+
+
+class UniString;
+class ViewShell;
+
+#define URLLOAD_NOFILTER 0x0000
+#define URLLOAD_NEWVIEW 0x8000
+
+
+void LoadURL( const UniString& rName, ViewShell* pSh,
+ USHORT nFilter = URLLOAD_NOFILTER,
+ const UniString *pTargetFrameName = 0 );
+
+
+
+#endif
diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx
new file mode 100644
index 000000000000..43039f851170
--- /dev/null
+++ b/sw/inc/swwait.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swwait.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWWAIT_HXX
+#define _SWWAIT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+class SwDocShell;
+
+class SW_DLLPUBLIC SwWait
+{
+ SwDocShell &rDoc;
+ BOOL bLock;
+public:
+ SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher );
+ ~SwWait();
+};
+
+#endif
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx
new file mode 100644
index 000000000000..092d6b12f22b
--- /dev/null
+++ b/sw/inc/tabcol.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tabcol.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TABCOL_HXX
+#define _TABCOL_HXX
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_LONGS
+#define _SVSTDARR_BOOLS
+#include <svtools/svstdarr.hxx>
+#endif
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+#include "swdllapi.h"
+
+struct SwTabColsEntry
+{
+ long nPos;
+ long nMin;
+ long nMax;
+ BOOL bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
+ //Wenn das Flag Hidden TRUE ist liegt der Spalten-
+ //trenner nicht in der aktuellen Zeile; er muss
+ //mit gepflegt werden, darf aber nicht angezeigt
+ //werden.
+};
+
+typedef std::vector< SwTabColsEntry > SwTabColsEntries;
+
+class SW_DLLPUBLIC SwTabCols
+{
+ long nLeftMin, //Linker aeusserer Rand (Bezugspunkt) in
+ //Dokumentkordinaten.
+ //Alle anderen Werte relativ zu diesem Punkt!
+ nLeft, //Linker Rand der Tabelle.
+ nRight, //Rechter Rand der Tabelle.
+ nRightMax; //Maximaler rechter Rand der Tabelle.
+
+ bool bLastRowAllowedToChange; // if the last row of the table frame
+ // is split across pages, it may not
+ // change its size
+
+ SwTabColsEntries aData;
+
+ //fuer den CopyCTor
+ const SwTabColsEntries& GetData() const { return aData; }
+
+public:
+ SwTabCols( USHORT nSize = 0 );
+ SwTabCols( const SwTabCols& );
+ SwTabCols &operator=( const SwTabCols& );
+ BOOL operator==( const SwTabCols& rCmp ) const;
+ long& operator[]( USHORT nPos ) { return aData[nPos].nPos; }
+ long operator[]( USHORT nPos ) const { return aData[nPos].nPos; }
+ USHORT Count() const { return sal::static_int_cast< USHORT >(aData.size()); }
+
+ BOOL IsHidden( USHORT nPos ) const { return aData[nPos].bHidden; }
+ void SetHidden( USHORT nPos, BOOL bValue ) { aData[nPos].bHidden = bValue; }
+
+ void Insert( long nValue, BOOL bValue, USHORT nPos );
+ void Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos );
+ void Remove( USHORT nPos, USHORT nAnz = 1 );
+
+ const SwTabColsEntry& GetEntry( USHORT nPos ) const { return aData[nPos]; }
+ SwTabColsEntry& GetEntry( USHORT nPos ) { return aData[nPos]; }
+
+ long GetLeftMin() const { return nLeftMin; }
+ long GetLeft() const { return nLeft; }
+ long GetRight() const { return nRight; }
+ long GetRightMax()const { return nRightMax;}
+
+ void SetLeftMin ( long nNew ) { nLeftMin = nNew; }
+ void SetLeft ( long nNew ) { nLeft = nNew; }
+ void SetRight ( long nNew ) { nRight = nNew; }
+ void SetRightMax( long nNew ) { nRightMax = nNew;}
+
+ bool IsLastRowAllowedToChange() const { return bLastRowAllowedToChange; }
+ void SetLastRowAllowedToChange( bool bNew ) { bLastRowAllowedToChange = bNew; }
+};
+
+#endif //_TABCOL_HXX
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
new file mode 100644
index 000000000000..0b26219ab7e1
--- /dev/null
+++ b/sw/inc/tblafmt.hxx
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tblafmt.hxx,v $
+ * $Revision: 1.9.210.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TBLAFMT_HXX
+#define _TBLAFMT_HXX
+/*************************************************************************
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+JP 20.07.95:
+
+ Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
+ Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc
+ eingelesen/geschrieben.
+ Sollte sich doch mal eine Aenderung nicht vermeiden lassen, dann auf
+ jedenfall in beiden Applikationen aendern.
+
+ The structure of table auto formatting should not changed. It is used
+ by different code of Writer and Calc. If a change is necessary, the
+ source code of both applications must be changed!
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+**************************************************************************/
+
+#include <svtools/svarray.hxx>
+#include "hintids.hxx" //_immmer_ vor den solar-items!
+#include <svx/algitem.hxx>
+#include <svx/fontitem.hxx>
+#include <svx/fhgtitem.hxx>
+#include <svx/wghtitem.hxx>
+#include <svx/postitem.hxx>
+#include <svx/udlnitem.hxx>
+#include <svx/crsditem.hxx>
+#ifndef _SVX_CNTRTITEM_HXX //autogen
+#include <svx/cntritem.hxx>
+#endif
+#include <svx/shdditem.hxx>
+#include <svx/colritem.hxx>
+#include <svx/boxitem.hxx>
+#include <svx/brshitem.hxx>
+#include <svx/adjitem.hxx>
+#include <svx/rotmodit.hxx>
+#include <svtools/intitem.hxx>
+#include <svx/bolnitem.hxx>
+#include "swdllapi.h"
+
+struct SwAfVersions;
+
+class SvNumberFormatter;
+
+class SwBoxAutoFmt
+{
+ // common attributes of Calc and Writer
+ // --- from 641 on: CJK and CTL font settings
+ SvxFontItem aFont;
+ SvxFontHeightItem aHeight;
+ SvxWeightItem aWeight;
+ SvxPostureItem aPosture;
+
+ SvxFontItem aCJKFont;
+ SvxFontHeightItem aCJKHeight;
+ SvxWeightItem aCJKWeight;
+ SvxPostureItem aCJKPosture;
+
+ SvxFontItem aCTLFont;
+ SvxFontHeightItem aCTLHeight;
+ SvxWeightItem aCTLWeight;
+ SvxPostureItem aCTLPosture;
+
+ SvxUnderlineItem aUnderline;
+ SvxOverlineItem aOverline;
+ SvxCrossedOutItem aCrossedOut;
+ SvxContourItem aContour;
+ SvxShadowedItem aShadowed;
+ SvxColorItem aColor;
+ SvxBoxItem aBox;
+ SvxLineItem aTLBR;
+ SvxLineItem aBLTR;
+ SvxBrushItem aBackground;
+
+ // Writer specific
+ SvxAdjustItem aAdjust;
+
+ // Calc specific
+ SvxHorJustifyItem aHorJustify;
+ SvxVerJustifyItem aVerJustify;
+ SfxBoolItem aStacked;
+ SvxMarginItem aMargin;
+ SfxBoolItem aLinebreak;
+ SfxInt32Item aRotateAngle;
+ SvxRotateModeItem aRotateMode;
+
+ // number format
+ String sNumFmtString;
+ LanguageType eSysLanguage, eNumFmtLanguage;
+
+public:
+ SwBoxAutoFmt();
+ SwBoxAutoFmt( const SwBoxAutoFmt& rNew );
+ ~SwBoxAutoFmt();
+
+ int operator==( const SwBoxAutoFmt& rCmp ) const;
+ SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew );
+
+ // die Get-Methoden
+ const SvxFontItem &GetFont() const { return aFont; }
+ const SvxFontHeightItem &GetHeight() const { return aHeight; }
+ const SvxWeightItem &GetWeight() const { return aWeight; }
+ const SvxPostureItem &GetPosture() const { return aPosture; }
+ const SvxFontItem &GetCJKFont() const { return aCJKFont; }
+ const SvxFontHeightItem &GetCJKHeight() const { return aCJKHeight; }
+ const SvxWeightItem &GetCJKWeight() const { return aCJKWeight; }
+ const SvxPostureItem &GetCJKPosture() const { return aCJKPosture; }
+ const SvxFontItem &GetCTLFont() const { return aCTLFont; }
+ const SvxFontHeightItem &GetCTLHeight() const { return aCTLHeight; }
+ const SvxWeightItem &GetCTLWeight() const { return aCTLWeight; }
+ const SvxPostureItem &GetCTLPosture() const { return aCTLPosture; }
+ const SvxUnderlineItem &GetUnderline() const { return aUnderline; }
+ const SvxOverlineItem &GetOverline() const { return aOverline; }
+ const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; }
+ const SvxContourItem &GetContour() const { return aContour; }
+ const SvxShadowedItem &GetShadowed() const { return aShadowed; }
+ const SvxColorItem &GetColor() const { return aColor; }
+ const SvxAdjustItem &GetAdjust() const { return aAdjust; }
+ const SvxBoxItem &GetBox() const { return aBox; }
+ const SvxLineItem &GetTLBR() const { return aTLBR; }
+ const SvxLineItem &GetBLTR() const { return aBLTR; }
+ const SvxBrushItem &GetBackground() const { return aBackground; }
+ void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const
+ { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; }
+
+ // die SetMethoden
+ void SetFont( const SvxFontItem& rNew ) { aFont = rNew; }
+ void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; }
+ void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; }
+ void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; }
+ void SetCJKFont( const SvxFontItem& rNew ) { aCJKFont = rNew; }
+ void SetCJKHeight( const SvxFontHeightItem& rNew ) { aCJKHeight = rNew; }
+ void SetCJKWeight( const SvxWeightItem& rNew ) { aCJKWeight = rNew; }
+ void SetCJKPosture( const SvxPostureItem& rNew ) { aCJKPosture = rNew; }
+ void SetCTLFont( const SvxFontItem& rNew ) { aCTLFont = rNew; }
+ void SetCTLHeight( const SvxFontHeightItem& rNew ) { aCTLHeight = rNew; }
+ void SetCTLWeight( const SvxWeightItem& rNew ) { aCTLWeight = rNew; }
+ void SetCTLPosture( const SvxPostureItem& rNew ) { aCTLPosture = rNew; }
+ void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; }
+ void SetOverline( const SvxOverlineItem& rNew ) { aOverline = rNew; }
+ void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; }
+ void SetContour( const SvxContourItem& rNew ) { aContour = rNew; }
+ void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; }
+ void SetColor( const SvxColorItem& rNew ) { aColor = rNew; }
+ void SetAdjust( const SvxAdjustItem& rNew )
+ {
+ aAdjust.SetAdjust( rNew.GetAdjust() );
+ aAdjust.SetOneWord( rNew.GetOneWord() );
+ aAdjust.SetLastBlock( rNew.GetLastBlock() );
+ }
+ void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; }
+ void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; }
+ void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
+ { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
+
+ BOOL Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer );
+ BOOL Save( SvStream& rStream ) const;
+ BOOL SaveVerionNo( SvStream& rStream ) const;
+
+#ifdef READ_OLDVERS
+ // lade alte Version
+ BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+#endif
+};
+
+class SW_DLLPUBLIC SwTableAutoFmt
+{
+ friend void _FinitCore(); // zum Zerstoeren des dflt. Pointers
+ static SwBoxAutoFmt* pDfltBoxAutoFmt;
+
+ String aName;
+ USHORT nStrResId;
+
+ // common flags of Calc and Writer
+ BOOL bInclFont : 1;
+ BOOL bInclJustify : 1;
+ BOOL bInclFrame : 1;
+ BOOL bInclBackground : 1;
+ BOOL bInclValueFormat : 1;
+
+ // Calc specific flags
+ BOOL bInclWidthHeight : 1;
+
+ SwBoxAutoFmt* aBoxAutoFmt[ 16 ];
+
+public:
+ SwTableAutoFmt( const String& rName );
+ SwTableAutoFmt( const SwTableAutoFmt& rNew );
+ ~SwTableAutoFmt();
+
+ SwTableAutoFmt& operator=( const SwTableAutoFmt& rNew );
+
+ void SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos );
+ const SwBoxAutoFmt& GetBoxFmt( BYTE nPos ) const;
+
+ void SetName( const String& rNew ) { aName = rNew; nStrResId = USHRT_MAX; }
+ const String& GetName() const { return aName; }
+
+ enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
+ SwBoxAutoFmt& UpdateFromSet( BYTE nPos, const SfxItemSet& rSet,
+ UpdateFlags eFlags, SvNumberFormatter* );
+ void UpdateToSet( BYTE nPos, SfxItemSet& rSet, UpdateFlags eFlags,
+ SvNumberFormatter* ) const ;
+
+ BOOL IsFont() const { return bInclFont; }
+ BOOL IsJustify() const { return bInclJustify; }
+ BOOL IsFrame() const { return bInclFrame; }
+ BOOL IsBackground() const { return bInclBackground; }
+ BOOL IsValueFormat() const { return bInclValueFormat; }
+
+ void SetFont( const BOOL bNew ) { bInclFont = bNew; }
+ void SetJustify( const BOOL bNew ) { bInclJustify = bNew; }
+ void SetFrame( const BOOL bNew ) { bInclFrame = bNew; }
+ void SetBackground( const BOOL bNew ) { bInclBackground = bNew; }
+ void SetValueFormat( const BOOL bNew ) { bInclValueFormat = bNew; }
+ void SetWidthHeight( const BOOL bNew ) { bInclWidthHeight = bNew; }
+
+ BOOL Load( SvStream& rStream, const SwAfVersions& );
+ BOOL Save( SvStream& rStream ) const;
+
+#ifdef READ_OLDVERS
+ // lade alte Version
+ BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+#endif
+};
+
+typedef SwTableAutoFmt* SwTableAutoFmtPtr ;
+SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 )
+
+class SW_DLLPUBLIC SwTableAutoFmtTbl : public _SwTableAutoFmtTbl
+{
+ SW_DLLPRIVATE BOOL Load( SvStream& rStream );
+ SW_DLLPRIVATE BOOL Save( SvStream& rStream ) const;
+
+public:
+ SwTableAutoFmtTbl();
+
+ BOOL Load();
+ BOOL Save() const;
+};
+
+#endif
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
new file mode 100644
index 000000000000..577b67deedfa
--- /dev/null
+++ b/sw/inc/tblenum.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tblenum.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TBLENUM_HXX
+#define _TBLENUM_HXX
+
+//fuers aendern der Tabellen/Spalten/Zeilen Breiten/Hoehen
+typedef USHORT TblChgWidthHeightType;
+
+namespace nsTblChgWidthHeightType
+{
+ const TblChgWidthHeightType WH_COL_LEFT = 0;
+ const TblChgWidthHeightType WH_COL_RIGHT = 1;
+ const TblChgWidthHeightType WH_ROW_TOP = 2;
+ const TblChgWidthHeightType WH_ROW_BOTTOM = 3;
+ const TblChgWidthHeightType WH_CELL_LEFT = 4;
+ const TblChgWidthHeightType WH_CELL_RIGHT = 5;
+ const TblChgWidthHeightType WH_CELL_TOP = 6;
+ const TblChgWidthHeightType WH_CELL_BOTTOM = 7;
+
+
+ // folgende koennen hinein verodert werden
+ const TblChgWidthHeightType WH_FLAG_INSDEL = 0x4000; // Insert/Del-Modus: das Bigger-Flag
+ // besagt was passiert:
+ // bBigger -> Box wird entfernt
+ // !bBigger-> Box wird eingefuegt
+ const TblChgWidthHeightType WH_FLAG_BIGGER = 0x8000; // Box wird groesser -> sonst kleiner
+}
+
+enum TblChgMode
+{
+ TBLFIX_CHGABS, // Tabelle feste Breite, den Nachbar andern
+ TBLFIX_CHGPROP, // Tabelle feste Breite, alle Nachbarn aendern
+ TBLVAR_CHGABS // Tabelle variable, alle Nachbarn aendern
+};
+
+
+enum SplitTbl_HeadlineOption
+{
+ HEADLINE_NONE = 0, // lasse alles wie es ist
+ HEADLINE_BORDERCOPY, // von der davor obere Line der vorhergehen Line
+ HEADLINE_CNTNTCOPY, // kopiere die 1. Line komplett mit Inhalt
+ HEADLINE_BOXATTRCOPY, // kopiere von der 1. Line die Box Attribute
+ HEADLINE_BOXATRCOLLCOPY // kopiere von der 1. Line die Box Attribute
+ // und die Absatzvorlagen
+};
+
+enum TableMergeErr
+{
+ TBLMERGE_OK,
+ TBLMERGE_NOSELECTION,
+ TBLMERGE_TOOCOMPLEX
+};
+
+
+#endif
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
new file mode 100644
index 000000000000..d87768664fe5
--- /dev/null
+++ b/sw/inc/tblsel.hxx
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tblsel.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TBLSEL_HXX
+#define _TBLSEL_HXX
+
+#include <svtools/svarray.hxx>
+#include <swtable.hxx>
+#include <swrect.hxx>
+#include "swdllapi.h"
+
+class SwCrsrShell;
+class SwCursor;
+class SwTableCursor;
+class SwFrm;
+class SwTabFrm;
+class SwTableBox;
+class SwTableLine;
+class SwLayoutFrm;
+class SwPaM;
+class SwNode;
+class SwTable;
+class SwUndoTblMerge;
+class SwCellFrm;
+
+SV_DECL_PTRARR( SwCellFrms, SwCellFrm*, 16, 16 )
+SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 )
+
+
+//Sucht alle Boxen zusammen, die in der Tabelle selektiert sind.
+//Je nach enum-Parameter wird die Selektion in der angegebenen Richtung
+//erweitert.
+//Die Boxen werden ueber das Layout zusammengsucht, es wird auch bei
+//aufgespaltenen Tabellen korrekt gearbeitet (siehe: MakeSelUnions()).
+typedef USHORT SwTblSearchType;
+namespace nsSwTblSearchType
+{
+ const SwTblSearchType TBLSEARCH_NONE = 0x1; // keine Erweiterung
+ const SwTblSearchType TBLSEARCH_ROW = 0x2; // erweiter auf Zeilen
+ const SwTblSearchType TBLSEARCH_COL = 0x3; // erweiter auf Spalten
+
+ // als Flag zu den anderen Werten!!
+ const SwTblSearchType TBLSEARCH_PROTECT = 0x8; // auch geschuetzte Boxen einsammeln
+ const SwTblSearchType TBLSEARCH_NO_UNION_CORRECT = 0x10; // die zusammenges. Union nicht korrigieren
+}
+
+SW_DLLPUBLIC void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+//wie vor, jedoch wird nicht von der Selektion sondern von den
+//Start- EndFrms ausgegangen.
+void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
+ SwSelBoxes& rBoxes, SwCellFrms* pCells,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+// Desgleichen nocheinmal direkt per PaM's
+void GetTblSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes );
+void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes );
+
+// suche fuer eine AutoSumme die beteiligten Boxen zusammen
+BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+
+// check if the SelBoxes contains protected Boxes
+BOOL HasProtectedCells( const SwSelBoxes& rBoxes );
+
+// teste, ob die Selektion ausgeglichen ist
+SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16, 16)
+SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25, 50)
+
+BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
+ SwChartLines* pGetCLines = 0 );
+
+// teste ob die Celle in die SSelection gehoert
+// (wurde eine Funktion, damit GetTblSel() und MakeTblCrsr() immer
+// das "gleiche Verstaendnis" fuer die Selektion haben)
+BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell );
+
+// bestimme die Boxen, die zusammen gefasst werden sollen.
+// Dabei wird auf Layout Basis das Rechteck "angepasst". D.H. es
+// werden Boxen zugefuegt wenn welche an den Seiten ueberlappen
+// Zusaetzlich wird die neue Box erzeugt und mit dem entsprechenden
+// Inhalt gefuellt.
+void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
+ SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo = 0 );
+
+// teste ob die selektierten Boxen ein gueltiges Merge erlauben
+USHORT CheckMergeSel( const SwPaM& rPam );
+USHORT CheckMergeSel( const SwSelBoxes& rBoxes );
+
+BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
+
+// teste ob ein Split oder InsertCol dazu fuehrt, das eine Box
+// kleiner als MINLAY wird.
+BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+//Fuer das Arbeiten auf TabSelektion auch fuer aufgespaltene Tabellen.
+class SwSelUnion
+{
+ SwRect aUnion; //Das die Sel umschliessende Rechteck.
+ SwTabFrm *pTable; //Die (Follow-)Table zu der Union.
+
+public:
+ SwSelUnion( const SwRect &rRect, SwTabFrm *pTab ) :
+ aUnion( rRect ), pTable( pTab ) {}
+
+ const SwRect& GetUnion() const { return aUnion; }
+ SwRect& GetUnion() { return aUnion; }
+ const SwTabFrm *GetTable() const { return pTable; }
+ SwTabFrm *GetTable() { return pTable; }
+};
+
+SV_DECL_PTRARR_DEL( SwSelUnions, SwSelUnion*, 10, 20 )
+
+//Ermittelt die von einer Tabellenselektion betroffenen Tabellen und die
+//Union-Rechteckte der Selektionen - auch fuer aufgespaltene Tabellen.
+//Wenn ein Parameter != nsSwTblSearchType::TBLSEARCH_NONE uebergeben wird, so wird die
+//Selektion in der angegebenen Richtung erweitert.
+void MakeSelUnions( SwSelUnions&, const SwLayoutFrm *pStart,
+ const SwLayoutFrm *pEnd,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+
+// -------------------------------------------------------------------
+// Diese Klassen kopieren die aktuelle Tabellen-Selektion (rBoxes)
+// unter Beibehaltung der Tabellen-Strubktur in eine eigene Struktur
+
+class _FndBox;
+class _FndLine;
+
+SV_DECL_PTRARR_DEL( _FndBoxes, _FndBox*, 10, 20 )
+SV_DECL_PTRARR_DEL( _FndLines, _FndLine*,10, 20 )
+
+class _FndBox
+{
+ SwTableBox* pBox;
+ _FndLines aLines;
+ _FndLine* pUpper;
+
+ SwTableLine *pLineBefore; //Zum Loeschen/Restaurieren des Layouts.
+ SwTableLine *pLineBehind;
+
+public:
+ _FndBox( SwTableBox* pB, _FndLine* pFL ) :
+ pBox(pB), pUpper(pFL), pLineBefore( 0 ), pLineBehind( 0 ) {}
+
+ const _FndLines& GetLines() const { return aLines; }
+ _FndLines& GetLines() { return aLines; }
+ const SwTableBox* GetBox() const { return pBox; }
+ SwTableBox* GetBox() { return pBox; }
+ const _FndLine* GetUpper() const { return pUpper; }
+ _FndLine* GetUpper() { return pUpper; }
+
+ void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable );
+ void SetTableLines( const SwTable &rTable );
+ void DelFrms ( SwTable &rTable );
+ void MakeFrms( SwTable &rTable );
+ void MakeNewFrms( SwTable &rTable, const USHORT nNumber,
+ const BOOL bBehind );
+ BOOL AreLinesToRestore( const SwTable &rTable ) const;
+
+ void ClearLineBehind() { pLineBehind = 0; }
+};
+
+
+class _FndLine
+{
+ SwTableLine* pLine;
+ _FndBoxes aBoxes;
+ _FndBox* pUpper;
+public:
+ _FndLine(SwTableLine* pL, _FndBox* pFB=0) : pLine(pL), pUpper(pFB) {}
+ const _FndBoxes& GetBoxes() const { return aBoxes; }
+ _FndBoxes& GetBoxes() { return aBoxes; }
+ const SwTableLine* GetLine() const { return pLine; }
+ SwTableLine* GetLine() { return pLine; }
+ const _FndBox* GetUpper() const { return pUpper; }
+ _FndBox* GetUpper() { return pUpper; }
+
+ void SetUpper( _FndBox* pUp ) { pUpper = pUp; }
+};
+
+
+struct _FndPara
+{
+ const SwSelBoxes& rBoxes;
+ _FndLine* pFndLine;
+ _FndBox* pFndBox;
+
+ _FndPara( const SwSelBoxes& rBxs, _FndBox* pFB )
+ : rBoxes(rBxs), pFndLine(0), pFndBox(pFB) {}
+ _FndPara( const _FndPara& rPara, _FndBox* pFB )
+ : rBoxes(rPara.rBoxes), pFndLine(rPara.pFndLine), pFndBox(pFB) {}
+ _FndPara( const _FndPara& rPara, _FndLine* pFL )
+ : rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {}
+};
+
+BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
+SW_DLLPUBLIC BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
+
+
+#endif // _TBLSEL_HXX
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
new file mode 100644
index 000000000000..c502454efcea
--- /dev/null
+++ b/sw/inc/tgrditem.hxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tgrditem.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_TGRDITEM_HXX
+#define SW_TGRDITEM_HXX
+
+#include <tools/color.hxx>
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS };
+
+class SW_DLLPUBLIC SwTextGridItem : public SfxPoolItem
+{
+ Color aColor;
+ sal_uInt16 nLines;
+ sal_uInt16 nBaseHeight, nRubyHeight;
+ SwTextGrid eGridType;
+ BOOL bRubyTextBelow;
+ BOOL bPrintGrid;
+ BOOL bDisplayGrid;
+
+ //for textgrid enhancement
+ sal_uInt16 nBaseWidth;
+ BOOL bSnapToChars;
+ BOOL bSquaredMode;
+public:
+ SwTextGridItem();
+ virtual ~SwTextGridItem();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ SwTextGridItem& operator=( const SwTextGridItem& );
+
+ const Color& GetColor() const { return aColor; }
+ void SetColor( const Color& rCol ) { aColor = rCol; }
+
+ sal_uInt16 GetLines() const { return nLines; }
+ void SetLines( sal_uInt16 nNew ) { nLines = nNew; }
+
+ sal_uInt16 GetBaseHeight() const { return nBaseHeight; }
+ void SetBaseHeight( sal_uInt16 nNew ) { nBaseHeight = nNew; }
+
+ sal_uInt16 GetRubyHeight() const { return nRubyHeight; }
+ void SetRubyHeight( sal_uInt16 nNew ) { nRubyHeight = nNew; }
+
+ SwTextGrid GetGridType() const { return eGridType; }
+ void SetGridType( SwTextGrid eNew ) { eGridType = eNew; }
+
+ BOOL IsRubyTextBelow() const { return bRubyTextBelow; }
+ BOOL GetRubyTextBelow() const { return bRubyTextBelow; }
+ void SetRubyTextBelow( BOOL bNew ) { bRubyTextBelow = bNew; }
+
+ BOOL IsPrintGrid() const { return bPrintGrid; }
+ BOOL GetPrintGrid() const { return bPrintGrid; }
+ void SetPrintGrid( BOOL bNew ) { bPrintGrid = bNew; }
+
+ BOOL IsDisplayGrid() const { return bDisplayGrid; }
+ BOOL GetDisplayGrid() const { return bDisplayGrid; }
+ void SetDisplayGrid( BOOL bNew ) { bDisplayGrid = bNew; }
+
+ //for textgrid enhancement
+ sal_uInt16 GetBaseWidth() const { return nBaseWidth;}
+ void SetBaseWidth( sal_uInt16 nNew ) { nBaseWidth = nNew; }
+
+ BOOL IsSnapToChars() const { return bSnapToChars; }
+ BOOL GetSnapToChars() const { return bSnapToChars; }
+ void SetSnapToChars( BOOL bNew ) { bSnapToChars = bNew; }
+
+ BOOL IsSquaredMode() const { return bSquaredMode; }
+ BOOL GetSquaredMode() const { return bSquaredMode; }
+ void SetSquaredMode( BOOL bNew ) { bSquaredMode = bNew; }
+ void SwitchPaperMode(BOOL bNew );
+
+ void Init();
+};
+
+inline const SwTextGridItem &SwAttrSet::GetTextGrid(BOOL bInP) const
+ { return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); }
+inline const SwTextGridItem &SwFmt::GetTextGrid(BOOL bInP) const
+ { return (const SwTextGridItem&)aSet.Get( RES_TEXTGRID, bInP ); }
+
+#endif
+
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
new file mode 100644
index 000000000000..9223ffa2d9df
--- /dev/null
+++ b/sw/inc/tox.hxx
@@ -0,0 +1,772 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tox.hxx,v $
+ * $Revision: 1.20 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TOX_HXX
+#define _TOX_HXX
+
+#include <i18npool/lang.h>
+#include <tools/string.hxx>
+
+#include <svx/svxenum.hxx>
+#include <svtools/svarray.hxx>
+#include <svtools/poolitem.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <toxe.hxx>
+#include <calbck.hxx>
+#include <errhdl.hxx>
+
+#ifndef INCLUDED_VECTOR
+#include <vector> // #i21237#
+#define INCLUDED_VECTOR
+#endif
+
+class SwTOXType;
+class SwTOXMark;
+class SwTxtTOXMark;
+class SwDoc;
+
+SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10)
+
+/*--------------------------------------------------------------------
+ Description: Entry of content index, alphabetical index or user defined index
+ --------------------------------------------------------------------*/
+
+#define IVER_TOXMARK_STRPOOL ((USHORT)1)
+#define IVER_TOXMARK_NEWTOX ((USHORT)2)
+
+class SW_DLLPUBLIC SwTOXMark : public SfxPoolItem, public SwClient
+{
+ friend void _InitCore();
+ friend class SwTxtTOXMark;
+
+ String aAltText; // Der Text des Eintrages ist unterschiedlich
+ String aPrimaryKey, aSecondaryKey;
+
+ // three more strings for phonetic sorting
+ String aTextReading;
+ String aPrimaryKeyReading;
+ String aSecondaryKeyReading;
+
+ SwTxtTOXMark* pTxtAttr;
+
+ USHORT nLevel;
+ BOOL bAutoGenerated : 1; // generated using a concordance file
+ BOOL bMainEntry : 1; // main entry emphasized by character style
+
+
+ SwTOXMark(); // to create the dflt. atr. in _InitCore
+
+public:
+ TYPEINFO(); // rtti
+
+ // single argument ctors shall be explicit.
+ explicit SwTOXMark( const SwTOXType* pTyp );
+ virtual ~SwTOXMark();
+
+ SwTOXMark( const SwTOXMark& rCopy );
+ SwTOXMark& operator=( const SwTOXMark& rCopy );
+
+ // "pure virtual methods" of SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ String GetText() const;
+
+ inline BOOL IsAlternativeText() const;
+ inline const String& GetAlternativeText() const;
+
+ inline void SetAlternativeText( const String& rAlt );
+
+ // content or user defined index
+ inline void SetLevel(USHORT nLevel);
+ inline USHORT GetLevel() const;
+
+ // for alphabetical index only
+ inline void SetPrimaryKey(const String& rStr );
+ inline void SetSecondaryKey(const String& rStr);
+ inline void SetTextReading(const String& rStr);
+ inline void SetPrimaryKeyReading(const String& rStr );
+ inline void SetSecondaryKeyReading(const String& rStr);
+
+ inline const String& GetPrimaryKey() const;
+ inline const String& GetSecondaryKey() const;
+ inline const String& GetTextReading() const;
+ inline const String& GetPrimaryKeyReading() const;
+ inline const String& GetSecondaryKeyReading() const;
+
+ BOOL IsAutoGenerated() const {return bAutoGenerated;}
+ void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;}
+
+ BOOL IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(BOOL bSet) { bMainEntry = bSet;}
+
+ inline const SwTOXType* GetTOXType() const;
+
+ const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; }
+ SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; }
+};
+
+/*--------------------------------------------------------------------
+ Description: index types
+ --------------------------------------------------------------------*/
+
+class SwTOXType : public SwModify
+{
+public:
+ SwTOXType(TOXTypes eTyp, const String& aName);
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwTOXType(const SwTOXType& rCopy);
+
+ inline const String& GetTypeName() const;
+ inline TOXTypes GetType() const;
+
+private:
+ String aName;
+ TOXTypes eType;
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwTOXType & operator= (const SwTOXType &);
+};
+
+/*--------------------------------------------------------------------
+ Description: Structure of the index lines
+ --------------------------------------------------------------------*/
+
+#define FORM_TITLE 0
+#define FORM_ALPHA_DELIMITTER 1
+#define FORM_PRIMARY_KEY 2
+#define FORM_SECONDARY_KEY 3
+#define FORM_ENTRY 4
+
+/*
+ Pattern structure
+
+ <E#> - entry number <E# CharStyleName,PoolId>
+ <ET> - entry text <ET CharStyleName,PoolId>
+ <E> - entry text and number <E CharStyleName,PoolId>
+ <T> - tab stop <T,,Position,Adjust>
+ <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId>
+ <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER>
+ <#> - Page number <# CharStyleName,PoolId>
+ <LS> - Link start <LS>
+ <LE> - Link end <LE>
+ <A00> - Authority entry field <A02 CharStyleName, PoolId>
+ */
+
+// These enum values are stored and must not be changed!
+enum FormTokenType
+{
+ TOKEN_ENTRY_NO,
+ TOKEN_ENTRY_TEXT,
+ TOKEN_ENTRY,
+ TOKEN_TAB_STOP,
+ TOKEN_TEXT,
+ TOKEN_PAGE_NUMS,
+ TOKEN_CHAPTER_INFO,
+ TOKEN_LINK_START,
+ TOKEN_LINK_END,
+ TOKEN_AUTHORITY,
+ TOKEN_END
+};
+
+struct SW_DLLPUBLIC SwFormToken
+{
+ String sText;
+ String sCharStyleName;
+ SwTwips nTabStopPosition;
+ FormTokenType eTokenType;
+ USHORT nPoolId;
+ SvxTabAdjust eTabAlign;
+ USHORT nChapterFormat; //SwChapterFormat;
+ USHORT nOutlineLevel;//the maximum permitted outline level in numbering
+ USHORT nAuthorityField; //enum ToxAuthorityField
+ sal_Unicode cTabFillChar;
+ sal_Bool bWithTab; // TRUE: do generate tab
+ // character only the tab stop
+ // #i21237#
+
+ SwFormToken(FormTokenType eType ) :
+ nTabStopPosition(0),
+ eTokenType(eType),
+ nPoolId(USHRT_MAX),
+ eTabAlign( SVX_TAB_ADJUST_LEFT ),
+ nChapterFormat(0 /*CF_NUMBER*/),
+ nOutlineLevel(MAXLEVEL), //default to maximum outline level
+ nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
+ cTabFillChar(' '),
+ bWithTab(sal_True) // #i21237#
+ {}
+
+ String GetString() const;
+};
+
+// -> #i21237#
+/**
+ Functor that is true when a given token has a certain token type.
+
+ @param _eType the type to check for
+ @param rToken the token to check
+
+ @retval TRUE the token has the given type
+ @retval FALSE else
+*/
+struct SwFormTokenEqualToFormTokenType
+{
+ FormTokenType eType;
+
+ SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {}
+ bool operator()(const SwFormToken & rToken)
+ {
+ return rToken.eTokenType == eType;
+ }
+};
+
+/**
+ Functor that appends the string representation of a given token to a string.
+
+ @param _rText string to append the string representation to
+ @param rToken token whose string representation is appended
+*/
+struct SwFormTokenToString
+{
+ String & rText;
+ SwFormTokenToString(String & _rText) : rText(_rText) {}
+ void operator()(const SwFormToken & rToken) { rText += rToken.GetString(); }
+};
+
+/// Vector of tokens.
+typedef std::vector<SwFormToken> SwFormTokens;
+
+/**
+ Helper class that converts vectors of tokens to strings and vice
+ versa.
+ */
+class SW_DLLPUBLIC SwFormTokensHelper
+{
+ /// the tokens
+ SwFormTokens aTokens;
+
+ /**
+ Builds a token from its string representation.
+
+ @sPattern the whole pattern
+ @nCurPatternPos starting position of the token
+
+ @return the token
+ */
+ SW_DLLPRIVATE SwFormToken BuildToken( const String & sPattern,
+ xub_StrLen & nCurPatternPos ) const;
+
+ /**
+ Returns the string of a token.
+
+ @param sPattern the whole pattern
+ @param nStt starting position of the token
+
+ @return the string representation of the token
+ */
+ SW_DLLPRIVATE String SearchNextToken( const String & sPattern,
+ xub_StrLen nStt ) const;
+
+ /**
+ Returns the type of a token.
+
+ @param sToken the string representation of the token
+ @param pTokenLen return parameter the length of the head of the token
+
+ If pTokenLen is non-NULL the length of the token's head is
+ written to *pTokenLen
+
+ @return the type of the token
+ */
+ SW_DLLPRIVATE FormTokenType GetTokenType(const String & sToken,
+ xub_StrLen * pTokenLen) const;
+
+public:
+ /**
+ contructor
+
+ @param rTokens vector of tokens
+ */
+ SwFormTokensHelper(const SwFormTokens & rTokens) : aTokens(rTokens) {}
+
+ /**
+ constructor
+
+ @param rStr string representation of the tokens
+ */
+ SwFormTokensHelper(const String & rStr);
+
+ /**
+ Returns vector of tokens.
+
+ @return vector of tokens
+ */
+ const SwFormTokens & GetTokens() const { return aTokens; }
+};
+// <- #i21237#
+
+class SW_DLLPUBLIC SwForm
+{
+ SwFormTokens aPattern[ AUTH_TYPE_END + 1 ]; // #i21237#
+ String aTemplate[ AUTH_TYPE_END + 1 ];
+
+ TOXTypes eType;
+ USHORT nFormMaxLevel;
+
+ //USHORT nFirstTabPos; -> Value in tab token
+// BOOL bHasFirstTabPos : 1;
+ BOOL bGenerateTabPos : 1;
+ BOOL bIsRelTabPos : 1;
+ BOOL bCommaSeparated : 1;
+
+public:
+ SwForm( TOXTypes eTOXType = TOX_CONTENT );
+ SwForm( const SwForm& rForm );
+
+ SwForm& operator=( const SwForm& rForm );
+
+ inline void SetTemplate(USHORT nLevel, const String& rName);
+ inline const String& GetTemplate(USHORT nLevel) const;
+
+ // #i21237#
+ void SetPattern(USHORT nLevel, const SwFormTokens& rName);
+ void SetPattern(USHORT nLevel, const String& rStr);
+ const SwFormTokens& GetPattern(USHORT nLevel) const;
+
+ // fill tab stop positions from template to pattern
+ // #i21237#
+ void AdjustTabStops(SwDoc& rDoc,
+ BOOL bInsertNewTabStops = FALSE);
+
+ inline TOXTypes GetTOXType() const;
+ inline USHORT GetFormMax() const;
+
+ BOOL IsRelTabPos() const { return bIsRelTabPos; }
+ void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; }
+
+ BOOL IsCommaSeparated() const { return bCommaSeparated;}
+ void SetCommaSeparated( BOOL b) { bCommaSeparated = b;}
+
+ static USHORT GetFormMaxLevel( TOXTypes eType );
+
+ static const sal_Char* aFormEntry; // <E>
+ static BYTE nFormEntryLen; // 3 characters
+ static const sal_Char* aFormTab; // <T>
+ static BYTE nFormTabLen; // 3 characters
+ static const sal_Char* aFormPageNums; // <P>
+ static BYTE nFormPageNumsLen; // 3 characters
+ static const sal_Char* aFormLinkStt; // <LS>
+ static BYTE nFormLinkSttLen; // 4 characters
+ static const sal_Char* aFormLinkEnd; // <LE>
+ static BYTE nFormLinkEndLen; // 4 characters
+ static const sal_Char* aFormEntryNum; // <E#>
+ static BYTE nFormEntryNumLen; // 4 characters
+ static const sal_Char* aFormEntryTxt; // <ET>
+ static BYTE nFormEntryTxtLen; // 4 characters
+ static const sal_Char* aFormChapterMark; // <C>
+ static BYTE nFormChapterMarkLen; // 3 characters
+ static const sal_Char* aFormText; // <TX>
+ static BYTE nFormTextLen; // 4 characters
+ static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value
+ static BYTE nFormAuthLen; // 3 characters
+};
+
+/*--------------------------------------------------------------------
+ Description: Content to create indexes of
+ --------------------------------------------------------------------*/
+
+typedef USHORT SwTOXElement;
+namespace nsSwTOXElement
+{
+ const SwTOXElement TOX_MARK = 1;
+ const SwTOXElement TOX_OUTLINELEVEL = 2;
+ const SwTOXElement TOX_TEMPLATE = 4;
+ const SwTOXElement TOX_OLE = 8;
+ const SwTOXElement TOX_TABLE = 16;
+ const SwTOXElement TOX_GRAPHIC = 32;
+ const SwTOXElement TOX_FRAME = 64;
+ const SwTOXElement TOX_SEQUENCE = 128;
+}
+
+typedef USHORT SwTOIOptions;
+namespace nsSwTOIOptions
+{
+ const SwTOIOptions TOI_SAME_ENTRY = 1;
+ const SwTOIOptions TOI_FF = 2;
+ const SwTOIOptions TOI_CASE_SENSITIVE = 4;
+ const SwTOIOptions TOI_KEY_AS_ENTRY = 8;
+ const SwTOIOptions TOI_ALPHA_DELIMITTER = 16;
+ const SwTOIOptions TOI_DASH = 32;
+ const SwTOIOptions TOI_INITIAL_CAPS = 64;
+}
+
+//which part of the caption is to be displayed
+enum SwCaptionDisplay
+{
+ CAPTION_COMPLETE,
+ CAPTION_NUMBER,
+ CAPTION_TEXT
+};
+
+typedef USHORT SwTOOElements;
+namespace nsSwTOOElements
+{
+ const SwTOOElements TOO_MATH = 0x01;
+ const SwTOOElements TOO_CHART = 0x02;
+ const SwTOOElements TOO_CALC = 0x08;
+ const SwTOOElements TOO_DRAW_IMPRESS = 0x10;
+// const SwTOOElements TOO_IMPRESS = 0x20;
+ const SwTOOElements TOO_OTHER = 0x80;
+}
+
+#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char
+
+/*--------------------------------------------------------------------
+ Description: Class for all indexes
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwTOXBase : public SwClient
+{
+ SwForm aForm; // description of the lines
+ String aName; // unique name
+ String aTitle; // title
+
+ String sMainEntryCharStyle; // name of the character style applied to main index entries
+
+ String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER
+ String sSequenceName; // FieldTypeName of a caption sequence
+
+ LanguageType eLanguage;
+ String sSortAlgorithm;
+
+ union {
+ USHORT nLevel; // consider outline levels
+ USHORT nOptions; // options of alphabetical index
+ } aData;
+
+ USHORT nCreateType; // sources to create the index from
+ USHORT nOLEOptions; // OLE sources
+ SwCaptionDisplay eCaptionDisplay; //
+ BOOL bProtected : 1; // index protected ?
+ BOOL bFromChapter : 1; // create from chapter or document
+ BOOL bFromObjectNames : 1; // create a table or object index
+ // from the names rather than the caption
+ BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter
+public:
+ SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
+ USHORT nCreaType, const String& rTitle );
+ SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
+ virtual ~SwTOXBase();
+
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
+ // If not, so create it an copy all other used things. The return is this
+ SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& );
+
+ const SwTOXType* GetTOXType() const; //
+
+ USHORT GetCreateType() const; // creation types
+
+ const String& GetTOXName() const {return aName;}
+ void SetTOXName(const String& rSet) {aName = rSet;}
+
+ const String& GetTitle() const; // Title
+ const String& GetTypeName() const; // Name
+ const SwForm& GetTOXForm() const; // description of the lines
+
+ void SetCreate(USHORT);
+ void SetTitle(const String& rTitle);
+ void SetTOXForm(const SwForm& rForm);
+
+ TOXTypes GetType() const;
+
+ const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
+ void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
+
+ // content index only
+ inline void SetLevel(USHORT); // consider outline level
+ inline USHORT GetLevel() const;
+
+ // alphabetical index only
+ inline USHORT GetOptions() const; // alphabetical index options
+ inline void SetOptions(USHORT nOpt);
+
+ // index of objects
+ USHORT GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+
+ // index of objects
+
+ // user defined index only
+ inline void SetTemplateName(const String& rName); // Absatzlayout beachten
+
+ const String& GetStyleNames(USHORT nLevel) const
+ {
+ DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
+ return aStyleNames[nLevel];
+ }
+ void SetStyleNames(const String& rSet, USHORT nLevel)
+ {
+ DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
+ aStyleNames[nLevel] = rSet;
+ }
+ BOOL IsFromChapter() const { return bFromChapter;}
+ void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
+
+ BOOL IsFromObjectNames() const {return bFromObjectNames;}
+ void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;}
+
+ BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+
+ BOOL IsProtected() const { return bProtected; }
+ void SetProtected(BOOL bSet) { bProtected = bSet; }
+
+ const String& GetSequenceName() const {return sSequenceName;}
+ void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
+
+ SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
+ void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
+
+ BOOL IsTOXBaseInReadonly() const;
+
+ const SfxItemSet* GetAttrSet() const;
+ void SetAttrSet( const SfxItemSet& );
+
+ LanguageType GetLanguage() const {return eLanguage;}
+ void SetLanguage(LanguageType nLang) {eLanguage = nLang;}
+
+ const String& GetSortAlgorithm()const {return sSortAlgorithm;}
+ void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;}
+ // #i21237#
+ void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop);
+ SwTOXBase& operator=(const SwTOXBase& rSource);
+};
+
+
+/*--------------------------------------------------------------------
+ Description: Inlines
+ --------------------------------------------------------------------*/
+
+//
+//SwTOXMark
+//
+inline const String& SwTOXMark::GetAlternativeText() const
+ { return aAltText; }
+
+inline const SwTOXType* SwTOXMark::GetTOXType() const
+ { return (SwTOXType*)GetRegisteredIn(); }
+
+inline BOOL SwTOXMark::IsAlternativeText() const
+ { return aAltText.Len() > 0; }
+
+inline void SwTOXMark::SetAlternativeText(const String& rAlt)
+{
+ aAltText = rAlt;
+}
+
+inline void SwTOXMark::SetLevel( USHORT nLvl )
+{
+ ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ nLevel = nLvl;
+}
+
+inline void SwTOXMark::SetPrimaryKey( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aPrimaryKey = rKey;
+}
+
+inline void SwTOXMark::SetSecondaryKey( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aSecondaryKey = rKey;
+}
+
+inline void SwTOXMark::SetTextReading( const String& rTxt )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aTextReading = rTxt;
+}
+
+inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aPrimaryKeyReading = rKey;
+}
+
+inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aSecondaryKeyReading = rKey;
+}
+
+inline USHORT SwTOXMark::GetLevel() const
+{
+ ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ return nLevel;
+}
+
+inline const String& SwTOXMark::GetPrimaryKey() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aPrimaryKey;
+}
+
+inline const String& SwTOXMark::GetSecondaryKey() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aSecondaryKey;
+}
+
+inline const String& SwTOXMark::GetTextReading() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aTextReading;
+}
+
+inline const String& SwTOXMark::GetPrimaryKeyReading() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aPrimaryKeyReading;
+}
+
+inline const String& SwTOXMark::GetSecondaryKeyReading() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aSecondaryKeyReading;
+}
+
+//
+//SwForm
+//
+inline void SwForm::SetTemplate(USHORT nLevel, const String& rTemplate)
+{
+ ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ aTemplate[nLevel] = rTemplate;
+}
+
+inline const String& SwForm::GetTemplate(USHORT nLevel) const
+{
+ ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ return aTemplate[nLevel];
+}
+
+inline TOXTypes SwForm::GetTOXType() const
+{
+ return eType;
+}
+
+inline USHORT SwForm::GetFormMax() const
+{
+ return nFormMaxLevel;
+}
+
+
+//
+//SwTOXType
+//
+inline const String& SwTOXType::GetTypeName() const
+ { return aName; }
+
+inline TOXTypes SwTOXType::GetType() const
+ { return eType; }
+
+//
+// SwTOXBase
+//
+inline const SwTOXType* SwTOXBase::GetTOXType() const
+ { return (SwTOXType*)GetRegisteredIn(); }
+
+inline USHORT SwTOXBase::GetCreateType() const
+ { return nCreateType; }
+
+inline const String& SwTOXBase::GetTitle() const
+ { return aTitle; }
+
+inline const String& SwTOXBase::GetTypeName() const
+ { return GetTOXType()->GetTypeName(); }
+
+inline const SwForm& SwTOXBase::GetTOXForm() const
+ { return aForm; }
+
+inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop)
+{
+ aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
+}
+
+inline void SwTOXBase::SetCreate(USHORT nCreate)
+ { nCreateType = nCreate; }
+
+inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
+ { aForm = rForm; }
+
+inline TOXTypes SwTOXBase::GetType() const
+ { return GetTOXType()->GetType(); }
+
+inline void SwTOXBase::SetLevel(USHORT nLev)
+{
+ ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ aData.nLevel = nLev;
+}
+
+inline USHORT SwTOXBase::GetLevel() const
+{
+ ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ return aData.nLevel;
+}
+
+inline void SwTOXBase::SetTemplateName(const String& rName)
+{
+// ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp");
+// ASSERT(aData.pTemplateName, "pTemplateName == 0");
+// (*aData.pTemplateName) = rName;
+ DBG_WARNING("SwTOXBase::SetTemplateName obsolete");
+ aStyleNames[0] = rName;
+
+}
+
+inline USHORT SwTOXBase::GetOptions() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aData.nOptions;
+}
+
+inline void SwTOXBase::SetOptions(USHORT nOpt)
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aData.nOptions = nOpt;
+}
+
+
+#endif // _TOX_HXX
diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx
new file mode 100644
index 000000000000..03bf4ee59f1a
--- /dev/null
+++ b/sw/inc/toxe.hxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: toxe.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TOXE_HXX
+#define _TOXE_HXX
+
+enum SwTOXSearch
+{
+ TOX_NXT,
+ TOX_PRV,
+ TOX_SAME_NXT,
+ TOX_SAME_PRV
+};
+
+enum SwTOIKeyType
+{
+ TOI_PRIMARY,
+ TOI_SECONDARY
+};
+
+enum TOXTypes
+{
+ TOX_INDEX,
+ TOX_USER,
+ TOX_CONTENT,
+ TOX_ILLUSTRATIONS,
+ TOX_OBJECTS,
+ TOX_TABLES,
+ TOX_AUTHORITIES
+};
+// this enum contains all types of sources
+enum ToxAuthorityType
+{
+ //BiBTeX - fields
+ AUTH_TYPE_ARTICLE,
+ AUTH_TYPE_BOOK,
+ AUTH_TYPE_BOOKLET,
+ AUTH_TYPE_CONFERENCE,
+ AUTH_TYPE_INBOOK,
+ AUTH_TYPE_INCOLLECTION,
+ AUTH_TYPE_INPROCEEDINGS,
+ AUTH_TYPE_JOURNAL,
+ AUTH_TYPE_MANUAL,
+ AUTH_TYPE_MASTERSTHESIS,
+ AUTH_TYPE_MISC,
+ AUTH_TYPE_PHDTHESIS,
+ AUTH_TYPE_PROCEEDINGS,
+ AUTH_TYPE_TECHREPORT,
+ AUTH_TYPE_UNPUBLISHED,
+ //additional types
+ AUTH_TYPE_EMAIL,
+ AUTH_TYPE_WWW,
+ AUTH_TYPE_CUSTOM1,
+ AUTH_TYPE_CUSTOM2,
+ AUTH_TYPE_CUSTOM3,
+ AUTH_TYPE_CUSTOM4,
+ AUTH_TYPE_CUSTOM5,
+ AUTH_TYPE_END
+};
+
+//this enum contains the fields of an authority entry
+enum ToxAuthorityField
+{
+ AUTH_FIELD_IDENTIFIER,
+ AUTH_FIELD_AUTHORITY_TYPE, //ToxAuthorityType
+ //BibTex types
+ AUTH_FIELD_ADDRESS,
+ AUTH_FIELD_ANNOTE,
+ AUTH_FIELD_AUTHOR,
+ AUTH_FIELD_BOOKTITLE,
+ AUTH_FIELD_CHAPTER,
+ AUTH_FIELD_EDITION,
+ AUTH_FIELD_EDITOR,
+ AUTH_FIELD_HOWPUBLISHED,
+ AUTH_FIELD_INSTITUTION,
+ AUTH_FIELD_JOURNAL,
+// AUTH_FIELD_KEY, // BiBTeX - Field
+ AUTH_FIELD_MONTH,
+ AUTH_FIELD_NOTE,
+ AUTH_FIELD_NUMBER,
+ AUTH_FIELD_ORGANIZATIONS,
+ AUTH_FIELD_PAGES,
+ AUTH_FIELD_PUBLISHER,
+ AUTH_FIELD_SCHOOL,
+ AUTH_FIELD_SERIES,
+ AUTH_FIELD_TITLE,
+ AUTH_FIELD_REPORT_TYPE,
+ AUTH_FIELD_VOLUME,
+ AUTH_FIELD_YEAR,
+ //additional types
+ AUTH_FIELD_URL,
+ AUTH_FIELD_CUSTOM1,
+ AUTH_FIELD_CUSTOM2,
+ AUTH_FIELD_CUSTOM3,
+ AUTH_FIELD_CUSTOM4,
+ AUTH_FIELD_CUSTOM5,
+ AUTH_FIELD_ISBN,
+ AUTH_FIELD_END
+};
+
+
+#endif
diff --git a/sw/inc/toxinit.hxx b/sw/inc/toxinit.hxx
new file mode 100644
index 000000000000..aaa96ba8e872
--- /dev/null
+++ b/sw/inc/toxinit.hxx
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: toxinit.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TOXINIT_HXX
+#define _TOXINIT_HXX
+
+class UniString;
+
+void SetTOUTableStr(const UniString& rStr);
+void SetTOUGraphicStr(const UniString& rStr);
+void SetTOUOLEStr(const UniString& rStr);
+
+
+#endif // _TOXINIT_HXX
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
new file mode 100644
index 000000000000..605134dfbf9b
--- /dev/null
+++ b/sw/inc/toxwrap.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: toxwrap.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TOXWRAP_HXX
+#define _TOXWRAP_HXX
+
+#include <tools/solar.h>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <swunodef.hxx>
+#include "swdllapi.h"
+
+namespace com { namespace sun { namespace star {
+namespace i18n {
+ class XExtendedIndexEntrySupplier;
+}
+namespace lang {
+ class XMultiServiceFactory;
+}
+}}}
+
+
+class String;
+
+class SW_DLLPUBLIC IndexEntrySupplierWrapper
+{
+ STAR_NMSPC::lang::Locale aLcl;
+ STAR_NMSPC::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES;
+
+public:
+ IndexEntrySupplierWrapper();
+ ~IndexEntrySupplierWrapper();
+
+ void SetLocale( const STAR_NMSPC::lang::Locale& rLocale ) { aLcl = rLocale; }
+
+ String GetIndexKey( const String& rTxt, const String& rTxtReading,
+ const STAR_NMSPC::lang::Locale& rLocale ) const;
+
+ String GetFollowingText( BOOL bMorePages ) const;
+
+ STAR_NMSPC::uno::Sequence< ::rtl::OUString >
+ GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
+
+ sal_Bool LoadAlgorithm( const STAR_NMSPC::lang::Locale& rLcl,
+ const String& sSortAlgorithm, long nOptions ) const;
+
+ sal_Int16 CompareIndexEntry( const String& rTxt1, const String& rTxtReading1,
+ const STAR_NMSPC::lang::Locale& rLcl1,
+ const String& rTxt2, const String& rTxtReading2,
+ const STAR_NMSPC::lang::Locale& rLcl2 ) const;
+};
+
+#endif
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
new file mode 100644
index 000000000000..2a49460a05ca
--- /dev/null
+++ b/sw/inc/txatbase.hxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txatbase.hxx,v $
+ * $Revision: 1.22.210.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXATBASE_HXX
+#define _TXATBASE_HXX
+
+#include <tools/solar.h>
+#include <svtools/poolitem.hxx>
+#include <hintids.hxx>
+#include <errhdl.hxx>
+
+#include <boost/utility.hpp>
+
+
+class SfxItemPool;
+class SvXMLAttrContainerItem;
+class SwFmtRuby;
+class SwFmtCharFmt;
+class SwFmtAutoFmt;
+class SwFmtINetFmt;
+class SwFmtFld;
+class SwFmtFtn;
+class SwFmtFlyCnt;
+class SwTOXMark;
+class SwFmtRefMark;
+class SwFmtMeta;
+
+
+class SwTxtAttr : private boost::noncopyable
+{
+private:
+ SfxPoolItem * const m_pAttr;
+ xub_StrLen m_nStart;
+ bool m_bDontExpand : 1;
+ bool m_bLockExpandFlag : 1;
+
+ bool m_bDontMoveAttr : 1; // refmarks, toxmarks
+ bool m_bCharFmtAttr : 1; // charfmt, inet
+ bool m_bOverlapAllowedAttr : 1; // refmarks, toxmarks
+ bool m_bPriorityAttr : 1; // attribute has priority (redlining)
+ bool m_bDontExpandStart : 1; // don't expand start at paragraph start (ruby)
+ bool m_bNesting : 1; // SwTxtAttrNesting
+ bool m_bHasDummyChar : 1; // without end + meta
+
+protected:
+ SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtAttr();
+
+ void SetLockExpandFlag( bool bFlag ) { m_bLockExpandFlag = bFlag; }
+ void SetDontMoveAttr( bool bFlag ) { m_bDontMoveAttr = bFlag; }
+ void SetCharFmtAttr( bool bFlag ) { m_bCharFmtAttr = bFlag; }
+ void SetOverlapAllowedAttr( bool bFlag ){ m_bOverlapAllowedAttr = bFlag; }
+ void SetDontExpandStartAttr(bool bFlag) { m_bDontExpandStart = bFlag; }
+ void SetNesting(const bool bFlag) { m_bNesting = bFlag; }
+ void SetHasDummyChar(const bool bFlag) { m_bHasDummyChar = bFlag; }
+
+public:
+
+ /// destroy instance
+ static void Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool );
+
+ /// start position
+ xub_StrLen* GetStart() { return & m_nStart; }
+ const xub_StrLen* GetStart() const { return & m_nStart; }
+
+ /// end position
+ virtual xub_StrLen* GetEnd();
+ inline const xub_StrLen* GetEnd() const;
+ /// end (if available), else start
+ inline const xub_StrLen* GetAnyEnd() const;
+
+ inline void SetDontExpand( bool bDontExpand );
+ bool DontExpand() const { return m_bDontExpand; }
+ bool IsLockExpandFlag() const { return m_bLockExpandFlag; }
+ bool IsDontMoveAttr() const { return m_bDontMoveAttr; }
+ bool IsCharFmtAttr() const { return m_bCharFmtAttr; }
+ bool IsOverlapAllowedAttr() const { return m_bOverlapAllowedAttr; }
+ bool IsPriorityAttr() const { return m_bPriorityAttr; }
+ void SetPriorityAttr( bool bFlag ) { m_bPriorityAttr = bFlag; }
+ bool IsDontExpandStartAttr() const { return m_bDontExpandStart; }
+ bool IsNesting() const { return m_bNesting; }
+ bool HasDummyChar() const { return m_bHasDummyChar; }
+
+ inline const SfxPoolItem& GetAttr() const;
+ inline SfxPoolItem& GetAttr();
+ inline USHORT Which() const { return GetAttr().Which(); }
+
+ virtual int operator==( const SwTxtAttr& ) const;
+
+ inline const SwFmtCharFmt &GetCharFmt() const;
+ inline const SwFmtAutoFmt &GetAutoFmt() const;
+ inline const SwFmtFld &GetFld() const;
+ inline const SwFmtFtn &GetFtn() const;
+ inline const SwFmtFlyCnt &GetFlyCnt() const;
+ inline const SwTOXMark &GetTOXMark() const;
+ inline const SwFmtRefMark &GetRefMark() const;
+ inline const SwFmtINetFmt &GetINetFmt() const;
+ inline const SvXMLAttrContainerItem &GetXMLAttrContainer() const;
+ inline const SwFmtRuby &GetRuby() const;
+ inline const SwFmtMeta &GetMeta() const;
+
+};
+
+class SwTxtAttrEnd : public SwTxtAttr
+{
+protected:
+ xub_StrLen m_nEnd;
+
+public:
+ SwTxtAttrEnd( SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ using SwTxtAttr::GetEnd;
+ virtual xub_StrLen* GetEnd();
+};
+
+
+// --------------- Inline Implementierungen ------------------------
+
+inline const xub_StrLen* SwTxtAttr::GetEnd() const
+{
+ return const_cast<SwTxtAttr * >(this)->GetEnd();
+}
+
+inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const
+{
+ const xub_StrLen* pEnd = GetEnd();
+ return pEnd ? pEnd : GetStart();
+}
+
+inline const SfxPoolItem& SwTxtAttr::GetAttr() const
+{
+ ASSERT( m_pAttr, "SwTxtAttr: where is my attribute?" );
+ return *m_pAttr;
+}
+
+inline SfxPoolItem& SwTxtAttr::GetAttr()
+{
+ return const_cast<SfxPoolItem&>(
+ const_cast<const SwTxtAttr*>(this)->GetAttr());
+}
+
+inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
+{
+ if ( !m_bLockExpandFlag )
+ {
+ m_bDontExpand = bDontExpand;
+ }
+}
+
+//------------------------------------------------------------------------
+
+inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT,
+ "Wrong attribute" );
+ return (const SwFmtCharFmt&)(*m_pAttr);
+}
+
+inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT,
+ "Wrong attribute" );
+ return (const SwFmtAutoFmt&)(*m_pAttr);
+}
+
+inline const SwFmtFld& SwTxtAttr::GetFld() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
+ "Wrong attribute" );
+ return (const SwFmtFld&)(*m_pAttr);
+}
+
+inline const SwFmtFtn& SwTxtAttr::GetFtn() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" );
+ return (const SwFmtFtn&)(*m_pAttr);
+}
+
+inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT,
+ "Wrong attribute" );
+ return (const SwFmtFlyCnt&)(*m_pAttr);
+}
+
+inline const SwTOXMark& SwTxtAttr::GetTOXMark() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK,
+ "Wrong attribute" );
+ return (const SwTOXMark&)(*m_pAttr);
+}
+
+inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK,
+ "Wrong attribute" );
+ return (const SwFmtRefMark&)(*m_pAttr);
+}
+
+inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT,
+ "Wrong attribute" );
+ return (const SwFmtINetFmt&)(*m_pAttr);
+}
+
+inline const SvXMLAttrContainerItem& SwTxtAttr::GetXMLAttrContainer() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_UNKNOWNATR_CONTAINER,
+ "Wrong attribute" );
+ return (const SvXMLAttrContainerItem&)(*m_pAttr);
+}
+
+inline const SwFmtRuby& SwTxtAttr::GetRuby() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY,
+ "Wrong attribute" );
+ return (const SwFmtRuby&)(*m_pAttr);
+}
+
+inline const SwFmtMeta& SwTxtAttr::GetMeta() const
+{
+ ASSERT( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
+ m_pAttr->Which() == RES_TXTATR_METAFIELD),
+ "Wrong attribute" );
+ return (const SwFmtMeta&)(*m_pAttr);
+}
+
+#endif
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
new file mode 100644
index 000000000000..e50eb2dbda77
--- /dev/null
+++ b/sw/inc/txatritr.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txatritr.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXATRITR_HXX
+#define _TXATRITR_HXX
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include <svtools/svarray.hxx>
+#include <svx/langitem.hxx>
+#include <hintids.hxx>
+
+class String;
+class SwTxtNode;
+class SwTxtAttr;
+class SfxPoolItem;
+
+
+class SwScriptIterator
+{
+ const String& rText;
+ xub_StrLen nChgPos;
+ sal_uInt16 nCurScript;
+ sal_Bool bForward;
+
+public:
+ SwScriptIterator( const String& rStr, xub_StrLen nStart = 0,
+ sal_Bool bFrwrd = sal_True );
+
+ sal_Bool Next();
+
+ sal_uInt16 GetCurrScript() const { return nCurScript; }
+ xub_StrLen GetScriptChgPos() const { return nChgPos; }
+ const String& GetText() const { return rText; }
+};
+
+
+class SwTxtAttrIterator
+{
+ SwScriptIterator aSIter;
+ SvPtrarr aStack;
+ const SwTxtNode& rTxtNd;
+ const SfxPoolItem *pParaItem, *pCurItem;
+ xub_StrLen nChgPos;
+ sal_uInt16 nAttrPos, nWhichId;
+ sal_Bool bIsUseGetWhichOfScript;
+
+ void AddToStack( const SwTxtAttr& rAttr );
+ void SearchNextChg();
+
+public:
+ SwTxtAttrIterator( const SwTxtNode& rTxtNd, USHORT nWhichId,
+ xub_StrLen nStart = 0, sal_Bool bUseGetWhichOfScript = sal_True );
+
+ sal_Bool Next();
+
+ const SfxPoolItem& GetAttr() const { return *pCurItem; }
+ xub_StrLen GetChgPos() const { return nChgPos; }
+};
+
+
+class SwLanguageIterator : public SwTxtAttrIterator
+{
+public:
+ SwLanguageIterator( const SwTxtNode& rTxtNode, xub_StrLen nStart = 0,
+ USHORT nWhich = RES_CHRATR_LANGUAGE,
+ sal_Bool bUseGetWhichOfScript = sal_True )
+ : SwTxtAttrIterator( rTxtNode, nWhich, nStart, bUseGetWhichOfScript )
+ {}
+
+ sal_uInt16 GetLanguage() const
+ { return ((SvxLanguageItem&)GetAttr()).GetValue(); }
+};
+
+
+#endif
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
new file mode 100644
index 000000000000..92b51fede495
--- /dev/null
+++ b/sw/inc/txtatr.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtatr.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTATR_HXX
+#define _TXTATR_HXX
+
+#include <txatbase.hxx> // SwTxtAttr/SwTxtAttrEnd
+#include <calbck.hxx>
+
+
+class SwTxtNode; // fuer SwTxtFld
+class SwCharFmt;
+
+// ATT_CHARFMT *********************************************
+
+class SwTxtCharFmt : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ USHORT m_nSortNumber;
+
+public:
+ SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtCharFmt( );
+
+ // werden vom SwFmtCharFmt hierher weitergeleitet
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // get and set TxtNode pointer
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ void SetSortNumber( USHORT nSortNumber ) { m_nSortNumber = nSortNumber; }
+ USHORT GetSortNumber() const { return m_nSortNumber; }
+};
+
+
+// ATT_XMLCONTAINERITEM ******************************
+
+class SwTxtXMLAttrContainer : public SwTxtAttrEnd
+{
+public:
+ SwTxtXMLAttrContainer( SvXMLAttrContainerItem& rAttr,
+ xub_StrLen nStart, xub_StrLen nEnd );
+};
+
+// ******************************
+
+class SwTxtAttrNesting : public SwTxtAttrEnd
+{
+public:
+ SwTxtAttrNesting( SfxPoolItem & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtAttrNesting();
+};
+
+class SwTxtMeta : public SwTxtAttrNesting
+{
+private:
+ SwTxtNode * m_pTxtNode;
+
+public:
+ SwTxtMeta( SwFmtMeta & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtMeta();
+
+ void ChgTxtNode( SwTxtNode * const pNode ) { m_pTxtNode = pNode; }
+ SwTxtNode * GetTxtNode() const { return m_pTxtNode; }
+
+};
+
+
+// ******************************
+
+class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient
+{
+ SwTxtNode* m_pTxtNode;
+
+public:
+ SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtRuby();
+ TYPEINFO();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ /// get and set TxtNode pointer
+ const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ SwCharFmt* GetCharFmt();
+ const SwCharFmt* GetCharFmt() const
+ { return (const_cast<SwTxtRuby*>(this))->GetCharFmt(); }
+};
+
+// --------------- Inline Implementierungen ------------------------
+
+inline const SwTxtNode& SwTxtRuby::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx
new file mode 100644
index 000000000000..e88fbb55bee5
--- /dev/null
+++ b/sw/inc/txtflcnt.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtflcnt.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTFLCNT_HXX
+#define _TXTFLCNT_HXX
+
+#include <txatbase.hxx>
+
+class SwFlyInCntFrm;
+class SwFrm;
+class SwTxtNode;
+class SwDoc;
+
+// SWTXT_FLYCNT ********************************
+// Attribut fuer zeilengebundene Frames (ohne Endindex)
+
+class SwTxtFlyCnt : public SwTxtAttr
+{
+ SwFlyInCntFrm *_GetFlyFrm( const SwFrm *pCurrFrm );
+
+public:
+ SwTxtFlyCnt( SwFmtFlyCnt& rAttr, xub_StrLen nStart );
+
+ // Setzt den Anker im pFmt und
+ void SetAnchor( const SwTxtNode *pNode );
+
+ inline SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm );
+ inline const SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ) const;
+
+ // erzeugt sich ein neues FlyFrameFormat
+ void CopyFlyFmt( SwDoc* pDoc );
+};
+
+inline SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm )
+{
+ return _GetFlyFrm( pCurrFrm );
+}
+
+inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const
+{
+ return (const_cast<SwTxtFlyCnt*>(this))->_GetFlyFrm( pCurrFrm );
+}
+
+#endif
+
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
new file mode 100644
index 000000000000..84b1dc639f1b
--- /dev/null
+++ b/sw/inc/txtfld.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtfld.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTFLD_HXX
+#define _TXTFLD_HXX
+
+#include <txatbase.hxx>
+#include <tools/string.hxx>
+#include <pam.hxx>
+
+class SwTxtNode;
+
+// ATT_FLD ***********************************
+
+class SwTxtFld : public SwTxtAttr
+{
+ mutable String m_aExpand;
+ SwTxtNode * m_pTxtNode;
+
+public:
+ SwTxtFld( SwFmtFld& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtFld();
+
+ void CopyFld( SwTxtFld *pDest ) const;
+ void Expand() const;
+ inline void ExpandAlways();
+
+ // get and set TxtNode pointer
+ SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
+ inline SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+ // enable notification that field content has changed and needs reformatting
+ void NotifyContentChange(SwFmtFld& rFmtFld);
+
+ // #111840#
+ /**
+ Returns position of this field.
+
+ @return position of this field. Has to be deleted explicitly.
+ */
+// SwPosition * GetPosition() const;
+};
+
+inline SwTxtNode& SwTxtFld::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+inline void SwTxtFld::ExpandAlways()
+{
+ m_aExpand += ' ';
+ Expand();
+}
+
+#endif
+
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
new file mode 100644
index 000000000000..9eaa1926238e
--- /dev/null
+++ b/sw/inc/txtftn.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtftn.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTFTN_HXX
+#define _TXTFTN_HXX
+
+#include <txatbase.hxx>
+
+class SwNodeIndex;
+class SwTxtNode;
+class SwNodes;
+class SwDoc;
+
+// ATT_FTN **********************************************************
+
+class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
+{
+ SwNodeIndex * m_pStartNode;
+ SwTxtNode * m_pTxtNode;
+ USHORT m_nSeqNo;
+
+public:
+ SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtFtn();
+
+ inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
+ void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE );
+ void SetNumber( const USHORT nNumber, const String* = 0 );
+ void CopyFtn( SwTxtFtn *pDest ) const;
+
+ // get and set TxtNode pointer
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ // lege eine neue leere TextSection fuer diese Fussnote an
+ void MakeNewTextSection( SwNodes& rNodes );
+
+ // loesche die FtnFrame aus der Seite
+ void DelFrms();
+ // bedingten Absatzvorlagen checken
+ void CheckCondColl();
+
+ // fuer die Querverweise auf Fussnoten
+ USHORT SetSeqRefNo();
+ void SetSeqNo( USHORT n ) { m_nSeqNo = n; } // for Readers
+ USHORT GetSeqRefNo() const { return m_nSeqNo; }
+
+ static void SetUniqueSeqRefNo( SwDoc& rDoc );
+};
+
+inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
new file mode 100644
index 000000000000..5aa683277e14
--- /dev/null
+++ b/sw/inc/txtinet.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtinet.hxx,v $
+ * $Revision: 1.7.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTINET_HXX
+#define _TXTINET_HXX
+
+#include <txatbase.hxx>
+#include <txtatr.hxx>
+#include <calbck.hxx>
+
+class SwTxtNode;
+class SwCharFmt;
+
+// ATT_INETFMT *********************************************
+
+class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
+{
+ SwTxtNode * m_pTxtNode;
+ bool m_bVisited : 1; // visited link?
+ bool m_bVisitedValid : 1; // is m_bVisited valid?
+
+ // forbidden and not implemented.
+ SwTxtINetFmt();
+
+public:
+ SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtINetFmt();
+ TYPEINFO();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // get and set TxtNode pointer
+ const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ SwCharFmt* GetCharFmt();
+ const SwCharFmt* GetCharFmt() const
+ { return const_cast<SwTxtINetFmt*>(this)->GetCharFmt(); }
+
+ bool IsVisited() const { return m_bVisited; }
+ void SetVisited( bool bNew ) { m_bVisited = bNew; }
+
+ bool IsVisitedValid() const { return m_bVisitedValid; }
+ void SetVisitedValid( bool bNew ) { m_bVisitedValid = bNew; }
+
+ BOOL IsProtect() const;
+};
+
+inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
new file mode 100644
index 000000000000..73319fd6a209
--- /dev/null
+++ b/sw/inc/txtrfmrk.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtrfmrk.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTRFMRK_HXX
+#define _TXTRFMRK_HXX
+
+#include <txatbase.hxx>
+
+class SwTxtNode;
+
+// SWTXT_REFMARK *************************************
+// Attribut fuer Inhalts-/Positions-Referenzen im Text
+
+class SwTxtRefMark : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ xub_StrLen * m_pEnd; // end is optional (point reference)
+
+public:
+ SwTxtRefMark( SwFmtRefMark& rAttr,
+ xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+
+ virtual xub_StrLen * GetEnd(); // SwTxtAttr
+ inline const xub_StrLen * GetEnd() const { return m_pEnd; }
+
+ // get and set TxtNode pointer
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+};
+
+inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
new file mode 100644
index 000000000000..fe9e37775b17
--- /dev/null
+++ b/sw/inc/txttxmrk.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txttxmrk.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _TXTTXMRK_HXX
+#define _TXTTXMRK_HXX
+
+#include <txatbase.hxx>
+
+class SwTxtNode;
+class SwDoc;
+
+// SWTXT_TOXMARK *******************************
+// Attribut fuer die Verzeichnisse
+
+class SwTxtTOXMark : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ xub_StrLen * m_pEnd; // 0 if SwTOXMark without AlternativeText
+
+public:
+ SwTxtTOXMark( SwTOXMark& rAttr, xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+ virtual ~SwTxtTOXMark();
+
+ virtual xub_StrLen *GetEnd(); // SwTxtAttr
+ inline const xub_StrLen* GetEnd() const { return m_pEnd; }
+
+ void CopyTOXMark( SwDoc* pDestDoc );
+
+ // get and set TxtNode pointer
+ inline const SwTxtNode* GetpTxtNd() const { return m_pTxtNode; }
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+};
+
+inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
new file mode 100644
index 000000000000..aaafa3fca76a
--- /dev/null
+++ b/sw/inc/undobj.hxx
@@ -0,0 +1,1999 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: undobj.hxx,v $
+ * $Revision: 1.44 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNDOBJ_HXX
+#define _UNDOBJ_HXX
+#include <tools/mempool.hxx>
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_BYTES
+#define _SVSTDARR_USHORTSSORT
+#include <svtools/svstdarr.hxx>
+#endif
+#include <svtools/itemset.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <numrule.hxx>
+#include <itabenum.hxx>
+#include <format.hxx>
+#include <SwRewriter.hxx>
+#include <svx/svdundo.hxx> // #111827#
+
+#include <swundo.hxx>
+
+#include <IMark.hxx>
+#include <IDocumentContentOperations.hxx>
+// --> OD 2006-11-01 #130889#
+#include <vector>
+// <--
+
+#include <boost/shared_ptr.hpp>
+#include <memory>
+
+
+class SwUndoIter;
+class SwHistory;
+class SwIndex;
+class SwPaM;
+struct SwPosition;
+class SwDoc;
+class SwFmt;
+class SwFmtColl;
+class SwTxtFmtColl;
+class SwTxtNode;
+class SwTableNode;
+class SwTable;
+class SwTableBox;
+struct SwSortOptions;
+class SwFrmFmt;
+class SwHistoryBookmark;
+class SwSection;
+class SwSectionFmt;
+class SvxTabStopItem;
+class SwDDEFieldType;
+class Graphic;
+class SwGrfNode;
+class SwUndos;
+class SwFtnInfo;
+class SwEndNoteInfo;
+class SwNodeIndex;
+class SwNodeRange;
+class SwFmtAnchor;
+struct SwUndoGroupObjImpl;
+class SdrMark;
+class SdrMarkList;
+class SdrObject;
+class SdrObjGroup;
+class SdrUndoAction;
+class SwDrawFrmFmt;
+class _SaveTable;
+class SwTableAutoFmt;
+class SwSelBoxes;
+class SwTableSortBoxes;
+class SwUndoSaveSections;
+class SwUndoMoves;
+class SwStartNode;
+class _SaveFlyArr;
+class SwTblToTxtSaves;
+class SwRedlineData;
+class SwRedlineSaveData;
+class SwRedline;
+struct SwSaveRowSpan;
+
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
+namespace utl {
+ class TransliterationWrapper;
+}
+
+#ifndef PRODUCT
+class Writer;
+class SwUndo;
+#define OUT_UNDOBJ( name ) \
+ friend Writer& OutUndo_ ## name( Writer&, const SwUndo& );
+#else
+#define OUT_UNDOBJ( name )
+#endif
+
+
+const String UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US);
+const String UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US);
+const String UNDO_ARG3("$3", RTL_TEXTENCODING_ASCII_US);
+
+typedef SwRedlineSaveData* SwRedlineSaveDataPtr;
+SV_DECL_PTRARR_DEL( SwRedlineSaveDatas, SwRedlineSaveDataPtr, 8, 8 )
+
+class SwUndo
+{
+ SwUndoId nId;
+ USHORT nOrigRedlineMode;
+
+protected:
+ bool bCacheComment;
+ mutable String * pComment;
+
+ void RemoveIdxFromSection( SwDoc&, ULONG nSttIdx, ULONG* pEndIdx = 0 );
+ void RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext );
+ void RemoveIdxRel( ULONG, const SwPosition& );
+
+ void SetId( SwUndoId nNew ) { nId = nNew; }
+
+ static BOOL CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ const SwRedlineSaveDatas& rCheck,
+ BOOL bCurrIsEnd );
+
+ // #111827#
+ /**
+ Returns the rewriter for this object.
+
+ @return the rewriter for this object
+ */
+ virtual SwRewriter GetRewriter() const;
+public:
+ SwUndo( SwUndoId nI );
+ virtual ~SwUndo();
+
+ SwUndoId GetId() const { return nId; }
+ virtual SwUndoId GetEffectiveId() const;
+ virtual void Undo( SwUndoIter& ) = 0;
+ virtual void Redo( SwUndoIter& ) = 0;
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns textual comment for this undo object.
+
+ The textual comment is created from the resource string
+ corresponding to this object's ID. The rewriter of this object
+ is applied to the resource string to get the final comment.
+
+ @return textual comment for this undo object
+ */
+ virtual String GetComment() const;
+
+ // das UndoObject merkt sich, welcher Mode eingeschaltet war.
+ // In Undo/Redo/Repeat wird dann immer auf diesen zurueck geschaltet
+ USHORT GetRedlineMode() const { return nOrigRedlineMode; }
+ void SetRedlineMode( USHORT eMode ) { nOrigRedlineMode = eMode; }
+
+ bool IsDelBox() const;
+
+ // sicher und setze die RedlineDaten
+ static BOOL FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ BOOL bDelRange = TRUE, BOOL bCopyNext = TRUE );
+ static BOOL FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
+ static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData );
+ static BOOL HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
+};
+
+typedef USHORT DelCntntType;
+namespace nsDelCntntType
+{
+ const DelCntntType DELCNT_FTN = 0x01;
+ const DelCntntType DELCNT_FLY = 0x02;
+ const DelCntntType DELCNT_TOC = 0x04;
+ const DelCntntType DELCNT_BKM = 0x08;
+ const DelCntntType DELCNT_ALL = 0x0F;
+ const DelCntntType DELCNT_CHKNOCNTNT = 0x80;
+}
+
+// diese Klasse muss in ein Undo-Object vererbt werden, wenn dieses Inhalt
+// fuers Redo/Undo ... speichert
+class SwUndoSaveCntnt
+{
+protected:
+
+ SwHistory* pHistory;
+
+ // wird fuer das loeschen von Inhalt benoetigt. Fuer das ReDo werden
+ // Inhalte in das UndoNodesArray verschoben. Diese Methoden fuegen
+ // am Ende eines TextNodes ein Trenner fuer die Attribute. Damit werden
+ // Attribute nicht expandiert.
+ // MoveTo.. verschiebt aus dem NodesArray in das UndoNodesArray
+ // MoveFrom.. verschiebt aus dem UndoNodesArray in das NodesArray
+ void MoveToUndoNds( SwPaM& rPam,
+ SwNodeIndex* pNodeIdx = 0, SwIndex* pCntIdx = 0,
+ ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ void MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, xub_StrLen nCntntIdx,
+ SwPosition& rInsPos,
+ ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+
+ // diese beiden Methoden bewegen den SPoint vom Pam zurueck/vor. Damit
+ // kann fuer ein Undo/Redo ein Bereich aufgespannt werden. (Der
+ // SPoint liegt dann vor dem manipuliertem Bereich !!)
+ // Das Flag gibt an, ob noch vorm SPoint Inhalt steht.
+ BOOL MovePtBackward( SwPaM& rPam );
+ void MovePtForward( SwPaM& rPam, BOOL bMvBkwrd );
+
+ // vor dem Move ins UndoNodes-Array muss dafuer gesorgt werden, das
+ // die Inhaltstragenden Attribute aus dem Nodes-Array entfernt werden.
+ void DelCntntIndex( const SwPosition& pMark, const SwPosition& pPoint,
+ DelCntntType nDelCntntType = nsDelCntntType::DELCNT_ALL );
+
+public:
+ SwUndoSaveCntnt();
+ ~SwUndoSaveCntnt();
+ OUT_UNDOBJ( SaveCntnt )
+};
+
+
+// sicher eine vollstaendige Section im Nodes-Array
+class SwUndoSaveSection : private SwUndoSaveCntnt
+{
+ SwNodeIndex *pMvStt;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ULONG nMvLen; // Index ins UndoNodes-Array
+ ULONG nStartPos;
+
+protected:
+ SwNodeIndex* GetMvSttIdx() const { return pMvStt; }
+ ULONG GetMvNodeCnt() const { return nMvLen; }
+
+public:
+ SwUndoSaveSection();
+ ~SwUndoSaveSection();
+
+ void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx );
+ void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange );
+ void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, USHORT nSectType );
+ void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos );
+
+ const SwHistory* GetHistory() const { return pHistory; }
+ SwHistory* GetHistory() { return pHistory; }
+ OUT_UNDOBJ( SaveSection )
+};
+
+
+// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu
+// einem PaM zusammensetzen
+class SwUndRng
+{
+public:
+ ULONG nSttNode, nEndNode;
+ xub_StrLen nSttCntnt, nEndCntnt;
+
+ SwUndRng();
+ SwUndRng( const SwPaM& );
+
+ void SetValues( const SwPaM& rPam );
+ void SetPaM( SwPaM&, BOOL bCorrToCntnt = FALSE ) const;
+ void SetPaM( SwUndoIter&, BOOL bCorrToCntnt = FALSE ) const;
+};
+
+
+class SwUndoStart: public SwUndo
+{
+ // Um innerhalb von Undo zuerkennen, wann ein Start vorliegt, gibt
+ // GetId() immer die UNDO_START zurueck. Die UserId kann ueber
+ // GetUserId() erfragt werden.
+ SwUndoId nUserId;
+ // fuer die "Verpointerung" von Start- und End-Undos
+ USHORT nEndOffset;
+
+ SwRewriter mRewriter;
+
+public:
+ SwUndoStart( SwUndoId nId );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // -> #111827#
+ virtual String GetComment() const;
+ void SetRewriter(const SwRewriter & rRewriter);
+ virtual SwRewriter GetRewriter() const;
+ // <- #111827#
+
+ virtual SwUndoId GetEffectiveId() const;
+ SwUndoId GetUserId() const { return nUserId; }
+ // Setzen vom End-Undo-Offset geschieht im Doc::EndUndo
+ USHORT GetEndOffset() const { return nEndOffset; }
+ void SetEndOffset( USHORT n ) { nEndOffset = n; }
+ OUT_UNDOBJ( Start )
+};
+
+class SwUndoEnd: public SwUndo
+{
+ // Um innerhalb von Undo zuerkennen, wann ein Ende vorliegt, gibt
+ // GetId() immer die UNDO_END zurueck. Die UserId kann ueber
+ // GetUserId() erfragt werden.
+ SwUndoId nUserId;
+ // fuer die "Verpointerung" von Start- und End-Undos
+ USHORT nSttOffset;
+
+ SwRewriter mRewriter;
+
+public:
+ SwUndoEnd( SwUndoId nId );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // -> #111827#
+ virtual String GetComment() const;
+ void SetRewriter(const SwRewriter & rRewriter);
+ virtual SwRewriter GetRewriter() const;
+ // <- #111827#
+
+ virtual SwUndoId GetEffectiveId() const;
+ SwUndoId GetUserId() const { return nUserId; }
+
+ // Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo
+ void SetSttOffset(USHORT _nSttOffSet) { nSttOffset = _nSttOffSet; }
+ USHORT GetSttOffset() const { return nSttOffset; }
+ OUT_UNDOBJ( End )
+};
+
+class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
+{
+ SwPosition *pPos; // Inhalt fuers Redo
+ String *pTxt, *pUndoTxt;
+ SwRedlineData* pRedlData;
+ ULONG nNode;
+ xub_StrLen nCntnt, nLen;
+ BOOL bIsWordDelim : 1;
+ BOOL bIsAppend : 1;
+
+ const IDocumentContentOperations::InsertFlags m_nInsertFlags;
+
+ friend class SwDoc; // eigentlich nur SwDoc::Insert( String )
+ BOOL CanGrouping( sal_Unicode cIns );
+ BOOL CanGrouping( const SwPosition& rPos );
+
+ SwDoc * pDoc;
+
+ void Init(const SwNodeIndex & rNode);
+ String * GetTxtFromDoc() const;
+
+public:
+ SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen,
+ const IDocumentContentOperations::InsertFlags nInsertFlags,
+ BOOL bWDelim = TRUE );
+ SwUndoInsert( const SwNodeIndex& rNode );
+ virtual ~SwUndoInsert();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns rewriter for this undo object.
+
+ The returned rewriter has the following rule:
+
+ $1 -> '<inserted text>'
+
+ <inserted text> is shortened to a length of nUndoStringLength.
+
+ @return rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ BOOL CanGrouping( const SwPosition&, sal_Unicode cIns );
+ OUT_UNDOBJ( Insert )
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert)
+};
+
+
+class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt
+{
+ SwNodeIndex* pMvStt; // Position der Nodes im UndoNodes-Array
+ String *pSttStr, *pEndStr;
+ SwRedlineData* pRedlData;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
+
+ String sTableName;
+
+ ULONG nNode;
+ ULONG nNdDiff; // Differenz von Nodes vor-nach Delete
+ ULONG nSectDiff; // Diff. von Nodes vor/nach Move mit SectionNodes
+ ULONG nReplaceDummy; // Diff. to a temporary dummy object
+ USHORT nSetPos;
+
+ BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in CanGrouping() ausgwertet !!
+ BOOL bBackSp : 1; // TRUE: wenn Gruppierung und der Inhalt davor geloescht wird
+ BOOL bJoinNext: 1; // TRUE: wenn der Bereich von Oben nach unten geht
+ BOOL bTblDelLastNd : 1; // TRUE: TextNode hinter der Tabelle einf./loeschen
+ BOOL bDelFullPara : 1; // TRUE: gesamte Nodes wurden geloescht
+ BOOL bResetPgDesc : 1; // TRUE: am nachfolgenden Node das PgDsc zuruecksetzen
+ BOOL bResetPgBrk : 1; // TRUE: am nachfolgenden Node das PgBreak zuruecksetzen
+ BOOL bFromTableCopy : 1; // TRUE: called by SwUndoTblCpyTbl
+
+ BOOL SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
+ SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd );
+public:
+ SwUndoDelete( SwPaM&, BOOL bFullPara = FALSE, BOOL bCalledByTblCpy = FALSE );
+ virtual ~SwUndoDelete();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns rewriter for this undo object.
+
+ The rewriter consists of the following rule:
+
+ $1 -> '<deleted text>'
+
+ <deleted text> is shortened to nUndoStringLength characters.
+
+ @return rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ BOOL CanGrouping( SwDoc*, const SwPaM& );
+
+ void SetTblDelLastNd() { bTblDelLastNd = TRUE; }
+
+ // fuer die PageDesc/PageBreak Attribute einer Tabelle
+ void SetPgBrkFlags( BOOL bPageBreak, BOOL bPageDesc )
+ { bResetPgDesc = bPageDesc; bResetPgBrk = bPageBreak; }
+
+ void SetTableName(const String & rName);
+
+ // SwUndoTblCpyTbl needs this information:
+ long NodeDiff() const { return nSttNode - nEndNode; }
+ xub_StrLen ContentStart() const { return nSttCntnt; }
+ BOOL IsDelFullPara() const { return bDelFullPara; }
+
+ OUT_UNDOBJ( Delete )
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete)
+};
+
+
+class SwUndoOverwrite: public SwUndo, private SwUndoSaveCntnt
+{
+ String aDelStr, aInsStr;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ULONG nSttNode;
+ xub_StrLen nSttCntnt;
+ BOOL bInsChar : 1; // kein Overwrite mehr; sondern Insert
+ BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in
+ // CanGrouping() ausgwertet !!
+public:
+ SwUndoOverwrite( SwDoc*, SwPosition&, sal_Unicode cIns );
+ virtual ~SwUndoOverwrite();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ The rewriter contains the following rule:
+
+ $1 -> '<overwritten text>'
+
+ <overwritten text> is shortened to nUndoStringLength characters.
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
+ OUT_UNDOBJ( Overwrite )
+};
+
+
+class SwUndoSplitNode: public SwUndo
+{
+ SwHistory* pHistory;
+ SwRedlineData* pRedlData;
+ ULONG nNode;
+ xub_StrLen nCntnt;
+ BOOL bTblFlag : 1;
+ BOOL bChkTblStt : 1;
+public:
+ SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, BOOL bChkTbl );
+ virtual ~SwUndoSplitNode();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SetTblFlag() { bTblFlag = TRUE; }
+ OUT_UNDOBJ( SplitNode )
+};
+
+
+class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveCntnt
+{
+ // nDest.. - Bereich, in den verschoben wurde (nach dem Move!)
+ // nIns.. - Position, von der verschoben wurde und wieder die neue InsPos. ist
+ // nMv.. Position auf die verschoben wird (vor dem Move!) ; fuers REDO
+ ULONG nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode;
+ xub_StrLen nDestSttCntnt, nDestEndCntnt, nInsPosCntnt, nMvDestCntnt;
+
+ USHORT nFtnStt; // StartPos der Fussnoten in der History
+
+ BOOL bJoinNext : 1,
+ bJoinPrev : 1,
+ bMoveRange : 1;
+
+ bool bMoveRedlines; // use DOC_MOVEREDLINES when calling SwDoc::Move
+
+ void DelFtn( const SwPaM& );
+public:
+ SwUndoMove( const SwPaM&, const SwPosition& );
+ SwUndoMove( SwDoc* pDoc, const SwNodeRange&, const SwNodeIndex& );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ // setze den Destination-Bereich nach dem Verschieben.
+ void SetDestRange( const SwPaM&, const SwPosition&, BOOL, BOOL );
+ void SetDestRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd,
+ const SwNodeIndex& rInsPos );
+
+ BOOL IsMoveRange() const { return bMoveRange; }
+ ULONG GetEndNode() const { return nEndNode; }
+ ULONG GetDestSttNode() const { return nDestSttNode; }
+ xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
+ void AddTblMrgFlyHstry( SwHistory& rHstr );
+
+ void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
+
+ OUT_UNDOBJ( Move )
+};
+
+
+class SwUndoAttr : public SwUndo, private SwUndRng
+{
+ SfxItemSet m_AttrSet; // attributes for Redo
+ const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
+ ::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
+ ::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
+ ULONG m_nNodeIndex; // Offset: for Redlining
+ const SetAttrMode m_nInsertFlags; // insert flags
+
+ void RemoveIdx( SwDoc& rDoc );
+
+public:
+ SwUndoAttr( const SwPaM&, const SfxItemSet &, const SetAttrMode nFlags );
+ SwUndoAttr( const SwPaM&, const SfxPoolItem&, const SetAttrMode nFlags );
+ virtual ~SwUndoAttr();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SaveRedlineData( const SwPaM& rPam, BOOL bInsCntnt );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+ OUT_UNDOBJ( InsAttr )
+};
+
+class SwUndoResetAttr : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ SvUShortsSort m_Ids;
+ const USHORT m_nFormatId; // Format-Id for Redo
+
+public:
+ SwUndoResetAttr( const SwPaM&, USHORT nFmtId );
+ SwUndoResetAttr( const SwPosition&, USHORT nFmtId );
+ virtual ~SwUndoResetAttr();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SetAttrs( const SvUShortsSort& rArr );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+ OUT_UNDOBJ( ResetAttr )
+};
+
+class SwUndoFmtAttr : public SwUndo
+{
+ friend class SwUndoDefaultAttr;
+ SwFmt * m_pFmt;
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
+ ULONG m_nNodeIndex;
+ const USHORT m_nFmtWhich;
+ const bool m_bSaveDrawPt;
+
+ bool IsFmtInDoc( SwDoc* ); //is the attribute format still in the Doc?
+ void SaveFlyAnchor( bool bSaveDrawPt = false );
+ // --> OD 2004-10-26 #i35443# - Add return value, type <bool>.
+ // Return value indicates, if anchor attribute is restored.
+ // Notes: - If anchor attribute is restored, all other existing attributes
+ // are also restored.
+ // - Anchor attribute isn't restored successfully, if it contains
+ // an invalid anchor position and all other existing attributes
+ // aren't restored.
+ // This situation occurs for undo of styles.
+ bool RestoreFlyAnchor( SwUndoIter& rIter );
+ // <--
+ // --> OD 2008-02-27 #refactorlists# - removed <rAffectedItemSet>
+ void Init();
+ // <--
+
+public:
+ // register at the Format and save old attributes
+ // --> OD 2008-02-27 #refactorlists# - removed <rNewSet>
+ SwUndoFmtAttr( const SfxItemSet& rOldSet,
+ SwFmt& rFmt,
+ bool bSaveDrawPt = true );
+ // <--
+ SwUndoFmtAttr( const SfxPoolItem& rItem,
+ SwFmt& rFmt,
+ bool bSaveDrawPt = true );
+ virtual ~SwUndoFmtAttr();
+ virtual void Undo( SwUndoIter& );
+ // --> OD 2004-10-26 #i35443# - <Redo(..)> calls <Undo(..)> - nothing else
+ virtual void Redo( SwUndoIter& );
+ // <--
+ virtual void Repeat( SwUndoIter& );
+ virtual SwRewriter GetRewriter() const;
+
+ OUT_UNDOBJ( InsFmtAttr )
+
+ void PutAttr( const SfxPoolItem& rItem );
+ SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc!
+};
+
+// --> OD 2008-02-12 #newlistlevelattrs#
+class SwUndoFmtResetAttr : public SwUndo
+{
+ public:
+ SwUndoFmtResetAttr( SwFmt& rChangedFormat,
+ const USHORT nWhichId );
+ ~SwUndoFmtResetAttr();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ private:
+ // format at which a certain attribute is reset.
+ SwFmt * const m_pChangedFormat;
+ // which ID of the reset attribute
+ const USHORT m_nWhichId;
+ // old attribute which has been reset - needed for undo.
+ ::std::auto_ptr<SfxPoolItem> m_pOldItem;
+};
+// <--
+
+class SwUndoDontExpandFmt : public SwUndo
+{
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nContentIndex;
+
+public:
+ SwUndoDontExpandFmt( const SwPosition& rPos );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+// helper class to receive changed attribute sets
+class SwUndoFmtAttrHelper : public SwClient
+{
+ ::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
+ const bool m_bSaveDrawPt;
+
+public:
+ SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSaveDrawPt = true );
+
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ SwUndoFmtAttr* GetUndo() const { return m_pUndo.get(); }
+ // release the undo object (so it is not deleted here), and return it
+ SwUndoFmtAttr* ReleaseUndo() { return m_pUndo.release(); }
+};
+
+
+class SwUndoFmtColl : public SwUndo, private SwUndRng
+{
+ String aFmtName;
+ SwHistory* pHistory;
+ SwFmtColl* pFmtColl;
+ // --> OD 2008-04-15 #refactorlists# - for correct <ReDo(..)> and <Repeat(..)>
+ // boolean, which indicates that the attributes are reseted at the nodes
+ // before the format has been applied.
+ const bool mbReset;
+ // boolean, which indicates that the list attributes had been reseted at
+ // the nodes before the format has been applied.
+ const bool mbResetListAttrs;
+ // <--
+public:
+ // --> OD 2008-04-15 #refactorlists#
+// SwUndoFmtColl( const SwPaM&, SwFmtColl* );
+ SwUndoFmtColl( const SwPaM&, SwFmtColl*,
+ const bool bReset,
+ const bool bResetListAttrs );
+ // <--
+ virtual ~SwUndoFmtColl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter for this undo object.
+
+ The rewriter contains one rule:
+
+ $1 -> <name of format collection>
+
+ <name of format collection> is the name of the format
+ collection that is applied by the action recorded by this undo
+ object.
+
+ @return the rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ SwHistory* GetHistory() { return pHistory; }
+ OUT_UNDOBJ( SetFmtColl )
+};
+
+
+class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const bool m_bModulus;
+
+public:
+ SwUndoMoveLeftMargin( const SwPaM&, BOOL bRight, BOOL bModulus );
+ virtual ~SwUndoMoveLeftMargin();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+ OUT_UNDOBJ( MoveLeftMargin )
+};
+
+// Basis-Klasse fuer Insert von Dokument, Glossaries und Kopieren
+class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt
+{
+ SwTxtFmtColl *pTxtFmtColl, *pLastNdColl;
+ SvPtrarr* pFrmFmts;
+ SwUndos* pFlyUndos;
+ SwRedlineData* pRedlData;
+ BOOL bSttWasTxtNd;
+protected:
+ ULONG nNdDiff;
+ SwPosition *pPos; // Inhalt fuers Redo
+ USHORT nSetPos; // Start in der History-Liste
+
+ SwUndoInserts( SwUndoId nUndoId, const SwPaM& );
+public:
+ virtual ~SwUndoInserts();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ // setze den Destination-Bereich nach dem Einlesen.
+ void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE,
+ BOOL bSttWasTxtNd = TRUE );
+ OUT_UNDOBJ( Inserts )
+};
+
+class SwUndoInsDoc : public SwUndoInserts
+{
+public:
+ SwUndoInsDoc( const SwPaM& );
+ OUT_UNDOBJ( InsDoc )
+};
+
+class SwUndoCpyDoc : public SwUndoInserts
+{
+public:
+ SwUndoCpyDoc( const SwPaM& );
+ OUT_UNDOBJ( Copy )
+};
+
+class SwUndoInsTbl : public SwUndo
+{
+ String sTblNm;
+ SwInsertTableOptions aInsTblOpts;
+ SwDDEFieldType* pDDEFldType;
+ SvUShorts* pColWidth;
+ SwRedlineData* pRedlData;
+ SwTableAutoFmt* pAutoFmt;
+ ULONG nSttNode;
+ USHORT nRows, nCols;
+ USHORT nAdjust;
+
+public:
+ SwUndoInsTbl( const SwPosition&, USHORT nCols, USHORT nRows,
+ USHORT eAdjust, const SwInsertTableOptions& rInsTblOpts,
+ const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr,
+ const String & rName);
+ virtual ~SwUndoInsTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ virtual SwRewriter GetRewriter() const;
+
+ OUT_UNDOBJ( InsTable )
+};
+
+class SwUndoTxtToTbl : public SwUndo, public SwUndRng
+{
+ String sTblNm;
+ SwInsertTableOptions aInsTblOpts;
+ SvULongs* pDelBoxes;
+ SwTableAutoFmt* pAutoFmt;
+ SwHistory* pHistory;
+ sal_Unicode cTrenner;
+ USHORT nAdjust;
+ BOOL bSplitEnd : 1;
+
+public:
+ SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode , USHORT,
+ const SwTableAutoFmt* pAFmt );
+ virtual ~SwUndoTxtToTbl();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ SwHistory& GetHistory(); // wird ggfs. angelegt
+ void AddFillBox( const SwTableBox& rBox );
+ OUT_UNDOBJ( TextToTable )
+};
+
+class SwUndoTblToTxt : public SwUndo
+{
+ String sTblNm;
+ SwDDEFieldType* pDDEFldType;
+ _SaveTable* pTblSave;
+ SwTblToTxtSaves* pBoxSaves;
+ SwHistory* pHistory;
+ ULONG nSttNd, nEndNd;
+ USHORT nAdjust;
+ sal_Unicode cTrenner;
+ USHORT nHdlnRpt;
+ BOOL bCheckNumFmt : 1;
+
+public:
+ SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh );
+ virtual ~SwUndoTblToTxt();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SetRange( const SwNodeRange& );
+ void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx,
+ xub_StrLen nCntntIdx = STRING_MAXLEN);
+ OUT_UNDOBJ( TableToText )
+};
+
+class SwUndoAttrTbl : public SwUndo
+{
+ ULONG nSttNode;
+ _SaveTable* pSaveTbl;
+ BOOL bClearTabCol : 1;
+public:
+ SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols = FALSE );
+ virtual ~SwUndoAttrTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ OUT_UNDOBJ( SetTableAttr )
+};
+
+class SwUndoTblAutoFmt : public SwUndo
+{
+ ULONG nSttNode;
+ _SaveTable* pSaveTbl;
+ SwUndos* pUndos;
+ BOOL bSaveCntntAttr;
+
+ void UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter );
+
+public:
+ SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& );
+ virtual ~SwUndoTblAutoFmt();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ void SaveBoxCntnt( const SwTableBox& rBox );
+ OUT_UNDOBJ( TableAutoFmt )
+};
+
+class SwUndoTblNdsChg : public SwUndo
+{
+ _SaveTable* pSaveTbl;
+ SvULongs aBoxes;
+
+ union {
+ SvULongs* pNewSttNds;
+ SwUndoSaveSections* pDelSects;
+ } Ptrs;
+ SvBools aMvBoxes; // fuers SplitRow (aufgeteilte Nodes einer Box)
+ long nMin, nMax; // for redo of delete column
+ ULONG nSttNode, nCurrBox;
+ USHORT nCount, nRelDiff, nAbsDiff, nSetColType;
+ BOOL bFlag;
+ BOOL bSameHeight; // only used for SplitRow
+public:
+ SwUndoTblNdsChg( SwUndoId UndoId,
+ const SwSelBoxes& rBoxes,
+ const SwTableNode& rTblNd,
+ long nMn, long nMx,
+ USHORT nCnt, BOOL bFlg, BOOL bSameHeight );
+
+ // fuer SetColWidth
+ SwUndoTblNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes,
+ const SwTableNode& rTblNd );
+
+ virtual ~SwUndoTblNdsChg();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld );
+ void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld,
+ const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts );
+ void SaveSection( SwStartNode* pSttNd );
+ void ReNewBoxes( const SwSelBoxes& rBoxes );
+
+
+ void SetColWidthParam( ULONG nBoxIdx, USHORT nMode, USHORT nType,
+ SwTwips nAbsDif, SwTwips nRelDif )
+ {
+ nCurrBox = nBoxIdx;
+ nCount = nMode;
+ nSetColType = nType;
+ nAbsDiff = (USHORT)nAbsDif;
+ nRelDiff = (USHORT)nRelDif;
+ }
+
+ OUT_UNDOBJ( TblNodesChg )
+};
+
+class SwUndoTblMerge : public SwUndo, private SwUndRng
+{
+ ULONG nTblNode;
+ _SaveTable* pSaveTbl;
+ SvULongs aBoxes, aNewSttNds;
+ SwUndoMoves* pMoves;
+ SwHistory* pHistory;
+
+public:
+ SwUndoTblMerge( const SwPaM& rTblSel );
+ virtual ~SwUndoTblMerge();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
+
+ void SetSelBoxes( const SwSelBoxes& rBoxes );
+
+ void AddNewBox( ULONG nSttNdIdx )
+ { aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); }
+
+ void SaveCollection( const SwTableBox& rBox );
+
+ OUT_UNDOBJ( TblMerge )
+};
+
+
+class SwUndoTblNumFmt : public SwUndo
+{
+ SfxItemSet *pBoxSet;
+ SwHistory* pHistory;
+ String aStr, aNewFml;
+
+ ULONG nFmtIdx, nNewFmtIdx;
+ double fNum, fNewNum;
+ ULONG nNode;
+ ULONG nNdPos;
+
+ BOOL bNewFmt : 1;
+ BOOL bNewFml : 1;
+ BOOL bNewValue : 1;
+
+public:
+ SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
+ virtual ~SwUndoTblNumFmt();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void SetNumFmt( ULONG nNewNumFmtIdx, const double& rNewNumber )
+ { nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
+ void SetBox( const SwTableBox& rBox );
+ OUT_UNDOBJ( TblNumFmt )
+};
+
+class _UndoTblCpyTbl_Entries;
+
+class SwUndoTblCpyTbl : public SwUndo
+{
+ _UndoTblCpyTbl_Entries* pArr;
+ SwUndoTblNdsChg* pInsRowUndo;
+
+ //b6341295: When redlining is active, PrepareRedline has to create the redlining attributes
+ //for the new and the old table cell content
+ SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, const SwPosition& rPos,
+ bool& rJoin, bool bRedo );
+public:
+ SwUndoTblCpyTbl();
+ virtual ~SwUndoTblCpyTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt );
+ void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt );
+
+ BOOL IsEmpty() const;
+ BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt );
+ OUT_UNDOBJ( TblCpyTbl )
+};
+
+class SwUndoCpyTbl : public SwUndo
+{
+ SwUndoDelete* pDel;
+ ULONG nTblNode;
+public:
+ SwUndoCpyTbl();
+ virtual ~SwUndoCpyTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; }
+ OUT_UNDOBJ( CpyTbl )
+};
+
+class SwUndoSplitTbl : public SwUndo
+{
+ ULONG nTblNode, nOffset;
+ SwSaveRowSpan* mpSaveRowSpan; // stores the row span values at the splitting row
+ _SaveTable* pSavTbl;
+ SwHistory* pHistory;
+ USHORT nMode, nFmlEnd;
+ BOOL bCalcNewSize;
+public:
+ SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp, USHORT nMode, BOOL bCalcNewSize );
+ virtual ~SwUndoSplitTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SetTblNodeOffset( ULONG nIdx ) { nOffset = nIdx - nTblNode; }
+ SwHistory* GetHistory() { return pHistory; }
+ void SaveFormula( SwHistory& rHistory );
+};
+
+class SwUndoMergeTbl : public SwUndo
+{
+ String aName;
+ ULONG nTblNode;
+ _SaveTable* pSavTbl, *pSavHdl;
+ SwHistory* pHistory;
+ USHORT nMode;
+ BOOL bWithPrev;
+public:
+ SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd,
+ BOOL bWithPrev, USHORT nMode );
+ virtual ~SwUndoMergeTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SaveFormula( SwHistory& rHistory );
+};
+
+
+class SwUndoBookmark : public SwUndo
+{
+ const ::std::auto_ptr<SwHistoryBookmark> m_pHistoryBookmark;
+
+protected:
+ SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& );
+
+ void SetInDoc( SwDoc* );
+ void ResetInDoc( SwDoc* );
+
+public:
+ virtual ~SwUndoBookmark();
+
+ // #111827#
+ /**
+ Returns the rewriter for this undo object.
+
+ The rewriter contains the following rule:
+
+ $1 -> <name of bookmark>
+
+ <name of bookmark> is the name of the bookmark whose
+ insertion/deletion is recorded by this undo object.
+
+ @return the rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+};
+
+
+class SwUndoDelBookmark : public SwUndoBookmark
+{
+public:
+ SwUndoDelBookmark( const ::sw::mark::IMark& );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ OUT_UNDOBJ( DelBookmark )
+};
+
+class SwUndoInsBookmark : public SwUndoBookmark
+{
+public:
+ SwUndoInsBookmark( const ::sw::mark::IMark& );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ OUT_UNDOBJ( InsBookmark )
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Undo auf Sorting
+ --------------------------------------------------------------------*/
+
+struct SwSortUndoElement
+{
+ union {
+ struct {
+ ULONG nKenn;
+ ULONG nSource, nTarget;
+ } TXT;
+ struct {
+ String *pSource, *pTarget;
+ } TBL;
+ } SORT_TXT_TBL;
+
+ SwSortUndoElement( const String& aS, const String& aT )
+ {
+ SORT_TXT_TBL.TBL.pSource = new String( aS );
+ SORT_TXT_TBL.TBL.pTarget = new String( aT );
+ }
+ SwSortUndoElement( ULONG nS, ULONG nT )
+ {
+ SORT_TXT_TBL.TXT.nSource = nS;
+ SORT_TXT_TBL.TXT.nTarget = nT;
+ SORT_TXT_TBL.TXT.nKenn = 0xffffffff;
+ }
+ ~SwSortUndoElement();
+};
+
+SV_DECL_PTRARR_DEL(SwSortList, SwSortUndoElement*, 10,30)
+SV_DECL_PTRARR(SwUndoSortList, SwNodeIndex*, 10,30)
+
+class SwUndoSort : public SwUndo, private SwUndRng
+{
+ SwSortOptions* pSortOpt; // die Optionen mit den Sortier-Kriterien
+ SwSortList aSortList;
+ SwUndoAttrTbl* pUndoTblAttr;
+ SwRedlineData* pRedlData;
+ ULONG nTblNd;
+
+ void RemoveIdx( SwPaM& rPam );
+public:
+ SwUndoSort( const SwPaM&, const SwSortOptions& );
+ SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode&,
+ const SwSortOptions&, BOOL bSaveTable );
+ virtual ~SwUndoSort();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void Insert( const String& rOrgPos, const String& rNewPos );
+ void Insert( ULONG nOrgPos, ULONG nNewPos );
+
+ OUT_UNDOBJ( Sort )
+};
+
+
+
+//--------------------------------------------------------------------
+
+class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection
+{
+protected:
+ SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
+ ULONG nNdPgPos;
+ xub_StrLen nCntPos; // Seite/am Absatz/im Absatz
+ USHORT nRndId;
+ BOOL bDelFmt; // loesche das gespeicherte Format
+
+ void InsFly( SwUndoIter&, BOOL bShowSel = TRUE );
+ void DelFly( SwDoc* );
+
+ SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId );
+
+ SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); }
+ ULONG GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
+
+public:
+ virtual ~SwUndoFlyBase();
+
+ virtual void Undo( SwUndoIter& ) = 0;
+ virtual void Redo( SwUndoIter& ) = 0;
+
+ OUT_UNDOBJ( FlyBase )
+};
+
+class SwUndoInsLayFmt : public SwUndoFlyBase
+{
+ ULONG mnCrsrSaveIndexPara; // Cursor position
+ xub_StrLen mnCrsrSaveIndexPos; // for undo
+public:
+ SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx );
+ ~SwUndoInsLayFmt();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ String GetComment() const;
+
+ OUT_UNDOBJ( InsLayFmt )
+};
+
+class SwUndoDelLayFmt : public SwUndoFlyBase
+{
+ BOOL bShowSelFrm;
+public:
+ SwUndoDelLayFmt( SwFrmFmt* pFormat );
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ void Redo(); // Schnittstelle fuers Rollback
+
+ void ChgShowSel( BOOL bNew ) { bShowSelFrm = bNew; }
+
+ virtual SwRewriter GetRewriter() const;
+
+ OUT_UNDOBJ( DelLayFmt )
+};
+
+
+class SwUndoSetFlyFmt : public SwUndo, public SwClient
+{
+ SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
+ SwFrmFmt* pOldFmt; // die alte Fly Vorlage
+ SwFrmFmt* pNewFmt; // die neue Fly Vorlage
+ SfxItemSet* pItemSet; // die zurueck-/ gesetzten Attribute
+ ULONG nOldNode, nNewNode;
+ xub_StrLen nOldCntnt, nNewCntnt;
+ USHORT nOldAnchorTyp, nNewAnchorTyp;
+ BOOL bAnchorChgd;
+
+ void PutAttr( USHORT nWhich, const SfxPoolItem* pItem );
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+ void GetAnchor( SwFmtAnchor& rAnhor, ULONG nNode, xub_StrLen nCntnt );
+
+public:
+ SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt );
+ virtual ~SwUndoSetFlyFmt();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+//--------------------------------------------------------------------
+
+class _UnReplaceData;
+SV_DECL_PTRARR_DEL( _UnReplaceDatas, _UnReplaceData*, 10, 25 )
+
+class SwUndoReplace : public SwUndo
+{
+ friend class SwDoc;
+
+ BOOL bOldIterFlag; // Status vom Undo-Iter vorm 1. Aufruf
+ USHORT nAktPos; // fuer GetUndoRange und Undo/Redo
+ _UnReplaceDatas aArr;
+ SwRedlineData* pRedlData;
+
+public:
+ SwUndoReplace();
+ virtual ~SwUndoReplace();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ If this undo object represents several replacements the
+ rewriter contains the following rules:
+
+ $1 -> <number of replacements>
+ $2 -> occurrences of
+ $3 -> <replaced text>
+
+ If this undo object represents one replacement the rewriter
+ contains these rules:
+
+ $1 -> <replaced text>
+ $2 -> "->" (STR_YIELDS)
+ $3 -> <replacing text>
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ void AddEntry( const SwPaM& rPam, const String& rInsert, BOOL bRegExp );
+ void SetEntryEnd( const SwPaM& rPam );
+
+ BOOL IsFull() const
+ { return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); }
+
+ OUT_UNDOBJ( Replace )
+};
+
+
+//--------------------------------------------------------------------
+
+
+class SwUndoTblHeadline : public SwUndo
+{
+ ULONG nTblNd;
+ USHORT nOldHeadline;
+ USHORT nNewHeadline;
+public:
+ SwUndoTblHeadline( const SwTable&, USHORT nOldHdl, USHORT nNewHdl );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ OUT_UNDOBJ( SwUndoTblHeadline )
+};
+
+
+//------------ Undo von Insert-/Delete-Sections ----------------------
+
+class SwUndoInsSection : public SwUndo, private SwUndRng
+{
+ SwHistory* pHistory;
+ SwSection* pSection;
+ SwRedlineData* pRedlData;
+ SfxItemSet* pAttr;
+ ULONG nSectNodePos;
+ BOOL bSplitAtStt : 1;
+ BOOL bSplitAtEnd : 1;
+ BOOL bUpdateFtn : 1;
+
+ void Join( SwDoc& rDoc, ULONG nNode );
+
+public:
+ SwUndoInsSection( const SwPaM&, const SwSection&,
+ const SfxItemSet* pSet );
+ virtual ~SwUndoInsSection();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ OUT_UNDOBJ( SwUndoInsSection )
+
+ void SetSectNdPos( ULONG nPos ) { nSectNodePos = nPos; }
+ void SaveSplitNode( SwTxtNode* pTxtNd, BOOL bAtStt );
+ void SetUpdtFtnFlag( BOOL bFlag ) { bUpdateFtn = bFlag; }
+};
+
+class SwUndoDelSection : public SwUndo
+{
+ ULONG nSttNd, nEndNd;
+ SwSection* pSection;
+ SfxItemSet* pAttr;
+public:
+ SwUndoDelSection( const SwSectionFmt& );
+ virtual ~SwUndoDelSection();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ OUT_UNDOBJ( SwUndoDelSection )
+};
+
+class SwUndoChgSection : public SwUndo
+{
+ ULONG nSttNd;
+ SwSection* pSection;
+ SfxItemSet* pAttr;
+ BOOL bOnlyAttrChgd;
+public:
+ SwUndoChgSection( const SwSectionFmt&, BOOL bOnlyAttrChgd );
+ virtual ~SwUndoChgSection();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ OUT_UNDOBJ( SwUndoChgSection )
+};
+
+//------------ Undo von verschieben/stufen von Gliederung ----------------
+
+class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng
+{
+ short nOffset;
+public:
+ SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ OUT_UNDOBJ( SwUndoOutlineLeftRight )
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoDefaultAttr : public SwUndo
+{
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // the old attributes
+ ::std::auto_ptr<SvxTabStopItem> m_pTabStop;
+
+public:
+ // registers at the format and saves old attributes
+ SwUndoDefaultAttr( const SfxItemSet& rOldSet );
+ virtual ~SwUndoDefaultAttr();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ OUT_UNDOBJ( DefaultAttr )
+};
+
+//--------------------------------------------------------------------
+// ---------- Undo fuer Numerierung ----------------------------------
+
+class SwUndoInsNum : public SwUndo, private SwUndRng
+{
+ SwNumRule aNumRule;
+ SwHistory* pHistory;
+ ULONG nSttSet;
+ SwNumRule* pOldNumRule;
+ String sReplaceRule;
+ USHORT nLRSavePos;
+public:
+ SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
+ SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule,
+ SwUndoId nUndoId = UNDO_INSFMTATTR );
+ SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
+ const String& rReplaceRule );
+ virtual ~SwUndoInsNum();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ virtual SwRewriter GetRewriter() const;
+
+ SwHistory* GetHistory(); // wird ggfs. neu angelegt!
+ void SetSttNum( ULONG nNdIdx ) { nSttSet = nNdIdx; }
+ void SaveOldNumRule( const SwNumRule& rOld );
+
+ void SetLRSpaceEndPos();
+
+ OUT_UNDOBJ( InsNum )
+};
+
+class SwUndoDelNum : public SwUndo, private SwUndRng
+{
+ SvULongs aNodeIdx;
+ SvBytes aLevels;
+ SvBools aRstLRSpaces;
+ SwHistory* pHistory;
+public:
+ SwUndoDelNum( const SwPaM& rPam );
+ virtual ~SwUndoDelNum();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace );
+ SwHistory* GetHistory() { return pHistory; }
+
+ OUT_UNDOBJ( DelNum )
+};
+
+class SwUndoMoveNum : public SwUndo, private SwUndRng
+{
+ ULONG nNewStt;
+ long nOffset;
+public:
+ SwUndoMoveNum( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv = FALSE );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SetStartNode( ULONG nValue ) { nNewStt = nValue; }
+ OUT_UNDOBJ( MoveNum )
+};
+
+class SwUndoNumUpDown : public SwUndo, private SwUndRng
+{
+ short nOffset;
+public:
+ SwUndoNumUpDown( const SwPaM& rPam, short nOffset );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ OUT_UNDOBJ( NumUpDown )
+};
+
+class SwUndoNumOrNoNum : public SwUndo
+{
+ ULONG nIdx;
+ BOOL mbNewNum, mbOldNum;
+
+public:
+ SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL mbOldNum,
+ BOOL mbNewNum );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ OUT_UNDOBJ( NumOrNoNum )
+};
+
+class SwUndoNumRuleStart : public SwUndo
+{
+ ULONG nIdx;
+ USHORT nOldStt, nNewStt;
+ BOOL bSetSttValue : 1;
+ BOOL bFlag : 1;
+public:
+ SwUndoNumRuleStart( const SwPosition& rPos, BOOL bDelete );
+ SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ OUT_UNDOBJ( NumRuleStart )
+};
+
+//--------------------------------------------------------------------
+// ---------- Undo fuer DrawObjecte ----------------------------------
+
+class SwSdrUndo : public SwUndo
+{
+ SdrUndoAction* pSdrUndo;
+ SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
+public:
+ SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList );
+ virtual ~SwSdrUndo();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ String GetComment() const;
+};
+
+class SwUndoDrawGroup : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ USHORT nSize;
+ BOOL bDelFmt;
+
+public:
+ SwUndoDrawGroup( USHORT nCnt );
+ virtual ~SwUndoDrawGroup();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddObj( USHORT nPos, SwDrawFrmFmt*, SdrObject* );
+ void SetGroupFmt( SwDrawFrmFmt* );
+};
+
+// --> OD 2006-11-01 #130889#
+// Action "ungroup drawing object" is now splitted into three parts - see
+// method <SwDoc::UnGroupSelection(..)>:
+// - creation for <SwDrawFrmFmt> instances for the group members of the
+// selected group objects
+// - intrinsic ungroup of the selected group objects
+// - creation of <SwDrawContact> instances for the former group members and
+// connection to the Writer layout.
+// Thus, two undo actions (instances of <SwUndo>) are needed:
+// - Existing class <SwUndoDrawUnGroup> takes over the part for the formats.
+// - New class <SwUndoDrawUnGroupConnectToLayout> takes over the part for
+// contact object.
+class SwUndoDrawUnGroup : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ USHORT nSize;
+ BOOL bDelFmt;
+
+public:
+ SwUndoDrawUnGroup( SdrObjGroup* );
+ virtual ~SwUndoDrawUnGroup();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddObj( USHORT nPos, SwDrawFrmFmt* );
+};
+
+// --> OD 2006-11-01 #130889#
+class SwUndoDrawUnGroupConnectToLayout : public SwUndo
+{
+ private:
+ std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > > aDrawFmtsAndObjs;
+
+ public:
+ SwUndoDrawUnGroupConnectToLayout();
+ virtual ~SwUndoDrawUnGroupConnectToLayout();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
+ SdrObject* pDrawObject );
+};
+// <--
+
+
+class SwUndoDrawDelete : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ SdrMarkList* pMarkLst; // MarkList for all selected SdrObjects
+ USHORT nSize;
+ BOOL bDelFmt;
+
+public:
+ SwUndoDrawDelete( USHORT nCnt );
+ virtual ~SwUndoDrawDelete();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddObj( USHORT nPos, SwDrawFrmFmt*, const SdrMark& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoReRead : public SwUndo
+{
+ Graphic *pGrf;
+ String *pNm, *pFltr;
+ ULONG nPos;
+ USHORT nMirr;
+
+ void SaveGraphicData( const SwGrfNode& );
+ void SetAndSave( SwUndoIter& );
+
+public:
+ SwUndoReRead( const SwPaM& rPam, const SwGrfNode& pGrfNd );
+ virtual ~SwUndoReRead();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoInsertLabel : public SwUndo
+{
+ union {
+ struct {
+ // fuer NoTxtFrms
+ SwUndoInsLayFmt* pUndoFly;
+ SwUndoFmtAttr* pUndoAttr;
+ } OBJECT;
+ struct {
+ // fuer Tabelle/TextRahmen
+ SwUndoDelete* pUndoInsNd;
+ ULONG nNode;
+ } NODE;
+ };
+
+ String sText;
+ // --> PB 2005-01-06 #i39983# - the separator will be drawed with a character style
+ String sSeparator;
+ // <--
+ String sNumberSeparator;
+ String sCharacterStyle;
+ // OD 2004-04-15 #i26791# - re-store of drawing object position no longer needed
+ USHORT nFldId;
+ SwLabelType eType;
+ BYTE nLayerId; // fuer Zeichen-Objekte
+ BOOL bBefore :1;
+ BOOL bUndoKeep :1;
+ BOOL bCpyBrd :1;
+
+public:
+ SwUndoInsertLabel( const SwLabelType eTyp, const String &rText,
+ // --> PB 2005-01-06 #i39983# - the separator will be drawed with a character style
+ const String& rSeparator,
+ // <--
+ const String& rNumberSeparator, //#i61007# order of captions
+ const BOOL bBefore, const USHORT nId,
+ const String& rCharacterStyle,
+ const BOOL bCpyBrd );
+ virtual ~SwUndoInsertLabel();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ The rewriter contains this rule:
+
+ $1 -> '<text of inserted label>'
+
+ <text of inserted label> is shortened to nUndoStringLength
+ characters.
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ void SetNodePos( ULONG nNd )
+ { if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; }
+
+ void SetUndoKeep() { bUndoKeep = TRUE; }
+ void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly );
+ void SetDrawObj( BYTE nLayerId );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoChangeFootNote : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const String m_Text;
+ const USHORT m_nNumber;
+ const bool m_bEndNote;
+
+public:
+ SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt,
+ USHORT nNum, bool bIsEndNote );
+ virtual ~SwUndoChangeFootNote();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+};
+
+class SwUndoFootNoteInfo : public SwUndo
+{
+ ::std::auto_ptr<SwFtnInfo> m_pFootNoteInfo;
+
+public:
+ SwUndoFootNoteInfo( const SwFtnInfo &rInfo );
+ virtual ~SwUndoFootNoteInfo();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+class SwUndoEndNoteInfo : public SwUndo
+{
+ ::std::auto_ptr<SwEndNoteInfo> m_pEndNoteInfo;
+
+public:
+ SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo );
+ virtual ~SwUndoEndNoteInfo();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+
+//--------------------------------------------------------------------
+
+struct _UndoTransliterate_Data;
+class SwUndoTransliterate : public SwUndo, public SwUndRng
+{
+ _UndoTransliterate_Data *pData, *pLastData;
+ sal_uInt32 nType;
+
+public:
+ SwUndoTransliterate( const SwPaM& rPam,
+ const utl::TransliterationWrapper& rTrans );
+ virtual ~SwUndoTransliterate();
+
+ virtual void Undo( SwUndoIter& rUndoIter );
+ virtual void Redo( SwUndoIter& rUndoIter );
+ virtual void Repeat( SwUndoIter& rUndoIter );
+
+ void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
+ ::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
+ BOOL HasData() const {return 0 != pData; }
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoRedline : public SwUndo, public SwUndRng
+{
+protected:
+ SwRedlineData* pRedlData;
+ SwRedlineSaveDatas* pRedlSaveData;
+ SwUndoId nUserId;
+ BOOL bHiddenRedlines;
+
+ virtual void _Undo( SwUndoIter& );
+ virtual void _Redo( SwUndoIter& );
+
+public:
+ SwUndoRedline( SwUndoId nUserId, const SwPaM& rRange );
+ virtual ~SwUndoRedline();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ SwUndoId GetUserId() const { return nUserId; }
+ USHORT GetRedlSaveCount() const
+ { return pRedlSaveData ? pRedlSaveData->Count() : 0; }
+};
+
+class SwUndoRedlineDelete : public SwUndoRedline
+{
+ BOOL bCanGroup : 1;
+ BOOL bIsDelim : 1;
+ BOOL bIsBackspace : 1;
+
+ virtual void _Undo( SwUndoIter& );
+ virtual void _Redo( SwUndoIter& );
+
+public:
+ SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUserId = UNDO_EMPTY );
+
+ BOOL CanGrouping( const SwUndoRedlineDelete& rPrev );
+};
+
+class SwUndoRedlineSort : public SwUndoRedline
+{
+ SwSortOptions* pOpt;
+ ULONG nSaveEndNode, nOffset;
+ xub_StrLen nSaveEndCntnt;
+
+ virtual void _Undo( SwUndoIter& );
+ virtual void _Redo( SwUndoIter& );
+
+public:
+ SwUndoRedlineSort( const SwPaM& rRange, const SwSortOptions& rOpt );
+ virtual ~SwUndoRedlineSort();
+ virtual void Repeat( SwUndoIter& );
+
+ void SetSaveRange( const SwPaM& rRange );
+ void SetOffset( const SwNodeIndex& rIdx );
+};
+
+class SwUndoAcceptRedline : public SwUndoRedline
+{
+ virtual void _Redo( SwUndoIter& );
+public:
+ SwUndoAcceptRedline( const SwPaM& rRange );
+ virtual void Repeat( SwUndoIter& );
+};
+
+class SwUndoRejectRedline : public SwUndoRedline
+{
+ virtual void _Redo( SwUndoIter& );
+public:
+ SwUndoRejectRedline( const SwPaM& rRange );
+ virtual void Repeat( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoCompDoc : public SwUndo, public SwUndRng
+{
+ SwRedlineData* pRedlData;
+ SwUndoDelete* pUnDel, *pUnDel2;
+ SwRedlineSaveDatas* pRedlSaveData;
+ BOOL bInsert;
+public:
+ SwUndoCompDoc( const SwPaM& rRg, BOOL bIns );
+ SwUndoCompDoc( const SwRedline& rRedl );
+
+ virtual ~SwUndoCompDoc();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+
+//--------------------------------------------------------------------
+
+// Object der als Iterator durch die Undo-Liste laeuft, bis die
+// letze oder die angegebene Klammerung/Id erreicht ist.
+
+class SwUndoIter
+{
+ friend class SwDoc; // um im SwDoc::Undo bWeiter zu stezen
+ friend void SwUndoEnd::Undo( SwUndoIter& );
+ friend void SwUndoStart::Undo( SwUndoIter& );
+ friend void SwUndoEnd::Redo( SwUndoIter& );
+ friend void SwUndoStart::Redo( SwUndoIter& );
+ friend void SwUndoEnd::Repeat( SwUndoIter& );
+ friend void SwUndoStart::Repeat( SwUndoIter& );
+ friend void SwUndoReplace::Undo( SwUndoIter& );
+ friend void SwUndoReplace::Redo( SwUndoIter& );
+
+ SwUndoId nUndoId;
+ USHORT nEndCnt;
+ BOOL bWeiter : 1;
+ BOOL bUpdateAttr : 1; // Setze das GCAttr an der CursorShell
+
+public:
+ SwPaM * pAktPam; // Member fuer das Undo
+ SwUndo* pLastUndoObj; // fuers Redo, das vorherige UndoObj.
+ SwFrmFmt* pSelFmt; // ggfs. das Format Rahmen/Object-Selektionen
+ SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
+
+ SwUndoIter( SwPaM * pPam, SwUndoId nId = UNDO_EMPTY );
+
+ BOOL IsNextUndo() const { return bWeiter; }
+ BOOL IsUpdateAttr() const { return bUpdateAttr; }
+ void SetUpdateAttr( BOOL bNew ) { bUpdateAttr = bNew; }
+
+ inline SwDoc& GetDoc() const;
+ SwUndoId GetId() const { return nUndoId; }
+ SwUndoId GetLastUndoId() const
+ { return pLastUndoObj ? pLastUndoObj->GetId() : UNDO_EMPTY ; }
+ void ClearSelections() { pSelFmt = 0; pMarkList = 0; }
+};
+
+
+// -> #111827#
+const int nUndoStringLength = 20;
+
+/**
+ Shortens a string to a maximum length.
+
+ @param rStr the string to be shortened
+ @param nLength the maximum length for rStr
+ @param rFillStr string to replace cut out characters with
+
+ If rStr has less than nLength characters it will be returned unaltered.
+
+ If rStr has more than nLength characters the following algorithm
+ generates the shortened string:
+
+ frontLength = (nLength - length(rFillStr)) / 2
+ rearLength = nLength - length(rFillStr) - frontLength
+ shortenedString = concat(<first frontLength characters of rStr,
+ rFillStr,
+ <last rearLength characters of rStr>)
+
+ Preconditions:
+ - nLength - length(rFillStr) >= 2
+
+ @return the shortened string
+ */
+String ShortenString(const String & rStr, xub_StrLen nLength, const String & rFillStr);
+// <- #111827#
+
+// #16487#
+/**
+ Denotes special characters in a string.
+
+ The rStr is split into parts containing special characters and
+ parts not containing special characters. In a part containing
+ special characters all characters are equal. These parts are
+ maximal.
+
+ @param rStr the string to denote in
+
+ The resulting string is generated by concatenating the found
+ parts. The parts without special characters are surrounded by
+ "'". The parts containing special characters are denoted as "n x",
+ where n is the length of the part and x is the representation of
+ the special character (i. e. "tab(s)").
+
+ @return the denoted string
+*/
+String DenoteSpecialCharacters(const String & rStr);
+
+#endif
diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx
new file mode 100644
index 000000000000..b115919a5623
--- /dev/null
+++ b/sw/inc/unoatxt.hxx
@@ -0,0 +1,309 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoatxt.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOATXT_HXX
+#define _UNOATXT_HXX
+
+#include <com/sun/star/text/XAutoTextGroup.hpp>
+#include <com/sun/star/text/XAutoTextEntry.hpp>
+#include <com/sun/star/text/XAutoTextContainer.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <svtools/itemprop.hxx>
+#include <svtools/lstner.hxx>
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <cppuhelper/implbase5.hxx> // helper for implementations
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <svtools/unoevent.hxx>
+class SwTextBlocks;
+class SwGlossaries;
+class SwDoc;
+class SwDocShell;
+class SwXBodyText;
+
+#ifndef SW_DECL_SWDOCSHELL_DEFINED
+#define SW_DECL_SWDOCSHELL_DEFINED
+#include <tools/ref.hxx>
+SV_DECL_REF( SwDocShell )
+#endif
+
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL SwXAutoTextContainer_createInstance(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ) throw ( ::com::sun::star::uno::Exception );
+
+class SwXAutoTextContainer : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::text::XAutoTextContainer,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XIndexAccess
+>
+{
+ SwGlossaries *pGlossaries;
+
+protected:
+ virtual ~SwXAutoTextContainer(); // ref-counted objects are not to be deleted from outside -> protected dtor
+
+public:
+ SwXAutoTextContainer();
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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);
+
+ //XAutoTextContainer
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextGroup > SAL_CALL insertNewByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/* -----------------26.05.98 15:55-------------------
+ *
+ * --------------------------------------------------*/
+class SwXAutoTextGroup : public cppu::WeakImplHelper6
+<
+ ::com::sun::star::text::XAutoTextGroup,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>
+{
+ const SfxItemPropertySet* pPropSet;
+ SwGlossaries* pGlossaries;
+ rtl::OUString sName;
+ String m_sGroupName; // prefix m_ to disambiguate from some local vars in the implementation
+
+protected:
+ virtual ~SwXAutoTextGroup(); // ref-counted objects are not to be deleted from outside -> protected dtor
+
+public:
+ SwXAutoTextGroup(const rtl::OUString& rName, SwGlossaries* pGloss/*SwTextBlocks* pGroup*/);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XAutoTextGroup
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getTitles(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL renameByName(const rtl::OUString& aElementName, const rtl::OUString& aNewElementName, const rtl::OUString& aNewElementTitle) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry > SAL_CALL insertNewByName(const rtl::OUString& aName, const rtl::OUString& aTitle, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const rtl::OUString& aEntryName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException );
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) 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 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //
+ void Invalidate();
+};
+
+/* -----------------17.06.98 12:03-------------------
+ *
+ * --------------------------------------------------*/
+class SwXAutoTextEntry
+ :public SfxListener
+ ,public cppu::WeakImplHelper5
+ <
+ ::com::sun::star::text::XAutoTextEntry,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::text::XText,
+ ::com::sun::star::document::XEventsSupplier
+ >
+{
+ SwGlossaries* pGlossaries;
+ String sGroupName;
+ String sEntryName;
+ SwDocShellRef xDocSh;
+ SwXBodyText* pBodyText;
+ com::sun::star::uno::Reference < com::sun::star::lang::XServiceInfo> xBodyText;
+
+ void EnsureBodyText ()
+ {
+ if ( !pBodyText )
+ GetBodyText();
+ }
+ void GetBodyText ();
+
+protected:
+ /** ensure that the current content (which may only be in-memory so far) is flushed to the auto text group file
+
+ <p>If somebody modifies an auto text via this class, then this is not directly reflected to the respective
+ glossaries file (on disk), instead we hold a copy of this text (in [p|x]BodyText). On the other hand,
+ in applyTo, we do not work with this _copy_, but just tell the target for the application to insert
+ the content which we're responsible for - and this target doesn't know about our copy, but only
+ about the persistent version.</br>
+ So we need to ensure that before somebody else does something with our auto text, we flush our
+ (in-memory) copy to disk.</p>
+
+ */
+ void implFlushDocument( bool _bCloseDoc = false );
+
+ // SfxListener overridables
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+protected:
+ virtual ~SwXAutoTextEntry(); // ref-counted objects are not to be deleted from outside -> protected dtor
+
+public:
+ SwXAutoTextEntry(SwGlossaries* , const String& rGroupName, const String& rEntryName);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XAutoTextEntry
+ virtual void SAL_CALL applyTo(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange)throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pGlossaries = 0;}
+ const SwGlossaries* GetGlossaries() { return pGlossaries; }
+ const String& GetGroupName() {return sGroupName;}
+ const String& GetEntryName() {return sEntryName;}
+};
+
+
+/** Implement the XNameAccess for the AutoText events */
+class SwAutoTextEventDescriptor : public SvBaseEventDescriptor
+{
+ ::rtl::OUString sSwAutoTextEventDescriptor;
+
+ SwXAutoTextEntry& rAutoTextEntry;
+
+ using SvBaseEventDescriptor::replaceByName;
+ using SvBaseEventDescriptor::getByName;
+
+public:
+ SwAutoTextEventDescriptor( SwXAutoTextEntry& rAutoText );
+
+ ~SwAutoTextEventDescriptor();
+
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+
+ virtual void replaceByName(
+ const USHORT nEvent, /// item ID of event
+ const SvxMacro& rMacro) /// event (will be copied)
+ throw(
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void getByName(
+ SvxMacro& rMacro, /// macro to be filled
+ const USHORT nEvent ) /// item ID of event
+ throw(
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
new file mode 100644
index 000000000000..17b6e6f5d080
--- /dev/null
+++ b/sw/inc/unobaseclass.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unobaseclass.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOBASECLASS_HXX
+#define _UNOBASECLASS_HXX
+
+#include <calbck.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <cppuhelper/implbase2.hxx>
+
+typedef
+cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XEnumeration,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwSimpleEnumerationBaseClass;
+
+#endif
+
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
new file mode 100644
index 000000000000..955030cbada8
--- /dev/null
+++ b/sw/inc/unochart.hxx
@@ -0,0 +1,430 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unochart.hxx,v $
+ * $Revision: 1.6.256.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOCHART_HXX
+#define _UNOCHART_HXX
+
+#include <map>
+#include <set>
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/data/XDataSequence.hpp>
+#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
+#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
+#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
+#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
+#include <com/sun/star/chart2/data/DataSequenceRole.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+#include <cppuhelper/interfacecontainer.h> //OMultiTypeInterfaceContainerHelper
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <cppuhelper/implbase10.hxx> // helper for implementations
+#include <cppuhelper/weakref.hxx>
+
+
+#include <calbck.hxx>
+#include <unoobj.hxx>
+
+
+class SwDoc;
+class SwTable;
+class SwTableBox;
+class SwUnoCrsr;
+struct SwRangeDescriptor;
+class SwSelBoxes;
+
+//////////////////////////////////////////////////////////////////////
+
+sal_Bool FillRangeDescriptor( SwRangeDescriptor &rDesc, const String &rCellRangeName );
+
+//////////////////////////////////////////////////////////////////////
+
+class SwChartHelper
+{
+public:
+ static void DoUpdateAllCharts( SwDoc* pDoc );
+};
+
+//////////////////////////////////////////////////////////////////////
+
+class SwChartLockController_Helper
+{
+ SwDoc *pDoc;
+
+ DECL_LINK( DoUnlockAllCharts, Timer * );
+ Timer aUnlockTimer; // timer to unlock chart controllers
+ bool bIsLocked;
+
+
+ // disallow use of d-tor, copy c-tor and assignment operator
+ SwChartLockController_Helper( const SwChartLockController_Helper & );
+ SwChartLockController_Helper & operator = ( const SwChartLockController_Helper & );
+
+ void LockUnlockAllCharts( sal_Bool bLock );
+ void LockAllCharts() { LockUnlockAllCharts( sal_True ); };
+ void UnlockAllCharts() { LockUnlockAllCharts( sal_False ); };
+
+public:
+ SwChartLockController_Helper( SwDoc *pDocument );
+ ~SwChartLockController_Helper();
+
+ void StartOrContinueLocking();
+ void Disconnect();
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper4
+<
+ ::com::sun::star::chart2::data::XDataProvider,
+ ::com::sun::star::chart2::data::XRangeXMLConversion,
+ ::com::sun::star::lang::XComponent,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwChartDataProviderBaseClass;
+
+class SwChartDataProvider :
+ public SwChartDataProviderBaseClass,
+ public SwClient
+{
+
+ // used to keep weak-references to all data-sequences of a single table
+ // see set definition below...
+ struct lt_DataSequenceRef
+ {
+ bool operator()( ::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > xWRef1, ::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > xWRef2 ) const
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > xRef1( xWRef1 );
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > xRef2( xWRef2 );
+ return xRef1.get() < xRef2.get();
+ }
+ };
+ typedef std::set< ::com::sun::star::uno::WeakReference < ::com::sun::star::chart2::data::XDataSequence >, lt_DataSequenceRef > Set_DataSequenceRef_t;
+
+ // map of data-sequence sets for each table
+ struct lt_SwTable_Ptr
+ {
+ bool operator()( const SwTable *p1, const SwTable *p2 ) const
+ {
+ return p1 < p2;
+ }
+ };
+ typedef std::map< const SwTable *, Set_DataSequenceRef_t, lt_SwTable_Ptr > Map_Set_DataSequenceRef_t;
+
+
+ // map of all data-sequences provided directly or indirectly (e.g. via
+ // data-source) by this object. Since there is only one object of this type
+ // for each document it should hold references to all used data-sequences for
+ // all tables of the document.
+ mutable Map_Set_DataSequenceRef_t aDataSequences;
+
+ ::cppu::OInterfaceContainerHelper aEvtListeners;
+ const SwDoc * pDoc;
+ sal_Bool bDisposed;
+
+
+ // disallow use of c-tor and assignment operator
+ SwChartDataProvider( const SwChartDataProvider & );
+ SwChartDataProvider & operator = ( const SwChartDataProvider & );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL Impl_createDataSource( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments, sal_Bool bTestOnly = sal_False ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL Impl_createDataSequenceByRangeRepresentation( const ::rtl::OUString& aRangeRepresentation, sal_Bool bTestOnly = sal_False ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ rtl::OUString GetBrokenCellRangeForExport( const rtl::OUString &rCellRangeRepresentation );
+
+public:
+ SwChartDataProvider( const SwDoc* pDoc );
+ virtual ~SwChartDataProvider();
+
+ // XDataProvider
+ virtual ::sal_Bool SAL_CALL createDataSourcePossible( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XRangeXMLConversion
+ virtual ::rtl::OUString SAL_CALL convertRangeToXML( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& aXMLRange ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // 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);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ void AddDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence );
+ void RemoveDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence );
+
+ // will send modifdied events for all data-sequences of the table
+ void InvalidateTable( const SwTable *pTable );
+ sal_Bool DeleteBox( const SwTable *pTable, const SwTableBox &rBox );
+ void DisposeAllDataSequences( const SwTable *pTable );
+
+ // functionality needed to get notified about new added rows/cols
+ void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, USHORT nLines, BOOL bBehind );
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper2
+<
+ ::com::sun::star::chart2::data::XDataSource,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwChartDataSourceBaseClass;
+
+class SwChartDataSource :
+ public SwChartDataSourceBaseClass
+{
+ com::sun::star::uno::Sequence<
+ com::sun::star::uno::Reference<
+ com::sun::star::chart2::data::XLabeledDataSequence > > aLDS;
+
+ // disallow use of c-tor and assignment operator
+ SwChartDataSource( const SwChartDataSource & );
+ SwChartDataSource & operator = ( const SwChartDataSource & );
+
+public:
+ SwChartDataSource( const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::data::XLabeledDataSequence > > &rLDS );
+ virtual ~SwChartDataSource();
+
+ // XDataSource
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences( ) 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);
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper10
+<
+ ::com::sun::star::chart2::data::XDataSequence,
+ ::com::sun::star::chart2::data::XTextualDataSequence,
+ ::com::sun::star::chart2::data::XNumericalDataSequence,
+ ::com::sun::star::util::XCloneable,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::util::XModifiable,
+ ::com::sun::star::lang::XEventListener,
+ ::com::sun::star::lang::XComponent
+>
+SwChartDataSequenceBaseClass;
+
+class SwChartDataSequence :
+ public SwChartDataSequenceBaseClass,
+ public SwClient
+{
+ ::cppu::OInterfaceContainerHelper aEvtListeners;
+ ::cppu::OInterfaceContainerHelper aModifyListeners;
+ ::com::sun::star::chart2::data::DataSequenceRole aRole;
+
+ String aRowLabelText;
+ String aColLabelText;
+
+ // holds a reference to the data-provider to guarantee it's lifetime last as
+ // long as the pointer may be used.
+ ::com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider > xDataProvider;
+ SwChartDataProvider * pDataProvider;
+
+ SwUnoCrsr* pTblCrsr; // cursor spanned over cells to use
+ SwDepend aCursorDepend; //the cursor is removed after the doc has been removed
+
+ const SfxItemPropertySet* _pPropSet;
+
+ sal_Bool bDisposed;
+
+ // disallow use of c-tor and assignment operator
+ SwChartDataSequence( const SwChartDataSequence &rObj );
+ SwChartDataSequence & operator = ( const SwChartDataSequence & );
+
+public:
+ SwChartDataSequence( SwChartDataProvider &rProvider,
+ SwFrmFmt &rTblFmt,
+ SwUnoCrsr *pTableCursor );
+ virtual ~SwChartDataSequence();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XDataSequence
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getData( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL generateLabel( ::com::sun::star::chart2::data::LabelOrigin eLabelOrigin ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XTextualDataSequence
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XNumericalDataSequence
+ virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getNumericalData( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ // 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);
+
+ // XModifiable
+ virtual ::sal_Bool SAL_CALL isModified( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setModified( ::sal_Bool bModified ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+
+ // XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ sal_Bool DeleteBox( const SwTableBox &rBox );
+
+ void FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const;
+ bool ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount );
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper6
+<
+ ::com::sun::star::chart2::data::XLabeledDataSequence,
+ ::com::sun::star::util::XCloneable,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::util::XModifyListener,
+ ::com::sun::star::util::XModifyBroadcaster,
+ ::com::sun::star::lang::XComponent
+>
+SwChartLabeledDataSequenceBaseClass;
+
+class SwChartLabeledDataSequence :
+ public SwChartLabeledDataSequenceBaseClass
+{
+ ::cppu::OInterfaceContainerHelper aEvtListeners;
+ ::cppu::OInterfaceContainerHelper aModifyListeners;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XDataSequence > xData;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XDataSequence > xLabels;
+
+ sal_Bool bDisposed;
+
+ // disallow use of c-tor and assignment operator
+ SwChartLabeledDataSequence( const SwChartLabeledDataSequence & );
+ SwChartLabeledDataSequence & operator = ( const SwChartLabeledDataSequence & );
+
+ void SetDataSequence( ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& rxDest, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& rxSource );
+
+
+public:
+ SwChartLabeledDataSequence();
+ virtual ~SwChartLabeledDataSequence();
+
+ // XLabeledDataSequence
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setValues( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabel( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) 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);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+//////////////////////////////////////////////////////////////////////
+
+#endif
+
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
new file mode 100644
index 000000000000..1a7401fd4a33
--- /dev/null
+++ b/sw/inc/unocoll.hxx
@@ -0,0 +1,584 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unocoll.hxx,v $
+ * $Revision: 1.26 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOCOLL_HXX
+#define _UNOCOLL_HXX
+#include <tools/solar.h>
+#include <flyenum.hxx>
+#include <vcl/timer.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <tools/string.hxx>
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <IMark.hxx>
+#include <unobaseclass.hxx>
+/***************************************************
+ ***************************************************
+ *
+ ***************************************************/
+class SwDoc;
+class SwFrmFmt;
+namespace com{namespace sun {namespace star {namespace text
+{
+ class XTextTable;
+ class XTextSection;
+ class XFootnote;
+}}}}
+class SwXFrame;
+class SwFrmFmt;
+class SwFmtFtn;
+class XBookmark;
+class SwXReferenceMark;
+class SwSectionFmt;
+class SwFmtRefMark;
+class SwXReferenceMark;
+class SwXBookmark;
+/*-----------------11.03.98 11:19-------------------
+
+--------------------------------------------------*/
+class SwUnoCollection
+{
+ SwDoc* pDoc;
+ sal_Bool bObjectValid;
+
+ public:
+ SwUnoCollection(SwDoc* p) :
+ pDoc(p),
+ bObjectValid(sal_True){}
+
+ virtual void Invalidate();
+ sal_Bool IsValid() const {return bObjectValid;}
+
+
+ SwDoc* GetDoc() const {return pDoc;}
+};
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+#define SW_SERVICE_TYPE_TEXTTABLE 0
+#define SW_SERVICE_TYPE_TEXTFRAME 1
+#define SW_SERVICE_TYPE_GRAPHIC 2
+#define SW_SERVICE_TYPE_OLE 3
+#define SW_SERVICE_TYPE_BOOKMARK 4
+#define SW_SERVICE_TYPE_FOOTNOTE 5
+#define SW_SERVICE_TYPE_ENDNOTE 6
+#define SW_SERVICE_TYPE_INDEXMARK 7
+#define SW_SERVICE_TYPE_INDEX 8
+#define SW_SERVICE_REFERENCE_MARK 9
+#define SW_SERVICE_STYLE_CHARACTER_STYLE 10
+#define SW_SERVICE_STYLE_PARAGRAPH_STYLE 11
+#define SW_SERVICE_STYLE_FRAME_STYLE 12
+#define SW_SERVICE_STYLE_PAGE_STYLE 13
+#define SW_SERVICE_STYLE_NUMBERING_STYLE 14
+#define SW_SERVICE_CONTENT_INDEX_MARK 15
+#define SW_SERVICE_CONTENT_INDEX 16
+#define SW_SERVICE_USER_INDEX_MARK 17
+#define SW_SERVICE_USER_INDEX 18
+#define SW_SERVICE_TEXT_SECTION 19
+#define SW_SERVICE_FIELDTYPE_DATETIME 20
+#define SW_SERVICE_FIELDTYPE_USER 21
+#define SW_SERVICE_FIELDTYPE_SET_EXP 22
+#define SW_SERVICE_FIELDTYPE_GET_EXP 23
+#define SW_SERVICE_FIELDTYPE_FILE_NAME 24
+#define SW_SERVICE_FIELDTYPE_PAGE_NUM 25
+#define SW_SERVICE_FIELDTYPE_AUTHOR 26
+#define SW_SERVICE_FIELDTYPE_CHAPTER 27
+#define SW_SERVICE_FIELDTYPE_DUMMY_0 28
+#define SW_SERVICE_FIELDTYPE_GET_REFERENCE 29
+#define SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT 30
+#define SW_SERVICE_FIELDTYPE_ANNOTATION 31
+#define SW_SERVICE_FIELDTYPE_INPUT 32
+#define SW_SERVICE_FIELDTYPE_MACRO 33
+#define SW_SERVICE_FIELDTYPE_DDE 34
+#define SW_SERVICE_FIELDTYPE_HIDDEN_PARA 35
+#define SW_SERVICE_FIELDTYPE_DOC_INFO 36
+#define SW_SERVICE_FIELDTYPE_TEMPLATE_NAME 37
+#define SW_SERVICE_FIELDTYPE_USER_EXT 38
+#define SW_SERVICE_FIELDTYPE_REF_PAGE_SET 39
+#define SW_SERVICE_FIELDTYPE_REF_PAGE_GET 40
+#define SW_SERVICE_FIELDTYPE_JUMP_EDIT 41
+#define SW_SERVICE_FIELDTYPE_SCRIPT 42
+#define SW_SERVICE_FIELDTYPE_DATABASE_NEXT_SET 43
+#define SW_SERVICE_FIELDTYPE_DATABASE_NUM_SET 44
+#define SW_SERVICE_FIELDTYPE_DATABASE_SET_NUM 45
+#define SW_SERVICE_FIELDTYPE_DATABASE 46
+#define SW_SERVICE_FIELDTYPE_DATABASE_NAME 47
+#define SW_SERVICE_FIELDTYPE_TABLE_FORMULA 48
+#define SW_SERVICE_FIELDTYPE_PAGE_COUNT 49
+#define SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT 50
+#define SW_SERVICE_FIELDTYPE_WORD_COUNT 51
+#define SW_SERVICE_FIELDTYPE_CHARACTER_COUNT 52
+#define SW_SERVICE_FIELDTYPE_TABLE_COUNT 53
+#define SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT 54
+#define SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT 55
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR 56
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME 57
+#define SW_SERVICE_FIELDTYPE_DOCINFO_EDIT_TIME 58
+#define SW_SERVICE_FIELDTYPE_DOCINFO_DESCRIPTION 59
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_AUTHOR 60
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_DATE_TIME 61
+#define SW_SERVICE_FIELDTYPE_DUMMY_O 62
+#define SW_SERVICE_FIELDTYPE_DUMMY_1 63
+#define SW_SERVICE_FIELDTYPE_DUMMY_2 64
+#define SW_SERVICE_FIELDTYPE_DUMMY_3 65
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CUSTOM 66
+#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_AUTHOR 67
+#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_DATE_TIME 68
+#define SW_SERVICE_FIELDTYPE_DOCINFO_KEY_WORDS 69
+#define SW_SERVICE_FIELDTYPE_DOCINFO_SUBJECT 70
+#define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 71
+#define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 72
+#define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 73
+#define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS 74
+#define SW_SERVICE_FIELDTYPE_DROPDOWN 75
+#define SW_SERVICE_FIELDTYPE_METAFIELD 76
+#define SW_SERVICE_FIELDTYPE_DUMMY_4 77
+#define SW_SERVICE_FIELDTYPE_DUMMY_5 78
+#define SW_SERVICE_FIELDTYPE_DUMMY_6 79
+#define SW_SERVICE_FIELDTYPE_DUMMY_7 80
+#define SW_SERVICE_FIELDMASTER_USER 81
+#define SW_SERVICE_FIELDMASTER_DDE 82
+#define SW_SERVICE_FIELDMASTER_SET_EXP 83
+#define SW_SERVICE_FIELDMASTER_DATABASE 84
+#define SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY 85
+#define SW_SERVICE_FIELDMASTER_DUMMY2 86
+#define SW_SERVICE_FIELDMASTER_DUMMY3 87
+#define SW_SERVICE_FIELDMASTER_DUMMY4 88
+#define SW_SERVICE_FIELDMASTER_DUMMY5 89
+#define SW_SERVICE_INDEX_ILLUSTRATIONS 90
+#define SW_SERVICE_INDEX_OBJECTS 91
+#define SW_SERVICE_INDEX_TABLES 92
+#define SW_SERVICE_INDEX_BIBLIOGRAPHY 93
+#define SW_SERVICE_PARAGRAPH 94
+#define SW_SERVICE_FIELDTYPE_INPUT_USER 95
+#define SW_SERVICE_FIELDTYPE_HIDDEN_TEXT 96
+#define SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE 97
+#define SW_SERVICE_NUMBERING_RULES 98
+#define SW_SERVICE_TEXT_COLUMNS 99
+#define SW_SERVICE_INDEX_HEADER_SECTION 100
+#define SW_SERVICE_DEFAULTS 101
+#define SW_SERVICE_IMAP_RECTANGLE 102
+#define SW_SERVICE_IMAP_CIRCLE 103
+#define SW_SERVICE_IMAP_POLYGON 104
+#define SW_SERVICE_TYPE_TEXT_GRAPHIC 105
+#define SW_SERVICE_CHART2_DATA_PROVIDER 106
+#define SW_SERVICE_TYPE_FIELDMARK 107
+#define SW_SERVICE_TYPE_FORMFIELDMARK 108
+#define SW_SERVICE_TYPE_META 109
+
+#define SW_SERVICE_LAST SW_SERVICE_TYPE_META
+
+#define SW_SERVICE_INVALID USHRT_MAX
+
+//
+// case-corrected versions of service-names (see #i67811)
+//
+#define CSS_TEXT_TEXTFIELD_DATE_TIME "com.sun.star.text.textfield.DateTime"
+#define CSS_TEXT_TEXTFIELD_USER "com.sun.star.text.textfield.User"
+#define CSS_TEXT_TEXTFIELD_SET_EXPRESSION "com.sun.star.text.textfield.SetExpression"
+#define CSS_TEXT_TEXTFIELD_GET_EXPRESSION "com.sun.star.text.textfield.GetExpression"
+#define CSS_TEXT_TEXTFIELD_FILE_NAME "com.sun.star.text.textfield.FileName"
+#define CSS_TEXT_TEXTFIELD_PAGE_NUMBER "com.sun.star.text.textfield.PageNumber"
+#define CSS_TEXT_TEXTFIELD_AUTHOR "com.sun.star.text.textfield.Author"
+#define CSS_TEXT_TEXTFIELD_CHAPTER "com.sun.star.text.textfield.Chapter"
+#define CSS_TEXT_TEXTFIELD_GET_REFERENCE "com.sun.star.text.textfield.GetReference"
+#define CSS_TEXT_TEXTFIELD_CONDITIONAL_TEXT "com.sun.star.text.textfield.ConditionalText"
+#define CSS_TEXT_TEXTFIELD_ANNOTATION "com.sun.star.text.textfield.Annotation"
+#define CSS_TEXT_TEXTFIELD_INPUT "com.sun.star.text.textfield.Input"
+#define CSS_TEXT_TEXTFIELD_MACRO "com.sun.star.text.textfield.Macro"
+#define CSS_TEXT_TEXTFIELD_DDE "com.sun.star.text.textfield.DDE"
+#define CSS_TEXT_TEXTFIELD_HIDDEN_PARAGRAPH "com.sun.star.text.textfield.HiddenParagraph"
+#define CSS_TEXT_TEXTFIELD_TEMPLATE_NAME "com.sun.star.text.textfield.TemplateName"
+#define CSS_TEXT_TEXTFIELD_EXTENDED_USER "com.sun.star.text.textfield.ExtendedUser"
+#define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_SET "com.sun.star.text.textfield.ReferencePageSet"
+#define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_GET "com.sun.star.text.textfield.ReferencePageGet"
+#define CSS_TEXT_TEXTFIELD_JUMP_EDIT "com.sun.star.text.textfield.JumpEdit"
+#define CSS_TEXT_TEXTFIELD_SCRIPT "com.sun.star.text.textfield.Script"
+#define CSS_TEXT_TEXTFIELD_DATABASE_NEXT_SET "com.sun.star.text.textfield.DatabaseNextSet"
+#define CSS_TEXT_TEXTFIELD_DATABASE_NUMBER_OF_SET "com.sun.star.text.textfield.DatabaseNumberOfSet"
+#define CSS_TEXT_TEXTFIELD_DATABASE_SET_NUMBER "com.sun.star.text.textfield.DatabaseSetNumber"
+#define CSS_TEXT_TEXTFIELD_DATABASE "com.sun.star.text.textfield.Database"
+#define CSS_TEXT_TEXTFIELD_DATABASE_NAME "com.sun.star.text.textfield.DatabaseName"
+#define CSS_TEXT_TEXTFIELD_TABLE_FORMULA "com.sun.star.text.textfield.TableFormula"
+#define CSS_TEXT_TEXTFIELD_PAGE_COUNT "com.sun.star.text.textfield.PageCount"
+#define CSS_TEXT_TEXTFIELD_PARAGRAPH_COUNT "com.sun.star.text.textfield.ParagraphCount"
+#define CSS_TEXT_TEXTFIELD_WORD_COUNT "com.sun.star.text.textfield.WordCount"
+#define CSS_TEXT_TEXTFIELD_CHARACTER_COUNT "com.sun.star.text.textfield.CharacterCount"
+#define CSS_TEXT_TEXTFIELD_TABLE_COUNT "com.sun.star.text.textfield.TableCount"
+#define CSS_TEXT_TEXTFIELD_GRAPHIC_OBJECT_COUNT "com.sun.star.text.textfield.GraphicObjectCount"
+#define CSS_TEXT_TEXTFIELD_EMBEDDED_OBJECT_COUNT "com.sun.star.text.textfield.EmbeddedObjectCount"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_AUTHOR "com.sun.star.text.textfield.docinfo.ChangeAuthor"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_DATE_TIME "com.sun.star.text.textfield.docinfo.ChangeDateTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_EDIT_TIME "com.sun.star.text.textfield.docinfo.EditTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_DESCRIPTION "com.sun.star.text.textfield.docinfo.Description"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_AUTHOR "com.sun.star.text.textfield.docinfo.CreateAuthor"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_DATE_TIME "com.sun.star.text.textfield.docinfo.CreateDateTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_AUTHOR "com.sun.star.text.textfield.docinfo.PrintAuthor"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_DATE_TIME "com.sun.star.text.textfield.docinfo.PrintDateTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_KEY_WORDS "com.sun.star.text.textfield.docinfo.KeyWords"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_SUBJECT "com.sun.star.text.textfield.docinfo.Subject"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_TITLE "com.sun.star.text.textfield.docinfo.Title"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_REVISION "com.sun.star.text.textfield.docinfo.Revision"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CUSTOM "com.sun.star.text.textfield.docinfo.Custom"
+#define CSS_TEXT_TEXTFIELD_BIBLIOGRAPHY "com.sun.star.text.textfield.Bibliography"
+#define CSS_TEXT_TEXTFIELD_COMBINED_CHARACTERS "com.sun.star.text.textfield.CombinedCharacters"
+#define CSS_TEXT_TEXTFIELD_DROP_DOWN "com.sun.star.text.textfield.DropDown"
+#define CSS_TEXT_TEXTFIELD_INPUT_USER "com.sun.star.text.textfield.InputUser"
+#define CSS_TEXT_TEXTFIELD_HIDDEN_TEXT "com.sun.star.text.textfield.HiddenText"
+#define CSS_TEXT_FIELDMASTER_USER "com.sun.star.text.fieldmaster.User"
+#define CSS_TEXT_FIELDMASTER_DDE "com.sun.star.text.fieldmaster.DDE"
+#define CSS_TEXT_FIELDMASTER_SET_EXPRESSION "com.sun.star.text.fieldmaster.SetExpression"
+#define CSS_TEXT_FIELDMASTER_DATABASE "com.sun.star.text.fieldmaster.Database"
+#define CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY "com.sun.star.text.fieldmaster.Bibliography"
+
+
+class SwXServiceProvider
+{
+public:
+ static rtl::OUString GetProviderName(sal_uInt16 nObjectType);
+ static sal_uInt16 GetProviderType(const rtl::OUString& rServiceName);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc);
+ static ::com::sun::star::uno::Sequence<rtl::OUString> GetAllServiceNames();
+
+};
+/*-----------------11.12.97 09:38-------------------
+
+--------------------------------------------------*/
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwCollectionBaseClass;
+class SwXTextTables : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextTables();
+public:
+ SwXTextTables(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::text::XTextTable* GetObject( SwFrmFmt& rFmt );
+};
+
+typedef
+cppu::WeakImplHelper4
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XServiceInfo
+> SwXFramesBaseClass;
+
+class SwXFrames : public SwXFramesBaseClass,
+ public SwUnoCollection
+{
+ const FlyCntType eType;
+protected:
+ virtual ~SwXFrames();
+public:
+ SwXFrames(SwDoc* pDoc, FlyCntType eSet);
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //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 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ FlyCntType GetType()const{return eType;}
+ static SwXFrame* GetObject( SwFrmFmt& rFmt, FlyCntType eType );
+
+};
+
+/*-----------------20.02.98 10:51-------------------
+
+--------------------------------------------------*/
+class SwXTextFrames : public SwXFrames
+{
+protected:
+ virtual ~SwXTextFrames();
+public:
+ SwXTextFrames(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXTextFrames, UsrObject );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/*-----------------20.02.98 10:55-------------------
+
+--------------------------------------------------*/
+class SwXTextGraphicObjects : public SwXFrames
+{
+protected:
+ virtual ~SwXTextGraphicObjects();
+public:
+ SwXTextGraphicObjects(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXTextGraphicObjects, UsrObject );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/*-----------------20.02.98 10:57-------------------
+
+--------------------------------------------------*/
+class SwXTextEmbeddedObjects : public SwXFrames
+{
+protected:
+ virtual ~SwXTextEmbeddedObjects();
+public:
+ SwXTextEmbeddedObjects(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXTextEmbeddedObjects, UsrObject );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/*-----------------12.02.98 07:58-------------------
+
+--------------------------------------------------*/
+class SwXTextSections : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextSections();
+public:
+ SwXTextSections(SwDoc* pDoc);
+
+
+ //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 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt );
+};
+/*-----------------12.02.98 07:51-------------------
+
+--------------------------------------------------*/
+class SwXBookmarks : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+ protected:
+ virtual ~SwXBookmarks();
+ public:
+ SwXBookmarks(SwDoc* pDoc);
+
+
+ //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 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static SwXBookmark* GetObject( ::sw::mark::IMark& rBkm, SwDoc* pDoc);
+};
+
+class SwXNumberingRulesCollection : public cppu::WeakImplHelper1
+<
+ ::com::sun::star::container::XIndexAccess
+>,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXNumberingRulesCollection();
+
+public:
+ SwXNumberingRulesCollection( SwDoc* pDoc );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) 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);
+};
+
+/*-----------------12.02.98 08:01-------------------
+
+--------------------------------------------------*/
+
+typedef
+cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwSimpleIndexAccessBaseClass;
+
+class SwXFootnotes : public SwSimpleIndexAccessBaseClass,
+ public SwUnoCollection
+{
+ const bool m_bEndnote;
+
+protected:
+ virtual ~SwXFootnotes();
+public:
+ SwXFootnotes(sal_Bool bEnd, SwDoc* pDoc);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt );
+};
+
+/* -----------------27.08.98 13:10-------------------
+ *
+ * --------------------------------------------------*/
+class SwXReferenceMarks : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXReferenceMarks();
+public:
+ SwXReferenceMarks(SwDoc* pDoc);
+
+
+ //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 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark );
+};
+
+#endif
+
+
+
+
+
+
diff --git a/sw/inc/unocore.hrc b/sw/inc/unocore.hrc
new file mode 100644
index 000000000000..94c3a4cb872f
--- /dev/null
+++ b/sw/inc/unocore.hrc
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unocore.hrc,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOCORE_HRC
+#define _UNOCORE_HRC
+
+#include "rcid.hrc"
+
+#define STR_CHART2_ROW_LABEL_TEXT (RC_UNOCORE_BEGIN + 1)
+#define STR_CHART2_COL_LABEL_TEXT (RC_UNOCORE_BEGIN + 2)
+#define STR_STYLE_FAMILY_CHARACTER (RC_UNOCORE_BEGIN + 3)
+#define STR_STYLE_FAMILY_PARAGRAPH (RC_UNOCORE_BEGIN + 4)
+#define STR_STYLE_FAMILY_FRAME (RC_UNOCORE_BEGIN + 5)
+#define STR_STYLE_FAMILY_PAGE (RC_UNOCORE_BEGIN + 6)
+#define STR_STYLE_FAMILY_NUMBERING (RC_UNOCORE_BEGIN + 7)
+
+#define UNOCORE_ACT_END STR_STYLE_FAMILY_NUMBERING
+
+#if UNOCORE_ACT_END > RC_UNOCORE_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
new file mode 100644
index 000000000000..f58bc92fa3a3
--- /dev/null
+++ b/sw/inc/unocrsr.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unocrsr.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOCRSR_HXX
+#define _UNOCRSR_HXX
+#include <swcrsr.hxx>
+#include <calbck.hxx>
+
+
+class SwUnoCrsr : public virtual SwCursor, public SwModify
+{
+ BOOL bRemainInSection : 1;
+ BOOL bSkipOverHiddenSections : 1;
+ BOOL bSkipOverProtectSections : 1;
+
+public:
+ SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
+ virtual ~SwUnoCrsr();
+
+ // @@@ semantic: no copy ctor.
+ SwUnoCrsr( SwUnoCrsr& );
+private:
+ // forbidden and not implemented.
+ //SwUnoCrsr( const SwUnoCrsr& );
+ SwUnoCrsr & operator= ( const SwUnoCrsr& );
+
+protected:
+
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ virtual void DoSetBidiLevelUpDown();
+
+public:
+
+// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ // gibt es eine Selection vom Content in die Tabelle
+ // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+
+ virtual bool IsReadOnlyAvailable() const;
+
+ BOOL IsRemainInSection() const { return bRemainInSection; }
+ void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
+
+ virtual BOOL IsSkipOverProtectSections() const
+ { return bSkipOverProtectSections; }
+ void SetSkipOverProtectSections( BOOL bFlag )
+ { bSkipOverProtectSections = bFlag; }
+
+ virtual BOOL IsSkipOverHiddenSections() const
+ { return bSkipOverHiddenSections; }
+ void SetSkipOverHiddenSections( BOOL bFlag )
+ { bSkipOverHiddenSections = bFlag; }
+
+ // make copy of cursor
+ virtual SwUnoCrsr * Clone() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
+};
+
+
+
+class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor
+{
+ // die Selection hat die gleiche Reihenfolge wie die
+ // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
+ // etwas geloescht, dann muss es auch im anderen erfolgen!!
+ SwCursor aTblSel;
+
+ using SwTableCursor::MakeBoxSels;
+
+public:
+ SwUnoTableCrsr( const SwPosition& rPos );
+ virtual ~SwUnoTableCrsr();
+
+// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ // gibt es eine Selection vom Content in die Tabelle
+ // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+
+ virtual SwUnoTableCrsr * Clone() const;
+
+ void MakeBoxSels();
+
+ SwCursor& GetSelRing() { return aTblSel; }
+ const SwCursor& GetSelRing() const { return aTblSel; }
+};
+
+
+
+#endif
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
new file mode 100644
index 000000000000..613a5e51eb89
--- /dev/null
+++ b/sw/inc/unocrsrhelper.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unocrsrhelper.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOCRSRHELPER_HXX
+#define _UNOCRSRHELPER_HXX
+
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <unocrsr.hxx>
+#include <map>
+
+struct SfxItemPropertySimpleEntry;
+class SwPaM;
+class SwDoc;
+
+namespace com{ namespace sun{ namespace star{
+ namespace uno{
+ class Any;
+ }
+ namespace beans{
+ struct PropertyValue;
+ }
+}}}
+
+/* -----------------------------14.12.00 15:06--------------------------------
+
+ ---------------------------------------------------------------------------*/
+namespace SwUnoCursorHelper
+{
+ // keep Any's mapped by (WhichId << 16 ) + (MemberId)
+ typedef std::map< sal_uInt32, com::sun::star::uno::Any *> AnyMapHelper_t;
+ class SwAnyMapHelper : public AnyMapHelper_t
+ {
+ public:
+ ~SwAnyMapHelper();
+
+ void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny );
+ bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny );
+ };
+ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
+ , SwPaM& rPam
+ , com::sun::star::uno::Any *pAny
+ , com::sun::star::beans::PropertyState& eState
+ , const SwTxtNode* pNode = 0 );
+
+ void GetCurPageStyle(SwPaM& rPaM, String &rString);
+
+ inline sal_Bool IsStartOfPara(SwPaM& rUnoCrsr)
+ { return rUnoCrsr.GetPoint()->nContent == 0;}
+ inline sal_Bool IsEndOfPara(SwPaM& rUnoCrsr)
+ { return rUnoCrsr.GetCntntNode() &&
+ rUnoCrsr.GetPoint()->nContent == rUnoCrsr.GetCntntNode()->Len();}
+
+ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam);
+ void InsertFile(SwUnoCrsr* pUnoCrsr,
+ const String& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rOptions
+ ) throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException );
+
+ void getNumberingProperty(
+ SwPaM& rPam,
+ com::sun::star::beans::PropertyState& eState,
+ com::sun::star::uno::Any *pAny );
+
+ void setNumberingProperty(
+ const com::sun::star::uno::Any& rValue,
+ SwPaM& rPam);
+
+ sal_Int16 IsNodeNumStart(
+ SwPaM& rPam,
+ com::sun::star::beans::PropertyState& eState);
+
+ sal_Bool DocInsertStringSplitCR( SwDoc &rDoc,
+ const SwPaM &rNewCursor, const String &rText,
+ const bool bForceExpandHints );
+ void makeRedline( SwPaM& rPaM, const ::rtl::OUString& RedlineType,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+} // namespace SwUnoCursorHelper
+
+#endif
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
new file mode 100644
index 000000000000..05857bbc6fe1
--- /dev/null
+++ b/sw/inc/unodraw.hxx
@@ -0,0 +1,356 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unodraw.hxx,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNODRAW_HXX
+#define _UNODRAW_HXX
+
+#include <svx/fmdpage.hxx>
+#include <calbck.hxx>
+#include <frmfmt.hxx>
+#include <com/sun/star/text/XTextContent.hpp>
+// --> OD 2009-01-13 #i59051#
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+// <--
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+// --> OD 2004-07-22 #i31698#
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+// <--
+#include <svtools/itemprop.hxx>
+
+class SdrMarkList;
+class SdrView;
+class SwDoc;
+/******************************************************************************
+ *
+ ******************************************************************************/
+class SwFmDrawPage : public SvxFmDrawPage
+{
+ SdrPageView* pPageView;
+protected:
+
+ // Erzeugen eines SdrObjects anhand einer Description. Kann von
+ // abgeleiteten Klassen dazu benutzt werden, eigene ::com::sun::star::drawing::Shapes zu
+ // unterstuetzen (z.B. Controls)
+ virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape ) throw ();
+
+public:
+ SwFmDrawPage( SdrPage* pPage );
+ virtual ~SwFmDrawPage() throw ();
+
+ const SdrMarkList& PreGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes);
+ void PreUnGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > xShapeGroup);
+// void PostGroup(); ?? wird es noch gebraucht ??
+
+ SdrView* GetDrawView() {return mpView;}
+ SdrPageView* GetPageView();
+ void RemovePageView();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface( SdrObject* pObj );
+
+ // Die folgende Methode wird gerufen, wenn ein SvxShape-Objekt angelegt
+ // werden soll. abgeleitete Klassen koennen hier eine Ableitung oder
+ // ein ein SvxShape aggregierendes Objekt anlegen.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw ();
+};
+
+typedef cppu::WeakAggImplHelper4
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::drawing::XDrawPage,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::drawing::XShapeGrouper
+>
+SwXDrawPageBaseClass;
+class SwXDrawPage : public SwXDrawPageBaseClass
+{
+ SwDoc* pDoc;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xPageAgg;
+ SwFmDrawPage* pDrawPage;
+public:
+ SwXDrawPage(SwDoc* pDoc);
+ ~SwXDrawPage();
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) 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);
+
+ //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 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XShapes
+ virtual void SAL_CALL add(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL remove(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XShapeGrouper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > SAL_CALL group(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL ungroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > & aGroup) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ SwFmDrawPage* GetSvxPage();
+ // renamed and outlined to detect where it's called
+ void InvalidateSwDoc(); // {pDoc = 0;}
+};
+/* -----------------22.01.99 10:20-------------------
+ *
+ * --------------------------------------------------*/
+class SwShapeDescriptor_Impl;
+class SwXGroupShape;
+typedef
+cppu::WeakAggImplHelper6
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ // --> OD 2004-07-22 #i31698#
+ ::com::sun::star::drawing::XShape
+ // <--
+>
+SwXShapeBaseClass;
+class SwXShape : public SwXShapeBaseClass,
+ public SwClient
+{
+ friend class SwHTMLImageWatcher;
+ friend class SwHTMLParser;
+ friend class SwXGroupShape;
+ friend class SwXDrawPage;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xShapeAgg;
+ // --> OD 2004-07-23 #i31698# - reference to <XShape>, determined in the
+ // constructor by <queryAggregation> at <xShapeAgg>.
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
+ // <--
+
+ const SfxItemPropertySet* m_pPropSet;
+ const SfxItemPropertyMapEntry* m_pPropertyMapEntries;
+ com::sun::star::uno::Sequence< sal_Int8 >* pImplementationId;
+
+ SwShapeDescriptor_Impl* pImpl;
+
+ sal_Bool m_bDescriptor;
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ SvxShape* GetSvxShape();
+
+ /** method to determine top group object
+
+ OD 2004-08-03 #i31698#
+
+ @author OD
+ */
+ SdrObject* _GetTopGroupObj( SvxShape* _pSvxShape = 0L );
+
+ /** method to determine position according to the positioning attributes
+
+ OD 2004-08-03 #i31698#
+
+ @author OD
+ */
+ com::sun::star::awt::Point _GetAttrPosition();
+
+ /** method to convert the position (translation) of the drawing object to
+ the layout direction horizontal left-to-right.
+
+ OD 2004-07-27 #i31698#
+
+ @author OD
+ */
+ ::com::sun::star::awt::Point _ConvertPositionToHoriL2R(
+ const ::com::sun::star::awt::Point _aObjPos,
+ const ::com::sun::star::awt::Size _aObjSize );
+
+ /** method to convert the transformation of the drawing object to the layout
+ direction, the drawing object is in
+
+ OD 2004-07-27 #i31698#
+
+ @author OD
+ */
+ ::com::sun::star::drawing::HomogenMatrix3 _ConvertTransformationToLayoutDir(
+ ::com::sun::star::drawing::HomogenMatrix3 _aMatrixInHoriL2R );
+
+ /** method to adjust the positioning properties
+
+ OD 2004-08-02 #i31698#
+
+ @author OD
+
+ @param _aPosition
+ input parameter - point representing the new shape position. The position
+ has to be given in the layout direction the shape is in and relative to
+ its position alignment areas.
+ */
+ void _AdjustPositionProperties( const ::com::sun::star::awt::Point _aPosition );
+
+ /** method to convert start or end position of the drawing object to the
+ Writer specific position, which is the attribute position in layout direction
+
+ OD 2009-01-12 #i59051#
+
+ @author OD
+ */
+ ::com::sun::star::awt::Point _ConvertStartOrEndPosToLayoutDir(
+ const ::com::sun::star::awt::Point& aStartOrEndPos );
+
+ /** method to convert PolyPolygonBezier of the drawing object to the
+ Writer specific position, which is the attribute position in layout direction
+
+ OD 2009-01-13 #i59051#
+
+ @author OD
+ */
+ ::com::sun::star::drawing::PolyPolygonBezierCoords _ConvertPolyPolygonBezierToLayoutDir(
+ const ::com::sun::star::drawing::PolyPolygonBezierCoords& aPath );
+
+ /** method to get property from aggregation object
+
+ OD 2004-10-28 #i36248#
+
+ @author OD
+ */
+ ::com::sun::star::uno::Any _getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
+ throw( ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual ~SwXShape();
+public:
+ SwXShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape);
+
+
+ TYPEINFO();
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // --> OD 2004-07-22 #i31698# XShape
+ virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+ // <--
+ // --> OD 2004-07-22 #i31698# XShapeDescriptor - superclass of XShape
+ virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException);
+ // <--
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;}
+
+ // helper
+ static void AddExistingShapeToFmt( SdrObject& _rObj );
+};
+/* -----------------------------31.05.01 09:54--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXGroupShape :
+ public SwXShape,
+ public ::com::sun::star::drawing::XShapes
+{
+protected:
+ virtual ~SwXGroupShape();
+public:
+ SwXGroupShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape);
+
+
+ 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();
+
+ //XShapes
+ virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw (::com::sun::star::uno::RuntimeException);
+
+ //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 nIndex) 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);
+};
+#endif
+
+
diff --git a/sw/inc/unoevent.hxx b/sw/inc/unoevent.hxx
new file mode 100644
index 000000000000..40beb04943e5
--- /dev/null
+++ b/sw/inc/unoevent.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoevent.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOEVENT_HXX
+#define _UNOEVENT_HXX
+
+#include <svtools/unoevent.hxx>
+#include <svtools/macitem.hxx>
+
+
+class SvxMacroItem;
+class SvxMacro;
+class SwXFrame;
+class SwXTextFrame;
+class SwXTextGraphicObject;
+class SwXTextEmbeddedObject;
+class SwXFrameStyle;
+class SwFmtINetFmt;
+
+
+
+class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor
+{
+ const ::rtl::OUString sImplName;
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+protected:
+ virtual ~SwHyperlinkEventDescriptor();
+public:
+
+ SwHyperlinkEventDescriptor();
+
+
+
+ void copyMacrosFromINetFmt(const SwFmtINetFmt& aFmt);
+ void copyMacrosIntoINetFmt(SwFmtINetFmt& aFmt);
+
+ void copyMacrosFromNameReplace(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameReplace> & xReplace);
+};
+
+
+
+// SwEventDescriptor for
+// 1) SwXTextFrame
+// 2) SwXGraphicObject
+// 3) SwXEmbeddedObject
+// All these objects are an SwXFrame, so they can use a common implementation
+class SwFrameEventDescriptor : public SvEventDescriptor
+{
+ ::rtl::OUString sSwFrameEventDescriptor;
+
+ SwXFrame& rFrame;
+
+public:
+ SwFrameEventDescriptor( SwXTextFrame& rFrameRef );
+ SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef );
+ SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef );
+
+ ~SwFrameEventDescriptor();
+
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ virtual void setMacroItem(const SvxMacroItem& rItem);
+ virtual const SvxMacroItem& getMacroItem();
+ virtual sal_uInt16 getMacroItemWhich() const;
+};
+
+class SwFrameStyleEventDescriptor : public SvEventDescriptor
+{
+ ::rtl::OUString sSwFrameStyleEventDescriptor;
+
+ SwXFrameStyle& rStyle;
+
+public:
+ SwFrameStyleEventDescriptor( SwXFrameStyle& rStyleRef );
+
+ ~SwFrameStyleEventDescriptor();
+
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ virtual void setMacroItem(const SvxMacroItem& rItem);
+ virtual const SvxMacroItem& getMacroItem();
+ virtual sal_uInt16 getMacroItemWhich() const;
+};
+
+
+#endif
diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx
new file mode 100644
index 000000000000..5b5dceac47e3
--- /dev/null
+++ b/sw/inc/unoevtlstnr.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoevtlstnr.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOEVTLSTNR_HXX
+#define _UNOEVTLSTNR_HXX
+
+#include <svtools/svarray.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com{namespace sun{namespace star{
+ namespace lang
+ {
+ class XEventListener;
+ }
+}}}
+/* -----------------22.04.99 11:18-------------------
+ * Verwaltung der EventListener
+ * --------------------------------------------------*/
+typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > * XEventListenerPtr;
+SV_DECL_PTRARR(SwEvtLstnrArray, XEventListenerPtr, 4, 4)
+
+class SwEventListenerContainer
+{
+ protected:
+ SwEvtLstnrArray* pListenerArr;
+ ::com::sun::star::uno::XInterface* pxParent;
+ public:
+ SwEventListenerContainer( ::com::sun::star::uno::XInterface* pxParent);
+ ~SwEventListenerContainer();
+
+ void AddListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
+ BOOL RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
+ void Disposing();
+};
+#endif
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
new file mode 100644
index 000000000000..bef657b5b797
--- /dev/null
+++ b/sw/inc/unofield.hxx
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unofield.hxx,v $
+ * $Revision: 1.20 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOFIELD_HXX
+#define _UNOFIELD_HXX
+
+#include <com/sun/star/text/XDependentTextField.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
+#include <calbck.hxx>
+#include <unoobj.hxx>
+#include <unocoll.hxx>
+#include <RefreshListenerContainer.hxx>
+
+class SwFieldType;
+class SwDoc;
+class SwFmtFld;
+class SwField;
+class SwSetExpField;
+class SwTextAPIObject;
+
+/* -----------------04.12.98 12:49-------------------
+ *
+ * --------------------------------------------------*/
+class SwXFieldMaster : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::lang::XComponent
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ sal_uInt16 nResTypeId;
+ SwDoc* m_pDoc;
+
+ sal_Bool m_bIsDescriptor;
+
+ String sParam1; //Content / Database / NumberingSeparator
+ String sParam2; // - /DataTablename
+ String sParam3; // - /DataFieldName
+ String sParam4;
+ String sParam5; // - /DataBaseURL
+ String sParam6; // - /DataBaseResource
+ double fParam1; // Value / -
+ sal_Int8 nParam1; // ChapterNumberingLevel
+ sal_Bool bParam1; // IsExpression
+ sal_Int32 nParam2;
+
+protected:
+ virtual ~SwXFieldMaster();
+public:
+
+ SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId);
+ SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ static rtl::OUString GetProgrammaticName(const SwFieldType& rType, SwDoc& rDoc);
+ static rtl::OUString LocalizeFormula(const SwSetExpField& rFld, const rtl::OUString& rFormula, sal_Bool bQuery);
+
+ SwFieldType* GetFldType(sal_Bool bDontCreate = sal_False) const;
+ SwDoc* GetDoc() {return m_pDoc;}
+
+ sal_Bool IsDescriptor()const {return m_bIsDescriptor;}
+ sal_uInt16 GetResId() const {return nResTypeId;}
+};
+
+/* -----------------04.12.98 12:49-------------------
+ *
+ * --------------------------------------------------*/
+struct SwFieldProperties_Impl;
+class SwXTextField : public cppu::WeakImplHelper5
+<
+ ::com::sun::star::text::XDependentTextField,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::util::XUpdatable
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ const SwFmtFld* pFmtFld;
+ SwDoc* m_pDoc;
+ SwTextAPIObject* m_pTextObject;
+
+ sal_Bool m_bIsDescriptor;
+ SwClient m_aFieldTypeClient; // required to access field master of not yet inserted fields
+ sal_Bool m_bCallUpdate;
+ sal_uInt16 m_nServiceId;
+ SwFieldProperties_Impl* m_pProps;
+ String m_sTypeName;
+
+
+ //SwFieldType* GetFldType() const { return (SwFieldType*)GetRegisteredIn(); }
+ SwDoc* GetDoc() {return m_pDoc;}
+protected:
+ virtual ~SwXTextField();
+public:
+ SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=0);
+ SwXTextField(const SwFmtFld& rFmt, SwDoc* pDoc);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XDependentTextField
+ virtual void SAL_CALL attachTextFieldMaster(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xFieldMaster) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTextFieldMaster(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextField
+ virtual rtl::OUString SAL_CALL getPresentation(sal_Bool bShowCommand) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XUpdatable
+ virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ const SwField* GetField() const;
+ const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; };
+
+ void Invalidate();
+};
+
+/// @return a SwXTextField, either an already existing one or a new one
+SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+
+
+/* -----------------21.12.98 10:26-------------------
+ *
+ * --------------------------------------------------*/
+typedef
+cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwXTextFieldMastersBaseClass;
+class SwXTextFieldMasters : public SwXTextFieldMastersBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextFieldMasters();
+public:
+ SwXTextFieldMasters(SwDoc* pDoc);
+
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ static sal_Bool getInstanceName(const SwFieldType& rFldType, String& rName);
+};
+
+/* -----------------21.12.98 10:26-------------------
+ *
+ * --------------------------------------------------*/
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::util::XRefreshable
+>
+SwXTextFieldTypesBaseClass;
+class SwXTextFieldTypes : public SwXTextFieldTypesBaseClass,
+ public SwUnoCollection
+{
+ SwRefreshListenerContainer aRefreshCont;
+protected:
+ virtual ~SwXTextFieldTypes();
+public:
+ SwXTextFieldTypes(SwDoc* pDoc);
+
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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);
+
+ // ::com::sun::star::util::XRefreshable
+ virtual void SAL_CALL refresh( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // SwUnoCollection
+ virtual void Invalidate();
+};
+
+/* -----------------21.12.98 14:49-------------------
+ *
+ * --------------------------------------------------*/
+class SwXFieldEnumeration : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XEnumeration,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField > > aItems;
+ sal_Int32 nNextIndex; // index of next element to be returned
+
+ SwDoc* pDoc;
+
+protected:
+ virtual ~SwXFieldEnumeration();
+public:
+ SwXFieldEnumeration(SwDoc* pDoc);
+
+ //XEnumeration
+ virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+#endif
+
+
+
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
new file mode 100644
index 000000000000..e092a6d28c82
--- /dev/null
+++ b/sw/inc/unoflatpara.hxx
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoflatpara.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOFLATPARA_HXX
+#define _UNOFLATPARA_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/text/XFlatParagraph.hpp>
+#include <com/sun/star/text/XFlatParagraphIterator.hpp>
+#include <calbck.hxx>
+#include <modeltoviewhelper.hxx>
+#include <unotextmarkup.hxx>
+
+#include <set>
+
+namespace css = com::sun::star;
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XStringKeyMap;
+} } } }
+
+class SwTxtNode;
+class SwDoc;
+
+/******************************************************************************
+ * SwXFlatParagraph
+ ******************************************************************************/
+
+class SwXFlatParagraph:
+ public ::cppu::WeakImplHelper1
+ <
+ css::text::XFlatParagraph
+ >,
+ public SwXTextMarkup
+{
+public:
+ SwXFlatParagraph( SwTxtNode& rTxtNode, rtl::OUString aExpandText, const ModelToViewHelper::ConversionMap* pConversionMap );
+ virtual ~SwXFlatParagraph();
+
+ 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();
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // text::XTextMarkup:
+ virtual css::uno::Reference< css::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & xMarkupInfoContainer) throw (css::uno::RuntimeException);
+
+ // text::XFlatParagraph:
+ virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isModified() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setChecked(::sal_Int32 nType, ::sal_Bool bVal) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isChecked(::sal_Int32 nType) throw (css::uno::RuntimeException);
+ virtual css::lang::Locale SAL_CALL getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual css::lang::Locale SAL_CALL getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual void SAL_CALL changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const ::rtl::OUString & aNewText, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual void SAL_CALL changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual css::uno::Sequence< ::sal_Int32 > SAL_CALL getLanguagePortions() throw (css::uno::RuntimeException);
+
+ const SwTxtNode* getTxtNode() const;
+
+private:
+ SwXFlatParagraph( const SwXFlatParagraph & ); // not defined
+ SwXFlatParagraph & operator = ( const SwXFlatParagraph & ); // not defined
+
+ rtl::OUString maExpandText;
+};
+
+/******************************************************************************
+ * SwXFlatParagraphIterator
+ ******************************************************************************/
+
+class SwXFlatParagraphIterator:
+ public ::cppu::WeakImplHelper1
+ <
+ css::text::XFlatParagraphIterator
+ >,
+ public SwClient // to get notified when doc is closed...
+{
+public:
+ SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType, sal_Bool bAutomatic );
+ virtual ~SwXFlatParagraphIterator();
+
+ // text::XFlatParagraphIterator:
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getFirstPara() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getNextPara() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getLastPara() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaBefore(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaAfter(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+
+ // SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+private:
+ SwXFlatParagraphIterator( const SwXFlatParagraphIterator & ); // not defined
+ SwXFlatParagraphIterator & operator =(const SwXFlatParagraphIterator & ); // not defined
+
+ // container to hold the 'hard' references as long as necessary and valid
+ std::set< css::uno::Reference< css::text::XFlatParagraph > > m_aFlatParaList;
+
+ SwDoc* mpDoc;
+ const sal_Int32 mnType;
+ const sal_Bool mbAutomatic;
+
+ ULONG mnCurrentNode; // used for non-automatic mode
+ ULONG mnStartNode; // used for non-automatic mode
+ ULONG mnEndNode; // used for non-automatic mode
+ sal_Bool mbWrapped; // used for non-automatic mode
+};
+
+#endif
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
new file mode 100644
index 000000000000..a02999c8ca3d
--- /dev/null
+++ b/sw/inc/unoframe.hxx
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoframe.hxx,v $
+ * $Revision: 1.22 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOFRAME_HXX
+#define _UNOFRAME_HXX
+
+#include <unoobj.hxx>
+#include <sfx2/objsh.hxx>
+#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+ /*
+#include <com/sun/star/container/XNameAccess.hpp>
+ */
+
+class SwDoc;
+class SfxItemPropertSet;
+/*-----------------12.02.98 11:21-------------------
+
+--------------------------------------------------*/
+class BaseFrameProperties_Impl;
+class SwXFrame : public cppu::WeakImplHelper6
+<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::drawing::XShape,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+ SwDoc* m_pDoc;
+
+ const FlyCntType eType;
+
+ // Descriptor-interface
+ BaseFrameProperties_Impl* pProps;
+ sal_Bool bIsDescriptor;
+ String sName;
+
+ SwPaM* m_pCopySource;
+
+protected:
+ com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
+ com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
+
+ virtual ~SwXFrame();
+public:
+ SwXFrame(FlyCntType eSet,
+ const SfxItemPropertySet* pPropSet,
+ SwDoc *pDoc ); //Descriptor-If
+ SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet,
+ const SfxItemPropertySet* pPropSet);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ TYPEINFO();
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XShape
+ virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+
+ //XShapeDescriptor
+ virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //Basisimplementierung
+ //XComponent
+ virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ SwFrmFmt* GetFrmFmt() const
+ {
+ return PTR_CAST ( SwFrmFmt, GetRegisteredIn() );
+ }
+ FlyCntType GetFlyCntType()const {return eType;}
+
+ sal_Bool IsDescriptor() const {return bIsDescriptor;}
+ void ResetDescriptor();
+ //copy text from a given source PaM
+ void SetSelection(SwPaM& rCopySource);
+ static SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt );
+};
+/*-----------------20.02.98 11:28-------------------
+
+--------------------------------------------------*/
+typedef cppu::WeakImplHelper3
+<
+ ::com::sun::star::text::XTextFrame,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::document::XEventsSupplier
+>
+SwXTextFrameBaseClass;
+
+class SwXTextFrame : public SwXTextFrameBaseClass,
+ public SwXText,
+ public SwXFrame
+{
+ const SfxItemPropertSet* _pPropSet;
+
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
+ virtual ~SwXTextFrame();
+public:
+ SwXTextFrame(SwDoc *pDoc);
+ SwXTextFrame(SwFrmFmt& rFmt);
+
+
+ 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();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextFrame
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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);
+
+ //XTextContent
+ virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) 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);
+
+ //XPropertySet
+ 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);
+
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+/*-----------------20.02.98 11:28-------------------
+
+--------------------------------------------------*/
+typedef cppu::WeakImplHelper2
+<
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::document::XEventsSupplier
+>
+SwXTextGraphicObjectBaseClass;
+class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass,
+ public SwXFrame
+{
+protected:
+ virtual ~SwXTextGraphicObject();
+public:
+ SwXTextGraphicObject( SwDoc *pDoc );
+ SwXTextGraphicObject(SwFrmFmt& rFmt);
+
+
+ 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();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+/*-----------------20.02.98 11:28-------------------
+
+--------------------------------------------------*/
+class SwOLENode;
+typedef cppu::WeakImplHelper3
+<
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::document::XEmbeddedObjectSupplier2,
+ ::com::sun::star::document::XEventsSupplier
+>SwXTextEmbeddedObjectBaseClass;
+
+class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass,
+ public SwXFrame
+{
+protected:
+ virtual ~SwXTextEmbeddedObject();
+
+public:
+ SwXTextEmbeddedObject( SwDoc *pDoc );
+ SwXTextEmbeddedObject(SwFrmFmt& rFmt);
+
+
+ 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();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEmbeddedObjectSupplier2
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL getExtendedControlOverEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::sal_Int64 SAL_CALL getAspect() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAspect( ::sal_Int64 _aspect ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL getReplacementGraphic() throw (::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+
+
+
+class SwXOLEListener : public cppu::WeakImplHelper1
+<
+ ::com::sun::star::util::XModifyListener
+>,
+ public SwClient
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel;
+// SfxObjectShell* GetObjShell( const SwFmt& rFmt,
+// SwOLENode** ppNd = 0 ) const;
+ SwFmt* GetFmt() const { return (SwFmt*)GetRegisteredIn(); }
+public:
+ SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE);
+ ~SwXOLEListener();
+ TYPEINFO();
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+};
+
+
+
+#endif
+
diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx
new file mode 100644
index 000000000000..5ea20f65c89d
--- /dev/null
+++ b/sw/inc/unoidx.hxx
@@ -0,0 +1,342 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoidx.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOIDX_HXX
+#define _UNOIDX_HXX
+
+#include <com/sun/star/text/XDocumentIndexMark.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <unoobj.hxx>
+#include <unocoll.hxx>
+#include <toxe.hxx>
+class SwTOXBaseSection;
+class SwTOXMark;
+class SwTOXType;
+/* -----------------07.12.98 10:08-------------------
+ *
+ * --------------------------------------------------*/
+class SwDocIdxProperties_Impl;
+class SwXIndexStyleAccess_Impl;
+class SwXIndexTokenAccess_Impl;
+
+class SwXDocumentIndex : public cppu::WeakImplHelper5
+<
+ ::com::sun::star::text::XDocumentIndex,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>,
+ public SwClient
+{
+ friend class SwXIndexStyleAccess_Impl;
+ friend class SwXIndexTokenAccess_Impl;
+
+ SwEventListenerContainer aLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+ SwDoc* m_pDoc;
+ const SwTOXBaseSection* pBase;
+ TOXTypes eTOXType;
+
+ //Descriptor-Interface
+ sal_Bool bIsDescriptor;
+ SwDocIdxProperties_Impl* pProps;
+
+ SwXIndexStyleAccess_Impl* pStyleAccess;
+ SwXIndexTokenAccess_Impl* pTokenAccess;
+
+ SwSectionFmt* GetFmt()const {return (SwSectionFmt*)GetRegisteredIn();}
+
+ sal_Bool IsDescriptor() const {return bIsDescriptor;}
+ const SwDocIdxProperties_Impl* GetProperties_Impl() const { return pProps;}
+ SwDocIdxProperties_Impl* GetProperties_Impl() { return pProps;}
+ TOXTypes GetTOXType() const {return eTOXType;}
+
+ SwXIndexStyleAccess_Impl* GetStyleAccess() const {return pStyleAccess;}
+ void SetStyleAccess(SwXIndexStyleAccess_Impl* pSet)
+ {pStyleAccess = pSet;}
+
+ SwXIndexTokenAccess_Impl* GetTokenAccess() const {return pTokenAccess;}
+ void SetTokenAccess(SwXIndexTokenAccess_Impl* pSet)
+ {pTokenAccess = pSet;}
+protected:
+ virtual ~SwXDocumentIndex();
+public:
+ SwXDocumentIndex(const SwTOXBaseSection* = 0, SwDoc* = 0);
+ //Descriptor-Ctor
+ SwXDocumentIndex(TOXTypes eToxType, SwDoc& rDoc);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XDocumentIndex
+ virtual ::rtl::OUString SAL_CALL getServiceName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL update( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+};
+/* -----------------07.12.98 10:08-------------------
+ *
+ * --------------------------------------------------*/
+class SwXDocumentIndexMark : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::text::XDocumentIndexMark,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XUnoTunnel
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ SwDepend aTypeDepend;
+ SwDoc* m_pDoc;
+ const SwTOXMark* m_pTOXMark;
+ const SfxItemPropertySet* m_pPropSet;
+
+ sal_Bool bIsDescriptor;
+ sal_Bool bMainEntry;
+ TOXTypes eType;
+ sal_uInt16 nLevel;
+ String sAltText;
+ String sPrimaryKey;
+ String sSecondaryKey;
+ String sTextReading;
+ String sPrimaryKeyReading;
+ String sSecondaryKeyReading;
+ String sUserIndexName;
+
+ void InitMap(TOXTypes eToxType);
+protected:
+ virtual ~SwXDocumentIndexMark();
+public:
+ SwXDocumentIndexMark(TOXTypes eToxType);
+ SwXDocumentIndexMark(const SwTOXType* pType,
+ const SwTOXMark* pMark,
+ SwDoc* pDc);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual rtl::OUString SAL_CALL getMarkEntry(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setMarkEntry(const rtl::OUString& aIndexEntry) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ SwTOXType* GetTOXType() const {return (SwTOXType*)aTypeDepend.GetRegisteredIn();}
+ const SwTOXMark* GetTOXMark() const {return m_pTOXMark;}
+
+ static SwXDocumentIndexMark* GetObject(SwTOXType* pType, const SwTOXMark* pMark,
+ SwDoc* pDoc);
+ void Invalidate();
+};
+/* -----------------05.05.99 12:27-------------------
+ *
+ * --------------------------------------------------*/
+
+class SwXDocumentIndexes : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXDocumentIndexes();
+public:
+ SwXDocumentIndexes(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXDocumentIndexes, UsrObject );
+
+// 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)
+
+// throw( ::com::sun::star::uno::RuntimeException );
+// 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 );
+
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //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 nIndex) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static SwXDocumentIndex* GetObject(const SwTOXBaseSection* pTOX);
+};
+/* -----------------13.09.99 16:39-------------------
+
+ --------------------------------------------------*/
+class SwXIndexStyleAccess_Impl : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XIndexReplace,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwXDocumentIndex& rParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndex > xParent;
+protected:
+ virtual ~SwXIndexStyleAccess_Impl();
+public:
+ SwXIndexStyleAccess_Impl(SwXDocumentIndex& rParentIdx);
+
+
+ //XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/* -----------------13.09.99 16:39-------------------
+
+ --------------------------------------------------*/
+class SwXIndexTokenAccess_Impl : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XIndexReplace,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwXDocumentIndex& rParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XDocumentIndex > xParent;
+ sal_Int32 nCount;
+protected:
+ virtual ~SwXIndexTokenAccess_Impl();
+public:
+ SwXIndexTokenAccess_Impl(SwXDocumentIndex& rParentIdx);
+
+
+
+ //XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+#endif
+
+
diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx
new file mode 100644
index 000000000000..3dbe497b2e3c
--- /dev/null
+++ b/sw/inc/unomailmerge.hxx
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unomailmerge.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOMAILMERGE_HXX_
+#define _UNOMAILMERGE_HXX_
+
+#include <functional>
+#include <cppuhelper/implbase5.hxx> // WeakImplHelper4
+#include <cppuhelper/interfacecontainer.hxx> // OMultiTypeInterfaceContainerHelperVar
+#include <unotools/configitem.hxx> // !! needed for OMultiTypeInterfaceContainerHelperVar !!
+
+
+#include <com/sun/star/task/XJob.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/text/XMailMergeBroadcaster.hpp>
+#include <svtools/itemprop.hxx>
+#include <sfx2/objsh.hxx> // SfxObjectShellRef
+
+#include <functional>
+
+namespace com { namespace sun { namespace star {
+
+ namespace sdbc {
+ class XResultSet;
+ class XConnection;
+ }
+ namespace frame {
+ class XModel;
+ }
+ namespace lang {
+ class XMultiServiceFactory;
+ }
+ namespace text {
+ class XMailMergeListener;
+ struct MailMergeEvent;
+ }
+ namespace beans{
+ struct PropertyValue;
+ }
+
+}}}
+
+namespace rtl {
+ class OUString;
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+// uses templates from <cppuhelper/interfacecontainer.h>
+// and <unotools/configitem.hxx>
+
+// helper function call class
+struct PropHashType_Impl
+{
+ size_t operator()(const INT32 &s) const { return s; }
+};
+
+typedef cppu::OMultiTypeInterfaceContainerHelperVar
+ <
+ INT32,
+ PropHashType_Impl,
+ std::equal_to< INT32 >
+ > OPropertyListenerContainerHelper;
+
+////////////////////////////////////////////////////////////
+
+class SwXMailMerge :
+ public cppu::WeakImplHelper5
+ <
+ com::sun::star::task::XJob,
+ com::sun::star::beans::XPropertySet,
+ com::sun::star::text::XMailMergeBroadcaster,
+ com::sun::star::lang::XComponent,
+ com::sun::star::lang::XServiceInfo
+ >
+{
+ cppu::OInterfaceContainerHelper aEvtListeners;
+ cppu::OInterfaceContainerHelper aMergeListeners;
+ OPropertyListenerContainerHelper aPropListeners;
+
+ //SfxItemPropertySet aPropSet;
+ const SfxItemPropertySet* pPropSet;
+
+ SfxObjectShellRef xDocSh; // the document
+
+ String aTmpFileName;
+
+ // properties of mail merge service
+ com::sun::star::uno::Sequence< com::sun::star::uno::Any > aSelection;
+ com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet > xResultSet;
+ com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > xConnection;
+ com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel;
+ rtl::OUString aDataSourceName;
+ rtl::OUString aDataCommand;
+ rtl::OUString aFilter;
+ rtl::OUString aDocumentURL;
+ rtl::OUString aOutputURL;
+ rtl::OUString aFileNamePrefix;
+ sal_Int32 nDataCommandType;
+ sal_Int16 nOutputType;
+ sal_Bool bEscapeProcessing;
+ sal_Bool bSinglePrintJobs;
+ sal_Bool bFileNameFromColumn;
+
+
+ ::rtl::OUString sInServerPassword;
+ ::rtl::OUString sOutServerPassword;
+ ::rtl::OUString sSubject;
+ ::rtl::OUString sAddressFromColumn;
+ ::rtl::OUString sMailBody;
+ ::rtl::OUString sAttachmentName;
+ ::rtl::OUString sAttachmentFilter;
+ com::sun::star::uno::Sequence< ::rtl::OUString > aCopiesTo;
+ com::sun::star::uno::Sequence< ::rtl::OUString > aBlindCopiesTo;
+ sal_Bool bSendAsHTML;
+ sal_Bool bSendAsAttachment;
+
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintSettings;
+
+ sal_Bool bSaveAsSingleFile;
+ ::rtl::OUString sSaveFilter;
+ ::rtl::OUString sSaveFilterOptions;
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveFilterData;
+
+
+
+ sal_Bool bDisposing;
+
+
+ void launchEvent( const com::sun::star::beans::PropertyChangeEvent &rEvt ) const;
+
+ // disallow use of copy-constructor and assignment-operator for now
+ SwXMailMerge( const SwXMailMerge & );
+ SwXMailMerge & operator = ( const SwXMailMerge & );
+protected:
+ virtual ~SwXMailMerge();
+public:
+ SwXMailMerge();
+
+
+ void LaunchMailMergeEvent( const com::sun::star::text::MailMergeEvent &rData ) const;
+
+ // XJob
+ virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ // XMailMergeBroadcaster
+ virtual void SAL_CALL addMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // 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);
+};
+
+
+extern com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw();
+extern rtl::OUString SAL_CALL SwXMailMerge_getImplementationName() throw();
+extern com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( com::sun::star::uno::Exception );
+
+////////////////////////////////////////////////////////////
+
+#endif
+
+
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
new file mode 100644
index 000000000000..e569383a335e
--- /dev/null
+++ b/sw/inc/unomap.hxx
@@ -0,0 +1,350 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unomap.hxx,v $
+ * $Revision: 1.63 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOMAP_HXX
+#define _UNOMAP_HXX
+
+#include <svtools/itemprop.hxx>
+
+#define PROPERTY_NONE 0
+
+#define PROPERTY_MAP_TEXT_CURSOR 0
+#define PROPERTY_MAP_CHAR_STYLE 1
+#define PROPERTY_MAP_PARA_STYLE 2
+#define PROPERTY_MAP_FRAME_STYLE 3
+#define PROPERTY_MAP_PAGE_STYLE 4
+#define PROPERTY_MAP_NUM_STYLE 5
+#define PROPERTY_MAP_SECTION 6
+#define PROPERTY_MAP_TEXT_TABLE 7
+#define PROPERTY_MAP_TABLE_CELL 8
+#define PROPERTY_MAP_TABLE_RANGE 9
+#define PROPERTY_MAP_TEXT_SEARCH 10
+#define PROPERTY_MAP_TEXT_FRAME 11
+#define PROPERTY_MAP_TEXT_GRAPHIC 12
+#define PROPERTY_MAP_TEXT_SHAPE 13
+#define PROPERTY_MAP_INDEX_USER 14
+#define PROPERTY_MAP_INDEX_CNTNT 15
+#define PROPERTY_MAP_INDEX_IDX 16
+#define PROPERTY_MAP_USER_MARK 17
+#define PROPERTY_MAP_CNTIDX_MARK 18
+#define PROPERTY_MAP_INDEX_MARK 19
+#define PROPERTY_MAP_TEXT_TABLE_ROW 20
+#define PROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR 21
+#define PROPERTY_MAP_TEXT_TABLE_CURSOR 22
+#define PROPERTY_MAP_BOOKMARK 23
+#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS 24
+#define PROPERTY_MAP_INDEX_ILLUSTRATIONS 25
+#define PROPERTY_MAP_INDEX_OBJECTS 26
+#define PROPERTY_MAP_INDEX_TABLES 27
+#define PROPERTY_MAP_BIBLIOGRAPHY 28
+#define PROPERTY_MAP_TEXT_DOCUMENT 29
+#define PROPERTY_MAP_LINK_TARGET 30
+#define PROPERTY_MAP_AUTO_TEXT_GROUP 31
+#define PROPERTY_MAP_TEXTPORTION_EXTENSIONS 34
+#define PROPERTY_MAP_FOOTNOTE 35
+#define PROPERTY_MAP_TEXT_COLUMS 36
+#define PROPERTY_MAP_PARAGRAPH 37
+#define PROPERTY_MAP_EMBEDDED_OBJECT 38
+#define PROPERTY_MAP_REDLINE 39
+#define PROPERTY_MAP_TEXT_DEFAULT 40
+
+#define PROPERTY_MAP_FLDTYP_DATETIME 41
+#define PROPERTY_MAP_FLDTYP_USER 42
+#define PROPERTY_MAP_FLDTYP_SET_EXP 43
+#define PROPERTY_MAP_FLDTYP_GET_EXP 44
+#define PROPERTY_MAP_FLDTYP_FILE_NAME 45
+#define PROPERTY_MAP_FLDTYP_PAGE_NUM 46
+#define PROPERTY_MAP_FLDTYP_AUTHOR 47
+#define PROPERTY_MAP_FLDTYP_CHAPTER 48
+#define PROPERTY_MAP_FLDTYP_GET_REFERENCE 49
+#define PROPERTY_MAP_FLDTYP_CONDITIONED_TEXT 50
+#define PROPERTY_MAP_FLDTYP_HIDDEN_TEXT 51
+#define PROPERTY_MAP_FLDTYP_ANNOTATION 52
+#define PROPERTY_MAP_FLDTYP_INPUT 53
+#define PROPERTY_MAP_FLDTYP_MACRO 54
+#define PROPERTY_MAP_FLDTYP_DDE 55
+#define PROPERTY_MAP_FLDTYP_HIDDEN_PARA 56
+#define PROPERTY_MAP_FLDTYP_DOC_INFO 57
+#define PROPERTY_MAP_FLDTYP_TEMPLATE_NAME 58
+#define PROPERTY_MAP_FLDTYP_USER_EXT 59
+#define PROPERTY_MAP_FLDTYP_REF_PAGE_SET 60
+#define PROPERTY_MAP_FLDTYP_REF_PAGE_GET 61
+#define PROPERTY_MAP_FLDTYP_JUMP_EDIT 62
+#define PROPERTY_MAP_FLDTYP_SCRIPT 63
+#define PROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET 64
+#define PROPERTY_MAP_FLDTYP_DATABASE_NUM_SET 65
+#define PROPERTY_MAP_FLDTYP_DATABASE_SET_NUM 66
+#define PROPERTY_MAP_FLDTYP_DATABASE 67
+#define PROPERTY_MAP_FLDTYP_DATABASE_NAME 68
+#define PROPERTY_MAP_FLDTYP_DOCSTAT 69
+#define PROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR 70
+#define PROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME 71
+#define PROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME 72
+#define PROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME 73
+#define PROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME 74
+#define PROPERTY_MAP_FLDTYP_DOCINFO_MISC 75
+#define PROPERTY_MAP_FLDTYP_DOCINFO_REVISION 76
+#define PROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS 77
+#define PROPERTY_MAP_FLDTYP_DUMMY_0 78
+#define PROPERTY_MAP_FLDTYP_TABLE_FORMULA 79
+#define PROPERTY_MAP_FLDMSTR_USER 80
+#define PROPERTY_MAP_FLDMSTR_DDE 81
+#define PROPERTY_MAP_FLDMSTR_SET_EXP 82
+#define PROPERTY_MAP_FLDMSTR_DATABASE 83
+#define PROPERTY_MAP_FLDMSTR_DUMMY0 84
+#define PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY 85
+#define PROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY 86
+#define PROPERTY_MAP_TEXT 87
+#define PROPERTY_MAP_REDLINE_PORTION 88
+#define PROPERTY_MAP_MAILMERGE 89
+#define PROPERTY_MAP_FLDTYP_DROPDOWN 90
+#define PROPERTY_MAP_CHART2_DATA_SEQUENCE 91
+#define PROPERTY_MAP_TEXT_VIEW 92
+#define PROPERTY_MAP_CONDITIONAL_PARA_STYLE 93
+#define PROPERTY_MAP_CHAR_AUTO_STYLE 94
+#define PROPERTY_MAP_RUBY_AUTO_STYLE 95
+#define PROPERTY_MAP_PARA_AUTO_STYLE 96
+#define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97
+#define PROPERTY_MAP_METAFIELD 98
+
+#define PROPERTY_MAP_END 99
+
+//S&E
+#define WID_WORDS 0
+#define WID_BACKWARDS 1
+#define WID_REGULAR_EXPRESSION 2
+#define WID_CASE_SENSITIVE 3
+#define WID_IN_SELECTION 4
+#define WID_STYLES 5
+#define WID_SIMILARITY 6
+#define WID_SIMILARITY_RELAX 7
+#define WID_SIMILARITY_EXCHANGE 8
+#define WID_SIMILARITY_ADD 9
+#define WID_SIMILARITY_REMOVE 10
+#define WID_SEARCH_ALL 11
+
+//Sections
+#define WID_SECT_CONDITION 8000
+#define WID_SECT_DDE_TYPE 8001
+#define WID_SECT_DDE_FILE 8002
+#define WID_SECT_DDE_ELEMENT 8003
+#define WID_SECT_LINK 8004
+#define WID_SECT_VISIBLE 8005
+#define WID_SECT_PROTECTED 8006
+#define WID_SECT_REGION 8007
+#define WID_SECT_DDE_AUTOUPDATE 8008
+#define WID_SECT_DOCUMENT_INDEX 8009
+#define WID_SECT_IS_GLOBAL_DOC_SECTION 8010
+#define WID_SECT_PASSWORD 8011
+#define WID_SECT_CURRENTLY_VISIBLE 8012
+#define WID_SECT_EDIT_IN_READONLY 8013
+
+
+//Verzeichnisse
+#define WID_PRIMARY_KEY 1000
+#define WID_SECONDARY_KEY 1001
+#define WID_ALT_TEXT 1002
+#define WID_IDX_TITLE 1003
+#define WID_LEVEL 1004
+#define WID_CREATE_FROM_MARKS 1005
+#define WID_CREATE_FROM_OUTLINE 1006
+#define WID_MAIN_ENTRY 1007
+#define WID_CREATE_FROM_CHAPTER 1008
+#define WID_CREATE_FROM_LABELS 1009
+#define WID_USE_ALPHABETICAL_SEPARATORS 1010
+#define WID_USE_KEY_AS_ENTRY 1011
+#define WID_USE_COMBINED_ENTRIES 1012
+#define WID_IS_CASE_SENSITIVE 1013
+#define WID_USE_P_P 1014
+#define WID_USE_DASH 1015
+#define WID_USE_UPPER_CASE 1016
+#define WID_INDEX_AUTO_MARK_FILE_U_R_L 1017
+#define WID_LABEL_CATEGORY 1018
+#define WID_LABEL_DISPLAY_TYPE 1019
+#define WID_USE_LEVEL_FROM_SOURCE 1020
+#define WID_LEVEL_FORMAT 1021
+#define WID_LEVEL_PARAGRAPH_STYLES 1022
+#define WID_RECALC_TAB_STOPS 1023
+//#define WID_??? 1024
+#define WID_MAIN_ENTRY_CHARACTER_STYLE_NAME 1025
+#define WID_CREATE_FROM_TABLES 1026
+#define WID_CREATE_FROM_TEXT_FRAMES 1027
+#define WID_CREATE_FROM_GRAPHIC_OBJECTS 1028
+#define WID_CREATE_FROM_EMBEDDED_OBJECTS 1029
+#define WID_CREATE_FROM_STAR_MATH 1030
+#define WID_PROTECTED 1031
+
+#define WID_CREATE_FROM_STAR_CHART 1032
+#define WID_CREATE_FROM_STAR_CALC 1033
+#define WID_CREATE_FROM_STAR_DRAW 1034
+#define WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS 1035
+#define WID_USER_IDX_NAME 1036
+#define WID_PARA_HEAD 1037
+#define WID_PARA_SEP 1038
+#define WID_PARA_LEV1 1039
+#define WID_PARA_LEV2 1040
+#define WID_PARA_LEV3 1041
+#define WID_PARA_LEV4 1042
+#define WID_PARA_LEV5 1043
+#define WID_PARA_LEV6 1044
+#define WID_PARA_LEV7 1045
+#define WID_PARA_LEV8 1046
+#define WID_PARA_LEV9 1047
+#define WID_PARA_LEV10 1048
+#define WID_IS_COMMA_SEPARATED 1049
+#define WID_INDEX_MARKS 1050
+#define WID_IS_RELATIVE_TABSTOPS 1051
+#define WID_CREATE_FROM_PARAGRAPH_STYLES 1052
+#define WID_IDX_CONTENT_SECTION 1053
+#define WID_IDX_HEADER_SECTION 1054
+#define WID_IDX_LOCALE 1055
+#define WID_IDX_SORT_ALGORITHM 1056
+#define WID_IDX_NAME 1057
+
+#define WID_TEXT_READING 1058
+#define WID_PRIMARY_KEY_READING 1059
+#define WID_SECONDARY_KEY_READING 1060
+
+//text document
+#define WID_DOC_CHAR_COUNT 1000
+#define WID_DOC_PARA_COUNT 1001
+#define WID_DOC_WORD_COUNT 1002
+#define WID_DOC_WORD_SEPARATOR 1003
+#define WID_DOC_CHANGES_SHOW 1004
+#define WID_DOC_CHANGES_RECORD 1005
+#define WID_DOC_AUTO_MARK_URL 1006
+#define WID_DOC_HIDE_TIPS 1007
+#define WID_DOC_REDLINE_DISPLAY 1008
+#define WID_DOC_FORBIDDEN_CHARS 1009
+#define WID_DOC_CHANGES_PASSWORD 1010
+#define WID_DOC_TWO_DIGIT_YEAR 1011
+#define WID_DOC_AUTOMATIC_CONTROL_FOCUS 1012
+#define WID_DOC_APPLY_FORM_DESIGN_MODE 1013
+#define WID_DOC_BASIC_LIBRARIES 1014
+#define WID_DOC_RUNTIME_UID 1015
+#define WID_DOC_LOCK_UPDATES 1016
+#define WID_DOC_HAS_VALID_SIGNATURES 1017
+#define WID_DOC_BUILDID 1024
+// --> OD 2006-03-21 #b6375613#
+#define WID_APPLY_WORKAROUND_FOR_B6375613 1070
+// <--
+
+//MailMerge
+#define WID_SELECTION 1071
+#define WID_RESULT_SET 1072
+#define WID_CONNECTION 1073
+#define WID_MODEL 1074
+#define WID_DATA_SOURCE_NAME 1075
+#define WID_DATA_COMMAND 1076
+#define WID_FILTER 1077
+#define WID_DOCUMENT_URL 1078
+#define WID_OUTPUT_URL 1079
+#define WID_DATA_COMMAND_TYPE 1080
+#define WID_OUTPUT_TYPE 1081
+#define WID_ESCAPE_PROCESSING 1082
+#define WID_SINGLE_PRINT_JOBS 1083
+#define WID_FILE_NAME_FROM_COLUMN 1084
+#define WID_FILE_NAME_PREFIX 1085
+#define WID_MAIL_SUBJECT 1086
+#define WID_ADDRESS_FROM_COLUMN 1087
+#define WID_SEND_AS_HTML 1088
+#define WID_SEND_AS_ATTACHMENT 1089
+#define WID_MAIL_BODY 1090
+#define WID_ATTACHMENT_NAME 1091
+#define WID_ATTACHMENT_FILTER 1092
+#define WID_PRINT_OPTIONS 1093
+#define WID_SAVE_AS_SINGLE_FILE 1094
+#define WID_SAVE_FILTER 1095
+#define WID_COPIES_TO 1096
+#define WID_BLIND_COPIES_TO 1097
+#define WID_IN_SERVER_PASSWORD 1098
+#define WID_OUT_SERVER_PASSWORD 1099
+#define WID_SAVE_FILTER_OPTIONS 1100
+#define WID_SAVE_FILTER_DATA 1101
+
+#define WID_PAGE_COUNT 1100
+#define WID_LINE_COUNT 1101
+#define WID_IS_CONSTANT_SPELLCHECK 1102
+#define WID_IS_HIDE_SPELL_MARKS 1103 /* deprecated #i91949 */
+
+#define WID_LAYOUT_SIZE 1104
+#define WID_DOC_DIALOG_LIBRARIES 1105
+
+
+//AutoText
+#define WID_GROUP_PATH 0
+#define WID_GROUP_TITLE 1
+
+//NumberingRules
+#define WID_IS_AUTOMATIC 0
+#define WID_CONTINUOUS 1
+#define WID_RULE_NAME 2
+#define WID_IS_ABS_MARGINS 3
+#define WID_IS_OUTLINE 4
+#define WID_DEFAULT_LIST_ID 5
+
+//TextColumns
+#define WID_TXTCOL_LINE_WIDTH 0
+#define WID_TXTCOL_LINE_COLOR 1
+#define WID_TXTCOL_LINE_REL_HGT 2
+#define WID_TXTCOL_LINE_ALIGN 3
+#define WID_TXTCOL_LINE_IS_ON 4
+#define WID_TXTCOL_IS_AUTOMATIC 5
+#define WID_TXTCOL_AUTO_DISTANCE 6
+
+/* -----------------04.07.98 11:41-------------------
+ *
+ * --------------------------------------------------*/
+class SwItemPropertySet : public SfxItemPropertySet
+{
+protected:
+ virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const;
+public:
+ SwItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
+ SfxItemPropertySet( pMap ){}
+};
+/* -----------------04.07.98 11:41-------------------
+ *
+ * --------------------------------------------------*/
+class SwUnoPropertyMapProvider
+{
+ SfxItemPropertyMapEntry* aMapEntriesArr[PROPERTY_MAP_END];
+ SfxItemPropertySet* aPropertySetArr[PROPERTY_MAP_END];
+
+public:
+ SwUnoPropertyMapProvider();
+ ~SwUnoPropertyMapProvider();
+
+ const SfxItemPropertyMapEntry* GetPropertyMapEntries(sal_uInt16 PropertyId);
+ const SfxItemPropertySet* GetPropertySet( sal_uInt16 PropertyId );
+
+};
+
+extern SwUnoPropertyMapProvider aSwMapProvider;
+#endif
diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h
new file mode 100644
index 000000000000..1394bf6e21b3
--- /dev/null
+++ b/sw/inc/unomid.h
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unomid.h,v $
+ * $Revision: 1.19 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_UNOMID_HXX
+#define SW_UNOMID_HXX
+
+#define C2S(cChar) String::CreateFromAscii( cChar )
+#define C2U(cChar) rtl::OUString::createFromAscii( cChar )
+
+#define MID_MIRROR_VERT 0
+#define MID_MIRROR_HORZ_EVEN_PAGES 1
+#define MID_MIRROR_HORZ_ODD_PAGES 2
+
+#define MID_PAGEDESC_PAGEDESCNAME 0
+#define MID_PAGEDESC_PAGENUMOFFSET 1
+
+#define MID_SURROUND_SURROUNDTYPE 0
+#define MID_SURROUND_ANCHORONLY 1
+#define MID_SURROUND_CONTOUR 2
+#define MID_SURROUND_CONTOUROUTSIDE 3
+
+#define MID_VERTORIENT_ORIENT 0
+#define MID_VERTORIENT_RELATION 1
+#define MID_VERTORIENT_POSITION 2
+
+#define MID_HORIORIENT_ORIENT 0
+#define MID_HORIORIENT_RELATION 1
+#define MID_HORIORIENT_POSITION 2
+#define MID_HORIORIENT_PAGETOGGLE 3
+
+#define MID_ANCHOR_ANCHORTYPE 0
+#define MID_ANCHOR_PAGENUM 1
+#define MID_ANCHOR_ANCHORFRAME 2
+
+#define MID_URL_HYPERLINKFORMAT 0
+#define MID_URL_HYPERLINKNAME 1
+#define MID_URL_CLIENTMAP 2
+#define MID_URL_SERVERMAP 3
+#define MID_URL_URL 4
+#define MID_URL_TARGET 5
+#define MID_URL_VISITED_FMT 6
+#define MID_URL_UNVISITED_FMT 7
+#define MID_URL_HYPERLINKEVENTS 8
+
+#define MID_CHAIN_PREVNAME 0
+#define MID_CHAIN_NEXTNAME 1
+
+#define MID_LINENUMBER_COUNT 0
+#define MID_LINENUMBER_STARTVALUE 1
+
+#define MID_DROPCAP_FORMAT 0
+#define MID_DROPCAP_WHOLE_WORD 1
+#define MID_DROPCAP_CHAR_STYLE_NAME 2
+#define MID_DROPCAP_LINES 3
+#define MID_DROPCAP_COUNT 4
+#define MID_DROPCAP_DISTANCE 5
+
+#define MID_FRMSIZE_SIZE 0
+#define MID_FRMSIZE_REL_HEIGHT 1
+#define MID_FRMSIZE_REL_WIDTH 2
+
+#define MID_FRMSIZE_WIDTH 4
+#define MID_FRMSIZE_HEIGHT 5
+#define MID_FRMSIZE_SIZE_TYPE 6
+#define MID_FRMSIZE_IS_AUTO_HEIGHT 7
+/* XML only */
+#define MID_FRMSIZE_MIN_HEIGHT 8
+#define MID_FRMSIZE_FIX_HEIGHT 9
+#define MID_FRMSIZE_COL_WIDTH 10
+#define MID_FRMSIZE_REL_COL_WIDTH 11
+/* UNO */
+#define MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT 12
+#define MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH 13
+#define MID_FRMSIZE_WIDTH_TYPE 14
+
+#define MID_COLUMNS 0
+#define MID_COLUMN_SEPARATOR_LINE 1
+
+//SwFmtFtnAtTxtEnd
+#define MID_COLLECT 0
+#define MID_RESTART_NUM 1
+#define MID_NUM_START_AT 2
+#define MID_OWN_NUM 3
+#define MID_NUM_TYPE 4
+#define MID_PREFIX 5
+#define MID_SUFFIX 6
+
+//page style footnote
+#define MID_FTN_HEIGHT 0
+#define MID_LINE_WEIGHT 1
+#define MID_LINE_COLOR 2
+#define MID_LINE_RELWIDTH 3
+#define MID_LINE_ADJUST 4
+#define MID_LINE_TEXT_DIST 5
+#define MID_LINE_FOOTNOTE_DIST 6
+
+//SwFmtRuby
+#define MID_RUBY_TEXT 0
+#define MID_RUBY_ADJUST 1
+#define MID_RUBY_CHARSTYLE 2
+#define MID_RUBY_ABOVE 3
+
+//SwTextGridItem
+#define MID_GRID_COLOR 0
+#define MID_GRID_LINES 1
+#define MID_GRID_BASEHEIGHT 2
+#define MID_GRID_RUBYHEIGHT 3
+#define MID_GRID_TYPE 4
+#define MID_GRID_RUBY_BELOW 5
+#define MID_GRID_PRINT 6
+#define MID_GRID_DISPLAY 7
+#define MID_GRID_BASEWIDTH 8
+#define MID_GRID_SNAPTOCHARS 9
+#define MID_GRID_STANDARD_MODE 10
+
+//SwEnvItem
+#define MID_ENV_ADDR_TEXT 1
+#define MID_ENV_SEND 2
+#define MID_SEND_TEXT 3
+#define MID_ENV_ADDR_FROM_LEFT 4
+#define MID_ENV_ADDR_FROM_TOP 5
+#define MID_ENV_SEND_FROM_LEFT 6
+#define MID_ENV_SEND_FROM_TOP 7
+#define MID_ENV_WIDTH 8
+#define MID_ENV_HEIGHT 9
+#define MID_ENV_ALIGN 10
+#define MID_ENV_PRINT_FROM_ABOVE 11
+#define MID_ENV_SHIFT_RIGHT 12
+#define MID_ENV_SHIFT_DOWN 13
+
+// OD 2004-05-04 #i28701# - SwFmtWrapInfluenceOnObjPos
+#define MID_WRAP_INFLUENCE 0
+
+#endif
diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx
new file mode 100644
index 000000000000..dcb2f9cfcbda
--- /dev/null
+++ b/sw/inc/unomod.hxx
@@ -0,0 +1,213 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unomod.hxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOMOD_HXX
+#define _UNOMOD_HXX
+
+#include <com/sun/star/text/XModule.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/view/XPrintSettingsSupplier.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <comphelper/ChainablePropertySet.hxx>
+#include <comphelper/SettingsHelper.hxx>
+#include <usrpref.hxx>
+
+class SwView;
+class SwViewOption;
+struct SwPrintData;
+class SwDoc;
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+/*-----------------15.03.98 13:21-------------------
+
+--------------------------------------------------*/
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SwXModule_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
+
+class SwXModule : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::text::XModule,
+ ::com::sun::star::view::XViewSettingsSupplier,
+ ::com::sun::star::view::XPrintSettingsSupplier,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxViewSettings;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxPrintSettings;
+
+protected:
+ virtual ~SwXModule();
+public:
+ SwXModule();
+
+
+ //XViewSettings
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getViewSettings(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPrintSettings
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPrintSettings(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ 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(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
+enum SwXPrintSettingsType
+{
+ PRINT_SETTINGS_MODULE,
+ PRINT_SETTINGS_WEB,
+ PRINT_SETTINGS_DOCUMENT
+};
+
+class SwXPrintSettings : public comphelper::ChainableHelperNoState
+{
+ friend class SwXDocumentSettings;
+protected:
+ SwXPrintSettingsType meType;
+ SwPrintData * mpPrtOpt;
+ SwDoc *mpDoc;
+
+ virtual void _preSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual void _preGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual ~SwXPrintSettings()
+ throw();
+public:
+ SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = NULL );
+
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ 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(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+/*-----------------15.03.98 13:21-------------------
+
+--------------------------------------------------*/
+class SwXViewSettings : public comphelper::ChainableHelperNoState
+{
+
+ friend class SwXDocumentSettings;
+protected:
+ SwView* pView;
+ SwViewOption* mpViewOption;
+ const SwViewOption* mpConstViewOption;
+ sal_Bool bObjectValid:1, bWeb:1, mbApplyZoom;
+
+ sal_Int32 eHRulerUnit;
+ sal_Bool mbApplyHRulerMetric;
+ sal_Int32 eVRulerUnit;
+ sal_Bool mbApplyVRulerMetric;
+
+ virtual void _preSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual void _preGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual ~SwXViewSettings()
+ throw();
+public:
+ SwXViewSettings(sal_Bool bWeb, SwView* pView);
+
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ sal_Bool IsValid() const {return bObjectValid;}
+ void Invalidate() {bObjectValid = sal_False;}
+};
+/* -----------------24.09.98 10:47-------------------
+ *
+ * --------------------------------------------------*/
+/*class SwXTerminateListener : public ::com::sun::star::frame::XTerminateListener,
+ public UsrObject
+{
+public:
+ SwXTerminateListener();
+ virtual ~SwXTerminateListener();
+
+ SMART_UNO_DECLARATION( SwXTerminateListener, UsrObject );
+
+ virtual UString getClassName();
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::XInterface * queryInterface( ::com::sun::star::uno::Uik aUik);
+
+// 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);
+
+
+ //XTerminateListener
+ virtual void queryTermination(const ::com::sun::star::lang::EventObject& aEvent);
+ virtual void notifyTermination(const ::com::sun::star::lang::EventObject& aEvent);
+
+ //XEventListener
+ virtual void disposing(const ::com::sun::star::lang::EventObject& Source);
+};
+
+*/
+#endif
diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx
new file mode 100644
index 000000000000..b7a6c54d2bd2
--- /dev/null
+++ b/sw/inc/unoobj.hxx
@@ -0,0 +1,1493 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoobj.hxx,v $
+ *
+ * $Revision: 1.49 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOOBJ_HXX
+#define _UNOOBJ_HXX
+
+#include <unoevtlstnr.hxx>
+#include <unobaseclass.hxx>
+#include <unocrsr.hxx>
+#include <svtools/itemprop.hxx>
+#include <svtools/svarray.hxx>
+#include <frmfmt.hxx>
+#include <flyenum.hxx>
+#include <fldbas.hxx>
+#include <fmtcntnt.hxx>
+#include <pam.hxx>
+#include <toxe.hxx>
+#include <sortopt.hxx>
+#include <com/sun/star/document/XDocumentInsertable.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XWordCursor.hpp>
+#include <com/sun/star/text/XParagraphCursor.hpp>
+#include <com/sun/star/text/XSentenceCursor.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/text/XTextSection.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/util/XSortable.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/text/XRelativeTextContentInsert.hpp>
+#include <com/sun/star/text/XRelativeTextContentRemove.hpp>
+#include <com/sun/star/text/XTextAppendAndConvert.hpp>
+#include <com/sun/star/text/XRedline.hpp>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/factory.hxx> // helper for factories
+
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <cppuhelper/implbase5.hxx> // helper for implementations
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <cppuhelper/implbase7.hxx> // helper for implementations
+#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/implbase10.hxx>
+#include <cppuhelper/implbase12.hxx> // helper for implementations
+#include "TextCursorHelper.hxx"
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <com/sun/star/text/XFormField.hpp>
+
+#include <unomid.h>
+#include <tools/link.hxx>
+
+#include <IDocumentMarkAccess.hxx>
+#include <sfx2/Metadatable.hxx>
+
+#include <deque>
+#include <boost/shared_ptr.hpp>
+
+
+class SwFmtFtn;
+class SwFmtRefMark;
+class GetCurTxtFmtColl;
+
+
+struct FrameDependSortListEntry {
+ xub_StrLen nIndex;
+ sal_uInt32 nOrder;
+ ::boost::shared_ptr<SwDepend> pFrameDepend;
+ FrameDependSortListEntry (xub_StrLen const i_nIndex,
+ sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
+ : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
+};
+typedef ::std::deque< FrameDependSortListEntry >
+ FrameDependSortList_t;
+
+typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
+ FrameDependList_t;
+
+/* -----------------29.04.98 07:35-------------------
+ *
+ * --------------------------------------------------*/
+enum CursorType
+{
+ CURSOR_INVALID,
+ CURSOR_BODY,
+ CURSOR_FRAME,
+ CURSOR_TBLTEXT,
+ CURSOR_FOOTNOTE,
+ CURSOR_HEADER,
+ CURSOR_FOOTER,
+ CURSOR_REDLINE,
+ CURSOR_ALL, // fuer Search&Replace
+ CURSOR_SELECTION, // create a paragraph enumeration from a text range or cursor
+ CURSOR_SELECTION_IN_TABLE,
+ CURSOR_META, // meta/meta-field
+};
+
+
+/* -----------------26.06.98 16:18-------------------
+ *
+ * --------------------------------------------------*/
+
+SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
+::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
+
+// OD 2004-05-07 #i28701# - adjust 4th parameter
+void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
+ FrameDependSortList_t & rFrames,
+ const bool _bAtCharAnchoredObjs );
+
+/* -----------------29.04.98 07:35-------------------
+ *
+ * --------------------------------------------------*/
+class SwUnoInternalPaM : public SwPaM
+{
+ SwUnoInternalPaM( const SwUnoInternalPaM& );
+public:
+ SwUnoInternalPaM(SwDoc& rDoc);
+ ~SwUnoInternalPaM();
+
+ SwUnoInternalPaM& operator=(const SwPaM& rPaM);
+};
+
+/*-----------------04.03.98 11:54-------------------
+ Start/EndAction oder Start/EndAllAction
+--------------------------------------------------*/
+class UnoActionContext
+{
+ SwDoc* pDoc;
+ public:
+ UnoActionContext(SwDoc* pDoc);
+ ~UnoActionContext();
+
+ void InvalidateDocument() {pDoc = 0;}
+};
+/* -----------------07.07.98 12:03-------------------
+ * Actions kurzfristig unterbrechen
+ * --------------------------------------------------*/
+class UnoActionRemoveContext
+{
+ SwDoc* pDoc;
+ public:
+ UnoActionRemoveContext(SwDoc* pDoc);
+ ~UnoActionRemoveContext();
+};
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+typedef com::sun::star::uno::Reference< com::sun::star::text::XTextRange > * XTextRangeRefPtr;
+SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4)
+
+void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+/* -----------------03.12.98 12:22-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextRange;
+class SwXTextCursor;
+class SwXText : public ::com::sun::star::lang::XTypeProvider,
+ public ::com::sun::star::text::XTextRangeCompare,
+ public ::com::sun::star::text::XRelativeTextContentInsert,
+ public ::com::sun::star::text::XRelativeTextContentRemove,
+ public ::com::sun::star::beans::XPropertySet,
+ public ::com::sun::star::lang::XUnoTunnel,
+ public ::com::sun::star::text::XTextAppendAndConvert
+{
+ SwDoc* pDoc;
+ BOOL bObjectValid;
+ CursorType eCrsrType;
+ const SfxItemPropertySet* m_pPropSet;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishOrAppendParagraph(
+ bool bFinish,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ virtual void PrepareForAttach( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ const SwXTextRange* const pRange, const SwPaM * const pPam);
+
+public: /*not protected because C++ is retarded*/
+ virtual const SwStartNode *GetStartNode() const;
+
+public:
+ SwXText(SwDoc* pDc, CursorType eType);
+ virtual ~SwXText();
+
+ const SwDoc* GetDoc()const {return pDoc;}
+ SwDoc* GetDoc() {return pDoc;}
+
+ // wenn ein SwXText attached wird, wird das Doc gesetzt
+ void SetDoc(SwDoc* pDc)
+ {DBG_ASSERT(!pDoc || !pDc, "Doc schon gesetzt?");
+ pDoc = pDc;
+ bObjectValid = 0 != pDc;
+ }
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) 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);
+
+ //XText
+ virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextRangeCompare
+ sal_Int16 SAL_CALL compareRegionStarts( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL compareRegionEnds( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xR2 ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XRelativeTextContentInsert
+ virtual void SAL_CALL insertTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xNewContent, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XRelativeTextContentRemove
+ virtual void SAL_CALL removeTextContentBefore(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xSuccessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTextContentAfter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent>& xPredecessor) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XUnoTunnel
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XParagraphAppend
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishParagraph( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextPortionAppend
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextPortion( const ::rtl::OUString& Text, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextContentAppend
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL appendTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& TextContent, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& CharacterAndParagraphProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextConvert
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > SAL_CALL convertToTextFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& Start, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& End, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& FrameProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTable > SAL_CALL convertToTable( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > > > >& TableRanges,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > >& CellProperties,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& RowProperties,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& TableProperties
+ ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+
+ //
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
+ INT16 ComparePositions(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos1, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>& xPos2) throw (com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException);
+ BOOL CheckForOwnMember(const SwXTextRange* pRange1, const OTextCursorHelper* pCursor1)throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual bool CheckForOwnMemberMeta(const SwXTextRange* const pRange,
+ const SwPaM* const pPam, bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ //
+ void Invalidate() {bObjectValid = sal_False;}
+ BOOL IsValid()const {return bObjectValid;}
+
+ CursorType GetTextType() {return eCrsrType;}
+};
+
+/* -----------------03.12.98 12:16-------------------
+ *
+ * --------------------------------------------------*/
+enum SwGetPropertyStatesCaller
+{
+ SW_PROPERTY_STATE_CALLER_DEFAULT,
+ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION,
+ SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY,
+ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT
+};
+#define CRSR_ATTR_MODE_TABLE 1 //attributes should be applied to a table selection
+#define CRSR_ATTR_MODE_DONTREPLACE 2 //attributes should be added, not replaced
+
+typedef cppu::WeakImplHelper12<
+ ::com::sun::star::text::XSentenceCursor,
+ ::com::sun::star::text::XWordCursor,
+ ::com::sun::star::text::XParagraphCursor,
+ ::com::sun::star::text::XRedline,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::document::XDocumentInsertable,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::util::XSortable,
+ ::com::sun::star::container::XContentEnumerationAccess,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::beans::XMultiPropertyStates
+ > SwXTextCursor_Base;
+class SwXTextCursor : public SwXTextCursor_Base,
+ public SwClient,
+ public OTextCursorHelper
+{
+ SwEventListenerContainer aLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
+ SwSortOptions* pLastSortOptions;
+
+ CursorType eType;
+
+ // --> FME 2006-03-07 #126177# We need to track if the RemoveCursor_Impl
+ // user event has been posted. In this case we have to remove the user
+ // event in ~SwXTextCursor().
+ ULONG mnUserEventId;
+ bool mbRemoveUserEvent;
+ // <--
+
+ DECL_STATIC_LINK( SwXTextCursor, RemoveCursor_Impl,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface>* );
+
+protected:
+ virtual ~SwXTextCursor();
+public:
+ void DeleteAndInsert(const String& rText, const bool bForceExpandHints);
+ SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, const SwPosition& rPos,
+ CursorType eSet, SwDoc* pDoc, const SwPosition* pMark = 0);
+ SwXTextCursor(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, SwUnoCrsr* pSourceCrsr, CursorType eSet = CURSOR_ALL);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ DECLARE_XINTERFACE()
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextCursor - neu
+ virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XWordCursor - neu
+ virtual BOOL SAL_CALL isStartOfWord( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL isEndOfWord( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoNextWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoPreviousWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoEndOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoStartOfWord( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSentenceCursor - neu
+ virtual BOOL SAL_CALL isStartOfSentence( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL isEndOfSentence( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoNextSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoPreviousSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoStartOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual BOOL SAL_CALL gotoEndOfSentence( BOOL Expand ) throw(::com::sun::star::uno::RuntimeException);
+
+ //ParagraphCursor - neu
+ virtual BOOL SAL_CALL isStartOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL isEndOfParagraph(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL gotoStartOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL gotoEndOfParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL gotoNextParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL gotoPreviousParagraph(BOOL Expand) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XRedline
+ virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ static void SetPropertyValue(
+ SwPaM& rPaM,
+ const SfxItemPropertySet& rPropSet,
+ const rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& aValue,
+ USHORT nAttrMode = 0)
+ 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);
+ static ::com::sun::star::uno::Any GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > GetPropertyStates( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, SwGetPropertyStatesCaller eCaller = SW_PROPERTY_STATE_CALLER_DEFAULT) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::beans::PropertyState GetPropertyState( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ static void SetPropertyToDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Any GetPropertyDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XDocumentInsertable - neu
+ virtual void SAL_CALL insertDocumentFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+
+ //XSortable - neu
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XMultiPropertyStates
+ //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ virtual const SwPaM* GetPaM() const;
+ virtual SwPaM* GetPaM();
+ virtual const SwDoc* GetDoc() const;
+ virtual SwDoc* GetDoc();
+ SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
+ const SwUnoCrsr* GetCrsr()const{return (SwUnoCrsr*)GetRegisteredIn();}
+
+ static void SetCrsrAttr(SwPaM& rPam, const SfxItemSet& rSet, USHORT nAttrMode );
+ // --> OD 2006-07-12 #i63870#
+ // split third parameter <bCurrentAttrOnly> into new parameters <bOnlyTxtAttr>
+ // and <bGetFromChrFmt> to get better control about resulting <SfxItemSet>
+// static void GetCrsrAttr(SwPaM& rPam, SfxItemSet& rSet, BOOL bCurrentAttrOnly = FALSE);
+ static void GetCrsrAttr( SwPaM& rPam,
+ SfxItemSet& rSet,
+ BOOL bOnlyTxtAttr = FALSE,
+ BOOL bGetFromChrFmt = TRUE );
+ // <--
+ static void getTextFromPam(SwPaM& aCrsr, rtl::OUString& rBuffer);
+ static SwFmtColl* GetCurTxtFmtColl(SwPaM& rPam, BOOL bConditional);
+
+ static void SelectPam(SwPaM& rCrsr, sal_Bool bExpand);
+ static void SetString(SwCursor& rCrsr, const rtl::OUString& rString);
+
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ createSortDescriptor(sal_Bool bFromTable);
+ static sal_Bool convertSortProperties(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor,
+ SwSortOptions& rSortOpt);
+
+ // --> FME 2006-03-07 #126177#
+ void DoNotRemoveUserEvent() { mbRemoveUserEvent = false; }
+ // <--
+
+ bool IsAtEndOfMeta() const;
+};
+/*-----------------20.03.98 07:47-------------------
+
+--------------------------------------------------*/
+/* das wird zunaechst nicht gebraucht - bisher fuer den XPropertySetCloner
+class SwXPropertySet : public ::com::sun::star::beans::XPropertySet,
+ public UsrObject
+{
+ ::com::sun::star::uno::Sequence<::com::sun::star::uno::Any>* pAny;
+ ::com::sun::star::uno::Sequence< Property >* pInfo;
+
+public:
+ // Eigentumsuebergang der Pointer!
+ SwXPropertySet( ::com::sun::star::uno::Sequence<::com::sun::star::uno::Any>* pAny,
+ ::com::sun::star::uno::Sequence<Property>* pInfo );
+ virtual ~SwXPropertySet();
+
+ SMART_UNO_DECLARATION( SwXPropertySet, UsrObject );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+};
+*/
+/*-----------------20.03.98 08:26-------------------
+
+--------------------------------------------------*/
+/* das wird zunaechst nicht gebraucht - bisher fuer den XPropertySetCloner
+
+class SwXPropertySetInfo: public ::com::sun::star::beans::XPropertySetInfo, UsrObject
+{
+ ::com::sun::star::uno::Sequence< Property >* pSeq;
+
+public:
+ SwXPropertySetInfo( const ::com::sun::star::uno::Sequence<Property>& rInfo );
+ virtual ~SwXPropertySetInfo();
+
+ SMART_UNO_DECLARATION( SwXPropertySetInfo, UsrObject );
+
+ virtual ::com::sun::star::uno::Sequence< Property > getProperties(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual Property getPropertyByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL hasPropertyByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+};
+*/
+
+typedef ::cppu::ImplInheritanceHelper5
+<
+ ::sfx2::MetadatableMixin,
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>
+SwBookmarkBaseClass;
+
+class SwXBookmark
+ : public SwBookmarkBaseClass
+ , private SwClient
+{
+ private:
+ SwEventListenerContainer m_aLstnrCntnr;
+ SwDoc* m_pDoc;
+ String m_aName;
+ ::sw::mark::IMark* m_pRegisteredBookmark;
+
+ void registerInMark(::sw::mark::IMark* const pBkmk)
+ {
+ if(pBkmk)
+ pBkmk->Add(this);
+ else if(m_pRegisteredBookmark)
+ {
+ m_aName = m_pRegisteredBookmark->GetName();
+ m_pRegisteredBookmark->Remove(this);
+ }
+ m_pRegisteredBookmark = pBkmk;
+ }
+
+ protected:
+ virtual ~SwXBookmark();
+ public:
+ SwXBookmark(::sw::mark::IMark* pMark = 0, SwDoc* pDoc = 0);
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& rName) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentMarkAccess::MarkType eType) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > GetModel();
+
+ const ::sw::mark::IMark* GetBookmark() const
+ { return m_pRegisteredBookmark; }
+ ::sw::mark::IMark* GetBookmark()
+ { return m_pRegisteredBookmark; }
+ SwDoc* GetDoc()
+ { return m_pDoc; }
+};
+
+typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_BASE;
+
+class SwXFieldmark : public SwXFieldmark_BASE
+{
+ private:
+ bool isReplacementObject;
+ public:
+ SwXFieldmark(bool isReplacementObject, ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0);
+
+ virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getDescription(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::sal_Int16 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getRes( ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL setType( ::sal_Int16 fieldType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRes( ::sal_Int16 res ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDescription( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+/*-----------------23.02.98 10:45-------------------
+
+--------------------------------------------------*/
+
+typedef cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::lang::XServiceInfo
+> SwXBodyTextBaseClass;
+class SwXBodyText : public SwXBodyTextBaseClass,
+ public SwXText
+{
+protected:
+ virtual ~SwXBodyText();
+public:
+ SwXBodyText(SwDoc* pDoc);
+
+
+ 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(){OWeakObject::acquire();}
+ virtual void SAL_CALL release( ) throw(){OWeakObject::release();}
+
+ //XAggregation
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > CreateTextCursor(BOOL bIgnoreTables = sal_False);
+};
+
+class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8
+<
+ ::com::sun::star::text::XTextRange,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XContentEnumerationAccess,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::text::XRedline
+>, private SwClient
+{
+ friend class SwXText;
+ enum RangePosition
+ {
+ RANGE_IN_TEXT, // 'normaler' ::com::sun::star::text::TextRange
+ RANGE_IN_FRAME,// TextPosition wurde mit einem Rahmen angelegt, der kein Uno-Objekt besitzt
+ RANGE_IN_CELL, // TextPosition wurde mit einer Zelle angelegt, die kein Uno-Objekt besitzt
+ RANGE_IS_TABLE, // Anker einer Tabelle
+ RANGE_INVALID // von NewInstance erzeugt
+ } eRangePosition;
+
+ SwDoc* pDoc;
+ SwTableBox* pBox;
+ const SwStartNode* pBoxStartNode;
+ SwDepend aObjectDepend; //Format der Tabelle oder des Rahmens anmelden
+ const SfxItemPropertySet* m_pPropSet;
+ //SwDepend aFrameDepend;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
+ ::sw::mark::IMark* pMark;
+
+ void _CreateNewBookmark(SwPaM& rPam);
+ //TODO: new exception type for protected content
+ void DeleteAndInsert(const String& rText, const bool bForceExpandHints)
+ throw( ::com::sun::star::uno::RuntimeException );
+protected:
+ virtual ~SwXTextRange();
+
+public:
+ SwXTextRange(SwPaM& rPam, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > & rxParent, enum RangePosition eRange = RANGE_IN_TEXT);
+ // only for RANGE_IS_TABLE
+ SwXTextRange(SwFrmFmt& rTblFmt);
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XRedline
+ virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
+ BOOL GetPositions(SwPaM& rToFill) const;
+ const SwDoc* GetDoc() const
+ { return pDoc; }
+ SwDoc* GetDoc()
+ { return pDoc; }
+ const ::sw::mark::IMark * GetBookmark() const
+ { return pMark; }
+
+ static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition(
+ SwDoc* pDoc,
+ const SwPosition& rPos, const SwPosition* pMark);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > CreateParentXText(SwDoc* pDoc,
+ const SwPosition& rPos);
+};
+
+/* -----------------15.05.98 08:29-------------------
+ *
+ * --------------------------------------------------*/
+typedef cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwXTextRangesBaseClass;
+class SwXTextRanges : public SwXTextRangesBaseClass,
+ public SwClient
+{
+ XTextRangeArr* pRangeArr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
+ XTextRangeArr* GetRangesArray();
+ SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTextRanges();
+public:
+ SwXTextRanges();
+ SwXTextRanges(SwPaM* pCrsr);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
+ throw(::com::sun::star::uno::RuntimeException);
+
+
+ //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 nIndex) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ const SwUnoCrsr* GetCursor() const { return (const SwUnoCrsr*)GetRegisteredIn(); }
+};
+
+/*-----------------09.03.98 13:57-------------------
+
+--------------------------------------------------*/
+
+class SwXTextSection;
+class SwXTextSectionClient : public SwClient
+{
+ friend class SwXTextSection;
+ SwXTextSection* m_pSection;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XTextSection > m_xReference;
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ SwXTextSectionClient(
+ SwSectionFmt& rFmt,
+ SwXTextSection& rTextSection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > xSection );
+ virtual ~SwXTextSectionClient();
+ DECL_STATIC_LINK( SwXTextSectionClient, RemoveSectionClient_Impl,
+ SwXTextSectionClient* );
+
+public:
+ TYPEINFO();
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > GetXTextSection();
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection >
+ CreateXTextSection(SwSectionFmt* pFmt = 0, BOOL bIndexHeader = FALSE );
+ static SwXTextSectionClient* Create(
+ SwXTextSection& rSection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > xSection,
+ SwSectionFmt& rFmt );
+};
+
+struct SwTextSectionProperties_Impl;
+class SwXTextSection : public cppu::WeakImplHelper7
+<
+ ::com::sun::star::text::XTextSection,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XMultiPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>/*,
+ public SwClient*/
+{
+ friend class SwXTextSectionClient;
+ SwEventListenerContainer aLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+
+ BOOL m_bIsDescriptor;
+ BOOL m_bIndexHeader;
+ String m_sName;
+ SwTextSectionProperties_Impl* pProps;
+ SwXTextSectionClient* m_pClient;
+protected:
+ void SAL_CALL SetPropertyValues_Impl( 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::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ SwXTextSection(sal_Bool bWithFormat, sal_Bool bIndexHeader = FALSE);
+ virtual ~SwXTextSection();
+ void ResetClient() {m_pClient = 0;}
+ void SetClient( SwXTextSectionClient* pClient ){m_pClient = pClient;}
+
+public:
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextSection
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > SAL_CALL getParentSection(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection > > SAL_CALL getChildSections(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XMultiPropertySet
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+// virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ SwSectionFmt* GetFmt()const;
+ static SwXTextSection* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
+};
+/*-----------------12.02.98 08:01-------------------
+
+--------------------------------------------------*/
+typedef
+cppu::WeakImplHelper5
+<
+ ::com::sun::star::text::XFootnote,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XUnoTunnel
+>
+SwXFootnoteBaseClass;
+class SwXFootnote : public SwXFootnoteBaseClass,
+ public SwXText,
+ public SwClient
+{
+ friend class SwXFootnotes;
+
+ SwEventListenerContainer aLstnrCntnr;
+ const SwFmtFtn* pFmtFtn;
+ BOOL m_bIsDescriptor;
+ String m_sLabel;
+ BOOL m_bIsEndnote;
+
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
+ virtual ~SwXFootnote();
+public:
+ SwXFootnote(BOOL bEndnote);
+ SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ 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(){SwXFootnoteBaseClass::acquire();}
+ virtual void SAL_CALL release( ) throw(){SwXFootnoteBaseClass::release();}
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XFootnote
+ virtual rtl::OUString SAL_CALL getLabel(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setLabel(const rtl::OUString& aLabel) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ const SwFmtFtn* FindFmt() const {return GetDoc() ? pFmtFtn : 0;}
+ void Invalidate();
+};
+
+/*-----------------07.04.98 08:10-------------------
+
+--------------------------------------------------*/
+class SwXParagraphEnumeration : public SwSimpleEnumerationBaseClass,
+ public SwClient
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xNextPara;
+
+ const SwTable * pOwnTable;
+ const SwStartNode * pOwnStartNode; // start node of the cell the enumeration
+ // belongs to.
+ // Used to restrict the movement of the
+ // UNO cursor to the cell and its
+ // embedded tables.
+ sal_Int32 nFirstParaStart;
+ sal_Int32 nLastParaEnd;
+ ULONG nEndIndex;
+ CursorType eCursorType;
+ BOOL bFirstParagraph;
+
+ SwUnoCrsr* GetCrsr(){return (SwUnoCrsr*)GetRegisteredIn();}
+
+protected:
+ virtual ~SwXParagraphEnumeration();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > SAL_CALL NextElement_Impl(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+public:
+ SwXParagraphEnumeration(SwXText* pParent, SwPosition& rPos, CursorType eType);
+ SwXParagraphEnumeration(SwXText* pParent, SwUnoCrsr* pCrsr, CursorType eType);
+
+
+
+ //XEnumeration
+ virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //non-Uno functions
+
+ void SetOwnTable( const SwTable* pTable ) { pOwnTable = pTable; }
+ const SwTable* GetOwnTable() const { return pOwnTable; }
+ void SetOwnStartNode( const SwStartNode* pNode ) { pOwnStartNode = pNode; }
+ const SwStartNode* GetOwnStartNode() const { return pOwnStartNode; }
+};
+/*-----------------07.04.98 08:15-------------------
+
+--------------------------------------------------*/
+class SwXParagraph : public cppu::ImplInheritanceHelper10
+<
+ ::sfx2::MetadatableMixin,
+ ::com::sun::star::beans::XTolerantMultiPropertySet,
+ ::com::sun::star::beans::XMultiPropertySet,
+ ::com::sun::star::text::XTextRange,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::container::XContentEnumerationAccess
+>,
+ public SwClient
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
+ SwEventListenerContainer aLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+ rtl::OUString m_sText;
+ sal_Int32 nSelectionStartPos;
+ sal_Int32 nSelectionEndPos;
+ BOOL m_bIsDescriptor;
+
+
+protected:
+ void SAL_CALL SetPropertyValues_Impl( 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::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl(
+ const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
+ sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ~SwXParagraph();
+public:
+ SwXParagraph();
+ SwXParagraph(::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const & i_xParent, SwTxtNode * i_pTxtNode, sal_Int32 nSelStart = -1, sal_Int32 nSelEnd = - 1);
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTolerantMultiPropertySet
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( 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::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertySet
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - war XTextPortionEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ BOOL IsDescriptor() const {return m_bIsDescriptor;}
+
+ const SwTxtNode * GetTxtNode() const;
+ SwTxtNode * GetTxtNode();
+
+ static BOOL getDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
+ const rtl::OUString& rPropertyName, USHORT nWID = 0);
+ static SwXParagraph* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
+ //falls es mal als Service erzeugt werden kann
+ //void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ void attachToText(SwXText* pParent, SwUnoCrsr* pCrsr);
+};
+/* -----------------23.03.99 12:57-------------------
+ *
+ * --------------------------------------------------*/
+#define PARAFRAME_PORTION_PARAGRAPH 0
+#define PARAFRAME_PORTION_CHAR 1
+#define PARAFRAME_PORTION_TEXTRANGE 2
+
+class SwXParaFrameEnumeration : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XEnumeration,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xNextObject; // created by hasMoreElements
+ FrameDependList_t m_Frames;
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
+
+public:
+ SwXParaFrameEnumeration(const SwPaM& rPaM,
+ sal_uInt8 nParaFrameMode, SwFrmFmt* pFmt = 0);
+ ~SwXParaFrameEnumeration();
+
+ // XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw( ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::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 );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+
+/* -----------------29.09.98 09:01-------------------
+ *
+ * --------------------------------------------------*/
+/* os: 04.12.98 11:40 hier gibt es noch keine sinnvolle Definition
+#define MAX_SORT_FIELDS 3 // das ist eher willkuerlich (wie im Dialog)
+class SwXTextSortDescriptor : public XTextSortDescriptor,
+ public UsrObject
+{
+ SwSortOptions aSortOptions;
+ BOOL bUseHeader;
+public:
+ SwXTextSortDescriptor(BOOL bUsedInTable);
+ virtual ~SwXTextSortDescriptor();
+
+ //XTextSortDescriptor
+ virtual sal_Unicode getTextColumnSeparator(void) const;
+ virtual void setTextColumnSeparator(sal_Unicode TextColumnSeparator_);
+
+ //XSortDescriptor
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::SortField > getSortFields(void) const;
+ virtual void setSortFields(const ::com::sun::star::uno::Sequence< ::com::sun::star::util::SortField >& SortFields_);
+ virtual sal_uInt16 getMaxFieldCount(void) const;
+ virtual ColumnsOrRows getOrientation(void) const;
+ virtual void setOrientation(ColumnsOrRows Orientation_);
+ virtual BOOL getUseHeader(void) const;
+ virtual void setUseHeader(BOOL UseHeader_);
+
+ const SwSortOptions& GetSortOptions() const {return aSortOptions;}
+ void SetSortOptions(const SwSortOptions& rSortOpt);
+};
+*/
+/* -----------------25.08.98 11:02-------------------
+ *
+ * --------------------------------------------------*/
+typedef
+cppu::WeakImplHelper2
+<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XEnumerationAccess
+>
+SwXHeadFootTextBaseClass;
+class SwXHeadFootText : public SwXHeadFootTextBaseClass,
+ public SwXText,
+ public SwClient
+{
+ SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ BOOL bIsHeader;
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
+public:
+ SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader);
+ ~SwXHeadFootText();
+
+ TYPEINFO();
+
+ 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(){SwXHeadFootTextBaseClass::acquire();}
+ virtual void SAL_CALL release( ) throw(){SwXHeadFootTextBaseClass::release();}
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+/* -----------------27.08.98 15:11-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper5
+<
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>
+SwRefMarkBaseClass;
+
+class SwXReferenceMark : public SwRefMarkBaseClass,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ SwDoc* pDoc;
+ const SwFmtRefMark* pMark;
+ String sMarkName;
+ BOOL m_bIsDescriptor;
+
+ BOOL IsValid() const {return 0 != GetRegisteredIn();}
+ void InsertRefMark( SwPaM& rPam, SwXTextCursor * pCursor );
+public:
+ SwXReferenceMark(SwDoc* pDoc, const SwFmtRefMark* pMark);
+ ~SwXReferenceMark();
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ const SwFmtRefMark* GetMark()const {return pMark;}
+ const String& GetMarkName() const {return sMarkName;}
+ SwDoc* GetDoc() const{return pDoc;}
+ void Invalidate();
+};
+#endif
+
+
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
new file mode 100644
index 000000000000..ef20027994cf
--- /dev/null
+++ b/sw/inc/unoport.hxx
@@ -0,0 +1,328 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoport.hxx,v $
+ * $Revision: 1.20 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOPORT_HXX
+#define _UNOPORT_HXX
+
+#include <unocrsr.hxx>
+#include <unoevtlstnr.hxx>
+#include <calbck.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <svtools/itemprop.hxx>
+
+#include <memory>
+#include <deque>
+
+
+class SwFmtFld;
+class SwFrmFmt;
+class SwTxtRuby;
+
+
+typedef ::std::deque<
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > >
+ TextRangeList_t;
+
+
+/* -----------------29.05.98 14:42-------------------
+ *
+ * --------------------------------------------------*/
+enum SwTextPortionType
+{
+ PORTION_TEXT,
+ PORTION_FIELD,
+ PORTION_FRAME,
+ PORTION_FOOTNOTE,
+// obsolete! PORTION_CONTROL_CHAR,
+ PORTION_REFMARK_START,
+ PORTION_REFMARK_END,
+ PORTION_TOXMARK_START,
+ PORTION_TOXMARK_END,
+ PORTION_BOOKMARK_START,
+ PORTION_BOOKMARK_END,
+ PORTION_REDLINE_START,
+ PORTION_REDLINE_END,
+ PORTION_RUBY_START,
+ PORTION_RUBY_END,
+ PORTION_SOFT_PAGEBREAK,
+ PORTION_META,
+ PORTION_FIELD_START,
+ PORTION_FIELD_END,
+ PORTION_FIELD_START_END
+};
+
+
+class SwXTextPortion : public cppu::WeakImplHelper8
+<
+ ::com::sun::star::beans::XTolerantMultiPropertySet,
+ ::com::sun::star::beans::XMultiPropertySet,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::text::XTextRange,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::container::XContentEnumerationAccess,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+private:
+
+ SwEventListenerContainer m_ListenerContainer;
+ const SfxItemPropertySet * m_pPropSet;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ m_xParentText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xRefMark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xTOXMark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xBookmark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote >
+ m_xFootnote;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField >
+ m_xTextField;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xMeta;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyText;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyStyle;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyAdjust;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyIsAbove;
+
+ const SwDepend m_FrameDepend;
+ SwFrmFmt * m_pFrameFmt;
+ const SwTextPortionType m_ePortionType;
+
+ bool m_bIsCollapsed;
+
+ SwFmtFld * GetFldFmt(bool bInit = false);
+
+protected:
+
+ //SfxItemPropertySet& GetPropSet() { return aPropSet; }
+
+ void SAL_CALL SetPropertyValues_Impl(
+ 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::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::uno::Any GetPropertyValue( const SfxItemPropertyMap *pEntry,
+// SwUnoCrsr *pUnoCrsr,
+// SfxItemSet *pSet );
+ void GetPropertyValues( const ::rtl::OUString *pPropertyNames,
+ ::com::sun::star::uno::Any *pValues,
+ sal_Int32 nLength );
+
+ void GetPropertyValue( ::com::sun::star::uno::Any &rVal,
+ const SfxItemPropertySimpleEntry& rEntry, SwUnoCrsr *pUnoCrsr, SfxItemSet *&pSet );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl(
+ const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
+ sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ~SwXTextPortion();
+
+public:
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwTextPortionType eType );
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwFrmFmt& rFmt );
+
+ // for Ruby
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
+ SwTxtRuby const& rAttr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const& xParent,
+ sal_Bool bIsEnd );
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTolerantMultiPropertySet
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( 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::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertySet
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XUnoTunnel
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) 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 );
+
+ //XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void SetRefMark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xRefMark = xMark; }
+
+ void SetTOXMark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xTOXMark = xMark; }
+
+ void SetBookmark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xBookmark = xMark; }
+
+ void SetFootnote( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XFootnote > xNote)
+ { m_xFootnote = xNote; }
+
+ void SetTextField( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> xField)
+ { m_xTextField = xField; }
+
+ void SetMeta( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMeta)
+ { m_xMeta = xMeta; }
+
+ bool IsCollapsed() const { return m_bIsCollapsed; }
+ void SetCollapsed(bool bSet) { m_bIsCollapsed = bSet;}
+
+ SwTextPortionType GetTextPortionType() const { return m_ePortionType; }
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
+};
+
+/* -----------------29.05.98 14:42-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextPortionEnumeration
+ : public ::cppu::WeakImplHelper3
+ < ::com::sun::star::container::XEnumeration
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ >
+ , public SwClient
+{
+ TextRangeList_t m_Portions; // contains all portions, filled by ctor
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
+
+protected:
+ virtual ~SwXTextPortionEnumeration();
+
+public:
+ SwXTextPortionEnumeration(SwPaM& rParaCrsr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const & xParent,
+ const sal_Int32 nStart, const sal_Int32 nEnd );
+
+ SwXTextPortionEnumeration(SwPaM& rParaCrsr,
+ TextRangeList_t const & rPortions );
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ //XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw( ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::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 );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+#endif
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
new file mode 100644
index 000000000000..56360281915d
--- /dev/null
+++ b/sw/inc/unoprnms.hxx
@@ -0,0 +1,843 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoprnms.hxx,v $
+ * $Revision: 1.129.100.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOPRNMS_HXX
+#define _UNOPRNMS_HXX
+
+
+#include <sal/types.h>
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+enum SwPropNameIds
+{
+/* 0001 */ SW_PROPNAME_BEGIN = 1,
+
+/* 0001 */ UNO_NAME_FOLLOW_STYLE = SW_PROPNAME_BEGIN,
+/* 0002 */ UNO_NAME_IS_PHYSICAL,
+/* 0003 */ UNO_NAME_IS_AUTO_UPDATE,
+/* 0004 */ UNO_NAME_DISPLAY_NAME,
+/* 0005 */ UNO_NAME_PARA_GRAPHIC_URL,
+/* 0006 */ UNO_NAME_PARA_GRAPHIC_FILTER,
+/* 0007 */ UNO_NAME_HEADER_GRAPHIC_URL,
+/* 0008 */ UNO_NAME_HEADER_GRAPHIC_FILTER,
+/* 0009 */ UNO_NAME_FOOTER_GRAPHIC_URL,
+/* 0010 */ UNO_NAME_FOOTER_GRAPHIC_FILTER,
+/* 0011 */ UNO_NAME_BACK_GRAPHIC_URL,
+/* 0012 */ UNO_NAME_BACK_GRAPHIC_FILTER,
+/* 0013 */ UNO_NAME_BACK_GRAPHIC_LOCATION,
+/* 0014 */ UNO_NAME_BACK_GRAPHIC_BITMAP,
+/* 0015 */ UNO_NAME_GRAPHIC_URL,
+/* 0016 */ UNO_NAME_GRAPHIC_FILTER,
+/* 0017 */ UNO_NAME_GRAPHIC_LOCATION,
+/* 0018 */ UNO_NAME_GRAPHIC_SIZE,
+/* 0019 */ UNO_NAME_GRAPHIC_BITMAP,
+/* 0020 */ UNO_NAME_BULLET_FONT,
+/* 0021 */ UNO_NAME_PARA_GRAPHIC_LOCATION,
+/* 0022 */ UNO_NAME_HEADER_GRAPHIC_LOCATION,
+/* 0023 */ UNO_NAME_FOOTER_GRAPHIC_LOCATION,
+/* 0024 */ UNO_NAME_PARA_LEFT_PARA_MARGIN,
+/* 0025 */ UNO_NAME_PARA_RIGHT_PARA_MARGIN,
+/* 0026 */ UNO_NAME_PARA_LEFT_MARGIN,
+/* 0027 */ UNO_NAME_PARA_RIGHT_MARGIN,
+/* 0028 */ UNO_NAME_PARA_LEFT_MARGIN_RELATIVE,
+/* 0029 */ UNO_NAME_PARA_RIGHT_MARGIN_RELATIVE,
+/* 0030 */ UNO_NAME_PARA_IS_AUTO_FIRST_LINE_INDENT,
+/* 0031 */ UNO_NAME_PARA_FIRST_LINE_INDENT,
+/* 0032 */ UNO_NAME_PARA_FIRST_LINE_INDENT_RELATIVE,
+/* 0033 */ UNO_NAME_PARA_IS_HYPHENATION,
+/* 0034 */ UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS,
+/* 0035 */ UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS,
+/* 0036 */ UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS,
+/* 0037 */ UNO_NAME_LEFT_MARGIN,
+/* 0038 */ UNO_NAME_RIGHT_MARGIN,
+/* 0039 */ UNO_NAME_HEADER_LEFT_MARGIN,
+/* 0040 */ UNO_NAME_HEADER_RIGHT_MARGIN,
+/* 0041 */ UNO_NAME_FOOTER_LEFT_MARGIN,
+/* 0042 */ UNO_NAME_FOOTER_RIGHT_MARGIN,
+/* 0043 */ UNO_NAME_TEXT_RANGE,
+/* 0044 */ UNO_NAME_NAME,
+/* 0045 */ UNO_NAME_NUMBERING_ALIGNMENT,
+/* 0046 */ UNO_NAME_BULLET_FONT_NAME,
+/* 0047 */ UNO_NAME_BULLET_ID,
+/* 0048 */ UNO_NAME_CHAR_STYLE_NAME,
+/* 0049 */ UNO_NAME_ANCHOR_CHAR_STYLE_NAME,
+/* 0050 */ UNO_NAME_SUFFIX,
+/* 0051 */ UNO_NAME_PREFIX,
+/* 0052 */ UNO_NAME_PARENT_NUMBERING,
+/* 0053 */ UNO_NAME_START_WITH,
+/* 0054 */ UNO_NAME_CHAR_FONT_NAME,
+/* 0055 */ UNO_NAME_CHAR_FONT_STYLE_NAME,
+/* 0056 */ UNO_NAME_CHAR_FONT_FAMILY,
+/* 0057 */ UNO_NAME_CHAR_FONT_CHAR_SET,
+/* 0058 */ UNO_NAME_CHAR_FONT_PITCH,
+/* 0059 */ UNO_NAME_CHAR_POSTURE,
+/* 0060 */ UNO_NAME_CHAR_WEIGHT,
+/* 0061 */ UNO_NAME_CHAR_HEIGHT,
+/* 0062 */ UNO_NAME_CHAR_LOCALE,
+/* 0063 */ UNO_NAME_CHAR_FONT_NAME_ASIAN,
+/* 0064 */ UNO_NAME_CHAR_FONT_STYLE_NAME_ASIAN,
+/* 0065 */ UNO_NAME_CHAR_FONT_FAMILY_ASIAN,
+/* 0066 */ UNO_NAME_CHAR_FONT_CHAR_SET_ASIAN,
+/* 0067 */ UNO_NAME_CHAR_FONT_PITCH_ASIAN,
+/* 0068 */ UNO_NAME_CHAR_POSTURE_ASIAN,
+/* 0069 */ UNO_NAME_CHAR_WEIGHT_ASIAN,
+/* 0070 */ UNO_NAME_CHAR_HEIGHT_ASIAN,
+/* 0071 */ UNO_NAME_CHAR_LOCALE_ASIAN,
+/* 0072 */ UNO_NAME_CHAR_FONT_NAME_COMPLEX,
+/* 0073 */ UNO_NAME_CHAR_FONT_STYLE_NAME_COMPLEX,
+/* 0074 */ UNO_NAME_CHAR_FONT_FAMILY_COMPLEX,
+/* 0075 */ UNO_NAME_CHAR_FONT_CHAR_SET_COMPLEX,
+/* 0076 */ UNO_NAME_CHAR_FONT_PITCH_COMPLEX,
+/* 0077 */ UNO_NAME_CHAR_POSTURE_COMPLEX,
+/* 0078 */ UNO_NAME_CHAR_WEIGHT_COMPLEX,
+/* 0079 */ UNO_NAME_CHAR_HEIGHT_COMPLEX,
+/* 0080 */ UNO_NAME_CHAR_LOCALE_COMPLEX,
+/* 0081 */ UNO_NAME_CHAR_AUTO_KERNING,
+/* 0082 */ UNO_NAME_CHAR_UNDERLINE,
+/* 0083 */ UNO_NAME_CHAR_UNDERLINE_COLOR,
+/* 0084 */ UNO_NAME_CHAR_UNDERLINE_HAS_COLOR,
+/* 0085 */ UNO_NAME_CHAR_ESCAPEMENT,
+/* 0086 */ UNO_NAME_CHAR_CASE_MAP,
+/* 0087 */ UNO_NAME_CHAR_SHADOWED,
+/* 0088 */ UNO_NAME_CHAR_STRIKEOUT,
+/* 0089 */ UNO_NAME_CHAR_CROSSED_OUT,
+/* 0090 */ UNO_NAME_CHAR_NO_HYPHENATION,
+/* 0091 */ UNO_NAME_CHAR_AUTO_ESCAPEMENT,
+/* 0092 */ UNO_NAME_CHAR_PROP_HEIGHT,
+/* 0093 */ UNO_NAME_CHAR_DIFF_HEIGHT,
+/* 0094 */ UNO_NAME_CHAR_PROP_HEIGHT_ASIAN,
+/* 0095 */ UNO_NAME_CHAR_DIFF_HEIGHT_ASIAN,
+/* 0096 */ UNO_NAME_CHAR_PROP_HEIGHT_COMPLEX,
+/* 0097 */ UNO_NAME_CHAR_DIFF_HEIGHT_COMPLEX,
+/* 0098 */ UNO_NAME_CHAR_ESCAPEMENT_HEIGHT,
+/* 0099 */ UNO_NAME_CHAR_COLOR,
+
+/* 0100 */ UNO_NAME_CHAR_FLASH,
+/* 0101 */ UNO_NAME_CHAR_KERNING,
+/* 0102 */ UNO_NAME_CHAR_BACK_COLOR,
+/* 0103 */ UNO_NAME_CHAR_BACK_TRANSPARENT,
+/* 0104 */ UNO_NAME_CHAR_COMBINE_IS_ON,
+/* 0105 */ UNO_NAME_CHAR_COMBINE_PREFIX,
+/* 0106 */ UNO_NAME_CHAR_COMBINE_SUFFIX,
+/* 0107 */ UNO_NAME_CHAR_EMPHASIS,
+/* 0108 */ UNO_NAME_PARA_LINE_SPACING,
+/* 0109 */ UNO_NAME_PARA_TOP_MARGIN,
+/* 0110 */ UNO_NAME_PARA_BOTTOM_MARGIN,
+/* 0111 */ UNO_NAME_PARA_TOP_MARGIN_RELATIVE,
+/* 0112 */ UNO_NAME_PARA_BOTTOM_MARGIN_RELATIVE,
+/* 0113 */ UNO_NAME_PARA_EXPAND_SINGLE_WORD,
+/* 0114 */ UNO_NAME_END_NOTICE,
+/* 0115 */ UNO_NAME_EMBEDDED_OBJECTS,
+/* 0116 */ UNO_NAME_ALPHABETICAL_SEPARATORS,
+/* 0117 */ UNO_NAME_BACKGROUND_COLOR,
+/* 0118 */ UNO_NAME_BEGIN_NOTICE,
+/* 0119 */ UNO_NAME_CASE_SENSITIVE,
+/* 0120 */ UNO_NAME_FRAME_STYLE_NAME,
+/* 0121 */ UNO_NAME_NUMBERING_STYLE_NAME,
+/* 0122 */ UNO_NAME_NUMBERING_LEVEL,
+/* 0123 */ UNO_NAME_NUMBERING_START_VALUE,
+/* 0124 */ UNO_NAME_NUMBERING_IS_NUMBER,
+/* 0125 */ UNO_NAME_COMBINE_ENTRIES,
+/* 0126 */ UNO_NAME_COUNT_LINES_IN_FRAMES,
+/* 0127 */ UNO_NAME_DDE_COMMAND_TYPE,
+/* 0128 */ UNO_NAME_DDE_COMMAND_FILE,
+/* 0129 */ UNO_NAME_DDE_COMMAND_ELEMENT,
+/* 0130 */ UNO_NAME_IS_AUTOMATIC_UPDATE,
+/* 0131 */ UNO_NAME_DEFAULT_TABSTOP_DISTANCE,
+/* 0132 */ UNO_NAME_DISTANCE,
+/* 0133 */ UNO_NAME_DROP_CAP_FORMAT,
+/* 0134 */ UNO_NAME_DROP_CAP_WHOLE_WORD,
+/* 0135 */ UNO_NAME_DROP_CAP_CHAR_STYLE_NAME,
+/* 0136 */ UNO_NAME_FILE_LINK,
+/* 0137 */ UNO_NAME_GRAPHIC,
+/* 0138 */ UNO_NAME_GRAPHICS,
+/* 0139 */ UNO_NAME_IS_PROTECTED,
+/* 0140 */ UNO_NAME_KEY_AS_ENTRY,
+/* 0141 */ UNO_NAME_PARA_KEEP_TOGETHER,
+/* 0142 */ UNO_NAME_KEEP_TOGETHER,
+/* 0143 */ UNO_NAME_IS_LANDSCAPE,
+/* 0144 */ UNO_NAME_SEPARATOR_TEXT,
+/* 0145 */ UNO_NAME_MARKS,
+/* 0146 */ UNO_NAME_NUMBER_POSITION,
+/* 0147 */ UNO_NAME_OUTLINES,
+/* 0148 */ UNO_NAME_PAGE_STYLE_NAME,
+/* 0149 */ UNO_NAME_PAGE_STYLE_LAYOUT,
+/* 0150 */ UNO_NAME_PARA_STYLES,
+/* 0151 */ UNO_NAME_PARA_ADJUST,
+/* 0152 */ UNO_NAME_PARA_REGISTER_MODE_ACTIVE,
+/* 0153 */ UNO_NAME_PARA_STYLE_NAME,
+/* 0154 */ UNO_NAME_PARA_LAST_LINE_ADJUST,
+/* 0155 */ UNO_NAME_PARA_LINE_NUMBER_COUNT,
+/* 0156 */ UNO_NAME_PARA_LINE_NUMBER_START_VALUE,
+/* 0157 */ UNO_NAME_BACK_COLOR,
+/* 0158 */ UNO_NAME_PARA_BACK_COLOR,
+/* 0159 */ UNO_NAME_PARA_WIDOWS,
+/* 0160 */ UNO_NAME_PARA_ORPHANS,
+/* 0161 */ UNO_NAME_PARA_BACK_TRANSPARENT,
+/* 0162 */ UNO_NAME_POSITION_END_OF_DOC,
+/* 0163 */ UNO_NAME_POSITION_PROTECTED,
+/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT,
+/* 0165 */ UNO_NAME_PRIMARY_KEY,
+/* 0166 */ UNO_NAME_PRINT_TABLES,
+/* 0167 */ UNO_NAME_PRINT_GRAPHICS,
+/* 0168 */ UNO_NAME_PRINT_REVERSED,
+/* 0169 */ UNO_NAME_PRINT_PROSPECT,
+/* 0170 */ UNO_NAME_PRINT_CONTROLS,
+/* 0171 */ UNO_NAME_PRINT_DRAWINGS,
+/* 0172 */ UNO_NAME_PRINT_RIGHT_PAGES,
+/* 0173 */ UNO_NAME_PRINT_LEFT_PAGES,
+/* 0174 */ UNO_NAME_PRINT_BLACK_FONTS,
+/* 0175 */ UNO_NAME_PRINTER_PAPER_TRAY,
+/* 0176 */ UNO_NAME_PRINT_PAGE_BACKGROUND,
+/* 0177 */ UNO_NAME_PRINT_ANNOTATION_MODE,
+/* 0178 */ UNO_NAME_PRINT_FAX_NAME,
+/* 0179 */ UNO_NAME_PRINT_PAPER_FROM_SETUP,
+/* 0180 */ UNO_NAME_REGISTER_MODE_ACTIVE,
+/* 0181 */ UNO_NAME_RELATIVE_WIDTH,
+/* 0182 */ UNO_NAME_RELATIVE_HEIGHT,
+/* 0183 */ UNO_NAME_REPEAT_HEADLINE,
+/* 0184 */ UNO_NAME_SEARCH_STYLES,
+/* 0185 */ UNO_NAME_SEARCH_BACKWARDS,
+/* 0186 */ UNO_NAME_SEARCH_SIMILARITY,
+/* 0187 */ UNO_NAME_SEARCH_IN_SELECTION,
+/* 0188 */ UNO_NAME_SEARCH_CASE_SENSITIVE,
+/* 0189 */ UNO_NAME_SEARCH_SIMILARITY_ADD,
+/* 0190 */ UNO_NAME_SEARCH_SIMILARITY_RELAX,
+/* 0191 */ UNO_NAME_SEARCH_SIMILARITY_REMOVE,
+/* 0192 */ UNO_NAME_SEARCH_REGULAR_EXPRESSION,
+/* 0193 */ UNO_NAME_SEARCH_SIMILARITY_EXCHANGE,
+/* 0194 */ UNO_NAME_SECONDARY_KEY,
+/* 0195 */ UNO_NAME_SEPARATOR_INTERVAL,
+/* 0196 */ UNO_NAME_SHOW_BREAKS,
+/* 0197 */ UNO_NAME_SHOW_SPACES,
+/* 0198 */ UNO_NAME_SHOW_TABLES,
+/* 0199 */ UNO_NAME_SHOW_GRAPHICS,
+
+/* 0200 */ UNO_NAME_SHOW_DRAWINGS,
+/* 0201 */ UNO_NAME_SHOW_TABSTOPS,
+/* 0202 */ UNO_NAME_SHOW_VERT_RULER,
+/* 0203 */ UNO_NAME_SHOW_PARA_BREAKS,
+/* 0204 */ UNO_NAME_SHOW_HIDDEN_TEXT,
+/* 0205 */ UNO_NAME_SHOW_ANNOTATIONS,
+/* 0206 */ UNO_NAME_SHOW_SOFT_HYPHENS,
+/* 0207 */ UNO_NAME_SHOW_VERT_SCROLL_BAR,
+/* 0208 */ UNO_NAME_SHOW_HORI_SCROLL_BAR,
+/* 0209 */ UNO_NAME_SHOW_FIELD_COMMANDS,
+/* 0210 */ UNO_NAME_SHOW_TEXT_BOUNDARIES,
+/* 0211 */ UNO_NAME_SHOW_PROTECTED_SPACES,
+/* 0212 */ UNO_NAME_SHOW_TABLE_BOUNDARIES,
+/* 0213 */ UNO_NAME_SHOW_HIDDEN_PARAGRAPHS,
+/* 0214 */ UNO_NAME_SHOW_INDEX_MARK_BACKGROUND,
+/* 0215 */ UNO_NAME_SHOW_FOOTNOTE_BACKGROUND,
+/* 0216 */ UNO_NAME_SHOW_TEXT_FIELD_BACKGROUND,
+/* 0217 */ UNO_NAME_IS_SYNC_WIDTH_TO_HEIGHT,
+/* 0218 */ UNO_NAME_IS_SYNC_HEIGHT_TO_WIDTH,
+/* 0219 */ UNO_NAME_SIZE_PROTECTED,
+/* 0220 */ UNO_NAME_SMOOTH_SCROLLING,
+/* 0221 */ UNO_NAME_SOLID_MARK_HANDLES,
+/* 0222 */ UNO_NAME_TABLES,
+/* 0223 */ UNO_NAME_TEXT_FRAMES,
+/* 0224 */ UNO_NAME_TEXT_COLUMNS,
+/* 0225 */ UNO_NAME_BACK_TRANSPARENT,
+/* 0226 */ UNO_NAME_USE_PP,
+/* 0227 */ UNO_NAME_USER_METRIC,
+/* 0228 */ UNO_NAME_ANCHOR_TYPE,
+/* 0229 */ UNO_NAME_ANCHOR_TYPES,
+/* 0230 */ UNO_NAME_ANCHOR_PAGE_NO,
+/* 0231 */ UNO_NAME_ANCHOR_FRAME,
+/* 0232 */ UNO_NAME_AUTHOR,
+/* 0233 */ UNO_NAME_BREAK_TYPE,
+/* 0234 */ UNO_NAME_CHAIN_NEXT_NAME,
+/* 0235 */ UNO_NAME_CHAIN_PREV_NAME,
+/* 0236 */ UNO_NAME_CHAPTER_FORMAT,
+/* 0237 */ UNO_NAME_CLIENT_MAP,
+/* 0238 */ UNO_NAME_CONDITION,
+/* 0239 */ UNO_NAME_CONTENT,
+/* 0240 */ UNO_NAME_CHAR_CONTOURED,
+/* 0241 */ UNO_NAME_CONTOUR_OUTSIDE,
+/* 0242 */ UNO_NAME_CONTENT_PROTECTED,
+/* 0243 */ UNO_NAME_COUNT_EMPTY_LINES,
+/* 0244 */ UNO_NAME_RESTART_AT_EACH_PAGE,
+/* 0245 */ UNO_NAME_DATA_BASE_NAME,
+/* 0246 */ UNO_NAME_DATA_TABLE_NAME,
+/* 0247 */ UNO_NAME_DATA_COMMAND_TYPE,
+/* 0248 */ UNO_NAME_DATA_COLUMN_NAME,
+/* 0249 */ UNO_NAME_IS_DATA_BASE_FORMAT,
+/* 0250 */ UNO_NAME_DATE,
+/* 0251 */ UNO_NAME_IS_DATE,
+/* 0252 */ UNO_NAME_EDIT_IN_READONLY,
+/* 0253 */ UNO_NAME_FALSE_CONTENT,
+/* 0254 */ UNO_NAME_FILE_FORMAT,
+/* 0255 */ UNO_NAME_IS_FIXED,
+/* 0256 */ UNO_NAME_FOOTNOTE_COUNTING,
+/* 0257 */ UNO_NAME_FORMULA,
+/* 0258 */ UNO_NAME_FRAME_NAME,
+/* 0259 */ UNO_NAME_GRAPHIC_NAME,
+/* 0260 */ UNO_NAME_FULL_NAME,
+/* 0261 */ UNO_NAME_HEIGHT,
+/* 0262 */ UNO_NAME_IS_AUTO_HEIGHT,
+/* 0263 */ UNO_NAME_SIZE_TYPE,
+/* 0264 */ UNO_NAME_HINT,
+/* 0265 */ UNO_NAME_HORI_ORIENT,
+/* 0266 */ UNO_NAME_HORI_MIRRORED_ON_EVEN_PAGES,
+/* 0267 */ UNO_NAME_HORI_MIRRORED_ON_ODD_PAGES,
+/* 0268 */ UNO_NAME_HORI_ORIENT_RELATION,
+/* 0269 */ UNO_NAME_HORI_ORIENT_POSITION,
+/* 0270 */ UNO_NAME_HYPER_LINK_U_R_L,
+/* 0271 */ UNO_NAME_HYPER_LINK_TARGET,
+/* 0272 */ UNO_NAME_HYPER_LINK_NAME,
+/* 0273 */ UNO_NAME_HYPER_LINK_EVENTS,
+/* 0274 */ UNO_NAME_INFO_TYPE,
+/* 0275 */ UNO_NAME_INFO_FORMAT,
+/* 0276 */ UNO_NAME_IS_INPUT,
+/* 0277 */ UNO_NAME_LEVEL,
+/* 0278 */ UNO_NAME_INTERVAL,
+/* 0279 */ UNO_NAME_LINK_REGION,
+/* 0280 */ UNO_NAME_MACRO_NAME,
+/* 0281 */ UNO_NAME_SPLIT,
+/* 0282 */ UNO_NAME_PARA_SPLIT,
+/* 0283 */ UNO_NAME_NUMBER_FORMAT,
+/* 0284 */ UNO_NAME_NUMBERING_TYPE,
+/* 0285 */ UNO_NAME_NUMBERING_RULES,
+/* 0286 */ UNO_NAME_OFFSET,
+/* 0287 */ UNO_NAME_ON,
+/* 0288 */ UNO_NAME_OPAQUE,
+/* 0289 */ UNO_NAME_PAGE_TOGGLE,
+/* 0290 */ UNO_NAME_PAGE_DESC_NAME,
+/* 0291 */ UNO_NAME_PAGE_NUMBER_OFFSET,
+/* 0292 */ UNO_NAME_PLACEHOLDER,
+/* 0293 */ UNO_NAME_PLACEHOLDER_TYPE,
+/* 0294 */ UNO_NAME_PRINT,
+/* 0295 */ UNO_NAME_REFERENCE_FIELD_PART,
+/* 0296 */ UNO_NAME_REFERENCE_FIELD_SOURCE,
+/* 0297 */ UNO_NAME_REGISTER_PARAGRAPH_STYLE,
+/* 0298 */ UNO_NAME_SCRIPT_TYPE,
+/* 0299 */ UNO_NAME_SEARCH_ALL,
+
+/* 0300 */ UNO_NAME_SEARCH_WORDS,
+/* 0301 */ UNO_NAME_SEQUENCE_VALUE,
+/* 0302 */ UNO_NAME_SERVER_MAP,
+/* 0303 */ UNO_NAME_IMAGE_MAP,
+/* 0304 */ UNO_NAME_SET_NUMBER,
+/* 0305 */ UNO_NAME_SHADOW_FORMAT,
+/* 0306 */ UNO_NAME_SHOW_HORI_RULER,
+/* 0307 */ UNO_NAME_SIZE,
+/* 0308 */ UNO_NAME_ACTUAL_SIZE,
+/* 0309 */ UNO_NAME_SOURCE_NAME,
+/* 0310 */ UNO_NAME_START_AT,
+/* 0311 */ UNO_NAME_STATISTIC_TYPE_ID,
+/* 0312 */ UNO_NAME_SUB_TYPE,
+/* 0313 */ UNO_NAME_SURROUND,
+/* 0314 */ UNO_NAME_IS_EXPRESSION,
+/* 0315 */ UNO_NAME_IS_SHOW_FORMULA,
+/* 0316 */ UNO_NAME_TEXT_WRAP,
+/* 0317 */ UNO_NAME_SURROUND_CONTOUR,
+/* 0318 */ UNO_NAME_SURROUND_ANCHORONLY,
+/* 0319 */ UNO_NAME_TABLE_NAME,
+/* 0320 */ UNO_NAME_TABSTOPS,
+/* 0321 */ UNO_NAME_TITLE,
+/* 0322 */ UNO_NAME_TOP_MARGIN,
+/* 0323 */ UNO_NAME_BOTTOM_MARGIN,
+/* 0324 */ UNO_NAME_TRUE_CONTENT,
+/* 0325 */ UNO_NAME_URL_CONTENT,
+/* 0326 */ UNO_NAME_USERTEXT,
+/* 0327 */ UNO_NAME_USER_DATA_TYPE,
+/* 0328 */ UNO_NAME_VALUE,
+/* 0329 */ UNO_NAME_VARIABLE_NAME,
+/* 0330 */ UNO_NAME_VARIABLE_SUBTYPE,
+/* 0331 */ UNO_NAME_VERT_ORIENT,
+/* 0332 */ UNO_NAME_VERT_MIRRORED,
+/* 0333 */ UNO_NAME_VERT_ORIENT_POSITION,
+/* 0334 */ UNO_NAME_VERT_ORIENT_RELATION,
+/* 0335 */ UNO_NAME_IS_VISIBLE,
+/* 0336 */ UNO_NAME_WIDTH,
+/* 0337 */ UNO_NAME_CHAR_WORD_MODE,
+/* 0338 */ UNO_NAME_GRAPHIC_CROP,
+/* 0339 */ UNO_NAME_CHARACTER_FORMAT_NONE,
+/* 0340 */ UNO_NAME_TEXT_POSITION,
+/* 0341 */ UNO_NAME_DOCUMENT_INDEX_MARK,
+/* 0342 */ UNO_NAME_DOCUMENT_INDEX,
+/* 0343 */ UNO_NAME_IS_GLOBAL_DOCUMENT_SECTION,
+/* 0344 */ UNO_NAME_TEXT_FIELD,
+/* 0345 */ UNO_NAME_BOOKMARK,
+/* 0346 */ UNO_NAME_TEXT_TABLE,
+/* 0347 */ UNO_NAME_CELL,
+/* 0348 */ UNO_NAME_TEXT_FRAME,
+/* 0349 */ UNO_NAME_REFERENCE_MARK,
+/* 0350 */ UNO_NAME_TEXT_SECTION,
+/* 0351 */ UNO_NAME_FOOTNOTE,
+/* 0352 */ UNO_NAME_ENDNOTE,
+/* 0353 */ UNO_NAME_CHART_ROW_AS_LABEL,
+/* 0354 */ UNO_NAME_CHART_COLUMN_AS_LABEL,
+/* 0355 */ UNO_NAME_TABLE_COLUMS,
+/* 0356 */ UNO_NAME_LEFT_BORDER,
+/* 0357 */ UNO_NAME_RIGHT_BORDER,
+/* 0358 */ UNO_NAME_TOP_BORDER,
+/* 0359 */ UNO_NAME_BOTTOM_BORDER,
+/* 0360 */ UNO_NAME_BORDER_DISTANCE,
+/* 0361 */ UNO_NAME_LEFT_BORDER_DISTANCE,
+/* 0362 */ UNO_NAME_RIGHT_BORDER_DISTANCE,
+/* 0363 */ UNO_NAME_TOP_BORDER_DISTANCE,
+/* 0364 */ UNO_NAME_BOTTOM_BORDER_DISTANCE,
+/* 0365 */ UNO_NAME_TABLE_BORDER,
+/* 0366 */ UNO_NAME_TABLE_COLUMN_SEPARATORS,
+/* 0367 */ UNO_NAME_TABLE_COLUMN_RELATIVE_SUM,
+/* 0368 */ UNO_NAME_HEADER_TEXT,
+/* 0369 */ UNO_NAME_HEADER_TEXT_LEFT,
+/* 0370 */ UNO_NAME_HEADER_TEXT_RIGHT,
+/* 0371 */ UNO_NAME_FOOTER_TEXT,
+/* 0372 */ UNO_NAME_FOOTER_TEXT_LEFT,
+/* 0373 */ UNO_NAME_FOOTER_TEXT_RIGHT,
+/* 0374 */ UNO_NAME_HEADER_BACK_COLOR,
+/* 0375 */ UNO_NAME_HEADER_GRAPHIC,
+/* 0376 */ UNO_NAME_HEADER_BACK_TRANSPARENT,
+/* 0377 */ UNO_NAME_HEADER_LEFT_BORDER,
+/* 0378 */ UNO_NAME_HEADER_RIGHT_BORDER,
+/* 0379 */ UNO_NAME_HEADER_TOP_BORDER,
+/* 0380 */ UNO_NAME_HEADER_BOTTOM_BORDER,
+/* 0381 */ UNO_NAME_HEADER_BORDER_DISTANCE,
+/* 0382 */ UNO_NAME_HEADER_SHADOW_FORMAT,
+/* 0383 */ UNO_NAME_HEADER_BODY_DISTANCE,
+/* 0384 */ UNO_NAME_HEADER_IS_DYNAMIC_HEIGHT,
+/* 0385 */ UNO_NAME_HEADER_IS_SHARED,
+/* 0386 */ UNO_NAME_HEADER_HEIGHT,
+/* 0387 */ UNO_NAME_HEADER_IS_ON,
+/* 0388 */ UNO_NAME_FOOTER_BACK_COLOR,
+/* 0389 */ UNO_NAME_FOOTER_GRAPHIC,
+/* 0390 */ UNO_NAME_FOOTER_BACK_TRANSPARENT,
+/* 0391 */ UNO_NAME_FOOTER_LEFT_BORDER,
+/* 0392 */ UNO_NAME_FOOTER_RIGHT_BORDER,
+/* 0393 */ UNO_NAME_FOOTER_TOP_BORDER,
+/* 0394 */ UNO_NAME_FOOTER_BOTTOM_BORDER,
+/* 0395 */ UNO_NAME_FOOTER_BORDER_DISTANCE,
+/* 0396 */ UNO_NAME_FOOTER_SHADOW_FORMAT,
+/* 0397 */ UNO_NAME_FOOTER_BODY_DISTANCE,
+/* 0398 */ UNO_NAME_FOOTER_IS_DYNAMIC_HEIGHT,
+/* 0399 */ UNO_NAME_FOOTER_IS_SHARED,
+
+/* 0400 */ UNO_NAME_FOOTER_HEIGHT,
+/* 0401 */ UNO_NAME_FOOTER_IS_ON,
+/* 0402 */ UNO_NAME_OVERWRITE_STYLES,
+/* 0403 */ UNO_NAME_LOAD_NUMBERING_STYLES,
+/* 0404 */ UNO_NAME_LOAD_PAGE_STYLES,
+/* 0405 */ UNO_NAME_LOAD_FRAME_STYLES,
+/* 0406 */ UNO_NAME_LOAD_TEXT_STYLES,
+/* 0407 */ UNO_NAME_FILE_NAME,
+/* 0408 */ UNO_NAME_FILTER_NAME,
+/* 0409 */ UNO_NAME_FILTER_OPTION,
+/* 0410 */ UNO_NAME_PASSWORD,
+/* 0411 */ UNO_NAME_COPY_COUNT,
+/* 0412 */ UNO_NAME_COLLATE,
+/* 0413 */ UNO_NAME_SORT,
+/* 0414 */ UNO_NAME_PAGES,
+/* 0415 */ UNO_NAME_FIRST_LINE_OFFSET,
+/* 0416 */ UNO_NAME_SYMBOL_TEXT_DISTANCE,
+/* 0417 */ UNO_NAME_USER_INDEX_NAME,
+/* 0418 */ UNO_NAME_REVISION,
+/* 0419 */ UNO_NAME_UNVISITED_CHAR_STYLE_NAME,
+/* 0420 */ UNO_NAME_VISITED_CHAR_STYLE_NAME,
+/* 0421 */ UNO_NAME_PARAGRAPH_COUNT,
+/* 0422 */ UNO_NAME_WORD_COUNT,
+/* 0423 */ UNO_NAME_WORD_SEPARATOR,
+/* 0424 */ UNO_NAME_CHARACTER_COUNT,
+/* 0425 */ UNO_NAME_ZOOM_VALUE,
+/* 0426 */ UNO_NAME_ZOOM_TYPE,
+/* 0427 */ UNO_NAME_CREATE_FROM_MARKS,
+/* 0428 */ UNO_NAME_CREATE_FROM_OUTLINE,
+/* 0429 */ UNO_NAME_PARAGRAPH_STYLE_NAMES,
+/* 0430 */ UNO_NAME_CREATE_FROM_CHAPTER,
+/* 0431 */ UNO_NAME_CREATE_FROM_LABELS,
+/* 0432 */ UNO_NAME_USE_ALPHABETICAL_SEPARATORS,
+/* 0433 */ UNO_NAME_USE_KEY_AS_ENTRY,
+/* 0434 */ UNO_NAME_USE_COMBINED_ENTRIES,
+/* 0435 */ UNO_NAME_IS_CASE_SENSITIVE,
+/* 0436 */ UNO_NAME_USE_P_P,
+/* 0437 */ UNO_NAME_USE_DASH,
+/* 0438 */ UNO_NAME_USE_UPPER_CASE,
+/* 0439 */ UNO_NAME_LABEL_CATEGORY,
+/* 0440 */ UNO_NAME_LABEL_DISPLAY_TYPE,
+/* 0441 */ UNO_NAME_USE_LEVEL_FROM_SOURCE,
+/* 0442 */ UNO_NAME_LEVEL_FORMAT,
+/* 0443 */ UNO_NAME_LEVEL_PARAGRAPH_STYLES,
+/* 0444 */ UNO_NAME_RECALC_TAB_STOPS,
+/* 0445 */ UNO_NAME_MAIN_ENTRY_CHARACTER_STYLE_NAME,
+/* 0446 */ UNO_NAME_CREATE_FROM_TABLES,
+/* 0447 */ UNO_NAME_CREATE_FROM_TEXT_FRAMES,
+/* 0448 */ UNO_NAME_CREATE_FROM_GRAPHIC_OBJECTS,
+/* 0449 */ UNO_NAME_CREATE_FROM_EMBEDDED_OBJECTS,
+/* 0450 */ UNO_NAME_CREATE_FROM_STAR_MATH,
+/* 0451 */ UNO_NAME_CREATE_FROM_STAR_CHART,
+/* 0452 */ UNO_NAME_CREATE_FROM_STAR_CALC,
+/* 0453 */ UNO_NAME_CREATE_FROM_STAR_DRAW,
+/* 0454 */ UNO_NAME_CREATE_FROM_OTHER_EMBEDDED_OBJECTS,
+/* 0455 */ UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L,
+/* 0456 */ UNO_NAME_IS_COMMA_SEPARATED,
+/* 0457 */ UNO_NAME_IS_RELATIVE_TABSTOPS,
+/* 0458 */ UNO_NAME_CREATE_FROM_LEVEL_PARAGRAPH_STYLES,
+/* 0459 */ UNO_NAME_SHOW_CHANGES,
+/* 0460 */ UNO_NAME_RECORD_CHANGES,
+/* 0461 */ UNO_LINK_DISPLAY_NAME,
+/* 0462 */ UNO_LINK_DISPLAY_BITMAP,
+/* 0463 */ UNO_NAME_HEADING_STYLE_NAME,
+/* 0464 */ UNO_NAME_SHOW_ONLINE_LAYOUT,
+/* 0465 */ UNO_NAME_USER_DEFINED_ATTRIBUTES,
+/* 0466 */ UNO_NAME_TEXT_USER_DEFINED_ATTRIBUTES,
+/* 0467 */ UNO_NAME_FILE_PATH,
+/* 0468 */ UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL,
+/* 0469 */ UNO_NAME_PARA_CONDITIONAL_STYLE_NAME,
+/* 0470 */ UNO_NAME_CHAPTER_NUMBERING_LEVEL,
+/* 0471 */ UNO_NAME_NUMBERING_SEPARATOR,
+/* 0472 */ UNO_NAME_IS_CONTINUOUS_NUMBERING,
+/* 0473 */ UNO_NAME_IS_AUTOMATIC,
+/* 0474 */ UNO_NAME_IS_ABSOLUTE_MARGINS,
+/* 0475 */ UNO_NAME_CATEGORY,
+/* 0476 */ UNO_NAME_DEPENDENT_TEXT_FIELDS,
+/* 0477 */ UNO_NAME_CURRENT_PRESENTATION,
+/* 0478 */ UNO_NAME_ADJUST,
+/* 0479 */ UNO_NAME_INSTANCE_NAME,
+/* 0480 */ UNO_NAME_TEXT_PORTION_TYPE,
+/* 0481 */ UNO_NAME_CONTROL_CHARACTER,
+/* 0482 */ UNO_NAME_IS_COLLAPSED,
+/* 0483 */ UNO_NAME_IS_START,
+/* 0484 */ UNO_NAME_SEQUENCE_NUMBER,
+/* 0485 */ UNO_NAME_REFERENCE_ID,
+/* 0486 */ UNO_NAME_HEADER_LEFT_BORDER_DISTANCE,
+/* 0487 */ UNO_NAME_HEADER_RIGHT_BORDER_DISTANCE,
+/* 0488 */ UNO_NAME_HEADER_TOP_BORDER_DISTANCE,
+/* 0489 */ UNO_NAME_HEADER_BOTTOM_BORDER_DISTANCE,
+/* 0490 */ UNO_NAME_FOOTER_LEFT_BORDER_DISTANCE,
+/* 0491 */ UNO_NAME_FOOTER_RIGHT_BORDER_DISTANCE,
+/* 0492 */ UNO_NAME_FOOTER_TOP_BORDER_DISTANCE,
+/* 0493 */ UNO_NAME_FOOTER_BOTTOM_BORDER_DISTANCE,
+/* 0494 */ UNO_NAME_PARA_IS_NUMBERING_RESTART,
+/* 0495 */ UNO_NAME_HIDE_FIELD_TIPS,
+/* 0496 */ UNO_NAME_HEADER_USER_DEFINED_ATTRIBUTES,
+/* 0497 */ UNO_NAME_FOOTER_USER_DEFINED_ATTRIBUTES,
+/* 0498 */ UNO_NAME_PARA_SHADOW_FORMAT,
+/* 0499 */ UNO_NAME_CONTOUR_POLY_POLYGON,
+
+/* 0500 */ UNO_NAME_IS_PIXEL_CONTOUR,
+/* 0501 */ UNO_NAME_IS_AUTOMATIC_CONTOUR,
+/* 0502 */ UNO_NAME_SEPARATOR_LINE_WIDTH,
+/* 0503 */ UNO_NAME_SEPARATOR_LINE_COLOR,
+/* 0504 */ UNO_NAME_SEPARATOR_LINE_RELATIVE_HEIGHT,
+/* 0505 */ UNO_NAME_SEPARATOR_LINE_VERTIVAL_ALIGNMENT,
+/* 0506 */ UNO_NAME_SEPARATOR_LINE_IS_ON,
+/* 0507 */ UNO_NAME_IS_SKIP_HIDDEN_TEXT,
+/* 0508 */ UNO_NAME_IS_SKIP_PROTECTED_TEXT,
+/* 0509 */ UNO_NAME_DOCUMENT_INDEX_MARKS,
+/* 0510 */ UNO_NAME_FOOTNOTE_IS_COLLECT_AT_TEXT_END,
+/* 0511 */ UNO_NAME_FOOTNOTE_IS_RESTART_NUMBERING,
+/* 0512 */ UNO_NAME_FOOTNOTE_RESTART_NUMBERING_AT,
+/* 0513 */ UNO_NAME_FOOTNOTE_IS_OWN_NUMBERING,
+/* 0514 */ UNO_NAME_FOOTNOTE_NUMBERING_TYPE,
+/* 0515 */ UNO_NAME_FOOTNOTE_NUMBERING_PREFIX,
+/* 0516 */ UNO_NAME_FOOTNOTE_NUMBERING_SUFFIX,
+/* 0517 */ UNO_NAME_ENDNOTE_IS_COLLECT_AT_TEXT_END,
+/* 0518 */ UNO_NAME_ENDNOTE_IS_RESTART_NUMBERING,
+/* 0519 */ UNO_NAME_ENDNOTE_RESTART_NUMBERING_AT,
+/* 0520 */ UNO_NAME_ENDNOTE_IS_OWN_NUMBERING,
+/* 0521 */ UNO_NAME_ENDNOTE_NUMBERING_TYPE,
+/* 0522 */ UNO_NAME_ENDNOTE_NUMBERING_PREFIX,
+/* 0523 */ UNO_NAME_ENDNOTE_NUMBERING_SUFFIX,
+/* 0524 */ UNO_NAME_BRACKET_BEFORE,
+/* 0525 */ UNO_NAME_BRACKET_AFTER,
+/* 0526 */ UNO_NAME_IS_NUMBER_ENTRIES,
+/* 0527 */ UNO_NAME_IS_SORT_BY_POSITION,
+/* 0528 */ UNO_NAME_SORT_KEYS,
+/* 0529 */ UNO_NAME_IS_SORT_ASCENDING,
+/* 0530 */ UNO_NAME_SORT_KEY,
+/* 0531 */ UNO_NAME_FIELDS,
+/* 0532 */ UNO_NAME_DATE_TIME_VALUE,
+/* 0533 */ UNO_NAME_IS_ON,
+/* 0534 */ UNO_NAME_Z_ORDER,
+/* 0535 */ UNO_NAME_CONTENT_SECTION,
+/* 0536 */ UNO_NAME_HEADER_SECTION,
+/* 0537 */ UNO_NAME_PARA_IS_HANGING_PUNCTUATION,
+/* 0538 */ UNO_NAME_PARA_IS_CHARACTER_DISTANCE,
+/* 0539 */ UNO_NAME_PARA_IS_FORBIDDEN_RULES,
+/* 0540 */ UNO_NAME_PARA_VERT_ALIGNMENT,
+/* 0541 */ UNO_NAME_IS_MAIN_ENTRY,
+/* 0542 */ UNO_NAME_GRAPHIC_ROTATION,
+/* 0543 */ UNO_NAME_ADJUST_LUMINANCE,
+/* 0544 */ UNO_NAME_ADJUST_CONTRAST,
+/* 0545 */ UNO_NAME_ADJUST_RED,
+/* 0546 */ UNO_NAME_ADJUST_GREEN,
+/* 0547 */ UNO_NAME_ADJUST_BLUE,
+/* 0548 */ UNO_NAME_GAMMA,
+/* 0549 */ UNO_NAME_GRAPHIC_IS_INVERTED,
+/* 0550 */ UNO_NAME_TRANSPARENCY,
+/* 0551 */ UNO_NAME_GRAPHIC_COLOR_MODE,
+/* 0552 */ UNO_NAME_REDLINE_AUTHOR,
+/* 0553 */ UNO_NAME_REDLINE_DATE_TIME,
+/* 0554 */ UNO_NAME_REDLINE_COMMENT,
+/* 0555 */ UNO_NAME_REDLINE_TYPE,
+/* 0556 */ UNO_NAME_REDLINE_SUCCESSOR_DATA,
+/* 0557 */ UNO_NAME_REDLINE_IDENTIFIER,
+/* 0558 */ UNO_NAME_IS_IN_HEADER_FOOTER,
+/* 0559 */ UNO_NAME_START_REDLINE,
+/* 0560 */ UNO_NAME_END_REDLINE,
+/* 0561 */ UNO_NAME_REDLINE_START,
+/* 0562 */ UNO_NAME_REDLINE_END,
+/* 0563 */ UNO_NAME_REDLINE_TEXT,
+/* 0564 */ UNO_NAME_REDLINE_DISPLAY_TYPE,
+/* 0565 */ UNO_NAME_FORBIDDEN_CHARACTERS,
+/* 0566 */ UNO_NAME_RUBY_BASE_TEXT,
+/* 0567 */ UNO_NAME_RUBY_TEXT,
+/* 0568 */ UNO_NAME_RUBY_ADJUST,
+/* 0569 */ UNO_NAME_RUBY_CHAR_STYLE_NAME,
+/* 0570 */ UNO_NAME_RUBY_IS_ABOVE,
+/* 0571 */ UNO_NAME_FOOTNOTE_HEIGHT,
+/* 0572 */ UNO_NAME_FOOTNOTE_LINE_WEIGHT,
+/* 0573 */ UNO_NAME_FOOTNOTE_LINE_COLOR,
+/* 0574 */ UNO_NAME_FOOTNOTE_LINE_RELATIVE_WIDTH,
+/* 0575 */ UNO_NAME_FOOTNOTE_LINE_ADJUST,
+/* 0576 */ UNO_NAME_FOOTNOTE_LINE_TEXT_DISTANCE,
+/* 0577 */ UNO_NAME_FOOTNOTE_LINE_DISTANCE,
+/* 0578 */ UNO_NAME_CHAR_ROTATION,
+/* 0579 */ UNO_NAME_CHAR_ROTATION_IS_FIT_TO_LINE,
+/* 0580 */ UNO_NAME_CHAR_SCALE_WIDTH,
+/* 0581 */ UNO_NAME_TAB_STOP_DISTANCE,
+/* 0582 */ UNO_NAME_IS_WIDTH_RELATIVE,
+/* 0583 */ UNO_NAME_CHAR_RELIEF,
+/* 0584 */ UNO_NAME_IS_HIDDEN,
+/* 0585 */ UNO_NAME_IS_CONDITION_TRUE,
+/* 0586 */ UNO_NAME_TWO_DIGIT_YEAR,
+/* 0587 */ UNO_NAME_PROTECTION_KEY,
+/* 0588 */ UNO_NAME_REDLINE_PROTECTION_KEY,
+/* 0589 */ UNO_NAME_AUTOMATIC_DISTANCE,
+/* 0590 */ UNO_NAME_AUTOMATIC_CONTROL_FOCUS,
+/* 0591 */ UNO_NAME_APPLY_FORM_DESIGN_MODE,
+/* 0592 */ UNO_NAME_LOCALE,
+/* 0593 */ UNO_NAME_SORT_ALGORITHM,
+/* 0594 */ UNO_NAME_FRAME_HEIGHT_ABSOLUTE,
+/* 0596 */ UNO_NAME_FRAME_HEIGHT_PERCENT,
+/* 0597 */ UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT,
+/* 0598 */ UNO_NAME_FRAME_WIDTH_ABSOLUTE,
+/* 0599 */ UNO_NAME_FRAME_WIDTH_PERCENT,
+/* 0600 */ UNO_NAME_PARA_STYLEHEADING,
+/* 0601 */ UNO_NAME_PARA_STYLELEVEL1,
+/* 0602 */ UNO_NAME_PARA_STYLELEVEL10,
+/* 0603 */ UNO_NAME_PARA_STYLELEVEL2,
+/* 0604 */ UNO_NAME_PARA_STYLELEVEL3,
+/* 0605 */ UNO_NAME_PARA_STYLELEVEL4,
+/* 0606 */ UNO_NAME_PARA_STYLELEVEL5,
+/* 0607 */ UNO_NAME_PARA_STYLELEVEL6,
+/* 0608 */ UNO_NAME_PARA_STYLELEVEL7,
+/* 0609 */ UNO_NAME_PARA_STYLELEVEL8,
+/* 0610 */ UNO_NAME_PARA_STYLELEVEL9,
+/* 0611 */ UNO_NAME_PARA_STYLESEPARATOR,
+/* 0612 */ UNO_NAME_MACRO_LIBRARY,
+/* 0613 */ UNO_NAME_CELL_NAME,
+/* 0614 */ UNO_NAME_PARA_USER_DEFINED_ATTRIBUTES,
+/* 0615 */ UNO_NAME_MERGE_LAST_PARA,
+/* 0616 */ UNO_NAME_WRITING_MODE,
+/* 0617 */ UNO_NAME_GRID_COLOR,
+/* 0618 */ UNO_NAME_GRID_LINES,
+/* 0619 */ UNO_NAME_GRID_BASE_HEIGHT,
+/* 0620 */ UNO_NAME_GRID_RUBY_HEIGHT,
+/* 0621 */ UNO_NAME_GRID_MODE,
+/* 0622 */ UNO_NAME_GRID_RUBY_BELOW,
+/* 0623 */ UNO_NAME_GRID_PRINT,
+/* 0624 */ UNO_NAME_GRID_DISPLAY,
+/* 0625 */ UNO_NAME_SNAP_TO_GRID,
+/* 0626 */ UNO_NAME_DONT_BALANCE_TEXT_COLUMNS,
+/* 0627 */ UNO_NAME_IS_CURRENTLY_VISIBLE,
+/* 0628 */ UNO_NAME_ANCHOR_POSITION,
+/* 0629 */ UNO_NAME_TEXT_READING,
+/* 0630 */ UNO_NAME_PRIMARY_KEY_READING,
+/* 0631 */ UNO_NAME_SECONDARY_KEY_READING,
+/* 0632 */ UNO_NAME_BACK_GRAPHIC_TRANSPARENCY,
+/* 0633 */ UNO_NAME_BACK_COLOR_R_G_B,
+/* 0634 */ UNO_NAME_BACK_COLOR_TRANSPARENCY,
+/* 0635 */ UNO_NAME_HEADER_DYNAMIC_SPACING,
+/* 0636 */ UNO_NAME_FOOTER_DYNAMIC_SPACING,
+/* 0637 */ UNO_NAME_BASIC_LIBRARIES,
+/* 0638 */ UNO_NAME_IS_FIXED_LANGUAGE,
+/* 0639 */ UNO_NAME_SELECTION,
+/* 0640 */ UNO_NAME_RESULT_SET,
+/* 0641 */ UNO_NAME_CONNECTION,
+/* 0642 */ UNO_NAME_MODEL,
+/* 0643 */ UNO_NAME_DATA_SOURCE_NAME,
+/* 0644 */ UNO_NAME_DATA_COMMAND,
+/* 0645 */ UNO_NAME_FILTER,
+/* 0646 */ UNO_NAME_DOCUMENT_URL,
+/* 0647 */ UNO_NAME_OUTPUT_URL,
+/* 0648 */ UNO_NAME_OUTPUT_TYPE,
+/* 0649 */ UNO_NAME_ESCAPE_PROCESSING,
+/* 0650 */ UNO_NAME_SINGLE_PRINT_JOBS,
+/* 0651 */ UNO_NAME_FILE_NAME_FROM_COLUMN,
+/* 0652 */ UNO_NAME_FILE_NAME_PREFIX,
+/* 0653 */ UNO_NAME_CHAR_STYLE_NAMES,
+/* 0654 */ UNO_NAME_DAD_COMMAND, /* DAD = DataAccessDescriptor (see com.sun.star.sdb.DataAccessDescriptor) */
+/* 0655 */ UNO_NAME_DAD_COMMAND_TYPE,
+/* 0656 */ UNO_NAME_CLSID,
+/* 0657 */ UNO_NAME_COMPONENT,
+/* 0658 */ UNO_NAME_SECT_LEFT_MARGIN,
+/* 0659 */ UNO_NAME_SECT_RIGHT_MARGIN,
+/* 0660 */ UNO_NAME_PARA_IS_CONNECT_BORDER,
+/* 0661 */ UNO_NAME_ITEMS,
+/* 0662 */ UNO_NAME_SELITEM,
+/* 0663 */ UNO_NAME_IS_SPLIT_ALLOWED,
+/* 0664 */ UNO_NAME_CHAR_HIDDEN,
+// OD 18.09.2003 #i18732#
+/* 0665 */ UNO_NAME_IS_FOLLOWING_TEXT_FLOW,
+/* 0666 */ UNO_NAME_WIDTH_TYPE,
+/* 0667 */ UNO_NAME_SCRIPT_URL,
+/* 0668 */ UNO_NAME_RUNTIME_UID,
+/* 0669 */ UNO_NAME_COLLAPSING_BORDERS,
+// OD 2004-05-05 #i28701#
+/* 0670 */ UNO_NAME_WRAP_INFLUENCE_ON_POSITION,
+/* 0671 */ UNO_NAME_DATA_BASE_URL,
+/* 0672 */ UNO_NAME_DATA_BASE_RESOURCE,
+// --> OD 2004-08-06 #i28749#
+/* 0673 */ UNO_NAME_TRANSFORMATION_IN_HORI_L2R,
+/* 0674 */ UNO_NAME_POSITION_LAYOUT_DIR,
+// <--
+/* 0675 */ UNO_NAME_NUMBERING_IS_OUTLINE,
+///* 0676 */ UNO_NAME_DEFAULT_OUTLINE_LEVEL, //#outline level, removed by zhaojianwei
+// --> OD 2004-10-28 #i36248#
+/* 0677 */ UNO_NAME_STARTPOSITION_IN_HORI_L2R,
+/* 0678 */ UNO_NAME_ENDPOSITION_IN_HORI_L2R,
+// <--
+// --> OS 2004-12-13 #30916#
+/* 0679 */ UNO_NAME_SUBJECT,
+/* 0680 */ UNO_NAME_ADDRESS_FROM_COLUMN,
+/* 0681 */ UNO_NAME_SEND_AS_HTML,
+/* 0682 */ UNO_NAME_SEND_AS_ATTACHMENT,
+/* 0683 */ UNO_NAME_MAIL_BODY,
+/* 0684 */ UNO_NAME_ATTACHMENT_NAME,
+/* 0685 */ UNO_NAME_ATTACHMENT_FILTER,
+/* 0686 */ UNO_NAME_PRINT_OPTIONS,
+/* 0687 */ UNO_NAME_SAVE_AS_SINGLE_FILE,
+/* 0688 */ UNO_NAME_SAVE_FILTER,
+/* 0689 */ UNO_NAME_COPIES_TO,
+/* 0690 */ UNO_NAME_BLIND_COPIES_TO,
+/* 0691 */ UNO_NAME_IN_SERVER_PASSWORD,
+/* 0692 */ UNO_NAME_OUT_SERVER_PASSWORD,
+// <--
+/* 0693 */ UNO_NAME_SAVE_FILTER_OPTIONS,
+/* 0694 */ UNO_NAME_SAVE_FILTER_DATA,
+/* 0695 */ UNO_NAME_LOCK_UPDATES,
+// --> TL 2005-02-14 #i37766#
+/* 0696 */ UNO_NAME_PAGE_COUNT,
+/* 0697 */ UNO_NAME_LINE_COUNT,
+/* 0698 */ UNO_NAME_IS_CONSTANT_SPELLCHECK,
+/* 0699 */ UNO_NAME_IS_HIDE_SPELL_MARKS, // deprecated #i91949
+// <--
+/* 0700 */ UNO_NAME_IS_FIELD_USED,
+/* 0701 */ UNO_NAME_IS_FIELD_DISPLAYED,
+/* 0702 */ UNO_NAME_BUILDID,
+/* 0703 */ UNO_NAME_PARA_STYLE_CONDITIONS,
+// --> FME 2005-12-13 #b6354161# Print empty pages
+/* 0704 */ UNO_NAME_PRINT_EMPTY_PAGES,
+// <--
+// --> BM 2006 New Chart (chart2)
+/* 0705 */ UNO_NAME_ROLE,
+// <--
+/* 0706 */ UNO_NAME_FIELD_CODE,
+/* 0707 */ UNO_NAME_HAS_VALID_SIGNATURES,
+// --> AMA #i65476# automatic styles
+/* 0708 */ UNO_NAME_CHAR_AUTO_STYLE_NAME,
+/* 0709 */ UNO_NAME_PARA_AUTO_STYLE_NAME,
+// --> OD 2006-03-21 #b6375613#
+/* 0710 */ UNO_NAME_APPLY_WORKAROUND_FOR_B6375613,
+/* 0711 */ UNO_NAME_LAYOUT_SIZE,
+// --> HB #144146#
+/* 0712 */ UNO_NAME_HELP,
+/* 0713 */ UNO_NAME_TOOLTIP,
+// --> #i73329# / 2007-01-11 / frank.schoenheit@sun.com
+/* 0714 */ UNO_NAME_DIALOG_LIBRARIES,
+/* 0715 */ UNO_NAME_HEADER_ROW_COUNT,
+/* 0716 */ UNO_NAME_INPUT,
+/* 0717 */ UNO_NAME_ROW_SPAN,
+// --> OD 2008-01-15 #newlistlevelattrs#
+/* 0718 */ UNO_NAME_POSITION_AND_SPACE_MODE,
+/* 0719 */ UNO_NAME_LABEL_FOLLOWED_BY,
+/* 0720 */ UNO_NAME_LISTTAB_STOP_POSITION,
+/* 0721 */ UNO_NAME_FIRST_LINE_INDENT,
+/* 0722 */ UNO_NAME_INDENT_AT,
+// --> #i52420# / 2008-02-07 / beppec56@openoffice.org
+/* 0723 */ UNO_NAME_CHAPTER_LEVEL,
+// --> 2007-03-27 text grid enhancement for better CJK support
+/* 0724 */ UNO_NAME_GRID_BASE_WIDTH,
+/* 0725 */ UNO_NAME_GRID_SNAP_TO_CHARS,
+/* 0726 */ UNO_NAME_GRID_STANDARD_PAGE_MODE,
+/* 0727 */ UNO_NAME_TABLE_BORDER_DISTANCES,
+// --> OD 2008-04-22 #refactorlists#
+/* 0728 */ UNO_NAME_LIST_ID,
+/* 0729 */ UNO_NAME_DEFAULT_LIST_ID,
+// <--
+/* 0730 */ UNO_NAME_STREAM_NAME,
+// --> OD 2008-11-26 #158694#
+/* 0731 */ UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE,
+/* 0732 */ UNO_NAME_PARA_LIST_LABEL_STRING,
+// <--
+/* 0733 */ UNO_NAME_CHAR_OVERLINE,
+/* 0734 */ UNO_NAME_CHAR_OVERLINE_COLOR,
+/* 0735 */ UNO_NAME_CHAR_OVERLINE_HAS_COLOR,
+/* 0736 */ UNO_NAME_OUTLINE_LEVEL, //#outline level,add<-zhaojianwei outlinelevel
+// --> OD 2009-07-13 #i73249#
+/* 0737 */ UNO_NAME_DESCRIPTION,
+// <--
+/* 0738 */ UNO_NAME_META, // #i91565#
+/* 0739 */ SW_PROPNAME_END
+};
+
+
+struct SwPropNameLen
+{
+ const char* pName;
+ USHORT nNameLen;
+ operator const char*() const { return pName; }
+};
+
+
+
+typedef const SwPropNameLen SwPropNameTab[ SW_PROPNAME_END - SW_PROPNAME_BEGIN ];
+extern const SwPropNameTab aPropNameTab;
+
+// !!! function must not(!) be inline because it is called via the below !!!
+// !!! listed macros from the swui DLL and that can not access the !!!
+// !!! array aPropNameTab which is located in a different DLL. !!!
+SW_DLLPUBLIC const SwPropNameLen& GetPropName( USHORT nId );
+SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( USHORT nId );
+
+#define SW_PROP_NAME(nId) \
+ GetPropName( nId ).pName, GetPropName( nId ).nNameLen
+
+#define SW_PRPNM_EQLASCI(nId) \
+ GetPropName( nId ).pName, 0, GetPropName( nId ).nNameLen
+
+#define SW_PROP_NAME_STR(nId) \
+ GetPropName( nId ).pName
+
+
+#endif
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
new file mode 100644
index 000000000000..5730c6e55ff0
--- /dev/null
+++ b/sw/inc/unoredline.hxx
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoredline.hxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOREDLINE_HXX
+#define _UNOREDLINE_HXX
+
+#include <unoport.hxx>
+#include <unoobj.hxx>
+
+class SwRedline;
+/* -----------------------------19.12.00 11:35--------------------------------
+
+ ---------------------------------------------------------------------------*/
+
+/**
+ * SwXRedlineText provides an XText which may be used to write
+ * directly into a redline node. It got implemented to enable XML
+ * import of redlines and should not be used directly via the API.
+ */
+class SwXRedlineText :
+ public SwXText,
+ public cppu::OWeakObject,
+ public ::com::sun::star::container::XEnumerationAccess
+{
+ SwNodeIndex aNodeIndex;
+ virtual const SwStartNode *GetStartNode() const;
+
+public:
+ SwXRedlineText(SwDoc* pDoc, SwNodeIndex aNodeIndex);
+
+ 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(){OWeakObject::acquire();}
+ virtual void SAL_CALL release( ) throw(){OWeakObject::release();}
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess (via XEnumerationAccess)
+ 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);
+};
+/* ---------------------------------------------------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXRedlinePortion : public SwXTextPortion
+{
+ const SwRedline* pRedline;
+
+ void Validate() throw( ::com::sun::star::uno::RuntimeException );
+
+ using SwXTextPortion::GetPropertyValue;
+
+public:
+ SwXRedlinePortion( const SwRedline* pRed,
+ const SwUnoCrsr* pPortionCrsr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent,
+ BOOL bIsStart);
+
+ ~SwXRedlinePortion();
+
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ 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);
+
+ static ::com::sun::star::uno::Any GetPropertyValue( const ::rtl::OUString& PropertyName, const SwRedline& rRedline ) throw();
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > CreateRedlineProperties( const SwRedline& rRedline, sal_Bool bIsStart ) throw();
+
+};
+/* -----------------------------11.01.01 16:52--------------------------------
+
+ ---------------------------------------------------------------------------*/
+typedef
+cppu::WeakImplHelper1
+<
+ ::com::sun::star::container::XEnumerationAccess
+>
+SwXRedlineBaseClass;
+class SwXRedline :
+ public SwXRedlineBaseClass,
+ public SwXText,
+ public SwClient
+{
+ SwDoc* pDoc;
+ SwRedline* pRedline;
+public:
+ SwXRedline(SwRedline& rRedline, SwDoc& rDoc);
+ ~SwXRedline();
+
+ TYPEINFO();
+
+ 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(){OWeakObject::acquire();}
+ virtual void SAL_CALL release( ) throw(){OWeakObject::release();}
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ const SwRedline* GetRedline() const {return pRedline;}
+};
+#endif
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
new file mode 100644
index 000000000000..52f2ab16a368
--- /dev/null
+++ b/sw/inc/unoredlines.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unoredlines.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOREDLINES_HXX
+#define _UNOREDLINES_HXX
+
+#include <unocoll.hxx>
+#include <unobaseclass.hxx>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+
+class SwRedline;
+namespace com{ namespace sun{ namespace star{
+ namespace beans{
+ class XPropertySet;
+ }
+}}}
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwRedlinesBaseClass;
+class SwXRedlines : public SwRedlinesBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXRedlines();
+public:
+ SwXRedlines(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
+};
+/* -----------------------------12.01.01 14:58--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXRedlineEnumeration : public SwSimpleEnumerationBaseClass,
+ public SwClient
+{
+ SwDoc* pDoc;
+ USHORT nCurrentIndex;
+protected:
+ virtual ~SwXRedlineEnumeration();
+public:
+ SwXRedlineEnumeration(SwDoc& rDoc);
+
+
+ //XEnumeration
+ virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+
+#endif
+
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
new file mode 100644
index 000000000000..bc9cd02a3ac7
--- /dev/null
+++ b/sw/inc/unosett.hxx
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unosett.hxx,v $
+ * $Revision: 1.12 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOSETT_HXX
+#define _UNOSETT_HXX
+
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <tools/string.hxx>
+#include <svtools/itemprop.hxx>
+
+class SwDoc;
+class SwFmtCol;
+class SwDocShell;
+class SwNumRule;
+/******************************************************************************
+ *
+ ******************************************************************************/
+/* -----------------04.05.98 12:28-------------------
+ *
+ * --------------------------------------------------*/
+class SwXFootnoteProperties : public cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwDoc* pDoc;
+ const SfxItemPropertySet* m_pPropertySet;
+protected:
+ virtual ~SwXFootnoteProperties();
+public:
+ SwXFootnoteProperties(SwDoc* pDoc);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pDoc = 0;}
+};
+
+/* -----------------04.05.98 12:28-------------------
+ *
+ * --------------------------------------------------*/
+class SwXEndnoteProperties : public cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwDoc* pDoc;
+ const SfxItemPropertySet* m_pPropertySet;
+protected:
+ virtual ~SwXEndnoteProperties();
+public:
+ SwXEndnoteProperties(SwDoc* pDoc);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pDoc = 0;}
+};
+
+/* -----------------04.05.98 12:28-------------------
+ *
+ * --------------------------------------------------*/
+class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwDoc* pDoc;
+ const SfxItemPropertySet* m_pPropertySet;
+protected:
+ virtual ~SwXLineNumberingProperties();
+public:
+ SwXLineNumberingProperties(SwDoc* pDoc);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pDoc = 0;}
+};
+
+/* -----------------25.05.98 08:21-------------------
+ *
+ * --------------------------------------------------*/
+class SwXNumberingRules : public cppu::WeakAggImplHelper5
+<
+ ::com::sun::star::container::XIndexReplace,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ String sNewCharStyleNames[MAXLEVEL];
+ String sNewBulletFontNames[MAXLEVEL];
+ String sCreatedNumRuleName; //connects to a numbering in SwDoc
+ SwDoc* pDoc; // wird nur fuers anmelden gebraucht
+ SwDocShell* pDocShell; //nur, wenn als ChapterNumbering verwendet
+ SwNumRule* pNumRule;
+ const SfxItemPropertySet* m_pPropertySet;
+ sal_Bool bOwnNumRuleCreated;
+ static String sInvalidStyle;
+protected:
+ virtual ~SwXNumberingRules();
+public:
+ SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
+ SwXNumberingRules(const SwNumRule& rRule); // NumRule for paragraphs, numbering styles
+ SwXNumberingRules(SwDoc& rDoc); //create a new instance
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ //XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) 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);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>
+ GetNumberingRuleByIndex(const SwNumRule& rNumRule, sal_Int32 nIndex)const;
+ void SetNumberingRuleByIndex(SwNumRule& rNumRule,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, sal_Int32 nIndex)
+ throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ const String* GetNewCharStyleNames() const {return sNewCharStyleNames;}
+ const String* GetBulletFontNames() const {return sNewBulletFontNames;}
+ const SwNumRule* GetNumRule() {return pNumRule;}
+
+ static const String& GetInvalidStyle();
+ void Invalidate() {pDocShell = 0;}
+ const String& GetCreatedNumRuleName() const{return sCreatedNumRuleName; }
+};
+/*-----------------12.02.98 08:27-------------------
+
+--------------------------------------------------*/
+class SwXChapterNumbering : public SwXNumberingRules
+{
+protected:
+ virtual ~SwXChapterNumbering();
+public:
+ SwXChapterNumbering(SwDocShell& rDocSh);
+
+
+ void Invalidate() {SwXNumberingRules::Invalidate();}
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/* -----------------27.05.98 15:44-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextColumns : public cppu::WeakAggImplHelper4
+<
+
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::text::XTextColumns,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ sal_Int32 nReference;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn> aTextColumns;
+ sal_Bool bIsAutomaticWidth;
+ sal_Int32 nAutoDistance;
+
+ const SfxItemPropertySet* m_pPropSet;
+
+ //separator line
+ sal_Int32 nSepLineWidth;
+ sal_Int32 nSepLineColor;
+ sal_Int8 nSepLineHeightRelative;
+ sal_Int8 nSepLineVertAlign;//style::VerticalAlignment
+ sal_Bool bSepLineIsOn;
+protected:
+ virtual ~SwXTextColumns();
+public:
+ SwXTextColumns(sal_uInt16 nColCount);
+ SwXTextColumns(const SwFmtCol& rFmtCol);
+
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextColumns
+ virtual sal_Int32 SAL_CALL getReferenceValue( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getColumnCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnCount( sal_Int16 nColumns ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumns( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn >& Columns ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ sal_Int32 GetSepLineWidth() const {return nSepLineWidth;}
+ sal_Int32 GetSepLineColor() const {return nSepLineColor;}
+ sal_Int8 GetSepLineHeightRelative() const {return nSepLineHeightRelative;}
+ sal_Int8 GetSepLineVertAlign() const {return nSepLineVertAlign;}
+ sal_Bool GetSepLineIsOn() const {return bSepLineIsOn;}
+
+ sal_Bool IsAutomaticWidth() const {return bIsAutomaticWidth;}
+};
+#endif
+
+
diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx
new file mode 100644
index 000000000000..f03048f240b6
--- /dev/null
+++ b/sw/inc/unosrch.hxx
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unosrch.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOSRCH_HXX
+#define _UNOSRCH_HXX
+
+#include <com/sun/star/util/XPropertyReplace.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <tools/string.hxx>
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+class SfxItemPropertySet;
+class SwXTextDocument;
+class SwSearchProperties_Impl;
+class SfxItemSet;
+
+namespace com{namespace sun{namespace star{namespace util{
+ struct SearchOptions;
+}}}}
+
+
+/*-----------------19.12.97 12:58-------------------
+
+--------------------------------------------------*/
+class SwXTextSearch : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::util::XPropertyReplace,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel
+>
+{
+ friend class SwXTextDocument;
+
+ String sSearchText;
+ String sReplaceText;
+
+ SwSearchProperties_Impl* pSearchProperties;
+ SwSearchProperties_Impl* pReplaceProperties;
+
+
+ const SfxItemPropertySet* m_pPropSet;
+ sal_Bool bAll : 1;
+ sal_Bool bWord : 1;
+ sal_Bool bBack : 1;
+ sal_Bool bExpr : 1;
+ sal_Bool bCase : 1;
+// sal_Bool bInSel: 1; // wie geht Suchen in Selektionen?
+ sal_Bool bStyles:1;
+ sal_Bool bSimilarity : 1;
+ sal_Bool bLevRelax :1;
+ sal_Int16 nLevExchange;
+ sal_Int16 nLevAdd;
+ sal_Int16 nLevRemove;
+
+ sal_Bool bIsValueSearch :1;
+protected:
+ virtual ~SwXTextSearch();
+public:
+ SwXTextSearch();
+
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSearchDescriptor
+ virtual ::rtl::OUString SAL_CALL getSearchString( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSearchString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XReplaceDescriptor
+ virtual ::rtl::OUString SAL_CALL getReplaceString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setReplaceString(const ::rtl::OUString& aReplaceString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyReplace
+ virtual sal_Bool SAL_CALL getValueSearch(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setValueSearch(sal_Bool ValueSearch_) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getSearchAttributes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setSearchAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getReplaceAttributes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setReplaceAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void FillSearchItemSet(SfxItemSet& rSet) const;
+ void FillReplaceItemSet(SfxItemSet& rSet) const;
+
+ sal_Bool HasSearchAttributes() const;
+ sal_Bool HasReplaceAttributes() const;
+
+ void FillSearchOptions( ::com::sun::star::util::SearchOptions&
+ rSearchOpt ) const;
+};
+
+#endif
+
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
new file mode 100644
index 000000000000..7c9e00f6671f
--- /dev/null
+++ b/sw/inc/unostyle.hxx
@@ -0,0 +1,470 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unostyle.hxx,v $
+ * $Revision: 1.16 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOSTYLE_HXX
+#define _UNOSTYLE_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <svtools/style.hxx>
+#include <svtools/lstner.hxx>
+#include <unocoll.hxx>
+#include <unomap.hxx>
+#include <com/sun/star/style/XStyle.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/style/XStyleLoader.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <cppuhelper/implbase7.hxx>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <calbck.hxx>
+
+
+#include <com/sun/star/style/XAutoStyleFamily.hpp>
+#include <com/sun/star/style/XAutoStyles.hpp>
+#include <com/sun/star/style/XAutoStyle.hpp>
+
+#include <istyleaccess.hxx>
+
+class SwDocShell;
+class SfxItemPropertySet;
+class SwXStyle;
+class SwStyleProperties_Impl;
+class SwAutoStylesEnumImpl;
+class IStyleAccess;
+class SfxItemSet;
+typedef boost::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t;
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+/*-----------------12.02.98 08:27-------------------
+
+--------------------------------------------------*/
+class SwXStyleFamilies : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::style::XStyleLoader
+>,
+ public SwUnoCollection
+{
+ SwDocShell* pDocShell;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxCharStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxParaStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxFrameStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxPageStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxNumberingStyles;
+protected:
+ virtual ~SwXStyleFamilies();
+public:
+ SwXStyleFamilies(SwDocShell& rDocShell);
+
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //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 nIndex) 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);
+
+ //XStyleLoader
+ virtual void SAL_CALL loadStylesFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getStyleLoaderOptions(void) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+};
+
+/* -----------------26.05.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+class SwXStyleFamily : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::container::XNameContainer,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::beans::XPropertySet
+>,
+ public SfxListener
+{
+ SfxStyleFamily eFamily; // Familie
+ SfxStyleSheetBasePool* pBasePool;
+// const SfxItemPropertyMap* _pPropMap;
+ SwDocShell* pDocShell;
+
+ SwXStyle* _FindStyle(const String& rStyleName) const;
+public:
+ SwXStyleFamily(SwDocShell* pDocShell, sal_uInt16 nFamily);
+ ~SwXStyleFamily();
+
+ //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 nIndex) 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 SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XNameContainer
+ virtual void SAL_CALL 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 SAL_CALL 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 );
+ 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 );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+};
+/* -----------------20.05.98 09:51-------------------
+ *
+ * --------------------------------------------------*/
+class SwXStyle : public cppu::WeakImplHelper7
+<
+ ::com::sun::star::style::XStyle,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XMultiPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::beans::XMultiPropertyStates
+>,
+ public SfxListener,
+ public SwClient
+{
+ friend class SwXStyleFamily;
+ SwDoc* m_pDoc;
+ String sStyleName;
+ SfxStyleSheetBasePool* pBasePool;
+ SfxStyleFamily eFamily; // fuer Notify
+
+ sal_Bool bIsDescriptor : 1;
+ sal_Bool bIsConditional : 1;
+ String sParentStyleName;
+ SwStyleProperties_Impl* pPropImpl;
+
+ void ApplyDescriptorProperties();
+protected:
+ void Invalidate();
+
+ const SfxStyleSheetBasePool* GetBasePool() const {return pBasePool;}
+ SfxStyleSheetBasePool* GetBasePool() {return pBasePool;}
+
+ void SetStyleName(const String& rSet){ sStyleName = rSet;}
+ SwStyleProperties_Impl* GetPropImpl(){return pPropImpl;}
+ com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
+ com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
+
+ void SAL_CALL SetPropertyValues_Impl( 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::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+public:
+ SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, BOOL bConditional = FALSE);
+ SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
+ SwDoc* pDoc,
+ const String& rStyleName);//,
+ //const SfxItemPropertyMap* _pMap);
+ ~SwXStyle();
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XStyle
+ virtual sal_Bool SAL_CALL isUserDefined(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL isInUse(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getParentStyle(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setParentStyle(const rtl::OUString& aParentStyle) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XMultiPropertySet
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertyStates
+ //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ const String& GetStyleName() const { return sStyleName;}
+ SfxStyleFamily GetFamily() const {return eFamily;}
+
+ sal_Bool IsDescriptor() const {return bIsDescriptor;}
+ sal_Bool IsConditional() const { return bIsConditional;}
+ const String& GetParentStyleName() const { return sParentStyleName;}
+ void SetDoc(SwDoc* pDc, SfxStyleSheetBasePool* pPool)
+ {
+ bIsDescriptor = sal_False; m_pDoc = pDc;
+ pBasePool = pPool;
+ StartListening(*pBasePool);
+ }
+ SwDoc* GetDoc() const { return m_pDoc; }
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+/* -----------------------------15.12.00 14:25--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXFrameStyle : public SwXStyle,
+ public com::sun::star::document::XEventsSupplier
+{
+public:
+ SwXFrameStyle(SfxStyleSheetBasePool& rPool,
+ SwDoc* pDoc,
+ const String& rStyleName) :
+ SwXStyle(rPool, SFX_STYLE_FAMILY_FRAME, pDoc, rStyleName){}
+ SwXFrameStyle( SwDoc *pDoc );
+ ~SwXFrameStyle();
+
+ virtual void SAL_CALL acquire( ) throw(){SwXStyle::acquire();}
+ virtual void SAL_CALL release( ) throw(){SwXStyle::release();}
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+
+ friend class SwFrameStyleEventDescriptor;
+};
+/* -----------------24.08.98 16:04-------------------
+ *
+ * --------------------------------------------------*/
+class SwXPageStyle : public SwXStyle
+{
+ SwDocShell* pDocShell;
+
+protected:
+ void SAL_CALL SetPropertyValues_Impl( 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::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+public:
+ SwXPageStyle(SfxStyleSheetBasePool& rPool, SwDocShell* pDocSh, SfxStyleFamily eFam,
+ const String& rStyleName);//,
+ //const SfxItemPropertyMap* _pMap);
+ SwXPageStyle(SwDocShell* pDocSh);
+ ~SwXPageStyle();
+
+ 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);
+
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+
+};
+/*-- 19.05.2006 11:20:22---------------------------------------------------
+ access to all automatic style families
+ -----------------------------------------------------------------------*/
+class SwXAutoStyles :
+ public cppu::WeakImplHelper1< ::com::sun::star::style::XAutoStyles >,
+ public SwUnoCollection
+{
+ SwDocShell *pDocShell;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoCharStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoRubyStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoParaStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoNotxtStyles;
+ virtual ~SwXAutoStyles();
+
+public:
+ SwXAutoStyles(SwDocShell& rDocShell);
+
+ //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 nIndex) 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 SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+/*-- 19.05.2006 11:20:12---------------------------------------------------
+ access to a family of automatic styles (character or paragraph or ...)
+ -----------------------------------------------------------------------*/
+class SwXAutoStyleFamily : public cppu::WeakImplHelper1< com::sun::star::style::XAutoStyleFamily >,
+ public SwClient
+{
+ SwDocShell *pDocShell;
+ IStyleAccess::SwAutoStyleFamily eFamily;
+
+public:
+ SwXAutoStyleFamily(SwDocShell* pDocShell, IStyleAccess::SwAutoStyleFamily eFamily);
+ virtual ~SwXAutoStyleFamily();
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XAutoStyleFamily
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyle > SAL_CALL insertStyle( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Values ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+};
+class SwXAutoStylesEnumerator : public cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration >,
+ public SwClient
+{
+ SwAutoStylesEnumImpl *pImpl;
+public:
+ SwXAutoStylesEnumerator( SwDoc* pDoc, IStyleAccess::SwAutoStyleFamily eFam );
+ virtual ~SwXAutoStylesEnumerator();
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+};
+/*-- 19.05.2006 11:20:02---------------------------------------------------
+ an automatic style
+ -----------------------------------------------------------------------*/
+
+class SwXAutoStyle : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::style::XAutoStyle
+>,
+ public SwClient
+{
+ SfxItemSet_Pointer_t pSet;
+ IStyleAccess::SwAutoStyleFamily eFamily;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+public:
+
+ SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAccess::SwAutoStyleFamily eFam );
+ virtual ~SwXAutoStyle();
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XMultiPropertySet
+ // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertyStates
+ // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // Special
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties() throw (::com::sun::star::uno::RuntimeException);
+};
+#endif
+
+
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
new file mode 100644
index 000000000000..0ad2b3c494c8
--- /dev/null
+++ b/sw/inc/unotbl.hxx
@@ -0,0 +1,611 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unotbl.hxx,v $
+ * $Revision: 1.23 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOTBL_HXX
+#define _UNOTBL_HXX
+
+#include <unoobj.hxx>
+#include <com/sun/star/chart/XChartData.hpp>
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
+#include <com/sun/star/text/XTextTableCursor.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/sheet/XCellRangeData.hpp>
+#include <com/sun/star/table/XAutoFormattable.hpp>
+#include <cppuhelper/implbase10.hxx> // helper for implementations
+#include <cppuhelper/implbase7.hxx> // helper for implementations
+#include <cppuhelper/implbase5.hxx> // helper for implementations
+
+class SwTableBoxFmt;
+class SwTableLine;
+class SwTableCursor;
+class SwTableBoxFmt;
+class SwTableLine;
+class SwTableCursor;
+class SwChartDataProvider;
+
+
+/* -----------------------------22.09.00 11:10--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwChartEventListenerContainer : public SwEventListenerContainer
+{
+ public:
+ SwChartEventListenerContainer( ::com::sun::star::uno::XInterface* pxParentL) :
+ SwEventListenerContainer(pxParentL){}
+ void ChartDataChanged();
+};
+/* ---------------------------------------------------------------------------
+
+ ---------------------------------------------------------------------------*/
+typedef
+cppu::WeakImplHelper4
+<
+ ::com::sun::star::table::XCell,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XEnumerationAccess
+>
+SwXCellBaseClass;
+class SwXCell : public SwXCellBaseClass,
+ public SwXText,
+ public SwClient
+{
+ friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
+ BOOL bKeepNumberFmt = FALSE );
+ friend double lcl_getValue( SwXCell &rCell );
+ friend void lcl_setValue( SwXCell &rCell, double nVal );
+
+
+ const SfxItemPropertySet* m_pPropSet;
+ SwTableBox* pBox; // only set in non-XML import
+ const SwStartNode* pStartNode; // only set in XML import
+
+ // table position where pBox was found last
+ sal_uInt16 nFndPos;
+
+ using SwXText::IsValid;
+
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > createCursor()throw(::com::sun::star::uno::RuntimeException);
+
+ sal_Bool IsValid();
+
+ virtual ~SwXCell();
+
+public:
+ SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, sal_uInt16 nPos=USHRT_MAX );
+ SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ 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();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XCell
+ virtual ::rtl::OUString SAL_CALL getFormula( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw(::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::table::CellContentType SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getError( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::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);
+
+ SwTableBox* GetTblBox()const {return pBox;}
+ static SwXCell* CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTbl = 0 );
+ SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+};
+/* -----------------27.06.98 15:40-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextTableRow : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ const SfxItemPropertySet* m_pPropSet;
+ SwTableLine* pLine;
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTextTableRow();
+public:
+ SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine);
+
+
+ TYPEINFO();
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ const SwTableLine* GetTblRow() const {return pLine;}
+ static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
+};
+/* -----------------20.07.98 13:03-------------------
+ *
+ * --------------------------------------------------*/
+typedef cppu::WeakImplHelper3<
+ ::com::sun::star::text::XTextTableCursor,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet
+ > SwXTextTableCursor_Base;
+class SwXTextTableCursor : public SwXTextTableCursor_Base
+ ,public SwClient
+ ,public OTextCursorHelper
+{
+ SwDepend aCrsrDepend;
+ const SfxItemPropertySet* m_pPropSet;
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ // SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
+
+protected:
+ virtual ~SwXTextTableCursor();
+public:
+ SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox);
+ SwXTextTableCursor(SwFrmFmt& rTableFmt,
+ const SwTableCursor* pTableSelection);
+
+
+ DECLARE_XINTERFACE()
+
+ //XTextTableCursor
+ virtual ::rtl::OUString SAL_CALL getRangeName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoCellByName( const ::rtl::OUString& aCellName, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goUp( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goDown( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL mergeRange( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL splitRange( sal_Int16 Count, sal_Bool Horizontal ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ // ITextCursorHelper
+ virtual const SwPaM* GetPaM() const;
+ virtual SwPaM* GetPaM();
+ virtual const SwDoc* GetDoc() const;
+ virtual SwDoc* GetDoc();
+
+ const SwUnoCrsr* GetCrsr() const;
+ SwUnoCrsr* GetCrsr();
+};
+
+/*-----------------11.12.97 09:38-------------------
+
+--------------------------------------------------*/
+struct SwRangeDescriptor
+{
+ sal_Int32 nTop;
+ sal_Int32 nLeft;
+ sal_Int32 nBottom;
+ sal_Int32 nRight;
+
+ void Normalize();
+};
+
+class SwTableProperties_Impl;
+class SwXTextTable : public cppu::WeakImplHelper10
+<
+ ::com::sun::star::text::XTextTable,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::table::XCellRange,
+ ::com::sun::star::chart::XChartDataArray,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::table::XAutoFormattable,
+ ::com::sun::star::util::XSortable,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::sheet::XCellRangeData
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ SwChartEventListenerContainer aChartLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+
+ // Descriptor-interface
+ SwTableProperties_Impl* pTableProps;
+ String m_sTableName;
+ sal_Bool bIsDescriptor;
+ unsigned short nRows;
+ unsigned short nColumns;
+
+
+ sal_Bool bFirstRowAsLabel :1;
+ sal_Bool bFirstColumnAsLabel :1;
+protected:
+ virtual ~SwXTextTable();
+public:
+ SwXTextTable();
+ SwXTextTable(SwFrmFmt& rFrmFmt);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ TYPEINFO();
+
+ //XTextTable
+ virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL getRows( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCellNames( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTableCursor > SAL_CALL createCursorByCellName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCellRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XChartDataArray
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XChartData
+ virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSortable
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XAutoFormattable
+ virtual void SAL_CALL autoFormat(const rtl::OUString& aName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCellRangeData
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ sal_uInt16 getRowCount(void);
+ sal_uInt16 getColumnCount(void);
+ ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,
+ const String& sTLName, const String& sBRName,
+ SwRangeDescriptor& rDesc);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ static SwXTextTable* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
+};
+
+/* -----------------27.04.98 16:41-------------------
+ *
+ * --------------------------------------------------*/
+class SwXCellRange : public cppu::WeakImplHelper7
+<
+ ::com::sun::star::table::XCellRange,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::chart::XChartDataArray,
+ ::com::sun::star::util::XSortable,
+ ::com::sun::star::sheet::XCellRangeData
+>,
+ public SwClient
+{
+ SwDepend aCursorDepend; //the cursor is removed after the doc has been removed
+ SwChartEventListenerContainer aChartLstnrCntnr;
+
+ SwRangeDescriptor aRgDesc;
+ const SfxItemPropertySet* m_pPropSet;
+
+ SwUnoCrsr* pTblCrsr;
+
+ sal_Bool bFirstRowAsLabel :1;
+ sal_Bool bFirstColumnAsLabel :1;
+
+public:
+ SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt, SwRangeDescriptor& rDesc);
+ ~SwXCellRange();
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ //XCellRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XChartData
+ virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XChartDataArray
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSortable
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCellRangeData
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ sal_uInt16 getRowCount(void);
+ sal_uInt16 getColumnCount(void);
+
+ const SwUnoCrsr* GetTblCrsr() const;
+
+ // for SwChartDataSequence
+ void GetDataSequence(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *pAnySeq,
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > *pTxtSeq,
+ ::com::sun::star::uno::Sequence< double > *pDblSeq,
+ sal_Bool bForceNumberResults = sal_False ) throw (::com::sun::star::uno::RuntimeException);
+
+};
+/* -----------------03.02.99 07:31-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTableRows : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::table::XTableRows,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+
+{
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTableRows();
+public:
+ SwXTableRows(SwFrmFmt& rFrmFmt);
+
+
+ TYPEINFO();
+
+// 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) throw( ::com::sun::star::uno::RuntimeException );
+
+// 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 );
+
+// SMART_UNO_DECLARATION( SwXTableRows, UsrObject );
+
+ //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 nIndex) 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);
+
+ //XTableRows
+ virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+/* -----------------03.02.99 07:31-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTableColumns : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::table::XTableColumns,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+
+{
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTableColumns();
+public:
+ SwXTableColumns(SwFrmFmt& rFrmFmt);
+
+
+ TYPEINFO();
+// 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) throw( ::com::sun::star::uno::RuntimeException );
+
+// 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 );
+
+// SMART_UNO_DECLARATION( SwXTableColumns, UsrObject );
+
+ //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 nIndex) 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);
+
+ //XTableColumns
+ virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+#endif
+
+
+
+
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
new file mode 100644
index 000000000000..84d22e1b7a72
--- /dev/null
+++ b/sw/inc/unotextmarkup.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unotextmarkup.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOTEXTMARKUP_HXX
+#define _UNOTEXTMARKUP_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/text/XTextMarkup.hpp>
+#include <com/sun/star/text/XMultiTextMarkup.hpp>
+#include <calbck.hxx>
+#include <modeltoviewhelper.hxx>
+
+#include <map>
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XStringKeyMap;
+} } } }
+
+class SwTxtNode;
+class SwWrongList;
+class SfxPoolItem;
+
+/** Implementation of the css::text::XTextMarkup interface
+ */
+class SwXTextMarkup:
+ public ::cppu::WeakImplHelper2
+ <
+ ::com::sun::star::text::XTextMarkup,
+ ::com::sun::star::text::XMultiTextMarkup
+ >,
+ public SwClient
+{
+public:
+ SwXTextMarkup( SwTxtNode& rTxtNode, const ModelToViewHelper::ConversionMap* pConversionMap );
+ virtual ~SwXTextMarkup();
+
+ // ::com::sun::star::text::XTextMarkup:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > & xMarkupInfoContainer) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::text::XMultiTextMarkup:
+ virtual void SAL_CALL commitMultiTextMarkup( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextMarkupDescriptor >& aMarkups ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+private:
+ SwXTextMarkup( const SwXTextMarkup & ); // not defined
+ SwXTextMarkup & operator =( const SwXTextMarkup & ); // not defined
+
+protected:
+ SwTxtNode* mpTxtNode;
+ const ModelToViewHelper::ConversionMap* mpConversionMap;
+
+};
+
+
+/** Implementation of the ::com::sun::star::container::XStringKeyMap interface
+ */
+class SwXStringKeyMap:
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::container::XStringKeyMap>
+{
+public:
+ SwXStringKeyMap();
+
+ // ::com::sun::star::container::XStringKeyMap:
+ virtual ::com::sun::star::uno::Any SAL_CALL getValue(const ::rtl::OUString & aKey) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::container::NoSuchElementException);
+ virtual ::sal_Bool SAL_CALL hasValue(const ::rtl::OUString & aKey) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertValue(const ::rtl::OUString & aKey, const ::com::sun::star::uno::Any & aValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException);
+ virtual ::sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getKeyByIndex(::sal_Int32 nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getValueByIndex(::sal_Int32 nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException);
+
+private:
+ SwXStringKeyMap(SwXStringKeyMap &); // not defined
+ void operator =(SwXStringKeyMap &); // not defined
+
+ virtual ~SwXStringKeyMap() {}
+
+ std::map< rtl::OUString, ::com::sun::star::uno::Any > maMap;
+};
+
+#endif
+
+
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
new file mode 100644
index 000000000000..5ebe07e7f633
--- /dev/null
+++ b/sw/inc/unotxdoc.hxx
@@ -0,0 +1,572 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: unotxdoc.hxx,v $
+ * $Revision: 1.29 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _UNOTXDOC_HXX
+#define _UNOTXDOC_HXX
+#include "swdllapi.h"
+#include <svtools/svarray.hxx>
+#include <sfx2/sfxbasemodel.hxx>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/style/XAutoStylesSupplier.hpp>
+#include <com/sun/star/document/XLinkTargetSupplier.hpp>
+#include <com/sun/star/document/XRedlinesSupplier.hpp>
+#include <com/sun/star/text/XNumberingRulesSupplier.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XEndnotesSupplier.hpp>
+#include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
+#include <com/sun/star/text/XTextSectionsSupplier.hpp>
+#include <com/sun/star/text/XLineNumberingProperties.hpp>
+#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
+#include <com/sun/star/text/XPagePrintable.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/text/XReferenceMarksSupplier.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/util/XReplaceable.hpp>
+#include <com/sun/star/util/XReplaceDescriptor.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/util/XLinkUpdate.hpp>
+#include <com/sun/star/view/XRenderable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/xforms/XFormsSupplier.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
+#include <com/sun/star/document/XDocumentLanguages.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <svtools/itemprop.hxx>
+#include <svx/fmdmod.hxx>
+#include <svx/UnoForbiddenCharsTable.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <RefreshListenerContainer.hxx>
+
+#define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
+Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32
+
+#define __CLASS_IFC32 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
+class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \
+class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\
+class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31 , class Ifc32
+
+#define __PUBLIC_IFC32 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \
+public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \
+public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \
+public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \
+public Ifc31, public Ifc32
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/implbase_ex_pre.hxx>
+#define __IFC_EX_TYPE_INIT32( class_cast ) \
+ __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 7 ), __IFC_EX_TYPE_INIT( class_cast, 8 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 9 ), __IFC_EX_TYPE_INIT( class_cast, 10 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 11 ), __IFC_EX_TYPE_INIT( class_cast, 12 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 13 ), __IFC_EX_TYPE_INIT( class_cast, 14 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 15 ), __IFC_EX_TYPE_INIT( class_cast, 16 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 17 ), __IFC_EX_TYPE_INIT( class_cast, 18 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 19 ), __IFC_EX_TYPE_INIT( class_cast, 20 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 21 ), __IFC_EX_TYPE_INIT( class_cast, 22 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 23 ), __IFC_EX_TYPE_INIT( class_cast, 24 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 31 ), __IFC_EX_TYPE_INIT( class_cast, 32)
+#include <cppuhelper/implbase_ex_post.hxx>
+
+__DEF_IMPLHELPER_EX( 32 )
+
+class SwDoc;
+class SwDocShell;
+class UnoActionContext;
+class SwXBodyText;
+class SwXDrawPage;
+class SwUnoCrsr;
+class SwXDocumentPropertyHelper;
+class SfxViewFrame;
+
+typedef UnoActionContext* UnoActionContextPtr;
+SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+
+
+typedef cppu::WeakImplHelper32
+<
+ ::com::sun::star::text::XTextDocument,
+ ::com::sun::star::text::XLineNumberingProperties,
+ ::com::sun::star::text::XChapterNumberingSupplier,
+ ::com::sun::star::text::XNumberingRulesSupplier,
+ ::com::sun::star::text::XFootnotesSupplier,
+ ::com::sun::star::text::XEndnotesSupplier,
+ ::com::sun::star::util::XReplaceable,
+ ::com::sun::star::text::XPagePrintable,
+ ::com::sun::star::text::XReferenceMarksSupplier,
+ ::com::sun::star::text::XTextTablesSupplier,
+ ::com::sun::star::text::XTextFramesSupplier,
+ ::com::sun::star::text::XBookmarksSupplier,
+ ::com::sun::star::text::XTextSectionsSupplier,
+ ::com::sun::star::text::XTextGraphicObjectsSupplier,
+ ::com::sun::star::text::XTextEmbeddedObjectsSupplier,
+ ::com::sun::star::text::XTextFieldsSupplier,
+ ::com::sun::star::style::XStyleFamiliesSupplier,
+ ::com::sun::star::style::XAutoStylesSupplier,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::drawing::XDrawPageSupplier,
+ ::com::sun::star::text::XDocumentIndexesSupplier,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::document::XLinkTargetSupplier,
+ ::com::sun::star::document::XRedlinesSupplier,
+ ::com::sun::star::util::XRefreshable,
+ ::com::sun::star::util::XLinkUpdate,
+ ::com::sun::star::view::XRenderable,
+ ::com::sun::star::xforms::XFormsSupplier,
+ ::com::sun::star::text::XFlatParagraphIteratorProvider,
+ ::com::sun::star::document::XDocumentLanguages,
+ ::com::sun::star::util::XCloneable
+>
+SwXTextDocumentBaseClass;
+
+class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
+ public SvxFmMSFactory,
+ public SfxBaseModel
+{
+ ActionContextArr aActionArr;
+ SwRefreshListenerContainer aRefreshCont;
+
+ const SfxItemPropertySet* pPropSet;
+
+ SwDocShell* pDocShell;
+ sal_Bool bObjectValid;
+
+ SwXDrawPage* pDrawPage;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > * pxXDrawPage;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xBodyText;
+ SwXBodyText* pBodyText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xNumFmtAgg;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXNumberingRules;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXFootnotes;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXFootnoteSettings;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXEndnotes;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXEndnoteSettings;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXReferenceMarks;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > * pxXTextFieldTypes;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextFieldMasters;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextSections;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXBookmarks;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextTables;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextFrames;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXGraphicObjects;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXEmbeddedObjects;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXStyleFamilies;
+ mutable ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyles > * pxXAutoStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > * pxXChapterNumbering;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXDocumentIndexes;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXLineNumberingProperties;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxLinkTargetSupplier;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess >* pxXRedlines;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> xXFormsContainer;
+
+ //temporary frame to enable PDF export if no valid view is available
+ SfxViewFrame* m_pHiddenViewFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xPropertyHelper;
+ SwXDocumentPropertyHelper* pPropertyHelper;
+
+ void GetBodyText();
+ void GetNumberFormatter();
+
+ // used for XRenderable implementation
+ SfxViewShell * GuessViewShell();
+ SwDoc * GetRenderDoc( SfxViewShell *&rpView, const ::com::sun::star::uno::Any& rSelection );
+
+ rtl::OUString maBuildId;
+
+ using SfxBaseModel::addEventListener;
+ using SfxBaseModel::removeEventListener;
+
+protected:
+ virtual ~SwXTextDocument();
+public:
+ SwXTextDocument(SwDocShell* pShell);
+
+ inline void notifyRefreshListeners() { aRefreshCont.Refreshed(); }
+ 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();
+
+ //XWeak
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAdapter > SAL_CALL queryAdapter( ) 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);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextDocument
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reformat(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XModel
+ virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getArgs( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL connectController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disconnectController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL lockControllers( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL unlockControllers( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > SAL_CALL getCurrentController( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setCurrentController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCloseable
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (::com::sun::star::util::CloseVetoException, ::com::sun::star::uno::RuntimeException);
+
+ //XLineNumberingProperties
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XChapterNumberingSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XNumberingRulesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getNumberingRules() throw (::com::sun::star::uno::RuntimeException);
+
+ //XFootnotesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEndnotesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XReplaceable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL replaceAll(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XSearchable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL findAll(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL findFirst(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL findNext(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xStartAt, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPagePrintable
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPagePrintSettings(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aSettings) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL printPages(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ //XReferenceMarksSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XTextFieldsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XTextEmbeddedObjectsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( ::com::sun::star::uno::RuntimeException );
+
+// // ::com::sun::star::text::XTextShapesSupplier
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > getShapes(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XBookmarksSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getBookmarks(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XTextSectionsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextSections(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XTextTablesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextTables(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XTextGraphicObjectsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XTextFramesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextFrames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XStyleFamiliesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XAutoStylesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XMultiServiceFactory
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier)
+ throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments)
+ throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::drawing::XDrawPageSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::text::XDocumentIndexesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XLinkTargetSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XRedlinesSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XRefreshable
+ virtual void SAL_CALL refresh(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::util::XLinkUpdate,
+ virtual void SAL_CALL updateLinks( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::view::XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::xforms::XFormsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getXForms( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::document::XDocumentLanguages
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::text::XFlatParagraphIteratorProvider:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ //
+ void Invalidate();
+ void Reactivate(SwDocShell* pNewDocShell);
+ SwXDocumentPropertyHelper * GetPropertyHelper ();
+ sal_Bool IsValid() const {return bObjectValid;}
+
+ void InitNewDoc();
+
+ SwUnoCrsr* CreateCursorForSearch(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & xCrsr);
+ SwUnoCrsr* FindAny(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & xCrsr, sal_Bool bAll,
+ sal_Int32& nResult,
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xLastResult);
+
+ SwXDrawPage* GetDrawPage();
+ SwDocShell* GetDocShell() {return pDocShell;}
+
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+
+};
+/* -----------------25.10.99 11:02-------------------
+
+ --------------------------------------------------*/
+class SwXLinkTargetSupplier : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwXTextDocument* pxDoc;
+ String sTables;
+ String sFrames;
+ String sGraphics;
+ String sOLEs;
+ String sSections;
+ String sOutlines;
+ String sBookmarks;
+
+public:
+ SwXLinkTargetSupplier(SwXTextDocument& rxDoc);
+ ~SwXLinkTargetSupplier();
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //
+ void Invalidate() {pxDoc = 0;}
+};
+/* -----------------26.10.99 09:05-------------------
+
+ --------------------------------------------------*/
+class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::document::XLinkTargetSupplier
+>
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xRealAccess;
+ const SfxItemPropertySet* pPropSet;
+ const String sLinkSuffix;
+ const String sLinkDisplayName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xDoc;
+ SwXTextDocument* pxDoc;
+
+
+public:
+ SwXLinkNameAccessWrapper(::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xAccess,
+ const String& rLinkDisplayName, String sSuffix);
+ SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
+ const String& rLinkDisplayName, String sSuffix);
+ ~SwXLinkNameAccessWrapper();
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::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);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XLinkTargetSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+/* -----------------26.10.99 15:46-------------------
+
+ --------------------------------------------------*/
+class SwXOutlineTarget : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ const SfxItemPropertySet* pPropSet;
+ String sOutlineText;
+
+public:
+ SwXOutlineTarget(const String& rOutlineText);
+ ~SwXOutlineTarget();
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::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);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL 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);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual 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(void) throw( ::com::sun::star::uno::RuntimeException );
+};
+#endif
+
+class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
+{
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xDashTable;
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xGradientTable;
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xHatchTable;
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xBitmapTable;
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xTransGradientTable;
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xMarkerTable;
+ com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xDrawDefaults;
+
+ SwDoc* m_pDoc;
+public:
+ SwXDocumentPropertyHelper(SwDoc& rDoc);
+ ~SwXDocumentPropertyHelper();
+ com::sun::star::uno::Reference<com::sun::star::uno::XInterface> GetDrawTable(short nWhich);
+ void Invalidate();
+
+ virtual void onChange();
+};
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
new file mode 100644
index 000000000000..55fb2ebd3d98
--- /dev/null
+++ b/sw/inc/usrfld.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: usrfld.hxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _USRFLD_HXX
+#define _USRFLD_HXX
+
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+class SfxPoolItem;
+class SwCalc;
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Benutzerfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType
+{
+ BOOL bValidValue : 1;
+ BOOL bDeleted : 1;
+ double nValue;
+ String aName;
+ String aContent;
+ USHORT nType;
+
+public:
+ SwUserFieldType( SwDoc* pDocPtr, const String& );
+
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const;
+
+ String Expand(sal_uInt32 nFmt, USHORT nSubType, USHORT nLng);
+
+ String GetContent( sal_uInt32 nFmt = 0 );
+ void SetContent( const String& rStr, sal_uInt32 nFmt = 0 );
+
+ inline BOOL IsValid() const;
+ inline void ChgValid( BOOL bNew );
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ double GetValue(SwCalc& rCalc); // Member nValue neu berrechnen
+ inline double GetValue() const;
+ inline void SetValue(const double nVal);
+
+ inline USHORT GetType() const;
+ inline void SetType(USHORT);
+
+ BOOL IsDeleted() const { return bDeleted; }
+ void SetDeleted( BOOL b ) { bDeleted = b; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+};
+
+inline BOOL SwUserFieldType::IsValid() const
+ { return bValidValue; }
+
+inline void SwUserFieldType::ChgValid( BOOL bNew )
+ { bValidValue = bNew; }
+
+inline double SwUserFieldType::GetValue() const
+ { return nValue; }
+
+inline void SwUserFieldType::SetValue(const double nVal)
+ { nValue = nVal; }
+
+inline USHORT SwUserFieldType::GetType() const
+ { return nType; }
+
+inline void SwUserFieldType::SetType(USHORT nSub)
+{
+ nType = nSub;
+ EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Benutzerfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwUserField : public SwValueField
+{
+ USHORT nSubType;
+
+public:
+ SwUserField(SwUserFieldType*, USHORT nSub = 0, sal_uInt32 nFmt = 0);
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+
+ virtual double GetValue() const;
+ virtual void SetValue( const double& rVal );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ // Name kann nicht geaendert werden
+ virtual const String& GetPar1() const;
+
+ // Inhalt
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+};
+
+#endif // _USRFLD_HXX
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
new file mode 100644
index 000000000000..d650d90cf08e
--- /dev/null
+++ b/sw/inc/viewopt.hxx
@@ -0,0 +1,606 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: viewopt.hxx,v $
+ * $Revision: 1.31 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _VIEWOPT_HXX
+#define _VIEWOPT_HXX
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <tools/color.hxx>
+
+#include <svx/zoomitem.hxx>
+#include "swdllapi.h"
+#include "authratr.hxx"
+
+class SwRect;
+class Window;
+class OutputDevice;
+class ViewShell;
+class SwDocShell;
+namespace svtools{ class ColorConfig;}
+
+#define VIEWOPT_1_IDLE 0x00000001L
+#define VIEWOPT_1_TAB 0x00000002L
+#define VIEWOPT_1_BLANK 0x00000004L
+#define VIEWOPT_1_HARDBLANK 0x00000008L
+#define VIEWOPT_1_PARAGRAPH 0x00000010L
+#define VIEWOPT_1_LINEBREAK 0x00000020L
+#define VIEWOPT_1_PAGEBREAK 0x00000040L
+#define VIEWOPT_1_COLUMNBREAK 0x00000080L
+#define VIEWOPT_1_SOFTHYPH 0x00000100L
+
+#define VIEWOPT_1_REF 0x00000400L
+#define VIEWOPT_1_FLDNAME 0x00000800L
+//#define 0x00001000L
+//#define 0x00002000L
+#define VIEWOPT_1_POSTITS 0x00004000L
+#define VIEWOPT_1_FLD_HIDDEN 0x00008000L
+#define VIEWOPT_1_CHAR_HIDDEN 0x00010000L
+#define VIEWOPT_1_GRAPHIC 0x00020000L
+#define VIEWOPT_1_TABLE 0x00040000L
+#define VIEWOPT_1_DRAW 0x00080000L
+#define VIEWOPT_1_CONTROL 0x00100000L
+//#define 0x00200000L
+#define VIEWOPT_1_CROSSHAIR 0x00400000L
+#define VIEWOPT_1_SNAP 0x00800000L
+#define VIEWOPT_1_SYNCHRONIZE 0x01000000L
+#define VIEWOPT_1_GRIDVISIBLE 0x02000000L
+#define VIEWOPT_1_ONLINESPELL 0x04000000L
+//#define VIEWOPT_1_HIDESPELL 0x08000000L /* removed #i91949 */
+#define VIEWOPT_1_RESERVED1 0x10000000L
+#define VIEWOPT_1_VIEWMETACHARS 0x20000000L
+#define VIEWOPT_1_PAGEBACK 0x40000000L
+#define VIEWOPT_1_SOLIDMARKHDL 0x80000000L
+
+#define VIEWOPT_CORE2_BLACKFONT 0x00000001L
+#define VIEWOPT_CORE2_HIDDENPARA 0x00000002L
+#define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L
+#define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L
+#define VIEWOPT_CORE2_PDF_EXPORT 0x00000010L
+
+
+#define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L
+
+#define VIEWOPT_2_UNUSED1 0x00000100L
+#define VIEWOPT_2_UNUSED2 0x00000200L
+#define VIEWOPT_2_H_RULER 0x00000400L
+#define VIEWOPT_2_VSCROLLBAR 0x00000800L
+#define VIEWOPT_2_HSCROLLBAR 0x00001000L
+#define VIEWOPT_2_STATUSLINE 0x00002000L
+#define VIEWOPT_2_V_RULER 0x00004000L
+#define VIEWOPT_2_ANY_RULER 0x00008000L
+#define VIEWOPT_2_MODIFIED 0x00010000L
+#define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L
+#define VIEWOPT_2_GRFKEEPZOOM 0x00040000L
+#define VIEWOPT_2_PREVENT_TIPS 0x00100000L
+#define VIEWOPT_2_RESERVED3 0x00200000L
+#define VIEWOPT_2_RESERVED4 0x00400000L
+#define VIEWOPT_2_PRTFORMAT 0x00800000L
+#define VIEWOPT_2_SHADOWCRSR 0x01000000L
+#define VIEWOPT_2_V_RULER_RIGHT 0x02000000L
+
+//Tabellenhintergrund
+#define TBL_DEST_CELL 0
+#define TBL_DEST_ROW 1
+#define TBL_DEST_TBL 2
+
+//Appearance flags
+#define VIEWOPT_DOC_BOUNDARIES 0x0001
+#define VIEWOPT_OBJECT_BOUNDARIES 0x0002
+#define VIEWOPT_TABLE_BOUNDARIES 0x0004
+#define VIEWOPT_INDEX_SHADINGS 0x0008
+#define VIEWOPT_LINKS 0x0010
+#define VIEWOPT_VISITED_LINKS 0x0020
+#define VIEWOPT_FIELD_SHADINGS 0x0040
+#define VIEWOPT_SECTION_BOUNDARIES 0x0080
+
+// Implementierung in core/text/txtpaint.cxx
+extern void SyncVout( const OutputDevice *pOut );
+
+class SwViewOption
+{
+ static Color aDocColor; // color of document boundaries
+ static Color aDocBoundColor; // color of document boundaries
+ static Color aObjectBoundColor; // color of object boundaries
+ static Color aAppBackgroundColor; // application background
+ static Color aTableBoundColor; // color of table boundaries
+ static Color aFontColor;
+ static Color aIndexShadingsColor; // background color of indexes
+ static Color aLinksColor;
+ static Color aVisitedLinksColor;
+ static Color aDirectCursorColor;
+ static Color aTextGridColor;
+ static Color aSpellColor; // mark color of online spell checking
+ static Color aSmarttagColor;
+ static Color aFieldShadingsColor;
+ static Color aSectionBoundColor;
+ static Color aPageBreakColor;
+ static Color aScriptIndicatorColor;
+
+ static sal_Int32 nAppearanceFlags; //
+protected:
+ static USHORT nPixelTwips;// 1 Pixel == ? Twips
+
+ String sSymbolFont; // Symbolzeichensatz
+ UINT32 nCoreOptions; // Bits fuer die ViewShell
+ UINT32 nCore2Options; // Bits fuer die ViewShell
+ UINT32 nUIOptions; // UI-Bits
+ Color aRetoucheColor; // DefaultBackground fuer BrowseView
+ Size aSnapSize; // Beschreibt hori. wie vert. Snap
+ USHORT mnViewLayoutColumns;// # columns for edit view
+ short nDivisionX; // Rasterunterteilung
+ short nDivisionY;
+ BYTE nPagePrevRow; // Page Preview Row/Columns
+ BYTE nPagePrevCol; // Page Preview Row/Columns
+ BYTE nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
+ BOOL bReadonly : 1; // Readonly-Doc
+ BOOL bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
+ BOOL bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
+ BOOL bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
+ // --> FME 2004-06-29 #114856# Formular view
+ BOOL bFormView : 1;
+ // <--
+ BOOL bBookview : 1; // view mode for page preview
+ BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
+ sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
+
+ // Maszstab
+ USHORT nZoom; // Angaben in Prozent
+ SvxZoomType eZoom; // 'enum' fuer Zoom
+
+ BYTE nTblDest; // Ziel fuer Tabellenhintergrund
+
+#ifndef PRODUCT
+ // korrespondieren zu den Angaben in ui/config/cfgvw.src
+ BOOL bTest1 :1; // Test-Flag "Layout not loading"
+ BOOL bTest2 :1; // Test-Flag "WYSIWYG++"
+ BOOL bTest3 :1; // Test-Flag ""
+ BOOL bTest4 :1; // Test-Flag "WYSIWYG debug"
+ BOOL bTest5 :1; // Test-Flag "No idle format"
+ BOOL bTest6 :1; // Test-Flag "No screen adj"
+ BOOL bTest7 :1; // Test-Flag "win format"
+ BOOL bTest8 :1; // Test-Flag ""
+ static BOOL bTest9; // Test-Flag "DrawingLayerNotLoading"
+ BOOL bTest10 :1; // Test-Flag "Format by Input"
+#endif
+
+public:
+ SwViewOption(); // CTOR
+ SwViewOption(const SwViewOption&); //
+ ~SwViewOption(); //
+
+ void Init( Window *pWin ); // Initialisierung der statischen Daten
+
+ USHORT GetPixelTwips() const { return nPixelTwips; }
+
+ inline UINT32 GetCoreOptions() const {return nCoreOptions;}
+ inline void SetUIOptions( const SwViewOption& );
+
+/*---------------------------------------------------------------------------
+ Optionen aus nCoreOptions
+----------------------------------------------------------------------------*/
+
+ inline BOOL IsIdle() const
+ { return nCoreOptions & VIEWOPT_1_IDLE ? TRUE : FALSE; }
+ inline void SetIdle( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_IDLE ) : ( nCoreOptions &= ~VIEWOPT_1_IDLE); }
+
+ inline BOOL IsTab(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetTab( BOOL b ) {
+ (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
+
+ inline BOOL IsBlank(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetBlank( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
+
+ inline BOOL IsHardBlank() const
+ { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? TRUE : FALSE; }
+ inline void SetHardBlank( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
+
+ inline BOOL IsParagraph(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetParagraph( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
+
+ inline BOOL IsLineBreak(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetLineBreak( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
+
+ inline void SetPageBreak( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
+
+ inline void SetColumnBreak( BOOL b)
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
+
+ inline BOOL IsSoftHyph() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? TRUE : FALSE; }
+ inline void SetSoftHyph( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
+
+ inline BOOL IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? TRUE : FALSE; }
+ inline void SetFldName( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
+
+ inline BOOL IsPostIts() const
+ { return (nCoreOptions & VIEWOPT_1_POSTITS) ? TRUE : FALSE; }
+ inline void SetPostIts( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); }
+ void PaintPostIts( OutputDevice *pOut, const SwRect &rRect,
+ sal_Bool bIsScript ) const;
+ USHORT GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
+
+ inline BOOL IsShowHiddenChar(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+
+ inline void SetShowHiddenChar( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); }
+
+
+ inline BOOL IsShowHiddenField() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? TRUE : FALSE; }
+ inline void SetShowHiddenField( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); }
+
+ inline BOOL IsGraphic() const
+ { return nCoreOptions & VIEWOPT_1_GRAPHIC ? TRUE : FALSE; }
+ inline void SetGraphic( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
+
+ inline BOOL IsPageBack() const
+ { return nCoreOptions & VIEWOPT_1_PAGEBACK ? TRUE : FALSE; }
+ inline void SetPageBack( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
+
+ inline BOOL IsSolidMarkHdl() const
+ { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? TRUE : FALSE; }
+ inline void SetSolidMarkHdl( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
+
+ inline BOOL IsBigMarkHdl() const
+ { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? TRUE : FALSE;}
+ inline void SetBigMarkHdl(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
+
+ inline BOOL IsTable() const
+ { return nCoreOptions & VIEWOPT_1_TABLE ? TRUE : FALSE; }
+ inline void SetTable( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
+
+ inline BOOL IsDraw() const
+ { return nCoreOptions & VIEWOPT_1_DRAW ? TRUE : FALSE; }
+ inline void SetDraw( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
+
+ inline BOOL IsControl() const
+ { return nCoreOptions & VIEWOPT_1_CONTROL ? TRUE : FALSE; }
+ inline void SetControl( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
+
+ inline BOOL IsSnap() const
+ { return nCoreOptions & VIEWOPT_1_SNAP ? TRUE : FALSE; }
+ inline void SetSnap( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); }
+
+ inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; }
+ inline const Size &GetSnapSize() const { return aSnapSize; }
+
+ inline BOOL IsGridVisible() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? TRUE : FALSE; }
+ inline void SetGridVisible( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
+
+ inline BOOL IsOnlineSpell() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? TRUE : FALSE; }
+ inline void SetOnlineSpell( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
+
+ inline BOOL IsViewMetaChars() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? TRUE : FALSE; }
+ inline void SetViewMetaChars( BOOL b)
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
+
+ inline BOOL IsSynchronize() const
+ { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? TRUE : FALSE;}
+ inline void SetSynchronize( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
+
+ inline BOOL IsCrossHair() const
+ { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? TRUE : FALSE; }
+ inline void SetCrossHair( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); }
+
+/*---------------------------------------------------------------------------
+ Optionen aus nCore2Options
+----------------------------------------------------------------------------*/
+ inline BOOL IsBlackFont() const
+ {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? TRUE : FALSE;}
+
+ inline void SetBlackFont(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
+
+ inline BOOL IsShowHiddenPara() const
+ {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? TRUE : FALSE;}
+
+ inline void SetShowHiddenPara(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
+
+ inline BOOL IsSmoothScroll() const
+ {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? TRUE : FALSE;}
+
+ inline void SetSmoothScroll(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
+
+ inline BOOL IsCursorInProtectedArea() const
+ {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? TRUE : FALSE;}
+
+ inline void SetCursorInProtectedArea(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
+
+ inline BOOL IsPDFExport() const
+ {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? TRUE : FALSE;}
+
+ inline void SetPDFExport(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
+
+/*---------------------------------------------------------------------------
+
+----------------------------------------------------------------------------*/
+
+
+ inline short GetDivisionX() const { return nDivisionX; }
+ inline void SetDivisionX( short n ){ nDivisionX = n; }
+ inline short GetDivisionY() const { return nDivisionY; }
+ inline void SetDivisionY( short n ){ nDivisionY = n; }
+
+ inline BYTE GetPagePrevRow() const { return nPagePrevRow; }
+ inline void SetPagePrevRow( BYTE n ) { nPagePrevRow = n; }
+ inline BYTE GetPagePrevCol() const { return nPagePrevCol; }
+ inline void SetPagePrevCol( BYTE n ) { nPagePrevCol = n; }
+ BOOL IsReadonly() const { return bReadonly; }
+ void SetReadonly(BOOL bSet) { bReadonly = bSet; }
+
+ BOOL IsSelectionInReadonly() const {return bSelectionInReadonly;}
+ void SetSelectionInReadonly(BOOL bSet) {bSelectionInReadonly = bSet;}
+
+ // --> FME 2004-06-29 #114856# Formular view
+ BOOL IsFormView() const { return bFormView; }
+ void SetFormView( BOOL bSet ) { bFormView = bSet; }
+ // <--
+
+ inline BOOL IsPagePrevBookview() const { return bBookview; }
+ inline void SetPagePrevBookview(BOOL bSet) { bBookview = bSet; }
+
+ BOOL IsAutoCompleteWords() const;
+
+ // PAGES01
+ bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
+ void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
+ USHORT GetViewLayoutColumns() const { return mnViewLayoutColumns; }
+ void SetViewLayoutColumns( USHORT nNew ) { mnViewLayoutColumns = nNew; }
+
+#ifndef PRODUCT
+ // korrespondieren zu den Angaben in ui/config/cfgvw.src
+ inline BOOL IsTest1() const { return bTest1; }
+ inline void SetTest1( BOOL b ) { bTest1 = b; }
+ inline BOOL IsTest2() const { return bTest2; }
+ inline void SetTest2( BOOL b ) { bTest2 = b; }
+ inline BOOL IsTest3() const { return bTest3; }
+ inline void SetTest3( BOOL b ) { bTest3 = b; }
+ inline BOOL IsTest4() const { return bTest4; }
+ inline void SetTest4( BOOL b ) { bTest4 = b; }
+ inline BOOL IsTest5() const { return bTest5; }
+ inline void SetTest5( BOOL b ) { bTest5 = b; }
+ inline BOOL IsTest6() const { return bTest6; }
+ inline void SetTest6( BOOL b ) { bTest6 = b; }
+ inline BOOL IsTest7() const { return bTest7; }
+ inline void SetTest7( BOOL b ) { bTest7 = b; }
+ inline BOOL IsTest8() const { return bTest8; }
+ inline void SetTest8( BOOL b ) { bTest8 = b; }
+ static inline BOOL IsTest9() { return bTest9; }
+ static inline void SetTest9( BOOL b ) { bTest9 = b; }
+ inline BOOL IsTest10() const { return bTest10; }
+ inline void SetTest10( BOOL b ) { bTest10 = b; }
+#endif
+
+ inline USHORT GetZoom() const { return nZoom; }
+ inline void SetZoom( USHORT n ){ nZoom = n; }
+
+ void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const;
+ void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const;
+
+ SwViewOption& operator=( const SwViewOption &rOpt );
+ // Vergleichsmethoden
+ BOOL IsEqualFlags ( const SwViewOption &rOpt ) const;
+ inline BOOL operator==( const SwViewOption &rOpt ) const;
+
+
+/*---------------------------------------------------------------------------
+ Optionen aus nUIOptions
+----------------------------------------------------------------------------*/
+
+ BOOL IsViewVScrollBar() const
+ { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? TRUE : FALSE; }
+ BOOL IsViewHScrollBar() const
+ { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? TRUE : FALSE; }
+ BOOL IsKeepRatio() const
+ { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? TRUE : FALSE; }
+ BOOL IsGrfKeepZoom() const
+ { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; }
+ BOOL IsPreventTips() const
+ { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? TRUE : FALSE; }
+ BOOL IsPrtFormat() const
+ { return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; }
+
+ SvxZoomType GetZoomType() const { return eZoom; }
+
+ BYTE GetTblDest() const { return nTblDest; }
+
+ void SetViewVScrollBar(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
+ void SetViewHScrollBar(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
+ void SetKeepRatio (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
+ void SetGrfKeepZoom (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
+ void SetPreventTips( BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
+ void SetPrtFormat( BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
+
+ void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
+ void SetTblDest( BYTE nNew ) { nTblDest = nNew; }
+
+ const String& GetSymbolFont() const {return sSymbolFont;}
+ void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;}
+
+ const Color& GetRetoucheColor() const { return aRetoucheColor;}
+ void SetRetoucheColor(const Color&r) { aRetoucheColor = r; }
+
+ BOOL IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
+ void SetViewAnyRuler(BOOL bSet)
+ { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
+
+ BOOL IsViewHRuler(BOOL bDirect = FALSE) const
+ {
+ BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ 0 != (nUIOptions & VIEWOPT_2_H_RULER) :
+ !bReadonly ?
+ (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)
+ : FALSE );
+ return bRet;
+
+ }
+ void SetViewHRuler (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
+
+ BOOL IsViewVRuler(BOOL bDirect = FALSE) const
+ {
+ BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ 0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
+ !bReadonly ?
+ (nUIOptions &
+ (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)
+ : FALSE );
+ return bRet;
+ }
+ void SetViewVRuler (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
+
+ // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
+ BOOL IsShadowCursor() const
+ { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? TRUE : FALSE; }
+ void SetShadowCursor(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
+
+ //move vertical ruler to the right
+ BOOL IsVRulerRight() const
+ { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? TRUE : FALSE; }
+ void SetVRulerRight(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
+
+ BOOL IsStarOneSetting() const {return bStarOneSetting; }
+ void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; }
+
+ BOOL IsPagePreview() const {return bIsPagePreview; }
+ void SetPagePreview(BOOL bSet) { bIsPagePreview= bSet; }
+
+ BYTE GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
+ void SetShdwCrsrFillMode( BYTE nMode ) { nShdwCrsrFillMode = nMode; };
+
+ sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; }
+ void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; }
+
+ static Color& GetDocColor();
+ static Color& GetDocBoundariesColor();
+ static Color& GetAppBackgroundColor();
+ static Color& GetObjectBoundariesColor();
+ static Color& GetTableBoundariesColor();
+ static Color& GetIndexShadingsColor();
+ static Color& GetLinksColor();
+ static Color& GetVisitedLinksColor();
+ static Color& GetDirectCursorColor();
+ static Color& GetTextGridColor();
+ static Color& GetSpellColor();
+ static Color& GetSmarttagColor();
+ SW_DLLPUBLIC static Color& GetFontColor();
+ static Color& GetFieldShadingsColor();
+ static Color& GetSectionBoundColor();
+ static Color& GetPageBreakColor();
+
+ static BOOL IsAppearanceFlag(sal_Int32 nFlag);
+
+ static BOOL IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
+ static BOOL IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
+ static BOOL IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
+ static BOOL IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
+ static BOOL IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
+ static BOOL IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
+ static BOOL IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
+ static BOOL IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
+
+ static void SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig = FALSE);
+
+ void SetDocBoundaries(BOOL bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
+
+ static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
+};
+
+
+inline BOOL SwViewOption::operator==( const SwViewOption &rOpt ) const
+{
+ return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom();
+}
+
+inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
+{
+ nUIOptions = rVOpt.nUIOptions;
+ nTblDest = rVOpt.nTblDest;
+ nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode;
+}
+
+
+// Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten
+SW_DLLPUBLIC USHORT GetHtmlMode(const SwDocShell*);
+
+
+#endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
new file mode 100644
index 000000000000..7a8d0eb0c273
--- /dev/null
+++ b/sw/inc/viewsh.hxx
@@ -0,0 +1,646 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: viewsh.hxx,v $
+ * $Revision: 1.65.40.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _VIEWSH_HXX
+#define _VIEWSH_HXX
+#include <com/sun/star/embed/XClassifiedObject.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <tools/rtti.hxx>
+#include <svtools/svarray.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <ring.hxx>
+#include <swrect.hxx>
+#include <errhdl.hxx>
+#include <vcl/mapmod.hxx>
+
+namespace com { namespace sun { namespace star { namespace accessibility {
+ class XAccessible; } } } }
+
+class SfxObjectShellRef;
+class SwDoc;
+class IDocumentSettingAccess;
+class IDocumentDeviceAccess;
+class IDocumentMarkAccess;
+class IDocumentDrawModelAccess;
+class IDocumentRedlineAccess;
+class IDocumentLayoutAccess;
+class IDocumentFieldsAccess;
+class IDocumentContentOperations;
+class IDocumentStylePoolAccess;
+class IDocumentStatistics;
+class IDocumentUndoRedo;
+// --> OD 2007-11-14 #i83479#
+class IDocumentListItems;
+class IDocumentOutlineNodes;
+// <--
+class SfxPrinter;
+class SfxProgress;
+class SwRootFrm;
+class SwNodes;
+class SdrView;
+class SfxItemPool;
+class SfxViewShell;
+class SwViewOption;
+class SwViewImp;
+class SwPrtOptions;
+class SwPagePreViewPrtData;
+class Window;
+class OutputDevice;
+class SwLayIdle;
+struct ShellResource;
+class SwRegionRects;
+class SwFrm;
+class SvtAccessibilityOptions;
+// OD 12.12.2002 #103492#
+class SwPagePreviewLayout;
+// --> OD 2005-12-01 #i27138#
+class SwTxtFrm;
+// <--
+class BitmapEx;
+
+struct SwAccessibilityOptions;
+class Region;
+class SwPostItMgr;
+
+// #i74769#
+class SdrPaintWindow;
+
+//JP 19.07.98: - Bug 52312
+// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
+// benoetigt werden.
+// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
+#define VSHELLFLAG_ISPREVIEW ((long)0x1)
+
+class SW_DLLPUBLIC ViewShell : public Ring
+{
+ friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut );
+ friend void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pOut,
+ Window *pWin, sal_uInt16 nZoom );
+
+ friend class SwViewImp;
+ friend class SwLayIdle;
+
+ // OD 12.12.2002 #103492# - for setting visible area for page preview paint
+ friend class SwPagePreviewLayout;
+
+ //Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
+ //werden kann.
+ friend void SetSwVisArea( ViewShell *pSh, const SwRect &, BOOL bPDFExport = FALSE );
+
+ // --> PB 2007-05-30 #146850#
+ static BitmapEx* pReplaceBmp; // replaced display of still loaded images
+ static BitmapEx* pErrorBmp; // error display of missed images
+ // <--
+
+ static sal_Bool bLstAct; // sal_True wenn Das EndAction der letzten Shell
+ // laeuft; also die EndActions der
+ // anderen Shells auf das Dokument
+ // abgearbeitet sind.
+
+ Point aPrtOffst; //Ofst fuer den Printer,
+ //nicht bedruckbarer Rand.
+ Size aBrowseBorder; //Rand fuer Framedokumente
+ SwRect aInvalidRect;
+
+ SfxViewShell *pSfxViewShell;
+ SwViewImp *pImp; //Core-Interna der ViewShell.
+ //Der Pointer ist niemals 0.
+
+ Window *pWin; // = 0 during printing or pdf export
+ OutputDevice *pOut; // Window, Printer, VirtDev, ...
+ OutputDevice* mpTmpRef; // Temporariy reference device. Is used
+ // during (printer depending) prospect
+ // and page preview printing
+ // (because a scaling has to be set at
+ // the original printer)
+
+ SwViewOption *pOpt;
+ SwAccessibilityOptions* pAccOptions;
+
+
+ sal_Bool bDocSizeChgd :1; //Fuer DocChgNotify(): Neue DocGroesse bei
+ //EndAction an das DocMDI melden.
+ sal_Bool bPaintWorks :1; //Normal Painten wenn sal_True,
+ //Paint merken wenn sal_False
+ sal_Bool bPaintInProgress :1; //Kein zweifaches Paint durchlassen.
+ sal_Bool bViewLocked :1; //Lockt den sichtbaren Bereich,
+ //MakeVisible laeuft dann in's leere.
+ sal_Bool bInEndAction :1; //Fiese unstaende vermeiden, siehe viewsh.cxx
+ sal_Bool bPreView :1; //Ist sal_True wenns eine PreView-ViewShell ist.
+ sal_Bool bFrameView :1; //sal_True wenn es ein (HTML-)Frame ist.
+ sal_Bool bEnableSmooth :1; //Disable des SmoothScroll z.B. fuer
+ //Drag der Scrollbars.
+ sal_Bool bEndActionByVirDev:1; //Paints aus der EndAction immer ueber virtuelles
+
+ //Device (etwa beim Browsen)
+
+ // OD 2004-06-01 #i26791# - boolean, indicating that class in in constructor
+ bool mbInConstructor:1;
+
+ // #i74769#
+ SdrPaintWindow* mpTargetPaintWindow;
+ OutputDevice* mpBufferedOut;
+
+ //Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
+ SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
+
+ inline void ResetInvalidRect();
+
+ SW_DLLPRIVATE void Reformat(); //Invalidert das ges. Layout (ApplyViewOption)
+
+ SW_DLLPRIVATE void PaintDesktop( const SwRect & ); // sammeln der Werte fuers
+ // Malen der Wiese und rufen
+ // PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
+ SW_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
+
+ SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber
+ //eine Aktion ausloesen.
+
+ SW_DLLPRIVATE void Scroll(); //Scrollen wenn sich aus der LayAction Scrollmoeglichkeiten
+ //ergaben.
+
+ SW_DLLPRIVATE void PrepareForPrint( const SwPrtOptions &rOptions );
+
+ SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
+
+protected:
+ static ShellResource* pShellRes; // Resourcen fuer die Shell
+ static Window* pCareWindow; // diesem Fenster ausweichen
+
+ SwRect aVisArea; //Die moderne Ausfuerung der VisArea
+ SwDoc *pDoc; //Das Dokument, niemals 0
+
+ sal_uInt16 nStartAction; //ist != 0 wenn mindestens eine ::com::sun::star::chaos::Action laeuft
+ sal_uInt16 nLockPaint; //ist != 0 wenn das Paint gelocked ist.
+
+public:
+ TYPEINFO();
+
+ SwViewImp *Imp() { return pImp; }
+ const SwViewImp *Imp() const { return pImp; }
+
+ const SwNodes& GetNodes() const;
+
+ //Nach Druckerwechsel, vom Doc
+ //pPDFOut != NULL is used for PDF export.
+ void InitPrt( SfxPrinter * , OutputDevice *pPDFOut = NULL );
+
+ //Klammerung von zusammengehoerenden Aktionen.
+ inline void StartAction();
+ void ImplStartAction();
+ inline void EndAction( const sal_Bool bIdleEnd = sal_False );
+ void ImplEndAction( const sal_Bool bIdleEnd = sal_False );
+ sal_uInt16 ActionCount() const { return nStartAction; }
+ sal_Bool ActionPend() const { return nStartAction != 0; }
+ sal_Bool IsInEndAction() const { return bInEndAction; }
+
+ void SetEndActionByVirDev( sal_Bool b ) { bEndActionByVirDev = b; }
+ sal_Bool IsEndActionByVirDev() { return bEndActionByVirDev; }
+
+ // Per UNO wird am RootFrame fuer alle shells der ActionCount kurzfristig
+ // auf Null gesetzt und wieder restauriert
+ void SetRestoreActions(sal_uInt16 nSet);
+ sal_uInt16 GetRestoreActions() const;
+
+ inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); }
+ void ChgHyphenation() { Reformat(); }
+ void ChgNumberDigits();
+
+ //Methoden fuer Paint- und Scrollrects, die auf allen Shells im
+ //Ring arbeiten.
+ sal_Bool AddPaintRect( const SwRect &rRect );
+ void AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, long nOffs );
+ void SetNoNextScroll();
+
+ void InvalidateWindows( const SwRect &rRect );
+
+ //////////////////////////////////////////////////////////////////////////////
+ // #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
+protected:
+ sal_uInt32 mnPrePostPaintCount;
+ OutputDevice* mpPrePostOutDev;
+ MapMode maPrePostMapMode;
+public:
+ void PrePaint();
+ void DLPrePaint2(const Region& rRegion);
+ void DLPostPaint2(bool bPaintFormLayer);
+ const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
+ //////////////////////////////////////////////////////////////////////////////
+
+ virtual void Paint(const Rectangle &rRect);
+ sal_Bool IsPaintInProgress() const { return bPaintInProgress; }
+ bool IsDrawingLayerPaintInProgress() const { return 0 != mnPrePostPaintCount; }
+
+ //Benachrichtung, dass sich der sichtbare Bereich geaendert hat.
+ //VisArea wird neu gesetzt, anschliessend wird gescrollt.
+ //Das uebergebene Rect liegt auf Pixelgrenzen,
+ //um Pixelfehler beim Scrollen zu vermeiden.
+ virtual void VisPortChgd( const SwRect & );
+ sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
+ void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
+
+ const SwRect &VisArea() const { return aVisArea; }
+ //Es wird, wenn notwendig, soweit gescrollt, dass das
+ //uebergebene Rect im sichtbaren Ausschnitt liegt.
+ void MakeVisible( const SwRect & );
+
+ //Bei naechster Gelegenheit die neue Dokuemntgroesse an das UI weiterreichen.
+ void SizeChgNotify();
+ void UISizeNotify(); //Das weiterreichen der aktuellen groesse.
+
+ Point GetPagePos( sal_uInt16 nPageNum ) const;
+
+ sal_uInt16 GetNumPages(); //Anzahl der aktuellen Seiten Layout erfragen.
+ sal_Bool IsDummyPage( USHORT nPageNum ) const; // An empty page?
+
+ //Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
+ void SetFirstVisPageInvalid();
+
+ SwRootFrm *GetLayout() const;
+ sal_Bool IsNewLayout() const; //Wurde das Layout geladen oder neu
+ //erzeugt?
+
+ Size GetDocSize() const;// erfrage die Groesse des Dokuments
+
+ void CalcLayout(); //Durchformatierung des Layouts erzwingen.
+
+ inline SwDoc *GetDoc() const { return pDoc; } //niemals 0.
+
+ /** Provides access to the document setting interface
+ */
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+ IDocumentSettingAccess* getIDocumentSettingAccess();
+
+ /** Provides access to the document device interface
+ */
+ const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
+ IDocumentDeviceAccess* getIDocumentDeviceAccess();
+
+ /** Provides access to the document bookmark interface
+ */
+ const IDocumentMarkAccess* getIDocumentMarkAccess() const;
+ IDocumentMarkAccess* getIDocumentMarkAccess();
+
+ /** Provides access to the document draw model interface
+ */
+ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
+ IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
+
+ /** Provides access to the document redline interface
+ */
+ const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
+ IDocumentRedlineAccess* getIDocumentRedlineAccess();
+
+ /** Provides access to the document layout interface
+ */
+ const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
+ IDocumentLayoutAccess* getIDocumentLayoutAccess();
+
+ /** Provides access to the document fields administration interface
+ */
+ const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
+
+ /** Provides access to the content operations interface
+ */
+ IDocumentContentOperations* getIDocumentContentOperations();
+
+ /** Provides access to the document style pool interface
+ */
+ IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
+
+ /** Provides access to the document statistics interface
+ */
+ const IDocumentStatistics* getIDocumentStatistics() const;
+
+ /** Provides access to the document undo/redo interface
+ */
+ IDocumentUndoRedo* getIDocumentUndoRedoAccess();
+
+ // --> OD 2007-11-14 #i83479#
+ const IDocumentListItems* getIDocumentListItemsAccess() const;
+ const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
+ // <--
+
+ // 1. GetRefDev: Either the printer or the virtual device from the doc
+ // 2. GetWin: Available if we not printing
+ // 3. GetOut: Printer, Window or Virtual device
+ OutputDevice& GetRefDev() const;
+ inline Window* GetWin() const { return pWin; }
+ inline OutputDevice* GetOut() const { return pOut; }
+
+ static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; }
+
+ //Andern alle PageDescriptoren
+ void ChgAllPageOrientation( sal_uInt16 eOri );
+ void ChgAllPageSize( Size &rSz );
+
+ //Druckauftrag abwickeln.
+ // pPDFOut != Null is: do PDF Export (no printing!)
+ sal_Bool Prt( SwPrtOptions& rOptions, SfxProgress* pProgress,
+ OutputDevice* pPDFOut = NULL );
+
+ //"Drucken" fuer OLE 2.0
+ static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, SwPrtOptions& rOptions,
+ OutputDevice* pOleOut, const Rectangle& rRect );
+
+ // creates temporary doc with selected text for PDF export
+ SwDoc * CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef& );
+ SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
+
+ //Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
+ void CalcPagesForPrint( sal_uInt16 nMax, SfxProgress* pProgress = 0,
+ const String* pStr = NULL, ULONG nMergeAct = 0, ULONG nMergeCnt = 0 );
+
+ //All about fields.
+ void UpdateFlds(sal_Bool bCloseDB = sal_False);
+ sal_Bool IsAnyFieldInDoc() const;
+ // update all charts, for that exists any table
+ void UpdateAllCharts();
+ sal_Bool HasCharts() const;
+
+ //
+ // DOCUMENT COMPATIBILITY FLAGS START
+ //
+
+ // Sollen Absatzabstaende addiert oder maximiert werden?
+ void SetParaSpaceMax( bool bNew );
+
+ // Sollen Absatzabstaende addiert oder maximiert werden?
+ void SetParaSpaceMaxAtPages( bool bNew );
+
+ // compatible behaviour of tabs
+ void SetTabCompat( bool bNew );
+
+ //#i24363# tab stops relative to indent
+ void SetTabsRelativeToIndent( bool bNew );
+
+ // font metric attribute "External Leading" should be considered
+ void SetAddExtLeading( bool bNew );
+
+ // formatting by virtual device or printer
+ void SetUseVirDev( bool nNew );
+
+ // OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
+ // of table cells
+ void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
+
+ // OD 06.01.2004 #i11859# - former formatting of text lines with
+ // proportional line spacing or not
+ void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
+
+ // OD 2004-03-12 #i11860# - former object positioning
+ void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
+
+ // OD 2004-05-05 #i28701#
+ void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
+
+ // --> FME #108724#
+ void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
+
+ // -> PB 2007-06-11 #i45491#
+ void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
+ // <--
+
+ //
+ // DOCUMENT COMPATIBILITY FLAGS END
+ //
+
+ //Ruft den Idle-Formatierer des Layouts
+ void LayoutIdle();
+
+ inline const SwViewOption *GetViewOptions() const { return pOpt; }
+ void ApplyViewOptions( const SwViewOption &rOpt );
+ void SetUIOptions( const SwViewOption &rOpt );
+ void SetReadonlyOption(sal_Bool bSet); // Readonly-Bit d. ViewOptions setzen
+ void SetPDFExportOption(sal_Bool bSet); // set/reset PDF export mode
+ void SetPrtFormatOption(sal_Bool bSet); // PrtFormat-Bit d. ViewOptions setzen
+ void SetReadonlySelectionOption(sal_Bool bSet);//change the selection mode in readonly docs
+
+ const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;}
+
+ static void SetShellRes( ShellResource* pRes ) { pShellRes = pRes; }
+ static ShellResource* GetShellRes();
+
+ static void SetCareWin( Window* pNew );
+ static Window* GetCareWin(ViewShell& rVSh)
+ { return pCareWindow ? pCareWindow : CareChildWin(rVSh); }
+ static Window* CareChildWin(ViewShell& rVSh);
+
+ inline SfxViewShell *GetSfxViewShell() { return pSfxViewShell; }
+ inline void SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; }
+
+ // Selektion der Draw ::com::sun::star::script::Engine geaendert
+ virtual void DrawSelChanged();
+
+ // OD 12.12.2002 #103492#
+ SwPagePreviewLayout* PagePreviewLayout();
+
+ /** adjust view options for page preview
+
+ OD 09.01.2003 #i6467#
+ Because page preview should show the document as it is printed -
+ page preview is print preview -, the view options are adjusted to the
+ same as for printing.
+
+ @param _rPrintOptions
+ input parameter - constant reference to print options, to which the
+ view option will be adjusted.
+ */
+ void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
+
+ // print page/print preview
+ void PrintPreViewPage( SwPrtOptions& rOptions, sal_uInt16 nRowCol,
+ SfxProgress& rProgress,
+ const SwPagePreViewPrtData* = 0 );
+
+ // Prospekt-Format drucken
+ void PrintProspect( SwPrtOptions&, SfxProgress& , BOOL bRTL);
+
+ sal_Bool IsViewLocked() const { return bViewLocked; }
+ void LockView( sal_Bool b ) { bViewLocked = b; }
+
+ inline void LockPaint();
+ void ImplLockPaint();
+ inline void UnlockPaint( sal_Bool bVirDev = sal_False );
+ void ImplUnlockPaint( sal_Bool bVirDev );
+ sal_Bool IsPaintLocked() const { return nLockPaint != 0; }
+
+ // Abfragen/Erzeugen DrawView + PageView
+ sal_Bool HasDrawView() const;
+ void MakeDrawView();
+
+ //DrawView darf u.U. am UI benutzt werden.
+ SdrView *GetDrawView();
+ const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); }
+
+ //sorge dafuer, das auf jedenfall die MarkListe aktuell ist (Bug 57153)
+ SdrView *GetDrawViewWithValidMarkList();
+
+ // erfrage den Attribut Pool
+ inline const SfxItemPool& GetAttrPool() const;
+ SfxItemPool& GetAttrPool();
+
+ sal_Bool IsPreView() const { return bPreView; }
+
+ sal_Bool IsFrameView() const { return bFrameView; }
+ void SetFrameView( const Size& rBrowseBorder )
+ { bFrameView = sal_True; aBrowseBorder = rBrowseBorder; }
+
+ //Nimmt die notwendigen Invalidierungen vor,
+ //wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
+ //oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
+ //aendern (bBrowseChgd == sal_False)
+ void CheckBrowseView( BOOL bBrowseChgd );
+
+ const Size& GetBrowseBorder() const;
+ sal_Int32 GetBrowseWidth() const;
+ void SetBrowseBorder( const Size& rNew );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ // OD 15.01.2003 #103492# - change method signature due to new page preview
+ // functionality.
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ CreateAccessiblePreview();
+
+ void ShowPreViewSelection( sal_uInt16 nSelPage );
+ void InvalidateAccessibleFocus();
+
+ //apply Accessiblity options
+ void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
+
+ /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
+
+ OD 2005-12-01 #i27138#
+
+ @author OD
+
+ @param _pFromTxtFrm
+ input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
+ has to be invalidated.
+ If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
+
+ @param _pToTxtFrm
+ input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO
+ has to be invalidated.
+ If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
+ */
+ void InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
+ const SwTxtFrm* _pToTxtFrm );
+
+ /** invalidate text selection for paragraphs
+
+ OD 2005-12-12 #i27301#
+
+ @author OD
+ */
+ void InvalidateAccessibleParaTextSelection();
+
+ /** invalidate attributes for paragraphs
+
+ OD 2009-01-06 #i88069#
+
+ @author OD
+
+ @param rTxtFrm
+ input parameter - paragraph frame, whose attributes have changed
+ */
+ void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
+
+ ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
+ long nFlags = 0 );
+ ViewShell( SwDoc& rDoc, Window *pWin,
+ const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
+ long nFlags = 0 );
+ virtual ~ViewShell();
+
+ // --> FME 2004-06-15 #i12836# enhanced pdf export
+ sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
+ // <--
+
+ inline bool IsInConstructor() const { return mbInConstructor; }
+
+ // --> PB 2007-05-30 #146850#
+ static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
+ static void DeleteReplacementBitmaps();
+ // <--
+
+ const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
+ SwPostItMgr* GetPostItMgr();
+};
+
+//---- class CurrShell verwaltet den globalen ShellPointer -------------------
+
+class CurrShell
+{
+public:
+ ViewShell *pPrev;
+ SwRootFrm *pRoot;
+
+ CurrShell( ViewShell *pNew );
+ ~CurrShell();
+};
+
+inline void ViewShell::ResetInvalidRect()
+{
+ aInvalidRect.Clear();
+}
+
+inline void ViewShell::StartAction()
+{
+ if ( !nStartAction++ )
+ ImplStartAction();
+}
+inline void ViewShell::EndAction( const sal_Bool bIdleEnd )
+{
+ if( 0 == (nStartAction - 1) )
+ ImplEndAction( bIdleEnd );
+ --nStartAction;
+}
+
+inline void ViewShell::LockPaint()
+{
+ if ( !nLockPaint++ )
+ ImplLockPaint();
+}
+inline void ViewShell::UnlockPaint( sal_Bool bVirDev )
+{
+ if ( 0 == --nLockPaint )
+ ImplUnlockPaint( bVirDev );
+}
+inline const SfxItemPool& ViewShell::GetAttrPool() const
+{
+ return ((ViewShell*)this)->GetAttrPool();
+}
+
+
+
+#endif //_VIEWSH_HXX
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
new file mode 100644
index 000000000000..a240e166d197
--- /dev/null
+++ b/sw/inc/viscrs.hxx
@@ -0,0 +1,228 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: viscrs.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _VISCRS_HXX
+#define _VISCRS_HXX
+
+#include <vcl/cursor.hxx>
+#include "swcrsr.hxx"
+#include "swrect.hxx"
+#include "swregion.hxx"
+
+class SwCrsrShell;
+class SwShellCrsr;
+
+// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------
+
+class SwVisCrsr
+#ifdef SW_CRSR_TIMER
+ : private Timer
+#endif
+{
+ friend void _InitCore();
+ friend void _FinitCore();
+
+ BOOL bIsVisible : 1;
+ BOOL bIsDragCrsr : 1;
+
+#ifdef SW_CRSR_TIMER
+ BOOL bTimerOn : 1;
+#endif
+
+ Cursor aTxtCrsr;
+ const SwCrsrShell* pCrsrShell;
+
+#ifdef SW_CRSR_TIMER
+ virtual void Timeout();
+#endif
+ void _SetPosAndShow();
+
+public:
+ SwVisCrsr( const SwCrsrShell * pCShell );
+ ~SwVisCrsr();
+
+ void Show();
+ void Hide();
+
+ BOOL IsVisible() const { return bIsVisible; }
+ void SetDragCrsr( BOOL bFlag = TRUE ) { bIsDragCrsr = bFlag; }
+
+#ifdef SW_CRSR_TIMER
+ BOOL ChgTimerFlag( BOOL bTimerOn = TRUE );
+#endif
+};
+
+
+// ------ Ab hier Klassen / Methoden fuer die Selectionen -------
+
+// #i75172# predefines
+namespace sdr { namespace overlay { class OverlayObject; }}
+
+class SwSelPaintRects : public SwRects
+{
+ friend void _InitCore();
+ friend void _FinitCore();
+
+ static long nPixPtX, nPixPtY;
+ static MapMode *pMapMode;
+
+ // die Shell
+ const SwCrsrShell* pCShell;
+
+ void Paint( const SwRect& rRect );
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void FillRects() = 0;
+
+ // #i75172#
+ sdr::overlay::OverlayObject* mpCursorOverlay;
+
+ // #i75172# access to mpCursorOverlay for swapContent
+ sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
+ void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
+
+public:
+ SwSelPaintRects( const SwCrsrShell& rCSh );
+ virtual ~SwSelPaintRects();
+
+ // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
+ // make a complete swap access to mpCursorOverlay is needed there
+ void swapContent(SwSelPaintRects& rSwap);
+
+ void Show();
+ void Hide();
+ void Invalidate( const SwRect& rRect );
+
+ const SwCrsrShell* GetShell() const { return pCShell; }
+ // check current MapMode of the shell and set possibly the static members.
+ // Optional set the parameters pX, pY
+ static void Get1PixelInLogic( const ViewShell& rSh,
+ long* pX = 0, long* pY = 0 );
+};
+
+
+class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
+{
+ // Dokument-Positionen der Start/End-Charakter einer SSelection
+ Point aMkPt, aPtPt;
+ const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt
+
+ virtual void FillRects(); // fuer Table- und normalen Crsr
+
+ using SwCursor::UpDown;
+
+public:
+ SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos );
+ SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos,
+ const Point& rPtPos, SwPaM* pRing = 0 );
+ SwShellCrsr( SwShellCrsr& );
+ virtual ~SwShellCrsr();
+
+ void Show(); // Update und zeige alle Selektionen an
+ void Hide(); // verstecke alle Selektionen
+ void Invalidate( const SwRect& rRect );
+
+ const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
+ Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
+ const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
+ Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
+ const Point& GetSttPos() const { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); }
+ Point& GetSttPos() { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); }
+ const Point& GetEndPos() const { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); }
+ Point& GetEndPos() { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); }
+
+ virtual void SetMark();
+
+ virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
+ virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+
+ BOOL UpDown( BOOL bUp, USHORT nCnt = 1 );
+
+ // TRUE: an die Position kann der Cursor gesetzt werden
+ virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+
+#ifndef PRODUCT
+// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+// am sichtbaren Cursor
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+#endif
+
+ virtual bool IsReadOnlyAvailable() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr )
+};
+
+
+
+class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor
+{
+ // die Selection hat die gleiche Reihenfolge wie die
+ // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
+ // etwas geloescht, dann muss es auch im anderen erfolgen!!
+
+
+public:
+ SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos );
+ SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
+ const SwPosition &rMkPos, const Point& rMkPt,
+ const SwPosition &rPtPos, const Point& rPtPt );
+ virtual ~SwShellTableCrsr();
+
+ virtual void FillRects(); // fuer Table- und normalen Crsr
+
+ // Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
+ BOOL IsInside( const Point& rPt ) const;
+
+ virtual void SetMark();
+ virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
+ virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+
+ // TRUE: an die Position kann der Cursor gesetzt werden
+ virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+
+#ifndef PRODUCT
+// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+// am sichtbaren Cursor
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+#endif
+};
+
+
+
+#endif // _VISCRS_HXX
diff --git a/sw/inc/warnpassword.hxx b/sw/inc/warnpassword.hxx
new file mode 100644
index 000000000000..fa6adc89b968
--- /dev/null
+++ b/sw/inc/warnpassword.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: warnpassword.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 SW_WARNPASSWORD_HXX
+#define SW_WARNPASSWORD_HXX
+
+
+
+class SfxMedium;
+/** Static API helper functions. */
+class SwWarnPassword
+{
+public:
+ /** Opens a query warning dialog.
+ @descr Pop up Query on export with a choice of yes/no if a
+ an encrypted password is imported.
+ @return true if yes and false if no. default to true.
+ */
+ static bool WarningOnPassword( SfxMedium& rMedium );
+};
+
+
+#endif
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
new file mode 100644
index 000000000000..caf192545a82
--- /dev/null
+++ b/sw/inc/wdocsh.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wdocsh.hxx,v $
+ * $Revision: 1.12.146.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _SWWDOCSH_HXX
+#define _SWWDOCSH_HXX
+#include "swdllapi.h"
+#include "docsh.hxx"
+#include <swdll.hxx>
+
+class SW_DLLPUBLIC SwWebDocShell: public SwDocShell
+{
+ USHORT nSourcePara; // aktive Zeile in der SourceView
+
+public:
+
+ using SotObject::GetInterface;
+
+ // aber selbst implementieren
+ SFX_DECL_INTERFACE(SW_WEBDOCSHELL)
+ SFX_DECL_OBJECTFACTORY();
+ TYPEINFO();
+
+ SwWebDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ ~SwWebDocShell();
+
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pClipFormat,
+ String * pAppName,
+ String * pLongUserName,
+ String * pUserName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+ USHORT GetSourcePara()const
+ {return nSourcePara;}
+ void SetSourcePara(USHORT nSet) {nSourcePara = nSet;}
+};
+
+#endif
+
+
diff --git a/sw/prj/build.lst b/sw/prj/build.lst
new file mode 100644
index 000000000000..d8cac64ff9e8
--- /dev/null
+++ b/sw/prj/build.lst
@@ -0,0 +1,75 @@
+sw sw : l10n connectivity OOo:writerperfect svx stoc uui writerfilter NULL
+sw sw usr1 - all sw_mkout NULL
+sw sw\inc nmake - all sw_inc NULL
+sw sw\uiconfig\layout nmake - all sw_layout NULL
+sw sw\prj get - all sw_prj NULL
+sw sw\source\ui\inc nmake - all sw_uinc NULL
+sw sw\source\core\inc get - all sw_cinc NULL
+sw sw\source\filter\inc get - all sw_finc NULL
+sw sw\res get - all sw_res NULL
+sw sw\win\res get - all sw_wres NULL
+sw sw\win\imglst get - all sw_wimg NULL
+sw sw\sdi nmake - all sw_sdi NULL
+sw sw\source\core\bastyp nmake - all sw_bast sw_inc NULL
+sw sw\source\ui\app nmake - all sw_app sw_sdi sw_uinc sw_inc NULL
+sw sw\source\ui\cctrl nmake - all sw_cctrl sw_inc NULL
+sw sw\source\ui\chrdlg nmake - all sw_chrdl sw_inc NULL
+sw sw\source\ui\config nmake - all sw_conf sw_inc NULL
+sw sw\source\ui\dbui nmake - all sw_dbui sw_inc NULL
+sw sw\source\ui\dialog nmake - all sw_dlg sw_inc NULL
+sw sw\source\ui\dochdl nmake - all sw_dchdl sw_inc NULL
+sw sw\source\ui\docvw nmake - all sw_dcvw sw_inc NULL
+sw sw\source\ui\envelp nmake - all sw_envlp sw_inc NULL
+sw sw\source\ui\fldui nmake - all sw_fldui sw_inc NULL
+sw sw\source\ui\fmtui nmake - all sw_fmtui sw_inc NULL
+sw sw\source\ui\frmdlg nmake - all sw_frmdl sw_inc NULL
+sw sw\source\ui\globdoc nmake - all sw_globd sw_uinc sw_inc NULL
+sw sw\source\ui\index nmake - all sw_index sw_inc NULL
+sw sw\source\ui\lingu nmake - all sw_ling sw_inc NULL
+sw sw\source\ui\misc nmake - all sw_misc sw_sdi sw_inc NULL
+sw sw\source\ui\ribbar nmake - all sw_rbbar sw_inc NULL
+sw sw\source\ui\shells nmake - all sw_shell sw_uinc sw_sdi sw_inc NULL
+sw sw\source\ui\smartmenu nmake - all sw_smartmenu sw_inc NULL
+sw sw\source\ui\table nmake - all sw_table sw_inc NULL
+sw sw\source\ui\uiview nmake - all sw_uivw sw_sdi sw_inc NULL
+sw sw\source\ui\uno nmake - all sw_uiuno sw_sdi sw_inc NULL
+sw sw\source\ui\utlui nmake - all sw_utlui sw_inc NULL
+sw sw\source\ui\web nmake - all sw_web sw_uinc sw_sdi sw_inc NULL
+sw sw\source\ui\wrtsh nmake - all sw_wrtsh sw_inc NULL
+sw sw\source\core\attr nmake - all sw_attr sw_inc NULL
+sw sw\source\core\crsr nmake - all sw_crsr sw_inc NULL
+sw sw\source\core\doc nmake - all sw_doc sw_inc NULL
+sw sw\source\core\docnode nmake - all sw_dcnd sw_inc NULL
+sw sw\source\core\draw nmake - all sw_draw sw_inc NULL
+sw sw\source\core\edit nmake - all sw_edit sw_inc NULL
+sw sw\source\core\except nmake - all sw_excpt sw_inc NULL
+sw sw\source\core\fields nmake - all sw_fld sw_inc NULL
+sw sw\source\core\frmedt nmake - all sw_frmed sw_inc NULL
+sw sw\source\core\graphic nmake - all sw_grph sw_inc NULL
+sw sw\source\core\layout nmake - all sw_layo sw_inc NULL
+sw sw\source\core\ole nmake - all sw_ole sw_inc NULL
+sw sw\source\core\para nmake - all sw_para sw_inc NULL
+sw sw\source\core\sw3io nmake - all sw_sw3io sw_inc NULL
+sw sw\source\core\swg nmake - all sw_swg sw_inc NULL
+sw sw\source\core\text nmake - all sw_text sw_inc NULL
+sw sw\source\core\tox nmake - all sw_tox sw_inc NULL
+sw sw\source\core\txtnode nmake - all sw_txtnd sw_inc NULL
+sw sw\source\core\undo nmake - all sw_undo sw_inc NULL
+sw sw\source\core\view nmake - all sw_view sw_inc NULL
+sw sw\source\core\unocore nmake - all sw_uco sw_inc NULL
+sw sw\source\core\objectpositioning nmake - all sw_objpos sw_inc NULL
+sw sw\source\core\access nmake - all sw_acc sw_inc NULL
+sw sw\source\core\SwNumberTree nmake - all sw_NumberTree sw_inc NULL
+sw sw\source\core\table nmake - all sw_tablecore sw_inc NULL
+sw sw\source\filter\ascii nmake - all sw_ascii sw_inc NULL
+sw sw\source\filter\basflt nmake - all sw_bsflt sw_inc NULL
+sw sw\source\filter\html nmake - all sw_html sw_inc NULL
+sw sw\source\filter\rtf nmake - all sw_rtf sw_inc NULL
+sw sw\source\filter\writer nmake - all sw_wrtr sw_inc NULL
+sw sw\source\filter\ww1 nmake - all sw_ww1 sw_inc NULL
+sw sw\source\filter\ww8 nmake - all sw_ww8 sw_inc NULL
+sw sw\source\filter\xml nmake - all sw_xml sw_inc NULL
+sw sw\source\ui nmake - all sw_ui sw_app sw_cctrl sw_chrdl sw_conf sw_dbui sw_dchdl sw_dcvw sw_dlg sw_envlp sw_fldui sw_fmtui sw_frmdl sw_globd sw_index sw_ling sw_misc sw_rbbar sw_shell sw_table sw_uiuno sw_uivw sw_utlui sw_web sw_wrtsh sw_smartmenu NULL
+sw sw\source\core nmake - all sw_core sw_attr sw_bast sw_crsr sw_dcnd sw_doc sw_draw sw_edit sw_excpt sw_fld sw_frmed sw_grph sw_layo sw_ole sw_para sw_sw3io sw_swg sw_text sw_tox sw_txtnd sw_uco sw_undo sw_view sw_acc sw_objpos sw_NumberTree sw_tablecore NULL
+sw sw\source\filter nmake - all sw_flt sw_ascii sw_bsflt sw_html sw_rtf sw_wrtr sw_ww1 sw_ww8 sw_xml NULL
+sw sw\util nmake - all sw_util sw_core sw_flt sw_sdi sw_ui NULL
diff --git a/sw/prj/d.lst b/sw/prj/d.lst
new file mode 100644
index 000000000000..09c417cd6f17
--- /dev/null
+++ b/sw/prj/d.lst
@@ -0,0 +1,112 @@
+mkdir: %COMMON_DEST%\bin%_EXT%\hid
+mkdir: %_DEST%\inc%_EXT%\sw
+mkdir: %_DEST%\xml%_EXT%\uiconfig
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\menubar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\menubar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\menubar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\menubar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\toolbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\toolbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\toolbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\toolbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\toolbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\toolbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\en-US
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\de
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\es
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\fr
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\en-US
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\de
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\es
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\fr
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\en-US
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\de
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\es
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\fr
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\en-US
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\de
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\es
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\fr
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\en-US
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\de
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\es
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\fr
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\en-US
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\de
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\es
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\fr
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\statusbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\statusbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\statusbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\statusbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\statusbar
+mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar
+
+..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
+..\xml\*.xml %_DEST%\xml%_EXT%\*.xml
+..\%__SRC%\bin\sw?????.dll %_DEST%\bin%_EXT%\sw?????.dll
+..\%__SRC%\bin\swd?????.dll %_DEST%\bin%_EXT%\swd?????.dll
+..\%__SRC%\bin\swui?????.dll %_DEST%\bin%_EXT%\swui?????.dll
+..\%__SRC%\bin\msword?????.dll %_DEST%\bin%_EXT%\msword?????.dll
+..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res
+..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
+
+..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml
+..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml
+..\uiconfig\sweb\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\menubar\*.xml
+..\uiconfig\sglobal\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\menubar\*.xml
+..\uiconfig\swform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\menubar\*.xml
+..\uiconfig\swreport\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\menubar\*.xml
+..\uiconfig\swriter\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\toolbar\*.xml
+..\uiconfig\swxform\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\toolbar\*.xml
+..\uiconfig\sweb\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\toolbar\*.xml
+..\uiconfig\sglobal\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\toolbar\*.xml
+..\uiconfig\swform\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\toolbar\*.xml
+..\uiconfig\swreport\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\toolbar\*.xml
+..\uiconfig\swriter\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\en-US\*.xml
+..\uiconfig\swriter\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\de\*.xml
+..\uiconfig\swriter\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\es\*.xml
+..\uiconfig\swriter\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\accelerator\fr\*.xml
+..\uiconfig\swxform\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\en-US\*.xml
+..\uiconfig\swxform\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\de\*.xml
+..\uiconfig\swxform\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\es\*.xml
+..\uiconfig\swxform\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\accelerator\fr\*.xml
+..\uiconfig\sweb\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\en-US\*.xml
+..\uiconfig\sweb\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\de\*.xml
+..\uiconfig\sweb\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\es\*.xml
+..\uiconfig\sweb\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\accelerator\fr\*.xml
+..\uiconfig\sglobal\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\en-US\*.xml
+..\uiconfig\sglobal\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\de\*.xml
+..\uiconfig\sglobal\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\es\*.xml
+..\uiconfig\sglobal\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\accelerator\fr\*.xml
+..\uiconfig\swform\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\en-US\*.xml
+..\uiconfig\swform\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\de\*.xml
+..\uiconfig\swform\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\es\*.xml
+..\uiconfig\swform\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\accelerator\fr\*.xml
+..\uiconfig\swreport\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\en-US\*.xml
+..\uiconfig\swreport\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\de\*.xml
+..\uiconfig\swreport\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\es\*.xml
+..\uiconfig\swreport\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\accelerator\fr\*.xml
+..\uiconfig\swriter\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\statusbar\*.xml
+..\uiconfig\swxform\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\statusbar\*.xml
+..\uiconfig\sweb\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\statusbar\*.xml
+..\uiconfig\sglobal\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\statusbar\*.xml
+..\uiconfig\swform\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\statusbar\*.xml
+..\uiconfig\swreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar\*.xml
+
+..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java
new file mode 100644
index 000000000000..b5a763041645
--- /dev/null
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleRelationSet.java,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.accessibility;
+
+import com.sun.star.accessibility.AccessibleRelation;
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleText;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleRelationSet;
+import com.sun.star.awt.XWindow;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.IndexOutOfBoundsException;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.ControlCharacter;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextCursor;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+import complexlib.ComplexTestCase;
+import java.io.PrintWriter;
+import lib.StatusException;
+import util.AccessibilityTools;
+import util.WriterTools;
+import util.utils;
+
+public class AccessibleRelationSet extends ComplexTestCase {
+
+ private static XAccessible para1 = null;
+ private static XAccessible para2 = null;
+ private static XAccessible para3 = null;
+ private static XTextDocument xTextDoc = null;
+ private final static String[] types = {"INVALID","CONTENT_FLOWS_FROM","CONTENT_FLOWS_TO","CONTROLLED_BY","CONTROLLER_FOR","LABEL_FOR","LABELED_BY","MEMBER_OF","SUB_WINDOW_OF"};
+
+ public String[] getTestMethodNames() {
+ return new String[]{"contents_flows_to","contents_flows_from"};
+ }
+
+ public void contents_flows_to() {
+ XAccessibleRelationSet set = getAccessibleRelation(para1);
+
+ boolean res = true;
+ short firstrelation=-1;
+ XAccessibleText atarget=null;
+ if (set != null) {
+ log.println("Count of relations "+set.getRelationCount());
+ assure("didn't gain correct count of relations",
+ set.getRelationCount() == 1);
+ try {
+ firstrelation = set.getRelation(0).RelationType;
+ Object oTmp = set.getRelation(0).TargetSet[0];
+ atarget = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
+ } catch (IndexOutOfBoundsException e) {
+ log.println("Exception when getting relations "+e);
+ res = false;
+ }
+ }
+
+ log.println("Expected for paragraph 0 "+types[2]);
+ log.println("gained for paragraph 0 "+types[firstrelation]);
+ res = types[2].equals(types[firstrelation]);
+ assure("didn't gain correct relation type",res);
+
+ log.println("Text of target paragraph "+atarget.getText());
+ XAccessibleText paraTxt2 =
+ (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para2);
+ assure("didn't gain correct target paragraph",
+ atarget.getText().equals(paraTxt2.getText()) );
+ }
+
+ public void contents_flows_from() {
+ XAccessibleRelationSet set = getAccessibleRelation(para2);
+
+ boolean res = true;
+ short[] relationtypes = new short[2];
+ XAccessibleText[] atargets = new XAccessibleText[2];
+ if (set != null) {
+ log.println("Count of relations "+set.getRelationCount());
+ assure("didn't gain correct count of relations",
+ set.getRelationCount() == 2);
+ try {
+ short tmprelation = set.getRelation(0).RelationType;
+ if ( tmprelation == 1 )
+ {
+ Object oTmp = set.getRelation(0).TargetSet[0];
+ atargets[0] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
+ relationtypes[0] = tmprelation;
+ }
+ else if ( tmprelation == 2 )
+ {
+ Object oTmp = set.getRelation(0).TargetSet[0];
+ atargets[1] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
+ relationtypes[1] = tmprelation;
+ }
+ else
+ {
+ assure("didn't gain correct relation type", false);
+ }
+ tmprelation = set.getRelation(1).RelationType;
+ if ( tmprelation == 1 )
+ {
+ Object oTmp = set.getRelation(1).TargetSet[0];
+ atargets[0] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
+ relationtypes[0] = tmprelation;
+ }
+ else if ( tmprelation == 2 )
+ {
+ Object oTmp = set.getRelation(1).TargetSet[0];
+ atargets[1] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
+ relationtypes[1] = tmprelation;
+ }
+ else
+ {
+ assure("didn't gain correct relation type", false);
+ }
+ } catch (IndexOutOfBoundsException e) {
+ log.println("Exception when getting relations "+e);
+ res = false;
+ }
+ }
+
+ log.println("### Checking "+types[1]+" for paragraph 1");
+ log.println("Expected for paragraph 1 "+types[1]);
+ log.println("gained for paragraph 1 "+types[relationtypes[0]]);
+ res = types[1].equals(types[relationtypes[0]]);
+ assure("didn't gain correct relation type",res);
+
+ log.println("Text of target paragraph "+atargets[0].getText());
+ XAccessibleText paraTxt1 =
+ (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para1);
+ assure("didn't gain correct target paragraph",
+ atargets[0].getText().equals(paraTxt1.getText()) );
+
+ log.println("### Checking "+types[2]+" for paragraph 1");
+ log.println("Expected for paragraph 1 "+types[2]);
+ log.println("gained for paragraph 1 "+types[relationtypes[1]]);
+ res = types[2].equals(types[relationtypes[1]]);
+ assure("didn't gain correct relation type",res);
+
+ log.println("Text of target paragraph "+atargets[1].getText());
+ XAccessibleText paraTxt3 =
+ (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para3);
+ assure("didn't gain correct target paragraph",
+ atargets[1].getText().equals(paraTxt3.getText()) );
+ }
+
+ private boolean getResult(XAccessible aPara, short index, int nr) {
+ XAccessibleRelationSet set = getAccessibleRelation(aPara);
+
+ boolean res = true;
+ short firstrelation=-1;
+ if (set != null) {
+ log.println("Count of relations "+set.getRelationCount());
+ try {
+ firstrelation = set.getRelation(0).RelationType;
+ } catch (IndexOutOfBoundsException e) {
+ log.println("Exception when getting relations "+e);
+ res = false;
+ }
+ }
+
+
+ log.println("Expected for paragraph "+nr+" "+types[index]);
+ log.println("gained for paragraph "+nr+" "+types[firstrelation]);
+ res = types[index].equals(types[firstrelation]);
+ return res;
+ }
+
+
+ public void before() {
+ log.println( "creating a text document" );
+ xTextDoc = WriterTools.createTextDoc( (XMultiServiceFactory) param.getMSF());
+
+ XText oText = xTextDoc.getText();
+ XTextCursor oCursor = oText.createTextCursor();
+
+ log.println( "inserting some lines" );
+ try {
+ for (int i=0; i<5; i++){
+ oText.insertString( oCursor,"Paragraph Number: " + i, false);
+ oText.insertControlCharacter(
+ oCursor, ControlCharacter.PARAGRAPH_BREAK, false );
+ }
+ } catch ( com.sun.star.lang.IllegalArgumentException e ){
+ e.printStackTrace((PrintWriter)log);
+ throw new StatusException( "Couldn't insert lines", e );
+ }
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xTextDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
+
+ try {
+ para1 = at.SearchedContext.getAccessibleChild(0);
+ para2 = at.SearchedContext.getAccessibleChild(1);
+ para3 = at.SearchedContext.getAccessibleChild(2);
+ } catch(IndexOutOfBoundsException e) {
+ e.printStackTrace((PrintWriter)log);
+ throw new StatusException( "Couldn't insert lines", e );
+ }
+
+ log.println("ImplementationName (para1)" + utils.getImplName(para1));
+ log.println("ImplementationName (para2)" + utils.getImplName(para2));
+ }
+
+ public void after() {
+ log.println("close text document");
+ util.DesktopTools.closeDoc(xTextDoc);
+ }
+
+ public XAccessibleRelationSet getAccessibleRelation(XAccessible xAcc) {
+ XAccessibleContext oObj = (XAccessibleContext)
+ UnoRuntime.queryInterface(XAccessibleContext.class, xAcc);
+
+ XAccessibleRelationSet set = oObj.getAccessibleRelationSet();
+ return set;
+ }
+
+
+}
diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/qa/complex/accessibility/makefile.mk
new file mode 100644
index 000000000000..696a72d545e3
--- /dev/null
+++ b/sw/qa/complex/accessibility/makefile.mk
@@ -0,0 +1,61 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.5.198.1 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ = ..$/..$/..
+TARGET = AccessibleRelationSet
+PRJNAME = sw
+PACKAGE = complex$/accessibility
+
+# --- Settings -----------------------------------------------------
+.INCLUDE: settings.mk
+
+
+#----- compile .java files -----------------------------------------
+
+JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JAVAFILES = AccessibleRelationSet.java
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+
+#----- make a jar from compiled files ------------------------------
+
+MAXLINELENGTH = 100000
+
+JARCLASSDIRS = $(PACKAGE)
+JARTARGET = $(TARGET).jar
+JARCOMPRESS = TRUE
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
+run:
+ +java -cp $(CLASSPATH) org.openoffice.Runner -TimeOut 0 -tb java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
diff --git a/sw/qa/complex/checkColor/CheckChangeColor.java b/sw/qa/complex/checkColor/CheckChangeColor.java
new file mode 100755
index 000000000000..8a8c563c7eea
--- /dev/null
+++ b/sw/qa/complex/checkColor/CheckChangeColor.java
@@ -0,0 +1,90 @@
+package complex.checkColor;
+
+import com.sun.star.awt.Rectangle;
+import com.sun.star.awt.Size;
+import com.sun.star.awt.WindowDescriptor;
+import com.sun.star.awt.XControlModel;
+import com.sun.star.awt.XToolkit;
+import com.sun.star.awt.XWindow;
+import com.sun.star.awt.XWindowPeer;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.drawing.XControlShape;
+import com.sun.star.drawing.XShape;
+import com.sun.star.frame.XComponentLoader;
+import com.sun.star.frame.XController;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.style.XStyleFamiliesSupplier;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+import com.sun.star.view.XControlAccess;
+import complexlib.ComplexTestCase;
+import java.io.PrintWriter;
+import util.FormTools;
+import util.SOfficeFactory;
+import util.WriterTools;
+
+/**
+ * Created because of complaint on dev@openoffice.org: check the changing of
+ * BackColor and IsLandscape properties on the PageStyle service.
+ */
+public class CheckChangeColor extends ComplexTestCase {
+
+ private XToolkit xToolkit = null;
+ private XWindowPeer xWinPeer = null;
+
+ /**
+ * Get all test method names.
+ * @return The test methods.
+ */
+ public String[] getTestMethodNames() {
+ return new String[] {"checkChangeColor"};
+ }
+
+
+ /**
+ * Check BackColor and IsLandscape properties, wait for an exception: test
+ * is ok if no exception happened.
+ */
+ public void checkChangeColor() {
+ try {
+ XMultiServiceFactory m_xMSF_ = (XMultiServiceFactory)param.getMSF();
+ XComponentLoader aLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,m_xMSF_.createInstance( "com.sun.star.frame.Desktop" ));
+ XComponent xDocument = (XComponent)UnoRuntime.queryInterface(XComponent.class, aLoader.loadComponentFromURL( "private:factory/swriter", "_blank", 0, new PropertyValue[ 0 ] ) );
+ // xDocument.addEventListener( this );
+
+ XTextDocument oDoc = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xDocument);
+ XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc );
+
+ // XInterface xInterface = (XInterface) oDocMSF.createInstance( "com.sun.star.style.PageStyle" );
+
+ // create a supplier to get the Style family collection
+ XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, oDoc );
+
+ // get the NameAccess interface from the Style family collection
+ XNameAccess xNameAccess = xSupplier.getStyleFamilies();
+
+ XNameContainer xPageStyleCollection = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xNameAccess.getByName( "PageStyles" ));
+
+ // create a PropertySet to set the properties for the new Pagestyle
+ XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageStyleCollection.getByName("Standard") );
+
+ log.println("BackColor @ "+xPropertySet.getPropertyValue("BackColor").toString());
+ log.println("IsLandscape @ "+xPropertySet.getPropertyValue("IsLandscape").toString());
+ log.println("Size @ H:"+((Size)xPropertySet.getPropertyValue("Size")).Height+" W:"+((Size)xPropertySet.getPropertyValue("Size")).Width);
+
+ log.println("Set Landscape");
+ xPropertySet.setPropertyValue("IsLandscape",new Boolean(true) );
+ log.println("Set BackColor");
+ xPropertySet.setPropertyValue("BackColor",new Integer((int)255000000) );
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ failed("Exception.");
+ }
+ }
+}
diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk
new file mode 100755
index 000000000000..0541b44e1d44
--- /dev/null
+++ b/sw/qa/complex/checkColor/makefile.mk
@@ -0,0 +1,79 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.4.198.1 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ = ..$/..$/..
+TARGET = CheckChangeColor
+PRJNAME = $(TARGET)
+PACKAGE = complex$/checkColor
+
+# --- Settings -----------------------------------------------------
+.INCLUDE: settings.mk
+
+
+#----- compile .java files -----------------------------------------
+
+JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
+JAVAFILES = CheckChangeColor.java
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+
+#----- make a jar from compiled files ------------------------------
+
+MAXLINELENGTH = 100000
+
+JARCLASSDIRS = $(PACKAGE)
+JARTARGET = $(TARGET).jar
+JARCOMPRESS = TRUE
+
+# --- Parameters for the test --------------------------------------
+
+# test base is java complex
+CT_TESTBASE = -TestBase java_complex
+
+# test looks something like the.full.package.TestName
+CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+
+# start the runner application
+CT_APP = org.openoffice.Runner
+
+# --- Targets ------------------------------------------------------
+
+.IF "$(depend)" == ""
+ALL : ALLTAR
+.ELSE
+ALL: ALLDEP
+.ENDIF
+
+.INCLUDE : target.mk
+
+RUN: run
+
+run:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_NOOFFICE) $(CT_TEST)
diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
new file mode 100755
index 000000000000..bd7a9b35efdc
--- /dev/null
+++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CheckIndeterminateState.java,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.indeterminateState;
+
+import complexlib.ComplexTestCase;
+import helper.OfficeProvider;
+import util.SOfficeFactory;
+import util.AccessibilityTools;
+import com.sun.star.awt.XWindow;
+import com.sun.star.awt.XExtendedToolkit;
+import com.sun.star.frame.XDispatch;
+import com.sun.star.frame.XController;
+import com.sun.star.frame.XDesktop;
+import com.sun.star.frame.XModel;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleValue;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.accessibility.AccessibleStateType;
+import com.sun.star.accessibility.XAccessibleAction;
+import com.sun.star.awt.XTopWindow;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.frame.XDispatchProvider;
+import com.sun.star.util.URL;
+import com.sun.star.util.XURLTransformer;
+
+import java.io.PrintWriter;
+
+/**
+ */
+public class CheckIndeterminateState extends ComplexTestCase {
+
+ /**
+ * Return all test methods.
+ * @return The test methods.
+ */
+ public String[] getTestMethodNames() {
+ return new String[]{"checkToolBoxItem"};
+ }
+
+ /*
+ * Test the indeterminate state of AccessibleToolBarItem
+ * The used tools are in project qadevOOo/runner
+ */
+ public void checkToolBoxItem() {
+ log.println( "creating a test environment" );
+ XTextDocument xTextDoc = null;
+ // get a soffice factory object
+ SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory) param.getMSF());
+
+ try {
+ log.println( "creating a text document" );
+ xTextDoc = SOF.createTextDoc(null);
+ } catch ( com.sun.star.uno.Exception e ) {
+ // Some exception occures.FAILED
+ e.printStackTrace( (java.io.PrintWriter)log );
+ failed (e.getMessage());
+ }
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xTextDoc);
+
+ XController xController = aModel.getCurrentController();
+
+ XInterface oObj = null;
+
+ System.out.println("Press any key after making 'Bold' indeterminate.");
+ try{
+ byte[]b = new byte[16];
+ System.in.read(b);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ AccessibilityTools at = new AccessibilityTools();
+ XWindow xWindow = at.getCurrentContainerWindow((XMultiServiceFactory)param.getMSF(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ // uncomment to print the whole accessible tree.
+// at.printAccessibleTree((java.io.PrintWriter)log,xRoot);
+
+ oObj = at.getAccessibleObjectForRole(xRoot,
+ AccessibleRole.PUSH_BUTTON, "Bold");
+ System.out.println("Found a PUSH_BUTTON: " + (oObj != null));
+
+ oObj = at.getAccessibleObjectForRole(xRoot,
+ AccessibleRole.TOGGLE_BUTTON, "Bold");
+ System.out.println("Found a TOGGLE_BUTTON: " + (oObj != null));
+
+ log.println("ImplementationName: "+ util.utils.getImplName(oObj));
+
+ XAccessibleContext oContext = (XAccessibleContext)
+ UnoRuntime.queryInterface(XAccessibleContext.class, oObj);
+
+ XAccessibleStateSet oSet = oContext.getAccessibleStateSet();
+
+ short[]states = oSet.getStates();
+ for(int i=0; i<states.length; i++)
+ System.out.println("State "+i+": "+states[i]);
+
+ assure("The 'INDETERMINATE' state is not set.",oSet.contains(AccessibleStateType.INDETERMINATE));
+ }
+
+}
+
+
diff --git a/sw/qa/complex/indeterminateState/makefile.mk b/sw/qa/complex/indeterminateState/makefile.mk
new file mode 100755
index 000000000000..5261e70667be
--- /dev/null
+++ b/sw/qa/complex/indeterminateState/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.4.198.1 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ = ..$/..$/..
+TARGET = CheckIndexedPropertyValue
+PRJNAME = $(TARGET)
+PACKAGE = complex$/indeterminateState
+
+# --- Settings -----------------------------------------------------
+.INCLUDE: settings.mk
+
+
+#----- compile .java files -----------------------------------------
+
+JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JAVAFILES = CheckIndeterminateState.java
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+
+#----- make a jar from compiled files ------------------------------
+
+MAXLINELENGTH = 100000
+
+JARCLASSDIRS = $(PACKAGE)
+JARTARGET = $(TARGET).jar
+JARCOMPRESS = TRUE
+
+# --- Parameters for the test --------------------------------------
+
+# start an office if the parameter is set for the makefile
+.IF "$(OFFICE)" == ""
+CT_APPEXECCOMMAND =
+.ELSE
+CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+.ENDIF
+
+# test base is java complex
+CT_TESTBASE = -TestBase java_complex
+
+# test looks something like the.full.package.TestName
+CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+
+# start the runner application
+CT_APP = org.openoffice.Runner
+
+# --- Targets ------------------------------------------------------
+
+.IF "$(depend)" == ""
+ALL: ALLTAR
+.ELSE
+ALL: ALLDEP
+.ENDIF
+
+.INCLUDE : target.mk
+
+RUN:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_TEST)
+
+run: RUN
diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
new file mode 100644
index 000000000000..c8f4a0355428
--- /dev/null
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.container.XNamed;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.frame.XStorable;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XBookmarksSupplier;
+import com.sun.star.text.XSimpleText;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextContent;
+import com.sun.star.text.XTextCursor;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.text.XTextRange;
+import com.sun.star.uno.UnoRuntime;
+import complexlib.ComplexTestCase;
+import java.math.BigInteger;
+
+class BookmarkHashes {
+ public String m_sName;
+ public BigInteger m_nSetupHash;
+ public BigInteger m_nInsertRandomHash;
+ public BigInteger m_nDeleteRandomHash;
+ public BigInteger m_nLinebreakHash;
+ public BigInteger m_nOdfReloadHash;
+ public BigInteger m_nMsWordReloadHash;
+
+ public BookmarkHashes(String sName) {
+ m_sName = sName;
+ }
+
+ public String checkExpectationString(BookmarkHashes aExpectation) {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Comparing " + m_sName + " to expectations from " + aExpectation.m_sName + "\n");
+ buffer.append(compareHashString("after setup", m_nSetupHash, aExpectation.m_nSetupHash));
+ buffer.append(compareHashString("after insert random", m_nInsertRandomHash, aExpectation.m_nInsertRandomHash));
+ buffer.append(compareHashString("after delete random", m_nDeleteRandomHash, aExpectation.m_nDeleteRandomHash));
+ buffer.append(compareHashString("after line breaks", m_nLinebreakHash, aExpectation.m_nLinebreakHash));
+ buffer.append(compareHashString("after ODF roundtrip", m_nOdfReloadHash, aExpectation.m_nOdfReloadHash));
+ buffer.append(compareHashString("after MsWord roundtrip", m_nMsWordReloadHash, aExpectation.m_nMsWordReloadHash));
+ return buffer.toString();
+ };
+
+ public boolean meetsExpectation(BookmarkHashes aExpectation) {
+ return m_nSetupHash.equals(aExpectation.m_nSetupHash)
+ && m_nInsertRandomHash.equals(aExpectation.m_nInsertRandomHash)
+ && m_nDeleteRandomHash.equals(aExpectation.m_nDeleteRandomHash)
+ && m_nLinebreakHash.equals(aExpectation.m_nLinebreakHash)
+ && m_nOdfReloadHash.equals(aExpectation.m_nOdfReloadHash)
+ && m_nMsWordReloadHash.equals(aExpectation.m_nMsWordReloadHash);
+ }
+
+ private String compareHashString(String sCheckName, BigInteger nActual, BigInteger nExpectation) {
+ StringBuffer buffer = new StringBuffer(sCheckName);
+ buffer.append(": ");
+ if(nActual.equals(nExpectation))
+ buffer.append("good (" + nActual.toString(16) + ")");
+ else
+ buffer.append("bad (actual:" + nActual.toString(16) + ", expected: " + nExpectation.toString(16) + ")");
+ buffer.append("\n");
+ return buffer.toString();
+ }
+
+ static public java.math.BigInteger getBookmarksHash(XTextDocument xDoc)
+ throws com.sun.star.uno.Exception, java.security.NoSuchAlgorithmException
+ {
+ StringBuffer buffer = new StringBuffer("");
+ XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier)UnoRuntime.queryInterface(
+ XBookmarksSupplier.class,
+ xDoc);
+ XNameAccess xBookmarks = xBookmarksSupplier.getBookmarks();
+ for(String sBookmarkname : xBookmarks.getElementNames()) {
+ Object xBookmark = xBookmarks.getByName(sBookmarkname);
+ XTextContent xBookmarkAsContent = (XTextContent)UnoRuntime.queryInterface(
+ XTextContent.class,
+ xBookmark);
+ buffer.append(sBookmarkname);
+ buffer.append(":");
+ buffer.append(xBookmarkAsContent.getAnchor().getString());
+ buffer.append(";");
+ }
+ java.security.MessageDigest sha1 = java.security.MessageDigest.getInstance("SHA-1");
+ sha1.reset();
+ sha1.update(buffer.toString().getBytes());
+ return new java.math.BigInteger(sha1.digest());
+ }
+}
+
+public class CheckBookmarks extends ComplexTestCase {
+ private XMultiServiceFactory m_xMsf = null;
+ private XTextDocument m_xDoc = null;
+ private XTextDocument m_xOdfReloadedDoc = null;
+ private XTextDocument m_xMsWordReloadedDoc = null;
+
+ public String[] getTestMethodNames() {
+ return new String[]{"checkBookmarks"};
+ }
+
+ private BookmarkHashes getDEV300m41Expectations() {
+ BookmarkHashes result = new BookmarkHashes("DEV300m41");
+ result.m_nSetupHash = new BigInteger("-4b0706744e8452fe1ae9d5e1c28cf70fb6194795",16);
+ result.m_nInsertRandomHash = new BigInteger("25aa0fad3f4881832dcdfe658ec2efa8a1a02bc5",16);
+ result.m_nDeleteRandomHash = new BigInteger("-3ec87e810b46d734677c351ad893bbbf9ea10f55",16);
+ result.m_nLinebreakHash = new BigInteger("3ae08c284ea0d6e738cb43c0a8105e718a633550",16);
+ result.m_nOdfReloadHash = new BigInteger("3ae08c284ea0d6e738cb43c0a8105e718a633550",16);
+ result.m_nMsWordReloadHash = new BigInteger("3ae08c284ea0d6e738cb43c0a8105e718a633550",16);
+ return result;
+ }
+
+ public void checkBookmarks()
+ throws com.sun.star.uno.Exception,
+ com.sun.star.io.IOException,
+ java.security.NoSuchAlgorithmException
+ {
+ try {
+ m_xMsf = (XMultiServiceFactory)param.getMSF();
+ m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
+ BookmarkHashes actualHashes = new BookmarkHashes("actual");
+ BookmarkHashes expectedHashes = getDEV300m41Expectations();
+ setupBookmarks();
+ actualHashes.m_nSetupHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ insertRandomParts(200177);
+ actualHashes.m_nInsertRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ deleteRandomParts(4711);
+ actualHashes.m_nDeleteRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ insertLinebreaks(007);
+ actualHashes.m_nLinebreakHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ m_xOdfReloadedDoc = reloadFrom("StarOffice XML (Writer)", "odf");
+ actualHashes.m_nOdfReloadHash = BookmarkHashes.getBookmarksHash(m_xOdfReloadedDoc);
+ m_xMsWordReloadedDoc = reloadFrom("MS Word 97", "doc");
+ actualHashes.m_nMsWordReloadHash = BookmarkHashes.getBookmarksHash(m_xMsWordReloadedDoc);
+ log.println(actualHashes.checkExpectationString(expectedHashes));
+ if(!actualHashes.meetsExpectation(expectedHashes))
+ failed("CheckBookmark did not meet expectations (" + expectedHashes.m_sName + ").");
+ } finally {
+ // closing test document
+ if(m_xDoc != null)
+ util.DesktopTools.closeDoc(m_xDoc);
+ if(m_xOdfReloadedDoc!= null)
+ util.DesktopTools.closeDoc(m_xOdfReloadedDoc);
+ if(m_xMsWordReloadedDoc!= null)
+ util.DesktopTools.closeDoc(m_xMsWordReloadedDoc);
+ }
+ }
+
+ private void setupBookmarks()
+ throws com.sun.star.uno.Exception
+ {
+ XText xText = m_xDoc.getText();
+ XSimpleText xSimpleText = (XSimpleText)UnoRuntime.queryInterface(
+ XSimpleText.class,
+ xText);
+ for(int nPara=0; nPara<10; ++nPara) {
+ for(int nBookmark=0; nBookmark<100; ++nBookmark){
+ insertBookmark(
+ xText.createTextCursor(),
+ "P" + nPara + "word" + nBookmark,
+ "P" + nPara + "word" + nBookmark);
+ XTextCursor xWordCrsr = xText.createTextCursor();
+ xWordCrsr.setString(" ");
+ }
+ XTextCursor xParaCrsr = xText.createTextCursor();
+ XTextRange xParaCrsrAsRange = (XTextRange)UnoRuntime.queryInterface(
+ XTextRange.class,
+ xParaCrsr);
+ xText.insertControlCharacter(xParaCrsrAsRange, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false);
+ }
+ }
+
+ private void insertRandomParts(long seed)
+ throws com.sun.star.uno.Exception
+ {
+ java.util.Random rnd = new java.util.Random(seed);
+ XTextCursor xCrsr = m_xDoc.getText().createTextCursor();
+ for(int i=0; i<600; i++) {
+ xCrsr.goRight((short)rnd.nextInt(100), false);
+ xCrsr.setString(Long.toString(rnd.nextLong()));
+ }
+ }
+
+ private void deleteRandomParts(long seed)
+ throws com.sun.star.uno.Exception
+ {
+ java.util.Random rnd = new java.util.Random(seed);
+ XTextCursor xCrsr = m_xDoc.getText().createTextCursor();
+ for(int i=0; i<600; i++) {
+ xCrsr.goRight((short)rnd.nextInt(100), false);
+ xCrsr.goRight((short)rnd.nextInt(20), true);
+ xCrsr.setString("");
+ }
+ }
+
+ private void insertLinebreaks(long seed)
+ throws com.sun.star.uno.Exception
+ {
+ XText xText = m_xDoc.getText();
+ java.util.Random rnd = new java.util.Random(seed);
+ XTextCursor xCrsr = m_xDoc.getText().createTextCursor();
+ for(int i=0; i<30; i++) {
+ xCrsr.goRight((short)rnd.nextInt(300), false);
+ XTextRange xCrsrAsRange = (XTextRange)UnoRuntime.queryInterface(
+ XTextRange.class,
+ xCrsr);
+ xText.insertControlCharacter(xCrsrAsRange, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, false);
+ }
+ }
+
+ private void insertBookmark(XTextCursor crsr, String name, String content)
+ throws com.sun.star.uno.Exception
+ {
+ XMultiServiceFactory xDocFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ m_xDoc);
+
+ Object xBookmark = xDocFactory.createInstance("com.sun.star.text.Bookmark");
+ XTextContent xBookmarkAsTextContent = (XTextContent)UnoRuntime.queryInterface(
+ XTextContent.class,
+ xBookmark);
+ crsr.setString(content);
+ XNamed xBookmarkAsNamed = (XNamed)UnoRuntime.queryInterface(
+ XNamed.class,
+ xBookmark);
+ xBookmarkAsNamed.setName(name);
+ m_xDoc.getText().insertTextContent(crsr, xBookmarkAsTextContent, true);
+ }
+
+ private XTextDocument reloadFrom(String sFilter, String sExtension)
+ throws com.sun.star.io.IOException
+ {
+ String sFileUrl = util.utils.getOfficeTemp(m_xMsf) + "/Bookmarktest." + sExtension;
+ try {
+ PropertyValue[] aStoreProperties = new PropertyValue[2];
+ aStoreProperties[0] = new PropertyValue();
+ aStoreProperties[1] = new PropertyValue();
+ aStoreProperties[0].Name = "Override";
+ aStoreProperties[0].Value = true;
+ aStoreProperties[1].Name = "FilterName";
+ aStoreProperties[1].Value = sFilter;
+ XStorable xStorable = (XStorable)UnoRuntime.queryInterface(
+ XStorable.class,
+ m_xDoc);
+ xStorable.storeToURL(sFileUrl, aStoreProperties);
+ return util.WriterTools.loadTextDoc(m_xMsf, sFileUrl);
+ } finally {
+ if(util.utils.fileExists(m_xMsf, sFileUrl))
+ util.utils.deleteFile(m_xMsf, sFileUrl);
+ }
+ }
+}
diff --git a/sw/qa/complex/writer/CheckCrossReferences.java b/sw/qa/complex/writer/CheckCrossReferences.java
new file mode 100644
index 000000000000..7b469c0a4afc
--- /dev/null
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -0,0 +1,369 @@
+/*
+ * CheckCrossReferences.java
+ *
+ * Created on November 1, 2007, 1:49 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
+
+/**
+ *
+ * @author od138299
+ */
+public class CheckCrossReferences extends ComplexTestCase {
+
+ private com.sun.star.text.XTextDocument xDoc;
+ private com.sun.star.container.XEnumeration xParaEnum;
+ private com.sun.star.container.XEnumeration xPortionEnum;
+ private com.sun.star.util.XRefreshable xFldsRefresh;
+
+ public String[] getTestMethodNames() {
+ return new String[]{"checkCrossReferences"};
+ }
+
+ public com.sun.star.text.XTextField getNextField() {
+
+ com.sun.star.text.XTextField xField = null;
+ if ( xPortionEnum != null ) {
+ try {
+ while ( xPortionEnum.hasMoreElements() ) {
+ com.sun.star.beans.XPropertySet xPortionProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
+ final String sPortionType =
+ xPortionProps.getPropertyValue( "TextPortionType" ).toString();
+ if ( sPortionType.equals( "TextField") ) {
+ xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ if ( xField == null ) {
+ System.out.println("Cannot retrieve next field.");
+ failed("Cannot retrieve next field.");
+ return null;
+ }
+ return xField;
+ }
+ }
+ } catch (com.sun.star.container.NoSuchElementException e) {
+ System.out.println("Cannot retrieve next field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return null;
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ System.out.println("Cannot retrieve next field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return null;
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ System.out.println("Cannot retrieve next field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return null;
+ }
+ }
+
+ while ( xParaEnum.hasMoreElements() ) {
+ try {
+ com.sun.star.container.XEnumerationAccess aPara =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, xParaEnum.nextElement());
+ xPortionEnum = aPara.createEnumeration();
+ while ( xPortionEnum.hasMoreElements() ) {
+ com.sun.star.beans.XPropertySet xPortionProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
+ final String sPortionType =
+ xPortionProps.getPropertyValue( "TextPortionType" ).toString();
+ if ( sPortionType.equals( "TextField") ) {
+ xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ if ( xField == null ) {
+ System.out.println("Cannot retrieve next field.");
+ failed("Cannot retrieve next field.");
+ return null;
+ }
+ return xField;
+ }
+ }
+ } catch (com.sun.star.container.NoSuchElementException e) {
+ System.out.println("Cannot retrieve next field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return null;
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ System.out.println("Cannot retrieve next field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return null;
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ System.out.println("Cannot retrieve next field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return null;
+ }
+ }
+
+ if ( xField == null ) {
+ System.out.println("Cannot retrieve next field.");
+ failed("Cannot retrieve next field.");
+ return null;
+ }
+
+ return xField;
+ }
+
+ public com.sun.star.beans.XPropertySet getFieldProps(
+ com.sun.star.text.XTextField xField ) {
+ com.sun.star.beans.XPropertySet xProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class, xField );
+
+ if ( xProps == null ) {
+ System.out.println("Cannot retrieve field properties.");
+ failed("Cannot retrieve field properties.");
+ return null;
+ }
+
+ return xProps;
+ }
+
+ public void checkField( com.sun.star.text.XTextField xField,
+ com.sun.star.beans.XPropertySet xProps,
+ short nFormat,
+ String aExpectedFldResult ) {
+ // set requested format
+ try {
+ xProps.setPropertyValue("ReferenceFieldPart", new Short(nFormat));
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ System.out.println("Cannot set ReferenceFieldPart property at field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ System.out.println("Cannot set ReferenceFieldPart property at field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ System.out.println("Cannot set ReferenceFieldPart property at field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ System.out.println("Cannot set ReferenceFieldPart property at field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+ // refresh fields in order to get new format applied
+ xFldsRefresh.refresh();
+
+ String aFldResult = xField.getPresentation( false );
+ assure( "set reference field format doesn't result in correct field result",
+ aFldResult.equals(aExpectedFldResult), true );
+ }
+
+ public void checkCrossReferences() throws com.sun.star.uno.Exception {
+ // load test document
+ try {
+ XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
+ xDoc = util.WriterTools.loadTextDoc( xMSF, util.utils.getFullTestURL("CheckCrossReferences.odt"));
+ } catch(com.sun.star.uno.RuntimeException e) {
+ System.out.println("Cannot load test document.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+
+ // setup paragraph enumeration
+ {
+ com.sun.star.container.XEnumerationAccess xParaEnumAccess =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, xDoc.getText());
+ xParaEnum = xParaEnumAccess.createEnumeration();
+ }
+
+ // get field refresher
+ {
+ com.sun.star.text.XTextFieldsSupplier xFieldSupp =
+ (com.sun.star.text.XTextFieldsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextFieldsSupplier.class, xDoc);
+ xFldsRefresh = (com.sun.star.util.XRefreshable)UnoRuntime.queryInterface(
+ com.sun.star.util.XRefreshable.class, xFieldSupp.getTextFields());
+ }
+
+ // check first reference field
+ {
+ // strings for checking
+ final String FldResult1 = "*i*";
+ final String FldResult2 = "+b+*i*";
+ final String FldResult3 = "-1-+b+*i*";
+ final String FldResult4 = "1.";
+ final String FldResult5 = " 1.";
+ final String FldResult6 = "A. 1.";
+
+ // variables for current field
+ com.sun.star.text.XTextField xField = null;
+ com.sun.star.beans.XPropertySet xProps = null;
+
+ log.println( "Checking field reference formats NUMBER, NUMBER_NO_CONTEXT and NUMBER_FULL_CONTEXT for existing fields" );
+ xField = getNextField();
+ xProps = getFieldProps( xField );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult2 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult3 );
+
+ xField = getNextField();
+ xProps = getFieldProps( xField );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult3 );
+
+ xField = getNextField();
+ xProps = getFieldProps( xField );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult3 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult3 );
+
+ xField = getNextField();
+ xProps = getFieldProps( xField );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult5 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult6 );
+
+ xField = getNextField();
+ xProps = getFieldProps( xField );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult6 );
+
+ xField = getNextField();
+ xProps = getFieldProps( xField );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult6 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult6 );
+ }
+
+ // insert a certain cross-reference bookmark and a reference field to this bookmark
+ {
+ log.println("Checking insert of cross-reference bookmark and corresponding reference field");
+ // restart paragraph enumeration
+ com.sun.star.container.XEnumerationAccess xParaEnumAccess =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, xDoc.getText());
+ xParaEnum = xParaEnumAccess.createEnumeration();
+
+ // iterate on the paragraphs to find certain paragraph to insert the bookmark
+ com.sun.star.text.XTextRange xParaTextRange = null;
+ while ( xParaEnum.hasMoreElements() ) {
+ try {
+ xParaTextRange = (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
+ if ( xParaTextRange.getString().equals( "J" ) ) {
+ break;
+ }
+ else {
+ xParaTextRange = null;
+ }
+ } catch (com.sun.star.container.NoSuchElementException e) {
+ System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+ }
+ if ( xParaTextRange == null ) {
+ System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
+ failed("Cannot find paragraph to insert cross-reference bookmark.");
+ return;
+ }
+
+ // insert bookmark
+ XMultiServiceFactory xFac = (XMultiServiceFactory)UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, xDoc);
+ final String cBookmarkName = "__RefNumPara__47114711";
+ com.sun.star.text.XTextContent xBookmark = null;
+ try {
+ xBookmark = (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.Bookmark" ) );
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ System.out.println("Cannot create bookmark.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ } catch (com.sun.star.uno.Exception e) {
+ System.out.println("Cannot create bookmark.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+ if ( xBookmark != null ) {
+ com.sun.star.container.XNamed xName =
+ (com.sun.star.container.XNamed)UnoRuntime.queryInterface(
+ com.sun.star.container.XNamed.class, xBookmark );
+ xName.setName( cBookmarkName );
+ xBookmark.attach(xParaTextRange.getStart());
+ }
+
+ // insert reference field, which references the inserted bookmark
+ com.sun.star.text.XTextContent xNewField = null;
+ try {
+ xNewField = (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.TextField.GetReference" ) );
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ System.out.println("Cannot create new field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ } catch (com.sun.star.uno.Exception e) {
+ System.out.println("Cannot create new field.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+ if ( xNewField != null ) {
+ com.sun.star.beans.XPropertySet xFieldProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class, xNewField );
+ xFieldProps.setPropertyValue( "ReferenceFieldPart", new Short(com.sun.star.text.ReferenceFieldPart.TEXT) );
+ xFieldProps.setPropertyValue( "ReferenceFieldSource", new Short(com.sun.star.text.ReferenceFieldSource.BOOKMARK) );
+ xFieldProps.setPropertyValue( "SourceName", cBookmarkName );
+ com.sun.star.text.XTextRange xFieldTextRange =
+ (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
+ xNewField.attach(xFieldTextRange.getEnd());
+ xFldsRefresh.refresh();
+ }
+
+ // check inserted reference field
+ com.sun.star.text.XTextField xField =
+ (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class, xNewField );
+ assure( "inserted reference field doesn't has correct field result",
+ xField.getPresentation( false ).equals("J"), true );
+
+ xParaTextRange.getStart().setString( "Hallo new bookmark: " );
+ xFldsRefresh.refresh();
+ assure( "inserted reference field doesn't has correct field result. Instead it's: "+xField.getPresentation( false ),
+ xField.getPresentation( false ).equals("Hallo new bookmark: J"), true );
+ }
+
+ // closing test document
+ util.DesktopTools.closeDoc( xDoc );
+ }
+}
diff --git a/sw/qa/complex/writer/CheckFlies.java b/sw/qa/complex/writer/CheckFlies.java
new file mode 100644
index 000000000000..a54b02a3b58b
--- /dev/null
+++ b/sw/qa/complex/writer/CheckFlies.java
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.container.XNamed;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.UnoRuntime;
+import complexlib.ComplexTestCase;
+import java.math.BigInteger;
+import java.util.Collection;
+import java.util.ArrayList;
+
+public class CheckFlies extends ComplexTestCase {
+ private XMultiServiceFactory m_xMsf = null;
+ private XTextDocument m_xDoc = null;
+
+ public String[] getTestMethodNames() {
+ return new String[]{"checkFlies"};
+ }
+
+ public void checkFlies()
+ throws com.sun.star.uno.Exception,
+ com.sun.star.io.IOException
+ {
+ try {
+ m_xMsf = (XMultiServiceFactory)param.getMSF();
+ m_xDoc = util.WriterTools.loadTextDoc(m_xMsf, util.utils.getFullTestURL("CheckFlies.odt"));
+ com.sun.star.text.XTextFramesSupplier xTFS = (com.sun.star.text.XTextFramesSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextFramesSupplier.class,
+ m_xDoc);
+ checkTextFrames(xTFS);
+ com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = (com.sun.star.text.XTextGraphicObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextGraphicObjectsSupplier.class,
+ m_xDoc);
+ checkGraphicFrames(xTGOS);
+ com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = (com.sun.star.text.XTextEmbeddedObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
+ m_xDoc);
+ checkEmbeddedFrames(xTEOS);
+ } finally {
+ // closing test document
+ if(m_xDoc != null)
+ util.DesktopTools.closeDoc(m_xDoc);
+ }
+ }
+
+ private void checkEmbeddedFrames(com.sun.star.text.XTextEmbeddedObjectsSupplier xTGOS)
+ throws com.sun.star.lang.WrappedTargetException
+ {
+ Collection<String> vExpectedEmbeddedFrames = new ArrayList<String>();
+ vExpectedEmbeddedFrames.add("Object1");
+ int nEmbeddedFrames = vExpectedEmbeddedFrames.size();
+ com.sun.star.container.XNameAccess xEmbeddedFrames = xTGOS.getEmbeddedObjects();
+ for(String sFrameName : xEmbeddedFrames.getElementNames())
+ {
+ if(!vExpectedEmbeddedFrames.remove(sFrameName))
+ failed("Unexpected frame name");
+ try
+ {
+ xEmbeddedFrames.getByName(sFrameName);
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {
+ failed("Could not get embedded frame by name.");
+ }
+ if(!xEmbeddedFrames.hasByName(sFrameName))
+ failed("Could not find embedded frame by name.");
+ }
+ if(!vExpectedEmbeddedFrames.isEmpty())
+ failed("Missing expected embedded frames.");
+ try
+ {
+ xEmbeddedFrames.getByName("Nonexisting embedded frame");
+ failed("Got nonexisting embedded frame");
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {}
+ if(xEmbeddedFrames.hasByName("Nonexisting embedded frame"))
+ failed("Has nonexisting embedded frame");
+
+ com.sun.star.container.XIndexAccess xEmbeddedFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XIndexAccess.class,
+ xEmbeddedFrames);
+ if(xEmbeddedFramesIdx.getCount() != nEmbeddedFrames)
+ failed("Unexpected number of embedded frames reported.");
+ for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xEmbeddedFramesIdx.getCount(); nCurrentFrameIdx++)
+ {
+ try
+ {
+ xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx);
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e)
+ {
+ failed("Could not get embedded frame by index.");
+ }
+ }
+ }
+
+ private void checkGraphicFrames(com.sun.star.text.XTextGraphicObjectsSupplier xTGOS)
+ throws com.sun.star.lang.WrappedTargetException
+ {
+ Collection<String> vExpectedGraphicFrames = new ArrayList<String>();
+ vExpectedGraphicFrames.add("graphics1");
+ int nGraphicFrames = vExpectedGraphicFrames.size();
+ com.sun.star.container.XNameAccess xGraphicFrames = xTGOS.getGraphicObjects();
+ for(String sFrameName : xGraphicFrames.getElementNames())
+ {
+ if(!vExpectedGraphicFrames.remove(sFrameName))
+ failed("Unexpected frame name");
+ try
+ {
+ xGraphicFrames.getByName(sFrameName);
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {
+ failed("Could not get graphics frame by name.");
+ }
+ if(!xGraphicFrames.hasByName(sFrameName))
+ failed("Could not find graphics frame by name.");
+ }
+ if(!vExpectedGraphicFrames.isEmpty())
+ failed("Missing expected graphics frames.");
+ try
+ {
+ xGraphicFrames.getByName("Nonexisting graphics frame");
+ failed("Got nonexisting graphics frame");
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {}
+ if(xGraphicFrames.hasByName("Nonexisting graphics frame"))
+ failed("Has nonexisting graphics frame");
+
+ com.sun.star.container.XIndexAccess xGraphicFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XIndexAccess.class,
+ xGraphicFrames);
+ if(xGraphicFramesIdx.getCount() != nGraphicFrames)
+ failed("Unexpected number of graphics frames reported.");
+ for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xGraphicFramesIdx.getCount(); nCurrentFrameIdx++)
+ {
+ try
+ {
+ xGraphicFramesIdx.getByIndex(nCurrentFrameIdx);
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e)
+ {
+ failed("Could not get graphics frame by index.");
+ }
+ }
+ }
+
+ private void checkTextFrames(com.sun.star.text.XTextFramesSupplier xTFS)
+ throws com.sun.star.lang.WrappedTargetException
+ {
+ Collection<String> vExpectedTextFrames = new ArrayList<String>();
+ vExpectedTextFrames.add("Frame1");
+ vExpectedTextFrames.add("Frame2");
+
+ int nTextFrames = vExpectedTextFrames.size();
+ com.sun.star.container.XNameAccess xTextFrames = xTFS.getTextFrames();
+ for(String sFrameName : xTextFrames.getElementNames())
+ {
+ if(!vExpectedTextFrames.remove(sFrameName))
+ failed("Unexpected frame name");
+ try
+ {
+ xTextFrames.getByName(sFrameName);
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {
+ failed("Could not get text frame by name.");
+ }
+ if(!xTextFrames.hasByName(sFrameName))
+ failed("Could not find text frame by name.");
+ }
+ if(!vExpectedTextFrames.isEmpty())
+ failed("Missing expected text frames.");
+ try
+ {
+ xTextFrames.getByName("Nonexisting Textframe");
+ failed("Got nonexisting text frame.");
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {}
+ if(xTextFrames.hasByName("Nonexisting text frame"))
+ failed("Has nonexisting text frame.");
+
+ com.sun.star.container.XIndexAccess xTextFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XIndexAccess.class,
+ xTextFrames);
+ if(xTextFramesIdx.getCount() != nTextFrames)
+ failed("Unexpected number of text frames reported.");
+ for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xTextFramesIdx.getCount(); nCurrentFrameIdx++)
+ {
+ try
+ {
+ xTextFramesIdx.getByIndex(nCurrentFrameIdx);
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e)
+ {
+ failed("Could not get text frame by index.");
+ }
+ }
+ }
+}
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
new file mode 100755
index 000000000000..1cd91ed0f8d8
--- /dev/null
+++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CheckIndexedPropertyValues.java,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.XInterface;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.container.XIndexContainer;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.Type;
+
+/**
+ * Test the com.sun.star.document.IndexedPropertyValues service
+ */
+public class CheckIndexedPropertyValues extends ComplexTestCase {
+
+ private final String testedServiceName =
+ "com.sun.star.document.IndexedPropertyValues";
+ public String[] getTestMethodNames() {
+ return new String[]{"checkIndexedPropertyValues"};
+ }
+
+/* public String getTestObjectName() {
+ return testedServiceName;
+ }
+*/
+ public void checkIndexedPropertyValues() {
+ Object oObj = null;
+ try {
+ // print information about the service
+ XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
+ oObj = xMSF.createInstance(testedServiceName);
+ System.out.println("****************");
+ System.out.println("Service Name:");
+ util.dbg.getSuppServices(oObj);
+ System.out.println("****************");
+ System.out.println("Interfaces:");
+ util.dbg.printInterfaces((XInterface)oObj, true);
+ }
+ catch(com.sun.star.uno.Exception e) {
+ System.out.println("Cannot create object.");
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+ XIndexContainer xCont = (XIndexContainer)UnoRuntime.queryInterface(
+ XIndexContainer.class, oObj);
+
+ assure("XIndexContainer was queried but returned null.",
+ (xCont != null));
+ PropertyValue[] prop1 = new PropertyValue[1];
+ prop1[0] = new PropertyValue();
+ prop1[0].Name = "Jupp";
+ prop1[0].Value = "GoodGuy";
+
+ PropertyValue[] prop2 = new PropertyValue[1];
+ prop2[0] = new PropertyValue();
+ prop2[0].Name = "Horst";
+ prop2[0].Value = "BadGuy";
+
+ try {
+ Type t = xCont.getElementType();
+ log.println("Insertable Type: " + t.getTypeName());
+ assure("Initial container is not empty: " + xCont.getCount(), xCont.getCount()==0);
+ log.println("Inserting a PropertyValue.");
+ xCont.insertByIndex(0, prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
+ assure("Got the wrong PropertyValue: " +
+ ret[0].Name + " " +(String)ret[0].Value,
+ ret[0].Name.equals(prop1[0].Name) &&
+ ret[0].Value.equals(prop1[0].Value));
+ log.println("Replace the PropertyValue.");
+ xCont.replaceByIndex(0, prop2);
+ ret = (PropertyValue[])xCont.getByIndex(0);
+ assure("Got the wrong PropertyValue: " +
+ ret[0].Name + " " +(String)ret[0].Value,
+ ret[0].Name.equals(prop2[0].Name) &&
+ ret[0].Value.equals(prop2[0].Value));
+ log.println("Remove the PropertyValue.");
+ xCont.removeByIndex(0);
+ assure("Could not remove PropertyValue.",
+ !xCont.hasElements() && xCont.getCount()==0);
+ log.println("Insert again.");
+ xCont.insertByIndex(0, prop1);
+ xCont.insertByIndex(1, prop2);
+ assure("Did not insert PropertyValue.",
+ xCont.hasElements() && xCont.getCount()==2);
+
+ try {
+ log.println("Insert with wrong index.");
+ xCont.insertByIndex(25, prop2);
+ failed("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ log.println("Expected exception thrown: "+e);
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+
+ try {
+ log.println("Remove non-existing index.");
+ xCont.removeByIndex(25);
+ failed("IndexOutOfBoundsException was not thrown.");
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ log.println("Expected exception thrown: "+e);
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+
+ try {
+ log.println("Insert wrong argument.");
+ xCont.insertByIndex(2, "Example String");
+ failed("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Expected exception thrown: " + e);
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java
new file mode 100755
index 000000000000..a85b56014aa2
--- /dev/null
+++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CheckNamedPropertyValues.java,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+
+import complexlib.ComplexTestCase;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.XInterface;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.Type;
+
+/**
+ *
+ */
+public class CheckNamedPropertyValues extends ComplexTestCase {
+
+ private final String testedServiceName =
+ "com.sun.star.document.NamedPropertyValues";
+
+ public String[] getTestMethodNames() {
+ return new String[]{"checkNamedPropertyValues"};
+ }
+
+/* public String getTestObjectName() {
+ return "complex.writer.CheckNamedPropertyValues";
+ } */
+
+ public void checkNamedPropertyValues() {
+ Object oObj = null;
+ try {
+ XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
+ oObj = xMSF.createInstance(testedServiceName);
+ System.out.println("****************");
+ System.out.println("Service Name:");
+ util.dbg.getSuppServices(oObj);
+ System.out.println("****************");
+ System.out.println("Interfaces:");
+ util.dbg.printInterfaces((XInterface)oObj, true);
+ }
+ catch(com.sun.star.uno.Exception e) {
+ e.printStackTrace();
+ failed(e.getMessage());
+ return;
+ }
+ XNameContainer xCont = (XNameContainer)UnoRuntime.queryInterface(
+ XNameContainer.class, oObj);
+
+ assure("XNameContainer was queried but returned null.",
+ (xCont != null));
+ PropertyValue[] prop1 = new PropertyValue[1];
+ prop1[0] = new PropertyValue();
+ prop1[0].Name = "Jupp";
+ prop1[0].Value = "GoodGuy";
+
+ PropertyValue[] prop2 = new PropertyValue[1];
+ prop2[0] = new PropertyValue();
+ prop2[0].Name = "Horst";
+ prop2[0].Value = "BadGuy";
+
+ try {
+ Type t = xCont.getElementType();
+ log.println("Insertable Type: " + t.getTypeName());
+ assure("Initial container is not empty.", !xCont.hasElements());
+
+ log.println("Insert a PropertyValue.");
+ xCont.insertByName("prop1", prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
+ assure("Got the wrong PropertyValue: " +
+ ret[0].Name + " " +(String)ret[0].Value,
+ ret[0].Name.equals(prop1[0].Name) &&
+ ret[0].Value.equals(prop1[0].Value));
+ log.println("Replace the PropertyValue.");
+ xCont.replaceByName("prop1", prop2);
+ ret = (PropertyValue[])xCont.getByName("prop1");
+ assure("Got the wrong PropertyValue: " +
+ ret[0].Name + " " +(String)ret[0].Value,
+ ret[0].Name.equals(prop2[0].Name) &&
+ ret[0].Value.equals(prop2[0].Value));
+ log.println("Remove the PropertyValue.");
+ xCont.removeByName("prop1");
+ assure("Could not remove PropertyValue.", !xCont.hasElements());
+ log.println("Insert again.");
+ xCont.insertByName("prop1", prop1);
+ xCont.insertByName("prop2", prop2);
+ assure("Did not insert PropertyValue.", xCont.hasElements());
+ String[] names = xCont.getElementNames();
+ int count = 0;
+ for (int i=0; i<names.length; i++) {
+ if (names[i].equals("prop1") || names[i].equals("prop2"))
+ count++;
+ else
+ failed("Got a wrong element name: "+names[i]);
+ }
+ if (count != 2)
+ failed("Not all element names were returned.");
+
+ try {
+ log.println("Insert PropertyValue with an existing name.");
+ xCont.insertByName("prop2", prop1);
+ failed("ElementExistException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.container.ElementExistException e) {
+ log.println("Expected exception thrown: "+e);
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+
+ try {
+ log.println("Inserting a wrong argument.");
+ xCont.insertByName("prop3", "Example String");
+ failed("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Expected exception thrown: "+e);
+ }
+ catch(com.sun.star.container.ElementExistException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+
+ try {
+ log.println("Remove a non-existing element.");
+ xCont.removeByName("prop3");
+ failed("NoSuchElementException was not thrown.");
+ }
+ catch(com.sun.star.container.NoSuchElementException e) {
+ log.println("Expected exception thrown: "+e);
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Wrong exception thrown.");
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.container.ElementExistException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.container.NoSuchElementException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ catch(com.sun.star.lang.WrappedTargetException e) {
+ failed(e.getMessage());
+ e.printStackTrace();
+ }
+ }
+
+
+}
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
new file mode 100755
index 000000000000..aec77b891a0b
--- /dev/null
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -0,0 +1,3858 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.XPropertySetInfo;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.Pair;
+import com.sun.star.beans.StringPair;
+import com.sun.star.container.XNamed;
+import com.sun.star.container.XContentEnumerationAccess;
+import com.sun.star.container.XEnumerationAccess;
+import com.sun.star.container.XEnumeration;
+import com.sun.star.container.NoSuchElementException;
+import com.sun.star.frame.XStorable;
+import com.sun.star.util.XCloseable;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextContent;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.text.XTextRange;
+import com.sun.star.text.XTextCursor;
+import com.sun.star.text.XWordCursor;
+import com.sun.star.text.XSentenceCursor;
+import com.sun.star.text.XParagraphCursor;
+import com.sun.star.text.XFootnote;
+import com.sun.star.text.XTextField;
+import com.sun.star.text.TextContentAnchorType;
+import static com.sun.star.text.TextContentAnchorType.*;
+import static com.sun.star.text.ControlCharacter.*;
+import com.sun.star.rdf.XMetadatable;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Stack;
+
+
+class TreeNodeEnum
+{
+ private Object[] m_Elements;
+ private int m_Pos;
+ TreeNodeEnum(Object[] Elements) { m_Elements = Elements; m_Pos = 0; }
+ boolean hasNext() { return m_Pos < m_Elements.length; }
+ TreeNode next() { return (TreeNode) m_Elements[m_Pos++]; }
+}
+
+/** base class for tree nodes. only instance: root of tree. */
+class TreeNode
+{
+ private List<TreeNode> m_Children;
+ String getType() { return "__ROOT__"; }
+ boolean hasContent() { return false; }
+ boolean isNesting() { return false; }
+ TreeNode dup() { throw new RuntimeException("TreeNode.dup"); }
+ TreeNodeEnum createEnumeration() {
+ return new TreeNodeEnum(m_Children.toArray());
+ }
+ TreeNode() { m_Children = new ArrayList<TreeNode>(); }
+ TreeNode appendChild(TreeNode child)
+ { m_Children.add(child); return this; }
+ public String toString() {
+ return "<" + getType() + ">";
+ }
+}
+
+abstract class MarkNode extends TreeNode
+{
+ boolean m_isPoint;
+ boolean m_isStart = false;
+ String m_Name;
+ boolean isPoint() { return m_isPoint; }
+ boolean isStart() { return m_isStart; }
+ String getName() { return m_Name; }
+ MarkNode(String name) { m_Name = name; m_isPoint = true; }
+ boolean equals(MarkNode other) {
+ return (other.m_Name.equals(m_Name)) && (other.m_isPoint == m_isPoint)
+ && (other.m_isStart == m_isStart);
+ }
+ public String toString() {
+ return super.toString() + "\tname: " + m_Name +
+ "\tisPoint: " + m_isPoint + "\tisStart: " + m_isStart;
+ }
+}
+
+class BookmarkNode extends MarkNode
+{
+ private StringPair m_XmlId;
+ StringPair getXmlId() { return m_XmlId; }
+ BookmarkNode dup() { return new BookmarkNode(getName(), getXmlId()); }
+ BookmarkNode(String name) { this(name, new StringPair()); }
+ BookmarkNode(String name, StringPair xmlid) {
+ super(name); m_XmlId = xmlid;
+ }
+ String getType() { return "Bookmark"; }
+ public boolean equals(Object other) {
+ return (other instanceof BookmarkNode)
+ && super.equals((MarkNode) other)
+ && MetaNode.eq(((BookmarkNode) other).m_XmlId, m_XmlId);
+ }
+ public String toString() {
+ return super.toString()
+ + "\txmlid: " + m_XmlId.First + "#" + m_XmlId.Second;
+ }
+}
+
+class BookmarkStartNode extends BookmarkNode
+{
+ BookmarkStartNode dup() { return new BookmarkStartNode(getName()); }
+ BookmarkStartNode(String name) { this(name, new StringPair()); }
+ BookmarkStartNode(String name, StringPair xmlid) {
+ super(name, xmlid); m_isPoint = false; m_isStart = true;
+ }
+}
+
+class BookmarkEndNode extends BookmarkNode
+{
+ BookmarkEndNode dup() { return new BookmarkEndNode(getName()); }
+ BookmarkEndNode(String name) { this(name, new StringPair()); }
+ BookmarkEndNode(String name, StringPair xmlid) {
+ super(name, xmlid); m_isPoint = false; m_isStart = false;
+ }
+}
+
+class ReferenceMarkNode extends MarkNode
+{
+ ReferenceMarkNode dup() { return new ReferenceMarkNode(getName()); }
+ ReferenceMarkNode(String name) { super(name); }
+ String getType() { return "ReferenceMark"; }
+ public boolean equals(Object other) {
+ return (other instanceof ReferenceMarkNode)
+ && super.equals((MarkNode) other);
+ }
+}
+
+class ReferenceMarkStartNode extends ReferenceMarkNode
+{
+ ReferenceMarkStartNode dup()
+ { return new ReferenceMarkStartNode(getName()); }
+ ReferenceMarkStartNode(String name) {
+ super(name); m_isPoint = false; m_isStart = true;
+ }
+}
+
+class ReferenceMarkEndNode extends ReferenceMarkNode
+{
+ ReferenceMarkEndNode dup()
+ { return new ReferenceMarkEndNode(getName()); }
+ ReferenceMarkEndNode(String name) {
+ super(name); m_isPoint = false; m_isStart = false;
+ }
+}
+
+class DocumentIndexMarkNode extends MarkNode
+{
+ DocumentIndexMarkNode dup()
+ { return new DocumentIndexMarkNode(getName()); }
+ DocumentIndexMarkNode(String name) { super(name); }
+ String getType() { return "DocumentIndexMark"; }
+ public boolean equals(Object other) {
+ return (other instanceof DocumentIndexMarkNode)
+ && super.equals((MarkNode) other);
+ }
+}
+
+class DocumentIndexMarkStartNode extends DocumentIndexMarkNode
+{
+ DocumentIndexMarkStartNode dup()
+ { return new DocumentIndexMarkStartNode(getName()); }
+ DocumentIndexMarkStartNode(String name) {
+ super(name); m_isPoint = false; m_isStart = true;
+ }
+}
+
+class DocumentIndexMarkEndNode extends DocumentIndexMarkNode
+{
+ DocumentIndexMarkEndNode dup()
+ { return new DocumentIndexMarkEndNode(getName()); }
+ DocumentIndexMarkEndNode(String name) {
+ super(name); m_isPoint = false; m_isStart = false;
+ }
+}
+
+abstract class ContentNode extends TreeNode
+{
+ private String m_Content;
+ String getContent() { return m_Content; }
+ boolean hasContent() { return true; }
+ ContentNode(String content) {
+ m_Content = content;
+ }
+ TreeNode appendChild(TreeNode t) {
+ throw new RuntimeException("ContentNode.appendChild");
+ }
+ public String toString() {
+ return super.toString() + "\tcontent: " + m_Content;
+ }
+ boolean equals(ContentNode other) {
+ return (other.m_Content.equals(m_Content));
+ }
+}
+
+class TextNode extends ContentNode
+{
+ TextNode dup() { return new TextNode(getContent()); }
+ TextNode(String content) { super(content); }
+ String getType() { return "Text"; }
+ public boolean equals(Object other) {
+ return (other instanceof TextNode) && super.equals((ContentNode) other);
+ }
+}
+
+class TextFieldNode extends ContentNode
+{
+ TextFieldNode dup() { return new TextFieldNode(getContent()); }
+ TextFieldNode(String content) { super(content); }
+ String getType() { return "TextField"; }
+ public boolean equals(Object other) {
+ return (other instanceof TextFieldNode)
+ && super.equals((ContentNode) other);
+ }
+}
+
+class FrameNode extends TreeNode
+{
+ private String m_Name;
+ private TextContentAnchorType m_Anchor;
+ String getName() { return m_Name; }
+ TextContentAnchorType getAnchor() { return m_Anchor; }
+ FrameNode dup() { return new FrameNode(getName(), getAnchor()); }
+ FrameNode(String name, TextContentAnchorType anchor) {
+ m_Name = name; m_Anchor = anchor;
+ }
+ String getType() { return "Frame"; }
+ public boolean equals(Object other) {
+ return (other instanceof FrameNode)
+ && (((FrameNode) other).m_Name.equals(m_Name))
+ && (((FrameNode) other).m_Anchor == m_Anchor);
+ }
+ public String toString() {
+ return super.toString()
+ + "\tname: " + m_Name + "\tanchor: " + toString(m_Anchor);
+ }
+ static String toString(TextContentAnchorType anchor) {
+ switch (anchor.getValue()) {
+ case AS_CHARACTER_value: return "AS_CHARACTER";
+ case AT_CHARACTER_value: return "AT_CHARACTER";
+ case AT_PARAGRAPH_value: return "AT_PARAGRAPH";
+ case AT_PAGE_value: return "AT_PAGE";
+ case AT_FRAME_value: return "AT_FRAME";
+ default: throw new RuntimeException("unknown anchor");
+ }
+ }
+}
+
+class FootnoteNode extends TreeNode
+{
+ private String m_Label;
+ String getLabel() { return m_Label; }
+ FootnoteNode dup() { return new FootnoteNode(getLabel()); }
+ FootnoteNode(String label) { m_Label = label; }
+ String getType() { return "Footnote"; }
+ public boolean equals(Object other) {
+ return (other instanceof FootnoteNode)
+ && (((FootnoteNode) other).m_Label.equals(m_Label));
+ }
+ public String toString() {
+ return super.toString() + "\tlabel: " + m_Label;
+ }
+}
+
+class ControlCharacterNode extends TreeNode
+{
+ private short m_Char;
+ short getChar() { return m_Char; }
+ ControlCharacterNode dup() { return new ControlCharacterNode(getChar()); }
+ ControlCharacterNode(short c) { m_Char = c; }
+ String getType() { return "ControlCharacter"; }
+ public boolean equals(Object other) {
+ return (other instanceof ControlCharacterNode)
+ && (((ControlCharacterNode) other).m_Char == m_Char);
+ }
+ public String toString() {
+ return super.toString() + "\tchar: " + m_Char;
+ }
+}
+
+class SoftPageBreakNode extends TreeNode
+{
+ String getType() { return "SoftPageBreak"; }
+ public boolean equals(Object other) {
+ return (other instanceof SoftPageBreakNode);
+ }
+}
+
+class HyperlinkNode extends TreeNode
+{
+ private String m_URL;
+ String getURL() { return m_URL; }
+ HyperlinkNode dup() { return new HyperlinkNode(getURL()); }
+ HyperlinkNode(String url) {
+ if (url.length() == 0) throw new RuntimeException("HyperlinkNode");
+ m_URL = url;
+ }
+ String getType() { return "Hyperlink"; }
+ boolean isNesting() { return true; }
+ public boolean equals(Object other) {
+ return (other instanceof HyperlinkNode)
+ && (((HyperlinkNode) other).m_URL.equals(m_URL));
+ }
+ public String toString() {
+ return super.toString() + "\turl: " + m_URL;
+ }
+}
+
+class RubyNode extends TreeNode
+{
+ private String m_Ruby;
+ String getRubyText() { return m_Ruby; }
+ RubyNode dup() { return new RubyNode(getRubyText()); }
+ RubyNode(String ruby) {
+ if (ruby.length() == 0) throw new RuntimeException("RubyNode");
+ m_Ruby = ruby;
+ }
+ String getType() { return "Ruby"; }
+ boolean isNesting() { return true; }
+ public boolean equals(Object other) {
+ return (other instanceof RubyNode)
+ && (((RubyNode) other).m_Ruby.equals(m_Ruby));
+ }
+ public String toString() {
+ return super.toString() + "\trubytext: " + m_Ruby;
+ }
+}
+
+class MetaNode extends TreeNode
+{
+ private StringPair m_XmlId;
+ StringPair getXmlId() { return m_XmlId; }
+ MetaNode dup() { return new MetaNode(getXmlId()); }
+ MetaNode (StringPair xmlid) { m_XmlId = xmlid; }
+ String getType() { return "InContentMetadata"; }
+ boolean isNesting() { return true; }
+ public boolean equals(Object other) {
+ return (other instanceof MetaNode)
+ && eq(((MetaNode) other).m_XmlId, m_XmlId);
+ }
+ static boolean eq(StringPair left, StringPair right)
+ {
+ return left.First.equals(right.First)
+ && left.Second.equals(right.Second);
+ }
+ public String toString() {
+ return super.toString()
+ + "\txmlid: " + m_XmlId.First + "#" + m_XmlId.Second;
+ }
+}
+
+class MetaFieldNode extends MetaNode
+{
+ MetaFieldNode dup() { return new MetaFieldNode(getXmlId()); }
+ MetaFieldNode (StringPair xmlid) { super(xmlid); }
+ String getType() { return "MetadataField"; }
+}
+
+class Range
+{
+ private short m_Start;
+ private short m_End;
+ private TreeNode m_Node;
+ short getStart() { return m_Start; }
+ short getEnd() { return m_End ; }
+ short getExtent() { return (short) (m_End - m_Start); }
+ TreeNode getNode() { return m_Node; }
+ Range(int start, int end, TreeNode node)
+ { m_Start = (short) start; m_End = (short) end; m_Node = node; }
+}
+
+//----------------------------------------------------------------------
+
+/* this is where we nail the pudding to the wall */
+class FuzzyTester
+{
+ private long m_DiffContent = 0;
+ private long m_DiffMissing = 0;
+ private long m_DiffNesting = 0;
+ private long m_DiffSpuriousEmptyText = 0;
+ private long m_DiffSequence = 0; // ignored?
+ private Stack<Pair<TreeNode, TreeNodeEnum>> m_StackExpected;
+ private Stack<Pair<TreeNode, TreeNodeEnum>> m_StackActual;
+ private List<TreeNode> m_BufferExpected;
+ private List<TreeNode> m_BufferActual;
+ private share.LogWriter m_Log;
+
+ FuzzyTester(share.LogWriter log) {
+ m_Log = log;
+ m_BufferExpected = new ArrayList<TreeNode>();
+ m_BufferActual = new ArrayList<TreeNode>();
+ m_StackExpected = new Stack<Pair<TreeNode, TreeNodeEnum>>();
+ m_StackActual = new Stack<Pair<TreeNode, TreeNodeEnum>>();
+ }
+
+ /** idea: traverse both trees, enumerate nodes, stopping at content nodes.
+ then compare buffers. */
+ boolean doTest(TreeNode expected, TreeNode actual)
+ {
+ if (!expected.getType().equals("__ROOT__"))
+ throw new RuntimeException("doTest: expected: root");
+ if (!actual.getType().equals("__ROOT__"))
+ throw new RuntimeException("doTest: actual: root");
+ m_StackExpected.push(new Pair(expected, expected.createEnumeration()));
+ m_StackActual.push(new Pair(actual, actual.createEnumeration()));
+ do {
+ traverse(m_StackExpected, m_BufferExpected);
+ traverse(m_StackActual, m_BufferActual);
+ //??? root?
+ testBuffer();
+ } while (!m_StackExpected.empty() || !m_StackActual.empty());
+ if (m_DiffSequence != 0) {
+ m_Log.println("warning: " + m_DiffSequence
+ + " differences in sequence");
+ }
+ if (m_DiffSpuriousEmptyText != 0) {
+ m_Log.println("warning: " + m_DiffSpuriousEmptyText
+ + " spurious empty text nodes");
+ }
+ if (m_DiffNesting != 0) {
+ m_Log.println("WARNING: " + m_DiffNesting
+ + " differences in nesting");
+ }
+ return (m_DiffContent == 0) && (m_DiffMissing == 0);
+ }
+
+ private void traverse(Stack<Pair<TreeNode, TreeNodeEnum>> stack,
+ List<TreeNode> buffer)
+ {
+ while (!stack.empty()) {
+ TreeNodeEnum topEnum = stack.peek().Second;
+ if (topEnum.hasNext()) {
+ TreeNode node = topEnum.next();
+ buffer.add(node);
+ TreeNodeEnum nodeEnum = node.createEnumeration();
+ if (nodeEnum.hasNext()) {
+ stack.push(new Pair(node, nodeEnum));
+ }
+ if (node.hasContent()) {
+ if (!((node instanceof TextNode) // spurious empty text?
+ && ((TextNode) node).getContent().length() == 0)) {
+ return; // break here
+ }
+ }
+ } else {
+ buffer.add(stack.peek().First);
+ stack.pop();
+ }
+ }
+ }
+
+ private void testTerminatingNode()
+ {
+ int lenExpected = m_BufferExpected.size();
+ int lenActual = m_BufferActual.size();
+ if (lenExpected == 0 || lenActual == 0)
+ return;
+ TreeNode expected = m_BufferExpected.get(lenExpected - 1);
+ TreeNode actual = m_BufferActual.get(lenActual - 1);
+
+ boolean eRoot = expected.getType().equals("__ROOT__");
+ boolean aRoot = actual.getType().equals("__ROOT__");
+ if (eRoot || aRoot) {
+ if (!(eRoot && aRoot)) {
+ if (aRoot) printMissing(expected);
+ else printUnexpected(actual);
+ m_DiffMissing++;
+ }
+ return;
+ }
+
+ testContentNode((ContentNode) expected, (ContentNode) actual);
+
+ m_BufferExpected.set(lenExpected - 1, null);
+ m_BufferActual.set(lenActual - 1, null);
+ }
+
+ private void testContentNode(ContentNode expected, ContentNode actual)
+ {
+ String contentExpected = expected.getContent();
+ String contentActual = actual.getContent();
+ if (!expected.equals(actual)) {
+ printDiff("text content differs", contentExpected, contentActual);
+ m_DiffContent++;
+ }
+ }
+
+ private void testBuffer()
+ {
+ int lenExpected = m_BufferExpected.size();
+ int lenActual = m_BufferActual.size();
+ for (int i = 0; i < lenExpected - 1; i++ )
+ {
+ TreeNode node = m_BufferExpected.get(i);
+ int j = m_BufferActual.indexOf(node);
+ if (j >= 0) {
+ TreeNode other = m_BufferActual.get(j);
+ if (j != i)
+ {
+ //FIXME how bad is this?
+ printDiff("position differs",
+ String.valueOf(i), String.valueOf(j));
+ // a hacky hack
+ int min = Math.min(i,j);
+ int max = Math.max(Math.min(lenActual - 1, i),j);
+ for (int k = min; k != max; k ++) {
+ TreeNode tmp = m_BufferActual.get(k);
+ if (tmp != null && tmp.isNesting()) {
+ printNesting(node, tmp);
+ m_DiffNesting++;
+ }
+ }
+ m_DiffSequence++;
+ }
+ m_BufferActual.set(j, null);
+ } else {
+//m_Log.println("testBuffer:");
+ printMissing(node);
+ m_DiffMissing++;
+ }
+ }
+ for (int j = 0; j < lenActual - 1; j++)
+ {
+ TreeNode node = m_BufferActual.get(j);
+ if (node != null)
+ {
+//m_Log.println("testBuffer:");
+ printUnexpected(node);
+ if ((node instanceof TextNode) &&
+ ((TextNode) node).getContent().length() == 0) {
+ m_DiffSpuriousEmptyText++;
+ } else {
+ m_DiffMissing++;
+ }
+ }
+ }
+ testTerminatingNode();
+ m_BufferExpected.clear();
+ m_BufferActual.clear();
+ }
+
+ void printDiff(String prefix, String expected, String actual)
+ {
+ m_Log.println(prefix +
+ ":\texpected: " + expected + "\tactual: " + actual);
+ }
+
+ void printNesting(TreeNode node, TreeNode nesting)
+ {
+ m_Log.println("node: " + node.toString()
+ + " possibly moved across nesting " + nesting.toString());
+ }
+
+ void printMissing(TreeNode node)
+ {
+ m_Log.println(" missing node: " + node.toString());
+
+ }
+
+ void printUnexpected(TreeNode node)
+ {
+ m_Log.println("unexpected node: " + node.toString());
+
+ }
+}
+
+
+//----------------------------------------------------------------------
+
+class EnumConverter
+{
+ private Stack<TreeNode> m_Stack;
+ TextPortionEnumerationTest m_T;
+
+ EnumConverter(TextPortionEnumerationTest err) {
+ m_Stack = new Stack<TreeNode>(); m_T = err;
+ }
+
+ TreeNode convert(XEnumeration xEnum) throws Exception
+ {
+ TreeNode root = new TreeNode();
+ m_Stack.push(root);
+ TreeNode ret = convertChildren(xEnum);
+ m_T.assure("EnumConverter.convert: stack", m_Stack.empty());
+ return ret;
+ }
+
+ TreeNode convertChildren(XEnumeration xEnum) throws Exception
+ {
+ while (xEnum.hasMoreElements()) {
+ TreeNode node;
+ Object xElement = xEnum.nextElement();
+ XTextRange xPortion = (XTextRange)
+ UnoRuntime.queryInterface(XTextRange.class, xElement);
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xPortion);
+ String type = (String) xPropSet.getPropertyValue("TextPortionType");
+ if (type.equals("Text")) {
+ String text = xPortion.getString();
+ node = new TextNode(text);
+ String url = (String) xPropSet.getPropertyValue("HyperLinkURL");
+ if (url.length() > 0) {
+ TreeNode temp = node;
+ node = new HyperlinkNode(url);
+ node.appendChild(temp);
+ }
+ } else if (type.equals("TextField")) {
+ Object xField = xPropSet.getPropertyValue("TextField");
+ XServiceInfo xService = (XServiceInfo)
+ UnoRuntime.queryInterface(XServiceInfo.class, xField);
+ if (xService.supportsService(
+ "com.sun.star.text.textfield.MetadataField"))
+ {
+ XMetadatable xMeta = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xField);
+ StringPair xmlid = xMeta.getMetadataReference();
+ node = new MetaFieldNode(xmlid);
+ m_Stack.push(node);
+ XEnumerationAccess xEA = (XEnumerationAccess)
+ UnoRuntime.queryInterface(XEnumerationAccess.class,
+ xMeta);
+ XEnumeration xEnumChildren = xEA.createEnumeration();
+ TreeNode node2 = convertChildren(xEnumChildren);
+ m_T.assure("stack error: meta-field", node == node2);
+ } else {
+ XPropertySet xFieldPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xField);
+ String content = (String)
+ xFieldPropSet.getPropertyValue("Content");
+ boolean isFixed = (Boolean)
+ xFieldPropSet.getPropertyValue("IsFixed");
+ m_T.assure("field not fixed?", isFixed);
+ node = new TextFieldNode(content);
+ }
+ } else if (type.equals("Footnote")) {
+ Object xNote = xPropSet.getPropertyValue("Footnote");
+ XFootnote xFootnote = (XFootnote)
+ UnoRuntime.queryInterface(XFootnote.class, xNote);
+ String label = xFootnote.getLabel();
+ node = new FootnoteNode(label);
+ } else if (type.equals("Frame")) {
+ XContentEnumerationAccess xCEA = (XContentEnumerationAccess)
+ UnoRuntime.queryInterface(XContentEnumerationAccess.class,
+ xPortion);
+ XEnumeration xContentEnum = xCEA.createContentEnumeration("");
+ while (xContentEnum.hasMoreElements()) {
+ Object xFrame = xContentEnum.nextElement();
+ XPropertySet xFramePropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xFrame);
+ TextContentAnchorType anchor = (TextContentAnchorType)
+ xFramePropSet.getPropertyValue("AnchorType");
+ XNamed xNamed = (XNamed)
+ UnoRuntime.queryInterface(XNamed.class, xFrame);
+ String name = xNamed.getName();
+ node = new FrameNode(name, anchor);
+ m_Stack.peek().appendChild(node);
+ }
+ continue;
+ } else if (type.equals("ControlCharacter")) {
+ short c = (Short)
+ xPropSet.getPropertyValue("ControlCharacter");
+ node = new ControlCharacterNode(c);
+ } else if (type.equals("Bookmark")) {
+ Object xMark = xPropSet.getPropertyValue("Bookmark");
+ XNamed xNamed = (XNamed)
+ UnoRuntime.queryInterface(XNamed.class, xMark);
+ String name = xNamed.getName();
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xMark);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ boolean isCollapsed = (Boolean)
+ xPropSet.getPropertyValue("IsCollapsed");
+ if (isCollapsed) {
+ node = new BookmarkNode(name, xmlid);
+ } else {
+ boolean isStart = (Boolean)
+ xPropSet.getPropertyValue("IsStart");
+ if (isStart) {
+ node = new BookmarkStartNode(name, xmlid);
+ } else {
+ node = new BookmarkEndNode(name, xmlid);
+ }
+ }
+ } else if (type.equals("ReferenceMark")) {
+ Object xMark = xPropSet.getPropertyValue("ReferenceMark");
+ XNamed xNamed = (XNamed)
+ UnoRuntime.queryInterface(XNamed.class, xMark);
+ String name = xNamed.getName();
+ boolean isCollapsed = (Boolean)
+ xPropSet.getPropertyValue("IsCollapsed");
+ if (isCollapsed) {
+ node = new ReferenceMarkNode(name);
+ } else {
+ boolean isStart = (Boolean)
+ xPropSet.getPropertyValue("IsStart");
+ if (isStart) {
+ node = new ReferenceMarkStartNode(name);
+ } else {
+ node = new ReferenceMarkEndNode(name);
+ }
+ }
+ } else if (type.equals("DocumentIndexMark")) {
+ Object xMark = xPropSet.getPropertyValue("DocumentIndexMark");
+ XPropertySet xMarkSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xMark);
+ String name = (String) xMarkSet.getPropertyValue("PrimaryKey");
+ boolean isCollapsed = (Boolean)
+ xPropSet.getPropertyValue("IsCollapsed");
+ if (isCollapsed) {
+ node = new DocumentIndexMarkNode(name);
+ } else {
+ boolean isStart = (Boolean)
+ xPropSet.getPropertyValue("IsStart");
+ if (isStart) {
+ node = new DocumentIndexMarkStartNode(name);
+ } else {
+ node = new DocumentIndexMarkEndNode(name);
+ }
+ }
+ } else if (type.equals("SoftPageBreak")) {
+ node = new SoftPageBreakNode();
+ } else if (type.equals("Ruby")) {
+ boolean isStart = (Boolean)
+ xPropSet.getPropertyValue("IsStart");
+ if (isStart) {
+ // ARRGH!!! stupid api...
+ // the text is ONLY at the start!
+ String ruby = (String)
+ xPropSet.getPropertyValue("RubyText");
+ node = new RubyNode(ruby);
+ m_Stack.push(node);
+ continue;
+ } else {
+ node = m_Stack.pop();
+ m_T.assure("stack error: Ruby expected; is: " +
+ node.toString(), node instanceof RubyNode);
+// m_T.assure("stack error: ruby",
+// ruby.equals(((RubyNode)node).getRubyText()));
+ }
+ } else if (type.equals("InContentMetadata")) {
+ Object xMeta = xPropSet.getPropertyValue("InContentMetadata");
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xMeta);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ node = new MetaNode(xmlid);
+ m_Stack.push(node);
+ XEnumerationAccess xEA = (XEnumerationAccess)
+ UnoRuntime.queryInterface(XEnumerationAccess.class, xMeta);
+ XEnumeration xEnumChildren = xEA.createEnumeration();
+ TreeNode node2 = convertChildren(xEnumChildren);
+ m_T.assure("stack error: meta", node == node2);
+// } else if (type.equals("MetadataField")) {
+// Object xMeta = xPropSet.getPropertyValue("MetadataField");
+ } else {
+ throw new RuntimeException("unexpected type: " + type);
+ }
+ m_Stack.peek().appendChild(node);
+ }
+ TreeNode ret = m_Stack.pop();
+ return ret;
+ }
+}
+
+
+//----------------------------------------------------------------------
+
+abstract class Inserter
+{
+ private XMultiServiceFactory m_xDocFactory;
+ XText m_xText;
+ XParagraphCursor m_xCursor;
+
+ Inserter(XTextDocument xDoc)
+ {
+ m_xDocFactory = (XMultiServiceFactory)
+ UnoRuntime.queryInterface(XMultiServiceFactory.class, xDoc);
+ m_xText = xDoc.getText();
+ XTextCursor xCursor = m_xText.createTextCursor();
+ m_xCursor = (XParagraphCursor)
+ UnoRuntime.queryInterface(XParagraphCursor.class, xCursor);
+ }
+
+ void initParagraph() throws Exception
+ {
+ m_xCursor.gotoStartOfParagraph(false);
+ m_xText.insertControlCharacter(m_xCursor, PARAGRAPH_BREAK, false);
+ // we split the first (empty) paragraph, and then insert into the
+ // second (empty) paragraph; this ensures first is always empty!
+ }
+
+ void insertControlCharacter(XTextCursor xCursor, short cchar)
+ throws Exception
+ {
+ m_xText.insertControlCharacter(xCursor, cchar, false);
+ }
+
+ void insertText(XTextCursor xCursor, String text)
+ {
+ xCursor.setString(text);
+ }
+
+ void insertTextField(XTextCursor xCursor, String content) throws Exception
+ {
+ XTextContent xContent = makeTextField(content);
+ xContent.attach(xCursor);
+ }
+
+ XTextContent makeTextField(String content)
+ throws Exception
+ {
+ Object xField =
+ m_xDocFactory.createInstance("com.sun.star.text.textfield.Author");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xField);
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xField);
+ xPropSet.setPropertyValue("IsFixed", true);
+ xPropSet.setPropertyValue("FullName", false);
+ xPropSet.setPropertyValue("Content", content);
+ return xContent;
+ }
+
+ void insertFrame(XTextRange xCursor, String name,
+ TextContentAnchorType anchor) throws Exception
+ {
+ XTextContent xContent = makeFrame(name, anchor);
+ xContent.attach(xCursor);
+ }
+
+ XTextContent makeFrame(String name, TextContentAnchorType anchor)
+ throws Exception
+ {
+ Object xFrame =
+ m_xDocFactory.createInstance("com.sun.star.text.TextFrame");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xFrame);
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xFrame);
+ xPropSet.setPropertyValue("AnchorType", anchor);
+ XNamed xNamed = (XNamed)
+ UnoRuntime.queryInterface(XNamed.class, xContent);
+ xNamed.setName(name);
+ return xContent;
+ }
+
+ void insertFootnote(XTextCursor xCursor, String label) throws Exception
+ {
+ XTextContent xContent = makeFootnote(label);
+ xContent.attach(xCursor);
+ }
+
+ XTextContent makeFootnote(String label) throws Exception
+ {
+ Object xNote =
+ m_xDocFactory.createInstance("com.sun.star.text.Footnote");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xNote);
+ XFootnote xFootnote = (XFootnote)
+ UnoRuntime.queryInterface(XFootnote.class, xNote);
+ xFootnote.setLabel(label);
+ return xContent;
+ }
+
+ void insertBookmark(XTextCursor xCursor, String name, StringPair xmlid)
+ throws Exception
+ {
+ XTextContent xContent = makeBookmark(name);
+ xContent.attach(xCursor);
+ if (!xmlid.First.equals(""))
+ {
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xContent);
+ xMetadatable.setMetadataReference(xmlid);
+ }
+ }
+
+ XTextContent makeBookmark(String name) throws Exception
+ {
+ Object xBookmark =
+ m_xDocFactory.createInstance("com.sun.star.text.Bookmark");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xBookmark);
+ XNamed xNamed = (XNamed)
+ UnoRuntime.queryInterface(XNamed.class, xContent);
+ xNamed.setName(name);
+ return xContent;
+ }
+
+ void insertReferenceMark(XTextCursor xCursor, String name) throws Exception
+ {
+ XTextContent xContent = makeReferenceMark(name);
+ xContent.attach(xCursor);
+ }
+
+ XTextContent makeReferenceMark(String name) throws Exception
+ {
+ Object xMark =
+ m_xDocFactory.createInstance("com.sun.star.text.ReferenceMark");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xMark);
+ XNamed xNamed = (XNamed)
+ UnoRuntime.queryInterface(XNamed.class, xContent);
+ xNamed.setName(name);
+ return xContent;
+ }
+
+ void insertDocumentIndexMark(XTextCursor xCursor, String key)
+ throws Exception
+ {
+ XTextContent xContent = makeDocumentIndexMark(key);
+ xContent.attach(xCursor);
+ }
+
+ XTextContent makeDocumentIndexMark(String key) throws Exception
+ {
+ Object xMark =
+ m_xDocFactory.createInstance("com.sun.star.text.DocumentIndexMark");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xMark);
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xMark);
+ xPropSet.setPropertyValue("PrimaryKey", key);
+ return xContent;
+ }
+
+ void insertHyperlink(XTextCursor xCursor, String url) throws Exception
+ {
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xCursor);
+ xPropSet.setPropertyValue("HyperLinkURL", url);
+ }
+
+ void insertRuby(XTextCursor xCursor, String rubytext) throws Exception
+ {
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xCursor);
+ xPropSet.setPropertyValue("RubyText", rubytext);
+ }
+
+ void insertMeta(XTextCursor xCursor, StringPair xmlid)
+ throws Exception
+ {
+ XTextContent xContent = makeMeta();
+ xContent.attach(xCursor);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xContent);
+ xMetadatable.setMetadataReference(xmlid);
+ }
+
+ XTextContent makeMeta() throws Exception
+ {
+ Object xMeta = m_xDocFactory.createInstance(
+ "com.sun.star.text.InContentMetadata");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xMeta);
+ return xContent;
+ }
+
+ void insertMetaField(XTextCursor xCursor, StringPair xmlid)
+ throws Exception
+ {
+ XTextContent xContent = makeMetaField();
+ xContent.attach(xCursor);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xContent);
+ xMetadatable.setMetadataReference(xmlid);
+ }
+
+ XTextField makeMetaField() throws Exception
+ {
+ Object xMeta = m_xDocFactory.createInstance(
+ "com.sun.star.text.textfield.MetadataField");
+ XTextField xContent = (XTextField)
+ UnoRuntime.queryInterface(XTextField.class, xMeta);
+ return xContent;
+ }
+
+}
+
+class TreeInserter extends Inserter
+{
+ private Map<String, XTextRange> m_BookmarkStarts;
+ private Map<String, XTextRange> m_ReferenceMarkStarts;
+ private Map<String, XTextRange> m_DocumentIndexMarkStarts;
+ private List<Pair<XTextRange, FrameNode>> m_FrameHints;
+
+ TreeInserter(XTextDocument xDoc)
+ {
+ super(xDoc);
+ m_BookmarkStarts = new HashMap<String, XTextRange>();
+ m_ReferenceMarkStarts = new HashMap<String, XTextRange>();
+ m_DocumentIndexMarkStarts = new HashMap<String, XTextRange>();
+ m_FrameHints = new ArrayList<Pair<XTextRange, FrameNode>>();
+ }
+
+ void insertTree(TreeNode tree) throws Exception
+ {
+ if (!tree.getType().equals("__ROOT__"))
+ throw new RuntimeException("insertTree: test error: no root");
+ initParagraph();
+ insertChildren(tree.createEnumeration());
+ for (int i = 0; i < m_FrameHints.size(); ++i) {
+ Pair<XTextRange, FrameNode> p = m_FrameHints.get(i);
+ insertFrame(p.First, p.Second.getName(), p.Second.getAnchor());
+ }
+ }
+
+ void insertChildren(TreeNodeEnum children) throws Exception
+ {
+ while (children.hasNext()) {
+ m_xCursor.gotoEndOfParagraph(false);
+ TreeNode node = children.next();
+ String type = node.getType();
+ if (type.equals("Bookmark")) {
+ BookmarkNode bkmk = (BookmarkNode) node;
+ String name = bkmk.getName();
+ StringPair id = bkmk.getXmlId();
+ if (bkmk.isPoint()) {
+ insertBookmark(m_xCursor, name, id);
+ } else if (bkmk.isStart()) {
+ m_BookmarkStarts.put(name, m_xCursor.getStart());
+ } else {
+ XTextRange xRange = m_BookmarkStarts.get(name);
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertBookmark(xCursor, name, id);
+ }
+ } else if (type.equals("ReferenceMark")) {
+ ReferenceMarkNode mark = (ReferenceMarkNode) node;
+ String name = mark.getName();
+ if (mark.isPoint()) {
+ insertReferenceMark(m_xCursor, name);
+ } else if (mark.isStart()) {
+ m_ReferenceMarkStarts.put(name, m_xCursor.getStart());
+ } else {
+ XTextRange xRange = m_ReferenceMarkStarts.get(name);
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertReferenceMark(xCursor, name);
+ }
+ } else if (type.equals("DocumentIndexMark")) {
+ DocumentIndexMarkNode mark = (DocumentIndexMarkNode) node;
+ String name = mark.getName();
+ if (mark.isPoint()) {
+ insertDocumentIndexMark(m_xCursor, name);
+ } else if (mark.isStart()) {
+ m_DocumentIndexMarkStarts.put(name, m_xCursor.getStart());
+ } else {
+ XTextRange xRange = m_DocumentIndexMarkStarts.get(name);
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertDocumentIndexMark(xCursor, name);
+ }
+ } else if (type.equals("Hyperlink")) {
+ HyperlinkNode href = (HyperlinkNode) node;
+ XTextRange xRange = m_xCursor.getStart();
+ insertChildren(href.createEnumeration());
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertHyperlink(xCursor, href.getURL());
+ } else if (type.equals("Ruby")) {
+ RubyNode ruby = (RubyNode) node;
+ XTextRange xRange = m_xCursor.getStart();
+ insertChildren(ruby.createEnumeration());
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertRuby(xCursor, ruby.getRubyText());
+ } else if (type.equals("InContentMetadata")) {
+ MetaNode meta = (MetaNode) node;
+ XTextRange xRange = m_xCursor.getStart();
+ insertChildren(meta.createEnumeration());
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertMeta(xCursor, meta.getXmlId());
+ } else if (type.equals("MetadataField")) {
+ MetaFieldNode meta = (MetaFieldNode) node;
+ XTextRange xRange = m_xCursor.getStart();
+ insertChildren(meta.createEnumeration());
+ XParagraphCursor xCursor = mkCursor(xRange);
+ insertMetaField(xCursor, meta.getXmlId());
+ } else if (type.equals("Text")) {
+ TextNode text = (TextNode) node;
+ insertText(m_xCursor, text.getContent());
+ } else if (type.equals("TextField")) {
+ TextFieldNode field = (TextFieldNode) node;
+ insertTextField(m_xCursor, field.getContent());
+ } else if (type.equals("Footnote")) {
+ FootnoteNode note = (FootnoteNode) node;
+ insertFootnote(m_xCursor, note.getLabel());
+ } else if (type.equals("Frame")) {
+ FrameNode frame = (FrameNode) node;
+ if (frame.getAnchor() == AT_CHARACTER) {
+ m_FrameHints.add( new Pair(m_xCursor.getStart(), frame) );
+ } else {
+ insertFrame(m_xCursor, frame.getName(), frame.getAnchor());
+ }
+ } else if (type.equals("ControlCharacter")) {
+ ControlCharacterNode cchar = (ControlCharacterNode) node;
+ insertControlCharacter(m_xCursor, cchar.getChar());
+ } else if (type.equals("SoftPageBreak")) {
+ SoftPageBreakNode spbk = (SoftPageBreakNode) node;
+ throw new RuntimeException("sorry, cannot test SoftPageBreak");
+ } else {
+ throw new RuntimeException("unexpected type: " + type);
+ }
+ }
+ }
+
+ XParagraphCursor mkCursor(XTextRange xRange)
+ {
+ XTextCursor xCursor = m_xText.createTextCursorByRange(xRange);
+ XParagraphCursor xParaCursor = (XParagraphCursor)
+ UnoRuntime.queryInterface(XParagraphCursor.class, xCursor);
+ xParaCursor.gotoEndOfParagraph(true);
+ return xParaCursor;
+ }
+}
+
+
+// FIXME: this does not account for inserted dummy characters!
+class RangeInserter extends Inserter
+{
+ RangeInserter(XTextDocument xDoc) throws Exception
+ { super(xDoc); initParagraph(); }
+
+ /*
+ void insertText(int pos, String text)
+ {
+ m_xCursor.gotoStartOfParagraph(false);
+ m_xCursor.goRight((short) pos, false);
+ insertText(m_xCursor, text);
+ }
+ */
+
+ void insertRange(Range range) throws Exception
+ {
+ m_xCursor.gotoStartOfParagraph(false);
+ m_xCursor.goRight(range.getStart(), false);
+ m_xCursor.goRight(range.getExtent(), true);
+ insertNode(m_xCursor, range.getNode());
+ }
+
+ void insertNode(XParagraphCursor xCursor, TreeNode node) throws Exception
+ {
+ String type = node.getType();
+ if (type.equals("Bookmark")) {
+ BookmarkNode bkmk = (BookmarkNode) node;
+ if (bkmk.isPoint()) throw new RuntimeException("range only");
+ insertBookmark(xCursor, bkmk.getName(), bkmk.getXmlId());
+ } else if (type.equals("ReferenceMark")) {
+ ReferenceMarkNode mark = (ReferenceMarkNode) node;
+ if (mark.isPoint()) throw new RuntimeException("range only");
+ insertReferenceMark(xCursor, mark.getName());
+ } else if (type.equals("DocumentIndexMark")) {
+ DocumentIndexMarkNode mark = (DocumentIndexMarkNode) node;
+ if (mark.isPoint()) throw new RuntimeException("range only");
+ insertDocumentIndexMark(xCursor, mark.getName());
+ } else if (type.equals("Hyperlink")) {
+ HyperlinkNode href = (HyperlinkNode) node;
+ insertHyperlink(xCursor, href.getURL());
+ } else if (type.equals("Ruby")) {
+ RubyNode ruby = (RubyNode) node;
+ insertRuby(xCursor, ruby.getRubyText());
+ } else if (type.equals("InContentMetadata")) {
+ MetaNode meta = (MetaNode) node;
+ insertMeta(xCursor, meta.getXmlId());
+ } else if (type.equals("MetadataField")) {
+ MetaFieldNode meta = (MetaFieldNode) node;
+ insertMetaField(xCursor, meta.getXmlId());
+ } else if (type.equals("Text")) {
+ TextNode text = (TextNode) node;
+ insertText(xCursor, text.getContent());
+ } else if (type.equals("TextField")) {
+ TextFieldNode field = (TextFieldNode) node;
+ insertTextField(m_xCursor, field.getContent());
+ } else if (type.equals("Footnote")) {
+ FootnoteNode note = (FootnoteNode) node;
+ insertFootnote(m_xCursor, note.getLabel());
+ } else if (type.equals("Frame")) {
+ FrameNode frame = (FrameNode) node;
+ insertFrame(xCursor, frame.getName(), frame.getAnchor());
+ } else if (type.equals("ControlCharacter")) {
+ ControlCharacterNode cchar = (ControlCharacterNode) node;
+ insertControlCharacter(m_xCursor, cchar.getChar());
+ } else if (type.equals("SoftPageBreak")) {
+ throw new RuntimeException("sorry, cannot test SoftPageBreak");
+ } else {
+ throw new RuntimeException("unexpected type: " + type);
+ }
+ }
+}
+
+
+//----------------------------------------------------------------------
+
+public class TextPortionEnumerationTest extends ComplexTestCase
+{
+ private XMultiServiceFactory m_xMSF = null;
+ private XComponentContext m_xContext = null;
+ private XTextDocument m_xDoc = null;
+ private String m_TmpDir = null;
+
+ private int m_Count = 1;
+
+// public String[] getTestMethodNames() { return new String[] { "testLoadStore" }; }
+ public String[] getTestMethodNames() {
+ return new String[] {
+ "testText",
+ "testTextField",
+// "testControlChar",
+// "testSoftPageBreak",
+ "testFootnote",
+ "testFrameAs",
+ "testFrameAt",
+ "testBookmarkPoint",
+ "testBookmark",
+ "testBookmarkPointXmlId",
+ "testBookmarkXmlId",
+ "testRefmarkPoint",
+ "testRefmark",
+ "testToxmarkPoint",
+ "testToxmark",
+ "testHyperlink",
+ "testHyperlinkEmpty",
+ "testRuby",
+ "testRubyEmpty",
+ "testMeta",
+ "testMetaEmpty",
+ "testMetaField",
+ "testMetaFieldEmpty",
+ "testBookmark1",
+ "testBookmark2",
+ "testRefMark2",
+ "testRefMark3",
+ "testToxMark2",
+ "testToxMark3",
+ "testMarks1",
+ "testMarks2",
+ "testMarks3",
+ "testFrameMark1",
+ "testFrameMark2",
+ "testFrameMark3",
+ "testFrameMark4",
+ "testFrames1",
+ "testFrames2",
+ "testFrames3",
+ "testFrames4",
+ "testFrames5",
+ "testRubyHyperlink1",
+ "testRubyHyperlink2",
+ "testEnd1",
+ "testEnd2",
+ "testEnd3",
+ "testEnd4",
+ "testEnd5",
+ "testEmpty1",
+ "testEmpty2",
+ "testEmpty3",
+ "test1",
+ "testRange1",
+ "testRangeHyperlinkHyperlink",
+ "testRangeHyperlinkRuby",
+ "testRangeRubyHyperlink",
+ "testRangeRubyRuby",
+ "testRangeHyperlinkMeta",
+ "testRangeRubyMeta",
+ "testRangeMetaHyperlink",
+ "testRangeMetaRuby",
+ "testRangeMetaMeta",
+ "testRange2",
+ "testRange3",
+ "testRange4",
+ "testRange5",
+ "testRange6",
+ "testRange7",
+ "testMetaXText",
+ "testMetaXTextCursor",
+ "testMetaXTextAttachToxMark",
+ "testMetaXTextAttachRefMark",
+ "testMetaXTextAttachTextField",
+ "testMetaXTextAttachFootnote",
+ "testMetaXTextAttachMeta",
+ "testMetaFieldXTextField",
+ "testMetaFieldXPropertySet",
+ "testLoadStore",
+ };
+ }
+
+ public void before() throws Exception
+ {
+ m_xMSF = (XMultiServiceFactory) param.getMSF();
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
+ Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
+ m_xContext = (XComponentContext)
+ UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assure("could not get component context.", m_xContext != null);
+ m_xDoc = util.WriterTools.createTextDoc(m_xMSF);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ log.println("tempdir: " + m_TmpDir);
+ }
+
+ public void after()
+ {
+ if (m_xDoc != null) {
+ util.DesktopTools.closeDoc(m_xDoc);
+ m_xDoc = null;
+ }
+ }
+
+ public void testText() throws Exception
+ {
+ TreeNode root = new TreeNode();
+ TreeNode text = new TextNode("abc");
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ public void testTextField() throws Exception
+ {
+ String name = mkName("ruby");
+ TreeNode root = new TreeNode();
+ TreeNode txtf = new TextFieldNode("abc");
+ root.appendChild(txtf);
+ doTest(root);
+ }
+
+ public void testControlChar() throws Exception
+ {
+//FIXME this is converted to a text portion: ControlCharacter is obsolete
+ TreeNode root = new TreeNode();
+ TreeNode cchr = new ControlCharacterNode(HARD_HYPHEN);
+ root.appendChild(cchr);
+ doTest(root);
+ }
+
+ public void testSoftPageBreak() throws Exception
+ {
+//FIXME: insert a soft page break: not done
+ TreeNode root = new TreeNode();
+ TreeNode spbk = new SoftPageBreakNode();
+ TreeNode text = new TextNode("abc");
+ root.appendChild(spbk);
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ public void testFootnote() throws Exception
+ {
+ String name = mkName("ftn");
+ TreeNode root = new TreeNode();
+ TreeNode ftnd = new FootnoteNode(name);
+ root.appendChild(ftnd);
+ doTest(root);
+ }
+
+ public void testFrameAs() throws Exception
+ {
+ String name = mkName("frame");
+ TreeNode root = new TreeNode();
+ TreeNode fram = new FrameNode(name, AS_CHARACTER);
+ root.appendChild(fram);
+ doTest(root);
+ }
+
+ public void testFrameAt() throws Exception
+ {
+ String name = mkName("frame");
+ TreeNode root = new TreeNode();
+// TreeNode text = new TextNode(""); // necessary?
+ TreeNode fram = new FrameNode(name, AT_CHARACTER);
+// root.appendChild(text);
+ root.appendChild(fram);
+ doTest(root);
+ }
+
+ public void testBookmarkPoint() throws Exception
+ {
+ String name = mkName("mark");
+ TreeNode root = new TreeNode();
+ TreeNode bkmk = new BookmarkNode(name);
+ TreeNode text = new TextNode("abc");
+ root.appendChild(bkmk);
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ public void testBookmark() throws Exception
+ {
+ String name = mkName("mark");
+ TreeNode root = new TreeNode();
+ TreeNode bkm1 = new BookmarkStartNode(name);
+ TreeNode text = new TextNode("abc");
+ TreeNode bkm2 = new BookmarkEndNode(name);
+ root.appendChild(bkm1);
+ root.appendChild(text);
+ root.appendChild(bkm2);
+ doTest(root);
+ }
+
+ public void testBookmarkPointXmlId() throws Exception
+ {
+ String name = mkName("mark");
+ StringPair id = mkId("id");
+ TreeNode root = new TreeNode();
+ TreeNode bkmk = new BookmarkNode(name, id);
+ TreeNode text = new TextNode("abc");
+ root.appendChild(bkmk);
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ public void testBookmarkXmlId() throws Exception
+ {
+ String name = mkName("mark");
+ StringPair id = mkId("id");
+ TreeNode root = new TreeNode();
+ TreeNode bkm1 = new BookmarkStartNode(name, id);
+ TreeNode text = new TextNode("abc");
+ TreeNode bkm2 = new BookmarkEndNode(name, id);
+ root.appendChild(bkm1);
+ root.appendChild(text);
+ root.appendChild(bkm2);
+ doTest(root);
+ }
+
+ public void testRefmarkPoint() throws Exception
+ {
+ String name = mkName("refmark");
+ TreeNode root = new TreeNode();
+ TreeNode rfmk = new ReferenceMarkNode(name);
+ TreeNode text = new TextNode("abc");
+ root.appendChild(rfmk);
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ public void testRefmark() throws Exception
+ {
+ String name = mkName("refmark");
+ TreeNode root = new TreeNode();
+ TreeNode rfm1 = new ReferenceMarkStartNode(name);
+ TreeNode text = new TextNode("abc");
+ TreeNode rfm2 = new ReferenceMarkEndNode(name);
+ root.appendChild(rfm1);
+ root.appendChild(text);
+ root.appendChild(rfm2);
+ doTest(root);
+ }
+
+ public void testToxmarkPoint() throws Exception
+ {
+ String name = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ TreeNode txmk = new DocumentIndexMarkNode(name);
+ TreeNode text = new TextNode("abc");
+ root.appendChild(txmk);
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ public void testToxmark() throws Exception
+ {
+ String name = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ TreeNode txm1 = new DocumentIndexMarkStartNode(name);
+ TreeNode text = new TextNode("abc");
+ TreeNode txm2 = new DocumentIndexMarkEndNode(name);
+ root.appendChild(txm1);
+ root.appendChild(text);
+ root.appendChild(txm2);
+ doTest(root);
+ }
+
+ public void testHyperlink() throws Exception
+ {
+ String name = mkName("url");
+ TreeNode root = new TreeNode();
+ TreeNode href = new HyperlinkNode(name);
+ TreeNode text = new TextNode("abc");
+ href.appendChild(text);
+ root.appendChild(href);
+ doTest(root);
+ }
+
+ public void testHyperlinkEmpty() throws Exception
+ {
+ String name = mkName("url");
+ TreeNode root = new TreeNode();
+ TreeNode href = new HyperlinkNode(name);
+ TreeNode text = new TextNode("");
+ href.appendChild(text);
+ root.appendChild(href);
+ doTest(root);
+ }
+
+ public void testRuby() throws Exception
+ {
+ String name = mkName("ruby");
+ TreeNode root = new TreeNode();
+ TreeNode ruby = new RubyNode(name);
+ TreeNode text = new TextNode("abc");
+ ruby.appendChild(text);
+ root.appendChild(ruby);
+ doTest(root);
+ }
+
+ public void testRubyEmpty() throws Exception
+ {
+ // BUG: #i91534#
+ String name = mkName("ruby");
+ TreeNode root = new TreeNode();
+ TreeNode ruby = new RubyNode(name);
+ root.appendChild(ruby);
+ doTest(root);
+ }
+
+ public void testMeta() throws Exception
+ {
+ StringPair id = new StringPair("content.xml", mkName("id"));
+ TreeNode root = new TreeNode();
+ TreeNode meta = new MetaNode(id);
+ TreeNode text = new TextNode("abc");
+ root.appendChild(new TextNode("123"));
+ meta.appendChild(text);
+ root.appendChild(meta);
+ doTest(root);
+ }
+
+ public void testMetaEmpty() throws Exception
+ {
+ StringPair id = new StringPair("content.xml", mkName("id"));
+ TreeNode root = new TreeNode();
+ TreeNode meta = new MetaNode(id);
+// TreeNode text = new TextNode("");
+// meta.appendChild(text);
+ root.appendChild(meta);
+ doTest(root);
+ }
+
+ public void testMetaField() throws Exception
+ {
+ StringPair id = new StringPair("content.xml", mkName("id"));
+ TreeNode root = new TreeNode();
+ TreeNode meta = new MetaFieldNode(id);
+ TreeNode text = new TextNode("abc");
+ root.appendChild(new TextNode("123"));
+ meta.appendChild(text);
+ root.appendChild(meta);
+ doTest(root);
+ }
+
+ public void testMetaFieldEmpty() throws Exception
+ {
+ StringPair id = new StringPair("content.xml", mkName("id"));
+ TreeNode root = new TreeNode();
+ TreeNode meta = new MetaFieldNode(id);
+// TreeNode text = new TextNode("");
+// meta.appendChild(text);
+ root.appendChild(meta);
+ doTest(root);
+ }
+
+ public void testBookmark1() throws Exception
+ {
+ String name1 = mkName("mark");
+ String name2 = mkName("mark");
+ String name3 = mkName("mark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkStartNode(name1) );
+ root.appendChild( new BookmarkNode(name2) );
+ root.appendChild( new BookmarkStartNode(name3) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new BookmarkEndNode(name3) );
+ doTest(root);
+ }
+
+ public void testBookmark2() throws Exception
+ {
+ String name1 = mkName("mark");
+ String name2 = mkName("mark");
+ String name3 = mkName("mark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkStartNode(name1) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkNode(name2) );
+ root.appendChild( new BookmarkStartNode(name3) );
+ root.appendChild( new BookmarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new BookmarkEndNode(name3) );
+ doTest(root);
+ }
+
+ public void testRefMark2() throws Exception
+ {
+ String name1 = mkName("refmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new ReferenceMarkStartNode(name1) );
+ root.appendChild( new TextNode("abc") );
+ // BUG: #i102541# (this is actually not unoportenum's fault)
+ root.appendChild( new ReferenceMarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ doTest(root);
+ }
+
+ public void testRefMark3() throws Exception
+ {
+ String name1 = mkName("refmark");
+ String name2 = mkName("refmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new ReferenceMarkStartNode(name1) );
+ root.appendChild( new ReferenceMarkStartNode(name2) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new ReferenceMarkEndNode(name2) );
+ root.appendChild( new ReferenceMarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ doTest(root);
+ }
+
+ public void testToxMark2() throws Exception
+ {
+ String name1 = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new DocumentIndexMarkStartNode(name1) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new DocumentIndexMarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ doTest(root);
+ }
+
+ public void testToxMark3() throws Exception
+ {
+ String name1 = mkName("toxmark");
+ String name2 = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new DocumentIndexMarkStartNode(name1) );
+ root.appendChild( new DocumentIndexMarkStartNode(name2) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new DocumentIndexMarkEndNode(name2) );
+ root.appendChild( new DocumentIndexMarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ doTest(root);
+ }
+
+ public void testMarks1() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("toxmark");
+ String name3 = mkName("refmark");
+ String name4 = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkStartNode(name1) );
+ root.appendChild( new DocumentIndexMarkNode(name2) );
+ root.appendChild( new ReferenceMarkStartNode(name3) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkEndNode(name1) );
+ root.appendChild( new DocumentIndexMarkStartNode(name4) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new DocumentIndexMarkEndNode(name4) );
+ root.appendChild( new ReferenceMarkEndNode(name3) );
+ doTest(root);
+ }
+
+ public void testMarks2() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("refmark");
+ String name3 = mkName("refmark");
+ String name4 = mkName("toxmark");
+ String name5 = mkName("refmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkStartNode(name1) );
+ root.appendChild( new ReferenceMarkNode(name2) );
+ root.appendChild( new ReferenceMarkStartNode(name3) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new DocumentIndexMarkStartNode(name4) );
+ root.appendChild( new ReferenceMarkStartNode(name5) );
+ // BUG: #i102541# (this is actually not unoportenum's fault)
+ root.appendChild( new ReferenceMarkEndNode(name3) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new DocumentIndexMarkEndNode(name4) );
+ root.appendChild( new BookmarkEndNode(name1) );
+ root.appendChild( new ReferenceMarkEndNode(name5) );
+ doTest(root);
+ }
+
+ public void testMarks3() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("refmark");
+ String name3 = mkName("refmark");
+ String name4 = mkName("toxmark");
+ String name5 = mkName("refmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkStartNode(name1) );
+ root.appendChild( new DocumentIndexMarkNode(name2) );
+ root.appendChild( new DocumentIndexMarkStartNode(name3) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new ReferenceMarkStartNode(name4) );
+ root.appendChild( new DocumentIndexMarkStartNode(name5) );
+ root.appendChild( new DocumentIndexMarkEndNode(name3) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new ReferenceMarkEndNode(name4) );
+ root.appendChild( new BookmarkEndNode(name1) );
+ root.appendChild( new DocumentIndexMarkEndNode(name5) );
+ doTest(root);
+ }
+
+ public void testFrameMark1() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkNode(name1) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new FrameNode(name2, AS_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testFrameMark2() throws Exception
+ {
+ // BUG: #i98530#
+ String name1 = mkName("bookmark");
+ String name2 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkNode(name1) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new FrameNode(name2, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testFrameMark3() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("bookmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new FrameNode(name1, AS_CHARACTER) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new BookmarkNode(name2) );
+ doTest(root);
+ }
+
+ public void testFrameMark4() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("bookmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new FrameNode(name1, AT_CHARACTER) );
+ root.appendChild( new TextNode("de") );
+ root.appendChild( new BookmarkNode(name2) );
+ doTest(root);
+ }
+
+ public void testFrames1() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("frame");
+ String name3 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new FrameNode(name1, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name2, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name3, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testFrames2() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("frame");
+ String name3 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new FrameNode(name1, AS_CHARACTER) );
+ root.appendChild( new FrameNode(name2, AS_CHARACTER) );
+ root.appendChild( new FrameNode(name3, AS_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testFrames3() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("frame");
+ String name3 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new FrameNode(name1, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name2, AS_CHARACTER) );
+ root.appendChild( new FrameNode(name3, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testFrames4() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("frame");
+ String name3 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new FrameNode(name1, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name2, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name3, AS_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testFrames5() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("frame");
+ String name3 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new FrameNode(name1, AS_CHARACTER) );
+ root.appendChild( new FrameNode(name2, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name3, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testRubyHyperlink1() throws Exception
+ {
+ String name1 = mkName("ruby");
+ String name2 = mkName("url");
+ TreeNode root = new TreeNode();
+ TreeNode ruby = new RubyNode(name1);
+ TreeNode href = new HyperlinkNode(name2);
+ href.appendChild( new TextNode("abc") );
+ ruby.appendChild(href);
+ root.appendChild(ruby);
+ doTest(root);
+ }
+
+ public void testRubyHyperlink2() throws Exception
+ {
+ String name1 = mkName("url");
+ String name2 = mkName("ruby");
+ TreeNode root = new TreeNode();
+ TreeNode href = new HyperlinkNode(name1);
+ TreeNode ruby = new RubyNode(name2);
+ ruby.appendChild( new TextNode("abc") );
+ href.appendChild(ruby);
+ root.appendChild(href);
+ doTest(root);
+ }
+
+ public void testEnd1() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("toxmark");
+ String name3 = mkName("refmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkNode(name1) );
+ root.appendChild( new DocumentIndexMarkNode(name2) );
+ root.appendChild( new ReferenceMarkNode(name3) );
+ doTest(root);
+ }
+
+ public void testEnd2() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("frame");
+ String name3 = mkName("refmark");
+ String name4 = mkName("frame");
+ String name5 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new BookmarkNode(name1) );
+ root.appendChild( new FrameNode(name2, AT_CHARACTER) );
+ root.appendChild( new ReferenceMarkNode(name3) );
+ root.appendChild( new FrameNode(name4, AT_CHARACTER) );
+ root.appendChild( new FrameNode(name5, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testEnd3() throws Exception
+ {
+ String name1 = mkName("ftn");
+ String name2 = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new FootnoteNode(name1) );
+ root.appendChild( new DocumentIndexMarkNode(name2) );
+ doTest(root);
+ }
+
+ public void testEnd4() throws Exception
+ {
+ String name1 = mkName("bookmark");
+ String name2 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkStartNode(name1) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new FrameNode(name2, AS_CHARACTER) );
+ root.appendChild( new BookmarkEndNode(name1) );
+ doTest(root);
+ }
+
+ public void testEnd5() throws Exception
+ {
+ String name1 = mkName("refmark");
+ String name2 = mkName("ruby");
+ TreeNode root = new TreeNode();
+ root.appendChild( new ReferenceMarkStartNode(name1) );
+ root.appendChild( new TextNode("abc") );
+ TreeNode ruby = new RubyNode(name2);
+ ruby.appendChild( new TextFieldNode("de") );
+ root.appendChild(ruby);
+ root.appendChild( new ReferenceMarkEndNode(name1) );
+ doTest(root);
+ }
+
+ public void testEmpty1() throws Exception
+ {
+ String name1 = mkName("refmark");
+ String name2 = mkName("toxmark");
+ String name3 = mkName("bookmark");
+ String name4 = mkName("frame");
+ String name7 = mkName("refmark");
+ String name8 = mkName("toxmark");
+ String name9 = mkName("bookmark");
+ String nameA = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new ReferenceMarkNode(name1) );
+ root.appendChild( new DocumentIndexMarkNode(name2) );
+ root.appendChild( new BookmarkNode(name3) );
+ root.appendChild( new FrameNode(name4, AT_CHARACTER) );
+ root.appendChild( new ReferenceMarkNode(name7) );
+ root.appendChild( new DocumentIndexMarkNode(name8) );
+ root.appendChild( new BookmarkNode(name9) );
+ root.appendChild( new FrameNode(nameA, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testEmpty2() throws Exception
+ {
+ String name3 = mkName("bookmark");
+ String name4 = mkName("frame");
+ String name9 = mkName("bookmark");
+ String nameA = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new BookmarkNode(name3) );
+ root.appendChild( new FrameNode(name4, AT_CHARACTER) );
+ root.appendChild( new BookmarkNode(name9) );
+ root.appendChild( new FrameNode(nameA, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void testEmpty3() throws Exception
+ {
+ String name1 = mkName("refmark");
+ String name2 = mkName("toxmark");
+ String name3 = mkName("bookmark");
+ String name4 = mkName("frame");
+ String name5 = mkName("url");
+ String name6 = mkName("ruby");
+ String name7 = mkName("refmark");
+ String name8 = mkName("toxmark");
+ String name9 = mkName("bookmark");
+ String nameA = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new ReferenceMarkNode(name1) );
+ root.appendChild( new DocumentIndexMarkNode(name2) );
+ root.appendChild( new BookmarkNode(name3) );
+ root.appendChild( new FrameNode(name4, AT_CHARACTER) );
+ /* currently empty hyperlinks may get eaten...
+ TreeNode href = new HyperlinkNode(name5);
+ href.appendChild( new TextNode("") );
+ root.appendChild(href);
+ */
+ TreeNode ruby = new RubyNode(name6);
+ root.appendChild(ruby);
+ root.appendChild( new ReferenceMarkNode(name7) );
+ root.appendChild( new DocumentIndexMarkNode(name8) );
+ root.appendChild( new BookmarkNode(name9) );
+ root.appendChild( new FrameNode(nameA, AT_CHARACTER) );
+ doTest(root);
+ }
+
+ public void test1() throws Exception
+ {
+ String name1 = mkName("frame");
+ String name2 = mkName("bookmark");
+ String name3 = mkName("ruby");
+ String name4 = mkName("ftn");
+ String name5 = mkName("frame");
+ TreeNode root = new TreeNode();
+ root.appendChild( new FrameNode(name1, AT_CHARACTER) );
+ root.appendChild( new BookmarkStartNode(name2) );
+ root.appendChild( new TextNode("abc") );
+ TreeNode ruby = new RubyNode(name3);
+ ruby.appendChild( new TextNode("de") );
+ ruby.appendChild( new FootnoteNode(name4) );
+ ruby.appendChild( new BookmarkEndNode(name2) );
+ root.appendChild(ruby);
+ root.appendChild( new TextNode("fg") );
+ root.appendChild( new FrameNode(name5, AT_CHARACTER) );
+ root.appendChild( new TextFieldNode("h") );
+ doTest(root);
+ }
+
+ /* some range tests for the insertion: these are for the current
+ API which treats hyperlinks and rubys not as entities, but as formatting
+ attributes; if these ever become entities, they should not be split!
+ */
+
+ public void testRange1() throws Exception
+ {
+ String name1 = mkName("url");
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("12345");
+ inserter.insertRange(new Range(0, 0, text));
+ TreeNode url1 = new HyperlinkNode(name1);
+ Range range1 = new Range(0, 5, url1);
+ inserter.insertRange(range1);
+ TreeNode root = new TreeNode();
+ root.appendChild( url1 );
+ url1.appendChild( text );
+ doTest(root, false);
+ }
+
+ public void testRangeHyperlinkHyperlink() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode url1 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(1, 4, url1) );
+ // overlap left
+ TreeNode url2 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(0, 2, url2) );
+ TreeNode root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( url1.dup().appendChild( new TextNode("34") ) )
+ .appendChild( new TextNode("56789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode url3 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(3, 7, url3) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( url3.dup().appendChild( new TextNode("4567") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ // around
+ TreeNode url4 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(3, 7, url4) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( url4.dup().appendChild( new TextNode("4567") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ // inside
+ TreeNode url5 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(4, 6, url5) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( url4.dup().appendChild( new TextNode("4") ) )
+ .appendChild( url5.dup().appendChild( new TextNode("56") ) )
+ .appendChild( url4.dup().appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ }
+
+ public void testRangeHyperlinkRuby() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode url1 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(1, 4, url1) );
+ // overlap left
+ TreeNode rby2 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 2, rby2) );
+ TreeNode root = new TreeNode()
+ .appendChild( rby2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( url1.dup().appendChild( new TextNode("34") ) )
+ .appendChild( new TextNode("56789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode rby3 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(3, 5, rby3) );
+ root = new TreeNode()
+ .appendChild( rby2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( rby3.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // around
+ TreeNode rby4 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(2, 3, rby4) );
+ root = new TreeNode()
+ .appendChild( rby2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( rby4.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) ) )
+ .appendChild( rby3.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // inside
+ TreeNode url5 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(6, 9, url5) );
+ TreeNode rby6 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(7, 8, rby6) );
+ root = new TreeNode()
+ .appendChild( rby2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( rby4.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) ) )
+ .appendChild( rby3.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6") )
+ .appendChild( url5.dup().appendChild( new TextNode("7") ) )
+ .appendChild( rby6.dup()
+ .appendChild( url5.dup().appendChild( new TextNode("8") ) ) )
+ .appendChild( url5.dup().appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ }
+
+ public void testRangeRubyHyperlink() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode rby1 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(1, 6, rby1) );
+ // overlap left
+ TreeNode url2 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(0, 3, url2) );
+ TreeNode root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby1.dup()
+ .appendChild( url2.dup().appendChild( new TextNode("23") ) )
+ .appendChild( new TextNode("456") ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode url3 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(5, 7, url3) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby1.dup()
+ .appendChild( url2.dup().appendChild( new TextNode("23") ) )
+ .appendChild( new TextNode("45") )
+ .appendChild( url3.dup().appendChild( new TextNode("6") ) ) )
+ .appendChild( url3.dup().appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ // around (not quite, due to API)
+ TreeNode url4 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(1, 8, url4) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby1.dup()
+ .appendChild( url4.dup()
+ .appendChild( new TextNode("23456") ) ) )
+ .appendChild( url4.dup().appendChild( new TextNode("78") ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ // inside
+ TreeNode url5 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(3, 5, url5) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby1.dup()
+ .appendChild( url4.dup()
+ .appendChild( new TextNode("23") ) )
+ .appendChild( url5.dup()
+ .appendChild( new TextNode("45") ) )
+ .appendChild( url4.dup()
+ .appendChild( new TextNode("6") ) ) )
+ .appendChild( url4.dup().appendChild( new TextNode("78") ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ }
+
+ public void testRangeRubyRuby() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode rby1 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(1, 4, rby1) );
+ // overlap left
+ TreeNode rby2 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 2, rby2) );
+ TreeNode root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( rby1.dup().appendChild( new TextNode("34") ) )
+ .appendChild( new TextNode("56789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode rby3 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(3, 7, rby3) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( rby1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( rby3.dup().appendChild( new TextNode("4567") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ // around
+ TreeNode rby4 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(3, 7, rby4) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( rby1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( rby4.dup().appendChild( new TextNode("4567") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ // inside
+ TreeNode rby5 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(4, 6, rby5) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("12") ) )
+ .appendChild( rby1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( rby4.dup().appendChild( new TextNode("4") ) )
+ .appendChild( rby5.dup().appendChild( new TextNode("56") ) )
+ .appendChild( rby4.dup().appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ }
+
+ public void testRangeHyperlinkMeta() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode url1 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(1, 4, url1) );
+ // overlap left
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(0, 2, met2) );
+ TreeNode root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( url1.dup().appendChild( new TextNode("34") ) )
+ .appendChild( new TextNode("56789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode met3 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(4/*-1*/, 6/*-1*/, met3) );
+ root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( met3.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // around
+ TreeNode met4 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3/*-1*/, 4/*-1*/, met4) );
+ root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( met4.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) ) )
+ .appendChild( met3.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // inside
+ TreeNode url5 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(9/*-3*/, 12/*-3*/, url5) );
+ TreeNode met6 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(10/*-3*/, 11/*-3*/, met6) );
+ root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( met4.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("3") ) ) )
+ .appendChild( met3.dup()
+ .appendChild( url1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6") )
+ .appendChild( url5.dup().appendChild( new TextNode("7") ) )
+ .appendChild( met6.dup()
+ .appendChild( url5.dup().appendChild( new TextNode("8") ) ) )
+ .appendChild( url5.dup().appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ }
+
+ public void testRangeRubyMeta() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode rby1 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(1, 4, rby1) );
+ // overlap left
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(0, 2, met2) );
+ TreeNode root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( rby1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( rby1.dup().appendChild( new TextNode("34") ) )
+ .appendChild( new TextNode("56789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode met3 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(4/*-1*/, 6/*-1*/, met3) );
+ root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( rby1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( rby1.dup().appendChild( new TextNode("3") ) )
+ .appendChild( met3.dup()
+ .appendChild( rby1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // around
+ TreeNode met4 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3/*-1*/, 4/*-1*/, met4) );
+ root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( rby1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( met4.dup()
+ .appendChild( rby1.dup().appendChild( new TextNode("3") ) ) )
+ .appendChild( met3.dup()
+ .appendChild( rby1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // inside
+ TreeNode rby5 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(9/*-3*/, 12/*-3*/, rby5) );
+ TreeNode met6 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(10/*-3*/, 11/*-3*/, met6) );
+ root = new TreeNode()
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( rby1.dup().appendChild( new TextNode("2") ) ) )
+ .appendChild( met4.dup()
+ .appendChild( rby1.dup().appendChild( new TextNode("3") ) ) )
+ .appendChild( met3.dup()
+ .appendChild( rby1.dup().appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6") )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("7") )
+ .appendChild( met6.dup()
+ .appendChild( new TextNode("8") ) )
+ .appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ }
+
+ public void testRangeMetaHyperlink() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode met1 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(1, 6, met1) );
+ // overlap left
+ TreeNode url2 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(0, 4/*-1*/, url2) );
+ TreeNode root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( url2.dup().appendChild( new TextNode("23") ) )
+ .appendChild( new TextNode("456") ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode url3 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(6/*-1*/, 8/*-1*/, url3) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( url2.dup().appendChild( new TextNode("23") ) )
+ .appendChild( new TextNode("45") )
+ .appendChild( url3.dup().appendChild( new TextNode("6") ) ) )
+ .appendChild( url3.dup().appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ // around (not quite, due to API)
+ TreeNode url4 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(1, 9/*-1*/, url4) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( url4.dup()
+ .appendChild( new TextNode("23456") ) ) )
+ .appendChild( url4.dup().appendChild( new TextNode("78") ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ // inside
+ TreeNode url5 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(4/*-1*/, 6/*-1*/, url5) );
+ root = new TreeNode()
+ .appendChild( url2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( url4.dup()
+ .appendChild( new TextNode("23") ) )
+ .appendChild( url5.dup()
+ .appendChild( new TextNode("45") ) )
+ .appendChild( url4.dup()
+ .appendChild( new TextNode("6") ) ) )
+ .appendChild( url4.dup().appendChild( new TextNode("78") ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ }
+
+ public void testRangeMetaRuby() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode met1 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(1, 5, met1) );
+ // overlap left
+ TreeNode rby2 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 3/*-1*/, rby2) );
+ TreeNode root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( rby2.dup().appendChild( new TextNode("2") ) )
+ .appendChild( new TextNode("345") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode rby3 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(5/*-1*/, 7/*-1*/, rby3) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( rby2.dup().appendChild( new TextNode("2") ) )
+ .appendChild( new TextNode("34") )
+ .appendChild( rby3.dup().appendChild( new TextNode("5") ) ) )
+ .appendChild( rby3.dup().appendChild( new TextNode("6") ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // around
+ TreeNode rby4 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(1, 7/*-1*/, rby4) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby4.dup()
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2345") ) )
+ .appendChild( new TextNode("6") ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // inside
+ TreeNode met5 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(7/*-1*/, 9/*-1*/, met5) );
+ TreeNode rby6 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(9/*-2*/, 10/*-2*/, rby6) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby4.dup()
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2345") ) )
+ .appendChild( new TextNode("6") ) )
+ .appendChild( met5.dup()
+ .appendChild( new TextNode("7") )
+ .appendChild( rby6.dup()
+ .appendChild( new TextNode("8") ) ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ // inside, with invalid range that includes the dummy char
+ TreeNode rby7 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(7/*-1*/, 9/*-2*/, rby7) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby4.dup()
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2345") ) )
+ .appendChild( new TextNode("6") ) )
+ .appendChild( met5.dup()
+ .appendChild( rby7.dup()
+ .appendChild( new TextNode("7") ) )
+ .appendChild( rby6.dup()
+ .appendChild( new TextNode("8") ) ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ // around, at same position as meta
+ TreeNode rby8 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(7/*-1*/, 10/*-2*/, rby8) );
+ root = new TreeNode()
+ .appendChild( rby2.dup().appendChild( new TextNode("1") ) )
+ .appendChild( rby4.dup()
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2345") ) )
+ .appendChild( new TextNode("6") ) )
+ .appendChild( rby8.dup()
+ .appendChild( met5.dup()
+ .appendChild( new TextNode("78") ) ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ }
+
+ public void testRangeMetaMeta() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode met1 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3, 6, met1) );
+ // overlap left
+ TreeNode met2 = new MetaNode( mkId("id") );
+ try {
+ inserter.insertRange( new Range(0, 4, met2) );
+ assure("testRangeMetaMeta: overlap left allowed", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("123") )
+ .appendChild( met1.dup().appendChild( new TextNode("456") ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // overlap right
+ TreeNode met3 = new MetaNode( mkId("id") );
+ try {
+ inserter.insertRange( new Range(5/*-1*/, 8/*-1*/, met3) );
+ assure("testRangeMetaMeta: overlap right allowed", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+ root = new TreeNode()
+ .appendChild( new TextNode("123") )
+ .appendChild( met1.dup().appendChild( new TextNode("456") ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // around
+ TreeNode met4 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3, 7/*-1*/, met4) );
+ root = new TreeNode()
+ .appendChild( new TextNode("123") )
+ .appendChild( met4.dup()
+ .appendChild( met1.dup().appendChild( new TextNode("456") ) ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ // inside
+ TreeNode met5 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(6/*-2*/, 8/*-2*/, met5) );
+ root = new TreeNode()
+ .appendChild( new TextNode("123") )
+ .appendChild( met4.dup()
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("4") )
+ .appendChild( met5.dup()
+ .appendChild( new TextNode("56") ) ) ) )
+ .appendChild( new TextNode("789") );
+ doTest(root, false);
+ }
+
+ public void testRange2() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode met1 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(1, 8, met1) );
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3/*-1*/, 8/*-1*/, met2) );
+ TreeNode met3 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(5/*-2*/, 8/*-2*/, met3) );
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("1") )
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2") )
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("3") )
+ .appendChild( met3.dup()
+ .appendChild( new TextNode("456") ) )
+ .appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("8") ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ // split ruby at every meta start!
+ TreeNode rby4 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 7/*-3*/, rby4) );
+ root = new TreeNode()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("2") ) )
+ .appendChild( met2.dup()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("3") ) )
+ .appendChild( met3.dup()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("56") ) )
+ .appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("8") ) )
+ .appendChild( new TextNode("9") );
+ doTest(root, false);
+ // split ruby at every meta end!
+ TreeNode rby5 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(8/*-3*/, 12/*-3*/, rby5) );
+ root = new TreeNode()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("1") ) )
+ .appendChild( met1.dup()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("2") ) )
+ .appendChild( met2.dup()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("3") ) )
+ .appendChild( met3.dup()
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("4") ) )
+ .appendChild( new TextNode("5") )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("6") ) ) )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("7") ) ) )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("8") ) ) )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ }
+
+ public void testRange3() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode rby1 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 9, rby1) );
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(2, 7, met2) );
+ TreeNode root = new TreeNode()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("12") )
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("34567") ) )
+ .appendChild( new TextNode("89") ) );
+ doTest(root, false);
+ // overwrite outer ruby, split remains at inner meta!
+ TreeNode rby3 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(5/*-1*/, 6/*-1*/, rby3) );
+ root = new TreeNode()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("12") ) )
+ .appendChild( met2.dup()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("34") ) )
+ .appendChild( rby3.dup()
+ .appendChild( new TextNode("5") ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("67") ) ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("89") ) );
+ doTest(root, false);
+ }
+
+ public void testRange4() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode rby1 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 9, rby1) );
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(1, 8, met2) );
+ TreeNode met3 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3/*-1*/, 8/*-1*/, met3) );
+ TreeNode met4 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(5/*-2*/, 8/*-2*/, met4) );
+ TreeNode root = new TreeNode()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("2") )
+ .appendChild( met3.dup()
+ .appendChild( new TextNode("3") )
+ .appendChild( met4.dup()
+ .appendChild( new TextNode("456") ) )
+ .appendChild( new TextNode("7") ) )
+ .appendChild( new TextNode("8") ) )
+ .appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ // overwrite outer ruby, split remains at every inner meta!
+ TreeNode rby5 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(7/*-3*/, 8/*-3*/, rby5) );
+ root = new TreeNode()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("1") ) )
+ .appendChild( met2.dup()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("2") ) )
+ .appendChild( met3.dup()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("3") ) )
+ .appendChild( met4.dup()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("4") ) )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("5") ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("6") ) ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("7") ) ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("8") ) ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ }
+
+ public void testRange5() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode rby1 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(0, 9, rby1) );
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(1, 3, met2) );
+ TreeNode met3 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(5/*-1*/, 6/*-1*/, met3) );
+ TreeNode met4 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(8/*-2*/, 10/*-2*/, met4) );
+ TreeNode root = new TreeNode()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("1") )
+ .appendChild( met2.dup().appendChild( new TextNode("23") ) )
+ .appendChild( new TextNode("4") )
+ .appendChild( met3.dup().appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6") )
+ .appendChild( met4.dup().appendChild( new TextNode("78") ) )
+ .appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ // overwrite outer ruby, but split at inner metas!
+ TreeNode rby5 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(3/*-1*/, 10/*-3*/, rby5) );
+ root = new TreeNode()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("1") ) )
+ .appendChild( met2.dup()
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("2") ) )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("3") ) ) )
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("4") )
+ .appendChild( met3.dup()
+ .appendChild( new TextNode("5") ) )
+ .appendChild( new TextNode("6") ) )
+ .appendChild( met4.dup()
+ .appendChild( rby5.dup()
+ .appendChild( new TextNode("7") ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("8") ) ) )
+ .appendChild( rby1.dup()
+ .appendChild( new TextNode("9") ) );
+ doTest(root, false);
+ }
+
+ public void testRange6() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode met1 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(1, 5, met1) );
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3/*-1*/, 6/*-1*/, met2) );
+ TreeNode met3 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(5/*-2*/, 7/*-2*/, met3) );
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("1") )
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2") )
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("3") )
+ .appendChild( met3.dup()
+ .appendChild( new TextNode("45") ) ) ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // split at 3 metas, all at same position
+ TreeNode rby4 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(7/*-3*/, 10/*-3*/, rby4) );
+ root = new TreeNode()
+ .appendChild( new TextNode("1") )
+ .appendChild( met1.dup()
+ .appendChild( new TextNode("2") )
+ .appendChild( met2.dup()
+ .appendChild( new TextNode("3") )
+ .appendChild( met3.dup()
+ .appendChild( new TextNode("4") )
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("5") ) ) ) ) )
+ .appendChild( rby4.dup()
+ .appendChild( new TextNode("67") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ }
+
+ public void testRange7() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ TreeNode url1 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(1, 5, url1) );
+ TreeNode met2 = new MetaNode( mkId("id") );
+ inserter.insertRange( new Range(3, 5, met2) );
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup()
+ .appendChild( new TextNode("23") ) )
+ .appendChild( met2.dup()
+ .appendChild( url1.dup()
+ .appendChild( new TextNode("45") ) ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ // this should result in not splitting the hyperlink, but due to API
+ // we can't tell :(
+ TreeNode rby3 = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(5/*-1*/, 8/*-1*/, rby3) );
+ root = new TreeNode()
+ .appendChild( new TextNode("1") )
+ .appendChild( url1.dup()
+ .appendChild( new TextNode("23") ) )
+ .appendChild( met2.dup()
+ .appendChild( url1.dup()
+ .appendChild( new TextNode("4") ) )
+ .appendChild( rby3.dup()
+ .appendChild( url1.dup()
+ .appendChild( new TextNode("5") ) ) ) )
+ .appendChild( rby3.dup()
+ .appendChild( new TextNode("67") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ }
+
+ /* TODO: test partial selection, test UNDO/REDO */
+
+ /** test SwXMeta XText interface */
+ public void testMetaXText() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("12AB6789");
+ inserter.insertRange( new Range(0, 0, text) );
+ MetaNode meta = new MetaNode( mkId("id") );
+// inserter.insertRange( new Range(3, 5, met2) );
+ XTextContent xMeta = inserter.makeMeta();
+
+ XText xDocText = m_xDoc.getText();
+ XTextCursor xDocTextCursor = xDocText.createTextCursor();
+ xDocTextCursor.goRight((short)3, false);
+ xDocTextCursor.goRight((short)2, true);
+ xDocText.insertTextContent(xDocTextCursor, xMeta, true);
+// xMeta.attach(xDocTextCursor);
+
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xMeta);
+ xMetadatable.setMetadataReference(meta.getXmlId());
+ XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
+
+ XText xParentText = xText.getText();
+ assure("getText(): no parent", xParentText != null);
+
+ XTextRange xStart = xText.getStart();
+ assure("getStart(): no start", xStart != null);
+
+ XTextRange xEnd = xText.getEnd();
+ assure("getEnd(): no end", xEnd != null);
+
+ /*
+ String string = xText.getString();
+ assure("getString(): invalid string returned",
+ string != null && "AB".equals(string) );
+ */
+
+ xText.setString("45");
+
+ {
+ String string = xText.getString();
+ assure("getString(): invalid string returned: " + string,
+ string != null && "45".equals(string) );
+ }
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ assure("createTextCursor(): failed", xTextCursor != null);
+
+ try {
+ xText.createTextCursorByRange(null);
+ assure("createTextCursorByRange(): null allowed?", false);
+ } catch (RuntimeException e) { /* expected */ }
+
+ XTextCursor xTextCursorStart = xText.createTextCursorByRange(xStart);
+ assure("createTextCursorByRange(): failed for start",
+ xTextCursorStart != null);
+
+ XTextCursor xTextCursorEnd = xText.createTextCursorByRange(xEnd);
+ assure("createTextCursorByRange(): failed for end",
+ xTextCursorEnd != null);
+
+ // move outside meta
+ xDocTextCursor.gotoStart(false);
+
+ try {
+ xText.insertString(null, "foo", false);
+ assure("insertString(): null allowed?", false);
+ } catch (RuntimeException e) { /* expected */ }
+
+ try {
+ xText.insertString(xDocTextCursor, "foo", false);
+ assure("insertString(): cursor outside allowed?", false);
+ } catch (RuntimeException e) { /* expected */ }
+
+ xStart = xText.getStart();
+ xText.insertString(xStart, "A", false);
+ {
+ String string = xText.getString();
+ assure("getString(): invalid string returned: " + string,
+ string != null && "A45".equals(string) );
+ }
+
+ xText.insertString(xEnd, "B", false);
+ {
+ String string = xText.getString();
+ assure("getString(): invalid string returned: " + string,
+ string != null && "A45B".equals(string) );
+ }
+
+ try {
+ xText.insertControlCharacter(null, HARD_HYPHEN, false);
+ assure("insertControlCharacter(): null allowed?", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ xStart = xText.getStart();
+ try {
+ xText.insertControlCharacter(xDocTextCursor, HARD_HYPHEN, false);
+ assure("insertControlCharacter(): cursor outside allowed?", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ xText.insertControlCharacter(xStart, HARD_HYPHEN, false);
+ {
+ String string = xText.getString();
+ assure("getString(): invalid string returned: " + string,
+ string != null && ('\u2011' + "A45B").equals(string) );
+ }
+
+ xText.insertControlCharacter(xEnd, HARD_HYPHEN, false);
+ {
+ String string = xText.getString();
+ assure("getString(): invalid string returned: " + string,
+ string != null &&
+ ('\u2011' + "A45B" + '\u2011').equals(string) );
+ }
+
+ xText.setString("45");
+
+ try {
+ xText.insertTextContent(null, xMeta, false);
+ assure("insertTextContent(): null range allowed?", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ try {
+ xText.insertTextContent(xStart, null, false);
+ assure("insertTextContent(): null content allowed?", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ try {
+ xText.insertTextContent(xDocTextCursor, xMeta, false);
+ assure("insertTextContent(): cursor outside allowed?", false);
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ TextFieldNode field1 = new TextFieldNode( "f1" );
+ TextFieldNode field2 = new TextFieldNode( "f2" );
+ XTextContent xField1 = inserter.makeTextField(field1.getContent());
+ XTextContent xField2 = inserter.makeTextField(field2.getContent());
+
+ xStart = xText.getStart();
+ xText.insertTextContent(xStart, xField1, false);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( meta.dup()
+ .appendChild( field1.dup() )
+ .appendChild( new TextNode("45") ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+
+ xText.insertTextContent(xEnd, xField2, false);
+
+ root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( meta.dup()
+ .appendChild( field1.dup() )
+ .appendChild( new TextNode("45") )
+ .appendChild( field2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+
+ try {
+ xText.removeTextContent(null);
+ assure("removeTextContent(): null content allowed?", false);
+ } catch (RuntimeException e) { /* expected */ }
+
+ xText.removeTextContent(xField1);
+
+ XTextRange xAnchor = xMeta.getAnchor();
+ assure("getAnchor(): null", xAnchor != null);
+
+ // evil test case: insert ruby around meta
+ RubyNode ruby = new RubyNode( mkName("ruby") );
+ inserter.insertRange( new Range(2, 6, ruby) );
+
+ /* prevent caching...
+ root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( ruby.dup()
+ .appendChild( meta.dup()
+ .appendChild( new TextNode("45") )
+ .appendChild( field2.dup() ) ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ */
+
+ XEnumerationAccess xEA = (XEnumerationAccess)
+ UnoRuntime.queryInterface(XEnumerationAccess.class, xMeta);
+ XEnumeration xEnum = xEA.createEnumeration();
+ assure("createEnumeration(): returns null", xEnum != null);
+ {
+ assure("hasNext(): first missing", xEnum.hasMoreElements());
+ Object xElement = xEnum.nextElement();
+ XTextRange xPortion = (XTextRange)
+ UnoRuntime.queryInterface(XTextRange.class, xElement);
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xPortion);
+ String type = (String) xPropSet.getPropertyValue("TextPortionType");
+ assure("first: not text", type.equals("Text"));
+ String txt = xPortion.getString();
+ assure("first: text differs: " + txt, "45".equals(txt));
+ }
+ {
+ assure("hasNext(): second missing", xEnum.hasMoreElements());
+ Object xElement = xEnum.nextElement();
+ XTextRange xPortion = (XTextRange)
+ UnoRuntime.queryInterface(XTextRange.class, xElement);
+ XPropertySet xPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xPortion);
+ String type = (String) xPropSet.getPropertyValue("TextPortionType");
+ assure("second: not text", type.equals("TextField"));
+ }
+ // no ruby end here!!!
+ assure("hasNext(): more elements?", !xEnum.hasMoreElements());
+
+ XComponent xComponent = (XComponent)
+ UnoRuntime.queryInterface(XComponent.class, xMeta);
+ xComponent.dispose();
+
+ try {
+ XTextCursor xCursor = xText.createTextCursor();
+ assure("createTextCursor(): succeeds on disposed object?",
+ xCursor == null);
+ } catch (RuntimeException e) { /* expected */ }
+ }
+
+ /** check that cursor move methods move to positions in the meta,
+ but do not move to positions outside the meta. */
+ public void testMetaXTextCursor() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("Text. 12 More text here.");
+ inserter.insertRange( new Range(0, 0, text) );
+ MetaNode met1 = new MetaNode( mkId("id") );
+ XTextContent xMeta = inserter.makeMeta();
+
+ XText xDocText = m_xDoc.getText();
+ XTextCursor xDocTextCursor = xDocText.createTextCursor();
+ xDocTextCursor.goRight((short)7, false);
+ xDocTextCursor.goRight((short)2, true);
+ xDocText.insertTextContent(xDocTextCursor, xMeta, true);
+ xDocTextCursor.gotoStart(true);
+
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xMeta);
+ xMetadatable.setMetadataReference(met1.getXmlId());
+ XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
+
+ XTextRange xStart = xText.getStart();
+ assure("getStart(): no start", xStart != null);
+ XTextRange xEnd = xText.getEnd();
+ assure("getEnd(): no end", xEnd != null);
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ assure("createTextCursor(): no cursor", xTextCursor != null);
+
+ // XTextCursor
+ boolean bSuccess = false;
+ xTextCursor.gotoStart(false);
+ xTextCursor.gotoEnd(false);
+ bSuccess = xTextCursor.goLeft((short)1, false);
+ assure("goLeft(): failed", bSuccess);
+ bSuccess = xTextCursor.goLeft((short)1000, false);
+ assure("goLeft(): succeeded", !bSuccess);
+ bSuccess = xTextCursor.goRight((short)1, false);
+ assure("goRight(): failed", bSuccess);
+ bSuccess = xTextCursor.goRight((short)1000, false);
+ assure("goRight(): succeeded", !bSuccess);
+ xTextCursor.gotoRange(xStart, false);
+ xTextCursor.gotoRange(xEnd, false);
+ try {
+ xTextCursor.gotoRange(xDocTextCursor, false);
+ assure("gotoRange(): succeeded", false);
+ } catch (RuntimeException e) { /* expected */ }
+
+ // XWordCursor
+ xText.setString("Two words");
+ xTextCursor.gotoStart(false);
+ XWordCursor xWordCursor = (XWordCursor)
+ UnoRuntime.queryInterface(XWordCursor.class, xTextCursor);
+
+ bSuccess = xWordCursor.gotoNextWord(true);
+ assure("gotoNextWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoNextWord(): wrong string: " + string,
+ "Two ".equals(string));
+ }
+ bSuccess = xWordCursor.gotoNextWord(false);
+ assure("gotoNextWord(): succeeded", !bSuccess);
+ xTextCursor.collapseToEnd();
+ bSuccess = xWordCursor.gotoPreviousWord(true);
+ assure("gotoPreviousWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoPreviousWord(): wrong string: " + string,
+ "words".equals(string));
+ }
+ bSuccess = xWordCursor.gotoPreviousWord(false);
+ assure("gotoPreviousWord(): succeeded", !bSuccess);
+ bSuccess = xWordCursor.gotoEndOfWord(true);
+ assure("gotoEndOfWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoEndOfWord(): wrong string: " + string,
+ "Two".equals(string));
+ }
+ xTextCursor.gotoEnd(false);
+ bSuccess = xWordCursor.gotoStartOfWord(true);
+ assure("gotoStartOfWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoStartOfWord(): wrong string: " + string,
+ "words".equals(string));
+ }
+ xText.setString("");
+ bSuccess = xWordCursor.gotoEndOfWord(false);
+ assure("gotoEndOfWord(): succeeded", !bSuccess);
+ bSuccess = xWordCursor.gotoStartOfWord(false);
+ assure("gotoStartOfWord(): succeeded", !bSuccess);
+
+ // XSentenceCursor
+ xText.setString("This is a sentence. Another sentence.");
+ xTextCursor.gotoStart(false);
+ XSentenceCursor xSentenceCursor = (XSentenceCursor)
+ UnoRuntime.queryInterface(XSentenceCursor.class, xTextCursor);
+
+ bSuccess = xSentenceCursor.gotoNextSentence(true);
+ assure("gotoNextSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoNextSentence(): wrong string: " + string,
+ "This is a sentence. ".equals(string));
+ }
+ bSuccess = xSentenceCursor.gotoNextSentence(false);
+ assure("gotoNextSentence(): succeeded", !bSuccess);
+ // FIXME:
+ // the sentence cursor seems to work differently than the word cursor
+ xText.setString("This is a sentence. Another sentence. Sentence 3.");
+ xTextCursor.gotoEnd(false);
+ bSuccess = xSentenceCursor.gotoPreviousSentence(true);
+ assure("gotoPreviousSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoPreviousSentence(): wrong string: " + string,
+ "Another sentence. Sentence 3.".equals(string));
+ }
+ bSuccess = xSentenceCursor.gotoPreviousSentence(false);
+ assure("gotoPreviousSentence(): succeeded", !bSuccess);
+ bSuccess = xSentenceCursor.gotoEndOfSentence(true);
+ assure("gotoEndOfSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoEndOfSentence(): wrong string: " + string,
+ "This is a sentence.".equals(string));
+ }
+ xTextCursor.gotoEnd(false);
+ bSuccess = xSentenceCursor.gotoStartOfSentence(true);
+ assure("gotoStartOfSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assure("gotoStartOfSentence(): wrong string: " + string,
+ "Sentence 3.".equals(string));
+ }
+ xText.setString("");
+ bSuccess = xSentenceCursor.gotoEndOfSentence(false);
+ assure("gotoEndOfSentence(): succeeded", !bSuccess);
+ bSuccess = xSentenceCursor.gotoStartOfSentence(false);
+ assure("gotoStartOfSentence(): succeeded", !bSuccess);
+
+ XParagraphCursor xParagraphCursor = (XParagraphCursor)
+ UnoRuntime.queryInterface(XParagraphCursor.class, xTextCursor);
+
+ // XParagraphCursor (does not make sense)
+ bSuccess = xParagraphCursor.gotoNextParagraph(false);
+ assure("gotoNextParagraph(): succeeded", !bSuccess);
+ bSuccess = xParagraphCursor.gotoPreviousParagraph(false);
+ assure("gotoPreviousParagraph(): succeeded", !bSuccess);
+ bSuccess = xParagraphCursor.gotoStartOfParagraph(false);
+ assure("gotoStartOfParagraph(): succeeded", !bSuccess);
+ bSuccess = xParagraphCursor.gotoEndOfParagraph(false);
+ assure("gotoEndOfParagraph(): succeeded", !bSuccess);
+ }
+
+
+ abstract class AttachHelper
+ {
+ abstract boolean isAttribute();
+ abstract TreeNode mkTreeNode();
+ abstract XTextContent mkTextContent(Inserter inserter, TreeNode node)
+ throws Exception;
+ void postInserted(TreeNode node, XTextContent xContent)
+ throws Exception { }
+ }
+
+ public void testMetaXTextAttachToxMark() throws Exception
+ {
+ doMetaXTextAttach( new AttachHelper()
+ {
+ boolean isAttribute() { return true; }
+ TreeNode mkTreeNode() {
+ return new DocumentIndexMarkNode( mkName("toxmark") );
+ }
+ XTextContent mkTextContent(Inserter inserter, TreeNode node)
+ throws Exception {
+ return inserter.makeDocumentIndexMark(
+ ((DocumentIndexMarkNode)node).getName());
+ }
+ });
+ }
+
+ public void testMetaXTextAttachRefMark() throws Exception
+ {
+ doMetaXTextAttach( new AttachHelper()
+ {
+ boolean isAttribute() { return true; }
+ TreeNode mkTreeNode() {
+ return new ReferenceMarkNode( mkName("refmark") );
+ }
+ XTextContent mkTextContent(Inserter inserter, TreeNode node)
+ throws Exception {
+ return inserter.makeReferenceMark(
+ ((ReferenceMarkNode)node).getName());
+ }
+ });
+ }
+
+ public void testMetaXTextAttachTextField() throws Exception
+ {
+ doMetaXTextAttach( new AttachHelper()
+ {
+ boolean isAttribute() { return false; }
+ TreeNode mkTreeNode() {
+ return new TextFieldNode( mkName("field") );
+ }
+ XTextContent mkTextContent(Inserter inserter, TreeNode node)
+ throws Exception {
+ return inserter.makeTextField(
+ ((TextFieldNode)node).getContent());
+ }
+ });
+ }
+
+ public void testMetaXTextAttachFootnote() throws Exception
+ {
+ doMetaXTextAttach( new AttachHelper()
+ {
+ boolean isAttribute() { return false; }
+ TreeNode mkTreeNode() {
+ return new FootnoteNode( mkName("ftn") );
+ }
+ XTextContent mkTextContent(Inserter inserter, TreeNode node)
+ throws Exception {
+ return inserter.makeFootnote(
+ ((FootnoteNode)node).getLabel());
+ }
+ });
+ }
+
+ public void testMetaXTextAttachMeta() throws Exception
+ {
+ doMetaXTextAttach( new AttachHelper()
+ {
+ boolean isAttribute() { return true; }
+ TreeNode mkTreeNode() {
+ return new MetaNode( mkId("id") );
+ }
+ XTextContent mkTextContent(Inserter inserter, TreeNode node)
+ throws Exception {
+ return inserter.makeMeta();
+ }
+ void postInserted(TreeNode node, XTextContent xContent)
+ throws Exception {
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xContent);
+ xMetadatable.setMetadataReference(
+ ((MetaNode)node).getXmlId());
+ }
+ });
+ }
+
+ void doMetaXTextAttach(AttachHelper helper) throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("12AB6789");
+ inserter.insertRange( new Range(0, 0, text) );
+ MetaNode met1 = new MetaNode( mkId("id") );
+ XTextContent xMeta = inserter.makeMeta();
+
+ XText xDocText = m_xDoc.getText();
+ XTextCursor xDocTextCursor = xDocText.createTextCursor();
+ xDocTextCursor.goRight((short)3, false);
+ xDocTextCursor.goRight((short)2, true);
+ xDocText.insertTextContent(xDocTextCursor, xMeta, true);
+
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xMeta);
+ xMetadatable.setMetadataReference(met1.getXmlId());
+ XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
+ XTextRange xStart = null;
+ XTextRange xEnd = null;
+
+ {
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ // insertTextContent with meta getStart()/getEnd()
+ xText.insertTextContent(xStart, xContent1, false);
+ xText.insertTextContent(xEnd , xContent2, false);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ {
+ xText.setString("AB");
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ xTextCursor.gotoStart(false);
+
+ // insertTextContent with meta cursor
+ xText.insertTextContent(xTextCursor, xContent1, false);
+ xTextCursor.gotoEnd(false);
+ xText.insertTextContent(xTextCursor, xContent2, false);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ if (!helper.isAttribute())
+ {
+// xText.setString("AB");
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ xTextCursor.gotoStart(false);
+ xTextCursor.goRight((short)1, true);
+
+ // insertTextContent with meta cursor and absorb
+ xText.insertTextContent(xTextCursor, xContent1, true);
+ xTextCursor.gotoEnd(false);
+ xTextCursor.goLeft((short)1, true);
+ xText.insertTextContent(xTextCursor, xContent2, true);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ {
+ xText.setString("AB");
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ xDocTextCursor.gotoRange(xStart, false);
+
+ // insertTextContent with document cursor
+ xText.insertTextContent(xDocTextCursor, xContent1, false);
+ xDocTextCursor.gotoRange(xEnd, false);
+ xText.insertTextContent(xDocTextCursor, xContent2, false);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ if (!helper.isAttribute())
+ {
+// xText.setString("AB");
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ xDocTextCursor.gotoRange(xStart, false);
+ xDocTextCursor.goRight((short)1, true);
+
+ // insertTextContent with document cursor and absorb
+ xText.insertTextContent(xDocTextCursor, xContent1, true);
+ xDocTextCursor.gotoRange(xEnd, false);
+ xDocTextCursor.goLeft((short)1, true);
+ xText.insertTextContent(xDocTextCursor, xContent2, true);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ {
+ xText.setString("AB");
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ // attach to range from meta getStart()/getEnd()
+ xContent1.attach(xStart);
+ xContent2.attach(xEnd);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ {
+ xText.setString("AB");
+ xStart = xText.getStart();
+ xEnd = xText.getEnd();
+
+ TreeNode nod1 = helper.mkTreeNode();
+ TreeNode nod2 = helper.mkTreeNode();
+ XTextContent xContent1 = helper.mkTextContent(inserter, nod1);
+ XTextContent xContent2 = helper.mkTextContent(inserter, nod2);
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ xTextCursor.gotoStart(false);
+
+ // attach to cursor from meta XText
+ xContent1.attach(xTextCursor);
+ xTextCursor.gotoEnd(false);
+ xContent2.attach(xTextCursor);
+
+ helper.postInserted(nod1, xContent1);
+ helper.postInserted(nod2, xContent2);
+
+ TreeNode root = new TreeNode()
+ .appendChild( new TextNode("12") )
+ .appendChild( met1.dup()
+ .appendChild( nod1.dup() )
+ .appendChild( new TextNode("AB") )
+ .appendChild( nod2.dup() ) )
+ .appendChild( new TextNode("6789") );
+ doTest(root, false);
+ }
+ }
+
+ public void testMetaFieldXTextField() throws Exception
+ {
+ com.sun.star.rdf.XRepositorySupplier xModel =
+ (com.sun.star.rdf.XRepositorySupplier) UnoRuntime.queryInterface(
+ com.sun.star.rdf.XRepositorySupplier.class, m_xDoc);
+ com.sun.star.rdf.XRepository xRepo = xModel.getRDFRepository();
+ // for testing just add it to the first graph
+ com.sun.star.rdf.XURI[] Graphs = xRepo.getGraphNames();
+ com.sun.star.rdf.XNamedGraph xGraph = xRepo.getGraph(Graphs[0]);
+ com.sun.star.rdf.XURI xOdfPrefix =
+ com.sun.star.rdf.URI.createKnown(m_xContext,
+ com.sun.star.rdf.URIs.ODF_PREFIX);
+ com.sun.star.rdf.XURI xOdfSuffix =
+ com.sun.star.rdf.URI.createKnown(m_xContext,
+ com.sun.star.rdf.URIs.ODF_SUFFIX);
+ com.sun.star.rdf.XNode xPrefix =
+ com.sun.star.rdf.Literal.create(m_xContext, "foo");
+ com.sun.star.rdf.XNode xSuffix =
+ com.sun.star.rdf.Literal.create(m_xContext, "bar");
+
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("abc");
+ inserter.insertRange( new Range(0, 0, text) );
+ XText xDocText = m_xDoc.getText();
+ XTextCursor xDocTextCursor = xDocText.createTextCursor();
+ xDocTextCursor.goRight((short)1, false);
+ xDocTextCursor.goRight((short)3, true);
+
+ XTextField xMetaField = inserter.makeMetaField();
+
+ xDocText.insertTextContent(xDocTextCursor, xMetaField, true);
+
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xMetaField);
+ xMetadatable.ensureMetadataReference();
+
+ xGraph.addStatement(xMetadatable, xOdfPrefix, xPrefix);
+ xGraph.addStatement(xMetadatable, xOdfSuffix, xSuffix);
+ assure("getPresentation(): wrong",
+ "fooabcbar".equals(xMetaField.getPresentation(false)));
+ inserter.insertRange( new Range(0, 0, text) );
+ }
+
+ public void testMetaFieldXPropertySet() throws Exception
+ {
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123");
+ inserter.insertRange( new Range(0, 0, text) );
+ XText xDocText = m_xDoc.getText();
+ XTextCursor xDocTextCursor = xDocText.createTextCursor();
+ xDocTextCursor.goRight((short)1, false);
+ xDocTextCursor.goRight((short)3, true);
+
+ XTextField xMetaField = inserter.makeMetaField();
+
+ xDocText.insertTextContent(xDocTextCursor, xMetaField, true);
+
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xMetaField);
+ assure("PropertySet: not supported?", xPropertySet != null);
+ XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
+ assure("hasPropertyByName(\"NumberFormat\"):",
+ xPropertySetInfo.hasPropertyByName("NumberFormat"));
+ assure("hasPropertyByName(\"IsFixedLanguage\"):",
+ xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));
+
+ int def = (Integer) xPropertySet.getPropertyValue("NumberFormat");
+ log.println("NumberFormat: default is " + def);
+ short INT = com.sun.star.i18n.NumberFormatIndex.NUMBER_INT;
+ xPropertySet.setPropertyValue("NumberFormat", INT);
+ xPropertySet.setPropertyValue("IsFixedLanguage", true);
+ int format = (Integer) xPropertySet.getPropertyValue("NumberFormat");
+ assure("NumberFormat: failed", format == INT);
+ boolean isFixed = (Boolean)
+ xPropertySet.getPropertyValue("IsFixedLanguage");
+ assure("IsFixedLanguage: failed", isFixed);
+ }
+
+ public void testLoadStore() throws Exception
+ {
+ XComponent xComp = null;
+ String filename = "TESTMETA.odt";
+ String file;
+ try {
+ file = util.utils.getFullTestURL(filename);
+ xComp = doLoad(file);
+ if (xComp != null)
+ {
+ file = m_TmpDir + filename;
+ doStore(xComp, file);
+ close(xComp);
+ xComp = doLoad(file);
+ }
+ } finally {
+ close(xComp);
+ }
+ }
+
+ private void doStore(XComponent xComp, String file) throws Exception
+ {
+ log.println("Storing test document...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xComp);
+
+ xStor.storeToURL(file, new PropertyValue[0]);
+
+ log.println("...done");
+ }
+
+ public XComponent doLoad(String file) throws Exception
+ {
+ XComponent xComp = null;
+
+ log.println("Loading test document...");
+
+ PropertyValue[] loadProps = new PropertyValue[1];
+ loadProps[0] = new PropertyValue();
+ loadProps[0].Name = "Hidden";
+ loadProps[0].Value = new Boolean(true);
+
+ xComp = util.DesktopTools.loadDoc(m_xMSF, file, loadProps);
+// xComp = util.DesktopTools.getCLoader(m_xMSF).loadComponentFromURL(file, "_blank", 0, loadProps);
+
+
+ XTextDocument xTextDoc = (XTextDocument)
+ UnoRuntime.queryInterface(XTextDocument.class, xComp);
+
+ XText xText = xTextDoc.getText();
+
+ log.println("...done");
+
+ log.println("Checking meta(-field)s in loaded test document...");
+
+ TreeNode root = new TreeNode()
+ .appendChild( new RubyNode("ruby1")
+ .appendChild( new TextNode("1") ) )
+ .appendChild( new MetaNode(mkId_("id1"))
+ .appendChild( new TextNode("2") ) )
+ .appendChild( new MetaFieldNode(mkId_("id2"))
+ .appendChild( new TextNode("3") ) )
+ .appendChild( new RubyNode("ruby2")
+ .appendChild( new MetaNode(mkId_("id3"))
+ .appendChild( new TextNode("4") ) ) )
+ .appendChild( new RubyNode("ruby3")
+ .appendChild( new MetaFieldNode(mkId_("id4"))
+ .appendChild( new TextNode("5") ) ) )
+ .appendChild( new MetaNode(mkId_("id5"))
+ .appendChild( new RubyNode("ruby4")
+ .appendChild( new TextNode("6") ) ) )
+ .appendChild( new MetaFieldNode(mkId_("id6"))
+ .appendChild( new RubyNode("ruby5")
+ .appendChild( new TextNode("7") ) ) )
+ .appendChild( new MetaNode(mkId_("id7"))
+ .appendChild( new MetaNode(mkId_("id8"))
+ .appendChild( new TextNode("8") ) ) )
+ .appendChild( new MetaNode(mkId_("id9"))
+ .appendChild( new MetaFieldNode(mkId_("id10"))
+ .appendChild( new TextNode("9") ) ) )
+ .appendChild( new MetaFieldNode(mkId_("id11"))
+ .appendChild( new MetaNode(mkId_("id12"))
+ .appendChild( new TextNode("10") ) ) )
+ .appendChild( new MetaFieldNode(mkId_("id13"))
+ .appendChild( new MetaFieldNode(mkId_("id14"))
+ .appendChild( new TextNode("11") ) ) )
+ .appendChild( new MetaNode(mkId_("id15"))
+ .appendChild( new RubyNode("ruby6")
+ .appendChild( new MetaFieldNode(mkId_("id16"))
+ .appendChild( new TextNode("12") ) ) ) )
+ .appendChild( new MetaNode(mkId_("")) {
+ public boolean equals(Object other) {
+ return (other instanceof MetaNode);
+ } }
+ .appendChild( new TextNode("13") ) )
+ .appendChild( new TextNode(" X X ") );
+ doTest(xTextDoc, root, false);
+
+ log.println("...done");
+
+ return xComp;
+ }
+
+ static void close(XComponent i_comp)
+ {
+ try {
+ XCloseable xClos = (XCloseable) UnoRuntime.queryInterface(
+ XCloseable.class, i_comp);
+ if (xClos != null) xClos.close(true);
+ } catch (Exception e) {
+ }
+ }
+
+ private void doTest(TreeNode intree) throws Exception
+ {
+ doTest(m_xDoc, intree, true);
+ }
+
+ private void doTest(TreeNode intree, boolean insert) throws Exception
+ {
+ doTest(m_xDoc, intree, insert);
+ }
+
+ private void doTest(XTextDocument xDoc, TreeNode intree,
+ boolean insert) throws Exception
+ {
+ dumpTree(intree, "I: ");
+
+ if (insert) {
+ new TreeInserter(xDoc).insertTree(intree);
+ }
+
+//Thread.sleep(10000);
+
+ XText xText = xDoc.getText();
+ XEnumerationAccess xTextEA = (XEnumerationAccess)
+ UnoRuntime.queryInterface(XEnumerationAccess.class, xText);
+ XEnumeration xTextEnum = xTextEA.createEnumeration();
+ // skip to right paragraph
+ xTextEnum.nextElement(); // skip first -- always empty!
+ Object xElement = xTextEnum.nextElement(); // second contains test case
+ XEnumerationAccess xEA = (XEnumerationAccess)
+ UnoRuntime.queryInterface(XEnumerationAccess.class, xElement);
+ XEnumeration xEnum = xEA.createEnumeration();
+ TreeNode outtree = new EnumConverter(this).convert(xEnum);
+
+ dumpTree(outtree, "O: ");
+
+ boolean success = new FuzzyTester(log).doTest(intree, outtree);
+ assure("test failed", success);
+ }
+
+ private void dumpTree(TreeNode tree) { dumpTree(tree, "> "); }
+
+ private void dumpTree(TreeNode tree, String prefix)
+ {
+ log.println(prefix + tree.toString());
+ TreeNodeEnum children = tree.createEnumeration();
+ while (children.hasNext()) {
+ TreeNode node = children.next();
+ dumpTree(node, prefix + " ");
+ }
+ }
+
+ private String mkName(String prefix)
+ {
+ return prefix + String.valueOf(m_Count++);
+ }
+
+ private StringPair mkId(String prefix)
+ {
+ return new StringPair("content.xml", mkName(prefix));
+ }
+
+ private StringPair mkId_(String id)
+ {
+ return new StringPair("content.xml", id);
+ }
+
+ public void assure(String str, boolean cond) { super.assure(str, cond); }
+}
+
diff --git a/sw/qa/complex/writer/makefile.mk b/sw/qa/complex/writer/makefile.mk
new file mode 100755
index 000000000000..de5200d47142
--- /dev/null
+++ b/sw/qa/complex/writer/makefile.mk
@@ -0,0 +1,112 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.5.198.1 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ = ..$/..$/..
+TARGET = PropertyValues
+PRJNAME = $(TARGET)
+PACKAGE = complex$/writer
+
+# --- Settings -----------------------------------------------------
+.INCLUDE: settings.mk
+
+
+#----- compile .java files -----------------------------------------
+
+JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JAVAFILES = CheckIndexedPropertyValues.java CheckNamedPropertyValues.java CheckCrossReferences.java CheckBookmarks.java CheckFlies.java TextPortionEnumerationTest.java
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+
+#----- make a jar from compiled files ------------------------------
+
+MAXLINELENGTH = 100000
+
+JARCLASSDIRS = $(PACKAGE)
+JARTARGET = $(TARGET).jar
+JARCOMPRESS = TRUE
+
+# --- Parameters for the test --------------------------------------
+
+# start an office if the parameter is set for the makefile
+.IF "$(OFFICE)" == ""
+CT_APPEXECCOMMAND =
+.ELSE
+CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+.ENDIF
+
+# test base is java complex
+CT_TESTBASE = -TestBase java_complex
+
+# build package name with "." instead of $/
+CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
+
+# start the runner application
+CT_APP = org.openoffice.Runner
+
+# --- Targets ------------------------------------------------------
+
+.IF "$(depend)" == ""
+ALL: ALLTAR
+.ELSE
+ALL: ALLDEP
+.ENDIF
+
+.INCLUDE : target.mk
+
+run: \
+ CheckBookmarks \
+ CheckCrossReferences \
+ CheckIndexedPropertyValues \
+ CheckNamedPropertyValues \
+ CheckFlies \
+ TextPortionEnumerationTest \
+
+
+RUN: run
+
+CheckIndexedPropertyValues:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckIndexedPropertyValues
+
+
+CheckNamedPropertyValues:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckNamedPropertyValues
+
+CheckCrossReferences:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckCrossReferences
+
+CheckBookmarks:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckBookmarks
+
+CheckFlies:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckFlies
+
+TextPortionEnumerationTest:
+ +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).TextPortionEnumerationTest
+
diff --git a/sw/qa/complex/writer/testdocuments/CheckCrossReferences.odt b/sw/qa/complex/writer/testdocuments/CheckCrossReferences.odt
new file mode 100644
index 000000000000..d8102f0356f8
--- /dev/null
+++ b/sw/qa/complex/writer/testdocuments/CheckCrossReferences.odt
Binary files differ
diff --git a/sw/qa/complex/writer/testdocuments/CheckFlies.odt b/sw/qa/complex/writer/testdocuments/CheckFlies.odt
new file mode 100644
index 000000000000..8f42989b3a0d
--- /dev/null
+++ b/sw/qa/complex/writer/testdocuments/CheckFlies.odt
Binary files differ
diff --git a/sw/qa/complex/writer/testdocuments/TESTMETA.odt b/sw/qa/complex/writer/testdocuments/TESTMETA.odt
new file mode 100755
index 000000000000..004af82e5ddf
--- /dev/null
+++ b/sw/qa/complex/writer/testdocuments/TESTMETA.odt
Binary files differ
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
new file mode 100644
index 000000000000..ad069407b669
--- /dev/null
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -0,0 +1,880 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: Test-BigPtrArray.cxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#define TIMELOG
+
+#include <cppunit/simpleheader.hxx>
+#include <bparr.hxx>
+#include <string>
+#include <stdlib.h>
+#include <rtl/logfile.hxx>
+
+#undef ENABLE_DEBUG_OUTPUT
+
+using namespace std;
+
+
+namespace /* private */
+{
+ const int NUM_ENTRIES = 100000;
+
+ class BigPtrEntryMock : public BigPtrEntry
+ {
+ public:
+ BigPtrEntryMock(int count) : count_(count)
+ {
+ }
+
+ ~BigPtrEntryMock()
+ {
+ #ifdef ENABLE_DEBUG_OUTPUT
+ printf("Destructor called (%i)\n", count_);
+ #endif
+ }
+
+ int getCount() const
+ {
+ return count_;
+ }
+
+ void setCount(int newCount)
+ {
+ count_ = newCount;
+ }
+
+ ULONG Position() const
+ {
+ return GetPos();
+ }
+
+ private:
+ int count_;
+ };
+
+ BOOL AddToCount(const ElementPtr& rElem, void* pArgs)
+ {
+ BigPtrEntryMock* const pbem = static_cast<BigPtrEntryMock* const>(rElem);
+ pbem->setCount(pbem->getCount() + *((int*)pArgs));
+ return true;
+ }
+
+ void dumpBigPtrArray(const BigPtrArray& bparr)
+ {
+ #ifdef ENABLE_DEBUG_OUTPUT
+ for (int i = 0; i < bparr.Count(); i++)
+ printf("bparr[%i,%i]: %i\n", i, static_cast<BigPtrEntryMock*>(bparr[i])->Position(), static_cast<BigPtrEntryMock*>(bparr[i])->getCount());
+
+ printf("\n");
+ #endif
+ }
+
+ void fillBigPtrArray(BigPtrArray& bparr, ULONG numEntries)
+ {
+ for (int i = 0; i < numEntries; i++)
+ bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
+ }
+
+ void printMethodName(const char* name)
+ {
+ #ifdef ENABLE_DEBUG_OUTPUT
+ printf(name);
+ #endif
+ }
+
+ bool checkElementPositions(const BigPtrArray& bparr)
+ {
+ for (int i = 0; i < bparr.Count(); i++)
+ {
+ if (static_cast<BigPtrEntryMock*>(bparr[i])->Position() != i)
+ return false;
+ }
+ return true;
+ }
+
+ void releaseBigPtrArrayContent(BigPtrArray& bparr)
+ {
+ for (int i = 0; i < bparr.Count(); i++)
+ delete bparr[i];
+ }
+
+ RTL_LOGFILE_CONTEXT(logFile, "BigPtrArray performance measures" );
+}
+
+class BigPtrArrayUnittest : public CppUnit::TestFixture
+{
+public:
+
+ BigPtrArrayUnittest()
+ {
+ }
+
+ /** Test constructor/destructor
+ The size of the BigPtrArray
+ aka the 'Count' should be 0
+ initially.
+ */
+ void test_ctor()
+ {
+ printMethodName("test_ctor\n");
+
+ BigPtrArray bparr;
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "BigPtrArray ctor failed",
+ bparr.Count() == 0
+ );
+ }
+
+ void test_insert_entries_at_front()
+ {
+ printMethodName("test_insert_entries_at_front\n");
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "START: test_insert_entries_at_front");
+
+ BigPtrArray bparr;
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ ULONG oldCount = bparr.Count();
+ bparr.Insert(new BigPtrEntryMock(i), 0);
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_entries_at_front failed",
+ (bparr.Count() == oldCount + 1)
+ )
+ }
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_entries_at_front");
+
+ for (int i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_entries_at_front failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == j
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_entries_at_front failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_insert_entries_in_the_middle()
+ {
+ printMethodName("test_insert_entries_in_the_middle\n");
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "START: test_insert_entries_in_the_middle");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ ULONG oldCount = bparr.Count();
+
+ bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count() / 2);
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_entries_in_the_middle");
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_entries_in_the_middle failed",
+ (oldCount + 1 == bparr.Count() && static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount() == NUM_ENTRIES)
+ )
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_entries_in_the_middle failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_insert_at_already_used_index()
+ {
+ printMethodName("test_insert_at_already_used_index\n");
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "START: test_insert_at_already_used_index");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ int oldCount = bparr.Count();
+
+ for (int i = 0, j = -5; i < 5; i++, j++)
+ bparr.Insert(new BigPtrEntryMock(j), i);
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_at_already_used_index");
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_at_already_used_index failed",
+ (oldCount + 5 == bparr.Count())
+ )
+
+ for (int i = 0, j = -5; i < bparr.Count(); i++, j++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_at_already_used_index failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == j
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_at_already_used_index failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_insert_at_end()
+ {
+ printMethodName("test_insert_at_end\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ ULONG oldCount = bparr.Count();
+ bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count());
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_at_end failed",
+ (oldCount + 1 == bparr.Count() && static_cast<BigPtrEntryMock*>(bparr[bparr.Count()-1])->getCount() == NUM_ENTRIES)
+ )
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_insert_at_end failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_remove_at_front()
+ {
+ printMethodName("test_remove_at_front\n");
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "START: test_remove_at_front");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ ULONG oldCount = bparr.Count();
+
+ delete bparr[0]; // release content
+ bparr.Remove(0); // remove item from container
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_at_front failed (wrong count)",
+ (oldCount - 1 == bparr.Count())
+ )
+
+ for (int j = 0, k = i + 1; j < bparr.Count(); j++, k++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_at_front failed",
+ static_cast<BigPtrEntryMock*>(bparr[j])->getCount() == k
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_at_front failed",
+ checkElementPositions(bparr)
+ )
+
+ dumpBigPtrArray(bparr);
+ }
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_remove_at_front");
+ }
+
+ void test_remove_at_back()
+ {
+ printMethodName("test_remove_at_back\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ for (int i = NUM_ENTRIES - 1; i >= 0; i--)
+ {
+ ULONG oldCount = bparr.Count();
+ delete bparr[i];
+ bparr.Remove(i);
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_at_back failed (wrong count)",
+ (oldCount - 1 == bparr.Count())
+ )
+
+ for (int j = 0; j < bparr.Count(); j++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_at_back failed",
+ static_cast<BigPtrEntryMock*>(bparr[j])->getCount() == j
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_at_back failed",
+ checkElementPositions(bparr)
+ )
+
+ dumpBigPtrArray(bparr);
+ }
+ }
+
+ void test_remove_in_the_middle()
+ {
+ printMethodName("test_remove_in_the_middle\n");
+
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "START: test_remove_in_the_middle");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ while (bparr.Count())
+ {
+ ULONG oldCount = bparr.Count();
+ int oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
+
+ delete bparr[bparr.Count() / 2];
+ bparr.Remove(bparr.Count() / 2);
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_in_the_middle failed (wrong count)",
+ (oldCount - 1 == bparr.Count())
+ )
+
+ for (int i = 0; i < bparr.Count(); i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_in_the_middle failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() != oldElement
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_in_the_middle failed",
+ checkElementPositions(bparr)
+ )
+
+ dumpBigPtrArray(bparr);
+ }
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_remove_in_the_middle");
+ }
+
+ void test_remove_multiple_elements_at_once()
+ {
+ printMethodName("test_remove_multiple_elements_at_once\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ while(bparr.Count())
+ {
+ ULONG nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
+ ULONG oldCount = bparr.Count();
+
+ for (int i = 0; i < nRemove; i++)
+ delete bparr[i];
+
+ bparr.Remove(0, nRemove);
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_multiple_elements_at_once failed",
+ (oldCount - nRemove == bparr.Count())
+ )
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_multiple_elements_at_once failed",
+ checkElementPositions(bparr)
+ )
+
+ dumpBigPtrArray(bparr);
+ }
+ }
+
+ void test_remove_all_elements_at_once()
+ {
+ printMethodName("test_remove_all_elements_at_once\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ releaseBigPtrArrayContent(bparr);
+ bparr.Remove(0, bparr.Count());
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_remove_all_elements_at_once failed",
+ bparr.Count() == 0
+ )
+
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_move_elements_from_lower_to_higher_pos()
+ {
+ printMethodName("test_move_elements_from_lower_to_higher_pos\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ for (int i = 0; i < NUM_ENTRIES - 1; i++)
+ {
+ bparr.Move(i, i + 2);
+ dumpBigPtrArray(bparr);
+ }
+
+ for (int i = 0; i < (NUM_ENTRIES - 1); i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_elements_from_lower_to_higher_pos failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i + 1)
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_elements_from_lower_to_higher_pos failed",
+ static_cast<BigPtrEntryMock*>(bparr[NUM_ENTRIES -1])->getCount() == 0
+ )
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_elements_from_lower_to_higher_pos failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ }
+
+ void test_move_elements_from_higher_to_lower_pos()
+ {
+ printMethodName("test_move_elements_from_higher_to_lower_pos\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ for (int i = NUM_ENTRIES - 1; i >= 1; i--)
+ {
+ bparr.Move(i, i - 1);
+ dumpBigPtrArray(bparr);
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_elements_from_higher_to_lower_pos failed",
+ static_cast<BigPtrEntryMock*>(bparr[0])->getCount() == (NUM_ENTRIES - 1)
+ )
+
+ for (int i = 1; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_elements_from_higher_to_lower_pos failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i - 1)
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_elements_from_higher_to_lower_pos failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ }
+
+ void test_move_to_same_position()
+ {
+ printMethodName("test_move_to_same_position\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ bparr.Move(i, i);
+ }
+
+ dumpBigPtrArray(bparr);
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_to_same_position failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == i
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_move_to_same_position failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_replace_elements()
+ {
+ printMethodName("test_replace_elements\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ for (int i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ {
+ delete bparr[i];
+ bparr.Replace(i, new BigPtrEntryMock(j));
+ dumpBigPtrArray(bparr);
+ }
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_replace_elements failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (NUM_ENTRIES - i - 1)
+ )
+ }
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_replace_elements failed",
+ checkElementPositions(bparr)
+ )
+
+ releaseBigPtrArrayContent(bparr);
+ }
+
+ void test_for_each()
+ {
+ printMethodName("test_for_each\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ int addCount = 1;
+ bparr.ForEach(AddToCount, &addCount);
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_for_each failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i+1)
+ )
+ }
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_for_some1()
+ {
+ printMethodName("test_for_some1\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ int addCount = 1;
+ bparr.ForEach(0, NUM_ENTRIES / 2, AddToCount, &addCount);
+
+ int i = 0;
+ for (/* */; i < NUM_ENTRIES / 2; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_for_some1 failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i+1)
+ )
+ }
+
+ for (/* */; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_for_some1 failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i)
+ )
+ }
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_for_some2()
+ {
+ printMethodName("test_for_some2\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ int addCount = 1;
+ bparr.ForEach(NUM_ENTRIES / 2, NUM_ENTRIES, AddToCount, &addCount);
+
+ int i = 0;
+ for (/* */; i < NUM_ENTRIES / 2; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_for_some2 failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i)
+ )
+ }
+
+ for (/* */; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_for_some2 failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == (i+1)
+ )
+ }
+
+ releaseBigPtrArrayContent(bparr);
+ dumpBigPtrArray(bparr);
+ }
+
+ void test_for_some3()
+ {
+ printMethodName("test_for_some3\n");
+
+ BigPtrArray bparr;
+
+ fillBigPtrArray(bparr, NUM_ENTRIES);
+ dumpBigPtrArray(bparr);
+
+ int addCount = 1;
+ bparr.ForEach(0, 0, AddToCount, &addCount);
+
+ for (int i = 0; i < NUM_ENTRIES; i++)
+ {
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "test_for_some3 failed",
+ static_cast<BigPtrEntryMock*>(bparr[i])->getCount() == i
+ )
+ }
+ releaseBigPtrArrayContent(bparr);
+ }
+
+ CPPUNIT_TEST_SUITE(BigPtrArrayUnittest);
+ CPPUNIT_TEST(test_ctor);
+ CPPUNIT_TEST(test_insert_entries_at_front);
+ CPPUNIT_TEST(test_insert_entries_in_the_middle);
+ CPPUNIT_TEST(test_insert_at_already_used_index);
+ CPPUNIT_TEST(test_insert_at_end);
+ CPPUNIT_TEST(test_remove_at_front);
+ CPPUNIT_TEST(test_remove_at_back);
+ CPPUNIT_TEST(test_remove_in_the_middle);
+ CPPUNIT_TEST(test_remove_multiple_elements_at_once);
+ CPPUNIT_TEST(test_remove_all_elements_at_once);
+ CPPUNIT_TEST(test_move_elements_from_lower_to_higher_pos);
+ CPPUNIT_TEST(test_move_elements_from_higher_to_lower_pos);
+ CPPUNIT_TEST(test_replace_elements);
+ CPPUNIT_TEST(test_for_each);
+ CPPUNIT_TEST(test_for_some1);
+ CPPUNIT_TEST(test_for_some2);
+ CPPUNIT_TEST(test_for_some3);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+const char* START = "START: ";
+const char* END = "END: ";
+
+class PerformanceTracer
+{
+public:
+
+public:
+ PerformanceTracer(const string& methodName) :
+ startString_(START),
+ endString_(END)
+ {
+ startString_ += methodName;
+ endString_ += methodName;
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, startString_.c_str());
+ }
+
+ ~PerformanceTracer()
+ {
+ RTL_LOGFILE_CONTEXT_TRACE(logFile, endString_.c_str());
+ }
+
+private:
+ string startString_;
+ string endString_;
+};
+
+class BigPtrArrayPerformanceTest : public CppUnit::TestFixture
+{
+public:
+ BigPtrArrayPerformanceTest()
+ {
+ }
+
+ void test_insert_at_end_1000()
+ { test_insert_at_end("1000"); }
+
+ void test_insert_at_end_10000()
+ { test_insert_at_end("10000"); }
+
+ void test_insert_at_end_100000()
+ { test_insert_at_end("100000"); }
+
+ void test_insert_at_end_1000000()
+ { test_insert_at_end("1000000"); }
+
+ void test_insert_at_front_1000()
+ { test_insert_at_front("1000"); }
+
+ void test_insert_at_front_10000()
+ { test_insert_at_front("10000"); }
+
+ void test_insert_at_front_100000()
+ { test_insert_at_front("100000"); }
+
+ void test_insert_at_front_1000000()
+ { test_insert_at_front("1000000"); }
+
+ CPPUNIT_TEST_SUITE(BigPtrArrayPerformanceTest);
+ CPPUNIT_TEST(test_insert_at_end_1000);
+ CPPUNIT_TEST(test_insert_at_end_10000);
+ CPPUNIT_TEST(test_insert_at_end_100000);
+ CPPUNIT_TEST(test_insert_at_end_1000000);
+ CPPUNIT_TEST(test_insert_at_front_1000);
+ CPPUNIT_TEST(test_insert_at_front_10000);
+ CPPUNIT_TEST(test_insert_at_front_100000);
+ CPPUNIT_TEST(test_insert_at_front_1000000);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ void test_insert_at_end(const char* numElements)
+ {
+ char buff[100] = { 0 };
+ strcat(buff, "test_insert_at_end ");
+ strcat(buff, numElements);
+ int n = atoi(numElements);
+ PerformanceTracer tracer(buff);
+ BigPtrArray bparr;
+ for (int i = 0; i < n; i++)
+ bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
+
+ releaseBigPtrArrayContent(bparr);
+ }
+
+ void test_insert_at_front(const char* numElements)
+ {
+ char buff[100] = { 0 };
+ strcat(buff, "test_insert_at_front ");
+ strcat(buff, numElements);
+ int n = atoi(numElements);
+ PerformanceTracer tracer(buff);
+ BigPtrArray bparr;
+ for (int i = 0; i < n; i++)
+ bparr.Insert(new BigPtrEntryMock(i), 0);
+
+ releaseBigPtrArrayContent(bparr);
+ }
+};
+
+
+//#####################################
+// register test suites
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BigPtrArrayUnittest, "BigPtrArrayUnittest");
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BigPtrArrayPerformanceTest, "BigPtrArrayPerformanceTest");
+
+NOADDITIONAL;
+
diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx
new file mode 100644
index 000000000000..c476aab6a92d
--- /dev/null
+++ b/sw/qa/core/bigpointerarray-new.cxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bigpointerarray-new.cxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include "bparr.hxx"
+#include <algorithm>
+
+BigPtrArray::BigPtrArray()
+{
+ //container_.reserve(1000);
+}
+
+ULONG BigPtrArray::Count() const
+{
+ return container_.size();
+}
+
+void BigPtrArray::Move(ULONG fromPos, ULONG toPos)
+{
+ DBG_ASSERT(fromPos < container_.size() && toPos < container_.size(), "BigPtrArray.Move precondition violation");
+ Insert(container_[fromPos], toPos);
+ Remove(toPos < fromPos ? fromPos + 1 : fromPos, 1);
+}
+
+void BigPtrArray::ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs)
+{
+ DBG_ASSERT(fromPos < toPos && fromPos < container_.size() && toPos < container_.size(), "BigPtrArray::ForEach precondition violation");
+ Container_t::const_iterator iter = container_.begin() + fromPos;
+ Container_t::const_iterator iter_end = container_.begin() + toPos;
+ for (/*no init*/; iter != iter_end; ++iter)
+ fn(*iter, pArgs);
+}
+
+void BigPtrArray::ForEach(FnForEach fn, void* pArgs)
+{
+ Container_t::const_iterator iter = container_.begin();
+ Container_t::const_iterator iter_end = container_.end();
+ for ( /*no init*/; iter != iter_end; ++iter)
+ fn(*iter, pArgs);
+}
+
+ElementPtr BigPtrArray::operator[](ULONG pos) const
+{
+ DBG_ASSERT(pos < container_.size(), "BigPtrArray::operator[] precondition violation");
+ return container_[pos];
+}
+
+void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
+{
+ DBG_ASSERT(pos <= container_.size(), "BigPtrArray::Insert precondition violation");
+
+ rElem->pBigPtrArray_ = this;
+ rElem->pos_ = pos;
+
+ if (pos == container_.size())
+ container_.push_back(rElem);
+ else
+ {
+ container_.insert(container_.begin() + pos, rElem);
+ FixElementIndizes(container_.begin(), container_.end());
+ }
+}
+
+void BigPtrArray::Remove( ULONG pos, ULONG n )
+{
+ DBG_ASSERT((pos < container_.size()) && ((container_.begin() + pos + n) < container_.end()), "BigPtrArray.Remove precondition violation")
+ container_.erase(container_.begin() + pos, container_.begin() + pos + n);
+ FixElementIndizes(container_.begin(), container_.end());
+}
+
+void BigPtrArray::Replace(ULONG pos, const ElementPtr& rElem)
+{
+ DBG_ASSERT(pos < container_.size(), "BigPtrArray::Replace precondition violation");
+ rElem->pBigPtrArray_ = this;
+ rElem->pos_ = pos;
+ container_[pos] = rElem;
+}
+
+void BigPtrArray::FixElementIndizes(Container_t::const_iterator begin, Container_t::const_iterator end) const
+{
+ Container_t::const_iterator iter = begin;
+ for (int i = 0; iter != end; ++iter, i++)
+ (*iter)->pos_ = i;
+}
diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx
new file mode 100644
index 000000000000..1388c6459c20
--- /dev/null
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bigpointerarray-new.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _BPARR_HXX
+#define _BPARR_HXX
+
+#include <tools/solar.h>
+#include <tools/debug.hxx>
+
+#include <deque>
+
+class BigPtrArray;
+
+/** Base class for container entries
+*/
+class BigPtrEntry
+{
+ friend class BigPtrArray;
+ BigPtrArray* pBigPtrArray_;
+ ULONG pos_;
+
+protected:
+ BigPtrEntry() : pBigPtrArray_(0), pos_(0)
+ {}
+
+ virtual ~BigPtrEntry()
+ {}
+
+ ULONG GetPos() const
+ {
+ return pos_;
+ }
+
+ BigPtrArray& GetArray() const
+ {
+ return *pBigPtrArray_;
+ }
+};
+
+typedef BigPtrEntry* ElementPtr;
+typedef BOOL (*FnForEach)(const ElementPtr&, void* pArgs);
+
+/** A container abstraction
+*/
+class BigPtrArray
+{
+public:
+ typedef std::deque<ElementPtr> Container_t;
+
+public:
+ /**
+ */
+ BigPtrArray();
+
+ /** Return the number of entries inserted
+ into the array
+ */
+ ULONG Count() const;
+
+ /** Insert an Element into the array at a certain
+ position
+
+ @param rElem
+ [in] the element
+
+ @param pos
+ [in] the position where to insert the element.
+
+ @pre (pos >= 0 && pos <= BigPtrArray.Count())
+ @post (((oldCount + 1) == BigPtrArray.Count()) && BigPtrArray[pos] == rElem)
+ */
+ void Insert(const ElementPtr& rElem, ULONG pos);
+
+ /** Remove a specified number of elements starting at a certain position.
+
+ @param pos
+ [in] the position where to start removing elements
+
+ @param n
+ [in] the number of elements to remove
+
+ @pre (pos < BigPtrArray.Count() && n <= BigPtrArray.Count())
+ @post ((oldCount - n) == BigPtrArray.Count())
+ */
+ void Remove(ULONG pos, ULONG n = 1);
+
+ /** Move an entry from a certain position to another on.
+
+ @param from
+ [in]
+
+ @param to
+ [in]
+ */
+ void Move(ULONG fromPos, ULONG toPos);
+
+ /** Replace an entry at a certain position
+
+ @param pos
+ [in] the position of the entry
+
+ @param rElem
+ [in] the new entry
+
+ @pre pos < BigPtrArray.Count()
+ @post (oldCount == BigPtrArray.Count() && BigPtrArray[pos] == rElem)
+ */
+ void Replace(ULONG pos, const ElementPtr& rElem);
+
+ /** Get the entry at a certain index
+
+ @param pos
+ [in] the position of the entry
+
+ @pre pos < BigPtrArray.Count()
+ */
+ ElementPtr operator[](ULONG pos) const;
+
+ /**
+ */
+ void ForEach(FnForEach fn, void* pArgs = NULL);
+
+ /**
+ */
+ void ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs = NULL);
+
+private:
+
+ void FixElementIndizes(Container_t::const_iterator begin, Container_t::const_iterator end) const;
+
+private:
+ Container_t container_;
+};
+
+#endif
diff --git a/sw/qa/core/export.exp b/sw/qa/core/export.exp
new file mode 100644
index 000000000000..a13529da5876
--- /dev/null
+++ b/sw/qa/core/export.exp
@@ -0,0 +1 @@
+registerAllTestFunction
diff --git a/sw/qa/core/export.map b/sw/qa/core/export.map
new file mode 100644
index 000000000000..ab2e7cd007b0
--- /dev/null
+++ b/sw/qa/core/export.map
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: export.map,v $
+#
+# $Revision: 1.3 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+UDK_3.0 {
+ global:
+ registerAllTestFunction;
+
+ local:
+ *;
+};
diff --git a/sw/qa/core/makefile.mk b/sw/qa/core/makefile.mk
new file mode 100644
index 000000000000..66308d1eed33
--- /dev/null
+++ b/sw/qa/core/makefile.mk
@@ -0,0 +1,81 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.3 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=sw
+TARGET=test-bigptrarray
+# this is removed at the moment because we need some enhancements
+# TESTDIR=TRUE
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# BEGIN ----------------------------------------------------------------
+# auto generated Target:testjob by codegen.pl
+
+.IF "$(GUI)" == "WNT"
+ CFLAGS+=/Ob1
+.ENDIF
+
+SHL1OBJS=$(SLO)$/Test-BigPtrArray.obj \
+ $(SLO)$/bparr.obj
+
+SHL1TARGET=$(TARGET)
+SHL1STDLIBS=$(SALLIB) $(TOOLSLIB)
+
+.IF "$(GUI)" == "WNT"
+SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
+.ENDIF
+.IF "$(GUI)" == "UNX"
+SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
+# .IF "$(OS)" == "SOLARIS"
+# SHL1STDLIBS += -lrt -laio
+# .ENDIF
+.ENDIF
+
+SHL1IMPLIB= i$(SHL1TARGET)
+
+# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME =$(SHL1TARGET)
+
+# DEF1EXPORTFILE= export.exp
+SHL1VERSIONMAP = export.map
+
+# END ------------------------------------------------------------------
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : _cppunit.mk
diff --git a/sw/qa/core/performance-jobfile b/sw/qa/core/performance-jobfile
new file mode 100644
index 000000000000..9e33d3c858ba
--- /dev/null
+++ b/sw/qa/core/performance-jobfile
@@ -0,0 +1,9 @@
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_end_1000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_end_10000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_end_100000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_end_1000000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_front_1000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_front_10000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_front_100000
+BigPtrArrayPerformanceTest.BigPtrArrayPerformanceTest.test_insert_at_front_1000000
+
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
new file mode 100644
index 000000000000..ee20559798a6
--- /dev/null
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -0,0 +1,153 @@
+### i85576 ###
+sw.SwXCellRange::com::sun::star::text::CellRange
+
+### i21166 ###
+sw.SwXCell::com::sun::star::text::CellProperties
+sw.SwXCell::com::sun::star::beans::XPropertySet
+
+### i59143 ###
+sw.SwXTableColumns::com::sun::star::table::XTableColumns
+
+### i85580 ###
+sw.SwXTextView::com::sun::star::view::XSelectionSupplier
+#-> disabled in sw.scw
+
+### i23394 ###
+sw.XMLContentImporter::com::sun::star::xml::sax::XDocumentHandler
+sw.XMLMetaImporter::com::sun::star::xml::sax::XDocumentHandler
+sw.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler
+# -> disables in sw.sce
+
+### i23422 ###
+sw.SwXTextViewCursor::com::sun::star::beans::XMultiPropertyStates
+
+### i23623 ###
+sw.SwXStyleFamily::com::sun::star::container::XNameReplace
+
+### i85583 ###
+sw.PageStyle::com::sun::star::style::PageProperties
+
+### i25408 ###
+sw.PageStyle::com::sun::star::style::XStyle
+
+### i85584 ###
+sw.CharacterStyle::com::sun::star::style::CharacterPropertiesAsian
+
+### i25473 ###
+sw.ConditionalParagraphStyle::com::sun::star::beans::XMultiPropertyStates
+sw.ParagraphStyle::com::sun::star::beans::XMultiPropertyStates
+
+### i34456 ###
+sw.SwXTextDocument::com::sun::star::view::XPrintJobBroadcaster
+
+### i37272 ###
+sw.SwXDrawPage::com::sun::star::drawing::XShapeGrouper
+
+### i38584 ###
+sw.SwXParagraph::com::sun::star::beans::XPropertySet
+sw.SwXTextPortion::com::sun::star::beans::XPropertySet
+sw.SwXTextRange::com::sun::star::beans::XPropertySet
+sw.SwXTextViewCursor::com::sun::star::beans::XPropertySet
+sw.SwXTextCursor::com::sun::star::beans::XPropertySet
+
+### i85585 ###
+sw.SwXTextSection::com::sun::star::text::TextSection
+
+### i85586 ###
+sw.SwAccessibleDocumentView::com::sun::star::accessibility::XAccessibleEventBroadcaster
+
+### i58374 ###
+sw.DocumentSettings::com::sun::star::document::Settings
+
+### i85586 ###
+sw.SwXAutoTextGroup::com::sun::star::container::XElementAccess
+
+### i72029 ###
+sw.SwXChapterNumbering::com::sun::star::text::NumberingRules
+
+### i38586 ###
+sw.SwXParagraph::com::sun::star::style::ParagraphProperties
+sw.SwXTextCursor::com::sun::star::style::ParagraphProperties
+sw.SwXTextPortion::com::sun::star::style::ParagraphProperties
+sw.SwXTextRange::com::sun::star::style::ParagraphProperties
+sw.SwXTextViewCursor::com::sun::star::style::ParagraphProperties
+sw.ConditionalParagraphStyle::com::sun::star::style::ParagraphProperties
+sw.ParagraphStyle::com::sun::star::style::ParagraphProperties
+sw.SwXCellRange::com::sun::star::style::ParagraphProperties
+sw.SwXTextDefaults::com::sun::star::style::ParagraphProperties
+sw.SwXTextTableCursor::com::sun::star::style::ParagraphProperties
+
+### i85575 ###
+sw.SwXParagraph::com::sun::star::style::CharacterProperties
+sw.SwXTextCursor::com::sun::star::style::CharacterProperties
+
+### i77882 ###
+sw.SwXTextCursor::com::sun::star::document::XDocumentInsertable
+
+### i85595 ###
+sw.ParagraphStyle::com::sun::star::beans::XMultiPropertySet
+sw.ParagraphStyle::com::sun::star::beans::XPropertySet
+
+### i85596 ###
+sw.SwXFieldMaster::com::sun::star::text::TextFieldMaster
+
+### i85634 ###
+sw.SwAccessibleTableView
+# -> disabled in sw.sce
+
+### i85635 ###
+sw.DocumentSettings::com::sun::star::text::PrintPreviewSettings
+
+### i85638 ###
+sw.SwXTextDocument::com::sun::star::frame::XStorable
+
+### i85640 ###
+sw.SwXMailMerge
+#-> disabled in sw.sce
+
+### i86656 ###
+sw.SwAccessibleDocumentView::com::sun::star::accessibility::XAccessibleComponent
+
+### i86751 ###
+sw.SwAccessibleDocumentPageView::com::sun::star::accessibility::XAccessibleEventBroadcaster
+#-> disabled in sw.sce
+
+### i87978 ###
+sw.DocumentSettings::com::sun::star::beans::XPropertySet
+sw.ConditionalParagraphStyle::com::sun::star::beans::XPropertySet
+
+### i88242 ###
+sw.SwXTextDocument::com::sun::star::view::XPrintable
+sw.SwXTextDocument::com::sun::star::text::XPagePrintable
+
+### i88257 ###
+sw.SwAccessibleTextGraphicObject::com::sun::star::accessibility::XAccessibleImage
+
+### i88262 ###
+sw.SwXTextFrame::com::sun::star::text::BaseFrameProperties
+
+### i88374 ###
+sw.SwXTextTable::com::sun::star::table::XAutoFormattable
+
+### i88310 ###
+sw.SwAccessibleTextGraphicObject::com::sun::star::accessibility::XAccessibleComponent
+
+### i88606 ###
+sw.SwAccessibleTextGraphicObject::com::sun::star::accessibility::XAccessibleContext
+
+### i89021 ###
+sw.SwXTextDefaults
+#-> disabled in sw.sce
+
+### i89022 ###
+sw.SwAccessiblePageView
+#-> disabled in sw.sce
+
+### i89419 ###
+sw.SwXTextEmbeddedObject::com::sun::star::text::BaseFrameProperties
+
+### i91530 ###
+sw.SwXTextPortion::com::sun::star::style::CharacterProperties
+
+### i94977 ###
+sw.SwXTextGraphicObject::com::sun::star::text::BaseFrameProperties \ No newline at end of file
diff --git a/sw/qa/unoapi/lastCheck.txt b/sw/qa/unoapi/lastCheck.txt
new file mode 100644
index 000000000000..b222cd4719d7
--- /dev/null
+++ b/sw/qa/unoapi/lastCheck.txt
@@ -0,0 +1 @@
+sw: checked with cws_tleamisc that is based on src680_m47
diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..7e01e4819dab
--- /dev/null
+++ b/sw/qa/unoapi/makefile.mk
@@ -0,0 +1,43 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.7 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=sw
+TARGET=qa_unoapi
+
+.INCLUDE: settings.mk
+
+.INCLUDE: target.mk
+
+ALLTAR : UNOAPI_TEST
+
+UNOAPI_TEST:
+ +$(SOLARENV)$/bin$/checkapi -sce sw.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
new file mode 100644
index 000000000000..6d8c2b30d56d
--- /dev/null
+++ b/sw/qa/unoapi/sw.sce
@@ -0,0 +1,94 @@
+-o sw.CharacterStyle
+-o sw.ConditionalParagraphStyle
+-o sw.PageStyle
+-o sw.ParagraphStyle
+-o sw.SwAccessibleDocumentPageView
+#i86751 -o sw.SwAccessibleDocumentView
+-o sw.SwAccessibleEndnoteView
+-o sw.SwAccessibleFooterView
+-o sw.SwAccessibleFootnoteView
+-o sw.SwAccessibleHeaderView
+#i89022 -o sw.SwAccessiblePageView
+-o sw.SwAccessibleParagraphView
+-o sw.SwAccessibleTableCellView
+#i85634 -o sw.SwAccessibleTableView
+-o sw.SwAccessibleTextEmbeddedObject
+-o sw.SwAccessibleTextFrameView
+-o sw.SwAccessibleTextGraphicObject
+-o sw.SwXAutoTextContainer
+-o sw.SwXAutoTextEntry
+-o sw.SwXAutoTextGroup
+-o sw.SwXBodyText
+-o sw.SwXBookmark
+-o sw.SwXBookmarks
+-o sw.SwXCell
+-o sw.SwXCellRange
+-o sw.SwXChapterNumbering
+-o sw.SwXDocumentIndex
+-o sw.SwXDocumentIndexMark
+-o sw.SwXDocumentIndexes
+-o sw.SwXDrawPage
+-o sw.SwXEndnoteProperties
+-o sw.SwXFieldEnumeration
+-o sw.SwXFieldMaster
+-o sw.SwXFootnote
+-o sw.SwXFootnoteProperties
+-o sw.SwXFootnoteText
+-o sw.SwXFootnotes
+-o sw.SwXFrames
+-o sw.SwXHeadFootText
+-o sw.SwXLineNumberingProperties
+#i85640 -o sw.SwXMailMerge
+-o sw.SwXModule
+-o sw.SwXNumberingRules
+#i103696 -o sw.SwXParagraph
+-o sw.SwXParagraphEnumeration
+-o sw.SwXPrintSettings
+-o sw.SwXPropertySet
+-o sw.SwXPropertySetInfo
+-o sw.SwXReferenceMark
+-o sw.SwXReferenceMarks
+-o sw.SwXShape
+-o sw.SwXStyleFamilies
+-o sw.SwXStyleFamily
+-o sw.SwXTableCellText
+-o sw.SwXTableColumns
+-o sw.SwXTableRows
+-o sw.SwXTextColumns
+-o sw.SwXTextCursor
+#i89021 -o sw.SwXTextDefaults
+-o sw.SwXTextDocument
+-o sw.SwXTextEmbeddedObject
+-o sw.SwXTextEmbeddedObjects
+-o sw.SwXTextField
+-o sw.SwXTextFieldMasters
+-o sw.SwXTextFieldTypes
+-o sw.SwXTextFrame
+-o sw.SwXTextFrameText
+-o sw.SwXTextGraphicObject
+-o sw.SwXTextGraphicObjects
+#i103696 -o sw.SwXTextPortion
+-o sw.SwXTextPortionEnumeration
+-o sw.SwXTextRange
+-o sw.SwXTextRanges
+-o sw.SwXTextSearch
+-o sw.SwXTextSection
+-o sw.SwXTextSections
+-o sw.SwXTextTable
+-o sw.SwXTextTableCursor
+-o sw.SwXTextTableRow
+-o sw.SwXTextTables
+#i85580 -o sw.SwXTextView
+-o sw.SwXTextViewCursor
+-o sw.SwXViewSettings
+-o sw.XMLContentExporter
+#i23394 -o sw.XMLContentImporter
+-o sw.XMLExporter
+-o sw.XMLImporter
+#i23394 -o sw.XMLMetaExporter
+-o sw.XMLMetaImporter
+-o sw.XMLSettingsExporter
+-o sw.XMLSettingsImporter
+-o sw.XMLStylesExporter
+#i23394 -o sw.XMLStylesImporter
+-o sw.DocumentSettings
diff --git a/sw/qa/unoapi/testdocuments/MailMerge.sxw b/sw/qa/unoapi/testdocuments/MailMerge.sxw
new file mode 100644
index 000000000000..108840535093
--- /dev/null
+++ b/sw/qa/unoapi/testdocuments/MailMerge.sxw
Binary files differ
diff --git a/sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sdw b/sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sdw
new file mode 100644
index 000000000000..4f5c2e39c030
--- /dev/null
+++ b/sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sdw
Binary files differ
diff --git a/sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sxw b/sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sxw
new file mode 100644
index 000000000000..75c6242f5070
--- /dev/null
+++ b/sw/qa/unoapi/testdocuments/SwXTextEmbeddedObject.sxw
Binary files differ
diff --git a/sw/qa/unoapi/testdocuments/XDocumentInsertable.sxw b/sw/qa/unoapi/testdocuments/XDocumentInsertable.sxw
new file mode 100644
index 000000000000..b1398769d7ac
--- /dev/null
+++ b/sw/qa/unoapi/testdocuments/XDocumentInsertable.sxw
Binary files differ
diff --git a/sw/qa/unoapi/testdocuments/sForm.sxw b/sw/qa/unoapi/testdocuments/sForm.sxw
new file mode 100644
index 000000000000..a4958930c348
--- /dev/null
+++ b/sw/qa/unoapi/testdocuments/sForm.sxw
Binary files differ
diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
new file mode 100755
index 000000000000..e1249a337ee8
--- /dev/null
+++ b/sw/sdi/_annotsh.sdi
@@ -0,0 +1,394 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _annotsh.sdi,v $
+ * $Revision: 1.6.82.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface _Annotation
+[ Automation = FALSE; ]
+{
+ FN_DELETE_COMMENT
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_DELETE_NOTE
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_DELETE_NOTE_AUTHOR
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_DELETE_ALL_NOTES
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_HIDE_NOTE
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_HIDE_NOTE_AUTHOR
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_HIDE_ALL_NOTES
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_POSTIT
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+
+ FN_REPLY
+ [
+ ExecMethod = NoteExec ;
+ StateMethod = GetNoteState ;
+ ]
+ FN_ESCAPE // api:
+ [
+ ExecMethod = NoteExec ;
+ ]
+
+ SfxVoidItem Cut SID_CUT ( ) // api:
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_COPY // api:
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ ]
+
+ SID_PASTE // api:
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PASTE_SPECIAL // api:
+ [
+ StateMethod = StateClpbrd ;
+ ExecMethod = ExecClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CLIPBOARD_FORMAT_ITEMS // status(final|play)
+ [
+ StateMethod = StateClpbrd ;
+ ExecMethod = ExecClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_SELECTALL // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = NoState ;
+ ]
+
+ SID_UNDO // api:
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+
+ ToolBoxConfig , MenuConfig , AccelConfig;
+ ]
+
+ SID_REDO // api:
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+
+ ]
+
+ SID_REPEAT // api:
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+ ]
+ SID_GETUNDOSTRINGS
+ [
+ StateMethod = StateUndo ;
+ ]
+
+ SID_GETREDOSTRINGS
+ [
+ StateMethod = StateUndo ;
+ ]
+
+ FN_FORMAT_RESET // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_FOOTNOTE_DLG // status()
+ [
+ ExecMethod = Exec ;
+ ]
+
+ SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ?
+ [
+ ExecMethod = Exec ;
+ ]
+
+ FN_WORDCOUNT_DIALOG
+ [
+ ExecMethod = Exec;
+ ]
+
+ FN_NUMBERING_OUTLINE_DLG // status(final|play)
+ [
+ ExecMethod = Exec ;
+ ]
+
+ SID_CHARMAP // api:
+ [
+ ExecMethod = Exec ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_INSERT_STRING
+ [
+ ExecMethod = Exec ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_FONT // status()
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_FONTHEIGHT // status()
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_COLOR // api:
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_WEIGHT // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_POSTURE // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_UNDERLINE // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_OVERLINE // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_CONTOUR
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_SHADOWED
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_STRIKEOUT
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_LANGUAGE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_LEFT // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_CENTER // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_RIGHT // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_BLOCK // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LINESPACE_10 // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LINESPACE_15 // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LINESPACE_20 // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CHAR_DLG // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PARA_DLG // api:
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_SET_SUPER_SCRIPT
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_SET_SUB_SCRIPT
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_SEARCH_ITEM // status()
+ [
+ ExecMethod = ExecSearch ;
+ StateMethod = StateSearch ;
+ Export = FALSE;
+ ]
+ FN_REPEAT_SEARCH // status(final|play)
+ [
+ ExecMethod = ExecSearch ;
+ ]
+ FID_SEARCH_NOW // status()
+ [
+ ExecMethod = ExecSearch ;
+ ]
+ SID_SEARCH_OPTIONS // status()
+ [
+ StateMethod = StateSearch ;
+ ]
+ FID_SEARCH_SEARCHSET // status()
+ [
+ ExecMethod = ExecSearch ;
+ ]
+ FID_SEARCH_REPLACESET // status()
+ [
+ ExecMethod = ExecSearch ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ // ab hier Export = FALSE;
+ FID_SEARCH_ON // status()
+ [
+ ExecMethod = ExecSearch ;
+ Export = FALSE;
+ ]
+ FID_SEARCH_OFF // status()
+ [
+ ExecMethod = ExecSearch ;
+ Export = FALSE;
+ ]
+}
diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi
new file mode 100644
index 000000000000..882104509b9e
--- /dev/null
+++ b/sw/sdi/_basesh.sdi
@@ -0,0 +1,528 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _basesh.sdi,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextSelection
+[
+ Automation = FALSE;
+]
+{
+ SID_ATTR_BRUSH
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_DELETE // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = GetState ;
+ FastCall = FALSE ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_BACKSPACE // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = GetState ;
+ FastCall = FALSE ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_SHIFT_BACKSPACE // status()
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_UNDO // status(final|play)
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+ ]
+
+ SID_GETUNDOSTRINGS // status(final|play)
+ [
+ StateMethod = StateUndo ;
+ ]
+
+ SID_REDO // status(final|play)
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+ ]
+
+ SID_GETREDOSTRINGS // status(final|play)
+ [
+ StateMethod = StateUndo ;
+ ]
+
+ SID_REPEAT // status()
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CUT // status(final|play)
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_COPY // status(final|play)
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ ]
+
+ SID_PASTE // status(final|play)
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CLIPBOARD_FORMAT_ITEMS // status(final|play)
+ [
+ StateMethod = StateClpbrd ;
+ ExecMethod = ExecClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PASTE_UNFORMATTED // status(final|play)
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PASTE_SPECIAL // status(final|play)
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_REPAGINATE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_CHANGE_DBFIELD
+ [
+ ExecMethod = ExecField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_UPDATE_FIELDS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_UPDATE_CHARTS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_UPDATE_ALL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_UPDATE_INPUTFIELDS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_FRAME_TO_ANCHOR // status()
+ [
+ /*OS: Datentypen unvertraeglich ?? */
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_GOTO_NEXT_OBJ // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_GOTO_PREV_OBJ // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_GOTO_NEXT_MARK // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_GOTO_PREV_MARK // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_PREV_BOOKMARK // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_NEXT_BOOKMARK // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ SID_GALLERY_FORMATS // status()
+ [
+ Export = FALSE ;
+ ExecMethod = Execute ;
+ ]
+
+ SID_GALLERY_ENABLE_ADDCOPY
+ [
+ Export = FALSE;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BACKGROUND_COLOR // status()
+ [
+ ExecMethod = ExecBckCol ;
+ StateMethod = GetBckColState ;
+ Cachable , AutoUpdate ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_EDIT_REGION // status(final|play)
+ [
+ ExecMethod = EditRegionDialog ;
+ StateMethod = GetState ;
+ ]
+
+ FN_INSERT_REGION // status()
+ [
+ ExecMethod = InsertRegionDialog;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_PAGE_DLG // status(final|play)
+ [
+ ExecMethod = ExecDlg ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_PAGE_COLUMN_DLG // status(final|play)
+ [
+ ExecMethod = ExecDlg ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_CONVERT_TABLE_TO_TEXT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_CONVERT_TEXT_TO_TABLE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_CONVERT_TEXT_TABLE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_FORMAT_BORDER_DLG // status(final|play)
+ [
+ ExecMethod = ExecDlg ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_BORDER_INNER // status()
+ [
+ StateMethod = GetBorderState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_BORDER_OUTER // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetBorderState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BORDER_REDUCED_MODE
+ [
+ StateMethod = GetBorderState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_BACKGROUND_DLG // status(final|play)
+ [
+ ExecMethod = ExecDlg ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SfxBoolItem StyleWatercanMode SID_STYLE_WATERCAN // status()
+ [
+ SfxUInt16Item WatercanStyleModeOnOff
+ (
+ SfxStringItem Param SID_STYLE_WATERCAN ,
+ SfxUInt16Item Family SID_STYLE_FAMILY
+ ) ;
+ ExecMethod = Execute ;
+ StateMethod = StateStyle ;
+ NoRecord;
+ GroupId = GID_TEMPLATE ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_STYLE_UPDATE_BY_EXAMPLE // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = StateStyle ;
+ ]
+
+ SID_STYLE_NEW_BY_EXAMPLE // status(fina|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = StateStyle ;
+ FastCall = TRUE; // fuer Macroausfuehrung!
+ ]
+ SID_STYLE_APPLY // status(fina|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = StateStyle ;
+ FastCall = TRUE;// fuer Macroausfuehrung!
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_STYLE_FAMILY1 // status(fina|play)
+ [
+ StateMethod = StateStyle ;
+ ]
+
+ SID_STYLE_FAMILY2 // status(fina|play)
+ [
+ StateMethod = StateStyle ;
+ ]
+
+ SID_STYLE_FAMILY3 // status(fina|play)
+ [
+ StateMethod = StateStyle ;
+ ]
+
+ SID_STYLE_FAMILY4 // status(fina|play)
+ [
+ StateMethod = StateStyle ;
+ ]
+
+ SID_STYLE_FAMILY5 // status(fina|play)
+ [
+ StateMethod = StateStyle ;
+ ]
+
+ //OS: Selection.Escape gibt es zusaetzlich zu Window.Escape
+
+ FN_ESCAPE // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ ]
+
+ SID_IMAP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Toggle = FALSE;
+ ]
+
+ SID_IMAP_EXEC
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+// Methode fuer Rahmen und Objekte
+ FN_TOOL_ANKER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TOOL_ANKER_PARAGRAPH
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TOOL_ANKER_CHAR
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TOOL_ANKER_AT_CHAR
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TOOL_ANKER_FRAME
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_UPDATE_ALL_LINKS // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+/*-----------------22.01.97 09.41-------------------
+// ab hier immer Export = FALSE
+--------------------------------------------------*/
+
+ FN_FRAME_WRAP // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_WRAP_IDEAL // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_NOWRAP // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_WRAPTHRU // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_WRAPTHRU_TRANSP // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_WRAP_CONTOUR // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_WRAP_ANCHOR_ONLY // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_WRAP_LEFT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+ FN_FRAME_WRAP_RIGHT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+
+
+
+ SID_GALLERY_BG_BRUSH
+ [
+ ExecMethod = ExecuteGallery;
+ StateMethod = GetGalleryState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE;
+ ]
+ SID_ATTR_BORDER_SHADOW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_XFORMS_DESIGN_MODE
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+}
+
diff --git a/sw/sdi/_beziers.sdi b/sw/sdi/_beziers.sdi
new file mode 100644
index 000000000000..3072b2a0a864
--- /dev/null
+++ b/sw/sdi/_beziers.sdi
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _beziers.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface _Bezier : Base
+[ Automation = FALSE; ]
+{
+ SID_DELETE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_BACKSPACE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_ESCAPE // api:
+ [
+ ExecMethod = Execute;
+ ]
+
+ SID_BEZIER_MOVE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_INSERT
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_DELETE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_CUTLINE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_CONVERT
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_EDGE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_SMOOTH
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_SYMMTR
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_CLOSE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_ELIMINATE_POINTS
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi
new file mode 100644
index 000000000000..9154e6ce2578
--- /dev/null
+++ b/sw/sdi/_docsh.sdi
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _docsh.sdi,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextDocument : OfficeDocument
+[
+ Automation = FALSE;
+]
+{
+ SID_PRINTPREVIEW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_AUTO_CORRECT_DLG
+ [
+ ExecMethod = Execute ;
+ ]
+
+ SID_STYLE_NEW
+ [
+ ExecMethod = ExecStyleSheet ;
+ StateMethod = NoState ;
+ ]
+
+ SID_STYLE_EDIT
+ [
+ ExecMethod = ExecStyleSheet ;
+ StateMethod = NoState ;
+ ]
+
+ SID_STYLE_DELETE
+ [
+ ExecMethod = ExecStyleSheet ;
+ StateMethod = NoState ;
+ ]
+
+ SID_TEMPLATE_LOAD
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ SID_GET_COLORTABLE
+ [
+ ExecMethod = Execute ;
+ ]
+
+ SID_SPELLCHECKER_CHANGED
+ [
+ ExecMethod = Execute ;
+ ]
+
+ SID_MAIL_PREPAREEXPORT
+ [
+ ExecMethod = Execute ;
+ ]
+ SID_MAIL_EXPORT_FINISHED
+ [
+ ExecMethod = Execute;
+ ]
+ //No Export
+ SID_STYLE_FAMILY1
+ [
+ Export = FALSE ;
+ StateMethod = StateStyleSheet ;
+ ]
+
+ SID_STYLE_FAMILY2
+ [
+ Export = FALSE ;
+ StateMethod = StateStyleSheet ;
+ ]
+
+ SID_STYLE_FAMILY3
+ [
+ Export = FALSE ;
+ StateMethod = StateStyleSheet ;
+ ]
+
+ SID_STYLE_FAMILY4
+ [
+ Export = FALSE ;
+ StateMethod = StateStyleSheet ;
+ ]
+ SID_STYLE_FAMILY5
+ [
+ Export = FALSE ;
+ StateMethod = StateStyleSheet ;
+ ]
+
+
+ SID_ATTR_YEAR2000
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+
+ SID_ATTR_CHAR_FONTLIST
+ [
+ StateMethod = GetState ;
+ ]
+
+ SID_BROWSER_MODE
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+
+ FN_PRINT_LAYOUT
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+}
+
+
diff --git a/sw/sdi/_drwbase.sdi b/sw/sdi/_drwbase.sdi
new file mode 100644
index 000000000000..68f0ce13edb3
--- /dev/null
+++ b/sw/sdi/_drwbase.sdi
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _drwbase.sdi,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextDrawBase
+[
+ Automation = FALSE;
+]
+{
+ FN_DRAW_WRAP_DLG
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_TRANSFORM
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_GROUP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_UNGROUP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ENTER_GROUP
+ [
+ AutoUpdate = TRUE ,
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_LEAVE_GROUP
+ [
+ AutoUpdate = TRUE ,
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_FRAME_TO_TOP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FRAME_TO_BOTTOM
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_UP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_DOWN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_DELETE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ FastCall = FALSE ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_BACKSPACE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ FastCall = FALSE ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_STYLE_CATALOG // ole(no) api(play/rec)
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ // #i68101#
+ FN_TITLE_DESCRIPTION_SHAPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NAME_SHAPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+
diff --git a/sw/sdi/_formsh.sdi b/sw/sdi/_formsh.sdi
new file mode 100644
index 000000000000..9fb62ca84a3c
--- /dev/null
+++ b/sw/sdi/_formsh.sdi
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _formsh.sdi,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface BaseTextDrawForm
+[
+ Automation = FALSE;
+]
+{
+ SID_HYPERLINK_SETLINK
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_HYPERLINK_GETLINK
+ [
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+
diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
new file mode 100644
index 000000000000..8081d8e04378
--- /dev/null
+++ b/sw/sdi/_frmsh.sdi
@@ -0,0 +1,308 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _frmsh.sdi,v $
+ * $Revision: 1.6.190.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextFrame
+[
+ Automation = FALSE;
+]
+{
+ FN_FRAME_TO_ANCHOR // status()
+ [
+ /*OS: Datentypen unvertraeglich ?? */
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_FRAME_ALIGN_VERT_CENTER // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_BOTTOM // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_TOP // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_ROW_CENTER // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_ROW_BOTTOM // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_ROW_TOP // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_CHAR_CENTER // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_CHAR_BOTTOM // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_VERT_CHAR_TOP // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_HORZ_CENTER // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_HORZ_RIGHT // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_ALIGN_HORZ_LEFT // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FRAME_TO_TOP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FRAME_TO_BOTTOM // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ FN_FRAME_UP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_DOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_ULSPACE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_LRSPACE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ GroupId = GID_FRAME;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_FRAME_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FRAME_LINESTYLE // status()
+ [
+ ExecMethod = ExecFrameStyle ;
+ StateMethod = GetLineStyleState ;
+ Export = FALSE; //#44439#
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FRAME_LINECOLOR // status(final|play)
+ [
+ ExecMethod = ExecFrameStyle ;
+ StateMethod = GetLineStyleState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_OBJECT_ALIGN_CENTER // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_ALIGN_RIGHT // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_ALIGN_LEFT // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_ALIGN_UP // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_ALIGN_MIDDLE // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_ALIGN_DOWN // status(play|final)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_FOOTNOTE_DLG // status()
+ [
+ ExecMethod = Execute;
+ ]
+
+ SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ?
+ [
+ ExecMethod = Execute ;
+ ]
+
+ FN_WORDCOUNT_DIALOG
+ [
+ ExecMethod = Execute;
+ ]
+
+ FN_NUMBERING_OUTLINE_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ ]
+ // --> OD 2009-07-08 #i73249#
+ FN_TITLE_DESCRIPTION_SHAPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ // <--
+
+
+ /*****************************************************
+
+ Abfragefunktionen fuer ImageMaps
+
+ ****************************************************/
+
+//
+// Slots ohne Export
+
+ FN_INSERT_FRAME
+ [
+ ExecMethod = Execute ;
+ StateMethod = StateInsert ;
+ Export = False;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_BORDER // status()
+ [
+ ExecMethod = ExecFrameStyle ;
+ StateMethod = GetLineStyleState ;
+ GroupId = GID_FRAME;
+ Export = False;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_HYPERLINK_SETLINK // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_HYPERLINK_GETLINK // status()
+ [
+ StateMethod = GetState ;
+ ]
+
+ FN_FRAME_MIRROR_ON_EVEN_PAGES // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+
diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi
new file mode 100644
index 000000000000..9d431b8b8291
--- /dev/null
+++ b/sw/sdi/_grfsh.sdi
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _grfsh.sdi,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextGraphic
+[
+ Automation = FALSE;
+]
+{
+ FN_FLIP_VERT_GRAFIC // status(final|play)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FLIP_HORZ_GRAFIC // status(final|play)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_GRAFIC_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ FN_SAVE_GRAPHIC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ ]
+
+ SID_INSERT_GRAPHIC // zeigt auf FN_FORMAT_GRAFIC_DLG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TWAIN_TRANSFER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_GRAPHIC_MIRROR_ON_EVEN_PAGES // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_GRAF_LUMINANCE // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_CONTRAST // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_RED // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_GREEN // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_BLUE // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_GAMMA // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_TRANSPARENCE // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_INVERT // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_GRAF_MODE // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_GRFFILTER_INVERT // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_SMOOTH // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_SHARPEN // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_REMOVENOISE // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_SOBEL // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_MOSAIC // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_EMBOSS // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_POSTER // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_POPART // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_SEPIA // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GRFFILTER_SOLARIZE // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_COLOR_SETTINGS // status(final|play|rec)
+ [
+ ExecMethod = ExecAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+}
+
diff --git a/sw/sdi/_listsh.sdi b/sw/sdi/_listsh.sdi
new file mode 100644
index 000000000000..c96e52fa03ed
--- /dev/null
+++ b/sw/sdi/_listsh.sdi
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _listsh.sdi,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextList
+[
+ Automation = FALSE
+]
+{
+ FN_NUM_BULLET_DOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_NEXT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_NONUM // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_OFF // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ FN_NUM_BULLET_OUTLINE_DOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_OUTLINE_MOVEDOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_OUTLINE_MOVEUP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_OUTLINE_UP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_PREV // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_BULLET_UP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUM_OR_NONUM // status(play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
diff --git a/sw/sdi/_mediash.sdi b/sw/sdi/_mediash.sdi
new file mode 100644
index 000000000000..4457ee400134
--- /dev/null
+++ b/sw/sdi/_mediash.sdi
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _mediash.sdi,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextMedia
+[
+ Automation = FALSE;
+]
+{
+ SID_DELETE
+ [
+ ExecMethod = ExecMedia;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_BACKSPACE
+ [
+ ExecMethod = ExecMedia;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_AVMEDIA_TOOLBOX // status(final|play|rec)
+ [
+ ExecMethod = ExecMedia;
+ StateMethod = GetMediaState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
diff --git a/sw/sdi/_olesh.sdi b/sw/sdi/_olesh.sdi
new file mode 100644
index 000000000000..dfa1a94358c3
--- /dev/null
+++ b/sw/sdi/_olesh.sdi
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _olesh.sdi,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextOLEObject
+[
+ Automation = FALSE;
+]
+{
+}
+
+
diff --git a/sw/sdi/_tabsh.sdi b/sw/sdi/_tabsh.sdi
new file mode 100644
index 000000000000..14cd3a060c64
--- /dev/null
+++ b/sw/sdi/_tabsh.sdi
@@ -0,0 +1,412 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _tabsh.sdi,v $
+ * $Revision: 1.14 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface BaseTextTable
+[
+ Automation = FALSE;
+]
+{
+
+ FN_FORMAT_TABLE_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+ SID_ATTR_BRUSH
+ [
+ ExecMethod = Execute ;
+ ]
+ SID_ATTR_BRUSH_ROW
+ [
+ ExecMethod = Execute ;
+ ]
+ SID_ATTR_BRUSH_TABLE
+ [
+ ExecMethod = Execute ;
+ ]
+ FN_NUM_FORMAT_TABLE_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_CALC_TABLE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_TABLE_AUTOSUM // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+
+ FN_TABLE_VERT_NONE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_VERT_CENTER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_VERT_BOTTOM
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_SET_COL_WIDTH // status( final|play )
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_ULSPACE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_LRSPACE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ GroupId = GID_TABLE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_DELETE_COL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_DELETE_ROW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_DELETE_TABLE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_GOTO_NEXT_CELL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_GOTO_PREV_CELL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+ FN_END_TABLE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_START_TABLE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_TABLE_INSERT_COL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_INSERT_COL_DLG // status(final|play)
+ [
+ Export = FALSE ;
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_INSERT_ROW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_INSERT_ROW_DLG // status(final|play)
+ [
+ Export = FALSE ;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_MERGE_CELLS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_OPTIMIZE_TABLE
+ [
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ StateMethod = GetState ;
+ ]
+
+ FN_TABLE_ADJUST_CELLS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_BALANCE_CELLS // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_BALANCE_ROWS // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_SELECT_ALL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_TABLE_SELECT_COL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+
+ FN_TABLE_SELECT_ROW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+ FN_TABLE_SELECT_CELL
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_SET_ROW_HEIGHT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_ROW_SPLIT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_OPTIMAL_HEIGHT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_SPLIT_CELLS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_SPLIT_TABLE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_MERGE_TABLE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_UNSET_READ_ONLY_CELLS // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_AUTOFORMAT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_BORDER // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetFrmBorderState ;
+ GroupId = GID_TABLE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FRAME_LINESTYLE // status()
+ [
+ ExecMethod = ExecTableStyle ;
+ StateMethod = GetLineStyleState ;
+ Export = FALSE; //#44439#
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FRAME_LINECOLOR // status(play)
+ [
+ ExecMethod = ExecTableStyle ;
+ StateMethod = GetLineStyleState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TABLE_MODE_FIX
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+
+ FN_TABLE_MODE_FIX_PROP
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+
+ FN_TABLE_MODE_VARIABLE
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+
+ FN_NUMBER_FORMAT
+ [
+ ExecMethod = ExecNumberFormat;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUMBER_STANDARD
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_TWODEC
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_SCIENTIFIC
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_DATE
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_TIME
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_CURRENCY
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_PERCENT
+ [
+ ExecMethod = ExecNumberFormat;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+// Slots ohne Export
+
+ FN_INSERT_TABLE
+ [
+ Export = FALSE ;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_HEADLINE_REPEAT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_SELECT_CELL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_DELETE_TABLE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
new file mode 100644
index 000000000000..3ce311a4d7c2
--- /dev/null
+++ b/sw/sdi/_textsh.sdi
@@ -0,0 +1,1590 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _textsh.sdi,v $
+ * $Revision: 1.42.208.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface BaseText
+[
+ Automation = FALSE;
+]
+{
+ FN_NEW_GLOSSARY // status(final|play)
+ [
+ ExecMethod = ExecGlossary ;
+ ]
+ FN_SET_ACT_GLOSSARY // status(final|play)
+ [
+ ExecMethod = ExecGlossary ;
+ ]
+ FN_INSERT_GLOSSARY // status(final|play|record)
+ [
+ ExecMethod = ExecGlossary ;
+ ]
+
+ FN_TXTATR_INET // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_SCALEWIDTH // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_ROTATED // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_BRUSH_CHAR // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_DROPCAPS
+ [
+ ExecMethod = ExecParaAttrArgs ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PARA_VERTALIGN
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_REGISTER
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_LRSPACE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_ULSPACE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_NUMRULE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ //#outline level,add by zhaojianwei
+ SID_ATTR_PARA_OUTLINE_LEVEL
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]//<-end,zhaojianwei
+
+ SID_ATTR_PARA_PAGENUM
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUMBER_NEWSTART
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUM_CONTINUE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_NEWSTART_AT
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_LINENUMBER
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_INSERTDOC // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_BOOKMARK // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_BOOKMARK // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUM_BULLET_MOVEDOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUM_BULLET_MOVEUP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_EDIT_FORMULA // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CHARMAP // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_PAGEHEADER // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ ]
+ FN_INSERT_PAGEFOOTER // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ ]
+
+ //--------------------------------------------------------------------------
+ FN_INSERT_STRING // status(final|play|rec)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_SOFT_HYPHEN // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_HARDHYPHEN // status()
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_HARD_SPACE // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_RLM
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_LRM
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_ZWSP
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_ZWNBSP
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_BREAK // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_PAGEBREAK // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_LINEBREAK // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_COLUMN_BREAK // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_BREAK_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_AVMEDIA // status(final|play)
+ [
+ ExecMethod = ExecInsert;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_HRULER // status()
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ ]
+ SID_INSERT_DIAGRAM // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_SOUND
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_VIDEO
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_SMA // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_FLOATINGFRAME // status()
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_OBJECT // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_PLUGIN // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_APPLET // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_TABLE // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_HYPERLINK_SETLINK // status()
+ [
+ ExecMethod = ExecInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_HYPERLINK_GETLINK // status()
+ [
+ StateMethod = StateInsert ;
+ ]
+ FN_INSERT_HYPERLINK // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_HYPERLINK_DIALOG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+ SID_RUBY_DIALOG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+ FN_EDIT_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_REMOVE_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_COPY_HYPERLINK_LOCATION
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_UNSET_READ_ONLY // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_SENT // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_BACK_SENT // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_WORD // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_BACK_WORD // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_LINE // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_BACK_LINE // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_PARA // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_BACK_PARA // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DELETE_WHOLE_LINE // status(final|play)
+ [
+ ExecMethod = ExecDelete ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_CHAR_LEFT // status(final|play)
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ ]
+ FN_CHAR_RIGHT // status(final|play)
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ ]
+ FN_LINE_UP // status(final|play)
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ ]
+ FN_LINE_DOWN // status(final|play)
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ ]
+ FN_SELECT_WORD // status(final|play)
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ ]
+ SID_SELECTALL // status(final|play)
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ ]
+ //
+ // Goto - Methoden
+ //
+ FN_CNTNT_TO_NEXT_FRAME // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_COLUMN // status(final|play)
+ [
+ ExecMethod = ExecMoveCol ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_COLUMN // status(final|play)
+ [
+ ExecMethod = ExecMoveCol ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_NEXT_COLUMN // status(final|play)
+ [
+ ExecMethod = ExecMoveCol ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_NEXT_COLUMN // status(final|play)
+ [
+ ExecMethod = ExecMoveCol ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_PREV_COLUMN // status(final|play)
+ [
+ ExecMethod = ExecMoveCol ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_PREV_COLUMN // status(final|play)
+ [
+ ExecMethod = ExecMoveCol ;
+ StateMethod = NoState ;
+ ]
+ FN_TO_HEADER // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_TO_FOOTER // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_TO_FOOTNOTE_AREA
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_PREV_TABLE // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_NEXT_TABLE // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_GOTO_PREV_REGION
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_GOTO_NEXT_REGION
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_NEXT_WORD // status(final|play)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_PARA // status(final|play)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_PARA // status(final|play)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_PREV_PARA // status(final)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_NEXT_PARA // status(final)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_PREV_WORD // status(final|play)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_NEXT_SENT // status(final|play)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_PREV_SENT // status(final|play)
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_NEXT_PAGE // status(final|play)
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_NEXT_PAGE // status(final|play)
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_PREV_PAGE // status(final|play)
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_PREV_PAGE // status(final|play)
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_PAGE // status(final|play)
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_PAGE // status(final|play)
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_LINE // status(final|play)
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_LINE // status(final|play)
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ ]
+ FN_START_OF_DOCUMENT // status(final|play)
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ ]
+ FN_END_OF_DOCUMENT // status(final|play)
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ ]
+ FN_NEXT_TOXMARK // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc;
+ StateMethod = NoState ;
+ ]
+
+ FN_PREV_TOXMARK // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc;
+ StateMethod = NoState ;
+ ]
+
+ FN_NEXT_TBLFML // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc;
+ StateMethod = NoState ;
+ ]
+
+ FN_PREV_TBLFML // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc;
+ StateMethod = NoState ;
+ ]
+
+ FN_NEXT_TBLFML_ERR // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc;
+ StateMethod = NoState ;
+ ]
+
+ FN_PREV_TBLFML_ERR // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc;
+ StateMethod = NoState ;
+ ]
+
+ //
+ // Get - Properties
+ //
+ FN_AUTOFORMAT_AUTO // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_AUTOFORMAT_APPLY // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_AUTOFORMAT_REDLINE_APPLY // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_AUTO_CORRECT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_SORTING_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_TABLE_SORT_DIALOG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_NUMBERING_OUTLINE_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+ FN_CALCULATE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_FORMAT_RESET // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_GOTO_REFERENCE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //Parameter kann noch nicht aufgezeichnet werden
+ FN_NUM_NUMBERING_ON // status(final|play)
+ [
+ ExecMethod = ExecEnterNum ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUMBER_BULLETS // status(final|play)
+ [
+ ExecMethod = ExecEnterNum ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_NUM_BULLET_ON // status(final|play)
+ [
+ ExecMethod = ExecEnterNum ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_FRAME // status(final|play)
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_COLUMN // status()
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_INSERT_FOOTNOTE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ /*-----------------24.01.97 07.33-------------------
+ Fussnoten - Befehle
+--------------------------------------------------*/
+
+ FN_INSERT_ENDNOTE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_FORMAT_FOOTNOTE_DLG // status()
+ [
+ ExecMethod = Execute ;
+ ]
+ FN_FOOTNOTE_TO_ANCHOR // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_NEXT_FOOTNOTE // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ FN_PREV_FOOTNOTE // status(final|play)
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+
+ FN_INSERT_FOOTNOTE_DLG // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ /*-----------------24.01.97 07.34-------------------
+ Ende Fussnoten
+ --------------------------------------------------*/
+ FN_INSERT_FIELD // status(final|play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ AutoUpdate ;
+ ]
+ FN_INSERT_DBFIELD
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_REF_FIELD
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ AutoUpdate ;
+ ]
+ FN_INSERT_FIELD_CTRL
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ //--------------------------------------------------------------------------
+ FN_INSERT_FLD_PGNUMBER
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ReadOnlyDoc = FALSE ;
+ ]
+ FN_INSERT_FLD_PGCOUNT
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ReadOnlyDoc = FALSE ;
+ ]
+
+ FN_INSERT_FLD_TITLE
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ReadOnlyDoc = FALSE ;
+ ]
+ FN_INSERT_FLD_DATE
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ //--------------------------------------------------------------------------
+ FN_INSERT_FLD_TIME
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ //--------------------------------------------------------------------------
+ FN_INSERT_FLD_AUTHOR
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_GOTO_NEXT_INPUTFLD // status(final|play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = NoState ;
+ ]
+ FN_GOTO_PREV_INPUTFLD // status(final|play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = NoState ;
+ ]
+ FN_EXECUTE_MACROFIELD // status()
+ [
+ Export = FALSE ;
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ ]
+ FN_EDIT_FIELD // status(final|play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_GLOSSARY_DLG // status()
+ [
+ ExecMethod = ExecGlossary ;
+ StateMethod = GetState ;
+ ]
+ FN_EXPAND_GLOSSARY // status(final|play)
+ [
+ ExecMethod = ExecGlossary ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_POSTIT // status(final|play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_DELETE_NOTE
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_DELETE_NOTE_AUTHOR
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_DELETE_ALL_NOTES
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_HIDE_NOTE
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_HIDE_NOTE_AUTHOR
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_HIDE_ALL_NOTES
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ FN_REDLINE_COMMENT // status(play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR|SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_JAVAEDIT // status(final|play)
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField;
+ ]
+ // Slots mit Export = FALSE
+ //Slots ohne Export
+ FN_CHAR_LEFT_SEL
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_CHAR_RIGHT_SEL
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_LINE_UP_SEL
+ [
+ ExecMethod = ExecBasicMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_LINE_DOWN_SEL
+ [
+ ExecMethod = ExecBasicMove;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_START_OF_NEXT_PAGE_SEL
+ [
+ ExecMethod = ExecMovePage;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_END_OF_NEXT_PAGE_SEL
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_START_OF_PREV_PAGE_SEL
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_END_OF_PREV_PAGE_SEL
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_START_OF_PAGE_SEL
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_END_OF_PAGE_SEL
+ [
+ ExecMethod = ExecMovePage ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_NEXT_WORD_SEL
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_START_OF_PARA_SEL
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_END_OF_PARA_SEL
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_PREV_WORD_SEL
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_NEXT_SENT_SEL
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_START_OF_LINE_SEL
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_END_OF_LINE_SEL
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_START_OF_DOCUMENT_SEL
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_END_OF_DOCUMENT_SEL
+ [
+ ExecMethod = ExecMove ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_PREV_SENT_SEL
+ [
+ ExecMethod = ExecMoveLingu ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_QRY_INSERT
+ [
+ ExecMethod = ExecDB ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_QRY_MERGE_FIELD
+ [
+ ExecMethod = ExecDB ;
+ StateMethod = NoState ;
+ Export = FALSE ;
+ ]
+ FN_QRY_INSERT_FIELD
+ [
+ ExecMethod = ExecDB ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_ADJUST_LEFT
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_ADJUST_RIGHT
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_ADJUST_CENTER
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_ADJUST_BLOCK
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_LINESPACE_10
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_LINESPACE_15
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_LINESPACE_20
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Export = FALSE ;
+ ]
+ SID_ATTR_PARA_ADJUST // status(final|play)
+ [
+ // (0=links, 1=rechts, 2=block, 3=zentriert, )"
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_LINESPACE // status(final|play)
+ [
+ // SvxLineSpace LineSpace MID_LINESPACE;
+ // UINT16 LineHeight MID_HEIGHT; // % or direct
+ // SvxInterLineSpace InterLineSpace MID_INTER_LINESPACE;
+ // INT16 InterSpace MID_INTER_SPACE;
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_SPLIT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_KEEP // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_WIDOWS // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_ORPHANS // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_PAGEBREAK // status(final|play)
+ [
+ ExecMethod = ExecParaAttrArgs ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_MODEL // status(final|play)
+ [
+ ExecMethod = ExecParaAttrArgs ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_PARA_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_SELECT_PARA // status(final|play)
+ [
+ ExecMethod = Execute ;
+ ]
+ SID_DEC_INDENT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INC_INDENT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DEC_INDENT_OFFSET
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INC_INDENT_OFFSET
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_DROPCAPS // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DROP_TEXT
+ [
+ ExecMethod = Execute;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_DROP_CHAR_STYLE_NAME
+ [
+ ExecMethod = ExecParaAttrArgs;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_HYPHENZONE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_RELIEF
+ [
+ ExecMethod = ExecTxtCtrl ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_FONT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtFontCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CJK_FONT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtFontCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CTL_FONT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtFontCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_FONTHEIGHT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtFontCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CJK_FONTHEIGHT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtFontCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CTL_FONTHEIGHT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtFontCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_COLOR_BACKGROUND // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_COLOR_BACKGROUND_EXT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_COLOR_EXT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_COLOR2
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_COLOR // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl ;
+ StateMethod = GetTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_WEIGHT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CJK_WEIGHT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CTL_WEIGHT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_POSTURE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CJK_POSTURE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CTL_POSTURE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_UNDERLINE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_OVERLINE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_FLASH // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_STRIKEOUT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_UNDERLINE_DOUBLE // status(final|play)
+ [
+ ExecMethod = ExecCharAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CONTOUR // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_SHADOWED // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_AUTOKERN // // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_ESCAPEMENT // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_SET_SUPER_SCRIPT
+ [
+ ExecMethod = ExecCharAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_SET_SUB_SCRIPT
+ [
+ ExecMethod = ExecCharAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CASEMAP // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_LANGUAGE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;;
+ StateMethod = GetTxtFontCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_KERNING // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CHAR_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CHAR_DLG_FOR_PARAGRAPH
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_WORDLINEMODE // status(final|play)
+ [
+ ExecMethod = ExecTxtCtrl;
+ StateMethod = GetTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_GROW_FONT_SIZE // status(final|play)
+ [
+ ExecMethod = ExecCharAttrArgs ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_SHRINK_FONT_SIZE // status(final|play)
+ [
+ ExecMethod = ExecCharAttrArgs ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_REMOVE_DIRECT_CHAR_FORMATS
+ [
+ ExecMethod = ExecCharAttr ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_UPPER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_LOWER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_HALFWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_FULLWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_HIRAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_KATAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_LEFT_TO_RIGHT
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_RIGHT_TO_LEFT
+ [
+ ExecMethod = ExecParaAttr ;
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_VERTICALTEXT_STATE
+ [
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CTLFONT_STATE
+ [
+ StateMethod = GetAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_READONLY_SELECTION_MODE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_SELECTION_MODE_DEFAULT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_SELECTION_MODE_BLOCK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_OPEN_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_OPEN_SMARTTAGMENU
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ?
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_WORDCOUNT_DIALOG
+ [
+ ExecMethod = Execute;
+ ]
+
+ SID_LANGUAGE_STATUS
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
+
+
+} //ende interface text
+
+
+
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
new file mode 100644
index 000000000000..7623da2c3ff0
--- /dev/null
+++ b/sw/sdi/_viewsh.sdi
@@ -0,0 +1,777 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: _viewsh.sdi,v $
+ * $Revision: 1.34 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+interface BaseTextEditView : View
+[
+ Automation = FALSE;
+]
+{
+ FN_REFRESH_VIEW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ ]
+ FN_PAGEUP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_PAGEUP_SEL // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_UNDO // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FORMATPAINTBRUSH //
+ [
+ ExecMethod = ExecFormatPaintbrush ;
+ StateMethod = StateFormatPaintbrush ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CLEARHISTORY // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_CREATE_SW_DRAWVIEW
+ [
+ ExecMethod = Execute;
+ ]
+ FN_PAGEDOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_PAGEDOWN_SEL // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_NAVIGATION_PI_GOTO_PAGE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+ FN_SCROLL_NAVIGATION
+ [
+ ExecMethod = NoExec ;
+ StateMethod = NoState ;
+ ]
+ FN_SCROLL_NEXT_PREV
+ [
+ ExecMethod = Execute;
+ ]
+ FN_SET_PAGE_STYLE // status(final|play)
+ [
+ ExecMethod = ExecColl ;
+ ]
+ SID_OBJECT_SELECT
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ FN_REDLINE_PROTECT
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_REDLINE_ON // status()
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_REDLINE_SHOW // status()
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_REDLINE_ACCEPT // status(play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_REDLINE_ACCEPT_DIRECT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_REDLINE_REJECT_DIRECT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+
+ SID_DOCUMENT_COMPARE // status(play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ SID_DOCUMENT_MERGE // status(play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ FN_ESCAPE // status(final|play|rec)
+ [
+ ExecMethod = Execute ;
+ ]
+ FN_FAX // status(final|play)
+ [
+ ExecMethod = ExecutePrint ;
+ ]
+ SID_PRINTDOC // status(final|play)
+ [
+ ExecMethod = ExecutePrint ;
+ StateMethod = GetState ;
+ ]
+ SID_PRINTDOCDIRECT // status(final|play)
+ [
+ ExecMethod = ExecutePrint ;
+ StateMethod = GetState ;
+ ]
+ SID_ATTR_LRSPACE
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ GroupId = GID_EDIT ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_ULSPACE
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_LONG_LRSPACE // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_LONG_ULSPACE // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_LRSPACE // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_LRSPACE_VERTICAL // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_BORDERS // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_BORDERS_VERTICAL // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_BORDER_DISTANCE // status()
+ [
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_PAGE_POS // status()
+ [
+ ExecMethod = NoExec ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_TEXT_RIGHT_TO_LEFT
+ [
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_LR_MIN_MAX // status()
+ [
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_PROTECT // status()
+ [
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_ROWS // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RULER_ROWS_VERTICAL // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_EDIT_LINK_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_SPELL_GRAMMAR_DIALOG
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_RECHECK_DOCUMENT
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_LINE_NUMBERING_DLG // status()
+ [
+ ExecMethod = Execute;
+ ]
+ FN_UPDATE_TOX // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ MenuConfig , AccelConfig , ToolBoxConfig ;
+
+ ]
+ FN_UPDATE_CUR_TOX // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_EDIT_CURRENT_TOX // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_TWAIN_SELECT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_TWAIN_TRANSFER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ //---------------------------------------------------------------------
+ //Ab hier Statusleiste
+ FN_STAT_PAGE // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ FN_STAT_BOOKMARK // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ ]
+ FN_STAT_TEMPLATE // status(final|play)
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ FN_STAT_SELMODE // status(final|play)
+ [
+ //Aktueller Selektionsmode: 0 == Normal, 2 == Ergaenzen, 1 == Erweitern
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ FN_SET_ADD_MODE // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = NoState ;
+ ]
+ FN_SET_EXT_MODE // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = NoState ;
+ ]
+ SID_ATTR_ZOOM // status(final|play)
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ SID_ATTR_VIEWLAYOUT // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ SID_ATTR_ZOOMSLIDER // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ SID_ATTR_INSERT // status(final|play|rec)
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ SID_ATTR_SIZE // status()
+ [
+ ExecMethod = ExecuteStatusLine ;
+ StateMethod = StateStatusLine ;
+ ]
+ SID_ATTR_POSITION // status()
+ [
+ StateMethod = StateStatusLine ;
+ ]
+ SID_TABLE_CELL // status()
+ [
+ StateMethod = StateStatusLine ;
+ ]
+ //----------------------------------------------
+ //End mit Statusleiste
+ //----------------------------------------------
+ SID_ATTR_BORDER_SHADOW // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ /****************************************************/
+ /* */
+ /* Properties Seitenformat */
+ /* */
+ /****************************************************/
+ SID_ATTR_PAGE // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ATTR_PAGE_SIZE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ATTR_PAGE_MAXSIZE // status()
+ [
+ Export = FALSE ;
+ ExecMethod = Execute ;
+ ]
+ SID_ATTR_PAGE_PAPERBIN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_THESAURUS_DLG // status(final|play)
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_HANGUL_HANJA_CONVERSION // status(final|play)
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CHINESE_CONVERSION
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ /*
+ suchen und ersetzen
+*/
+
+
+ SID_SEARCH_ITEM // status()
+ [
+ ExecMethod = ExecSearch ;
+ StateMethod = StateSearch ;
+ Export = FALSE;
+ ]
+ FN_REPEAT_SEARCH // status(final|play)
+ [
+ ExecMethod = ExecSearch ;
+ ]
+ FID_SEARCH_NOW // status()
+ [
+ ExecMethod = ExecSearch ;
+ ]
+ SID_SEARCH_OPTIONS // status()
+ [
+ StateMethod = StateSearch ;
+ ]
+ FID_SEARCH_SEARCHSET // status()
+ [
+ ExecMethod = ExecSearch ;
+ ]
+ FID_SEARCH_REPLACESET // status()
+ [
+ ExecMethod = ExecSearch ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_TABSTOP // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_TABSTOP_VERTICAL // status()
+ [
+ ExecMethod = ExecTabWin ;
+ StateMethod = StateTabWin ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ // ab hier Export = FALSE;
+ FID_SEARCH_ON // status()
+ [
+ ExecMethod = ExecSearch ;
+ Export = FALSE;
+ ]
+ FID_SEARCH_OFF // status()
+ [
+ ExecMethod = ExecSearch ;
+ Export = FALSE;
+ ]
+ FN_INSERT_CTRL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ ]
+
+ SID_ATTR_DEFTABSTOP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_LANGUAGE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CJK_LANGUAGE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_CTL_LANGUAGE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_JUMPTOMARK
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ FastCall , Cachable ;
+ ]
+
+ FN_SYNC_LABELS // status(play)
+ [
+ ExecMethod = Execute ;
+ ]
+ FN_MAILMERGE_CHILDWINDOW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+
+ FN_MAILMERGE_SENDMAIL_CHILDWINDOW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+
+ SID_ATTR_BRUSH // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_GALLERY
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_AVMEDIA_PLAYER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_VIEW_DATA_SOURCE_BROWSER // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+ SID_READONLY_MODE // ole : no, status : no
+ [
+ StateMethod = GetState ;
+ ]
+ SID_IMAGE_ORIENTATION
+ [
+ StateMethod = GetState ;
+ ]
+ FN_INSERT_FIELD_DATA_ONLY // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_QRY_MERGE // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+ SID_ALIGN_ANY_LEFT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN_ANY_HCENTER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN_ANY_RIGHT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN_ANY_JUSTIFIED
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN_ANY_TOP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN_ANY_VCENTER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ALIGN_ANY_BOTTOM
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_RESTORE_EDITING_VIEW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_INSERT_GRAPHIC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_AUTOSPELL_CHECK
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
+
+ //Extra/Optionen/Ansicht
+ //Wird zusammen zum Property ViewSettings
+ FN_VIEW_HIDDEN_PARA
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ ]
+
+ FN_VIEW_NOTES
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ ]
+ // alles ab hier kann weg (Export = FALSE;), wenn die vorangehenden funktionieren
+ FN_RULER // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ Cachable;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_VIEW_BOUNDS // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ Cachable;
+ ]
+
+ FN_VIEW_GRAPHIC // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE ;
+ ]
+ FN_VIEW_FIELDS // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ ]
+
+ FN_VIEW_FIELDNAME // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Cachable ;
+ Export = FALSE;
+ ]
+
+ FN_VIEW_MARKS // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Cachable ;
+ Export = FALSE;
+ ]
+
+ FN_VIEW_META_CHARS // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Cachable ;
+ Export = FALSE;
+ ]
+
+ FN_VIEW_TABLEGRID // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
+
+ SID_GRID_VISIBLE
+ [
+ ExecMethod = ExecViewOptions;
+ StateMethod = StateViewOptions ;
+ ]
+ SID_GRID_USE
+ [
+ ExecMethod = ExecViewOptions;
+ StateMethod = StateViewOptions ;
+ ]
+ SID_HELPLINES_MOVE
+ [
+ ExecMethod = ExecViewOptions;
+ StateMethod = StateViewOptions ;
+ ]
+
+ FN_VLINEAL // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_HSCROLLBAR // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ ]
+
+ FN_VSCROLLBAR // status()
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ Export = FALSE;
+ ]
+
+ FN_SHADOWCURSOR // status(final|play)
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+interface GlobalContents
+[ uuid = "1FD80520-F517-11d0-AC9B-008029E867C6"; ]
+{
+ UINT16 Type FN_COLL_TYPE
+ (
+ UINT16 Position FN_COLL_TYPE
+ )
+ [
+ ]
+
+ // Bereichsname, Index-Titel oder Leerstring
+ String Title FN_COLL_TITLE
+ (
+ UINT16 Position FN_COLL_TITLE
+ )
+ [
+ ]
+ // ohne FileName wird ein TextBereich an der Position eingefuegt
+ BOOL InsertDocument FN_COLL_ADD
+ (
+ UINT16 Position FN_COLL_ADD,
+ UINT16 FileName FN_PARAM_1
+ )
+ [
+ ]
+
+}
+
diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi
new file mode 100755
index 000000000000..c3693daf6c19
--- /dev/null
+++ b/sw/sdi/annotsh.sdi
@@ -0,0 +1,355 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: annotsh.sdi,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface Annotation : _Annotation
+[
+ uuid = "CA0C4280-293D-11D1-89CB-008029E4B0B1"
+]
+{
+
+ FN_THESAURUS_DLG // api:
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetLinguState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_HANGUL_HANJA_CONVERSION // api:
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetLinguState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CHINESE_CONVERSION // api:
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetLinguState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_STYLE_CATALOG // ole(no) api(play/rec)
+ [
+ StateMethod = StateDisableItems ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TWAIN_SELECT
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_TWAIN_TRANSFER
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_INSERT_GRAPHIC
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_AUTOSPELL_CHECK
+ [
+ ExecMethod = Exec;
+ StateMethod = GetState;
+ ]
+
+ SID_HYPERLINK_SETLINK // status()
+ [
+ ExecMethod = Exec ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_HYPERLINK_GETLINK // status()
+ [
+ StateMethod = StateInsert ;
+ ]
+
+ FN_INSERT_SOFT_HYPHEN // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_INSERT_HARDHYPHEN // status()
+ [
+ ExecMethod = Exec ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_INSERT_HARD_SPACE // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_INSERT_RLM
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_INSERT_LRM
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_INSERT_ZWSP
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_INSERT_ZWNBSP
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LEFT_TO_RIGHT
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_RIGHT_TO_LEFT
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TEXTDIRECTION_LEFT_TO_RIGHT
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TEXTDIRECTION_TOP_TO_BOTTOM
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_VERTICALTEXT_STATE
+ [
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CTLFONT_STATE
+ [
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_UPPER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_LOWER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_HALFWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_FULLWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_HIRAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_KATAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_WORDLINEMODE // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_RELIEF
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_LANGUAGE // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_KERNING // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_AUTOKERN // // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_ESCAPEMENT // status(final|play)
+ [
+ ExecMethod = Exec ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_SCALEWIDTH // status()
+ [
+ ExecMethod = Exec ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_STYLE_FAMILY1
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_FAMILY2
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_FAMILY3
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_FAMILY4
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_FAMILY5
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_WATERCAN // status()
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_UPDATE_BY_EXAMPLE // status()
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_NEW_BY_EXAMPLE // status(fina|play)
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_APPLY // status(fina|play)
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_NEW // ole : no, status : ?
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_EDIT // ole : no, status : ?
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_STYLE_DELETE // ole : no, status : ?
+ [
+ StateMethod = StateDisableItems ;
+ ]
+ FN_STAT_SELMODE
+ [
+ StateMethod = StateStatusLine ;
+ ]
+
+ FN_STAT_TEMPLATE
+ [
+ StateMethod = StateStatusLine ;
+ ]
+
+ SID_LANGUAGE_STATUS
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetLinguState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+}
+
+shell SwAnnotationShell
+{
+ import Annotation[Automation];
+}
diff --git a/sw/sdi/basesh.sdi b/sw/sdi/basesh.sdi
new file mode 100644
index 000000000000..d8ceb09157d7
--- /dev/null
+++ b/sw/sdi/basesh.sdi
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: basesh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextSelection : BaseTextSelection
+[
+ uuid = "F23BA0A8-73A0-11d0-89CA-008029E4B0B1"
+]
+{
+ // hier sollen die Slots eingefuegt werden, die vom StarWriter/WEB
+ // nicht unterstuetzt werden
+
+ FN_TOOL_ANKER_PAGE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CONTOUR_DLG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CONTOUR_EXEC
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+} // end interface Base
+
+
+shell SwBaseShell
+{
+ import TextSelection[Automation];
+}
+
diff --git a/sw/sdi/beziersh.sdi b/sw/sdi/beziersh.sdi
new file mode 100644
index 000000000000..e58d8cc6c7a4
--- /dev/null
+++ b/sw/sdi/beziersh.sdi
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: beziersh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextBezier : TextSelection
+[
+ uuid = "68EF7EA0-6876-11D0-A887-008029E86826" ]
+{
+ SID_DELETE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_BACKSPACE
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_ESCAPE // api:
+ [
+ ExecMethod = Execute;
+ ]
+
+ SID_BEZIER_MOVE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_INSERT
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_DELETE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_CUTLINE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_CONVERT
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_EDGE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_SMOOTH
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_SYMMTR
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_CLOSE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_ELIMINATE_POINTS
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+shell SwBezierShell: SwBaseShell
+{
+ import TextBezier[Automation];
+}
+
+
diff --git a/sw/sdi/docsh.sdi b/sw/sdi/docsh.sdi
new file mode 100644
index 000000000000..2901795a0c9a
--- /dev/null
+++ b/sw/sdi/docsh.sdi
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: docsh.sdi,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextDocument : BaseTextDocument
+[
+ uuid = "0D960120-111C-101D-9757-6E74207A7520"
+]
+{
+ // Slots, die nicht in der WebDocShell gebraucht werden
+
+ FN_OUTLINE_TO_IMPRESS
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+
+ FN_OUTLINE_TO_CLIPBOARD
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ FN_ABSTRACT_STARIMPRESS
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ FN_ABSTRACT_NEWDOC
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ FN_NEW_GLOBAL_DOC
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ FN_NEW_HTML_DOC
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+}
+
+shell SwDocShell : SfxObjectShell
+{
+ import TextDocument[Automation];
+}
+
+shell SwGlosDocShell : SwDocShell
+{
+ import TextDocument[Automation];
+
+ SID_SAVEDOC // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+}
+
diff --git a/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi
new file mode 100644
index 000000000000..e6b125d4efe6
--- /dev/null
+++ b/sw/sdi/drawsh.sdi
@@ -0,0 +1,480 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: drawsh.sdi,v $
+ * $Revision: 1.9.190.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface TextDraw : TextDrawBase
+[
+ uuid = "626DE480-111A-101D-9757-6E74207A7520"
+]
+{
+ SID_ATTR_LINEEND_STYLE
+ [
+ SlotType = SfxBoolItem ;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = DisableState ;
+ Export = FALSE;
+ ]
+
+ SID_ATTR_LINE_STYLE
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_LINE_DASH
+ [
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_DASH_LIST
+ [
+ StateMethod = GetDrawAttrState ;
+ ]
+
+ SID_LINEEND_LIST
+ [
+ StateMethod = GetDrawAttrState ;
+ ]
+
+ SID_COLOR_TABLE
+ [
+ StateMethod = GetDrawAttrState ;
+ ]
+
+ SID_GRADIENT_LIST
+ [
+ StateMethod = GetDrawAttrState ;
+ ]
+
+ SID_HATCH_LIST
+ [
+ StateMethod = GetDrawAttrState ;
+ ]
+
+ SID_BITMAP_LIST
+ [
+ StateMethod = GetDrawAttrState ;
+ ]
+
+ SID_ATTR_LINE_WIDTH
+ [
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ Export = FALSE;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_LINE_COLOR
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_FILL_STYLE
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_FILL_COLOR
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_FILL_GRADIENT
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_FILL_HATCH
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_FILL_BITMAP
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTRIBUTES_LINE
+ [
+ ExecMethod = ExecDrawDlg ;
+ StateMethod = DisableState ;
+ ]
+
+ SID_ATTRIBUTES_AREA
+ [
+ ExecMethod = ExecDrawDlg ;
+ StateMethod = DisableState ;
+ ]
+
+ FN_DRAWTEXT_ATTR_DLG
+ [
+ ExecMethod = ExecDrawDlg ;
+ StateMethod = DisableState ;
+ ]
+
+ FN_FLIP_VERT_GRAFIC
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FLIP_HORZ_GRAFIC
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_ROTATE
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_BEZIER_EDIT
+ [
+ Export = FALSE;
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FONTWORK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_HELL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_OBJECT_HEAVEN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_TOOL_HIERARCHIE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_EXTRUSION_TOOGLE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_TILT_DOWN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_TILT_UP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_TILT_LEFT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_TILT_RIGHT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_DEPTH_FLOATER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_DEPTH_DIALOG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_DIRECTION_FLOATER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_LIGHTING_FLOATER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_SURFACE_FLOATER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_3D_COLOR
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_DEPTH
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_DIRECTION
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_PROJECTION
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_LIGHTING_DIRECTION
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_LIGHTING_INTENSITY
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_EXTRUSION_SURFACE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_SHAPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_SHAPE_TYPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_ALIGNMENT_FLOATER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_CHARACTER_SPACING_FLOATER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_ALIGNMENT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_SAME_LETTER_HEIGHTS
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_CHARACTER_SPACING
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_KERN_CHARACTER_PAIRS
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FONTWORK_CHARACTER_SPACING_DIALOG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_INSERT_GRAPHIC
+ [
+ StateMethod = StateDisableItems ;
+ ]
+ SID_TWAIN_SELECT
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_TWAIN_TRANSFER
+ [
+ StateMethod = StateDisableItems ;
+ ]
+}
+
+shell SwDrawShell : SwDrawBaseShell
+{
+ import TextDraw [Automation];
+
+ // no export
+
+ SID_FORMTEXT_STYLE
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_ADJUST
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_DISTANCE
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_START
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_MIRROR
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_HIDEFORM
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_OUTLINE
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHDWXVAL
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHADOW
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHDWCOLOR
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHDWYVAL
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_STDFORM
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FORMAT_FOOTNOTE_DLG // status()
+ [
+ ExecMethod = Execute;
+ ]
+
+ SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ?
+ [
+ ExecMethod = Execute ;
+ ]
+
+ FN_WORDCOUNT_DIALOG
+ [
+ ExecMethod = Execute;
+ ]
+
+ FN_NUMBERING_OUTLINE_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ ]
+}
+
+
diff --git a/sw/sdi/drwbassh.sdi b/sw/sdi/drwbassh.sdi
new file mode 100644
index 000000000000..06efcb6c3176
--- /dev/null
+++ b/sw/sdi/drwbassh.sdi
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: drwbassh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextDrawBase : BaseTextDrawBase
+[
+ Automation = FALSE;
+]
+{
+ import TextSelection;
+}
+
+shell SwDrawBaseShell: SwBaseShell
+{
+ import TextDrawBase[Automation];
+
+ SID_OBJECT_ALIGN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
diff --git a/sw/sdi/drwtxtsh.sdi b/sw/sdi/drwtxtsh.sdi
new file mode 100644
index 000000000000..0da76e212df1
--- /dev/null
+++ b/sw/sdi/drwtxtsh.sdi
@@ -0,0 +1,636 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: drwtxtsh.sdi,v $
+ * $Revision: 1.20.82.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextDrawText
+[
+ uuid = "CA0C4280-293D-11D1-89CB-008029E4B0B1"
+]
+{
+ SID_SELECTALL // api:
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ ]
+
+ SID_CUT // api:
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_COPY // api:
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ ]
+
+ SID_PASTE // api:
+ [
+ ExecMethod = ExecClpbrd ;
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PASTE_SPECIAL // api:
+ [
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CLIPBOARD_FORMAT_ITEMS // api:
+ [
+ StateMethod = StateClpbrd ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_ESCAPE // api:
+ [
+ ExecMethod = ExecDraw ;
+ ]
+
+ SID_UNDO // api:
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+
+ ToolBoxConfig , MenuConfig , AccelConfig;
+ ]
+
+ SID_REDO // api:
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+ ]
+
+ SID_REPEAT // api:
+ [
+ ExecMethod = ExecUndo ;
+ StateMethod = StateUndo ;
+ ]
+ SID_GETUNDOSTRINGS
+ [
+ StateMethod = StateUndo ;
+ ]
+
+ SID_GETREDOSTRINGS
+ [
+ StateMethod = StateUndo ;
+ ]
+
+ FN_FORMAT_RESET // api:
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CHARMAP // api:
+ [
+ ExecMethod = ExecDraw ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_INSERT_STRING
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_INSERT_SOFT_HYPHEN // status(final|play)
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_HARDHYPHEN // status()
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_HARD_SPACE // status(final|play)
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_RLM
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_LRM
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_ZWSP
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_ZWNBSP
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_WEIGHT // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_POSTURE // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_UNDERLINE // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_OVERLINE // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_CONTOUR
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_SHADOWED
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_STRIKEOUT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_LEFT // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_CENTER // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_RIGHT // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_ADJUST_BLOCK // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LINESPACE_10 // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LINESPACE_15 // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_PARA_LINESPACE_20 // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_LEFT_TO_RIGHT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_PARA_RIGHT_TO_LEFT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TEXTDIRECTION_LEFT_TO_RIGHT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TEXTDIRECTION_TOP_TO_BOTTOM
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_VERTICALTEXT_STATE
+ [
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CTLFONT_STATE
+ [
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CHAR_DLG // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_CHAR_DLG_FOR_PARAGRAPH
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_PARA_DLG // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_SET_SUPER_SCRIPT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_SET_SUB_SCRIPT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FONTWORK // api:
+ [
+ ExecMethod = ExecFontWork ;
+ StateMethod = StateFontWork ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_STYLE // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_ADJUST // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_DISTANCE // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_START // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_MIRROR // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+
+ SID_FORMTEXT_HIDEFORM // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_OUTLINE // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHADOW // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHDWCOLOR // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHDWXVAL // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_SHDWYVAL // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_FORMTEXT_STDFORM // api:
+ [
+ ExecMethod = ExecFormText ;
+ StateMethod = GetFormTextState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_THESAURUS_DLG // api:
+ [
+ ExecMethod = ExecDrawLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_HANGUL_HANJA_CONVERSION // api:
+ [
+ ExecMethod = ExecDrawLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CHINESE_CONVERSION // api:
+ [
+ ExecMethod = ExecDrawLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_DRAWTEXT_ATTR_DLG
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_STYLE_CATALOG // ole(no) api(play/rec)
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_AUTOSPELL_CHECK
+ [
+ ExecMethod = Execute;
+ StateMethod = GetDrawTxtCtrlState
+ ]
+
+ SID_SEARCH_DLG
+ [
+ StateMethod = StateDisableItems
+ ]
+
+ SID_HYPERLINK_SETLINK // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_HYPERLINK_GETLINK // status()
+ [
+ StateMethod = StateInsert ;
+ ]
+ SID_TRANSLITERATE_UPPER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_LOWER
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_HALFWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_FULLWIDTH
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_HIRAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_KATAGANA
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_LANGUAGE_STATUS
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
+
+ FN_FORMAT_FOOTNOTE_DLG // status()
+ [
+ ExecMethod = Execute ;
+ ]
+
+ SID_OPEN_XML_FILTERSETTINGS // ole : no, status : ?
+ [
+ ExecMethod = Execute ;
+ ]
+
+ FN_WORDCOUNT_DIALOG
+ [
+ ExecMethod = Execute;
+ ]
+
+ FN_NUMBERING_OUTLINE_DLG // status(final|play)
+ [
+ ExecMethod = Execute ;
+ ]
+
+ SID_INSERT_GRAPHIC
+ [
+ StateMethod = StateDisableItems ;
+ ]
+ SID_TWAIN_SELECT
+ [
+ StateMethod = StateDisableItems ;
+ ]
+
+ SID_TWAIN_TRANSFER
+ [
+ StateMethod = StateDisableItems ;
+ ]
+}
+
+interface TextDrawFont
+[ uuid = "074C35E0-11EF-101D-9757-6E74207A7520"; ]
+{
+ SID_ATTR_CHAR_FONT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_FONTHEIGHT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_COLOR // api:
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_WORDLINEMODE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_RELIEF
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_LANGUAGE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_KERNING // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_AUTOKERN // // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_ATTR_CHAR_ESCAPEMENT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetDrawTxtCtrlState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_ATTR_CHAR_SCALEWIDTH // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+
+
+shell SwDrawTextShell
+{
+ import TextDrawText[Automation];
+ import TextDrawFont ".DrawFont";
+}
+
diff --git a/sw/sdi/formsh.sdi b/sw/sdi/formsh.sdi
new file mode 100644
index 000000000000..6813afb74709
--- /dev/null
+++ b/sw/sdi/formsh.sdi
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: formsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface TextDrawForm: BaseTextDrawForm
+[
+ uuid = "1D396B40-B8CC-11d1-AB80-006097B418C2"
+]
+{
+ import TextDrawBase;
+}
+
+shell SwDrawFormShell : SwDrawBaseShell
+{
+ import TextDrawForm[Automation];
+}
+
+
diff --git a/sw/sdi/frmsh.sdi b/sw/sdi/frmsh.sdi
new file mode 100644
index 000000000000..55fa64be25c9
--- /dev/null
+++ b/sw/sdi/frmsh.sdi
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: frmsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextFrame : BaseTextFrame
+[
+ uuid = "564CBAA0-111A-101D-9757-6E74207A7520"
+]
+{
+ import TextSelection;
+}
+
+ //=========================================================================
+
+shell SwFrameShell : SwBaseShell
+{
+ import TextFrame[Automation];
+
+ FN_FRAME_CHAIN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ FN_FRAME_UNCHAIN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
diff --git a/sw/sdi/grfsh.sdi b/sw/sdi/grfsh.sdi
new file mode 100644
index 000000000000..4c2ff381cfa4
--- /dev/null
+++ b/sw/sdi/grfsh.sdi
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: grfsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+interface TextGraphic : BaseTextGraphic
+[
+ uuid = "1885FE00-111C-101D-9757-6E74207A7520"
+]
+{
+}
+
+ //=========================================================================
+
+shell SwGrfShell : SwBaseShell
+
+{
+ import TextGraphic[Automation];
+}
+
+
diff --git a/sw/sdi/listsh.sdi b/sw/sdi/listsh.sdi
new file mode 100644
index 000000000000..51453496d00f
--- /dev/null
+++ b/sw/sdi/listsh.sdi
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: listsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextList : BaseTextList
+[
+ uuid = "509E9100-111A-101D-9757-6E74207A7520"
+]
+{
+ import TextSelection;
+}
+
+ //=========================================================================
+
+shell SwListShell : SwBaseShell
+{
+ import TextList[Automation];
+}
+
+
diff --git a/sw/sdi/makefile.mk b/sw/sdi/makefile.mk
new file mode 100644
index 000000000000..25b75feea040
--- /dev/null
+++ b/sw/sdi/makefile.mk
@@ -0,0 +1,106 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.11 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# wx mktyplib nur unter Windows aufrufbar
+# VMB.386 und WXSRVR.EXE muessen geladen sein! (n:\mscwini\bin)
+
+PRJ=..
+
+PRJNAME=sw
+TARGET=swslots
+
+# --- Settings -----------------------------------------------------
+.IF "$(L10N_framework)"==""
+SVSDIINC=$(PRJ)$/source$/ui$/inc
+.ENDIF
+
+.INCLUDE : $(PRJ)$/inc$/swpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/inc$/sw.mk
+
+.IF "$(L10N_framework)"==""
+SDI1NAME=$(TARGET)
+SDI1EXPORT=swriter
+#SIDHRCNAME=swslots.hrc
+
+# --- Files --------------------------------------------------------
+SVSDI1DEPEND= \
+ switems.sdi\
+ swriter.sdi\
+ _docsh.sdi\
+ docsh.sdi\
+ wdocsh.sdi\
+ wrtapp.sdi\
+ _basesh.sdi\
+ basesh.sdi\
+ _textsh.sdi\
+ textsh.sdi\
+ wtextsh.sdi\
+ _drwbase.sdi\
+ drwbassh.sdi\
+ wdrwbase.sdi\
+ formsh.sdi\
+ _formsh.sdi\
+ wformsh.sdi\
+ drawsh.sdi\
+ drwtxtsh.sdi\
+ _listsh.sdi\
+ listsh.sdi\
+ wlistsh.sdi\
+ _frmsh.sdi\
+ frmsh.sdi\
+ wfrmsh.sdi\
+ _tabsh.sdi\
+ tabsh.sdi\
+ wtabsh.sdi\
+ _grfsh.sdi\
+ grfsh.sdi\
+ wgrfsh.sdi\
+ _olesh.sdi\
+ olesh.sdi\
+ wolesh.sdi\
+ beziersh.sdi\
+ _viewsh.sdi\
+ viewsh.sdi\
+ wviewsh.sdi\
+ _mediash.sdi\
+ mediash.sdi\
+ _annotsh.sdi\
+ annotsh.sdi\
+ swslots.hrc \
+ $(INC)$/globals.hrc \
+ $(INC)$/cmdid.h \
+ $(SOLARINCXDIR)$/svxslots.ilb
+.ENDIF
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/sw/sdi/mediash.sdi b/sw/sdi/mediash.sdi
new file mode 100644
index 000000000000..c6b1767b385e
--- /dev/null
+++ b/sw/sdi/mediash.sdi
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: mediash.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+interface TextMedia : BaseTextMedia
+[
+ uuid = "54268616-9970-4ad9-8798-280206fc160a"
+]
+{
+}
+
+ //=========================================================================
+
+shell SwMediaShell : SwBaseShell
+
+{
+ import TextMedia[Automation];
+}
diff --git a/sw/sdi/olesh.sdi b/sw/sdi/olesh.sdi
new file mode 100644
index 000000000000..3a8930def884
--- /dev/null
+++ b/sw/sdi/olesh.sdi
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: olesh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextOLEObject : BaseTextOLEObject
+[
+ uuid = "B156B300-39FC-101D-9757-C667E8298000"
+]
+{
+ import TextFrame;
+}
+
+shell SwOleShell: SwFrameShell
+{
+ import TextOLEObject[Automation];
+}
+
+
diff --git a/sw/sdi/swinterf.c b/sw/sdi/swinterf.c
new file mode 100644
index 000000000000..45d86e8c9280
--- /dev/null
+++ b/sw/sdi/swinterf.c
@@ -0,0 +1,252 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swinterf.c,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <svinterf.h>
+#include <cmdid.h>
+
+static char pEmpty[] = "";
+
+extern void *pSvClient;
+
+/* WRITER */
+short SwInsertDocument (void *pHandle,
+ const char *pFileName,
+ const char *pFilter)
+{
+ return 0;
+}
+
+/**************************************************************************/
+
+/* WRITER */
+short SwDeleteTableColumns (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_COL | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwDeleteTableRows (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_ROW | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwGotoStartOfTable (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_START_TABLE | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwGotoEndOfTable (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_END_TABLE | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwGotoNextTable (void *pHandle)
+{
+ return 0;
+}
+
+/* WRITER */
+short SwGotoPrevTable (void *pHandle)
+{
+ return 0;
+}
+
+/* WRITER */
+short SwSelectTableRow (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ROW | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwSelectTableColumn (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_COL | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwTableSelect (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ALL | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwInsertTable (void *pHandle, const char *pName,
+ unsigned short nRow, unsigned short nColumn)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_TABLE | 0x10000,
+ pHandle,0,"hh",nRow,nColumn);
+ return 0;
+
+}
+
+/**************************************************************************/
+
+/* WRITER */
+short SwCharLeft(void *pHandle, unsigned short nCount, unsigned short bSelect)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_LEFT | 0x10000,
+ pHandle,0,"hb",nCount,bSelect);
+ return 0;
+}
+
+/* WRITER */
+short SwCharRight(void *pHandle, unsigned short nCount, unsigned short bSelect)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_RIGHT | 0x10000,
+ pHandle,0,"hb",nCount,bSelect);
+ return 0;
+}
+
+/* WRITER */
+short SwLineUp(void *pHandle, unsigned short nCount, unsigned short bSelect)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_UP | 0x10000,
+ pHandle,0,"hb",nCount,bSelect);
+ return 0;
+}
+
+/* WRITER */
+short SwLineDown(void *pHandle, unsigned short nCount, unsigned short bSelect)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_DOWN | 0x10000,
+ pHandle,0,"hb",nCount,bSelect);
+ return 0;
+}
+
+/**************************************************************************/
+
+/* WRITER */
+const char *SwGetSelectedText(void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallStringFunction(SvIPCGetClient(),FN_GET_SELECTED_TEXT,
+ pHandle,0,pEmpty);
+ return NULL;
+}
+
+/* WRITER */
+short SwInsertString(void *pHandle,const char *pString)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_STRING | 0x10000,
+ pHandle,0,"s",pString);
+ return 0;
+}
+
+/* WRITER */
+extern short SwInsertLineBreak(void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_LINEBREAK | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/**************************************************************************/
+
+/* WRITER */
+short SwDelLeft (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_BACKSPACE | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwDelRight (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwDelLine (void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE_WHOLE_LINE | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/**************************************************************************/
+
+/* WRITER */
+short SwCharDlg(void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_CHAR_DLG | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+/* WRITER */
+short SwParagrDlg(void *pHandle)
+{
+ if (SvIPCIsConnected())
+ return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_PARA_DLG | 0x10000,
+ pHandle,0,pEmpty);
+ return 0;
+}
+
+
diff --git a/sw/sdi/switems.sdi b/sw/sdi/switems.sdi
new file mode 100644
index 000000000000..103d24565114
--- /dev/null
+++ b/sw/sdi/switems.sdi
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: switems.sdi,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+item String SwNumRuleItem;
+item BOOL SwRegisterItem;
+
+struct SwLineNumber
+{
+ BOOL CountLines MID_LINENUMBER_COUNT;
+ INT32 StartValue MID_LINENUMBER_STARTVALUE;
+};
+item SwLineNumber SwFmtLineNumber;
+
+struct INetFmt
+{
+ String URL MID_URL_URL;
+ String Target MID_URL_TARGET;
+ String Name MID_URL_HYPERLINKNAME;
+ String VisitedFormat MID_URL_VISITED_FMT;
+ String UnvisitedFormat MID_URL_UNVISITED_FMT;
+};
+item INetFmt SwFmtINetFmt;
+
+struct Drop
+{
+ INT16 Lines MID_DROPCAP_LINES;
+ INT16 Count MID_DROPCAP_COUNT;
+ INT16 Distance MID_DROPCAP_DISTANCE;
+ BOOL WholeWord MID_DROPCAP_WHOLE_WORD;
+// String Style MID_DROPCAP_CHAR_STYLE_NAME;
+};
+item Drop SwFmtDrop;
+
+struct Envelope
+{
+ String AddrText MID_ENV_ADDR_TEXT;
+ BOOL Send MID_ENV_SEND;
+ String SendText MID_SEND_TEXT;
+ INT32 AddrFromLeft MID_ENV_ADDR_FROM_LEFT;
+ INT32 AddrFromTop MID_ENV_ADDR_FROM_TOP;
+ INT32 SendFromLeft MID_ENV_SEND_FROM_LEFT;
+ INT32 SendFromTop MID_ENV_SEND_FROM_TOP;
+ INT32 Width MID_ENV_WIDTH;
+ INT32 Height MID_ENV_HEIGHT;
+ INT16 Align MID_ENV_ALIGN;
+ BOOL PrintFromAbove MID_ENV_PRINT_FROM_ABOVE;
+ INT32 ShiftRight MID_ENV_SHIFT_RIGHT;
+ INT32 ShiftDown MID_ENV_SHIFT_DOWN;
+};
+item Envelope SwEnvItem;
+
+struct ViewLayout
+{
+ INT16 Columns MID_VIEWLAYOUT_COLUMNS;
+ BOOL BookMode MID_VIEWLAYOUT_BOOKMODE;
+};
+item ViewLayout SvxViewLayoutItem;
+
diff --git a/sw/sdi/swpatch.txt b/sw/sdi/swpatch.txt
new file mode 100644
index 000000000000..5c52bb3c130b
--- /dev/null
+++ b/sw/sdi/swpatch.txt
@@ -0,0 +1,21 @@
+swinter.h:
+
+unsigned char SYSCALL SwDocumentGetIsPrinting( C_Object ObjHdl );
+
+
+swinter.c:
+
+unsigned char SYSCALL SwDocumentGetIsPrinting( C_Object ObjHdl )
+{
+ if( SvIPCIsConnected() )
+ {
+ return (unsigned char) pIPCCallFunction( SvIPCGetClient(), 136598,
+ ObjHdl , 1, NULL );
+ }
+ return 0;
+}
+
+#ifdef _MSC_VER
+#pragma code_seg("swinter2","CODE")
+#endif
+
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
new file mode 100644
index 000000000000..315d34197715
--- /dev/null
+++ b/sw/sdi/swriter.sdi
@@ -0,0 +1,10343 @@
+//--------------------------------------------------------------------------
+SfxVoidItem CreateSWDrawView SID_CREATE_SW_DRAWVIEW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem AcceptTrackedChanges FN_REDLINE_ACCEPT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TrackChanges FN_REDLINE_ON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AddAllUnknownWords FN_ADD_UNKNOWN
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignBottom FN_FRAME_ALIGN_VERT_BOTTOM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignCharBottom FN_FRAME_ALIGN_VERT_CHAR_BOTTOM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignCharTop FN_FRAME_ALIGN_VERT_CHAR_TOP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignHorizontalCenter FN_FRAME_ALIGN_HORZ_CENTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignLeft FN_FRAME_ALIGN_HORZ_LEFT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignRight FN_FRAME_ALIGN_HORZ_RIGHT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignRowBottom FN_FRAME_ALIGN_VERT_ROW_BOTTOM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignRowTop FN_FRAME_ALIGN_VERT_ROW_TOP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignTop FN_FRAME_ALIGN_VERT_TOP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignVerticalCenter FN_FRAME_ALIGN_VERT_CENTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignVerticalCharCenter FN_FRAME_ALIGN_VERT_CHAR_CENTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignVerticalRowCenter FN_FRAME_ALIGN_VERT_ROW_CENTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AuthoritiesEntryDialog FN_EDIT_AUTH_ENTRY_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AutoFormatApply FN_AUTOFORMAT_APPLY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AutoFormatRedlineApply FN_AUTOFORMAT_REDLINE_APPLY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AutoSum FN_TABLE_AUTOSUM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SvxColorItem BackColor SID_ATTR_CHAR_COLOR_BACKGROUND
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BackgroundDialog FN_FORMAT_BACKGROUND_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SwBackspace FN_BACKSPACE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BorderDialog FN_FORMAT_BORDER_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BulletsAndNumberingDialog FN_NUMBER_BULLETS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Calc FN_CALC_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CalculateSel FN_CALCULATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CellVertBottom FN_TABLE_VERT_BOTTOM
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CellVertCenter FN_TABLE_VERT_CENTER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CellVertTop FN_TABLE_VERT_NONE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ChainFrames FN_FRAME_CHAIN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChangeDatabaseField FN_CHANGE_DBFIELD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChapterNumberingDialog FN_NUMBERING_OUTLINE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CharBackgroundExt SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CharColorExt SID_ATTR_CHAR_COLOR_EXT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CharLeftSel FN_CHAR_LEFT_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CharRightSel FN_CHAR_RIGHT_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ClosePreview FN_CLOSE_PAGEPREVIEW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CommentChangeTracking FN_REDLINE_COMMENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ControlCodes FN_VIEW_META_CHARS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ConvertTableText FN_CONVERT_TEXT_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateAbstract FN_ABSTRACT_NEWDOC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DecrementIndentValue FN_DEC_INDENT_OFFSET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DecrementLevel FN_NUM_BULLET_DOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DecrementSubLevels FN_NUM_BULLET_OUTLINE_DOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteColumns FN_TABLE_DELETE_COL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteRows FN_TABLE_DELETE_ROW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelLine FN_DELETE_WHOLE_LINE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToEndOfLine FN_DELETE_LINE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToEndOfPara FN_DELETE_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToEndOfSentence FN_DELETE_SENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToEndOfWord FN_DELETE_WORD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToStartOfLine FN_DELETE_BACK_LINE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToStartOfPara FN_DELETE_BACK_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToStartOfSentence FN_DELETE_BACK_SENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DelToStartOfWord FN_DELETE_BACK_WORD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DistributeColumns FN_TABLE_BALANCE_CELLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DistributeRows FN_TABLE_BALANCE_ROWS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EditCurIndex FN_EDIT_CURRENT_TOX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EditGlossary FN_GLOSSARY_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EditHyperlink FN_EDIT_HYPERLINK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EditRegion FN_EDIT_REGION
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EndOfDocumentSel FN_END_OF_DOCUMENT_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EndOfLineSel FN_END_OF_LINE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EndOfParaSel FN_END_OF_PARA_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EntireColumn FN_TABLE_SELECT_COL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EntireRow FN_TABLE_SELECT_ROW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Escape FN_ESCAPE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ExecuteMacroField FN_EXECUTE_MACROFIELD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExpandGlossary FN_EXPAND_GLOSSARY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FieldDialog FN_EDIT_FIELD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Fieldnames FN_VIEW_FIELDNAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Fields FN_VIEW_FIELDS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FlipHorizontal FN_FLIP_HORZ_GRAFIC
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FlipVertical FN_FLIP_VERT_GRAFIC
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxColorItem FontColor SID_ATTR_CHAR_COLOR2
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FootnoteDialog FN_FORMAT_FOOTNOTE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EditFootnote FN_EDIT_FOOTNOTE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormatColumns FN_FORMAT_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SwFmtDrop FormatDropcap FN_FORMAT_DROPCAPS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FrameDialog FN_FORMAT_FRAME_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoDown FN_LINE_DOWN
+(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoLeft FN_CHAR_LEFT
+(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoRight FN_CHAR_RIGHT
+(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToAnchor FN_FRAME_TO_ANCHOR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEnd FN_END_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfColumn FN_END_OF_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToEndOfDoc FN_END_OF_DOCUMENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToEndOfLine FN_END_OF_LINE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfNextColumn FN_END_OF_NEXT_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfNextPage FN_END_OF_NEXT_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfNextPageSel FN_END_OF_NEXT_PAGE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfPage FN_END_OF_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfPageSel FN_END_OF_PAGE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToEndOfPara FN_END_OF_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfPrevColumn FN_END_OF_PREV_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfPrevPage FN_END_OF_PREV_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfPrevPageSel FN_END_OF_PREV_PAGE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoNextIndexMark FN_NEXT_TOXMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoNextInputField FN_GOTO_NEXT_INPUTFLD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoNextObject FN_GOTO_NEXT_OBJ
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToNextPara FN_NEXT_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoNextPlacemarker FN_GOTO_NEXT_MARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToNextSentence FN_NEXT_SENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GotoNextSentenceSel FN_NEXT_SENT_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoNextTableFormula FN_NEXT_TBLFML
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToNextWord FN_NEXT_WORD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoNextWrongTableFormula FN_NEXT_TBLFML_ERR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GotoPage FN_NAVIGATION_PI_GOTO_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoPrevIndexMark FN_PREV_TOXMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoPrevInputField FN_GOTO_PREV_INPUTFLD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoPrevObject FN_GOTO_PREV_OBJ
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToPrevPara FN_PREV_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoPrevPlacemarker FN_GOTO_PREV_MARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToPrevSentence FN_PREV_SENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GotoPrevSentenceSel FN_PREV_SENT_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoPrevTableFormula FN_PREV_TBLFML
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToPrevWord FN_PREV_WORD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GotoPrevWrongTableFormula FN_PREV_TBLFML_ERR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfTable FN_START_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfColumn FN_START_OF_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToStartOfDoc FN_START_OF_DOCUMENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToStartOfLine FN_START_OF_LINE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfNextColumn FN_START_OF_NEXT_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfNextPage FN_START_OF_NEXT_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfNextPageSel FN_START_OF_NEXT_PAGE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfPage FN_START_OF_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfPageSel FN_START_OF_PAGE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoToStartOfPara FN_START_OF_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfPrevColumn FN_START_OF_PREV_COLUMN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfPrevPage FN_START_OF_PREV_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfPrevPageSel FN_START_OF_PREV_PAGE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GoUp FN_LINE_UP
+(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Graphic FN_VIEW_GRAPHIC
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GraphicDialog FN_FORMAT_GRAFIC_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_GRAPHIC;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem SaveGraphic FN_SAVE_GRAPHIC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_GRAPHIC;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Grow FN_GROW_FONT_SIZE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HScroll FN_HSCROLLBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item HtmlMode SID_HTML_MODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = TRUE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Hyphenate FN_HYPHENATE_OPT_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem IncrementIndentValue FN_INC_INDENT_OFFSET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem IncrementLevel FN_NUM_BULLET_UP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem IncrementSubLevels FN_NUM_BULLET_OUTLINE_UP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem IndexEntryDialog FN_EDIT_IDX_ENTRY_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem IndexMarkToIndex FN_IDX_MARK_TO_IDX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertAnnotation FN_POSTIT
+(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT,SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertAuthorField FN_INSERT_FLD_AUTHOR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertAuthoritiesEntry FN_INSERT_AUTH_ENTRY_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertBookmark FN_INSERT_BOOKMARK
+(SfxStringItem Bookmark FN_INSERT_BOOKMARK)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertBreak FN_INSERT_BREAK_DLG
+(SfxInt16Item Kind FN_INSERT_BREAK_DLG,SfxStringItem TemplateName FN_PARAM_1,SfxUInt16Item PageNumber FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertCaptionDialog FN_INSERT_CAPTION
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertColumnBreak FN_INSERT_COLUMN_BREAK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertColumnDialog FN_TABLE_INSERT_COL_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertColumns FN_TABLE_INSERT_COL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem InsertSection FN_INSERT_REGION
+(SfxUInt16Item Columns SID_ATTR_COLUMNS,SfxStringItem RegionName FN_PARAM_REGION_NAME,SfxStringItem RegionCondition FN_PARAM_REGION_CONDITION,SfxBoolItem RegionHidden FN_PARAM_REGION_HIDDEN,SfxBoolItem RegionProtect FN_PARAM_REGION_PROTECT,SfxStringItem LinkName FN_PARAM_1,SfxStringItem FilterName FN_PARAM_2,SfxStringItem SubRegion FN_PARAM_3)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxImageItem InsertCtrl FN_INSERT_CTRL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertDateField FN_INSERT_FLD_DATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertEndnote FN_INSERT_ENDNOTE
+(SfxStringItem FootnoteAnchorText FN_INSERT_ENDNOTE,SfxStringItem FontName FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertEnvelope FN_ENVELOP
+(SwEnvItem Envelope FN_ENVELOP,SfxBoolItem NewDocument FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertField FN_INSERT_FIELD
+(SfxUInt16Item Type FN_PARAM_FIELD_TYPE,SfxUInt16Item SubType FN_PARAM_FIELD_SUBTYPE,SfxStringItem Name FN_INSERT_FIELD,SfxStringItem Content FN_PARAM_FIELD_CONTENT,SfxUInt32Item Format FN_PARAM_FIELD_FORMAT,SfxStringItem Separator FN_PARAM_3)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertFieldCtrl FN_INSERT_FIELD_CTRL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertFootnoteDialog FN_INSERT_FOOTNOTE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertFootnote FN_INSERT_FOOTNOTE
+(SfxStringItem NoteAnchorText FN_INSERT_FOOTNOTE,SfxStringItem FontName FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertFormula FN_EDIT_FORMULA
+(SfxStringItem Formula FN_EDIT_FORMULA)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertFrame FN_INSERT_FRAME
+(SfxUInt16Item AnchorType FN_INSERT_FRAME,SfxPointItem Pos FN_PARAM_1,SvxSizeItem Size FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertFrameInteract FN_INSERT_FRAME_INTERACT
+(SfxUInt16Item Columns SID_ATTR_COLUMNS, SfxUInt16Item Modifier SID_MODIFIER)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertFrameInteractNoColumns FN_INSERT_FRAME_INTERACT_NOCOL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertGraphicRuler FN_INSERT_HRULER
+(SfxStringItem GraphicName FN_INSERT_HRULER,SfxBoolItem IsSimpleLine FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertHyperlinkDlg FN_INSERT_HYPERLINK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertIndexesEntry FN_INSERT_IDX_ENTRY_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertLinebreak FN_INSERT_LINEBREAK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertMultiIndex FN_INSERT_MULTI_TOX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertNeutralParagraph FN_NUM_BULLET_NONUM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxImageItem InsertObjCtrl FN_INSERT_OBJ_CTRL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertObjectDialog FN_INSERT_OBJECT_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertObjectStarMath FN_INSERT_SMA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPagebreak FN_INSERT_PAGEBREAK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPageCountField FN_INSERT_FLD_PGCOUNT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPageFooter FN_INSERT_PAGEFOOTER
+(SfxStringItem PageStyle FN_INSERT_PAGEFOOTER,SfxBoolItem On FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxObjectShellItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPageHeader FN_INSERT_PAGEHEADER
+(SfxStringItem PageStyle FN_INSERT_PAGEHEADER,SfxBoolItem On FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxObjectShellItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPageNumberField FN_INSERT_FLD_PGNUMBER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPara FN_INSERT_BREAK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertReferenceField FN_INSERT_REF_FIELD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertRowDialog FN_TABLE_INSERT_ROW_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertRows FN_TABLE_INSERT_ROW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertScript FN_JAVAEDIT
+(SfxStringItem Text FN_JAVAEDIT,SfxBoolItem IsURL FN_PARAM_1,SfxStringItem Type FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertTable FN_INSERT_TABLE
+(SfxStringItem TableName FN_INSERT_TABLE,SfxUInt16Item Columns SID_ATTR_TABLE_COLUMN,SfxUInt16Item Rows SID_ATTR_TABLE_ROW,SfxInt32Item Flags FN_PARAM_1,SfxStringItem AutoFormat FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertTimeField FN_INSERT_FLD_TIME
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertTitleField FN_INSERT_FLD_TITLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertTopicField FN_INSERT_FLD_TOPIC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpDownThisLevel FN_NUM_BULLET_NEXT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToEndOfDoc FN_END_DOC_DIRECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToFooter FN_TO_FOOTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToFootnoteOrAnchor FN_FOOTNOTE_TO_ANCHOR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToHeader FN_TO_HEADER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToNextBookmark FN_NEXT_BOOKMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToNextFootnote FN_NEXT_FOOTNOTE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToNextFrame FN_CNTNT_TO_NEXT_FRAME
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToNextRegion FN_GOTO_NEXT_REGION
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToNextTable FN_NEXT_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToPrevBookmark FN_PREV_BOOKMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToPrevFootnote FN_PREV_FOOTNOTE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToPrevRegion FN_GOTO_PREV_REGION
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToPrevTable FN_PREV_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToReference FN_GOTO_REFERENCE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToStartOfDoc FN_START_DOC_DIRECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpUpThisLevel FN_NUM_BULLET_PREV
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LineDownSel FN_LINE_DOWN_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LineNumberingDialog FN_LINE_NUMBERING_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LineUpSel FN_LINE_UP_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LinkDialog FN_EDIT_LINK_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadStyles SID_TEMPLATE_LOAD
+(SfxStringItem FileName SID_TEMPLATE_NAME,SfxInt32Item Flags SID_TEMPLATE_LOAD)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Marks FN_VIEW_MARKS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MergeCells FN_TABLE_MERGE_CELLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MergeDialog FN_QRY_MERGE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem MailMergeWizard FN_MAILMERGE_WIZARD
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem MergeTable FN_TABLE_MERGE_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ApplyStyleHead1 FN_FORMAT_APPLY_HEAD1
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ApplyStyleHead2 FN_FORMAT_APPLY_HEAD2
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ApplyStyleHead3 FN_FORMAT_APPLY_HEAD3
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ApplyStyleDefault FN_FORMAT_APPLY_DEFAULT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ApplyStyleTextbody FN_FORMAT_APPLY_TEXTBODY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem MirrorGraphicOnEvenPages FN_GRAPHIC_MIRROR_ON_EVEN_PAGES
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem MirrorOnEvenPages FN_FRAME_MIRROR_ON_EVEN_PAGES
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MoveDown FN_NUM_BULLET_MOVEDOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MoveDownSubItems FN_NUM_BULLET_OUTLINE_MOVEDOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MoveUp FN_NUM_BULLET_MOVEUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MoveUpSubItems FN_NUM_BULLET_OUTLINE_MOVEUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//-#i68101#------------------------------------------------------------------------
+SfxVoidItem ObjectTitleDescription FN_TITLE_DESCRIPTION_SHAPE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NameGroup FN_NAME_SHAPE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NewGlobalDoc FN_NEW_GLOBAL_DOC
+(SfxStringItem FileName FN_NEW_GLOBAL_DOC,SfxStringItem TemplateName SID_TEMPLATE_NAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NewHtmlDoc FN_NEW_HTML_DOC
+(SfxStringItem FileName FN_NEW_HTML_DOC,SfxStringItem TemplateName SID_TEMPLATE_NAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem NumberFormat FN_NUMBER_FORMAT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatCurrency FN_NUMBER_CURRENCY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatDate FN_NUMBER_DATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatDecimal FN_NUMBER_TWODEC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatPercent FN_NUMBER_PERCENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatScientific FN_NUMBER_SCIENTIFIC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatStandard FN_NUMBER_STANDARD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NumberFormatTime FN_NUMBER_TIME
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NumberingStart FN_NUMBER_NEWSTART
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NumberOrNoNumber FN_NUM_OR_NONUM
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ObjectBackOne FN_FRAME_DOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ObjectForwardOne FN_FRAME_UP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem OnlineAutoFormat FN_AUTOFORMAT_AUTO
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item OptimizeTable FN_OPTIMIZE_TABLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageColumnDialog FN_FORMAT_PAGE_COLUMN_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageDialog FN_FORMAT_PAGE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageDown FN_PAGEDOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageDownSel FN_PAGEDOWN_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item PageOffset FN_CHANGE_PAGENUM
+[
+ SfxVoidItem PageOffsetDialog(SfxUInt16Item nOffset FN_CHANGE_PAGENUM);
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageStyleApply FN_SET_PAGE_STYLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem PageStyleName FN_STAT_TEMPLATE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = TRUE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageUp FN_PAGEUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PageUpSel FN_PAGEUP_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PreviewPrintOptions FN_PREVIEW_PRINT_OPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOC;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PreviewZoom FN_PREVIEW_ZOOM
+( SfxUInt16Item PreviewZoom FN_PREVIEW_ZOOM )
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PrintLayout FN_PRINT_LAYOUT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PrintPagePreView FN_PRINT_PAGEPREVIEW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Protect FN_TABLE_SET_READ_ONLY_CELLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ProtectTraceChangeMode FN_REDLINE_PROTECT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RefreshView FN_REFRESH_VIEW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveBullets FN_NUM_BULLET_OFF
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveTableOf FN_REMOVE_CUR_TOX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Repaginate FN_REPAGINATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RepeatSearch FN_REPEAT_SEARCH
+( SfxBoolItem Quiet SID_SEARCH_QUIET )
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ResetAttributes FN_FORMAT_RESET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ResetTableProtection FN_TABLE_UNSET_READ_ONLY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Ruler FN_RULER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = TRUE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbaInsert FN_QRY_INSERT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbaInsertField FN_QRY_INSERT_FIELD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbaMerge FN_QRY_MERGE_FIELD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ScrollNavigation FN_SCROLL_NAVIGATION
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ScrollNextPrev FN_SCROLL_NEXT_PREV
+( SfxBoolItem ScrollNextPrev FN_SCROLL_NEXT_PREV )
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SelectTable FN_TABLE_SELECT_ALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item SelectionMode FN_STAT_SELMODE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SelectText FN_SELECT_PARA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SelectWord FN_SELECT_WORD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SendAbstractToStarImpress FN_ABSTRACT_STARIMPRESS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SendOutlineToClipboard FN_OUTLINE_TO_CLIPBOARD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SendOutlineToStarImpress FN_OUTLINE_TO_IMPRESS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetAnchorAtChar FN_TOOL_ANKER_AT_CHAR
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetAnchorToChar FN_TOOL_ANKER_CHAR
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetAnchorToFrame FN_TOOL_ANKER_FRAME
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetAnchorToPage FN_TOOL_ANKER_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetAnchorToPara FN_TOOL_ANKER_PARAGRAPH
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetColumnWidth FN_TABLE_SET_COL_WIDTH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetExtSelection FN_SET_EXT_MODE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetMultiSelection FN_SET_ADD_MODE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetOptimalColumnWidth FN_TABLE_ADJUST_CELLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetOptimalRowHeight FN_TABLE_OPTIMAL_HEIGHT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetRowHeight FN_TABLE_SET_ROW_HEIGHT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShadowCursor FN_SHADOWCURSOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ShiftBackspace FN_SHIFT_BACKSPACE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ShowMultiplePages FN_SHOW_MULTIPLE_PAGES
+( SfxUInt16Item Columns SID_ATTR_TABLE_COLUMN,SfxUInt16Item Rows SID_ATTR_TABLE_ROW )
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+SfxBoolItem ShowAnnotations FN_VIEW_NOTES
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowHiddenParagraphs FN_VIEW_HIDDEN_PARA
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowTrackedChanges FN_REDLINE_SHOW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ShowTwoPages FN_SHOW_TWO_PAGES
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowBookview FN_SHOW_BOOKVIEW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Shrink FN_SHRINK_FONT_SIZE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SortDialog FN_SORTING_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SplitCell FN_TABLE_SPLIT_CELLS
+(SfxInt32Item Amount FN_TABLE_SPLIT_CELLS,SfxBoolItem Horizontal FN_PARAM_1,
+ SfxBoolItem Proportional FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SplitTable FN_TABLE_SPLIT_TABLE
+(SfxUInt16Item Type FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StartAutoCorrect FN_AUTO_CORRECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StartOfDocumentSel FN_START_OF_DOCUMENT_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StartOfLineSel FN_START_OF_LINE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StartOfParaSel FN_START_OF_PARA_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StateBookmark FN_STAT_BOOKMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem StatePageNumber FN_STAT_PAGE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem StateZoom FN_STAT_ZOOM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SubScript FN_SET_SUB_SCRIPT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SuperScript FN_SET_SUPER_SCRIPT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SwBrwInsert FN_SBA_BRW_INSERT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SwMailMerge FN_SBA_BRW_MERGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SwUpdate FN_SBA_BRW_UPDATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SynchronizeLabelsDlg FN_SYNC_LABELS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TableBoundaries FN_VIEW_TABLEGRID
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TableDialog FN_FORMAT_TABLE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TableModeFix FN_TABLE_MODE_FIX
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TableModeFixProp FN_TABLE_MODE_FIX_PROP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TableModeVariable FN_TABLE_MODE_VARIABLE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TableNumberFormatDialog FN_NUM_FORMAT_TABLE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerItem;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TableNumberRecognition FN_SET_MODOPT_TBLNUMFMT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TextAttributes FN_DRAWTEXT_ATTR_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TextWrap FN_DRAW_WRAP_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ThesaurusDialog FN_THESAURUS_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ToggleAnchorType FN_TOOL_ANKER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* status: */
+ SlotType = SfxUInt16Item
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ToggleObjectLayer FN_TOOL_HIERARCHIE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem UnderlineDouble FN_UNDERLINE_DOUBLE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UnhainFrames FN_FRAME_UNCHAIN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UnsetCellsReadOnly FN_TABLE_UNSET_READ_ONLY_CELLS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateAll FN_UPDATE_ALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateAllIndexes FN_UPDATE_TOX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateAllLinks FN_UPDATE_ALL_LINKS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateCharts FN_UPDATE_CHARTS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateCurIndex FN_UPDATE_CUR_TOX
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateFields FN_UPDATE_FIELDS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateInputFields FN_UPDATE_INPUTFIELDS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ViewBounds FN_VIEW_BOUNDS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem VRuler FN_VLINEAL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem VScroll FN_VSCROLLBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem WordLeftSel FN_PREV_WORD_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem WordRightSel FN_NEXT_WORD_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapAnchorOnly FN_WRAP_ANCHOR_ONLY
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapContour FN_FRAME_WRAP_CONTOUR
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapIdeal FN_FRAME_WRAP_IDEAL
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapLeft FN_FRAME_WRAP_LEFT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapOff FN_FRAME_NOWRAP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapOn FN_FRAME_WRAP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapRight FN_FRAME_WRAP_RIGHT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapThrough FN_FRAME_WRAPTHRU
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem WrapThroughTransparent FN_FRAME_WRAPTHRU_TRANSP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertText FN_INSERT_STRING
+(SfxStringItem Text FN_INSERT_STRING)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SwNumRuleItem NumRule SID_ATTR_PARA_NUMRULE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//#outline level,add by zhaojianwei
+//---------------------------------------------------------------------------
+SfxUInt16Item OutlineLevel SID_ATTR_PARA_OUTLINE_LEVEL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+//<-end,zhaojianwei
+//--------------------------------------------------------------------------
+SfxUInt16Item NumNewStartAt FN_NUMBER_NEWSTART_AT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SwFmtLineNumber LineNumber FN_FORMAT_LINENUMBER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item PageNumber SID_ATTR_PARA_PAGENUM
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SwRegisterItem RegisterTrue SID_ATTR_PARA_REGISTER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToFootnoteArea FN_TO_FOOTNOTE_AREA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SwFmtINetFmt HyperlinkAttributes FN_TXTATR_INET
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertGlossary FN_INSERT_GLOSSARY
+(SfxStringItem Group FN_INSERT_GLOSSARY,SfxStringItem ShortName FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NewGlossary FN_NEW_GLOSSARY
+(SfxStringItem Group FN_NEW_GLOSSARY,SfxStringItem Name FN_PARAM_1,SfxStringItem ShortName FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetActGlossaryGroup FN_SET_ACT_GLOSSARY
+(SfxStringItem Group FN_SET_ACT_GLOSSARY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteBookmark FN_DELETE_BOOKMARK
+(SfxStringItem Bookmark FN_DELETE_BOOKMARK)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetDropCapText FN_DROP_TEXT
+(SfxStringItem DropCapText FN_DROP_TEXT)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetDropCapCharStyleName FN_DROP_CHAR_STYLE_NAME
+(SfxStringItem CharStyleName FN_DROP_CHAR_STYLE_NAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SelectTextMode FN_READONLY_SELECTION_MODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertDBField FN_INSERT_DBFIELD
+(SfxUInt16Item Type FN_PARAM_FIELD_TYPE,SfxStringItem DBName FN_INSERT_DBFIELD,SfxStringItem Command FN_PARAM_1,SfxStringItem ColumnName FN_PARAM_2,SfxInt32Item CommandType FN_PARAM_3,SfxStringItem Content FN_PARAM_FIELD_CONTENT,SfxUInt32Item Format FN_PARAM_FIELD_FORMAT)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToNextCell FN_GOTO_NEXT_CELL
+(SfxBoolItem AppendLineInReadonlyFlag FN_GOTO_NEXT_CELL)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem JumpToPrevCell FN_GOTO_PREV_CELL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertFieldDataOnly FN_INSERT_FIELD_DATA_ONLY()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ ImageRotation = TRUE;
+ ImageReflection = TRUE;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+//--------------------------------------------------------------------------
+SvxBrushItem TableRowBackground SID_ATTR_BRUSH_ROW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SvxBrushItem TableBackground SID_ATTR_BRUSH_TABLE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem RowSplit FN_TABLE_ROW_SPLIT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem MailmergeChildWindow FN_MAILMERGE_CHILDWINDOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem WordCountDialog FN_WORDCOUNT_DIALOG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SendMailChildWindow FN_MAILMERGE_SENDMAIL_CHILDWINDOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteTable FN_TABLE_DELETE_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EntireCell FN_TABLE_SELECT_CELL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ConvertTableToText FN_CONVERT_TABLE_TO_TEXT
+(
+ SfxStringItem Delimiter FN_PARAM_1,
+)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ConvertTextToTable FN_CONVERT_TEXT_TO_TABLE
+(
+ SfxStringItem Delimiter FN_PARAM_1
+ SfxStringItem AutoFormat FN_PARAM_2,
+ SfxBoolItem WithHeader FN_PARAM_3,
+ SfxInt16Item RepeatHeaderLines FN_PARAM_4,
+ SfxBoolItem WithBorder FN_PARAM_5,
+ SfxBoolItem DontSplitTable FN_PARAM_6
+)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+//--------------------------------------------------------------------------
+
+SfxVoidItem HeadingRowsRepeat FN_TABLE_HEADLINE_REPEAT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem TableSort FN_TABLE_SORT_DIALOG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+// #i31958#: toggle design mode for XForms; copied from SID_FM_DESIGN_MODE
+SfxBoolItem SwitchXFormsDesignMode FN_XFORMS_DESIGN_MODE
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveDirectCharFormats FN_REMOVE_DIRECT_CHAR_FORMATS
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = TRUE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem ContinueNumbering FN_NUM_CONTINUE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem SelectionModeDefault FN_SELECTION_MODE_DEFAULT
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteNote FN_DELETE_NOTE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+SfxVoidItem ReplyNote FN_REPLY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteComment FN_DELETE_COMMENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteAuthor FN_DELETE_NOTE_AUTHOR ( SfxStringItem Author FN_DELETE_NOTE_AUTHOR )
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteAllNotes FN_DELETE_ALL_NOTES
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HideNote FN_HIDE_NOTE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HideAuthor FN_HIDE_NOTE_AUTHOR ( SfxStringItem Author FN_HIDE_NOTE_AUTHOR )
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SvxViewLayoutItem ViewLayout SID_ATTR_VIEWLAYOUT
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HideAllNotes FN_HIDE_ALL_NOTES
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SelectionModeBlock FN_SELECTION_MODE_BLOCK
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+//--------------------------------------------------------------------------
+SfxBoolItem SpellingAndGrammarDialog FN_SPELL_GRAMMAR_DIALOG
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+//--------------------------------------------------------------------------
+SfxVoidItem AcceptTracedChange FN_REDLINE_ACCEPT_DIRECT
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RejectTracedChange FN_REDLINE_REJECT_DIRECT
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveHyperlink FN_REMOVE_HYPERLINK
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CopyHyperlinkLocation FN_COPY_HYPERLINK_LOCATION
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
diff --git a/sw/sdi/swslots.hrc b/sw/sdi/swslots.hrc
new file mode 100644
index 000000000000..58a9c9d79e4f
--- /dev/null
+++ b/sw/sdi/swslots.hrc
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swslots.hrc,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <svx/dialogs.hrc>
+#include <svx/svxids.hrc>
+#include "globals.hrc"
+#include "cmdid.h"
+
diff --git a/sw/sdi/swslots.sdi b/sw/sdi/swslots.sdi
new file mode 100644
index 000000000000..0cfa6bd8277e
--- /dev/null
+++ b/sw/sdi/swslots.sdi
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swslots.sdi,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+import "svxslots.ilb"
+
+module
+"9F76B581-23DD-101C-80B6-000024021835"
+"A1810F00-23DE-101C-80B6-000024021835"
+StarWriter
+[
+HelpText( "StarWriter Application" )
+SlotIdFile( "swslots.hrc" )
+TypeLibFile( "swslots.tlb" )
+ModulePrefix( "Sw" )
+]
+{
+ item String TbxDummyItem;
+/*
+ item String XFillAttrSetItem;
+ item String XFillBitmapItem;
+ item String XFillColorItem;
+ item String XFillGradientItem;
+ item String XFillHatchItem;
+ item String XFillStyleItem;
+ item String XLineAttrSetItem;
+ item String XLineColorItem;
+ item String XLineDashItem;
+ item String XLineEndItem;
+ item String XLineEndWidthItem;
+ item String XLineEndCenterItem;
+ item String XLineStartItem;
+ item String XLineStartWidthItem;
+ item String XLineStartCenterItem;
+ item String XLineStyleItem;
+ item String XLineWidthItem;
+*/
+ include "switems.sdi"
+ include "swriter.sdi"
+
+ include "_docsh.sdi"
+ include "docsh.sdi"
+ include "wdocsh.sdi"
+
+ include "wrtapp.sdi"
+
+ include "_basesh.sdi"
+ include "basesh.sdi"
+
+ include "_textsh.sdi"
+ include "textsh.sdi"
+ include "wtextsh.sdi"
+
+ include "_drwbase.sdi"
+ include "drwbassh.sdi"
+ include "wdrwbase.sdi"
+
+ include "_formsh.sdi"
+ include "formsh.sdi"
+ include "wformsh.sdi"
+
+ include "drawsh.sdi"
+ include "drwtxtsh.sdi"
+
+ include "_listsh.sdi"
+ include "listsh.sdi"
+ include "wlistsh.sdi"
+
+ include "_frmsh.sdi"
+ include "frmsh.sdi"
+ include "wfrmsh.sdi"
+
+ include "_tabsh.sdi"
+ include "tabsh.sdi"
+ include "wtabsh.sdi"
+
+ include "_grfsh.sdi"
+ include "grfsh.sdi"
+ include "wgrfsh.sdi"
+
+ include "_olesh.sdi"
+ include "olesh.sdi"
+ include "wolesh.sdi"
+
+ include "beziersh.sdi"
+
+ include "_viewsh.sdi"
+ include "viewsh.sdi"
+ include "wviewsh.sdi"
+
+ include "_mediash.sdi"
+ include "mediash.sdi"
+
+ include "_annotsh.sdi"
+ include "annotsh.sdi"
+
+}
+
+
diff --git a/sw/sdi/swslots.src b/sw/sdi/swslots.src
new file mode 100644
index 000000000000..d62d1da6b35b
--- /dev/null
+++ b/sw/sdi/swslots.src
@@ -0,0 +1,1495 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: swslots.src,v $
+ * $Revision: 1.133 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "cmdid.h"
+#include "svx/svxids.hrc"
+#include "globals.hrc"
+SfxSlotInfo FN_ABSTRACT_NEWDOC
+{
+ Slotname [ en-US ] = "Document From Abstract";
+};
+SfxSlotInfo FN_ABSTRACT_STARIMPRESS
+{
+ Slotname [ en-US ] = "Presentation from Abstract";
+};
+SfxSlotInfo FN_ADD_UNKNOWN
+{
+ Slotname [ en-US ] = "Add Unknown Words";
+};
+SfxSlotInfo FN_AUTO_CORRECT
+{
+ Slotname [ en-US ] = "AutoCorrect";
+};
+SfxSlotInfo FN_AUTOFORMAT_APPLY
+{
+ Slotname [ en-US ] = "Apply AutoFormat Options";
+};
+SfxSlotInfo FN_AUTOFORMAT_AUTO
+{
+ Slotname [ en-US ] = "AutoFormat While Typing";
+};
+SfxSlotInfo FN_AUTOFORMAT_REDLINE_APPLY
+{
+ Slotname [ en-US ] = "Apply AutoFormat Options and confirm Changes";
+};
+SfxSlotInfo FN_BACKSPACE
+{
+ Slotname [ en-US ] = "Backspace";
+};
+SfxSlotInfo FN_CALC_TABLE
+{
+ Slotname [ en-US ] = "Calculate Table";
+};
+SfxSlotInfo FN_CALCULATE
+{
+ Slotname [ en-US ] = "Calculate Selection";
+};
+SfxSlotInfo FN_CHANGE_DBFIELD
+{
+ Slotname [ en-US ] = "Change Database";
+};
+SfxSlotInfo FN_CHANGE_PAGENUM
+{
+ Slotname [ en-US ] = "Page Number";
+};
+SfxSlotInfo FN_CHAR_LEFT
+{
+ Slotname [ en-US ] = "To Character Left";
+};
+SfxSlotInfo FN_CHAR_LEFT_SEL
+{
+ Slotname [ en-US ] = "Select Character Left";
+};
+SfxSlotInfo FN_CHAR_RIGHT
+{
+ Slotname [ en-US ] = "Go Right";
+};
+SfxSlotInfo FN_CHAR_RIGHT_SEL
+{
+ Slotname [ en-US ] = "Select Character Right";
+};
+SfxSlotInfo FN_CNTNT_TO_NEXT_FRAME
+{
+ Slotname [ en-US ] = "To Next Frame";
+};
+SfxSlotInfo FN_CONVERT_TEXT_TABLE
+{
+ Slotname [ en-US ] = "Convert Table/Text";
+};
+SfxSlotInfo FN_DEC_INDENT_OFFSET
+{
+ Slotname [ en-US ] = "Decrement Indent Value";
+};
+SfxSlotInfo FN_DELETE_BACK_LINE
+{
+ Slotname [ en-US ] = "Delete to Start of Line";
+};
+SfxSlotInfo FN_DELETE_BACK_PARA
+{
+ Slotname [ en-US ] = "Delete to Start of Paragraph";
+};
+SfxSlotInfo FN_DELETE_BACK_SENT
+{
+ Slotname [ en-US ] = "Delete to Start of Sentence";
+};
+SfxSlotInfo FN_DELETE_BACK_WORD
+{
+ Slotname [ en-US ] = "Delete to Start of Word";
+};
+SfxSlotInfo FN_DELETE_LINE
+{
+ Slotname [ en-US ] = "Delete to End of Line";
+};
+SfxSlotInfo FN_DELETE_PARA
+{
+ Slotname [ en-US ] = "Delete to End of Paragraph";
+};
+SfxSlotInfo FN_DELETE_SENT
+{
+ Slotname [ en-US ] = "Delete to End of Sentence";
+};
+SfxSlotInfo FN_DELETE_WHOLE_LINE
+{
+ Slotname [ en-US ] = "Delete Row";
+};
+SfxSlotInfo FN_DELETE_WORD
+{
+ Slotname [ en-US ] = "Delete to End of Word";
+};
+SfxSlotInfo FN_DRAW_WRAP_DLG
+{
+ Slotname [ en-US ] = "Text Wrap";
+};
+SfxSlotInfo FN_DRAWTEXT_ATTR_DLG
+{
+ Slotname [ en-US ] = "Text Attributes";
+};
+SfxSlotInfo FN_EDIT_FIELD
+{
+ Slotname [ en-US ] = "Fields";
+};
+SfxSlotInfo FN_EDIT_FOOTNOTE
+{
+ Slotname [ en-US ] = "Footnote";
+};
+SfxSlotInfo FN_EDIT_FORMULA
+{
+ Slotname [ en-US ] = "Formula Bar";
+};
+SfxSlotInfo FN_EDIT_IDX_ENTRY_DLG
+{
+ Slotname [ en-US ] = "Index Entry";
+};
+SfxSlotInfo FN_EDIT_LINK_DLG
+{
+ Slotname [ en-US ] = "Links";
+};
+SfxSlotInfo FN_EDIT_REGION
+{
+ Slotname [ en-US ] = "Sections";
+};
+SfxSlotInfo FN_END_DOC_DIRECT
+{
+ Slotname [ en-US ] = "Directly to Document End";
+};
+SfxSlotInfo FN_END_OF_COLUMN
+{
+ Slotname [ en-US ] = "To Column End";
+};
+SfxSlotInfo FN_END_OF_DOCUMENT
+{
+ Slotname [ en-US ] = "To Document End";
+};
+SfxSlotInfo FN_END_OF_DOCUMENT_SEL
+{
+ Slotname [ en-US ] = "Select to Document End";
+};
+SfxSlotInfo FN_END_OF_LINE
+{
+ Slotname [ en-US ] = "To End of Line";
+};
+SfxSlotInfo FN_END_OF_LINE_SEL
+{
+ Slotname [ en-US ] = "Select to End of Line";
+};
+SfxSlotInfo FN_END_OF_NEXT_COLUMN
+{
+ Slotname [ en-US ] = "To End of Next Column";
+};
+SfxSlotInfo FN_END_OF_NEXT_PAGE
+{
+ Slotname [ en-US ] = "To End of Next Page";
+};
+SfxSlotInfo FN_END_OF_NEXT_PAGE_SEL
+{
+ Slotname [ en-US ] = "Select to End of Next Page";
+};
+SfxSlotInfo FN_END_OF_PAGE
+{
+ Slotname [ en-US ] = "To Page End";
+};
+SfxSlotInfo FN_END_OF_PAGE_SEL
+{
+ Slotname [ en-US ] = "Select to Page End";
+};
+SfxSlotInfo FN_END_OF_PARA
+{
+ Slotname [ en-US ] = "To Paragraph End";
+};
+SfxSlotInfo FN_END_OF_PARA_SEL
+{
+ Slotname [ en-US ] = "Select to Paragraph End";
+};
+SfxSlotInfo FN_END_OF_PREV_COLUMN
+{
+ Slotname [ en-US ] = "To Previous Column";
+};
+SfxSlotInfo FN_END_OF_PREV_PAGE
+{
+ Slotname [ en-US ] = "To End of Previous Page";
+};
+SfxSlotInfo FN_END_OF_PREV_PAGE_SEL
+{
+ Slotname [ en-US ] = "Select to End of Previous Page";
+};
+SfxSlotInfo FN_END_TABLE
+{
+ Slotname [ en-US ] = "To Table End";
+};
+SfxSlotInfo FN_ENVELOP
+{
+ Slotname [ en-US ] = "Insert Envelope";
+};
+SfxSlotInfo FN_ESCAPE
+{
+ Slotname [ en-US ] = "Cancel";
+};
+SfxSlotInfo FN_EXECUTE_MACROFIELD
+{
+ Slotname [ en-US ] = "Run Macro Field";
+};
+SfxSlotInfo FN_EXPAND_GLOSSARY
+{
+ Slotname [ en-US ] = "Run AutoText Entry";
+};
+SfxSlotInfo FN_FLIP_HORZ_GRAFIC
+{
+ Slotname [ en-US ] = "Flip Vertically";
+};
+SfxSlotInfo FN_FLIP_VERT_GRAFIC
+{
+ Slotname [ en-US ] = "Flip Horizontally";
+};
+SfxSlotInfo FN_FOOTNOTE_TO_ANCHOR
+{
+ Slotname [ en-US ] = "To Footnote Anchor";
+};
+SfxSlotInfo FN_FORMAT_BACKGROUND_DLG
+{
+ Slotname [ en-US ] = "Background";
+};
+SfxSlotInfo FN_FORMAT_BORDER_DLG
+{
+ Slotname [ en-US ] = "Borders";
+};
+SfxSlotInfo FN_FORMAT_DROPCAPS
+{
+ Slotname [ en-US ] = "Drop Caps";
+};
+SfxSlotInfo FN_FORMAT_FOOTNOTE_DLG
+{
+ Slotname [ en-US ] = "Footnotes";
+};
+SfxSlotInfo FN_FORMAT_FRAME_DLG
+{
+ Slotname [ en-US ] = "Frame Properties";
+};
+SfxSlotInfo FN_FORMAT_GRAFIC_DLG
+{
+ Slotname [ en-US ] = "Edit Graphics";
+};
+SfxSlotInfo FN_FORMAT_PAGE_COLUMN_DLG
+{
+ Slotname [ en-US ] = "Page Columns";
+};
+SfxSlotInfo FN_FORMAT_PAGE_DLG
+{
+ Slotname [ en-US ] = "Page Settings";
+};
+SfxSlotInfo FN_FORMAT_RESET
+{
+ Slotname [ en-US ] = "Reset Font Attributes";
+};
+SfxSlotInfo FN_FORMAT_TABLE_DLG
+{
+ Slotname [ en-US ] = "Edit Table";
+};
+SfxSlotInfo FN_FRAME_ALIGN_HORZ_CENTER
+{
+ Slotname [ en-US ] = "Center Horizontal";
+};
+SfxSlotInfo FN_FRAME_ALIGN_HORZ_LEFT
+{
+ Slotname [ en-US ] = "Align Left";
+};
+SfxSlotInfo FN_FRAME_ALIGN_HORZ_RIGHT
+{
+ Slotname [ en-US ] = "Align Right";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_BOTTOM
+{
+ Slotname [ en-US ] = "Align Bottom";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_CENTER
+{
+ Slotname [ en-US ] = "Align Vertical Center";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_BOTTOM
+{
+ Slotname [ en-US ] = "Align to Bottom of Character";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_CENTER
+{
+ Slotname [ en-US ] = "Align to Vertical Center of Character";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_CHAR_TOP
+{
+ Slotname [ en-US ] = "Align to Top of Character";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_BOTTOM
+{
+ Slotname [ en-US ] = "Align to Bottom of Line";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_CENTER
+{
+ Slotname [ en-US ] = "Align to Vertical Center of Line";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_ROW_TOP
+{
+ Slotname [ en-US ] = "Align to Top of Line";
+};
+SfxSlotInfo FN_FRAME_ALIGN_VERT_TOP
+{
+ Slotname [ en-US ] = "Align Top";
+};
+SfxSlotInfo FN_FRAME_CHAIN
+{
+ Slotname [ en-US ] = "Link Frames";
+};
+SfxSlotInfo FN_FRAME_DOWN
+{
+ Slotname [ en-US ] = "Send Backward";
+};
+SfxSlotInfo FN_FRAME_MIRROR_ON_EVEN_PAGES
+{
+ Slotname [ en-US ] = "Mirror Object on Even Pages";
+};
+SfxSlotInfo FN_FRAME_NOWRAP
+{
+ Slotname [ en-US ] = "Wrap Off";
+};
+SfxSlotInfo FN_FRAME_TO_ANCHOR
+{
+ Slotname [ en-US ] = "Set Cursor To Anchor";
+};
+SfxSlotInfo FN_FRAME_UNCHAIN
+{
+ Slotname [ en-US ] = "Unlink Frames";
+};
+SfxSlotInfo FN_FRAME_UP
+{
+ Slotname [ en-US ] = "Bring Forward";
+};
+SfxSlotInfo FN_FRAME_WRAP
+{
+ Slotname [ en-US ] = "Wrap On";
+};
+SfxSlotInfo FN_FRAME_WRAP_CONTOUR
+{
+ Slotname [ en-US ] = "Wrap Contour On";
+};
+SfxSlotInfo FN_FRAME_WRAP_IDEAL
+{
+ Slotname [ en-US ] = "Wrap Optimal";
+};
+SfxSlotInfo FN_FRAME_WRAP_LEFT
+{
+ Slotname [ en-US ] = "Wrap Left";
+};
+SfxSlotInfo FN_FRAME_WRAP_RIGHT
+{
+ Slotname [ en-US ] = "Wrap Right";
+};
+SfxSlotInfo FN_FRAME_WRAPTHRU
+{
+ Slotname [ en-US ] = "Wrap Through";
+};
+SfxSlotInfo FN_FRAME_WRAPTHRU_TRANSP
+{
+ Slotname [ en-US ] = "Wrap Transparent";
+};
+SfxSlotInfo FN_GLOSSARY_DLG
+{
+ Slotname [ en-US ] = "Edit AutoText";
+};
+SfxSlotInfo FN_GOTO_NEXT_INPUTFLD
+{
+ Slotname [ en-US ] = "To Next Input Field";
+};
+SfxSlotInfo FN_GOTO_NEXT_MARK
+{
+ Slotname [ en-US ] = "To Next Placeholder";
+};
+SfxSlotInfo FN_GOTO_NEXT_OBJ
+{
+ Slotname [ en-US ] = "To Next Object";
+};
+SfxSlotInfo FN_GOTO_NEXT_REGION
+{
+ Slotname [ en-US ] = "To Next Section";
+};
+SfxSlotInfo FN_GOTO_PREV_INPUTFLD
+{
+ Slotname [ en-US ] = "To Previous Input Field";
+};
+SfxSlotInfo FN_GOTO_PREV_MARK
+{
+ Slotname [ en-US ] = "To Previous Placeholder";
+};
+SfxSlotInfo FN_GOTO_PREV_OBJ
+{
+ Slotname [ en-US ] = "To Previous Object";
+};
+SfxSlotInfo FN_GOTO_PREV_REGION
+{
+ Slotname [ en-US ] = "To Previous Section";
+};
+SfxSlotInfo FN_GOTO_REFERENCE
+{
+ Slotname [ en-US ] = "To Reference";
+};
+SfxSlotInfo FN_GRAPHIC_MIRROR_ON_EVEN_PAGES
+{
+ Slotname [ en-US ] = "Flip Graphics on Even Pages";
+};
+SfxSlotInfo FN_GROW_FONT_SIZE
+{
+ Slotname [ en-US ] = "Increase Font";
+};
+SfxSlotInfo FN_HSCROLLBAR
+{
+ Slotname [ en-US ] = "Scroll Horizontal";
+};
+SfxSlotInfo FN_HYPHENATE_OPT_DLG
+{
+ Slotname [ en-US ] = "Hyphenation";
+};
+SfxSlotInfo FN_IDX_MARK_TO_IDX
+{
+ Slotname [ en-US ] = "Index Mark to Index";
+};
+SfxSlotInfo FN_INC_INDENT_OFFSET
+{
+ Slotname [ en-US ] = "Increment Indent Value";
+};
+SfxSlotInfo FN_INSERT_BOOKMARK
+{
+ Slotname [ en-US ] = "Insert Bookmark";
+};
+SfxSlotInfo FN_INSERT_BREAK
+{
+ Slotname [ en-US ] = "Insert Paragraph";
+};
+SfxSlotInfo FN_INSERT_BREAK_DLG
+{
+ Slotname [ en-US ] = "Insert Manual Break";
+};
+SfxSlotInfo FN_INSERT_CAPTION
+{
+ Slotname [ en-US ] = "Insert Caption";
+};
+SfxSlotInfo FN_INSERT_COLUMN_BREAK
+{
+ Slotname [ en-US ] = "Insert Column Break";
+};
+SfxSlotInfo FN_INSERT_CTRL
+{
+ Slotname [ en-US ] = "Insert";
+};
+SfxSlotInfo FN_INSERT_ENDNOTE
+{
+ Slotname [ en-US ] = "Insert Endnote Directly";
+};
+SfxSlotInfo FN_INSERT_FIELD
+{
+ Slotname [ en-US ] = "Fields Dialog";
+};
+SfxSlotInfo FN_INSERT_FIELD_CTRL
+{
+ Slotname [ en-US ] = "Insert Fields";
+};
+SfxSlotInfo FN_INSERT_FLD_AUTHOR
+{
+ Slotname [ en-US ] = "Insert Author Field";
+};
+SfxSlotInfo FN_INSERT_FLD_DATE
+{
+ Slotname [ en-US ] = "Insert Date";
+};
+SfxSlotInfo FN_INSERT_FLD_PGCOUNT
+{
+ Slotname [ en-US ] = "Insert Page Count";
+};
+SfxSlotInfo FN_INSERT_FLD_PGNUMBER
+{
+ Slotname [ en-US ] = "Insert Page Number";
+};
+SfxSlotInfo FN_INSERT_FLD_TIME
+{
+ Slotname [ en-US ] = "Insert Time";
+};
+SfxSlotInfo FN_INSERT_FLD_TITLE
+{
+ Slotname [ en-US ] = "Insert Document Title";
+};
+SfxSlotInfo FN_INSERT_FLD_TOPIC
+{
+ Slotname [ en-US ] = "Insert Subject";
+};
+SfxSlotInfo FN_INSERT_FOOTNOTE
+{
+ Slotname [ en-US ] = "Insert Footnote Directly";
+};
+SfxSlotInfo FN_INSERT_FOOTNOTE_DLG
+{
+ Slotname [ en-US ] = "Insert Footnote";
+};
+SfxSlotInfo FN_INSERT_FRAME
+{
+ Slotname [ en-US ] = "Insert Frame";
+};
+SfxSlotInfo FN_INSERT_FRAME_INTERACT_NOCOL
+{
+ Slotname [ en-US ] = "Insert single-column frame manually";
+};
+SfxSlotInfo FN_INSERT_FRAME_INTERACT
+{
+ Slotname [ en-US ] = "Insert Frame Manually";
+};
+SfxSlotInfo FN_INSERT_HARD_SPACE
+{
+ Slotname [ en-US ] = "Insert Non-breaking Space";
+};
+SfxSlotInfo FN_INSERT_HARDHYPHEN
+{
+ Slotname [ en-US ] = "Insert Non-breaking Hyphen";
+};
+SfxSlotInfo FN_INSERT_HRULER
+{
+ Slotname [ en-US ] = "Insert Horizontal Ruler";
+};
+SfxSlotInfo FN_INSERT_HYPERLINK
+{
+ Slotname [ en-US ] = "Insert Hyperlink";
+};
+SfxSlotInfo FN_INSERT_IDX_ENTRY_DLG
+{
+ Slotname [ en-US ] = "Insert Index Marker";
+};
+SfxSlotInfo FN_INSERT_LINEBREAK
+{
+ Slotname [ en-US ] = "Insert Manual Row Break";
+};
+SfxSlotInfo FN_INSERT_OBJ_CTRL
+{
+ Slotname [ en-US ] = "Insert Object";
+};
+SfxSlotInfo FN_INSERT_OBJECT_DLG
+{
+ Slotname [ en-US ] = "Insert Other Objects";
+};
+SfxSlotInfo FN_INSERT_PAGEBREAK
+{
+ Slotname [ en-US ] = "Insert Manual Page Break";
+};
+SfxSlotInfo FN_INSERT_PAGEFOOTER
+{
+ Slotname [ en-US ] = "Insert Footer";
+};
+SfxSlotInfo FN_INSERT_PAGEHEADER
+{
+ Slotname [ en-US ] = "Insert Header";
+};
+SfxSlotInfo FN_INSERT_REF_FIELD
+{
+ Slotname [ en-US ] = "Insert Field Reference";
+};
+SfxSlotInfo FN_INSERT_REGION
+{
+ Slotname [ en-US ] = "Insert Section";
+};
+SfxSlotInfo FN_INSERT_SMA
+{
+ Slotname [ en-US ] = "Insert %PRODUCTNAME Math object";
+};
+SfxSlotInfo FN_INSERT_SOFT_HYPHEN
+{
+ Slotname [ en-US ] = "Insert Optional Hyphen";
+};
+SfxSlotInfo FN_INSERT_SYMBOL
+{
+ Slotname [ en-US ] = "Insert Special Character ";
+};
+SfxSlotInfo FN_INSERT_TABLE
+{
+ Slotname [ en-US ] = "Insert Table";
+};
+SfxSlotInfo FN_JAVAEDIT
+{
+ Slotname [ en-US ] = "Insert Script";
+};
+SfxSlotInfo FN_LABEL
+{
+ Slotname [ en-US ] = "Insert Labels";
+};
+SfxSlotInfo FN_BUSINESS_CARD
+{
+ Slotname [ en-US ] = "Insert business cards";
+};
+SfxSlotInfo FN_LINE_DOWN
+{
+ Slotname [ en-US ] = "To Line Below";
+};
+SfxSlotInfo FN_LINE_DOWN_SEL
+{
+ Slotname [ en-US ] = "Select Down";
+};
+SfxSlotInfo FN_LINE_NUMBERING_DLG
+{
+ Slotname [ en-US ] = "Set Line Numbering";
+};
+SfxSlotInfo FN_LINE_UP
+{
+ Slotname [ en-US ] = "To Top Line";
+};
+SfxSlotInfo FN_LINE_UP_SEL
+{
+ Slotname [ en-US ] = "Select to Top Line";
+};
+SfxSlotInfo FN_NAVIGATION_PI_GOTO_PAGE
+{
+ Slotname [ en-US ] = "To Page";
+};
+SfxSlotInfo FN_NEW_GLOBAL_DOC
+{
+ Slotname [ en-US ] = "Create Master Document";
+};
+SfxSlotInfo FN_NEW_HTML_DOC
+{
+ Slotname [ en-US ] = "Create HTML Document";
+};
+SfxSlotInfo FN_NEXT_BOOKMARK
+{
+ Slotname [ en-US ] = "To Next Bookmark";
+};
+SfxSlotInfo FN_NEXT_FOOTNOTE
+{
+ Slotname [ en-US ] = "To Next Footnote";
+};
+SfxSlotInfo FN_NEXT_PARA
+{
+ Slotname [ en-US ] = "To Next Paragraph";
+};
+SfxSlotInfo FN_NEXT_SENT
+{
+ Slotname [ en-US ] = "To Next Sentence";
+};
+SfxSlotInfo FN_NEXT_SENT_SEL
+{
+ Slotname [ en-US ] = "Select to Next Sentence";
+};
+SfxSlotInfo FN_NEXT_TABLE
+{
+ Slotname [ en-US ] = "To Next Table";
+};
+SfxSlotInfo FN_NEXT_TBLFML
+{
+ Slotname [ en-US ] = "Go to next table formula";
+};
+SfxSlotInfo FN_NEXT_TBLFML_ERR
+{
+ Slotname [ en-US ] = "Go to next faulty table formula";
+};
+SfxSlotInfo FN_NEXT_TOXMARK
+{
+ Slotname [ en-US ] = "Go to Next Index Mark";
+};
+SfxSlotInfo FN_NEXT_WORD
+{
+ Slotname [ en-US ] = "To Word Right";
+};
+SfxSlotInfo FN_NEXT_WORD_SEL
+{
+ Slotname [ en-US ] = "Select to Word Right";
+};
+SfxSlotInfo FN_NUM_BULLET_DOWN
+{
+ Slotname [ en-US ] = "Down One Level";
+};
+SfxSlotInfo FN_NUM_BULLET_MOVEDOWN
+{
+ Slotname [ en-US ] = "Move Down";
+};
+SfxSlotInfo FN_NUM_BULLET_MOVEUP
+{
+ Slotname [ en-US ] = "Move Up";
+};
+SfxSlotInfo FN_NUM_BULLET_NEXT
+{
+ Slotname [ en-US ] = "To Next Paragraph in Level";
+};
+SfxSlotInfo FN_NUM_BULLET_NONUM
+{
+ Slotname [ en-US ] = "Insert Unnumbered Entry";
+};
+SfxSlotInfo FN_NUM_BULLET_OFF
+{
+ Slotname [ en-US ] = "Numbering Off";
+};
+SfxSlotInfo FN_NUM_BULLET_OUTLINE_DOWN
+{
+ Slotname [ en-US ] = "Move Down with Subpoints";
+};
+SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEDOWN
+{
+ Slotname [ en-US ] = "Move Down with Subpoints";
+};
+SfxSlotInfo FN_NUM_BULLET_OUTLINE_MOVEUP
+{
+ Slotname [ en-US ] = "Move Up with Subpoints";
+};
+SfxSlotInfo FN_NUM_BULLET_OUTLINE_UP
+{
+ Slotname [ en-US ] = "Move Up with Subpoints";
+};
+SfxSlotInfo FN_NUM_BULLET_PREV
+{
+ Slotname [ en-US ] = "To Previous Paragraph in Level";
+};
+SfxSlotInfo FN_NUM_BULLET_UP
+{
+ Slotname [ en-US ] = "Up One Level";
+};
+SfxSlotInfo FN_NUM_FORMAT_TABLE_DLG
+{
+ Slotname [ en-US ] = "Edit Number Format";
+};
+SfxSlotInfo FN_NUM_OR_NONUM
+{
+ Slotname [ en-US ] = "Numbering On/Off";
+};
+SfxSlotInfo FN_NUMBER_BULLETS
+{
+ Slotname [ en-US ] = "Edit Numbering";
+};
+SfxSlotInfo FN_NUMBER_CURRENCY
+{
+ Slotname [ en-US ] = "Number Format: Currency";
+};
+SfxSlotInfo FN_NUMBER_DATE
+{
+ Slotname [ en-US ] = "Number Format : Date";
+};
+SfxSlotInfo FN_NUMBER_NEWSTART
+{
+ Slotname [ en-US ] = "Restart Numbering";
+};
+SfxSlotInfo FN_NUMBER_PERCENT
+{
+ Slotname [ en-US ] = "Number Format: Percent";
+};
+SfxSlotInfo FN_NUMBER_SCIENTIFIC
+{
+ Slotname [ en-US ] = "Number Format: Exponential";
+};
+SfxSlotInfo FN_NUMBER_STANDARD
+{
+ Slotname [ en-US ] = "Number Format: Standard";
+};
+SfxSlotInfo FN_NUMBER_TIME
+{
+ Slotname [ en-US ] = "Number Format: Time";
+};
+SfxSlotInfo FN_NUMBER_TWODEC
+{
+ Slotname [ en-US ] = "Number Format: Decimal";
+};
+SfxSlotInfo FN_NUMBERING_OUTLINE_DLG
+{
+ Slotname [ en-US ] = "Outline Numbering";
+};
+SfxSlotInfo FN_OPTIMIZE_TABLE
+{
+ Slotname [ en-US ] = "Optimize";
+};
+SfxSlotInfo FN_OUTLINE_TO_CLIPBOARD
+{
+ Slotname [ en-US ] = "Outline to Clipboard";
+};
+SfxSlotInfo FN_OUTLINE_TO_IMPRESS
+{
+ Slotname [ en-US ] = "Outline to Presentation";
+};
+SfxSlotInfo FN_PAGE_STYLE_SET_COLS
+{
+ Slotname [ en-US ] = "Page Style: Columns";
+};
+SfxSlotInfo FN_PAGEDOWN
+{
+ Slotname [ en-US ] = "Next Page";
+};
+SfxSlotInfo FN_PAGEDOWN_SEL
+{
+ Slotname [ en-US ] = "Select to Next Page";
+};
+SfxSlotInfo FN_PAGEUP
+{
+ Slotname [ en-US ] = "Previous Page";
+};
+SfxSlotInfo FN_PAGEUP_SEL
+{
+ Slotname [ en-US ] = "Select to Previous Page";
+};
+SfxSlotInfo FN_PASTESPECIAL
+{
+ Slotname [ en-US ] = "Paste Special";
+};
+SfxSlotInfo FN_PASTEUNFORMATTED
+{
+ Slotname [ en-US ] = "Paste Unformatted Text";
+};
+SfxSlotInfo FN_POSTIT
+{
+ Slotname [ en-US ] = "Insert Note";
+};
+SfxSlotInfo FN_PREV_BOOKMARK
+{
+ Slotname [ en-US ] = "To Previous Bookmark";
+};
+SfxSlotInfo FN_PREV_FOOTNOTE
+{
+ Slotname [ en-US ] = "To Previous Footnote";
+};
+SfxSlotInfo FN_PREV_PARA
+{
+ Slotname [ en-US ] = "To Previous Paragraph";
+};
+SfxSlotInfo FN_PREV_SENT
+{
+ Slotname [ en-US ] = "To Previous Sentence";
+};
+SfxSlotInfo FN_PREV_SENT_SEL
+{
+ Slotname [ en-US ] = "Select to Previous Sentence";
+};
+SfxSlotInfo FN_PREV_TABLE
+{
+ Slotname [ en-US ] = "To Previous Table";
+};
+SfxSlotInfo FN_PREV_TBLFML
+{
+ Slotname [ en-US ] = "Go to previous table formula";
+};
+SfxSlotInfo FN_PREV_TBLFML_ERR
+{
+ Slotname [ en-US ] = "Go to previous faulty table formula";
+};
+SfxSlotInfo FN_PREV_TOXMARK
+{
+ Slotname [ en-US ] = "Go to Previous Index Mark";
+};
+SfxSlotInfo FN_PREV_WORD
+{
+ Slotname [ en-US ] = "To Word Left";
+};
+SfxSlotInfo FN_PREV_WORD_SEL
+{
+ Slotname [ en-US ] = "Select to Begin of Word";
+};
+SfxSlotInfo FN_PREVIEW_PRINT_OPTIONS
+{
+ Slotname [ en-US ] = "Print options page view";
+};
+SfxSlotInfo FN_PREVIEW_ZOOM
+{
+ Slotname [ en-US ] = "Preview Zoom";
+};
+SfxSlotInfo FN_PRINT_LAYOUT
+{
+ Slotname [ en-US ] = "Print Layout On/Off";
+};
+SfxSlotInfo FN_PRINT_PAGEPREVIEW
+{
+ Slotname [ en-US ] = "Print page view";
+};
+SfxSlotInfo FN_MAILMERGE_WIZARD
+{
+ SlotName[ en-US ] = "Mail Merge Wizard";
+};
+SfxSlotInfo FN_QRY_MERGE
+{
+ Slotname [ en-US ] = "Prepare Mail Merge";
+};
+SfxSlotInfo FN_REDLINE_ACCEPT
+{
+ Slotname [ en-US ] = "Accept or Reject Changes";
+};
+SfxSlotInfo FN_REDLINE_COMMENT
+{
+ Slotname [ en-US ] = "Insert Comment";
+};
+SfxSlotInfo FN_REDLINE_ON
+{
+ Slotname [ en-US ] = "Switch on Review";
+};
+SfxSlotInfo FN_REDLINE_PROTECT
+{
+ Slotname [ en-US ] = "Protect Record of Changes";
+};
+SfxSlotInfo FN_REDLINE_SHOW
+{
+ Slotname [ en-US ] = "Highlight Changes";
+};
+SfxSlotInfo FN_REFRESH_VIEW
+{
+ Slotname [ en-US ] = "Restore View";
+};
+SfxSlotInfo FN_REPAGINATE
+{
+ Slotname [ en-US ] = "Repaginate";
+};
+SfxSlotInfo FN_REPEAT_SEARCH
+{
+ Slotname [ en-US ] = "Repeat Search";
+};
+SfxSlotInfo FN_RULER
+{
+ Slotname [ en-US ] = "Ruler On/Off";
+};
+SfxSlotInfo FN_SELECT_PARA
+{
+ Slotname [ en-US ] = "Select Paragraph";
+};
+SfxSlotInfo FN_SELECT_WORD
+{
+ Slotname [ en-US ] = "Select Word";
+};
+SfxSlotInfo FN_SET_ADD_MODE
+{
+ Slotname [ en-US ] = "MultiSelection On";
+};
+SfxSlotInfo FN_SET_EXT_MODE
+{
+ Slotname [ en-US ] = "Extended Selection On";
+};
+SfxSlotInfo FN_SET_PAGE_STYLE
+{
+ Slotname [ en-US ] = "Apply Page Style";
+};
+SfxSlotInfo FN_SET_SUB_SCRIPT
+{
+ Slotname [ en-US ] = "Subscript";
+};
+SfxSlotInfo FN_SET_SUPER_SCRIPT
+{
+ Slotname [ en-US ] = "Superscript";
+};
+SfxSlotInfo FN_SHADOWCURSOR
+{
+ Slotname [ en-US ] = "Direct Cursor On/Off";
+};
+SfxSlotInfo FN_SHIFT_BACKSPACE
+{
+ Slotname [ en-US ] = "Backspace";
+};
+SfxSlotInfo FN_SHOW_MULTIPLE_PAGES
+{
+ Slotname [ en-US ] = "Page Preview: Multiple Pages";
+};
+SfxSlotInfo FN_SHOW_TWO_PAGES
+{
+ Slotname [ en-US ] = "Page Preview: Two Pages";
+};
+SfxSlotInfo FN_SHOW_BOOKVIEW
+{
+ SlotName[ en-US ] = "Book Preview";
+};
+SfxSlotInfo FN_SHRINK_FONT_SIZE
+{
+ Slotname [ en-US ] = "Reduce Font";
+};
+SfxSlotInfo FN_SORTING_DLG
+{
+ Slotname [ en-US ] = "Sort";
+};
+SfxSlotInfo FN_START_DOC_DIRECT
+{
+ Slotname [ en-US ] = "Directly to Document Begin";
+};
+SfxSlotInfo FN_START_OF_COLUMN
+{
+ Slotname [ en-US ] = "To Column Begin";
+};
+SfxSlotInfo FN_START_OF_DOCUMENT
+{
+ Slotname [ en-US ] = "To Document Begin";
+};
+SfxSlotInfo FN_START_OF_DOCUMENT_SEL
+{
+ Slotname [ en-US ] = "Select to Document Begin";
+};
+SfxSlotInfo FN_START_OF_LINE
+{
+ Slotname [ en-US ] = "To Line Begin";
+};
+SfxSlotInfo FN_START_OF_LINE_SEL
+{
+ Slotname [ en-US ] = "Select to Begin of Line";
+};
+SfxSlotInfo FN_START_OF_NEXT_COLUMN
+{
+ Slotname [ en-US ] = "To Begin of Next Column";
+};
+SfxSlotInfo FN_START_OF_NEXT_PAGE
+{
+ Slotname [ en-US ] = "To Begin of Next Page";
+};
+SfxSlotInfo FN_START_OF_NEXT_PAGE_SEL
+{
+ Slotname [ en-US ] = "Select to Begin of Next Page";
+};
+SfxSlotInfo FN_START_OF_PAGE
+{
+ Slotname [ en-US ] = "To Page Begin";
+};
+SfxSlotInfo FN_START_OF_PAGE_SEL
+{
+ Slotname [ en-US ] = "Select to Page Begin";
+};
+SfxSlotInfo FN_START_OF_PARA
+{
+ Slotname [ en-US ] = "To Paragraph Begin";
+};
+SfxSlotInfo FN_START_OF_PARA_SEL
+{
+ Slotname [ en-US ] = "Select to Paragraph Begin";
+};
+SfxSlotInfo FN_START_OF_PREV_COLUMN
+{
+ Slotname [ en-US ] = "To Begin of Previous Column";
+};
+SfxSlotInfo FN_START_OF_PREV_PAGE
+{
+ Slotname [ en-US ] = "To Begin of Previous Page";
+};
+SfxSlotInfo FN_START_OF_PREV_PAGE_SEL
+{
+ Slotname [ en-US ] = "Select to Begin of Previous Page";
+};
+SfxSlotInfo FN_START_TABLE
+{
+ Slotname [ en-US ] = "To Table Begin";
+};
+SfxSlotInfo FN_STAT_PAGE
+{
+ Slotname [ en-US ] = "Page Number";
+};
+SfxSlotInfo FN_STAT_SELMODE
+{
+ Slotname [ en-US ] = "Selection Mode";
+};
+SfxSlotInfo FN_STAT_TEMPLATE
+{
+ Slotname [ en-US ] = "Page Style";
+};
+SfxSlotInfo FN_TABLE_ADJUST_CELLS
+{
+ Slotname [ en-US ] = "Optimal Column Width";
+};
+SfxSlotInfo FN_TABLE_AUTOSUM
+{
+ Slotname [ en-US ] = "Sum";
+};
+SfxSlotInfo FN_TABLE_BALANCE_CELLS
+{
+ Slotname [ en-US ] = "Space Columns Equally";
+};
+SfxSlotInfo FN_TABLE_BALANCE_ROWS
+{
+ Slotname [ en-US ] = "Space Rows Equally ";
+};
+SfxSlotInfo FN_TABLE_DELETE_COL
+{
+ Slotname [ en-US ] = "Delete Column";
+};
+SfxSlotInfo FN_TABLE_DELETE_ROW
+{
+ Slotname [ en-US ] = "Delete Row";
+};
+SfxSlotInfo FN_TABLE_INSERT_COL
+{
+ Slotname [ en-US ] = "Insert Column";
+};
+SfxSlotInfo FN_TABLE_INSERT_ROW
+{
+ Slotname [ en-US ] = "Insert Row";
+};
+SfxSlotInfo FN_TABLE_MERGE_CELLS
+{
+ Slotname [ en-US ] = "Merge Cells";
+};
+SfxSlotInfo FN_TABLE_MERGE_TABLE
+{
+ Slotname [ en-US ] = "Merge Table";
+};
+SfxSlotInfo FN_FORMAT_APPLY_HEAD1
+{
+ Slotname [ en-US ] = "Apply Style Heading 1";
+};
+SfxSlotInfo FN_FORMAT_APPLY_HEAD2
+{
+ Slotname [ en-US ] = "Apply Style Heading 2";
+};
+SfxSlotInfo FN_FORMAT_APPLY_HEAD3
+{
+ Slotname [ en-US ] = "Apply Style Heading 3";
+};
+SfxSlotInfo FN_FORMAT_APPLY_DEFAULT
+{
+ Slotname [ en-US ] = "Apply Style Default";
+};
+SfxSlotInfo FN_FORMAT_APPLY_TEXTBODY
+{
+ Slotname [ en-US ] = "Apply Style Textbody";
+};
+SfxSlotInfo FN_TABLE_MODE_FIX
+{
+ Slotname [ en-US ] = "Table: Fixed";
+};
+SfxSlotInfo FN_TABLE_MODE_FIX_PROP
+{
+ Slotname [ en-US ] = "Table: Fixed, Proportional";
+};
+SfxSlotInfo FN_TABLE_MODE_VARIABLE
+{
+ Slotname [ en-US ] = "Table: Variable";
+};
+SfxSlotInfo FN_TABLE_OPTIMAL_HEIGHT
+{
+ Slotname [ en-US ] = "Optimal Row Height";
+};
+SfxSlotInfo FN_TABLE_SELECT_ALL
+{
+ Slotname [ en-US ] = "Select Table";
+};
+SfxSlotInfo FN_TABLE_SELECT_COL
+{
+ Slotname [ en-US ] = "Select Column";
+};
+SfxSlotInfo FN_TABLE_SELECT_ROW
+{
+ Slotname [ en-US ] = "Select Rows";
+};
+SfxSlotInfo FN_TABLE_SET_READ_ONLY_CELLS
+{
+ Slotname [ en-US ] = "Protect Cells";
+};
+SfxSlotInfo FN_TABLE_SET_ROW_HEIGHT
+{
+ Slotname [ en-US ] = "Row Height";
+};
+SfxSlotInfo FN_TABLE_SPLIT_CELLS
+{
+ Slotname [ en-US ] = "Split Cells";
+};
+SfxSlotInfo FN_TABLE_SPLIT_TABLE
+{
+ Slotname [ en-US ] = "Split Table";
+};
+SfxSlotInfo FN_TABLE_UNSET_READ_ONLY
+{
+ Slotname [ en-US ] = "Unprotect sheet";
+};
+SfxSlotInfo FN_TABLE_UNSET_READ_ONLY_CELLS
+{
+ Slotname [ en-US ] = "Unprotect cells";
+};
+SfxSlotInfo FN_TABLE_VERT_BOTTOM
+{
+ Slotname [ en-US ] = "Bottom";
+};
+SfxSlotInfo FN_TABLE_VERT_CENTER
+{
+ Slotname [ en-US ] = "Center ( vertical )";
+};
+SfxSlotInfo FN_TABLE_VERT_NONE
+{
+ Slotname [ en-US ] = "Top";
+};
+SfxSlotInfo FN_THESAURUS_DLG
+{
+ Slotname [ en-US ] = "Thesaurus";
+};
+SfxSlotInfo FN_TO_FOOTER
+{
+ Slotname [ en-US ] = "To Footer";
+};
+SfxSlotInfo FN_TO_HEADER
+{
+ Slotname [ en-US ] = "To Header";
+};
+SfxSlotInfo FN_TOOL_ANKER
+{
+ Slotname [ en-US ] = "Change Anchor";
+};
+SfxSlotInfo FN_TOOL_ANKER_AT_CHAR
+{
+ Slotname [ en-US ] = "Anchor to Character";
+};
+SfxSlotInfo FN_TOOL_ANKER_CHAR
+{
+ Slotname [ en-US ] = "Anchor as Character";
+};
+SfxSlotInfo FN_TOOL_ANKER_FRAME
+{
+ Slotname [ en-US ] = "Anchor To Frame";
+};
+SfxSlotInfo FN_TOOL_ANKER_PAGE
+{
+ Slotname [ en-US ] = "Anchor To Page";
+};
+SfxSlotInfo FN_TOOL_ANKER_PARAGRAPH
+{
+ Slotname [ en-US ] = "Anchor To Paragraph";
+};
+SfxSlotInfo FN_TOOL_GROUP
+{
+ Slotname [ en-US ] = "Group";
+};
+SfxSlotInfo FN_TOOL_HIERARCHIE
+{
+ Slotname [ en-US ] = "Change Position";
+};
+SfxSlotInfo FN_TOOL_UNGROUP
+{
+ Slotname [ en-US ] = "Ungroup";
+};
+SfxSlotInfo FN_UNDERLINE_DOUBLE
+{
+ Slotname [ en-US ] = "Double Underline ";
+};
+SfxSlotInfo FN_UPDATE_ALL
+{
+ Slotname [ en-US ] = "Update All";
+};
+SfxSlotInfo FN_UPDATE_ALL_LINKS
+{
+ Slotname [ en-US ] = "Update All Links";
+};
+SfxSlotInfo FN_UPDATE_CUR_TOX
+{
+ Slotname [ en-US ] = "Update Index";
+};
+SfxSlotInfo FN_EDIT_CURRENT_TOX
+{
+ Slotname [ en-US ] = "Edit index";
+};
+SfxSlotInfo FN_UPDATE_FIELDS
+{
+ Slotname [ en-US ] = "Update Fields";
+};
+SfxSlotInfo FN_UPDATE_INPUTFIELDS
+{
+ Slotname [ en-US ] = "Update Input Fields";
+};
+SfxSlotInfo FN_UPDATE_TOX
+{
+ Slotname [ en-US ] = "Update Indexes";
+};
+SfxSlotInfo FN_VIEW_BOUNDS
+{
+ Slotname [ en-US ] = "Text Limits";
+};
+SfxSlotInfo FN_VIEW_FIELDNAME
+{
+ Slotname [ en-US ] = "Field Names On/Off";
+};
+SfxSlotInfo FN_VIEW_FIELDS
+{
+ Slotname [ en-US ] = "Fields";
+};
+SfxSlotInfo FN_VIEW_GRAPHIC
+{
+ Slotname [ en-US ] = "Graphics On/Off";
+};
+
+SfxSlotInfo FN_VIEW_HIDDEN_PARA
+{
+ Slotname [ en-US ] = "Hidden Paragraphs";
+};
+SfxSlotInfo FN_VIEW_MARKS
+{
+ Slotname [ en-US ] = "Field Shadings";
+};
+SfxSlotInfo FN_VIEW_META_CHARS
+{
+ Slotname [ en-US ] = "Nonprinting Characters On/Off";
+};
+SfxSlotInfo FN_VIEW_TABLEGRID
+{
+ Slotname [ en-US ] = "Table Limits";
+};
+SfxSlotInfo FN_VLINEAL
+{
+ Slotname [ en-US ] = "Vertical Ruler";
+};
+SfxSlotInfo FN_VSCROLLBAR
+{
+ Slotname [ en-US ] = "Vertical Scroll Bar";
+};
+SfxSlotInfo FN_WRAP_ANCHOR_ONLY
+{
+ Slotname [ en-US ] = "Wrap First Paragraph";
+};
+SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND
+{
+ Slotname [ en-US ] = "Highlighting";
+};
+SfxSlotInfo SID_ATTR_CHAR_COLOR_BACKGROUND_EXT
+{
+ Slotname [ en-US ] = "Highlight Fill";
+};
+SfxSlotInfo SID_ATTR_CHAR_COLOR_EXT
+{
+ Slotname [ en-US ] = "Font Color Fill";
+};
+SfxSlotInfo SID_ATTR_CHAR_COLOR2
+{
+ Slotname [ en-US ] = "Font Color";
+};
+SfxSlotInfo SID_TEMPLATE_LOAD
+{
+ Slotname [ en-US ] = "Load Styles";
+};
+SfxSlotInfo FN_FORMAT_COLUMN
+{
+ Slotname [ en-US ] = "Columns";
+};
+SfxSlotInfo FN_INSERT_MULTI_TOX
+{
+
+ Slotname [ en-US ] = "Insert Index";
+};
+SfxSlotInfo FN_INSERT_AUTH_ENTRY_DLG
+{
+ Slotname [ en-US ] = "Insert Bibliography Entry";
+};
+
+SfxSlotInfo FN_EDIT_AUTH_ENTRY_DLG
+{
+ Slotname [ en-US ] = "Edit Bibliography Entry";
+};
+
+SfxSlotInfo FN_REMOVE_CUR_TOX
+{
+ Slotname [ en-US ] = "Delete index";
+};
+SfxSlotInfo FN_EDIT_HYPERLINK
+{
+ Slotname [ en-US ] = "Edit hyperlink";
+};
+SfxSlotInfo FN_SET_MODOPT_TBLNUMFMT
+{
+ Slotname [ en-US ] = "Number Recognition";
+};
+SfxSlotInfo FN_UPDATE_CHARTS
+{
+ Slotname [ en-US ] = "Update Charts";
+};
+SfxSlotInfo FN_NAME_SHAPE
+{
+ Slotname [ en-US ] = "Name...";
+};
+// #i68101#
+SfxSlotInfo FN_TITLE_DESCRIPTION_SHAPE
+{
+ Slotname [ en-US ] = "Description...";
+};
+SfxSlotInfo FN_CLOSE_PAGEPREVIEW
+{
+ Slotname [ en-US ] = "Close Preview";
+};
+
+SfxSlotInfo FN_TO_FOOTNOTE_AREA
+{
+ Slotname [ en-US ] = "Edit Footnote/Endnote";
+};
+
+SfxSlotInfo FN_READONLY_SELECTION_MODE
+{
+ Slotname [ en-US ] = "Select Text";
+};
+
+SfxSlotInfo FN_TABLE_ROW_SPLIT
+{
+ Slotname [ en-US ] = "Break across page and columns";
+};
+SfxSlotInfo FN_WORDCOUNT_DIALOG
+{
+ SlotName[ en-US ] = "Word Count";
+};
+SfxSlotInfo FN_TABLE_DELETE_TABLE
+{
+ SlotName [ en-US ] = "Delete table";
+};
+SfxSlotInfo FN_TABLE_SELECT_CELL
+{
+ SlotName [ en-US ] = "Select cell";
+};
+SfxSlotInfo FN_CONVERT_TEXT_TO_TABLE
+{
+ SlotName [ en-US ] = "Convert Text to Table";
+};
+
+SfxSlotInfo FN_CONVERT_TABLE_TO_TEXT
+{
+ SlotName [ en-US ] = "Convert Table to Text";
+};
+SfxSlotInfo FN_TABLE_SORT_DIALOG
+{
+ SlotName [ en-US ] = "Sort";
+};
+SfxSlotInfo FN_TABLE_HEADLINE_REPEAT
+{
+ SlotName [ en-US ] = "Heading Rows Repeat";
+};
+SfxSlotInfo FN_XFORMS_DESIGN_MODE
+{
+ SlotName[ en-US ] = "Design Mode On/Off";
+};
+SfxSlotInfo FN_XFORMS_INIT
+{
+ SlotName[ en-US ] = "XML Form Document";
+};
+SfxSlotInfo FN_NUM_CONTINUE
+{
+ SlotName[ en-US ] = "Continue previous numbering";
+};
+
+SfxSlotInfo FN_INSERT_RLM
+{
+ SlotName[ en-US ] = "Right-to-left mark";
+};
+SfxSlotInfo FN_INSERT_LRM
+{
+ SlotName[ en-US ] = "Left-to-right mark";
+};
+SfxSlotInfo FN_INSERT_ZWSP
+{
+ SlotName[ en-US ] = "No-width no break";
+};
+SfxSlotInfo FN_INSERT_ZWNBSP
+{
+ SlotName[ en-US ] = "No-width optional break";
+};
+SfxSlotInfo FN_VIEW_NOTES
+{
+ Slotname [ en-US ] = "Notes";
+};
+
diff --git a/sw/sdi/tabsh.sdi b/sw/sdi/tabsh.sdi
new file mode 100644
index 000000000000..d712836c2da9
--- /dev/null
+++ b/sw/sdi/tabsh.sdi
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tabsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextTable : BaseTextTable
+[
+ uuid = "49CE7CA0-111A-101D-9757-6E74207A7520"
+]
+{
+ // hier sollen die Slots eingefuegt werden, die vom StarWriter/WEB
+ // nicht unterstuetzt werden
+
+ import TextSelection;
+
+ FN_TABLE_SET_READ_ONLY_CELLS // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = NoState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+/*
+ SvxFmtSplitItem TableSplit SID_ATTR_PARA_SPLIT // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ GroupId = GID_TABLE ;
+ ]
+ SvxFmtKeepItem TableKeepTogether SID_ATTR_PARA_KEEP // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ GroupId = GID_TABLE ;
+ ]
+*/
+}
+
+ //=========================================================================
+
+shell SwTableShell : SwBaseShell
+
+{
+ import TextTable[Automation];
+}
+
diff --git a/sw/sdi/textsh.sdi b/sw/sdi/textsh.sdi
new file mode 100644
index 000000000000..9ca60e2c1fa5
--- /dev/null
+++ b/sw/sdi/textsh.sdi
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: textsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface Text : BaseText
+[
+ uuid = "1BD56200-111A-101D-9757-6E74207A7520"
+]
+{
+ FN_INSERT_FRAME_INTERACT // status()
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Cachable ;
+ ]
+ // hier sollen die Slots eingefuegt werden, die vom StarWriter/WEB
+ // nicht unterstuetzt werden
+
+ import TextSelection;
+
+ /*-----------------24.01.97 08.13-------------------
+ Spezielle Feldbefehle
+--------------------------------------------------*/
+
+ FN_INSERT_FLD_TOPIC
+ [
+ ExecMethod = ExecField ;
+ StateMethod = StateField ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ReadOnlyDoc = FALSE ;
+ ]
+ /*-----------------24.01.97 08.13-------------------
+ Ende Spezielle Feldbefehle
+--------------------------------------------------*/
+
+ /*-----------------24.01.97 07.36-------------------
+ Verzeichnisse
+--------------------------------------------------*/
+
+ /*
+enum TOXTypes
+{
+ TOX_INDEX,
+ TOX_USER,
+ TOX_CONTENT
+};
+
+ */
+
+ FN_INSERT_IDX_ENTRY_DLG // status(final|play)
+ [
+ ExecMethod = ExecIdx ;
+ StateMethod = GetIdxState ;
+ ]
+
+ FN_INSERT_AUTH_ENTRY_DLG
+ [
+ ExecMethod = ExecIdx ;
+ StateMethod = GetIdxState ;
+ ]
+ FN_EDIT_AUTH_ENTRY_DLG
+ [
+ ExecMethod = ExecIdx ;
+ StateMethod = GetIdxState ;
+ ]
+ FN_EDIT_IDX_ENTRY_DLG // status(final|play)
+ [
+ ExecMethod = ExecIdx ;
+ StateMethod = GetIdxState ;
+ ]
+ FN_INSERT_MULTI_TOX // status(final|play)
+ [
+ ExecMethod = ExecIdx ;
+ StateMethod = GetIdxState ;
+ ]
+ FN_REMOVE_CUR_TOX
+ [
+ ExecMethod = ExecIdx ;
+ StateMethod = GetIdxState ;
+ ]
+ FN_IDX_MARK_TO_IDX // status(final|play)
+ [
+ ExecMethod = ExecIdx ;
+ ]
+
+ /*-----------------24.01.97 08.01-------------------
+ Absatzeinstellungen
+--------------------------------------------------*/
+
+ /*-----------------24.01.97 08.01-------------------
+ Ende Absatzeinstellungen
+--------------------------------------------------*/
+
+}
+
+shell SwTextShell : SwBaseShell
+{
+ import Text[Automation];
+}
+
diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi
new file mode 100644
index 000000000000..05b41e6e7482
--- /dev/null
+++ b/sw/sdi/viewsh.sdi
@@ -0,0 +1,333 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: viewsh.sdi,v $
+ * $Revision: 1.15 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface TextInTable
+[ uuid = "63C33940-69D8-101D-9757-C667E8298000" ]
+{
+ import Text;
+ import TextTable;
+}
+
+interface ListInTable
+[ uuid="7F1A6E20-69D8-101D-9757-C667E8298000" ]
+{
+ import Text;
+ import TextList;
+ import TextTable;
+}
+
+interface ListInText
+[ uuid = "8A4C07E0-69D8-101D-9757-C667E8298000"]
+{
+ import TextList;
+ import Text;
+}
+
+interface TextEditView : BaseTextEditView
+[
+ uuid = "09782660-111A-101D-9757-6E74207A7520"
+]
+{
+ // Slots, die nicht in der WebDocShell gebraucht werden
+ FN_INSERT_OBJ_CTRL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_INSERT_CAPTION // status()
+ [
+ ExecMethod = ExecDlgExt ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_EDIT_FOOTNOTE // status(final|play)
+ [
+ ExecMethod = ExecDlgExt ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_HYPHENATE_OPT_DLG // status(final|play)
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ FN_CHANGE_PAGENUM // status(final)
+ [
+ ExecMethod = ExecDlg ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_INSERT_DRAW // status()
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_FONTWORK_GALLERY_FLOATER
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAWTBX_CS_BASIC
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAWTBX_CS_SYMBOL
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAWTBX_CS_ARROW
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAWTBX_CS_FLOWCHART
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAWTBX_CS_CALLOUT
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAWTBX_CS_STAR
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_DRAW_CS_ID
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ ]
+ SID_FM_CREATE_CONTROL // status()
+ [
+ ExecMethod = ExecDraw ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_FM_CREATE_FIELDCONTROL
+ [
+ ExecMethod = ExecDraw ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+ //=========================================================================
+
+shell SwView : SfxViewShell
+
+{
+ import TextEditView [Automation];
+// import TextPage "Page";
+// import SearchSettings;
+// import SearchAttributes;
+// import ReplaceAttributes;
+}
+
+interface TextPrintPreview : View
+[ uuid = "1622A480-111A-101D-9757-6E74207A7520" ]
+{
+ SID_BROWSER_MODE
+ [
+ StateMethod = GetState;
+ ]
+ FN_PRINT_LAYOUT
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ ]
+ FN_REFRESH_VIEW // status(final|play)
+ [
+ StateMethod = GetState ;
+ ]
+ FN_CHAR_LEFT // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = NoState ;
+ ]
+ FN_CHAR_RIGHT // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = NoState ;
+ ]
+ FN_LINE_UP // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = NoState ;
+ ]
+ FN_LINE_DOWN // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = NoState ;
+ ]
+ FN_PAGEUP // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_PAGEDOWN // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_START_OF_DOCUMENT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_END_OF_DOCUMENT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_SHOW_TWO_PAGES // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_SHOW_MULTIPLE_PAGES // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_SHOW_BOOKVIEW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_PREVIEW_PRINT_OPTIONS //status()
+ [
+ ExecMethod = Execute ;
+ ]
+ FN_PRINT_PAGEPREVIEW // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PRINTDOC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PRINTDOCDIRECT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PRINTPREVIEW // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_CLOSE_PAGEPREVIEW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ZOOM_IN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ZOOM_OUT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_PREVIEW_ZOOM
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_UNDO // status()
+ [
+ StateMethod = StateUndo ;
+ ]
+ SID_REDO // status()
+ [
+ StateMethod = StateUndo ;
+ ]
+ SID_REPEAT // status()
+ [
+ StateMethod = StateUndo ;
+ ]
+ //---------------------------------------------------------------------
+ //Ab hier Statusleiste
+ FN_STAT_ZOOM // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ATTR_ZOOM // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_STAT_PAGE // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_START_OF_LINE // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_END_OF_LINE // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_INSERT_BREAK // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_ATTR_ZOOMSLIDER // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ //----------------------------------------------
+ //End mit Statusleiste
+}
+
+ //=========================================================================
+
+shell SwPagePreView : SfxViewShell
+{
+ import TextPrintPreview[Automation];
+}
+
+
diff --git a/sw/sdi/wbasesh.sdi b/sw/sdi/wbasesh.sdi
new file mode 100644
index 000000000000..c418101af14a
--- /dev/null
+++ b/sw/sdi/wbasesh.sdi
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wbasesh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebSelection : BaseTextSelection
+[
+ Automation = FALSE;
+]
+{
+ // hier kommt nur dann etwas hinein, wenn es im
+ // kompletten StarWriter nicht benoetigt wird
+}
+
+shell SwWebBaseShell
+{
+ import WebSelection[Automation];
+ import Interior "Interior";
+ import Shadow "Shadow";
+
+}
+
diff --git a/sw/sdi/wbeziers.sdi b/sw/sdi/wbeziers.sdi
new file mode 100644
index 000000000000..8d692ea1b93b
--- /dev/null
+++ b/sw/sdi/wbeziers.sdi
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wbeziers.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface Bezier : _Bezier
+[ uuid = "68EF7EA0-6876-11D0-A887-008029E86826" ]
+{
+}
+
+shell SwBezierShell: SwBaseShell
+{
+ import Bezier[Automation];
+}
+
+
diff --git a/sw/sdi/wdocsh.sdi b/sw/sdi/wdocsh.sdi
new file mode 100644
index 000000000000..e2efd025c1df
--- /dev/null
+++ b/sw/sdi/wdocsh.sdi
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wdocsh.sdi,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebDocument : BaseTextDocument
+[
+ uuid = "B47F0DE4-1E1F-11d1-89CA-008029E4B0B1"
+]
+{
+ // hier nur Slots, die der vollstaendige Writer nicht braucht
+ SID_SOURCEVIEW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Asynchron = TRUE;
+ ]
+
+ SID_HTML_MODE
+ [
+ StateMethod = GetState ;
+ ]
+}
+
+shell SwWebDocShell : SfxObjectShell
+{
+ import WebDocument[Automation];
+}
+
+shell SwWebGlosDocShell : SwWebDocShell
+{
+ SID_SAVEDOC // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+}
+
diff --git a/sw/sdi/wdrwbase.sdi b/sw/sdi/wdrwbase.sdi
new file mode 100644
index 000000000000..6df4a3588b6f
--- /dev/null
+++ b/sw/sdi/wdrwbase.sdi
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wdrwbase.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebDrawBase : BaseTextDrawBase
+[
+ Automation = FALSE;
+]
+{
+ import BaseTextSelection;
+}
+
+
+shell SwWebDrawBaseShell: SwBaseShell
+{
+ import WebDrawBase[Automation];
+
+ SID_OBJECT_ALIGN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+
diff --git a/sw/sdi/wformsh.sdi b/sw/sdi/wformsh.sdi
new file mode 100644
index 000000000000..30aa53568a6a
--- /dev/null
+++ b/sw/sdi/wformsh.sdi
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wformsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface WebDrawForm: BaseTextDrawForm
+[
+ uuid = "4bac4490-fede-11d1-abff-006097b418c2"
+]
+{
+ import WebDrawBase;
+}
+
+shell SwWebDrawFormShell : SwWebDrawBaseShell
+{
+ import WebDrawForm[Automation];
+}
+
+
diff --git a/sw/sdi/wfrmsh.sdi b/sw/sdi/wfrmsh.sdi
new file mode 100644
index 000000000000..f117e2d9aaa5
--- /dev/null
+++ b/sw/sdi/wfrmsh.sdi
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wfrmsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebFrame : BaseTextFrame
+[
+ uuid = "B47F0DE6-1E1F-11d1-89CA-008029E4B0B1"
+]
+{
+ import BaseTextSelection;
+}
+
+
+ //=========================================================================
+
+shell SwWebFrameShell : SwBaseShell
+{
+ import WebFrame[Automation];
+}
+
+
diff --git a/sw/sdi/wgrfsh.sdi b/sw/sdi/wgrfsh.sdi
new file mode 100644
index 000000000000..ec70d9dcf45b
--- /dev/null
+++ b/sw/sdi/wgrfsh.sdi
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wgrfsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebGraphic : BaseTextGraphic
+[
+ uuid = "B47F0DEB-1E1F-11d1-89CA-008029E4B0B1"
+]
+{
+}
+
+
+ //=========================================================================
+
+shell SwWebGrfShell : SwBaseShell
+{
+ import WebGraphic[Automation];
+}
+
+
diff --git a/sw/sdi/wlistsh.sdi b/sw/sdi/wlistsh.sdi
new file mode 100644
index 000000000000..cd3808471191
--- /dev/null
+++ b/sw/sdi/wlistsh.sdi
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wlistsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface WebList : BaseTextList
+[
+ uuid = "B47F0DE3-1E1F-11d1-89CA-008029E4B0B1"
+]
+{
+ import TextSelection;
+}
+
+ //=========================================================================
+
+shell SwWebListShell : SwBaseShell
+{
+ import WebList[Automation];
+}
+
diff --git a/sw/sdi/wolesh.sdi b/sw/sdi/wolesh.sdi
new file mode 100644
index 000000000000..1cec309b7696
--- /dev/null
+++ b/sw/sdi/wolesh.sdi
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wolesh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+interface WebOLEObject : BaseTextOLEObject
+[
+ uuid = "B47F0DE2-1E1F-11d1-89CA-008029E4B0B1"
+]
+{
+ import WebFrame;
+}
+
+
+ //=========================================================================
+
+shell SwWebOleShell : SwWebFrameShell
+{
+ import WebOLEObject[Automation];
+}
+
+
diff --git a/sw/sdi/wrtapp.sdi b/sw/sdi/wrtapp.sdi
new file mode 100644
index 000000000000..300fc18a2c12
--- /dev/null
+++ b/sw/sdi/wrtapp.sdi
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wrtapp.sdi,v $
+ * $Revision: 1.17 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+interface StarWriter
+[
+ uuid ( "4BF0AA20-E6B9-101C-8A0E-040224007802" )
+]
+{
+ FN_ENVELOP // status(final|play)
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+
+ FN_LABEL // status(final|play)
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+
+ FN_BUSINESS_CARD // status()
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+
+ FN_XFORMS_INIT // #i31958#
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ DisableFlags="SW_DISABLE_ON_MAILBOX_EDITOR";
+ ]
+
+ SID_ATTR_METRIC // status(final|play)
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+ SID_ATTR_UNDO_COUNT // ole(no) api(final/play)
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+
+ FN_MAILMERGE_WIZARD
+ [
+ ExecMethod = ExecOther ;
+ ]
+
+ FN_SET_MODOPT_TBLNUMFMT // status()
+ [
+ ExecMethod = ExecOther ;
+ StateMethod = StateOther ;
+ ]
+
+} //end interface Application
+
+shell SwModule
+{
+ import StarWriter[Automation];
+}
+
diff --git a/sw/sdi/wtabsh.sdi b/sw/sdi/wtabsh.sdi
new file mode 100644
index 000000000000..d96cd065be81
--- /dev/null
+++ b/sw/sdi/wtabsh.sdi
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wtabsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebTable : BaseTextTable
+[ uuid = "B47F0DEC-1E1F-11d1-89CA-008029E4B0B1" ]
+{
+ import BaseTextSelection;
+}
+
+ //=========================================================================
+
+shell SwWebTableShell : SwBaseShell
+{
+ import WebTable[Automation];
+}
+
diff --git a/sw/sdi/wtextsh.sdi b/sw/sdi/wtextsh.sdi
new file mode 100644
index 000000000000..d130c107d26d
--- /dev/null
+++ b/sw/sdi/wtextsh.sdi
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wtextsh.sdi,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebText : BaseText
+[
+ uuid = "B47F0DE5-1E1F-11d1-89CA-008029E4B0B1";
+]
+{
+ FN_INSERT_FRAME_INTERACT_NOCOL
+ [
+ ExecMethod = ExecInsert ;
+ StateMethod = StateInsert ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ Cachable ;
+ ]
+ // hier sollen die Slots eingefuegt werden, die n u r vom StarWriter/WEB
+ // unterstuetzt werden
+ import TextSelection;
+}
+
+shell SwWebTextShell : SwBaseShell
+{
+ import WebText[Automation];
+}
+
diff --git a/sw/sdi/wviewsh.sdi b/sw/sdi/wviewsh.sdi
new file mode 100644
index 000000000000..3eff3db1f4a0
--- /dev/null
+++ b/sw/sdi/wviewsh.sdi
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: wviewsh.sdi,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+interface WebTextInTable
+[ uuid = "B47F0DE7-1E1F-11d1-89CA-008029E4B0B1" ]
+{
+ import WebText;
+ import WebTable;
+}
+
+interface WebListInTable
+[ uuid="B47F0DE8-1E1F-11d1-89CA-008029E4B0B1" ]
+{
+ import WebText;
+ import WebList;
+ import WebTable;
+}
+
+interface WebListInText
+[ uuid = "B47F0DE9-1E1F-11d1-89CA-008029E4B0B1"]
+{
+ import WebList;
+ import WebText;
+}
+
+interface WebEditView : BaseTextEditView
+[
+ uuid = "B47F0DEA-1E1F-11d1-89CA-008029E4B0B1"
+]
+{
+ SID_DRAW_TEXT_MARQUEE // status()
+ [
+ ExecMethod = ExecDraw ;
+ StateMethod = GetDrawState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+}
+
+shell SwWebView : SfxViewShell
+{
+ import WebEditView [Automation];
+// import SearchSettings;
+// import TextPage "Page";
+// import SearchAttributes;
+// import ReplaceAttributes;
+
+}
+
+interface WebSourceView : View
+[ uuid = "95069CE0-69D8-101D-9757-C667E8298000"]
+{
+ SID_TABLE_CELL // status()
+ [
+ StateMethod = GetState ;
+ ]
+ SID_SAVEASDOC // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_SAVEDOC // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PRINTDOC // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_PRINTDOCDIRECT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_SEARCH_OPTIONS
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_SEARCH_ITEM
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE;
+ ]
+ FID_SEARCH_NOW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ FN_REPEAT_SEARCH // status(final|play)
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState ;
+ ]
+ SID_UNDO // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_REDO // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_REPEAT // status()
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_CUT // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_COPY // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+
+ SID_PASTE // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_SELECTALL // status(final|play)
+ [
+ ExecMethod = Execute ;
+ StateMethod = NoState ;
+ ]
+ SID_MAIL_SENDDOC
+ [
+ StateMethod = GetState ;
+ ]
+ SID_MAIL_SENDDOCASPDF
+ [
+ StateMethod = GetState ;
+ ]
+ SID_EXPORTDOC
+ [
+ StateMethod = GetState ;
+ ]
+ SID_EXPORTDOCASPDF
+ [
+ StateMethod = GetState ;
+ ]
+ SID_DIRECTEXPORTDOCASPDF
+ [
+ StateMethod = GetState ;
+ ]
+ SID_BROWSER_MODE
+ [
+ StateMethod = GetState;
+ ]
+ FN_PRINT_LAYOUT
+ [
+ StateMethod = GetState;
+ ]
+}
+
+shell SwSrcView : SfxViewShell
+
+{
+ import WebSourceView [Automation];
+}
+
+
+
+
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
new file mode 100644
index 000000000000..171c4de9208d
--- /dev/null
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -0,0 +1,520 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwNodeNum.cxx,v $
+ * $Revision: 1.16 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include <svx/svxenum.hxx>
+#include <numrule.hxx>
+#include <SwNodeNum.hxx>
+#include <ndtxt.hxx>
+#include <pam.hxx>
+#include <stdio.h>
+// --> OD 2007-10-31 #i83479#
+#include <IDocumentListItems.hxx>
+// <--
+
+// --> OD 2008-02-19 #refactorlists#
+SwNodeNum::SwNodeNum( SwTxtNode* pTxtNode )
+ : SwNumberTreeNode(),
+ mpTxtNode( pTxtNode ),
+ mpNumRule( 0 )
+{
+}
+
+SwNodeNum::SwNodeNum( SwNumRule* pNumRule )
+ : SwNumberTreeNode(),
+ mpTxtNode( 0 ),
+ mpNumRule( pNumRule )
+{
+}
+// <--
+
+SwNodeNum::~SwNodeNum()
+{
+}
+
+SwTxtNode * SwNodeNum::GetTxtNode() const
+{
+ return mpTxtNode;
+}
+
+SwNumRule * SwNodeNum::GetNumRule() const
+{
+ return mpNumRule;
+}
+
+void SwNodeNum::ChangeNumRule( SwNumRule& rNumRule )
+{
+ ASSERT( GetNumRule() && GetTxtNode(),
+ "<SwNodeNum::ChangeNumRule(..)> - missing list style and/or text node. Serious defect -> please informm OD." );
+ if ( GetNumRule() && GetTxtNode() )
+ {
+ GetNumRule()->RemoveTxtNode( *(GetTxtNode()) );
+ }
+
+ mpNumRule = &rNumRule;
+
+ if ( GetNumRule() && GetTxtNode() )
+ {
+ GetNumRule()->AddTxtNode( *(GetTxtNode()) );
+ }
+}
+
+SwPosition SwNodeNum::GetPosition() const
+{
+ ASSERT( GetTxtNode(),
+ "<SwNodeNum::GetPosition()> - no text node set at <SwNodeNum> instance" );
+ return SwPosition(*mpTxtNode);
+}
+
+SwNumberTreeNode * SwNodeNum::Create() const
+{
+ // --> OD 2008-02-19 #refactorlists#
+// SwNodeNum * pResult = new SwNodeNum();
+// pResult->SetNumRule(mpNumRule);
+ SwNodeNum * pResult = new SwNodeNum( GetNumRule() );
+ // <--
+
+ return pResult;
+}
+
+// --> OD 2008-02-19 #refactorlists#
+void SwNodeNum::PreAdd()
+{
+ ASSERT( GetTxtNode(),
+ "<SwNodeNum::PreAdd()> - no text node set at <SwNodeNum> instance" );
+ if ( !GetNumRule() && GetTxtNode() )
+ {
+ mpNumRule = GetTxtNode()->GetNumRule();
+ }
+ ASSERT( GetNumRule(),
+ "<SwNodeNum::PreAdd()> - no list style set at <SwNodeNum> instance" );
+ if ( GetNumRule() && GetTxtNode() )
+ {
+ GetNumRule()->AddTxtNode( *(GetTxtNode()) );
+ }
+
+
+ {
+ if ( GetTxtNode() &&
+ GetTxtNode()->GetNodes().IsDocNodes() )
+ {
+ GetTxtNode()->getIDocumentListItems().addListItem( *this );
+ }
+ }
+}
+
+void SwNodeNum::PostRemove()
+{
+ ASSERT( GetTxtNode(),
+ "<SwNodeNum::PostRemove()> - no text node set at <SwNodeNum> instance" );
+ ASSERT( GetNumRule(),
+ "<SwNodeNum::PostRemove()> - no list style set at <SwNodeNum> instance" );
+
+ if ( GetTxtNode() )
+ {
+ GetTxtNode()->getIDocumentListItems().removeListItem( *this );
+ }
+
+ if ( GetNumRule() )
+ {
+ if ( GetTxtNode() )
+ {
+ GetNumRule()->RemoveTxtNode( *(GetTxtNode()) );
+ }
+ mpNumRule = 0;
+ }
+}
+// <--
+
+bool SwNodeNum::IsNotifiable() const
+{
+ bool aResult = true;
+
+ if ( GetTxtNode() )
+ aResult = GetTxtNode()->IsNotifiable();
+
+ return aResult;
+}
+
+bool SwNodeNum::IsNotificationEnabled() const
+{
+ bool aResult = true;
+
+ if ( GetTxtNode() )
+ aResult = GetTxtNode()->IsNotificationEnabled();
+
+ return aResult;
+}
+
+bool SwNodeNum::IsContinuous() const
+{
+ bool aResult = false;
+
+ // --> OD 2006-04-21 #i64311#
+ if ( GetNumRule() )
+ {
+ aResult = mpNumRule->IsContinusNum();
+ }
+ else if ( GetParent() )
+ {
+ aResult = GetParent()->IsContinuous();
+ }
+ else
+ {
+ ASSERT( false, "<SwNodeNum::IsContinuous()> - OD debug" );
+ }
+ // <--
+
+ return aResult;
+}
+
+bool SwNodeNum::IsCounted() const
+{
+ bool aResult = false;
+
+ if ( GetTxtNode() )
+ {
+ // --> OD 2006-01-25 #i59559#
+ // <SwTxtNode::IsCounted()> determines, if a text node is counted for numbering
+// const SwNumFmt * pNumFmt = GetNumFmt();
+// if (pNumFmt)
+// {
+// sal_Int16 nType = pNumFmt->GetNumberingType();
+// if ( nType != SVX_NUM_NUMBER_NONE)
+// aResult = mpTxtNode->IsCounted();
+// }
+ aResult = GetTxtNode()->IsCountedInList();
+ // <--
+ }
+ else
+ aResult = SwNumberTreeNode::IsCounted();
+
+ return aResult;
+}
+
+// --> OD 2006-04-26 #i64010#
+bool SwNodeNum::HasCountedChildren() const
+{
+ bool bResult = false;
+
+ tSwNumberTreeChildren::iterator aIt;
+
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ {
+ SwNodeNum* pChild( dynamic_cast<SwNodeNum*>(*aIt) );
+ ASSERT( pChild,
+ "<SwNodeNum::HasCountedChildren()> - unexcepted type of child -> please inform OD" );
+ if ( pChild &&
+ ( pChild->IsCountedForNumbering() ||
+ pChild->HasCountedChildren() ) )
+ {
+ bResult = true;
+
+ break;
+ }
+ }
+
+ return bResult;
+}
+// <--
+// --> OD 2006-04-26 #i64010#
+bool SwNodeNum::IsCountedForNumbering() const
+{
+ return IsCounted() &&
+ ( IsPhantom() || // phantoms
+ !GetTxtNode() || // root node
+ GetTxtNode()->HasNumber() || // text node
+ GetTxtNode()->HasBullet() ); // text node
+}
+// <--
+
+
+void SwNodeNum::NotifyNode()
+{
+ ValidateMe();
+
+ if (mpTxtNode)
+ {
+ mpTxtNode->NumRuleChgd();
+ }
+}
+
+bool SwNodeNum::LessThan(const SwNumberTreeNode & rNode) const
+{
+ bool bResult = false;
+ const SwNodeNum & rTmpNode = static_cast<const SwNodeNum &>(rNode);
+
+ if (mpTxtNode == NULL && rTmpNode.mpTxtNode != NULL)
+ bResult = true;
+ else if (mpTxtNode != NULL && rTmpNode.mpTxtNode != NULL)
+ {
+ // --> OD 2007-10-31 #i83479# - refactoring
+ // simplify comparison by comparing the indexes of the text nodes
+// SwPosition aMyPos(*mpTxtNode);
+// SwPosition aHisPos(*rTmpNode.mpTxtNode);
+// bResult = (aMyPos < aHisPos) ? true : false;
+ bResult = ( mpTxtNode->GetIndex() < rTmpNode.mpTxtNode->GetIndex() ) ? true : false;
+ // <--
+ }
+
+ return bResult;
+}
+
+//void SwNodeNum::SetRestart(bool bRestart)
+//{
+// // --> OD 2005-10-19 #126009#
+// // - improvement: invalidation only, if <IsRestart()> state changes.
+// const bool bInvalidate( mbRestart != bRestart );
+// // <--
+// mbRestart = bRestart;
+
+// // --> OD 2005-10-19 #126009#
+// if ( bInvalidate )
+// {
+// InvalidateMe();
+// NotifyInvalidSiblings();
+// }
+// // <--
+//}
+
+// --> OD 2008-02-25 #refactorlists#
+bool SwNodeNum::IsRestart() const
+{
+ bool bIsRestart = false;
+
+ if ( GetTxtNode() )
+ {
+ bIsRestart = GetTxtNode()->IsListRestart();
+ }
+
+ return bIsRestart;
+}
+// <--
+
+//void SwNodeNum::SetStart(SwNumberTree::tSwNumTreeNumber nStart)
+//{
+// // --> OD 2005-10-19 #126009#
+// // - improvement: invalidation only, if <IsRestart()> state changes.
+// const bool bInvalidate( mnStart != nStart );
+// // <--
+// mnStart = nStart;
+
+// // --> OD 2005-10-19 #126009#
+// if ( bInvalidate )
+// {
+// InvalidateMe();
+// NotifyInvalidSiblings();
+// }
+//}
+
+bool SwNodeNum::IsCountPhantoms() const
+{
+ bool bResult = true;
+
+ // --> OD 2006-04-21 #i64311#
+ // phantoms aren't counted in consecutive numbering rules
+ if ( mpNumRule )
+ bResult = !mpNumRule->IsContinusNum() &&
+ mpNumRule->IsCountPhantoms();
+ else
+ {
+ ASSERT( false,
+ "<SwNodeNum::IsCountPhantoms(): missing numbering rule - please inform OD" );
+ }
+ // <--
+
+ return bResult;
+}
+
+// --> OD 2008-02-25 #refactorlists#
+SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStartValue() const
+//SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStart() const
+{
+ SwNumberTree::tSwNumTreeNumber aResult = 1;
+
+ if ( IsRestart() && GetTxtNode() )
+ {
+ aResult = GetTxtNode()->GetActualListStartValue();
+ }
+ else
+ {
+ SwNumRule * pRule = GetNumRule();
+
+ if (pRule)
+ {
+ int nLevel = GetParent() ? GetLevelInListTree() : 0;
+
+ if (nLevel >= 0 && nLevel < MAXLEVEL)
+ {
+ const SwNumFmt * pFmt = pRule->GetNumFmt( static_cast<USHORT>(nLevel));
+
+ if (pFmt)
+ aResult = pFmt->GetStart();
+ }
+ }
+ }
+
+ return aResult;
+}
+
+//String SwNodeNum::ToString() const
+//{
+// String aResult("[ ", RTL_TEXTENCODING_ASCII_US);
+
+// if (GetTxtNode())
+// {
+// char aBuffer[256];
+
+// sprintf(aBuffer, "%p ", GetTxtNode());
+
+// aResult += String(aBuffer, RTL_TEXTENCODING_ASCII_US);
+// aResult += String::CreateFromInt32(GetPosition().nNode.GetIndex());
+// }
+// else
+// aResult += String("*", RTL_TEXTENCODING_ASCII_US);
+
+// aResult += String(" ", RTL_TEXTENCODING_ASCII_US);
+
+// unsigned int nLvl = GetLevel();
+// aResult += String::CreateFromInt32(nLvl);
+
+// aResult += String(": ", RTL_TEXTENCODING_ASCII_US);
+
+// tNumberVector aNumVector;
+
+// _GetNumberVector(aNumVector, false);
+
+// for (unsigned int n = 0; n < aNumVector.size(); n++)
+// {
+// if (n > 0)
+// aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
+
+// aResult += String::CreateFromInt32(aNumVector[n]);
+// }
+
+// if (IsCounted())
+//// aResult += String(" counted", RTL_TEXTENCODING_ASCII_US);
+// aResult += String(" C", RTL_TEXTENCODING_ASCII_US);
+
+// if (IsRestart())
+// {
+//// aResult += String(" restart(", RTL_TEXTENCODING_ASCII_US);
+// aResult += String(" R(", RTL_TEXTENCODING_ASCII_US);
+// aResult += String::CreateFromInt32(GetStart());
+// aResult += String(")", RTL_TEXTENCODING_ASCII_US);
+// }
+
+// if (! IsValid())
+//// aResult += String(" invalid", RTL_TEXTENCODING_ASCII_US);
+// aResult += String(" I", RTL_TEXTENCODING_ASCII_US);
+
+// aResult += String(" ]", RTL_TEXTENCODING_ASCII_US);
+
+// return aResult;
+//}
+
+// --> OD 2006-03-07 #131436#
+void SwNodeNum::HandleNumberTreeRootNodeDelete( SwNodeNum& rNodeNum )
+{
+ SwNodeNum* pRootNode = rNodeNum.GetParent()
+ ? dynamic_cast<SwNodeNum*>(rNodeNum.GetRoot())
+ : &rNodeNum;
+ if ( !pRootNode )
+ {
+ // no root node -> nothing do.
+ return;
+ }
+
+ // unregister all number tree node entries, which correspond to a text node,
+ // about the deletion of the number tree root node.
+ _UnregisterMeAndChildrenDueToRootDelete( *pRootNode );
+}
+
+void SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum )
+{
+ const bool bIsPhantom( rNodeNum.IsPhantom() );
+ tSwNumberTreeChildren::size_type nAllowedChildCount( 0 );
+ bool bDone( false );
+ while ( !bDone &&
+ rNodeNum.GetChildCount() > nAllowedChildCount )
+ {
+ SwNodeNum* pChildNode( dynamic_cast<SwNodeNum*>((*rNodeNum.mChildren.begin())) );
+ if ( !pChildNode )
+ {
+ ASSERT( false,
+ "<SwNodeNum::_UnregisterMeAndChildrenDueToRootDelete(..)> - unknown number tree node child" );
+ ++nAllowedChildCount;
+ continue;
+ }
+
+ // Unregistering the last child of a phantom will destroy the phantom.
+ // Thus <rNodeNum> will be destroyed and access on <rNodeNum> has to
+ // be suppressed.
+ if ( bIsPhantom && rNodeNum.GetChildCount() == 1 )
+ {
+ bDone = true;
+ }
+
+ _UnregisterMeAndChildrenDueToRootDelete( *pChildNode );
+ }
+
+ if ( !bIsPhantom )
+ {
+ SwTxtNode* pTxtNode( rNodeNum.GetTxtNode() );
+ if ( pTxtNode )
+ {
+ // --> OD 2008-03-13 #refactorlists#
+ pTxtNode->RemoveFromList();
+ }
+ }
+}
+// <--
+
+// --> OD 2007-09-06 #i81002#
+const SwNodeNum* SwNodeNum::GetPrecedingNodeNumOf( const SwTxtNode& rTxtNode ) const
+{
+ const SwNodeNum* pPrecedingNodeNum( 0 );
+
+ // --> OD 2007-10-31 #i83479#
+// SwNodeNum aNodeNumForTxtNode;
+// aNodeNumForTxtNode.SetTxtNode( const_cast<SwTxtNode*>(&rTxtNode) );
+ SwNodeNum aNodeNumForTxtNode( const_cast<SwTxtNode*>(&rTxtNode) );
+ // <--
+
+ pPrecedingNodeNum = dynamic_cast<const SwNodeNum*>(
+ GetRoot()
+ ? GetRoot()->GetPrecedingNodeOf( aNodeNumForTxtNode )
+ : GetPrecedingNodeOf( aNodeNumForTxtNode ) );
+
+ return pPrecedingNodeNum;
+}
+// <--
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
new file mode 100644
index 000000000000..0c6106461f49
--- /dev/null
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -0,0 +1,1425 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SwNumberTree.cxx,v $
+ * $Revision: 1.19 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include <algorithm>
+#include <functional>
+#include <errhdl.hxx>
+#include <SwNumberTree.hxx>
+
+using std::vector;
+using std::find;
+
+#ifndef PRODUCT
+unsigned long SwNumberTreeNode::nInstances = 0;
+#endif
+
+SwNumberTreeNode::SwNumberTreeNode()
+ : mChildren(),
+ mpParent( 0 ),
+ mnNumber( 0 ),
+ // --> OD 2008-11-26 #158694#
+ mbContinueingPreviousSubTree( false ),
+ // <--
+ mbPhantom( false ),
+ mItLastValid()
+{
+ mItLastValid = mChildren.end();
+
+#ifndef PRODUCT
+ mnSerial = nInstances;
+ nInstances++;
+#endif
+}
+
+SwNumberTreeNode::~SwNumberTreeNode()
+{
+ if (GetChildCount() > 0)
+ {
+ if (HasOnlyPhantoms())
+ {
+ delete *mChildren.begin();
+
+ mChildren.clear();
+ mItLastValid = mChildren.end();
+ }
+ else
+ {
+ ASSERT(false, "lost children!");
+ }
+ }
+
+ ASSERT( IsPhantom() || mpParent == NULL, ": I'm not supposed to have a parent.");
+
+#ifndef PRODUCT
+ nInstances--;
+#endif
+
+ mpParent = (SwNumberTreeNode *) 0xdeadbeef;
+
+ ASSERT(mChildren.empty(), "children left!");
+}
+
+SwNumberTreeNode * SwNumberTreeNode::CreatePhantom()
+{
+ SwNumberTreeNode * pNew = NULL;
+
+ if (! mChildren.empty() &&
+ (*mChildren.begin())->IsPhantom())
+ {
+ ASSERT(false, "phantom already present");
+ }
+ else
+ {
+ pNew = Create();
+ pNew->SetPhantom(true);
+ pNew->mpParent = this;
+
+ std::pair<tSwNumberTreeChildren::iterator, bool> aInsert =
+ mChildren.insert(pNew);
+
+ if (! aInsert.second)
+ {
+ ASSERT(false, "insert of phantom failed!");
+
+ delete pNew;
+ pNew = NULL;
+ }
+ }
+
+ return pNew;
+}
+
+SwNumberTreeNode * SwNumberTreeNode::GetRoot() const
+{
+ SwNumberTreeNode * pResult = mpParent;
+
+ if (pResult)
+ while (pResult->mpParent)
+ pResult = pResult->mpParent;
+
+ return pResult;
+}
+
+SwNumberTreeNode * SwNumberTreeNode::GetFirstChild() const
+{
+ SwNumberTreeNode * pResult = 0;
+
+ tSwNumberTreeChildren::iterator aIt = mChildren.begin();
+
+ if (aIt != mChildren.end() )
+ pResult = *aIt;
+
+ return pResult;
+}
+
+
+void SwNumberTreeNode::ClearObsoletePhantoms()
+{
+ tSwNumberTreeChildren::iterator aIt = mChildren.begin();
+
+ if (aIt != mChildren.end() && (*aIt)->IsPhantom())
+ {
+ (*aIt)->ClearObsoletePhantoms();
+
+ if ((*aIt)->mChildren.empty())
+ {
+ // --> OD 2006-01-17 #i60652#
+ // Because <mChildren.erase(aIt)> could destroy the element, which
+ // is referenced by <mItLastValid>, it's needed to adjust
+ // <mItLastValid> before erasing <aIt>.
+ SetLastValid(mChildren.end());
+ // <--
+
+ delete *aIt;
+ mChildren.erase(aIt);
+ }
+ }
+}
+
+void SwNumberTreeNode::ValidateHierarchical(const SwNumberTreeNode * pNode) const
+{
+ tSwNumberTreeChildren::iterator aValidateIt =
+ GetIterator(pNode);
+
+ if (aValidateIt != mChildren.end())
+ {
+ ASSERT((*aValidateIt)->mpParent == this, "wrong parent");
+
+ tSwNumberTreeChildren::iterator aIt = mItLastValid;
+
+ // --> OD 2005-10-19 #126009#
+ // improvement:
+ // - Only one time checked for <mChildren.end()>.
+ // - Less checks for each loop run.
+ // correction:
+ // - consider case that current node isn't counted and isn't the first
+ // child of its parent. In this case the number of last counted child
+ // of the previous node determines the start value for the following
+ // children loop, if all children have to be validated and the first
+ // one doesn't restart the counting.
+// tSwNumTreeNumber nTmpNumber = 0;
+// if (aIt != mChildren.end())
+// nTmpNumber = (*aIt)->mnNumber;
+// while (aIt != aValidateIt)
+// {
+// if (aIt == mChildren.end())
+// aIt = mChildren.begin();
+// else
+// {
+// aIt++;
+// if ((*aIt)->IsCounted())
+// nTmpNumber++;
+// }
+// if ((*aIt)->IsRestart() || aIt == mChildren.begin())
+// nTmpNumber = (*aIt)->GetStart();
+// (*aIt)->mnNumber = nTmpNumber;
+// }
+ SwNumberTree::tSwNumTreeNumber nTmpNumber( 0 );
+ if (aIt != mChildren.end())
+ nTmpNumber = (*aIt)->mnNumber;
+ else
+ {
+ aIt = mChildren.begin();
+ // --> OD 2008-11-26 #158694#
+ (*aIt)->mbContinueingPreviousSubTree = false;
+ // <--
+
+ // determine default start value
+ // consider the case that the first child isn't counted.
+ nTmpNumber = (*aIt)->GetStartValue();
+ if ( !(*aIt)->IsCounted() &&
+ ( !(*aIt)->HasCountedChildren() || (*aIt)->IsPhantom() ) )
+ {
+ --nTmpNumber;
+ }
+
+ // determine special start value for the case that first child
+ // doesn't restart the numbering and the parent node isn't counted
+ // and isn't the first child.
+ // --> OD 2005-10-27 #126009#
+ const bool bParentCounted( IsCounted() &&
+ ( !IsPhantom() ||
+ HasPhantomCountedParent() ) );
+ // <--
+ if ( !(*aIt)->IsRestart() &&
+ GetParent() && !bParentCounted )
+ {
+ tSwNumberTreeChildren::iterator aParentChildIt =
+ GetParent()->GetIterator( this );
+ while ( aParentChildIt != GetParent()->mChildren.begin() )
+ {
+ --aParentChildIt;
+ SwNumberTreeNode* pPrevNode( *aParentChildIt );
+ if ( pPrevNode->GetChildCount() > 0 )
+ {
+ // --> OD 2008-11-26 #158694#
+ (*aIt)->mbContinueingPreviousSubTree = true;
+ // <--
+ nTmpNumber = (*(pPrevNode->mChildren.rbegin()))->GetNumber();
+ // --> OD 2005-10-27 #126009#
+ if ( (*aIt)->IsCounted() &&
+ ( !(*aIt)->IsPhantom() ||
+ (*aIt)->HasPhantomCountedParent() ) )
+ // <--
+ {
+ ++nTmpNumber;
+ }
+ break;
+ }
+ else if ( pPrevNode->IsCounted() )
+ {
+ break;
+ }
+ else
+ {
+ // Previous node has no children and is not counted.
+ // Thus, next turn and check for the previous node.
+ }
+ }
+ }
+
+ (*aIt)->mnNumber = nTmpNumber;
+ }
+
+ while (aIt != aValidateIt)
+ {
+ ++aIt;
+ // --> OD 2008-11-26 #158694#
+ (*aIt)->mbContinueingPreviousSubTree = false;
+ // <--
+
+ // --> OD 2005-10-19 #126009# - only for counted nodes the number
+ // has to be adjusted, compared to the previous node.
+ // this condition is hold also for nodes, which restart the numbering.
+ if ( (*aIt)->IsCounted() )
+ {
+ if ((*aIt)->IsRestart())
+ nTmpNumber = (*aIt)->GetStartValue();
+ else
+ ++nTmpNumber;
+ }
+ // <--
+
+ (*aIt)->mnNumber = nTmpNumber;
+ }
+ // <--
+
+ SetLastValid(aIt, true);
+ }
+}
+
+void SwNumberTreeNode::ValidateContinuous(const SwNumberTreeNode * pNode) const
+{
+ tSwNumberTreeChildren::iterator aIt = mItLastValid;
+
+ SwNumberTree::tSwNumTreeNumber nTmpNumber = 0;
+
+ do
+ {
+ if (aIt == mChildren.end())
+ {
+ aIt = mChildren.begin();
+
+ nTmpNumber = GetStartValue();
+ }
+ else
+ aIt++;
+
+ if (aIt != mChildren.end())
+ {
+ SwNumberTreeNode * pPred = (*aIt)->GetPred();
+
+ // --> OD 2006-04-21 #i64311#
+ // correct consideration of phantoms
+ // correct consideration of restart at a number tree node
+ if ( pPred )
+ {
+ if ( !(*aIt)->IsCounted() )
+ // --> OD 2006-05-12 #i65284#
+ nTmpNumber = pPred->GetNumber( pPred->GetParent() != (*aIt)->GetParent() );
+ // <--
+ else
+ {
+ if ( (*aIt)->IsRestart() )
+ nTmpNumber = (*aIt)->GetStartValue();
+ else
+ nTmpNumber = pPred->GetNumber( pPred->GetParent() != (*aIt)->GetParent() ) + 1;
+ }
+ }
+ else
+ {
+ if ( !(*aIt)->IsCounted() )
+ nTmpNumber = GetStartValue() - 1;
+ else
+ {
+ if ( (*aIt)->IsRestart() )
+ nTmpNumber = (*aIt)->GetStartValue();
+ else
+ nTmpNumber = GetStartValue();
+ }
+ }
+ // <--
+
+ (*aIt)->mnNumber = nTmpNumber;
+ }
+ }
+ while (aIt != mChildren.end() && *aIt != pNode);
+
+ // --> OD 2008-05-21 #i74748# - applied patch from garnier_romain
+ // number tree node has to be validated.
+// SetLastValid(aIt);
+ SetLastValid( aIt, true );
+ // <--
+}
+
+void SwNumberTreeNode::Validate(const SwNumberTreeNode * pNode) const
+{
+ if (! IsValid(pNode))
+ {
+ if (IsContinuous())
+ ValidateContinuous(pNode);
+ else
+ ValidateHierarchical(pNode);
+ }
+}
+
+void SwNumberTreeNode::ValidateTree()
+{
+ if (! IsContinuous())
+ {
+ {
+ tSwNumberTreeChildren::reverse_iterator aIt = mChildren.rbegin();
+
+ if (aIt != mChildren.rend())
+ Validate(*aIt);
+ }
+ {
+ tSwNumberTreeChildren::iterator aIt;
+
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ (*aIt)->ValidateTree();
+ }
+ }
+ else
+ {
+ SwNumberTreeNode * pNode = GetLastDescendant();
+
+ if (pNode && pNode->mpParent)
+ pNode->mpParent->Validate(pNode);
+ }
+}
+
+void SwNumberTreeNode::_GetNumberVector(vector<SwNumberTree::tSwNumTreeNumber> & rVector,
+ bool bValidate) const
+{
+ if (mpParent)
+ {
+ mpParent->_GetNumberVector(rVector, bValidate);
+ rVector.push_back(GetNumber(bValidate));
+ }
+}
+
+SwNumberTreeNode * SwNumberTreeNode::GetFirstNonPhantomChild()
+{
+ if (IsPhantom())
+ return (*mChildren.begin())->GetFirstNonPhantomChild();
+
+ return this;
+}
+
+/** Moves all children of this node that are greater than a given node
+ to the destination node.
+
+ OD 2005-10-14 #125991#
+*/
+void SwNumberTreeNode::MoveGreaterChildren( SwNumberTreeNode& _rCompareNode,
+ SwNumberTreeNode& _rDestNode )
+{
+ if ( mChildren.size() == 0 )
+ return;
+
+ // determine first child, which has to move to <_rDestNode>
+ tSwNumberTreeChildren::iterator aItUpper( mChildren.end() );
+ if ((*mChildren.begin())->IsPhantom() &&
+ _rCompareNode.LessThan(*(*mChildren.begin())->GetFirstNonPhantomChild()))
+ {
+ aItUpper = mChildren.begin();
+ }
+ else
+ {
+ aItUpper = mChildren.upper_bound(&_rCompareNode);
+ }
+
+ // move children
+ if (aItUpper != mChildren.end())
+ {
+ tSwNumberTreeChildren::iterator aIt;
+ for (aIt = aItUpper; aIt != mChildren.end(); aIt++)
+ (*aIt)->mpParent = &_rDestNode;
+
+ _rDestNode.mChildren.insert(aItUpper, mChildren.end());
+
+ // --> OD 2006-01-17 #i60652#
+ // Because <mChildren.erase(aItUpper, mChildren.end())> could destroy
+ // the element, which is referenced by <mItLastValid>, it's needed to
+ // adjust <mItLastValid> before erasing <aIt>.
+ SetLastValid( mChildren.end() );
+ // <--
+
+ mChildren.erase(aItUpper, mChildren.end());
+
+ // --> OD 2006-01-17 #i60652#
+ if ( !mChildren.empty() )
+ {
+ SetLastValid( --(mChildren.end()) );
+ }
+ // <--
+ }
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ if (! IsSane(false) || ! IsSane(&_rDestNode))
+ clog << __FUNCTION__ << "insanity!" << endl;
+#endif
+}
+
+void SwNumberTreeNode::MoveChildren(SwNumberTreeNode * pDest)
+{
+ if (! mChildren.empty())
+ {
+ tSwNumberTreeChildren::iterator aItBegin = mChildren.begin();
+ SwNumberTreeNode * pMyFirst = *mChildren.begin();
+
+ // --> OD 2006-01-17 #i60652#
+ // Because <mChildren.erase(aItBegin)> could destroy the element,
+ // which is referenced by <mItLastValid>, it's needed to adjust
+ // <mItLastValid> before erasing <aItBegin>.
+ SetLastValid(mChildren.end());
+ // <--
+
+ if (pMyFirst->IsPhantom())
+ {
+ SwNumberTreeNode * pDestLast = NULL;
+
+ if (pDest->mChildren.empty())
+ pDestLast = pDest->CreatePhantom();
+ else
+ pDestLast = *pDest->mChildren.rbegin();
+
+ pMyFirst->MoveChildren(pDestLast);
+
+ delete pMyFirst;
+ mChildren.erase(aItBegin);
+
+ aItBegin = mChildren.begin();
+ }
+
+ tSwNumberTreeChildren::iterator aIt;
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ (*aIt)->mpParent = pDest;
+
+ pDest->mChildren.insert(mChildren.begin(), mChildren.end());
+ mChildren.clear();
+ // --> OD 2006-03-08 #131436#
+ // <stl::set.clear()> destroys all existing iterators.
+ // Thus, <mItLastValid> is also destroyed and reset becomes necessary
+ mItLastValid = mChildren.end();
+ // <--
+ }
+
+ ASSERT (mChildren.empty(), "MoveChildren failed!");
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ ASSERT(IsSane(false) && pDest->IsSane(false), "insanity!");
+#endif
+}
+
+void SwNumberTreeNode::AddChild( SwNumberTreeNode * pChild,
+ const int nDepth )
+{
+ /*
+ Algorithm:
+
+ Search first child A that is greater than pChild,
+ A may be the end of childs.
+ If nDepth > 0 then
+ {
+ if A is first child then
+ create new phantom child B at beginning of child list
+ else
+ B is A
+
+ Add child to B with depth nDepth - 1.
+ }
+ else
+ {
+ Insert pNode before A.
+
+ if A has predecessor B then
+ remove children of B that are greater as A and insert them as
+ children of A.
+ }
+
+*/
+
+ // --> OD 2008-03-13 #refactorlists#
+ if ( nDepth < 0 )
+ {
+ ASSERT( false,
+ "<SwNumberTreeNode::AddChild(..)> - parameter <nDepth> out of valid range. Serious defect -> please inform OD." );
+ return;
+ }
+ // <--
+
+ if ( pChild->GetParent() != NULL || pChild->GetChildCount() > 0 )
+ {
+ ASSERT(false, "only orphans allowed.");
+ return;
+ }
+
+ if (nDepth > 0)
+ {
+ tSwNumberTreeChildren::iterator aInsertDeepIt =
+ mChildren.upper_bound(pChild);
+
+ ASSERT(! (aInsertDeepIt != mChildren.end() &&
+ (*aInsertDeepIt)->IsPhantom()), " unexspected phantom");
+
+
+ if (aInsertDeepIt == mChildren.begin())
+ {
+ SwNumberTreeNode * pNew = CreatePhantom();
+
+ SetLastValid(mChildren.end());
+
+ if (pNew)
+ pNew->AddChild(pChild, nDepth - 1);
+ }
+ else
+ {
+ aInsertDeepIt--;
+ (*aInsertDeepIt)->AddChild(pChild, nDepth - 1);
+ }
+
+ }
+ else
+ {
+ // --> OD 2008-02-19 #refactorlists#
+ pChild->PreAdd();
+ // <--
+ std::pair<tSwNumberTreeChildren::iterator, bool> aResult =
+ mChildren.insert(pChild);
+
+ if (aResult.second)
+ {
+ pChild->mpParent = this;
+ bool bNotification = pChild->IsNotificationEnabled();
+ tSwNumberTreeChildren::iterator aInsertedIt = aResult.first;
+
+ if (aInsertedIt != mChildren.begin())
+ {
+ tSwNumberTreeChildren::iterator aPredIt = aInsertedIt;
+ aPredIt--;
+
+ // --> OD 2005-10-14 #125991#
+ // Move greater children of previous node to new child.
+ // This has to be done recursively on the children levels.
+ // Initialize loop variables <pPrevChildNode> and <pDestNode>
+ // for loop on children levels.
+ SwNumberTreeNode* pPrevChildNode( *aPredIt );
+ SwNumberTreeNode* pDestNode( pChild );
+ while ( pDestNode && pPrevChildNode &&
+ pPrevChildNode->GetChildCount() > 0 )
+ {
+ // move children
+ pPrevChildNode->MoveGreaterChildren( *pChild, *pDestNode );
+
+ // prepare next loop:
+ // - search of last child of <pPrevChildNode
+ // - If found, determine destination node
+ if ( pPrevChildNode->GetChildCount() > 0 )
+ {
+ tSwNumberTreeChildren::reverse_iterator aIt =
+ pPrevChildNode->mChildren.rbegin();
+ pPrevChildNode = *aIt;
+ // determine new destination node
+ if ( pDestNode->GetChildCount() > 0 )
+ {
+ pDestNode = *(pDestNode->mChildren.begin());
+ if ( !pDestNode->IsPhantom() )
+ {
+ pDestNode = pDestNode->mpParent->CreatePhantom();
+ }
+ }
+ else
+ {
+ pDestNode = pDestNode->CreatePhantom();
+ }
+ }
+ else
+ {
+ // ready -> break loop.
+ break;
+ }
+ }
+ // assure that unnessary created phantoms at <pChild> are deleted.
+ pChild->ClearObsoletePhantoms();
+ // <--
+
+ if ((*aPredIt)->IsValid())
+ SetLastValid(aPredIt);
+ }
+ else
+ SetLastValid(mChildren.end());
+
+ ClearObsoletePhantoms();
+
+ if( bNotification )
+ {
+ // --> OD 2005-10-20 #126009# - invalidation of not counted parent
+ // and notification of its siblings.
+ if ( !IsCounted() )
+ {
+ InvalidateMe();
+ NotifyInvalidSiblings();
+ }
+ // <--
+ NotifyInvalidChildren();
+ }
+ }
+ }
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ if (! IsSane(false))
+ clog << __FUNCTION__ << ": insanity!" << endl;
+#endif
+}
+
+void SwNumberTreeNode::RemoveChild(SwNumberTreeNode * pChild)
+{
+ /*
+ Algorithm:
+
+ if pChild has predecessor A then
+ B is A
+ else
+ create phantom child B at beginning of child list
+
+ Move children of pChild to B.
+ */
+
+ if (pChild->IsPhantom())
+ {
+ ASSERT(false, "not applicable to phantoms!");
+
+ return;
+ }
+
+ tSwNumberTreeChildren::iterator aRemoveIt = GetIterator(pChild);
+
+ if (aRemoveIt != mChildren.end())
+ {
+ SwNumberTreeNode * pRemove = *aRemoveIt;
+
+ pRemove->mpParent = NULL;
+
+ tSwNumberTreeChildren::iterator aItPred = mChildren.end();
+
+ if (aRemoveIt == mChildren.begin())
+ {
+ if (! pRemove->mChildren.empty())
+ {
+ CreatePhantom();
+
+ aItPred = mChildren.begin();
+ }
+ }
+ else
+ {
+ aItPred = aRemoveIt;
+
+ aItPred--;
+ }
+
+ if (! pRemove->mChildren.empty())
+ {
+ pRemove->MoveChildren(*aItPred);
+ // --> OD 2008-04-04 #refactorlists#
+ (*aItPred)->InvalidateTree();
+ (*aItPred)->NotifyInvalidChildren();
+ // <--
+ }
+
+ // --> OD 2006-01-17 #i60652#
+ // Because <mChildren.erase(aRemoveIt)> could destroy the element,
+ // which is referenced by <mItLastValid>, it's needed to adjust
+ // <mItLastValid> before erasing <aRemoveIt>.
+ if (aItPred != mChildren.end() && (*aItPred)->IsPhantom())
+ SetLastValid(mChildren.end());
+ else
+ SetLastValid(aItPred);
+ // <--
+
+ mChildren.erase(aRemoveIt);
+
+ // --> OD 2008-04-04 #refactorlists#
+// if (aItPred != mChildren.end())
+// NotifyInvalidChildren();
+ NotifyInvalidChildren();
+ // <--
+ }
+ else
+ {
+ ASSERT(false, "RemoveChild: failed!");
+ }
+
+ // --> OD 2008-02-19 #refactorlists#
+ pChild->PostRemove();
+ // <--
+}
+
+void SwNumberTreeNode::RemoveMe()
+{
+ if (mpParent)
+ {
+ SwNumberTreeNode * pSavedParent = mpParent;
+
+ pSavedParent->RemoveChild(this);
+
+ while (pSavedParent && pSavedParent->IsPhantom() &&
+ pSavedParent->HasOnlyPhantoms())
+ pSavedParent = pSavedParent->GetParent();
+
+ if (pSavedParent)
+ pSavedParent->ClearObsoletePhantoms();
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ if (! IsSane(false))
+ clog << __FUNCTION__ << ": insanity!" << endl;
+#endif
+ }
+}
+
+bool SwNumberTreeNode::IsValid() const
+{
+ return mpParent ? mpParent->IsValid(this) : false;
+}
+
+SwNumberTree::tSwNumTreeNumber SwNumberTreeNode::GetNumber(bool bValidate)
+ const
+{
+ if (bValidate && mpParent)
+ mpParent->Validate(this);
+
+ return mnNumber;
+}
+
+// --> OD 2008-11-26 #158694#
+bool SwNumberTreeNode::IsContinueingPreviousSubTree() const
+{
+ return mbContinueingPreviousSubTree;
+}
+// <--
+
+
+vector<SwNumberTree::tSwNumTreeNumber> SwNumberTreeNode::GetNumberVector() const
+{
+ vector<SwNumberTree::tSwNumTreeNumber> aResult;
+
+ _GetNumberVector(aResult);
+
+ return aResult;
+}
+
+bool SwNumberTreeNode::IsValid(const SwNumberTreeNode * pChild) const
+{
+ bool bResult = false;
+
+ if (mItLastValid != mChildren.end())
+ {
+ if (pChild && pChild->mpParent == this)
+ {
+ bResult = ! (*mItLastValid)->LessThan(*pChild);
+ }
+ }
+
+ return bResult;
+}
+
+bool SwNumberTreeNode::IsPhantom() const
+{
+ return mbPhantom;
+}
+
+void SwNumberTreeNode::SetPhantom(bool _bPhantom)
+{
+ mbPhantom = _bPhantom;
+}
+
+bool SwNumberTreeNode::HasOnlyPhantoms() const
+{
+ bool bResult = false;
+
+ if (GetChildCount() == 1)
+ {
+ tSwNumberTreeChildren::const_iterator aIt = mChildren.begin();
+
+ bResult = (*aIt)->IsPhantom() && (*aIt)->HasOnlyPhantoms();
+ }
+ else if (GetChildCount() == 0)
+ bResult = true;
+
+ return bResult;
+}
+
+bool SwNumberTreeNode::IsCounted() const
+{
+ return !IsPhantom() ||
+ ( IsCountPhantoms() && HasCountedChildren() );
+}
+
+// --> OD 2005-10-27 #126009#
+bool SwNumberTreeNode::HasPhantomCountedParent() const
+{
+ bool bRet( false );
+
+ ASSERT( IsPhantom(),
+ "<SwNumberTreeNode::HasPhantomCountedParent()> - wrong usage of method - it's only for phantoms" );
+ if ( IsPhantom() && mpParent )
+ {
+ if ( mpParent == GetRoot() )
+ {
+ bRet = true;
+ }
+ else if ( !mpParent->IsPhantom() )
+ {
+ bRet = mpParent->IsCounted();
+ }
+ else
+ {
+ bRet = mpParent->IsCounted() && mpParent->HasPhantomCountedParent();
+ }
+ }
+
+ return bRet;
+}
+// <--
+
+bool SwNumberTreeNode::IsFirst(const SwNumberTreeNode * pNode) const
+{
+ tSwNumberTreeChildren::iterator aIt = mChildren.begin();
+
+ if ((*aIt)->IsPhantom())
+ aIt++;
+
+ return *aIt == pNode;
+}
+
+bool SwNumberTreeNode::IsFirst() const
+{
+ bool bResult = true;
+
+ if (GetParent())
+ {
+ if (GetParent()->IsFirst(this))
+ {
+ SwNumberTreeNode * pNode = GetParent();
+
+ while (pNode)
+ {
+ if (!pNode->IsPhantom() && pNode->GetParent())
+ {
+ bResult = false;
+ break;
+ }
+
+ pNode = pNode->GetParent();
+ }
+
+ // --> OD 2007-10-02 #b6600435#
+ // If node isn't the first child, it is the second child and the
+ // first child is a phanton. In this case check, if the first phantom
+ // child have only phanton childs
+ if ( bResult &&
+ this != *(GetParent()->mChildren.begin()) &&
+ !(*(GetParent()->mChildren.begin()))->HasOnlyPhantoms() )
+ {
+ bResult = false;
+ }
+ // <--
+ }
+ else
+ bResult = false;
+ }
+
+ return bResult;
+}
+
+// --> OD 2008-03-13 #refactorlists#
+void SwNumberTreeNode::SetLevelInListTree( const int nLevel )
+{
+ if ( nLevel < 0 )
+ {
+ ASSERT( false,
+ "<SwNumberTreeNode::SetLevelInListTree(..)> - parameter <nLevel> out of valid range. Serious defect -> please inform OD." );
+ return;
+ }
+
+ ASSERT( GetParent(),
+ "<SwNumberTreeNode::SetLevelInListTree(..)> - can only be called for number tree nodes in a list tree" );
+ if ( GetParent() )
+ {
+ if ( nLevel != GetLevelInListTree() )
+ {
+ SwNumberTreeNode* pRootTreeNode = GetRoot();
+ ASSERT( pRootTreeNode,
+ "<SwNumberTreeNode::SetLevelInListTree(..)> - no root tree node found. Serious defect -> please inform OD." );
+
+ RemoveMe();
+ pRootTreeNode->AddChild( this, nLevel );
+ }
+ }
+}
+// <--
+
+int SwNumberTreeNode::GetLevelInListTree() const
+{
+ if (mpParent)
+ return mpParent->GetLevelInListTree() + 1;
+
+ return -1;
+}
+
+SwNumberTreeNode::tSwNumberTreeChildren::size_type
+SwNumberTreeNode::GetChildCount() const
+{
+ return mChildren.size();
+}
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+bool SwNumberTreeNode::IsSane(bool bRecursive) const
+{
+ vector<const SwNumberTreeNode*> aParents;
+
+ return IsSane(bRecursive, aParents);
+}
+
+bool SwNumberTreeNode::IsSane(bool bRecursive,
+ vector<const SwNumberTreeNode *> rParents)
+ const
+{
+ bool bResult = true;
+
+ tSwNumberTreeChildren::const_iterator aIt;
+
+ if (find(rParents.begin(), rParents.end(), this) != rParents.end())
+ {
+ ASSERT(false, " I'm my own ancestor!");
+
+ bResult = false;
+ }
+
+ if (! rParents.empty() && rParents.back() != mpParent)
+ {
+ ASSERT(false, " I'm a bastard!");
+
+ bResult = false;
+ }
+
+ rParents.push_back(this);
+
+ bool bFirst = true;
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ {
+ if (*aIt)
+ {
+ if ((*aIt)->IsPhantom())
+ {
+ if ((*aIt)->HasOnlyPhantoms())
+ {
+ bResult = false;
+ }
+
+ if (! bFirst)
+ {
+ ASSERT(false, " found phantom not at first position.");
+
+ bResult = false;
+ }
+ }
+
+ if ((*aIt)->mpParent != (SwNumberTreeNode *) this)
+ {
+ ASSERT(false, "found a bastard");
+
+ bResult = false;
+ }
+
+ if (mpParent)
+ {
+ if (!(*aIt)->IsPhantom() && (*aIt)->LessThan(*this))
+ {
+ ASSERT(false, " found child less than me");
+
+ bResult = false;
+ }
+ }
+ }
+ else
+ {
+ ASSERT(false, "found child that is NULL");
+ bResult = false;
+ }
+
+ if (bRecursive)
+ bResult = (*aIt)->IsSane(bRecursive, rParents) && bResult;
+ }
+
+ rParents.pop_back();
+
+ return bResult;
+}
+#endif // __SW_NUMBER_TREE_SANITY_CHECK
+
+SwNumberTreeNode::tSwNumberTreeChildren::iterator
+SwNumberTreeNode::GetIterator(const SwNumberTreeNode * pChild) const
+{
+ tSwNumberTreeChildren::iterator aItResult =
+ mChildren.find(const_cast<SwNumberTreeNode *>(pChild));
+
+ ASSERT( aItResult != mChildren.end(),
+ "something went wrong getting the iterator for a child");
+
+ return aItResult;
+}
+
+//String SwNumberTreeNode::print(const String & rIndent,
+// const String & rMyIndent,
+// int nDepth) const
+//{
+// String aStr = rIndent;
+// aStr += ToString();
+// aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
+
+// if (nDepth != 0)
+// {
+// if (nDepth < 0)
+// nDepth = -1;
+
+// tSwNumberTreeChildren::const_iterator aIt;
+// for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+// {
+// String aTmpStr(rIndent);
+
+// aTmpStr += rMyIndent;
+// aStr += (*aIt)->print(aTmpStr, rMyIndent, nDepth - 1);
+// }
+// }
+
+// return aStr;
+//}
+
+#ifndef PRODUCT
+unsigned long SwNumberTreeNode::GetInstances()
+{
+ return nInstances;
+}
+
+unsigned long SwNumberTreeNode::GetSerial()
+{
+ return mnSerial;
+}
+#endif
+
+bool SwNumberTreeNodeLessThan(const SwNumberTreeNode * pA,
+ const SwNumberTreeNode * pB)
+{
+ bool bResult = false;
+
+ if (pA == NULL && pB != NULL)
+ bResult = true;
+ else if (pA != NULL && pB != NULL)
+ bResult = pA->LessThan(*pB);
+
+ return bResult;
+}
+
+SwNumberTreeNode * SwNumberTreeNode::GetLastDescendant() const
+{
+ SwNumberTreeNode * pResult = NULL;
+ tSwNumberTreeChildren::reverse_iterator aIt = mChildren.rbegin();
+
+ if (aIt != mChildren.rend())
+ {
+ pResult = (*aIt)->GetLastDescendant();
+
+ if (! pResult)
+ pResult = *aIt;
+ }
+
+ return pResult;
+}
+
+bool SwNumberTreeNode::LessThan(const SwNumberTreeNode & rTreeNode) const
+{
+ return this < &rTreeNode;
+}
+
+SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
+{
+ SwNumberTreeNode * pResult = NULL;
+
+ if (mpParent)
+ {
+ tSwNumberTreeChildren::iterator aIt =
+ mpParent->GetIterator(this);
+
+ if ( aIt == mpParent->mChildren.begin() )
+ {
+ // --> OD 2006-04-24 #i64311#
+ // root node is no valid predecessor
+ pResult = mpParent->GetParent() ? mpParent : NULL;
+ // <--
+ }
+ else
+ {
+ aIt--;
+
+ if ( !bSibling )
+ pResult = (*aIt)->GetLastDescendant();
+ else
+ pResult = (*aIt);
+
+ if (! pResult)
+ pResult = (*aIt);
+ }
+ }
+
+ return pResult;
+}
+
+void SwNumberTreeNode::SetLastValid
+ ( SwNumberTreeNode::tSwNumberTreeChildren::iterator aItValid,
+ bool bValidating ) const
+{
+ ASSERT( (aItValid == mChildren.end() || GetIterator(*aItValid) != mChildren.end()),
+ "last-valid iterator");
+
+ if (
+ bValidating ||
+ aItValid == mChildren.end() ||
+ (mItLastValid != mChildren.end() &&
+ (*aItValid)->LessThan(**mItLastValid))
+ )
+ {
+ mItLastValid = aItValid;
+ // --> OD 2005-10-19 #126009# - invalidation of children of next not
+ // counted is needed
+ if ( GetParent() )
+ {
+ tSwNumberTreeChildren::iterator aParentChildIt =
+ GetParent()->GetIterator( this );
+ ++aParentChildIt;
+ if ( aParentChildIt != GetParent()->mChildren.end() )
+ {
+ SwNumberTreeNode* pNextNode( *aParentChildIt );
+ if ( !pNextNode->IsCounted() )
+ {
+ pNextNode->InvalidateChildren();
+ }
+ }
+ }
+ // <--
+ }
+
+ {
+ if (IsContinuous())
+ {
+ tSwNumberTreeChildren::iterator aIt = mItLastValid;
+
+ if (aIt != mChildren.end())
+ aIt++;
+ else
+ aIt = mChildren.begin();
+
+ while (aIt != mChildren.end())
+ {
+ (*aIt)->InvalidateTree();
+
+ aIt++;
+ }
+
+ SetLastValid(bValidating);
+ }
+ }
+}
+
+void SwNumberTreeNode::SetLastValid(bool bValidating) const
+{
+ if (mpParent)
+ {
+ tSwNumberTreeChildren::iterator aIt = mpParent->GetIterator(this);
+
+ mpParent->SetLastValid(aIt, bValidating);
+ }
+}
+
+void SwNumberTreeNode::InvalidateTree() const
+{
+ // do not call SetInvalid, would cause loop !!!
+ mItLastValid = mChildren.end();
+
+ tSwNumberTreeChildren::iterator aIt;
+
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ (*aIt)->InvalidateTree();
+}
+
+void SwNumberTreeNode::Invalidate(SwNumberTreeNode * pChild)
+{
+ if (pChild->IsValid())
+ {
+ tSwNumberTreeChildren::iterator aIt = GetIterator(pChild);
+
+ if (aIt != mChildren.begin())
+ aIt--;
+ else
+ aIt = mChildren.end();
+
+ SetLastValid(aIt);
+
+ }
+}
+
+void SwNumberTreeNode::InvalidateMe()
+{
+ if (mpParent)
+ mpParent->Invalidate(this);
+}
+
+void SwNumberTreeNode::ValidateMe()
+{
+ if (mpParent)
+ mpParent->Validate(this);
+}
+
+void SwNumberTreeNode::Notify()
+{
+ if (IsNotifiable())
+ {
+ if (! IsPhantom())
+ NotifyNode();
+
+ tSwNumberTreeChildren::iterator aIt;
+
+ for (aIt = mChildren.begin(); aIt != mChildren.end(); aIt++)
+ (*aIt)->Notify();
+ }
+}
+
+void SwNumberTreeNode::NotifyInvalidChildren()
+{
+ if (IsNotifiable())
+ {
+ tSwNumberTreeChildren::iterator aIt = mItLastValid;
+
+ if (aIt == mChildren.end())
+ aIt = mChildren.begin();
+ else
+ aIt++;
+
+ while (aIt != mChildren.end())
+ {
+ (*aIt)->Notify();
+
+ aIt++;
+ }
+ // --> OD 2005-10-19 #126009# - notification of next not counted node
+ // is also needed.
+ if ( GetParent() )
+ {
+ tSwNumberTreeChildren::iterator aParentChildIt =
+ GetParent()->GetIterator( this );
+ ++aParentChildIt;
+ if ( aParentChildIt != GetParent()->mChildren.end() )
+ {
+ SwNumberTreeNode* pNextNode( *aParentChildIt );
+ if ( !pNextNode->IsCounted() )
+ {
+ pNextNode->NotifyInvalidChildren();
+ }
+ }
+ }
+
+ // <--
+ }
+
+ if (IsContinuous() && mpParent)
+ mpParent->NotifyInvalidChildren();
+}
+
+void SwNumberTreeNode::NotifyInvalidSiblings()
+{
+ if (mpParent != NULL)
+ mpParent->NotifyInvalidChildren();
+}
+
+// --> OD 2007-09-07 #i81002#
+const SwNumberTreeNode* SwNumberTreeNode::GetPrecedingNodeOf(
+ const SwNumberTreeNode& rNode ) const
+{
+ const SwNumberTreeNode* pPrecedingNode( 0 );
+
+ if ( GetChildCount() > 0 )
+ {
+ tSwNumberTreeChildren::const_iterator aUpperBoundIt =
+ mChildren.upper_bound( const_cast<SwNumberTreeNode*>(&rNode) );
+ if ( aUpperBoundIt != mChildren.begin() )
+ {
+ --aUpperBoundIt;
+ pPrecedingNode = (*aUpperBoundIt)->GetPrecedingNodeOf( rNode );
+ }
+ }
+
+ if ( pPrecedingNode == 0 && GetRoot() )
+ {
+ // <this> node has no children or the given node precedes all its children
+ // and the <this> node isn't the root node.
+ // Thus, compare the given node with the <this> node in order to check,
+ // if the <this> node precedes the given node.
+ if ( !(rNode.LessThan( *this )) )
+ {
+ pPrecedingNode = this;
+ }
+ }
+
+ return pPrecedingNode;
+}
+// <--
+
+// --> OD 2008-04-17 #refactorlists#
+void SwNumberTreeNode::NotifyNodesOnListLevel( const int nListLevel )
+{
+ if ( nListLevel < 0 )
+ {
+ ASSERT( false,
+ "<SwNumberTreeNode::NotifyNodesOnListLevel(..)> - invalid list level provided" );
+ return;
+ }
+
+ SwNumberTreeNode* pRootNode = GetParent() ? GetRoot() : this;
+
+ pRootNode->NotifyChildrenOnDepth( nListLevel );
+}
+
+void SwNumberTreeNode::NotifyChildrenOnDepth( const int nDepth )
+{
+ ASSERT( nDepth >= 0,
+ "<SwNumberTreeNode::NotifyChildrenOnDepth(..)> - misusage" );
+
+ SwNumberTreeNode::tSwNumberTreeChildren::iterator aChildIter =
+ mChildren.begin();
+ while ( aChildIter != mChildren.end() )
+ {
+ if ( nDepth == 0 )
+ {
+ (*aChildIter)->NotifyNode();
+ }
+ else
+ {
+ (*aChildIter)->NotifyChildrenOnDepth( nDepth - 1 );
+ }
+
+ ++aChildIter;
+ }
+}
+// <--
diff --git a/sw/source/core/SwNumberTree/makefile.mk b/sw/source/core/SwNumberTree/makefile.mk
new file mode 100644
index 000000000000..e929578e24b8
--- /dev/null
+++ b/sw/source/core/SwNumberTree/makefile.mk
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.5 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+PRJ=..$/..$/..
+
+PRJNAME=sw
+TARGET=SwNumberTree
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : $(PRJ)$/inc$/swpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/inc$/sw.mk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/SwNumberTree.obj \
+ $(SLO)$/SwNodeNum.obj
+
+EXCEPTIONSFILES = \
+ $(SLO)$/SwNumberTree.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
new file mode 100644
index 000000000000..1290ad3010f2
--- /dev/null
+++ b/sw/source/core/access/acccell.cxx
@@ -0,0 +1,378 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acccell.cxx,v $
+ * $Revision: 1.23 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vos/mutex.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <rtl/uuid.h>
+#include <vcl/svapp.hxx>
+#include <cellfrm.hxx>
+#include <tabfrm.hxx>
+#include <swtable.hxx>
+#include "crsrsh.hxx"
+#include "viscrs.hxx"
+#include <accfrmobjslist.hxx>
+#include "frmfmt.hxx"
+#include "cellatr.hxx"
+#include "accmap.hxx"
+#include <acccell.hxx>
+
+#ifndef _STLP_CFLOAT
+#include <cfloat>
+#endif
+
+#include <limits.h>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+const sal_Char sServiceName[] = "com.sun.star.table.AccessibleCellView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleCellView";
+
+sal_Bool SwAccessibleCell::IsSelected()
+{
+ sal_Bool bRet = sal_False;
+
+ DBG_ASSERT( GetMap(), "no map?" );
+ const ViewShell *pVSh = GetMap()->GetShell();
+ DBG_ASSERT( pVSh, "no shell?" );
+ if( pVSh->ISA( SwCrsrShell ) )
+ {
+ const SwCrsrShell *pCSh = static_cast< const SwCrsrShell * >( pVSh );
+ if( pCSh->IsTableMode() )
+ {
+ const SwCellFrm *pCFrm =
+ static_cast< const SwCellFrm * >( GetFrm() );
+ SwTableBox *pBox =
+ const_cast< SwTableBox *>( pCFrm->GetTabBox() ); //SVPtrArr!
+ bRet = pCSh->GetTableCrsr()->GetBoxes().Seek_Entry( pBox );
+ }
+ }
+
+ return bRet;
+}
+
+void SwAccessibleCell::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ SwAccessibleContext::GetStates( rStateSet );
+
+ // SELECTABLE
+ const ViewShell *pVSh = GetMap()->GetShell();
+ DBG_ASSERT( pVSh, "no shell?" );
+ if( pVSh->ISA( SwCrsrShell ) )
+ rStateSet.AddState( AccessibleStateType::SELECTABLE );
+
+ // SELECTED
+ if( IsSelected() )
+ {
+ rStateSet.AddState( AccessibleStateType::SELECTED );
+ ASSERT( bIsSelected, "bSelected out of sync" );
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+}
+
+SwAccessibleCell::SwAccessibleCell(
+ SwAccessibleMap *pInitMap,
+ const SwCellFrm *pCellFrm ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::TABLE_CELL, pCellFrm ),
+ bIsSelected( sal_False )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ OUString sBoxName( pCellFrm->GetTabBox()->GetName() );
+ SetName( sBoxName );
+
+ bIsSelected = IsSelected();
+}
+
+sal_Bool SwAccessibleCell::_InvalidateMyCursorPos()
+{
+ sal_Bool bNew = IsSelected();
+ sal_Bool bOld;
+ {
+ vos::OGuard aGuard( aMutex );
+ bOld = bIsSelected;
+ bIsSelected = bNew;
+ }
+ if( bNew )
+ {
+ // remember that object as the one that has the caret. This is
+ // neccessary to notify that object if the cursor leaves it.
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+
+ sal_Bool bChanged = bOld != bNew;
+ if( bChanged )
+ FireStateChangedEvent( AccessibleStateType::SELECTED, bNew );
+
+ return bChanged;
+}
+
+sal_Bool SwAccessibleCell::_InvalidateChildrenCursorPos( const SwFrm *pFrm )
+{
+ sal_Bool bChanged = sal_False;
+
+ const SwFrmOrObjSList aVisList( GetVisArea(), pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ if( rLower.IsAccessible( GetMap()->GetShell()->IsPreView() ) )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pLower, sal_False ) );
+ if( xAccImpl.isValid() )
+ {
+ ASSERT( xAccImpl->GetFrm()->IsCellFrm(),
+ "table child is not a cell frame" )
+ bChanged |= static_cast< SwAccessibleCell *>(
+ xAccImpl.getBodyPtr() )->_InvalidateMyCursorPos();
+ }
+ else
+ bChanged = sal_True; // If the context is not know we
+ // don't know whether the selection
+ // changed or not.
+ }
+ else
+ {
+ // This is a box with sub rows.
+ bChanged |= _InvalidateChildrenCursorPos( pLower );
+ }
+ }
+ ++aIter;
+ }
+
+ return bChanged;
+}
+
+void SwAccessibleCell::_InvalidateCursorPos()
+{
+
+ const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
+ ASSERT( pParent->IsTabFrm(), "parent is not a tab frame" );
+ const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( pParent );
+ if( pTabFrm->IsFollow() )
+ pTabFrm = pTabFrm->FindMaster();
+
+ while( pTabFrm )
+ {
+ sal_Bool bChanged = _InvalidateChildrenCursorPos( pTabFrm );
+ if( bChanged )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pTabFrm, sal_False ) );
+ if( xAccImpl.isValid() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ xAccImpl->FireAccessibleEvent( aEvent );
+ }
+ }
+
+ pTabFrm = pTabFrm->GetFollow();
+ }
+}
+
+sal_Bool SwAccessibleCell::HasCursor()
+{
+ vos::OGuard aGuard( aMutex );
+ return bIsSelected;
+}
+
+SwAccessibleCell::~SwAccessibleCell()
+{
+}
+
+OUString SAL_CALL SwAccessibleCell::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ return GetName();
+}
+
+OUString SAL_CALL SwAccessibleCell::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleCell::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+void SwAccessibleCell::Dispose( sal_Bool bRecursive )
+{
+ const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
+ ::vos::ORef< SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pParent, sal_False ) );
+ if( xAccImpl.isValid() )
+ xAccImpl->DisposeChild( GetFrm(), bRecursive );
+ SwAccessibleContext::Dispose( bRecursive );
+}
+
+void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
+{
+ const SwFrm *pParent = GetParent( GetFrm(), IsInPagePreview() );
+ ::vos::ORef< SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pParent, sal_False ) );
+ if( xAccImpl.isValid() )
+ xAccImpl->InvalidateChildPosOrSize( GetFrm(), rOldBox );
+ SwAccessibleContext::InvalidatePosOrSize( rOldBox );
+}
+
+
+// ===== XAccessibleInterface ===========================================
+
+uno::Any SwAccessibleCell::queryInterface( const uno::Type& rType )
+ throw( uno::RuntimeException )
+{
+ if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleValue > * >( 0 ) ) )
+ {
+ uno::Reference<XAccessibleValue> xValue = this;
+ uno::Any aRet;
+ aRet <<= xValue;
+ return aRet;
+ }
+ else
+ {
+ return SwAccessibleContext::queryInterface( rType );
+ }
+}
+
+//====== XTypeProvider ====================================================
+uno::Sequence< uno::Type > SAL_CALL SwAccessibleCell::getTypes()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< uno::Type > aTypes( SwAccessibleContext::getTypes() );
+
+ sal_Int32 nIndex = aTypes.getLength();
+ aTypes.realloc( nIndex + 1 );
+
+ uno::Type* pTypes = aTypes.getArray();
+ pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleValue > * >( 0 ) );
+
+ return aTypes;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleCell::getImplementationId()
+ throw(uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static uno::Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
+
+// ===== XAccessibleValue ===============================================
+
+SwFrmFmt* SwAccessibleCell::GetTblBoxFormat() const
+{
+ DBG_ASSERT( GetFrm() != NULL, "no frame?" );
+ DBG_ASSERT( GetFrm()->IsCellFrm(), "no cell frame?" );
+
+ const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>( GetFrm() );
+ return pCellFrm->GetTabBox()->GetFrmFmt();
+}
+
+
+uno::Any SwAccessibleCell::getCurrentValue( )
+ throw( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleValue );
+
+ uno::Any aAny;
+ aAny <<= GetTblBoxFormat()->GetTblBoxValue().GetValue();
+ return aAny;
+}
+
+sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber )
+ throw( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleValue );
+
+ double fValue = 0;
+ sal_Bool bValid = (aNumber >>= fValue);
+ if( bValid )
+ {
+ SwTblBoxValue aValue( fValue );
+ GetTblBoxFormat()->SetFmtAttr( aValue );
+ }
+ return bValid;
+}
+
+uno::Any SwAccessibleCell::getMaximumValue( )
+ throw( uno::RuntimeException )
+{
+ uno::Any aAny;
+ aAny <<= DBL_MAX;
+ return aAny;
+}
+
+uno::Any SwAccessibleCell::getMinimumValue( )
+ throw( uno::RuntimeException )
+{
+ uno::Any aAny;
+ aAny <<= -DBL_MAX;
+ return aAny;
+}
diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx
new file mode 100644
index 000000000000..147842fad54b
--- /dev/null
+++ b/sw/source/core/access/acccell.hxx
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acccell.hxx,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCCELL_HXX
+#define _ACCCELL_HXX
+#ifndef _ACCCONTEXT_HXX
+#include "acccontext.hxx"
+#endif
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+
+class SwCellFrm;
+
+class SwAccessibleCell : public SwAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleValue
+
+{
+ sal_Bool bIsSelected; // protected by base class mutex
+
+ sal_Bool IsSelected();
+
+ sal_Bool _InvalidateMyCursorPos();
+ sal_Bool _InvalidateChildrenCursorPos( const SwFrm *pFrm );
+
+protected:
+
+ // Set states for getAccessibleStateSet.
+ // This drived class additionaly sets SELECTABLE(1) and SELECTED(+)
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ virtual void _InvalidateCursorPos();
+
+ virtual ~SwAccessibleCell();
+
+public:
+
+ SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrm *pCellFrm );
+
+ virtual sal_Bool HasCursor(); // required by map to remember that object
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+
+ virtual void InvalidatePosOrSize( const SwRect& rFrm );
+
+ //===== XInterface ======================================================
+
+ // (XInterface methods need to be implemented to disambiguate
+ // between those inherited through SwAcessibleContext and
+ // XAccessibleValue).
+
+ 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 ()
+ { SwAccessibleContext::acquire(); };
+
+ virtual void SAL_CALL release( ) throw ()
+ { SwAccessibleContext::release(); };
+
+ //====== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleValue ================================================
+
+private:
+ SwFrmFmt* GetTblBoxFormat() const;
+
+public:
+ virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL setCurrentValue(
+ const ::com::sun::star::uno::Any& aNumber )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
+
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
new file mode 100644
index 000000000000..1993978d9030
--- /dev/null
+++ b/sw/source/core/access/acccontext.cxx
@@ -0,0 +1,1495 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acccontext.cxx,v $
+ * $Revision: 1.59 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
+ #ifndef _STRING_HXX
+ #include <tools/string.hxx>
+ #endif
+
+ #ifndef _STREAM_HXX
+ #include <tools/stream.hxx>
+ #endif
+#endif // #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
+#include <tools/debug.hxx>
+#include <vcl/window.hxx>
+#include "errhdl.hxx"
+#include "swtypes.hxx"
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <viewsh.hxx>
+#include <crsrsh.hxx>
+#include "fesh.hxx"
+#include <txtfrm.hxx>
+#include <ndtxt.hxx>
+#include <pam.hxx>
+#include <viewimp.hxx>
+#include <accmap.hxx>
+#include <accfrmobjslist.hxx>
+#ifndef _ACCCONTEXT_HXX
+#include <acccontext.hxx>
+#endif
+#include <svx/AccessibleShape.hxx>
+#include <comphelper/accessibleeventnotifier.hxx>
+
+#if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
+#define DBG_MSG( _msg ) \
+ lcl_SwAccessibleContext_DbgMsg( this, _msg, 0, sal_False );
+#define DBG_MSG_CD( _msg ) \
+ lcl_SwAccessibleContext_DbgMsg( this, _msg, 0, sal_True );
+#define DBG_MSG_PARAM( _msg, _param ) \
+ lcl_SwAccessibleContext_DbgMsg( this, _msg, _param, sal_False );
+#define DBG_MSG_THIS_PARAM( _msg, _this, _param ) \
+ lcl_SwAccessibleContext_DbgMsg( _this, _msg, _param, sal_False );
+
+void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc,
+ const char *pMsg,
+ SwAccessibleContext *pChildAcc,
+ sal_Bool bConstrDestr );
+#else
+#define DBG_MSG( _msg )
+#define DBG_MSG_PARAM( _msg, _param )
+#define DBG_MSG_THIS_PARAM( _msg, _this, _param )
+#define DBG_MSG_CD( _msg )
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+void SwAccessibleContext::InitStates()
+{
+ bIsShowingState = IsShowing();
+
+ ViewShell *pVSh = GetMap()->GetShell();
+ bIsEditableState = pVSh && IsEditable( pVSh );
+ bIsOpaqueState = pVSh && IsOpaque( pVSh );
+ bIsDefuncState = sal_False;
+}
+
+void SwAccessibleContext::SetParent( SwAccessibleContext *pParent )
+{
+ vos::OGuard aGuard( aMutex );
+
+ uno::Reference < XAccessible > xParent( pParent );
+ xWeakParent = xParent;
+}
+
+uno::Reference< XAccessible > SwAccessibleContext::GetWeakParent() const
+{
+ vos::OGuard aGuard( aMutex );
+
+ uno::Reference< XAccessible > xParent( xWeakParent );
+ return xParent;
+}
+
+Window *SwAccessibleContext::GetWindow()
+{
+ Window *pWin = 0;
+
+ if( GetMap() )
+ {
+ const ViewShell *pVSh = GetMap()->GetShell();
+ ASSERT( pVSh, "no view shell" );
+ if( pVSh )
+ pWin = pVSh->GetWin();
+
+ ASSERT( pWin, "no window" );
+ }
+
+ return pWin;
+}
+
+// get ViewShell from accessibility map, and cast to cursor shell
+SwCrsrShell* SwAccessibleContext::GetCrsrShell()
+{
+ SwCrsrShell* pCrsrShell;
+ ViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : 0;
+ ASSERT( pViewShell, "no view shell" );
+ if( pViewShell && pViewShell->ISA( SwCrsrShell ) )
+ pCrsrShell = static_cast<SwCrsrShell*>( pViewShell );
+ else
+ pCrsrShell = NULL;
+
+ return pCrsrShell;
+}
+
+const SwCrsrShell* SwAccessibleContext::GetCrsrShell() const
+{
+ // just like non-const GetCrsrShell
+ const SwCrsrShell* pCrsrShell;
+ const ViewShell* pViewShell = GetMap() ? GetMap()->GetShell() : 0;
+ ASSERT( pViewShell, "no view shell" );
+ if( pViewShell && pViewShell->ISA( SwCrsrShell ) )
+ pCrsrShell = static_cast<const SwCrsrShell*>( pViewShell );
+ else
+ pCrsrShell = NULL;
+
+ return pCrsrShell;
+}
+
+
+enum Action { NONE, SCROLLED, SCROLLED_WITHIN,
+ SCROLLED_IN, SCROLLED_OUT };
+
+void SwAccessibleContext::ChildrenScrolled( const SwFrm *pFrm,
+ const SwRect& rOldVisArea )
+{
+ const SwRect& rNewVisArea = GetVisArea();
+ SwFrmOrObj aFrm( pFrm );
+ sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly();
+
+ uno::Reference < XAccessible > xAcc;
+
+ const SwFrmOrObjSList aList( pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aList.begin() );
+ while( aIter != aList.end() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ SwRect aBox( rLower.GetBox() );
+ if( rLower.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ Action eAction = NONE;
+ if( aBox.IsOver( rNewVisArea ) )
+ {
+ if( aBox.IsOver( rOldVisArea ) )
+ {
+ eAction = SCROLLED_WITHIN;
+ }
+ else
+ {
+ if( bVisibleOnly )
+ eAction = SCROLLED_IN;
+ else
+ eAction = SCROLLED;
+ }
+ }
+ else if( aBox.IsOver( rOldVisArea ) )
+ {
+ if( bVisibleOnly )
+ eAction = SCROLLED_OUT;
+ else
+ eAction = SCROLLED;
+ }
+ else if( !bVisibleOnly )
+ {
+ // This wouldn't be required if the SwAccessibleFrame,
+ // wouldn't know about the vis area.
+ eAction = SCROLLED;
+ }
+ if( NONE != eAction )
+ {
+ if( pLower )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl =
+ GetMap()->GetContextImpl( pLower, SCROLLED_OUT == eAction ||
+ SCROLLED_IN == eAction );
+ if( xAccImpl.isValid() )
+ {
+ switch( eAction )
+ {
+ case SCROLLED:
+ xAccImpl->Scrolled( rOldVisArea );
+ break;
+ case SCROLLED_WITHIN:
+ xAccImpl->ScrolledWithin( rOldVisArea );
+ break;
+ case SCROLLED_IN:
+ xAccImpl->ScrolledIn();
+ break;
+ case SCROLLED_OUT:
+ xAccImpl->ScrolledOut( rOldVisArea );
+ break;
+ case NONE:
+ break;
+ }
+ }
+ else
+ {
+ ChildrenScrolled( pLower, rOldVisArea );
+ }
+ }
+ else
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rLower.GetSdrObject(),
+ this,
+ SCROLLED_OUT == eAction ||
+ SCROLLED_IN == eAction );
+ if( xAccImpl.isValid() )
+ {
+ switch( eAction )
+ {
+ case SCROLLED:
+ case SCROLLED_WITHIN:
+ xAccImpl->ViewForwarderChanged(
+ ::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
+ GetMap() );
+ break;
+ case SCROLLED_IN:
+ ScrolledInShape( rLower.GetSdrObject(),
+ xAccImpl.getBodyPtr() );
+ break;
+ case SCROLLED_OUT:
+ {
+ xAccImpl->ViewForwarderChanged(
+ ::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
+ GetMap() );
+ DisposeShape( rLower.GetSdrObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ break;
+ case NONE:
+ break;
+ }
+ }
+ }
+ }
+ }
+ else if( pLower && (!bVisibleOnly ||
+ aBox.IsOver( rOldVisArea ) ||
+ aBox.IsOver( rNewVisArea )) )
+ {
+ // There are no unaccessible SdrObjects that need to be notified
+ ChildrenScrolled( pLower, rOldVisArea );
+ }
+ ++aIter;
+ }
+}
+
+void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea )
+{
+ SetVisArea( GetMap()->GetVisArea() );
+
+ ChildrenScrolled( GetFrm(), rOldVisArea );
+
+ sal_Bool bIsOldShowingState;
+ sal_Bool bIsNewShowingState = IsShowing();
+ {
+ vos::OGuard aGuard( aMutex );
+ bIsOldShowingState = bIsShowingState;
+ bIsShowingState = bIsNewShowingState;
+ }
+
+ if( bIsOldShowingState != bIsNewShowingState )
+ FireStateChangedEvent( AccessibleStateType::SHOWING,
+ bIsNewShowingState );
+}
+
+void SwAccessibleContext::ScrolledWithin( const SwRect& rOldVisArea )
+{
+ SetVisArea( GetMap()->GetVisArea() );
+
+ ChildrenScrolled( GetFrm(), rOldVisArea );
+
+ FireVisibleDataEvent();
+}
+
+void SwAccessibleContext::ScrolledIn()
+{
+ // This accessible should be freshly created, because it
+ // was not visisble before. Therefor, its vis area must already
+ // reflect the scrolling.
+ ASSERT( GetVisArea() == GetMap()->GetVisArea(),
+ "Vis area of child is wrong. Did it exist already?" );
+
+ // Send child event at parent. That's all we have to do here.
+ const SwFrm *pParent = GetParent();
+ ::vos::ORef< SwAccessibleContext > xParentImpl(
+ GetMap()->GetContextImpl( pParent, sal_False ) );
+ uno::Reference < XAccessibleContext > xThis( this );
+ if( xParentImpl.isValid() )
+ {
+ SetParent( xParentImpl.getBodyPtr() );
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= xThis;
+
+ xParentImpl->FireAccessibleEvent( aEvent );
+ DBG_MSG_PARAM( "AccessibleChild (added)", xChildImpl.getBodyPtr() );
+
+ if( HasCursor() )
+ {
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() )
+ {
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, sal_True );
+ }
+ }
+
+ }
+}
+
+void SwAccessibleContext::ScrolledOut( const SwRect& rOldVisArea )
+{
+ SetVisArea( GetMap()->GetVisArea() );
+
+ // First of all, update the children. That's required to dispose
+ // all children that are existing only if they are visible. They
+ // are not disposed by the recusive Dispose call that follows later on,
+ // because this call will only dispose children that are in the
+ // new vis area. The children we want to dispode however are in the
+ // old vis area all.
+ ChildrenScrolled( GetFrm(), rOldVisArea );
+
+ // Broadcast a state changed event for the showing state.
+ // It might be that the child is freshly created just to send
+ // the child event. In this case no listener will exist.
+ FireStateChangedEvent( AccessibleStateType::SHOWING, sal_False );
+
+ // We now dispose the frame
+ Dispose( sal_True );
+}
+
+// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+void SwAccessibleContext::InvalidateChildrenStates( const SwFrm* _pFrm,
+ tAccessibleStates _nStates )
+{
+ const SwFrmOrObjSList aVisList( GetVisArea(), _pFrm );
+
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl;
+ if( rLower.IsAccessible( GetShell()->IsPreView() ) )
+ xAccImpl = GetMap()->GetContextImpl( pLower, sal_False );
+ if( xAccImpl.isValid() )
+ xAccImpl->InvalidateStates( _nStates );
+ else
+ InvalidateChildrenStates( pLower, _nStates );
+ }
+ else
+ {
+ // TODO: SdrObjects
+ }
+ ++aIter;
+ }
+}
+// <--
+
+void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm,
+ sal_Bool bRecursive )
+{
+ const SwFrmOrObjSList aVisList( GetVisArea(), pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl;
+ if( rLower.IsAccessible( GetShell()->IsPreView() ) )
+ xAccImpl = GetMap()->GetContextImpl( pLower, sal_False );
+ if( xAccImpl.isValid() )
+ xAccImpl->Dispose( bRecursive );
+ else if( bRecursive )
+ DisposeChildren( pLower, bRecursive );
+ }
+ else
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl(
+ GetMap()->GetContextImpl( rLower.GetSdrObject(),
+ this, sal_False ) );
+ if( xAccImpl.isValid() )
+ DisposeShape( rLower.GetSdrObject(), xAccImpl.getBodyPtr() );
+ }
+ ++aIter;
+ }
+}
+
+void SwAccessibleContext::_InvalidateContent( sal_Bool )
+{
+}
+
+void SwAccessibleContext::_InvalidateCursorPos()
+{
+}
+
+void SwAccessibleContext::_InvalidateFocus()
+{
+}
+
+void SwAccessibleContext::FireAccessibleEvent( AccessibleEventObject& rEvent )
+{
+ ASSERT( GetFrm(), "fire event for diposed frame?" );
+ if( !GetFrm() )
+ return;
+
+ if( !rEvent.Source.is() )
+ {
+ uno::Reference < XAccessibleContext > xThis( this );
+ rEvent.Source = xThis;
+ }
+
+ if (nClientId)
+ comphelper::AccessibleEventNotifier::addEvent( nClientId, rEvent );
+}
+
+void SwAccessibleContext::FireVisibleDataEvent()
+{
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
+
+ FireAccessibleEvent( aEvent );
+ DBG_MSG( "AccessibleVisibleData" )
+}
+
+void SwAccessibleContext::FireStateChangedEvent( sal_Int16 nState,
+ sal_Bool bNewState )
+{
+ AccessibleEventObject aEvent;
+
+ aEvent.EventId = AccessibleEventId::STATE_CHANGED;
+ if( bNewState )
+ aEvent.NewValue <<= nState;
+ else
+ aEvent.OldValue <<= nState;
+
+ FireAccessibleEvent( aEvent );
+ DBG_MSG( "StateChanged" )
+}
+
+void SwAccessibleContext::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // SHOWING
+ if( bIsShowingState )
+ rStateSet.AddState( AccessibleStateType::SHOWING );
+
+ // EDITABLE
+ if( bIsEditableState )
+ rStateSet.AddState( AccessibleStateType::EDITABLE );
+
+ // ENABLED
+ rStateSet.AddState( AccessibleStateType::ENABLED );
+
+ // OPAQUE
+ if( bIsOpaqueState )
+ rStateSet.AddState( AccessibleStateType::OPAQUE );
+
+ // VISIBLE
+ rStateSet.AddState( AccessibleStateType::VISIBLE );
+
+ if( bIsDefuncState )
+ rStateSet.AddState( AccessibleStateType::DEFUNC );
+}
+
+sal_Bool SwAccessibleContext::IsEditableState()
+{
+ sal_Bool bRet;
+ {
+ vos::OGuard aGuard( aMutex );
+ bRet = bIsEditableState;
+ }
+
+ return bRet;
+}
+
+SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *pM,
+ sal_Int16 nR,
+ const SwFrm *pF ) :
+ SwAccessibleFrame( pM->GetVisArea().SVRect(), pF,
+ pM->GetShell()->IsPreView() ),
+ pMap( pM ),
+ nClientId(0),
+ nRole( nR ),
+ bDisposing( sal_False ),
+ // --> OD 2008-03-10 #i85634#
+ bRegisteredAtAccessibleMap( true )
+ // <--
+{
+ InitStates();
+ DBG_MSG_CD( "constructed" )
+}
+
+SwAccessibleContext::~SwAccessibleContext()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ DBG_MSG_CD( "destructed" )
+ // --> OD 2008-03-10 #i85634#
+// if( GetFrm() && GetMap() )
+// GetMap()->RemoveContext( GetFrm() );
+ RemoveFrmFromAccessibleMap();
+ // <--
+}
+
+uno::Reference< XAccessibleContext > SAL_CALL
+ SwAccessibleContext::getAccessibleContext( void )
+ throw (uno::RuntimeException)
+{
+ uno::Reference < XAccessibleContext > xRet( this );
+ return xRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleChildCount( void )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ return bDisposing ? 0 : GetChildCount();
+}
+
+uno::Reference< XAccessible> SAL_CALL
+ SwAccessibleContext::getAccessibleChild( sal_Int32 nIndex )
+ throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ const SwFrmOrObj aChild( GetChild( nIndex ) );
+ if( !aChild.IsValid() )
+ {
+ uno::Reference < XAccessibleContext > xThis( this );
+ lang::IndexOutOfBoundsException aExcept(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("index out of bounds") ),
+ xThis );
+ throw aExcept;
+ }
+
+ uno::Reference< XAccessible > xChild;
+ if( aChild.GetSwFrm() )
+ {
+ ::vos::ORef < SwAccessibleContext > xChildImpl(
+ GetMap()->GetContextImpl( aChild.GetSwFrm(), !bDisposing ) );
+ if( xChildImpl.isValid() )
+ {
+ xChildImpl->SetParent( this );
+ xChild = xChildImpl.getBodyPtr();
+ }
+ }
+ else
+ {
+ ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+ GetMap()->GetContextImpl( aChild.GetSdrObject(),
+ this, !bDisposing ) );
+ if( xChildImpl.isValid() )
+ xChild = xChildImpl.getBodyPtr();
+ }
+
+ return xChild;
+}
+
+uno::Reference< XAccessible> SAL_CALL SwAccessibleContext::getAccessibleParent (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ const SwFrm *pUpper = GetParent();
+ ASSERT( pUpper != 0 || bDisposing, "no upper found" );
+
+ uno::Reference< XAccessible > xAcc;
+ if( pUpper )
+ xAcc = GetMap()->GetContext( pUpper, !bDisposing );
+
+ ASSERT( xAcc.is() || bDisposing, "no parent found" );
+
+ // Remember the parent as weak ref.
+ {
+ vos::OGuard aWeakParentGuard( aMutex );
+ xWeakParent = xAcc;
+ }
+
+ return xAcc;
+}
+
+sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleIndexInParent (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ const SwFrm *pUpper = GetParent();
+ ASSERT( pUpper != 0 || bDisposing, "no upper found" );
+
+ sal_Int32 nIndex = -1;
+ if( pUpper )
+ {
+ ::vos::ORef < SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pUpper, !bDisposing ) );
+ ASSERT( xAccImpl.isValid() || bDisposing, "no parent found" );
+ if( xAccImpl.isValid() )
+ nIndex = xAccImpl->GetChildIndex( GetFrm() );
+ }
+
+ return nIndex;
+}
+
+sal_Int16 SAL_CALL SwAccessibleContext::getAccessibleRole (void)
+ throw (uno::RuntimeException)
+{
+ return nRole;
+}
+
+OUString SAL_CALL SwAccessibleContext::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ ASSERT( !this, "description needs to be overloaded" );
+ THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (method must be overloaded)" );
+}
+
+OUString SAL_CALL SwAccessibleContext::getAccessibleName (void)
+ throw (uno::RuntimeException)
+{
+ return sName;
+}
+
+uno::Reference< XAccessibleRelationSet> SAL_CALL
+ SwAccessibleContext::getAccessibleRelationSet (void)
+ throw (uno::RuntimeException)
+{
+ // by default there are no relations
+ uno::Reference< XAccessibleRelationSet> xRet( new utl::AccessibleRelationSetHelper() );
+ return xRet;
+}
+
+uno::Reference<XAccessibleStateSet> SAL_CALL
+ SwAccessibleContext::getAccessibleStateSet (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ ::utl::AccessibleStateSetHelper *pStateSet =
+ new ::utl::AccessibleStateSetHelper;
+
+ uno::Reference<XAccessibleStateSet> xStateSet( pStateSet );
+ GetStates( *pStateSet );
+
+ return xStateSet;
+}
+
+lang::Locale SAL_CALL SwAccessibleContext::getLocale (void)
+ throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ lang::Locale aLoc( Application::GetSettings().GetLocale() );
+ return aLoc;
+}
+
+void SAL_CALL SwAccessibleContext::addEventListener(
+ const uno::Reference< XAccessibleEventListener >& xListener )
+ throw (uno::RuntimeException)
+{
+ DBG_MSG( "accessible event listener added" )
+
+ if (xListener.is())
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ if (!nClientId)
+ nClientId = comphelper::AccessibleEventNotifier::registerClient( );
+ comphelper::AccessibleEventNotifier::addEventListener( nClientId, xListener );
+ }
+}
+
+void SAL_CALL SwAccessibleContext::removeEventListener(
+ const uno::Reference< XAccessibleEventListener >& xListener )
+ throw (uno::RuntimeException)
+{
+ DBG_MSG( "accessible event listener removed" )
+
+ if (xListener.is())
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( nClientId, xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ comphelper::AccessibleEventNotifier::revokeClient( nClientId );
+ nClientId = 0;
+ }
+ }
+}
+
+static sal_Bool lcl_PointInRectangle(const awt::Point & aPoint,
+ const awt::Rectangle & aRect)
+{
+ long nDiffX = aPoint.X - aRect.X;
+ long nDiffY = aPoint.Y - aRect.Y;
+
+ return
+ nDiffX >= 0 && nDiffX < aRect.Width && nDiffY >= 0 &&
+ nDiffY < aRect.Height;
+
+}
+
+sal_Bool SAL_CALL SwAccessibleContext::containsPoint(
+ const awt::Point& aPoint )
+ throw (uno::RuntimeException)
+{
+ awt::Rectangle aPixBounds = getBoundsImpl(sal_True);
+ aPixBounds.X = 0;
+ aPixBounds.Y = 0;
+
+ return lcl_PointInRectangle(aPoint, aPixBounds);
+}
+
+uno::Reference< XAccessible > SAL_CALL SwAccessibleContext::getAccessibleAtPoint(
+ const awt::Point& aPoint )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleComponent )
+
+ uno::Reference< XAccessible > xAcc;
+
+ Window *pWin = GetWindow();
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to parent
+ if( !GetFrm()->IsRootFrm() )
+ {
+ SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root
+ Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() );
+ aPixPoint.X() += aPixPos.X();
+ aPixPoint.Y() += aPixPos.Y();
+ }
+
+ const SwFrmOrObj aChild( GetChildAtPixel( aPixPoint, GetMap() ) );
+ if( aChild.GetSwFrm() )
+ {
+ xAcc = GetMap()->GetContext( aChild.GetSwFrm() );
+ }
+ else if( aChild.GetSdrObject() )
+ {
+ xAcc = GetMap()->GetContext( aChild.GetSdrObject(), this );
+ }
+
+ return xAcc;
+}
+
+
+/**
+ Get bounding box.
+
+ There are two modes.
+
+ - realative
+
+ Return bounding box relative to parent if parent is no root
+ frame. Otherwise return the absolute bounding box.
+
+ - absolute
+
+ Return the absolute bounding box.
+
+ @param bRelative
+ true: Use relative mode.
+ false: Use absolute mode.
+*/
+awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(sal_Bool bRelative)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleComponent )
+
+ const SwFrm *pParent = GetParent();
+ ASSERT( pParent, "no Parent found" );
+ Window *pWin = GetWindow();
+
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin && pParent )
+
+ SwRect aLogBounds( GetBounds( GetFrm() ) ); // twip rel to doc root
+ Rectangle aPixBounds( 0, 0, 0, 0 );
+ if( GetFrm()->IsPageFrm() &&
+ static_cast < const SwPageFrm * >( GetFrm() )->IsEmptyPage() )
+ {
+ ASSERT( GetShell()->IsPreView(), "empty page accessible?" );
+ if( GetShell()->IsPreView() )
+ {
+ // OD 15.01.2003 #103492# - adjust method call <GetMap()->GetPreViewPageSize()>
+ sal_uInt16 nPageNum =
+ static_cast < const SwPageFrm * >( GetFrm() )->GetPhyPageNum();
+ aLogBounds.SSize( GetMap()->GetPreViewPageSize( nPageNum ) );
+ }
+ }
+ if( !aLogBounds.IsEmpty() )
+ {
+ aPixBounds = GetMap()->CoreToPixel( aLogBounds.SVRect() );
+ if( !pParent->IsRootFrm() && bRelative)
+ {
+ SwRect aParentLogBounds( GetBounds( pParent ) ); // twip rel to doc root
+ Point aParentPixPos( GetMap()->CoreToPixel( aParentLogBounds.SVRect() ).TopLeft() );
+ aPixBounds.Move( -aParentPixPos.X(), -aParentPixPos.Y() );
+ }
+ }
+
+ awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(),
+ aPixBounds.GetWidth(), aPixBounds.GetHeight() );
+
+ return aBox;
+}
+
+
+awt::Rectangle SAL_CALL SwAccessibleContext::getBounds()
+ throw (uno::RuntimeException)
+{
+ return getBoundsImpl(sal_True);
+}
+
+awt::Point SAL_CALL SwAccessibleContext::getLocation()
+ throw (uno::RuntimeException)
+{
+ awt::Rectangle aRect = getBoundsImpl(sal_True);
+ awt::Point aPoint(aRect.X, aRect.Y);
+
+ return aPoint;
+}
+
+
+
+awt::Point SAL_CALL SwAccessibleContext::getLocationOnScreen()
+ throw (uno::RuntimeException)
+{
+ awt::Rectangle aRect = getBoundsImpl(sal_False);
+
+ Point aPixPos(aRect.X, aRect.Y);
+
+ /* getBoundsImpl already checked that GetWindow returns valid pointer. */
+ aPixPos = GetWindow()->OutputToAbsoluteScreenPixel(aPixPos);
+ awt::Point aPoint(aPixPos.X(), aPixPos.Y());
+
+ return aPoint;
+}
+
+
+awt::Size SAL_CALL SwAccessibleContext::getSize()
+ throw (uno::RuntimeException)
+{
+ awt::Rectangle aRect = getBoundsImpl(sal_False);
+ awt::Size aSize( aRect.Width, aRect.Height );
+
+ return aSize;
+}
+
+void SAL_CALL SwAccessibleContext::grabFocus()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext );
+
+ if( GetFrm()->IsFlyFrm() )
+ {
+ const SdrObject *pObj =
+ static_cast < const SwFlyFrm * >( GetFrm() )->GetVirtDrawObj();
+ if( pObj )
+ Select( const_cast < SdrObject * >( pObj ), sal_False );
+ }
+ else
+ {
+ const SwCntntFrm *pCFrm = 0;
+ if( GetFrm()->IsCntntFrm() )
+ pCFrm = static_cast< const SwCntntFrm * >( GetFrm() );
+ else if( GetFrm()->IsLayoutFrm() )
+ pCFrm = static_cast< const SwLayoutFrm * >( GetFrm() )->ContainsCntnt();
+
+ if( pCFrm && pCFrm->IsTxtFrm() )
+ {
+ const SwTxtFrm *pTxtFrm = static_cast< const SwTxtFrm * >( pCFrm );
+ const SwTxtNode *pTxtNd = pTxtFrm->GetTxtNode();
+ if( pTxtNd )
+ {
+ // create pam for selection
+ SwIndex aIndex( const_cast< SwTxtNode * >( pTxtNd ),
+ pTxtFrm->GetOfst() );
+ SwPosition aStartPos( *pTxtNd, aIndex );
+ SwPaM aPaM( aStartPos );
+
+ // set PaM at cursor shell
+ Select( aPaM );
+ }
+ }
+ }
+}
+
+
+uno::Any SAL_CALL SwAccessibleContext::getAccessibleKeyBinding()
+ throw (uno::RuntimeException)
+{
+ // There are no key bindings
+ return uno::Any();
+}
+
+sal_Int32 SAL_CALL SwAccessibleContext::getForeground()
+ throw (uno::RuntimeException)
+{
+ return 0;
+}
+
+sal_Int32 SAL_CALL SwAccessibleContext::getBackground()
+ throw (uno::RuntimeException)
+{
+ return 0xffffff;
+}
+
+
+OUString SAL_CALL SwAccessibleContext::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ ASSERT( !this, "implementation name needs to be overloaded" );
+
+ THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "implementation name needs to be overloaded" )
+}
+
+sal_Bool SAL_CALL
+ SwAccessibleContext::supportsService (const ::rtl::OUString& )
+ throw (uno::RuntimeException)
+{
+ ASSERT( !this, "supports service needs to be overloaded" );
+ THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supports service needs to be overloaded" )
+}
+
+uno::Sequence< OUString > SAL_CALL SwAccessibleContext::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ ASSERT( !this, "supported services names needs to be overloaded" );
+ THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supported services needs to be overloaded" )
+}
+
+void SwAccessibleContext::DisposeShape( const SdrObject *pObj,
+ ::accessibility::AccessibleShape *pAccImpl )
+{
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl( pAccImpl );
+ if( !xAccImpl.isValid() )
+ xAccImpl = GetMap()->GetContextImpl( pObj, this, sal_True );
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ uno::Reference< XAccessible > xAcc( xAccImpl.getBodyPtr() );
+ aEvent.OldValue <<= xAcc;
+ FireAccessibleEvent( aEvent );
+
+ GetMap()->RemoveContext( pObj );
+ xAccImpl->dispose();
+}
+
+void SwAccessibleContext::ScrolledInShape( const SdrObject* ,
+ ::accessibility::AccessibleShape *pAccImpl )
+{
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ uno::Reference< XAccessible > xAcc( pAccImpl );
+ aEvent.NewValue <<= xAcc;
+ FireAccessibleEvent( aEvent );
+
+ if( pAccImpl->GetState( AccessibleStateType::FOCUSED ) )
+ {
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() )
+ {
+ AccessibleEventObject aStateChangedEvent;
+ aStateChangedEvent.EventId = AccessibleEventId::STATE_CHANGED;
+ aStateChangedEvent.NewValue <<= AccessibleStateType::FOCUSED;
+ aStateChangedEvent.Source = xAcc;
+
+ FireAccessibleEvent( aStateChangedEvent );
+ }
+ }
+}
+
+void SwAccessibleContext::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ASSERT( GetFrm() && GetMap(), "already disposed" );
+ ASSERT( GetMap()->GetVisArea() == GetVisArea(),
+ "invalid vis area for dispose" );
+
+ bDisposing = sal_True;
+
+ // dispose children
+ if( bRecursive )
+ DisposeChildren( GetFrm(), bRecursive );
+
+ // get parent
+ uno::Reference< XAccessible > xParent( GetWeakParent() );
+ uno::Reference < XAccessibleContext > xThis( this );
+
+ // send child event at parent
+ if( xParent.is() )
+ {
+ SwAccessibleContext *pAcc = (SwAccessibleContext *)xParent.get();
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.OldValue <<= xThis;
+ pAcc->FireAccessibleEvent( aEvent );
+ DBG_MSG_THIS_PARAM( "AccessibleChild (removed)", pAcc, this )
+ }
+
+ // set defunc state (its not required to broadcast a state changed
+ // event if the object is diposed afterwards)
+ {
+ vos::OGuard aDefuncStateGuard( aMutex );
+ bIsDefuncState = sal_True;
+ }
+
+ // broadcast dispose event
+ if ( nClientId )
+ {
+ comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( nClientId, *this );
+ nClientId = 0;
+ DBG_MSG_CD( "dispose" )
+ }
+
+ // --> OD 2008-03-10 #i85634#
+// if( GetFrm() && GetMap() )
+// GetMap()->RemoveContext( GetFrm() );
+ RemoveFrmFromAccessibleMap();
+ // <--
+ ClearFrm();
+ pMap = 0;
+
+ bDisposing = sal_False;
+}
+
+void SwAccessibleContext::DisposeChild( const SwFrmOrObj& rChildFrmOrObj,
+ sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ SwFrmOrObj aFrmOrObj( GetFrm() );
+ if( IsShowing( rChildFrmOrObj ) || !aFrmOrObj.IsVisibleChildrenOnly() )
+ {
+ // If the object could have existed before, than there is nothing to do,
+ // because no wrapper exists now and therefor no one is interested to
+ // get notified of the movement.
+ if( rChildFrmOrObj.GetSwFrm() )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
+ sal_True );
+ xAccImpl->Dispose( bRecursive );
+ }
+ else
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
+ this, sal_True );
+ DisposeShape( rChildFrmOrObj.GetSdrObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ }
+ else if( bRecursive && rChildFrmOrObj.GetSwFrm() )
+ DisposeChildren( rChildFrmOrObj.GetSwFrm(), bRecursive );
+}
+
+void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ASSERT( GetFrm() && !GetFrm()->Frm().IsEmpty(), "context should have a size" );
+
+ sal_Bool bIsOldShowingState;
+ sal_Bool bIsNewShowingState = IsShowing();
+ {
+ vos::OGuard aShowingStateGuard( aMutex );
+ bIsOldShowingState = bIsShowingState;
+ bIsShowingState = bIsNewShowingState;
+ }
+
+ if( bIsOldShowingState != bIsNewShowingState )
+ {
+ FireStateChangedEvent( AccessibleStateType::SHOWING,
+ bIsNewShowingState );
+ }
+ else if( bIsNewShowingState )
+ {
+ // The frame stays visible -> broadcast event
+ FireVisibleDataEvent();
+ }
+
+ SwFrmOrObj aParent( GetParent() );
+ if( !bIsNewShowingState && aParent.IsVisibleChildrenOnly() )
+ {
+ // The frame is now invisible -> dispose it
+ Dispose( sal_True );
+ }
+ else
+ {
+ _InvalidateContent( sal_True );
+ }
+}
+
+void SwAccessibleContext::InvalidateChildPosOrSize(
+ const SwFrmOrObj& rChildFrmOrObj,
+ const SwRect& rOldFrm )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ASSERT( !rChildFrmOrObj.GetSwFrm() ||
+ !rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(),
+ "child context should have a size" );
+
+ SwFrmOrObj aFrm( GetFrm() );
+ sal_Bool bNew = rOldFrm.IsEmpty() ||
+ (rOldFrm.Left() == 0 && rOldFrm.Top() == 0);
+ if( IsShowing( rChildFrmOrObj ) )
+ {
+ // If the object could have existed before, than there is nothing to do,
+ // because no wrapper exists now and therefor no one is interested to
+ // get notified of the movement.
+ if( bNew || (aFrm.IsVisibleChildrenOnly() && !IsShowing( rOldFrm )) )
+ {
+ if( rChildFrmOrObj.GetSwFrm() )
+ {
+ // The frame becomes visible. A child event must be send.
+ ::vos::ORef< SwAccessibleContext > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
+ sal_True );
+ xAccImpl->ScrolledIn();
+ }
+ else
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
+ this, sal_True );
+ // --> OD 2004-11-29 #i37790#
+ if ( xAccImpl.isValid() )
+ {
+ ScrolledInShape( rChildFrmOrObj.GetSdrObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ else
+ {
+ ASSERT( false ,
+ "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." );
+ }
+ // <--
+ }
+ }
+ }
+ else
+ {
+ // If the frame was visible before, than a child event for the parent
+ // needs to be send. However, there is no wrapper existing, and so
+ // no notifications for grandchildren are required. If the are
+ // grandgrandchildren, they would be notified by the layout.
+ if( aFrm.IsVisibleChildrenOnly() &&
+ !bNew && IsShowing( rOldFrm ) )
+ {
+ if( rChildFrmOrObj.GetSwFrm() )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
+ sal_True );
+ xAccImpl->SetParent( this );
+ xAccImpl->Dispose( sal_True );
+ }
+ else
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSdrObject(),
+ this, sal_True );
+ DisposeShape( rChildFrmOrObj.GetSdrObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ }
+ }
+}
+
+void SwAccessibleContext::InvalidateContent()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ _InvalidateContent( sal_False );
+}
+
+void SwAccessibleContext::InvalidateCursorPos()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ _InvalidateCursorPos();
+}
+
+void SwAccessibleContext::InvalidateFocus()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ _InvalidateFocus();
+}
+
+// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+void SwAccessibleContext::InvalidateStates( tAccessibleStates _nStates )
+{
+ if( GetMap() )
+ {
+ ViewShell *pVSh = GetMap()->GetShell();
+ if( pVSh )
+ {
+ if( (_nStates & ACC_STATE_EDITABLE) != 0 )
+ {
+ sal_Bool bIsOldEditableState;
+ sal_Bool bIsNewEditableState = IsEditable( pVSh );
+ {
+ vos::OGuard aGuard( aMutex );
+ bIsOldEditableState = bIsEditableState;
+ bIsEditableState = bIsNewEditableState;
+ }
+
+ if( bIsOldEditableState != bIsNewEditableState )
+ FireStateChangedEvent( AccessibleStateType::EDITABLE,
+ bIsNewEditableState );
+ }
+ if( (_nStates & ACC_STATE_OPAQUE) != 0 )
+ {
+ sal_Bool bIsOldOpaqueState;
+ sal_Bool bIsNewOpaqueState = IsOpaque( pVSh );
+ {
+ vos::OGuard aGuard( aMutex );
+ bIsOldOpaqueState = bIsOpaqueState;
+ bIsOpaqueState = bIsNewOpaqueState;
+ }
+
+ if( bIsOldOpaqueState != bIsNewOpaqueState )
+ FireStateChangedEvent( AccessibleStateType::OPAQUE,
+ bIsNewOpaqueState );
+ }
+ }
+
+ InvalidateChildrenStates( GetFrm(), _nStates );
+ }
+}
+// <--
+
+void SwAccessibleContext::InvalidateRelation( sal_uInt16 nType )
+{
+ AccessibleEventObject aEvent;
+ aEvent.EventId = nType;
+
+ FireAccessibleEvent( aEvent );
+}
+
+/** text selection has changed
+
+ OD 2005-12-14 #i27301#
+
+ @author OD
+*/
+void SwAccessibleContext::InvalidateTextSelection()
+{
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::TEXT_SELECTION_CHANGED;
+
+ FireAccessibleEvent( aEvent );
+}
+
+/** attributes has changed
+
+ OD 2009-01-06 #i88069#
+
+ @author OD
+*/
+void SwAccessibleContext::InvalidateAttr()
+{
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::TEXT_ATTRIBUTE_CHANGED;
+
+ FireAccessibleEvent( aEvent );
+}
+
+sal_Bool SwAccessibleContext::HasCursor()
+{
+ return sal_False;
+}
+
+sal_Bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj,
+ sal_Bool bAdd )
+{
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( !pCrsrShell )
+ return sal_False;
+
+ SwFEShell* pFEShell = pCrsrShell->ISA( SwFEShell )
+ ? static_cast<SwFEShell*>( pCrsrShell )
+ : 0;
+ // Get rid of activated OLE object
+ if( pFEShell )
+ pFEShell->FinishOLEObj();
+
+ sal_Bool bRet = sal_False;
+ if( pObj )
+ {
+ if( pFEShell )
+ {
+ Point aDummy;
+ sal_uInt8 nFlags = bAdd ? SW_ADD_SELECT : 0;
+ pFEShell->SelectObj( aDummy, nFlags, pObj );
+ bRet = sal_True;
+ }
+ }
+ else if( pPaM )
+ {
+ // Get rid of frame selection. If there is one, make text cursor
+ // visible again.
+ sal_Bool bCallShowCrsr = sal_False;
+ if( pFEShell && (pFEShell->IsFrmSelected() ||
+ pFEShell->IsObjSelected()) )
+ {
+ Point aPt( LONG_MIN, LONG_MIN );
+ pFEShell->SelectObj( aPt, 0 );
+ bCallShowCrsr = sal_True;
+ }
+ pCrsrShell->KillPams();
+ pCrsrShell->SetSelection( *pPaM );
+ if( bCallShowCrsr )
+ pCrsrShell->ShowCrsr();
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
+ const OUString *pArg1,
+ const OUString *pArg2 )
+{
+ String sStr;
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ sStr = SW_RES( nResId );
+ }
+
+ if( pArg1 )
+ {
+ sStr.SearchAndReplace( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "$(ARG1)" )),
+ String( *pArg1 ) );
+ }
+ if( pArg2 )
+ {
+ sStr.SearchAndReplace( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "$(ARG2)" )),
+ String( *pArg2 ) );
+ }
+
+ return OUString( sStr );
+}
+
+// --> OD 2008-03-10 #i85634#
+void SwAccessibleContext::RemoveFrmFromAccessibleMap()
+{
+ if( bRegisteredAtAccessibleMap && GetFrm() && GetMap() )
+ GetMap()->RemoveContext( GetFrm() );
+}
+// <--
+
+#if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
+void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc,
+ const char *pMsg,
+ SwAccessibleContext *pChildAcc,
+ sal_Bool bConstrDestr )
+{
+ static SvFileStream aStrm( String::CreateFromAscii("j:\\acc.log"),
+ STREAM_WRITE|STREAM_TRUNC|STREAM_SHARE_DENYNONE );
+ ByteString aName( String(pThisAcc->GetName()),
+ RTL_TEXTENCODING_ISO_8859_1 );
+ if( aName.Len() )
+ {
+ aStrm << aName.GetBuffer()
+ << ": ";
+ }
+ aStrm << pMsg;
+ if( pChildAcc )
+ {
+ ByteString aChild( String(pChildAcc->GetName()),
+ RTL_TEXTENCODING_ISO_8859_1 );
+ aStrm << ": "
+ << aChild.GetBuffer();
+ }
+ aStrm << "\r\n (";
+
+ if( !bConstrDestr )
+ {
+ ByteString aDesc( String(pThisAcc->getAccessibleDescription()),
+ RTL_TEXTENCODING_ISO_8859_1 );
+ aStrm << aDesc.GetBuffer()
+ << ", ";
+ }
+
+ Rectangle aVisArea( pThisAcc->GetVisArea() );
+ aStrm << "VA: "
+ << ByteString::CreateFromInt32( aVisArea.Left() ).GetBuffer()
+ << ","
+ << ByteString::CreateFromInt32( aVisArea.Top() ).GetBuffer()
+ << ","
+ << ByteString::CreateFromInt32( aVisArea.GetWidth() ).GetBuffer()
+ << ","
+ << ByteString::CreateFromInt32( aVisArea.GetHeight() ).GetBuffer();
+
+ if( pThisAcc->GetFrm() )
+ {
+ Rectangle aBounds( pThisAcc->GetBounds( pThisAcc->GetFrm() ) );
+ aStrm << ", BB: "
+ << ByteString::CreateFromInt32( aBounds.Left() ).GetBuffer()
+ << ","
+ << ByteString::CreateFromInt32( aBounds.Top() ).GetBuffer()
+ << ","
+ << ByteString::CreateFromInt32( aBounds.GetWidth() ).GetBuffer()
+ << ","
+ << ByteString::CreateFromInt32( aBounds.GetHeight() ).GetBuffer()
+ << ")\r\n";
+ }
+
+ aStrm.Flush();
+}
+#endif
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
new file mode 100644
index 000000000000..d35f026968b0
--- /dev/null
+++ b/sw/source/core/access/acccontext.hxx
@@ -0,0 +1,437 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acccontext.hxx,v $
+ * $Revision: 1.43 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCBASE_HXX
+#define _ACCBASE_HXX
+#include <accframe.hxx>
+#include <accmap.hxx>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+class Window;
+class SwAccessibleMap;
+class SwCrsrShell;
+class SdrObject;
+class SwPaM;
+namespace utl { class AccessibleStateSetHelper; }
+namespace accessibility { class AccessibleShape; }
+
+const sal_Char sAccessibleServiceName[] = "com.sun.star.accessibility.Accessible";
+
+class SwAccessibleContext :
+ public ::cppu::WeakImplHelper5<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo
+ >,
+ public SwAccessibleFrame
+{
+ // The implements for the XAccessibleSelection interface has been
+ // 'externalized' and wants access to the protected members like
+ // GetMap, GetChild, GetParent, and GetFrm.
+ friend class SwAccessibleSelectionHelper;
+
+
+protected:
+
+ mutable ::osl::Mutex aListenerMutex;
+ mutable ::vos::OMutex aMutex;
+
+private:
+
+ ::rtl::OUString sName; // immutable outside constructor
+
+ // The parent if it has been retrieved. This is always an
+ // SwAccessibleContext. (protected by Mutex)
+ ::com::sun::star::uno::WeakReference <
+ ::com::sun::star::accessibility::XAccessible > xWeakParent;
+
+ SwAccessibleMap *pMap; // must be protected by solar mutex
+
+ sal_uInt32 nClientId; // client id in the AccessibleEventNotifier queue
+ sal_Int16 nRole; // immutable outside constructor
+
+ // The current states (protected by mutex)
+ sal_Bool bIsShowingState : 1;
+ sal_Bool bIsEditableState : 1;
+ sal_Bool bIsOpaqueState : 1;
+ sal_Bool bIsDefuncState : 1;
+
+ // Are we currently disposing that object (protected by solar mutex)?
+ sal_Bool bDisposing : 1;
+
+ // --> OD 2008-03-10 #i85634#
+ // boolean, indicating if the accessible context is in general registered at
+ // the accessible map.
+ bool bRegisteredAtAccessibleMap;
+ // <--
+
+ void InitStates();
+
+protected:
+ void SetName( const ::rtl::OUString& rName ) { sName = rName; }
+ inline sal_Int16 GetRole() const
+ {
+ return nRole;
+ }
+
+ void SetParent( SwAccessibleContext *pParent );
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> GetWeakParent() const;
+
+ sal_Bool IsDisposing() const { return bDisposing; }
+
+ Window *GetWindow();
+ SwAccessibleMap *GetMap() { return pMap; }
+ const SwAccessibleMap *GetMap() const { return pMap; }
+
+ /** convenience method to get the SwViewShell through accessibility map */
+ inline ViewShell* GetShell()
+ {
+ return GetMap()->GetShell();
+ }
+ inline const ViewShell* GetShell() const
+ {
+ return GetMap()->GetShell();
+ }
+
+ /** convenience method to get SwCrsrShell through accessibility map
+ * @returns SwCrsrShell, or NULL if none is found */
+ SwCrsrShell* GetCrsrShell();
+ const SwCrsrShell* GetCrsrShell() const;
+
+ // Notify all children that the vis araea has changed.
+ // The SwFrm might belong to the current object or to any other child or
+ // grandchild.
+ void ChildrenScrolled( const SwFrm *pFrm, const SwRect& rOldVisArea );
+
+ // The context's showing state changed. May only be called for context that
+ // exist even if they aren't visible.
+ void Scrolled( const SwRect& rOldVisArea );
+
+ // A child has been moved while setting the vis area
+ void ScrolledWithin( const SwRect& rOldVisArea );
+
+ // The has been added while setting the vis area
+ void ScrolledIn();
+
+ // The context has to be removed while setting the vis area
+ void ScrolledOut( const SwRect& rOldVisArea );
+
+ // Invalidate the states of all children of the specified SwFrm. The
+ // SwFrm might belong the the current object or to any child or grandchild!
+ // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ void InvalidateChildrenStates( const SwFrm* _pFrm,
+ tAccessibleStates _nStates );
+ // <--
+
+ // Dispose children of the specified SwFrm. The SwFrm might belong to
+ // the current object or to any other child or grandchild.
+ void DisposeChildren( const SwFrm *pFrm,
+ sal_Bool bRecursive );
+
+ void DisposeShape( const SdrObject *pObj,
+ ::accessibility::AccessibleShape *pAccImpl );
+ void ScrolledInShape( const SdrObject *pObj,
+ ::accessibility::AccessibleShape *pAccImpl );
+
+ virtual void _InvalidateContent( sal_Bool bVisibleDataFired );
+
+ virtual void _InvalidateCursorPos();
+ virtual void _InvalidateFocus();
+
+public:
+
+ void FireAccessibleEvent( ::com::sun::star::accessibility::AccessibleEventObject& rEvent );
+
+protected:
+
+ // broadcast visual data event
+ void FireVisibleDataEvent();
+
+ // broadcast state change event
+ void FireStateChangedEvent( sal_Int16 nState, sal_Bool bNewState );
+
+ // Set states for getAccessibleStateSet.
+ // This base class sets DEFUNC(0/1), EDITABLE(0/1), ENABLED(1),
+ // SHOWING(0/1), OPAQUE(0/1) and VISIBLE(1).
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ sal_Bool IsEditableState();
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL
+ getBoundsImpl(sal_Bool bRelative)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // --> OD 2008-03-10 #i85634#
+ inline void NotRegisteredAtAccessibleMap()
+ {
+ bRegisteredAtAccessibleMap = false;
+ }
+ void RemoveFrmFromAccessibleMap();
+ // <--
+
+ virtual ~SwAccessibleContext();
+
+public:
+
+ SwAccessibleContext( SwAccessibleMap *pMap, sal_Int16 nRole,
+ const SwFrm *pFrm );
+
+ //===== XAccessible =====================================================
+
+ /// Return the XAccessibleContext.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+ getAccessibleContext (void) throw (com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild (sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return a reference to the parent.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL
+ getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return NULL to indicate that an empty relation set.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return the parents locale or throw exception if this object has no
+ parent yet/anymore.
+ */
+ virtual ::com::sun::star::lang::Locale SAL_CALL
+ getLocale (void)
+ throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleEventBroadcaster =====================================
+
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ============================================
+ virtual sal_Bool SAL_CALL containsPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //====== thread safe C++ interface ========================================
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+
+ // The child object is not visible an longer and should be destroyed
+ virtual void DisposeChild( const SwFrmOrObj& rFrmOrObj, sal_Bool bRecursive );
+
+ // The object has been moved by the layout
+ virtual void InvalidatePosOrSize( const SwRect& rFrm );
+
+ // The vhild object has been moved by the layout
+ virtual void InvalidateChildPosOrSize( const SwFrmOrObj& rFrmOrObj,
+ const SwRect& rFrm );
+
+ // The content may have changed (but it hasn't tohave changed)
+ void InvalidateContent();
+
+ // The caretPos has changed
+ void InvalidateCursorPos();
+
+ // The Focus state has changed
+ void InvalidateFocus();
+
+ // Check states
+ // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ void InvalidateStates( tAccessibleStates _nStates );
+ // <--
+
+ // the XAccessibleRelationSet may have changed
+ void InvalidateRelation( sal_uInt16 nType );
+
+ /** text selection has changed
+
+ OD 2005-12-14 #i27301#
+
+ @author OD
+ */
+ void InvalidateTextSelection();
+
+ /** attributes has changed
+
+ OD 2009-01-06 #i88069#
+
+ @author OD
+ */
+ void InvalidateAttr();
+
+ const ::rtl::OUString& GetName() const { return sName; }
+
+ virtual sal_Bool HasCursor(); // required by map to remember that object
+
+ sal_Bool Select( SwPaM *pPaM, SdrObject *pObj, sal_Bool bAdd );
+ inline sal_Bool Select( SwPaM& rPaM )
+ {
+ return Select( &rPaM, 0, sal_False );
+ }
+ inline sal_Bool Select( SdrObject *pObj, sal_Bool bAdd )
+ {
+ return Select( 0, pObj, bAdd );
+ }
+
+ static ::rtl::OUString GetResource( sal_uInt16 nResId,
+ const ::rtl::OUString *pArg1 = 0,
+ const ::rtl::OUString *pArg2 = 0 );
+
+
+};
+
+// some heaviliy used exception support
+const sal_Char sDefunc[] = "object is defunctional";
+const sal_Char sMissingWindow[] = "window is missing";
+
+#define THROW_RUNTIME_EXCEPTION( ifc, msg ) \
+ ::com::sun::star::uno::Reference < ifc > xThis( this ); \
+ ::com::sun::star::uno::RuntimeException aExcept( \
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(msg) ), xThis ); \
+ throw aExcept;
+
+#define CHECK_FOR_DEFUNC_THIS( ifc, ths ) \
+ if( !(GetFrm() && GetMap()) ) \
+ { \
+ ::com::sun::star::uno::Reference < ifc > xThis( ths ); \
+ ::com::sun::star::lang::DisposedException aExcept( \
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(sDefunc) ), \
+ xThis ); \
+ throw aExcept; \
+ }
+
+#define CHECK_FOR_DEFUNC( ifc ) \
+ CHECK_FOR_DEFUNC_THIS( ifc, this )
+
+#define CHECK_FOR_WINDOW( i, w ) \
+ if( !(w) ) \
+ { \
+ THROW_RUNTIME_EXCEPTION( i, sMissingWindow ); \
+ }
+#endif
+
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
new file mode 100644
index 000000000000..e0ca45c902c2
--- /dev/null
+++ b/sw/source/core/access/accdoc.cxx
@@ -0,0 +1,516 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accdoc.cxx,v $
+ * $Revision: 1.34 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#include <vcl/window.hxx>
+#include <rootfrm.hxx>
+
+
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <tools/link.hxx>
+#include <sfx2/viewsh.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <viewsh.hxx>
+#include <doc.hxx>
+#include <accmap.hxx>
+#include <accdoc.hxx>
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+#include <pagefrm.hxx>
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentView";
+
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+using lang::IndexOutOfBoundsException;
+
+
+
+//
+// SwAccessibleDocumentBase: base class for SwAccessibleDocument and
+// SwAccessiblePreview
+//
+
+SwAccessibleDocumentBase::SwAccessibleDocumentBase ( SwAccessibleMap* pInitMap ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::DOCUMENT,
+ pInitMap->GetShell()->getIDocumentLayoutAccess()->GetRootFrm() ),
+ mxParent( pInitMap->GetShell()->GetWin()->GetAccessibleParentWindow()->GetAccessible() ),
+ mpChildWin( 0 )
+{
+}
+
+SwAccessibleDocumentBase::~SwAccessibleDocumentBase()
+{
+}
+
+void SwAccessibleDocumentBase::SetVisArea()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ SwRect aOldVisArea( GetVisArea() );
+ const SwRect& rNewVisArea = GetMap()->GetVisArea();
+ if( aOldVisArea != rNewVisArea )
+ {
+ SwAccessibleFrame::SetVisArea( GetMap()->GetVisArea() );
+ // --> OD 2007-12-07 #i58139#
+ // showing state of document view needs also be updated.
+ // Thus, call method <Scrolled(..)> instead of <ChildrenScrolled(..)>
+// ChildrenScrolled( GetFrm(), aOldVisArea );
+ Scrolled( aOldVisArea );
+ // <--
+ }
+}
+
+void SwAccessibleDocumentBase::AddChild( Window *pWin, sal_Bool bFireEvent )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ASSERT( !mpChildWin, "only one child window is supported" );
+ if( !mpChildWin )
+ {
+ mpChildWin = pWin;
+
+ if( bFireEvent )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= mpChildWin->GetAccessible();
+ FireAccessibleEvent( aEvent );
+ }
+ }
+}
+
+void SwAccessibleDocumentBase::RemoveChild( Window *pWin )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ASSERT( !mpChildWin || pWin == mpChildWin, "invalid child window to remove" );
+ if( mpChildWin && pWin == mpChildWin )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.OldValue <<= mpChildWin->GetAccessible();
+ FireAccessibleEvent( aEvent );
+
+ mpChildWin = 0;
+ }
+}
+
+sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleChildCount( void )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // CHECK_FOR_DEFUNC is called by parent
+
+ sal_Int32 nChildren = SwAccessibleContext::getAccessibleChildCount();
+ if( !IsDisposing() && mpChildWin )
+ nChildren++;
+
+ return nChildren;
+}
+
+uno::Reference< XAccessible> SAL_CALL
+ SwAccessibleDocumentBase::getAccessibleChild( sal_Int32 nIndex )
+ throw (uno::RuntimeException,
+ lang::IndexOutOfBoundsException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( mpChildWin )
+ {
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+ if( nIndex == GetChildCount() )
+ return mpChildWin->GetAccessible();
+ }
+
+ return SwAccessibleContext::getAccessibleChild( nIndex );
+}
+
+
+uno::Reference< XAccessible> SAL_CALL SwAccessibleDocumentBase::getAccessibleParent (void)
+ throw (uno::RuntimeException)
+{
+ return mxParent;
+}
+
+sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ uno::Reference < XAccessibleContext > xAcc( mxParent->getAccessibleContext() );
+ uno::Reference < XAccessible > xThis( this );
+ sal_Int32 nCount = xAcc->getAccessibleChildCount();
+
+ for( sal_Int32 i=0; i < nCount; i++ )
+ {
+ if( xAcc->getAccessibleChild( i ) == xThis )
+ return i;
+ }
+ return -1L;
+}
+
+OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ return GetResource( STR_ACCESS_DOC_DESC );
+}
+
+awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ Window *pWin = GetWindow();
+
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Rectangle aPixBounds( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ) );
+ awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(),
+ aPixBounds.GetWidth(), aPixBounds.GetHeight() );
+
+ return aBox;
+}
+
+
+awt::Point SAL_CALL SwAccessibleDocumentBase::getLocation()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ Window *pWin = GetWindow();
+
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Point aPixPos( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ).TopLeft() );
+ awt::Point aLoc( aPixPos.X(), aPixPos.Y() );
+
+ return aLoc;
+}
+
+
+::com::sun::star::awt::Point SAL_CALL SwAccessibleDocumentBase::getLocationOnScreen()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ Window *pWin = GetWindow();
+
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Point aPixPos( pWin->GetWindowExtentsRelative( 0 ).TopLeft() );
+ awt::Point aLoc( aPixPos.X(), aPixPos.Y() );
+
+ return aLoc;
+}
+
+
+::com::sun::star::awt::Size SAL_CALL SwAccessibleDocumentBase::getSize()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ Window *pWin = GetWindow();
+
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Size aPixSize( pWin->GetWindowExtentsRelative( 0 ).GetSize() );
+ awt::Size aSize( aPixSize.Width(), aPixSize.Height() );
+
+ return aSize;
+}
+
+sal_Bool SAL_CALL SwAccessibleDocumentBase::containsPoint(
+ const awt::Point& aPoint )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ Window *pWin = GetWindow();
+
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Rectangle aPixBounds( pWin->GetWindowExtentsRelative( 0 ) );
+ aPixBounds.Move(-aPixBounds.Left(), -aPixBounds.Top());
+
+ Point aPixPoint( aPoint.X, aPoint.Y );
+ return aPixBounds.IsInside( aPixPoint );
+}
+
+uno::Reference< XAccessible > SAL_CALL SwAccessibleDocumentBase::getAccessibleAtPoint(
+ const awt::Point& aPoint )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( mpChildWin )
+ {
+ CHECK_FOR_DEFUNC( XAccessibleComponent )
+
+ Window *pWin = GetWindow();
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin )
+
+ Point aPixPoint( aPoint.X, aPoint.Y ); // px rel to window
+ if( mpChildWin->GetWindowExtentsRelative( pWin ).IsInside( aPixPoint ) )
+ return mpChildWin->GetAccessible();
+ }
+
+ return SwAccessibleContext::getAccessibleAtPoint( aPoint );
+}
+
+//
+// SwAccessibeDocument
+//
+
+void SwAccessibleDocument::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ SwAccessibleContext::GetStates( rStateSet );
+
+ // MULTISELECTABLE
+ rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
+}
+
+
+SwAccessibleDocument::SwAccessibleDocument ( SwAccessibleMap* pInitMap ) :
+ SwAccessibleDocumentBase( pInitMap ),
+ maSelectionHelper( *this )
+{
+ SetName( GetResource( STR_ACCESS_DOC_NAME ) );
+ Window *pWin = pInitMap->GetShell()->GetWin();
+ if( pWin )
+ {
+ pWin->AddChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
+ USHORT nCount = pWin->GetChildCount();
+ for( sal_uInt16 i=0; i < nCount; i++ )
+ {
+ Window* pChildWin = pWin->GetChild( i );
+ if( pChildWin &&
+ AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
+ AddChild( pChildWin, sal_False );
+ }
+ }
+}
+
+SwAccessibleDocument::~SwAccessibleDocument()
+{
+ Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : 0;
+ if( pWin )
+ pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
+}
+
+void SwAccessibleDocument::Dispose( sal_Bool bRecursive )
+{
+ ASSERT( GetFrm() && GetMap(), "already disposed" );
+
+ Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : 0;
+ if( pWin )
+ pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
+ SwAccessibleContext::Dispose( bRecursive );
+}
+
+IMPL_LINK( SwAccessibleDocument, WindowChildEventListener, VclSimpleEvent*, pEvent )
+{
+ DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
+ if ( pEvent && pEvent->ISA( VclWindowEvent ) )
+ {
+ VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
+ DBG_ASSERT( pVclEvent->GetWindow(), "Window???" );
+ switch ( pVclEvent->GetId() )
+ {
+ case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
+ {
+ Window* pChildWin = static_cast< Window* >( pVclEvent->GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
+ {
+ AddChild( pChildWin );
+ }
+ }
+ break;
+ case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ {
+ Window* pChildWin = static_cast< Window* >( pVclEvent->GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
+ {
+ RemoveChild( pChildWin );
+ }
+ }
+ break;
+ case VCLEVENT_OBJECT_DYING: // send destroy on hide for direct accessible children
+ {
+ Window* pChildWin = pVclEvent->GetWindow();
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
+ {
+ RemoveChild( pChildWin );
+ }
+ }
+ break;
+ }
+ }
+ return 0;
+}
+
+
+OUString SAL_CALL SwAccessibleDocument::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleDocument::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+uno::Sequence< OUString > SAL_CALL SwAccessibleDocument::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+//===== XInterface ======================================================
+
+uno::Any SwAccessibleDocument::queryInterface(
+ const uno::Type& rType )
+ throw ( uno::RuntimeException )
+{
+ uno::Any aRet;
+ if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ) )
+ {
+ uno::Reference<XAccessibleSelection> aSelect = this;
+ aRet <<= aSelect;
+ }
+ else
+ aRet = SwAccessibleContext::queryInterface( rType );
+ return aRet;
+}
+
+//====== XTypeProvider ====================================================
+uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< uno::Type > aTypes( SwAccessibleDocumentBase::getTypes() );
+
+ sal_Int32 nIndex = aTypes.getLength();
+ aTypes.realloc( nIndex + 1 );
+
+ uno::Type* pTypes = aTypes.getArray();
+ pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
+
+ return aTypes;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleDocument::getImplementationId()
+ throw(uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static uno::Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
+
+//===== XAccessibleSelection ============================================
+
+void SwAccessibleDocument::selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ maSelectionHelper.selectAccessibleChild(nChildIndex);
+}
+
+sal_Bool SwAccessibleDocument::isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ return maSelectionHelper.isAccessibleChildSelected(nChildIndex);
+}
+
+void SwAccessibleDocument::clearAccessibleSelection( )
+ throw ( uno::RuntimeException )
+{
+ maSelectionHelper.clearAccessibleSelection();
+}
+
+void SwAccessibleDocument::selectAllAccessibleChildren( )
+ throw ( uno::RuntimeException )
+{
+ maSelectionHelper.selectAllAccessibleChildren();
+}
+
+sal_Int32 SwAccessibleDocument::getSelectedAccessibleChildCount( )
+ throw ( uno::RuntimeException )
+{
+ return maSelectionHelper.getSelectedAccessibleChildCount();
+}
+
+uno::Reference<XAccessible> SwAccessibleDocument::getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException)
+{
+ return maSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
+}
+
+// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+void SwAccessibleDocument::deselectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ maSelectionHelper.deselectAccessibleChild( nChildIndex );
+}
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
new file mode 100644
index 000000000000..43188cc34c60
--- /dev/null
+++ b/sw/source/core/access/accdoc.hxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accdoc.hxx,v $
+ * $Revision: 1.23 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCDOC_HXX
+#define _ACCDOC_HXX
+#ifndef _ACCCONTEXT_HXX
+#include "acccontext.hxx"
+#endif
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <accselectionhelper.hxx>
+
+class VclSimpleEvent;
+
+/**
+ * base class for SwAccessibleDocument (in this same header file) and
+ * SwAccessiblePreview
+ */
+class SwAccessibleDocumentBase : public SwAccessibleContext
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> mxParent;
+
+ Window* mpChildWin; // protected by solar mutext
+
+ using SwAccessibleFrame::SetVisArea;
+
+protected:
+
+ virtual ~SwAccessibleDocumentBase();
+
+public:
+
+ SwAccessibleDocumentBase( SwAccessibleMap* pInitMap );
+
+ void SetVisArea();
+
+ virtual void AddChild( Window *pWin, sal_Bool bFireEvent = sal_True );
+ virtual void RemoveChild( Window *pWin );
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild (sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return a reference to the parent.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void) throw (com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ==============================================
+ virtual sal_Bool SAL_CALL containsPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+
+/**
+ * access to an accessible Writer document
+ */
+class SwAccessibleDocument : public SwAccessibleDocumentBase,
+ public com::sun::star::accessibility::XAccessibleSelection
+{
+ // Implementation for XAccessibleSelection interface
+ SwAccessibleSelectionHelper maSelectionHelper;
+
+protected:
+
+ // Set states for getAccessibleStateSet.
+ // This drived class additinaly sets MULTISELECTABLE(1)
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ virtual ~SwAccessibleDocument();
+
+public:
+
+ SwAccessibleDocument( SwAccessibleMap* pInitMap );
+
+ DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XInterface ======================================================
+
+ // XInterface is inherited through SwAcessibleContext and
+ // XAccessibleSelection. These methods are needed to avoid
+ // ambigiouties.
+
+ 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 ()
+ { SwAccessibleContext::acquire(); };
+
+ virtual void SAL_CALL release( ) throw ()
+ { SwAccessibleContext::release(); };
+
+ //====== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleSelection ============================================
+
+ virtual void SAL_CALL selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL clearAccessibleSelection( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL selectAllAccessibleChildren( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+ virtual void SAL_CALL deselectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ //====== thread safe C++ interface ========================================
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+};
+
+#endif
+
diff --git a/sw/source/core/access/accembedded.cxx b/sw/source/core/access/accembedded.cxx
new file mode 100644
index 000000000000..3e46d2e983eb
--- /dev/null
+++ b/sw/source/core/access/accembedded.cxx
@@ -0,0 +1,100 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accembedded.cxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vcl/svapp.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <rtl/uuid.h>
+#include <flyfrm.hxx>
+#include "accembedded.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextEmbeddedObject";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleEmbeddedObject";
+
+SwAccessibleEmbeddedObject::SwAccessibleEmbeddedObject(
+ SwAccessibleMap* pInitMap,
+ const SwFlyFrm* pFlyFrm ) :
+ SwAccessibleNoTextFrame( pInitMap, AccessibleRole::EMBEDDED_OBJECT, pFlyFrm )
+{
+}
+
+SwAccessibleEmbeddedObject::~SwAccessibleEmbeddedObject()
+{
+}
+
+OUString SAL_CALL SwAccessibleEmbeddedObject::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleEmbeddedObject::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+uno::Sequence< OUString > SAL_CALL SwAccessibleEmbeddedObject::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleEmbeddedObject::getImplementationId()
+ throw(uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static uno::Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
diff --git a/sw/source/core/access/accembedded.hxx b/sw/source/core/access/accembedded.hxx
new file mode 100644
index 000000000000..6b715da22bae
--- /dev/null
+++ b/sw/source/core/access/accembedded.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accembedded.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCEMBEDDED_HXX
+#define _ACCEMBEDDED_HXX
+#include "accnotextframe.hxx"
+
+class SwAccessibleEmbeddedObject : public SwAccessibleNoTextFrame
+{
+
+protected:
+
+ virtual ~SwAccessibleEmbeddedObject();
+
+public:
+
+ SwAccessibleEmbeddedObject( SwAccessibleMap* pInitMap,
+ const SwFlyFrm* pFlyFrm );
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
diff --git a/sw/source/core/access/accfootnote.cxx b/sw/source/core/access/accfootnote.cxx
new file mode 100644
index 000000000000..521812137a30
--- /dev/null
+++ b/sw/source/core/access/accfootnote.cxx
@@ -0,0 +1,160 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfootnote.cxx,v $
+ * $Revision: 1.16 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vos/mutex.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <rtl/uuid.h>
+#include <vcl/svapp.hxx>
+#include <ftnfrm.hxx>
+#include <fmtftn.hxx>
+#include <txtftn.hxx>
+#include <viewsh.hxx>
+#include <accmap.hxx>
+#include "accfootnote.hxx"
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+const sal_Char sServiceNameFootnote[] = "com.sun.star.text.AccessibleFootnoteView";
+const sal_Char sServiceNameEndnote[] = "com.sun.star.text.AccessibleEndnoteView";
+const sal_Char sImplementationNameFootnote[] = "com.sun.star.comp.Writer.SwAccessibleFootnoteView";
+const sal_Char sImplementationNameEndnote[] = "com.sun.star.comp.Writer.SwAccessibleEndnoteView";
+
+SwAccessibleFootnote::SwAccessibleFootnote(
+ SwAccessibleMap* pInitMap,
+ sal_Bool bIsEndnote,
+ sal_Int32 nFootEndNote,
+ const SwFtnFrm *pFtnFrm ) :
+ SwAccessibleContext( pInitMap,
+ bIsEndnote ? AccessibleRole::END_NOTE : AccessibleRole::FOOTNOTE,
+ pFtnFrm )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ sal_uInt16 nResId = bIsEndnote ? STR_ACCESS_ENDNOTE_NAME
+ : STR_ACCESS_FOOTNOTE_NAME;
+ OUString sArg( OUString::valueOf( nFootEndNote ) );
+ SetName( GetResource( nResId, &sArg ) );
+}
+
+SwAccessibleFootnote::~SwAccessibleFootnote()
+{
+}
+
+OUString SAL_CALL SwAccessibleFootnote::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ sal_uInt16 nResId = AccessibleRole::END_NOTE == GetRole()
+ ? STR_ACCESS_ENDNOTE_DESC
+ : STR_ACCESS_FOOTNOTE_DESC ;
+
+ OUString sArg;
+ const SwTxtFtn *pTxtFtn =
+ static_cast< const SwFtnFrm *>( GetFrm() )->GetAttr();
+ if( pTxtFtn )
+ {
+ const SwDoc *pDoc = GetMap()->GetShell()->GetDoc();
+ sArg = pTxtFtn->GetFtn().GetViewNumStr( *pDoc );
+ }
+
+ return GetResource( nResId, &sArg );
+}
+
+OUString SAL_CALL SwAccessibleFootnote::getImplementationName()
+ throw( RuntimeException )
+{
+ if( AccessibleRole::END_NOTE == GetRole() )
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationNameEndnote));
+ else
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationNameFootnote));
+}
+
+sal_Bool SAL_CALL SwAccessibleFootnote::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ if( sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 ) )
+ return sal_True;
+ else if( AccessibleRole::END_NOTE == GetRole() )
+ return sTestServiceName.equalsAsciiL( sServiceNameEndnote, sizeof(sServiceNameEndnote)-1 );
+ else
+ return sTestServiceName.equalsAsciiL( sServiceNameFootnote, sizeof(sServiceNameFootnote)-1 );
+
+}
+
+Sequence< OUString > SAL_CALL SwAccessibleFootnote::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ if( AccessibleRole::END_NOTE == GetRole() )
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceNameEndnote) );
+ else
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceNameFootnote) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+Sequence< sal_Int8 > SAL_CALL SwAccessibleFootnote::getImplementationId()
+ throw(RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
+
+sal_Bool SwAccessibleFootnote::IsEndnote( const SwFtnFrm *pFtnFrm )
+{
+ const SwTxtFtn *pTxtFtn = pFtnFrm ->GetAttr();
+ return pTxtFtn && pTxtFtn->GetFtn().IsEndNote() ;
+}
diff --git a/sw/source/core/access/accfootnote.hxx b/sw/source/core/access/accfootnote.hxx
new file mode 100644
index 000000000000..eb47ba82a446
--- /dev/null
+++ b/sw/source/core/access/accfootnote.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfootnote.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCFOOTNOTE_HXX
+#define _ACCFOOTNOTE_HXX
+#ifndef _ACCCONTEXT_HXX
+#include "acccontext.hxx"
+#endif
+
+class SwAccessibleFootnote : public SwAccessibleContext
+{
+
+protected:
+
+ virtual ~SwAccessibleFootnote();
+
+public:
+
+ SwAccessibleFootnote( SwAccessibleMap* pInitMap,
+ sal_Bool bIsEndnote,
+ sal_Int32 nFootEndNote,
+ const SwFtnFrm *pFtnFrm );
+
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ static sal_Bool IsEndnote( const SwFtnFrm *pFrm );
+};
+
+
+#endif
+
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
new file mode 100644
index 000000000000..a62afc11e551
--- /dev/null
+++ b/sw/source/core/access/accframe.cxx
@@ -0,0 +1,506 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accframe.cxx,v $
+ * $Revision: 1.26 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+
+#include <hintids.hxx>
+#include <svx/brshitem.hxx>
+#include <flyfrm.hxx>
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+#include <sectfrm.hxx>
+#include <pagefrm.hxx>
+#include <section.hxx>
+#include <viewsh.hxx>
+#include <viewopt.hxx>
+#include <doc.hxx>
+#include <frmatr.hxx>
+#include <pagefrm.hxx>
+#include <pagedesc.hxx>
+#include <fmtanchr.hxx>
+#include <fldbas.hxx>
+#include <dcontact.hxx>
+#include <accmap.hxx>
+#include <accfrmobjslist.hxx>
+#include <accfrmobjmap.hxx>
+#include <accframe.hxx>
+
+
+// Regarding visibilily (or in terms of accessibility: regarding the showing
+// state): A frame is visible and therfor contained in the tree if its frame
+// size overlaps with the visible area. The bounding box however is the
+// frame's paint area.
+sal_Int32 SwAccessibleFrame::GetChildCount( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bInPagePreview )
+{
+ sal_Int32 nCount = 0;
+
+ const SwFrmOrObjSList aVisList( rVisArea, pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ nCount++;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ nCount += GetChildCount( rVisArea, rLower.GetSwFrm(),
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+
+ return nCount;
+}
+
+SwFrmOrObj SwAccessibleFrame::GetChild( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
+{
+ SwFrmOrObj aRet;
+
+ if( rPos >= 0 )
+ {
+ if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ {
+ // We need a sorted list here
+ const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
+ SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() );
+ while( aIter != aVisMap.end() && !aRet.IsValid() )
+ {
+ const SwFrmOrObj& rLower = (*aIter).second;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ if( 0 == rPos )
+ aRet = rLower;
+ else
+ rPos--;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ aRet = GetChild( rVisArea, rLower.GetSwFrm(), rPos,
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it return lower
+ // frames in the correct order.
+ const SwFrmOrObjSList aVisList( rVisArea, pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() && !aRet.IsValid() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ if( 0 == rPos )
+ aRet = rLower;
+ else
+ rPos--;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ aRet = GetChild( rVisArea, rLower.GetSwFrm(), rPos,
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ }
+
+ return aRet;
+}
+
+sal_Bool SwAccessibleFrame::GetChildIndex( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ const SwFrmOrObj& rChild,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
+{
+ sal_Bool bFound = sal_False;
+
+ if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ {
+ // We need a sorted list here
+ const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
+ SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() );
+ while( aIter != aVisMap.end() && !bFound )
+ {
+ const SwFrmOrObj& rLower = (*aIter).second;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ if( rChild == rLower )
+ bFound = sal_True;
+ else
+ rPos++;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ bFound = GetChildIndex( rVisArea, rLower.GetSwFrm(), rChild,
+ rPos, bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it return lower
+ // frames in the correct order.
+ const SwFrmOrObjSList aVisList( rVisArea, pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() && !bFound )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ if( rChild == rLower )
+ bFound = sal_True;
+ else
+ rPos++;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ bFound = GetChildIndex( rVisArea, rLower.GetSwFrm(), rChild,
+ rPos, bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+
+ return bFound;
+}
+
+SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ const Point& rPixPos,
+ sal_Bool bInPagePreview,
+ const SwAccessibleMap *pMap )
+{
+ SwFrmOrObj aRet;
+
+ if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ {
+ // We need a sorted list here, and we have to reverse iterate,
+ // because objects in front should be returned.
+ const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
+ SwFrmOrObjMap::const_reverse_iterator aRIter( aVisMap.rbegin() );
+ while( aRIter != aVisMap.rend() && !aRet.IsValid() )
+ {
+ const SwFrmOrObj& rLower = (*aRIter).second;
+ // A frame is returned if it's frame size is inside the visarea
+ // and the positiion is inside the frame's paint area.
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ SwRect aLogBounds( rLower.GetBounds( ) );
+ if( !aLogBounds.IsEmpty() )
+ {
+ Rectangle aPixBounds( pMap->CoreToPixel( aLogBounds.SVRect() ) );
+ if( aPixBounds.IsInside( rPixPos ) )
+ aRet = rLower;
+ }
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ aRet = GetChildAtPixel( rVisArea, rLower.GetSwFrm(), rPixPos,
+ bInPagePreview, pMap );
+ }
+ aRIter++;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it returns lower
+ // frames in the correct order. Morover, we can iterate forward,
+ // because the lowers don't overlap!
+ const SwFrmOrObjSList aVisList( rVisArea, pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() && !aRet.IsValid() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ // A frame is returned if it's frame size is inside the visarea
+ // and the positiion is inside the frame's paint area.
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ SwRect aLogBounds( rLower.GetBounds( ) );
+ if( !aLogBounds.IsEmpty() )
+ {
+ Rectangle aPixBounds( pMap->CoreToPixel( aLogBounds.SVRect() ) );
+ if( aPixBounds.IsInside( rPixPos ) )
+ aRet = rLower;
+ }
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ aRet = GetChildAtPixel( rVisArea, rLower.GetSwFrm(), rPixPos,
+ bInPagePreview, pMap );
+ }
+ ++aIter;
+ }
+ }
+
+ return aRet;
+}
+
+void SwAccessibleFrame::GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
+ ::std::list< SwFrmOrObj >& rChildren,
+ sal_Bool bInPagePreview )
+{
+ if( SwFrmOrObjMap::IsSortingRequired( pFrm ) )
+ {
+ // We need a sorted list here
+ const SwFrmOrObjMap aVisMap( rVisArea, pFrm );
+ SwFrmOrObjMap::const_iterator aIter( aVisMap.begin() );
+ while( aIter != aVisMap.end() )
+ {
+ const SwFrmOrObj& rLower = (*aIter).second;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ rChildren.push_back( rLower );
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ GetChildren( rVisArea, rLower.GetSwFrm(), rChildren,
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it return lower
+ // frames in the correct order.
+ const SwFrmOrObjSList aVisList( rVisArea, pFrm );
+ SwFrmOrObjSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwFrmOrObj& rLower = *aIter;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ rChildren.push_back( rLower );
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ GetChildren( rVisArea, rLower.GetSwFrm(), rChildren,
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+}
+
+SwRect SwAccessibleFrame::GetBounds( const SwFrm *pFrm )
+{
+ if( !pFrm )
+ pFrm = GetFrm();
+
+ SwFrmOrObj aFrm( pFrm );
+ SwRect aBounds( aFrm.GetBounds().Intersection( maVisArea ) );
+ return aBounds;
+}
+
+sal_Bool SwAccessibleFrame::IsEditable( ViewShell *pVSh ) const
+{
+ const SwFrm *pFrm = GetFrm();
+ if( !pFrm )
+ return sal_False;
+
+ ASSERT( pVSh, "no view shell" );
+ if( pVSh && (pVSh->GetViewOptions()->IsReadonly() ||
+ pVSh->IsPreView()) )
+ return sal_False;
+
+ if( !pFrm->IsRootFrm() && pFrm->IsProtected() )
+ return sal_False;
+
+ return sal_True;
+}
+
+sal_Bool SwAccessibleFrame::IsOpaque( ViewShell *pVSh ) const
+{
+ SwFrmOrObj aFrm( GetFrm() );
+ if( !aFrm.GetSwFrm() )
+ return sal_False;
+
+ ASSERT( pVSh, "no view shell" );
+ if( !pVSh )
+ return sal_False;
+
+ const SwViewOption *pVOpt = pVSh->GetViewOptions();
+ do
+ {
+ const SwFrm *pFrm = aFrm.GetSwFrm();
+ if( pFrm->IsRootFrm() )
+ return sal_True;
+
+ if( pFrm->IsPageFrm() && !pVOpt->IsPageBack() )
+ return sal_False;
+
+ const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground();
+ if( !rBack.GetColor().GetTransparency() ||
+ rBack.GetGraphicPos() != GPOS_NONE )
+ return sal_True;
+
+ /// OD 20.08.2002 #99657#
+ /// If a fly frame has a transparent background color, we have
+ /// to consider the background.
+ /// But a background color "no fill"/"auto fill" has *not* to be considered.
+ if( pFrm->IsFlyFrm() &&
+ (rBack.GetColor().GetTransparency() != 0) &&
+ (rBack.GetColor() != COL_TRANSPARENT)
+ )
+ return sal_True;
+
+ if( pFrm->IsSctFrm() )
+ {
+ const SwSection* pSection = ((SwSectionFrm*)pFrm)->GetSection();
+ if( pSection && ( TOX_HEADER_SECTION == pSection->GetType() ||
+ TOX_CONTENT_SECTION == pSection->GetType() ) &&
+ !pVOpt->IsReadonly() &&
+ SwViewOption::IsIndexShadings() )
+ return sal_True;
+ }
+ if( pFrm->IsFlyFrm() )
+ aFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm();
+ else
+ aFrm = pFrm->GetUpper();
+ } while( aFrm.GetSwFrm() && !aFrm.IsAccessible( IsInPagePreview() ) );
+
+ return sal_False;
+}
+
+SwAccessibleFrame::SwAccessibleFrame( const SwRect& rVisArea,
+ const SwFrm *pF,
+ sal_Bool bIsPagePreview ) :
+ maVisArea( rVisArea ),
+ mpFrm( pF ),
+ mbIsInPagePreview( bIsPagePreview )
+{
+}
+
+SwAccessibleFrame::~SwAccessibleFrame()
+{
+}
+
+const SwFrm *SwAccessibleFrame::GetParent( const SwFrmOrObj& rFrmOrObj,
+ sal_Bool bInPagePreview )
+{
+ SwFrmOrObj aParent;
+ const SwFrm *pFrm = rFrmOrObj.GetSwFrm();
+ if( pFrm )
+ {
+ if( pFrm->IsFlyFrm() )
+ {
+ const SwFlyFrm *pFly = static_cast< const SwFlyFrm *>( pFrm );
+ if( pFly->IsFlyInCntFrm() )
+ {
+ // For FLY_IN_CNTNT the parent is the anchor
+ aParent = pFly->GetAnchorFrm();
+ ASSERT( aParent.IsAccessible( bInPagePreview ),
+ "parent is not accessible" );
+ }
+ else
+ {
+ // In any other case the parent is the root frm
+ // (in page preview, the page frame)
+ if( bInPagePreview )
+ aParent = pFly->FindPageFrm();
+ else
+ aParent = pFly->FindRootFrm();
+ }
+ }
+ else
+ {
+ SwFrmOrObj aUpper( pFrm->GetUpper() );
+ while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) )
+ aUpper = aUpper.GetSwFrm()->GetUpper();
+ aParent = aUpper;
+ }
+ }
+ else if( rFrmOrObj.GetSdrObject() )
+ {
+ const SwDrawContact *pContact =
+ static_cast< const SwDrawContact* >(
+ GetUserCall( rFrmOrObj.GetSdrObject() ) );
+ ASSERT( pContact, "sdr contact is missing" );
+ if( pContact )
+ {
+ const SwFrmFmt *pFrmFmt = pContact->GetFmt();
+ ASSERT( pFrmFmt, "frame format is missing" );
+ if( pFrmFmt && FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId() )
+ {
+ // For FLY_IN_CNTNT the parent is the anchor
+ aParent = pContact->GetAnchorFrm();
+ ASSERT( aParent.IsAccessible( bInPagePreview ),
+ "parent is not accessible" );
+
+ }
+ else
+ {
+ // In any other case the parent is the root frm
+ if( bInPagePreview )
+ aParent = pContact->GetAnchorFrm()->FindPageFrm();
+ else
+ aParent = pContact->GetAnchorFrm()->FindRootFrm();
+ }
+ }
+ }
+
+ return aParent.GetSwFrm();
+}
+
+String SwAccessibleFrame::GetFormattedPageNumber() const
+{
+ sal_uInt16 nPageNum = GetFrm()->GetVirtPageNum();
+ sal_uInt32 nFmt = GetFrm()->FindPageFrm()->GetPageDesc()
+ ->GetNumType().GetNumberingType();
+ if( SVX_NUM_NUMBER_NONE == nFmt )
+ nFmt = SVX_NUM_ARABIC;
+
+ String sRet( FormatNumber( nPageNum, nFmt ) );
+ return sRet;
+}
diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx
new file mode 100644
index 000000000000..c1c385cdcf4d
--- /dev/null
+++ b/sw/source/core/access/accframe.hxx
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accframe.hxx,v $
+ * $Revision: 1.19 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCFRAME_HXX
+#define _ACCFRAME_HXX
+
+#include <sal/types.h>
+
+#include <list>
+#include <accfrmobj.hxx>
+
+// Any method of this class must be called with an acquired solar mutex!
+
+class SwAccessibleMap;
+
+class SwAccessibleFrame
+{
+ SwRect maVisArea;
+ const SwFrm* mpFrm;
+ const sal_Bool mbIsInPagePreview;
+
+protected:
+ // --> OD 2007-06-29 #i77106#
+ // method needs to be called by new class <SwAccessibleTableColHeaders>
+ static sal_Int32 GetChildCount( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bInPagePreview );
+private:
+ static SwFrmOrObj GetChild( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview);
+ static sal_Bool GetChildIndex( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ const SwFrmOrObj& rChild,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview );
+ static SwFrmOrObj GetChildAtPixel( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ const Point& rPos,
+ sal_Bool bInPagePreview,
+ const SwAccessibleMap *pMap );
+ static void GetChildren( const SwRect& rVisArea, const SwFrm *pFrm,
+ ::std::list< SwFrmOrObj >& rChildren,
+ sal_Bool bInPagePreview );
+
+protected:
+
+ sal_Bool IsEditable( ViewShell *pVSh ) const;
+
+ sal_Bool IsOpaque( ViewShell *pVSh ) const;
+
+ inline sal_Bool IsShowing( const SwRect& rFrm ) const;
+ inline sal_Bool IsShowing( const SwFrmOrObj& rFrmOrObj ) const;
+ inline sal_Bool IsShowing() const;
+
+ inline sal_Bool IsInPagePreview() const
+ {
+ return mbIsInPagePreview;
+ }
+
+ inline void ClearFrm()
+ {
+ mpFrm = 0;
+ }
+
+ SwAccessibleFrame( const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bIsPagePreview );
+ virtual ~SwAccessibleFrame();
+
+public:
+ // Return the SwFrm this context is attached to.
+ const SwFrm *GetFrm() const { return mpFrm; };
+
+
+ static const SwFrm *GetParent( const SwFrmOrObj& rFrmOrObj,
+ sal_Bool bInPagePreview );
+
+protected:
+
+ // Return the bounding box of the frame clipped to the vis area. If
+ // no frame is specified, use this' frame.
+ SwRect GetBounds( const SwFrm *pFrm=0 );
+
+ // Return the upper that has a context attached. This might be
+ // another one than the immediate upper.
+ inline const SwFrm *GetParent() const;
+
+ // Return the lower count or the nth lower, there the lowers have a
+ // not be same one as the SwFrm's lowers
+ inline sal_Int32 GetChildCount() const;
+ inline SwFrmOrObj GetChild( sal_Int32 nPos ) const;
+ inline sal_Int32 GetChildIndex( const SwFrmOrObj& rChild ) const;
+ inline SwFrmOrObj GetChildAtPixel( const Point& rPos,
+ const SwAccessibleMap *pMap ) const;
+ inline void GetChildren( ::std::list< SwFrmOrObj >& rChildren ) const;
+
+ inline void SetVisArea( const SwRect& rNewVisArea )
+ {
+ maVisArea = rNewVisArea;
+ }
+
+ inline const SwRect& GetVisArea() const
+ {
+ return maVisArea;
+ }
+
+
+ String GetFormattedPageNumber() const;
+};
+
+inline sal_Bool SwAccessibleFrame::IsShowing( const SwRect& rFrm ) const
+{
+ return rFrm.IsOver( maVisArea );
+}
+
+inline sal_Bool SwAccessibleFrame::IsShowing( const SwFrmOrObj& rFrmOrObj ) const
+{
+ return IsShowing( rFrmOrObj.GetBox() );
+}
+
+inline sal_Bool SwAccessibleFrame::IsShowing() const
+{
+ SwFrmOrObj aFrmOrObj( GetFrm() );
+ return IsShowing( aFrmOrObj );
+}
+
+inline const SwFrm *SwAccessibleFrame::GetParent() const
+{
+ SwFrmOrObj aFrmOrObj( GetFrm() );
+ return GetParent( aFrmOrObj, IsInPagePreview() );
+}
+
+inline sal_Int32 SwAccessibleFrame::GetChildCount() const
+{
+ return GetChildCount( maVisArea, mpFrm, IsInPagePreview() );
+}
+
+inline SwFrmOrObj SwAccessibleFrame::GetChild( sal_Int32 nPos ) const
+{
+ return GetChild( maVisArea, mpFrm, nPos, IsInPagePreview() );
+}
+
+inline sal_Int32 SwAccessibleFrame::GetChildIndex( const SwFrmOrObj& rChild ) const
+{
+ sal_Int32 nPos = 0;
+ return GetChildIndex( maVisArea, mpFrm, rChild, nPos, IsInPagePreview() ) ? nPos : -1L;
+}
+
+inline SwFrmOrObj SwAccessibleFrame::GetChildAtPixel( const Point& rPos,
+ const SwAccessibleMap *pMap ) const
+{
+ return GetChildAtPixel( maVisArea, mpFrm, rPos, IsInPagePreview(), pMap );
+}
+
+inline void SwAccessibleFrame::GetChildren( ::std::list< SwFrmOrObj >& rChildren ) const
+{
+ GetChildren( maVisArea, mpFrm, rChildren, IsInPagePreview() );
+}
+#endif
+
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
new file mode 100644
index 000000000000..404a72f91172
--- /dev/null
+++ b/sw/source/core/access/accframebase.cxx
@@ -0,0 +1,280 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accframebase.cxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <frmfmt.hxx>
+#include <ndnotxt.hxx>
+#include <flyfrm.hxx>
+#include <cntfrm.hxx>
+#include <fmtcntnt.hxx>
+#include <ndindex.hxx>
+#include "fesh.hxx"
+#include <hints.hxx>
+#include "accmap.hxx"
+#include "accframebase.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+sal_Bool SwAccessibleFrameBase::IsSelected()
+{
+ sal_Bool bRet = sal_False;
+
+ DBG_ASSERT( GetMap(), "no map?" );
+ const ViewShell *pVSh = GetMap()->GetShell();
+ DBG_ASSERT( pVSh, "no shell?" );
+ if( pVSh->ISA( SwFEShell ) )
+ {
+ const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh );
+ const SwFrm *pFlyFrm = pFESh->GetCurrFlyFrm();
+ if( pFlyFrm == GetFrm() )
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+void SwAccessibleFrameBase::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ SwAccessibleContext::GetStates( rStateSet );
+
+ const ViewShell *pVSh = GetMap()->GetShell();
+ DBG_ASSERT( pVSh, "no shell?" );
+ sal_Bool bSelectable = pVSh->ISA( SwFEShell );
+
+ // SELECTABLE
+ if( bSelectable )
+ rStateSet.AddState( AccessibleStateType::SELECTABLE );
+
+ // FOCUSABLE
+ if( bSelectable )
+ rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+
+ // SELECTED and FOCUSED
+ if( IsSelected() )
+ {
+ rStateSet.AddState( AccessibleStateType::SELECTED );
+ ASSERT( bIsSelected, "bSelected out of sync" );
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() )
+ rStateSet.AddState( AccessibleStateType::FOCUSED );
+ }
+}
+
+
+sal_uInt8 SwAccessibleFrameBase::GetNodeType( const SwFlyFrm *pFlyFrm )
+{
+ sal_uInt8 nType = ND_TEXTNODE;
+ if( pFlyFrm->Lower() )
+ {
+ if( pFlyFrm->Lower()->IsNoTxtFrm() )
+ {
+ const SwCntntFrm *pCntFrm =
+ static_cast<const SwCntntFrm *>( pFlyFrm->Lower() );
+ nType = pCntFrm->GetNode()->GetNodeType();
+ }
+ }
+ else
+ {
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
+ const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx();
+ if( pNdIdx )
+ {
+ const SwCntntNode *pCNd =
+ (pNdIdx->GetNodes())[pNdIdx->GetIndex()+1]->GetCntntNode();
+ if( pCNd )
+ nType = pCNd->GetNodeType();
+ }
+ }
+
+ return nType;
+}
+
+SwAccessibleFrameBase::SwAccessibleFrameBase(
+ SwAccessibleMap* pInitMap,
+ sal_Int16 nInitRole,
+ const SwFlyFrm* pFlyFrm ) :
+ SwAccessibleContext( pInitMap, nInitRole, pFlyFrm ),
+ bIsSelected( sal_False )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
+
+ SetName( pFrmFmt->GetName() );
+
+ bIsSelected = IsSelected();
+}
+
+void SwAccessibleFrameBase::_InvalidateCursorPos()
+{
+ sal_Bool bNewSelected = IsSelected();
+ sal_Bool bOldSelected;
+
+ {
+ vos::OGuard aGuard( aMutex );
+ bOldSelected = bIsSelected;
+ bIsSelected = bNewSelected;
+ }
+
+ if( bNewSelected )
+ {
+ // remember that object as the one that has the caret. This is
+ // neccessary to notify that object if the cursor leaves it.
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+
+ if( bOldSelected != bNewSelected )
+ {
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() && bNewSelected )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, bNewSelected );
+ FireStateChangedEvent( AccessibleStateType::SELECTED, bNewSelected );
+ if( pWin && pWin->HasFocus() && !bNewSelected )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, bNewSelected );
+
+ uno::Reference< XAccessible > xParent( GetWeakParent() );
+ if( xParent.is() )
+ {
+ SwAccessibleContext *pAcc =
+ static_cast <SwAccessibleContext *>( xParent.get() );
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ pAcc->FireAccessibleEvent( aEvent );
+ }
+ }
+}
+
+void SwAccessibleFrameBase::_InvalidateFocus()
+{
+ Window *pWin = GetWindow();
+ if( pWin )
+ {
+ sal_Bool bSelected;
+
+ {
+ vos::OGuard aGuard( aMutex );
+ bSelected = bIsSelected;
+ }
+ ASSERT( bSelected, "focus object should be selected" );
+
+ FireStateChangedEvent( AccessibleStateType::FOCUSED,
+ pWin->HasFocus() && bSelected );
+ }
+}
+
+sal_Bool SwAccessibleFrameBase::HasCursor()
+{
+ vos::OGuard aGuard( aMutex );
+ return bIsSelected;
+}
+
+
+SwAccessibleFrameBase::~SwAccessibleFrameBase()
+{
+}
+
+void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+{
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
+ switch( nWhich )
+ {
+ case RES_NAME_CHANGED:
+ if( pFlyFrm )
+ {
+ const SwFrmFmt *pFrmFmt = pFlyFrm->GetFmt();
+ ASSERT( pFrmFmt == GetRegisteredIn(), "invalid frame" );
+
+ OUString sOldName( GetName() );
+ ASSERT( !pOld ||
+ static_cast < SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
+ "invalid old name" );
+
+ const String& rNewName = pFrmFmt->GetName();
+ SetName( rNewName );
+ ASSERT( !pNew ||
+ static_cast < SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
+ "invalid new name" );
+
+ if( sOldName != GetName() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+ aEvent.OldValue <<= sOldName;
+ aEvent.NewValue <<= GetName();
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ break;
+ case RES_OBJECTDYING:
+ if( GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ pRegisteredIn->Remove( this );
+ break;
+
+ case RES_FMT_CHG:
+ if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
+ pRegisteredIn->Remove( this );
+ break;
+ default:
+ SwClient::Modify( pOld, pNew );
+ break;
+ }
+}
+
+void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( GetRegisteredIn() )
+ pRegisteredIn->Remove( this );
+
+ SwAccessibleContext::Dispose( bRecursive );
+}
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
new file mode 100644
index 000000000000..0b667996e066
--- /dev/null
+++ b/sw/source/core/access/accframebase.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accframebase.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCFRAMEBASE_HXX
+#define _ACCFRAMEBASE_HXX
+#ifndef _ACCCONTEXT_HXX
+#include "acccontext.hxx"
+#endif
+
+class SwFlyFrm;
+
+class SwAccessibleFrameBase : public SwAccessibleContext, public SwClient
+{
+ sal_Bool bIsSelected; // protected by base class mutex
+
+ sal_Bool IsSelected();
+
+protected:
+
+ // Set states for getAccessibleStateSet.
+ // This drived class additionaly sets SELECTABLE(1), SELECTED(+),
+ // FOCUSABLE(1) and FOCUSED(+)
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ virtual void _InvalidateCursorPos();
+ virtual void _InvalidateFocus();
+
+ virtual ~SwAccessibleFrameBase();
+
+public:
+
+ SwAccessibleFrameBase( SwAccessibleMap* pInitMap,
+ sal_Int16 nInitRole,
+ const SwFlyFrm *pFlyFrm );
+
+ virtual sal_Bool HasCursor(); // required by map to remember that object
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm );
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+};
+
+
+#endif
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
new file mode 100644
index 000000000000..f16d11692c9c
--- /dev/null
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -0,0 +1,66 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfrmobj.cxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <frmfmt.hxx>
+#include <fmtanchr.hxx>
+#include <accfrmobj.hxx>
+#include <dcontact.hxx>
+#include <cellfrm.hxx>
+
+sal_Bool SwFrmOrObj::IsAccessible( sal_Bool bPagePreview ) const
+{
+ return ( pFrm && pFrm->IsAccessibleFrm() &&
+ ( !pFrm->IsCellFrm() ||
+ static_cast<const SwCellFrm *>( pFrm )->GetTabBox()->GetSttNd() != 0 ) &&
+ !pFrm->IsInCoveredCell() &&
+ ( bPagePreview || !pFrm->IsPageFrm() ) ) ||
+ pObj;
+}
+
+sal_Bool SwFrmOrObj::IsBoundAsChar() const
+{
+ // currently only SwFrms are accessible
+ if( pFrm )
+ {
+ return pFrm->IsFlyFrm() &&
+ static_cast< const SwFlyFrm *>(pFrm)->IsFlyInCntFrm();
+ }
+ else
+ {
+ const SwFrmFmt *pFrmFmt = pObj ? ::FindFrmFmt( pObj ) : 0;
+ return pFrmFmt ? static_cast<sal_Bool>(FLY_IN_CNTNT == pFrmFmt->GetAnchor().GetAnchorId())
+ : sal_False;
+ }
+}
+
diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx
new file mode 100644
index 000000000000..27bec508563a
--- /dev/null
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfrmobj.hxx,v $
+ * $Revision: 1.16 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCFRMOBJ_HXX
+#define _ACCFRMOBJ_HXX
+#include <flyfrm.hxx>
+#include <pagefrm.hxx>
+#include <dflyobj.hxx>
+#include <swtable.hxx>
+
+class SwFrmOrObj
+{
+ const SdrObject *pObj;
+ const SwFrm *pFrm;
+
+ inline void Init( const SdrObject *pO );
+ inline void Init( const SwFrm *pF );
+
+public:
+
+ inline SwFrmOrObj();
+ inline SwFrmOrObj( const SdrObject *pO );
+ inline SwFrmOrObj( const SwFrm *pF );
+ inline SwFrmOrObj( const SwFrm *pF, const SdrObject *pO );
+ inline SwFrmOrObj( const SwFrmOrObj& r );
+
+ inline SwFrmOrObj& operator=( const SwFrmOrObj& r );
+ inline SwFrmOrObj& operator=( const SdrObject *pO );
+ inline SwFrmOrObj& operator=( const SwFrm *pF );
+
+ inline sal_Bool operator==( const SwFrmOrObj& r ) const;
+ inline sal_Bool operator==( const SdrObject *pO ) const;
+ inline sal_Bool operator==( const SwFrm *pF ) const;
+
+ inline sal_Bool IsValid() const;
+
+ inline const SdrObject *GetSdrObject() const;
+ inline const SwFrm *GetSwFrm() const;
+
+ sal_Bool IsAccessible( sal_Bool bPagePreview ) const;
+ sal_Bool IsBoundAsChar() const;
+ inline sal_Bool IsVisibleChildrenOnly() const;
+ inline SwRect GetBox() const;
+ inline SwRect GetBounds() const;
+};
+
+inline void SwFrmOrObj::Init( const SdrObject *pO )
+{
+ pObj = pO;
+ // #110094#-1
+ pFrm = pObj && pObj->ISA(SwVirtFlyDrawObj)
+ ? static_cast < const SwVirtFlyDrawObj * >( pObj )->GetFlyFrm()
+ : 0;
+}
+
+inline void SwFrmOrObj::Init( const SwFrm *pF )
+{
+ pFrm = pF;
+ pObj = pFrm && pFrm->IsFlyFrm()
+ ? static_cast < const SwFlyFrm * >( pFrm )->GetVirtDrawObj()
+ : 0;
+}
+
+inline SwFrmOrObj::SwFrmOrObj() :
+ pObj( 0 ), pFrm( 0 )
+{}
+
+inline SwFrmOrObj::SwFrmOrObj( const SdrObject *pO )
+{
+ Init( pO );
+}
+
+inline SwFrmOrObj::SwFrmOrObj( const SwFrm *pF )
+{
+ Init( pF );
+}
+
+inline SwFrmOrObj::SwFrmOrObj( const SwFrm *pF, const SdrObject *pO )
+{
+ if( pF )
+ Init( pF );
+ else
+ Init( pO );
+ ASSERT( (!pF || pF == pFrm) && (!pO || pO == pObj),
+ "invalid frame/object combination" );
+
+}
+
+inline SwFrmOrObj::SwFrmOrObj( const SwFrmOrObj& r ) :
+ pObj( r.pObj ), pFrm( r.pFrm )
+{}
+
+inline SwFrmOrObj& SwFrmOrObj::operator=( const SwFrmOrObj& r )
+{
+ pObj = r.pObj;
+ pFrm = r.pFrm;
+ return *this;
+}
+
+inline SwFrmOrObj& SwFrmOrObj::operator=( const SdrObject *pO )
+{
+ Init( pO );
+ return *this;
+}
+
+inline SwFrmOrObj& SwFrmOrObj::operator=( const SwFrm *pF )
+{
+ Init( pF );
+ return *this;
+}
+
+inline sal_Bool SwFrmOrObj::operator==( const SwFrmOrObj& r ) const
+{
+ return pObj == r.pObj && pFrm == r.pFrm;
+}
+
+inline sal_Bool SwFrmOrObj::operator==( const SdrObject *pO ) const
+{
+ return pObj == pO;
+}
+
+inline sal_Bool SwFrmOrObj::operator==( const SwFrm *pF ) const
+{
+ return pFrm == pF;
+}
+
+inline sal_Bool SwFrmOrObj::IsValid() const
+{
+ return pObj != 0 || pFrm != 0;
+}
+
+inline const SdrObject *SwFrmOrObj::GetSdrObject() const
+{
+ return pObj;
+}
+
+inline const SwFrm *SwFrmOrObj::GetSwFrm() const
+{
+ return pFrm;
+}
+
+inline sal_Bool SwFrmOrObj::IsVisibleChildrenOnly() const
+{
+ return !pFrm || pFrm->IsRootFrm() ||
+ !( pFrm->IsTabFrm() || pFrm->IsInTab() ||
+ ( IsBoundAsChar() &&
+ static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm()->IsInTab()) );
+}
+
+inline SwRect SwFrmOrObj::GetBox() const
+{
+ if( pFrm )
+ {
+ if( pFrm->IsPageFrm() &&
+ static_cast< const SwPageFrm * >( pFrm )->IsEmptyPage() )
+ {
+ SwRect aBox( pFrm->Frm().Left(), pFrm->Frm().Top()-1, 1, 1 );
+ return aBox;
+ }
+ else if ( pFrm->IsTabFrm() )
+ {
+ SwRect aBox( pFrm->Frm() );
+ aBox.Intersection( pFrm->GetUpper()->Frm() );
+ return aBox;
+ }
+ else
+ return pFrm->Frm();
+ }
+ else if( pObj )
+ return SwRect( pObj->GetCurrentBoundRect() );
+ else
+ return SwRect();
+}
+
+inline SwRect SwFrmOrObj::GetBounds() const
+{
+ if( pFrm )
+ {
+ if( pFrm->IsPageFrm() &&
+ static_cast< const SwPageFrm * >( pFrm )->IsEmptyPage() )
+ {
+ SwRect aBox( pFrm->Frm().Left(), pFrm->Frm().Top()-1, 0, 0 );
+ return aBox;
+ }
+ else
+ return pFrm->PaintArea();
+ }
+ else if( pObj )
+ return SwRect( pObj->GetCurrentBoundRect() );
+ return SwRect();
+}
+
+
+#endif
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
new file mode 100644
index 000000000000..cc016f5e5b52
--- /dev/null
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -0,0 +1,125 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfrmobjmap.cxx,v $
+ * $Revision: 1.8 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <doc.hxx>
+#include <frmfmt.hxx>
+#include <pagefrm.hxx>
+#include <txtfrm.hxx>
+#include <node.hxx>
+// OD 2004-05-24 #i28701#
+#include <sortedobjs.hxx>
+
+#ifndef _ACCFFRMOBJMAP_HXX
+#include <accfrmobjmap.hxx>
+#endif
+
+::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert(
+ sal_uInt32 nPos, const SwFrmOrObj& rLower )
+{
+ SwFrmOrObjMapKey aKey( SwFrmOrObjMapKey::TEXT, nPos );
+ value_type aEntry( aKey, rLower );
+ return _SwFrmOrObjMap::insert( aEntry );
+}
+
+::std::pair< SwFrmOrObjMap::iterator, bool > SwFrmOrObjMap::insert(
+ const SdrObject *pObj, const SwFrmOrObj& rLower, const SwDoc *pDoc )
+{
+ if( !bLayerIdsValid )
+ {
+ nHellId = pDoc->GetHellId();
+ nControlsId = pDoc->GetControlsId();
+ bLayerIdsValid = sal_True;
+ }
+
+ SdrLayerID nLayer = pObj->GetLayer();
+ SwFrmOrObjMapKey::LayerId eLayerId = (nHellId == nLayer)
+ ? SwFrmOrObjMapKey::HELL
+ : ((nControlsId == nLayer) ? SwFrmOrObjMapKey::CONTROLS
+ : SwFrmOrObjMapKey::HEAVEN);
+ SwFrmOrObjMapKey aKey( eLayerId, pObj->GetOrdNum() );
+ value_type aEntry( aKey, rLower );
+ return _SwFrmOrObjMap::insert( aEntry );
+}
+
+SwFrmOrObjMap::SwFrmOrObjMap(
+ const SwRect& rVisArea, const SwFrm *pFrm ) :
+ bLayerIdsValid( sal_False )
+{
+ SwFrmOrObj aFrm( pFrm );
+ sal_Bool bVisibleOnly = aFrm.IsVisibleChildrenOnly();
+
+ sal_uInt32 nPos = 0;
+ SwFrmOrObj aLower( pFrm->GetLower() );
+ while( aLower.GetSwFrm() )
+ {
+ if( !bVisibleOnly || aLower.GetBox().IsOver( rVisArea ) )
+ insert( nPos++, aLower );
+
+ aLower = aLower.GetSwFrm()->GetNext();
+ }
+
+ if( pFrm->IsPageFrm() )
+ {
+ ASSERT( bVisibleOnly, "page frame within tab frame???" );
+ const SwPageFrm *pPgFrm =
+ static_cast< const SwPageFrm * >( pFrm );
+ const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
+ if( pObjs )
+ {
+ const SwDoc *pDoc = pPgFrm->GetFmt()->GetDoc();
+ for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
+ {
+ aLower = (*pObjs)[i]->GetDrawObj();
+ if( aLower.GetBox().IsOver( rVisArea ) )
+ insert( aLower.GetSdrObject(), aLower, pDoc );
+ }
+ }
+ }
+ else if( pFrm->IsTxtFrm() )
+ {
+ const SwDoc *pDoc = static_cast< const SwTxtFrm * >( pFrm )->GetNode()
+ ->GetDoc();
+ const SwSortedObjs *pObjs = pFrm->GetDrawObjs();
+ if( pObjs )
+ {
+ for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
+ {
+ aLower = (*pObjs)[i]->GetDrawObj();
+ if( aLower.IsBoundAsChar() &&
+ (!bVisibleOnly || aLower.GetBox().IsOver( rVisArea )) )
+ insert( aLower.GetSdrObject(), aLower, pDoc );
+ }
+ }
+ }
+}
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
new file mode 100644
index 000000000000..47c995e48507
--- /dev/null
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfrmobjmap.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCFRMOBJMAP_HXX
+#define _ACCFRMOBJMAP_HXX
+#include <accfrmobj.hxx>
+
+#include <map>
+
+class SwDoc;
+
+class SwFrmOrObjMapKey
+{
+public:
+ enum LayerId { INVALID, HELL, TEXT, HEAVEN, CONTROLS };
+private:
+
+ LayerId eLayerId;
+ sal_uInt32 nOrdNum;
+
+public:
+
+ inline SwFrmOrObjMapKey();
+ inline SwFrmOrObjMapKey( LayerId eId, sal_uInt32 nOrd );
+
+ inline sal_Bool operator()( const SwFrmOrObjMapKey& r1,
+ const SwFrmOrObjMapKey& r2 ) const;
+};
+
+typedef ::std::map < SwFrmOrObjMapKey, SwFrmOrObj, SwFrmOrObjMapKey >
+ _SwFrmOrObjMap;
+
+class SwFrmOrObjMap : public _SwFrmOrObjMap
+{
+ SdrLayerID nHellId;
+ SdrLayerID nControlsId;
+ sal_Bool bLayerIdsValid;
+
+ ::std::pair< iterator, bool > insert( sal_uInt32 nPos,
+ const SwFrmOrObj& rLower );
+ ::std::pair< iterator, bool > insert( const SdrObject *pObj,
+ const SwFrmOrObj& rLower,
+ const SwDoc *pDoc );
+
+public:
+
+ SwFrmOrObjMap( const SwRect& rVisArea, const SwFrm *pFrm );
+
+ inline static sal_Bool IsSortingRequired( const SwFrm *pFrm );
+};
+
+inline SwFrmOrObjMapKey::SwFrmOrObjMapKey() :
+ eLayerId( INVALID ),
+ nOrdNum( 0 )
+{
+}
+
+inline SwFrmOrObjMapKey::SwFrmOrObjMapKey(
+ LayerId eId, sal_uInt32 nOrd ) :
+ eLayerId( eId ),
+ nOrdNum( nOrd )
+{
+}
+
+inline sal_Bool SwFrmOrObjMapKey::operator()(
+ const SwFrmOrObjMapKey& r1,
+ const SwFrmOrObjMapKey& r2 ) const
+{
+ return (r1.eLayerId == r2.eLayerId) ? (r1.nOrdNum < r2.nOrdNum) :
+ (r1.eLayerId < r2.eLayerId);
+}
+
+inline sal_Bool SwFrmOrObjMap::IsSortingRequired( const SwFrm *pFrm )
+{
+ return ( pFrm->IsPageFrm() &&
+ static_cast< const SwPageFrm * >( pFrm )->GetSortedObjs() ) ||
+ (pFrm->IsTxtFrm() && pFrm->GetDrawObjs() );
+}
+
+#endif
+
diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx
new file mode 100644
index 000000000000..97e3a46663e8
--- /dev/null
+++ b/sw/source/core/access/accfrmobjslist.cxx
@@ -0,0 +1,127 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfrmobjslist.cxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <pagefrm.hxx>
+// OD 2004-05-24 #i28701#
+#include <sortedobjs.hxx>
+#include <accfrmobjslist.hxx>
+
+
+SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator(
+ const SwFrmOrObjSList& rLst, sal_Bool ) :
+ rList( rLst ), aCurr( rList.pFrm->GetLower() ), nNextObj( 0 )
+{
+ if( !aCurr.GetSwFrm() )
+ {
+ if( rList.pFrm->IsPageFrm() )
+ {
+ const SwPageFrm *pPgFrm =
+ static_cast< const SwPageFrm * >( rList.pFrm );
+ const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
+ if( pObjs && pObjs->Count() )
+ aCurr = (*pObjs)[nNextObj++]->GetDrawObj();
+ }
+ else if( rList.pFrm->IsTxtFrm() )
+ {
+ const SwSortedObjs *pObjs = rList.pFrm->GetDrawObjs();
+ if( pObjs && pObjs->Count() )
+ {
+ aCurr = (*pObjs)[nNextObj++]->GetDrawObj();
+ while( aCurr.IsValid() && !aCurr.IsBoundAsChar() )
+ aCurr = (nNextObj < pObjs->Count())
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+
+ }
+ }
+ }
+ if( rList.bVisibleOnly )
+ {
+ // Find the first visible
+ while( aCurr.IsValid() &&
+ !aCurr.GetBox().IsOver( rList.aVisArea ) )
+ next();
+ }
+}
+
+SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::next()
+{
+ sal_Bool bGetSdrObject = sal_False;
+ if( aCurr.GetSdrObject() )
+ {
+ bGetSdrObject = sal_True;
+ }
+ else if( aCurr.GetSwFrm() )
+ {
+ aCurr = aCurr.GetSwFrm()->GetNext();
+ if( !aCurr.GetSwFrm() )
+ bGetSdrObject = sal_True;
+ }
+
+ if( bGetSdrObject )
+ {
+ if( rList.pFrm->IsPageFrm() )
+ {
+ const SwPageFrm *pPgFrm =
+ static_cast< const SwPageFrm * >( rList.pFrm );
+ const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
+ aCurr = (pObjs && nNextObj < pObjs->Count())
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+ }
+ else if( rList.pFrm->IsTxtFrm() )
+ {
+ const SwSortedObjs *pObjs = rList.pFrm->GetDrawObjs();
+ aCurr = (pObjs && nNextObj < pObjs->Count())
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+ while( aCurr.IsValid() && !aCurr.IsBoundAsChar() )
+ aCurr = (nNextObj < pObjs->Count())
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+ }
+ }
+
+ return *this;
+}
+
+SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::next_visible()
+{
+ next();
+ while( aCurr.IsValid() &&
+ !aCurr.GetBox().IsOver( rList.aVisArea ) )
+ next();
+
+ return *this;
+}
diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx
new file mode 100644
index 000000000000..2a310b44f2bd
--- /dev/null
+++ b/sw/source/core/access/accfrmobjslist.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accfrmobjslist.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCFRMOBJSLIST_HXX
+#define _ACCFRMOBJSLIST_HXX
+
+#include <accfrmobj.hxx>
+
+class SwFrmOrObjSList;
+
+class SwFrmOrObjSList_const_iterator
+{
+ friend class SwFrmOrObjSList;
+ const SwFrmOrObjSList& rList; // The frame we are iterating over
+ SwFrmOrObj aCurr; // The current object
+ sal_uInt16 nNextObj; // The index of the current sdr object
+
+ inline SwFrmOrObjSList_const_iterator( const SwFrmOrObjSList& rLst );
+ SwFrmOrObjSList_const_iterator( const SwFrmOrObjSList& rLst, sal_Bool );
+
+// SwFrmOrObjSList_const_iterator& begin();
+ SwFrmOrObjSList_const_iterator& next();
+ SwFrmOrObjSList_const_iterator& next_visible();
+
+public:
+
+ inline SwFrmOrObjSList_const_iterator(
+ const SwFrmOrObjSList_const_iterator& rIter );
+ inline sal_Bool operator==(
+ const SwFrmOrObjSList_const_iterator& r ) const;
+ inline sal_Bool operator!=(
+ const SwFrmOrObjSList_const_iterator& r ) const;
+ inline SwFrmOrObjSList_const_iterator& operator++();
+ inline const SwFrmOrObj& operator*() const;
+};
+
+// An iterator to iterate over a frame's child in any order
+class SwFrmOrObjSList
+{
+ friend class SwFrmOrObjSList_const_iterator;
+
+ SwRect aVisArea;
+ const SwFrm *pFrm; // The frame we are iterating over
+ sal_Bool bVisibleOnly;
+
+public:
+
+ typedef SwFrmOrObjSList_const_iterator const_iterator;
+
+ inline SwFrmOrObjSList( const SwFrm *pF );
+ inline SwFrmOrObjSList( const SwRect& rVisArea, const SwFrm *pF );
+
+ inline const_iterator begin() const;
+ inline const_iterator end() const;
+};
+
+inline SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator(
+ const SwFrmOrObjSList& rLst ) :
+ rList( rLst ), nNextObj( 0 )
+{
+}
+
+inline SwFrmOrObjSList_const_iterator::SwFrmOrObjSList_const_iterator(
+ const SwFrmOrObjSList_const_iterator& rIter ) :
+ rList( rIter.rList ),
+ aCurr( rIter.aCurr ),
+ nNextObj( rIter.nNextObj )
+{
+}
+
+inline sal_Bool SwFrmOrObjSList_const_iterator::operator==(
+ const SwFrmOrObjSList_const_iterator& r ) const
+{
+ return aCurr == r.aCurr;
+}
+
+inline sal_Bool SwFrmOrObjSList_const_iterator::operator!=(
+ const SwFrmOrObjSList_const_iterator& r ) const
+{
+ return !(aCurr == r.aCurr);
+}
+
+inline SwFrmOrObjSList_const_iterator& SwFrmOrObjSList_const_iterator::operator++()
+{
+ return rList.bVisibleOnly ? next_visible() : next();
+}
+
+inline const SwFrmOrObj& SwFrmOrObjSList_const_iterator::operator*() const
+{
+ return aCurr;
+}
+
+inline SwFrmOrObjSList::SwFrmOrObjSList( const SwFrm *pF ) :
+ pFrm( pF ),
+ bVisibleOnly( sal_False )
+{
+}
+
+inline SwFrmOrObjSList::SwFrmOrObjSList( const SwRect& rVisArea,
+ const SwFrm *pF ) :
+ aVisArea( rVisArea ),
+ pFrm( pF )
+{
+ SwFrmOrObj aFrm( pFrm );
+ bVisibleOnly = aFrm.IsVisibleChildrenOnly();
+}
+
+inline SwFrmOrObjSList_const_iterator SwFrmOrObjSList::begin() const
+{
+// SwFrmOrObjSList_const_iterator aIter2( *this );
+// aIter2.begin();
+// return aIter2;
+ return SwFrmOrObjSList_const_iterator( *this, sal_True );
+}
+
+inline SwFrmOrObjSList_const_iterator SwFrmOrObjSList::end() const
+{
+ return SwFrmOrObjSList_const_iterator( *this );
+}
+
+#endif
diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx
new file mode 100644
index 000000000000..ca55a7a8db9f
--- /dev/null
+++ b/sw/source/core/access/accgraphic.cxx
@@ -0,0 +1,100 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accgraphic.cxx,v $
+ * $Revision: 1.11 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vcl/svapp.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <rtl/uuid.h>
+#include <flyfrm.hxx>
+#include "accgraphic.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextGraphicObject";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleGraphic";
+
+SwAccessibleGraphic::SwAccessibleGraphic(
+ SwAccessibleMap* pInitMap,
+ const SwFlyFrm* pFlyFrm ) :
+ SwAccessibleNoTextFrame( pInitMap, AccessibleRole::GRAPHIC, pFlyFrm )
+{
+}
+
+SwAccessibleGraphic::~SwAccessibleGraphic()
+{
+}
+
+OUString SAL_CALL SwAccessibleGraphic::getImplementationName()
+ throw( RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleGraphic::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+Sequence< OUString > SAL_CALL SwAccessibleGraphic::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
+ throw(RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
diff --git a/sw/source/core/access/accgraphic.hxx b/sw/source/core/access/accgraphic.hxx
new file mode 100644
index 000000000000..e207281571a0
--- /dev/null
+++ b/sw/source/core/access/accgraphic.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accgraphic.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCGRAPHIC_HXX
+#define _ACCGRAPHIC_HXX
+#include "accnotextframe.hxx"
+
+class SwAccessibleGraphic : public SwAccessibleNoTextFrame
+{
+
+protected:
+
+ virtual ~SwAccessibleGraphic();
+
+public:
+
+ SwAccessibleGraphic( SwAccessibleMap* pInitMap,
+ const SwFlyFrm *pFlyFrm );
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
diff --git a/sw/source/core/access/accheaderfooter.cxx b/sw/source/core/access/accheaderfooter.cxx
new file mode 100644
index 000000000000..b1d97a9da3c7
--- /dev/null
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -0,0 +1,148 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accheaderfooter.cxx,v $
+ * $Revision: 1.16 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vos/mutex.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <rtl/uuid.h>
+#include <vcl/svapp.hxx>
+#include <hffrm.hxx>
+#include "accheaderfooter.hxx"
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+const sal_Char sServiceNameHeader[] = "com.sun.star.text.AccessibleHeaderView";
+const sal_Char sServiceNameFooter[] = "com.sun.star.text.AccessibleFooterView";
+const sal_Char sImplementationNameHeader[] = "com.sun.star.comp.Writer.SwAccessibleHeaderView";
+const sal_Char sImplementationNameFooter[] = "com.sun.star.comp.Writer.SwAccessibleFooterView";
+
+SwAccessibleHeaderFooter::SwAccessibleHeaderFooter(
+ SwAccessibleMap* pInitMap,
+ const SwHeaderFrm* pHdFrm ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::HEADER, pHdFrm )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ OUString sArg( OUString::valueOf( (sal_Int32)pHdFrm->GetPhyPageNum() ) );
+ SetName( GetResource( STR_ACCESS_HEADER_NAME, &sArg ) );
+}
+
+SwAccessibleHeaderFooter::SwAccessibleHeaderFooter(
+ SwAccessibleMap* pInitMap,
+ const SwFooterFrm* pFtFrm ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::FOOTER, pFtFrm )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ OUString sArg( OUString::valueOf( (sal_Int32)pFtFrm->GetPhyPageNum() ) );
+ SetName( GetResource( STR_ACCESS_FOOTER_NAME, &sArg ) );
+}
+
+SwAccessibleHeaderFooter::~SwAccessibleHeaderFooter()
+{
+}
+
+OUString SAL_CALL SwAccessibleHeaderFooter::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ sal_uInt16 nResId = AccessibleRole::HEADER == GetRole()
+ ? STR_ACCESS_HEADER_DESC
+ : STR_ACCESS_FOOTER_DESC ;
+
+ OUString sArg( GetFormattedPageNumber() );
+
+ return GetResource( nResId, &sArg );
+}
+
+OUString SAL_CALL SwAccessibleHeaderFooter::getImplementationName()
+ throw( RuntimeException )
+{
+ if( AccessibleRole::HEADER == GetRole() )
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationNameHeader));
+ else
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationNameFooter));
+}
+
+sal_Bool SAL_CALL SwAccessibleHeaderFooter::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ if( sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 ) )
+ return sal_True;
+ else if( AccessibleRole::HEADER == GetRole() )
+ return sTestServiceName.equalsAsciiL( sServiceNameHeader, sizeof(sServiceNameHeader)-1 );
+ else
+ return sTestServiceName.equalsAsciiL( sServiceNameFooter, sizeof(sServiceNameFooter)-1 );
+
+}
+
+Sequence< OUString > SAL_CALL SwAccessibleHeaderFooter::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ if( AccessibleRole::HEADER == GetRole() )
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceNameHeader) );
+ else
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceNameFooter) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+Sequence< sal_Int8 > SAL_CALL SwAccessibleHeaderFooter::getImplementationId()
+ throw(RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx
new file mode 100644
index 000000000000..b4f71fe0c1f3
--- /dev/null
+++ b/sw/source/core/access/accheaderfooter.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accheaderfooter.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCHEADERFOOTER_HXX
+#define _ACCHEADERFOOTER_HXX
+#ifndef _ACCCONTEXT_HXX
+#include "acccontext.hxx"
+#endif
+
+class SwHeaderFrm;
+class SwFooterFrm;
+
+class SwAccessibleHeaderFooter : public SwAccessibleContext
+{
+
+protected:
+
+ virtual ~SwAccessibleHeaderFooter();
+
+public:
+
+ SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap,
+ const SwHeaderFrm* pHdFrm );
+ SwAccessibleHeaderFooter( SwAccessibleMap* pInitMap,
+ const SwFooterFrm* pFtFrm );
+
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService (const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
+
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
new file mode 100644
index 000000000000..ece5bbb614c5
--- /dev/null
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -0,0 +1,193 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acchyperlink.cxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#include <comphelper/accessiblekeybindinghelper.hxx>
+#include <swurl.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <ndtxt.hxx>
+#include <txtinet.hxx>
+#include <accpara.hxx>
+#include <acchyperlink.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+SwAccessibleHyperlink::SwAccessibleHyperlink( sal_uInt16 nHPos,
+ SwAccessibleParagraph *p, sal_Int32 nStt, sal_Int32 nEnd ) :
+ nHintPos( nHPos ),
+ xPara( p ),
+ nStartIdx( nStt ),
+ nEndIdx( nEnd )
+{
+}
+
+const SwTxtAttr *SwAccessibleHyperlink::GetTxtAttr() const
+{
+ const SwTxtAttr *pTxtAttr = 0;
+ if( xPara.isValid() && xPara->GetMap() )
+ {
+ const SwTxtNode *pTxtNd = xPara->GetTxtNode();
+ const SwpHints *pHints = pTxtNd->GetpSwpHints();
+ if( pHints && nHintPos < pHints->Count() )
+ {
+ const SwTxtAttr *pHt = (*pHints)[nHintPos];
+ if( RES_TXTATR_INETFMT == pHt->Which() )
+ pTxtAttr = pHt;
+ }
+ }
+
+ return pTxtAttr;
+}
+
+
+// XAccessibleAction
+sal_Int32 SAL_CALL SwAccessibleHyperlink::getAccessibleActionCount()
+ throw (uno::RuntimeException)
+{
+ return isValid() ? 1 : 0;
+}
+
+sal_Bool SAL_CALL SwAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ sal_Bool bRet = sal_False;
+
+ const SwTxtAttr *pTxtAttr = GetTxtAttr();
+ if( pTxtAttr && 0 == nIndex )
+ {
+ const SwFmtINetFmt& rINetFmt = pTxtAttr->GetINetFmt();
+ if( rINetFmt.GetValue().Len() )
+ {
+ ViewShell *pVSh = xPara->GetShell();
+ if( pVSh )
+ {
+ LoadURL( rINetFmt.GetValue(), pVSh, URLLOAD_NOFILTER,
+ &rINetFmt.GetTargetFrame() );
+ ASSERT( pTxtAttr == rINetFmt.GetTxtINetFmt(),
+ "lost my txt attr" );
+ const SwTxtINetFmt* pTxtAttr2 = rINetFmt.GetTxtINetFmt();
+ if( pTxtAttr2 )
+ {
+ const_cast<SwTxtINetFmt*>(pTxtAttr2)->SetVisited(true);
+ const_cast<SwTxtINetFmt*>(pTxtAttr2)->SetVisitedValid(true);
+ }
+ bRet = sal_True;
+ }
+ }
+ }
+
+ return bRet;
+}
+
+OUString SAL_CALL SwAccessibleHyperlink::getAccessibleActionDescription(
+ sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ OUString sDesc;
+
+ const SwTxtAttr *pTxtAttr = GetTxtAttr();
+ if( pTxtAttr && 0 == nIndex )
+ {
+ const SwFmtINetFmt& rINetFmt = pTxtAttr->GetINetFmt();
+ sDesc = OUString( rINetFmt.GetValue() );
+ }
+
+ return sDesc;
+}
+
+uno::Reference< XAccessibleKeyBinding > SAL_CALL
+ SwAccessibleHyperlink::getAccessibleActionKeyBinding( sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ uno::Reference< XAccessibleKeyBinding > xKeyBinding;
+
+ if( isValid() && 0==nIndex )
+ {
+ ::comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper =
+ new ::comphelper::OAccessibleKeyBindingHelper();
+ xKeyBinding = pKeyBindingHelper;
+
+ awt::KeyStroke aKeyStroke;
+ aKeyStroke.Modifiers = 0;
+ aKeyStroke.KeyCode = KEY_RETURN;
+ aKeyStroke.KeyChar = 0;
+ aKeyStroke.KeyFunc = 0;
+ pKeyBindingHelper->AddKeyBinding( aKeyStroke );
+ }
+
+ return xKeyBinding;
+}
+
+// XAccessibleHyperlink
+uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionAnchor(
+ sal_Int32 /*nIndex*/ )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return uno::Any();
+}
+
+uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionObject(
+ sal_Int32 /*nIndex*/ )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return uno::Any();
+}
+
+sal_Int32 SAL_CALL SwAccessibleHyperlink::getStartIndex()
+ throw (uno::RuntimeException)
+{
+ return nStartIdx;
+}
+
+sal_Int32 SAL_CALL SwAccessibleHyperlink::getEndIndex()
+ throw (uno::RuntimeException)
+{
+ return nEndIdx;
+}
+
+sal_Bool SAL_CALL SwAccessibleHyperlink::isValid( )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return xPara.isValid();
+}
+
+void SwAccessibleHyperlink::Invalidate()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ xPara = 0;
+}
+
diff --git a/sw/source/core/access/acchyperlink.hxx b/sw/source/core/access/acchyperlink.hxx
new file mode 100644
index 000000000000..6e07097bc828
--- /dev/null
+++ b/sw/source/core/access/acchyperlink.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acchyperlink.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCHYPERLINK_HXX
+#define _ACCHYPERLINK_HXX
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#include <vos/ref.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <fmtinfmt.hxx>
+
+class SwAccessibleParagraph;
+class SwTxtAttr;
+
+class SwAccessibleHyperlink :
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleHyperlink >
+{
+ friend class SwAccessibleParagraph;
+ friend class SwAccessibleHyperTextData;
+ sal_uInt16 nHintPos;
+ ::vos::ORef< SwAccessibleParagraph > xPara;
+ sal_Int32 nStartIdx;
+ sal_Int32 nEndIdx;
+
+ SwAccessibleHyperlink( sal_uInt16 nHintPos,
+ SwAccessibleParagraph *p,
+ sal_Int32 nStt, sal_Int32 nEnd );
+
+ const SwTxtAttr *GetTxtAttr() const;
+ void Invalidate();
+
+public:
+
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL
+ getAccessibleActionKeyBinding( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleHyperlink
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject(
+ sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getStartIndex()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getEndIndex()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isValid( )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif
+
diff --git a/sw/source/core/access/acchypertextdata.cxx b/sw/source/core/access/acchypertextdata.cxx
new file mode 100644
index 000000000000..43273e44f5af
--- /dev/null
+++ b/sw/source/core/access/acchypertextdata.cxx
@@ -0,0 +1,58 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acchypertextdata.cxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#include <acchyperlink.hxx>
+#include <acchypertextdata.hxx>
+
+using namespace ::com::sun::star::accessibility;
+using namespace ::com::sun::star::uno;
+
+SwAccessibleHyperTextData::SwAccessibleHyperTextData() :
+ _SwAccessibleHyperlinkMap_Impl()
+{
+}
+
+SwAccessibleHyperTextData::~SwAccessibleHyperTextData()
+{
+ iterator aIter = begin();
+ while( aIter != end() )
+ {
+ Reference < XAccessibleHyperlink > xTmp = (*aIter).second;
+ if( xTmp.is() )
+ {
+ SwAccessibleHyperlink *pTmp =
+ static_cast< SwAccessibleHyperlink * >( xTmp.get() );
+ pTmp->Invalidate();
+ }
+ ++aIter;
+ }
+}
diff --git a/sw/source/core/access/acchypertextdata.hxx b/sw/source/core/access/acchypertextdata.hxx
new file mode 100644
index 000000000000..2c871507e875
--- /dev/null
+++ b/sw/source/core/access/acchypertextdata.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acchypertextdata.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCHYPERTEXTDATA_HXX
+#define _ACCHYPERTEXTDATA_HXX
+
+#include <cppuhelper/weakref.hxx>
+
+#include <map>
+
+class SwTxtAttr;
+
+namespace com { namespace sun { namespace star {
+ namespace accessibility { class XAccessibleHyperlink; }
+} } }
+
+typedef ::std::less< const SwTxtAttr * > SwTxtAttrPtrLess;
+typedef ::std::map < const SwTxtAttr *, ::com::sun::star::uno::WeakReference < com::sun::star::accessibility::XAccessibleHyperlink >, SwTxtAttrPtrLess > _SwAccessibleHyperlinkMap_Impl;
+
+class SwAccessibleHyperTextData : public _SwAccessibleHyperlinkMap_Impl
+{
+public:
+ SwAccessibleHyperTextData();
+ ~SwAccessibleHyperTextData();
+};
+
+#endif
+
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
new file mode 100644
index 000000000000..a9ec7b047da8
--- /dev/null
+++ b/sw/source/core/access/accmap.cxx
@@ -0,0 +1,2767 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accmap.cxx,v $
+ * $Revision: 1.59 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vos/ref.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <vcl/window.hxx>
+#include <svx/svdmodel.hxx>
+#include <svx/unomod.hxx>
+#include <tools/debug.hxx>
+
+#include <map>
+#include <list>
+#include <accmap.hxx>
+#ifndef _ACCCONTEXT_HXX
+#include <acccontext.hxx>
+#endif
+#include <accdoc.hxx>
+#include <accpreview.hxx>
+#include <accpage.hxx>
+#include <accpara.hxx>
+#include <accheaderfooter.hxx>
+#include <accfootnote.hxx>
+#include <acctextframe.hxx>
+#include <accgraphic.hxx>
+#include <accembedded.hxx>
+#include <acccell.hxx>
+#include <acctable.hxx>
+#include "fesh.hxx"
+#include <rootfrm.hxx>
+#include <txtfrm.hxx>
+#include <hffrm.hxx>
+#include <ftnfrm.hxx>
+#include <cellfrm.hxx>
+#include <tabfrm.hxx>
+#include <pagefrm.hxx>
+#include <ndtyp.hxx>
+#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
+#include <IDocumentDrawModelAccess.hxx>
+#endif
+#include <svx/ShapeTypeHandler.hxx>
+#include <vcl/svapp.hxx>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <cppuhelper/implbase1.hxx>
+// OD 15.01.2003 #103492#
+#include <pagepreviewlayout.hxx>
+// --> OD 2005-12-13 #i27301#
+#include <pam.hxx>
+#include <ndtxt.hxx>
+// <--
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+struct SwFrmFunc
+{
+ sal_Bool operator()( const SwFrm * p1,
+ const SwFrm * p2) const
+ {
+ return p1 < p2;
+ }
+};
+
+typedef ::std::map < const SwFrm *, uno::WeakReference < XAccessible >, SwFrmFunc > _SwAccessibleContextMap_Impl;
+
+class SwAccessibleContextMap_Impl: public _SwAccessibleContextMap_Impl
+{
+public:
+
+#ifndef PRODUCT
+ sal_Bool mbLocked;
+#endif
+
+ SwAccessibleContextMap_Impl()
+#ifndef PRODUCT
+ : mbLocked( sal_False )
+#endif
+ {}
+
+};
+
+//------------------------------------------------------------------------------
+class SwDrawModellListener_Impl : public SfxListener,
+ public ::cppu::WeakImplHelper1< document::XEventBroadcaster >
+{
+ mutable ::osl::Mutex maListenerMutex;
+ ::cppu::OInterfaceContainerHelper maEventListeners;
+ SdrModel *mpDrawModel;
+protected:
+ virtual ~SwDrawModellListener_Impl();
+public:
+
+ SwDrawModellListener_Impl( SdrModel *pDrawModel );
+
+
+ virtual void SAL_CALL addEventListener( const uno::Reference< document::XEventListener >& xListener ) throw (uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const uno::Reference< document::XEventListener >& xListener ) throw (uno::RuntimeException);
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ void Dispose();
+};
+
+SwDrawModellListener_Impl::SwDrawModellListener_Impl( SdrModel *pDrawModel ) :
+ maEventListeners( maListenerMutex ),
+ mpDrawModel( pDrawModel )
+{
+ StartListening( *mpDrawModel );
+}
+
+SwDrawModellListener_Impl::~SwDrawModellListener_Impl()
+{
+ EndListening( *mpDrawModel );
+}
+
+void SAL_CALL SwDrawModellListener_Impl::addEventListener( const uno::Reference< document::XEventListener >& xListener ) throw (uno::RuntimeException)
+{
+ maEventListeners.addInterface( xListener );
+}
+
+void SAL_CALL SwDrawModellListener_Impl::removeEventListener( const uno::Reference< document::XEventListener >& xListener ) throw (uno::RuntimeException)
+{
+ maEventListeners.removeInterface( xListener );
+}
+
+void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/,
+ const SfxHint& rHint )
+{
+ // do not broadcast notifications for writer fly frames, because there
+ // are no shapes that need to know about them.
+ // OD 01.07.2003 #110554# - correct condition in order not to broadcast
+ // notifications for writer fly frames.
+ // OD 01.07.2003 #110554# - do not broadcast notifications for plane
+ // <SdrObject>objects
+ const SdrHint *pSdrHint = PTR_CAST( SdrHint, &rHint );
+ if ( !pSdrHint ||
+ ( pSdrHint->GetObject() &&
+ ( pSdrHint->GetObject()->ISA(SwFlyDrawObj) ||
+ pSdrHint->GetObject()->ISA(SwVirtFlyDrawObj) ||
+ IS_TYPE(SdrObject,pSdrHint->GetObject()) ) ) )
+ {
+ return;
+ }
+
+ ASSERT( mpDrawModel, "draw model listener is disposed" );
+ if( !mpDrawModel )
+ return;
+
+ document::EventObject aEvent;
+ if( !SvxUnoDrawMSFactory::createEvent( mpDrawModel, pSdrHint, aEvent ) )
+ return;
+
+ ::cppu::OInterfaceIteratorHelper aIter( maEventListeners );
+ while( aIter.hasMoreElements() )
+ {
+ uno::Reference < document::XEventListener > xListener( aIter.next(),
+ uno::UNO_QUERY );
+ try
+ {
+ xListener->notifyEvent( aEvent );
+ }
+ catch( uno::RuntimeException const & r )
+ {
+ (void)r;
+#if OSL_DEBUG_LEVEL > 1
+ ByteString aError( "Runtime exception caught while notifying shape.:\n" );
+ aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
+ DBG_ERROR( aError.GetBuffer() );
+#endif
+ }
+ }
+}
+
+void SwDrawModellListener_Impl::Dispose()
+{
+ mpDrawModel = 0;
+}
+
+//------------------------------------------------------------------------------
+struct SwShapeFunc
+{
+ sal_Bool operator()( const SdrObject * p1,
+ const SdrObject * p2) const
+ {
+ return p1 < p2;
+ }
+};
+typedef ::std::map < const SdrObject *, uno::WeakReference < XAccessible >, SwShapeFunc > _SwAccessibleShapeMap_Impl;
+typedef ::std::pair < const SdrObject *, ::vos::ORef < ::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl;
+
+class SwAccessibleShapeMap_Impl: public _SwAccessibleShapeMap_Impl
+
+{
+ ::accessibility::AccessibleShapeTreeInfo maInfo;
+
+public:
+
+#ifndef PRODUCT
+ sal_Bool mbLocked;
+#endif
+ SwAccessibleShapeMap_Impl( SwAccessibleMap *pMap )
+#ifndef PRODUCT
+ : mbLocked( sal_False )
+#endif
+ {
+ maInfo.SetSdrView( pMap->GetShell()->GetDrawView() );
+ maInfo.SetWindow( pMap->GetShell()->GetWin() );
+ maInfo.SetViewForwarder( pMap );
+ // --> OD 2005-08-08 #i52858# - method name changed
+ uno::Reference < document::XEventBroadcaster > xModelBroadcaster =
+ new SwDrawModellListener_Impl(
+ pMap->GetShell()->getIDocumentDrawModelAccess()->GetOrCreateDrawModel() );
+ // <--
+ maInfo.SetControllerBroadcaster( xModelBroadcaster );
+ }
+
+ ~SwAccessibleShapeMap_Impl();
+
+ const ::accessibility::AccessibleShapeTreeInfo& GetInfo() const { return maInfo; }
+
+ SwAccessibleObjShape_Impl *Copy( size_t& rSize,
+ const SwFEShell *pFESh = 0,
+ SwAccessibleObjShape_Impl **pSelShape = 0 ) const;
+};
+
+SwAccessibleShapeMap_Impl::~SwAccessibleShapeMap_Impl()
+{
+ uno::Reference < document::XEventBroadcaster > xBrd( maInfo.GetControllerBroadcaster() );
+ if( xBrd.is() )
+ static_cast < SwDrawModellListener_Impl * >( xBrd.get() )->Dispose();
+}
+
+SwAccessibleObjShape_Impl
+ *SwAccessibleShapeMap_Impl::Copy(
+ size_t& rSize, const SwFEShell *pFESh,
+ SwAccessibleObjShape_Impl **pSelStart ) const
+{
+ SwAccessibleObjShape_Impl *pShapes = 0;
+ SwAccessibleObjShape_Impl *pSelShape = 0;
+
+ sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0;
+ rSize = size();
+
+ if( rSize > 0 )
+ {
+ pShapes =
+ new SwAccessibleObjShape_Impl[rSize];
+
+ const_iterator aIter = begin();
+ const_iterator aEndIter = end();
+
+ SwAccessibleObjShape_Impl *pShape = pShapes;
+ pSelShape = &(pShapes[rSize]);
+ while( aIter != aEndIter )
+ {
+ const SdrObject *pObj = (*aIter).first;
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ if( nSelShapes && pFESh->IsObjSelected( *pObj ) )
+ {
+ // selected objects are inserted from the back
+ --pSelShape;
+ pSelShape->first = pObj;
+ pSelShape->second =
+ static_cast < ::accessibility::AccessibleShape* >(
+ xAcc.get() );
+ --nSelShapes;
+ }
+ else
+ {
+ pShape->first = pObj;
+ pShape->second =
+ static_cast < ::accessibility::AccessibleShape* >(
+ xAcc.get() );
+ ++pShape;
+ }
+ ++aIter;
+ }
+ ASSERT( pSelShape == pShape, "copying shapes went wrong!" );
+ }
+
+ if( pSelStart )
+ *pSelStart = pSelShape;
+
+ return pShapes;
+}
+
+//------------------------------------------------------------------------------
+struct SwAccessibleEvent_Impl
+{
+public:
+ enum EventType { CARET_OR_STATES,
+ INVALID_CONTENT,
+ POS_CHANGED,
+ CHILD_POS_CHANGED,
+ SHAPE_SELECTION,
+ DISPOSE,
+ INVALID_ATTR };
+
+private:
+ SwRect maOldBox; // the old bounds for CHILD_POS_CHANGED
+ // and POS_CHANGED
+ uno::WeakReference < XAccessible > mxAcc; // The object that fires the event
+ SwFrmOrObj maFrmOrObj; // the child for CHILD_POS_CHANGED and
+ // the same as xAcc for any other
+ // event type
+ EventType meType; // The event type
+ // --> OD 2005-12-12 #i27301# - use new type definition for <mnStates>
+ tAccessibleStates mnStates; // check states or update caret pos
+ // <--
+
+ SwAccessibleEvent_Impl& operator==( const SwAccessibleEvent_Impl& );
+
+public:
+ SwAccessibleEvent_Impl( EventType eT,
+ SwAccessibleContext *pA,
+ const SwFrmOrObj& rFrmOrObj )
+ : mxAcc( pA ),
+ maFrmOrObj( rFrmOrObj ),
+ meType( eT ),
+ mnStates( 0 )
+ {}
+
+ SwAccessibleEvent_Impl( EventType eT,
+ const SwFrmOrObj& rFrmOrObj )
+ : maFrmOrObj( rFrmOrObj ),
+ meType( eT ),
+ mnStates( 0 )
+ {
+ ASSERT( SwAccessibleEvent_Impl::DISPOSE == meType,
+ "wrong event constructor, DISPOSE only" );
+ }
+
+ SwAccessibleEvent_Impl( EventType eT )
+ : meType( eT ),
+ mnStates( 0 )
+ {
+ ASSERT( SwAccessibleEvent_Impl::SHAPE_SELECTION == meType,
+ "wrong event constructor, SHAPE_SELECTION only" );
+ }
+
+ SwAccessibleEvent_Impl( EventType eT,
+ SwAccessibleContext *pA,
+ const SwFrmOrObj& rFrmOrObj,
+ const SwRect& rR )
+ : maOldBox( rR ),
+ mxAcc( pA ),
+ maFrmOrObj( rFrmOrObj ),
+ meType( eT ),
+ mnStates( 0 )
+ {
+ ASSERT( SwAccessibleEvent_Impl::CHILD_POS_CHANGED == meType ||
+ SwAccessibleEvent_Impl::POS_CHANGED == meType,
+ "wrong event constructor, (CHILD_)POS_CHANGED only" );
+ }
+
+ // --> OD 2005-12-12 #i27301# - use new type definition for parameter <_nStates>
+ SwAccessibleEvent_Impl( EventType eT,
+ SwAccessibleContext *pA,
+ const SwFrmOrObj& rFrmOrObj,
+ const tAccessibleStates _nStates )
+ : mxAcc( pA ),
+ maFrmOrObj( rFrmOrObj ),
+ meType( eT ),
+ mnStates( _nStates )
+ {
+ ASSERT( SwAccessibleEvent_Impl::CARET_OR_STATES == meType,
+ "wrong event constructor, CARET_OR_STATES only" );
+ }
+
+ // <SetType(..)> only used in method <SwAccessibleMap::AppendEvent(..)>
+ inline void SetType( EventType eT )
+ {
+ meType = eT;
+ }
+ inline EventType GetType() const
+ {
+ return meType;
+ }
+
+ inline ::vos::ORef < SwAccessibleContext > GetContext() const
+ {
+ uno::Reference < XAccessible > xTmp( mxAcc );
+ ::vos::ORef < SwAccessibleContext > xAccImpl(
+ static_cast<SwAccessibleContext*>( xTmp.get() ) );
+
+ return xAccImpl;
+ }
+
+ inline const SwRect& GetOldBox() const
+ {
+ return maOldBox;
+ }
+ // <SetOldBox(..)> only used in method <SwAccessibleMap::AppendEvent(..)>
+ inline void SetOldBox( const SwRect& rOldBox )
+ {
+ maOldBox = rOldBox;
+ }
+
+ inline const SwFrmOrObj& GetFrmOrObj() const
+ {
+ return maFrmOrObj;
+ }
+
+ // <SetStates(..)> only used in method <SwAccessibleMap::AppendEvent(..)>
+ // --> OD 2005-12-12 #i27301# - use new type definition for parameter <_nStates>
+ inline void SetStates( tAccessibleStates _nStates )
+ {
+ mnStates |= _nStates;
+ }
+ // <--
+
+ inline sal_Bool IsUpdateCursorPos() const
+ {
+ return (mnStates & ACC_STATE_CARET) != 0;
+ }
+ inline sal_Bool IsInvalidateStates() const
+ {
+ return (mnStates & ACC_STATE_MASK) != 0;
+ }
+ inline sal_Bool IsInvalidateRelation() const
+ {
+ return (mnStates & ACC_STATE_RELATION_MASK) != 0;
+ }
+ // --> OD 2005-12-12 #i27301# - new event TEXT_SELECTION_CHANGED
+ inline sal_Bool IsInvalidateTextSelection() const
+ {
+ return ( mnStates & ACC_STATE_TEXT_SELECTION_CHANGED ) != 0;
+ }
+ // <--
+ // --> OD 2009-01-07 #i88069# - new event TEXT_ATTRIBUTE_CHANGED
+ inline sal_Bool IsInvalidateTextAttrs() const
+ {
+ return ( mnStates & ACC_STATE_TEXT_ATTRIBUTE_CHANGED ) != 0;
+ }
+ // <--
+ // --> OD 2005-12-12 #i27301# - use new type definition <tAccessibleStates>
+ // for return value
+ inline tAccessibleStates GetStates() const
+ {
+ return mnStates & ACC_STATE_MASK;
+ }
+ // <--
+ // --> OD 2005-12-12 #i27301# - use new type definition <tAccessibleStates>
+ // for return value
+ inline tAccessibleStates GetAllStates() const
+ {
+ return mnStates;
+ }
+ // <--
+};
+
+//------------------------------------------------------------------------------
+typedef ::std::list < SwAccessibleEvent_Impl > _SwAccessibleEventList_Impl;
+
+class SwAccessibleEventList_Impl: public _SwAccessibleEventList_Impl
+{
+ sal_Bool mbFiring;
+
+public:
+
+ SwAccessibleEventList_Impl()
+ : mbFiring( sal_False )
+ {}
+
+ inline void SetFiring()
+ {
+ mbFiring = sal_True;
+ }
+ inline sal_Bool IsFiring() const
+ {
+ return mbFiring;
+ }
+};
+
+//------------------------------------------------------------------------------
+// The shape list is filled if an accessible shape is destroyed. It
+// simply keeps a reference to the accessible shape's XShape. These
+// references are destroyed within the EndAction when firing events,
+// There are twp reason for this. First of all, a new accessible shape
+// for the XShape might be created soon. It's then cheaper if the XShape
+// still exists. The other reason are situations where an accessible shape
+// is destroyed within an SwFrmFmt::Modify. In this case, destryoing
+// the XShape at the same time (indirectly by destroying the accessible
+// shape) leads to an assert, because a client of the Modify is destroyed
+// within a Modify call.
+
+typedef ::std::list < uno::Reference < drawing::XShape > > _SwShapeList_Impl;
+
+class SwShapeList_Impl: public _SwShapeList_Impl
+{
+public:
+
+ SwShapeList_Impl() {}
+};
+
+
+//------------------------------------------------------------------------------
+struct SwFrmOrObjFunc
+{
+ sal_Bool operator()( const SwFrmOrObj& r1,
+ const SwFrmOrObj& r2 ) const
+ {
+ const void *p1 = r1.GetSwFrm()
+ ? static_cast < const void * >( r1.GetSwFrm())
+ : static_cast < const void * >( r1.GetSdrObject() );
+ const void *p2 = r2.GetSwFrm()
+ ? static_cast < const void * >( r2.GetSwFrm())
+ : static_cast < const void * >( r2.GetSdrObject() );
+ return p1 < p2;
+ }
+};
+typedef ::std::map < SwFrmOrObj, SwAccessibleEventList_Impl::iterator,
+ SwFrmOrObjFunc > _SwAccessibleEventMap_Impl;
+
+class SwAccessibleEventMap_Impl: public _SwAccessibleEventMap_Impl
+{
+};
+
+//------------------------------------------------------------------------------
+// --> OD 2005-12-13 #i27301# - map containing the accessible paragraph, which
+// have a selection. Needed to keep this information to submit corresponding
+// TEXT_SELECTION_CHANGED events.
+struct SwAccessibleParaSelection
+{
+ xub_StrLen nStartOfSelection;
+ xub_StrLen nEndOfSelection;
+
+ SwAccessibleParaSelection( const xub_StrLen _nStartOfSelection,
+ const xub_StrLen _nEndOfSelection )
+ : nStartOfSelection( _nStartOfSelection ),
+ nEndOfSelection( _nEndOfSelection )
+ {}
+};
+
+struct SwXAccWeakRefComp
+{
+ sal_Bool operator()( const uno::WeakReference<XAccessible>& _rXAccWeakRef1,
+ const uno::WeakReference<XAccessible>& _rXAccWeakRef2 ) const
+ {
+ return _rXAccWeakRef1.get() < _rXAccWeakRef2.get();
+ }
+};
+
+typedef ::std::map< uno::WeakReference < XAccessible >,
+ SwAccessibleParaSelection,
+ SwXAccWeakRefComp > _SwAccessibleSelectedParas_Impl;
+
+class SwAccessibleSelectedParas_Impl: public _SwAccessibleSelectedParas_Impl
+{};
+// <--
+//------------------------------------------------------------------------------
+static sal_Bool AreInSameTable( const uno::Reference< XAccessible >& rAcc,
+ const SwFrm *pFrm )
+{
+ sal_Bool bRet = sal_False;
+
+ if( pFrm && pFrm->IsCellFrm() && rAcc.is() )
+ {
+ // Is it in the same table? We check that
+ // by comparing the last table frame in the
+ // follow chain, because that's cheaper than
+ // searching the first one.
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( rAcc.get() );
+ if( pAccImpl->GetFrm()->IsCellFrm() )
+ {
+ const SwTabFrm *pTabFrm1 = pAccImpl->GetFrm()->FindTabFrm();
+ while( pTabFrm1->GetFollow() )
+ pTabFrm1 = pTabFrm1->GetFollow();
+
+ const SwTabFrm *pTabFrm2 = pFrm->FindTabFrm();
+ while( pTabFrm2->GetFollow() )
+ pTabFrm2 = pTabFrm2->GetFollow();
+
+ bRet = (pTabFrm1 == pTabFrm2);
+ }
+ }
+
+ return bRet;
+}
+
+void SwAccessibleMap::FireEvent( const SwAccessibleEvent_Impl& rEvent )
+{
+ ::vos::ORef < SwAccessibleContext > xAccImpl( rEvent.GetContext() );
+ if( SwAccessibleEvent_Impl::SHAPE_SELECTION == rEvent.GetType() )
+ {
+ DoInvalidateShapeSelection();
+ }
+ else if( xAccImpl.isValid() && xAccImpl->GetFrm() )
+ {
+ // --> OD 2009-01-07 #i88069#
+ if ( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE &&
+ rEvent.IsInvalidateTextAttrs() )
+ {
+ xAccImpl->InvalidateAttr();
+ }
+ // <--
+ switch( rEvent.GetType() )
+ {
+ case SwAccessibleEvent_Impl::INVALID_CONTENT:
+ xAccImpl->InvalidateContent();
+ break;
+ case SwAccessibleEvent_Impl::POS_CHANGED:
+ xAccImpl->InvalidatePosOrSize( rEvent.GetOldBox() );
+ break;
+ case SwAccessibleEvent_Impl::CHILD_POS_CHANGED:
+ xAccImpl->InvalidateChildPosOrSize( rEvent.GetFrmOrObj(),
+ rEvent.GetOldBox() );
+ break;
+ case SwAccessibleEvent_Impl::DISPOSE:
+ ASSERT( xAccImpl.isValid(),
+ "dispose event has been stored" );
+ break;
+ // --> OD 2009-01-06 #i88069#
+ case SwAccessibleEvent_Impl::INVALID_ATTR:
+ // nothing to do here - handled above
+ break;
+ // <--
+ default:
+ break;
+ }
+ if( SwAccessibleEvent_Impl::DISPOSE != rEvent.GetType() )
+ {
+ if( rEvent.IsUpdateCursorPos() )
+ xAccImpl->InvalidateCursorPos();
+ if( rEvent.IsInvalidateStates() )
+ xAccImpl->InvalidateStates( rEvent.GetStates() );
+ if( rEvent.IsInvalidateRelation() )
+ {
+ // --> OD 2005-12-01 #i27138#
+ // both events CONTENT_FLOWS_FROM_RELATION_CHANGED and
+ // CONTENT_FLOWS_TO_RELATION_CHANGED are possible
+ if ( rEvent.GetAllStates() & ACC_STATE_RELATION_FROM )
+ {
+ xAccImpl->InvalidateRelation(
+ AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED );
+ }
+ if ( rEvent.GetAllStates() & ACC_STATE_RELATION_TO )
+ {
+ xAccImpl->InvalidateRelation(
+ AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED );
+ }
+ // <--
+ }
+ // --> OD 2005-12-12 #i27301# - submit event TEXT_SELECTION_CHANGED
+ if ( rEvent.IsInvalidateTextSelection() )
+ {
+ xAccImpl->InvalidateTextSelection();
+ }
+ // <--
+ }
+ }
+}
+
+void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
+{
+ vos::OGuard aGuard( maEventMutex );
+
+ if( !mpEvents )
+ mpEvents = new SwAccessibleEventList_Impl;
+ if( !mpEventMap )
+ mpEventMap = new SwAccessibleEventMap_Impl;
+
+ if( mpEvents->IsFiring() )
+ {
+ // While events are fired new ones are generated. They have to be fired
+ // now. This does not work for DISPOSE events!
+ ASSERT( rEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE,
+ "dispose event while firing events" );
+ FireEvent( rEvent );
+ }
+ else
+ {
+
+ SwAccessibleEventMap_Impl::iterator aIter =
+ mpEventMap->find( rEvent.GetFrmOrObj() );
+ if( aIter != mpEventMap->end() )
+ {
+ SwAccessibleEvent_Impl aEvent( *(*aIter).second );
+ ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE,
+ "dispose events should not be stored" );
+ sal_Bool bAppendEvent = sal_True;
+ switch( rEvent.GetType() )
+ {
+ case SwAccessibleEvent_Impl::CARET_OR_STATES:
+ // A CARET_OR_STATES event is added to any other
+ // event only. It is broadcasted after any other event, so the
+ // event should be put to the back.
+ ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ "invalid event combination" );
+ aEvent.SetStates( rEvent.GetAllStates() );
+ break;
+ case SwAccessibleEvent_Impl::INVALID_CONTENT:
+ // An INVALID_CONTENT event overwrites a CARET_OR_STATES
+ // event (but keeps its flags) and it is contained in a
+ // POS_CHANGED event.
+ // Therefor, the event's type has to be adapted and the event
+ // has to be put at the end.
+ ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ "invalid event combination" );
+ if( aEvent.GetType() == SwAccessibleEvent_Impl::CARET_OR_STATES )
+ aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT );
+ break;
+ case SwAccessibleEvent_Impl::POS_CHANGED:
+ // A pos changed event overwrites CARET_STATES (keeping its
+ // flags) as well as INVALID_CONTENT. The old box position
+ // has to be stored however if the old event is not a
+ // POS_CHANGED itself.
+ ASSERT( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ "invalid event combination" );
+ if( aEvent.GetType() != SwAccessibleEvent_Impl::POS_CHANGED )
+ aEvent.SetOldBox( rEvent.GetOldBox() );
+ aEvent.SetType( SwAccessibleEvent_Impl::POS_CHANGED );
+ break;
+ case SwAccessibleEvent_Impl::CHILD_POS_CHANGED:
+ // CHILD_POS_CHANGED events can only follow CHILD_POS_CHANGED
+ // events. The only action that needs to be done again is
+ // to put the old event to the back. The new one cannot be used,
+ // because we are interested in the old frame bounds.
+ ASSERT( aEvent.GetType() == SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ "invalid event combination" );
+ break;
+ case SwAccessibleEvent_Impl::SHAPE_SELECTION:
+ ASSERT( aEvent.GetType() == SwAccessibleEvent_Impl::SHAPE_SELECTION,
+ "invalid event combination" );
+ break;
+ case SwAccessibleEvent_Impl::DISPOSE:
+ // DISPOSE events overwrite all others. They are not stored
+ // but executed immediatly to avoid broadcasting of
+ // defunctional objects. So what needs to be done here is to
+ // remove all events for the frame in question.
+ bAppendEvent = sal_False;
+ break;
+ // --> OD 2009-01-06 #i88069#
+ case SwAccessibleEvent_Impl::INVALID_ATTR:
+ ASSERT( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR,
+ "invalid event combination" );
+ break;
+ // <--
+ }
+ if( bAppendEvent )
+ {
+ mpEvents->erase( (*aIter).second );
+ (*aIter).second = mpEvents->insert( mpEvents->end(), aEvent );
+ }
+ else
+ {
+ mpEvents->erase( (*aIter).second );
+ mpEventMap->erase( aIter );
+ }
+ }
+ else if( SwAccessibleEvent_Impl::DISPOSE != rEvent.GetType() )
+ {
+ SwAccessibleEventMap_Impl::value_type aEntry( rEvent.GetFrmOrObj(),
+ mpEvents->insert( mpEvents->end(), rEvent ) );
+ mpEventMap->insert( aEntry );
+ }
+ }
+}
+
+void SwAccessibleMap::InvalidateCursorPosition(
+ const uno::Reference< XAccessible >& rAcc )
+{
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( rAcc.get() );
+ ASSERT( pAccImpl, "no caret context" );
+ ASSERT( pAccImpl->GetFrm(), "caret context is disposed" );
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl,
+ pAccImpl->GetFrm(), ACC_STATE_CARET );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ // While firing events the current frame might have
+ // been disposed because it moved out of the vis area.
+ // Setting the cursor for such frames is useless and even
+ // causes asserts.
+ if( pAccImpl->GetFrm() )
+ pAccImpl->InvalidateCursorPos();
+ }
+}
+
+void SwAccessibleMap::InvalidateShapeSelection()
+{
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::SHAPE_SELECTION );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ DoInvalidateShapeSelection();
+ }
+}
+
+void SwAccessibleMap::DoInvalidateShapeSelection()
+{
+ SwAccessibleObjShape_Impl *pShapes = 0;
+ SwAccessibleObjShape_Impl *pSelShape = 0;
+ size_t nShapes = 0;
+
+ const ViewShell *pVSh = GetShell();
+ const SwFEShell *pFESh = pVSh->ISA( SwFEShell ) ?
+ static_cast< const SwFEShell * >( pVSh ) : 0;
+ sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0;
+
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpShapeMap )
+ pShapes = mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
+ }
+
+ if( pShapes )
+ {
+ ::std::list< const SwFrm * > aParents;
+ Window *pWin = GetShell()->GetWin();
+ sal_Bool bFocused = pWin && pWin->HasFocus();
+ SwAccessibleObjShape_Impl *pShape = pShapes;
+ while( nShapes )
+ {
+ if( pShape->second.isValid() )
+ {
+ sal_Bool bChanged;
+ if( pShape >= pSelShape )
+ {
+ bChanged =
+ pShape->second->SetState( AccessibleStateType::SELECTED );
+ if( bFocused && 1 == nSelShapes )
+ pShape->second->SetState( AccessibleStateType::FOCUSED );
+ else
+ pShape->second->ResetState( AccessibleStateType::FOCUSED );
+ }
+ else
+ {
+ bChanged =
+ pShape->second->ResetState( AccessibleStateType::SELECTED );
+ pShape->second->ResetState( AccessibleStateType::FOCUSED );
+ }
+ if( bChanged )
+ {
+ SwFrmOrObj aFrmOrObj( pShape->first );
+ SwFrmOrObj aParent =
+ SwAccessibleFrame::GetParent( aFrmOrObj,
+ GetShell()->IsPreView() );
+ aParents.push_back( aParent.GetSwFrm() );
+ }
+ }
+
+ --nShapes;
+ ++pShape;
+ }
+ if( aParents.size() > 0 )
+ {
+ ::std::list< const SwFrm * >::const_iterator aIter = aParents.begin();
+ ::std::list< const SwFrm * >::const_iterator aEndIter = aParents.end();
+ while( aIter != aEndIter )
+ {
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::const_iterator aMapIter =
+ mpFrmMap->find( *aIter );
+ if( aMapIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc( (*aMapIter).second );
+ xParentAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ }
+ }
+ }
+ if( xParentAccImpl.isValid() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
+ xParentAccImpl->FireAccessibleEvent( aEvent );
+ }
+
+ ++aIter;
+ }
+ }
+
+ delete[] pShapes;
+ }
+}
+
+void SwAccessibleMap::DoInvalidateShapeFocus()
+{
+ const ViewShell *pVSh = GetShell();
+ const SwFEShell *pFESh = pVSh->ISA( SwFEShell ) ?
+ static_cast< const SwFEShell * >( pVSh ) : 0;
+ sal_uInt16 nSelShapes = pFESh ? pFESh->IsObjSelected() : 0;
+
+ if( nSelShapes != 1 )
+ return;
+
+ SwAccessibleObjShape_Impl *pShapes = 0;
+ SwAccessibleObjShape_Impl *pSelShape = 0;
+ size_t nShapes = 0;
+
+
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpShapeMap )
+ pShapes = mpShapeMap->Copy( nShapes, pFESh, &pSelShape );
+ }
+
+ if( pShapes )
+ {
+ Window *pWin = GetShell()->GetWin();
+ sal_Bool bFocused = pWin && pWin->HasFocus();
+ SwAccessibleObjShape_Impl *pShape = pShapes;
+ while( nShapes )
+ {
+ if( pShape->second.isValid() )
+ {
+ if( bFocused && pShape >= pSelShape )
+ pShape->second->SetState( AccessibleStateType::FOCUSED );
+ else
+ pShape->second->ResetState( AccessibleStateType::FOCUSED );
+ }
+
+ --nShapes;
+ ++pShape;
+ }
+
+ delete[] pShapes;
+ }
+}
+
+
+SwAccessibleMap::SwAccessibleMap( ViewShell *pSh ) :
+ mpFrmMap( 0 ),
+ mpShapeMap( 0 ),
+ mpShapes( 0 ),
+ mpEvents( 0 ),
+ mpEventMap( 0 ),
+ // --> OD 2005-12-13 #i27301#
+ mpSelectedParas( 0 ),
+ // <--
+ mpVSh( pSh ),
+ mpPreview( 0 ),
+ mnPara( 1 ),
+ mnFootnote( 1 ),
+ mnEndnote( 1 ),
+ mbShapeSelected( sal_False )
+{
+ pSh->GetLayout()->AddAccessibleShell();
+}
+
+SwAccessibleMap::~SwAccessibleMap()
+{
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpFrmMap )
+ {
+ const SwRootFrm *pRootFrm = GetShell()->GetLayout();
+ SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pRootFrm );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+ if( !xAcc.is() )
+ xAcc = new SwAccessibleDocument( this );
+ }
+ }
+
+ SwAccessibleDocument *pAcc =
+ static_cast< SwAccessibleDocument * >( xAcc.get() );
+ pAcc->Dispose( sal_True );
+
+ {
+ vos::OGuard aGuard( maMutex );
+#ifndef PRODUCT
+ ASSERT( !mpFrmMap || mpFrmMap->empty(),
+ "Frame map should be empty after disposing the root frame" );
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->begin();
+ while( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xTmp = (*aIter).second;
+ if( xTmp.is() )
+ {
+ SwAccessibleContext *pTmp =
+ static_cast< SwAccessibleContext * >( xTmp.get() );
+ (void) pTmp;
+ }
+ ++aIter;
+ }
+ }
+ ASSERT( !mpShapeMap || mpShapeMap->empty(),
+ "Object map should be empty after disposing the root frame" );
+ if( mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::iterator aIter = mpShapeMap->begin();
+ while( aIter != mpShapeMap->end() )
+ {
+ uno::Reference < XAccessible > xTmp = (*aIter).second;
+ if( xTmp.is() )
+ {
+ ::accessibility::AccessibleShape *pTmp =
+ static_cast< ::accessibility::AccessibleShape* >( xTmp.get() );
+ (void) pTmp;
+ }
+ ++aIter;
+ }
+ }
+#endif
+ delete mpFrmMap;
+ mpFrmMap = 0;
+ delete mpShapeMap;
+ mpShapeMap = 0;
+ delete mpShapes;
+ mpShapes = 0;
+ // --> OD 2005-12-13 #i27301#
+ delete mpSelectedParas;
+ mpSelectedParas = 0;
+ // <--
+ }
+
+ delete mpPreview;
+ mpPreview = NULL;
+
+ {
+ vos::OGuard aGuard( maEventMutex );
+#ifndef PRODUCT
+ ASSERT( !(mpEvents || mpEventMap), "pending events" );
+ if( mpEvents )
+ {
+ SwAccessibleEventList_Impl::iterator aIter = mpEvents->begin();
+ while( aIter != mpEvents->end() )
+ {
+ ++aIter;
+ }
+ }
+ if( mpEventMap )
+ {
+ SwAccessibleEventMap_Impl::iterator aIter = mpEventMap->begin();
+ while( aIter != mpEventMap->end() )
+ {
+ ++aIter;
+ }
+ }
+#endif
+ delete mpEventMap;
+ mpEventMap = 0;
+ delete mpEvents;
+ mpEvents = 0;
+ }
+ mpVSh->GetLayout()->RemoveAccessibleShell();
+}
+
+uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView(
+ sal_Bool bPagePreview )
+{
+ uno::Reference < XAccessible > xAcc;
+ sal_Bool bSetVisArea = sal_False;
+
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( !mpFrmMap )
+ {
+ mpFrmMap = new SwAccessibleContextMap_Impl;
+#ifndef PRODUCT
+ mpFrmMap->mbLocked = sal_False;
+#endif
+ }
+
+#ifndef PRODUCT
+ ASSERT( !mpFrmMap->mbLocked, "Map is locked" );
+ mpFrmMap->mbLocked = sal_True;
+#endif
+
+ const SwRootFrm *pRootFrm = GetShell()->GetLayout();
+ SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pRootFrm );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+ if( xAcc.is() )
+ {
+ bSetVisArea = sal_True; // Set VisArea when map mutex is not
+ // locked
+ }
+ else
+ {
+ if( bPagePreview )
+ xAcc = new SwAccessiblePreview( this );
+ else
+ xAcc = new SwAccessibleDocument( this );
+
+ if( aIter != mpFrmMap->end() )
+ {
+ (*aIter).second = xAcc;
+ }
+ else
+ {
+ SwAccessibleContextMap_Impl::value_type aEntry( pRootFrm, xAcc );
+ mpFrmMap->insert( aEntry );
+ }
+ }
+
+#ifndef PRODUCT
+ mpFrmMap->mbLocked = sal_False;
+#endif
+ }
+
+ if( bSetVisArea )
+ {
+ SwAccessibleDocumentBase *pAcc =
+ static_cast< SwAccessibleDocumentBase * >( xAcc.get() );
+ pAcc->SetVisArea();
+ }
+
+ return xAcc;
+}
+
+uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( )
+{
+ return _GetDocumentView( sal_False );
+}
+
+// OD 14.01.2003 #103492# - complete re-factoring of method due to new page/print
+// preview functionality.
+uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview(
+ const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize )
+{
+ // create & update preview data object
+ if( mpPreview == NULL )
+ mpPreview = new SwAccPreviewData();
+ mpPreview->Update( _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
+
+ uno::Reference<XAccessible> xAcc = _GetDocumentView( sal_True );
+ return xAcc;
+}
+
+uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm,
+ sal_Bool bCreate )
+{
+ uno::Reference < XAccessible > xAcc;
+ uno::Reference < XAccessible > xOldCursorAcc;
+ sal_Bool bOldShapeSelected = sal_False;
+
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( !mpFrmMap && bCreate )
+ mpFrmMap = new SwAccessibleContextMap_Impl;
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter = mpFrmMap->find( pFrm );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+
+ if( !xAcc.is() && bCreate )
+ {
+ SwAccessibleContext *pAcc = 0;
+ switch( pFrm->GetType() )
+ {
+ case FRM_TXT:
+ mnPara++;
+ pAcc = new SwAccessibleParagraph( this,
+ static_cast< const SwTxtFrm * >( pFrm ) );
+ break;
+ case FRM_HEADER:
+ pAcc = new SwAccessibleHeaderFooter( this,
+ static_cast< const SwHeaderFrm *>( pFrm ) );
+ break;
+ case FRM_FOOTER:
+ pAcc = new SwAccessibleHeaderFooter( this,
+ static_cast< const SwFooterFrm *>( pFrm ) );
+ break;
+ case FRM_FTN:
+ {
+ const SwFtnFrm *pFtnFrm =
+ static_cast < const SwFtnFrm * >( pFrm );
+ sal_Bool bIsEndnote =
+ SwAccessibleFootnote::IsEndnote( pFtnFrm );
+ pAcc = new SwAccessibleFootnote( this, bIsEndnote,
+ (bIsEndnote ? mnEndnote++ : mnFootnote++),
+ pFtnFrm );
+ }
+ break;
+ case FRM_FLY:
+ {
+ const SwFlyFrm *pFlyFrm =
+ static_cast < const SwFlyFrm * >( pFrm );
+ switch( SwAccessibleFrameBase::GetNodeType( pFlyFrm ) )
+ {
+ case ND_GRFNODE:
+ pAcc = new SwAccessibleGraphic( this, pFlyFrm );
+ break;
+ case ND_OLENODE:
+ pAcc = new SwAccessibleEmbeddedObject( this, pFlyFrm );
+ break;
+ default:
+ pAcc = new SwAccessibleTextFrame( this, pFlyFrm );
+ break;
+ }
+ }
+ break;
+ case FRM_CELL:
+ pAcc = new SwAccessibleCell( this,
+ static_cast< const SwCellFrm *>( pFrm ) );
+ break;
+ case FRM_TAB:
+ pAcc = new SwAccessibleTable( this,
+ static_cast< const SwTabFrm *>( pFrm ) );
+ break;
+ case FRM_PAGE:
+ DBG_ASSERT( GetShell()->IsPreView(),
+ "accessible page frames only in PagePreview" );
+ pAcc = new SwAccessiblePage( this, pFrm );
+ break;
+ }
+ xAcc = pAcc;
+
+ ASSERT( xAcc.is(), "unknown frame type" );
+ if( xAcc.is() )
+ {
+ if( aIter != mpFrmMap->end() )
+ {
+ (*aIter).second = xAcc;
+ }
+ else
+ {
+ SwAccessibleContextMap_Impl::value_type aEntry( pFrm, xAcc );
+ mpFrmMap->insert( aEntry );
+ }
+
+ if( pAcc->HasCursor() &&
+ !AreInSameTable( mxCursorContext, pFrm ) )
+ {
+ // If the new context has the focus, and if we know
+ // another context that had the focus, then the focus
+ // just moves from the old context to the new one. We
+ // have to send a focus event and a caret event for
+ // the old context then. We have to to that know,
+ // because after we have left this method, anyone might
+ // call getStates for the new context and will get a
+ // focused state then. Sending the focus changes event
+ // after that seems to be strange. However, we cannot
+ // send a focus event fo the new context now, because
+ // noone except us knows it. In any case, we remeber
+ // the new context as the one that has the focus
+ // currently.
+
+ xOldCursorAcc = mxCursorContext;
+ mxCursorContext = xAcc;
+
+ bOldShapeSelected = mbShapeSelected;
+ mbShapeSelected = sal_False;
+ }
+ }
+ }
+ }
+ }
+
+ // Invalidate focus for old object when map is not locked
+ if( xOldCursorAcc.is() )
+ InvalidateCursorPosition( xOldCursorAcc );
+ if( bOldShapeSelected )
+ InvalidateShapeSelection();
+
+ return xAcc;
+}
+
+::vos::ORef < SwAccessibleContext > SwAccessibleMap::GetContextImpl(
+ const SwFrm *pFrm,
+ sal_Bool bCreate )
+{
+ uno::Reference < XAccessible > xAcc( GetContext( pFrm, bCreate ) );
+
+ ::vos::ORef < SwAccessibleContext > xAccImpl(
+ static_cast< SwAccessibleContext * >( xAcc.get() ) );
+
+ return xAccImpl;
+}
+
+uno::Reference< XAccessible> SwAccessibleMap::GetContext(
+ const SdrObject *pObj,
+ SwAccessibleContext *pParentImpl,
+ sal_Bool bCreate )
+{
+ uno::Reference < XAccessible > xAcc;
+ uno::Reference < XAccessible > xOldCursorAcc;
+
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( !mpShapeMap && bCreate )
+ mpShapeMap = new SwAccessibleShapeMap_Impl( this );
+ if( mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::iterator aIter =
+ mpShapeMap->find( pObj );
+ if( aIter != mpShapeMap->end() )
+ xAcc = (*aIter).second;
+
+ if( !xAcc.is() && bCreate )
+ {
+ ::accessibility::AccessibleShape *pAcc = 0;
+ uno::Reference < drawing::XShape > xShape(
+ const_cast< SdrObject * >( pObj )->getUnoShape(),
+ uno::UNO_QUERY );
+ if( xShape.is() )
+ {
+ ::accessibility::ShapeTypeHandler& rShapeTypeHandler =
+ ::accessibility::ShapeTypeHandler::Instance();
+ uno::Reference < XAccessible > xParent( pParentImpl );
+ ::accessibility::AccessibleShapeInfo aShapeInfo(
+ xShape, xParent, this );
+
+ pAcc = rShapeTypeHandler.CreateAccessibleObject(
+ aShapeInfo, mpShapeMap->GetInfo() );
+ }
+ xAcc = pAcc;
+
+ ASSERT( xAcc.is(), "unknown shape type" );
+ if( xAcc.is() )
+ {
+ pAcc->Init();
+ if( aIter != mpShapeMap->end() )
+ {
+ (*aIter).second = xAcc;
+ }
+ else
+ {
+ SwAccessibleShapeMap_Impl::value_type aEntry( pObj,
+ xAcc );
+ mpShapeMap->insert( aEntry );
+ }
+ // TODO: focus!!!
+ }
+ }
+ }
+ }
+
+ // Invalidate focus for old object when map is not locked
+ if( xOldCursorAcc.is() )
+ InvalidateCursorPosition( xOldCursorAcc );
+
+ return xAcc;
+}
+
+::vos::ORef < ::accessibility::AccessibleShape > SwAccessibleMap::GetContextImpl(
+ const SdrObject *pObj,
+ SwAccessibleContext *pParentImpl,
+ sal_Bool bCreate )
+{
+ uno::Reference < XAccessible > xAcc( GetContext( pObj, pParentImpl, bCreate ) );
+
+ ::vos::ORef < ::accessibility::AccessibleShape > xAccImpl(
+ static_cast< ::accessibility::AccessibleShape* >( xAcc.get() ) );
+
+ return xAccImpl;
+}
+
+
+void SwAccessibleMap::RemoveContext( const SwFrm *pFrm )
+{
+ vos::OGuard aGuard( maMutex );
+
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( pFrm );
+ if( aIter != mpFrmMap->end() )
+ {
+ mpFrmMap->erase( aIter );
+
+ // Remove reference to old caret object. Though mxCursorContext
+ // is a weak reference and cleared automatically, clearing it
+ // directly makes sure to not keep a defunctional object.
+ uno::Reference < XAccessible > xOldAcc( mxCursorContext );
+ if( xOldAcc.is() )
+ {
+ SwAccessibleContext *pOldAccImpl =
+ static_cast< SwAccessibleContext *>( xOldAcc.get() );
+ ASSERT( pOldAccImpl->GetFrm(), "old caret context is disposed" );
+ if( pOldAccImpl->GetFrm() == pFrm )
+ {
+ xOldAcc.clear(); // get an empty ref
+ mxCursorContext = xOldAcc;
+ }
+ }
+
+ if( mpFrmMap->empty() )
+ {
+ delete mpFrmMap;
+ mpFrmMap = 0;
+ }
+ }
+ }
+}
+
+void SwAccessibleMap::RemoveContext( const SdrObject *pObj )
+{
+ vos::OGuard aGuard( maMutex );
+
+ if( mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::iterator aIter =
+ mpShapeMap->find( pObj );
+ if( aIter != mpShapeMap->end() )
+ {
+ mpShapeMap->erase( aIter );
+
+ // The shape selection flag is not cleared, but one might do
+ // so but has to make sure that the removed context is the one
+ // that is selected.
+
+ if( mpShapeMap->empty() )
+ {
+ delete mpShapeMap;
+ mpShapeMap = 0;
+ }
+ }
+ }
+}
+
+
+void SwAccessibleMap::Dispose( const SwFrm *pFrm, const SdrObject *pObj,
+ sal_Bool bRecursive )
+{
+ SwFrmOrObj aFrmOrObj( pFrm, pObj );
+
+ // Indeed, the following assert checks the frame's accessible flag,
+ // because that's the one that is evaluated in the layout. The frame
+ // might not be accessible anyway. That's the case for cell frames that
+ // contain further cells.
+ ASSERT( !aFrmOrObj.GetSwFrm() || aFrmOrObj.GetSwFrm()->IsAccessibleFrm(),
+ "non accessible frame should be disposed" );
+
+ ::vos::ORef< SwAccessibleContext > xAccImpl;
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl;
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ // get accessible context for frame
+ {
+ vos::OGuard aGuard( maMutex );
+
+ // First of all look for an accessible context for a frame
+ if( aFrmOrObj.GetSwFrm() && mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ xAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ }
+ }
+ if( !xAccImpl.isValid() && mpFrmMap )
+ {
+ // If there is none, look if the parent is accessible.
+ const SwFrm *pParent =
+ SwAccessibleFrame::GetParent( aFrmOrObj,
+ GetShell()->IsPreView());
+
+ if( pParent )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( pParent );
+ if( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ xParentAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ }
+ }
+ }
+ if( !xParentAccImpl.isValid() && !aFrmOrObj.GetSwFrm() &&
+ mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::iterator aIter =
+ mpShapeMap->find( aFrmOrObj.GetSdrObject() );
+ if( aIter != mpShapeMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ xShapeAccImpl =
+ static_cast< ::accessibility::AccessibleShape *>( xAcc.get() );
+ }
+ }
+ if( pObj && GetShell()->ActionPend() &&
+ (xParentAccImpl.isValid() || xShapeAccImpl.isValid()) )
+ {
+ // Keep a reference to the XShape to avoid that it
+ // is deleted with a SwFrmFmt::Modify.
+ uno::Reference < drawing::XShape > xShape(
+ const_cast< SdrObject * >( pObj )->getUnoShape(),
+ uno::UNO_QUERY );
+ if( xShape.is() )
+ {
+ if( !mpShapes )
+ mpShapes = new SwShapeList_Impl;
+ mpShapes->push_back( xShape );
+ }
+ }
+ }
+
+ // remove events stored for the frame
+ {
+ vos::OGuard aGuard( maEventMutex );
+ if( mpEvents )
+ {
+ SwAccessibleEventMap_Impl::iterator aIter =
+ mpEventMap->find( aFrmOrObj );
+ if( aIter != mpEventMap->end() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::DISPOSE, aFrmOrObj );
+ AppendEvent( aEvent );
+ }
+ }
+ }
+
+ // If the frame is accessible and there is a context for it, dispose
+ // the frame. If the frame is no context for it but disposing should
+ // take place recursive, the frame's children have to be disposed
+ // anyway, so we have to create the context then.
+ if( xAccImpl.isValid() )
+ {
+ xAccImpl->Dispose( bRecursive );
+ }
+ else if( xParentAccImpl.isValid() )
+ {
+ // If the frame is a cell frame, the table must be notified.
+ // If we are in an action, a table model change event will
+ // be broadcasted at the end of the action to give the table
+ // a chance to generate a single table change event.
+
+ xParentAccImpl->DisposeChild( aFrmOrObj, bRecursive );
+ }
+ else if( xShapeAccImpl.isValid() )
+ {
+ RemoveContext( aFrmOrObj.GetSdrObject() );
+ xShapeAccImpl->dispose();
+ }
+
+ if( mpPreview && pFrm && pFrm->IsPageFrm() )
+ mpPreview->DisposePage( static_cast< const SwPageFrm *>( pFrm ) );
+ }
+}
+
+void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
+ const SdrObject *pObj,
+ const SwRect& rOldBox )
+{
+ SwFrmOrObj aFrmOrObj( pFrm, pObj );
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl;
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( mpFrmMap )
+ {
+ if( aFrmOrObj.GetSwFrm() )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ {
+ // If there is an accesible object already it is
+ // notified directly.
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ xAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ }
+ }
+ if( !xAccImpl.isValid() )
+ {
+ // Otherwise we look if the parent is accessible.
+ // If not, there is nothing to do.
+ const SwFrm *pParent =
+ SwAccessibleFrame::GetParent( aFrmOrObj,
+ GetShell()->IsPreView());
+
+ if( pParent )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( pParent );
+ if( aIter != mpFrmMap->end() )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ xParentAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ }
+ }
+ }
+ }
+ }
+
+ if( xAccImpl.isValid() )
+ {
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::POS_CHANGED, xAccImpl.getBodyPtr(),
+ aFrmOrObj, rOldBox );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ xAccImpl->InvalidatePosOrSize( rOldBox );
+ }
+ }
+ else if( xParentAccImpl.isValid() )
+ {
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::CHILD_POS_CHANGED,
+ xParentAccImpl.getBodyPtr(), aFrmOrObj, rOldBox );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ xParentAccImpl->InvalidateChildPosOrSize( aFrmOrObj,
+ rOldBox );
+ }
+ }
+ }
+}
+
+void SwAccessibleMap::InvalidateContent( const SwFrm *pFrm )
+{
+ SwFrmOrObj aFrmOrObj( pFrm );
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+ }
+ }
+
+ if( xAcc.is() )
+ {
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::INVALID_CONTENT, pAccImpl,
+ aFrmOrObj );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ pAccImpl->InvalidateContent();
+ }
+ }
+ }
+}
+
+// --> OD 2009-01-06 #i88069#
+void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm )
+{
+ SwFrmOrObj aFrmOrObj( &rTxtFrm );
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+ }
+ }
+
+ if( xAcc.is() )
+ {
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent( SwAccessibleEvent_Impl::INVALID_ATTR,
+ pAccImpl, aFrmOrObj );
+ aEvent.SetStates( ACC_STATE_TEXT_ATTRIBUTE_CHANGED );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ pAccImpl->InvalidateAttr();
+ }
+ }
+ }
+}
+// <--
+
+void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
+{
+ SwFrmOrObj aFrmOrObj( pFrm );
+ sal_Bool bShapeSelected = sal_False;
+ const ViewShell *pVSh = GetShell();
+ if( pVSh->ISA( SwCrsrShell ) )
+ {
+ const SwCrsrShell *pCSh = static_cast< const SwCrsrShell * >( pVSh );
+ if( pCSh->IsTableMode() )
+ {
+ while( aFrmOrObj.GetSwFrm() && !aFrmOrObj.GetSwFrm()->IsCellFrm() )
+ aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper();
+ }
+ else if( pVSh->ISA( SwFEShell ) )
+ {
+ sal_uInt16 nObjCount;
+ const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh );
+ const SwFrm *pFlyFrm = pFESh->GetCurrFlyFrm();
+ if( pFlyFrm )
+ {
+ ASSERT( !pFrm || pFrm->FindFlyFrm() == pFlyFrm,
+ "cursor is not contained in fly frame" );
+ aFrmOrObj = pFlyFrm;
+ }
+ else if( (nObjCount = pFESh->IsObjSelected()) > 0 )
+ {
+ bShapeSelected = sal_True;
+ aFrmOrObj = static_cast<const SwFrm *>( 0 );
+ }
+ }
+ }
+
+ ASSERT( bShapeSelected || aFrmOrObj.IsAccessible(GetShell()->IsPreView()),
+ "frame is not accessible" );
+
+ uno::Reference < XAccessible > xOldAcc;
+ uno::Reference < XAccessible > xAcc;
+ sal_Bool bOldShapeSelected = sal_False;
+
+ {
+ vos::OGuard aGuard( maMutex );
+
+ xOldAcc = mxCursorContext;
+ mxCursorContext = xAcc; // clear reference
+
+ bOldShapeSelected = mbShapeSelected;
+ mbShapeSelected = bShapeSelected;
+
+ if( aFrmOrObj.GetSwFrm() && mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+
+ // For cells, some extra thoughts are necessary,
+ // because invalidating the cursor for one cell
+ // invalidates the cursor for all cells of the same
+ // table. For this reason, we don't want to
+ // invalidate the cursor for the old cursor object
+ // and the new one if they are within the same table,
+ // because this would result in doing the work twice.
+ // Moreover, we have to make sure to invalidate the
+ // cursor even if the current cell has no accessible object.
+ // If the old cursor objects exists and is in the same
+ // table, its the best choice, because using it avoids
+ // an unnessarary cursor invalidation cycle when creating
+ // a new object for the current cell.
+ if( aFrmOrObj.GetSwFrm()->IsCellFrm() )
+ {
+ if( xOldAcc.is() &&
+ AreInSameTable( xOldAcc, aFrmOrObj.GetSwFrm() ) )
+ {
+ if( xAcc.is() )
+ xOldAcc = xAcc; // avoid extra invalidation
+ else
+ xAcc = xOldAcc; // make sure ate least one
+ }
+ if( !xAcc.is() )
+ xAcc = GetContext( aFrmOrObj.GetSwFrm(), sal_True );
+ }
+ }
+ }
+
+ if( xOldAcc.is() && xOldAcc != xAcc )
+ InvalidateCursorPosition( xOldAcc );
+ if( bOldShapeSelected || bShapeSelected )
+ InvalidateShapeSelection();
+ if( xAcc.is() )
+ InvalidateCursorPosition( xAcc );
+}
+
+void SwAccessibleMap::InvalidateFocus()
+{
+ uno::Reference < XAccessible > xAcc;
+ sal_Bool bShapeSelected;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ xAcc = mxCursorContext;
+ bShapeSelected = mbShapeSelected;
+ }
+
+ if( xAcc.is() )
+ {
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ pAccImpl->InvalidateFocus();
+ }
+ else if( bShapeSelected )
+ {
+ DoInvalidateShapeFocus();
+ }
+}
+
+void SwAccessibleMap::SetCursorContext(
+ const ::vos::ORef < SwAccessibleContext >& rCursorContext )
+{
+ vos::OGuard aGuard( maMutex );
+ uno::Reference < XAccessible > xAcc( rCursorContext.getBodyPtr() );
+ mxCursorContext = xAcc;
+}
+
+// --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates,
+ const SwFrm* _pFrm )
+{
+ // Start with the frame or the first upper that is accessible
+ SwFrmOrObj aFrmOrObj( _pFrm );
+ while( aFrmOrObj.GetSwFrm() &&
+ !aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ aFrmOrObj = aFrmOrObj.GetSwFrm()->GetUpper();
+ if( !aFrmOrObj.GetSwFrm() )
+ aFrmOrObj = GetShell()->GetLayout();
+
+ uno::Reference< XAccessible > xAcc( GetContext( aFrmOrObj.GetSwFrm(), sal_True ) );
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl,
+ pAccImpl->GetFrm(), _nStates );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ pAccImpl->InvalidateStates( _nStates );
+ }
+}
+// <--
+
+void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm,
+ sal_Bool bFrom )
+{
+ // first, see if this frame is accessible, and if so, get the respective
+ SwFrmOrObj aFrmOrObj( pFrm );
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ {
+ xAcc = (*aIter).second;
+ }
+ }
+ }
+
+ // deliver event directly, or queue event
+ if( xAcc.is() )
+ {
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::CARET_OR_STATES, pAccImpl, pFrm,
+ bFrom ? ACC_STATE_RELATION_FROM : ACC_STATE_RELATION_TO );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ pAccImpl->InvalidateRelation( bFrom
+ ? AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED
+ : AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED );
+ }
+ }
+ }
+}
+
+void SwAccessibleMap::InvalidateRelationSet( const SwFrm* pMaster,
+ const SwFrm* pFollow )
+{
+ _InvalidateRelationSet( pMaster, sal_False );
+ _InvalidateRelationSet( pFollow, sal_True );
+}
+
+/** invalidation CONTENT_FLOW_FROM/_TO relation of a paragraph
+
+ OD 2005-12-01 #i27138#
+
+ @author OD
+*/
+void SwAccessibleMap::InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
+ const bool _bFrom )
+{
+ _InvalidateRelationSet( &_rTxtFrm, _bFrom );
+}
+
+/** invalidation of text selection of a paragraph
+
+ OD 2005-12-12 #i27301#
+
+ @author OD
+*/
+void SwAccessibleMap::InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm )
+{
+ // first, see if this frame is accessible, and if so, get the respective
+ SwFrmOrObj aFrmOrObj( &_rTxtFrm );
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( aFrmOrObj.GetSwFrm() );
+ if( aIter != mpFrmMap->end() )
+ {
+ xAcc = (*aIter).second;
+ }
+ }
+ }
+
+ // deliver event directly, or queue event
+ if( xAcc.is() )
+ {
+ SwAccessibleContext *pAccImpl =
+ static_cast< SwAccessibleContext *>( xAcc.get() );
+ if( GetShell()->ActionPend() )
+ {
+ SwAccessibleEvent_Impl aEvent(
+ SwAccessibleEvent_Impl::CARET_OR_STATES,
+ pAccImpl, &_rTxtFrm,
+ ACC_STATE_TEXT_SELECTION_CHANGED );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ pAccImpl->InvalidateTextSelection();
+ }
+ }
+ }
+}
+
+// OD 15.01.2003 #103492# - complete re-factoring of method due to new page/print
+// preview functionality.
+void SwAccessibleMap::UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize )
+{
+ DBG_ASSERT( GetShell()->IsPreView(), "no preview?" );
+ DBG_ASSERT( mpPreview != NULL, "no preview data?" );
+
+ // OD 15.01.2003 #103492# - adjustments for changed method signature
+ mpPreview->Update( _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize );
+
+ // propagate change of VisArea through the document's
+ // accessibility tree; this will also send appropriate scroll
+ // events
+ SwAccessibleContext* pDoc =
+ GetContextImpl( GetShell()->GetLayout() ).getBodyPtr();
+ static_cast<SwAccessibleDocumentBase*>( pDoc )->SetVisArea();
+
+ uno::Reference < XAccessible > xOldAcc;
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ xOldAcc = mxCursorContext;
+
+ const SwPageFrm *pSelPage = mpPreview->GetSelPage();
+ if( pSelPage && mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( pSelPage );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+ }
+ }
+
+ if( xOldAcc.is() && xOldAcc != xAcc )
+ InvalidateCursorPosition( xOldAcc );
+ if( xAcc.is() )
+ InvalidateCursorPosition( xAcc );
+}
+
+void SwAccessibleMap::InvalidatePreViewSelection( sal_uInt16 nSelPage )
+{
+ DBG_ASSERT( GetShell()->IsPreView(), "no preview?" );
+ DBG_ASSERT( mpPreview != NULL, "no preview data?" );
+
+ // OD 16.01.2003 #103492# - changed metthod call due to method signature change.
+ mpPreview->InvalidateSelection( GetShell()->GetLayout()->GetPageByPageNum( nSelPage ) );
+
+ uno::Reference < XAccessible > xOldAcc;
+ uno::Reference < XAccessible > xAcc;
+ {
+ vos::OGuard aGuard( maMutex );
+
+ xOldAcc = mxCursorContext;
+
+ const SwPageFrm *pSelPage = mpPreview->GetSelPage();
+ if( pSelPage && mpFrmMap )
+ {
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrmMap->find( pSelPage );
+ if( aIter != mpFrmMap->end() )
+ xAcc = (*aIter).second;
+ }
+ }
+
+ if( xOldAcc.is() && xOldAcc != xAcc )
+ InvalidateCursorPosition( xOldAcc );
+ if( xAcc.is() )
+ InvalidateCursorPosition( xAcc );
+}
+
+
+sal_Bool SwAccessibleMap::IsPageSelected( const SwPageFrm *pPageFrm ) const
+{
+ return mpPreview && mpPreview->GetSelPage() == pPageFrm;
+}
+
+
+void SwAccessibleMap::FireEvents()
+{
+ {
+ vos::OGuard aGuard( maEventMutex );
+ if( mpEvents )
+ {
+ mpEvents->SetFiring();
+ SwAccessibleEventList_Impl::iterator aIter = mpEvents->begin();
+ while( aIter != mpEvents->end() )
+ {
+ FireEvent( *aIter );
+ ++aIter;
+ }
+
+ delete mpEventMap;
+ mpEventMap = 0;
+
+ delete mpEvents;
+ mpEvents = 0;
+ }
+ }
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpShapes )
+ {
+ delete mpShapes;
+ mpShapes = 0;
+ }
+ }
+
+}
+
+sal_Bool SwAccessibleMap::IsValid() const
+{
+ return sal_True;
+}
+
+Rectangle SwAccessibleMap::GetVisibleArea() const
+{
+ MapMode aSrc( MAP_TWIP );
+ MapMode aDest( MAP_100TH_MM );
+ return OutputDevice::LogicToLogic( GetVisArea().SVRect(), aSrc, aDest );
+}
+
+// Convert a MM100 value realtive to the document root into a pixel value
+// realtive to the screen!
+Point SwAccessibleMap::LogicToPixel( const Point& rPoint ) const
+{
+ MapMode aSrc( MAP_100TH_MM );
+ MapMode aDest( MAP_TWIP );
+
+ Point aPoint = rPoint;
+
+ aPoint = OutputDevice::LogicToLogic( aPoint, aSrc, aDest );
+ Window *pWin = GetShell()->GetWin();
+ if( pWin )
+ {
+ // OD 16.01.2003 #103492# - get mapping mode for LogicToPixel conversion
+ MapMode aMapMode;
+ GetMapMode( aPoint, aMapMode );
+ aPoint = pWin->LogicToPixel( aPoint, aMapMode );
+ aPoint = pWin->OutputToAbsoluteScreenPixel( aPoint );
+ }
+
+ return aPoint;
+}
+
+Size SwAccessibleMap::LogicToPixel( const Size& rSize ) const
+{
+ MapMode aSrc( MAP_100TH_MM );
+ MapMode aDest( MAP_TWIP );
+ Size aSize( OutputDevice::LogicToLogic( rSize, aSrc, aDest ) );
+ if( GetShell()->GetWin() )
+ {
+ // OD 16.01.2003 #103492# - get mapping mode for LogicToPixel conversion
+ MapMode aMapMode;
+ GetMapMode( Point(0,0), aMapMode );
+ aSize = GetShell()->GetWin()->LogicToPixel( aSize, aMapMode );
+ }
+
+ return aSize;
+}
+
+Point SwAccessibleMap::PixelToLogic( const Point& rPoint ) const
+{
+ Point aPoint;
+ Window *pWin = GetShell()->GetWin();
+ if( pWin )
+ {
+ aPoint = pWin->ScreenToOutputPixel( rPoint );
+ // OD 16.01.2003 #103492# - get mapping mode for PixelToLogic conversion
+ MapMode aMapMode;
+ GetMapMode( aPoint, aMapMode );
+ aPoint = pWin->PixelToLogic( aPoint, aMapMode );
+ MapMode aSrc( MAP_TWIP );
+ MapMode aDest( MAP_100TH_MM );
+ aPoint = OutputDevice::LogicToLogic( aPoint, aSrc, aDest );
+ }
+
+ return aPoint;
+}
+
+Size SwAccessibleMap::PixelToLogic( const Size& rSize ) const
+{
+ Size aSize;
+ if( GetShell()->GetWin() )
+ {
+ // OD 16.01.2003 #103492# - get mapping mode for PixelToLogic conversion
+ MapMode aMapMode;
+ GetMapMode( Point(0,0), aMapMode );
+ aSize = GetShell()->GetWin()->PixelToLogic( rSize, aMapMode );
+ MapMode aSrc( MAP_TWIP );
+ MapMode aDest( MAP_100TH_MM );
+ aSize = OutputDevice::LogicToLogic( aSize, aSrc, aDest );
+ }
+
+ return aSize;
+}
+
+sal_Bool SwAccessibleMap::ReplaceChild (
+ ::accessibility::AccessibleShape* pCurrentChild,
+ const uno::Reference< drawing::XShape >& _rxShape,
+ const long /*_nIndex*/,
+ const ::accessibility::AccessibleShapeTreeInfo& /*_rShapeTreeInfo*/
+ ) throw (uno::RuntimeException)
+{
+ const SdrObject *pObj = 0;
+ {
+ vos::OGuard aGuard( maMutex );
+ if( mpShapeMap )
+ {
+ SwAccessibleShapeMap_Impl::const_iterator aIter = mpShapeMap->begin();
+ SwAccessibleShapeMap_Impl::const_iterator aEndIter = mpShapeMap->end();
+ while( aIter != aEndIter && !pObj )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).second );
+ ::accessibility::AccessibleShape *pAccShape =
+ static_cast < ::accessibility::AccessibleShape* >( xAcc.get() );
+ if( pAccShape == pCurrentChild )
+ {
+ pObj = (*aIter).first;
+ }
+ ++aIter;
+ }
+ }
+ }
+ if( !pObj )
+ return sal_False;
+
+ uno::Reference < drawing::XShape > xShape( _rxShape ); //keep reference to shape, because
+ // we might be the only one that
+ // hold it.
+ // Also get keep parent.
+ uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() );
+ pCurrentChild = 0; // well be realease by dispose
+ Dispose( 0, pObj );
+
+ {
+ vos::OGuard aGuard( maMutex );
+
+ if( !mpShapeMap )
+ mpShapeMap = new SwAccessibleShapeMap_Impl( this );
+
+ // create the new child
+ ::accessibility::ShapeTypeHandler& rShapeTypeHandler =
+ ::accessibility::ShapeTypeHandler::Instance();
+ ::accessibility::AccessibleShapeInfo aShapeInfo(
+ xShape, xParent, this );
+ ::accessibility::AccessibleShape* pReplacement =
+ rShapeTypeHandler.CreateAccessibleObject (
+ aShapeInfo, mpShapeMap->GetInfo() );
+
+ uno::Reference < XAccessible > xAcc( pReplacement );
+ if( xAcc.is() )
+ {
+ pReplacement->Init();
+
+ SwAccessibleShapeMap_Impl::iterator aIter =
+ mpShapeMap->find( pObj );
+ if( aIter != mpShapeMap->end() )
+ {
+ (*aIter).second = xAcc;
+ }
+ else
+ {
+ SwAccessibleShapeMap_Impl::value_type aEntry( pObj, xAcc );
+ mpShapeMap->insert( aEntry );
+ }
+ }
+ }
+
+ SwRect aEmptyRect;
+ InvalidatePosOrSize( 0, pObj, aEmptyRect );
+
+ return sal_True;
+}
+
+Point SwAccessibleMap::PixelToCore( const Point& rPoint ) const
+{
+ Point aPoint;
+ if( GetShell()->GetWin() )
+ {
+ // OD 15.01.2003 #103492# - replace <PreviewAdjust(..)> by <GetMapMode(..)>
+ MapMode aMapMode;
+ GetMapMode( rPoint, aMapMode );
+ aPoint = GetShell()->GetWin()->PixelToLogic( rPoint, aMapMode );
+ }
+ return aPoint;
+}
+
+static inline long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue,
+ long aRefValue, bool bToLower)
+{
+ long aResult = aCoarseValue;
+
+ if (bToLower)
+ {
+ if (aFineValue < aRefValue)
+ aResult -= 1;
+ }
+ else
+ {
+ if (aFineValue > aRefValue)
+ aResult += 1;
+ }
+
+ return aResult;
+}
+
+static inline void lcl_CorrectRectangle(Rectangle & rRect,
+ const Rectangle & rSource,
+ const Rectangle & rInGrid)
+{
+ rRect.nLeft = lcl_CorrectCoarseValue(rRect.nLeft, rSource.nLeft,
+ rInGrid.nLeft, false);
+ rRect.nTop = lcl_CorrectCoarseValue(rRect.nTop, rSource.nTop,
+ rInGrid.nTop, false);
+ rRect.nRight = lcl_CorrectCoarseValue(rRect.nRight, rSource.nRight,
+ rInGrid.nRight, true);
+ rRect.nBottom = lcl_CorrectCoarseValue(rRect.nBottom, rSource.nBottom,
+ rInGrid.nBottom, true);
+}
+
+Rectangle SwAccessibleMap::CoreToPixel( const Rectangle& rRect ) const
+{
+ Rectangle aRect;
+ if( GetShell()->GetWin() )
+ {
+ // OD 15.01.2003 #103492# - replace <PreviewAdjust(..)> by <GetMapMode(..)>
+ MapMode aMapMode;
+ GetMapMode( rRect.TopLeft(), aMapMode );
+ aRect = GetShell()->GetWin()->LogicToPixel( rRect, aMapMode );
+
+ Rectangle aTmpRect = GetShell()->GetWin()->PixelToLogic( aRect, aMapMode );
+ lcl_CorrectRectangle(aRect, rRect, aTmpRect);
+ }
+
+ return aRect;
+}
+
+/** get mapping mode for LogicToPixel and PixelToLogic conversions
+
+ OD 15.01.2003 #103492#
+ Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
+ Method returns mapping mode of current output device and adjusts it,
+ if the shell is in page/print preview.
+ Necessary, because <PreviewAdjust(..)> changes mapping mode at current
+ output device for mapping logic document positions to page preview window
+ positions and vice versa and doesn't take care to recover its changes.
+
+ @author OD
+*/
+void SwAccessibleMap::GetMapMode( const Point& _rPoint,
+ MapMode& _orMapMode ) const
+{
+ MapMode aMapMode = GetShell()->GetWin()->GetMapMode();
+ if( GetShell()->IsPreView() )
+ {
+ DBG_ASSERT( mpPreview != NULL, "need preview data" );
+
+ mpPreview->AdjustMapMode( aMapMode, _rPoint );
+ }
+ _orMapMode = aMapMode;
+}
+
+/** get size of a dedicated preview page
+
+ OD 15.01.2003 #103492#
+
+ @author OD
+*/
+Size SwAccessibleMap::GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const
+{
+ DBG_ASSERT( mpVSh->IsPreView(), "no page preview accessible." );
+ DBG_ASSERT( mpVSh->IsPreView() && ( mpPreview != NULL ),
+ "missing accessible preview data at page preview" );
+ if ( mpVSh->IsPreView() && ( mpPreview != NULL ) )
+ {
+ return mpVSh->PagePreviewLayout()->GetPrevwPageSizeByPageNum( _nPrevwPageNum );
+ }
+ else
+ {
+ return Size( 0, 0 );
+ }
+}
+
+/** method to build up a new data structure of the accessible pararaphs,
+ which have a selection
+
+ OD 2005-12-13 #i27301#
+ Important note: method has to used inside a mutual exclusive section
+
+ @author OD
+*/
+SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
+{
+ // no accessible contexts, no selection
+ if ( !mpFrmMap )
+ {
+ return 0L;
+ }
+
+ // get cursor as an instance of its base class <SwPaM>
+ SwPaM* pCrsr( 0L );
+ {
+ SwCrsrShell* pCrsrShell = dynamic_cast<SwCrsrShell*>(GetShell());
+ if ( pCrsrShell )
+ {
+ SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCrsrShell);
+ if ( !pFEShell ||
+ ( !pFEShell->IsFrmSelected() &&
+ pFEShell->IsObjSelected() == 0 ) )
+ {
+ // get cursor without updating an existing table cursor.
+ pCrsr = pCrsrShell->GetCrsr( FALSE );
+ }
+ }
+ }
+ // no cursor, no selection
+ if ( !pCrsr )
+ {
+ return 0L;
+ }
+
+ SwAccessibleSelectedParas_Impl* pRetSelectedParas( 0L );
+
+ // loop on all cursors
+ SwPaM* pRingStart = pCrsr;
+ do {
+
+ // for a selection the cursor has to have a mark.
+ // for savety reasons assure that point and mark are in text nodes
+ if ( pCrsr->HasMark() &&
+ pCrsr->GetPoint()->nNode.GetNode().IsTxtNode() &&
+ pCrsr->GetMark()->nNode.GetNode().IsTxtNode() )
+ {
+ SwPosition* pStartPos = pCrsr->Start();
+ SwPosition* pEndPos = pCrsr->End();
+ // loop on all text nodes inside the selection
+ SwNodeIndex aIdx( pStartPos->nNode );
+ for ( ; aIdx.GetIndex() <= pEndPos->nNode.GetIndex(); ++aIdx )
+ {
+ SwTxtNode* pTxtNode( aIdx.GetNode().GetTxtNode() );
+ if ( pTxtNode )
+ {
+ // loop on all text frames registered at the text node.
+ SwClientIter aIter( *pTxtNode );
+ for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
+ pFrm;
+ pFrm = (SwFrm*)aIter.Next() )
+ {
+ ASSERT( dynamic_cast<SwTxtFrm*>(pFrm),
+ "<SwAccessibleMap::_BuildSelectedParas()> - unexpected frame type" );
+ SwTxtFrm* pTxtFrm( dynamic_cast<SwTxtFrm*>(pFrm) );
+ if ( pTxtFrm )
+ {
+ uno::WeakReference < XAccessible > xWeakAcc;
+ SwAccessibleContextMap_Impl::iterator aMapIter =
+ mpFrmMap->find( pTxtFrm );
+ if( aMapIter != mpFrmMap->end() )
+ {
+ xWeakAcc = (*aMapIter).second;
+ SwAccessibleParaSelection aDataEntry(
+ pTxtNode == &(pStartPos->nNode.GetNode())
+ ? pStartPos->nContent.GetIndex()
+ : 0,
+ pTxtNode == &(pEndPos->nNode.GetNode())
+ ? pEndPos->nContent.GetIndex()
+ : STRING_LEN );
+ SwAccessibleSelectedParas_Impl::value_type
+ aEntry( xWeakAcc, aDataEntry );
+ if ( !pRetSelectedParas )
+ {
+ pRetSelectedParas =
+ new SwAccessibleSelectedParas_Impl;
+ }
+ pRetSelectedParas->insert( aEntry );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // prepare next turn: get next cursor in ring
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ } while ( pCrsr != pRingStart );
+
+ return pRetSelectedParas;
+}
+
+/** invalidation of text selection of all paragraphs
+
+ OD 2005-12-13 #i27301#
+
+ @author OD
+*/
+void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
+{
+ vos::OGuard aGuard( maMutex );
+
+ // keep previously known selected paragraphs
+ SwAccessibleSelectedParas_Impl* pPrevSelectedParas( mpSelectedParas );
+
+ // determine currently selected paragraphs
+ mpSelectedParas = _BuildSelectedParas();
+
+ // compare currently selected paragraphs with the previously selected
+ // paragraphs and submit corresponding TEXT_SELECTION_CHANGED events.
+ // first, search for new and changed selections.
+ // on the run remove selections from previously known ones, if they are
+ // also in the current ones.
+ if ( mpSelectedParas )
+ {
+ SwAccessibleSelectedParas_Impl::iterator aIter = mpSelectedParas->begin();
+ for ( ; aIter != mpSelectedParas->end(); ++aIter )
+ {
+ bool bSubmitEvent( false );
+ if ( !pPrevSelectedParas )
+ {
+ // new selection
+ bSubmitEvent = true;
+ }
+ else
+ {
+ SwAccessibleSelectedParas_Impl::iterator aPrevSelected =
+ pPrevSelectedParas->find( (*aIter).first );
+ if ( aPrevSelected != pPrevSelectedParas->end() )
+ {
+ // check, if selection has changed
+ if ( (*aIter).second.nStartOfSelection !=
+ (*aPrevSelected).second.nStartOfSelection ||
+ (*aIter).second.nEndOfSelection !=
+ (*aPrevSelected).second.nEndOfSelection )
+ {
+ // changed selection
+ bSubmitEvent = true;
+ }
+ pPrevSelectedParas->erase( aPrevSelected );
+ }
+ else
+ {
+ // new selection
+ bSubmitEvent = true;
+ }
+ }
+
+ if ( bSubmitEvent )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).first );
+ if ( xAcc.is() )
+ {
+ ::vos::ORef < SwAccessibleContext > xAccImpl(
+ static_cast<SwAccessibleContext*>( xAcc.get() ) );
+ if ( xAccImpl.isValid() && xAccImpl->GetFrm() )
+ {
+ const SwTxtFrm* pTxtFrm(
+ dynamic_cast<const SwTxtFrm*>(xAccImpl->GetFrm()) );
+ ASSERT( pTxtFrm,
+ "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexcepted type of frame" );
+ if ( pTxtFrm )
+ {
+ InvalidateParaTextSelection( *pTxtFrm );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // second, handle previous selections - after the first step the data
+ // structure of the previously known only contains the 'old' selections
+ if ( pPrevSelectedParas )
+ {
+ SwAccessibleSelectedParas_Impl::iterator aIter = pPrevSelectedParas->begin();
+ for ( ; aIter != pPrevSelectedParas->end(); ++aIter )
+ {
+ uno::Reference < XAccessible > xAcc( (*aIter).first );
+ if ( xAcc.is() )
+ {
+ ::vos::ORef < SwAccessibleContext > xAccImpl(
+ static_cast<SwAccessibleContext*>( xAcc.get() ) );
+ if ( xAccImpl.isValid() && xAccImpl->GetFrm() )
+ {
+ const SwTxtFrm* pTxtFrm(
+ dynamic_cast<const SwTxtFrm*>(xAccImpl->GetFrm()) );
+ ASSERT( pTxtFrm,
+ "<SwAccessibleMap::_SubmitTextSelectionChangedEvents()> - unexcepted type of frame" );
+ if ( pTxtFrm )
+ {
+ InvalidateParaTextSelection( *pTxtFrm );
+ }
+ }
+ }
+ }
+
+ delete pPrevSelectedParas;
+ }
+}
+
+//
+// SwAccPreviewData
+//
+
+SwAccPreviewData::SwAccPreviewData() :
+ mpSelPage( 0 )
+{
+}
+
+SwAccPreviewData::~SwAccPreviewData()
+{
+}
+
+// OD 13.01.2003 #103492# - complete re-factoring of method due to new page/print
+// preview functionality.
+void SwAccPreviewData::Update( const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize )
+{
+ // store preview scaling, maximal preview page size and selected page
+ maScale = _rScale;
+ mpSelPage = _pSelectedPageFrm;
+
+ // prepare loop on preview pages
+ maPreviewRects.clear();
+ maLogicRects.clear();
+ SwFrmOrObj aPage;
+ maVisArea.Clear();
+
+ // loop on preview pages to calculate <maPreviewRects>, <maLogicRects> and
+ // <maVisArea>
+ for ( std::vector<PrevwPage*>::const_iterator aPageIter = _rPrevwPages.begin();
+ aPageIter != _rPrevwPages.end();
+ ++aPageIter )
+ {
+ aPage = (*aPageIter)->pPage;
+
+ // add preview page rectangle to <maPreviewRects>
+ Rectangle aPrevwPgRect( (*aPageIter)->aPrevwWinPos, (*aPageIter)->aPageSize );
+ maPreviewRects.push_back( aPrevwPgRect );
+
+ // add logic page rectangle to <maLogicRects>
+ SwRect aLogicPgSwRect( aPage.GetBox() );
+ Rectangle aLogicPgRect( aLogicPgSwRect.SVRect() );
+ maLogicRects.push_back( aLogicPgRect );
+ // union visible area with visible part of logic page rectangle
+ if ( (*aPageIter)->bVisible )
+ {
+ if ( !(*aPageIter)->pPage->IsEmptyPage() )
+ {
+ AdjustLogicPgRectToVisibleArea( aLogicPgSwRect,
+ SwRect( aPrevwPgRect ),
+ _rPrevwWinSize );
+ }
+ if ( maVisArea.IsEmpty() )
+ maVisArea = aLogicPgSwRect;
+ else
+ maVisArea.Union( aLogicPgSwRect );
+ }
+ }
+}
+
+// OD 16.01.2003 #103492# - complete re-factoring of method due to new page/print
+// preview functionality.
+void SwAccPreviewData::InvalidateSelection( const SwPageFrm* _pSelectedPageFrm )
+{
+ mpSelPage = _pSelectedPageFrm;
+ ASSERT( mpSelPage, "selected page not found" );
+}
+
+struct ContainsPredicate
+{
+ const Point& mrPoint;
+ ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {}
+ bool operator() ( const Rectangle& rRect ) const
+ {
+ return rRect.IsInside( mrPoint ) ? true : false;
+ }
+};
+
+const SwRect& SwAccPreviewData::GetVisArea() const
+{
+ return maVisArea;
+}
+
+void SwAccPreviewData::AdjustMapMode( MapMode& rMapMode,
+ const Point& rPoint ) const
+{
+ // adjust scale
+ rMapMode.SetScaleX( maScale );
+ rMapMode.SetScaleY( maScale );
+
+ // find proper rectangle
+ Rectangles::const_iterator aBegin = maLogicRects.begin();
+ Rectangles::const_iterator aEnd = maLogicRects.end();
+ Rectangles::const_iterator aFound = ::std::find_if( aBegin, aEnd,
+ ContainsPredicate( rPoint ) );
+
+ if( aFound != aEnd )
+ {
+ // found! set new origin
+ Point aPoint = (maPreviewRects.begin() + (aFound - aBegin))->TopLeft();
+ aPoint -= (maLogicRects.begin() + (aFound-aBegin))->TopLeft();
+ rMapMode.SetOrigin( aPoint );
+ }
+ // else: don't adjust MapMode
+}
+
+void SwAccPreviewData::DisposePage(const SwPageFrm *pPageFrm )
+{
+ if( mpSelPage == pPageFrm )
+ mpSelPage = 0;
+}
+
+/** adjust logic page retangle to its visible part
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+*/
+void SwAccPreviewData::AdjustLogicPgRectToVisibleArea(
+ SwRect& _iorLogicPgSwRect,
+ const SwRect& _rPrevwPgSwRect,
+ const Size& _rPrevwWinSize )
+{
+ // determine preview window rectangle
+ const SwRect aPrevwWinSwRect( Point( 0, 0 ), _rPrevwWinSize );
+ // calculate visible preview page rectangle
+ SwRect aVisPrevwPgSwRect( _rPrevwPgSwRect );
+ aVisPrevwPgSwRect.Intersection( aPrevwWinSwRect );
+ // adjust logic page rectangle
+ SwTwips nTmpDiff;
+ // left
+ nTmpDiff = aVisPrevwPgSwRect.Left() - _rPrevwPgSwRect.Left();
+ if ( nTmpDiff > 0 )
+ _iorLogicPgSwRect.Left( _iorLogicPgSwRect.Left() + nTmpDiff );
+ // top
+ nTmpDiff = aVisPrevwPgSwRect.Top() - _rPrevwPgSwRect.Top();
+ if ( nTmpDiff > 0 )
+ _iorLogicPgSwRect.Top( _iorLogicPgSwRect.Top() + nTmpDiff );
+ // right
+ nTmpDiff = _rPrevwPgSwRect.Right() - aVisPrevwPgSwRect.Right();
+ if ( nTmpDiff > 0 )
+ _iorLogicPgSwRect.Right( _iorLogicPgSwRect.Right() - nTmpDiff );
+ // bottom
+ nTmpDiff = _rPrevwPgSwRect.Bottom() - aVisPrevwPgSwRect.Bottom();
+ if ( nTmpDiff > 0 )
+ _iorLogicPgSwRect.Bottom( _iorLogicPgSwRect.Bottom() - nTmpDiff );
+}
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
new file mode 100644
index 000000000000..4bb7c73362aa
--- /dev/null
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -0,0 +1,278 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accnotextframe.cxx,v $
+ * $Revision: 1.13 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <frmfmt.hxx>
+#include <ndnotxt.hxx>
+#include <flyfrm.hxx>
+#include <cntfrm.hxx>
+// --> OD 2009-07-14 #i73249#
+#include <hints.hxx>
+// <--
+#include "accnotextframe.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+const SwNoTxtNode *SwAccessibleNoTextFrame::GetNoTxtNode() const
+{
+ const SwNoTxtNode *pNd = 0;
+ const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm *>( GetFrm() );
+ if( pFlyFrm->Lower() && pFlyFrm->Lower()->IsNoTxtFrm() )
+ {
+ const SwCntntFrm *pCntFrm =
+ static_cast<const SwCntntFrm *>( pFlyFrm->Lower() );
+ pNd = pCntFrm->GetNode()->GetNoTxtNode();
+ }
+
+ return pNd;
+}
+
+SwAccessibleNoTextFrame::SwAccessibleNoTextFrame(
+ SwAccessibleMap* pInitMap,
+ sal_Int16 nInitRole,
+ const SwFlyFrm* pFlyFrm ) :
+ SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrm ),
+ aDepend( this, const_cast < SwNoTxtNode * >( GetNoTxtNode() ) ),
+ msTitle(),
+ msDesc()
+{
+ const SwNoTxtNode* pNd = GetNoTxtNode();
+ // --> OD 2009-07-14 #i73249#
+ // consider new attributes Title and Description
+ if( pNd )
+ {
+ msTitle = pNd->GetTitle();
+
+ msDesc = pNd->GetDescription();
+ if ( msDesc.getLength() == 0 &&
+ msTitle != GetName() )
+ {
+ msDesc = msTitle;
+ }
+ }
+ // <--
+}
+
+SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame()
+{
+}
+
+void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+{
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ // --> OD 2009-07-14 #i73249#
+ // suppress handling of RES_NAME_CHANGED in case that attribute Title is
+ // used as the accessible name.
+ if ( nWhich != RES_NAME_CHANGED ||
+ msTitle.getLength() == 0 )
+ {
+ SwAccessibleFrameBase::Modify( pOld, pNew );
+ }
+
+ const SwNoTxtNode *pNd = GetNoTxtNode();
+ ASSERT( pNd == aDepend.GetRegisteredIn(), "invalid frame" );
+ switch( nWhich )
+ {
+ // --> OD 2009-07-14 #i73249#
+ case RES_TITLE_CHANGED:
+ {
+ const String& sOldTitle(
+ dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
+ const String& sNewTitle(
+ dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
+ if ( sOldTitle == sNewTitle )
+ {
+ break;
+ }
+ msTitle = sNewTitle;
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+ aEvent.OldValue <<= OUString( sOldTitle );
+ aEvent.NewValue <<= msTitle;
+ FireAccessibleEvent( aEvent );
+
+ if ( pNd->GetDescription().Len() != 0 )
+ {
+ break;
+ }
+ }
+ // intentional no break here
+ case RES_DESCRIPTION_CHANGED:
+ {
+ if ( pNd && GetFrm() )
+ {
+ const OUString sOldDesc( msDesc );
+
+ const String& rDesc = pNd->GetDescription();
+ msDesc = rDesc;
+ if ( msDesc.getLength() == 0 &&
+ msTitle != GetName() )
+ {
+ msDesc = msTitle;
+ }
+
+ if ( msDesc != sOldDesc )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
+ aEvent.OldValue <<= sOldDesc;
+ aEvent.NewValue <<= msDesc;
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ }
+ break;
+ // <--
+ /*
+ case RES_OBJECTDYING:
+ if( aDepend.GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ const_cast < SwModify *>( aDepend.GetRegisteredIn()->Remove( aDepend );
+ break;
+
+ case RES_FMT_CHG:
+ if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
+ pRegisteredIn->Remove( this );
+ break;
+ */
+ }
+}
+
+void SwAccessibleNoTextFrame::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( aDepend.GetRegisteredIn() )
+ const_cast < SwModify *>( aDepend.GetRegisteredIn() )->Remove( &aDepend );
+
+ SwAccessibleFrameBase::Dispose( bRecursive );
+}
+
+// --> OD 2009-07-14 #i73249#
+OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleName (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ if ( msTitle.getLength() != 0 )
+ {
+ return msTitle;
+ }
+
+ return SwAccessibleFrameBase::getAccessibleName();
+}
+// <--
+
+OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ return msDesc;
+}
+
+
+
+//
+// XInterface
+//
+
+uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aType )
+ throw (uno::RuntimeException)
+{
+ if( aType ==
+ ::getCppuType( static_cast<uno::Reference<XAccessibleImage>*>( NULL ) ) )
+ {
+ uno::Reference<XAccessibleImage> xImage = this;
+ uno::Any aAny;
+ aAny <<= xImage;
+ return aAny;
+ }
+ else
+ return SwAccessibleContext::queryInterface( aType );
+}
+
+
+//====== XTypeProvider ====================================================
+uno::Sequence< uno::Type > SAL_CALL SwAccessibleNoTextFrame::getTypes() throw(uno::RuntimeException)
+{
+ uno::Sequence< uno::Type > aTypes( SwAccessibleFrameBase::getTypes() );
+
+ sal_Int32 nIndex = aTypes.getLength();
+ aTypes.realloc( nIndex + 1 );
+
+ uno::Type* pTypes = aTypes.getArray();
+ pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleImage > * >( 0 ) );
+
+ return aTypes;
+}
+
+
+//
+// XAccessibleImage
+//
+
+// implementation of the XAccessibleImage methods is a no-brainer, as
+// all releveant information is already accessible through other
+// methods. So we just delegate to those.
+
+OUString SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageDescription()
+ throw ( uno::RuntimeException )
+{
+ return getAccessibleDescription();
+}
+
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageHeight( )
+ throw ( uno::RuntimeException )
+{
+ return getSize().Height;
+}
+
+sal_Int32 SAL_CALL SwAccessibleNoTextFrame::getAccessibleImageWidth( )
+ throw ( uno::RuntimeException )
+{
+ return getSize().Width;
+}
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
new file mode 100644
index 000000000000..d96c510266ae
--- /dev/null
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accnotextframe.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCNOTEXTFRAME_HXX
+#define _ACCNOTEXTFRAME_HXX
+#include "accframebase.hxx"
+#include <com/sun/star/accessibility/XAccessibleImage.hpp>
+
+class SwFlyFrm;
+class SwNoTxtNode;
+
+class SwAccessibleNoTextFrame : public SwAccessibleFrameBase,
+ public ::com::sun::star::accessibility::XAccessibleImage
+{
+ SwDepend aDepend;
+ // --> OD 2009-07-14 #i73249#
+ ::rtl::OUString msTitle;
+ // <--
+ ::rtl::OUString msDesc;
+
+protected:
+
+ virtual ~SwAccessibleNoTextFrame();
+
+ const SwNoTxtNode *GetNoTxtNode() const;
+
+public:
+
+ SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap,
+ sal_Int16 nInitRole,
+ const SwFlyFrm *pFlyFrm );
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //===== XAccessibleContext ==============================================
+
+ // --> OD 2009-07-14 #i73249#
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+ // <--
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (com::sun::star::uno::RuntimeException);
+
+ //===== XInterface ======================================================
+
+ // XInterface methods need to be implemented to disambiguate
+ // between those inherited through SwAcessibleContext and
+ // XAccessibleImage.
+
+ 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 ()
+ { SwAccessibleContext::acquire(); };
+
+ virtual void SAL_CALL release( ) throw ()
+ { SwAccessibleContext::release(); };
+
+ //====== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleImage ================================================
+
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleImageDescription( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleImageHeight( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL
+ getAccessibleImageWidth( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+};
+
+
+#endif
diff --git a/sw/source/core/access/accpage.cxx b/sw/source/core/access/accpage.cxx
new file mode 100644
index 000000000000..9d1f39acfc5b
--- /dev/null
+++ b/sw/source/core/access/accpage.cxx
@@ -0,0 +1,202 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accpage.cxx,v $
+ * $Revision: 1.15 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <rtl/uuid.h>
+#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include "accpage.hxx"
+
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+#include <pagefrm.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+
+using uno::Reference;
+using uno::RuntimeException;
+using uno::Sequence;
+using ::rtl::OUString;
+
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessiblePageView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessiblePageView";
+
+sal_Bool SwAccessiblePage::IsSelected()
+{
+ return GetMap()->IsPageSelected( static_cast < const SwPageFrm * >( GetFrm() ) );
+}
+
+void SwAccessiblePage::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ SwAccessibleContext::GetStates( rStateSet );
+
+ // FOCUSABLE
+ rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+
+ // FOCUSED
+ if( IsSelected() )
+ {
+ ASSERT( bIsSelected, "bSelected out of sync" );
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() )
+ rStateSet.AddState( AccessibleStateType::FOCUSED );
+ }
+}
+
+void SwAccessiblePage::_InvalidateCursorPos()
+{
+ sal_Bool bNewSelected = IsSelected();
+ sal_Bool bOldSelected;
+
+ {
+ vos::OGuard aGuard( aMutex );
+ bOldSelected = bIsSelected;
+ bIsSelected = bNewSelected;
+ }
+
+ if( bNewSelected )
+ {
+ // remember that object as the one that has the caret. This is
+ // neccessary to notify that object if the cursor leaves it.
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+
+ if( bOldSelected != bNewSelected )
+ {
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, bNewSelected );
+ }
+}
+
+void SwAccessiblePage::_InvalidateFocus()
+{
+ Window *pWin = GetWindow();
+ if( pWin )
+ {
+ sal_Bool bSelected;
+
+ {
+ vos::OGuard aGuard( aMutex );
+ bSelected = bIsSelected;
+ }
+ ASSERT( bSelected, "focus object should be selected" );
+
+ FireStateChangedEvent( AccessibleStateType::FOCUSED,
+ pWin->HasFocus() && bSelected );
+ }
+}
+
+SwAccessiblePage::SwAccessiblePage( SwAccessibleMap* pInitMap,
+ const SwFrm* pFrame ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::PANEL, pFrame )
+{
+ DBG_ASSERT( pFrame != NULL, "need frame" );
+ DBG_ASSERT( pInitMap != NULL, "need map" );
+ DBG_ASSERT( pFrame->IsPageFrm(), "need page frame" );
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ OUString sPage = OUString::valueOf(
+ static_cast<sal_Int32>(
+ static_cast<const SwPageFrm*>( GetFrm() )->GetPhyPageNum() ) );
+ SetName( GetResource( STR_ACCESS_PAGE_NAME, &sPage ) );
+}
+
+SwAccessiblePage::~SwAccessiblePage()
+{
+}
+
+sal_Bool SwAccessiblePage::HasCursor()
+{
+ vos::OGuard aGuard( aMutex );
+ return bIsSelected;
+}
+
+OUString SwAccessiblePage::getImplementationName( )
+ throw( RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SwAccessiblePage::supportsService( const OUString& rServiceName)
+ throw( RuntimeException )
+{
+ return rServiceName.equalsAsciiL( sServiceName, sizeof(sServiceName)-1 ) ||
+ rServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+Sequence<OUString> SwAccessiblePage::getSupportedServiceNames( )
+ throw( RuntimeException )
+{
+ Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+Sequence< sal_Int8 > SAL_CALL SwAccessiblePage::getImplementationId()
+ throw(RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
+
+OUString SwAccessiblePage::getAccessibleDescription( )
+ throw( RuntimeException )
+{
+ CHECK_FOR_DEFUNC( ::com::sun::star::accessibility::XAccessibleContext );
+
+ OUString sArg( GetFormattedPageNumber() );
+ return GetResource( STR_ACCESS_PAGE_DESC, &sArg );
+}
diff --git a/sw/source/core/access/accpage.hxx b/sw/source/core/access/accpage.hxx
new file mode 100644
index 000000000000..d0dd06a6a0f4
--- /dev/null
+++ b/sw/source/core/access/accpage.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accpage.hxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 _ACCPAGE_HXX
+#define _ACCPAGE_HXX
+
+#ifndef _ACCCONTEXT_HXX
+#include "acccontext.hxx"
+#endif
+
+
+/**
+ * accessibility implementation for the page (SwPageFrm)
+ * The page is _only_ visible in the page preview. For the regular
+ * document view, it doesn't make sense to add this additional element
+ * into the hierarchy. For the page preview, however, the page is the
+ * important.
+ */
+class SwAccessiblePage : public SwAccessibleContext
+{
+ sal_Bool bIsSelected; // protected by base class mutex
+
+ sal_Bool IsSelected();
+
+ using SwAccessibleFrame::GetBounds;
+
+protected:
+
+ // return the bounding box for the page in page preview mode
+ SwRect GetBounds( /* const SwFrm *pFrm =0 */ );
+
+ // Set states for getAccessibleStateSet.
+ // This drived class additionaly sets
+ // FOCUSABLE(1) and FOCUSED(+)
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ virtual void _InvalidateCursorPos();
+ virtual void _InvalidateFocus();
+
+ virtual ~SwAccessiblePage();
+
+public:
+ // convenience constructor to avoid typecast;
+ // may only be called with SwPageFrm argument
+ SwAccessiblePage( SwAccessibleMap* pInitMap, const SwFrm* pFrame );
+
+
+
+ //
+ // XAccessibleContext methods that need to be overridden
+ //
+
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //
+ // XServiceInfo
+ //
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService (
+ const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XTypeProvider ====================================================
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool HasCursor(); // required by map to remember that object
+};
+
+#endif
+
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
new file mode 100644
index 000000000000..ced1e6261c7b
--- /dev/null
+++ b/sw/source/core/access/accpara.cxx
@@ -0,0 +1,2582 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accpara.cxx,v $
+ * $Revision: 1.78 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+#include <txtfrm.hxx>
+#include <ndtxt.hxx>
+#include <pam.hxx>
+#include <unoobj.hxx>
+#include <crstate.hxx>
+#include <accmap.hxx>
+#include "fesh.hxx"
+#include <viewopt.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleTextType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
+#include <com/sun/star/i18n/WordType.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/beans/UnknownPropertyException.hpp>
+#include <breakit.hxx>
+#include "accpara.hxx"
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+#include "accportions.hxx"
+#include <sfx2/viewsh.hxx> // for ExecuteAtViewShell(...)
+#include <sfx2/viewfrm.hxx> // for ExecuteAtViewShell(...)
+#include <sfx2/dispatch.hxx> // for ExecuteAtViewShell(...)
+#include <unotools/charclass.hxx> // for GetWordBoundary
+// for get/setCharacterAttribute(...)
+#include "unocrsr.hxx"
+#include "unoobj.hxx"
+#include "unoport.hxx"
+#include "doc.hxx"
+#include "crsskip.hxx"
+#include <txtatr.hxx>
+#include <acchyperlink.hxx>
+#include <acchypertextdata.hxx>
+// --> OD 2005-12-02 #i27138#
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+// <--
+#include <comphelper/accessibletexthelper.hxx>
+// --> OD 2006-07-12 #i63870#
+#include <unomap.hxx>
+// <--
+// --> OD 2007-01-15 #i72800#
+#include <unoprnms.hxx>
+// <--
+// --> OD 2007-01-15 #i73371#
+#include <com/sun/star/text/WritingMode2.hpp>
+// <--
+// --> OD 2007-01-17 #i71385#
+#include <svx/brshitem.hxx>
+#include <viewimp.hxx>
+// <--
+// --> OD 2007-11-12 #i82637#
+#include <boost/scoped_ptr.hpp>
+// <--
+// --> OD 2008-05-26 #i71360#
+#include <textmarkuphelper.hxx>
+// <--
+
+#include <algorithm>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::i18n;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+using beans::PropertyValue;
+using beans::XMultiPropertySet;
+using beans::UnknownPropertyException;
+using beans::PropertyState_DIRECT_VALUE;
+
+using std::max;
+using std::min;
+using std::sort;
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XText;
+ }
+} } }
+
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessibleParagraphView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleParagraphView";
+const xub_StrLen MAX_DESC_TEXT_LEN = 40;
+const SwTxtNode* SwAccessibleParagraph::GetTxtNode() const
+{
+ const SwFrm* pFrm = GetFrm();
+ DBG_ASSERT( pFrm->IsTxtFrm(), "The text frame has mutated!" );
+
+ const SwTxtNode* pNode = static_cast<const SwTxtFrm*>(pFrm)->GetTxtNode();
+ DBG_ASSERT( pNode != NULL, "A text frame without a text node." );
+
+ return pNode;
+}
+
+OUString SwAccessibleParagraph::GetString()
+{
+ return GetPortionData().GetAccessibleString();
+}
+
+OUString SwAccessibleParagraph::GetDescription()
+{
+ // --> OD 2004-09-29 #117933# - provide empty description for paragraphs
+ return OUString();
+ // <--
+}
+
+sal_Int32 SwAccessibleParagraph::GetCaretPos()
+{
+ sal_Int32 nRet = -1;
+
+ // get the selection's point, and test whether it's in our node
+ // --> OD 2005-12-20 #i27301# - consider adjusted method signature
+ SwPaM* pCaret = GetCursor( false ); // caret is first PaM in PaM-ring
+ // <--
+ if( pCaret != NULL )
+ {
+ const SwTxtNode* pNode = GetTxtNode();
+
+ // check whether the point points into 'our' node
+ SwPosition* pPoint = pCaret->GetPoint();
+ if( pNode->GetIndex() == pPoint->nNode.GetIndex() )
+ {
+ // same node? Then check whether it's also within 'our' part
+ // of the paragraph
+ USHORT nIndex = pPoint->nContent.GetIndex();
+ if( GetPortionData().IsValidCorePosition( nIndex ) )
+ {
+ // Yes, it's us!
+ // --> OD 2006-10-19 #70538#
+ // consider that cursor/caret is in front of the list label
+ if ( pCaret->IsInFrontOfLabel() )
+ {
+ nRet = 0;
+ }
+ else
+ {
+ nRet = GetPortionData().GetAccessiblePosition( nIndex );
+ }
+ // <--
+
+ DBG_ASSERT( nRet >= 0, "invalid cursor?" );
+ DBG_ASSERT( nRet <= GetPortionData().GetAccessibleString().
+ getLength(), "invalid cursor?" );
+ }
+ // else: in this paragraph, but in different frame
+ }
+ // else: not in this paragraph
+ }
+ // else: no cursor -> no caret
+
+ return nRet;
+}
+
+sal_Bool SwAccessibleParagraph::GetSelection(
+ sal_Int32& nStart, sal_Int32& nEnd)
+{
+ sal_Bool bRet = sal_False;
+ nStart = -1;
+ nEnd = -1;
+
+ // get the selection, and test whether it affects our text node
+ // --> OD 2005-12-20 #i27301# - consider adjusted method signature
+ SwPaM* pCrsr = GetCursor( true );
+ // <--
+ if( pCrsr != NULL )
+ {
+ // get SwPosition for my node
+ const SwTxtNode* pNode = GetTxtNode();
+ ULONG nHere = pNode->GetIndex();
+
+ // iterate over ring
+ SwPaM* pRingStart = pCrsr;
+ do
+ {
+ // ignore, if no mark
+ if( pCrsr->HasMark() )
+ {
+ // check whether nHere is 'inside' pCrsr
+ SwPosition* pStart = pCrsr->Start();
+ ULONG nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pCrsr->End();
+ ULONG nEndIndex = pEnd->nNode.GetIndex();
+ if( ( nHere >= nStartIndex ) &&
+ ( nHere <= nEndIndex ) )
+ {
+ // translate start and end positions
+
+ // start position
+ sal_Int32 nLocalStart = -1;
+ if( nHere > nStartIndex )
+ {
+ // selection starts in previous node:
+ // then our local selection starts with the paragraph
+ nLocalStart = 0;
+ }
+ else
+ {
+ DBG_ASSERT( nHere == nStartIndex,
+ "miscalculated index" );
+
+ // selection starts in this node:
+ // then check whether it's before or inside our part of
+ // the paragraph, and if so, get the proper position
+ USHORT nCoreStart = pStart->nContent.GetIndex();
+ if( nCoreStart <
+ GetPortionData().GetFirstValidCorePosition() )
+ {
+ nLocalStart = 0;
+ }
+ else if( nCoreStart <=
+ GetPortionData().GetLastValidCorePosition() )
+ {
+ DBG_ASSERT(
+ GetPortionData().IsValidCorePosition(
+ nCoreStart ),
+ "problem determining valid core position" );
+
+ nLocalStart =
+ GetPortionData().GetAccessiblePosition(
+ nCoreStart );
+ }
+ }
+
+ // end position
+ sal_Int32 nLocalEnd = -1;
+ if( nHere < nEndIndex )
+ {
+ // selection ends in following node:
+ // then our local selection extends to the end
+ nLocalEnd = GetPortionData().GetAccessibleString().
+ getLength();
+ }
+ else
+ {
+ DBG_ASSERT( nHere == nEndIndex,
+ "miscalculated index" );
+
+ // selection ends in this node: then select everything
+ // before our part of the node
+ USHORT nCoreEnd = pEnd->nContent.GetIndex();
+ if( nCoreEnd >
+ GetPortionData().GetLastValidCorePosition() )
+ {
+ // selection extends beyond out part of this para
+ nLocalEnd = GetPortionData().GetAccessibleString().
+ getLength();
+ }
+ else if( nCoreEnd >=
+ GetPortionData().GetFirstValidCorePosition() )
+ {
+ // selection is inside our part of this para
+ DBG_ASSERT(
+ GetPortionData().IsValidCorePosition(
+ nCoreEnd ),
+ "problem determining valid core position" );
+
+ nLocalEnd = GetPortionData().GetAccessiblePosition(
+ nCoreEnd );
+ }
+ }
+
+ if( ( nLocalStart != -1 ) && ( nLocalEnd != -1 ) )
+ {
+ nStart = nLocalStart;
+ nEnd = nLocalEnd;
+ bRet = sal_True;
+ }
+ }
+ // else: this PaM doesn't point to this paragraph
+ }
+ // else: this PaM is collapsed and doesn't select anything
+
+ // next PaM in ring
+ pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+ }
+ while( !bRet && (pCrsr != pRingStart) );
+ }
+ // else: nocursor -> no selection
+
+ return bRet;
+}
+
+// --> OD 2005-12-20 #i27301# - new parameter <_bForSelection>
+SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection )
+{
+ // get the cursor shell; if we don't have any, we don't have a
+ // cursor/selection either
+ SwPaM* pCrsr = NULL;
+ SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell();
+ // --> OD 2005-12-20 #i27301#
+ // - if cursor is retrieved for selection, the cursors for a table selection
+ // has to be returned.
+ if ( pCrsrShell != NULL &&
+ ( _bForSelection || !pCrsrShell->IsTableMode() ) )
+ // <--
+ {
+ SwFEShell *pFESh = pCrsrShell->ISA( SwFEShell )
+ ? static_cast< SwFEShell * >( pCrsrShell ) : 0;
+ if( !pFESh ||
+ !(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) )
+ {
+ // get the selection, and test whether it affects our text node
+ pCrsr = pCrsrShell->GetCrsr( FALSE /* ??? */ );
+ }
+ }
+
+ return pCrsr;
+}
+
+sal_Bool SwAccessibleParagraph::IsHeading() const
+{
+ const SwTxtNode *pTxtNd = GetTxtNode();
+ return pTxtNd->IsOutline();
+}
+
+void SwAccessibleParagraph::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ SwAccessibleContext::GetStates( rStateSet );
+
+ // MULTILINE
+ rStateSet.AddState( AccessibleStateType::MULTI_LINE );
+
+ // MULTISELECTABLE
+ SwCrsrShell *pCrsrSh = GetCrsrShell();
+ if( pCrsrSh )
+ rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
+
+ // FOCUSABLE
+ if( pCrsrSh )
+ rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+
+ // FOCUSED (simulates node index of cursor)
+ // --> OD 2005-12-20 #i27301# - consider adjusted method signature
+ SwPaM* pCaret = GetCursor( false );
+ // <--
+ const SwTxtNode* pTxtNd = GetTxtNode();
+ if( pCaret != 0 && pTxtNd != 0 &&
+ pTxtNd->GetIndex() == pCaret->GetPoint()->nNode.GetIndex() &&
+ nOldCaretPos != -1)
+ {
+ Window *pWin = GetWindow();
+ if( pWin && pWin->HasFocus() )
+ rStateSet.AddState( AccessibleStateType::FOCUSED );
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+}
+
+void SwAccessibleParagraph::_InvalidateContent( sal_Bool bVisibleDataFired )
+{
+ OUString sOldText( GetString() );
+
+ ClearPortionData();
+
+ const OUString& rText = GetString();
+
+ if( rText != sOldText )
+ {
+ // The text is changed
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::TEXT_CHANGED;
+
+ // determine exact changes between sOldText and rText
+ comphelper::OCommonAccessibleText::implInitTextChangedEvent(
+ sOldText, rText,
+ aEvent.OldValue, aEvent.NewValue );
+
+ FireAccessibleEvent( aEvent );
+ }
+ else if( !bVisibleDataFired )
+ {
+ FireVisibleDataEvent();
+ }
+
+ sal_Bool bNewIsHeading = IsHeading();
+ sal_Bool bOldIsHeading;
+ {
+ vos::OGuard aGuard( aMutex );
+ bOldIsHeading = bIsHeading;
+ if( bIsHeading != bNewIsHeading )
+ bIsHeading = bNewIsHeading;
+ }
+
+
+ if( bNewIsHeading != bOldIsHeading || rText != sOldText )
+ {
+ OUString sNewDesc( GetDescription() );
+ OUString sOldDesc;
+ {
+ vos::OGuard aGuard( aMutex );
+ sOldDesc = sDesc;
+ if( sDesc != sNewDesc )
+ sDesc = sNewDesc;
+ }
+
+ if( sNewDesc != sOldDesc )
+ {
+ // The text is changed
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
+ aEvent.OldValue <<= sOldDesc;
+ aEvent.NewValue <<= sNewDesc;
+
+ FireAccessibleEvent( aEvent );
+ }
+ }
+}
+
+void SwAccessibleParagraph::_InvalidateCursorPos()
+{
+ // The text is changed
+ sal_Int32 nNew = GetCaretPos();
+ sal_Int32 nOld;
+ {
+ vos::OGuard aGuard( aMutex );
+ nOld = nOldCaretPos;
+ nOldCaretPos = nNew;
+ }
+ if( -1 != nNew )
+ {
+ // remember that object as the one that has the caret. This is
+ // neccessary to notify that object if the cursor leaves it.
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+
+ Window *pWin = GetWindow();
+ if( nOld != nNew )
+ {
+ // The cursor's node position is sumilated by the focus!
+ if( pWin && pWin->HasFocus() && -1 == nOld )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, sal_True );
+
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CARET_CHANGED;
+ aEvent.OldValue <<= nOld;
+ aEvent.NewValue <<= nNew;
+
+ FireAccessibleEvent( aEvent );
+
+ if( pWin && pWin->HasFocus() && -1 == nNew )
+ FireStateChangedEvent( AccessibleStateType::FOCUSED, sal_False );
+ }
+}
+
+void SwAccessibleParagraph::_InvalidateFocus()
+{
+ Window *pWin = GetWindow();
+ if( pWin )
+ {
+ sal_Int32 nPos;
+ {
+ vos::OGuard aGuard( aMutex );
+ nPos = nOldCaretPos;
+ }
+ ASSERT( nPos != -1, "focus object should be selected" );
+
+ FireStateChangedEvent( AccessibleStateType::FOCUSED,
+ pWin->HasFocus() && nPos != -1 );
+ }
+}
+
+SwAccessibleParagraph::SwAccessibleParagraph(
+ SwAccessibleMap* pInitMap,
+ const SwTxtFrm *pTxtFrm ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::PARAGRAPH, pTxtFrm ),
+ pPortionData( NULL ),
+ pHyperTextData( NULL ),
+ nOldCaretPos( -1 ),
+ aSelectionHelper( *this )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ bIsHeading = IsHeading();
+ // --> OD 2004-09-27 #117970# - set an empty accessibility name for paragraphs
+ SetName( OUString() );
+ // <--
+
+ // If this object has the focus, then it is remembered by the map itself.
+ nOldCaretPos = GetCaretPos();
+}
+
+SwAccessibleParagraph::~SwAccessibleParagraph()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ delete pPortionData;
+ delete pHyperTextData;
+}
+
+sal_Bool SwAccessibleParagraph::HasCursor()
+{
+ vos::OGuard aGuard( aMutex );
+ return nOldCaretPos != -1;
+}
+
+void SwAccessibleParagraph::UpdatePortionData()
+ throw( uno::RuntimeException )
+{
+ // obtain the text frame
+ DBG_ASSERT( GetFrm() != NULL, "The text frame has vanished!" );
+ DBG_ASSERT( GetFrm()->IsTxtFrm(), "The text frame has mutated!" );
+ const SwTxtFrm* pFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+
+ // build new portion data
+ delete pPortionData;
+ pPortionData = new SwAccessiblePortionData(
+ pFrm->GetTxtNode(), GetMap()->GetShell()->GetViewOptions() );
+ pFrm->VisitPortions( *pPortionData );
+
+ DBG_ASSERT( pPortionData != NULL, "UpdatePortionData() failed" );
+}
+
+void SwAccessibleParagraph::ClearPortionData()
+{
+ delete pPortionData;
+ pPortionData = NULL;
+
+ delete pHyperTextData;
+ pHyperTextData = 0;
+}
+
+
+void SwAccessibleParagraph::ExecuteAtViewShell( UINT16 nSlot )
+{
+ DBG_ASSERT( GetMap() != NULL, "no map?" );
+ ViewShell* pViewShell = GetMap()->GetShell();
+
+ DBG_ASSERT( pViewShell != NULL, "View shell exptected!" );
+ SfxViewShell* pSfxShell = pViewShell->GetSfxViewShell();
+
+ DBG_ASSERT( pSfxShell != NULL, "SfxViewShell shell exptected!" );
+ if( !pSfxShell )
+ return;
+
+ SfxViewFrame *pFrame = pSfxShell->GetViewFrame();
+ DBG_ASSERT( pFrame != NULL, "View frame exptected!" );
+ if( !pFrame )
+ return;
+
+ SfxDispatcher *pDispatcher = pFrame->GetDispatcher();
+ DBG_ASSERT( pDispatcher != NULL, "Dispatcher exptected!" );
+ if( !pDispatcher )
+ return;
+
+ pDispatcher->Execute( nSlot );
+}
+
+SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion(
+ sal_Int32 nStartIndex,
+ sal_Int32 nEndIndex )
+{
+ DBG_ASSERT( (IsValidChar(nStartIndex, GetString().getLength()) &&
+ (nEndIndex == -1)) ||
+ IsValidRange(nStartIndex, nEndIndex, GetString().getLength()),
+ "please check parameters before calling this method" );
+
+ USHORT nStart = GetPortionData().GetModelPosition( nStartIndex );
+ USHORT nEnd = (nEndIndex == -1) ? (nStart + 1) :
+ GetPortionData().GetModelPosition( nEndIndex );
+
+ // create UNO cursor
+ SwTxtNode* pTxtNode = const_cast<SwTxtNode*>( GetTxtNode() );
+ SwIndex aIndex( pTxtNode, nStart );
+ SwPosition aStartPos( *pTxtNode, aIndex );
+ SwUnoCrsr* pUnoCursor = pTxtNode->GetDoc()->CreateUnoCrsr( aStartPos );
+ pUnoCursor->SetMark();
+ pUnoCursor->GetMark()->nContent = nEnd;
+
+ // create a (dummy) text portion to be returned
+ uno::Reference<text::XText> aEmpty;
+ SwXTextPortion* pPortion =
+ new SwXTextPortion ( pUnoCursor, aEmpty, PORTION_TEXT);
+ delete pUnoCursor;
+
+ return pPortion;
+}
+
+
+//
+// range checking for parameter
+//
+
+sal_Bool SwAccessibleParagraph::IsValidChar(
+ sal_Int32 nPos, sal_Int32 nLength)
+{
+ return (nPos >= 0) && (nPos < nLength);
+}
+
+sal_Bool SwAccessibleParagraph::IsValidPosition(
+ sal_Int32 nPos, sal_Int32 nLength)
+{
+ return (nPos >= 0) && (nPos <= nLength);
+}
+
+sal_Bool SwAccessibleParagraph::IsValidRange(
+ sal_Int32 nBegin, sal_Int32 nEnd, sal_Int32 nLength)
+{
+ return IsValidPosition(nBegin, nLength) && IsValidPosition(nEnd, nLength);
+}
+
+
+//
+// text boundaries
+//
+
+
+sal_Bool SwAccessibleParagraph::GetCharBoundary(
+ Boundary& rBound,
+ const OUString&,
+ sal_Int32 nPos )
+{
+ rBound.startPos = nPos;
+ rBound.endPos = nPos+1;
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetWordBoundary(
+ Boundary& rBound,
+ const OUString& rText,
+ sal_Int32 nPos )
+{
+ sal_Bool bRet = sal_False;
+
+ // now ask the Break-Iterator for the word
+ DBG_ASSERT( pBreakIt != NULL, "We always need a break." );
+ DBG_ASSERT( pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( pBreakIt->GetBreakIter().is() )
+ {
+ // get locale for this position
+ USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
+ Locale aLocale = pBreakIt->GetLocale(
+ GetTxtNode()->GetLang( nModelPos ) );
+
+ // which type of word are we interested in?
+ // (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.)
+ const USHORT nWordType = WordType::ANY_WORD;
+
+ // get word boundary, as the Break-Iterator sees fit.
+ rBound = pBreakIt->GetBreakIter()->getWordBoundary(
+ rText, nPos, aLocale, nWordType, sal_True );
+
+ // It's a word if the first character is an alpha-numeric character.
+ bRet = GetAppCharClass().isLetterNumeric(
+ rText.getStr()[ rBound.startPos ] );
+ }
+ else
+ {
+ // no break Iterator -> no word
+ rBound.startPos = nPos;
+ rBound.endPos = nPos;
+ }
+
+ return bRet;
+}
+
+sal_Bool SwAccessibleParagraph::GetSentenceBoundary(
+ Boundary& rBound,
+ const OUString&,
+ sal_Int32 nPos )
+{
+ GetPortionData().GetSentenceBoundary( rBound, nPos );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetLineBoundary(
+ Boundary& rBound,
+ const OUString& rText,
+ sal_Int32 nPos )
+{
+ if( rText.getLength() == nPos )
+ GetPortionData().GetLastLineBoundary( rBound );
+ else
+ GetPortionData().GetLineBoundary( rBound, nPos );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetParagraphBoundary(
+ Boundary& rBound,
+ const OUString& rText,
+ sal_Int32 )
+{
+ rBound.startPos = 0;
+ rBound.endPos = rText.getLength();
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetAttributeBoundary(
+ Boundary& rBound,
+ const OUString&,
+ sal_Int32 nPos )
+{
+ GetPortionData().GetAttributeBoundary( rBound, nPos );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
+ Boundary& rBound,
+ const OUString& rText,
+ sal_Int32 nPos )
+{
+ sal_Bool bRet = sal_False;
+
+ // ask the Break-Iterator for the glyph by moving one cell
+ // forward, and then one cell back
+ DBG_ASSERT( pBreakIt != NULL, "We always need a break." );
+ DBG_ASSERT( pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( pBreakIt->GetBreakIter().is() )
+ {
+ // get locale for this position
+ USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
+ Locale aLocale = pBreakIt->GetLocale(
+ GetTxtNode()->GetLang( nModelPos ) );
+
+ // get word boundary, as the Break-Iterator sees fit.
+ const USHORT nIterMode = CharacterIteratorMode::SKIPCELL;
+ sal_Int32 nDone = 0;
+ rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters(
+ rText, nPos, aLocale, nIterMode, 1, nDone );
+ rBound.startPos = pBreakIt->GetBreakIter()->previousCharacters(
+ rText, rBound.endPos, aLocale, nIterMode, 1, nDone );
+
+ DBG_ASSERT( rBound.startPos <= nPos, "start pos too high" );
+ DBG_ASSERT( rBound.endPos >= nPos, "end pos too low" );
+ }
+ else
+ {
+ // no break Iterator -> no glyph
+ rBound.startPos = nPos;
+ rBound.endPos = nPos;
+ }
+
+ return bRet;
+}
+
+
+sal_Bool SwAccessibleParagraph::GetTextBoundary(
+ Boundary& rBound,
+ const OUString& rText,
+ sal_Int32 nPos,
+ sal_Int16 nTextType )
+ throw (
+ IndexOutOfBoundsException,
+ IllegalArgumentException,
+ uno::RuntimeException)
+{
+ // error checking
+ if( !( AccessibleTextType::LINE == nTextType
+ ? IsValidPosition( nPos, rText.getLength() )
+ : IsValidChar( nPos, rText.getLength() ) ) )
+ throw IndexOutOfBoundsException();
+
+ sal_Bool bRet;
+
+ switch( nTextType )
+ {
+ case AccessibleTextType::WORD:
+ bRet = GetWordBoundary( rBound, rText, nPos );
+ break;
+
+ case AccessibleTextType::SENTENCE:
+ bRet = GetSentenceBoundary( rBound, rText, nPos );
+ break;
+
+ case AccessibleTextType::PARAGRAPH:
+ bRet = GetParagraphBoundary( rBound, rText, nPos );
+ break;
+
+ case AccessibleTextType::CHARACTER:
+ bRet = GetCharBoundary( rBound, rText, nPos );
+ break;
+
+ case AccessibleTextType::LINE:
+ bRet = GetLineBoundary( rBound, rText, nPos );
+ break;
+
+ case AccessibleTextType::ATTRIBUTE_RUN:
+ bRet = GetAttributeBoundary( rBound, rText, nPos );
+ break;
+
+ case AccessibleTextType::GLYPH:
+ bRet = GetGlyphBoundary( rBound, rText, nPos );
+ break;
+
+ default:
+ throw IllegalArgumentException( );
+ }
+
+ return bRet;
+}
+
+OUString SAL_CALL SwAccessibleParagraph::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext );
+
+ vos::OGuard aGuard2( aMutex );
+ if( !sDesc.getLength() )
+ sDesc = GetDescription();
+
+ return sDesc;
+}
+
+Locale SAL_CALL SwAccessibleParagraph::getLocale (void)
+ throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ SwTxtFrm *pTxtFrm = PTR_CAST( SwTxtFrm, GetFrm() );
+ if( !pTxtFrm )
+ {
+ THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (no text frame)" );
+ }
+
+ const SwTxtNode *pTxtNd = pTxtFrm->GetTxtNode();
+ Locale aLoc( pBreakIt->GetLocale( pTxtNd->GetLang( 0 ) ) );
+
+ return aLoc;
+}
+
+/** paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO
+
+ OD 2005-12-02 #i27138#
+
+ @author OD
+*/
+uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleParagraph::getAccessibleRelationSet()
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleContext );
+
+ utl::AccessibleRelationSetHelper* pHelper = new utl::AccessibleRelationSetHelper();
+
+ const SwTxtFrm* pTxtFrm = dynamic_cast<const SwTxtFrm*>(GetFrm());
+ ASSERT( pTxtFrm,
+ "<SwAccessibleParagraph::getAccessibleRelationSet()> - missing text frame");
+ if ( pTxtFrm )
+ {
+ const SwCntntFrm* pPrevCntFrm( pTxtFrm->FindPrevCnt( true ) );
+ if ( pPrevCntFrm )
+ {
+ uno::Sequence< uno::Reference<XInterface> > aSequence(1);
+ aSequence[0] = GetMap()->GetContext( pPrevCntFrm );
+ AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_FROM,
+ aSequence );
+ pHelper->AddRelation( aAccRel );
+ }
+
+ const SwCntntFrm* pNextCntFrm( pTxtFrm->FindNextCnt( true ) );
+ if ( pNextCntFrm )
+ {
+ uno::Sequence< uno::Reference<XInterface> > aSequence(1);
+ aSequence[0] = GetMap()->GetContext( pNextCntFrm );
+ AccessibleRelation aAccRel( AccessibleRelationType::CONTENT_FLOWS_TO,
+ aSequence );
+ pHelper->AddRelation( aAccRel );
+ }
+ }
+
+ return pHelper;
+}
+
+void SAL_CALL SwAccessibleParagraph::grabFocus()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext );
+
+ // get cursor shell
+ SwCrsrShell *pCrsrSh = GetCrsrShell();
+ // --> OD 2005-12-20 #i27301# - consider new method signature
+ SwPaM *pCrsr = GetCursor( false );
+ // <--
+ const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+ const SwTxtNode* pTxtNd = pTxtFrm->GetTxtNode();
+
+ if( pCrsrSh != 0 && pTxtNd != 0 &&
+ ( pCrsr == 0 ||
+ pCrsr->GetPoint()->nNode.GetIndex() != pTxtNd->GetIndex() ||
+ !pTxtFrm->IsInside( pCrsr->GetPoint()->nContent.GetIndex()) ) )
+ {
+ // create pam for selection
+ SwIndex aIndex( const_cast< SwTxtNode * >( pTxtNd ),
+ pTxtFrm->GetOfst() );
+ SwPosition aStartPos( *pTxtNd, aIndex );
+ SwPaM aPaM( aStartPos );
+
+ // set PaM at cursor shell
+ Select( aPaM );
+
+
+ }
+
+ /* ->#i13955# */
+ Window * pWindow = GetWindow();
+
+ if (pWindow != NULL)
+ pWindow->GrabFocus();
+ /* <-#i13955# */
+}
+
+// --> OD 2007-01-17 #i71385#
+bool lcl_GetBackgroundColor( Color & rColor,
+ const SwFrm* pFrm,
+ SwCrsrShell* pCrsrSh )
+{
+ const SvxBrushItem* pBackgrdBrush = 0;
+ const Color* pSectionTOXColor = 0;
+ SwRect aDummyRect;
+ if ( pFrm &&
+ pFrm->GetBackgroundBrush( pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) )
+ {
+ if ( pSectionTOXColor )
+ {
+ rColor = *pSectionTOXColor;
+ return true;
+ }
+ else
+ {
+ rColor = pBackgrdBrush->GetColor();
+ return true;
+ }
+ }
+ else if ( pCrsrSh )
+ {
+ rColor = pCrsrSh->Imp()->GetRetoucheColor();
+ return true;
+ }
+
+ return false;
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getForeground()
+ throw (uno::RuntimeException)
+{
+ Color aBackgroundCol;
+
+ if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrm(), GetCrsrShell() ) )
+ {
+ if ( aBackgroundCol.IsDark() )
+ {
+ return COL_WHITE;
+ }
+ else
+ {
+ return COL_BLACK;
+ }
+ }
+
+ return SwAccessibleContext::getForeground();
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getBackground()
+ throw (uno::RuntimeException)
+{
+ Color aBackgroundCol;
+
+ if ( lcl_GetBackgroundColor( aBackgroundCol, GetFrm(), GetCrsrShell() ) )
+ {
+ return aBackgroundCol.GetColor();
+ }
+
+ return SwAccessibleContext::getBackground();
+}
+// <--
+
+OUString SAL_CALL SwAccessibleParagraph::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleParagraph::supportsService(
+ const ::rtl::OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+Sequence< OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ Sequence< OUString > aRet(2);
+ OUString* pArray = aRet.getArray();
+ pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+//
+//===== XInterface =======================================================
+//
+
+Any SwAccessibleParagraph::queryInterface( const Type& rType )
+ throw (RuntimeException)
+{
+ Any aRet;
+ if ( rType == ::getCppuType((uno::Reference<XAccessibleText> *)0) )
+ {
+ uno::Reference<XAccessibleText> aAccText = (XAccessibleText *) *this; // resolve ambiguity
+ aRet <<= aAccText;
+ }
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleEditableText> *)0) )
+ {
+ uno::Reference<XAccessibleEditableText> aAccEditText = this;
+ aRet <<= aAccEditText;
+ }
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleSelection> *)0) )
+ {
+ uno::Reference<XAccessibleSelection> aAccSel = this;
+ aRet <<= aAccSel;
+ }
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleHypertext> *)0) )
+ {
+ uno::Reference<XAccessibleHypertext> aAccHyp = this;
+ aRet <<= aAccHyp;
+ }
+ // --> OD 2006-07-13 #i63870#
+ // add interface com::sun:star:accessibility::XAccessibleTextAttributes
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextAttributes> *)0) )
+ {
+ uno::Reference<XAccessibleTextAttributes> aAccTextAttr = this;
+ aRet <<= aAccTextAttr;
+ }
+ // <--
+ // --> OD 2008-06-10 #i89175#
+ // add interface com::sun:star:accessibility::XAccessibleTextMarkup
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextMarkup> *)0) )
+ {
+ uno::Reference<XAccessibleTextMarkup> aAccTextMarkup = this;
+ aRet <<= aAccTextMarkup;
+ }
+ // add interface com::sun:star:accessibility::XAccessibleMultiLineText
+ else if ( rType == ::getCppuType((uno::Reference<XAccessibleMultiLineText> *)0) )
+ {
+ uno::Reference<XAccessibleMultiLineText> aAccMultiLineText = this;
+ aRet <<= aAccMultiLineText;
+ }
+ // <--
+ else
+ {
+ aRet = SwAccessibleContext::queryInterface(rType);
+ }
+
+ return aRet;
+}
+
+//====== XTypeProvider ====================================================
+Sequence< Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(RuntimeException)
+{
+ Sequence< Type > aTypes( SwAccessibleContext::getTypes() );
+
+ sal_Int32 nIndex = aTypes.getLength();
+ // --> OD 2006-07-13 #i63870#
+ // add type accessibility::XAccessibleTextAttributes
+ // --> OD 2008-06-10 #i89175#
+ // add type accessibility::XAccessibleTextMarkup and accessibility::XAccessibleMultiLineText
+ aTypes.realloc( nIndex + 6 );
+
+ Type* pTypes = aTypes.getArray();
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleEditableText > * >( 0 ) );
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTextAttributes > * >( 0 ) );
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTextMarkup > * >( 0 ) );
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleMultiLineText > * >( 0 ) );
+ pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleHypertext > * >( 0 ) );
+ // <--
+
+ return aTypes;
+}
+
+Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::getImplementationId()
+ throw(RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ static Sequence< sal_Int8 > aId( 16 );
+ static sal_Bool bInit = sal_False;
+ if(!bInit)
+ {
+ rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
+ bInit = sal_True;
+ }
+ return aId;
+}
+
+
+//
+//===== XAccesibleText ===================================================
+//
+
+sal_Int32 SwAccessibleParagraph::getCaretPosition()
+ throw (RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ sal_Int32 nRet = GetCaretPos();
+ {
+ vos::OGuard aOldCaretPosGuard( aMutex );
+ ASSERT( nRet == nOldCaretPos, "caret pos out of sync" );
+ nOldCaretPos = nRet;
+ }
+ if( -1 != nRet )
+ {
+ ::vos::ORef < SwAccessibleContext > xThis( this );
+ GetMap()->SetCursorContext( xThis );
+ }
+
+ return nRet;
+}
+
+sal_Bool SAL_CALL SwAccessibleParagraph::setCaretPosition( sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ // parameter checking
+ sal_Int32 nLength = GetString().getLength();
+ if ( ! IsValidPosition( nIndex, nLength ) )
+ {
+ throw IndexOutOfBoundsException();
+ }
+
+ sal_Bool bRet = sal_False;
+
+ // get cursor shell
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL )
+ {
+ // create pam for selection
+ SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
+ SwIndex aIndex( pNode, GetPortionData().GetModelPosition(nIndex));
+ SwPosition aStartPos( *pNode, aIndex );
+ SwPaM aPaM( aStartPos );
+
+ // set PaM at cursor shell
+ bRet = Select( aPaM );
+ }
+
+ return bRet;
+}
+
+sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
+ throw (IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ OUString sText( GetString() );
+
+ // return character (if valid)
+ if( IsValidChar(nIndex, sText.getLength() ) )
+ {
+ return sText.getStr()[nIndex];
+ }
+ else
+ throw IndexOutOfBoundsException();
+}
+
+// --> OD 2006-07-20 #i63870#
+// re-implement method on behalf of methods <_getDefaultAttributesImpl(..)> and
+// <_getRunAttributesImpl(..)>
+Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
+ sal_Int32 nIndex,
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw (IndexOutOfBoundsException, uno::RuntimeException)
+{
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ const OUString& rText = GetString();
+
+ if( ! IsValidChar( nIndex, rText.getLength() ) )
+ throw IndexOutOfBoundsException();
+
+ // retrieve default character attributes
+ tAccParaPropValMap aDefAttrSeq;
+ _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq, true );
+
+ // retrieved run character attributes
+ tAccParaPropValMap aRunAttrSeq;
+ _getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq );
+
+ // merge default and run attributes
+ Sequence< PropertyValue > aValues( aDefAttrSeq.size() );
+ PropertyValue* pValues = aValues.getArray();
+ sal_Int32 i = 0;
+ for ( tAccParaPropValMap::const_iterator aDefIter = aDefAttrSeq.begin();
+ aDefIter != aDefAttrSeq.end();
+ ++aDefIter )
+ {
+ tAccParaPropValMap::const_iterator aRunIter =
+ aRunAttrSeq.find( aDefIter->first );
+ if ( aRunIter != aRunAttrSeq.end() )
+ {
+ pValues[i] = aRunIter->second;
+ }
+ else
+ {
+ pValues[i] = aDefIter->second;
+ }
+ ++i;
+ }
+
+// // create a (dummy) text portion for the sole purpose of calling
+// // getPropertyValues on it
+// Reference<XMultiPropertySet> xPortion = CreateUnoPortion( nIndex, nIndex + 1 );
+
+// // get values
+// Sequence<OUString> aNames = getAttributeNames();
+// sal_Int32 nLength = aNames.getLength();
+// Sequence<Any> aAnys( nLength );
+// aAnys = xPortion->getPropertyValues( aNames );
+
+// // copy names + anys into return sequence
+// Sequence<PropertyValue> aValues( aNames.getLength() );
+// const OUString* pNames = aNames.getConstArray();
+// const Any* pAnys = aAnys.getConstArray();
+// PropertyValue* pValues = aValues.getArray();
+// for( sal_Int32 i = 0; i < nLength; i++ )
+// {
+// PropertyValue& rValue = pValues[i];
+// rValue.Name = pNames[i];
+// rValue.Value = pAnys[i];
+// rValue.Handle = -1; // handle not supported
+// rValue.State = PropertyState_DIRECT_VALUE; // states not supported
+// }
+
+// // adjust background color if we're in a gray portion
+// DBG_ASSERT( pValues[CHAR_BACK_COLOR_POS].Name.
+// equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CharBackColor")),
+// "Please adjust CHAR_BACK_COLOR_POS constant." );
+// if( GetPortionData().IsInGrayPortion( nIndex ) )
+// pValues[CHAR_BACK_COLOR_POS].Value <<= SwViewOption::GetFieldShadingsColor().GetColor();
+
+ return aValues;
+}
+
+// --> OD 2006-07-11 #i63870#
+void SwAccessibleParagraph::_getDefaultAttributesImpl(
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
+ tAccParaPropValMap& rDefAttrSeq,
+ const bool bOnlyCharAttrs )
+{
+ // retrieve default attributes
+ const SwTxtNode* pTxtNode( GetTxtNode() );
+ ::boost::scoped_ptr<SfxItemSet> pSet;
+ if ( !bOnlyCharAttrs )
+ {
+ pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_PARATR_BEGIN, RES_PARATR_END - 1,
+ RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
+ 0 ) );
+ }
+ else
+ {
+ pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ 0 ) );
+ }
+ // --> OD 2007-11-12 #i82637#
+ // From the perspective of the a11y API the default character attributes
+ // are the character attributes, which are set at the paragraph style
+ // of the paragraph. The character attributes set at the automatic paragraph
+ // style of the paragraph are treated as run attributes.
+// pTxtNode->SwCntntNode::GetAttr( *pSet );
+ // get default paragraph attributes, if needed, and merge these into <pSet>
+ if ( !bOnlyCharAttrs )
+ {
+ SfxItemSet aParaSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
+ RES_PARATR_BEGIN, RES_PARATR_END - 1,
+ RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
+ 0 );
+ pTxtNode->SwCntntNode::GetAttr( aParaSet );
+ pSet->Put( aParaSet );
+ }
+ // get default character attributes and merge these into <pSet>
+ ASSERT( pTxtNode->GetTxtColl(),
+ "<SwAccessibleParagraph::_getDefaultAttributesImpl(..)> - missing paragraph style. Serious defect, please inform OD!" );
+ if ( pTxtNode->GetTxtColl() )
+ {
+ SfxItemSet aCharSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
+ RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ 0 );
+ aCharSet.Put( pTxtNode->GetTxtColl()->GetAttrSet() );
+ pSet->Put( aCharSet );
+ }
+ // <--
+
+ // build-up sequence containing the run attributes <rDefAttrSeq>
+ tAccParaPropValMap aDefAttrSeq;
+ {
+ const SfxItemPropertyMap* pPropMap =
+ aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_CURSOR )->getPropertyMap();
+ PropertyEntryVector_t aPropertyEntries = pPropMap->getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aPropIt = aPropertyEntries.begin();
+ while ( aPropIt != aPropertyEntries.end() )
+ {
+ const SfxPoolItem* pItem = pSet->GetItem( aPropIt->nWID );
+ if ( pItem )
+ {
+ Any aVal;
+ pItem->QueryValue( aVal, aPropIt->nMemberId );
+
+ PropertyValue rPropVal;
+ rPropVal.Name = aPropIt->sName;
+ rPropVal.Value = aVal;
+ rPropVal.Handle = -1;
+ rPropVal.State = beans::PropertyState_DEFAULT_VALUE;
+
+ aDefAttrSeq[rPropVal.Name] = rPropVal;
+ }
+ ++aPropIt;
+ }
+
+ // --> OD 2007-01-15 #i72800#
+ // add property value entry for the paragraph style
+ if ( !bOnlyCharAttrs && pTxtNode->GetTxtColl() )
+ {
+ const OUString sParaStyleName =
+ OUString::createFromAscii(
+ GetPropName( UNO_NAME_PARA_STYLE_NAME ).pName );
+ if ( aDefAttrSeq.find( sParaStyleName ) == aDefAttrSeq.end() )
+ {
+ PropertyValue rPropVal;
+ rPropVal.Name = sParaStyleName;
+ Any aVal( makeAny( OUString( pTxtNode->GetTxtColl()->GetName() ) ) );
+ rPropVal.Value = aVal;
+ rPropVal.Handle = -1;
+ rPropVal.State = beans::PropertyState_DEFAULT_VALUE;
+
+ aDefAttrSeq[rPropVal.Name] = rPropVal;
+ }
+ }
+ // <--
+
+ // --> OD 2007-01-15 #i73371#
+ // resolve value text::WritingMode2::PAGE of property value entry WritingMode
+ if ( !bOnlyCharAttrs && GetFrm() )
+ {
+ const OUString sWritingMode =
+ OUString::createFromAscii(
+ GetPropName( UNO_NAME_WRITING_MODE ).pName );
+ tAccParaPropValMap::iterator aIter = aDefAttrSeq.find( sWritingMode );
+ if ( aIter != aDefAttrSeq.end() )
+ {
+ PropertyValue rPropVal( aIter->second );
+ sal_Int16 nVal = rPropVal.Value.get<sal_Int16>();
+ if ( nVal == text::WritingMode2::PAGE )
+ {
+ const SwFrm* pUpperFrm( GetFrm()->GetUpper() );
+ while ( pUpperFrm )
+ {
+ if ( pUpperFrm->GetType() &
+ ( FRM_PAGE | FRM_FLY | FRM_SECTION | FRM_TAB | FRM_CELL ) )
+ {
+ if ( pUpperFrm->IsVertical() )
+ {
+ nVal = text::WritingMode2::TB_RL;
+ }
+ else if ( pUpperFrm->IsRightToLeft() )
+ {
+ nVal = text::WritingMode2::RL_TB;
+ }
+ else
+ {
+ nVal = text::WritingMode2::LR_TB;
+ }
+ rPropVal.Value <<= nVal;
+ aDefAttrSeq[rPropVal.Name] = rPropVal;
+ break;
+ }
+
+ if ( dynamic_cast<const SwFlyFrm*>(pUpperFrm) )
+ {
+ pUpperFrm = dynamic_cast<const SwFlyFrm*>(pUpperFrm)->GetAnchorFrm();
+ }
+ else
+ {
+ pUpperFrm = pUpperFrm->GetUpper();
+ }
+ }
+ }
+ }
+ }
+ // <--
+ }
+
+ if ( aRequestedAttributes.getLength() == 0 )
+ {
+ rDefAttrSeq = aDefAttrSeq;
+ }
+ else
+ {
+ const OUString* pReqAttrs = aRequestedAttributes.getConstArray();
+ const sal_Int32 nLength = aRequestedAttributes.getLength();
+ for( sal_Int32 i = 0; i < nLength; ++i )
+ {
+ tAccParaPropValMap::const_iterator const aIter = aDefAttrSeq.find( pReqAttrs[i] );
+ if ( aIter != aDefAttrSeq.end() )
+ {
+ rDefAttrSeq[ aIter->first ] = aIter->second;
+ }
+ }
+ }
+}
+
+Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
+ const Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ tAccParaPropValMap aDefAttrSeq;
+ _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq );
+
+ Sequence< PropertyValue > aValues( aDefAttrSeq.size() );
+ PropertyValue* pValues = aValues.getArray();
+ sal_Int32 i = 0;
+ for ( tAccParaPropValMap::const_iterator aIter = aDefAttrSeq.begin();
+ aIter != aDefAttrSeq.end();
+ ++aIter )
+ {
+ pValues[i] = aIter->second;
+ ++i;
+ }
+
+ return aValues;
+}
+
+void SwAccessibleParagraph::_getRunAttributesImpl(