summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/macab/macabcondition.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/macab/macabcondition.hxx')
-rw-r--r--[-rwxr-xr-x]connectivity/source/drivers/macab/macabcondition.hxx0
1 files changed, 0 insertions, 0 deletions
diff --git a/connectivity/source/drivers/macab/macabcondition.hxx b/connectivity/source/drivers/macab/macabcondition.hxx
index d268c4100bdb..d268c4100bdb 100755..100644
--- a/connectivity/source/drivers/macab/macabcondition.hxx
+++ b/connectivity/source/drivers/macab/macabcondition.hxx
diffstat' width='100%'> -rw-r--r--sw/Library_sw.mk738
-rw-r--r--sw/Library_swd.mk72
-rw-r--r--sw/Library_swui.mk168
-rw-r--r--sw/Library_vbaswobj.mk124
-rw-r--r--sw/Makefile38
-rw-r--r--sw/Module_sw.mk47
-rw-r--r--sw/Package_misc.mk30
-rw-r--r--sw/Package_uiconfig.mk261
-rw-r--r--sw/Package_xml.mk29
-rw-r--r--sw/inc/AnnotationWin.hxx83
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx256
-rw-r--r--sw/inc/HandleAnchorNodeChg.hxx81
-rw-r--r--sw/inc/IDocumentChartDataProviderAccess.hxx69
-rw-r--r--sw/inc/IDocumentContentOperations.hxx203
-rwxr-xr-xsw/inc/IDocumentDeviceAccess.hxx145
-rw-r--r--sw/inc/IDocumentDrawModelAccess.hxx111
-rw-r--r--sw/inc/IDocumentExternalData.hxx69
-rw-r--r--sw/inc/IDocumentFieldsAccess.hxx191
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx82
-rw-r--r--sw/inc/IDocumentLineNumberAccess.hxx51
-rw-r--r--sw/inc/IDocumentLinksAdministration.hxx91
-rw-r--r--sw/inc/IDocumentListItems.hxx61
-rw-r--r--sw/inc/IDocumentListsAccess.hxx57
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx251
-rw-r--r--sw/inc/IDocumentOutlineNodes.hxx57
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx259
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx213
-rw-r--r--sw/inc/IDocumentState.hxx87
-rw-r--r--sw/inc/IDocumentStatistics.hxx60
-rw-r--r--sw/inc/IDocumentStylePoolAccess.hxx87
-rw-r--r--sw/inc/IDocumentTimerAccess.hxx60
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx283
-rw-r--r--sw/inc/IGrammarContact.hxx87
-rw-r--r--sw/inc/IInterface.hxx67
-rw-r--r--sw/inc/IMark.hxx119
-rw-r--r--sw/inc/IShellCursorSupplier.hxx51
-rw-r--r--sw/inc/PostItMgr.hxx307
-rw-r--r--sw/inc/RefreshListenerContainer.hxx38
-rw-r--r--sw/inc/SidebarWin.hxx274
-rw-r--r--sw/inc/SidebarWindowsTypes.hxx53
-rw-r--r--sw/inc/SwAppletImpl.hxx79
-rw-r--r--sw/inc/SwCapObjType.hxx35
-rw-r--r--sw/inc/SwGetPoolIdFromName.hxx44
-rw-r--r--sw/inc/SwNodeNum.hxx118
-rw-r--r--sw/inc/SwNumberTree.hxx767
-rw-r--r--sw/inc/SwNumberTreeTypes.hxx39
-rw-r--r--sw/inc/SwRewriter.hxx56
-rw-r--r--sw/inc/SwSmartTagMgr.hxx65
-rw-r--r--sw/inc/SwStyleNameMapper.hxx204
-rw-r--r--sw/inc/SwUndoField.hxx93
-rw-r--r--sw/inc/SwXMLSectionList.hxx89
-rw-r--r--sw/inc/TextCursorHelper.hxx54
-rw-r--r--sw/inc/access.hrc75
-rw-r--r--sw/inc/accessibilityoptions.hxx53
-rw-r--r--sw/inc/accmap.hxx329
-rw-r--r--sw/inc/acmplwrd.hxx73
-rw-r--r--sw/inc/anchoreddrawobject.hxx223
-rw-r--r--sw/inc/anchoredobject.hxx642
-rw-r--r--sw/inc/authfld.hxx207
-rw-r--r--sw/inc/authratr.hxx54
-rw-r--r--sw/inc/bparr.hxx126
-rw-r--r--sw/inc/breakit.hxx122
-rw-r--r--sw/inc/calbck.hxx260
-rw-r--r--sw/inc/calc.hxx243
-rw-r--r--sw/inc/ccoll.hxx100
-rw-r--r--sw/inc/cellatr.hxx129
-rw-r--r--sw/inc/cellfml.hxx164
-rw-r--r--sw/inc/charatr.hxx178
-rw-r--r--sw/inc/charfmt.hxx61
-rw-r--r--sw/inc/chcmprse.hxx40
-rw-r--r--sw/inc/checkit.hxx54
-rw-r--r--sw/inc/chpfld.hxx103
-rw-r--r--sw/inc/chrdlg.hrc60
-rw-r--r--sw/inc/cmdid.h1316
-rw-r--r--sw/inc/colwd.hxx62
-rw-r--r--sw/inc/comcore.hrc123
-rw-r--r--sw/inc/crsrsh.hxx962
-rw-r--r--sw/inc/crsskip.hxx42
-rw-r--r--sw/inc/crstate.hxx217
-rw-r--r--sw/inc/cshtyp.hxx119
-rw-r--r--sw/inc/dbfld.hxx338
-rw-r--r--sw/inc/dbgoutsw.hxx127
-rw-r--r--sw/inc/dbmgr.hxx398
-rw-r--r--sw/inc/dbui.hrc126
-rw-r--r--sw/inc/dcontact.hxx549
-rw-r--r--sw/inc/ddefld.hxx118
-rw-r--r--sw/inc/dialog.hrc89
-rw-r--r--sw/inc/dlelstnr.hxx95
-rw-r--r--sw/inc/dobjfac.hxx47
-rw-r--r--sw/inc/doc.hxx2179
-rw-r--r--sw/inc/docary.hxx125
-rw-r--r--sw/inc/docfac.hxx48
-rw-r--r--sw/inc/dochdl.hrc54
-rw-r--r--sw/inc/docsh.hxx320
-rw-r--r--sw/inc/docstat.hxx52
-rw-r--r--sw/inc/docstyle.hxx245
-rw-r--r--sw/inc/docufld.hxx839
-rw-r--r--sw/inc/dpage.hxx64
-rw-r--r--sw/inc/drawdoc.hxx65
-rw-r--r--sw/inc/edglbldc.hxx77
-rw-r--r--sw/inc/edimp.hxx83
-rw-r--r--sw/inc/editsh.hxx974
-rw-r--r--sw/inc/envelp.hrc97
-rw-r--r--sw/inc/errhdl.hxx76
-rw-r--r--sw/inc/error.h50
-rw-r--r--sw/inc/expfld.hxx444
-rw-r--r--sw/inc/extinput.hxx59
-rw-r--r--sw/inc/fchrfmt.hxx84
-rw-r--r--sw/inc/fesh.hxx802
-rw-r--r--sw/inc/fldbas.hxx462
-rw-r--r--sw/inc/flddat.hxx148
-rw-r--r--sw/inc/flddropdown.hxx274
-rw-r--r--sw/inc/fldinit.hxx38
-rw-r--r--sw/inc/fldui.hrc292
-rw-r--r--sw/inc/fldupde.hxx39
-rw-r--r--sw/inc/flyenum.hxx55
-rw-r--r--sw/inc/flypos.hxx60
-rw-r--r--sw/inc/fmtanchr.hxx92
-rw-r--r--sw/inc/fmtautofmt.hxx75
-rw-r--r--sw/inc/fmtclbl.hxx54
-rw-r--r--sw/inc/fmtclds.hxx179
-rw-r--r--sw/inc/fmtcnct.hxx87
-rw-r--r--sw/inc/fmtcntnt.hxx66
-rw-r--r--sw/inc/fmtcol.hxx303
-rw-r--r--sw/inc/fmtcolfunc.hxx89
-rw-r--r--sw/inc/fmteiro.hxx60
-rw-r--r--sw/inc/fmtflcnt.hxx64
-rw-r--r--sw/inc/fmtfld.hxx125
-rw-r--r--sw/inc/fmtfollowtextflow.hxx66
-rw-r--r--sw/inc/fmtfordr.hxx72
-rw-r--r--sw/inc/fmtfsize.hxx113
-rw-r--r--sw/inc/fmtftn.hxx81
-rw-r--r--sw/inc/fmtftntx.hxx137
-rw-r--r--sw/inc/fmthdft.hxx117
-rw-r--r--sw/inc/fmtinfmt.hxx110
-rw-r--r--sw/inc/fmtline.hxx71
-rw-r--r--sw/inc/fmtlsplt.hxx58
-rwxr-xr-xsw/inc/fmtmeta.hxx228
-rw-r--r--sw/inc/fmtornt.hxx143
-rw-r--r--sw/inc/fmtpdsc.hxx104
-rw-r--r--sw/inc/fmtrfmrk.hxx64
-rw-r--r--sw/inc/fmtrowsplt.hxx58
-rw-r--r--sw/inc/fmtruby.hxx91
-rw-r--r--sw/inc/fmtsrnd.hxx93
-rw-r--r--sw/inc/fmtsrndenum.hxx41
-rw-r--r--sw/inc/fmtui.hrc89
-rw-r--r--sw/inc/fmturl.hxx92
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx77
-rw-r--r--sw/inc/format.hxx355
-rw-r--r--sw/inc/frmatr.hxx99
-rw-r--r--sw/inc/frmfmt.hxx329
-rw-r--r--sw/inc/ftnidx.hxx79
-rw-r--r--sw/inc/ftninfo.hxx116
-rw-r--r--sw/inc/globals.hrc290
-rw-r--r--sw/inc/globdoc.hxx53
-rw-r--r--sw/inc/grfatr.hxx370
-rw-r--r--sw/inc/helpid.h992
-rw-r--r--sw/inc/hfspacingitem.hxx59
-rw-r--r--sw/inc/hhcwrp.hxx121
-rw-r--r--sw/inc/hintids.hxx486
-rw-r--r--sw/inc/hints.hxx284
-rw-r--r--sw/inc/htmltbl.hxx491
-rw-r--r--sw/inc/index.hrc66
-rw-r--r--sw/inc/index.hxx217
-rw-r--r--sw/inc/inetfld.hxx110
-rw-r--r--sw/inc/init.hxx48
-rw-r--r--sw/inc/io.hxx176
-rw-r--r--sw/inc/iodetect.hxx127
-rw-r--r--sw/inc/istyleaccess.hxx69
-rw-r--r--sw/inc/itabenum.hxx54
-rw-r--r--sw/inc/lineinfo.hxx108
-rw-r--r--sw/inc/linkenum.hxx39
-rw-r--r--sw/inc/list.hxx74
-rw-r--r--sw/inc/listfunc.hxx38
-rw-r--r--sw/inc/mdiexp.hxx78
-rw-r--r--sw/inc/modcfg.hxx343
-rw-r--r--sw/inc/modeltoviewhelper.hxx111
-rw-r--r--sw/inc/ndarr.hxx347
-rw-r--r--sw/inc/ndgrf.hxx257
-rw-r--r--sw/inc/ndhints.hxx229
-rw-r--r--sw/inc/ndindex.hxx243
-rw-r--r--sw/inc/ndnotxt.hxx121
-rw-r--r--sw/inc/ndole.hxx170
-rw-r--r--sw/inc/ndtxt.hxx914
-rw-r--r--sw/inc/ndtyp.hxx69
-rw-r--r--sw/inc/newhdl.hxx73
-rw-r--r--sw/inc/node.hxx768
-rw-r--r--sw/inc/numrule.hxx368
-rw-r--r--sw/inc/pagedesc.hxx349
-rw-r--r--sw/inc/pageiter.hxx53
-rw-r--r--sw/inc/pagepreviewlayout.hxx621
-rw-r--r--sw/inc/pam.hxx280
-rw-r--r--sw/inc/paratr.hxx281
-rw-r--r--sw/inc/pausethreadstarting.hxx48
-rw-r--r--sw/inc/pch/precompiled_sw.cxx29
-rwxr-xr-xsw/inc/pch/precompiled_sw.hxx1002
-rw-r--r--sw/inc/poolfmt.awk86
-rw-r--r--sw/inc/poolfmt.hrc288
-rw-r--r--sw/inc/poolfmt.hxx443
-rw-r--r--sw/inc/postithelper.hxx159
-rw-r--r--sw/inc/printdata.hxx336
-rw-r--r--sw/inc/prtopt.hxx55
-rw-r--r--sw/inc/pvprtdat.hxx79
-rw-r--r--sw/inc/rcid.hrc271
-rw-r--r--sw/inc/redline.hxx314
-rw-r--r--sw/inc/redlnaut.hxx54
-rw-r--r--sw/inc/reffld.hxx164
-rw-r--r--sw/inc/ring.hxx53
-rw-r--r--sw/inc/rubylist.hxx54
-rw-r--r--sw/inc/section.hxx389
-rw-r--r--sw/inc/shellid.hxx73
-rw-r--r--sw/inc/shellio.hxx678
-rw-r--r--sw/inc/shellres.hxx120
-rw-r--r--sw/inc/sortopt.hxx69
-rw-r--r--sw/inc/splargs.hxx180
-rw-r--r--sw/inc/statstr.hrc54
-rw-r--r--sw/inc/stringhash.hxx104
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx46
-rw-r--r--sw/inc/swabstdlg.hxx498
-rw-r--r--sw/inc/swacorr.hxx59
-rw-r--r--sw/inc/swatrset.hxx353
-rw-r--r--sw/inc/swbaslnk.hxx95
-rw-r--r--sw/inc/swcalwrp.hxx55
-rw-r--r--sw/inc/swcli.hxx60
-rw-r--r--sw/inc/swcommands.h434
-rw-r--r--sw/inc/swcrsr.hxx308
-rw-r--r--sw/inc/swdbdata.hxx49
-rw-r--r--sw/inc/swdbtoolsclient.hxx76
-rw-r--r--sw/inc/swddetbl.hxx63
-rw-r--r--sw/inc/swdll.hxx69
-rw-r--r--sw/inc/swdllapi.h13
-rw-r--r--sw/inc/swerror.h112
-rw-r--r--sw/inc/swevent.hxx129
-rw-r--r--sw/inc/swfltopt.hxx44
-rw-r--r--sw/inc/swgstr.hxx148
-rw-r--r--sw/inc/swhints.hxx36
-rwxr-xr-xsw/inc/switerator.hxx47
-rw-r--r--sw/inc/swmodule.hxx278
-rw-r--r--sw/inc/swrect.hxx364
-rw-r--r--sw/inc/swregion.hxx57
-rw-r--r--sw/inc/swserv.hxx93
-rw-r--r--sw/inc/swstyle.h41
-rw-r--r--sw/inc/swtable.hxx494
-rw-r--r--sw/inc/swtblfmt.hxx99
-rw-r--r--sw/inc/swtypes.hxx340
-rw-r--r--sw/inc/swundo.hxx186
-rw-r--r--sw/inc/swunodef.hxx36
-rw-r--r--sw/inc/swunohelper.hxx81
-rw-r--r--sw/inc/swurl.hxx46
-rw-r--r--sw/inc/swwait.hxx44
-rw-r--r--sw/inc/tabcol.hxx107
-rw-r--r--sw/inc/tblafmt.hxx270
-rw-r--r--sw/inc/tblenum.hxx79
-rw-r--r--sw/inc/tblsel.hxx230
-rw-r--r--sw/inc/tgrditem.hxx120
-rw-r--r--sw/inc/tox.hxx797
-rw-r--r--sw/inc/toxe.hxx125
-rw-r--r--sw/inc/toxinit.hxx37
-rw-r--r--sw/inc/toxwrap.hxx77
-rw-r--r--sw/inc/txatbase.hxx244
-rw-r--r--sw/inc/txatritr.hxx99
-rw-r--r--sw/inc/txtatr.hxx129
-rw-r--r--sw/inc/txtflcnt.hxx68
-rw-r--r--sw/inc/txtfld.hxx80
-rw-r--r--sw/inc/txtftn.hxx82
-rw-r--r--sw/inc/txtinet.hxx82
-rw-r--r--sw/inc/txtrfmrk.hxx61
-rw-r--r--sw/inc/txttxmrk.hxx66
-rw-r--r--sw/inc/undobj.hxx335
-rw-r--r--sw/inc/unoatxt.hxx306
-rw-r--r--sw/inc/unobaseclass.hxx174
-rw-r--r--sw/inc/unobookmark.hxx261
-rw-r--r--sw/inc/unochart.hxx432
-rw-r--r--sw/inc/unocoll.hxx581
-rw-r--r--sw/inc/unocore.hrc48
-rw-r--r--sw/inc/unocrsr.hxx115
-rw-r--r--sw/inc/unocrsrhelper.hxx218
-rw-r--r--sw/inc/unodraw.hxx353
-rw-r--r--sw/inc/unoevent.hxx118
-rw-r--r--sw/inc/unoevtlstnr.hxx58
-rw-r--r--sw/inc/unofield.hxx321
-rw-r--r--sw/inc/unoflatpara.hxx146
-rw-r--r--sw/inc/unofootnote.hxx229
-rw-r--r--sw/inc/unoframe.hxx370
-rw-r--r--sw/inc/unoidx.hxx375
-rw-r--r--sw/inc/unomailmerge.hxx206
-rw-r--r--sw/inc/unomap.hxx351
-rw-r--r--sw/inc/unomid.h157
-rw-r--r--sw/inc/unomod.hxx210
-rw-r--r--sw/inc/unoparaframeenum.hxx127
-rw-r--r--sw/inc/unoparagraph.hxx365
-rw-r--r--sw/inc/unoport.hxx322
-rw-r--r--sw/inc/unoprnms.hxx842
-rw-r--r--sw/inc/unoredline.hxx156
-rw-r--r--sw/inc/unoredlines.hxx105
-rw-r--r--sw/inc/unorefmark.hxx174
-rw-r--r--sw/inc/unosection.hxx255
-rw-r--r--sw/inc/unosett.hxx327
-rw-r--r--sw/inc/unosrch.hxx136
-rw-r--r--sw/inc/unostyle.hxx472
-rw-r--r--sw/inc/unotbl.hxx623
-rw-r--r--sw/inc/unotext.hxx346
-rw-r--r--sw/inc/unotextbodyhf.hxx210
-rw-r--r--sw/inc/unotextcursor.hxx347
-rw-r--r--sw/inc/unotextmarkup.hxx110
-rw-r--r--sw/inc/unotextrange.hxx338
-rw-r--r--sw/inc/unotxdoc.hxx611
-rw-r--r--sw/inc/usrfld.hxx134
-rw-r--r--sw/inc/viewopt.hxx615
-rw-r--r--sw/inc/viewsh.hxx645
-rw-r--r--sw/inc/viscrs.hxx223
-rw-r--r--sw/inc/wdocsh.hxx63
-rw-r--r--sw/prj/build.lst2
-rw-r--r--sw/prj/d.lst0
-rw-r--r--sw/prj/makefile.mk40
-rw-r--r--sw/qa/complex/accessibility/AccessibleRelationSet.java217
-rw-r--r--sw/qa/complex/accessibility/makefile.mk50
-rwxr-xr-xsw/qa/complex/checkColor/CheckChangeColor.java89
-rw-r--r--sw/qa/complex/checkColor/makefile.mk50
-rwxr-xr-xsw/qa/complex/indeterminateState/CheckIndeterminateState.java125
-rw-r--r--sw/qa/complex/writer/CheckBookmarks.java262
-rw-r--r--sw/qa/complex/writer/CheckCrossReferences.java291
-rw-r--r--sw/qa/complex/writer/CheckFlies.java222
-rwxr-xr-xsw/qa/complex/writer/CheckIndexedPropertyValues.java116
-rwxr-xr-xsw/qa/complex/writer/CheckNamedPropertyValues.java122
-rw-r--r--sw/qa/complex/writer/LoadSaveTest.java254
-rw-r--r--sw/qa/complex/writer/TestDocument.java40
-rwxr-xr-xsw/qa/complex/writer/TextPortionEnumerationTest.java4164
-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/complex/writer/testdocuments/TESTXMLID.odtbin0 -> 10879 bytes-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx877
-rw-r--r--sw/qa/core/bigpointerarray-new.cxx110
-rw-r--r--sw/qa/core/bigpointerarray-new.hxx159
-rw-r--r--sw/qa/core/export.exp1
-rw-r--r--sw/qa/core/export.map34
-rw-r--r--sw/qa/core/performance-jobfile9
-rw-r--r--sw/qa/unoapi/Test.java52
-rw-r--r--sw/qa/unoapi/knownissues.xcl186
-rw-r--r--sw/qa/unoapi/makefile.mk48
-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.sdi385
-rw-r--r--sw/sdi/_basesh.sdi525
-rw-r--r--sw/sdi/_beziers.sdi128
-rw-r--r--sw/sdi/_docsh.sdi131
-rw-r--r--sw/sdi/_drwbase.sdi139
-rw-r--r--sw/sdi/_formsh.sdi44
-rw-r--r--sw/sdi/_frmsh.sdi305
-rw-r--r--sw/sdi/_grfsh.sdi216
-rw-r--r--sw/sdi/_listsh.sdi111
-rw-r--r--sw/sdi/_mediash.sdi51
-rw-r--r--sw/sdi/_olesh.sdi35
-rw-r--r--sw/sdi/_tabsh.sdi409
-rw-r--r--sw/sdi/_textsh.sdi1610
-rw-r--r--sw/sdi/_viewsh.sdi784
-rwxr-xr-xsw/sdi/annotsh.sdi380
-rw-r--r--sw/sdi/basesh.sdi64
-rw-r--r--sw/sdi/beziersh.sdi135
-rw-r--r--sw/sdi/docsh.sdi83
-rw-r--r--sw/sdi/drawsh.sdi477
-rw-r--r--sw/sdi/drwbassh.sdi47
-rw-r--r--sw/sdi/drwtxtsh.sdi659
-rw-r--r--sw/sdi/formsh.sdi40
-rw-r--r--sw/sdi/frmsh.sdi56
-rw-r--r--sw/sdi/grfsh.sdi44
-rw-r--r--sw/sdi/listsh.sdi43
-rw-r--r--sw/sdi/mediash.sdi42
-rw-r--r--sw/sdi/olesh.sdi41
-rw-r--r--sw/sdi/swinterf.c249
-rw-r--r--sw/sdi/switems.sdi82
-rw-r--r--sw/sdi/swpatch.txt21
-rw-r--r--sw/sdi/swriter.sdi10268
-rw-r--r--sw/sdi/swslots.hrc33
-rw-r--r--sw/sdi/swslots.sdi125
-rw-r--r--sw/sdi/tabsh.sdi67
-rw-r--r--sw/sdi/textsh.sdi124
-rw-r--r--sw/sdi/viewsh.sdi326
-rw-r--r--sw/sdi/wbasesh.sdi44
-rw-r--r--sw/sdi/wbeziers.sdi38
-rw-r--r--sw/sdi/wdocsh.sdi60
-rw-r--r--sw/sdi/wdrwbase.sdi49
-rw-r--r--sw/sdi/wformsh.sdi40
-rw-r--r--sw/sdi/wfrmsh.sdi44
-rw-r--r--sw/sdi/wgrfsh.sdi43
-rw-r--r--sw/sdi/wlistsh.sdi41
-rw-r--r--sw/sdi/wolesh.sdi43
-rw-r--r--sw/sdi/wrtapp.sdi90
-rw-r--r--sw/sdi/wtabsh.sdi40
-rw-r--r--sw/sdi/wtextsh.sdi49
-rw-r--r--sw/sdi/wviewsh.sdi203
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx534
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx1409
-rw-r--r--sw/source/core/access/acccell.cxx375
-rw-r--r--sw/source/core/access/acccell.hxx137
-rw-r--r--sw/source/core/access/acccontext.cxx1604
-rw-r--r--sw/source/core/access/acccontext.hxx459
-rw-r--r--sw/source/core/access/accdoc.cxx515
-rw-r--r--sw/source/core/access/accdoc.hxx213
-rw-r--r--sw/source/core/access/accembedded.cxx97
-rw-r--r--sw/source/core/access/accembedded.hxx69
-rw-r--r--sw/source/core/access/accfootnote.cxx157
-rw-r--r--sw/source/core/access/accfootnote.hxx88
-rw-r--r--sw/source/core/access/accframe.cxx497
-rw-r--r--sw/source/core/access/accframe.hxx175
-rw-r--r--sw/source/core/access/accframebase.cxx279
-rw-r--r--sw/source/core/access/accframebase.hxx71
-rw-r--r--sw/source/core/access/accfrmobj.cxx428
-rw-r--r--sw/source/core/access/accfrmobj.hxx95
-rw-r--r--sw/source/core/access/accfrmobjmap.cxx168
-rw-r--r--sw/source/core/access/accfrmobjmap.hxx96
-rw-r--r--sw/source/core/access/accfrmobjslist.cxx173
-rw-r--r--sw/source/core/access/accfrmobjslist.hxx145
-rw-r--r--sw/source/core/access/accgraphic.cxx97
-rw-r--r--sw/source/core/access/accgraphic.hxx69
-rw-r--r--sw/source/core/access/accheaderfooter.cxx145
-rw-r--r--sw/source/core/access/accheaderfooter.hxx85
-rw-r--r--sw/source/core/access/acchyperlink.cxx190
-rw-r--r--sw/source/core/access/acchyperlink.hxx91
-rw-r--r--sw/source/core/access/acchypertextdata.cxx55
-rw-r--r--sw/source/core/access/acchypertextdata.hxx51
-rw-r--r--sw/source/core/access/accmap.cxx2878
-rw-r--r--sw/source/core/access/accnotextframe.cxx275
-rw-r--r--sw/source/core/access/accnotextframe.hxx110
-rw-r--r--sw/source/core/access/accpage.cxx200
-rw-r--r--sw/source/core/access/accpage.hxx99
-rw-r--r--sw/source/core/access/accpara.cxx2678
-rw-r--r--sw/source/core/access/accpara.hxx447
-rw-r--r--sw/source/core/access/accportions.cxx753
-rw-r--r--sw/source/core/access/accportions.hxx175
-rw-r--r--sw/source/core/access/accpreview.cxx104
-rw-r--r--sw/source/core/access/accpreview.hxx76
-rw-r--r--sw/source/core/access/accselectionhelper.cxx334
-rw-r--r--sw/source/core/access/accselectionhelper.hxx81
-rw-r--r--sw/source/core/access/acctable.cxx1804
-rw-r--r--sw/source/core/access/acctable.hxx331
-rw-r--r--sw/source/core/access/acctextframe.cxx278
-rw-r--r--sw/source/core/access/acctextframe.hxx114
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx231
-rw-r--r--sw/source/core/access/parachangetrackinginfo.hxx59
-rw-r--r--sw/source/core/access/textmarkuphelper.cxx231
-rw-r--r--sw/source/core/access/textmarkuphelper.hxx87
-rw-r--r--sw/source/core/attr/calbck.cxx564
-rw-r--r--sw/source/core/attr/cellatr.cxx266
-rw-r--r--sw/source/core/attr/fmtfollowtextflow.cxx37
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx166
-rw-r--r--sw/source/core/attr/format.cxx692
-rw-r--r--sw/source/core/attr/hints.cxx308
-rw-r--r--sw/source/core/attr/swatrset.cxx404
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx95
-rw-r--r--sw/source/core/bastyp/bparr.cxx580
-rw-r--r--sw/source/core/bastyp/breakit.cxx186
-rw-r--r--sw/source/core/bastyp/calc.cxx1826
-rw-r--r--sw/source/core/bastyp/checkit.cxx51
-rw-r--r--sw/source/core/bastyp/index.cxx593
-rw-r--r--sw/source/core/bastyp/init.cxx918
-rw-r--r--sw/source/core/bastyp/ring.cxx125
-rw-r--r--sw/source/core/bastyp/swcache.cxx656
-rw-r--r--sw/source/core/bastyp/swrect.cxx336
-rw-r--r--sw/source/core/bastyp/swregion.cxx254
-rw-r--r--sw/source/core/bastyp/swtypes.cxx134
-rw-r--r--sw/source/core/bastyp/tabcol.cxx142
-rw-r--r--sw/source/core/crsr/BlockCursor.cxx106
-rw-r--r--sw/source/core/crsr/BlockCursor.hxx36
-rw-r--r--sw/source/core/crsr/IBlockCursor.hxx95
-rw-r--r--sw/source/core/crsr/bookmrk.cxx348
-rw-r--r--sw/source/core/crsr/callnk.cxx225
-rw-r--r--sw/source/core/crsr/callnk.hxx57
-rw-r--r--sw/source/core/crsr/crbm.cxx260
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx102
-rw-r--r--sw/source/core/crsr/crsrsh.cxx3512
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2212
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx105
-rw-r--r--sw/source/core/crsr/findattr.cxx1314
-rw-r--r--sw/source/core/crsr/findcoll.cxx122
-rw-r--r--sw/source/core/crsr/findfmt.cxx84
-rw-r--r--sw/source/core/crsr/findtxt.cxx715
-rw-r--r--sw/source/core/crsr/pam.cxx1246
-rw-r--r--sw/source/core/crsr/paminit.cxx131
-rwxr-xr-xsw/source/core/crsr/swcrsr.cxx2356
-rw-r--r--sw/source/core/crsr/trvlcol.cxx133
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx359
-rw-r--r--sw/source/core/crsr/trvlreg.cxx291
-rw-r--r--sw/source/core/crsr/trvltbl.cxx931
-rw-r--r--sw/source/core/crsr/unocrsr.cxx272
-rw-r--r--sw/source/core/crsr/viscrs.cxx1006
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx1142
-rw-r--r--sw/source/core/doc/acmplwrd.cxx474
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx1040
-rw-r--r--sw/source/core/doc/doc.cxx2776
-rw-r--r--sw/source/core/doc/docbasic.cxx276
-rw-r--r--sw/source/core/doc/docbm.cxx1746
-rw-r--r--sw/source/core/doc/docchart.cxx277
-rw-r--r--sw/source/core/doc/doccomp.cxx1883
-rw-r--r--sw/source/core/doc/doccorr.cxx358
-rw-r--r--sw/source/core/doc/docdde.cxx418
-rw-r--r--sw/source/core/doc/docdesc.cxx946
-rw-r--r--sw/source/core/doc/docdraw.cxx1103
-rw-r--r--sw/source/core/doc/docedt.cxx2839
-rw-r--r--sw/source/core/doc/docfld.cxx2824
-rw-r--r--sw/source/core/doc/docfly.cxx1021
-rw-r--r--sw/source/core/doc/docfmt.cxx2678
-rw-r--r--sw/source/core/doc/docftn.cxx531
-rw-r--r--sw/source/core/doc/docglbl.cxx855
-rw-r--r--sw/source/core/doc/docglos.cxx203
-rw-r--r--sw/source/core/doc/doclay.cxx2440
-rw-r--r--sw/source/core/doc/docnew.cxx1269
-rw-r--r--sw/source/core/doc/docnum.cxx2953
-rw-r--r--sw/source/core/doc/docredln.cxx3868
-rw-r--r--sw/source/core/doc/docruby.cxx361
-rw-r--r--sw/source/core/doc/docsort.cxx1036
-rw-r--r--sw/source/core/doc/docstat.cxx67
-rw-r--r--sw/source/core/doc/doctxm.cxx2441
-rw-r--r--sw/source/core/doc/docxforms.cxx123
-rw-r--r--sw/source/core/doc/extinput.cxx300
-rw-r--r--sw/source/core/doc/fmtcol.cxx716
-rw-r--r--sw/source/core/doc/ftnidx.cxx399
-rw-r--r--sw/source/core/doc/gctable.cxx451
-rw-r--r--sw/source/core/doc/htmltbl.cxx1897
-rw-r--r--sw/source/core/doc/lineinfo.cxx159
-rw-r--r--sw/source/core/doc/list.cxx303
-rw-r--r--sw/source/core/doc/notxtfrm.cxx1098
-rw-r--r--sw/source/core/doc/number.cxx1694
-rw-r--r--sw/source/core/doc/poolfmt.cxx2591
-rw-r--r--sw/source/core/doc/sortopt.cxx103
-rw-r--r--sw/source/core/doc/swserv.cxx371
-rw-r--r--sw/source/core/doc/swstylemanager.cxx173
-rw-r--r--sw/source/core/doc/swstylemanager.hxx38
-rwxr-xr-xsw/source/core/doc/tblafmt.cxx1106
-rw-r--r--sw/source/core/doc/tblcpy.cxx1099
-rw-r--r--sw/source/core/doc/tblrwcl.cxx4763
-rw-r--r--sw/source/core/doc/visiturl.cxx139
-rw-r--r--sw/source/core/docnode/cancellablejob.cxx40
-rw-r--r--sw/source/core/docnode/cancellablejob.hxx53
-rw-r--r--sw/source/core/docnode/finalthreadmanager.cxx549
-rw-r--r--sw/source/core/docnode/ndcopy.cxx1620
-rw-r--r--sw/source/core/docnode/ndindex.cxx168
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx307
-rw-r--r--sw/source/core/docnode/ndnum.cxx225
-rw-r--r--sw/source/core/docnode/ndsect.cxx1483
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4683
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx1597
-rw-r--r--sw/source/core/docnode/node.cxx2081
-rw-r--r--sw/source/core/docnode/node2lay.cxx472
-rw-r--r--sw/source/core/docnode/nodes.cxx2627
-rw-r--r--sw/source/core/docnode/observablethread.cxx97
-rw-r--r--sw/source/core/docnode/pausethreadstarting.cxx55
-rw-r--r--sw/source/core/docnode/retrievedinputstreamdata.cxx167
-rw-r--r--sw/source/core/docnode/retrieveinputstream.cxx86
-rw-r--r--sw/source/core/docnode/retrieveinputstreamconsumer.cxx72
-rw-r--r--sw/source/core/docnode/section.cxx1809
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx503
-rw-r--r--sw/source/core/docnode/swthreadjoiner.cxx61
-rw-r--r--sw/source/core/docnode/swthreadmanager.cxx87
-rw-r--r--sw/source/core/docnode/threadlistener.cxx57
-rw-r--r--sw/source/core/docnode/threadmanager.cxx258
-rw-r--r--sw/source/core/draw/dcontact.cxx2793
-rw-r--r--sw/source/core/draw/dflyobj.cxx981
-rw-r--r--sw/source/core/draw/dobjfac.cxx57
-rw-r--r--sw/source/core/draw/dpage.cxx265
-rw-r--r--sw/source/core/draw/drawdoc.cxx240
-rw-r--r--sw/source/core/draw/dview.cxx1115
-rwxr-xr-xsw/source/core/edit/acorrect.cxx548
-rw-r--r--sw/source/core/edit/autofmt.cxx2798
-rw-r--r--sw/source/core/edit/edatmisc.cxx195
-rw-r--r--sw/source/core/edit/edattr.cxx646
-rw-r--r--sw/source/core/edit/eddel.cxx356
-rw-r--r--sw/source/core/edit/edfcol.cxx162
-rw-r--r--sw/source/core/edit/edfld.cxx564
-rw-r--r--sw/source/core/edit/edfldexp.cxx97
-rw-r--r--sw/source/core/edit/edfmt.cxx197
-rw-r--r--sw/source/core/edit/edglbldc.cxx410
-rw-r--r--sw/source/core/edit/edglss.cxx373
-rw-r--r--sw/source/core/edit/editsh.cxx1204
-rw-r--r--sw/source/core/edit/edlingu.cxx1974
-rw-r--r--sw/source/core/edit/ednumber.cxx833
-rw-r--r--sw/source/core/edit/edredln.cxx150
-rw-r--r--sw/source/core/edit/edsect.cxx455
-rw-r--r--sw/source/core/edit/edtab.cxx493
-rw-r--r--sw/source/core/edit/edtox.cxx487
-rw-r--r--sw/source/core/edit/edundo.cxx258
-rw-r--r--sw/source/core/edit/edws.cxx365
-rw-r--r--sw/source/core/except/dbgloop.cxx168
-rw-r--r--sw/source/core/except/errhdl.cxx136
-rw-r--r--sw/source/core/fields/authfld.cxx756
-rw-r--r--sw/source/core/fields/cellfml.cxx1216
-rw-r--r--sw/source/core/fields/chpfld.cxx309
-rw-r--r--sw/source/core/fields/dbfld.cxx1013
-rw-r--r--sw/source/core/fields/ddefld.cxx448
-rw-r--r--sw/source/core/fields/ddetbl.cxx197
-rw-r--r--sw/source/core/fields/docufld.cxx2720
-rw-r--r--sw/source/core/fields/expfld.cxx1301
-rw-r--r--sw/source/core/fields/fldbas.cxx808
-rw-r--r--sw/source/core/fields/flddat.cxx321
-rw-r--r--sw/source/core/fields/flddropdown.cxx284
-rw-r--r--sw/source/core/fields/fldlst.cxx230
-rw-r--r--sw/source/core/fields/macrofld.cxx261
-rw-r--r--sw/source/core/fields/postithelper.cxx222
-rw-r--r--sw/source/core/fields/reffld.cxx1072
-rw-r--r--sw/source/core/fields/scrptfld.cxx153
-rw-r--r--sw/source/core/fields/tblcalc.cxx249
-rwxr-xr-xsw/source/core/fields/textapi.cxx191
-rw-r--r--sw/source/core/fields/usrfld.cxx377
-rw-r--r--sw/source/core/frmedt/fecopy.cxx1554
-rw-r--r--sw/source/core/frmedt/fedesc.cxx293
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2283
-rw-r--r--sw/source/core/frmedt/feflyole.cxx150
-rw-r--r--sw/source/core/frmedt/feshview.cxx3132
-rw-r--r--sw/source/core/frmedt/fetab.cxx2593
-rw-r--r--sw/source/core/frmedt/fews.cxx1396
-rw-r--r--sw/source/core/frmedt/tblsel.cxx2707
-rw-r--r--sw/source/core/graphic/grfatr.cxx366
-rw-r--r--sw/source/core/graphic/ndgrf.cxx1221
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx54
-rw-r--r--sw/source/core/inc/MarkManager.hxx97
-rw-r--r--sw/source/core/inc/SwGrammarMarkUp.hxx74
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx101
-rw-r--r--sw/source/core/inc/SwUndoFmt.hxx253
-rw-r--r--sw/source/core/inc/SwUndoPageDesc.hxx93
-rw-r--r--sw/source/core/inc/SwUndoTOXChange.hxx49
-rw-r--r--sw/source/core/inc/SwXMLBlockExport.hxx73
-rw-r--r--sw/source/core/inc/SwXMLBlockImport.hxx89
-rw-r--r--sw/source/core/inc/SwXMLBlockListContext.hxx126
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx111
-rw-r--r--sw/source/core/inc/SwXTextDefaults.hxx84
-rw-r--r--sw/source/core/inc/UndoAttribute.hxx288
-rw-r--r--sw/source/core/inc/UndoBookmark.hxx83
-rw-r--r--sw/source/core/inc/UndoCore.hxx266
-rw-r--r--sw/source/core/inc/UndoDelete.hxx115
-rw-r--r--sw/source/core/inc/UndoDraw.hxx150
-rw-r--r--sw/source/core/inc/UndoInsert.hxx235
-rw-r--r--sw/source/core/inc/UndoManager.hxx124
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx154
-rw-r--r--sw/source/core/inc/UndoOverwrite.hxx105
-rw-r--r--sw/source/core/inc/UndoRedline.hxx145
-rw-r--r--sw/source/core/inc/UndoSection.hxx82
-rw-r--r--sw/source/core/inc/UndoSort.hxx97
-rw-r--r--sw/source/core/inc/UndoSplitMove.hxx96
-rw-r--r--sw/source/core/inc/UndoTable.hxx391
-rwxr-xr-xsw/source/core/inc/acorrect.hxx123
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx496
-rw-r--r--sw/source/core/inc/ascharanchoredobjectposition.hxx171
-rw-r--r--sw/source/core/inc/attrhint.hxx44
-rw-r--r--sw/source/core/inc/blink.hxx89
-rw-r--r--sw/source/core/inc/bodyfrm.hxx49
-rw-r--r--sw/source/core/inc/bookmrk.hxx260
-rw-r--r--sw/source/core/inc/cellfrm.hxx72
-rw-r--r--sw/source/core/inc/cntfrm.hxx150
-rw-r--r--sw/source/core/inc/colfrm.hxx42
-rw-r--r--sw/source/core/inc/crossrefbookmark.hxx99
-rw-r--r--sw/source/core/inc/dbg_lay.hxx120
-rw-r--r--sw/source/core/inc/dbgloop.hxx77
-rw-r--r--sw/source/core/inc/dflyobj.hxx140
-rw-r--r--sw/source/core/inc/docfld.hxx193
-rw-r--r--sw/source/core/inc/docsort.hxx176
-rw-r--r--sw/source/core/inc/doctxm.hxx147
-rw-r--r--sw/source/core/inc/drawdev.hxx140
-rw-r--r--sw/source/core/inc/drawfont.hxx594
-rw-r--r--sw/source/core/inc/dview.hxx134
-rw-r--r--sw/source/core/inc/environmentofanchoredobject.hxx117
-rw-r--r--sw/source/core/inc/fieldhint.hxx44
-rw-r--r--sw/source/core/inc/finalthreadmanager.hxx105
-rw-r--r--sw/source/core/inc/flowfrm.hxx273
-rw-r--r--sw/source/core/inc/flyfrm.hxx297
-rw-r--r--sw/source/core/inc/flyfrms.hxx257
-rw-r--r--sw/source/core/inc/fntcache.hxx160
-rw-r--r--sw/source/core/inc/frame.hxx1302
-rw-r--r--sw/source/core/inc/frminf.hxx85
-rw-r--r--sw/source/core/inc/frmtool.hxx583
-rw-r--r--sw/source/core/inc/ftnboss.hxx137
-rw-r--r--sw/source/core/inc/ftnfrm.hxx150
-rw-r--r--sw/source/core/inc/hffrm.hxx66
-rw-r--r--sw/source/core/inc/ifinishedthreadlistener.hxx55
-rw-r--r--sw/source/core/inc/ithreadlistenerowner.hxx58
-rw-r--r--sw/source/core/inc/layact.hxx239
-rw-r--r--sw/source/core/inc/laycache.hxx77
-rw-r--r--sw/source/core/inc/layfrm.hxx210
-rw-r--r--sw/source/core/inc/layouter.hxx183
-rw-r--r--sw/source/core/inc/movedfwdfrmsbyobjpos.hxx70
-rw-r--r--sw/source/core/inc/mvsave.hxx213
-rw-r--r--sw/source/core/inc/node2lay.hxx81
-rw-r--r--sw/source/core/inc/noteurl.hxx76
-rw-r--r--sw/source/core/inc/notxtfrm.hxx79
-rw-r--r--sw/source/core/inc/objectformatter.hxx238
-rw-r--r--sw/source/core/inc/observablethread.hxx105
-rw-r--r--sw/source/core/inc/pagedeschint.hxx46
-rw-r--r--sw/source/core/inc/pagefrm.hxx542
-rw-r--r--sw/source/core/inc/pamtyp.hxx102
-rw-r--r--sw/source/core/inc/prevwpage.hxx63
-rw-r--r--sw/source/core/inc/ptqueue.hxx62
-rw-r--r--sw/source/core/inc/retrievedinputstreamdata.hxx111
-rw-r--r--sw/source/core/inc/retrieveinputstream.hxx68
-rw-r--r--sw/source/core/inc/retrieveinputstreamconsumer.hxx74
-rw-r--r--sw/source/core/inc/rolbck.hxx453
-rw-r--r--sw/source/core/inc/rootfrm.hxx377
-rw-r--r--sw/source/core/inc/rowfrm.hxx111
-rw-r--r--sw/source/core/inc/scriptinfo.hxx416
-rw-r--r--sw/source/core/inc/sectfrm.hxx150
-rw-r--r--sw/source/core/inc/setmapvirtdev.hxx71
-rw-r--r--sw/source/core/inc/sortedobjs.hxx108
-rw-r--r--sw/source/core/inc/sortedobjsimpl.hxx61
-rw-r--r--sw/source/core/inc/swblocks.hxx242
-rw-r--r--sw/source/core/inc/swcache.hxx302
-rw-r--r--sw/source/core/inc/swfntcch.hxx99
-rw-r--r--sw/source/core/inc/swfont.hxx899
-rw-r--r--sw/source/core/inc/swselectionlist.hxx97
-rw-r--r--sw/source/core/inc/swthreadjoiner.hxx51
-rw-r--r--sw/source/core/inc/swthreadmanager.hxx89
-rw-r--r--sw/source/core/inc/tabfrm.hxx235
-rw-r--r--sw/source/core/inc/tblrwcl.hxx228
-rwxr-xr-xsw/source/core/inc/textapi.hxx70
-rw-r--r--sw/source/core/inc/threadlistener.hxx62
-rw-r--r--sw/source/core/inc/threadmanager.hxx172
-rw-r--r--sw/source/core/inc/tocntntanchoredobjectposition.hxx103
-rw-r--r--sw/source/core/inc/tolayoutanchoredobjectposition.hxx66
-rw-r--r--sw/source/core/inc/toxhlp.hxx76
-rw-r--r--sw/source/core/inc/txmsrt.hxx294
-rw-r--r--sw/source/core/inc/txtfrm.hxx835
-rw-r--r--sw/source/core/inc/txttypes.hxx103
-rw-r--r--sw/source/core/inc/undoflystrattr.hxx56
-rw-r--r--sw/source/core/inc/unofldmid.h71
-rwxr-xr-xsw/source/core/inc/unometa.hxx368
-rw-r--r--sw/source/core/inc/viewimp.hxx365
-rw-r--r--sw/source/core/inc/visiturl.hxx49
-rw-r--r--sw/source/core/inc/wrong.hxx166
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx906
-rw-r--r--sw/source/core/layout/anchoredobject.cxx1064
-rw-r--r--sw/source/core/layout/atrfrm.cxx3296
-rw-r--r--sw/source/core/layout/calcmove.cxx2115
-rw-r--r--sw/source/core/layout/colfrm.cxx485
-rw-r--r--sw/source/core/layout/dbg_lay.cxx869
-rw-r--r--sw/source/core/layout/findfrm.cxx1813
-rw-r--r--sw/source/core/layout/flowfrm.cxx2725
-rw-r--r--sw/source/core/layout/fly.cxx2970
-rw-r--r--sw/source/core/layout/flycnt.cxx1661
-rw-r--r--sw/source/core/layout/flyincnt.cxx361
-rw-r--r--sw/source/core/layout/flylay.cxx1392
-rw-r--r--sw/source/core/layout/flypos.cxx112
-rw-r--r--sw/source/core/layout/frmtool.cxx3606
-rw-r--r--sw/source/core/layout/ftnfrm.cxx3275
-rw-r--r--sw/source/core/layout/hffrm.cxx799
-rw-r--r--sw/source/core/layout/layact.cxx2621
-rw-r--r--sw/source/core/layout/laycache.cxx1398
-rw-r--r--sw/source/core/layout/layhelp.hxx232
-rw-r--r--sw/source/core/layout/layouter.cxx571
-rw-r--r--sw/source/core/layout/movedfwdfrmsbyobjpos.cxx106
-rw-r--r--sw/source/core/layout/newfrm.cxx688
-rw-r--r--sw/source/core/layout/objectformatter.cxx578
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.cxx215
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.hxx81
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx870
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.hxx215
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.cxx73
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.hxx47
-rw-r--r--sw/source/core/layout/pagechg.cxx2517
-rw-r--r--sw/source/core/layout/pagedesc.cxx509
-rw-r--r--sw/source/core/layout/paintfrm.cxx6731
-rw-r--r--sw/source/core/layout/sectfrm.cxx2816
-rw-r--r--sw/source/core/layout/softpagebreak.cxx155
-rw-r--r--sw/source/core/layout/sortedobjs.cxx76
-rw-r--r--sw/source/core/layout/sortedobjsimpl.cxx313
-rw-r--r--sw/source/core/layout/ssfrm.cxx812
-rw-r--r--sw/source/core/layout/swselectionlist.cxx94
-rw-r--r--sw/source/core/layout/tabfrm.cxx5934
-rw-r--r--sw/source/core/layout/trvlfrm.cxx2661
-rw-r--r--sw/source/core/layout/unusedf.cxx91
-rw-r--r--sw/source/core/layout/virtoutp.cxx256
-rw-r--r--sw/source/core/layout/virtoutp.hxx74
-rw-r--r--sw/source/core/layout/wsfrm.cxx4038
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx1150
-rw-r--r--sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx458
-rw-r--r--sw/source/core/objectpositioning/environmentofanchoredobject.cxx121
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx1144
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx255
-rw-r--r--sw/source/core/ole/ndole.cxx1017
-rw-r--r--sw/source/core/para/paratr.cxx288
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx433
-rw-r--r--sw/source/core/sw3io/swacorr.cxx106
-rw-r--r--sw/source/core/swg/SwXMLBlockExport.cxx142
-rw-r--r--sw/source/core/swg/SwXMLBlockImport.cxx118
-rw-r--r--sw/source/core/swg/SwXMLBlockListContext.cxx250
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx154
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx641
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx741
-rw-r--r--sw/source/core/swg/swblocks.cxx818
-rw-r--r--sw/source/core/table/swnewtable.cxx2328
-rw-r--r--sw/source/core/table/swtable.cxx2846
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2203
-rw-r--r--sw/source/core/text/SwGrammarMarkUp.cxx166
-rw-r--r--sw/source/core/text/atrhndl.hxx179
-rw-r--r--sw/source/core/text/atrstck.cxx956
-rw-r--r--sw/source/core/text/blink.cxx198
-rw-r--r--sw/source/core/text/frmcrsr.cxx1747
-rw-r--r--sw/source/core/text/frmform.cxx2183
-rw-r--r--sw/source/core/text/frminf.cxx377
-rw-r--r--sw/source/core/text/frmpaint.cxx750
-rw-r--r--sw/source/core/text/guess.cxx554
-rw-r--r--sw/source/core/text/guess.hxx73
-rw-r--r--sw/source/core/text/inftxt.cxx1979
-rw-r--r--sw/source/core/text/inftxt.hxx905
-rw-r--r--sw/source/core/text/itradj.cxx919
-rw-r--r--sw/source/core/text/itratr.cxx1072
-rw-r--r--sw/source/core/text/itratr.hxx131
-rw-r--r--sw/source/core/text/itrcrsr.cxx1886
-rw-r--r--sw/source/core/text/itrform2.cxx2133
-rw-r--r--sw/source/core/text/itrform2.hxx214
-rw-r--r--sw/source/core/text/itrpaint.cxx718
-rw-r--r--sw/source/core/text/itrpaint.hxx69
-rw-r--r--sw/source/core/text/itrtxt.cxx527
-rw-r--r--sw/source/core/text/itrtxt.hxx340
-rw-r--r--sw/source/core/text/noteurl.cxx87
-rw-r--r--sw/source/core/text/pordrop.hxx119
-rw-r--r--sw/source/core/text/porexp.cxx312
-rw-r--r--sw/source/core/text/porexp.hxx108
-rw-r--r--sw/source/core/text/porfld.cxx1385
-rw-r--r--sw/source/core/text/porfld.hxx274
-rw-r--r--sw/source/core/text/porfly.cxx455
-rw-r--r--sw/source/core/text/porfly.hxx108
-rw-r--r--sw/source/core/text/porftn.hxx130
-rw-r--r--sw/source/core/text/porglue.cxx318
-rw-r--r--sw/source/core/text/porglue.hxx134
-rw-r--r--sw/source/core/text/porhyph.hxx119
-rw-r--r--sw/source/core/text/porlay.cxx2455
-rw-r--r--sw/source/core/text/porlay.hxx427
-rw-r--r--sw/source/core/text/porlin.cxx426
-rw-r--r--sw/source/core/text/porlin.hxx251
-rw-r--r--sw/source/core/text/pormulti.cxx2415
-rw-r--r--sw/source/core/text/pormulti.hxx268
-rw-r--r--sw/source/core/text/porref.cxx115
-rw-r--r--sw/source/core/text/porref.hxx73
-rw-r--r--sw/source/core/text/porrst.cxx580
-rw-r--r--sw/source/core/text/porrst.hxx187
-rw-r--r--sw/source/core/text/portab.hxx157
-rw-r--r--sw/source/core/text/portox.cxx115
-rw-r--r--sw/source/core/text/portox.hxx75
-rw-r--r--sw/source/core/text/portxt.cxx881
-rw-r--r--sw/source/core/text/portxt.hxx117
-rw-r--r--sw/source/core/text/possiz.hxx84
-rw-r--r--sw/source/core/text/redlnitr.cxx505
-rw-r--r--sw/source/core/text/redlnitr.hxx123
-rw-r--r--sw/source/core/text/txtcache.cxx241
-rw-r--r--sw/source/core/text/txtcache.hxx76
-rw-r--r--sw/source/core/text/txtcfg.hxx54
-rw-r--r--sw/source/core/text/txtdrop.cxx1101
-rw-r--r--sw/source/core/text/txtfld.cxx596
-rw-r--r--sw/source/core/text/txtfly.cxx2431
-rw-r--r--sw/source/core/text/txtfly.hxx259
-rw-r--r--sw/source/core/text/txtfrm.cxx2817
-rw-r--r--sw/source/core/text/txtftn.cxx1700
-rw-r--r--sw/source/core/text/txthyph.cxx695
-rw-r--r--sw/source/core/text/txtinit.cxx101
-rw-r--r--sw/source/core/text/txtio.cxx948
-rw-r--r--sw/source/core/text/txtpaint.cxx137
-rw-r--r--sw/source/core/text/txtpaint.hxx191
-rw-r--r--sw/source/core/text/txttab.cxx682
-rw-r--r--sw/source/core/text/widorp.cxx574
-rw-r--r--sw/source/core/text/widorp.hxx95
-rw-r--r--sw/source/core/text/wrong.cxx644
-rw-r--r--sw/source/core/tox/tox.cxx962
-rw-r--r--sw/source/core/tox/toxhlp.cxx193
-rw-r--r--sw/source/core/tox/txmsrt.cxx953
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx203
-rw-r--r--sw/source/core/txtnode/atrfld.cxx429
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx284
-rw-r--r--sw/source/core/txtnode/atrftn.cxx543
-rw-r--r--sw/source/core/txtnode/atrref.cxx103
-rw-r--r--sw/source/core/txtnode/atrtox.cxx96
-rw-r--r--sw/source/core/txtnode/chrfmt.cxx38
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx912
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2739
-rw-r--r--sw/source/core/txtnode/fntcap.cxx855
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx120
-rw-r--r--sw/source/core/txtnode/ndhints.cxx497
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5084
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx94
-rw-r--r--sw/source/core/txtnode/swfont.cxx1246
-rw-r--r--sw/source/core/txtnode/thints.cxx3071
-rw-r--r--sw/source/core/txtnode/txatbase.cxx84
-rw-r--r--sw/source/core/txtnode/txatritr.cxx246
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx351
-rwxr-xr-xsw/source/core/txtnode/txtedt.cxx2179
-rw-r--r--sw/source/core/undo/SwRewriter.cxx78
-rw-r--r--sw/source/core/undo/SwUndoField.cxx162
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx459
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx428
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx77
-rw-r--r--sw/source/core/undo/docundo.cxx581
-rw-r--r--sw/source/core/undo/rolbck.cxx1522
-rw-r--r--sw/source/core/undo/unattr.cxx1259
-rw-r--r--sw/source/core/undo/unbkmk.cxx104
-rw-r--r--sw/source/core/undo/undel.cxx996
-rw-r--r--sw/source/core/undo/undo.hrc185
-rw-r--r--sw/source/core/undo/undo.src657
-rw-r--r--sw/source/core/undo/undobj.cxx1339
-rw-r--r--sw/source/core/undo/undobj1.cxx727
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx99
-rw-r--r--sw/source/core/undo/undraw.cxx606
-rw-r--r--sw/source/core/undo/unfmco.cxx124
-rw-r--r--sw/source/core/undo/unins.cxx1066
-rw-r--r--sw/source/core/undo/unmove.cxx355
-rw-r--r--sw/source/core/undo/unnum.cxx469
-rw-r--r--sw/source/core/undo/unoutl.cxx61
-rw-r--r--sw/source/core/undo/unovwr.cxx502
-rw-r--r--sw/source/core/undo/unredln.cxx538
-rw-r--r--sw/source/core/undo/unsect.cxx499
-rw-r--r--sw/source/core/undo/unsort.cxx279
-rw-r--r--sw/source/core/undo/unspnd.cxx204
-rw-r--r--sw/source/core/undo/untbl.cxx3298
-rw-r--r--sw/source/core/undo/untblk.cxx355
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx292
-rw-r--r--sw/source/core/unocore/TextCursorHelper.cxx61
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx412
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.hxx78
-rw-r--r--sw/source/core/unocore/swunohelper.cxx291
-rw-r--r--sw/source/core/unocore/unobkm.cxx652
-rw-r--r--sw/source/core/unocore/unochart.cxx3092
-rw-r--r--sw/source/core/unocore/unocoll.cxx1775
-rw-r--r--sw/source/core/unocore/unocore.src64
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx1154
-rw-r--r--sw/source/core/unocore/unodraw.cxx2960
-rw-r--r--sw/source/core/unocore/unoevent.cxx333
-rw-r--r--sw/source/core/unocore/unoevtlstnr.cxx118
-rw-r--r--sw/source/core/unocore/unofield.cxx2822
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx531
-rw-r--r--sw/source/core/unocore/unoframe.cxx3180
-rw-r--r--sw/source/core/unocore/unoftn.cxx714
-rw-r--r--sw/source/core/unocore/unoidx.cxx3439
-rw-r--r--sw/source/core/unocore/unomap.cxx3124
-rw-r--r--sw/source/core/unocore/unoobj.cxx3208
-rw-r--r--sw/source/core/unocore/unoobj2.cxx1997
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx1462
-rw-r--r--sw/source/core/unocore/unoport.cxx1072
-rw-r--r--sw/source/core/unocore/unoportenum.cxx1226
-rw-r--r--sw/source/core/unocore/unoprnms.cxx794
-rw-r--r--sw/source/core/unocore/unoredline.cxx724
-rw-r--r--sw/source/core/unocore/unoredlines.cxx196
-rw-r--r--sw/source/core/unocore/unorefmk.cxx1694
-rw-r--r--sw/source/core/unocore/unosect.cxx1917
-rw-r--r--sw/source/core/unocore/unosett.cxx2828
-rw-r--r--sw/source/core/unocore/unosrch.cxx822
-rw-r--r--sw/source/core/unocore/unostyle.cxx4535
-rw-r--r--sw/source/core/unocore/unotbl.cxx5004
-rw-r--r--sw/source/core/unocore/unotext.cxx2964
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx488
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx1547
-rw-r--r--sw/source/core/view/printdata.cxx542
-rw-r--r--sw/source/core/view/vdraw.cxx378
-rw-r--r--sw/source/core/view/viewimp.cxx620
-rw-r--r--sw/source/core/view/viewpg.cxx257
-rw-r--r--sw/source/core/view/viewsh.cxx2788
-rw-r--r--sw/source/core/view/vnew.cxx415
-rw-r--r--sw/source/core/view/vprint.cxx735
-rw-r--r--sw/source/filter/ascii/ascatr.cxx227
-rw-r--r--sw/source/filter/ascii/parasc.cxx527
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx225
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx52
-rw-r--r--sw/source/filter/basflt/docfact.cxx85
-rw-r--r--sw/source/filter/basflt/fltini.cxx1037
-rw-r--r--sw/source/filter/basflt/iodetect.cxx592
-rw-r--r--sw/source/filter/basflt/shellio.cxx1014
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx208
-rw-r--r--sw/source/filter/html/css1atr.cxx3858
-rw-r--r--sw/source/filter/html/css1kywd.cxx281
-rw-r--r--sw/source/filter/html/css1kywd.hxx291
-rw-r--r--sw/source/filter/html/htmlatr.cxx3494
-rw-r--r--sw/source/filter/html/htmlbas.cxx363
-rw-r--r--sw/source/filter/html/htmlcss1.cxx2477
-rw-r--r--sw/source/filter/html/htmlctxt.cxx752
-rw-r--r--sw/source/filter/html/htmldraw.cxx859
-rw-r--r--sw/source/filter/html/htmlfld.cxx670
-rw-r--r--sw/source/filter/html/htmlfld.hxx92
-rw-r--r--sw/source/filter/html/htmlfldw.cxx539
-rw-r--r--sw/source/filter/html/htmlfly.cxx1929
-rw-r--r--sw/source/filter/html/htmlfly.hxx137
-rw-r--r--sw/source/filter/html/htmlflyt.cxx516
-rw-r--r--sw/source/filter/html/htmlform.cxx2661
-rw-r--r--sw/source/filter/html/htmlform.hxx52
-rw-r--r--sw/source/filter/html/htmlforw.cxx1446
-rw-r--r--sw/source/filter/html/htmlftn.cxx621
-rw-r--r--sw/source/filter/html/htmlgrin.cxx1447
-rw-r--r--sw/source/filter/html/htmlnum.cxx987
-rw-r--r--sw/source/filter/html/htmlnum.hxx131
-rw-r--r--sw/source/filter/html/htmlplug.cxx1401
-rw-r--r--sw/source/filter/html/htmlsect.cxx860
-rw-r--r--sw/source/filter/html/htmltab.cxx5599
-rw-r--r--sw/source/filter/html/htmltabw.cxx1268
-rw-r--r--sw/source/filter/html/htmlvsh.hxx56
-rw-r--r--sw/source/filter/html/parcss1.cxx1426
-rw-r--r--sw/source/filter/html/parcss1.hxx307
-rw-r--r--sw/source/filter/html/svxcss1.cxx3311
-rw-r--r--sw/source/filter/html/svxcss1.hxx435
-rw-r--r--sw/source/filter/html/swcss1.hxx227
-rw-r--r--sw/source/filter/html/swhtml.cxx5523
-rw-r--r--sw/source/filter/html/swhtml.hxx1040
-rw-r--r--sw/source/filter/html/wrthtml.cxx1439
-rw-r--r--sw/source/filter/html/wrthtml.hxx603
-rw-r--r--sw/source/filter/inc/fltbase.hxx127
-rw-r--r--sw/source/filter/inc/fltglbls.hxx124
-rw-r--r--sw/source/filter/inc/fltini.hxx108
-rw-r--r--sw/source/filter/inc/fltshell.hxx629
-rw-r--r--sw/source/filter/inc/msfilter.hxx528
-rw-r--r--sw/source/filter/inc/rtf.hxx132
-rw-r--r--sw/source/filter/inc/wrt_fn.hxx66
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx334
-rw-r--r--sw/source/filter/inc/wwstyles.hxx221
-rw-r--r--sw/source/filter/rtf/rtffld.cxx1231
-rw-r--r--sw/source/filter/rtf/rtffly.cxx1652
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx1127
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx1034
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx4424
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx478
-rw-r--r--sw/source/filter/writer/writer.cxx628
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx131
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx919
-rw-r--r--sw/source/filter/ww1/fltshell.cxx2087
-rw-r--r--sw/source/filter/ww1/w1class.cxx1256
-rw-r--r--sw/source/filter/ww1/w1class.hxx1649
-rw-r--r--sw/source/filter/ww1/w1filter.cxx2063
-rw-r--r--sw/source/filter/ww1/w1par.cxx141
-rw-r--r--sw/source/filter/ww1/w1par.hxx45
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx684
-rw-r--r--sw/source/filter/ww1/w1struct.hxx928
-rw-r--r--sw/source/filter/ww8/CREDITS3
-rw-r--r--sw/source/filter/ww8/README-rtf.txt227
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx176
-rw-r--r--sw/source/filter/ww8/WW8FFData.hxx116
-rw-r--r--sw/source/filter/ww8/WW8FibData.cxx62
-rw-r--r--sw/source/filter/ww8/WW8FibData.hxx51
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx119
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx145
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx1517
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx354
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx583
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx3305
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx610
-rw-r--r--sw/source/filter/ww8/docxexport.cxx673
-rw-r--r--sw/source/filter/ww8/docxexport.hxx203
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx182
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx62
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx99
-rw-r--r--sw/source/filter/ww8/dump/dump8.cxx171
-rw-r--r--sw/source/filter/ww8/dump/dump8a.cxx2746
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.cxx536
-rw-r--r--sw/source/filter/ww8/dump/msvbasic.hxx102
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.cxx546
-rw-r--r--sw/source/filter/ww8/dump/ww8darr.hxx43
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.cxx419
-rw-r--r--sw/source/filter/ww8/dump/ww8dout.hxx86
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.cxx6667
-rw-r--r--sw/source/filter/ww8/dump/ww8scan.hxx1488
-rw-r--r--sw/source/filter/ww8/dump/ww8struc.hxx815
-rw-r--r--sw/source/filter/ww8/escher.hxx189
-rw-r--r--sw/source/filter/ww8/fields.cxx152
-rw-r--r--sw/source/filter/ww8/fields.hxx157
-rw-r--r--sw/source/filter/ww8/hash_wrap.hxx124
-rw-r--r--sw/source/filter/ww8/needed_cast.hxx63
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx3447
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx590
-rwxr-xr-xsw/source/filter/ww8/rtfexport.cxx1288
-rwxr-xr-xsw/source/filter/ww8/rtfexport.hxx212
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx188
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx85
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.cxx137
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.hxx75
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx586
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx115
-rw-r--r--sw/source/filter/ww8/sortedarray.hxx121
-rw-r--r--sw/source/filter/ww8/staticassert.hxx71
-rw-r--r--sw/source/filter/ww8/styles.cxx218
-rw-r--r--sw/source/filter/ww8/tracer.cxx209
-rw-r--r--sw/source/filter/ww8/tracer.hxx91
-rw-r--r--sw/source/filter/ww8/types.hxx58
-rw-r--r--sw/source/filter/ww8/typessw.hxx46
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx871
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx988
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx1047
-rw-r--r--sw/source/filter/ww8/writerwordglue.hxx164
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2831
-rwxr-xr-xsw/source/filter/ww8/wrtw8nds.cxx2862
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx959
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2302
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx3887
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1500
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx889
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx5314
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx454
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx272
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx92
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx3252
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx108
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx823
-rw-r--r--sw/source/filter/ww8/ww8par.cxx5181
-rw-r--r--sw/source/filter/ww8/ww8par.hxx1639
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4756
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx295
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2644
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx581
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx3628
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6214
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx7374
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx1784
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx1059
-rw-r--r--sw/source/filter/xml/DocSettingNames.hxx26
-rw-r--r--sw/source/filter/xml/ForbiddenCharactersEnum.hxx41
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx776
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.hxx164
-rw-r--r--sw/source/filter/xml/swxml.cxx1143
-rw-r--r--sw/source/filter/xml/wrtxml.cxx701
-rw-r--r--sw/source/filter/xml/wrtxml.hxx105
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx258
-rw-r--r--sw/source/filter/xml/xmlbrshe.hxx56
-rw-r--r--sw/source/filter/xml/xmlbrshi.hxx86
-rw-r--r--sw/source/filter/xml/xmlexp.cxx997
-rw-r--r--sw/source/filter/xml/xmlexp.hxx190
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx1048
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx136
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx1134
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx363
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx102
-rw-r--r--sw/source/filter/xml/xmlimp.cxx1745
-rw-r--r--sw/source/filter/xml/xmlimp.hxx231
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx976
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx110
-rw-r--r--sw/source/filter/xml/xmlitem.cxx90
-rw-r--r--sw/source/filter/xml/xmlitem.hxx80
-rw-r--r--sw/source/filter/xml/xmliteme.cxx256
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx272
-rw-r--r--sw/source/filter/xml/xmlitemm.cxx296
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx422
-rw-r--r--sw/source/filter/xml/xmlithlp.hxx101
-rw-r--r--sw/source/filter/xml/xmlitmap.hxx96
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx91
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx200
-rw-r--r--sw/source/filter/xml/xmlscript.cxx65
-rw-r--r--sw/source/filter/xml/xmltble.cxx1250
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2951
-rw-r--r--sw/source/filter/xml/xmltbli.hxx225
-rw-r--r--sw/source/filter/xml/xmltext.cxx107
-rw-r--r--sw/source/filter/xml/xmltexte.cxx767
-rw-r--r--sw/source/filter/xml/xmltexte.hxx88
-rw-r--r--sw/source/filter/xml/xmltexti.cxx1062
-rw-r--r--sw/source/filter/xml/xmltexti.hxx132
-rw-r--r--sw/source/ui/app/app.src665
-rw-r--r--sw/source/ui/app/appenv.cxx545
-rw-r--r--sw/source/ui/app/apphdl.cxx980
-rw-r--r--sw/source/ui/app/applab.cxx457
-rw-r--r--sw/source/ui/app/appopt.cxx646
-rw-r--r--sw/source/ui/app/docsh.cxx1391
-rw-r--r--sw/source/ui/app/docsh2.cxx1860
-rw-r--r--sw/source/ui/app/docshdrw.cxx84
-rw-r--r--sw/source/ui/app/docshini.cxx818
-rw-r--r--sw/source/ui/app/docst.cxx1312
-rw-r--r--sw/source/ui/app/docstyle.cxx2906
-rw-r--r--sw/source/ui/app/error.src214
-rw-r--r--sw/source/ui/app/mainwn.cxx165
-rw-r--r--sw/source/ui/app/mn.src1453
-rw-r--r--sw/source/ui/app/swdll.cxx156
-rw-r--r--sw/source/ui/app/swmodul1.cxx680
-rw-r--r--sw/source/ui/app/swmodule.cxx500
-rw-r--r--sw/source/ui/app/swwait.cxx75
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx138
-rw-r--r--sw/source/ui/cctrl/popbox.cxx91
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx231
-rw-r--r--sw/source/ui/chrdlg/break.cxx255
-rw-r--r--sw/source/ui/chrdlg/break.hrc41
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx236
-rw-r--r--sw/source/ui/chrdlg/ccoll.hrc50
-rw-r--r--sw/source/ui/chrdlg/ccoll.src165
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx407
-rw-r--r--sw/source/ui/chrdlg/chardlg.hrc86
-rw-r--r--sw/source/ui/chrdlg/chardlg.src272
-rw-r--r--sw/source/ui/chrdlg/chrdlg.src77
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx894
-rw-r--r--sw/source/ui/chrdlg/drpcps.hrc51
-rw-r--r--sw/source/ui/chrdlg/drpcps.src233
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx366
-rw-r--r--sw/source/ui/chrdlg/numpara.hrc53
-rw-r--r--sw/source/ui/chrdlg/numpara.src237
-rw-r--r--sw/source/ui/chrdlg/paradlg.hrc71
-rw-r--r--sw/source/ui/chrdlg/paradlg.src165
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx269
-rw-r--r--sw/source/ui/chrdlg/swbreak.src178
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx361
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx76
-rw-r--r--sw/source/ui/config/barcfg.cxx152
-rw-r--r--sw/source/ui/config/caption.cxx182
-rw-r--r--sw/source/ui/config/cfgitems.cxx460
-rw-r--r--sw/source/ui/config/config.hrc67
-rw-r--r--sw/source/ui/config/dbconfig.cxx143
-rw-r--r--sw/source/ui/config/fontcfg.cxx359
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx622
-rw-r--r--sw/source/ui/config/mailconfigpage.hrc83
-rw-r--r--sw/source/ui/config/mailconfigpage.src443
-rw-r--r--sw/source/ui/config/modcfg.cxx1392
-rw-r--r--sw/source/ui/config/optcomp.cxx628
-rw-r--r--sw/source/ui/config/optcomp.hrc56
-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.src1074
-rw-r--r--sw/source/ui/config/optload.cxx977
-rw-r--r--sw/source/ui/config/optload.hrc82
-rw-r--r--sw/source/ui/config/optload.src417
-rw-r--r--sw/source/ui/config/optpage.cxx2617
-rw-r--r--sw/source/ui/config/prtopt.cxx197
-rw-r--r--sw/source/ui/config/redlopt.hrc54
-rw-r--r--sw/source/ui/config/redlopt.src287
-rw-r--r--sw/source/ui/config/uinums.cxx673
-rw-r--r--sw/source/ui/config/usrpref.cxx663
-rw-r--r--sw/source/ui/config/viewopt.cxx645
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx752
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hrc48
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx122
-rw-r--r--sw/source/ui/dbui/addresslistdialog.src131
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx835
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hrc64
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx130
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.src238
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx274
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hrc49
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.hxx99
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.src169
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx1945
-rw-r--r--sw/source/ui/dbui/dbinsdlg.hrc73
-rw-r--r--sw/source/ui/dbui/dbinsdlg.src330
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx3109
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx144
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hrc35
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx60
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.src61
-rw-r--r--sw/source/ui/dbui/dbtree.cxx622
-rw-r--r--sw/source/ui/dbui/dbui.cxx151
-rw-r--r--sw/source/ui/dbui/dbui.src284
-rw-r--r--sw/source/ui/dbui/maildispatcher.cxx296
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx796
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.hrc61
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.src279
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx1047
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx336
-rw-r--r--sw/source/ui/dbui/mailmergewizard.hrc37
-rw-r--r--sw/source/ui/dbui/mailmergewizard.src80
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx1846
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hrc115
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx332
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.src655
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx1986
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx224
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hrc37
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx74
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.src108
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx619
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hrc65
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx176
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.src261
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx816
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hrc48
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx114
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.src165
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx123
-rw-r--r--sw/source/ui/dbui/mmmergepage.hrc43
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx73
-rw-r--r--sw/source/ui/dbui/mmmergepage.src107
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx1440
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hrc103
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx242
-rw-r--r--sw/source/ui/dbui/mmoutputpage.src490
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx113
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hrc44
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx67
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.src101
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx204
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hrc46
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx77
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.src132
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx223
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hrc43
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx79
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.src99
-rw-r--r--sw/source/ui/dbui/swdbtoolsclient.cxx248
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx900
-rw-r--r--sw/source/ui/dialog/abstract.cxx92
-rw-r--r--sw/source/ui/dialog/abstract.hrc36
-rw-r--r--sw/source/ui/dialog/abstract.src155
-rw-r--r--sw/source/ui/dialog/addrdlg.cxx69
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx462
-rw-r--r--sw/source/ui/dialog/ascfldlg.hrc44
-rw-r--r--sw/source/ui/dialog/ascfldlg.src183
-rw-r--r--sw/source/ui/dialog/dialog.src62
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx195
-rw-r--r--sw/source/ui/dialog/docstdlg.hrc47
-rw-r--r--sw/source/ui/dialog/docstdlg.src184
-rw-r--r--sw/source/ui/dialog/macassgn.cxx163
-rw-r--r--sw/source/ui/dialog/regionsw.cxx264
-rw-r--r--sw/source/ui/dialog/regionsw.hrc116
-rw-r--r--sw/source/ui/dialog/regionsw.src899
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx52
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx54
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx1742
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx584
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx55
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx51
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2467
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx99
-rw-r--r--sw/source/ui/dialog/wordcountdialog.hrc43
-rw-r--r--sw/source/ui/dialog/wordcountdialog.src115
-rw-r--r--sw/source/ui/dochdl/dochdl.src76
-rwxr-xr-xsw/source/ui/dochdl/gloshdl.cxx898
-rw-r--r--sw/source/ui/dochdl/selglos.cxx77
-rw-r--r--sw/source/ui/dochdl/selglos.hrc31
-rw-r--r--sw/source/ui/dochdl/selglos.src112
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx3853
-rw-r--r--sw/source/ui/docvw/AnchorOverlayObject.cxx467
-rw-r--r--sw/source/ui/docvw/AnchorOverlayObject.hxx143
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.cxx215
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.hxx63
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx296
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx2045
-rw-r--r--sw/source/ui/docvw/ShadowOverlayObject.cxx268
-rw-r--r--sw/source/ui/docvw/ShadowOverlayObject.hxx80
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.cxx427
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.hxx87
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx317
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.hxx56
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx1392
-rw-r--r--sw/source/ui/docvw/SidebarWinAcc.cxx162
-rw-r--r--sw/source/ui/docvw/SidebarWinAcc.hxx67
-rw-r--r--sw/source/ui/docvw/access.src121
-rw-r--r--sw/source/ui/docvw/annotation.hrc54
-rw-r--r--sw/source/ui/docvw/annotation.src68
-rw-r--r--sw/source/ui/docvw/docvw.hrc93
-rw-r--r--sw/source/ui/docvw/docvw.src296
-rw-r--r--sw/source/ui/docvw/edtdd.cxx527
-rw-r--r--sw/source/ui/docvw/edtwin.cxx5803
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx592
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx216
-rw-r--r--sw/source/ui/docvw/frmsidebarwincontainer.cxx216
-rw-r--r--sw/source/ui/docvw/frmsidebarwincontainer.hxx73
-rw-r--r--sw/source/ui/docvw/romenu.cxx523
-rw-r--r--sw/source/ui/docvw/romenu.hxx75
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx1099
-rw-r--r--sw/source/ui/envelp/envelp.src87
-rw-r--r--sw/source/ui/envelp/envfmt.cxx635
-rw-r--r--sw/source/ui/envelp/envfmt.hrc82
-rw-r--r--sw/source/ui/envelp/envfmt.hxx112
-rw-r--r--sw/source/ui/envelp/envfmt.src324
-rw-r--r--sw/source/ui/envelp/envimg.cxx381
-rw-r--r--sw/source/ui/envelp/envlop.hrc65
-rw-r--r--sw/source/ui/envelp/envlop.src213
-rw-r--r--sw/source/ui/envelp/envlop1.cxx441
-rw-r--r--sw/source/ui/envelp/envprt.cxx259
-rw-r--r--sw/source/ui/envelp/envprt.hrc96
-rw-r--r--sw/source/ui/envelp/envprt.hxx93
-rw-r--r--sw/source/ui/envelp/envprt.src297
-rw-r--r--sw/source/ui/envelp/label.hrc128
-rw-r--r--sw/source/ui/envelp/label.src758
-rw-r--r--sw/source/ui/envelp/label1.cxx1111
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx302
-rw-r--r--sw/source/ui/envelp/labelexp.cxx281
-rw-r--r--sw/source/ui/envelp/labfmt.cxx712
-rw-r--r--sw/source/ui/envelp/labfmt.hrc89
-rw-r--r--sw/source/ui/envelp/labfmt.hxx175
-rw-r--r--sw/source/ui/envelp/labfmt.src370
-rw-r--r--sw/source/ui/envelp/labimg.cxx482
-rw-r--r--sw/source/ui/envelp/labimp.hxx118
-rw-r--r--sw/source/ui/envelp/labprt.cxx242
-rw-r--r--sw/source/ui/envelp/labprt.hrc59
-rw-r--r--sw/source/ui/envelp/labprt.hxx86
-rw-r--r--sw/source/ui/envelp/labprt.src157
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx938
-rw-r--r--sw/source/ui/envelp/mailmrge.hrc92
-rw-r--r--sw/source/ui/envelp/mailmrge.src455
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx253
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx112
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx139
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.hrc37
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.src125
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.cxx81
-rw-r--r--sw/source/ui/fldui/FldRefTreeListBox.hxx44
-rw-r--r--sw/source/ui/fldui/changedb.cxx363
-rw-r--r--sw/source/ui/fldui/changedb.hrc62
-rw-r--r--sw/source/ui/fldui/changedb.src130
-rw-r--r--sw/source/ui/fldui/flddb.cxx583
-rw-r--r--sw/source/ui/fldui/flddb.hxx106
-rw-r--r--sw/source/ui/fldui/flddb.src206
-rw-r--r--sw/source/ui/fldui/flddinf.cxx537
-rw-r--r--sw/source/ui/fldui/flddinf.hxx89
-rw-r--r--sw/source/ui/fldui/flddinf.src141
-rw-r--r--sw/source/ui/fldui/flddok.cxx731
-rw-r--r--sw/source/ui/fldui/flddok.hxx95
-rw-r--r--sw/source/ui/fldui/flddok.src203
-rw-r--r--sw/source/ui/fldui/fldedt.cxx422
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx758
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx113
-rw-r--r--sw/source/ui/fldui/fldfunc.src284
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx1793
-rw-r--r--sw/source/ui/fldui/fldpage.cxx419
-rw-r--r--sw/source/ui/fldui/fldpage.hxx107
-rw-r--r--sw/source/ui/fldui/fldref.cxx1073
-rw-r--r--sw/source/ui/fldui/fldref.hxx114
-rw-r--r--sw/source/ui/fldui/fldref.src150
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx386
-rw-r--r--sw/source/ui/fldui/fldtdlg.hrc171
-rw-r--r--sw/source/ui/fldui/fldtdlg.src118
-rw-r--r--sw/source/ui/fldui/fldui.src684
-rw-r--r--sw/source/ui/fldui/fldvar.cxx1383
-rw-r--r--sw/source/ui/fldui/fldvar.hxx126
-rw-r--r--sw/source/ui/fldui/fldvar.src245
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx212
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx201
-rw-r--r--sw/source/ui/fldui/inpdlg.hrc34
-rw-r--r--sw/source/ui/fldui/inpdlg.src134
-rw-r--r--sw/source/ui/fldui/javaedit.cxx366
-rw-r--r--sw/source/ui/fldui/javaedit.hrc51
-rw-r--r--sw/source/ui/fldui/javaedit.src181
-rw-r--r--sw/source/ui/fldui/xfldui.cxx184
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx647
-rw-r--r--sw/source/ui/fmtui/tmpdlg.src380
-rw-r--r--sw/source/ui/frmdlg/colex.cxx610
-rw-r--r--sw/source/ui/frmdlg/colmgr.cxx191
-rw-r--r--sw/source/ui/frmdlg/column.cxx1498
-rw-r--r--sw/source/ui/frmdlg/column.hrc86
-rw-r--r--sw/source/ui/frmdlg/column.src431
-rw-r--r--sw/source/ui/frmdlg/cption.cxx652
-rw-r--r--sw/source/ui/frmdlg/cption.hrc78
-rw-r--r--sw/source/ui/frmdlg/cption.src342
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx221
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx629
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx3345
-rw-r--r--sw/source/ui/frmdlg/frmpage.hrc146
-rw-r--r--sw/source/ui/frmdlg/frmpage.src884
-rw-r--r--sw/source/ui/frmdlg/frmui.src133
-rw-r--r--sw/source/ui/frmdlg/pattern.cxx75
-rw-r--r--sw/source/ui/frmdlg/pattern.hrc46
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx79
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx785
-rw-r--r--sw/source/ui/frmdlg/wrap.hrc66
-rw-r--r--sw/source/ui/frmdlg/wrap.src271
-rw-r--r--sw/source/ui/globdoc/globdoc.cxx91
-rw-r--r--sw/source/ui/globdoc/globdoc.src45
-rw-r--r--sw/source/ui/inc/DropDownFieldDialog.hxx71
-rw-r--r--sw/source/ui/inc/SidebarWindowsConsts.hxx41
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx76
-rw-r--r--sw/source/ui/inc/SwXFilterOptions.hxx113
-rw-r--r--sw/source/ui/inc/abstract.hxx73
-rw-r--r--sw/source/ui/inc/actctrl.hxx98
-rw-r--r--sw/source/ui/inc/addrdlg.hxx44
-rwxr-xr-xsw/source/ui/inc/annotsh.hxx78
-rw-r--r--sw/source/ui/inc/app.hrc183
-rw-r--r--sw/source/ui/inc/ascfldlg.hxx78
-rw-r--r--sw/source/ui/inc/autoedit.hxx50
-rw-r--r--sw/source/ui/inc/barcfg.hxx47
-rw-r--r--sw/source/ui/inc/basesh.hxx127
-rw-r--r--sw/source/ui/inc/beziersh.hxx44
-rw-r--r--sw/source/ui/inc/bmpwin.hxx69
-rw-r--r--sw/source/ui/inc/bookctrl.hxx57
-rw-r--r--sw/source/ui/inc/bookmark.hxx88
-rw-r--r--sw/source/ui/inc/break.hxx92
-rw-r--r--sw/source/ui/inc/caption.hxx118
-rw-r--r--sw/source/ui/inc/cfgdesc.hxx69
-rw-r--r--sw/source/ui/inc/cfgid.h40
-rw-r--r--sw/source/ui/inc/cfgitems.hxx242
-rw-r--r--sw/source/ui/inc/changedb.hxx92
-rw-r--r--sw/source/ui/inc/chartins.hxx35
-rw-r--r--sw/source/ui/inc/chldwrap.hxx55
-rw-r--r--sw/source/ui/inc/chrdlg.hxx119
-rw-r--r--sw/source/ui/inc/cnttab.hxx90
-rw-r--r--sw/source/ui/inc/colex.hxx118
-rw-r--r--sw/source/ui/inc/colmgr.hxx131
-rw-r--r--sw/source/ui/inc/column.hxx227
-rw-r--r--sw/source/ui/inc/conarc.hxx57
-rw-r--r--sw/source/ui/inc/concustomshape.hxx72
-rw-r--r--sw/source/ui/inc/condedit.hxx72
-rw-r--r--sw/source/ui/inc/conform.hxx47
-rw-r--r--sw/source/ui/inc/conpoly.hxx55
-rw-r--r--sw/source/ui/inc/conrect.hxx60
-rw-r--r--sw/source/ui/inc/content.hxx225
-rw-r--r--sw/source/ui/inc/conttree.hxx334
-rw-r--r--sw/source/ui/inc/convert.hxx91
-rw-r--r--sw/source/ui/inc/cption.hxx137
-rw-r--r--sw/source/ui/inc/dbconfig.hxx54
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx188
-rw-r--r--sw/source/ui/inc/dbtree.hxx86
-rw-r--r--sw/source/ui/inc/dbui.hxx86
-rw-r--r--sw/source/ui/inc/dialmgr.hxx48
-rw-r--r--sw/source/ui/inc/docfnote.hxx50
-rw-r--r--sw/source/ui/inc/docstdlg.hxx84
-rw-r--r--sw/source/ui/inc/drawbase.hxx90
-rw-r--r--sw/source/ui/inc/drawsh.hxx52
-rw-r--r--sw/source/ui/inc/drformsh.hxx47
-rw-r--r--sw/source/ui/inc/drpcps.hxx125
-rw-r--r--sw/source/ui/inc/drwbassh.hxx64
-rw-r--r--sw/source/ui/inc/drwtxtsh.hxx86
-rw-r--r--sw/source/ui/inc/dselect.hxx52
-rw-r--r--sw/source/ui/inc/edtwin.hxx307
-rw-r--r--sw/source/ui/inc/envimg.hxx100
-rw-r--r--sw/source/ui/inc/envlop.hxx149
-rw-r--r--sw/source/ui/inc/fldedt.hxx66
-rw-r--r--sw/source/ui/inc/fldmgr.hxx234
-rw-r--r--sw/source/ui/inc/fldtdlg.hxx68
-rw-r--r--sw/source/ui/inc/fldwrap.hxx63
-rw-r--r--sw/source/ui/inc/fontcfg.hxx120
-rw-r--r--sw/source/ui/inc/formatclipboard.hxx69
-rw-r--r--sw/source/ui/inc/formedt.hxx108
-rw-r--r--sw/source/ui/inc/frmdlg.hxx67
-rw-r--r--sw/source/ui/inc/frmmgr.hxx196
-rw-r--r--sw/source/ui/inc/frmpage.hxx342
-rw-r--r--sw/source/ui/inc/frmsh.hxx50
-rw-r--r--sw/source/ui/inc/frmui.hrc144
-rw-r--r--sw/source/ui/inc/globals.h37
-rw-r--r--sw/source/ui/inc/globdoc.hrc64
-rw-r--r--sw/source/ui/inc/glosbib.hxx120
-rw-r--r--sw/source/ui/inc/glosdoc.hxx148
-rw-r--r--sw/source/ui/inc/gloshdl.hxx110
-rw-r--r--sw/source/ui/inc/gloslst.hxx89
-rw-r--r--sw/source/ui/inc/glossary.hxx197
-rw-r--r--sw/source/ui/inc/glshell.hxx114
-rw-r--r--sw/source/ui/inc/grfsh.hxx44
-rw-r--r--sw/source/ui/inc/hidfunc.h350
-rw-r--r--sw/source/ui/inc/hyp.hxx67
-rw-r--r--sw/source/ui/inc/idxmrk.hxx73
-rw-r--r--sw/source/ui/inc/imaildsplistener.hxx77
-rw-r--r--sw/source/ui/inc/initui.hxx79
-rw-r--r--sw/source/ui/inc/inpdlg.hxx78
-rw-r--r--sw/source/ui/inc/inputwin.hxx133
-rw-r--r--sw/source/ui/inc/insfnote.hxx97
-rw-r--r--sw/source/ui/inc/insrule.hxx66
-rw-r--r--sw/source/ui/inc/instable.hxx100
-rw-r--r--sw/source/ui/inc/javaedit.hxx118
-rw-r--r--sw/source/ui/inc/label.hxx99
-rw-r--r--sw/source/ui/inc/labelcfg.hxx59
-rw-r--r--sw/source/ui/inc/labimg.hxx131
-rwxr-xr-xsw/source/ui/inc/langhelper.hxx68
-rw-r--r--sw/source/ui/inc/linenum.hxx110
-rw-r--r--sw/source/ui/inc/listsh.hxx44
-rw-r--r--sw/source/ui/inc/macassgn.hxx54
-rw-r--r--sw/source/ui/inc/mailconfigpage.hxx110
-rw-r--r--sw/source/ui/inc/maildispatcher.hxx168
-rw-r--r--sw/source/ui/inc/mailmergechildwindow.hxx66
-rw-r--r--sw/source/ui/inc/mailmergehelper.hxx349
-rw-r--r--sw/source/ui/inc/mailmergewizard.hxx103
-rw-r--r--sw/source/ui/inc/mailmrge.hxx204
-rw-r--r--sw/source/ui/inc/mediash.hxx43
-rw-r--r--sw/source/ui/inc/mergetbl.hxx59
-rw-r--r--sw/source/ui/inc/misc.hrc106
-rw-r--r--sw/source/ui/inc/mmconfigitem.hxx279
-rw-r--r--sw/source/ui/inc/multmrk.hxx77
-rw-r--r--sw/source/ui/inc/navicfg.hxx119
-rw-r--r--sw/source/ui/inc/navicont.hxx61
-rw-r--r--sw/source/ui/inc/navipi.hxx198
-rw-r--r--sw/source/ui/inc/num.hxx205
-rw-r--r--sw/source/ui/inc/numberingtypelistbox.hxx58
-rw-r--r--sw/source/ui/inc/numfmtlb.hxx87
-rw-r--r--sw/source/ui/inc/numpara.hxx98
-rw-r--r--sw/source/ui/inc/numprevw.hxx71
-rw-r--r--sw/source/ui/inc/olesh.hxx48
-rw-r--r--sw/source/ui/inc/olmenu.hxx91
-rw-r--r--sw/source/ui/inc/optcomp.hxx87
-rw-r--r--sw/source/ui/inc/optload.hxx213
-rw-r--r--sw/source/ui/inc/optpage.hxx509
-rw-r--r--sw/source/ui/inc/outline.hxx166
-rw-r--r--sw/source/ui/inc/pardlg.hxx39
-rw-r--r--sw/source/ui/inc/pattern.hxx44
-rw-r--r--sw/source/ui/inc/pgfnote.hxx93
-rw-r--r--sw/source/ui/inc/pggrid.hxx113
-rw-r--r--sw/source/ui/inc/popbox.hxx67
-rw-r--r--sw/source/ui/inc/popup.hrc58
-rw-r--r--sw/source/ui/inc/prcntfld.hxx99
-rw-r--r--sw/source/ui/inc/pview.hxx336
-rw-r--r--sw/source/ui/inc/redlndlg.hxx189
-rw-r--r--sw/source/ui/inc/regionsw.hxx336
-rw-r--r--sw/source/ui/inc/ribbar.hrc132
-rw-r--r--sw/source/ui/inc/rowht.hxx67
-rw-r--r--sw/source/ui/inc/scroll.hxx71
-rw-r--r--sw/source/ui/inc/selglos.hxx74
-rw-r--r--sw/source/ui/inc/sharedconnection.hxx36
-rw-r--r--sw/source/ui/inc/shdwcrsr.hxx67
-rw-r--r--sw/source/ui/inc/shells.hrc112
-rw-r--r--sw/source/ui/inc/split.hxx76
-rw-r--r--sw/source/ui/inc/splittbl.hxx61
-rw-r--r--sw/source/ui/inc/srcedtw.hxx164
-rw-r--r--sw/source/ui/inc/srcview.hxx126
-rw-r--r--sw/source/ui/inc/srtdlg.hxx118
-rw-r--r--sw/source/ui/inc/stmenu.hxx85
-rw-r--r--sw/source/ui/inc/swcont.hxx113
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx222
-rw-r--r--sw/source/ui/inc/swlbox.hxx124
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx48
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.hxx87
-rw-r--r--sw/source/ui/inc/swtablerep.hxx94
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx89
-rw-r--r--sw/source/ui/inc/swuicnttab.hxx539
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx295
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx51
-rw-r--r--sw/source/ui/inc/swvset.hxx41
-rw-r--r--sw/source/ui/inc/swwrtshitem.hxx52
-rw-r--r--sw/source/ui/inc/syncbtn.hxx71
-rw-r--r--sw/source/ui/inc/table.hrc50
-rw-r--r--sw/source/ui/inc/tabledlg.hxx55
-rw-r--r--sw/source/ui/inc/tablemgr.hxx95
-rw-r--r--sw/source/ui/inc/tabsh.hxx58
-rw-r--r--sw/source/ui/inc/tautofmt.hxx118
-rw-r--r--sw/source/ui/inc/tblctrl.hxx57
-rw-r--r--sw/source/ui/inc/tblnumfm.hxx44
-rw-r--r--sw/source/ui/inc/tbxanchr.hxx49
-rw-r--r--sw/source/ui/inc/textcontrolcombo.hxx66
-rw-r--r--sw/source/ui/inc/textsh.hxx90
-rw-r--r--sw/source/ui/inc/tmpdlg.hxx66
-rw-r--r--sw/source/ui/inc/tmplctrl.hxx58
-rw-r--r--sw/source/ui/inc/toolbox.hrc563
-rw-r--r--sw/source/ui/inc/toxmgr.hxx324
-rw-r--r--sw/source/ui/inc/uiborder.hxx49
-rw-r--r--sw/source/ui/inc/uiitems.hxx116
-rw-r--r--sw/source/ui/inc/uinums.hxx136
-rw-r--r--sw/source/ui/inc/uitool.hxx92
-rw-r--r--sw/source/ui/inc/uivwimp.hxx188
-rw-r--r--sw/source/ui/inc/unodispatch.hxx134
-rw-r--r--sw/source/ui/inc/unotools.hxx135
-rw-r--r--sw/source/ui/inc/unotxvw.hxx274
-rw-r--r--sw/source/ui/inc/usrpref.hxx286
-rw-r--r--sw/source/ui/inc/utlui.hrc194
-rw-r--r--sw/source/ui/inc/view.hxx696
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx56
-rw-r--r--sw/source/ui/inc/web.hrc74
-rw-r--r--sw/source/ui/inc/wformsh.hxx45
-rw-r--r--sw/source/ui/inc/wfrmsh.hxx48
-rw-r--r--sw/source/ui/inc/wgrfsh.hxx45
-rw-r--r--sw/source/ui/inc/wlistsh.hxx42
-rw-r--r--sw/source/ui/inc/wolesh.hxx48
-rw-r--r--sw/source/ui/inc/wordcountdialog.hxx65
-rw-r--r--sw/source/ui/inc/workctrl.hxx225
-rw-r--r--sw/source/ui/inc/wrap.hxx151
-rw-r--r--sw/source/ui/inc/wrtsh.hxx652
-rw-r--r--sw/source/ui/inc/wtabsh.hxx42
-rw-r--r--sw/source/ui/inc/wtextsh.hxx48
-rw-r--r--sw/source/ui/inc/wview.hxx51
-rw-r--r--sw/source/ui/inc/zoomctrl.hxx52
-rw-r--r--sw/source/ui/index/cntex.cxx516
-rw-r--r--sw/source/ui/index/cnttab.cxx4553
-rw-r--r--sw/source/ui/index/cnttab.hrc285
-rwxr-xr-xsw/source/ui/index/cnttab.src1356
-rw-r--r--sw/source/ui/index/idxmrk.cxx153
-rw-r--r--sw/source/ui/index/idxmrk.hrc108
-rw-r--r--sw/source/ui/index/idxmrk.src636
-rw-r--r--sw/source/ui/index/multmrk.cxx98
-rw-r--r--sw/source/ui/index/multmrk.hrc34
-rw-r--r--sw/source/ui/index/multmrk.src119
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx1949
-rw-r--r--sw/source/ui/index/toxmgr.cxx529
-rw-r--r--sw/source/ui/lingu/cvdata.mac19
-rwxr-xr-xsw/source/ui/lingu/hhcwrp.cxx818
-rw-r--r--sw/source/ui/lingu/hyp.cxx176
-rw-r--r--sw/source/ui/lingu/olmenu.cxx937
-rw-r--r--sw/source/ui/lingu/olmenu.hrc97
-rw-r--r--sw/source/ui/lingu/olmenu.src137
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.cxx200
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.hxx68
-rw-r--r--sw/source/ui/misc/autocorr.src29
-rw-r--r--sw/source/ui/misc/bookmark.cxx303
-rw-r--r--sw/source/ui/misc/bookmark.hrc34
-rw-r--r--sw/source/ui/misc/bookmark.src118
-rw-r--r--sw/source/ui/misc/docfnote.cxx503
-rw-r--r--sw/source/ui/misc/docfnote.hrc60
-rw-r--r--sw/source/ui/misc/docfnote.src563
-rw-r--r--sw/source/ui/misc/glosbib.cxx579
-rw-r--r--sw/source/ui/misc/glosbib.hrc41
-rw-r--r--sw/source/ui/misc/glosbib.src183
-rw-r--r--sw/source/ui/misc/glosdoc.cxx806
-rw-r--r--sw/source/ui/misc/glossary.cxx1310
-rw-r--r--sw/source/ui/misc/glossary.hrc91
-rw-r--r--sw/source/ui/misc/glossary.src484
-rw-r--r--sw/source/ui/misc/glshell.cxx349
-rw-r--r--sw/source/ui/misc/impfnote.hxx120
-rw-r--r--sw/source/ui/misc/insfnote.cxx357
-rw-r--r--sw/source/ui/misc/insfnote.hrc45
-rw-r--r--sw/source/ui/misc/insfnote.src182
-rw-r--r--sw/source/ui/misc/insrule.cxx226
-rw-r--r--sw/source/ui/misc/insrule.hrc35
-rw-r--r--sw/source/ui/misc/insrule.src114
-rw-r--r--sw/source/ui/misc/linenum.cxx346
-rw-r--r--sw/source/ui/misc/linenum.hrc50
-rw-r--r--sw/source/ui/misc/linenum.src279
-rw-r--r--sw/source/ui/misc/num.cxx1176
-rw-r--r--sw/source/ui/misc/num.hrc55
-rw-r--r--sw/source/ui/misc/num.src374
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx177
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.src98
-rw-r--r--sw/source/ui/misc/outline.cxx1348
-rw-r--r--sw/source/ui/misc/outline.hrc98
-rw-r--r--sw/source/ui/misc/outline.src383
-rw-r--r--sw/source/ui/misc/pgfnote.cxx373
-rw-r--r--sw/source/ui/misc/pgfnote.hrc44
-rw-r--r--sw/source/ui/misc/pgfnote.src200
-rw-r--r--sw/source/ui/misc/pggrid.cxx521
-rw-r--r--sw/source/ui/misc/pggrid.hrc52
-rw-r--r--sw/source/ui/misc/pggrid.src244
-rw-r--r--sw/source/ui/misc/redlndlg.cxx1405
-rw-r--r--sw/source/ui/misc/redlndlg.hrc38
-rw-r--r--sw/source/ui/misc/redlndlg.src148
-rw-r--r--sw/source/ui/misc/srtdlg.cxx532
-rw-r--r--sw/source/ui/misc/srtdlg.hrc65
-rw-r--r--sw/source/ui/misc/srtdlg.src407
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx147
-rw-r--r--sw/source/ui/ribbar/conarc.cxx161
-rw-r--r--sw/source/ui/ribbar/concustomshape.cxx252
-rw-r--r--sw/source/ui/ribbar/conform.cxx144
-rw-r--r--sw/source/ui/ribbar/conpoly.cxx163
-rw-r--r--sw/source/ui/ribbar/conrect.cxx229
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx740
-rw-r--r--sw/source/ui/ribbar/dselect.cxx102
-rwxr-xr-xsw/source/ui/ribbar/inputwin.cxx678
-rw-r--r--sw/source/ui/ribbar/inputwin.hrc84
-rw-r--r--sw/source/ui/ribbar/inputwin.src345
-rw-r--r--sw/source/ui/ribbar/tblctrl.cxx93
-rw-r--r--sw/source/ui/ribbar/tblctrl.hrc35
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx166
-rw-r--r--sw/source/ui/ribbar/tbxanchr.src107
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx943
-rw-r--r--sw/source/ui/ribbar/workctrl.hrc88
-rw-r--r--sw/source/ui/ribbar/workctrl.src467
-rwxr-xr-xsw/source/ui/shells/annotsh.cxx1682
-rw-r--r--sw/source/ui/shells/basesh.cxx2934
-rw-r--r--sw/source/ui/shells/beziersh.cxx356
-rw-r--r--sw/source/ui/shells/drawdlg.cxx259
-rw-r--r--sw/source/ui/shells/drawsh.cxx497
-rw-r--r--sw/source/ui/shells/drformsh.cxx276
-rw-r--r--sw/source/ui/shells/drwbassh.cxx1000
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx1012
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx912
-rw-r--r--sw/source/ui/shells/frmsh.cxx1155
-rw-r--r--sw/source/ui/shells/grfsh.cxx707
-rw-r--r--sw/source/ui/shells/grfshex.cxx150
-rwxr-xr-xsw/source/ui/shells/langhelper.cxx610
-rw-r--r--sw/source/ui/shells/listsh.cxx295
-rw-r--r--sw/source/ui/shells/mediash.cxx222
-rw-r--r--sw/source/ui/shells/olesh.cxx80
-rw-r--r--sw/source/ui/shells/shells.src305
-rw-r--r--sw/source/ui/shells/slotadd.cxx150
-rw-r--r--sw/source/ui/shells/tabsh.cxx1598
-rw-r--r--sw/source/ui/shells/textdrw.cxx143
-rw-r--r--sw/source/ui/shells/textfld.cxx894
-rw-r--r--sw/source/ui/shells/textglos.cxx145
-rw-r--r--sw/source/ui/shells/textidx.cxx261
-rwxr-xr-xsw/source/ui/shells/textsh.cxx1222
-rw-r--r--sw/source/ui/shells/textsh1.cxx1790
-rw-r--r--sw/source/ui/shells/textsh2.cxx312
-rw-r--r--sw/source/ui/shells/txtattr.cxx847
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx370
-rw-r--r--sw/source/ui/shells/txtnum.cxx251
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx186
-rw-r--r--sw/source/ui/smartmenu/stmenu.hrc41
-rw-r--r--sw/source/ui/smartmenu/stmenu.src44
-rw-r--r--sw/source/ui/table/chartins.cxx285
-rw-r--r--sw/source/ui/table/chartins.hrc47
-rw-r--r--sw/source/ui/table/chartins.src130
-rw-r--r--sw/source/ui/table/colwd.cxx123
-rw-r--r--sw/source/ui/table/colwd.hrc36
-rw-r--r--sw/source/ui/table/colwd.src146
-rw-r--r--sw/source/ui/table/convert.cxx281
-rw-r--r--sw/source/ui/table/convert.hrc50
-rw-r--r--sw/source/ui/table/convert.src203
-rw-r--r--sw/source/ui/table/instable.cxx253
-rw-r--r--sw/source/ui/table/instable.hrc49
-rw-r--r--sw/source/ui/table/instable.src199
-rw-r--r--sw/source/ui/table/mergetbl.cxx66
-rw-r--r--sw/source/ui/table/mergetbl.hrc32
-rw-r--r--sw/source/ui/table/mergetbl.src118
-rw-r--r--sw/source/ui/table/rowht.cxx120
-rw-r--r--sw/source/ui/table/rowht.hrc34
-rw-r--r--sw/source/ui/table/rowht.src123
-rw-r--r--sw/source/ui/table/splittbl.cxx79
-rw-r--r--sw/source/ui/table/splittbl.hrc34
-rw-r--r--sw/source/ui/table/splittbl.src129
-rw-r--r--sw/source/ui/table/swtablerep.cxx241
-rw-r--r--sw/source/ui/table/table.src59
-rw-r--r--sw/source/ui/table/tabledlg.cxx2007
-rw-r--r--sw/source/ui/table/tabledlg.hrc111
-rw-r--r--sw/source/ui/table/tabledlg.src788
-rw-r--r--sw/source/ui/table/tablemgr.cxx382
-rw-r--r--sw/source/ui/table/tablepg.hxx238
-rw-r--r--sw/source/ui/table/tautofmt.cxx1057
-rw-r--r--sw/source/ui/table/tautofmt.hrc78
-rw-r--r--sw/source/ui/table/tautofmt.src307
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx617
-rw-r--r--sw/source/ui/uiview/pview.cxx2193
-rw-r--r--sw/source/ui/uiview/pview.hrc72
-rw-r--r--sw/source/ui/uiview/pview.src111
-rw-r--r--sw/source/ui/uiview/scroll.cxx160
-rw-r--r--sw/source/ui/uiview/srcview.cxx955
-rw-r--r--sw/source/ui/uiview/swcli.cxx187
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx345
-rw-r--r--sw/source/ui/uiview/view.cxx1920
-rwxr-xr-xsw/source/ui/uiview/view.hrc90
-rw-r--r--sw/source/ui/uiview/view.src222
-rw-r--r--sw/source/ui/uiview/view0.cxx626
-rw-r--r--sw/source/ui/uiview/view1.cxx219
-rw-r--r--sw/source/ui/uiview/view2.cxx2456
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx98
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx98
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx241
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx849
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx66
-rwxr-xr-xsw/source/ui/uiview/viewling.cxx1005
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx754
-rw-r--r--sw/source/ui/uiview/viewport.cxx1384
-rw-r--r--sw/source/ui/uiview/viewprt.cxx333
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx808
-rw-r--r--sw/source/ui/uiview/viewstat.cxx523
-rw-r--r--sw/source/ui/uiview/viewtab.cxx1865
-rw-r--r--sw/source/ui/uno/RefreshListenerContainer.cxx58
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx1076
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.hxx109
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx217
-rw-r--r--sw/source/ui/uno/detreg.cxx85
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx204
-rw-r--r--sw/source/ui/uno/swdet2.cxx122
-rw-r--r--sw/source/ui/uno/swdetect.cxx488
-rw-r--r--sw/source/ui/uno/swdetect.hxx95
-rw-r--r--sw/source/ui/uno/unoatxt.cxx1308
-rw-r--r--sw/source/ui/uno/unodefaults.cxx72
-rw-r--r--sw/source/ui/uno/unodefaults.hxx48
-rw-r--r--sw/source/ui/uno/unodispatch.cxx448
-rw-r--r--sw/source/ui/uno/unodoc.cxx128
-rw-r--r--sw/source/ui/uno/unofreg.cxx383
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx1253
-rw-r--r--sw/source/ui/uno/unomod.cxx1048
-rw-r--r--sw/source/ui/uno/unomodule.cxx172
-rw-r--r--sw/source/ui/uno/unomodule.hxx98
-rwxr-xr-xsw/source/ui/uno/unotxdoc.cxx4215
-rwxr-xr-xsw/source/ui/uno/unotxvw.cxx2207
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx1350
-rw-r--r--sw/source/ui/utlui/attrdesc.hrc123
-rw-r--r--sw/source/ui/utlui/attrdesc.src384
-rw-r--r--sw/source/ui/utlui/bookctrl.cxx164
-rw-r--r--sw/source/ui/utlui/condedit.cxx108
-rw-r--r--sw/source/ui/utlui/content.cxx3250
-rw-r--r--sw/source/ui/utlui/glbltree.cxx1523
-rw-r--r--sw/source/ui/utlui/gloslst.cxx514
-rw-r--r--sw/source/ui/utlui/gloslst.hrc38
-rw-r--r--sw/source/ui/utlui/gloslst.src109
-rw-r--r--sw/source/ui/utlui/initui.cxx307
-rw-r--r--sw/source/ui/utlui/initui.hrc66
-rw-r--r--sw/source/ui/utlui/initui.src519
-rw-r--r--sw/source/ui/utlui/navicfg.cxx141
-rw-r--r--sw/source/ui/utlui/navipi.cxx1560
-rw-r--r--sw/source/ui/utlui/navipi.hrc90
-rw-r--r--sw/source/ui/utlui/navipi.src549
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx549
-rw-r--r--sw/source/ui/utlui/poolfmt.src766
-rw-r--r--sw/source/ui/utlui/prcntfld.cxx370
-rw-r--r--sw/source/ui/utlui/shdwcrsr.cxx135
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx143
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx113
-rw-r--r--sw/source/ui/utlui/tmplctrl.cxx174
-rw-r--r--sw/source/ui/utlui/uiitems.cxx324
-rw-r--r--sw/source/ui/utlui/uitool.cxx775
-rw-r--r--sw/source/ui/utlui/unotools.cxx522
-rw-r--r--sw/source/ui/utlui/unotools.hrc41
-rw-r--r--sw/source/ui/utlui/unotools.src131
-rw-r--r--sw/source/ui/utlui/utlui.src478
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx209
-rw-r--r--sw/source/ui/utlui/zoomctrl.cxx99
-rw-r--r--sw/source/ui/vba/service.cxx80
-rw-r--r--sw/source/ui/vba/vbaaddin.cxx104
-rw-r--r--sw/source/ui/vba/vbaaddin.hxx59
-rw-r--r--sw/source/ui/vba/vbaaddins.cxx107
-rw-r--r--sw/source/ui/vba/vbaaddins.hxx52
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx203
-rw-r--r--sw/source/ui/vba/vbaapplication.hxx74
-rw-r--r--sw/source/ui/vba/vbaautotextentry.cxx126
-rw-r--r--sw/source/ui/vba/vbaautotextentry.hxx80
-rw-r--r--sw/source/ui/vba/vbabookmark.cxx109
-rw-r--r--sw/source/ui/vba/vbabookmark.hxx65
-rw-r--r--sw/source/ui/vba/vbabookmarks.cxx236
-rw-r--r--sw/source/ui/vba/vbabookmarks.hxx75
-rw-r--r--sw/source/ui/vba/vbaborders.cxx378
-rw-r--r--sw/source/ui/vba/vbaborders.hxx63
-rw-r--r--sw/source/ui/vba/vbadialog.cxx78
-rw-r--r--sw/source/ui/vba/vbadialog.hxx50
-rw-r--r--sw/source/ui/vba/vbadialogs.cxx61
-rw-r--r--sw/source/ui/vba/vbadialogs.hxx53
-rw-r--r--sw/source/ui/vba/vbadocument.cxx381
-rw-r--r--sw/source/ui/vba/vbadocument.hxx80
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx764
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.hxx67
-rw-r--r--sw/source/ui/vba/vbadocuments.cxx178
-rw-r--r--sw/source/ui/vba/vbadocuments.hxx61
-rwxr-xr-xsw/source/ui/vba/vbaeventshelper.cxx103
-rwxr-xr-xsw/source/ui/vba/vbaeventshelper.hxx53
-rw-r--r--sw/source/ui/vba/vbafield.cxx478
-rw-r--r--sw/source/ui/vba/vbafield.hxx77
-rw-r--r--sw/source/ui/vba/vbafind.cxx428
-rw-r--r--sw/source/ui/vba/vbafind.hxx103
-rw-r--r--sw/source/ui/vba/vbafont.cxx216
-rw-r--r--sw/source/ui/vba/vbafont.hxx31
-rw-r--r--sw/source/ui/vba/vbaglobals.cxx193
-rw-r--r--sw/source/ui/vba/vbaglobals.hxx80
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.cxx111
-rw-r--r--sw/source/ui/vba/vbaheaderfooter.hxx60
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.cxx176
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.hxx51
-rw-r--r--sw/source/ui/vba/vbainformationhelper.cxx71
-rw-r--r--sw/source/ui/vba/vbainformationhelper.hxx43
-rw-r--r--sw/source/ui/vba/vbaoptions.cxx284
-rw-r--r--sw/source/ui/vba/vbaoptions.hxx87
-rw-r--r--sw/source/ui/vba/vbapagesetup.cxx272
-rw-r--r--sw/source/ui/vba/vbapagesetup.hxx67
-rw-r--r--sw/source/ui/vba/vbapalette.cxx75
-rw-r--r--sw/source/ui/vba/vbapalette.hxx15
-rw-r--r--sw/source/ui/vba/vbapane.cxx76
-rw-r--r--sw/source/ui/vba/vbapane.hxx54
-rw-r--r--sw/source/ui/vba/vbapanes.cxx124
-rw-r--r--sw/source/ui/vba/vbapanes.hxx57
-rw-r--r--sw/source/ui/vba/vbaparagraph.cxx174
-rw-r--r--sw/source/ui/vba/vbaparagraph.hxx81
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx573
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.hxx95
-rw-r--r--sw/source/ui/vba/vbarange.cxx345
-rw-r--r--sw/source/ui/vba/vbarange.hxx92
-rw-r--r--sw/source/ui/vba/vbarangehelper.cxx171
-rw-r--r--sw/source/ui/vba/vbarangehelper.hxx43
-rw-r--r--sw/source/ui/vba/vbareplacement.cxx71
-rw-r--r--sw/source/ui/vba/vbareplacement.hxx54
-rw-r--r--sw/source/ui/vba/vbasection.cxx87
-rw-r--r--sw/source/ui/vba/vbasection.hxx59
-rw-r--r--sw/source/ui/vba/vbasections.cxx186
-rw-r--r--sw/source/ui/vba/vbasections.hxx59
-rw-r--r--sw/source/ui/vba/vbaselection.cxx679
-rw-r--r--sw/source/ui/vba/vbaselection.hxx105
-rw-r--r--sw/source/ui/vba/vbastyle.cxx149
-rw-r--r--sw/source/ui/vba/vbastyle.hxx67
-rw-r--r--sw/source/ui/vba/vbastyles.cxx377
-rw-r--r--sw/source/ui/vba/vbastyles.hxx51
-rw-r--r--sw/source/ui/vba/vbasystem.cxx187
-rw-r--r--sw/source/ui/vba/vbasystem.hxx71
-rw-r--r--sw/source/ui/vba/vbatable.cxx97
-rw-r--r--sw/source/ui/vba/vbatable.hxx28
-rw-r--r--sw/source/ui/vba/vbatables.cxx131
-rw-r--r--sw/source/ui/vba/vbatables.hxx28
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx103
-rw-r--r--sw/source/ui/vba/vbatemplate.hxx52
-rw-r--r--sw/source/ui/vba/vbavariable.cxx105
-rw-r--r--sw/source/ui/vba/vbavariable.hxx59
-rw-r--r--sw/source/ui/vba/vbavariables.cxx102
-rw-r--r--sw/source/ui/vba/vbavariables.hxx61
-rw-r--r--sw/source/ui/vba/vbaview.cxx422
-rw-r--r--sw/source/ui/vba/vbaview.hxx68
-rw-r--r--sw/source/ui/vba/vbawindow.cxx108
-rw-r--r--sw/source/ui/vba/vbawindow.hxx57
-rw-r--r--sw/source/ui/vba/vbawrapformat.cxx252
-rw-r--r--sw/source/ui/vba/vbawrapformat.hxx69
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx94
-rw-r--r--sw/source/ui/vba/wordvbahelper.hxx54
-rw-r--r--sw/source/ui/web/wdocsh.cxx114
-rw-r--r--sw/source/ui/web/web.src83
-rw-r--r--sw/source/ui/web/wformsh.cxx71
-rw-r--r--sw/source/ui/web/wfrmsh.cxx95
-rw-r--r--sw/source/ui/web/wgrfsh.cxx74
-rw-r--r--sw/source/ui/web/wlistsh.cxx67
-rw-r--r--sw/source/ui/web/wolesh.cxx68
-rw-r--r--sw/source/ui/web/wtabsh.cxx76
-rw-r--r--sw/source/ui/web/wtextsh.cxx99
-rw-r--r--sw/source/ui/web/wview.cxx330
-rw-r--r--sw/source/ui/wrtsh/delete.cxx570
-rw-r--r--sw/source/ui/wrtsh/move.cxx691
-rw-r--r--sw/source/ui/wrtsh/select.cxx1072
-rw-r--r--sw/source/ui/wrtsh/wrtsh.hrc48
-rw-r--r--sw/source/ui/wrtsh/wrtsh.src52
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx1912
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx498
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx247
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx300
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx179
-rw-r--r--sw/uiconfig/layout/delzip1
-rw-r--r--sw/uiconfig/layout/layout.mk33
-rw-r--r--sw/uiconfig/layout/wordcount.xml50
-rwxr-xr-xsw/uiconfig/sglobal/menubar/menubar.xml459
-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/findbar.xml8
-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.xml24
-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
-rwxr-xr-xsw/uiconfig/sweb/menubar/menubar.xml388
-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/findbar.xml8
-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.xml24
-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
-rwxr-xr-xsw/uiconfig/swform/menubar/menubar.xml454
-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.xml24
-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
-rwxr-xr-xsw/uiconfig/swreport/menubar/menubar.xml454
-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.xml24
-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
-rwxr-xr-xsw/uiconfig/swriter/menubar/menubar.xml462
-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/findbar.xml8
-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.xml24
-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
-rwxr-xr-xsw/uiconfig/swxform/menubar/menubar.xml455
-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/findbar.xml8
-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.xml24
-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.hrc31
-rw-r--r--sw/util/hidother.src374
-rw-r--r--sw/util/msword.component37
-rw-r--r--sw/util/sw.component104
-rw-r--r--sw/util/swd.component36
-rw-r--r--sw/util/vbaswobj.component43
-rw-r--r--sw/xml/writer.xml1244
2223 files changed, 968507 insertions, 0 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
new file mode 100644
index 000000000000..271e7577e6c7
--- /dev/null
+++ b/sw/AllLangResTarget_sw.mk
@@ -0,0 +1,185 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,sw))
+
+$(eval $(call gb_AllLangResTarget_add_srs,sw,\
+ sw/res \
+))
+
+$(eval $(call gb_SrsTarget_SrsTarget,sw/res))
+
+$(eval $(call gb_SrsTarget_set_include,sw/res,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc \
+ -I$(WORKDIR)/inc/sw \
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/undo \
+ -I$(SRCDIR)/sw/source/core/unocore \
+ -I$(SRCDIR)/sw/source/ui/chrdlg \
+ -I$(SRCDIR)/sw/source/ui/config \
+ -I$(SRCDIR)/sw/source/ui/dbui \
+ -I$(SRCDIR)/sw/source/ui/dialog \
+ -I$(SRCDIR)/sw/source/ui/docvw \
+ -I$(SRCDIR)/sw/source/ui/envelp \
+ -I$(SRCDIR)/sw/source/ui/fldui \
+ -I$(SRCDIR)/sw/source/ui/fmtui \
+ -I$(SRCDIR)/sw/source/ui/frmdlg \
+ -I$(SRCDIR)/sw/source/ui/globdoc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/source/ui/index \
+ -I$(SRCDIR)/sw/source/ui/lingu \
+ -I$(SRCDIR)/sw/source/ui/misc \
+ -I$(SRCDIR)/sw/source/ui/ribbar \
+ -I$(SRCDIR)/sw/source/ui/shells \
+ -I$(SRCDIR)/sw/source/ui/smartmenu \
+ -I$(SRCDIR)/sw/source/ui/table \
+ -I$(SRCDIR)/sw/source/ui/uiview \
+ -I$(SRCDIR)/sw/source/ui/utlui \
+ -I$(SRCDIR)/sw/source/ui/web \
+ -I$(SRCDIR)/sw/source/ui/wrtsh \
+))
+
+$(eval $(call gb_SrsTarget_add_files,sw/res,\
+ sw/source/core/undo/undo.src \
+ sw/source/core/unocore/unocore.src \
+ sw/source/ui/app/app.src \
+ sw/source/ui/app/error.src \
+ sw/source/ui/app/mn.src \
+ sw/source/ui/chrdlg/ccoll.src \
+ sw/source/ui/chrdlg/chardlg.src \
+ sw/source/ui/chrdlg/chrdlg.src \
+ sw/source/ui/chrdlg/drpcps.src \
+ sw/source/ui/chrdlg/numpara.src \
+ sw/source/ui/chrdlg/paradlg.src \
+ sw/source/ui/chrdlg/swbreak.src \
+ sw/source/ui/config/mailconfigpage.src \
+ sw/source/ui/config/optcomp.src \
+ sw/source/ui/config/optdlg.src \
+ sw/source/ui/config/optload.src \
+ sw/source/ui/config/redlopt.src \
+ sw/source/ui/dbui/addresslistdialog.src \
+ sw/source/ui/dbui/createaddresslistdialog.src \
+ sw/source/ui/dbui/customizeaddresslistdialog.src \
+ sw/source/ui/dbui/dbinsdlg.src \
+ sw/source/ui/dbui/dbtablepreviewdialog.src \
+ sw/source/ui/dbui/dbui.src \
+ sw/source/ui/dbui/mailmergechildwindow.src \
+ sw/source/ui/dbui/mailmergewizard.src \
+ sw/source/ui/dbui/mmaddressblockpage.src \
+ sw/source/ui/dbui/mmdocselectpage.src \
+ sw/source/ui/dbui/mmgreetingspage.src \
+ sw/source/ui/dbui/mmlayoutpage.src \
+ sw/source/ui/dbui/mmmergepage.src \
+ sw/source/ui/dbui/mmoutputpage.src \
+ sw/source/ui/dbui/mmoutputtypepage.src \
+ sw/source/ui/dbui/mmpreparemergepage.src \
+ sw/source/ui/dbui/selectdbtabledialog.src \
+ sw/source/ui/dialog/abstract.src \
+ sw/source/ui/dialog/ascfldlg.src \
+ sw/source/ui/dialog/dialog.src \
+ sw/source/ui/dialog/docstdlg.src \
+ sw/source/ui/dialog/regionsw.src \
+ sw/source/ui/dialog/wordcountdialog.src \
+ sw/source/ui/dochdl/dochdl.src \
+ sw/source/ui/dochdl/selglos.src \
+ sw/source/ui/docvw/annotation.src \
+ sw/source/ui/docvw/access.src \
+ sw/source/ui/docvw/docvw.src \
+ sw/source/ui/envelp/envelp.src \
+ sw/source/ui/envelp/envfmt.src \
+ sw/source/ui/envelp/envlop.src \
+ sw/source/ui/envelp/envprt.src \
+ sw/source/ui/envelp/label.src \
+ sw/source/ui/envelp/labfmt.src \
+ sw/source/ui/envelp/labprt.src \
+ sw/source/ui/envelp/mailmrge.src \
+ sw/source/ui/fldui/DropDownFieldDialog.src \
+ sw/source/ui/fldui/changedb.src \
+ sw/source/ui/fldui/flddb.src \
+ sw/source/ui/fldui/flddinf.src \
+ sw/source/ui/fldui/flddok.src \
+ sw/source/ui/fldui/fldfunc.src \
+ sw/source/ui/fldui/fldref.src \
+ sw/source/ui/fldui/fldtdlg.src \
+ sw/source/ui/fldui/fldui.src \
+ sw/source/ui/fldui/fldvar.src \
+ sw/source/ui/fldui/inpdlg.src \
+ sw/source/ui/fldui/javaedit.src \
+ sw/source/ui/fmtui/tmpdlg.src \
+ sw/source/ui/frmdlg/column.src \
+ sw/source/ui/frmdlg/cption.src \
+ sw/source/ui/frmdlg/frmpage.src \
+ sw/source/ui/frmdlg/frmui.src \
+ sw/source/ui/frmdlg/wrap.src \
+ sw/source/ui/globdoc/globdoc.src \
+ sw/source/ui/index/cnttab.src \
+ sw/source/ui/index/idxmrk.src \
+ sw/source/ui/index/multmrk.src \
+ sw/source/ui/lingu/olmenu.src \
+ sw/source/ui/misc/autocorr.src \
+ sw/source/ui/misc/bookmark.src \
+ sw/source/ui/misc/docfnote.src \
+ sw/source/ui/misc/glosbib.src \
+ sw/source/ui/misc/glossary.src \
+ sw/source/ui/misc/insfnote.src \
+ sw/source/ui/misc/insrule.src \
+ sw/source/ui/misc/linenum.src \
+ sw/source/ui/misc/num.src \
+ sw/source/ui/misc/numberingtypelistbox.src \
+ sw/source/ui/misc/outline.src \
+ sw/source/ui/misc/pgfnote.src \
+ sw/source/ui/misc/pggrid.src \
+ sw/source/ui/misc/redlndlg.src \
+ sw/source/ui/misc/srtdlg.src \
+ sw/source/ui/ribbar/inputwin.src \
+ sw/source/ui/ribbar/tbxanchr.src \
+ sw/source/ui/ribbar/workctrl.src \
+ sw/source/ui/shells/shells.src \
+ sw/source/ui/smartmenu/stmenu.src \
+ sw/source/ui/table/chartins.src \
+ sw/source/ui/table/colwd.src \
+ sw/source/ui/table/convert.src \
+ sw/source/ui/table/instable.src \
+ sw/source/ui/table/mergetbl.src \
+ sw/source/ui/table/rowht.src \
+ sw/source/ui/table/splittbl.src \
+ sw/source/ui/table/table.src \
+ sw/source/ui/table/tabledlg.src \
+ sw/source/ui/table/tautofmt.src \
+ sw/source/ui/uiview/pview.src \
+ sw/source/ui/uiview/view.src \
+ sw/source/ui/utlui/attrdesc.src \
+ sw/source/ui/utlui/gloslst.src \
+ sw/source/ui/utlui/initui.src \
+ sw/source/ui/utlui/navipi.src \
+ sw/source/ui/utlui/poolfmt.src \
+ sw/source/ui/utlui/unotools.src \
+ sw/source/ui/utlui/utlui.src \
+ sw/source/ui/web/web.src \
+ sw/source/ui/wrtsh/wrtsh.src \
+))
diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
new file mode 100755
index 000000000000..df81b22f712d
--- /dev/null
+++ b/sw/JunitTest_sw_complex.mk
@@ -0,0 +1,70 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,sw_complex))
+
+$(eval $(call gb_JunitTest_set_defs,sw_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/complex/writer/testdocuments \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
+ sw/qa/complex/checkColor/CheckChangeColor \
+ sw/qa/complex/indeterminateState/CheckIndeterminateState \
+ sw/qa/complex/writer/CheckCrossReferences \
+ sw/qa/complex/writer/LoadSaveTest \
+ sw/qa/complex/writer/CheckNamedPropertyValues \
+ sw/qa/complex/writer/CheckIndexedPropertyValues \
+ sw/qa/complex/writer/TestDocument \
+ sw/qa/complex/writer/CheckBookmarks \
+ sw/qa/complex/writer/CheckFlies \
+ sw/qa/complex/writer/TextPortionEnumerationTest \
+ sw/qa/complex/accessibility/AccessibleRelationSet \
+))
+
+$(eval $(call gb_JunitTest_add_jars,sw_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_classes,sw_complex,\
+ complex.accessibility.AccessibleRelationSet \
+ complex.checkColor.CheckChangeColor \
+ complex.writer.CheckCrossReferences \
+ complex.writer.CheckFlies \
+ complex.writer.CheckIndexedPropertyValues \
+ complex.writer.CheckNamedPropertyValues \
+ complex.writer.TextPortionEnumerationTest \
+))
+
+# currently fails (should run again in os146) (except on windows)
+# complex.writer.CheckBookmarks \
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/JunitTest_sw_unoapi.mk b/sw/JunitTest_sw_unoapi.mk
new file mode 100755
index 000000000000..d41ebcd2e839
--- /dev/null
+++ b/sw/JunitTest_sw_unoapi.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,sw_unoapi))
+
+$(eval $(call gb_JunitTest_set_defs,sw_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sw/qa/unoapi/sw.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sw/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/unoapi/testdocuments \
+))
+
+$(eval $(call gb_JunitTest_add_jars,sw_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,sw_unoapi,\
+ sw/qa/unoapi/Test \
+))
+
+$(eval $(call gb_JunitTest_add_classes,sw_unoapi,\
+ org.openoffice.sw.qa.unoapi.Test \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
new file mode 100644
index 000000000000..530fa53908b7
--- /dev/null
+++ b/sw/Library_msword.mk
@@ -0,0 +1,116 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,msword))
+
+$(eval $(call gb_Library_set_componentfile,msword,sw/util/msword))
+
+$(eval $(call gb_Library_set_include,msword,\
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/inc \
+ -I$(WORKDIR)/inc/sw/sdi \
+ -I$(WORKDIR)/Misc/sw/ \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc/sw \
+))
+
+$(eval $(call gb_Library_set_defs,msword,\
+ $$(DEFS) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,msword,\
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ i18nisolang1 \
+ i18nutil \
+ icuuc \
+ msfilter \
+ sal \
+ sfx \
+ sot \
+ stl \
+ svl \
+ svt \
+ svx \
+ svx \
+ svxcore \
+ sw \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,msword,\
+ sw/source/filter/rtf/rtffld \
+ sw/source/filter/rtf/rtffly \
+ sw/source/filter/rtf/rtfnum \
+ sw/source/filter/rtf/rtftbl \
+ sw/source/filter/rtf/swparrtf \
+ sw/source/filter/ww8/rtfattributeoutput \
+ sw/source/filter/ww8/rtfexport \
+ sw/source/filter/ww8/rtfexportfilter \
+ sw/source/filter/ww8/rtfimportfilter \
+ sw/source/filter/ww8/rtfsdrexport \
+ sw/source/filter/ww8/WW8FFData \
+ sw/source/filter/ww8/WW8FibData \
+ sw/source/filter/ww8/WW8Sttbf \
+ sw/source/filter/ww8/WW8TableInfo \
+ sw/source/filter/ww8/fields \
+ sw/source/filter/ww8/styles \
+ sw/source/filter/ww8/tracer \
+ sw/source/filter/ww8/writerhelper \
+ sw/source/filter/ww8/writerwordglue \
+ sw/source/filter/ww8/wrtw8esh \
+ sw/source/filter/ww8/wrtw8nds \
+ sw/source/filter/ww8/wrtw8num \
+ sw/source/filter/ww8/wrtw8sty \
+ sw/source/filter/ww8/wrtww8 \
+ sw/source/filter/ww8/wrtww8gr \
+ sw/source/filter/ww8/ww8atr \
+ sw/source/filter/ww8/ww8glsy \
+ sw/source/filter/ww8/ww8graf \
+ sw/source/filter/ww8/ww8graf2 \
+ sw/source/filter/ww8/ww8par \
+ sw/source/filter/ww8/ww8par2 \
+ sw/source/filter/ww8/ww8par3 \
+ sw/source/filter/ww8/ww8par4 \
+ sw/source/filter/ww8/ww8par5 \
+ sw/source/filter/ww8/ww8par6 \
+ sw/source/filter/ww8/ww8scan \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
new file mode 100644
index 000000000000..d097896087ba
--- /dev/null
+++ b/sw/Library_sw.mk
@@ -0,0 +1,738 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,sw))
+
+$(eval $(call gb_Library_add_sdi_headers,sw,sw/sdi/swslots))
+
+$(eval $(call gb_Library_add_precompiled_header,sw,$(SRCDIR)/sw/inc/pch/precompiled_sw))
+
+$(eval $(call gb_Library_set_componentfile,sw,sw/util/sw))
+
+$(eval $(call gb_Library_set_include,sw,\
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/inc \
+ -I$(WORKDIR)/SdiTarget/sw/sdi \
+ -I$(WORKDIR)/Misc/sw/ \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_Library_set_defs,sw,\
+ $$(DEFS) \
+ -DSW_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,sw,\
+ avmedia \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ drawinglayer \
+ editeng \
+ i18nisolang1 \
+ i18nutil \
+ icuuc \
+ lng \
+ sal \
+ salhelper \
+ sb \
+ sfx \
+ sot \
+ stl \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vbahelper \
+ vcl \
+ vos3 \
+ xo \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,sw,\
+ sw/source/core/SwNumberTree/SwNodeNum \
+ sw/source/core/SwNumberTree/SwNumberTree \
+ sw/source/core/access/acccell \
+ sw/source/core/access/acccontext \
+ sw/source/core/access/accdoc \
+ sw/source/core/access/accembedded \
+ sw/source/core/access/accfootnote \
+ sw/source/core/access/accframe \
+ sw/source/core/access/accframebase\
+ sw/source/core/access/accfrmobj \
+ sw/source/core/access/accfrmobjmap \
+ sw/source/core/access/accfrmobjslist \
+ sw/source/core/access/accgraphic \
+ sw/source/core/access/accheaderfooter \
+ sw/source/core/access/acchyperlink \
+ sw/source/core/access/acchypertextdata \
+ sw/source/core/access/accmap \
+ sw/source/core/access/accnotextframe \
+ sw/source/core/access/accpage \
+ sw/source/core/access/accpara \
+ sw/source/core/access/accportions \
+ sw/source/core/access/accpreview \
+ sw/source/core/access/accselectionhelper \
+ sw/source/core/access/acctable \
+ sw/source/core/access/acctextframe \
+ sw/source/core/access/parachangetrackinginfo \
+ sw/source/core/access/textmarkuphelper \
+ sw/source/core/attr/calbck \
+ sw/source/core/attr/cellatr \
+ sw/source/core/attr/fmtfollowtextflow \
+ sw/source/core/attr/fmtwrapinfluenceonobjpos \
+ sw/source/core/attr/format \
+ sw/source/core/attr/hints \
+ sw/source/core/attr/swatrset \
+ sw/source/core/bastyp/SwSmartTagMgr \
+ sw/source/core/bastyp/bparr \
+ sw/source/core/bastyp/breakit \
+ sw/source/core/bastyp/calc \
+ sw/source/core/bastyp/checkit \
+ sw/source/core/bastyp/index \
+ sw/source/core/bastyp/init \
+ sw/source/core/bastyp/ring \
+ sw/source/core/bastyp/swcache \
+ sw/source/core/bastyp/swrect \
+ sw/source/core/bastyp/swregion \
+ sw/source/core/bastyp/swtypes \
+ sw/source/core/bastyp/tabcol \
+ sw/source/core/crsr/BlockCursor \
+ sw/source/core/crsr/bookmrk \
+ sw/source/core/crsr/callnk \
+ sw/source/core/crsr/crbm \
+ sw/source/core/crsr/crossrefbookmark \
+ sw/source/core/crsr/crsrsh \
+ sw/source/core/crsr/crstrvl \
+ sw/source/core/crsr/crstrvl1 \
+ sw/source/core/crsr/findattr \
+ sw/source/core/crsr/findcoll \
+ sw/source/core/crsr/findfmt \
+ sw/source/core/crsr/findtxt \
+ sw/source/core/crsr/pam \
+ sw/source/core/crsr/paminit \
+ sw/source/core/crsr/swcrsr \
+ sw/source/core/crsr/trvlcol \
+ sw/source/core/crsr/trvlfnfl \
+ sw/source/core/crsr/trvlreg \
+ sw/source/core/crsr/trvltbl \
+ sw/source/core/crsr/unocrsr \
+ sw/source/core/crsr/viscrs \
+ sw/source/core/doc/SwStyleNameMapper \
+ sw/source/core/doc/acmplwrd \
+ sw/source/core/doc/dbgoutsw \
+ sw/source/core/doc/doc \
+ sw/source/core/doc/docbasic \
+ sw/source/core/doc/docbm \
+ sw/source/core/doc/docchart \
+ sw/source/core/doc/doccomp \
+ sw/source/core/doc/doccorr \
+ sw/source/core/doc/docdde \
+ sw/source/core/doc/docdesc \
+ sw/source/core/doc/docdraw \
+ sw/source/core/doc/docedt \
+ sw/source/core/doc/docfld \
+ sw/source/core/doc/docfly \
+ sw/source/core/doc/docfmt \
+ sw/source/core/doc/docftn \
+ sw/source/core/doc/docglbl \
+ sw/source/core/doc/docglos \
+ sw/source/core/doc/doclay \
+ sw/source/core/doc/docnew \
+ sw/source/core/doc/docnum \
+ sw/source/core/doc/docredln \
+ sw/source/core/doc/docruby \
+ sw/source/core/doc/docsort \
+ sw/source/core/doc/docstat \
+ sw/source/core/doc/doctxm \
+ sw/source/core/doc/docxforms \
+ sw/source/core/doc/extinput \
+ sw/source/core/doc/fmtcol \
+ sw/source/core/doc/ftnidx \
+ sw/source/core/doc/gctable \
+ sw/source/core/doc/htmltbl \
+ sw/source/core/doc/lineinfo \
+ sw/source/core/doc/list \
+ sw/source/core/doc/notxtfrm \
+ sw/source/core/doc/number \
+ sw/source/core/doc/poolfmt \
+ sw/source/core/doc/sortopt \
+ sw/source/core/doc/swserv \
+ sw/source/core/doc/swstylemanager \
+ sw/source/core/doc/tblafmt \
+ sw/source/core/doc/tblcpy \
+ sw/source/core/doc/tblrwcl \
+ sw/source/core/doc/visiturl \
+ sw/source/core/docnode/cancellablejob \
+ sw/source/core/docnode/finalthreadmanager \
+ sw/source/core/docnode/ndcopy \
+ sw/source/core/docnode/ndindex \
+ sw/source/core/docnode/ndnotxt \
+ sw/source/core/docnode/ndnum \
+ sw/source/core/docnode/ndsect \
+ sw/source/core/docnode/ndtbl \
+ sw/source/core/docnode/ndtbl1 \
+ sw/source/core/docnode/node \
+ sw/source/core/docnode/node2lay \
+ sw/source/core/docnode/nodes \
+ sw/source/core/docnode/observablethread \
+ sw/source/core/docnode/pausethreadstarting \
+ sw/source/core/docnode/retrievedinputstreamdata \
+ sw/source/core/docnode/retrieveinputstream \
+ sw/source/core/docnode/retrieveinputstreamconsumer \
+ sw/source/core/docnode/section \
+ sw/source/core/docnode/swbaslnk \
+ sw/source/core/docnode/swthreadjoiner \
+ sw/source/core/docnode/swthreadmanager \
+ sw/source/core/docnode/threadlistener \
+ sw/source/core/docnode/threadmanager \
+ sw/source/core/draw/dcontact \
+ sw/source/core/draw/dflyobj \
+ sw/source/core/draw/dobjfac \
+ sw/source/core/draw/dpage \
+ sw/source/core/draw/drawdoc \
+ sw/source/core/draw/dview \
+ sw/source/core/edit/acorrect \
+ sw/source/core/edit/autofmt \
+ sw/source/core/edit/edatmisc \
+ sw/source/core/edit/edattr \
+ sw/source/core/edit/eddel \
+ sw/source/core/edit/edfcol \
+ sw/source/core/edit/edfld \
+ sw/source/core/edit/edfldexp \
+ sw/source/core/edit/edfmt \
+ sw/source/core/edit/edglbldc \
+ sw/source/core/edit/edglss \
+ sw/source/core/edit/editsh \
+ sw/source/core/edit/edlingu \
+ sw/source/core/edit/ednumber \
+ sw/source/core/edit/edredln \
+ sw/source/core/edit/edsect \
+ sw/source/core/edit/edtab \
+ sw/source/core/edit/edtox \
+ sw/source/core/edit/edundo \
+ sw/source/core/edit/edws \
+ sw/source/core/except/dbgloop \
+ sw/source/core/except/errhdl \
+ sw/source/core/fields/authfld \
+ sw/source/core/fields/cellfml \
+ sw/source/core/fields/chpfld \
+ sw/source/core/fields/dbfld \
+ sw/source/core/fields/ddefld \
+ sw/source/core/fields/ddetbl \
+ sw/source/core/fields/docufld \
+ sw/source/core/fields/expfld \
+ sw/source/core/fields/fldbas \
+ sw/source/core/fields/flddat \
+ sw/source/core/fields/flddropdown \
+ sw/source/core/fields/fldlst \
+ sw/source/core/fields/macrofld \
+ sw/source/core/fields/postithelper \
+ sw/source/core/fields/reffld \
+ sw/source/core/fields/scrptfld \
+ sw/source/core/fields/tblcalc \
+ sw/source/core/fields/textapi \
+ sw/source/core/fields/usrfld \
+ sw/source/core/frmedt/fecopy \
+ sw/source/core/frmedt/fedesc \
+ sw/source/core/frmedt/fefly1 \
+ sw/source/core/frmedt/feflyole \
+ sw/source/core/frmedt/feshview \
+ sw/source/core/frmedt/fetab \
+ sw/source/core/frmedt/fews \
+ sw/source/core/frmedt/tblsel \
+ sw/source/core/graphic/grfatr \
+ sw/source/core/graphic/ndgrf \
+ sw/source/core/layout/anchoreddrawobject \
+ sw/source/core/layout/anchoredobject \
+ sw/source/core/layout/atrfrm \
+ sw/source/core/layout/calcmove \
+ sw/source/core/layout/colfrm \
+ sw/source/core/layout/dbg_lay \
+ sw/source/core/layout/findfrm \
+ sw/source/core/layout/flowfrm \
+ sw/source/core/layout/fly \
+ sw/source/core/layout/flycnt \
+ sw/source/core/layout/flyincnt \
+ sw/source/core/layout/flylay \
+ sw/source/core/layout/flypos \
+ sw/source/core/layout/frmtool \
+ sw/source/core/layout/ftnfrm \
+ sw/source/core/layout/hffrm \
+ sw/source/core/layout/layact \
+ sw/source/core/layout/laycache \
+ sw/source/core/layout/layouter \
+ sw/source/core/layout/movedfwdfrmsbyobjpos \
+ sw/source/core/layout/newfrm \
+ sw/source/core/layout/objectformatter \
+ sw/source/core/layout/objectformatterlayfrm \
+ sw/source/core/layout/objectformattertxtfrm \
+ sw/source/core/layout/objstmpconsiderwrapinfl \
+ sw/source/core/layout/pagechg \
+ sw/source/core/layout/pagedesc \
+ sw/source/core/layout/paintfrm \
+ sw/source/core/layout/sectfrm \
+ sw/source/core/layout/softpagebreak \
+ sw/source/core/layout/sortedobjs \
+ sw/source/core/layout/sortedobjsimpl \
+ sw/source/core/layout/ssfrm \
+ sw/source/core/layout/swselectionlist \
+ sw/source/core/layout/tabfrm \
+ sw/source/core/layout/trvlfrm \
+ sw/source/core/layout/unusedf \
+ sw/source/core/layout/virtoutp \
+ sw/source/core/layout/wsfrm \
+ sw/source/core/objectpositioning/anchoredobjectposition \
+ sw/source/core/objectpositioning/ascharanchoredobjectposition \
+ sw/source/core/objectpositioning/environmentofanchoredobject \
+ sw/source/core/objectpositioning/tocntntanchoredobjectposition \
+ sw/source/core/objectpositioning/tolayoutanchoredobjectposition \
+ sw/source/core/ole/ndole \
+ sw/source/core/para/paratr \
+ sw/source/core/sw3io/sw3convert \
+ sw/source/core/sw3io/swacorr \
+ sw/source/core/swg/SwXMLBlockExport \
+ sw/source/core/swg/SwXMLBlockImport \
+ sw/source/core/swg/SwXMLBlockListContext \
+ sw/source/core/swg/SwXMLSectionList \
+ sw/source/core/swg/SwXMLTextBlocks \
+ sw/source/core/swg/SwXMLTextBlocks1 \
+ sw/source/core/swg/swblocks \
+ sw/source/core/table/swnewtable \
+ sw/source/core/table/swtable \
+ sw/source/core/text/EnhancedPDFExportHelper \
+ sw/source/core/text/SwGrammarMarkUp \
+ sw/source/core/text/atrstck \
+ sw/source/core/text/blink \
+ sw/source/core/text/frmcrsr \
+ sw/source/core/text/frmform \
+ sw/source/core/text/frminf \
+ sw/source/core/text/frmpaint \
+ sw/source/core/text/guess \
+ sw/source/core/text/inftxt \
+ sw/source/core/text/itradj \
+ sw/source/core/text/itratr \
+ sw/source/core/text/itrcrsr \
+ sw/source/core/text/itrform2 \
+ sw/source/core/text/itrpaint \
+ sw/source/core/text/itrtxt \
+ sw/source/core/text/noteurl \
+ sw/source/core/text/porexp \
+ sw/source/core/text/porfld \
+ sw/source/core/text/porfly \
+ sw/source/core/text/porglue \
+ sw/source/core/text/porlay \
+ sw/source/core/text/porlin \
+ sw/source/core/text/pormulti \
+ sw/source/core/text/porref \
+ sw/source/core/text/porrst \
+ sw/source/core/text/portox \
+ sw/source/core/text/portxt \
+ sw/source/core/text/redlnitr \
+ sw/source/core/text/txtcache \
+ sw/source/core/text/txtdrop \
+ sw/source/core/text/txtfld \
+ sw/source/core/text/txtfly \
+ sw/source/core/text/txtfrm \
+ sw/source/core/text/txtftn \
+ sw/source/core/text/txthyph \
+ sw/source/core/text/txtinit \
+ sw/source/core/text/txtio \
+ sw/source/core/text/txtpaint \
+ sw/source/core/text/txttab \
+ sw/source/core/text/widorp \
+ sw/source/core/text/wrong \
+ sw/source/core/tox/tox \
+ sw/source/core/tox/toxhlp \
+ sw/source/core/tox/txmsrt \
+ sw/source/core/txtnode/SwGrammarContact \
+ sw/source/core/txtnode/atrfld \
+ sw/source/core/txtnode/atrflyin \
+ sw/source/core/txtnode/atrftn \
+ sw/source/core/txtnode/atrref \
+ sw/source/core/txtnode/atrtox \
+ sw/source/core/txtnode/chrfmt \
+ sw/source/core/txtnode/fmtatr2 \
+ sw/source/core/txtnode/fntcache \
+ sw/source/core/txtnode/fntcap \
+ sw/source/core/txtnode/modeltoviewhelper \
+ sw/source/core/txtnode/ndhints \
+ sw/source/core/txtnode/ndtxt \
+ sw/source/core/txtnode/swfntcch \
+ sw/source/core/txtnode/swfont \
+ sw/source/core/txtnode/thints \
+ sw/source/core/txtnode/txatbase \
+ sw/source/core/txtnode/txatritr \
+ sw/source/core/txtnode/txtatr2 \
+ sw/source/core/txtnode/txtedt \
+ sw/source/core/undo/SwRewriter \
+ sw/source/core/undo/SwUndoField \
+ sw/source/core/undo/SwUndoFmt \
+ sw/source/core/undo/SwUndoPageDesc \
+ sw/source/core/undo/SwUndoTOXChange \
+ sw/source/core/undo/docundo \
+ sw/source/core/undo/rolbck \
+ sw/source/core/undo/unattr \
+ sw/source/core/undo/unbkmk \
+ sw/source/core/undo/undel \
+ sw/source/core/undo/undobj \
+ sw/source/core/undo/undobj1 \
+ sw/source/core/undo/undoflystrattr \
+ sw/source/core/undo/undraw \
+ sw/source/core/undo/unfmco \
+ sw/source/core/undo/unins \
+ sw/source/core/undo/unmove \
+ sw/source/core/undo/unnum \
+ sw/source/core/undo/unoutl \
+ sw/source/core/undo/unovwr \
+ sw/source/core/undo/unredln \
+ sw/source/core/undo/unsect \
+ sw/source/core/undo/unsort \
+ sw/source/core/undo/unspnd \
+ sw/source/core/undo/untbl \
+ sw/source/core/undo/untblk \
+ sw/source/core/unocore/SwXTextDefaults \
+ sw/source/core/unocore/TextCursorHelper \
+ sw/source/core/unocore/XMLRangeHelper \
+ sw/source/core/unocore/swunohelper \
+ sw/source/core/unocore/unobkm \
+ sw/source/core/unocore/unochart \
+ sw/source/core/unocore/unocoll \
+ sw/source/core/unocore/unocrsrhelper \
+ sw/source/core/unocore/unodraw \
+ sw/source/core/unocore/unoevent \
+ sw/source/core/unocore/unoevtlstnr \
+ sw/source/core/unocore/unofield \
+ sw/source/core/unocore/unoflatpara \
+ sw/source/core/unocore/unoframe \
+ sw/source/core/unocore/unoftn \
+ sw/source/core/unocore/unoidx \
+ sw/source/core/unocore/unomap \
+ sw/source/core/unocore/unoobj \
+ sw/source/core/unocore/unoobj2 \
+ sw/source/core/unocore/unoparagraph \
+ sw/source/core/unocore/unoport \
+ sw/source/core/unocore/unoportenum \
+ sw/source/core/unocore/unoprnms \
+ sw/source/core/unocore/unoredline \
+ sw/source/core/unocore/unoredlines \
+ sw/source/core/unocore/unorefmk \
+ sw/source/core/unocore/unosect \
+ sw/source/core/unocore/unosett \
+ sw/source/core/unocore/unosrch \
+ sw/source/core/unocore/unostyle \
+ sw/source/core/unocore/unotbl \
+ sw/source/core/unocore/unotext \
+ sw/source/core/unocore/unotextmarkup \
+ sw/source/core/view/pagepreviewlayout \
+ sw/source/core/view/printdata \
+ sw/source/core/view/vdraw \
+ sw/source/core/view/viewimp \
+ sw/source/core/view/viewpg \
+ sw/source/core/view/viewsh \
+ sw/source/core/view/vnew \
+ sw/source/core/view/vprint \
+ sw/source/filter/ascii/ascatr \
+ sw/source/filter/ascii/parasc \
+ sw/source/filter/ascii/wrtasc \
+ sw/source/filter/basflt/docfact \
+ sw/source/filter/basflt/fltini \
+ sw/source/filter/basflt/iodetect \
+ sw/source/filter/basflt/shellio \
+ sw/source/filter/html/SwAppletImpl \
+ sw/source/filter/html/css1atr \
+ sw/source/filter/html/css1kywd \
+ sw/source/filter/html/htmlatr \
+ sw/source/filter/html/htmlbas \
+ sw/source/filter/html/htmlcss1 \
+ sw/source/filter/html/htmlctxt \
+ sw/source/filter/html/htmldraw \
+ sw/source/filter/html/htmlfld \
+ sw/source/filter/html/htmlfldw \
+ sw/source/filter/html/htmlfly \
+ sw/source/filter/html/htmlflyt \
+ sw/source/filter/html/htmlform \
+ sw/source/filter/html/htmlforw \
+ sw/source/filter/html/htmlftn \
+ sw/source/filter/html/htmlgrin \
+ sw/source/filter/html/htmlnum \
+ sw/source/filter/html/htmlplug \
+ sw/source/filter/html/htmlsect \
+ sw/source/filter/html/htmltab \
+ sw/source/filter/html/htmltabw \
+ sw/source/filter/html/parcss1 \
+ sw/source/filter/html/svxcss1 \
+ sw/source/filter/html/swhtml \
+ sw/source/filter/html/wrthtml \
+ sw/source/filter/writer/writer \
+ sw/source/filter/writer/wrt_fn \
+ sw/source/filter/writer/wrtswtbl \
+ sw/source/filter/ww1/fltshell \
+ sw/source/filter/ww1/w1class \
+ sw/source/filter/ww1/w1filter \
+ sw/source/filter/ww1/w1par \
+ sw/source/filter/ww1/w1sprm \
+ sw/source/filter/xml/XMLRedlineImportHelper \
+ sw/source/filter/xml/swxml \
+ sw/source/filter/xml/wrtxml \
+ sw/source/filter/xml/xmlbrsh \
+ sw/source/filter/xml/xmlexp \
+ sw/source/filter/xml/xmlexpit \
+ sw/source/filter/xml/xmlfmt \
+ sw/source/filter/xml/xmlfmte \
+ sw/source/filter/xml/xmlfonte \
+ sw/source/filter/xml/xmlimp \
+ sw/source/filter/xml/xmlimpit \
+ sw/source/filter/xml/xmlitem \
+ sw/source/filter/xml/xmliteme \
+ sw/source/filter/xml/xmlitemi \
+ sw/source/filter/xml/xmlitemm \
+ sw/source/filter/xml/xmlithlp \
+ sw/source/filter/xml/xmlitmpr \
+ sw/source/filter/xml/xmlmeta \
+ sw/source/filter/xml/xmlscript \
+ sw/source/filter/xml/xmltble \
+ sw/source/filter/xml/xmltbli \
+ sw/source/filter/xml/xmltext \
+ sw/source/filter/xml/xmltexte \
+ sw/source/filter/xml/xmltexti \
+ sw/source/ui/app/appenv \
+ sw/source/ui/app/apphdl \
+ sw/source/ui/app/applab \
+ sw/source/ui/app/appopt \
+ sw/source/ui/app/docsh \
+ sw/source/ui/app/docsh2 \
+ sw/source/ui/app/docshdrw \
+ sw/source/ui/app/docshini \
+ sw/source/ui/app/docst \
+ sw/source/ui/app/docstyle \
+ sw/source/ui/app/mainwn \
+ sw/source/ui/app/swdll \
+ sw/source/ui/app/swmodul1 \
+ sw/source/ui/app/swmodule \
+ sw/source/ui/app/swwait \
+ sw/source/ui/cctrl/actctrl \
+ sw/source/ui/cctrl/popbox \
+ sw/source/ui/cctrl/swlbox \
+ sw/source/ui/chrdlg/ccoll \
+ sw/source/ui/config/barcfg \
+ sw/source/ui/config/caption \
+ sw/source/ui/config/cfgitems \
+ sw/source/ui/config/dbconfig \
+ sw/source/ui/config/fontcfg \
+ sw/source/ui/config/modcfg \
+ sw/source/ui/config/prtopt \
+ sw/source/ui/config/uinums \
+ sw/source/ui/config/usrpref \
+ sw/source/ui/config/viewopt \
+ sw/source/ui/dbui/dbmgr \
+ sw/source/ui/dbui/dbtree \
+ sw/source/ui/dbui/dbui \
+ sw/source/ui/dbui/maildispatcher \
+ sw/source/ui/dbui/mailmergechildwindow \
+ sw/source/ui/dbui/mailmergehelper \
+ sw/source/ui/dbui/mmconfigitem \
+ sw/source/ui/dbui/swdbtoolsclient \
+ sw/source/ui/dialog/SwSpellDialogChildWindow \
+ sw/source/ui/dialog/regionsw \
+ sw/source/ui/dialog/swabstdlg \
+ sw/source/ui/dialog/swwrtshitem \
+ sw/source/ui/dochdl/gloshdl \
+ sw/source/ui/dochdl/swdtflvr \
+ sw/source/ui/docvw/AnchorOverlayObject \
+ sw/source/ui/docvw/AnnotationMenuButton \
+ sw/source/ui/docvw/AnnotationWin \
+ sw/source/ui/docvw/PostItMgr \
+ sw/source/ui/docvw/ShadowOverlayObject \
+ sw/source/ui/docvw/SidebarTxtControl \
+ sw/source/ui/docvw/SidebarTxtControlAcc \
+ sw/source/ui/docvw/SidebarWin \
+ sw/source/ui/docvw/SidebarWinAcc \
+ sw/source/ui/docvw/edtdd \
+ sw/source/ui/docvw/edtwin \
+ sw/source/ui/docvw/edtwin2 \
+ sw/source/ui/docvw/edtwin3 \
+ sw/source/ui/docvw/frmsidebarwincontainer \
+ sw/source/ui/docvw/romenu \
+ sw/source/ui/docvw/srcedtw \
+ sw/source/ui/envelp/envimg \
+ sw/source/ui/envelp/labelcfg \
+ sw/source/ui/envelp/labimg \
+ sw/source/ui/envelp/syncbtn \
+ sw/source/ui/fldui/fldmgr \
+ sw/source/ui/fldui/fldwrap \
+ sw/source/ui/fldui/xfldui \
+ sw/source/ui/frmdlg/colex \
+ sw/source/ui/frmdlg/colmgr \
+ sw/source/ui/frmdlg/frmmgr \
+ sw/source/ui/globdoc/globdoc \
+ sw/source/ui/index/idxmrk \
+ sw/source/ui/index/toxmgr \
+ sw/source/ui/lingu/hhcwrp \
+ sw/source/ui/lingu/hyp \
+ sw/source/ui/lingu/olmenu \
+ sw/source/ui/lingu/sdrhhcwrap \
+ sw/source/ui/misc/glosdoc \
+ sw/source/ui/misc/glshell \
+ sw/source/ui/misc/numberingtypelistbox \
+ sw/source/ui/misc/redlndlg \
+ sw/source/ui/ribbar/conarc \
+ sw/source/ui/ribbar/concustomshape \
+ sw/source/ui/ribbar/conform \
+ sw/source/ui/ribbar/conpoly \
+ sw/source/ui/ribbar/conrect \
+ sw/source/ui/ribbar/drawbase \
+ sw/source/ui/ribbar/dselect \
+ sw/source/ui/ribbar/inputwin \
+ sw/source/ui/ribbar/tblctrl \
+ sw/source/ui/ribbar/tbxanchr \
+ sw/source/ui/ribbar/workctrl \
+ sw/source/ui/shells/annotsh \
+ sw/source/ui/shells/basesh \
+ sw/source/ui/shells/beziersh \
+ sw/source/ui/shells/drawdlg \
+ sw/source/ui/shells/drawsh \
+ sw/source/ui/shells/drformsh \
+ sw/source/ui/shells/drwbassh \
+ sw/source/ui/shells/drwtxtex \
+ sw/source/ui/shells/drwtxtsh \
+ sw/source/ui/shells/frmsh \
+ sw/source/ui/shells/grfsh \
+ sw/source/ui/shells/grfshex \
+ sw/source/ui/shells/langhelper \
+ sw/source/ui/shells/listsh \
+ sw/source/ui/shells/mediash \
+ sw/source/ui/shells/olesh \
+ sw/source/ui/shells/slotadd \
+ sw/source/ui/shells/tabsh \
+ sw/source/ui/shells/textdrw \
+ sw/source/ui/shells/textfld \
+ sw/source/ui/shells/textglos \
+ sw/source/ui/shells/textidx \
+ sw/source/ui/shells/textsh \
+ sw/source/ui/shells/textsh1 \
+ sw/source/ui/shells/textsh2 \
+ sw/source/ui/shells/txtattr \
+ sw/source/ui/shells/txtcrsr \
+ sw/source/ui/shells/txtnum \
+ sw/source/ui/smartmenu/stmenu \
+ sw/source/ui/table/chartins \
+ sw/source/ui/table/swtablerep \
+ sw/source/ui/table/tablemgr \
+ sw/source/ui/uiview/formatclipboard \
+ sw/source/ui/uiview/pview \
+ sw/source/ui/uiview/scroll \
+ sw/source/ui/uiview/srcview \
+ sw/source/ui/uiview/swcli \
+ sw/source/ui/uiview/uivwimp \
+ sw/source/ui/uiview/view \
+ sw/source/ui/uiview/view0 \
+ sw/source/ui/uiview/view1 \
+ sw/source/ui/uiview/view2 \
+ sw/source/ui/uiview/viewcoll \
+ sw/source/ui/uiview/viewdlg \
+ sw/source/ui/uiview/viewdlg2 \
+ sw/source/ui/uiview/viewdraw \
+ sw/source/ui/uiview/viewling \
+ sw/source/ui/uiview/viewmdi \
+ sw/source/ui/uiview/viewport \
+ sw/source/ui/uiview/viewprt \
+ sw/source/ui/uiview/viewsrch \
+ sw/source/ui/uiview/viewstat \
+ sw/source/ui/uiview/viewtab \
+ sw/source/ui/uno/RefreshListenerContainer \
+ sw/source/ui/uno/SwXDocumentSettings \
+ sw/source/ui/uno/SwXFilterOptions \
+ sw/source/ui/uno/dlelstnr \
+ sw/source/ui/uno/unoatxt \
+ sw/source/ui/uno/unodefaults \
+ sw/source/ui/uno/unodispatch \
+ sw/source/ui/uno/unodoc \
+ sw/source/ui/uno/unofreg \
+ sw/source/ui/uno/unomailmerge \
+ sw/source/ui/uno/unomod \
+ sw/source/ui/uno/unomodule \
+ sw/source/ui/uno/unotxdoc \
+ sw/source/ui/uno/unotxvw \
+ sw/source/ui/utlui/attrdesc \
+ sw/source/ui/utlui/bookctrl \
+ sw/source/ui/utlui/condedit \
+ sw/source/ui/utlui/content \
+ sw/source/ui/utlui/glbltree \
+ sw/source/ui/utlui/gloslst \
+ sw/source/ui/utlui/initui \
+ sw/source/ui/utlui/navicfg \
+ sw/source/ui/utlui/navipi \
+ sw/source/ui/utlui/numfmtlb \
+ sw/source/ui/utlui/prcntfld \
+ sw/source/ui/utlui/shdwcrsr \
+ sw/source/ui/utlui/textcontrolcombo \
+ sw/source/ui/utlui/tmplctrl \
+ sw/source/ui/utlui/uiitems \
+ sw/source/ui/utlui/uitool \
+ sw/source/ui/utlui/unotools \
+ sw/source/ui/utlui/viewlayoutctrl \
+ sw/source/ui/utlui/zoomctrl \
+ sw/source/ui/web/wdocsh \
+ sw/source/ui/web/wformsh \
+ sw/source/ui/web/wfrmsh \
+ sw/source/ui/web/wgrfsh \
+ sw/source/ui/web/wlistsh \
+ sw/source/ui/web/wolesh \
+ sw/source/ui/web/wtabsh \
+ sw/source/ui/web/wtextsh \
+ sw/source/ui/web/wview \
+ sw/source/ui/wrtsh/delete \
+ sw/source/ui/wrtsh/move \
+ sw/source/ui/wrtsh/select \
+ sw/source/ui/wrtsh/wrtsh1 \
+ sw/source/ui/wrtsh/wrtsh2 \
+ sw/source/ui/wrtsh/wrtsh3 \
+ sw/source/ui/wrtsh/wrtsh4 \
+ sw/source/ui/wrtsh/wrtundo \
+))
+
+$(eval $(call gb_SdiTarget_SdiTarget,sw/sdi/swslots,sw/sdi/swriter))
+
+$(eval $(call gb_SdiTarget_set_include,sw/sdi/swslots,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/sdi \
+ $$(INCLUDE) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_swd.mk b/sw/Library_swd.mk
new file mode 100644
index 000000000000..a0dcfaf29c3a
--- /dev/null
+++ b/sw/Library_swd.mk
@@ -0,0 +1,72 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,swd))
+
+$(eval $(call gb_Library_set_componentfile,swd,sw/util/swd))
+
+$(eval $(call gb_Library_set_include,swd,\
+ $$(INCLUDE) \
+ -I$(WORKDIR)/inc/sw/sdi \
+ -I$(WORKDIR)/inc/sw \
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,swd,\
+ $$(DEFS) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,swd,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ sot \
+ svl \
+ svt \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,swd,\
+ sw/source/core/except/errhdl \
+ sw/source/filter/basflt/iodetect \
+ sw/source/ui/uno/detreg \
+ sw/source/ui/uno/swdet2 \
+ sw/source/ui/uno/swdetect \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
new file mode 100644
index 000000000000..f7b3f529c80f
--- /dev/null
+++ b/sw/Library_swui.mk
@@ -0,0 +1,168 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,swui))
+
+$(eval $(call gb_Library_set_include,swui,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(WORKDIR)/SdiTarget/sw/sdi \
+ -I$(WORKDIR)/Misc/sw \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,swui,\
+ $$(DEFS) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,swui,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ i18nisolang1 \
+ msfilter \
+ sal \
+ sfx \
+ sot \
+ stl \
+ svl \
+ svt \
+ svx \
+ svx \
+ svxcore \
+ sw \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,swui,\
+ sw/source/core/undo/SwRewriter \
+ sw/source/ui/chrdlg/break \
+ sw/source/ui/chrdlg/chardlg \
+ sw/source/ui/chrdlg/drpcps \
+ sw/source/ui/chrdlg/numpara \
+ sw/source/ui/chrdlg/pardlg \
+ sw/source/ui/chrdlg/swuiccoll \
+ sw/source/ui/chrdlg/tblnumfm \
+ sw/source/ui/config/mailconfigpage \
+ sw/source/ui/config/optcomp \
+ sw/source/ui/config/optload \
+ sw/source/ui/config/optpage \
+ sw/source/ui/dbui/addresslistdialog \
+ sw/source/ui/dbui/createaddresslistdialog \
+ sw/source/ui/dbui/customizeaddresslistdialog \
+ sw/source/ui/dbui/dbinsdlg \
+ sw/source/ui/dbui/dbtablepreviewdialog \
+ sw/source/ui/dbui/mailmergewizard \
+ sw/source/ui/dbui/mmaddressblockpage \
+ sw/source/ui/dbui/mmdocselectpage \
+ sw/source/ui/dbui/mmgreetingspage \
+ sw/source/ui/dbui/mmlayoutpage \
+ sw/source/ui/dbui/mmmergepage \
+ sw/source/ui/dbui/mmoutputpage \
+ sw/source/ui/dbui/mmoutputtypepage \
+ sw/source/ui/dbui/mmpreparemergepage \
+ sw/source/ui/dbui/selectdbtabledialog \
+ sw/source/ui/dialog/abstract \
+ sw/source/ui/dialog/addrdlg \
+ sw/source/ui/dialog/ascfldlg \
+ sw/source/ui/dialog/docstdlg \
+ sw/source/ui/dialog/macassgn \
+ sw/source/ui/dialog/swdialmgr \
+ sw/source/ui/dialog/swdlgfact \
+ sw/source/ui/dialog/swuiexp \
+ sw/source/ui/dialog/uiregionsw \
+ sw/source/ui/dialog/wordcountdialog \
+ sw/source/ui/dochdl/selglos \
+ sw/source/ui/envelp/envfmt \
+ sw/source/ui/envelp/envlop1 \
+ sw/source/ui/envelp/envprt \
+ sw/source/ui/envelp/label1 \
+ sw/source/ui/envelp/labelexp \
+ sw/source/ui/envelp/labfmt \
+ sw/source/ui/envelp/labprt \
+ sw/source/ui/envelp/mailmrge \
+ sw/source/ui/fldui/DropDownFieldDialog \
+ sw/source/ui/fldui/FldRefTreeListBox \
+ sw/source/ui/fldui/changedb \
+ sw/source/ui/fldui/flddb \
+ sw/source/ui/fldui/flddinf \
+ sw/source/ui/fldui/flddok \
+ sw/source/ui/fldui/fldedt \
+ sw/source/ui/fldui/fldfunc \
+ sw/source/ui/fldui/fldpage \
+ sw/source/ui/fldui/fldref \
+ sw/source/ui/fldui/fldtdlg \
+ sw/source/ui/fldui/fldvar \
+ sw/source/ui/fldui/inpdlg \
+ sw/source/ui/fldui/javaedit \
+ sw/source/ui/fmtui/tmpdlg \
+ sw/source/ui/frmdlg/column \
+ sw/source/ui/frmdlg/cption \
+ sw/source/ui/frmdlg/frmdlg \
+ sw/source/ui/frmdlg/frmpage \
+ sw/source/ui/frmdlg/pattern \
+ sw/source/ui/frmdlg/uiborder \
+ sw/source/ui/frmdlg/wrap \
+ sw/source/ui/index/cntex \
+ sw/source/ui/index/cnttab \
+ sw/source/ui/index/multmrk \
+ sw/source/ui/index/swuiidxmrk \
+ sw/source/ui/misc/bookmark \
+ sw/source/ui/misc/docfnote \
+ sw/source/ui/misc/glosbib \
+ sw/source/ui/misc/glossary \
+ sw/source/ui/misc/insfnote \
+ sw/source/ui/misc/insrule \
+ sw/source/ui/misc/linenum \
+ sw/source/ui/misc/num \
+ sw/source/ui/misc/outline \
+ sw/source/ui/misc/pgfnote \
+ sw/source/ui/misc/pggrid \
+ sw/source/ui/misc/srtdlg \
+ sw/source/ui/misc/swmodalredlineacceptdlg \
+ sw/source/ui/table/colwd \
+ sw/source/ui/table/convert \
+ sw/source/ui/table/instable \
+ sw/source/ui/table/mergetbl \
+ sw/source/ui/table/rowht \
+ sw/source/ui/table/splittbl \
+ sw/source/ui/table/tabledlg \
+ sw/source/ui/table/tautofmt \
+ sw/source/ui/utlui/swrenamexnameddlg \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
new file mode 100644
index 000000000000..140dd38d623d
--- /dev/null
+++ b/sw/Library_vbaswobj.mk
@@ -0,0 +1,124 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,vbaswobj))
+
+$(eval $(call gb_Library_set_componentfile,vbaswobj,sw/util/vbaswobj))
+
+$(eval $(call gb_Library_set_include,vbaswobj,\
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/inc \
+ -I$(WORKDIR)/Misc/sw/ \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc/ \
+))
+
+$(eval $(call gb_Library_add_linked_libs,vbaswobj,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ i18nisolang1 \
+ sal \
+ sb \
+ sfx \
+ stl \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sw \
+ tk \
+ tl \
+ utl \
+ vbahelper \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,vbaswobj,\
+ sw/source/ui/vba/service \
+ sw/source/ui/vba/vbadocument \
+ sw/source/ui/vba/vbasections \
+ sw/source/ui/vba/vbadialog \
+ sw/source/ui/vba/vbawrapformat \
+ sw/source/ui/vba/vbafont \
+ sw/source/ui/vba/vbaheaderfooterhelper \
+ sw/source/ui/vba/vbarangehelper \
+ sw/source/ui/vba/vbaaddin \
+ sw/source/ui/vba/vbaautotextentry \
+ sw/source/ui/vba/vbarange \
+ sw/source/ui/vba/vbadocumentproperties \
+ sw/source/ui/vba/vbaeventshelper \
+ sw/source/ui/vba/vbastyle \
+ sw/source/ui/vba/vbapane \
+ sw/source/ui/vba/vbaglobals \
+ sw/source/ui/vba/vbatemplate \
+ sw/source/ui/vba/vbaaddins \
+ sw/source/ui/vba/vbaview \
+ sw/source/ui/vba/vbaheaderfooter \
+ sw/source/ui/vba/vbabookmarks \
+ sw/source/ui/vba/vbaoptions \
+ sw/source/ui/vba/vbadialogs \
+ sw/source/ui/vba/vbapalette \
+ sw/source/ui/vba/vbaparagraph \
+ sw/source/ui/vba/vbafind \
+ sw/source/ui/vba/vbasection \
+ sw/source/ui/vba/vbabookmark \
+ sw/source/ui/vba/vbaapplication \
+ sw/source/ui/vba/vbawindow \
+ sw/source/ui/vba/vbareplacement \
+ sw/source/ui/vba/vbatable \
+ sw/source/ui/vba/vbaselection \
+ sw/source/ui/vba/vbasystem \
+ sw/source/ui/vba/vbainformationhelper \
+ sw/source/ui/vba/vbapagesetup \
+ sw/source/ui/vba/vbafield \
+ sw/source/ui/vba/vbatables \
+ sw/source/ui/vba/vbavariable \
+ sw/source/ui/vba/vbadocuments \
+ sw/source/ui/vba/vbaparagraphformat \
+ sw/source/ui/vba/vbaborders \
+ sw/source/ui/vba/vbavariables \
+ sw/source/ui/vba/vbastyles \
+ sw/source/ui/vba/vbapanes \
+ sw/source/ui/vba/wordvbahelper \
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_set_ldflags,vbaswobj,\
+ $$(LDFLAGS) \
+ -Wl$(COMMA)-O1 \
+ -Wl$(COMMA)-z$(COMMA)noexecstack \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Makefile b/sw/Makefile
new file mode 100644
index 000000000000..a79aff831024
--- /dev/null
+++ b/sw/Makefile
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
new file mode 100644
index 000000000000..c6257e22fc93
--- /dev/null
+++ b/sw/Module_sw.mk
@@ -0,0 +1,47 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Module_Module,sw))
+
+$(eval $(call gb_Module_add_targets,sw,\
+ AllLangResTarget_sw \
+ Library_msword \
+ Library_sw \
+ Library_swd \
+ Library_swui \
+ Library_vbaswobj \
+ Package_misc \
+ Package_uiconfig \
+ Package_xml \
+))
+
+$(eval $(call gb_Module_add_subsequentcheck_targets,sw,\
+ JunitTest_sw_complex \
+ JunitTest_sw_unoapi \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/sw/Package_misc.mk b/sw/Package_misc.mk
new file mode 100644
index 000000000000..60f721be4322
--- /dev/null
+++ b/sw/Package_misc.mk
@@ -0,0 +1,30 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,sw_misc,$(SRCDIR)/sw/misc))
+# TODO:
+#COPY sw/unxlngx6.pro/misc/swslots_sid.hid unxlngx6.pro/bin/hid/swslots_sid.hid
diff --git a/sw/Package_uiconfig.mk b/sw/Package_uiconfig.mk
new file mode 100644
index 000000000000..2cad9784eb92
--- /dev/null
+++ b/sw/Package_uiconfig.mk
@@ -0,0 +1,261 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,sw_uiconfig,$(SRCDIR)/sw/uiconfig))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/menubar/menubar.xml,sglobal/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/statusbar/statusbar.xml,sglobal/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/alignmentbar.xml,sglobal/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/arrowshapes.xml,sglobal/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/basicshapes.xml,sglobal/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/bezierobjectbar.xml,sglobal/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/calloutshapes.xml,sglobal/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/colorbar.xml,sglobal/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawbar.xml,sglobal/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawingobjectbar.xml,sglobal/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawtextobjectbar.xml,sglobal/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/extrusionobjectbar.xml,sglobal/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/findbar.xml,sglobal/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/flowchartshapes.xml,sglobal/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fontworkobjectbar.xml,sglobal/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fontworkshapetype.xml,sglobal/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formcontrols.xml,sglobal/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formdesign.xml,sglobal/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formsfilterbar.xml,sglobal/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formsnavigationbar.xml,sglobal/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formtextobjectbar.xml,sglobal/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/frameobjectbar.xml,sglobal/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fullscreenbar.xml,sglobal/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/graffilterbar.xml,sglobal/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/graphicobjectbar.xml,sglobal/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/insertbar.xml,sglobal/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/insertobjectbar.xml,sglobal/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/mediaobjectbar.xml,sglobal/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/moreformcontrols.xml,sglobal/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/numobjectbar.xml,sglobal/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/oleobjectbar.xml,sglobal/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/optimizetablebar.xml,sglobal/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/previewobjectbar.xml,sglobal/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/standardbar.xml,sglobal/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/starshapes.xml,sglobal/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/symbolshapes.xml,sglobal/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/tableobjectbar.xml,sglobal/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/textobjectbar.xml,sglobal/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/toolbar.xml,sglobal/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/viewerbar.xml,sglobal/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/menubar/menubar.xml,sweb/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/statusbar/statusbar.xml,sweb/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/arrowshapes.xml,sweb/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/basicshapes.xml,sweb/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/bezierobjectbar.xml,sweb/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/calloutshapes.xml,sweb/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/colorbar.xml,sweb/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/drawingobjectbar.xml,sweb/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/drawtextobjectbar.xml,sweb/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/extrusionobjectbar.xml,sweb/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/findbar.xml,sweb/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/flowchartshapes.xml,sweb/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fontworkobjectbar.xml,sweb/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fontworkshapetype.xml,sweb/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formcontrols.xml,sweb/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formdesign.xml,sweb/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formsfilterbar.xml,sweb/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formsnavigationbar.xml,sweb/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formtextobjectbar.xml,sweb/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/frameobjectbar.xml,sweb/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fullscreenbar.xml,sweb/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/graffilterbar.xml,sweb/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/graphicobjectbar.xml,sweb/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/insertbar.xml,sweb/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/mediaobjectbar.xml,sweb/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/numobjectbar.xml,sweb/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/oleobjectbar.xml,sweb/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/optimizetablebar.xml,sweb/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/previewobjectbar.xml,sweb/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/standardbar.xml,sweb/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/starshapes.xml,sweb/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/symbolshapes.xml,sweb/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/tableobjectbar.xml,sweb/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/textobjectbar.xml,sweb/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/toolbar.xml,sweb/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/viewerbar.xml,sweb/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/menubar/menubar.xml,swform/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/statusbar/statusbar.xml,swform/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/alignmentbar.xml,swform/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/arrowshapes.xml,swform/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/basicshapes.xml,swform/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/bezierobjectbar.xml,swform/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/calloutshapes.xml,swform/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/colorbar.xml,swform/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawbar.xml,swform/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawingobjectbar.xml,swform/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawtextobjectbar.xml,swform/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/extrusionobjectbar.xml,swform/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/flowchartshapes.xml,swform/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fontworkobjectbar.xml,swform/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fontworkshapetype.xml,swform/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formcontrols.xml,swform/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formdesign.xml,swform/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formsfilterbar.xml,swform/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formsnavigationbar.xml,swform/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formtextobjectbar.xml,swform/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/frameobjectbar.xml,swform/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fullscreenbar.xml,swform/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/graffilterbar.xml,swform/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/graphicobjectbar.xml,swform/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/insertbar.xml,swform/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/insertobjectbar.xml,swform/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/mediaobjectbar.xml,swform/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/moreformcontrols.xml,swform/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/numobjectbar.xml,swform/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/oleobjectbar.xml,swform/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/optimizetablebar.xml,swform/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/previewobjectbar.xml,swform/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/standardbar.xml,swform/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/starshapes.xml,swform/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/symbolshapes.xml,swform/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/tableobjectbar.xml,swform/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/textobjectbar.xml,swform/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/toolbar.xml,swform/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/viewerbar.xml,swform/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/menubar/menubar.xml,swreport/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/statusbar/statusbar.xml,swreport/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/alignmentbar.xml,swreport/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/arrowshapes.xml,swreport/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/basicshapes.xml,swreport/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/bezierobjectbar.xml,swreport/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/calloutshapes.xml,swreport/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/colorbar.xml,swreport/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawbar.xml,swreport/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawingobjectbar.xml,swreport/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawtextobjectbar.xml,swreport/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/extrusionobjectbar.xml,swreport/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/flowchartshapes.xml,swreport/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fontworkobjectbar.xml,swreport/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fontworkshapetype.xml,swreport/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formcontrols.xml,swreport/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formdesign.xml,swreport/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formsfilterbar.xml,swreport/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formsnavigationbar.xml,swreport/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formtextobjectbar.xml,swreport/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/frameobjectbar.xml,swreport/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fullscreenbar.xml,swreport/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/graffilterbar.xml,swreport/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/graphicobjectbar.xml,swreport/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/insertbar.xml,swreport/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/insertobjectbar.xml,swreport/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/mediaobjectbar.xml,swreport/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/moreformcontrols.xml,swreport/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/numobjectbar.xml,swreport/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/oleobjectbar.xml,swreport/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/optimizetablebar.xml,swreport/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/previewobjectbar.xml,swreport/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/standardbar.xml,swreport/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/starshapes.xml,swreport/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/symbolshapes.xml,swreport/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/tableobjectbar.xml,swreport/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/textobjectbar.xml,swreport/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/toolbar.xml,swreport/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/viewerbar.xml,swreport/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/menubar/menubar.xml,swriter/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/statusbar/statusbar.xml,swriter/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/alignmentbar.xml,swriter/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/arrowshapes.xml,swriter/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/basicshapes.xml,swriter/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/bezierobjectbar.xml,swriter/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/calloutshapes.xml,swriter/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/colorbar.xml,swriter/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawbar.xml,swriter/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawingobjectbar.xml,swriter/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawtextobjectbar.xml,swriter/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/extrusionobjectbar.xml,swriter/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/findbar.xml,swriter/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/flowchartshapes.xml,swriter/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fontworkobjectbar.xml,swriter/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fontworkshapetype.xml,swriter/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formcontrols.xml,swriter/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formdesign.xml,swriter/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formsfilterbar.xml,swriter/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formsnavigationbar.xml,swriter/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formtextobjectbar.xml,swriter/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/frameobjectbar.xml,swriter/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fullscreenbar.xml,swriter/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/graffilterbar.xml,swriter/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/graphicobjectbar.xml,swriter/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/insertbar.xml,swriter/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/mediaobjectbar.xml,swriter/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/moreformcontrols.xml,swriter/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/numobjectbar.xml,swriter/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/oleobjectbar.xml,swriter/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/optimizetablebar.xml,swriter/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/previewobjectbar.xml,swriter/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/standardbar.xml,swriter/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/starshapes.xml,swriter/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/symbolshapes.xml,swriter/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/tableobjectbar.xml,swriter/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/textobjectbar.xml,swriter/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/toolbar.xml,swriter/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/viewerbar.xml,swriter/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/menubar/menubar.xml,swxform/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/statusbar/statusbar.xml,swxform/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/alignmentbar.xml,swxform/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/arrowshapes.xml,swxform/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/basicshapes.xml,swxform/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/bezierobjectbar.xml,swxform/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/calloutshapes.xml,swxform/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/colorbar.xml,swxform/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawbar.xml,swxform/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawingobjectbar.xml,swxform/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawtextobjectbar.xml,swxform/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/extrusionobjectbar.xml,swxform/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/findbar.xml,swxform/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/flowchartshapes.xml,swxform/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fontworkobjectbar.xml,swxform/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fontworkshapetype.xml,swxform/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formcontrols.xml,swxform/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formdesign.xml,swxform/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formsfilterbar.xml,swxform/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formsnavigationbar.xml,swxform/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formtextobjectbar.xml,swxform/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/frameobjectbar.xml,swxform/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fullscreenbar.xml,swxform/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/graffilterbar.xml,swxform/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/graphicobjectbar.xml,swxform/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/insertbar.xml,swxform/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/insertobjectbar.xml,swxform/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/mediaobjectbar.xml,swxform/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/moreformcontrols.xml,swxform/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/numobjectbar.xml,swxform/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/oleobjectbar.xml,swxform/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/optimizetablebar.xml,swxform/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/previewobjectbar.xml,swxform/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/standardbar.xml,swxform/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/starshapes.xml,swxform/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/symbolshapes.xml,swxform/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/tableobjectbar.xml,swxform/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/textobjectbar.xml,swxform/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/toolbar.xml,swxform/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/viewerbar.xml,swxform/toolbar/viewerbar.xml))
diff --git a/sw/Package_xml.mk b/sw/Package_xml.mk
new file mode 100644
index 000000000000..dee52fdd97f3
--- /dev/null
+++ b/sw/Package_xml.mk
@@ -0,0 +1,29 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,sw_xml,$(SRCDIR)/sw/xml))
+$(eval $(call gb_Package_add_file,sw_xml,xml/writer.xml,writer.xml))
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
new file mode 100644
index 000000000000..ef39ad6e4c8f
--- /dev/null
+++ b/sw/inc/AnnotationWin.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: $
+ *
+ * $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 _ANNOTATIONWIN_HXX
+#define _ANNOTATIONWIN_HXX
+
+#include <SidebarWin.hxx>
+
+class PopupMenu;
+class OutlinerParaObject;
+
+namespace sw { namespace annotation {
+
+class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
+{
+ public:
+ SwAnnotationWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem,
+ SwFmtFld* aField );
+ virtual ~SwAnnotationWin();
+
+ virtual void UpdateData();
+ virtual void SetPostItText();
+ virtual void Delete();
+ virtual void GotoPos();
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ virtual sal_uInt32 MoveCaret();
+
+ virtual bool CalcFollow();
+ void InitAnswer(OutlinerParaObject* pText);
+
+ virtual bool IsProtected();
+
+ protected:
+ virtual MenuButton* CreateMenuButton();
+
+ private:
+ virtual SvxLanguageItem GetLanguage(void);
+ sal_uInt32 CountFollowing();
+
+ SwFmtFld* mpFmtFld;
+ SwPostItField* mpFld;
+ PopupMenu* mpButtonPopup;
+
+};
+
+} } // end of namespace sw::annotation
+#endif
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
new file mode 100644
index 000000000000..209fea22da72
--- /dev/null
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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();
+ sal_uInt8 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..910ae4405f4b
--- /dev/null
+++ b/sw/inc/HandleAnchorNodeChg.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..46fa17feaa2e
--- /dev/null
+++ b/sw/inc/IDocumentChartDataProviderAccess.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+ #ifndef 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..3b2c5deaa556
--- /dev/null
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..42923a2fadf4
--- /dev/null
+++ b/sw/inc/IDocumentDeviceAccess.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+ #ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+ #define IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+
+ class SfxPrinter;
+ class JobSetup;
+ class 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 const 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..916554b69770
--- /dev/null
+++ b/sw/inc/IDocumentDrawModelAccess.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..51051e4fa020
--- /dev/null
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef 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..be17fb7636f5
--- /dev/null
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -0,0 +1,191 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_True putting of value was successful
+ @retval sal_False else
+ */
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 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 sal_True update was successful
+ @retval sal_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, sal_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, sal_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..ee04ec055f1a
--- /dev/null
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 ViewShell;
+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 ViewShell* GetCurrentViewShell() const = 0;
+ virtual ViewShell* GetCurrentViewShell() = 0; //swmod 071107//swmod 071225
+ virtual const SwRootFrm* GetCurrentLayout() const = 0;
+ virtual SwRootFrm* GetCurrentLayout() = 0; //swmod 080218
+ virtual bool HasLayout() const = 0;
+
+ /** !!!The old layout must be deleted!!!
+ */
+ virtual void SetCurrentViewShell( ViewShell* pNew ) = 0; //swmod 071107//swmod 071225
+
+ /**
+ */
+ 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..77c4c9e02307
--- /dev/null
+++ b/sw/inc/IDocumentLineNumberAccess.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..44fd8c148044
--- /dev/null
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+namespace sfx2 { class SvLinkSource; class LinkManager; }
+
+ /** 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 sfx2::LinkManager& GetLinkManager() = 0;
+
+ /**
+ */
+ virtual const sfx2::LinkManager& GetLinkManager() const = 0;
+
+ /** FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
+ SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
+ */
+ virtual void UpdateLinks(sal_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..0232fc86f104
--- /dev/null
+++ b/sw/inc/IDocumentListItems.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..e811496edc56
--- /dev/null
+++ b/sw/inc/IDocumentListsAccess.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#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..55fc0901a7e0
--- /dev/null
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+
+ virtual sw::mark::IFieldmark* makeFieldBookmark( const SwPaM& rPaM,
+ const rtl::OUString& rName,
+ const rtl::OUString& rType) = 0;
+ virtual sw::mark::IFieldmark* makeNoTextFieldBookmark( const SwPaM& rPaM,
+ const rtl::OUString& rName,
+ const rtl::OUString& rType) = 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..88a8148a2a52
--- /dev/null
+++ b/sw/inc/IDocumentOutlineNodes.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#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..97570f0d0461
--- /dev/null
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_uInt16 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 sal_uInt16 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 sal_uInt16 eM)
+ { return (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsHideChanges(const sal_uInt16 eM)
+ { return nsRedlineMode_t::REDLINE_SHOW_INSERT == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsShowOriginal(const sal_uInt16 eM)
+ { return nsRedlineMode_t::REDLINE_SHOW_DELETE == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsRedlineOn(const sal_uInt16 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..214b9769ed32
--- /dev/null
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -0,0 +1,213 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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,
+ MATH_BASELINE_ALIGNMENT
+ };
+
+ 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]*/ sal_uInt16 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]*/ sal_uInt16 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..6362f6213290
--- /dev/null
+++ b/sw/inc/IDocumentState.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..25c2d54d71e9
--- /dev/null
+++ b/sw/inc/IDocumentStatistics.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+ #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..743b0d3304e4
--- /dev/null
+++ b/sw/inc/IDocumentStylePoolAccess.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..f0d69e942af3
--- /dev/null
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+ #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..0d78d3b361c9
--- /dev/null
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -0,0 +1,283 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 SwRewriter;
+class SwNodes;
+class SwUndo;
+
+namespace sw {
+ class RepeatContext;
+}
+
+
+
+/** IDocumentUndoRedo
+*/
+class IDocumentUndoRedo
+{
+public:
+
+ /** Enable/Disable Undo.
+ */
+ virtual void DoUndo(bool const bDoUndo) = 0;
+
+ /** Is Undo enabled?
+ */
+ virtual bool DoesUndo() const = 0;
+
+ /** Enable/Disable Group Undo.
+ This determines whether successive Insert/Delete/Overwrite
+ actions are combined.
+ */
+ virtual void DoGroupUndo(bool const bDoUndo) = 0;
+
+ /** Is Group Undo enabled?
+ */
+ virtual bool DoesGroupUndo() const = 0;
+
+ /** Enable/Disable Undo for Drawing objects.
+ */
+ virtual void DoDrawUndo(bool const bDoUndo) = 0;
+
+ /** Is Undo for Drawing objects enabled?
+ for Draw-Undo: writer wants to handle actions on Flys on its own.
+ */
+ virtual bool DoesDrawUndo() const = 0;
+
+ /** Set the position at which the document is in the "unmodified" state
+ to the current position in the Undo stack.
+ */
+ virtual void SetUndoNoModifiedPosition() = 0;
+
+ /** Prevent updates to the "unmodified" state position
+ via SetUndoNoResetModified().
+ */
+ virtual void LockUndoNoModifiedPosition() = 0;
+
+ /** Allow updates to the "unmodified" state position
+ via SetUndoNoResetModified().
+ */
+ virtual void UnLockUndoNoModifiedPosition() = 0;
+
+ /** Disable (re)setting the document modified flag on Undo/Redo.
+ */
+ virtual void SetUndoNoResetModified() = 0;
+
+ /** Is setting the document modified flag on Undo/Redo disabled?
+ */
+ virtual bool IsUndoNoResetModified() const = 0;
+
+ /** Execute Undo.
+
+ @return true if executing the last Undo action was successful.
+ */
+ virtual sal_Bool Undo() = 0;
+
+ /** Opens undo block.
+
+ @remark StartUndo() and EndUndo() do nothing if !DoesUndo().
+
+ @param nUndoId undo ID for the list action
+ @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 const eUndoId,
+ SwRewriter const*const pRewriter) = 0;
+
+ /**
+ Closes undo block.
+
+ @remark StartUndo() and EndUndo() do nothing if !DoesUndo().
+
+ @param nUndoId undo ID for the list action
+ @param pRewriter rewriter for comments @see SwUndo::GetComment
+
+ If the given nUndoId is not UNDO_EMPTY or UNDO_END, the comment of
+ the resulting list action will be set via the nUndoId, applying the
+ given pRewriter (if not 0). Otherwise the comment of the resulting
+ list action is unchanged if it has an UndoId that is not UNDO_START
+ set by StartUndo, and in case the UndoId is UNDO_START the comment
+ of the list action defaults to the comment of the last action
+ contained in the list action.
+ */
+ virtual SwUndoId EndUndo(SwUndoId const eUndoId,
+ SwRewriter const*const pRewriter) = 0;
+
+ /** <- #111827#
+ Delete all Undo actions.
+ Of course Undo will be disabled during deletion.
+ */
+ virtual void DelAllUndoObj() = 0;
+
+ /** Get Id and comment of last Undo action.
+ @param o_pStr if not 0, receives comment of last Undo action.
+ @param o_pId if not 0, receives Id of last Undo action.
+ @return true if there is a Undo action, false if none
+ */
+ virtual bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
+ SwUndoId *const o_pId) const = 0;
+
+ /** Get comments of Undo actions.
+ @return comments of all top-level Undo actions.
+ */
+ virtual SwUndoComments_t GetUndoComments() const = 0;
+
+ /** Execute Redo.
+
+ @return true if executing the first Redo action was successful.
+ */
+ virtual sal_Bool Redo() = 0;
+
+ /** Get comment of first Redo action.
+ @param o_pStr if not 0, receives comment of first Redo action.
+ @return true if there is a Redo action, false if none
+ */
+ virtual bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const = 0;
+
+ /** Get comments of Redo actions.
+ @return comments of all top-level Redo actions.
+ */
+ virtual SwUndoComments_t GetRedoComments() const = 0;
+
+ /** Repeat the last Undo action.
+ @return true if repeating the last Undo Redo action was attempted.
+ */
+ virtual bool Repeat(::sw::RepeatContext & rContext,
+ sal_uInt16 const nRepeatCnt) = 0;
+
+ /** Get Id and comment of last Undo action, if it is Repeat capable.
+ @param o_pStr if not 0, receives comment of last Undo action
+ if it is Repeat capable.
+ @return Id of last Undo action if it is Repeat capable,
+ or UNDO_EMPTY if there is none or it is not Repeat capable.
+ */
+ virtual SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const = 0;
+
+ /** Add new Undo action.
+ Takes over ownership of pUndo.
+ @remark calls ClearRedo(), except for UNDO_START/UNDO_END.
+ @remark does nothing if !DoesUndo().
+ */
+ virtual void AppendUndo(SwUndo *const pUndo) = 0;
+
+ /** Delete all Redo actions.
+ */
+ virtual void ClearRedo() = 0;
+
+ /* Is the given nodes array the Undo nodes array?
+ */
+ virtual bool IsUndoNodes(SwNodes const& rNodes) const = 0;
+
+protected:
+ virtual ~IDocumentUndoRedo() {};
+};
+
+
+namespace sw {
+
+class UndoGuard
+{
+public:
+
+ UndoGuard(IDocumentUndoRedo & rUndoRedo)
+ : m_rUndoRedo(rUndoRedo)
+ , m_bUndoWasEnabled(rUndoRedo.DoesUndo())
+ {
+ m_rUndoRedo.DoUndo(false);
+ }
+ ~UndoGuard()
+ {
+ m_rUndoRedo.DoUndo(m_bUndoWasEnabled);
+ }
+
+ bool UndoWasEnabled() const
+ {
+ return m_bUndoWasEnabled;
+ }
+
+private:
+ IDocumentUndoRedo & m_rUndoRedo;
+ bool const m_bUndoWasEnabled;
+};
+
+class GroupUndoGuard
+{
+public:
+
+ GroupUndoGuard(IDocumentUndoRedo & rUndoRedo)
+ : m_rUndoRedo(rUndoRedo)
+ , m_bGroupUndoWasEnabled(rUndoRedo.DoesGroupUndo())
+ {
+ m_rUndoRedo.DoGroupUndo(false);
+ }
+ ~GroupUndoGuard()
+ {
+ m_rUndoRedo.DoGroupUndo(m_bGroupUndoWasEnabled);
+ }
+
+private:
+ IDocumentUndoRedo & m_rUndoRedo;
+ bool const m_bGroupUndoWasEnabled;
+};
+
+class DrawUndoGuard
+{
+public:
+
+ DrawUndoGuard(IDocumentUndoRedo & rUndoRedo)
+ : m_rUndoRedo(rUndoRedo)
+ , m_bDrawUndoWasEnabled(rUndoRedo.DoesDrawUndo())
+ {
+ m_rUndoRedo.DoDrawUndo(false);
+ }
+ ~DrawUndoGuard()
+ {
+ m_rUndoRedo.DoDrawUndo(m_bDrawUndoWasEnabled);
+ }
+
+private:
+ IDocumentUndoRedo & m_rUndoRedo;
+ bool const m_bDrawUndoWasEnabled;
+};
+
+
+} // namespace sw
+
+#endif
+
diff --git a/sw/inc/IGrammarContact.hxx b/sw/inc/IGrammarContact.hxx
new file mode 100644
index 000000000000..44c54b55fe9f
--- /dev/null
+++ b/sw/inc/IGrammarContact.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..52b691c4aa85
--- /dev/null
+++ b/sw/inc/IInterface.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..6a46ae01d49e
--- /dev/null
+++ b/sw/inc/IMark.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+#include <map>
+
+#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; }
+
+ virtual rtl::OUString ToString( ) const =0;
+ };
+
+ 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:
+ typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any> parameter_map_t;
+ //getters
+ virtual ::rtl::OUString GetFieldname() const =0;
+ virtual ::rtl::OUString GetFieldHelptext() const =0;
+ virtual parameter_map_t* GetParameters() =0;
+ virtual const parameter_map_t* GetParameters() const =0;
+
+ //setters
+ virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0;
+ virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0;
+ virtual void Invalidate() = 0;
+ };
+
+ class ICheckboxFieldmark
+ : virtual public IFieldmark
+ {
+ public:
+ virtual bool IsChecked() const =0;
+ virtual void SetChecked(bool checked) =0;
+ };
+}}
+#endif
diff --git a/sw/inc/IShellCursorSupplier.hxx b/sw/inc/IShellCursorSupplier.hxx
new file mode 100644
index 000000000000..a160f43d40dd
--- /dev/null
+++ b/sw/inc/IShellCursorSupplier.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ISHELLCURSORSUPPLIER_HXX
+#define ISHELLCURSORSUPPLIER_HXX
+
+
+class SwPaM;
+
+
+namespace sw {
+
+/** The Undo actions need to create new Shell cursors.
+ Just creating new SwPaMs in the Undo actions is not sufficient,
+ because only Shell cursors are corrected by doccorr.cxx.
+ */
+class IShellCursorSupplier
+{
+public:
+ virtual ~IShellCursorSupplier() { }
+ virtual SwPaM & CreateNewShellCursor() = 0;
+ virtual SwPaM & GetCurrentShellCursor() = 0;
+};
+
+} // namespace sw
+
+#endif // ISHELLCURSORSUPPLIER_HXX
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
new file mode 100644
index 000000000000..17000a4657c7
--- /dev/null
+++ b/sw/inc/PostItMgr.hxx
@@ -0,0 +1,307 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <list>
+#include <vector>
+#include <editeng/outlobj.hxx>
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <tools/debug.hxx>
+#include <swrect.hxx>
+#include <unotools/configitem.hxx>
+#include <unotools/options.hxx>
+#include <com/sun/star/util/SearchOptions.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <SidebarWindowsTypes.hxx>
+#include <svl/lstner.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;
+namespace sw { namespace annotation {
+ class SwAnnotationWin;
+}}
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+ class SwFrmSidebarWinContainer;
+}}
+class SwSidebarItem;
+class SwFrm;
+class Window;
+
+#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<SwSidebarItem*> SwSidebarItem_list;
+typedef std::list<SwSidebarItem*>::iterator SwSidebarItem_iterator;
+
+
+struct SwPostItPageItem
+{
+ bool bScrollbar;
+ sw::sidebarwindows::SidebarPosition eSidebarPosition;
+ long lOffset;
+ SwRect mPageRect;
+ SwSidebarItem_list* mList;
+ SwPostItPageItem(): bScrollbar(false),lOffset(0)
+ {
+ mList = new SwSidebarItem_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 bIsShowAnchor;
+ public:
+ SwNoteProps()
+ : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes"))
+ , bIsShowAnchor(false)
+ {
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames();
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames);
+ const ::com::sun::star::uno::Any* pValues = aValues.getConstArray();
+ DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ if (aValues.getLength())
+ pValues[0]>>=bIsShowAnchor;
+ }
+
+ bool IsShowAnchor()
+ {
+ return bIsShowAnchor;
+ }
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
+ {
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames;
+ if(!aNames.getLength())
+ {
+ static const char* aPropNames[] =
+ {
+ "ShowAnkor"
+ };
+ const int nCount = sizeof(aPropNames)/sizeof(const char*);
+ aNames.realloc(nCount);
+ ::rtl::OUString* pNames = aNames.getArray();
+ for(int i = 0; i < nCount; i++)
+ pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]);
+ }
+ return aNames;
+ }
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+};
+
+class SwPostItMgr: public SfxListener
+{
+ private:
+ SwView* mpView;
+ SwWrtShell* mpWrtShell;
+ SwEditWin* mpEditWin;
+ std::list< SwSidebarItem*> mvPostItFlds;
+ std::vector<SwPostItPageItem*> mPages;
+ sal_uLong mnEventId;
+ bool mbWaitingForCalcRects;
+ sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
+ bool mbLayout;
+ long mbLayoutHeight;
+ long mbLayouting;
+ bool mbReadOnly;
+ bool mbDeleteNote;
+ FieldShadowState mShadowState;
+ OutlinerParaObject* mpAnswer;
+ bool mbIsShowAnchor;
+
+ // data structure to collect the <SwSidebarWin> instances for certain <SwFrm> instances.
+ sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer;
+
+ typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator;
+
+ void AddPostIts(bool bCheckExistance = true,bool bFocus = true);
+ //void AddRedlineComments(bool bCheckExistance, bool bFocus);
+ void RemoveSidebarWin();
+ void PreparePageContainer();
+ void Scroll(const long lScroll,const unsigned long aPage );
+ void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage );
+ bool ScrollbarHit(const unsigned long aPage,const Point &aPoint);
+ bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &aVisiblePostItList,
+ const Rectangle aBorder,
+ long lNeededHeight);
+ void CheckForRemovedPostIts();
+ bool ArrowEnabled(sal_uInt16 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*);
+
+ sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const;
+
+ void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
+ void RemoveItem( SfxBroadcaster* pBroadcast );
+
+ void Sort(const short aType);
+
+ public:
+ SwPostItMgr(SwView* aDoc);
+ ~SwPostItMgr();
+
+ typedef std::list< SwSidebarItem* >::const_iterator const_iterator;
+ const_iterator begin() const { return mvPostItFlds.begin(); }
+ const_iterator end() const { return mvPostItFlds.end(); }
+
+ void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ void LayoutPostIts();
+ bool CalcRects();
+
+ void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt,
+ long aPage = -1);
+
+ bool ShowScrollbar(const unsigned long aPage) const;
+ bool HasNotes() const ;
+ bool ShowNotes() const;
+ bool IsShowAnchor() { return mbIsShowAnchor;}
+ 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 SetLayout() { mbLayout = true; };
+ void Delete(String aAuthor);
+ void Delete();
+
+#if 0
+ void Hide( SwPostItField* pPostItField );
+#endif
+ 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(sal_uInt16 aDirection,unsigned long aPage) const;
+
+ sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const;
+
+ sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection,
+ sw::sidebarwindows::SwSidebarWin* aPostIt);
+ long GetNextBorder();
+
+ sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; }
+ void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p);
+ bool HasActiveSidebarWin() const;
+ bool HasActiveAnnotationWin() const;
+ void GrabFocusOnActiveSidebarWin();
+ void UpdateDataOnActiveSidebarWin();
+ void DeleteActiveSidebarWin();
+ void HideActiveSidebarWin();
+ void ToggleInsModeOnActiveSidebarWin();
+
+ sal_Int32 GetMinimumSizeWithMeta() const;
+ sal_Int32 GetSidebarScrollerHeight() const;
+
+ void SetShadowState(const SwPostItField* pFld,bool bCursor = true);
+
+ void SetSpellChecking();
+
+ Color GetColorDark(sal_uInt16 aAuthorIndex);
+ Color GetColorLight(sal_uInt16 aAuthorIndex);
+ Color GetColorAnchor(sal_uInt16 aAuthorIndex);
+
+
+ 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();
+
+ void ConnectSidebarWinToFrm( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ void DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ bool HasFrmConnectedSidebarWins( const SwFrm& rFrm );
+ Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
+ const sal_Int32 nIndex );
+ void GetAllSidebarWinForFrm( const SwFrm& rFrm,
+ std::vector< Window* >* pChildren );
+};
+
+#endif
+
+
+
+
diff --git a/sw/inc/RefreshListenerContainer.hxx b/sw/inc/RefreshListenerContainer.hxx
new file mode 100644
index 000000000000..8860787a8abf
--- /dev/null
+++ b/sw/inc/RefreshListenerContainer.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
new file mode 100644
index 000000000000..00649f211f51
--- /dev/null
+++ b/sw/inc/SidebarWin.hxx
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SIDEBARWIN_HXX
+#define _SIDEBARWIN_HXX
+
+#include <postithelper.hxx>
+#include <SidebarWindowsTypes.hxx>
+
+#include <vcl/window.hxx>
+#include <swrect.hxx>
+
+#include <tools/datetime.hxx>
+#include <tools/date.hxx>
+
+#include <vcl/lineinfo.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <editeng/editstat.hxx>
+
+class SwPostItMgr;
+class SwPostItField;
+class OutlinerView;
+class Outliner;
+class ScrollBar;
+class SwEditWin;
+class SwView;
+class Edit;
+class MenuButton;
+//class SwRedline;
+class SwFrm;
+
+
+namespace sw { namespace sidebarwindows {
+
+class SidebarTxtControl;
+class AnchorOverlayObject;
+class ShadowOverlayObject;
+
+typedef sal_Int64 SwPostItBits;
+
+#define PB_Preview ((SwPostItBits)0x00000001)
+
+
+class SwSidebarWin : public Window
+{
+ public:
+ SwSidebarWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem );
+ virtual ~SwSidebarWin();
+
+ 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();
+
+ inline Point GetAnchorPos() { return mAnchorRect.Pos(); }
+ SwEditWin* EditWin();
+
+ inline OutlinerView* GetOutlinerView() { return mpOutlinerView;}
+ bool HasScrollbar() const;
+ bool IsScrollbarVisible() const;
+ inline ScrollBar* Scrollbar() { return mpVScrollbar; }
+ inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;}
+ inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;}
+
+ long GetPostItTextHeight();
+
+ void SwitchToPostIt(sal_uInt16 aDirection);
+ virtual void SwitchToFieldPos();
+
+ virtual sal_uInt32 MoveCaret() = 0;
+
+ virtual void UpdateData() = 0;
+ virtual void SetPostItText() = 0;
+ virtual void Delete();
+ virtual void GotoPos() = 0;
+
+ virtual String GetAuthor() = 0;
+ virtual Date GetDate() = 0;
+ virtual Time GetTime() = 0;
+
+ void ExecuteCommand(sal_uInt16 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 ShowAnchorOnly(const Point &aPoint);
+ void ShowNote();
+ void HideNote();
+
+ void ResetAttributes();
+
+ void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
+ void SetReadonly(sal_Bool bSet);
+ sal_Bool IsReadOnly() { return mbReadonly;}
+ bool IsPreview() { return nFlags & PB_Preview;}
+
+ void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
+ const Color& ColorAnchor() { return mColorAnchor; }
+ const Color& ColorDark() { return mColorDark; }
+ const Color& ColorLight() { return mColorLight; }
+ void Rescale();
+
+ void SetViewState(::sw::sidebarwindows::ViewState bViewState);
+
+ bool IsFollow() { return mbIsFollow; }
+ void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
+ virtual bool CalcFollow() = 0;
+
+#if 0
+#endif
+
+ 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();
+
+ void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
+ const Color& aColor);
+ SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
+ Color GetChangeColor() { return mChangeColor; }
+
+ virtual bool IsProtected() {return mbReadonly;};
+
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+ inline bool IsMouseOverSidebarWin() const { return mbMouseOver; }
+
+ void SetLanguage(const SvxLanguageItem aNewItem);
+
+ void ChangeSidebarItem( SwSidebarItem& rSidebarItem );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ protected:
+ virtual void DataChanged( const DataChangedEvent& aEvent);
+ virtual void LoseFocus();
+ virtual void Paint( const Rectangle& rRect);
+ virtual void GetFocus();
+ virtual MenuButton* CreateMenuButton() = 0;
+
+ void SetSizePixel( const Size& rNewSize );
+ SfxItemSet DefaultItem();
+
+ DECL_LINK(ModifyHdl, void*);
+ DECL_LINK(ScrollHdl, ScrollBar*);
+ DECL_LINK(DeleteHdl, void*);
+
+ inline SwView& DocView() { return mrView;}
+ inline SwPostItMgr& Mgr() { return mrMgr; }
+ inline Outliner* Engine() { return mpOutliner;}
+
+ private:
+ SwSidebarWin* GetTopReplyNote();
+
+ virtual SvxLanguageItem GetLanguage(void);
+
+ SwPostItMgr& mrMgr;
+ SwView& mrView;
+ const SwPostItBits nFlags;
+
+ sal_uLong mnEventId;
+
+ OutlinerView* mpOutlinerView;
+ Outliner* mpOutliner;
+
+ sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl;
+ ScrollBar* mpVScrollbar;
+ Edit* mpMetadataAuthor;
+ Edit* mpMetadataDate;
+ MenuButton* mpMenuButton;
+
+ sw::sidebarwindows::AnchorOverlayObject* mpAnchor;
+ sw::sidebarwindows::ShadowOverlayObject* mpShadow;
+
+ Color mColorAnchor;
+ Color mColorDark;
+ Color mColorLight;
+ Color mChangeColor;
+
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
+
+ Rectangle mPosSize;
+ SwRect mAnchorRect;
+ long mPageBorder;
+
+ bool mbMouseOver;
+ SwPostItHelper::SwLayoutStatus mLayoutStatus;
+
+ bool mbReadonly;
+ bool mbIsFollow;
+
+ SwSidebarItem& mrSidebarItem;
+ const SwFrm* mpAnchorFrm;
+};
+
+} } // eof namespace sw::sidebarwindows
+
+
+// implementation for change tracking comments, fully functional, but not yet used
+/*
+class SwRedComment : public SwSidebarWin
+{
+ private:
+ SwRedline* pRedline;
+
+ protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ public:
+ 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();
+};
+*/
+
+#endif
diff --git a/sw/inc/SidebarWindowsTypes.hxx b/sw/inc/SidebarWindowsTypes.hxx
new file mode 100644
index 000000000000..8b86f87edf87
--- /dev/null
+++ b/sw/inc/SidebarWindowsTypes.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: $
+ *
+ * $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 _SIDEBARWINDOWSTYPES_HXX
+#define _SIDEBARWINDOWSTYPES_HXX
+
+namespace sw { namespace sidebarwindows {
+
+enum ViewState
+{
+ VS_NORMAL,
+ VS_VIEW,
+ VS_EDIT
+};
+
+enum SidebarPosition
+{
+ SIDEBAR_LEFT, // sidebar on left side
+ SIDEBAR_RIGHT, // sidebar on right side
+ SIDEBAR_NONE // sidebar on neither side
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
new file mode 100644
index 000000000000..0ad636adf67f
--- /dev/null
+++ b/sw/inc/SwAppletImpl.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/itemset.hxx>
+
+#include <svl/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 sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet );
+ SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
+ SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {}
+ ~SwApplet_Impl();
+ void CreateApplet( const String& rCode, const String& rName,
+ sal_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..b256b51c6a53
--- /dev/null
+++ b/sw/inc/SwCapObjType.hxx
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..1bb40de8ba91
--- /dev/null
+++ b/sw/inc/SwGetPoolIdFromName.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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 sal_uInt16 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..56fef5d0a558
--- /dev/null
+++ b/sw/inc/SwNodeNum.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..58c5f38a5696
--- /dev/null
+++ b/sw/inc/SwNumberTree.hxx
@@ -0,0 +1,767 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 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;
+
+#ifdef DBG_UTIL
+ 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;
+
+#ifdef DBG_UTIL
+ /**
+ 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..39e5acd776cc
--- /dev/null
+++ b/sw/inc/SwNumberTreeTypes.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..5c98db3807ab
--- /dev/null
+++ b/sw/inc/SwRewriter.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+
+
+String const UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US);
+String const UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US);
+String const UNDO_ARG3("$3", RTL_TEXTENCODING_ASCII_US);
+
+
+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..1a2ecb9c9fd6
--- /dev/null
+++ b/sw/inc/SwSmartTagMgr.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..688b066bc75a
--- /dev/null
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..2f78cab966de
--- /dev/null
+++ b/sw/inc/SwUndoField.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+
+#include <com/sun/star/uno/Any.h>
+
+
+class SwDoc;
+class SwField;
+class SwMsgPoolItem;
+
+class SwUndoField : public SwUndo
+{
+ sal_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;
+ sal_Bool bUpdate;
+
+ void DoImpl();
+
+public:
+ SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField,
+ const SwField & aNewField,
+ SwMsgPoolItem * pHnt, sal_Bool bUpdate,
+ SwUndoId nId = UNDO_FIELD );
+
+ virtual ~SwUndoFieldFromDoc();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+class SwUndoFieldFromAPI : public SwUndoField
+{
+ com::sun::star::uno::Any aOldVal, aNewVal;
+ sal_uInt16 nWhich;
+
+ void DoImpl();
+
+public:
+ SwUndoFieldFromAPI(const SwPosition & rPos,
+ const com::sun::star::uno::Any & rOldVal,
+ const com::sun::star::uno::Any & rNewVal,
+ sal_uInt16 nWhich);
+ virtual ~SwUndoFieldFromAPI();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+#endif // SW_UNDO_FIELD_HXX
diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
new file mode 100644
index 000000000000..ea3aff8b2ebd
--- /dev/null
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..cd7e185f3c4c
--- /dev/null
+++ b/sw/inc/TextCursorHelper.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..b33b19b814c7
--- /dev/null
+++ b/sw/inc/access.hrc
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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"
+
+#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 STR_ACCESS_ANNOTATION_AUTHOR_NAME (RC_ACCESS_BEGIN + 18)
+#define STR_ACCESS_ANNOTATION_DATE_NAME (RC_ACCESS_BEGIN + 19)
+#define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20)
+#define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21)
+
+//IAccessibility2 Implementation 2009-----
+#define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22)
+//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23)
+#define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24)
+#define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25)
+#define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26)
+#define STR_ACCESS_COLUMN_WIDTH (RC_ACCESS_BEGIN + 27)
+#define STR_ACCESS_PAGESETUP_SPACING (RC_ACCESS_BEGIN + 28)
+#define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29)
+#define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30)
+#define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31)
+//-----IAccessibility2 Implementation 2009
+
+#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT
+
+#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..08256b4c5e79
--- /dev/null
+++ b/sw/inc/accessibilityoptions.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+{
+ sal_Bool bIsAlwaysAutoColor :1;
+ sal_Bool bIsStopAnimatedText :1;
+ sal_Bool bIsStopAnimatedGraphics :1;
+
+ SwAccessibilityOptions() :
+ bIsAlwaysAutoColor(sal_False),
+ bIsStopAnimatedText(sal_False),
+ bIsStopAnimatedGraphics(sal_False) {}
+
+ inline sal_Bool IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
+ inline void SetAlwaysAutoColor( sal_Bool b ) { bIsAlwaysAutoColor = b; }
+
+ inline sal_Bool IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
+ inline void SetStopAnimatedGraphics( sal_Bool b ) { bIsStopAnimatedText = b; }
+
+ inline sal_Bool IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
+ inline void SetStopAnimatedText( sal_Bool b ) { bIsStopAnimatedGraphics = b;}
+};
+#endif
+
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
new file mode 100644
index 000000000000..01c4593fe636
--- /dev/null
+++ b/sw/inc/accmap.hxx
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <tools/debug.hxx>
+#include <tools/fract.hxx>
+
+#include <vector>
+
+class ViewShell;
+class Rectangle;
+class SwFrm;
+class SwTxtFrm;
+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;
+class SwAccessibleSelectedParas_Impl;
+class SwRect;
+class MapMode;
+class SwAccPreviewData;
+struct PrevwPage;
+class Window;
+
+// 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
+{
+ mutable ::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;
+ }
+
+ const SwRect& GetVisArea() const;
+
+ /** 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,
+ Window* pWindow,
+ sal_Bool bRecursive = sal_False );
+
+ void InvalidatePosOrSize( const SwFrm* pFrm,
+ const SdrObject* pObj,
+ Window* pWindow,
+ 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();
+
+ sal_Int32 GetChildIndex( const SwFrm& rParentFrm,
+ Window& rChild ) const;
+
+ // 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..af0cb98e4e6f
--- /dev/null
+++ b/sw/inc/acmplwrd.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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;
+ sal_uInt16 nMaxCount, nMinWrdLen;
+ sal_Bool bLockWordLst;
+
+ void DocumentDying(const SwDoc& rDoc);
+public:
+ SwAutoCompleteWord( sal_uInt16 nWords = 500, sal_uInt16 nMWrdLen = 10 );
+ ~SwAutoCompleteWord();
+
+ sal_Bool InsertWord( const String& rWord, SwDoc& rDoc );
+
+ sal_Bool GetRange( const String& rWord, sal_uInt16& rStt, sal_uInt16& rEnd ) const;
+
+ const String& operator[]( sal_uInt16 n ) const { return *aWordLst[ n ]; }
+
+ sal_Bool IsLockWordLstLocked() const { return bLockWordLst; }
+ void SetLockWordLstLocked( sal_Bool bFlag ) { bLockWordLst = bFlag; }
+
+ void SetMaxCount( sal_uInt16 n );
+
+ sal_uInt16 GetMinWordLen() const { return nMinWrdLen; }
+ void SetMinWordLen( sal_uInt16 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..11b637957f8e
--- /dev/null
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..c9f53e51f069
--- /dev/null
+++ b/sw/inc/anchoredobject.hxx
@@ -0,0 +1,642 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..67ca9eb2b02f
--- /dev/null
+++ b/sw/inc/authfld.hxx
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_AUTHFLD_HXX
+#define SW_AUTHFLD_HXX
+
+#include "swdllapi.h"
+#include <fldbas.hxx>
+#include <toxe.hxx>
+
+#define _SVSTDARR_LONGS
+#include <svl/svstdarr.hxx>
+
+class SwAuthDataArr;
+/* -----------------21.09.99 13:32-------------------
+
+ --------------------------------------------------*/
+class SwAuthEntry
+{
+ String aAuthFields[AUTH_FIELD_END];
+ sal_uInt16 nRefCount;
+public:
+ SwAuthEntry() : nRefCount(0){}
+ SwAuthEntry( const SwAuthEntry& rCopy );
+ sal_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; }
+ sal_uInt16 GetRefCount() { return nRefCount; }
+};
+/* -----------------20.10.99 16:49-------------------
+
+ --------------------------------------------------*/
+struct SwTOXSortKey
+{
+ ToxAuthorityField eField;
+ sal_Bool bSortAscending;
+ SwTOXSortKey() :
+ eField(AUTH_FIELD_END),
+ bSortAscending(sal_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;
+ sal_Bool m_bIsSequence :1;
+ sal_Bool m_bSortByDocument :1;
+ LanguageType m_eLanguage;
+ String m_sSortAlgorithm;
+
+ // @@@ private copy assignment, but public copy ctor? @@@
+ const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& );
+
+protected:
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
+public:
+ SwAuthorityFieldType(SwDoc* pDoc);
+ SwAuthorityFieldType( const SwAuthorityFieldType& );
+ ~SwAuthorityFieldType();
+
+ virtual SwFieldType* Copy() const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+
+ inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
+ SwDoc* GetDoc(){ return m_pDoc; }
+ void RemoveField(long nHandle);
+ long AddField(const String& rFieldContents);
+ sal_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
+ sal_uInt16 AppendField(const SwAuthEntry& rInsert);
+ long GetHandle(sal_uInt16 nPos);
+
+ sal_uInt16 GetSequencePos(long nHandle);
+
+ sal_Bool IsSequence() const {return m_bIsSequence;}
+ void SetSequence(sal_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;}
+
+ sal_Bool IsSortByDocument() const {return m_bSortByDocument;}
+ void SetSortByDocument(sal_Bool bSet)
+ {
+ DelSequenceArray();
+ m_bSortByDocument = bSet;
+ }
+
+ sal_uInt16 GetSortKeyCount() const ;
+ const SwTOXSortKey* GetSortKey(sal_uInt16 nIdx) const ;
+ void SetSortKeys(sal_uInt16 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;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
+ SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
+ ~SwAuthorityField();
+
+ const String& GetFieldText(ToxAuthorityField eField) const;
+
+ virtual void SetPar1(const String& rStr);
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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..06ffbe633ac2
--- /dev/null
+++ b/sw/inc/authratr.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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:
+ sal_uInt16 nItemId;
+ sal_uInt16 nAttr;
+ ColorData nColor;
+
+ AuthorCharAttr();
+
+ inline sal_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..731dddd2e3fe
--- /dev/null
+++ b/sw/inc/bparr.hxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ sal_uInt16 nOffset;
+public:
+ virtual ~BigPtrEntry() {}
+protected:
+ BigPtrEntry() : pBlock(0), nOffset(0) {}
+
+ inline sal_uLong GetPos() const;
+ inline BigPtrArray& GetArray() const;
+};
+typedef BigPtrEntry* ElementPtr;
+
+
+typedef sal_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
+ sal_uLong nStart, nEnd; // Start- und EndIndex
+ sal_uInt16 nElem; // Anzahl Elemente
+};
+
+class SW_DLLPUBLIC BigPtrArray
+{
+ BlockInfo** ppInf; // Block-Infos
+ sal_uLong nSize; // Anzahl Elemente
+ sal_uInt16 nMaxBlock; // akt. max Anzahl Bloecke
+ sal_uInt16 nBlock; // Anzahl Bloecke
+ sal_uInt16 nCur; // letzter Block
+
+ sal_uInt16 Index2Block( sal_uLong ) const; // Blocksuche
+ BlockInfo* InsBlock( sal_uInt16 ); // Block einfuegen
+ void BlockDel( sal_uInt16 ); // es wurden Bloecke geloescht
+ void UpdIndex( sal_uInt16 ); // 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
+ sal_uInt16 Compress( short = COMPRESSLVL );
+
+public:
+ BigPtrArray();
+ ~BigPtrArray();
+
+ sal_uLong Count() const { return nSize; }
+
+ void Insert( const ElementPtr& r, sal_uLong pos );
+ void Remove( sal_uLong pos, sal_uLong n = 1 );
+ void Move( sal_uLong from, sal_uLong to );
+ void Replace( sal_uLong pos, const ElementPtr& r);
+
+ ElementPtr operator[]( sal_uLong ) const;
+ void ForEach( FnForEach fn, void* pArgs = NULL )
+ {
+ ForEach( 0, nSize, fn, pArgs );
+ }
+ void ForEach( sal_uLong nStart, sal_uLong nEnd, FnForEach fn, void* pArgs = NULL );
+};
+
+
+
+inline sal_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..9427b4d26c6e
--- /dev/null
+++ b/sw/inc/breakit.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ }
+
+ sal_uInt16 GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
+ sal_uInt16 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..f34ea4d9995e
--- /dev/null
+++ b/sw/inc/calbck.hxx
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CALBCK_HXX
+#define _CALBCK_HXX
+
+#include <tools/rtti.hxx>
+#include "swdllapi.h"
+#include <boost/noncopyable.hpp>
+
+class SwModify;
+class SwClientIter;
+class SfxPoolItem;
+class SfxHint;
+
+/*
+ SwModify and SwClient cooperate in propagating attribute changes.
+ If an attribute changes, the change is notified to all dependent
+ formats and other interested objects, e.g. Nodes. The clients will detect
+ if the change affects them. It could be that the changed attribute is
+ overruled in the receiving object so that its change does not become
+ effective or that the receiver is not interested in the particular attribute
+ in general (though probably in other attributes of the SwModify object they
+ are registered in).
+ As SwModify objects are derived from SwClient, they can create a chain of SwClient
+ objects where changes can get propagated through.
+ Each SwClient can be registered at only one SwModify object, while each SwModify
+ object is connected to a list of SwClient objects. If an object derived from SwClient
+ wants to get notifications from more than one SwModify object, it must create additional
+ SwClient objects. The SwDepend class allows to handle their notifications in the same
+ notification callback as it forwards the Modify() calls it receives to a "master"
+ SwClient implementation.
+ The SwClientIter class allows to iterate over the SwClient objects registered at an
+ SwModify. For historical reasons its ability to use TypeInfo to restrict this iteration
+ to objects of a particular type created a lot of code that misuses SwClient-SwModify
+ relationships that basically should be used only for Modify() callbacks.
+ This is still subject to refactoring.
+ Until this gets resolved, new SwClientIter base code should be reduced to the absolute
+ minimum and it also should be wrapped by SwIterator templates that prevent that the
+ code gets polluted by pointer casts (see switerator.hxx).
+ */
+
+// ----------
+// SwClient
+// ----------
+
+class SW_DLLPUBLIC SwClient : ::boost::noncopyable
+{
+ // avoids making the details of the linked list and the callback method public
+ friend class SwModify;
+ friend class SwClientIter;
+
+ SwClient *pLeft, *pRight; // double-linked list of other clients
+ SwModify *pRegisteredIn; // event source
+
+ // in general clients should not be removed when their SwModify sends out Modify()
+ // notifications; in some rare cases this is necessary, but only the concrete SwClient
+ // sub class will know that; this flag allows to make that known
+ bool mbIsAllowedToBeRemovedInModifyCall;
+
+ // callbacks received from SwModify (friend class - so these methods can be private)
+ // should be called only from SwModify the client is registered in
+ // mba: IMHO these methods should be pure virtual
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+
+protected:
+ // single argument ctors shall be explicit.
+ explicit SwClient(SwModify *pToRegisterIn);
+
+ // write access to pRegisteredIn shall be granted only to the object itself (protected access)
+ SwModify* GetRegisteredInNonConst() const { return pRegisteredIn; }
+ void SetIsAllowedToBeRemovedInModifyCall( bool bSet ) { mbIsAllowedToBeRemovedInModifyCall = bSet; }
+
+public:
+
+ inline SwClient();
+ virtual ~SwClient();
+
+ // in case an SwModify object is destroyed that itself is registered in another SwModify,
+ // its SwClient objects can decide to get registered to the latter instead by calling this method
+ void CheckRegistration( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue );
+
+ // controlled access to Modify method
+ // mba: this is still considered a hack and it should be fixed; the name makes grep-ing easier
+ void ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ) { Modify ( pOldValue, pNewValue ); }
+ void SwClientNotifyCall( const SwModify& rModify, const SfxHint& rHint ) { SwClientNotify( rModify, rHint ); }
+
+ const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
+ bool IsLast() const { return !pLeft && !pRight; }
+
+ // needed for class SwClientIter
+ TYPEINFO();
+
+ // get information about attribute
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+};
+
+inline SwClient::SwClient() :
+ pLeft(0), pRight(0), pRegisteredIn(0), mbIsAllowedToBeRemovedInModifyCall(false)
+{}
+
+// ----------
+// SwModify
+// ----------
+
+class SW_DLLPUBLIC SwModify: public SwClient
+{
+// friend class SwClientIter;
+
+ SwClient* pRoot; // the start of the linked list of clients
+ sal_Bool bModifyLocked : 1; // don't broadcast changes now
+ sal_Bool bLockClientList : 1; // may be set when this instance notifies its clients
+ sal_Bool bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed
+ sal_Bool bInCache : 1;
+ sal_Bool bInSwFntCache : 1;
+
+ // mba: IMHO this method should be pure virtual
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+ SwModify();
+
+ // broadcasting: send notifications to all clients
+ void NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue );
+
+ // the same, but without setting bModifyLocked or checking for any of the flags
+ // mba: it would be interesting to know why this is necessary
+ // also allows to limit callback to certain type (HACK)
+ void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType = TYPE(SwClient) );
+
+ // a more universal broadcasting mechanism
+ void CallSwClientNotify( const SfxHint& rHint ) const;
+
+ // single argument ctors shall be explicit.
+ explicit SwModify( SwModify *pToRegisterIn );
+ virtual ~SwModify();
+
+ void Add(SwClient *pDepend);
+ SwClient* Remove(SwClient *pDepend);
+ const SwClient* GetDepends() const { return pRoot; }
+
+ // get information about attribute
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+
+ void LockModify() { bModifyLocked = sal_True; }
+ void UnlockModify() { bModifyLocked = sal_False; }
+ void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
+ void SetInDocDTOR() { bInDocDTOR = sal_True; }
+ sal_Bool IsModifyLocked() const { return bModifyLocked; }
+ sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
+ sal_Bool IsInCache() const { return bInCache; }
+ sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
+
+ void CheckCaching( const sal_uInt16 nWhich );
+ bool IsLastDepend() { return pRoot && pRoot->IsLast(); }
+ int GetClientCount() const;
+};
+
+// ----------
+// SwDepend
+// ----------
+
+/*
+ * Helper class for objects that need to depend on more than one SwClient
+ */
+class SW_DLLPUBLIC SwDepend: public SwClient
+{
+ SwClient *pToTell;
+
+public:
+ SwDepend() : pToTell(0) {}
+ SwDepend(SwClient *pTellHim, SwModify *pDepend);
+
+ SwClient* GetToTell() { return pToTell; }
+
+ virtual sal_Bool GetInfo( SfxPoolItem & ) const;
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+};
+
+
+class SwClientIter
+{
+ friend SwClient* SwModify::Remove(SwClient *); // for pointer adjustments
+ friend void SwModify::Add(SwClient *pDepend); // for pointer adjustments
+
+ const SwModify& rRoot;
+
+ // the current object in an iteration
+ SwClient* pAct;
+
+ // in case the current object is already removed, the next object in the list
+ // is marked down to become the current object in the next step
+ // this is necessary because iteration requires access to members of the current object
+ SwClient* pDelNext;
+
+ // SwClientIter objects are tracked in linked list so that they can react
+ // when the current (pAct) or marked down (pDelNext) SwClient is removed
+ // from its SwModify
+ SwClientIter *pNxtIter;
+
+ // iterator can be limited to return only SwClient objects of a certain type
+ TypeId aSrchId;
+
+public:
+ SW_DLLPUBLIC SwClientIter( const SwModify& );
+ SW_DLLPUBLIC ~SwClientIter();
+
+ const SwModify& GetModify() const { return rRoot; }
+
+ SwClient* operator++(int);
+ SwClient* GoStart();
+ SwClient* GoEnd();
+
+ // returns the current SwClient object;
+ // in case this was already removed, the object marked down to become
+ // the next current one is returned
+ SwClient* operator()() const
+ { return pDelNext == pAct ? pAct : pDelNext; }
+
+ // return "true" if an object was removed from a client chain in iteration
+ // adding objects to a client chain in iteration is forbidden
+ // SwModify::Add() asserts this
+ bool IsChanged() const { return pDelNext != pAct; }
+
+ SW_DLLPUBLIC SwClient* First( TypeId nType );
+ SW_DLLPUBLIC SwClient* Next();
+ SW_DLLPUBLIC SwClient* Last( TypeId nType );
+ SW_DLLPUBLIC SwClient* Previous();
+};
+
+#endif
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
new file mode 100644
index 000000000000..996f6edb2b2a
--- /dev/null
+++ b/sw/inc/calc.hxx
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svarray.hxx>
+#include <unotools/syslocale.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
+ sal_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,
+ sal_uInt16 nTblSize, sal_uInt16* pPos = 0 );
+
+void DeleteHashTable( SwHash** ppTable, sal_uInt16 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;
+ SvtSysLocale m_aSysLocale;
+ const LocaleDataWrapper* pLclData;
+ CharClass* pCharClass;
+
+ sal_uInt16 nListPor;
+ SwCalcOper eCurrOper;
+ SwCalcOper eCurrListOper;
+ SwCalcError eError;
+
+
+ SwCalcOper GetToken();
+ SwSbxValue Expr();
+ SwSbxValue Term();
+ SwSbxValue Prim();
+
+ sal_Bool ParseTime( sal_uInt16*, sal_uInt16*, sal_uInt16* );
+
+ 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, sal_Bool bRound = sal_True );
+ String GetStrResult( double, sal_Bool bRound = sal_True );
+
+ SwCalcExp* VarInsert( const String& r );
+ SwCalcExp* VarLook( const String &rStr, sal_uInt16 ins = 0 );
+ void VarChange( const String& rStr, const SwSbxValue& rValue );
+ void VarChange( const String& rStr, double );
+ SwHash** GetVarTable() { return VarTable; }
+
+ sal_Bool Push( const VoidPtr pPtr );
+ void Pop( const VoidPtr pPtr );
+
+ void SetCalcError( SwCalcError eErr ) { eError = eErr; }
+ sal_Bool IsCalcError() const { return 0 != eError; }
+
+ static bool Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal,
+ LocaleDataWrapper const*const pData = 0 );
+ static bool Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal, SwDoc *const pDoc );
+
+ SW_DLLPUBLIC static sal_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..8e99f943360f
--- /dev/null
+++ b/sw/inc/ccoll.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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;
+ sal_uLong nCnd;
+ sal_uLong nSubCond;
+ };
+
+//***********************************************************
+
+#define COND_COMMAND_COUNT 28
+
+struct CommandStruct
+{
+ sal_uLong nCnd;
+ sal_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(sal_uInt16 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(sal_uInt16 nPos) const;
+ void SetStyle( const String* pStyle, sal_uInt16 nPos);
+
+};
+
+#endif
+
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
new file mode 100644
index 000000000000..30f5f3bdc925
--- /dev/null
+++ b/sw/inc/cellatr.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
+#include "swdllapi.h"
+#include "format.hxx"
+#include "cellfml.hxx"
+
+class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
+{
+ sal_Bool bAuto; // automatisch vergebenes Flag
+public:
+ SwTblBoxNumFormat( sal_uInt32 nFormat = NUMBERFORMAT_TEXT,
+ sal_Bool bAuto = sal_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;
+ }
+
+ sal_Bool GetAutoFlag() const { return bAuto; }
+ void SetAutoFlag( sal_Bool bFlag = sal_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(sal_Bool bInP) const
+ { return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); }
+inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(sal_Bool bInP) const
+ { return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); }
+inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(sal_Bool bInP) const
+ { return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); }
+
+//***************************************************************************
+
+inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(sal_Bool bInP) const
+ { return aSet.GetTblBoxNumFmt(bInP); }
+inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(sal_Bool bInP) const
+ { return aSet.GetTblBoxFormula(bInP); }
+inline const SwTblBoxValue &SwFmt::GetTblBoxValue(sal_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..169058938f56
--- /dev/null
+++ b/sw/inc/cellfml.hxx
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ sal_uInt16 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();
+
+ sal_Bool CalcWithStackOverflow();
+ sal_Bool IsStackOverFlow() const { return nMaxSize == nStackCnt; }
+ sal_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
+ sal_Bool bValidValue; // sal_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 sal_uInt16 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
+ sal_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
+ sal_Bool IsValid() const { return bValidValue; }
+ inline void ChgValid( sal_Bool bNew ) { bValidValue = bNew; }
+
+ const String& GetFormula() const { return sFormel; }
+ void SetFormula( const String& rNew )
+ {
+ sFormel = rNew;
+ bValidValue = sal_False;
+ eNmType = EXTRNL_NAME;
+ }
+
+ sal_uInt16 GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
+ // sind alle Boxen gueltig, auf die sich die Formel bezieht?
+ sal_Bool HasValidBoxes() const;
+};
+
+
+
+#endif
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
new file mode 100644
index 000000000000..ba0040797a74
--- /dev/null
+++ b/sw/inc/charatr.hxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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(sal_Bool bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
+inline const SvxPostureItem &SwAttrSet::GetCJKPosture(sal_Bool bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); }
+inline const SvxPostureItem &SwAttrSet::GetCTLPosture(sal_Bool bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetWeight(sal_Bool bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetCJKWeight(sal_Bool bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetCTLWeight(sal_Bool bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); }
+inline const SvxShadowedItem &SwAttrSet::GetShadowed(sal_Bool bInP) const
+ { return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); }
+inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(sal_Bool bInP) const
+ { return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); }
+inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(sal_Bool bInP) const
+ { return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); }
+inline const SvxContourItem &SwAttrSet::GetContour(sal_Bool bInP) const
+ { return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); }
+inline const SvxKerningItem &SwAttrSet::GetKerning(sal_Bool bInP) const
+ { return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); }
+inline const SvxUnderlineItem &SwAttrSet::GetUnderline(sal_Bool bInP) const
+ { return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); }
+inline const SvxOverlineItem &SwAttrSet::GetOverline(sal_Bool bInP) const
+ { return (const SvxOverlineItem&)Get( RES_CHRATR_OVERLINE,bInP); }
+inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(sal_Bool bInP) const
+ { return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetSize(sal_Bool bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(sal_Bool bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(sal_Bool bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); }
+inline const SvxPropSizeItem &SwAttrSet::GetPropSize(sal_Bool bInP) const
+ { return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); }
+inline const SvxFontItem &SwAttrSet::GetFont(sal_Bool bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); }
+inline const SvxFontItem &SwAttrSet::GetCJKFont(sal_Bool bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); }
+inline const SvxFontItem &SwAttrSet::GetCTLFont(sal_Bool bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); }
+inline const SvxColorItem &SwAttrSet::GetColor(sal_Bool bInP) const
+ { return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); }
+inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(sal_Bool bInP) const
+ { return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetLanguage(sal_Bool bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(sal_Bool bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(sal_Bool bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); }
+inline const SvxEscapementItem &SwAttrSet::GetEscapement(sal_Bool bInP) const
+ { return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); }
+inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(sal_Bool bInP) const
+ { return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); }
+inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(sal_Bool bInP) const
+ { return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); }
+inline const SvxBlinkItem &SwAttrSet::GetBlink(sal_Bool bInP) const
+ { return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); }
+inline const SvxBrushItem &SwAttrSet::GetChrBackground( sal_Bool bInP ) const
+ { return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); }
+inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( sal_Bool bInP ) const
+ { return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); }
+inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( sal_Bool bInP ) const
+ { return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); }
+inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( sal_Bool bInP ) const
+ { return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); }
+inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( sal_Bool bInP ) const
+ { return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); }
+inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( sal_Bool bInP ) const
+ { return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); }
+inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( sal_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(sal_Bool bInP) const
+ { return aSet.GetPosture(bInP); }
+inline const SvxWeightItem &SwFmt::GetWeight(sal_Bool bInP) const
+ { return aSet.GetWeight(bInP); }
+inline const SvxShadowedItem &SwFmt::GetShadowed(sal_Bool bInP) const
+ { return aSet.GetShadowed(bInP); }
+inline const SvxAutoKernItem &SwFmt::GetAutoKern(sal_Bool bInP) const
+ { return aSet.GetAutoKern(bInP); }
+inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(sal_Bool bInP) const
+ { return aSet.GetWordLineMode(bInP); }
+inline const SvxContourItem &SwFmt::GetContour(sal_Bool bInP) const
+ { return aSet.GetContour(bInP); }
+inline const SvxKerningItem &SwFmt::GetKerning(sal_Bool bInP) const
+ { return aSet.GetKerning(bInP); }
+inline const SvxUnderlineItem &SwFmt::GetUnderline(sal_Bool bInP) const
+ { return aSet.GetUnderline(bInP); }
+inline const SvxOverlineItem &SwFmt::GetOverline(sal_Bool bInP) const
+ { return aSet.GetOverline(bInP); }
+inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(sal_Bool bInP) const
+ { return aSet.GetCrossedOut(bInP); }
+inline const SvxFontHeightItem &SwFmt::GetSize(sal_Bool bInP) const
+ { return aSet.GetSize(bInP); }
+inline const SvxPropSizeItem &SwFmt::GetPropSize(sal_Bool bInP) const
+ { return aSet.GetPropSize(bInP); }
+inline const SvxFontItem &SwFmt::GetFont(sal_Bool bInP) const
+ { return aSet.GetFont(bInP); }
+inline const SvxFontItem &SwFmt::GetCJKFont(sal_Bool bInP) const
+ { return aSet.GetCJKFont(bInP); }
+inline const SvxFontItem &SwFmt::GetCTLFont(sal_Bool bInP) const
+ { return aSet.GetCTLFont(bInP); }
+inline const SvxColorItem &SwFmt::GetColor(sal_Bool bInP) const
+ { return aSet.GetColor(bInP); }
+ inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(sal_Bool bInP) const
+ { return aSet.GetCharSetColor(bInP); }
+inline const SvxLanguageItem &SwFmt::GetLanguage(sal_Bool bInP) const
+ { return aSet.GetLanguage(bInP); }
+inline const SvxEscapementItem &SwFmt::GetEscapement(sal_Bool bInP) const
+ { return aSet.GetEscapement(bInP); }
+inline const SvxCaseMapItem &SwFmt::GetCaseMap(sal_Bool bInP) const
+ { return aSet.GetCaseMap(bInP); }
+inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(sal_Bool bInP) const
+ { return aSet.GetNoHyphenHere(bInP); }
+inline const SvxBlinkItem &SwFmt::GetBlink(sal_Bool bInP) const
+ { return aSet.GetBlink(bInP); }
+inline const SvxBrushItem &SwFmt::GetChrBackground(sal_Bool bInP) const
+ { return aSet.GetChrBackground(bInP); }
+inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( sal_Bool bInP ) const
+ { return aSet.GetEmphasisMark(bInP); }
+inline const SvxTwoLinesItem &SwFmt::Get2Lines( sal_Bool bInP ) const
+ { return aSet.Get2Lines(bInP); }
+inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( sal_Bool bInP ) const
+ { return aSet.GetCharScaleW(bInP); }
+inline const SvxCharRotateItem &SwFmt::GetCharRotate( sal_Bool bInP ) const
+ { return aSet.GetCharRotate(bInP); }
+inline const SvxCharReliefItem &SwFmt::GetCharRelief( sal_Bool bInP ) const
+ { return aSet.GetCharRelief(bInP); }
+inline const SvxCharHiddenItem &SwFmt::GetCharHidden( sal_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..3b018fcff186
--- /dev/null
+++ b/sw/inc/charfmt.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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, sal_uInt16 nWhich );
+ extern sal_Bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr );
+}
+
+#endif
+
+
+
diff --git a/sw/inc/chcmprse.hxx b/sw/inc/chcmprse.hxx
new file mode 100644
index 000000000000..04a87435eadb
--- /dev/null
+++ b/sw/inc/chcmprse.hxx
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _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..ed6293dcd787
--- /dev/null
+++ b/sw/inc/checkit.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..195b76f163d1
--- /dev/null
+++ b/sw/inc/chpfld.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_CHPFLD_HXX
+#define SW_CHPFLD_HXX
+
+#include "fldbas.hxx"
+
+
+class SwFrm;
+class SwCntntNode;
+class SwTxtNode;
+
+
+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;
+ sal_uInt8 nLevel;
+ String sTitle, sNumber, sPre, sPost;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
+
+ // --> OD 2008-02-14 #i53420#
+// void ChangeExpansion( const SwFrm*,
+// const SwTxtNode*,
+// sal_Bool bSrchNum = sal_False);
+ void ChangeExpansion( const SwFrm*,
+ const SwCntntNode*,
+ sal_Bool bSrchNum = sal_False);
+ // <--
+ void ChangeExpansion(const SwTxtNode &rNd, sal_Bool bSrchNum);
+
+ inline sal_uInt8 GetLevel() const;
+ inline void SetLevel(sal_uInt8);
+
+ inline const String& GetNumber() const;
+ inline const String& GetTitle() const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; }
+inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; }
+inline const String& SwChapterField::GetNumber() const { return sNumber; }
+inline const String& SwChapterField::GetTitle() const { return sTitle; }
+
+#endif // SW_CHPFLD_HXX
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
new file mode 100644
index 000000000000..447229eb8965
--- /dev/null
+++ b/sw/inc/chrdlg.hrc
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#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..c07652eed352
--- /dev/null
+++ b/sw/inc/cmdid.h
@@ -0,0 +1,1316 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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_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_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)
+#define FN_UNO_NESTED_TEXT_CONTENT (FN_EXTRA2 + 113)
+
+// #i972: bool items to be passed to SwFrmPage for evaluation
+#define FN_OLE_IS_MATH (FN_EXTRA2 + 114)
+#define FN_MATH_BASELINE_ALIGNMENT (FN_EXTRA2 + 115)
+
+#define FN_EMBEDDED_OBJECT (FN_EXTRA2 + 116)
+
+/*--------------------------------------------------------------------
+ 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_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) /* sal_uInt8-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..54df3b1b9f24
--- /dev/null
+++ b/sw/inc/colwd.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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
+{
+ FixedLine aWidthFL;
+ FixedText aColFT;
+ NumericField aColEdit;
+ FixedText aWidthFT;
+ MetricField aWidthEdit;
+ 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..981c89ef37db
--- /dev/null
+++ b/sw/inc/comcore.hrc
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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
+#define STR_AUTOFMTREDL_NON_BREAK_SPACE 21
+// !!!!!!!!!!!!!!!!!!!!!!!!!! das Ende immer richtig setzen !!!!!!!!!!!!
+#define STR_AUTOFMTREDL_END 22
+
+
+#endif
+
+
+
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
new file mode 100644
index 000000000000..6dbb2fbc3fe7
--- /dev/null
+++ b/sw/inc/crsrsh.hxx
@@ -0,0 +1,962 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_CRSRSH_HXX
+#define SW_CRSRSH_HXX
+
+#include <com/sun/star/i18n/WordType.hpp>
+
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <tools/rtti.hxx>
+
+#include <IShellCursorSupplier.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,
+ SW_FORMCTRL = 0x1000
+#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#
+ const sw::mark::IFieldmark* pFldmark;
+ } 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?
+ sal_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
+ , public ::sw::IShellCursorSupplier
+{
+ friend class SwCallLink;
+ friend class SwVisCrsr;
+ friend class SwSelPaintRects;
+ friend class SwChgLinkFlag;
+
+ //Braucht den Crsr als IntrnlCrsr.
+ friend sal_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;
+ sal_uLong nAktNode; // save CursorPos at Start-Action
+ xub_StrLen nAktCntnt;
+ sal_uInt16 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.
+ */
+ sal_uInt16 nCrsrMove;
+ sal_uInt16 nBasicActionCnt; // Actions, die vom Basic geklammert wurden
+ CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
+
+ // --> OD 2008-04-02 #refactorlists#
+ String sMarkedListId;
+ int nMarkedListLevel;
+ // <--
+
+ sal_Bool bHasFocus : 1; // Shell ist in einem Window "aktiv"
+ sal_Bool bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
+ sal_Bool bChgCallFlag : 1; // Attributaenderung innerhalb von
+ // Start- und EndAction
+ sal_Bool bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
+ // (wird im Invalidate vom Cursor benutzt)
+
+ sal_Bool bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
+ // sal_True -> ChgLnk callen
+ // Zugriff nur ueber SwChgLinkFlag
+ sal_Bool bAllProtect : 1; // Flag fuer Bereiche
+ // sal_True -> alles geschuetzt / versteckt
+ sal_Bool bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
+ // sal_True -> die Sicht wurde verschoben
+ sal_Bool bGCAttr : 1; // sal_True -> es existieren nichtaufgespannte Attr.
+ sal_Bool bIgnoreReadonly : 1; // sal_True -> Beim naechsten EndAction trotz
+ // Readonly den Crsr sichtbar machen.
+ sal_Bool bSelTblCells : 1; // sal_True -> Zellen uebers InputWin selektieren
+ sal_Bool bAutoUpdateCells : 1; // sal_True -> Zellen werden autoformatiert
+ sal_Bool bBasicHideCrsr : 1; // sal_True -> HideCrsr vom Basic
+ sal_Bool bSetCrsrInReadOnly : 1;// sal_True -> Cursor darf in ReadOnly-Bereiche
+ sal_Bool bOverwriteCrsr : 1; // sal_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( sal_uInt16 eFlags
+ =SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
+ sal_Bool bIdleEnd = sal_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.
+ sal_Bool LeftRight( sal_Bool, sal_uInt16, sal_uInt16, sal_Bool );
+ SW_DLLPRIVATE sal_Bool UpDown( sal_Bool, sal_uInt16 );
+ SW_DLLPRIVATE sal_Bool LRMargin( sal_Bool, sal_Bool bAPI = sal_False );
+ SW_DLLPRIVATE sal_Bool IsAtLRMargin( sal_Bool, sal_Bool bAPI = sal_False ) const;
+
+ SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
+
+typedef sal_Bool (SwCursor:: *FNCrsr)();
+ SW_DLLPRIVATE sal_Bool CallCrsrFN( FNCrsr );
+
+ SW_DLLPRIVATE const SwRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect );
+
+protected:
+
+ inline SwMoveFnCollection* MakeFindRange( sal_uInt16, sal_uInt16, 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
+ sal_Bool _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
+ // <--
+
+ // --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
+ bool SetInFrontOfLabel( sal_Bool bNew );
+ // <--
+
+ void RefreshBlockCursor();
+
+ /** Updates the marked list level according to the cursor.
+ */
+ SW_DLLPRIVATE void UpdateMarkedListLevel();
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+ TYPEINFO();
+ SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
+ // verkleideter Copy-Constructor
+ SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
+ virtual ~SwCrsrShell();
+
+ // IShellCursorSupplier
+ virtual SwPaM & CreateNewShellCursor();
+ virtual SwPaM & GetCurrentShellCursor();
+
+ // neuen Cusror erzeugen und den alten anhaengen
+ SwPaM * CreateCrsr();
+ // loesche den aktuellen Cursor und der folgende wird zum Aktuellen
+ sal_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( sal_Bool bMakeTblCrsr = sal_True ) const;
+ inline SwCursor* GetSwCrsr( sal_Bool bMakeTblCrsr = sal_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 sal_Bool bIdleEnd = sal_False );
+
+ // Basiscursortravelling
+ long GetUpDownX() const { return nUpDownX; }
+
+ sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
+ { return LeftRight( sal_True, nCnt, nMode, bAllowVisual ); }
+ sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
+ { return LeftRight( sal_False, nCnt, nMode, bAllowVisual ); }
+ sal_Bool Up( sal_uInt16 nCnt = 1 ) { return UpDown( sal_True, nCnt ); }
+ sal_Bool Down( sal_uInt16 nCnt = 1 ) { return UpDown( sal_False, nCnt ); }
+ sal_Bool LeftMargin() { return LRMargin( sal_True ); }
+ sal_Bool RightMargin(sal_Bool bAPI = sal_False) { return LRMargin( sal_False, bAPI ); }
+ sal_Bool SttEndDoc( sal_Bool bStt );
+
+ sal_Bool MovePage( SwWhichPage, SwPosPage );
+ sal_Bool MovePara( SwWhichPara, SwPosPara );
+ sal_Bool MoveSection( SwWhichSection, SwPosSection );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
+ sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
+
+ // die Suchfunktionen
+ sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ sal_Bool& bCancel,
+ FindRanges eRng, int bReplace = sal_False );
+
+ sal_uLong Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ sal_Bool& bCancel,
+ FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
+
+ sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ sal_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, sal_Bool bOnlyText = sal_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 sal_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(sal_Bool bPointFirst = sal_True);
+
+ void SwapPam();
+ sal_Bool ChgCurrPam( const Point & rPt,
+ sal_Bool bTstOnly = sal_True, //Nur testen, nicht setzen
+ sal_Bool bTstHit = sal_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 = sal_True )
+ * - den aktuellen und der auf dem Stack stehende wird zum aktuellen
+ *
+ * Return: es war auf dem Stack noch einer vorhanden
+ */
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
+ /*
+ * Verbinde zwei Cursor miteinander.
+ * Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
+ */
+ void Combine();
+
+#if !defined(DBG_UTIL)
+ void SttCrsrMove() { ++nCrsrMove; StartAction(); }
+ void EndCrsrMove( const sal_Bool bIdleEnd = sal_False )
+ { EndAction( bIdleEnd ); --nCrsrMove; }
+#else
+ void SttCrsrMove();
+ void EndCrsrMove( const sal_Bool bIdleEnd = sal_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!)
+ */
+ sal_Bool HasShFcs() const { return bHasFocus; }
+ void ShLooseFcs();
+ void ShGetFcs( sal_Bool bUpdate = sal_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( sal_Bool bCrsrVis );
+ void HideCrsrs();
+
+ sal_Bool IsOverwriteCrsr() const { return bOverwriteCrsr; }
+ void SetOverwriteCrsr( sal_Bool bFlag ) { bOverwriteCrsr = bFlag; }
+
+ // gebe den aktuellen Frame, in dem der Cursor steht, zurueck
+ SwCntntFrm *GetCurrFrm( const sal_Bool bCalcFrm = sal_True ) const;
+
+ //sal_True wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
+ //sal_False wenn der arbeitet (trotz Readonly).
+ sal_Bool IsCrsrReadonly() const;
+ // Cursor steht in etwas geschuetztem oder in die Selektion umspannt
+ // etwas geschuetztes.
+ sal_Bool HasReadonlySel() const;
+ // darf der Cursor in ReadOnlyBereiche?
+ sal_Bool IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
+ void SetReadOnlyAvailable( sal_Bool bFlag );
+ sal_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.
+ sal_Bool HasSelection() const;
+
+ // Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
+ // aufgespannt oder nicht der einzigste ist.
+ inline sal_Bool IsSelection() const;
+ // returns if multiple cursors are available
+ inline sal_Bool IsMultiSelection() const;
+
+ // Abfrage, ob ein kompletter Absatz selektiert wurde
+ sal_Bool IsSelFullPara() const;
+ // Abfrage, ob die Selektion in einem Absatz ist
+ inline sal_Bool IsSelOnePara() const;
+
+ //Sollte fuer das Clipboard der WaitPtr geschaltet werden.
+ sal_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.
+ */
+ sal_Bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
+
+ // gebe die aktuelle Seitennummer zurueck:
+ // sal_True: in der der Cursor steht
+ // sal_False: die am oberen Rand sichtbar ist
+ void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
+ sal_Bool bAtCrsrPos = sal_True, const sal_Bool bCalcFrm = sal_True );
+ // bestimme in welche Richtung "leere Seiten" behandelt werden!
+ // (wird benutzt im PhyPage.. )
+ sal_uInt16 GetNextPrevPageNum( sal_Bool bNext = sal_True );
+
+ // setze den Cursor auf die Seite "nPage" an den Anfang
+ sal_Bool GotoPage( sal_uInt16 nPage );
+
+ // gebe alle Dokumentseiten zurueck
+ sal_uInt16 GetPageCnt();
+
+ // Gehe zur naechsten Selection
+ sal_Bool GoNextCrsr();
+ // gehe zur vorherigen Selection
+ sal_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( sal_Bool bIsPtInTbl = sal_True ) const;
+ // erfrage die Document - Layout - Position vom akt. Crsr
+ inline Point& GetCrsrDocPos( sal_Bool bPoint = sal_True ) const;
+ inline sal_Bool IsCrsrPtAtEnd() const;
+
+ inline const SwPaM* GetTblCrs() const;
+ inline SwPaM* GetTblCrs();
+
+ sal_Bool IsTblComplex() const;
+ sal_Bool IsTblComplexForChart();
+ // erfrage die akt. TabellenSelektion als Text
+ String GetBoxNms() const;
+
+ // setze Crsr in die naechsten/vorherigen Celle
+ sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True );
+ sal_Bool GoPrevCell();
+ // gehe zu dieser Box (wenn vorhanden und in Tabelle!)
+ sal_Bool GotoTable( const String& rName );
+
+ // select a table row, column or box (based on the current cursor)
+ sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); }
+ sal_Bool SelTblCol() { return _SelTblRowOrCol( false ); }
+ sal_Bool SelTblBox();
+ // --> FME 2004-07-30 #i32329# Enhanced table selection
+ sal_Bool SelTbl();
+ // <--
+
+ // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
+ sal_Bool GotoNextNum();
+ sal_Bool GotoPrevNum();
+
+ // zu diesem Gliederungspunkt
+ sal_Bool GotoOutline( const String& rName );
+ // zum naechsten/vorhergehenden oder angegebenen OultineNode
+ void GotoOutline( sal_uInt16 nIdx );
+ // suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
+ sal_uInt16 GetOutlinePos( sal_uInt8 nLevel = UCHAR_MAX );
+ // selektiere den angeben Bereich von OutlineNodes. Optional
+ // inclusive der Childs. Die sal_uInt16 sind die Positionen im
+ // OutlineNds-Array!! (EditShell)
+ sal_Bool MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
+ sal_Bool bWithChilds = sal_False );
+
+ sal_Bool GotoNextOutline(); // naechster Node mit Outline-Num.
+ sal_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
+ sal_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; }
+ sal_uInt16 UpdateTblSelBoxes();
+
+ sal_Bool GotoFtnTxt(); // springe aus dem Content zur Fussnote
+ sal_Bool GotoFtnAnchor(); // springe aus der Fussnote zum Anker
+ sal_Bool GotoPrevFtnAnchor();
+ sal_Bool GotoNextFtnAnchor();
+
+ sal_Bool GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
+ sal_Bool GotoHeaderTxt(); // springe aus dem Content zum Header
+ sal_Bool GotoFooterTxt(); // springe aus dem Content zum Footer
+ // springe in den Header/Footer des angegebenen oder akt. PageDesc
+ sal_Bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX,
+ sal_Bool bInHeader = sal_True );
+ // is point of cursor in header/footer. pbInHeader return sal_True if it is
+ // in a headerframe otherwise in a footerframe
+ sal_Bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
+
+ // springe zum naechsten Verzeichnis [mit dem Namen]
+ sal_Bool GotoNextTOXBase( const String* = 0 );
+ // springe zum vorherigen Verzeichnis [mit dem Namen]
+ sal_Bool GotoPrevTOXBase( const String* = 0 );
+ sal_Bool GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
+ // springe zum naechsten (vorherigen) Verzeichniseintrag
+ sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_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
+ sal_Bool GotoNxtPrvTblFormula( sal_Bool bNext = sal_True,
+ sal_Bool bOnlyErrors = sal_False );
+ // jump to the next / previous hyperlink - inside text and also
+ // on graphics
+ sal_Bool SelectNxtPrvHyperlink( sal_Bool bNext = sal_True );
+
+ // springe zu dieser Refmark
+ sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
+ sal_uInt16 nSeqNo = 0 );
+
+ // hole vom Start/Ende der akt. Selection das nte Zeichen
+ sal_Unicode GetChar( sal_Bool bEnd = sal_True, long nOffset = 0 );
+ // erweiter die akt. Selection am Anfang/Ende um n Zeichen
+ sal_Bool ExtendSelection( sal_Bool bEnd = sal_True, xub_StrLen nCount = 1 );
+ // setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
+ // returnt sal_False: wenn der ob der SPoint vom Layout korrigiert wurde.
+ // (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
+ sal_Bool SetVisCrsr( const Point &rPt );
+ inline void UnSetVisCrsr();
+
+ // springe zum nachsten/vorherigen Feld des entsprechenden Types
+ sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
+ sal_uInt16 nSubType = USHRT_MAX,
+ sal_uInt16 nResType = USHRT_MAX );
+ // springe genau zu diesem Feld
+ sal_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))
+ sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const;
+
+ // Char Travelling - Methoden (in crstrvl1.cxx)
+ sal_Bool GoStartWord();
+ sal_Bool GoEndWord();
+ sal_Bool GoNextWord();
+ sal_Bool GoPrevWord();
+ sal_Bool GoNextSentence();
+ sal_Bool GoPrevSentence();
+ sal_Bool GoStartSentence();
+ sal_Bool GoEndSentence();
+ sal_Bool SelectWord( const Point* pPt = 0 );
+ sal_Bool ExpandToSentenceBorders();
+
+ // Position vom akt. Cursor erfragen
+ sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
+ sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsStartSentence() const;
+ sal_Bool IsEndSentence() const;
+ sal_Bool IsSttPara() const;
+ sal_Bool IsEndPara() const;
+ sal_Bool IsStartOfDoc() const;
+ sal_Bool IsEndOfDoc() const;
+ sal_Bool IsInFrontOfLabel() const;
+ sal_Bool IsAtLeftMargin() const { return IsAtLRMargin( sal_True ); }
+ sal_Bool IsAtRightMargin(sal_Bool bAPI = sal_False) const { return IsAtLRMargin( sal_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.
+ sal_Bool ParkTblCrsr();
+
+ // gibt es nicht aufgespannte Attribute?
+ sal_Bool IsGCAttr() const { return bGCAttr; }
+ void ClearGCAttr() { bGCAttr = sal_False; }
+ void UpdateAttr() { bGCAttr = sal_True; }
+
+ // ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
+ sal_Bool IsAllProtect() const { return bAllProtect; }
+
+#ifdef SW_CRSR_TIMER
+ // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (sal_True)
+ // oder direkt (sal_False) angezeigt wird. (default ist Timer getriggert)
+ sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True );
+#endif
+
+ sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; }
+
+ // springe zum benannten Bereich
+ sal_Bool GotoRegion( const String& rName );
+
+ // zeige die aktuelle Selektion an
+ virtual void MakeSelVisible();
+
+ // setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
+ sal_Bool FindValidCntntNode( sal_Bool bOnlyText = sal_False );
+
+ sal_Bool GetContentAtPos( const Point& rPt,
+ SwContentAtPos& rCntntAtPos,
+ sal_Bool bSetCrsr = sal_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;
+
+ sal_Bool IsPageAtPos( const Point &rPt ) const;
+
+ // Attribut selelktieren
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pAttr = 0 );
+ sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
+ const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
+
+ sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 );
+ void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+ void ClearTblBoxCntnt();
+ sal_Bool EndAllTblBoxEdit();
+
+ // wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
+ // ohne das die UI davon etaws weiss
+ virtual void NewCoreSelection();
+
+ void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; }
+ sal_Bool IsSelTblCells() const { return bSelTblCells; }
+
+ sal_Bool IsAutoUpdateCells() const { return bAutoUpdateCells; }
+ void SetAutoUpdateCells( sal_Bool bFlag ) { bAutoUpdateCells = bFlag; }
+
+ sal_Bool GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+ SwRect& rRect, short& rOrient );
+ sal_Bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
+
+ const SwRedline* SelNextRedline();
+ const SwRedline* SelPrevRedline();
+ const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False );
+
+ // is cursor or the point in/over a vertical formatted text?
+ sal_Bool IsInVerticalText( const Point* pPt = 0 ) const;
+ // is cursor or the point in/over a right to left formatted text?
+ sal_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(
+ sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const
+{
+ return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
+}
+
+inline SwCursor* SwCrsrShell::GetSwCrsr( sal_Bool bMakeTblCrsr ) const
+{
+ return (SwCursor*)GetCrsr( bMakeTblCrsr );
+}
+
+inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
+
+inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
+
+inline sal_Bool SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
+
+inline sal_Bool SwCrsrShell::IsSelection() const
+{
+ return IsTableMode() || pCurCrsr->HasMark() ||
+ pCurCrsr->GetNext() != pCurCrsr;
+}
+inline sal_Bool SwCrsrShell::IsMultiSelection() const
+{
+ return pCurCrsr->GetNext() != pCurCrsr;
+}
+
+inline sal_Bool SwCrsrShell::IsSelOnePara() const
+{
+ return pCurCrsr == pCurCrsr->GetNext() &&
+ pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
+}
+
+inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( sal_Bool bIsPtInTbl ) const
+{
+ return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
+}
+
+inline sal_Bool SwCrsrShell::IsCrsrPtAtEnd() const
+{
+ return pCurCrsr->End() == pCurCrsr->GetPoint();
+}
+
+inline Point& SwCrsrShell::GetCrsrDocPos( sal_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( sal_False );
+}
+
+#endif // _CRSRSH_HXX
diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx
new file mode 100644
index 000000000000..c89d871c9940
--- /dev/null
+++ b/sw/inc/crsskip.hxx
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_uInt16 CRSR_SKIP_CHARS = 0;
+const sal_uInt16 CRSR_SKIP_CELLS = 1;
+const sal_uInt16 CRSR_SKIP_HIDDEN = 2;
+
+#endif
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
new file mode 100644
index 000000000000..cf2e55118ab7
--- /dev/null
+++ b/sw/inc/crstate.hxx
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+ sal_uInt16 nParaCnt; // Anzahl der einzufuegenden Absaetze
+ sal_uInt16 nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
+ sal_uInt16 nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
+ sal_uInt16 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
+ sal_uInt8 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;
+ sal_uInt16 nLineOfst;
+ sal_uInt8 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;
+ sal_uInt8 nCursorBidiLevel;
+ sal_Bool bStop :1;
+ sal_Bool bRealHeight :1; // Soll die reale Hoehe berechnet werden?
+ sal_Bool bFieldInfo :1; // Sollen Felder erkannt werden?
+ sal_Bool bPosCorr :1; // Point musste korrigiert werden
+ sal_Bool bFtnNoInfo :1; // Fussnotennumerierung erkannt
+ sal_Bool bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
+ // suchen lassen, sprich niemals in das
+ // GetCntntPos laufen.
+ sal_Bool bFillRet :1; // wird nur im FillModus temp. genutzt
+ sal_Bool bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
+ sal_Bool bRealWidth :1; // Calculation of the width required
+ sal_Bool b2Lines :1; // Check 2line portions and fill p2Lines
+ sal_Bool bNoScroll :1; // No scrolling of undersized textframes
+ sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ // position if screen position is inside second
+ // have of bound rect
+
+ sal_Bool bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
+
+ // #i27615#
+ /**
+ cursor in front of label
+ */
+ sal_Bool bInFrontOfLabel :1;
+ sal_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( sal_False ),
+ bRealHeight( sal_False ),
+ bFieldInfo( sal_False ),
+ bPosCorr( sal_False ),
+ bFtnNoInfo( sal_False ),
+ bExactOnly( sal_False ),
+ bSetInReadOnly( sal_False ),
+ bRealWidth( sal_False ),
+ b2Lines( sal_False ),
+ bNoScroll( sal_False ),
+ bPosMatchesBounds( sal_False ),
+ bCntntCheck( sal_False ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( sal_False ), // #i27615#
+ bInNumPortion(sal_False), // #i26726#
+ nInNumPostionOffset(0) // #i26726#
+ {}
+ SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
+ pFill( pInitFill ),
+ pSpecialPos( NULL ),
+ eState( MV_SETONLYTEXT ),
+ nCursorBidiLevel( 0 ),
+ bStop( sal_False ),
+ bRealHeight( sal_False ),
+ bFieldInfo( sal_False ),
+ bPosCorr( sal_False ),
+ bFtnNoInfo( sal_False ),
+ bExactOnly( sal_False ),
+ bSetInReadOnly( sal_False ),
+ bRealWidth( sal_False ),
+ b2Lines( sal_False ),
+ bNoScroll( sal_False ),
+ bPosMatchesBounds( sal_False ),
+ bCntntCheck( sal_False ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( sal_False ), // #i27615#
+ bInNumPortion(sal_False), // #i23726#
+ nInNumPostionOffset(0) // #i23726#
+ {}
+};
+
+
+#endif
+
+
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
new file mode 100644
index 000000000000..b015337b4085
--- /dev/null
+++ b/sw/inc/cshtyp.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
+extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
+extern SwPosPara fnParaStart, fnParaEnd;
+
+// Richtungsparameter fuer MoveSection
+typedef SwMoveFnCollection* SwPosSection;
+typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
+extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
+extern SwPosSection fnSectionStart, fnSectionEnd;
+
+// Richtungsparameter fuer MoveTable
+typedef SwMoveFnCollection* SwPosTable;
+typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_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 sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_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..135553da1b64
--- /dev/null
+++ b/sw/inc/dbfld.hxx
@@ -0,0 +1,338 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_DBFLD_HXX
+#define SW_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);
+ ~SwDBFieldType();
+
+ 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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
+ sal_uInt16 nSubType;
+ sal_Bool bIsInBodyTxt : 1;
+ sal_Bool bValidValue : 1;
+ sal_Bool bInitialized : 1;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwDBField(SwDBFieldType*, sal_uLong nFmt = 0);
+ virtual ~SwDBField();
+
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ // Der aktuelle Text
+ inline void SetExpansion(const String& rStr);
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
+
+ virtual String GetFieldName() const;
+
+ // fuer Berechnungen in Ausdruecken
+ void ChgValue( double d, sal_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( sal_Bool bIsInBody );
+
+ inline sal_Bool IsInitialized() const { return bInitialized; }
+ inline void ClearInitialized() { bInitialized = sal_False; }
+ inline void SetInitialized() { bInitialized = sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+inline void SwDBField::SetExpansion(const String& rStr)
+ { aContent = rStr; }
+
+// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+inline void SwDBField::ChgBodyTxtFlag( sal_Bool bIsInBody )
+ { bIsInBodyTxt = bIsInBody; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNameInfField : public SwField
+{
+ SwDBData aDBData;
+ sal_uInt16 nSubType;
+
+protected:
+ const SwDBData& GetDBData() const {return aDBData;}
+ SwDBData& GetDBData() {return aDBData;}
+
+ SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt = 0);
+
+public:
+ // DBName
+ inline const SwDBData& GetRealDBData() { return aDBData; }
+
+ SwDBData GetDBData(SwDoc* pDoc);
+ void SetDBData(const SwDBData& rDBData); // #111840#
+
+ virtual String GetFieldName() const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 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;
+ sal_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(sal_Bool bCond);
+ inline sal_Bool IsCondValid() const;
+
+ // Condition
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+inline sal_Bool SwDBNextSetField::IsCondValid() const
+ { return bCondValid; }
+
+inline void SwDBNextSetField::SetCondValid(sal_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;
+ sal_Bool bCondValid;
+
+public:
+ SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline sal_Bool IsCondValid() const;
+ inline void SetCondValid(sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+inline sal_Bool SwDBNumSetField::IsCondValid() const
+ { return bCondValid; }
+
+inline void SwDBNumSetField::SetCondValid(sal_Bool bCond)
+ { bCondValid = bCond; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankname
+ --------------------------------------------------------------------*/
+
+class SwDBNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwDBNameFieldType(SwDoc*);
+
+ String Expand(sal_uLong) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField
+{
+public:
+ SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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, sal_uLong nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ void Evaluate(SwDoc*);
+
+ inline long GetSetNumber() const;
+ inline void SetSetNumber(long nNum);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+inline long SwDBSetNumberField::GetSetNumber() const
+ { return nNumber; }
+
+inline void SwDBSetNumberField::SetSetNumber(long nNum)
+ { nNumber = nNum; }
+
+
+#endif // SW_DBFLD_HXX
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
new file mode 100644
index 000000000000..1a33f41f69d3
--- /dev/null
+++ b/sw/inc/dbgoutsw.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 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 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..bc017ddbec5b
--- /dev/null
+++ b/sw/inc/dbmgr.hxx
@@ -0,0 +1,398 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 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;
+ sal_Bool bScrollable;
+ sal_Bool bEndOfDB;
+ sal_Bool bAfterSelection;
+ long nSelectionIndex;
+
+ SwDSParam(const SwDBData& rData) :
+ SwDBData(rData),
+ bScrollable(sal_False),
+ bEndOfDB(sal_False),
+ bAfterSelection(sal_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(sal_True),
+ bEndOfDB(sal_False),
+ bAfterSelection(sal_False),
+ nSelectionIndex(0)
+ {}
+
+ void CheckEndOfDB()
+ {
+ if(bEndOfDB)
+ bAfterSelection = sal_True;
+ }
+};
+typedef SwDSParam* SwDSParamPtr;
+SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5)
+
+struct SwMergeDescriptor
+{
+ sal_uInt16 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( sal_uInt16 nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
+ nMergeType(nType),
+ rSh(rShell),
+ rDescriptor(rDesc),
+ bSendAsHTML( sal_True ),
+ bSendAsAttachment( sal_False ),
+ bPrintAsync( sal_False ),
+ 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
+ sal_uInt16 nMergeType;
+ sal_Bool bInitDBFields : 1; // sal_True: Datenbank an Feldern beim Mergen
+ sal_Bool bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
+ sal_Bool bCancel : 1; // Serienbrief-Save abgebrochen
+
+ sal_Bool bInMerge : 1; //merge process active
+ sal_Bool bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
+ sal_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, sal_Bool bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, sal_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 sal_Bool MergeMailFiles(SwWrtShell* pSh,
+ const SwMergeDescriptor& rMergeDescriptor );
+ SW_DLLPRIVATE sal_Bool ToNextRecord(SwDSParam* pParam);
+
+public:
+ SwNewDBMgr();
+ ~SwNewDBMgr();
+
+ // Art des aktellen Mergens. Siehe DBMgrOptions-enum
+ inline sal_uInt16 GetMergeType() const { return nMergeType; }
+ inline void SetMergeType( sal_uInt16 nTyp ) { nMergeType = nTyp; }
+
+ // MailMergeEvent source
+ const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; }
+ void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; }
+
+ inline sal_Bool IsMergeSilent() const { return bMergeSilent != 0; }
+ inline void SetMergeSilent( sal_Bool bVal ) { bMergeSilent = bVal; }
+
+ // Mischen von Datensaetzen in Felder
+ sal_Bool MergeNew( const SwMergeDescriptor& rMergeDesc );
+ sal_Bool Merge(SwWrtShell* pSh);
+
+ // Datenbankfelder mit fehlendem Datenbankname initialisieren
+ inline sal_Bool IsInitDBFields() const { return bInitDBFields; }
+ inline void SetInitDBFields(sal_Bool b) { bInitDBFields = b; }
+
+ // Serienbriefe einzelnd oder alle zusammen drucken/speichern
+ inline sal_Bool IsSingleJobs() const { return bSingleJobs; }
+ inline void SetSingleJobs(sal_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
+ sal_Bool GetTableNames(ListBox* pListBox, const String& rDBName );
+
+ // Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
+ sal_Bool GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend = sal_False);
+ sal_Bool GetColumnNames(ListBox* pListBox,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ const String& rTableName, sal_Bool bAppend = sal_False);
+
+ sal_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 );
+
+ sal_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 sal_Bool IsInMerge() const { return bInMerge; }
+ void EndMerge();
+
+ void ExecuteFormLetter(SwWrtShell& rSh,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties,
+ sal_Bool bWithDataSourceBrowser = sal_False);
+
+ void InsertText(SwWrtShell& rSh,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties);
+
+ // check if a data source is open
+ sal_Bool IsDataSourceOpen(const String& rDataSource,
+ const String& rTableOrQuery, sal_Bool bMergeOnly);
+
+ // open the source while fields are updated - for the calculator only!
+ sal_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);
+ sal_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, sal_True);}
+ const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;}
+
+
+ //close all data sources - after fields were updated
+ void CloseAll(sal_Bool bIncludingMerge = sal_True);
+
+ sal_Bool GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
+ String &rResult, double *pNumber, sal_uInt32 *pFormat);
+ sal_Bool ToNextMergeRecord();
+ sal_Bool ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+
+ sal_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,
+ sal_uInt8 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..2afc70221e3d
--- /dev/null
+++ b/sw/inc/dbui.hrc
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..e5754c510360
--- /dev/null
+++ b/sw/inc/dcontact.hxx
@@ -0,0 +1,549 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+#include <svx/svdovirt.hxx>
+#include <swtypes.hxx>
+#include <fmtanchr.hxx>
+#include <frmfmt.hxx>
+#include <list>
+
+#include "calbck.hxx"
+#include <anchoreddrawobject.hxx>
+
+class SfxPoolItem;
+class SwFrmFmt;
+class SwFlyFrmFmt;
+class SwFlyFrm;
+class SwFrm;
+class SwPageFrm;
+class SwVirtFlyDrawObj;
+class SwFmtAnchor;
+class SwFlyDrawObj;
+class SwRect;
+class SwDrawContact;
+struct SwPosition;
+class SwIndex;
+class SdrTextObj;
+
+//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 sal_True falls das SrdObject ein Marquee-Object (Lauftext) ist
+sal_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_AT_PAGE; }
+ bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; }
+ bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_PARA; }
+ bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AT_CHAR; }
+ bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_AS_CHAR; }
+
+ 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::list<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;
+
+protected:
+ // virtuelle Methoden von SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
+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 );
+
+ // 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::list<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;
+
+ protected:
+ // 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, sal_uInt16 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 sal_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& );
+ // <--
+
+ protected:
+ // virtuelle Methoden von SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
+ 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 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
+ */
+
+ static void GetTextObjectsFromFmt( std::list<SdrTextObj*>&, SwDoc* );
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
+};
+
+#endif
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
new file mode 100644
index 000000000000..6fb7a76c3728
--- /dev/null
+++ b/sw/inc/ddefld.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_DDEFLD_HXX
+#define SW_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;
+
+ sal_uInt16 nRefCnt;
+ sal_Bool bCRLFFlag : 1;
+ sal_Bool bDeleted : 1;
+
+ SW_DLLPRIVATE void _RefCntChgd();
+
+public:
+ SwDDEFieldType( const String& rName, const String& rCmd,
+ sal_uInt16 = sfx2::LINKUPDATE_ONCALL );
+ ~SwDDEFieldType();
+
+ const String& GetExpansion() const { return aExpansion; }
+ void SetExpansion( const String& rStr ) { aExpansion = rStr,
+ bCRLFFlag = sal_False; }
+
+ virtual SwFieldType* Copy() const;
+ virtual const String& GetName() const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+
+ String GetCmd() const;
+ void SetCmd( const String& rStr );
+
+ sal_uInt16 GetType() const { return refLink->GetUpdateMode(); }
+ void SetType( sal_uInt16 nType ) { refLink->SetUpdateMode( nType ); }
+
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_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( sal_Bool bFlag = sal_True ) { bCRLFFlag = bFlag; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: DDE-Feld
+ --------------------------------------------------------------------*/
+
+class SwDDEField : public SwField
+{
+private:
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwDDEField(SwDDEFieldType*);
+ ~SwDDEField();
+
+ // 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 // SW_DDEFLD_HXX
diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc
new file mode 100644
index 000000000000..bc11b017e13f
--- /dev/null
+++ b/sw/inc/dialog.hrc
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..225f470b44b0
--- /dev/null
+++ b/sw/inc/dlelstnr.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..8b25b38bb74b
--- /dev/null
+++ b/sw/inc/dobjfac.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..a72f4f46ec32
--- /dev/null
+++ b/sw/inc/doc.hxx
@@ -0,0 +1,2179 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_DOC_HXX
+#define SW_DOC_HXX
+
+/** SwDoc interfaces */
+
+#include <IInterface.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <IDocumentDeviceAccess.hxx>
+#include <IDocumentMarkAccess.hxx>
+#include <IDocumentRedlineAccess.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 <svl/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 <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 <sfx2/objsh.hxx>
+#include <svl/style.hxx>
+#include <editeng/numitem.hxx>
+#include "comphelper/implementationreference.hxx"
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+#ifdef FUTURE_VBA
+#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
+#endif
+
+#include <hash_map>
+#include <stringhash.hxx>
+
+#include <svtools/embedhlp.hxx>
+#include <vector>
+#include <set>
+#include <map>
+#include <memory>
+
+#include <boost/scoped_ptr.hpp>
+
+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 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 SwNodes;
+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 SwSectionData;
+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 SwUnoCrsr;
+class SwUnoCrsrTbl;
+class ViewShell;
+class _SetGetExpFld;
+class SwDrawContact;
+class SwLayouter;
+class SdrView;
+class SdrMarkList;
+class SwAuthEntry;
+class SwLayoutCache;
+class IStyleAccess;
+struct SwCallMouseEvent;
+struct SwDocStat;
+struct SwHash;
+struct SwSortOptions;
+struct SwDefTOXBase_Impl;
+class SwPrintData;
+class SwPrintUIOptions;
+class SdrPageView;
+struct SwConversionArgs;
+class SwRewriter;
+class SwMsgPoolItem;
+class SwChartDataProvider;
+class SwChartLockController_Helper;
+class IGrammarContact;
+class SwPrintData;
+class SwRenderData;
+class SwPageFrm;
+class SwViewOption;
+class IDocumentUndoRedo;
+
+namespace sw { namespace mark {
+ class MarkManager;
+}}
+namespace sw {
+ class MetaFieldManager;
+ class UndoManager;
+ class IShellCursorSupplier;
+}
+
+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;
+ class LinkManager;
+}
+
+//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 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 --------------------------------
+
+ // -------------------------------------------------------------------
+ ::boost::scoped_ptr<SwNodes> m_pNodes; /// document content (Nodes Array)
+ 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;
+ const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager;
+
+ // -------------------------------------------------------------------
+ // 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
+
+ ViewShell *pCurrentView; // SwDoc should get a new member pCurrentView//swmod 071225
+ SdrModel *pDrawModel; // StarView Drawing
+
+ 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
+ SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes
+
+ sfx2::LinkManager *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
+
+ SwModify *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;
+#ifdef FUTURE_VBA
+ com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents;
+#endif
+ // --> 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 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; //sal_True: ist ein Textbaustein Dokument
+ bool mbModified : 1; //sal_True: Dokument ist veraendert
+ bool mbDtor : 1; //sal_True: ist im SwDoc DTOR
+ // leider auch temporaer von
+ // SwSwgReader::InLayout(), wenn fehlerhafte
+ // Frames geloescht werden muessen
+ 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 mbVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt
+ 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; // sal_True: Purge OLE-Objects
+ bool mbKernAsianPunctuation : 1; // sal_True: kerning also for ASIAN punctuation
+ bool mbReadlineChecked : 1; // sal_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)
+
+#ifdef DBG_UTIL
+ bool mbXMLExport : 1; // sal_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 = sal_False, sal_True since SO8
+ // mbParaSpaceMaxAtPages def = sal_False, sal_True since SO8
+ //
+ // SO6:
+ // mbTabCompat def = sal_False, sal_True since SO8
+ //
+ // SO7:
+ // mbUseVirtualDevice def = sal_True
+ // mbAddFlyOffsets def = sal_False, hidden
+ //
+ // SO7pp1:
+ // bOldNumbering def = sal_False, hidden
+ //
+ // SO8:
+ // mbAddExternalLeading def = sal_True
+ // mbUseHiResolutionVirtualDevice def = sal_True, hidden
+ // mbOldLineSpacing def = sal_False
+ // mbAddParaSpacingToTableCells def = sal_True
+ // mbUseFormerObjectPos def = sal_False
+ // mbUseFormerTextWrapping def = sal_False
+ // mbConsiderWrapOnObjPos def = sal_False
+ //
+ // SO8pp1:
+ // mbIgnoreFirstLineIndentInNumbering def = sal_False, hidden
+ // mbDoNotJustifyLinesWithManualBreak def = sal_False, hidden
+ // mbDoNotResetParaAttrsForNumFont def = sal_False, hidden
+ //
+ // SO8pp3
+ // mbDoNotCaptureDrawObjsOnPage def = sal_False, hidden
+ // - Relevant for drawing objects, which don't follow the text flow, but
+ // whose position is outside the page area:
+ // sal_False: Such drawing objects are captured on the page area of its anchor.
+ // sal_True: Such drawing objects can leave the page area, they aren't captured.
+ // mbTableRowKeep def = sal_False, hidden
+ // mbIgnoreTabsAndBlanksForLineCalculation def = sal_False, hidden
+ // mbClipAsCharacterAnchoredWriterFlyFrame def = sal_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 = sal_False, hidden
+ //
+ // SO8pu8
+ // mbOldPrinterMetrics def = sal_False, hidden
+ //
+ // SO9
+ // #i24363# tab stops relative to indent
+ // mbTabRelativeToIndent def = sal_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 = sal_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#
+ // sal_True: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
+ bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972#
+
+ // 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
+
+ bool mbLastBrowseMode : 1;
+
+ // #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
+
+ //---------------- private Methoden ------------------------------
+ void checkRedlining(RedlineMode_t& _rReadlineMode);
+
+ 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*, sal_Bool, sal_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;
+
+ sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
+ sal_uInt16 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 *, sal_Bool, sal_Bool );
+ SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_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 DeleteRangeImplImpl(SwPaM &);
+ 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 *m_pNodes; }
+ SwNodes const& GetNodes() const { return *m_pNodes; }
+
+ /** 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]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const;
+ virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 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 const 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
+ */
+ IDocumentUndoRedo & GetIDocumentUndoRedo();
+ IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
+
+ /** IDocumentLinksAdministration
+ */
+ virtual bool IsVisibleLinks() const;
+ virtual void SetVisibleLinks(bool bFlag);
+ virtual sfx2::LinkManager& GetLinkManager();
+ virtual const sfx2::LinkManager& GetLinkManager() const;
+ virtual void UpdateLinks(sal_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, sal_uInt16 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, sal_uLong nLen);
+ virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
+ virtual void FldsToCalc(SwCalc& rCalc, sal_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 void SetCurrentViewShell( ViewShell* pNew );//swmod 071225
+ 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 );
+ virtual const ViewShell *GetCurrentViewShell() const; //swmod 080219
+ virtual ViewShell *GetCurrentViewShell();//swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later.
+ virtual const SwRootFrm *GetCurrentLayout() const;
+ virtual SwRootFrm *GetCurrentLayout();//swmod 080219
+ virtual bool HasLayout() const;
+
+ /** 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
+
+#ifdef DBG_UTIL
+ 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
+
+ sal_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.
+
+ sal_False: no propagation
+ */
+ SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
+ const SwPosition* pAnchorPos,
+ const SfxItemSet* pSet = 0,
+ SwFrmFmt *pParent = 0,
+ sal_Bool bCalledFromShell = sal_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;
+
+ std::set<SwRootFrm*> GetAllLayouts();//swmod 080225
+
+ 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, sal_Bool bInclRefToxMark = sal_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 sal_uInt16 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,
+ sal_Bool bBroadcast = sal_False, sal_Bool bAuto = sal_True);
+ void DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast = sal_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,
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
+ // <--
+ void DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_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,
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
+ // <--
+ SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
+ SwTxtFmtColl *pDerivedFrom,
+ sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_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);
+
+ // get the set of printable pages for the XRenderable API by
+ // evaluating the respective settings (see implementation)
+ void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ sal_Int32 nDocPageCount );
+ void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ sal_Int32 nDocPageCount );
+ void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions,
+ sal_Int32 nDocPageCount );
+
+ //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& );
+ sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound );
+ // -> #116530#
+ void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False);
+ void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False );
+ // <- #116530#
+ void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
+ // -> #116530#
+ sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
+ sal_Bool bRegardLanguage = sal_True,
+ sal_Bool bBroadcast = sal_False);
+ void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
+ sal_uInt16 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( sal_uLong nSttNd, sal_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 sal_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,
+ sal_Bool bBroadcast = sal_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,
+ sal_Bool bBroadcast = sal_False);
+ sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_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 - sal_True: search forward
+ - sal_False: search backward
+ \param bNum - sal_True: search for enumeration
+ - sal_False: search for itemize
+ \param bOutline - sal_True: search for outline numbering rule
+ - sal_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:
+
+ sal_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.
+
+ sal_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,
+ sal_Bool bCalledFromShell = sal_False,
+ sal_Bool bNewModel = sal_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, sal_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, sal_uInt16 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, sal_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 sal_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;
+ ::sw::IShellCursorSupplier * GetIShellCursorSupplier();
+
+ // 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(SwPaM const& rRange, SwSectionData &,
+ SwTOXBase const*const pTOXBase = 0,
+ SfxItemSet const*const pAttr = 0, bool const 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 UpdateSection(sal_uInt16 const nSect, SwSectionData &,
+ SfxItemSet const*const = 0, bool const 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 );
+
+ // in case during copying of embedded object a new shell is created,
+ // it should be set here and cleaned later
+ void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; }
+ SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; }
+
+ // 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; }
+
+ 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;
+
+ bool HasInvisibleContent() const;
+ /// delete invisible content, like hidden sections and paragraphs
+ bool RemoveInvisibleContent();
+ /// restore the invisible content if it's available on the undo stack
+ bool RestoreInvisibleContent();
+ // replace fields by text - mailmerge support
+ sal_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( GetCurrentViewShell() ) aOLEModifiedTimer.Start(); } //swmod 071107//swmod 071225
+
+ // -------------------- 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
+ sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ sal_uInt16 nMode );
+ sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ sal_uInt16 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 - sal_True mark the level
+ - sal_False unmark the level
+ */
+ void MarkListLevel( const String& sListId,
+ const int nListLevel,
+ const sal_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 - sal_True mark the level
+ - sal_False unmark the level
+ */
+ void MarkListLevel( SwList& rList,
+ const int nListLevel,
+ const sal_Bool bValue );
+ // <- #i27615#
+
+ // Change a format undoable.
+ void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
+
+ void RenameFmt(SwFmt & rFmt, const String & sNewName,
+ sal_Bool bBroadcast = sal_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#
+ sal_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;
+ }
+#ifdef FUTURE_VBA
+ com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor();
+#endif
+ ::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
+ ::sw::MetaFieldManager & GetMetaFieldManager();
+ ::sw::UndoManager & GetUndoManager();
+ ::sw::UndoManager const& GetUndoManager() const;
+ SfxObjectShell* CreateCopy(bool bCallInitNew) 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..f2318fb2ddb4
--- /dev/null
+++ b/sw/inc/docary.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 )
+
+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( sal_uInt8 nSize = 0, sal_uInt8 nG = 16 )
+ : _SwRedlineTbl( nSize, nG ) {}
+ ~SwRedlineTbl() {}
+
+ sal_Bool SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
+
+ sal_Bool Insert( SwRedlinePtr& p, sal_Bool bIns = sal_True );
+ sal_Bool Insert( SwRedlinePtr& p, sal_uInt16& rInsPos, sal_Bool bIns = sal_True );
+ sal_Bool InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos = 0 );
+
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 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.
+ sal_uInt16 FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 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..697da8692b4d
--- /dev/null
+++ b/sw/inc/docfac.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..47b0b8014240
--- /dev/null
+++ b/sw/inc/dochdl.hrc
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 DOCHDL_ACT_END STR_DDEFORMAT
+
+#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..cf475663c5cd
--- /dev/null
+++ b/sw/inc/docsh.hxx
@@ -0,0 +1,320 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <com/sun/star/uno/Sequence.h>
+#include <vcl/timer.hxx>
+#include <sfx2/docfac.hxx>
+#include <sfx2/objsh.hxx>
+#include "swdllapi.h"
+#include <swdll.hxx>
+#include <shellid.hxx>
+
+#include <svl/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 sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
+
+ // DocInfo dem Doc melden
+ //
+ SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
+ Window *pParent, const SfxItemSet &);
+ // OLE-Geraffel
+ SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, sal_uInt16);
+
+ // Methoden fuer StyleSheets
+ SW_DLLPRIVATE sal_uInt16 Edit( const String &rName, const String& rParent, sal_uInt16 nFamily,
+ sal_uInt16 nMask, sal_Bool bNew,
+ sal_Bool bColumn = sal_False,
+ SwWrtShell* pActShell = 0,
+ sal_Bool bBasic = sal_False );
+ SW_DLLPRIVATE sal_uInt16 Delete(const String &rName, sal_uInt16 nFamily);
+ SW_DLLPRIVATE sal_uInt16 ApplyStyles(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0,
+ sal_uInt16 nMode = 0 );
+ SW_DLLPRIVATE sal_uInt16 DoWaterCan( const String &rName, sal_uInt16 nFamily);
+ SW_DLLPRIVATE sal_uInt16 UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0);
+ SW_DLLPRIVATE sal_uInt16 MakeByExample(const String &rName,
+ sal_uInt16 nFamily, sal_uInt16 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 );
+ SwDocShell( const sal_uInt64 i_nSfxCreationFlags );
+ 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( sal_uInt16 nAspect ) const;
+ virtual Printer *GetDocumentPrinter();
+ virtual OutputDevice* GetDocumentRefDev();
+ virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
+ virtual sal_uLong GetMiscStatus() const;
+
+ virtual void PrepareReload();
+ virtual void SetModified( sal_Bool = sal_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; }
+ inline const SwDoc* GetDoc() const { return pDoc; }
+ IDocumentDeviceAccess* getIDocumentDeviceAccess();
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+ IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
+
+
+ void UpdateFontList();
+ void UpdateChildWindows();
+
+ // globaler IO
+ virtual sal_Bool Save();
+
+ // fuer VorlagenPI
+ virtual SfxStyleSheetBasePool* GetStyleSheetPool();
+
+ // Fuer Organizer
+ virtual sal_Bool Insert(SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1,
+ sal_uInt16 nSourceIdx2,
+ sal_uInt16 nSourceIdx3,
+ sal_uInt16& nIdx1,
+ sal_uInt16& nIdx2,
+ sal_uInt16& nIdx3,
+ sal_uInt16& nRemovedIdx);
+
+ virtual sal_Bool Remove(sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE,
+ sal_uInt16 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, sal_Bool bPreserveCurrentDocument );
+
+ // Seitenvorlagedialog anzeigen, ggf. auf Spaltenpage
+ void FormatPage( const String& rPage,
+ sal_Bool bColumn = sal_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( sal_Bool bLockDispatcher );
+ void LeaveWait( sal_Bool bLockDispatcher );
+
+ void ToggleBrowserMode(sal_Bool bOn, SwView* pView);
+
+ sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
+ sal_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;
+
+ // passwword protection for Writer (derived from SfxObjectShell)
+ // see also: FN_REDLINE_ON, FN_REDLINE_ON
+ virtual bool IsChangeRecording() const;
+ virtual bool HasChangeRecordProtection() const;
+ virtual void SetChangeRecording( bool bActivate );
+ virtual bool SetProtectionPassword( const String &rPassword );
+ virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash );
+};
+
+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..5d40357524c8
--- /dev/null
+++ b/sw/inc/docstat.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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"
+
+
+struct SW_DLLPUBLIC SwDocStat
+{
+ sal_uInt16 nTbl;
+ sal_uInt16 nGrf;
+ sal_uInt16 nOLE;
+ sal_uLong nPage;
+ /// paragraphs for document statistic: non-empty and non-hidden ones
+ sal_uLong nPara;
+ /// all paragraphs, including empty/hidden ones
+ sal_uLong nAllPara;
+ sal_uLong nWord;
+ sal_uLong nChar;
+ sal_Bool bModified;
+
+ SwDocStat();
+ void Reset();
+};
+
+#endif
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
new file mode 100644
index 000000000000..d8840a72a8d7
--- /dev/null
+++ b/sw/inc/docstyle.hxx
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svstdarr.hxx>
+#endif
+#include <svl/style.hxx>
+#include <svl/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;
+
+ sal_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 sal_Bool FillStyleSheet( FillStyleType eFType );
+
+protected:
+ virtual ~SwDocStyleSheet();
+
+public:
+ SwDocStyleSheet( SwDoc& rDoc,
+ const String& rName,
+ SwDocStyleSheetPool& rPool,
+ SfxStyleFamily eFam,
+ sal_uInt16 nMask);
+
+ SwDocStyleSheet( const SwDocStyleSheet& );
+
+ void Reset();
+
+ void SetMask(sal_uInt16 nMsk) { nMask = nMsk; }
+ void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; }
+
+ sal_Bool IsPhysical() const { return bPhysical; }
+ void SetPhysical(sal_Bool bPhys);
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value sal_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 sal_uLong GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_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 sal_Bool SetName( const String& rStr);
+ virtual sal_Bool SetParent( const String& rStr);
+ virtual sal_Bool SetFollow( const String& rStr);
+
+ virtual sal_Bool HasFollowSupport() const;
+ virtual sal_Bool HasParentSupport() const;
+ virtual sal_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 sal_Bool IsUsed() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Iterator fuer den Pool
+ --------------------------------------------------------------------*/
+
+class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
+{
+ rtl::Reference< SwDocStyleSheet > mxIterSheet;
+ rtl::Reference< SwDocStyleSheet > mxStyleSheet;
+ SwPoolFmtList aLst;
+ sal_uInt16 nLastPos;
+ sal_Bool bFirstCalled;
+
+ void AppendStyleList(const SvStringsDtor& rLst,
+ sal_Bool bUsed,
+ sal_uInt16 nSection,
+ char cType);
+
+public:
+ SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
+ SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ virtual ~SwStyleSheetIterator();
+
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase *operator[](sal_uInt16 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;
+ sal_Bool bOrganizer : 1; // sal_True: fuer den Organizer
+
+
+ virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, sal_uInt16 nMask);
+ virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
+
+ using SfxStyleSheetBasePool::Find;
+
+public:
+ SwDocStyleSheetPool( SwDoc&, sal_Bool bOrganizer = sal_False );
+
+ virtual void Replace( SfxStyleSheetBase& rSource,
+ SfxStyleSheetBase& rTarget );
+ virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, sal_uInt16 nMask, sal_uInt16 nPos = 0xffff);
+
+ virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
+ sal_uInt16 n=0xFFFF );
+
+ virtual sal_Bool SetParent( SfxStyleFamily eFam, const String &rStyle,
+ const String &rParent );
+
+ virtual void Remove( SfxStyleSheetBase* pStyle);
+
+ void SetOrganizerMode( sal_Bool bMode ) { bOrganizer = bMode; }
+ sal_Bool IsOrganizerMode() const { return bOrganizer; }
+
+ virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily,
+ sal_uInt16 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..4889288caf09
--- /dev/null
+++ b/sw/inc/docufld.hxx
@@ -0,0 +1,839 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_DOCUFLD_HXX
+#define SW_DOCUFLD_HXX
+
+
+#include <tools/date.hxx>
+#include <tools/datetime.hxx>
+
+
+#include <svl/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;
+ sal_uInt16 nNum, nMax;
+ sal_Bool bVirtuell;
+
+public:
+ SwPageNumberFieldType();
+
+ String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const;
+ void ChangeExpansion( SwDoc* pDoc, sal_uInt16 nNum, sal_uInt16 nMax,
+ sal_Bool bVirtPageNum, const sal_Int16* pNumFmt = 0 );
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Seitennummerierung
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwPageNumberField : public SwField
+{
+ String sUserStr;
+ sal_uInt16 nSubType;
+ short nOffset;
+
+public:
+ SwPageNumberField(SwPageNumberFieldType*, sal_uInt16 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 sal_uInt16 GetSubType() const;
+ // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+
+ const String& GetUserString() const { return sUserStr; }
+ void SetUserString( const String& rS ) { sUserStr = rS; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Autoren
+ --------------------------------------------------------------------*/
+
+class SwAuthorFieldType : public SwFieldType
+{
+public:
+ SwAuthorFieldType();
+
+ String Expand(sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Filename
+ --------------------------------------------------------------------*/
+
+class SwFileNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwFileNameFieldType(SwDoc*);
+
+ String Expand(sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: TemplName
+ --------------------------------------------------------------------*/
+
+class SwTemplNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwTemplNameFieldType(SwDoc*);
+
+ String Expand(sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Docstatistik
+ --------------------------------------------------------------------*/
+
+class SwDocStatFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Int16 nNumberingType;//com::sun::star::style::NumberingType
+
+public:
+ SwDocStatFieldType(SwDoc*);
+ String Expand(sal_uInt16 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
+{
+ sal_uInt16 nSubType;
+
+public:
+ SwDocStatField( SwDocStatFieldType*,
+ sal_uInt16 nSubType = 0, sal_uInt32 nFmt = 0);
+
+ void ChangeExpansion( const SwFrm* pFrm );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: versteckter Text
+ --------------------------------------------------------------------*/
+
+class SwHiddenTxtFieldType : public SwFieldType
+{
+ sal_Bool bHidden;
+public:
+ SwHiddenTxtFieldType(sal_Bool bSetHidden = sal_True);
+
+ virtual SwFieldType* Copy() const;
+
+ void SetHiddenFlag( sal_Bool bSetHidden = sal_True );
+ inline sal_Bool GetHiddenFlag() const { return bHidden; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Versteckter Text
+ --------------------------------------------------------------------*/
+
+class SwHiddenTxtField : public SwField
+{
+ String aTRUETxt; // Text wenn Bedingung sal_True
+ String aFALSETxt; // Wenn Bedingung falsch
+ String aContent; // Ausgewerteter DB-Text
+
+ String aCond; // Bedingung
+ sal_uInt16 nSubType;
+
+ sal_Bool bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
+ sal_Bool bIsHidden : 1; // ist es nicht sichtbar?
+ sal_Bool bValid : 1; // DB-Feld evaluiert?
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwHiddenTxtField( SwHiddenTxtFieldType*,
+ sal_Bool bConditional,
+ const String& rCond,
+ const String& rTxt,
+ sal_Bool bHidden = sal_False,
+ sal_uInt16 nSubType = TYP_HIDDENTXTFLD);
+
+ SwHiddenTxtField( SwHiddenTxtFieldType*,
+ const String& rCond,
+ const String& rTrue,
+ const String& rFalse,
+ sal_uInt16 nSubType = TYP_HIDDENTXTFLD);
+
+ virtual String GetFieldName() const;
+
+ void Evaluate(SwDoc*);
+
+ inline void SetValue(sal_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 sal_uInt16 GetSubType() const;
+ // virtual void SetSubType(sal_uInt16 nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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;
+ sal_Bool bIsHidden:1;
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; }
+ sal_Bool IsHidden() const { return bIsHidden; }
+
+ // Bedingung erfragen/setzen
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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;
+ sal_Bool bIsScriptURL;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+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 GetFieldName() 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+
+ static void CreateMacroString( String& rMacro,
+ const String& rMacroName,
+ const String& rLibraryName );
+
+ static sal_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 );
+
+ sal_uInt32 GetNumberOfParagraphs() const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual String GetDescription() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: DokumentInfo
+ --------------------------------------------------------------------*/
+
+class SwDocInfoFieldType : public SwValueFieldType
+{
+public:
+ SwDocInfoFieldType(SwDoc* pDc);
+
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const;
+ virtual SwFieldType* Copy() const;
+};
+
+class SW_DLLPUBLIC SwDocInfoField : public SwValueField
+{
+ sal_uInt16 nSubType;
+ String aContent;
+ String aName;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0);
+ SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
+
+ virtual void SetSubType(sal_uInt16);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetLanguage(sal_uInt16 nLng);
+ virtual String GetFieldName() const;
+ String GetName() const { return aName; }
+ void SetName( const String& rName ) { aName = rName; }
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: erweiterte Benutzereinstellung
+ --------------------------------------------------------------------*/
+
+
+class SwExtUserFieldType : public SwFieldType
+{
+ String aData;
+public:
+ SwExtUserFieldType();
+
+ inline void SetData(const String& rStr) { aData = rStr; }
+
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const;
+ virtual SwFieldType* Copy() const;
+};
+
+class SwExtUserField : public SwField
+{
+ String aContent;
+ sal_uInt16 nType;
+
+public:
+ SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relatives Seitennummern - Feld
+ --------------------------------------------------------------------*/
+
+class SwRefPageSetFieldType : public SwFieldType
+{
+public:
+ SwRefPageSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+
+protected:
+ // ueberlagert, weil es nichts zum Updaten gibt!
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relative Seitennummerierung
+ --------------------------------------------------------------------*/
+
+class SwRefPageSetField : public SwField
+{
+ short nOffset;
+ sal_Bool bOn;
+
+public:
+ SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
+ sal_Bool bOn = sal_True );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ sal_Bool IsOn() const { return bOn; }
+
+ short GetOffset() const { return nOffset; }
+ void SetOffset( short nOff ) { nOffset = nOff; }
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: relatives Seitennummern - Abfrage Feld
+ --------------------------------------------------------------------*/
+
+class SwRefPageGetFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Int16 nNumberingType;
+
+ void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
+protected:
+ // ueberlagert, um alle RefPageGet-Felder zu updaten
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
+public:
+ SwRefPageGetFieldType( SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+ sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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 ?
+
+ sal_Bool bCodeURL; // Code enthaelt URL eines Scripts
+
+public:
+ SwScriptField( SwScriptFieldType*, const String& rType,
+ const String& rCode, sal_Bool bURL=sal_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);
+
+ sal_Bool IsCodeURL() const { return bCodeURL; }
+ void SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; }
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+
+#endif // SW_DOCUFLD_HXX
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
new file mode 100644
index 000000000000..84a1b2c99ba1
--- /dev/null
+++ b/sw/inc/dpage.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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, sal_Bool bMasterPage=sal_False);
+ ~SwDPage();
+
+ // #i3694#
+ // This GetOffset() method is not needed anymore, it even leads to errors.
+ // virtual Point GetOffset() const;
+ virtual SdrObject* ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum );
+
+ virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
+ const Rectangle *pRect) const;
+
+ sal_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..cca6390e9198
--- /dev/null
+++ b/sw/inc/drawdoc.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..23e63a8483d8
--- /dev/null
+++ b/sw/inc/edglbldc.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _EDGLBLDC_HXX
+#define _EDGLBLDC_HXX
+
+#include <svl/svarray.hxx>
+
+class SwSection;
+class SwTOXBase;
+class SwTOXBaseSection;
+
+enum GlobalDocContentType {
+ GLBLDOC_UNKNOWN,
+ GLBLDOC_TOXBASE,
+ GLBLDOC_SECTION
+};
+
+class SwGlblDocContent
+{
+ GlobalDocContentType eType;
+ sal_uLong nDocPos;
+ union {
+ const SwTOXBase* pTOX;
+ const SwSection* pSect;
+ } PTR;
+
+public:
+ SwGlblDocContent( sal_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; }
+ sal_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..16a2a3ecb2f5
--- /dev/null
+++ b/sw/inc/edimp.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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
+{
+ sal_uLong nStart, nEnd;
+
+ SwPamRange() : nStart( 0 ), nEnd( 0 ) {}
+ SwPamRange( sal_uLong nS, sal_uLong nE ) : nStart( nS ), nEnd( nE ) {}
+
+ sal_Bool operator==( const SwPamRange& rRg )
+ { return nStart == rRg.nStart ? sal_True : sal_False; }
+ sal_Bool operator<( const SwPamRange& rRg )
+ { return nStart < rRg.nStart ? sal_True : sal_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( sal_uInt16 nArrPos, SwPaM& rPam );
+
+ sal_uInt16 Count() const
+ { return _SwPamRanges::Count(); }
+ SwPamRange operator[]( sal_uInt16 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..43992dc7b359
--- /dev/null
+++ b/sw/inc/editsh.hxx
@@ -0,0 +1,974 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svarray.hxx>
+#include <vcl/font.hxx>
+#include <editeng/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 <IMark.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 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 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 SwSectionData;
+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;
+}
+
+namespace sfx2{
+class LinkManager;
+}
+
+namespace sw {
+ class UndoRedoContext;
+}
+
+#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 sal_uInt16 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, sal_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, sal_Bool bOnlyCurrCrsr = sal_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..&"
+ sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False );
+
+ // loescht den Inhalt aller Bereiche;
+ // werden ganze Nodes selektiert, werden die Nodes geloescht
+ long Delete();
+
+ // remove a complete paragraph
+ sal_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
+ sal_Bool RemoveInvisibleContent();
+
+ // replace fields by text - mailmerge support
+ sal_Bool ConvertFieldsToText();
+ // set all numbering start points to a fixed value - mailmerge support
+ void SetNumberingRestart();
+
+ // embedded alle lokalen Links (Bereiche/Grafiken)
+ sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const;
+ void SetLinkUpdMode( sal_uInt16 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
+ sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
+
+ long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_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)
+ sal_Bool DelINetAttrWithText();
+
+ // ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
+ // noch nicht gesetzt ist, wird dies gesetzt ( => return sal_True; )
+ sal_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> == sal_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.
+ sal_Bool GetCurAttr( SfxItemSet& ,
+ const bool bMergeIndentValuesOfNumRule = false ) const;
+ // <--
+ void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
+ void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 );
+
+ // Setze das Attribut als neues default Attribut im Dokument.
+ void SetDefault( const SfxPoolItem& );
+
+ // Erfrage das Default Attribut vom Dokument.
+ const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
+
+ void ResetAttr( const SvUShortsSort* pAttrs = 0 );
+ void GCAttr();
+
+ // returns the scripttpye of the selection
+ sal_uInt16 GetScriptType() const;
+
+ // returns the language at current cursor position
+ sal_uInt16 GetCurLang() const;
+
+ // TABLE
+ sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed = sal_False ) const;
+ SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed = sal_False ) const;
+ String GetUniqueTblName() const;
+
+ // CHAR
+ sal_uInt16 GetCharFmtCount() const;
+ SwCharFmt& GetCharFmt(sal_uInt16 nFmt) const;
+ SwCharFmt* GetCurCharFmt() const;
+ void FillByEx(SwCharFmt*, sal_Bool bReset = sal_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;
+ sal_uInt16 GetTxtFmtCollCount() const;
+ SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 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*, sal_Bool bReset = sal_False);
+ SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
+
+ // Gebe die "Auto-Collection" mit der Id zurueck. Existiert
+ // sie noch nicht, dann erzuege sie
+ SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId );
+ // return das geforderte automatische Format - Basis-Klasse !
+ SwFmt* GetFmtFromPool( sal_uInt16 nId );
+ // returne die geforderte automatische Seiten-Vorlage
+ SwPageDesc* GetPageDescFromPool( sal_uInt16 nId );
+
+ // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ sal_Bool IsUsed( const SwModify& ) const;
+
+ // returne das geforderte automatische Format
+ SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
+ { return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
+ SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
+ { return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
+
+ // Felder
+ void Insert2(SwField&, const bool bForceExpandHints = false);
+ SwField* GetCurFld() const;
+
+ void UpdateFlds( SwField & ); // ein einzelnes Feld
+
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
+ SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
+
+ void RemoveFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX);
+ void RemoveFldType(sal_uInt16 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 );
+
+ sal_Bool IsAnyDatabaseFieldInDoc()const;
+ //check whether DB fields point to an available data source and returns it
+ sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const;
+ void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten
+ void SetFixFields( sal_Bool bOnlyTimeDate = sal_False,
+ const DateTime* pNewDateTime = 0 );
+ void LockExpFlds();
+ void UnlockExpFlds();
+
+ SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const;
+ void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
+
+ // fuer die Evaluierung der DBFelder (neuer DB-Manager)
+ SwNewDBMgr* GetNewDBMgr() const;
+
+ SwFieldType* InsertFldType(const SwFieldType &);
+
+ // Aenderungen am Dokument?
+ sal_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
+ sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ;
+
+ // Verzeichnis einfuegen, und bei Bedarf erneuern
+ void InsertTableOf(const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0);
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0);
+ const SwTOXBase* GetCurTOX() const;
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
+ void SetDefaultTOXBase(const SwTOXBase& rBase);
+
+ sal_Bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
+ void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly);
+
+ sal_uInt16 GetTOXCount() const;
+ const SwTOXBase* GetTOX( sal_uInt16 nPos ) const;
+ sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
+
+ // nach einlesen einer Datei alle Verzeichnisse updaten
+ void SetUpdateTOX( sal_Bool bFlag = sal_True );
+ sal_Bool IsUpdateTOX() const;
+
+ // Verzeichnis-Typen verwalten
+ sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
+ void InsertTOXType(const SwTOXType& rTyp);
+
+ //AutoMark file
+ const String& GetTOIAutoMarkURL() const;
+ void SetTOIAutoMarkURL(const String& rSet);
+ void ApplyAutoMark();
+
+ // Schluessel fuer die Indexverwaltung
+ sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+
+ void SetOutlineNumRule(const SwNumRule&);
+ const SwNumRule* GetOutlineNumRule() const;
+ // Gliederung - hoch-/runterstufen
+ sal_Bool OutlineUpDown( short nOffset = 1 );
+ // Gliederung - hoch-/runtermoven
+ sal_Bool MoveOutlinePara( short nOffset = 1);
+ // Outlines and SubOutline are protected ?
+ sal_Bool IsProtectedOutlinePara() const;
+
+ // Numerierung Aufzaehlunglisten
+ // liefert Regelwerk der aktuellen Aufzaehlung (sal_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 sal_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 sal_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
+ sal_Bool NoNum();
+ // Loeschen, Splitten der Aufzaehlungsliste
+ void DelNumRules();
+ // Hoch-/Runterstufen
+ sal_Bool NumUpDown( sal_Bool bDown = sal_True );
+ // Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
+ sal_Bool MoveParagraph( long nOffset = 1);
+ sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
+ // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+ sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_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);
+ // <--
+ sal_Bool IsFirstOfNumRule() const;
+ sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
+ // <- #i23726#
+
+ sal_Bool IsNoNum( sal_Bool bChkStart = sal_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>
+// sal_uInt8 GetNumLevel( sal_Bool* pHasChilds = 0 ) const;
+ sal_uInt8 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
+ sal_Bool HasNumber() const;
+ sal_Bool HasBullet() const;
+ // <- i29560
+
+ String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
+ void ChgNumRuleFmts( const SwNumRule& rRule );
+ // setze und erfrage, ob an aktueller PointPos eine Numerierung mit
+ // dem StartFlag startet
+ void SetNumRuleStart( sal_Bool bFlag = sal_True );
+ sal_Bool IsNumRuleStart() const;
+ void SetNodeNumStart( sal_uInt16 nStt );
+ // --> OD 2008-02-29 #refactorlists#
+ sal_uInt16 GetNodeNumStart() const;
+ // <--
+ sal_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( sal_Bool bOn = sal_True );
+ sal_Bool DoesUndo() const;
+ void DoGroupUndo( sal_Bool bUn = sal_True );
+ sal_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 );
+
+ bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
+ SwUndoId *const o_pId) const;
+ bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const;
+ SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const;
+
+ /// is it forbidden to modify cursors via API calls?
+ bool CursorsLocked() const;
+ /// set selections to those contained in the UndoRedoContext
+ /// should only be called by sw::UndoManager!
+ void HandleUndoRedoContext(::sw::UndoRedoContext & rContext);
+
+ bool Undo(sal_uInt16 const nCount = 1);
+ bool Redo(sal_uInt16 const nCount = 1);
+ bool Repeat(sal_uInt16 const nCount);
+
+ // 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
+ sal_uInt16 GetCntType() const;
+ sal_Bool HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
+
+ /* Anwenden der ViewOptions mit Start-/EndAction */
+ virtual void ApplyViewOptions( const SwViewOption &rOpt );
+
+ // Text innerhalb der Selektion erfragen
+ // Returnwert liefert sal_False, wenn der selektierte Bereich
+ // zu gross ist, um in den Stringpuffer kopiert zu werden
+ // oder andere Fehler auftreten
+ sal_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( sal_Bool bWait = sal_True ) const;
+ const GraphicObject* GetGraphicObj() const;
+ // <--
+ sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const;
+ sal_uInt16 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; sal_Bool liefert sal_False, wenn s.o.
+ */
+ sal_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, sal_uInt8 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)?
+ sal_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
+ sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName,
+ const String& rShortName, sal_Bool bSaveRelFile = sal_False,
+ const String* pOnlyTxt=0 );
+ // speicher den gesamten Inhalt des Docs als Textbaustein
+ sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
+ const String& rShortName,
+ sal_Bool bSaveRelFile = sal_False,
+ sal_Bool bOnlyTxt = sal_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( sal_uInt16* pPageCnt, sal_uInt16* 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
+ sal_uInt16 nRows, sal_uInt16 nCols,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
+ const SwTableAutoFmt* pTAFmt = 0 );
+
+ void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
+ SwDDEFieldType* pDDEType,
+ sal_uInt16 nRows, sal_uInt16 nCols,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
+
+ void UpdateTable();
+ void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
+
+ SwFrmFmt *GetTableFmt();
+ sal_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 );
+ sal_Bool TableToText( sal_Unicode cCh );
+ sal_Bool IsTextToTableAvailable() const;
+
+ sal_Bool GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
+ void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
+
+ sal_Bool IsTableBoxTextFormat() const;
+ String GetTableBoxText() const;
+
+ // Change Modus erfragen/setzen
+ TblChgMode GetTblChgMode() const;
+ void SetTblChgMode( TblChgMode eMode );
+
+ // Tabelle an der Cursor Position aufsplitten
+ sal_Bool SplitTable( sal_uInt16 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.
+ sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const;
+ sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 );
+ // setze das InsertDB als Tabelle Undo auf:
+ void AppendUndoForInsertFromDB( sal_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(
+ sal_uInt16* pPageCnt, sal_uInt16* 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();
+ // moves the continuation position to the end of the currently checked sentence
+ void MoveContinuationPosToEndOfCheckedSentence();
+ //applies a changed sentence
+ void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
+
+
+ // check SwSpellIter data to see if the last sentence got grammar checked
+ bool HasLastSentenceGotGrammarChecked() const;
+ // Is text conversion active somewhere else?
+ sal_Bool HasConvIter() const;
+ // Is hyphenation active somewhere else?
+ sal_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
+ sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
+
+ // rufe die Autokorrektur auf
+ void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True,
+ sal_Unicode cChar = ' ' );
+ sal_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();
+
+ sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
+ sal_Bool bKeepSelection = sal_False );
+ sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr );
+
+ //SS Fuer holen/ersetzen DropCap-Inhalt
+ String GetDropTxt( const sal_uInt16 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)
+ sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const;
+ sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const;
+
+ sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True );
+
+ // erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
+ sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
+ bool SetCurFtn( const SwFmtFtn& rFillFtn );
+ bool HasFtns( bool bEndNotes = false ) const;
+//z.Zt nicht benoetigt sal_uInt16 GetFtnCnt( sal_Bool bEndNotes = sal_False ) const;
+ // gebe Liste aller Fussnoten und deren Anfangstexte
+ sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
+
+ SwSection const* InsertSection(
+ SwSectionData & rNewData, SfxItemSet const*const = 0 );
+ sal_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( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const;
+
+ sal_uInt16 GetSectionFmtCount() const;
+ sal_uInt16 GetSectionFmtPos( const SwSectionFmt& ) const;
+ const SwSectionFmt& GetSectionFmt(sal_uInt16 nFmt) const;
+ void DelSectionFmt( sal_uInt16 nFmt );
+ void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
+ SfxItemSet const*const = 0);
+ sal_Bool IsAnySectionInDoc( sal_Bool bChkReadOnly = sal_False,
+ sal_Bool bChkHidden = sal_False,
+ sal_Bool BChkTOX = sal_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
+ sal_uInt16 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(sal_Bool bNew = sal_True);
+
+ sfx2::LinkManager& GetLinkManager();
+ inline const sfx2::LinkManager& 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 = sal_True)
+ sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const;
+ void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True );
+
+ // Numberformatter vom Doc erfragen
+ SvNumberFormatter* GetNumberFormatter();
+ const SvNumberFormatter* GetNumberFormatter() const
+ { return ((SwEditShell*)this)->GetNumberFormatter(); }
+
+ // Schnitstellen fuers GlobalDokument
+ sal_Bool IsGlobalDoc() const;
+ void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True );
+ sal_Bool IsGlblDocSaveLinks() const;
+ sal_uInt16 GetGlobalDocContent( SwGlblDocContents& rArr ) const;
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ SwSectionData & rNew );
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ const SwTOXBase& rTOX );
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos );
+ sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr,
+ sal_uInt16 nPos );
+ sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nFromPos, sal_uInt16 nToPos,
+ sal_uInt16 nNewPos );
+ sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
+
+ // alles fuers Redlining
+ sal_uInt16 GetRedlineMode() const;
+ void SetRedlineMode( sal_uInt16 eMode );
+ sal_Bool IsRedlineOn() const;
+ sal_uInt16 GetRedlineCount() const;
+ const SwRedline& GetRedline( sal_uInt16 nPos ) const;
+ sal_Bool AcceptRedline( sal_uInt16 nPos );
+ sal_Bool RejectRedline( sal_uInt16 nPos );
+ // suche das Redline zu diesem Data und returne die Pos im Array
+ // USHRT_MAX wird returnt, falls nicht vorhanden
+ sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const;
+
+ // Kommentar am Redline an der Position setzen
+ sal_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( sal_Bool bFlag = sal_True );
+ sal_Bool IsLabelDoc() const;
+
+ // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
+ // von japanischen/chinesischen Zeichen)
+ SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
+ String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_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.
+ sal_uInt16 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 const sfx2::LinkManager& 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..ce210d4b6f2b
--- /dev/null
+++ b/sw/inc/envelp.hrc
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..31002c1875c8
--- /dev/null
+++ b/sw/inc/errhdl.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ERRHDL_HXX
+#define _ERRHDL_HXX
+
+#ifdef DBG_UTIL
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include "swdllapi.h"
+
+extern sal_Bool bAssert; // sal_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*, sal_uInt16 );
+SW_DLLPUBLIC void AssertFail( sal_uInt16, const sal_Char*, sal_uInt16 );
+
+#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( (sal_uInt16)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..649deeb8a5be
--- /dev/null
+++ b/sw/inc/error.h
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..3d3169fcf27a
--- /dev/null
+++ b/sw/inc/expfld.hxx
@@ -0,0 +1,444 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_EXPFLD_HXX
+#define SW_EXPFLD_HXX
+
+#include <svl/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, sal_Bool bWithCommandType = sal_False);
+
+struct _SeqFldLstElem
+{
+ String sDlgEntry;
+ sal_uInt16 nSeqNo;
+
+ _SeqFldLstElem( const String& rStr, sal_uInt16 nNo )
+ : sDlgEntry( rStr ), nSeqNo( nNo )
+ {}
+};
+SV_DECL_PTRARR_DEL( _SwSeqFldList, _SeqFldLstElem*, 10, 10 )
+
+class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList
+{
+public:
+ SwSeqFldList() : _SwSeqFldList( 10, 10 ) {}
+
+ sal_Bool InsertSort( _SeqFldLstElem* );
+ sal_Bool SeekEntry( const _SeqFldLstElem& , sal_uInt16* 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 !
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: GetExperession
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
+{
+ String sExpand;
+ sal_Bool bIsInBodyTxt;
+ sal_uInt16 nSubType;
+
+ bool bLateInitialization; // #i82544#
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwGetExpField( SwGetExpFieldType*, const String& rFormel,
+ sal_uInt16 nSubType = nsSwGetSetExpType::GSE_EXPR, sal_uLong nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+ virtual void SetLanguage(sal_uInt16 nLng);
+
+ inline const String& GetExpStr() const;
+ inline void ChgExpStr(const String& rExpand);
+
+ // wird von der Formatierung abgefragt
+ inline sal_Bool IsInBodyTxt() const;
+ // wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+ inline void ChgBodyTxtFlag( sal_Bool bIsInBody );
+ // fuer Felder in Header/Footer/Footnotes/Flys:
+ // (wird nur von der Formatierung aufgerufen!!)
+ void ChangeExpansion( const SwFrm&, const SwTxtFld& );
+
+ virtual String GetFieldName() const;
+
+ // Die Formel aendern
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+
+ static sal_uInt16 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 sal_Bool SwGetExpField::IsInBodyTxt() const
+ { return bIsInBodyTxt; }
+
+// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+inline void SwGetExpField::ChgBodyTxtFlag( sal_Bool bIsInBody )
+ { bIsInBodyTxt = bIsInBody; }
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck setzen
+ --------------------------------------------------------------------*/
+
+class SwSetExpField;
+
+class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
+{
+ String sName;
+ const SwNode* pOutlChgNd;
+ String sDelim;
+ sal_uInt16 nType;
+ sal_uInt8 nLevel;
+ sal_Bool bDeleted;
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
+public:
+ SwSetExpFieldType( SwDoc* pDoc, const String& rName,
+ sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR );
+ virtual SwFieldType* Copy() const;
+ virtual const String& GetName() const;
+
+ inline void SetType(sal_uInt16 nTyp);
+ inline sal_uInt16 GetType() const;
+
+ void SetSeqFormat(sal_uLong nFormat);
+ sal_uLong GetSeqFormat();
+
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
+
+ // ueberlagert, weil das Set-Field selbst dafuer sorgt, das
+ // es aktualisiert wird.
+ inline const String& GetSetRefName() const;
+
+ sal_uInt16 SetSeqRefNo( SwSetExpField& rFld );
+
+ sal_uInt16 GetSeqFldList( SwSeqFldList& rList );
+ String MakeSeqName( sal_uInt16 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; }
+ sal_uInt8 GetOutlineLvl() const { return nLevel; }
+ void SetOutlineLvl( sal_uInt8 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp )
+{
+ nType = nTyp;
+ EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
+}
+
+inline sal_uInt16 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;
+ sal_Bool bInput;
+ sal_uInt16 nSeqNo;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwSetExpField(SwSetExpFieldType*, const String& rFormel, sal_uLong nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+
+ 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(sal_Bool bInp);
+ inline sal_Bool GetInputFlag() const;
+
+ virtual String GetFieldName() const;
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
+
+ inline sal_Bool IsSequenceFld() const;
+
+ // fuer SequenceFelder - logische Nummer
+ inline void SetSeqNumber( sal_uInt16 n ) { nSeqNo = n; }
+ inline sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 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(sal_Bool bInp)
+ { bInput = bInp; }
+
+inline sal_Bool SwSetExpField::GetInputFlag() const
+ { return bInput; }
+
+inline sal_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;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ // Direkte Eingabe ueber Dialog alten Wert loeschen
+ SwInputField(SwInputFieldType*, const String& rContent ,
+ const String& rPrompt, sal_uInt16 nSubType = 0,
+ sal_uLong nFmt = 0);
+
+ virtual String GetFieldName() 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 sal_Bool isFormField() const;
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Description: Sorted list of input fields and DropDown fields
+ --------------------------------------------------------------------*/
+
+class SwInputFieldList
+{
+public:
+ SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst = sal_False );
+ ~SwInputFieldList();
+
+ sal_uInt16 Count() const;
+ SwField* GetField(sal_uInt16 nId);
+
+ void GotoFieldPos(sal_uInt16 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)
+ sal_uInt16 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;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // suche den TextNode, in dem das Feld steht
+ virtual const SwNode* GetNodeOfFormula() const;
+
+ String GetCommand();
+
+public:
+ SwTblField( SwTblFieldType*, const String& rFormel,
+ sal_uInt16 nSubType = 0, sal_uLong nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
+
+ const String& GetExpStr() const { return sExpand; }
+ void ChgExpStr(const String& rStr) { sExpand = rStr; }
+
+ // berechne sich selbst
+ void CalcField( SwTblCalcPara& rCalcPara );
+
+ virtual String GetFieldName() const;
+
+ // Die Formel
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+};
+
+
+#endif // SW_EXPFLD_HXX
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
new file mode 100644
index 000000000000..dba9bb5b5e2c
--- /dev/null
+++ b/sw/inc/extinput.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svstdarr.hxx>
+#endif
+#include <pam.hxx>
+#include <i18npool/lang.h>
+
+class CommandExtTextInputData;
+
+class SwExtTextInput : public SwPaM
+{
+ SvUShorts aAttrs;
+ String sOverwriteText;
+ sal_Bool bInsText : 1;
+ sal_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( sal_Bool bFlag ) { bInsText = bFlag; }
+ sal_Bool IsOverwriteCursor() const { return bIsOverwriteCursor; }
+ void SetOverwriteCursor( sal_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..53de41c11e3b
--- /dev/null
+++ b/sw/inc/fchrfmt.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 );
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
+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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ virtual sal_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..0d659aee244d
--- /dev/null
+++ b/sw/inc/fesh.hxx
@@ -0,0 +1,802 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <com/sun/star/embed/XEmbeddedObject.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;
+
+namespace svx
+{
+ class ISdrObjectFilter;
+}
+
+
+// return values for GetFrmType() und GetSelFrmType().
+//! values can be combined via logival or
+#define FRMTYPE_NONE (sal_uInt16) 0
+#define FRMTYPE_PAGE (sal_uInt16) 1
+#define FRMTYPE_HEADER (sal_uInt16) 2
+#define FRMTYPE_FOOTER (sal_uInt16) 4
+#define FRMTYPE_BODY (sal_uInt16) 8
+#define FRMTYPE_COLUMN (sal_uInt16) 16
+#define FRMTYPE_TABLE (sal_uInt16) 32
+#define FRMTYPE_FLY_FREE (sal_uInt16) 64
+#define FRMTYPE_FLY_ATCNT (sal_uInt16) 128
+#define FRMTYPE_FLY_INCNT (sal_uInt16) 256
+#define FRMTYPE_FOOTNOTE (sal_uInt16) 512
+#define FRMTYPE_FTNPAGE (sal_uInt16) 1024
+#define FRMTYPE_FLY_ANY (sal_uInt16) 2048
+#define FRMTYPE_DRAWOBJ (sal_uInt16) 4096
+#define FRMTYPE_COLSECT (sal_uInt16) 8192
+#define FRMTYPE_COLSECTOUTTAB (sal_uInt16) 16384
+
+#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB )
+
+//! values can be combined via logival or
+#define GOTOOBJ_DRAW_CONTROL (sal_uInt16) 1
+#define GOTOOBJ_DRAW_SIMPLE (sal_uInt16) 2
+#define GOTOOBJ_DRAW_ANY (sal_uInt16) 3
+#define GOTOOBJ_FLY_FRM (sal_uInt16) 4
+#define GOTOOBJ_FLY_GRF (sal_uInt16) 8
+#define GOTOOBJ_FLY_OLE (sal_uInt16) 16
+#define GOTOOBJ_FLY_ANY (sal_uInt16) 28
+#define GOTOOBJ_GOTO_ANY (sal_uInt16) 31
+
+//! values can be combined via logival or
+#define FLYPROTECT_CONTENT (sal_uInt16) 1 // kann verodert werden!
+#define FLYPROTECT_SIZE (sal_uInt16) 2
+#define FLYPROTECT_POS (sal_uInt16) 4
+#define FLYPROTECT_PARENT (sal_uInt16) 8 // nur Parents untersuchen
+#define FLYPROTECT_FIXED (sal_uInt16) 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;
+ sal_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 sal_uInt16 _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 sal_Bool ImpEndCreate();
+
+ SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const;
+
+ // Methoden fuers kopieren von DrawObjecten
+ SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove,
+ sal_Bool bSelectInsert );
+
+ // get list of marked SdrObjects;
+ // helper method for GetSelFrmType, IsSelContainsControl
+ SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const;
+
+ SW_DLLPRIVATE sal_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
+ sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
+ sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False);
+ //paste some pages into another doc - used in mailmerge
+ sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage);
+ // Copy-Methode fuer Drag&Drop
+ sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
+ sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True );
+
+ void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_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.
+ sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 );
+ void DelSelectedObj();
+
+ //Selektion nach oben unten bewegen (Z-Order).
+ //sal_True == ganz nach oben/unten
+ //sal_False == einen ueberholen
+ void SelectionToTop ( sal_Bool bTop = sal_True );
+ void SelectionToBottom( sal_Bool bBottom = sal_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( sal_uInt16 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,sal_True) eine Art Standard ist, sind die Parameter nicht defaultet, damit
+ // bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird.
+ sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const;
+ sal_uInt16 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, sal_Bool bProp );
+ long Drag ( const Point *pPt, sal_Bool bProp );
+ long EndDrag ( const Point *pPt, sal_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 sal_uInt8
+ sal_uInt8 IsSelObjProtected( sal_uInt16 /*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, sal_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 --------------------------------------------
+
+ sal_Bool IsFrmSelected() const;
+ sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const;
+ sal_Bool SetFlyFrmAttr( SfxItemSet &rSet );
+ sal_Bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 );
+ const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, sal_Bool bAnchValid = sal_False,
+ SwFrmFmt *pParent = 0 );
+ void SetFlyPos( const Point &rAbsPos);
+ Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False );
+ // determines whether a frame or its environment is vertically formatted and right-to-left
+ // --> OD 2009-08-31 #mongolianlayout#
+ // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right)
+ // - add output parameter <bVertL2R>
+ sal_Bool IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRightToLeft, sal_Bool& bVertL2R) const;
+
+ SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0
+ void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_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
+ sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
+ { return GotoObj( sal_True, eType ); }
+ sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
+ { return GotoObj( sal_False, eType); }
+
+ //iterieren ueber Flys - fuer Basic-Collections
+ sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
+ const SwFrmFmt* GetFlyNum(sal_uInt16 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
+ sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
+ void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; }
+
+ // setze am selektierten FlyFrame einen Namen
+ void SetFlyName( const String& rName );
+ const String& GetFlyName() const;
+
+ // get reference to OLE object (if there is one) for selected FlyFrame
+ const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const;
+
+ // erezeuge eindeutige Namen fuer Rahmen
+ String GetUniqueGrfName() const;
+ String GetUniqueOLEName() const;
+ String GetUniqueFrameName() const;
+
+ // springe zum benannten Rahmen (Grafik/OLE)
+ sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ sal_Bool bSelFrame = sal_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.
+ sal_Bool GetObjAttr( SfxItemSet &rSet ) const;
+ sal_Bool SetObjAttr( const SfxItemSet &rSet );
+
+ const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL );
+ sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
+
+ //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
+ void SetDragMode( sal_uInt16 eSdrDragMode );
+
+ sal_uInt16 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_AT_PAGE bzw. FLY_AT_PARA 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.
+ sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
+ sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &);
+ void MoveCreate ( const Point &rPos );
+ sal_Bool EndCreate ( sal_uInt16 eSdrCreateCmd );
+ void BreakCreate();
+ sal_Bool IsDrawCreate() const;
+ void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId);
+
+ // Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren
+ sal_Bool BeginMark( const Point &rPos );
+ void MoveMark ( const Point &rPos );
+ sal_Bool EndMark ();
+ void BreakMark();
+
+ //Gruppe erzeugen, aufloesen, nix bei Rahmenselektion.
+ sal_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( sal_Bool bHorizontal ); //Bei sal_False Vertikal
+
+ //frmatr.hxx. Hier kein enum wg. Abhaengigkeiten
+ //Der sal_Bool ist nur fuer internen Gebrauch! Anker wird nur - anhand der
+ //aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt.
+ void ChgAnchor( int eAnchorId, sal_Bool bSameOnly = sal_False,
+ sal_Bool bPosCorr = sal_True );
+
+ sal_Bool SetDrawingAttr( SfxItemSet &rSet );
+
+ // hole die selectierten DrawObj als Grafik (MetaFile/Bitmap)
+ // Return-Wert besagt ob konvertiert wurde!!
+ sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const;
+
+ void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 );
+ sal_Bool Paste( const Graphic &rGrf );
+ sal_Bool Paste( SotDataObject& rObj, const Point& rPt );
+
+ sal_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 );
+
+ // Insertion of a drawing object which have to be already inserted in the DrawModel
+ void InsertDrawObj( SdrObject& rDrawObj,
+ const Point& rInsertPosition );
+
+ sal_Bool ReplaceSdrObj( const String& rGrfName, const String& rFltName,
+ const Graphic* pGrf = 0 );
+
+ // --> #i972#
+ // for starmath formulas anchored 'as char' it alignes it baseline to baseline
+ // changing the previous vertical orientation
+ void AlignFormulaToBaseline( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = 0 );
+
+ // aligns all formulas with anchor 'as char' to baseline
+ void AlignAllFormulasToBaseline();
+ // <--
+
+//------------------------------------------
+
+ //Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point
+ Point GetCntntPos( const Point& rPoint, sal_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( sal_Bool bUpdate = sal_True );
+
+ //PageDescriptor-Schnittstelle
+ void ChgCurPageDesc( const SwPageDesc& );
+ sal_uInt16 GetCurPageDesc( const sal_Bool bCalcFrm = sal_True ) const;
+ sal_uInt16 GetMousePageDesc( const Point &rPt ) const;
+ sal_uInt16 GetPageDescCnt() const;
+ SwPageDesc* FindPageDescByName( const String& rName,
+ sal_Bool bGetFromPool = sal_False,
+ sal_uInt16* pPos = 0 );
+
+ const SwPageDesc& GetPageDesc( sal_uInt16 i ) const;
+ void ChgPageDesc( sal_uInt16 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.
+ sal_uInt16 GetPageNumber( const Point &rPoint ) const;
+ sal_Bool GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay ) const;
+
+ SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&,
+ const SfxItemSet* pFlyAttrSet = 0,
+ const SfxItemSet* pGrfAttrSet = 0,
+ SwFrmFmt* = 0 );
+ sal_Bool FinishOLEObj(); // Server wird beendet
+
+ //Attribute der Tabelle besorgen/setzen.
+ void GetTblAttr( SfxItemSet & ) const;
+ void SetTblAttr( const SfxItemSet & );
+
+ //Tabelle vollstaendig selektiert?
+ sal_Bool HasWholeTabSelection() const;
+ //Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle
+ //vollstaendig selektiert ist
+ sal_Bool HasBoxSelection() const;
+
+ sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind );
+ sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == am Ende
+ sal_Bool DeleteCol();
+ sal_Bool DeleteRow();
+
+ sal_Bool DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
+
+ sal_uInt16 MergeTab(); //Merged selektierte Tabellenteile zusammen
+ //Fehler ueber enum zurueck
+ // Zelle Vertikal oder Horizontal splitten.
+ sal_Bool SplitTab( sal_Bool nVert = sal_True, sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
+ sal_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( sal_uInt16 nOrient );
+ sal_uInt16 GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
+
+ //Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine
+ //Zeile markiert ist.
+ sal_Bool BalanceRowHeight( sal_Bool bTstOnly );
+
+ void SetTabBorders( const SfxItemSet& rSet );
+ void GetTabBorders( SfxItemSet& rSet) const;
+ void SetTabLineStyle(const Color* pColor, sal_Bool bSetLine = sal_False, const SvxBorderLine* pBorderLine = NULL);
+
+ void SetTabBackground( const SvxBrushItem &rNew );
+ void GetTabBackground( SvxBrushItem &rToFill ) const;
+
+ void SetBoxBackground( const SvxBrushItem &rNew );
+ sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig
+
+ void SetBoxDirection( const SvxFrameDirectionItem& rNew );
+ sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //sal_False uneindeutig
+
+ void SetRowBackground( const SvxBrushItem &rNew );
+ sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //sal_False uneindeutig
+
+ sal_uInt8 WhichMouseTabCol( const Point &rPt ) const;
+ void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo.
+ void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly = sal_True );
+ void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
+ void SetMouseTabCols( const SwTabCols &rNew, sal_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, sal_Bool bCurColOnly );
+ void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
+ void SetMouseTabRows( const SwTabCols &rNew, sal_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
+ sal_Bool HasTblAnyProtection( const String* pTblName = 0,
+ sal_Bool* pFullTblProtection = 0 );
+ sal_Bool CanUnProtectCells() const;
+
+ sal_uInt16 GetRowsToRepeat() const;
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows );
+ sal_uInt16 GetVirtPageNum( const sal_Bool bCalcFrm = sal_True );
+ //returns the number of table rows currently selected
+ //if the selection start at the top of the table
+ sal_uInt16 GetRowSelectionFromTop() const;
+
+ sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
+ sal_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( sal_Bool bBalance = sal_False );
+ //Nicht erlaubt, wenn nur leere Zellen selektiert sind.
+ sal_Bool IsAdjustCellWidthAllowed( sal_Bool bBalance = sal_False ) const;
+
+ //Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als
+ //eine Zelle markiert ist.
+ sal_Bool BalanceCellWidth( sal_Bool bTstOnly );
+
+ // AutoFormat fuer die Tabelle/TabellenSelection
+ sal_Bool SetTableAutoFmt( const SwTableAutoFmt& rNew );
+ // Erfrage wie attributiert ist
+ sal_Bool GetTableAutoFmt( SwTableAutoFmt& rGet );
+ // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
+ sal_Bool SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff = 283 );
+ // Autosumme
+ sal_Bool GetAutoSum( String& rFml ) const;
+
+ //Phy: Tatsaechliche Seitenanzahl.
+ //Virt: Vom User evtl. gesetzten Offset mit einbeziehen.
+ sal_uInt16 GetPhyPageNum();
+
+ // Setzt an der aktuellen Postion einen neuen Page Offset
+ void SetNewPageOffset( sal_uInt16 nOffset );
+ void SetPageOffset( sal_uInt16 nOffset ); //Aendert den letzten Page Offset
+ sal_uInt16 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 sal_Bool bBefore, const sal_uInt16 nId,
+ const String& rCharacterStyle,
+ const sal_Bool bCpyBrd = sal_True );
+
+ //Das Lineal will auch noch etwas von uns wissen.
+ sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
+ sal_uInt16 GetCurMouseColNum( const Point &rPt,
+ SwGetCurColNumPara* pPara = 0 ) const;
+ sal_uInt16 GetCurTabColNum() const; //0 == in keiner Tabelle
+ sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const;
+ sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
+
+ sal_Bool IsTableRightToLeft() const;
+ sal_Bool IsMouseTableRightToLeft( const Point &rPt ) const;
+ sal_Bool IsTableVertical() const;
+
+ sal_Bool IsLastCellInRow() const;
+ // Die Breite des aktuellen Bereichs fuer Spaltendialog
+ long GetSectionWidth( SwFmt& rFmt ) const;
+
+ void GetConnectableFrmFmts
+ (SwFrmFmt & rFmt, const String & rReference, sal_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);
+ sal_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..d248c74a53f5
--- /dev/null
+++ b/sw/inc/fldbas.hxx
@@ -0,0 +1,462 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_FLDBAS_HXX
+#define SW_FLDBAS_HXX
+
+#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;
+
+
+/*--------------------------------------------------------------------
+ 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 sal_uInt16 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 sal_uInt16 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
+};
+
+
+extern sal_uInt16 __FAR_DATA aTypeTab[];
+
+/*--------------------------------------------------------------------
+ Beschreibung: Allgemeine Tools
+ --------------------------------------------------------------------*/
+
+String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
+void SetErrorStr(const String& rStr);
+//String ExpandDate(const Date& rDate, sal_uLong nFmt, sal_uInt16 nLang);
+//String ExpandTime(const Time& rTime, sal_uLong nFmt, sal_uInt16 nLang);
+String FormatNumber(sal_uInt16 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
+{
+ sal_uInt16 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( sal_uInt16 nWhichId );
+
+public:
+
+#ifdef DBG_UTIL
+ virtual ~SwFieldType();
+#endif
+ static const String& GetTypeStr( sal_uInt16 nTypeId );
+
+ // nur in abgeleiteten Klassen
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const = 0;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+
+ sal_uInt16 Which() const { return nWhich; }
+
+ inline void UpdateFlds() const;
+};
+
+inline void SwFieldType::UpdateFlds() const
+{
+ ((SwFieldType*)this)->ModifyNotification( 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
+{
+private:
+ mutable String m_Cache; /// #i85766# cached expansion (for clipboard)
+ sal_uInt16 nLang; // Immer ueber SetLanguage aendern!
+ sal_Bool bIsAutomaticLanguage;
+ sal_uInt32 nFormat;
+
+ SwFieldType* pType;
+
+ virtual String Expand() const = 0;
+ virtual SwField* Copy() const = 0;
+
+protected:
+ void SetFormat(sal_uInt32 nSet) {nFormat = nSet;}
+
+ SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, sal_uInt16 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* );
+
+ /** expand the field.
+ @param bCached return cached field value.
+ @remark most callers should use the cached field value.
+ this is because various fields need special handing
+ (ChangeExpansion()) to return correct values, and only
+ SwTxtFormatter::NewFldPortion() sets things up properly.
+ @return the generated text (suitable for display)
+ */
+ String ExpandField(bool const bCached) const;
+
+ virtual String GetFieldName() const;
+
+ SwField * CopyField() const;
+
+ // ResId
+ sal_uInt16 Which() const
+#ifndef DBG_UTIL
+ { return pType->Which(); }
+#else
+ ; // in fldbas.cxx implementiert
+#endif
+
+ // TYP_ID
+ sal_uInt16 GetTypeId() const;
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16);
+
+ // Sprache an der Feldposition
+ inline sal_uInt16 GetLanguage() const;
+ virtual void SetLanguage(sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+ // hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
+ sal_Bool HasClickHdl() const;
+ // ist es ein Fix-Feld?
+ sal_Bool IsFixed() const;
+
+ sal_Bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
+ void SetAutomaticLanguage(sal_Bool bSet){bIsAutomaticLanguage = bSet;}
+
+ virtual String GetDescription() const;
+};
+
+inline SwFieldType* SwField::GetTyp() const
+ { return pType; }
+
+inline sal_uInt32 SwField::GetFormat() const
+ { return nFormat; }
+
+inline sal_uInt16 SwField::GetLanguage() const
+ { return nLang; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Felder mit Values, die ueber der Numberformatter
+ formatiert werden muessen
+ --------------------------------------------------------------------*/
+
+class SwValueFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Bool bUseFormat; // Numberformatter verwenden
+
+protected:
+ SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId );
+ SwValueFieldType( const SwValueFieldType& rTyp );
+
+public:
+ inline SwDoc* GetDoc() const { return pDoc; }
+ inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
+
+ inline sal_Bool UseFormat() const { return bUseFormat; }
+ inline void EnableFormat(sal_Bool bFormat = sal_True) { bUseFormat = bFormat; }
+
+ String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 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, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
+ SwValueField( const SwValueField& rFld );
+
+public:
+ virtual ~SwValueField();
+
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+ virtual void SetLanguage(sal_uInt16 nLng);
+// os: wozu war das denn da?
+// virtual void ChangeFormat(sal_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, sal_uInt16 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 // SW_FLDBAS_HXX
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
new file mode 100644
index 000000000000..b5f7292d32ba
--- /dev/null
+++ b/sw/inc/flddat.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_FLDDAT_HXX
+#define SW_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
+{
+ sal_uInt16 nSubType;
+ long nOffset; // Offset in Minuten
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwDateTimeField(SwDateTimeFieldType* pType, sal_uInt16 nSubType = DATEFLD,
+ sal_uLong nFmt = 0, sal_uInt16 nLng = 0);
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+
+ virtual double GetValue() const;
+
+ virtual void SetPar2(const String& rStr);
+ virtual String GetPar2() const;
+
+ inline sal_Bool IsDate() const
+ { return (nSubType & DATEFLD) != 0; }
+
+ inline void SetOffset(long nMinutes) { nOffset = nMinutes; }
+ inline long GetOffset() const { return nOffset; }
+
+ Date GetDate(sal_Bool bUseOffset = sal_False) const;
+ Time GetTime(sal_Bool bUseOffset = sal_False) const;
+ void SetDateTime(const DateTime& rDT);
+ static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
+};
+
+#endif // SW_FLDDAT_HXX
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
new file mode 100644
index 000000000000..b18a8fa22b9b
--- /dev/null
+++ b/sw/inc/flddropdown.hxx
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_FLDDROPDOWN_HXX
+#define SW_FLDDROPDOWN_HXX
+
+#include "com/sun/star/uno/Sequence.hxx"
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+#include <vector>
+
+/**
+ 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;
+
+ /**
+ 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;
+
+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();
+
+ /**
+ 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 sal_True the selected item was successfully set
+ @retval sal_True failure (empty selection)
+ */
+ sal_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 sal_Bool QueryValue(com::sun::star::uno::Any &rVal, sal_uInt16 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 sal_Bool PutValue(const com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId);
+};
+
+#endif
diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx
new file mode 100644
index 000000000000..40fbac692444
--- /dev/null
+++ b/sw/inc/fldinit.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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..b08972ed4d96
--- /dev/null
+++ b/sw/inc/fldui.hrc
@@ -0,0 +1,292 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..79443e092d61
--- /dev/null
+++ b/sw/inc/fldupde.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..765a23cda0b1
--- /dev/null
+++ b/sw/inc/flyenum.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..488e49ad2f9e
--- /dev/null
+++ b/sw/inc/flypos.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FLYPOS_HXX
+#define _FLYPOS_HXX
+
+
+#include <svl/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
+ sal_uInt32 nOrdNum;
+public:
+ SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos );
+ virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!)
+
+ // operatoren fuer das Sort-Array
+ sal_Bool operator==( const SwPosFlyFrm& );
+ sal_Bool operator<( const SwPosFlyFrm& );
+
+ const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
+ const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
+ sal_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..3c91bad86b60
--- /dev/null
+++ b/sw/inc/fmtanchr.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/poolitem.hxx>
+
+struct SwPosition;
+class IntlWrapper;
+#define IVER_FMTANCHOR_LONGIDX ((sal_uInt16)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;
+ sal_uInt16 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_AT_PAGE, sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ RndStdIds GetAnchorId() const { return nAnchorId; }
+ sal_uInt16 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( sal_uInt16 nNew ) { nPageNum = nNew; }
+ void SetAnchor( const SwPosition *pPos );
+};
+
+inline const SwFmtAnchor &SwAttrSet::GetAnchor(sal_Bool bInP) const
+ { return static_cast<const SwFmtAnchor&>(Get(RES_ANCHOR, bInP)); }
+
+ inline const SwFmtAnchor &SwFmt::GetAnchor(sal_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..ce16b775b82d
--- /dev/null
+++ b/sw/inc/fmtautofmt.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/poolitem.hxx>
+#include <format.hxx>
+#include <boost/shared_ptr.hpp>
+
+// ATT_AUTOFMT *********************************************
+
+
+class SwFmtAutoFmt: public SfxPoolItem
+{
+ boost::shared_ptr<SfxItemSet> mpHandle;
+
+public:
+ SwFmtAutoFmt( sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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..8feb5293c141
--- /dev/null
+++ b/sw/inc/fmtclbl.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class SW_DLLPUBLIC SwFmtNoBalancedColumns : public SfxBoolItem
+{
+public:
+ SwFmtNoBalancedColumns( sal_Bool bFlag = sal_False )
+ : SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+
+inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(sal_Bool bInP) const
+ { return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
+
+inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(sal_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..8a649ed5b80f
--- /dev/null
+++ b/sw/inc/fmtclds.hxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+//Der ColumnDescriptor --------------------------
+
+class SwColumn
+{
+ sal_uInt16 nWish; //Wunschbreite incl. Raender.
+ //Verhaelt sich proportional zum Verhaeltniss:
+ //Wunschbreite der Umgebung / aktuelle Breite der Spalte
+ sal_uInt16 nUpper; //Oberer Rand
+ sal_uInt16 nLower; //Unterer Rand
+ sal_uInt16 nLeft; //Linker Rand
+ sal_uInt16 nRight; //Rechter Rand
+
+public:
+ SwColumn();
+
+ sal_Bool operator==( const SwColumn & );
+
+
+ void SetWishWidth( sal_uInt16 nNew ) { nWish = nNew; }
+ void SetUpper( sal_uInt16 nNew ) { nUpper = nNew; }
+ void SetLower( sal_uInt16 nNew ) { nLower = nNew; }
+ void SetLeft ( sal_uInt16 nNew ) { nLeft = nNew; }
+ void SetRight( sal_uInt16 nNew ) { nRight = nNew; }
+
+ sal_uInt16 GetWishWidth() const { return nWish; }
+ sal_uInt16 GetUpper() const { return nUpper; }
+ sal_uInt16 GetLower() const { return nLower; }
+ sal_uInt16 GetLeft () const { return nLeft; }
+ sal_uInt16 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
+ sal_uLong nLineWidth; //width of the separator line
+ Color aLineColor; //color of the separator line
+
+ sal_uInt8 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.
+ sal_uInt16 nWidth; //Gesamtwunschbreite aller Spalten.
+
+ sal_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( sal_uInt16 nGutterWidth, sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ const SwColumns &GetColumns() const { return aColumns; }
+ SwColumns &GetColumns() { return aColumns; }
+ sal_uInt16 GetNumCols() const { return aColumns.Count(); }
+// const Pen& GetLinePen() const { return aPen; }
+ sal_uLong GetLineWidth() const { return nLineWidth;}
+ const Color& GetLineColor() const { return aLineColor;}
+
+
+ SwColLineAdj GetLineAdj() const { return eAdj; }
+ sal_Bool IsOrtho() const { return bOrtho; }
+ sal_uInt16 GetWishWidth() const { return nWidth; }
+ sal_uInt8 GetLineHeight()const { return nLineHeight; }
+
+ //Return USHRT_MAX wenn uneindeutig.
+ //Return die kleinste Breite wenn bMin True ist.
+ sal_uInt16 GetGutterWidth( sal_Bool bMin = sal_False ) const;
+
+// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
+ void SetLineWidth(sal_uLong nLWidth) { nLineWidth = nLWidth;}
+ void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
+ void SetLineHeight( sal_uInt8 nNew ) { nLineHeight = nNew; }
+ void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
+ void SetWishWidth( sal_uInt16 nNew ) { nWidth = nNew; }
+
+ //Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
+ //werden. Das Ortho Flag wird automatisch gesetzt.
+ void Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 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( sal_uInt16 nNew, sal_uInt16 nAct );
+
+ //Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
+ //nur dann wird auch der zweite Param. benoetigt und beachtet.
+ void SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
+
+ //Fuer den Reader
+ void _SetOrtho( sal_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.
+ sal_uInt16 CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
+
+ //Wie oben, aber es wir die Breite der PrtArea - also das was fuer
+ //den Anwender die Spalte ist - geliefert.
+ sal_uInt16 CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
+};
+
+inline const SwFmtCol &SwAttrSet::GetCol(sal_Bool bInP) const
+ { return (const SwFmtCol&)Get( RES_COL,bInP); }
+
+inline const SwFmtCol &SwFmt::GetCol(sal_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..28252ff1c99c
--- /dev/null
+++ b/sw/inc/fmtcnct.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 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(sal_Bool bInP) const
+ { return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
+
+inline const SwFmtChain &SwFmt::GetChain(sal_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..af4e8a3f3b8f
--- /dev/null
+++ b/sw/inc/fmtcntnt.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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(sal_Bool bInP) const
+ { return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
+
+inline const SwFmtCntnt &SwFmt::GetCntnt(sal_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..2ef671b8463a
--- /dev/null
+++ b/sw/inc/fmtcol.hxx
@@ -0,0 +1,303 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
+ sal_uInt16 nFmtWhich )
+ : SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
+ { SetAuto( sal_False ); }
+
+ SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
+ const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
+ sal_uInt16 nFmtWhich )
+ : SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
+ { SetAuto( sal_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:
+ //sal_uInt8 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,
+ sal_uInt16 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,
+ sal_uInt16 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; }
+
+ // zum "abfischen" von UL-/LR-/FontHeight Aenderungen
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
+public:
+
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
+ SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
+
+ sal_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 sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ // <--
+
+ // --> OD 2007-01-24 #i73790#
+ // override <ResetAllFmtAttr()> to stay assigned to list level of outline style
+ virtual sal_uInt16 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 sal_Bool SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
+
+ inline SwCharFmt* GetCharFmt() const;
+ inline sal_Bool IsCharFmtSet() const;
+ void SetCharFmt(SwCharFmt *);
+ void ResetCharFmt();
+inline sal_Bool SwTxtFmtColl::IsCharFmtSet() const
+{
+ return aCharDepend.GetRegisteredIn() ? sal_True : sal_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
+{
+ sal_uLong nCondition;
+ union
+ {
+ sal_uLong nSubCondition;
+ String* pFldExpression;
+ } aSubCondition;
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+
+ SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
+ sal_uLong nSubCond = 0 );
+ SwCollCondition( SwTxtFmtColl* pColl, sal_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); }
+
+ sal_uLong GetCondition() const { return nCondition; }
+ sal_uLong GetSubCondition() const { return aSubCondition.nSubCondition; }
+ const String* GetFldExpression() const
+ { return aSubCondition.pFldExpression; }
+
+ void SetCondition( sal_uLong nCond, sal_uLong nSubCond );
+ SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& );
+};
+
+
+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();
+
+ const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
+ const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
+ void InsertCondition( const SwCollCondition& rCond );
+ sal_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..4cb10c468fd0
--- /dev/null
+++ b/sw/inc/fmtcolfunc.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..476708948e60
--- /dev/null
+++ b/sw/inc/fmteiro.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTEIRO_HXX
+#define _FMTEIRO_HXX
+
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtEditInReadonly : public SfxBoolItem
+{
+public:
+ SwFmtEditInReadonly( sal_uInt16 nId = RES_EDIT_IN_READONLY,
+ sal_Bool bPrt = sal_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(sal_Bool bInP) const
+ { return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
+
+inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(sal_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..a1fbc11feb54
--- /dev/null
+++ b/sw/inc/fmtflcnt.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTFLCNT_HXX
+#define _FMTFLCNT_HXX
+
+
+#include <svl/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..372fa82fe5e7
--- /dev/null
+++ b/sw/inc/fmtfld.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <list>
+#include <svl/poolitem.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/smplhint.hxx>
+
+#include "swdllapi.h"
+#include <calbck.hxx>
+
+class SwField;
+class SwTxtFld;
+class SwView;
+class SwFieldType;
+
+// 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);
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+
+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 sal_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; }
+
+ void RegisterToFieldType( SwFieldType& );
+ sal_Bool IsFldInDoc() const;
+ sal_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..878b59e5ccf6
--- /dev/null
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtFollowTextFlow : public SfxBoolItem
+{
+public:
+ SwFmtFollowTextFlow( sal_Bool bFlag = sal_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(sal_Bool bInP) const
+ { return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
+
+inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(sal_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..04647edc1e68
--- /dev/null
+++ b/sw/inc/fmtfordr.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTFORDR_HXX
+#define _FMTFORDR_HXX
+
+#include <svl/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 sal_uInt16 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(sal_Bool bInP) const
+ { return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
+
+inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_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..ec3b7458ef6a
--- /dev/null
+++ b/sw/inc/fmtfsize.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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;
+ sal_uInt8 nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
+ sal_uInt8 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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; }
+
+ sal_uInt8 GetHeightPercent() const{ return nHeightPercent; }
+ sal_uInt8 GetWidthPercent() const { return nWidthPercent; }
+ void SetHeightPercent( sal_uInt8 n ) { nHeightPercent = n; }
+ void SetWidthPercent ( sal_uInt8 n ) { nWidthPercent = n; }
+};
+
+inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(sal_Bool bInP) const
+ { return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
+
+inline const SwFmtFrmSize &SwFmt::GetFrmSize(sal_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..9a470ddfa1df
--- /dev/null
+++ b/sw/inc/fmtftn.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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'
+ sal_uInt16 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 sal_uInt16 &GetNumber() const { return nNumber; }
+ bool IsEndNote() const { return m_bEndNote;}
+
+ void SetNumStr( const String& rStr ) { aNumber = rStr; }
+ void SetNumber( sal_uInt16 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, sal_Bool bInclStrs = sal_False ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
new file mode 100644
index 000000000000..f3472108de97
--- /dev/null
+++ b/sw/inc/fmtftntx.hxx
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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;
+ sal_uInt16 nOffset;
+
+protected:
+ SwFmtFtnEndAtTxtEnd( sal_uInt16 nWhichL, SwFtnEndPosEnum ePos )
+ : SfxEnumItem( nWhichL, sal::static_int_cast< sal_uInt16 >(ePos) ), nOffset( 0 )
+ {}
+ SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr )
+ : SfxEnumItem( rAttr ), sPrefix( rAttr.sPrefix ),
+ sSuffix( rAttr.sSuffix ), aFmt( rAttr.aFmt ),
+ nOffset( rAttr.nOffset )
+ {}
+
+public:
+ virtual sal_uInt16 GetValueCount() const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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 sal_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; }
+
+ sal_uInt16 GetOffset() const { return nOffset; }
+ void SetOffset( sal_uInt16 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(sal_Bool bInP) const
+ { return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
+inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(sal_Bool bInP) const
+ { return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
+
+
+inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(sal_Bool bInP) const
+ { return aSet.GetFtnAtTxtEnd(bInP); }
+inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(sal_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..73a56a283a2b
--- /dev/null
+++ b/sw/inc/fmthdft.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTHDFT_HXX
+#define _FMTHDFT_HXX
+
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svl/poolitem.hxx>
+#include <calbck.hxx>
+
+class SwFrmFmt;
+class IntlWrapper;
+class SwFmt;
+
+//Kopfzeile, fuer Seitenformate
+//Client von FrmFmt das den Header beschreibt.
+
+class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
+{
+ sal_Bool bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+
+public:
+ SwFmtHeader( sal_Bool bOn = sal_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*)GetRegisteredIn(); }
+ SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ void RegisterToFormat( SwFmt& rFmt );
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
+};
+
+
+//Fusszeile, fuer Seitenformate
+//Client von FrmFmt das den Footer beschreibt.
+
+class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
+{
+ sal_Bool bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+
+public:
+ SwFmtFooter( sal_Bool bOn = sal_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*)GetRegisteredIn(); }
+ SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ void RegisterToFormat( SwFmt& rFmt );
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
+};
+
+inline const SwFmtHeader &SwAttrSet::GetHeader(sal_Bool bInP) const
+ { return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
+inline const SwFmtFooter &SwAttrSet::GetFooter(sal_Bool bInP) const
+ { return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
+
+inline const SwFmtHeader &SwFmt::GetHeader(sal_Bool bInP) const
+ { return aSet.GetHeader(bInP); }
+inline const SwFmtFooter &SwFmt::GetFooter(sal_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..bfb6d35d2e76
--- /dev/null
+++ b/sw/inc/fmtinfmt.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTINFMT_HXX
+#define _FMTINFMT_HXX
+
+#include <tools/string.hxx>
+#include <svl/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
+ sal_uInt16 nINetId;
+ sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 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; }
+
+ sal_uInt16 GetINetFmtId() const { return nINetId; }
+ void SetINetFmtId( sal_uInt16 nNew ) { nINetId = nNew; }
+
+ sal_uInt16 GetVisitedFmtId() const { return nVisitedId; }
+ void SetVisitedFmtId( sal_uInt16 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( sal_uInt16 nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
new file mode 100644
index 000000000000..fb04ec8ed94d
--- /dev/null
+++ b/sw/inc/fmtline.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/poolitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
+{
+ sal_uLong nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
+ sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ sal_uLong GetStartValue() const { return nStartValue; }
+ sal_Bool IsCount() const { return bCountLines != 0; }
+
+ void SetStartValue( sal_uLong nNew ) { nStartValue = nNew; }
+ void SetCountLines( sal_Bool b ) { bCountLines = b; }
+};
+
+inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(sal_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..1ac109d067ef
--- /dev/null
+++ b/sw/inc/fmtlsplt.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTTSPLT_HXX
+#define _FMTTSPLT_HXX
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem
+{
+public:
+ SwFmtLayoutSplit( sal_Bool bSplit = sal_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(sal_Bool bInP) const
+ { return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
+
+inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(sal_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..82c0d104f7b4
--- /dev/null
+++ b/sw/inc/fmtmeta.hxx
@@ -0,0 +1,228 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <cppuhelper/weakref.hxx>
+
+#include <svl/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>The DoCopy() method is called at the new pool item:
+ * it will clone the metadatable entity (using RegisterAsCopyOf).
+ * 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>
+ * <li>A new text hint is created, taking over the new pool item.</li>
+ * <li>The text hint is inserted into the hints array of some text node.</li>
+ * </ol>
+ */
+
+class SwTxtMeta;
+class SwXMeta;
+class SwXMetaField;
+namespace sw {
+ class Meta;
+}
+
+class SwFmtMeta
+ : public SfxPoolItem
+{
+private:
+ friend class SwTxtMeta; // needs SetTxtAttr, DoCopy
+ 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);
+
+ /// this method <em>must</em> be called when the hint is actually copied
+ void DoCopy(::sw::MetaFieldManager & i_rTargetDocManager,
+ SwTxtNode & i_rTargetTxtNode);
+
+ explicit SwFmtMeta( const sal_uInt16 i_nWhich );
+
+public:
+ // takes ownership
+ explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
+ const sal_uInt16 i_nWhich );
+ virtual ~SwFmtMeta();
+
+ // SfxPoolItem
+ virtual int operator==( const SfxPoolItem & ) const;
+ virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const;
+
+ /// notify clients registered at m_pMeta that this meta is being (re-)moved
+ void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
+ static SwFmtMeta * CreatePoolDefault( const sal_uInt16 i_nWhich );
+ ::sw::Meta * GetMeta() { return m_pMeta.get(); }
+};
+
+
+namespace sw {
+
+class MetaFieldManager;
+
+class Meta
+ : public ::sfx2::Metadatable
+ , public SwModify
+{
+protected:
+ friend class ::SwFmtMeta; // SetFmtMeta, NotifyChangeTxtNode
+ friend class ::SwXMeta; // GetTxtNode, GetTxtAttr, Get/SetXMeta
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::rdf::XMetadatable> m_wXMeta;
+
+ SwFmtMeta * m_pFmt;
+ SwTxtNode * m_pTxtNode;
+
+ 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; };
+
+ void NotifyChangeTxtNodeImpl();
+ void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::rdf::XMetadatable> const& GetXMeta() const
+ { return m_wXMeta; }
+ void SetXMeta(::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable> const& xMeta)
+ { m_wXMeta = xMeta; }
+
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
+public:
+ explicit Meta(SwFmtMeta * const i_pFmt = 0);
+ virtual ~Meta();
+
+ // 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..aa6389992a3d
--- /dev/null
+++ b/sw/inc/fmtornt.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/poolitem.hxx>
+
+
+class IntlWrapper;
+
+#define IVER_VERTORIENT_REL ((sal_uInt16)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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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 ((sal_uInt16)0x0001)
+#define IVER_HORIORIENT_REL ((sal_uInt16)0x0002)
+
+class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
+{
+ SwTwips nXPos; //Enthaelt _immer_ die aktuelle RelPos.
+ sal_Int16 eOrient;
+ sal_Int16 eRelation;
+ sal_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, sal_Bool bPos = sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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; }
+
+ sal_Bool IsPosToggle() const { return bPosToggle; }
+ void SetPosToggle( sal_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(sal_Bool bInP) const
+ { return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
+inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(sal_Bool bInP) const
+ { return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
+
+inline const SwFmtVertOrient &SwFmt::GetVertOrient(sal_Bool bInP) const
+ { return aSet.GetVertOrient(bInP); }
+inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(sal_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..2363fddddf34
--- /dev/null
+++ b/sw/inc/fmtpdsc.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTPDSC_HXX
+#define _FMTPDSC_HXX
+
+
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+#include <calbck.hxx>
+
+class SwPageDesc;
+class SwHistory;
+class SwPaM;
+class IntlWrapper;
+class SwEndNoteInfo;
+
+//Pagedescriptor
+//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
+
+#define IVER_FMTPAGEDESC_NOAUTO ((sal_uInt16)0x0001)
+#define IVER_FMTPAGEDESC_LONGPAGE ((sal_uInt16)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 sal_Bool InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, sal_uInt16,
+ SwHistory* );
+ sal_uInt16 nNumOffset; // Seitennummer Offset
+ sal_uInt16 nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
+ SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
+ // Attribut gesetzt wurde (CntntNode/Format)
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& rHint );
+
+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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
+ const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
+
+ sal_uInt16 GetNumOffset() const { return nNumOffset; }
+ void SetNumOffset( sal_uInt16 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; }
+ void RegisterToEndNotInfo( SwEndNoteInfo& );
+ void RegisterToPageDesc( SwPageDesc& );
+ bool KnowsPageDesc() const;
+};
+
+
+inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(sal_Bool bInP) const
+ { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
+
+inline const SwFmtPageDesc &SwFmt::GetPageDesc(sal_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..9f97282d8e10
--- /dev/null
+++ b/sw/inc/fmtrfmrk.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTRFMRK_HXX
+#define _FMTRFMRK_HXX
+
+
+#include <tools/string.hxx>
+#include <svl/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..8f0606b87ac2
--- /dev/null
+++ b/sw/inc/fmtrowsplt.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTROWSPLT_HXX
+#define _FMTROWSPLT_HXX
+
+#include <svl/eitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem
+{
+public:
+ SwFmtRowSplit( sal_Bool bSplit = sal_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(sal_Bool bInP) const
+ { return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); }
+
+inline const SwFmtRowSplit &SwFmt::GetRowSplit(sal_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..76f2156bcfdd
--- /dev/null
+++ b/sw/inc/fmtruby.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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
+ sal_uInt16 nCharFmtId; // PoolId of the charformat
+ sal_uInt16 nPosition; // Position of the Ruby-Character
+ sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 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; }
+
+ sal_uInt16 GetCharFmtId() const { return nCharFmtId; }
+ void SetCharFmtId( sal_uInt16 nNew ) { nCharFmtId = nNew; }
+
+ sal_uInt16 GetPosition() const { return nPosition; }
+ void SetPosition( sal_uInt16 nNew ) { nPosition = nNew; }
+
+ sal_uInt16 GetAdjustment() const { return nAdjustment; }
+ void SetAdjustment( sal_uInt16 nNew ) { nAdjustment = nNew; }
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
new file mode 100644
index 000000000000..f9ceb522a2c5
--- /dev/null
+++ b/sw/inc/fmtsrnd.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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
+{
+ sal_Bool bAnchorOnly :1;
+ sal_Bool bContour :1;
+ sal_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 sal_uInt16 GetValueCount() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+
+ SwSurround GetSurround()const { return SwSurround( GetValue() ); }
+ sal_Bool IsAnchorOnly() const { return bAnchorOnly; }
+ sal_Bool IsContour() const { return bContour; }
+ sal_Bool IsOutside() const { return bOutside; }
+ void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
+ void SetAnchorOnly( sal_Bool bNew ) { bAnchorOnly = bNew; }
+ void SetContour( sal_Bool bNew ) { bContour = bNew; }
+ void SetOutside( sal_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(sal_Bool bInP) const
+ { return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
+
+inline const SwFmtSurround &SwFmt::GetSurround(sal_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..688d89a236ea
--- /dev/null
+++ b/sw/inc/fmtsrndenum.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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..a25aa4425c5e
--- /dev/null
+++ b/sw/inc/fmtui.hrc
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..86241fb60649
--- /dev/null
+++ b/sw/inc/fmturl.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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
+
+ sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
+ void SetURL( const String &rURL, sal_Bool bServerMap );
+ void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
+
+ const String &GetTargetFrameName()const { return sTargetFrameName; }
+ const String &GetURL() const { return sURL; }
+ sal_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(sal_Bool bInP) const
+ { return (const SwFmtURL&)Get( RES_URL,bInP); }
+
+inline const SwFmtURL &SwFmt::GetURL(sal_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..1959ff1abf9f
--- /dev/null
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _FMTWRAPINFLUENCEONOBJPOS_HXX
+#define _FMTWRAPINFLUENCEONOBJPOS_HXX
+
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svl/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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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(sal_Bool bInP) const
+ { return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
+
+ inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(sal_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..b553c9eadbd2
--- /dev/null
+++ b/sw/inc/format.hxx
@@ -0,0 +1,355 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+{
+ String aFmtName;
+ SwAttrSet aSet;
+
+ sal_uInt16 nWhichId;
+ sal_uInt16 nFmtId; // Format-ID fuer Lesen/Schreiben
+ sal_uInt16 nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
+ // (ist keine harte Attributierung !!)
+ sal_uInt16 nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ sal_uInt8 nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ sal_Bool bWritten : 1; // sal_True: bereits geschrieben
+ sal_Bool bAutoFmt : 1; // sal_False: es handelt sich um eine Vorlage
+ // ist dflt immer auf sal_True !
+ sal_Bool bFmtInDTOR : 1; // sal_True: das Format wird geloscht. Damit man in
+ // der FmtChg-Message das erkennen kann!!!
+ sal_Bool bAutoUpdateFmt : 1; // sal_True: am Format werden die Attribute
+ // eines kompletten Absatzes gesetzt (UI-seitig!)
+
+protected:
+ SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
+ SwFmt( SwAttrPool& rPool, const String &rFmtNm, const sal_uInt16* pWhichRanges,
+ SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
+ SwFmt( const SwFmt& rFmt );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual ~SwFmt();
+ SwFmt &operator=(const SwFmt&);
+
+ // fuer die Abfrage der Writer-Funktionen
+ sal_uInt16 Which() const { return nWhichId; }
+
+ // erfrage vom Format Informationen
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+
+ // kopiere Attribute; auch ueber Dokumentgrenzen hinweg
+ void CopyAttrs( const SwFmt&, sal_Bool bReplace=sal_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)
+ sal_Bool SetDerivedFrom(SwFmt *pDerivedFrom = 0);
+
+ // Ist bInParents sal_False,
+ // wird nur in diesem Format nach dem Attribut gesucht.
+ inline const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents = sal_True ) const;
+ inline SfxItemState GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
+ const SfxPoolItem **ppItem = 0 ) const;
+ // --> OD 2008-03-03 #refactorlists#
+ // methods renamed and made virtual
+ virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 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 sal_uInt16 ResetAllFmtAttr();
+ // <--
+
+ inline SwFmt* DerivedFrom() const { return (SwFmt*)GetRegisteredIn(); }
+ inline sal_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
+ sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
+
+ // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
+ sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( sal_uInt8 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 = sal_False; }
+
+ // Abfragen/Setzen vom AutoFmt-Flag
+ sal_Bool IsAuto() const { return bAutoFmt; }
+ void SetAuto( sal_Bool bNew = sal_False ) { bAutoFmt = bNew; }
+
+ // Abfragen/Setzen vom bAutoUpdateFmt-Flag
+ sal_Bool IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
+ void SetAutoUpdateFmt( sal_Bool bNew = sal_True ) { bAutoUpdateFmt = bNew; }
+
+ sal_Bool IsFmtInDTOR() const { return bFmtInDTOR; }
+
+ // GetMethoden: das Bool gibt an, ob nur im Set (sal_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( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
+ inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
+ inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const;
+ inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const;
+ inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const;
+ inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const;
+ inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const;
+ inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const;
+ inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const;
+ inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const;
+ inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const;
+ inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const;
+
+ inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const;
+ inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const;
+ inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const;
+ inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
+ inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
+
+ // Frame-Attribute - impl. steht im frmatr.hxx,
+ inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
+ inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
+ inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
+ inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const;
+ inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const;
+ inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const;
+ inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const;
+ inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const;
+ inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const;
+ inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const;
+ inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const;
+ inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const;
+ inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const;
+ inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const;
+ inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const;
+ inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const;
+ inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const;
+ inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const;
+ inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const;
+ inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
+ inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
+ // OD 18.09.2003 #i18732#
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
+ // OD 2004-05-05 #i28701#
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
+
+ // Grafik-Attribute - impl. steht im grfatr.hxx
+ inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
+ inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
+ inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const;
+ inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const;
+ inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const;
+ inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
+
+ // Paragraph-Attribute - impl. steht im paratr.hxx
+ inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
+ inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
+ inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
+ inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const;
+ inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const;
+ inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const;
+ inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const;
+ inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const;
+ inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const;
+ inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
+
+ // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_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( sal_uInt16 nWhich,
+ sal_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( sal_uInt16 nWhich, sal_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..94deef35e018
--- /dev/null
+++ b/sw/inc/frmatr.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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(sal_Bool bInP) const
+ { return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
+inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(sal_Bool bInP) const
+ { return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); }
+inline const SvxULSpaceItem &SwAttrSet::GetULSpace(sal_Bool bInP) const
+ { return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); }
+inline const SvxPrintItem &SwAttrSet::GetPrint(sal_Bool bInP) const
+ { return (const SvxPrintItem&)Get( RES_PRINT,bInP); }
+inline const SvxOpaqueItem &SwAttrSet::GetOpaque(sal_Bool bInP) const
+ { return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); }
+inline const SvxProtectItem &SwAttrSet::GetProtect(sal_Bool bInP) const
+ { return (const SvxProtectItem&)Get( RES_PROTECT,bInP); }
+inline const SvxBoxItem &SwAttrSet::GetBox(sal_Bool bInP) const
+ { return (const SvxBoxItem&)Get( RES_BOX,bInP); }
+inline const SvxFmtKeepItem &SwAttrSet::GetKeep(sal_Bool bInP) const
+ { return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
+inline const SvxBrushItem &SwAttrSet::GetBackground(sal_Bool bInP) const
+ { return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
+inline const SvxShadowItem &SwAttrSet::GetShadow(sal_Bool bInP) const
+ { return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
+inline const SvxFmtBreakItem &SwAttrSet::GetBreak(sal_Bool bInP) const
+ { return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); }
+inline const SvxMacroItem &SwAttrSet::GetMacro(sal_Bool bInP) const
+ { return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); }
+inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(sal_Bool bInP) const
+ { return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); }
+
+
+/******************************************************************************
+ * Implementierung der FrameAttribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SvxPaperBinItem &SwFmt::GetPaperBin(sal_Bool bInP) const
+ { return aSet.GetPaperBin(bInP); }
+inline const SvxLRSpaceItem &SwFmt::GetLRSpace(sal_Bool bInP) const
+ { return aSet.GetLRSpace(bInP); }
+inline const SvxULSpaceItem &SwFmt::GetULSpace(sal_Bool bInP) const
+ { return aSet.GetULSpace(bInP); }
+inline const SvxPrintItem &SwFmt::GetPrint(sal_Bool bInP) const
+ { return aSet.GetPrint(bInP); }
+inline const SvxOpaqueItem &SwFmt::GetOpaque(sal_Bool bInP) const
+ { return aSet.GetOpaque(bInP); }
+inline const SvxProtectItem &SwFmt::GetProtect(sal_Bool bInP) const
+ { return aSet.GetProtect(bInP); }
+inline const SvxBoxItem &SwFmt::GetBox(sal_Bool bInP) const
+ { return aSet.GetBox(bInP); }
+inline const SvxFmtKeepItem &SwFmt::GetKeep(sal_Bool bInP) const
+ { return aSet.GetKeep(bInP); }
+inline const SvxBrushItem &SwFmt::GetBackground(sal_Bool bInP) const
+ { return aSet.GetBackground(bInP); }
+inline const SvxShadowItem &SwFmt::GetShadow(sal_Bool bInP) const
+ { return aSet.GetShadow(bInP); }
+inline const SvxFmtBreakItem &SwFmt::GetBreak(sal_Bool bInP) const
+ { return aSet.GetBreak(bInP); }
+inline const SvxMacroItem &SwFmt::GetMacro(sal_Bool bInP) const
+ { return aSet.GetMacro(bInP); }
+inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(sal_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..526ee8f9a6de
--- /dev/null
+++ b/sw/inc/frmfmt.hxx
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <com/sun/star/text/PositionLayoutDir.hpp>
+#include <cppuhelper/weakref.hxx>
+#include <tools/gen.hxx>
+#include <format.hxx>
+#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.
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::uno::XInterface> m_wXObject;
+
+protected:
+ SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
+ : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+ SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
+ : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
+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 );
+
+ // 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 sal_Bool bPrtArea = sal_False,
+ const Point* pPoint = 0,
+ const sal_Bool bCalcFrm = sal_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(); }
+
+ sal_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;
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::uno::XInterface> const& GetXObject() const
+ { return m_wXObject; }
+ SW_DLLPRIVATE void SetXObject(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface> const& xObject)
+ { m_wXObject = xObject; }
+
+ DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
+ void RegisterToFormat( SwFmt& rFmt );
+};
+
+//Das FlyFrame-Format ------------------------------
+
+class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt
+{
+ friend class SwDoc;
+
+ // #i972:
+ // it stores the previous position of Prt rectangle from RequestObjectResize
+ // so it can be used to move frames of non-resizable objects to align them correctly
+ // when they get borders (this is done in SwWrtShell::CalcAndGetScale)
+ Point m_aLastFlyFrmPrtRectPos;
+
+ //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 sal_Bool bCalcFrm = sal_False ) const;
+
+ SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0,
+ const sal_Bool bCalcFrm = sal_False ) const;
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ virtual sal_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;
+
+ const Point & GetLastFlyFrmPrtRectPos() const { return m_aLastFlyFrmPrtRectPos; }
+ void SetLastFlyFrmPrtRectPos( const Point &rPoint ) { m_aLastFlyFrmPrtRectPos = rPoint; }
+
+ 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..9e645ee32e3c
--- /dev/null
+++ b/sw/inc/ftnidx.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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, sal_uInt16* 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 );
+
+ sal_uInt16 GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
+ sal_uInt16 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..ee208c428799
--- /dev/null
+++ b/sw/inc/ftninfo.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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"
+#include <calbck.hxx>
+#include <editeng/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;
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
+public:
+ SvxNumberType aFmt;
+ sal_uInt16 nFtnOffset;
+
+ void ChgPageDesc( SwPageDesc *pDesc );
+ SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
+ bool KnowsPageDesc() const;
+ bool DependsOn( const SwPageDesc* ) const;
+
+ 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; }
+
+ SwEndNoteInfo & operator=(const SwEndNoteInfo&);
+ sal_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; }
+ void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); }
+};
+
+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&);
+
+ sal_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..b64494b847ae
--- /dev/null
+++ b/sw/inc/globals.hrc
@@ -0,0 +1,290 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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)
+#define STR_PRINTOPTUI (RC_GLOBALS_BEGIN + 15)
+
+//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..201f999cc2ce
--- /dev/null
+++ b/sw/inc/globdoc.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..28c24e16b48a
--- /dev/null
+++ b/sw/inc/grfatr.hxx
@@ -0,0 +1,370 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/eitem.hxx>
+#include <svl/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
+{
+ sal_Bool bGrfToggle; // auf geraden Seiten Grafiken spiegeln
+
+public:
+ SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< sal_uInt16 >(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 sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+
+ inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
+ {
+ SfxEnumItem::SetValue( rMirrorGrf.GetValue() );
+ bGrfToggle = rMirrorGrf.IsGrfToggle();
+ return *this;
+ }
+
+ inline sal_Bool IsGrfToggle() const { return bGrfToggle; }
+ inline void SetGrfToggle( sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 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, sal_uInt16 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+};
+
+class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem
+{
+public:
+ SwDrawModeGrf( sal_uInt16 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 sal_uInt16 GetValueCount() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+};
+
+
+
+/******************************************************************************
+ * Implementierung der GrafikAttribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(sal_Bool bInP) const
+ { return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
+inline const SwCropGrf &SwAttrSet::GetCropGrf(sal_Bool bInP) const
+ { return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
+inline const SwRotationGrf &SwAttrSet::GetRotationGrf(sal_Bool bInP) const
+ { return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
+inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(sal_Bool bInP) const
+ { return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
+inline const SwContrastGrf &SwAttrSet::GetContrastGrf(sal_Bool bInP) const
+ { return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
+inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(sal_Bool bInP) const
+ { return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
+inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(sal_Bool bInP) const
+ { return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
+inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(sal_Bool bInP) const
+ { return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
+inline const SwGammaGrf &SwAttrSet::GetGammaGrf(sal_Bool bInP) const
+ { return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
+inline const SwInvertGrf &SwAttrSet::GetInvertGrf(sal_Bool bInP) const
+ { return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
+inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(sal_Bool bInP) const
+ { return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
+inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(sal_Bool bInP) const
+ { return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
+
+/******************************************************************************
+ * Implementierung der GrafikAttribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SwMirrorGrf &SwFmt::GetMirrorGrf(sal_Bool bInP) const
+ { return aSet.GetMirrorGrf(bInP); }
+inline const SwCropGrf &SwFmt::GetCropGrf(sal_Bool bInP) const
+ { return aSet.GetCropGrf(bInP); }
+inline const SwRotationGrf &SwFmt::GetRotationGrf(sal_Bool bInP) const
+ { return aSet.GetRotationGrf(bInP); }
+inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(sal_Bool bInP) const
+ { return aSet.GetLuminanceGrf( bInP); }
+inline const SwContrastGrf &SwFmt::GetContrastGrf(sal_Bool bInP) const
+ { return aSet.GetContrastGrf( bInP); }
+inline const SwChannelRGrf &SwFmt::GetChannelRGrf(sal_Bool bInP) const
+ { return aSet.GetChannelRGrf( bInP); }
+inline const SwChannelGGrf &SwFmt::GetChannelGGrf(sal_Bool bInP) const
+ { return aSet.GetChannelGGrf( bInP); }
+inline const SwChannelBGrf &SwFmt::GetChannelBGrf(sal_Bool bInP) const
+ { return aSet.GetChannelBGrf( bInP); }
+inline const SwGammaGrf &SwFmt::GetGammaGrf(sal_Bool bInP) const
+ { return aSet.GetGammaGrf( bInP); }
+inline const SwInvertGrf &SwFmt::GetInvertGrf(sal_Bool bInP) const
+ { return aSet.GetInvertGrf( bInP); }
+inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(sal_Bool bInP) const
+ { return aSet.GetTransparencyGrf( bInP); }
+inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(sal_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..38b50dfdab3e
--- /dev/null
+++ b/sw/inc/helpid.h
@@ -0,0 +1,992 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "swcommands.h"
+#include <svx/svxcommands.h>
+#include <sfx2/sfxcommands.h>
+
+#define HID_BIB_BASE "SW_HID_BIB_BASE"
+#define HID_DBSEL "SW_HID_DBSEL"
+#define HID_DBEDIT "SW_HID_DBEDIT"
+#define HID_PRINT_OPTION "SW_HID_PRINT_OPTION"
+#define HID_MERGE_PRINTMONITOR "SW_HID_MERGE_PRINTMONITOR"
+#define HID_FLD_INPUT "SW_HID_FLD_INPUT"
+#define HID_CONFIG_MISC "SW_HID_CONFIG_MISC"
+#define HID_CONFIG_PATH "SW_HID_CONFIG_PATH"
+#define HID_CONFIG_TB "SW_HID_CONFIG_TB"
+#define HID_PG_FOOTNOTE "SW_HID_PG_FOOTNOTE"
+#define HID_FORMAT_GRAPHIC "SW_HID_FORMAT_GRAPHIC"
+#define HID_FILTERSTATUS "SW_HID_FILTERSTATUS"
+#define HID_DOCINFO_EDT "SW_HID_DOCINFO_EDT"
+#define HID_DBLOGON "SW_HID_DBLOGON"
+#define HID_MAC_ASSIGN "SW_HID_MAC_ASSIGN"
+#define HID_CONFIG_MN "SW_HID_CONFIG_MN"
+#define HID_PAPERSIZE "SW_HID_PAPERSIZE"
+#define HID_PASSWD "SW_HID_PASSWD"
+#define HID_SPELLING_OPTIONS "SW_HID_SPELLING_OPTIONS"
+#define HID_HYPHENATE_OPTIONS "SW_HID_HYPHENATE_OPTIONS"
+#define HID_FORMAT_COLUMN "SW_HID_FORMAT_COLUMN"
+#define HID_CONFIG_SAVE "SW_HID_CONFIG_SAVE"
+#define HID_NUM_NAMES "SW_HID_NUM_NAMES"
+#define HID_SYMBOL_SELECT "SW_HID_SYMBOL_SELECT"
+#define HID_CONFIG_KY "SW_HID_CONFIG_KY"
+#define HID_LINKEDIT "SW_HID_LINKEDIT"
+#define HID_GRAPHIC_PREVIEW "SW_HID_GRAPHIC_PREVIEW"
+#define HID_DICTIONARY "SW_HID_DICTIONARY"
+#define HID_SET_STYLE "SW_HID_SET_STYLE"
+#define HID_RIBBONBAR "SW_HID_RIBBONBAR"
+#define HID_STATUSLINE "SW_HID_STATUSLINE"
+#define HID_DOCBAR "SW_HID_DOCBAR"
+#define HID_VRULER "SW_HID_VRULER"
+#define HID_MAKRO_WINDOW "SW_HID_MAKRO_WINDOW"
+#define HID_ENVELOP_FORMAT "SW_HID_ENVELOP_FORMAT"
+#define HID_ENVELOP_PRINTER "SW_HID_ENVELOP_PRINTER"
+
+#define HID_HEADER_FOOTER_DLG "SW_HID_HEADER_FOOTER_DLG"
+#define HID_GRID_DLG "SW_HID_GRID_DLG"
+#define HID_USER_ADDRESS_DLG "SW_HID_USER_ADDRESS_DLG"
+#define HID_SELECT_FAX_DLG "SW_HID_SELECT_FAX_DLG"
+
+#define HID_LABEL_FORMAT "SW_HID_LABEL_FORMAT"
+#define HID_BRSORT "SW_HID_BRSORT"
+#define HID_BRSEEK "SW_HID_BRSEEK"
+#define HID_BRCFG "SW_HID_BRCFG"
+
+#define HID_FORMEDT_CONTENT "SW_HID_FORMEDT_CONTENT"
+#define HID_FORMEDT_USER "SW_HID_FORMEDT_USER"
+#define HID_FORMEDT_INDEX "SW_HID_FORMEDT_INDEX"
+
+#define HID_SCRL_PAGEUP "SW_HID_SCRL_PAGEUP"
+#define HID_SCRL_PAGEDOWN "SW_HID_SCRL_PAGEDOWN"
+
+#define HID_DRAW_WIN "SW_HID_DRAW_WIN"
+#define HID_EDIT_WIN "SW_HID_EDIT_WIN"
+
+#define HID_INSERT_CTRL "SW_HID_INSERT_CTRL" // TbxControl Einfuegen
+#define HID_INSERT_OBJ_CTRL "SW_HID_INSERT_OBJ_CTRL"
+#define HID_INSERT_FIELD_CTRL "SW_HID_INSERT_FIELD_CTRL"
+
+#define HID_SOURCEVIEW "SW_HID_SOURCEVIEW"
+#define HID_TBL_OPT_CTRL "SW_HID_TBL_OPT_CTRL"
+#define HID_AUTOFORMAT_CLB "SW_HID_AUTOFORMAT_CLB"
+
+#define HID_SCRL_NAVI "SW_HID_SCRL_NAVI"
+#define HID_NAVI_DRAG_HYP "SW_HID_NAVI_DRAG_HYP"
+#define HID_NAVI_DRAG_LINK "SW_HID_NAVI_DRAG_LINK"
+#define HID_NAVI_DRAG_COPY "SW_HID_NAVI_DRAG_COPY"
+#define HID_NAVI_OUTLINES "SW_HID_NAVI_OUTLINES"
+
+#define HID_AUTOFORMAT_EXEC "SW_HID_AUTOFORMAT_EXEC"
+#define HID_AUTOFORMAT_CLOSE "SW_HID_AUTOFORMAT_CLOSE"
+
+#define HID_PAGEPREVIEW "SW_HID_PAGEPREVIEW"
+#define HID_SOURCE_EDITWIN "SW_HID_SOURCE_EDITWIN"
+
+// Dialog Help-IDs **********************************************************
+
+#define HID_CONVERT_FROM "SW_HID_CONVERT_FROM"
+#define HID_CONVERT_TO "SW_HID_CONVERT_TO"
+#define HID_EDIT_POSTIT "SW_HID_EDIT_POSTIT"
+#define HID_INSERT_CHART "SW_HID_INSERT_CHART"
+#define HID_PAGE_PREVIEW "SW_HID_PAGE_PREVIEW"
+#define HID_INSERT_HYPERLINK "SW_HID_INSERT_HYPERLINK"
+#define HID_NAVIGATOR_TREELIST "SW_HID_NAVIGATOR_TREELIST"
+#define HID_DLG_CAPTION "SW_HID_DLG_CAPTION"
+#define HID_DLG_GLOSS_DECIDE "SW_HID_DLG_GLOSS_DECIDE"
+#define HID_NAVIGATOR_TOOLBOX "SW_HID_NAVIGATOR_TOOLBOX"
+#define HID_NAVIGATOR_LISTBOX "SW_HID_NAVIGATOR_LISTBOX"
+#define HID_NUM_BULLET_DLG "SW_HID_NUM_BULLET_DLG"
+#define HID_VS_SINGLENUM "SW_HID_VS_SINGLENUM"
+#define HID_VS_NUM "SW_HID_VS_NUM"
+#define HID_VS_BULLET "SW_HID_VS_BULLET"
+#define HID_VS_NUMBMP "SW_HID_VS_NUMBMP"
+#define HID_VS_RULER "SW_HID_VS_RULER"
+#define HID_RULER_DIALOG "SW_HID_RULER_DIALOG"
+#define HID_INSERT_ABSTRACT "SW_HID_INSERT_ABSTRACT"
+#define HID_NAVI_TBX1 "SW_HID_NAVI_TBX1"
+#define HID_NAVI_TBX2 "SW_HID_NAVI_TBX2"
+#define HID_NAVI_TBX3 "SW_HID_NAVI_TBX3"
+#define HID_NAVI_TBX4 "SW_HID_NAVI_TBX4"
+#define HID_NAVI_TBX5 "SW_HID_NAVI_TBX5"
+#define HID_NAVI_TBX6 "SW_HID_NAVI_TBX6"
+#define HID_NAVI_TBX7 "SW_HID_NAVI_TBX7"
+#define HID_NAVI_TBX8 "SW_HID_NAVI_TBX8"
+#define HID_NAVI_TBX9 "SW_HID_NAVI_TBX9"
+#define HID_NAVI_TBX10 "SW_HID_NAVI_TBX10"
+#define HID_NAVI_TBX11 "SW_HID_NAVI_TBX11"
+#define HID_NAVI_TBX12 "SW_HID_NAVI_TBX12"
+#define HID_NAVI_TBX13 "SW_HID_NAVI_TBX13"
+#define HID_NAVI_TBX14 "SW_HID_NAVI_TBX14"
+#define HID_NAVI_TBX15 "SW_HID_NAVI_TBX15"
+#define HID_NAVI_VS "SW_HID_NAVI_VS"
+#define HID_NUM_FORMAT_BTN "SW_HID_NUM_FORMAT_BTN"
+#define HID_PPREV_ZOOM "SW_HID_PPREV_ZOOM"
+#define HID_NAVI_TBX16 "SW_HID_NAVI_TBX16"
+#define HID_LTEMPL_TEXT "SW_HID_LTEMPL_TEXT"
+#define HID_LTEMPL_FRAME "SW_HID_LTEMPL_FRAME"
+#define HID_LTEMPL_PAGE "SW_HID_LTEMPL_PAGE"
+#define HID_LTEMPL_OVERRIDE "SW_HID_LTEMPL_OVERRIDE"
+#define HID_LTEMPL_TEMPLATES "SW_HID_LTEMPL_TEMPLATES"
+#define HID_NAVI_TBX17 "SW_HID_NAVI_TBX17"
+#define HID_NAVI_TBX18 "SW_HID_NAVI_TBX18"
+#define HID_NAVI_TBX19 "SW_HID_NAVI_TBX19"
+#define HID_NAVI_TBX20 "SW_HID_NAVI_TBX20"
+#define HID_NAVI_TBX21 "SW_HID_NAVI_TBX21"
+#define HID_NAVI_TBX22 "SW_HID_NAVI_TBX22"
+#define HID_NAVI_TBX23 "SW_HID_NAVI_TBX23"
+#define HID_NAVI_TBX24 "SW_HID_NAVI_TBX24"
+#define HID_NAVIGATOR_GLOBAL_TOOLBOX "SW_HID_NAVIGATOR_GLOBAL_TOOLBOX"
+#define HID_NAVIGATOR_GLOB_TREELIST "SW_HID_NAVIGATOR_GLOB_TREELIST"
+#define HID_GLOS_GROUP_TREE "SW_HID_GLOS_GROUP_TREE"
+#define HID_GLBLTREE_UPDATE "SW_HID_GLBLTREE_UPDATE"
+#define HID_GLBLTREE_INSERT "SW_HID_GLBLTREE_INSERT"
+#define HID_GLBLTREE_EDIT "SW_HID_GLBLTREE_EDIT"
+#define HID_GLBLTREE_DEL "SW_HID_GLBLTREE_DEL"
+#define HID_GLBLTREE_INS_IDX "SW_HID_GLBLTREE_INS_IDX"
+#define HID_GLBLTREE_INS_CNTIDX "SW_HID_GLBLTREE_INS_CNTIDX"
+#define HID_GLBLTREE_INS_USRIDX "SW_HID_GLBLTREE_INS_USRIDX"
+#define HID_GLBLTREE_INS_FILE "SW_HID_GLBLTREE_INS_FILE"
+#define HID_GLBLTREE_INS_NEW_FILE "SW_HID_GLBLTREE_INS_NEW_FILE"
+#define HID_GLBLTREE_INS_TEXT "SW_HID_GLBLTREE_INS_TEXT"
+#define HID_GLBLTREE_UPD_SEL "SW_HID_GLBLTREE_UPD_SEL"
+#define HID_GLBLTREE_UPD_IDX "SW_HID_GLBLTREE_UPD_IDX"
+#define HID_GLBLTREE_UPD_LINK "SW_HID_GLBLTREE_UPD_LINK"
+#define HID_GLBLTREEUPD_ALL "SW_HID_GLBLTREEUPD_ALL"
+#define HID_NUM_OUTL_NAMED_NUMS "SW_HID_NUM_OUTL_NAMED_NUMS"
+#define HID_NUM_OUTL_NUM_SAVEAS "SW_HID_NUM_OUTL_NUM_SAVEAS"
+#define HID_NUM_NAMED_NUMS "SW_HID_NUM_NAMED_NUMS"
+#define HID_NUM_NUM_SAVEAS "SW_HID_NUM_NUM_SAVEAS"
+#define HID_NUM_STD_NUMBER "SW_HID_NUM_STD_NUMBER"
+#define HID_NUM_DEL_NUMBER "SW_HID_NUM_DEL_NUMBER"
+#define HID_NUM_STD_BULLET "SW_HID_NUM_STD_BULLET"
+#define HID_NUM_DEL_BULLET "SW_HID_NUM_DEL_BULLET"
+#define HID_NAVI_CONTENT "SW_HID_NAVI_CONTENT"
+#define HID_NAVI_GLOBAL "SW_HID_NAVI_GLOBAL"
+#define HID_LTEMPL_NUMBERING "SW_HID_LTEMPL_NUMBERING"
+#define HID_FLDVAR_APPLY "SW_HID_FLDVAR_APPLY"
+#define HID_FLDVAR_DELETE "SW_HID_FLDVAR_DELETE"
+#define HID_FLDEDT_ADDRESS "SW_HID_FLDEDT_ADDRESS"
+#define HID_SORT_ACTION "SW_HID_SORT_ACTION"
+#define HID_SORT_AUTHOR "SW_HID_SORT_AUTHOR"
+#define HID_SORT_DATE "SW_HID_SORT_DATE"
+#define HID_SORT_COMMENT "SW_HID_SORT_COMMENT"
+#define HID_SW_SORT_POSITION "SW_HID_SW_SORT_POSITION"
+#define HID_SYNC_BTN "SW_HID_SYNC_BTN"
+#define HID_EDIT_COMMENT "SW_HID_EDIT_COMMENT"
+#define HID_SEL_TEMPLATE "SW_HID_SEL_TEMPLATE"
+#define HID_DLG_SEQUENCE_OPTION "SW_HID_DLG_SEQUENCE_OPTION"
+#define HID_DLG_FLDEDT_NEXT "SW_HID_DLG_FLDEDT_NEXT"
+#define HID_DLG_FLDEDT_PREV "SW_HID_DLG_FLDEDT_PREV"
+#define HID_DLG_FLDEDT_ADDRESS "SW_HID_DLG_FLDEDT_ADDRESS"
+#define HID_DLG_PRV_PRT_OPTIONS "SW_HID_DLG_PRV_PRT_OPTIONS"
+
+#define HID_FILEDLG_CHARDLG "SW_HID_FILEDLG_CHARDLG"
+#define HID_FILEDLG_LOADTEMPLATE "SW_HID_FILEDLG_LOADTEMPLATE"
+#define HID_FILEDLG_ROMENU "SW_HID_FILEDLG_ROMENU"
+#define HID_FILEDLG_MAILMRGE1 "SW_HID_FILEDLG_MAILMRGE1"
+#define HID_FILEDLG_MAILMRGE2 "SW_HID_FILEDLG_MAILMRGE2"
+#define HID_FILEDLG_FRMPAGE "SW_HID_FILEDLG_FRMPAGE"
+#define HID_FILEDLG_SRCVIEW "SW_HID_FILEDLG_SRCVIEW"
+#define HID_FILEDLG_WIZDOKU "SW_HID_FILEDLG_WIZDOKU"
+#define HID_PREVIEW_ZOOM "SW_HID_PREVIEW_ZOOM"
+
+#define HID_REDLINE_AUTOFMT_ACCEPT "SW_HID_REDLINE_AUTOFMT_ACCEPT"
+#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG"
+#define HID_ASCII_FILTER "SW_HID_ASCII_FILTER"
+#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK"
+#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME"// #100286#
+#define HID_REFSELECTION_TOOLTIP "SW_HID_REFSELECTION_TOOLTIP" // #i83479#
+
+
+// TabPage Help-IDs *********************************************************
+
+#define HID_DROPCAPS "SW_HID_DROPCAPS"
+#define HID_FRM_EXT "SW_HID_FRM_EXT"
+#define HID_FRM_STD "SW_HID_FRM_STD"
+#define HID_GRF_EXT "SW_HID_GRF_EXT"
+#define HID_COLUMN "SW_HID_COLUMN"
+#define HID_DOC_STAT "SW_HID_DOC_STAT"
+#define HID_MACROASSIGN "SW_HID_MACROASSIGN"
+#define HID_FOOTNOTE_PAGE "SW_HID_FOOTNOTE_PAGE"
+#define HID_OPTDOCDISP_PAGE "SW_HID_OPTDOCDISP_PAGE"
+#define HID_OPTGRID_PAGE "SW_HID_OPTGRID_PAGE"
+#define HID_OPTTEST_PAGE "SW_HID_OPTTEST_PAGE"
+#define HID_OPTPRINT_PAGE "SW_HID_OPTPRINT_PAGE"
+#define HID_FORMAT_TABLE "SW_HID_FORMAT_TABLE"
+#define HID_TABLE_COLUMN "SW_HID_TABLE_COLUMN"
+#define HID_LAB_LAB "SW_HID_LAB_LAB"
+#define HID_LAB_PRT "SW_HID_LAB_PRT"
+#define HID_ENV_PRT "SW_HID_ENV_PRT"
+#define HID_LAB_FMT "SW_HID_LAB_FMT"
+#define HID_ENV_ENV "SW_HID_ENV_ENV"
+#define HID_ENV_FMT "SW_HID_ENV_FMT"
+#define HID_FRM_URL "SW_HID_FRM_URL"
+#define HID_CHAR_URL "SW_HID_CHAR_URL"
+#define HID_CONTENT_OPT "SW_HID_CONTENT_OPT"
+#define HID_LAYOUT_OPT "SW_HID_LAYOUT_OPT"
+#define HID_STD_FONT "SW_HID_STD_FONT"
+#define HID_COND_COLL "SW_HID_COND_COLL"
+#define HID_FRM_ADD "SW_HID_FRM_ADD"
+#define HID_TABLE_TEXTFLOW "SW_HID_TABLE_TEXTFLOW"
+#define HID_AUTOFMT_BY_INPUT "SW_HID_AUTOFMT_BY_INPUT"
+#define HID_AUTOFMT_APPLY "SW_HID_AUTOFMT_APPLY"
+#define HID_OPTTABLE_PAGE "SW_HID_OPTTABLE_PAGE"
+#define HID_PICK_SINGLE_NUM "SW_HID_PICK_SINGLE_NUM"
+#define HID_PICK_BULLET "SW_HID_PICK_BULLET"
+#define HID_PICK_NUM "SW_HID_PICK_NUM"
+#define HID_PICK_BMP "SW_HID_PICK_BMP"
+
+#define HID_FLD_DB "SW_HID_FLD_DB"
+#define HID_FLD_DOKINF "SW_HID_FLD_DOKINF"
+#define HID_FLD_VAR "SW_HID_FLD_VAR"
+#define HID_FLD_DOK "SW_HID_FLD_DOK"
+#define HID_FLD_FUNC "SW_HID_FLD_FUNC"
+#define HID_FLD_REF "SW_HID_FLD_REF"
+#define HID_OPTSHDWCRSR "SW_HID_OPTSHDWCRSR"
+#define HID_NUM_OPTIONS "SW_HID_NUM_OPTIONS"
+#define HID_NUM_POSITION "SW_HID_NUM_POSITION"
+#define HID_NUMPARA "SW_HID_NUMPARA"
+#define HID_FOOTNOTE_OPTIONS "SW_HID_FOOTNOTE_OPTIONS"
+#define HID_ENDNOTE_OPTIONS "SW_HID_ENDNOTE_OPTIONS"
+#define HID_REDLINE_OPT "SW_HID_REDLINE_OPT"
+#define HID_LINENUMBERING "SW_HID_LINENUMBERING"
+#define HID_REDLINE_ACCEPT "SW_HID_REDLINE_ACCEPT"
+#define HID_EDIT_FLD_DB "SW_HID_EDIT_FLD_DB"
+#define HID_EDIT_FLD_DOKINF "SW_HID_EDIT_FLD_DOKINF"
+#define HID_EDIT_FLD_VAR "SW_HID_EDIT_FLD_VAR"
+#define HID_EDIT_FLD_DOK "SW_HID_EDIT_FLD_DOK"
+#define HID_EDIT_FLD_FUNC "SW_HID_EDIT_FLD_FUNC"
+#define HID_EDIT_FLD_REF "SW_HID_EDIT_FLD_REF"
+#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
+#define HID_TP_OUTLINE_NUM "SW_HID_TP_OUTLINE_NUM"
+#define HID_OPTINSERT_PAGE "SW_HID_OPTINSERT_PAGE"
+#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE"
+#define HID_OPTLOAD_PAGE "SW_HID_OPTLOAD_PAGE"
+#define HID_INSERT_TOX_PAGE "SW_HID_INSERT_TOX_PAGE"
+#define HID_TOX_FORM_ENTRY_PAGE "SW_HID_TOX_FORM_ENTRY_PAGE"
+#define HID_TOX_FORM_STYLES_PAGE "SW_HID_TOX_FORM_STYLES_PAGE"
+#define HID_INSERT_TOX_TABDLG "SW_HID_INSERT_TOX_TABDLG"
+#define HID_INSERT_SECTION_PAGE "SW_HID_INSERT_SECTION_PAGE"
+#define HID_INSERT_SECTION_DLG "SW_HID_INSERT_SECTION_DLG"
+#define HID_SECTION_PROPERTIES_DLG "SW_HID_SECTION_PROPERTIES_DLG"
+#define HID_RENAME_XNAMED "SW_HID_RENAME_XNAMED"
+#define HID_TP_TOX_SELECT "SW_HID_TP_TOX_SELECT"
+#define HID_TP_TOX_ENTRY "SW_HID_TP_TOX_ENTRY"
+#define HID_TOX_STYLES_PAGE "SW_HID_TOX_STYLES_PAGE"
+#define HID_TP_VISITING_CARDS "SW_HID_TP_VISITING_CARDS"
+#define HID_DLG_ADD_IDX_STYLES "SW_HID_DLG_ADD_IDX_STYLES"
+#define HID_ADD_STYLES_TLB "SW_HID_ADD_STYLES_TLB"
+#define HID_OLE_CHECKLB "SW_HID_OLE_CHECKLB"
+#define HID_DLG_CREATE_AUTH_ENTRY "SW_HID_DLG_CREATE_AUTH_ENTRY"
+#define HID_TP_PRIVATE_DATA "SW_HID_TP_PRIVATE_DATA"
+
+#define HID_TP_BUSINESS_DATA "SW_HID_TP_BUSINESS_DATA"
+#define HID_SECTION_FTNENDNOTES_PAGE "SW_HID_SECTION_FTNENDNOTES_PAGE"
+#define HID_TEXTGRID_PAGE "SW_HID_TEXTGRID_PAGE"
+#define HID_OPTCOMPATIBILITY_PAGE "SW_HID_OPTCOMPATIBILITY_PAGE"
+#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX"
+
+// AutoPilot Help-IDs *********************************************************
+
+#define HID_LETTER_PAGE1 "SW_HID_LETTER_PAGE1"
+#define HID_LETTER_PAGE2 "SW_HID_LETTER_PAGE2"
+#define HID_LETTER_PAGE3 "SW_HID_LETTER_PAGE3"
+#define HID_LETTER_PAGE4 "SW_HID_LETTER_PAGE4"
+#define HID_LETTER_PAGE5 "SW_HID_LETTER_PAGE5"
+#define HID_LETTER_PAGE6 "SW_HID_LETTER_PAGE6"
+#define HID_LETTER_PAGE7 "SW_HID_LETTER_PAGE7"
+#define HID_LETTER_PAGE8 "SW_HID_LETTER_PAGE8"
+#define HID_LETTER_PAGE9 "SW_HID_LETTER_PAGE9"
+
+#define HID_FAX_PAGE1 "SW_HID_FAX_PAGE1"
+#define HID_FAX_PAGE2 "SW_HID_FAX_PAGE2"
+#define HID_FAX_PAGE3 "SW_HID_FAX_PAGE3"
+#define HID_FAX_PAGE4 "SW_HID_FAX_PAGE4"
+#define HID_FAX_PAGE5 "SW_HID_FAX_PAGE5"
+#define HID_FAX_PAGE6 "SW_HID_FAX_PAGE6"
+#define HID_FAX_PAGE7 "SW_HID_FAX_PAGE7"
+#define HID_FAX_PAGE8 "SW_HID_FAX_PAGE8"
+
+#define HID_MEMO_PAGE1 "SW_HID_MEMO_PAGE1"
+#define HID_MEMO_PAGE2 "SW_HID_MEMO_PAGE2"
+#define HID_MEMO_PAGE3 "SW_HID_MEMO_PAGE3"
+#define HID_MEMO_PAGE4 "SW_HID_MEMO_PAGE4"
+#define HID_MEMO_PAGE5 "SW_HID_MEMO_PAGE5"
+
+#define HID_AGENDA_PAGE1 "SW_HID_AGENDA_PAGE1"
+#define HID_AGENDA_PAGE2 "SW_HID_AGENDA_PAGE2"
+#define HID_AGENDA_PAGE3 "SW_HID_AGENDA_PAGE3"
+#define HID_AGENDA_PAGE4 "SW_HID_AGENDA_PAGE4"
+#define HID_AGENDA_PAGE5 "SW_HID_AGENDA_PAGE5"
+#define HID_AGENDA_PAGE6 "SW_HID_AGENDA_PAGE6"
+
+#define HID_AUTOPILOT_NEXT "SW_HID_AUTOPILOT_NEXT"
+#define HID_AUTOPILOT_PREV "SW_HID_AUTOPILOT_PREV"
+#define HID_AUTOPILOT_OK "SW_HID_AUTOPILOT_OK"
+
+// HelpIds fuers Menue *****************************************************
+
+#define HID_MN_SUB_TBLROW "SW_HID_MN_SUB_TBLROW"
+#define HID_MN_SUB_TBLCOL "SW_HID_MN_SUB_TBLCOL"
+#define HID_MN_SUB_AUTOFORMAT "SW_HID_MN_SUB_AUTOFORMAT"
+#define HID_MN_SUB_TOOLBAR "SW_HID_MN_SUB_TOOLBAR"
+#define HID_MN_SUB_FIELD "SW_HID_MN_SUB_FIELD"
+#define HID_MN_SUB_GRAPHIC "SW_HID_MN_SUB_GRAPHIC"
+#define HID_MN_SUB_TEMPLATES "SW_HID_MN_SUB_TEMPLATES"
+#define HID_MN_SUB_ARRANGE "SW_HID_MN_SUB_ARRANGE"
+#define HID_MN_SUB_SPELLING "SW_HID_MN_SUB_SPELLING"
+#define HID_MN_SUB_UPDATE "SW_HID_MN_SUB_UPDATE"
+#define HID_MN_SUB_MIRROR "SW_HID_MN_SUB_MIRROR"
+#define HID_MN_SUB_ALIGN "SW_HID_MN_SUB_ALIGN"
+#define HID_MN_SUB_OPTIONS "SW_HID_MN_SUB_OPTIONS"
+
+#define HID_MN_CALC_PHD "SW_HID_MN_CALC_PHD"
+#define HID_MN_CALC_SQRT "SW_HID_MN_CALC_SQRT"
+#define HID_MN_CALC_OR "SW_HID_MN_CALC_OR"
+#define HID_MN_CALC_XOR "SW_HID_MN_CALC_XOR"
+#define HID_MN_CALC_AND "SW_HID_MN_CALC_AND"
+#define HID_MN_CALC_NOT "SW_HID_MN_CALC_NOT"
+#define HID_MN_CALC_EQ "SW_HID_MN_CALC_EQ"
+#define HID_MN_CALC_NEQ "SW_HID_MN_CALC_NEQ"
+#define HID_MN_CALC_LEQ "SW_HID_MN_CALC_LEQ"
+#define HID_MN_CALC_GEQ "SW_HID_MN_CALC_GEQ"
+#define HID_MN_CALC_LES "SW_HID_MN_CALC_LES"
+#define HID_MN_CALC_GRE "SW_HID_MN_CALC_GRE"
+#define HID_MN_CALC_SUM "SW_HID_MN_CALC_SUM"
+#define HID_MN_CALC_MEAN "SW_HID_MN_CALC_MEAN"
+#define HID_MN_CALC_MIN "SW_HID_MN_CALC_MIN"
+#define HID_MN_CALC_MAX "SW_HID_MN_CALC_MAX"
+#define HID_MN_CALC_SIN "SW_HID_MN_CALC_SIN"
+#define HID_MN_CALC_COS "SW_HID_MN_CALC_COS"
+#define HID_MN_CALC_TAN "SW_HID_MN_CALC_TAN"
+#define HID_MN_CALC_ASIN "SW_HID_MN_CALC_ASIN"
+#define HID_MN_CALC_ACOS "SW_HID_MN_CALC_ACOS"
+#define HID_MN_CALC_ATAN "SW_HID_MN_CALC_ATAN"
+#define HID_MN_CALC_POW "SW_HID_MN_CALC_POW"
+#define HID_MN_CALC_LISTSEP "SW_HID_MN_CALC_LISTSEP"
+#define HID_MN_POP_OPS "SW_HID_MN_POP_OPS"
+#define HID_MN_POP_STATISTICS "SW_HID_MN_POP_STATISTICS"
+#define HID_MN_POP_FUNC "SW_HID_MN_POP_FUNC"
+#define HID_MN_RSC_END "SW_HID_MN_RSC_END"
+#define HID_MN_CALC_ROUND "SW_HID_MN_CALC_ROUND"
+#define HID_MN_SUB_MACRO "SW_HID_MN_SUB_MACRO"
+
+#define HID_MN_READONLY_SAVEGRAPHIC "SW_HID_MN_READONLY_SAVEGRAPHIC"
+#define HID_MN_READONLY_GRAPHICTOGALLERY "SW_HID_MN_READONLY_GRAPHICTOGALLERY"
+#define HID_MN_READONLY_TOGALLERYLINK "SW_HID_MN_READONLY_TOGALLERYLINK"
+#define HID_MN_READONLY_TOGALLERYCOPY "SW_HID_MN_READONLY_TOGALLERYCOPY"
+#define HID_MN_READONLY_SAVEBACKGROUND "SW_HID_MN_READONLY_SAVEBACKGROUND"
+#define HID_MN_READONLY_BACKGROUNDTOGALLERY "SW_HID_MN_READONLY_BACKGROUNDTOGALLERY"
+#define HID_MN_READONLY_COPYLINK "SW_HID_MN_READONLY_COPYLINK"
+#define HID_MN_READONLY_COPYGRAPHIC "SW_HID_MN_READONLY_COPYGRAPHIC"
+#define HID_MN_READONLY_LOADGRAPHIC "SW_HID_MN_READONLY_LOADGRAPHIC"
+#define HID_MN_READONLY_GRAPHICOFF "SW_HID_MN_READONLY_GRAPHICOFF"
+#define HID_MN_READONLY_PLUGINOFF "SW_HID_MN_READONLY_PLUGINOFF"
+
+#define HID_MD_GLOS_DEFINE "SW_HID_MD_GLOS_DEFINE"
+#define HID_MD_GLOS_REPLACE "SW_HID_MD_GLOS_REPLACE"
+#define HID_MD_GLOS_RENAME "SW_HID_MD_GLOS_RENAME"
+#define HID_MD_GLOS_DELETE "SW_HID_MD_GLOS_DELETE"
+#define HID_MD_GLOS_EDIT "SW_HID_MD_GLOS_EDIT"
+#define HID_MD_GLOS_MACRO "SW_HID_MD_GLOS_MACRO"
+#define HID_LINGU_ADD_WORD "SW_HID_LINGU_ADD_WORD"
+#define HID_LINGU_IGNORE_WORD "SW_HID_LINGU_IGNORE_WORD"
+#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG"
+#define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR"
+#define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE"
+#define HID_MD_GLOS_CATEGORY "SW_HID_MD_GLOS_CATEGORY"
+#define HID_REGION_TREE "SW_HID_REGION_TREE"
+#define HID_LINGU_WORD_LANGUAGE "SW_HID_LINGU_WORD_LANGUAGE"
+#define HID_LINGU_PARA_LANGUAGE "SW_HID_LINGU_PARA_LANGUAGE"
+#define HID_MD_GLOS_DEFINE_TEXT "SW_HID_MD_GLOS_DEFINE_TEXT"
+#define HID_DLG_PASSWD_SECTION "SW_HID_DLG_PASSWD_SECTION"
+#define HID_MD_COPY_TO_CLIPBOARD "SW_HID_MD_COPY_TO_CLIPBOARD"
+#define HID_MD_GLOS_IMPORT "SW_HID_MD_GLOS_IMPORT"
+#define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN" // SMARTTAGS
+#define HID_LINGU_IGNORE_SELECTION "SW_HID_LINGU_IGNORE_SELECTION" // grammar check context menu
+
+// Weiter Help-IDs **********************************************************
+
+#define HID_CLOSE_FILE "SW_HID_CLOSE_FILE"
+#define HID_LAUNCH_REGISTRY "SW_HID_LAUNCH_REGISTRY"
+#define HID_MERGE_FILE "SW_HID_MERGE_FILE"
+#define HID_MERGE_FILE_DLG "SW_HID_MERGE_FILE_DLG"
+#define HID_NEW_FILE "SW_HID_NEW_FILE"
+#define HID_OPEN_FILE "SW_HID_OPEN_FILE"
+#define HID_OPEN_LASTVERSION "SW_HID_OPEN_LASTVERSION"
+#define HID_PRINT_FILE "SW_HID_PRINT_FILE"
+#define HID_PRINT_FILE_OPTIONS "SW_HID_PRINT_FILE_OPTIONS"
+#define HID_SAVE_FILE_AS "SW_HID_SAVE_FILE_AS"
+#define HID_SAVE_FILE "SW_HID_SAVE_FILE"
+#define HID_SETUP_PRINTER_DLG "SW_HID_SETUP_PRINTER_DLG"
+#define HID_EXIT "SW_HID_EXIT"
+#define HID_CREATE_DOCUMENT "SW_HID_CREATE_DOCUMENT"
+#define HID_DOCSTAT_DLG "SW_HID_DOCSTAT_DLG"
+#define HID_LOAD_TEMPLATE_DLG "SW_HID_LOAD_TEMPLATE_DLG"
+#define HID_SAVE_ALL "SW_HID_SAVE_ALL"
+#define HID_NEW_FILE_DEFAULT "SW_HID_NEW_FILE_DEFAULT"
+#define HID_PRINT_FILE_DEFAULT "SW_HID_PRINT_FILE_DEFAULT"
+#define HID_FAX "SW_HID_FAX"
+#define HID_SELECT_DATABASE "SW_HID_SELECT_DATABASE"
+#define HID_DOC_INFO_DLG "SW_HID_DOC_INFO_DLG"
+#define HID_DOC_MGR_DLG "SW_HID_DOC_MGR_DLG"
+#define HID_OPTCAPTION_CLB "SW_HID_OPTCAPTION_CLB"
+
+#define HID_COPY "SW_HID_COPY"
+#define HID_CUT "SW_HID_CUT"
+#define HID_EDIT_FIELD "SW_HID_EDIT_FIELD"
+#define HID_EDIT_FILE_INFO_DLG "SW_HID_EDIT_FILE_INFO_DLG"
+#define HID_EDIT_LINK_DLG "SW_HID_EDIT_LINK_DLG"
+#define HID_EDIT_OBJECT "SW_HID_EDIT_OBJECT"
+#define HID_GOTO "SW_HID_GOTO"
+#define HID_SET_FIELD_VALUE "SW_HID_SET_FIELD_VALUE"
+#define HID_PASTE "SW_HID_PASTE"
+#define HID_REDO "SW_HID_REDO"
+#define HID_SEARCH "SW_HID_SEARCH"
+#define HID_REPLACE "SW_HID_REPLACE"
+#define HID_SELECT_ALL "SW_HID_SELECT_ALL"
+#define HID_UNDO "SW_HID_UNDO"
+#define HID_REPEAT "SW_HID_REPEAT"
+#define HID_BUFFER_UPDATE "SW_HID_BUFFER_UPDATE"
+#define HID_UPDATE_FIELDS "SW_HID_UPDATE_FIELDS"
+#define HID_EXECUTE_MACROFIELD "SW_HID_EXECUTE_MACROFIELD"
+#define HID_EDIT_FORMULA "SW_HID_EDIT_FORMULA"
+#define HID_CALC_TABLE "SW_HID_CALC_TABLE"
+#define HID_NUM_BULLET_DOWN "SW_HID_NUM_BULLET_DOWN"
+#define HID_NUM_BULLET_UP "SW_HID_NUM_BULLET_UP"
+#define HID_NUM_BULLET_PREV "SW_HID_NUM_BULLET_PREV"
+#define HID_NUM_BULLET_NEXT "SW_HID_NUM_BULLET_NEXT"
+#define HID_NUM_BULLET_MOVEUP "SW_HID_NUM_BULLET_MOVEUP"
+#define HID_NUM_BULLET_MOVEDOWN "SW_HID_NUM_BULLET_MOVEDOWN"
+#define HID_NUM_BULLET_NONUM "SW_HID_NUM_BULLET_NONUM"
+#define HID_NUM_BULLET_OFF "SW_HID_NUM_BULLET_OFF"
+#define HID_NUM_BULLET_ON "SW_HID_NUM_BULLET_ON"
+#define HID_NUM_BULLET_OUTLINE_DOWN "SW_HID_NUM_BULLET_OUTLINE_DOWN"
+#define HID_NUM_BULLET_OUTLINE_UP "SW_HID_NUM_BULLET_OUTLINE_UP"
+#define HID_NUM_BULLET_OUTLINE_MOVEUP "SW_HID_NUM_BULLET_OUTLINE_MOVEUP"
+#define HID_NUM_BULLET_OUTLINE_MOVEDOWN "SW_HID_NUM_BULLET_OUTLINE_MOVEDOWN"
+#define HID_UPDATE_INPUTFIELDS "SW_HID_UPDATE_INPUTFIELDS"
+#define HID_NUM_NUMBERING_ON "SW_HID_NUM_NUMBERING_ON"
+#define HID_REPEAT_SEARCH "SW_HID_REPEAT_SEARCH"
+#define HID_REPAGINATE "SW_HID_REPAGINATE"
+
+#define HID_REFRESH_VIEW "SW_HID_REFRESH_VIEW"
+#define HID_RIBBON "SW_HID_RIBBON"
+#define HID_RULER "SW_HID_RULER"
+#define HID_STATUSBAR "SW_HID_STATUSBAR"
+#define HID_TOOLBOX "SW_HID_TOOLBOX"
+#define HID_VIEW_BOUNDS "SW_HID_VIEW_BOUNDS"
+#define HID_VIEW_FIELDS "SW_HID_VIEW_FIELDS"
+#define HID_VLINEAL "SW_HID_VLINEAL"
+#define HID_VSCROLLBAR "SW_HID_VSCROLLBAR"
+#define HID_HSCROLLBAR "SW_HID_HSCROLLBAR"
+#define HID_VIEW_META_CHARS "SW_HID_VIEW_META_CHARS"
+#define HID_VIEW_MARKS "SW_HID_VIEW_MARKS"
+#define HID_VIEW_FIELDNAME "SW_HID_VIEW_FIELDNAME"
+#define HID_VIEW_TABLEGRID "SW_HID_VIEW_TABLEGRID"
+#define HID_ZOOM "SW_HID_ZOOM"
+
+#define HID_DELETE_BOOKMARK "SW_HID_DELETE_BOOKMARK"
+#define HID_INSERT_BREAK "SW_HID_INSERT_BREAK"
+#define HID_INSERT_COLUMN_BREAK "SW_HID_INSERT_COLUMN_BREAK"
+#define HID_INSERT_FILE "SW_HID_INSERT_FILE"
+#define HID_INSERT_FOOTNOTE "SW_HID_INSERT_FOOTNOTE"
+#define HID_INSERT_GRAFIC "SW_HID_INSERT_GRAFIC"
+#define HID_INSERT_LINEBREAK "SW_HID_INSERT_LINEBREAK"
+#define HID_INSERT_MERGEFIELD_DLG "SW_HID_INSERT_MERGEFIELD_DLG"
+#define HID_INSERT_OBJECT_DLG "SW_HID_INSERT_OBJECT_DLG"
+#define HID_INSERT_PAGEBREAK "SW_HID_INSERT_PAGEBREAK"
+#define HID_INSERT_RECORD "SW_HID_INSERT_RECORD"
+#define HID_MERGE_RECORD "SW_HID_MERGE_RECORD"
+#define HID_INSERT_SYMBOL "SW_HID_INSERT_SYMBOL"
+#define HID_INSERT_STRING "SW_HID_INSERT_STRING"
+#define HID_INSERT_COLS "SW_HID_INSERT_COLS"
+#define HID_INSERT_FRAME_INTERACT "SW_HID_INSERT_FRAME_INTERACT"
+#define HID_INSERT_FRAME "SW_HID_INSERT_FRAME"
+#define HID_INSERT_IDX_ENTRY "SW_HID_INSERT_IDX_ENTRY"
+#define HID_INSERT_USERIDX_ENTRY "SW_HID_INSERT_USERIDX_ENTRY"
+#define HID_INSERT_CNTNTIDX_ENTRY "SW_HID_INSERT_CNTNTIDX_ENTRY"
+#define HID_INSERT_SOFT_HYPHEN "SW_HID_INSERT_SOFT_HYPHEN"
+#define HID_INSERT_HARD_SPACE "SW_HID_INSERT_HARD_SPACE"
+
+#define HID_SET_FONT "SW_HID_SET_FONT"
+#define HID_SET_FONT_SIZE "SW_HID_SET_FONT_SIZE"
+#define HID_GROW_FONT_SIZE "SW_HID_GROW_FONT_SIZE"
+#define HID_SHRINK_FONT_SIZE "SW_HID_SHRINK_FONT_SIZE"
+#define HID_SET_BOLD "SW_HID_SET_BOLD"
+#define HID_SET_ITALIC "SW_HID_SET_ITALIC"
+#define HID_SET_SHADOW "SW_HID_SET_SHADOW"
+#define HID_SET_OUTLINE "SW_HID_SET_OUTLINE"
+#define HID_SET_UNDERLINE "SW_HID_SET_UNDERLINE"
+#define HID_SET_STRIKEOUT "SW_HID_SET_STRIKEOUT"
+#define HID_SET_SUPER_SCRIPT "SW_HID_SET_SUPER_SCRIPT"
+#define HID_SET_SUB_SCRIPT "SW_HID_SET_SUB_SCRIPT"
+#define HID_SET_COLOR "SW_HID_SET_COLOR"
+#define HID_SET_CASEMAP "SW_HID_SET_CASEMAP"
+#define HID_SET_LANGUAGE "SW_HID_SET_LANGUAGE"
+#define HID_SET_KERNING "SW_HID_SET_KERNING"
+#define HID_INDENT_TO_TABSTOP "SW_HID_INDENT_TO_TABSTOP"
+#define HID_SET_LEFT_PARA "SW_HID_SET_LEFT_PARA"
+#define HID_SET_RIGHT_PARA "SW_HID_SET_RIGHT_PARA"
+#define HID_SET_CENTER_PARA "SW_HID_SET_CENTER_PARA"
+#define HID_SET_JUSTIFY_PARA "SW_HID_SET_JUSTIFY_PARA"
+#define HID_SET_LINE_SPACE_1 "SW_HID_SET_LINE_SPACE_1"
+#define HID_SET_LINE_SPACE_15 "SW_HID_SET_LINE_SPACE_15"
+#define HID_SET_LINE_SPACE_2 "SW_HID_SET_LINE_SPACE_2"
+#define HID_FLIP_HORZ_GRAFIC "SW_HID_FLIP_HORZ_GRAFIC"
+#define HID_FLIP_VERT_GRAFIC "SW_HID_FLIP_VERT_GRAFIC"
+#define HID_SET_ADJUST "SW_HID_SET_ADJUST"
+#define HID_SET_LRMARGIN "SW_HID_SET_LRMARGIN"
+#define HID_SET_ULMARGIN "SW_HID_SET_ULMARGIN"
+#define HID_UNINDENT_TO_TABSTOP "SW_HID_UNINDENT_TO_TABSTOP"
+#define HID_SET_HYPHEN_ZONE "SW_HID_SET_HYPHEN_ZONE"
+#define HID_SET_PAGE_BREAK "SW_HID_SET_PAGE_BREAK"
+#define HID_SET_KEEP_TOGETHER "SW_HID_SET_KEEP_TOGETHER"
+#define HID_SET_WIDOW "SW_HID_SET_WIDOW"
+#define HID_SET_ORPHAN "SW_HID_SET_ORPHAN"
+#define HID_FORMAT_SHADOW "SW_HID_FORMAT_SHADOW"
+#define HID_FORMAT_BORDER "SW_HID_FORMAT_BORDER"
+#define HID_FORMAT_CHAR_DLG "SW_HID_FORMAT_CHAR_DLG"
+#define HID_FORMAT_PARA_DLG "SW_HID_FORMAT_PARA_DLG"
+#define HID_FORMAT_TAB "SW_HID_FORMAT_TAB"
+#define HID_FORMAT_TAB_DLG "SW_HID_FORMAT_TAB_DLG"
+#define HID_FORMAT_BORDER_DLG "SW_HID_FORMAT_BORDER_DLG"
+#define HID_FORMAT_BACKGROUND "SW_HID_FORMAT_BACKGROUND"
+#define HID_FORMAT_BACKGROUND_DLG "SW_HID_FORMAT_BACKGROUND_DLG"
+#define HID_FORMAT_PAGE "SW_HID_FORMAT_PAGE"
+#define HID_FORMAT_PAGE_DLG "SW_HID_FORMAT_PAGE_DLG"
+#define HID_FORMAT_DROPCAPS "SW_HID_FORMAT_DROPCAPS"
+#define HID_FORMAT_FRAME_DLG "SW_HID_FORMAT_FRAME_DLG"
+#define HID_FORMAT_GRAFIC_DLG "SW_HID_FORMAT_GRAFIC_DLG"
+#define HID_FORMAT_TABLE_DLG "SW_HID_FORMAT_TABLE_DLG"
+#define HID_NEW_STYLE_BY_EXAMPLE "SW_HID_NEW_STYLE_BY_EXAMPLE"
+#define HID_UPDATE_STYLE_BY_EXAMPLE "SW_HID_UPDATE_STYLE_BY_EXAMPLE"
+#define HID_STYLE_SHEET_FRAME_DLG "SW_HID_STYLE_SHEET_FRAME_DLG"
+#define HID_STYLE_SHEET_DOC_DLG "SW_HID_STYLE_SHEET_DOC_DLG"
+#define HID_FORMAT_RESET "SW_HID_FORMAT_RESET"
+#define HID_FRAME_TO_TOP "SW_HID_FRAME_TO_TOP"
+#define HID_FRAME_TO_BOTTOM "SW_HID_FRAME_TO_BOTTOM"
+#define HID_FRAME_NOWRAP "SW_HID_FRAME_NOWRAP"
+#define HID_FRAME_WRAP "SW_HID_FRAME_WRAP"
+#define HID_FRAME_WRAPTHRU "SW_HID_FRAME_WRAPTHRU"
+#define HID_FRAME_ALIGN_HORZ_LEFT "SW_HID_FRAME_ALIGN_HORZ_LEFT"
+#define HID_FRAME_ALIGN_HORZ_RIGHT "SW_HID_FRAME_ALIGN_HORZ_RIGHT"
+#define HID_FRAME_ALIGN_HORZ_CENTER "SW_HID_FRAME_ALIGN_HORZ_CENTER"
+#define HID_FRAME_ALIGN_VERT_TOP "SW_HID_FRAME_ALIGN_VERT_TOP"
+#define HID_FRAME_ALIGN_VERT_BOTTOM "SW_HID_FRAME_ALIGN_VERT_BOTTOM"
+#define HID_FRAME_ALIGN_VERT_CENTER "SW_HID_FRAME_ALIGN_VERT_CENTER"
+#define HID_SET_FRM_SIZE "SW_HID_SET_FRM_SIZE"
+#define HID_SET_FRM_POSITION "SW_HID_SET_FRM_POSITION"
+#define HID_SET_FRM_ANCHOR "SW_HID_SET_FRM_ANCHOR"
+#define HID_SET_FRM_WRAP "SW_HID_SET_FRM_WRAP"
+#define HID_SET_FRM_DIST "SW_HID_SET_FRM_DIST"
+#define HID_SET_FRM_OPTIONS "SW_HID_SET_FRM_OPTIONS"
+#define HID_SET_GRF_MIRROR "SW_HID_SET_GRF_MIRROR"
+#define HID_SET_TABLE_WIDTH "SW_HID_SET_TABLE_WIDTH"
+#define HID_SET_TABLE_ALIGN "SW_HID_SET_TABLE_ALIGN"
+#define HID_SET_CHAR_STYLE "SW_HID_SET_CHAR_STYLE"
+#define HID_SET_PARA_STYLE "SW_HID_SET_PARA_STYLE"
+#define HID_SET_PAGE_STYLE "SW_HID_SET_PAGE_STYLE"
+#define HID_SET_FRM_MACRO "SW_HID_SET_FRM_MACRO"
+#define HID_SET_FRM_COLUMNS "SW_HID_SET_FRM_COLUMNS"
+#define HID_SET_FRM_COLUMN_WIDTH "SW_HID_SET_FRM_COLUMN_WIDTH"
+#define HID_UPDATE_STYLES_DIRECT "SW_HID_UPDATE_STYLES_DIRECT"
+
+#define HID_TABLE_INSERT_ROW "SW_HID_TABLE_INSERT_ROW"
+#define HID_TABLE_DELETE_ROW "SW_HID_TABLE_DELETE_ROW"
+#define HID_TABLE_DELETE_COL "SW_HID_TABLE_DELETE_COL"
+#define HID_TABLE_MERGE_CELLS "SW_HID_TABLE_MERGE_CELLS"
+#define HID_AUTOFMT_TABLE "SW_HID_AUTOFMT_TABLE"
+#define HID_SWDLG_STRINPUT "SW_HID_SWDLG_STRINPUT"
+#define HID_TABLE_SET_ULSPACE "SW_HID_TABLE_SET_ULSPACE"
+#define HID_TABLE_SET_GRID "SW_HID_TABLE_SET_GRID"
+#define HID_TABLE_SET_SHADOW "SW_HID_TABLE_SET_SHADOW"
+#define HID_TABLE_SELECT_ROW "SW_HID_TABLE_SELECT_ROW"
+#define HID_TABLE_SELECT_COL "SW_HID_TABLE_SELECT_COL"
+#define HID_TABLE_SELECT_ALL "SW_HID_TABLE_SELECT_ALL"
+#define HID_TABLE_SET_READ_ONLY_CELLS "SW_HID_TABLE_SET_READ_ONLY_CELLS"
+#define HID_TABLE_UNSET_READ_ONLY_CELLS "SW_HID_TABLE_UNSET_READ_ONLY_CELLS"
+#define HID_PAGE_STYLE_SET_COLS "SW_HID_PAGE_STYLE_SET_COLS"
+#define HID_SET_PROP_LINE_SPACE "SW_HID_SET_PROP_LINE_SPACE"
+#define HID_SET_ABS_LINE_SPACE "SW_HID_SET_ABS_LINE_SPACE"
+
+#define HID_SPELLING_DLG "SW_HID_SPELLING_DLG"
+#define HID_THESAURUS_DLG "SW_HID_THESAURUS_DLG"
+#define HID_HYPHENATE_OPT_DLG "SW_HID_HYPHENATE_OPT_DLG"
+#define HID_SORTING "SW_HID_SORTING"
+#define HID_SORTING_DLG "SW_HID_SORTING_DLG"
+#define HID_CALCULATE "SW_HID_CALCULATE"
+#define HID_RECORD_MACRO_DLG "SW_HID_RECORD_MACRO_DLG"
+#define HID_PLAY_MACRO_DLG "SW_HID_PLAY_MACRO_DLG"
+#define HID_CONFIG_DLG "SW_HID_CONFIG_DLG"
+#define HID_EXPAND_GLOSSARY "SW_HID_EXPAND_GLOSSARY"
+#define HID_RENAME_GLOSSARY "SW_HID_RENAME_GLOSSARY"
+#define HID_CONFIG_MENU "SW_HID_CONFIG_MENU"
+#define HID_CONFIG_KEY "SW_HID_CONFIG_KEY"
+#define HID_ASSIGN_LOCAL_MACRO_DLG "SW_HID_ASSIGN_LOCAL_MACRO_DLG"
+#define HID_COMPILE_MACRO "SW_HID_COMPILE_MACRO"
+#define HID_CONFIG_VIEWOPTIONS "SW_HID_CONFIG_VIEWOPTIONS"
+#define HID_CONFIG_COLORS "SW_HID_CONFIG_COLORS"
+#define HID_INSERT_GLOSSARY "SW_HID_INSERT_GLOSSARY"
+#define HID_AUTO_CORRECT "SW_HID_AUTO_CORRECT"
+#define HID_AUTO_CORRECT_DLG "SW_HID_AUTO_CORRECT_DLG"
+#define HID_HELP_PI "SW_HID_HELP_PI"
+#define HID_NAVIGATION_PI "SW_HID_NAVIGATION_PI"
+#define HID_TEMPLATE_PI "SW_HID_TEMPLATE_PI"
+#define HID_ADDR_PI "SW_HID_ADDR_PI"
+#define HID_NAVIGATION_PI_GOTO_PAGE "SW_HID_NAVIGATION_PI_GOTO_PAGE"
+#define HID_LETTER_WIZZARD "SW_HID_LETTER_WIZZARD"
+#define HID_FAX_WIZZARD "SW_HID_FAX_WIZZARD"
+#define HID_MEMO_WIZZARD "SW_HID_MEMO_WIZZARD"
+#define HID_AGENDA_WIZZARD "SW_HID_AGENDA_WIZZARD"
+
+#define HID_NEW_WINDOW "SW_HID_NEW_WINDOW"
+#define HID_ARRANGE_ALL_WIN "SW_HID_ARRANGE_ALL_WIN"
+#define HID_ARRANGE_CASCADE_WIN "SW_HID_ARRANGE_CASCADE_WIN"
+#define HID_ARRANGE_HORZ_WIN "SW_HID_ARRANGE_HORZ_WIN"
+#define HID_ARRANGE_VERT_WIN "SW_HID_ARRANGE_VERT_WIN"
+
+#define HID_SHOW_HELP_INDEX "SW_HID_SHOW_HELP_INDEX"
+#define HID_SHOW_KEYBOARD_HELP "SW_HID_SHOW_KEYBOARD_HELP"
+#define HID_SHOW_HELP_MANUAL "SW_HID_SHOW_HELP_MANUAL"
+#define HID_SHOW_UPDATE_HELP "SW_HID_SHOW_UPDATE_HELP"
+
+#define HID_CHAR_LEFT "SW_HID_CHAR_LEFT"
+#define HID_CHAR_RIGHT "SW_HID_CHAR_RIGHT"
+#define HID_LINE_UP "SW_HID_LINE_UP"
+#define HID_LINE_DOWN "SW_HID_LINE_DOWN"
+#define HID_START_OF_LINE "SW_HID_START_OF_LINE"
+#define HID_END_OF_LINE "SW_HID_END_OF_LINE"
+#define HID_START_OF_DOCUMENT "SW_HID_START_OF_DOCUMENT"
+#define HID_END_OF_DOCUMENT "SW_HID_END_OF_DOCUMENT"
+#define HID_START_OF_NEXT_PAGE "SW_HID_START_OF_NEXT_PAGE"
+#define HID_END_OF_NEXT_PAGE "SW_HID_END_OF_NEXT_PAGE"
+#define HID_START_OF_PREV_PAGE "SW_HID_START_OF_PREV_PAGE"
+#define HID_END_OF_PREV_PAGE "SW_HID_END_OF_PREV_PAGE"
+#define HID_START_OF_PAGE "SW_HID_START_OF_PAGE"
+#define HID_END_OF_PAGE "SW_HID_END_OF_PAGE"
+#define HID_START_OF_COLUMN "SW_HID_START_OF_COLUMN"
+#define HID_END_OF_COLUMN "SW_HID_END_OF_COLUMN"
+#define HID_START_OF_PARA "SW_HID_START_OF_PARA"
+#define HID_END_OF_PARA "SW_HID_END_OF_PARA"
+#define HID_NEXT_WORD "SW_HID_NEXT_WORD"
+#define HID_PREV_WORD "SW_HID_PREV_WORD"
+#define HID_NEXT_SENT "SW_HID_NEXT_SENT"
+#define HID_PREV_SENT "SW_HID_PREV_SENT"
+#define HID_DELETE "SW_HID_DELETE"
+#define HID_BACKSPACE "SW_HID_BACKSPACE"
+#define HID_DELETE_SENT "SW_HID_DELETE_SENT"
+#define HID_DELETE_BACK_SENT "SW_HID_DELETE_BACK_SENT"
+#define HID_DELETE_WORD "SW_HID_DELETE_WORD"
+#define HID_DELETE_BACK_WORD "SW_HID_DELETE_BACK_WORD"
+#define HID_DELETE_LINE "SW_HID_DELETE_LINE"
+#define HID_DELETE_BACK_LINE "SW_HID_DELETE_BACK_LINE"
+#define HID_DELETE_PARA "SW_HID_DELETE_PARA"
+#define HID_DELETE_BACK_PARA "SW_HID_DELETE_BACK_PARA"
+#define HID_DELETE_WHOLE_LINE "SW_HID_DELETE_WHOLE_LINE"
+#define HID_SET_INS_MODE "SW_HID_SET_INS_MODE"
+#define HID_PAGEUP "SW_HID_PAGEUP"
+#define HID_PAGEDOWN "SW_HID_PAGEDOWN"
+#define HID_SET_ADD_MODE "SW_HID_SET_ADD_MODE"
+#define HID_SET_EXT_MODE "SW_HID_SET_EXT_MODE"
+#define HID_ESCAPE "SW_HID_ESCAPE"
+#define HID_SELECT_WORD "SW_HID_SELECT_WORD"
+#define HID_START_TABLE "SW_HID_START_TABLE"
+#define HID_END_TABLE "SW_HID_END_TABLE"
+#define HID_NEXT_TABLE "SW_HID_NEXT_TABLE"
+#define HID_PREV_TABLE "SW_HID_PREV_TABLE"
+#define HID_START_OF_NEXT_COLUMN "SW_HID_START_OF_NEXT_COLUMN"
+#define HID_END_OF_NEXT_COLUMN "SW_HID_END_OF_NEXT_COLUMN"
+#define HID_START_OF_PREV_COLUMN "SW_HID_START_OF_PREV_COLUMN"
+#define HID_END_OF_PREV_COLUMN "SW_HID_END_OF_PREV_COLUMN"
+#define HID_FOOTNOTE_TO_ANCHOR "SW_HID_FOOTNOTE_TO_ANCHOR"
+#define HID_NEXT_FOOTNOTE "SW_HID_NEXT_FOOTNOTE"
+#define HID_PREV_FOOTNOTE "SW_HID_PREV_FOOTNOTE"
+#define HID_CNTNT_TO_NEXT_FRAME "SW_HID_CNTNT_TO_NEXT_FRAME"
+#define HID_FRAME_TO_ANCHOR "SW_HID_FRAME_TO_ANCHOR"
+#define HID_TO_HEADER "SW_HID_TO_HEADER"
+#define HID_TO_FOOTER "SW_HID_TO_FOOTER"
+#define HID_IDX_MARK_TO_IDX "SW_HID_IDX_MARK_TO_IDX"
+
+#define HID_ENVELOP "SW_HID_ENVELOP"
+#define HID_LABEL "SW_HID_LABEL"
+#define HID_ENVELOP_PRINT "SW_HID_ENVELOP_PRINT"
+
+#define HID_NAVIGATION_IMGBTN "SW_HID_NAVIGATION_IMGBTN"
+#define HID_ENVELOP_INSERT "SW_HID_ENVELOP_INSERT"
+
+#define HID_WEBTOOLS_TOOLBOX "SW_HID_WEBTOOLS_TOOLBOX"
+#define HID_WEBTEXT_TOOLBOX "SW_HID_WEBTEXT_TOOLBOX"
+#define HID_WEBFRAME_TOOLBOX "SW_HID_WEBFRAME_TOOLBOX"
+#define HID_TEXT_TOOLBOX "SW_HID_TEXT_TOOLBOX"
+#define HID_TABLE_TOOLBOX "SW_HID_TABLE_TOOLBOX"
+#define HID_FRAME_TOOLBOX "SW_HID_FRAME_TOOLBOX"
+#define HID_GRAFIK_TOOLBOX "SW_HID_GRAFIK_TOOLBOX"
+#define HID_OLE_TOOLBOX "SW_HID_OLE_TOOLBOX"
+#define HID_DRAW_TOOLBOX "SW_HID_DRAW_TOOLBOX"
+#define HID_BEZIER_TOOLBOX "SW_HID_BEZIER_TOOLBOX"
+#define HID_DRAW_TEXT_TOOLBOX "SW_HID_DRAW_TEXT_TOOLBOX"
+#define HID_NUM_TOOLBOX "SW_HID_NUM_TOOLBOX"
+#define HID_TOOLS_TOOLBOX "SW_HID_TOOLS_TOOLBOX"
+#define HID_SRCVIEW_TOOLBOX "SW_HID_SRCVIEW_TOOLBOX"
+
+#define HID_LABEL_INSERT "SW_HID_LABEL_INSERT"
+#define HID_CALC_TOOLBOX "SW_HID_CALC_TOOLBOX"
+#define HID_PVIEW_TOOLBOX "SW_HID_PVIEW_TOOLBOX"
+
+#define HID_FIELD_INSERT "SW_HID_FIELD_INSERT"
+#define HID_FIELD_CLOSE "SW_HID_FIELD_CLOSE"
+
+#define HID_COND_COLL_TABLIST "SW_HID_COND_COLL_TABLIST"
+
+#define HID_DB_SELECTION_TLB "SW_HID_DB_SELECTION_TLB"
+#define HID_FIELD_DINF_TYPE "SW_HID_FIELD_DINF_TYPE"
+
+#define HID_DRAWFORM_TOOLBOX "SW_HID_DRAWFORM_TOOLBOX"
+#define HID_SELECT_TEMPLATE "SW_HID_SELECT_TEMPLATE"
+
+#define HID_AP_INSERT_DB_SEL "SW_HID_AP_INSERT_DB_SEL"
+#define HID_WEBGRAPHIC_TOOLBOX "SW_HID_WEBGRAPHIC_TOOLBOX"
+#define HID_OUTLINE_FORM "SW_HID_OUTLINE_FORM"
+#define HID_NUM_RESET "SW_HID_NUM_RESET"
+
+#define HID_AUTOFORMAT_REJECT "SW_HID_AUTOFORMAT_REJECT"
+#define HID_AUTOFORMAT_ACCEPT "SW_HID_AUTOFORMAT_ACCEPT"
+#define HID_AUTOFORMAT_EDIT_CHG "SW_HID_AUTOFORMAT_EDIT_CHG"
+
+//insert index/entries/Pattern buttons and edits
+#define HID_TOX_ENTRY_BUTTON "SW_HID_TOX_ENTRY_BUTTON"
+#define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT"
+
+#define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX"
+#define HID_INSERT_IDX_MRK_OK "SW_HID_INSERT_IDX_MRK_OK"
+#define HID_INSERT_IDX_MRK_CLOSE "SW_HID_INSERT_IDX_MRK_CLOSE"
+#define HID_INSERT_AUTH_MRK_OK "SW_HID_INSERT_AUTH_MRK_OK"
+#define HID_INSERT_AUTH_MRK_CLOSE "SW_HID_INSERT_AUTH_MRK_CLOSE"
+#define HID_INSERT_IDX_MRK_DELETE "SW_HID_INSERT_IDX_MRK_DELETE"
+#define HID_INSERT_IDX_MRK_NEW "SW_HID_INSERT_IDX_MRK_NEW"
+#define HID_INSERT_IDX_MRK_PREV "SW_HID_INSERT_IDX_MRK_PREV"
+#define HID_INSERT_IDX_MRK_PREV_SAME "SW_HID_INSERT_IDX_MRK_PREV_SAME"
+#define HID_INSERT_IDX_MRK_NEXT "SW_HID_INSERT_IDX_MRK_NEXT"
+#define HID_INSERT_IDX_MRK_NEXT_SAME "SW_HID_INSERT_IDX_MRK_NEXT_SAME"
+#define HID_INSERT_IDX_MRK_TYPE "SW_HID_INSERT_IDX_MRK_TYPE"
+#define HID_INSERT_IDX_MRK_ENTRY "SW_HID_INSERT_IDX_MRK_ENTRY"
+#define HID_INSERT_IDX_MRK_PRIM_KEY "SW_HID_INSERT_IDX_MRK_PRIM_KEY"
+#define HID_INSERT_IDX_MRK_SEC_KEY "SW_HID_INSERT_IDX_MRK_SEC_KEY"
+#define HID_INSERT_IDX_MRK_LEVEL "SW_HID_INSERT_IDX_MRK_LEVEL"
+#define HID_INSERT_IDX_MRK_MAIN_ENTRY "SW_HID_INSERT_IDX_MRK_MAIN_ENTRY"
+#define HID_INSERT_IDX_MRK_APPLY_ALL "SW_HID_INSERT_IDX_MRK_APPLY_ALL"
+#define HID_INSERT_AUTH_MRK_ENTRY "SW_HID_INSERT_AUTH_MRK_ENTRY"
+#define HID_INSERT_AUTH_MRK_CREATE_ENTRY "SW_HID_INSERT_AUTH_MRK_CREATE_ENTRY"
+#define HID_INSERT_AUTH_MRK_EDIT_ENTRY "SW_HID_INSERT_AUTH_MRK_EDIT_ENTRY"
+#define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW"
+
+#define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER"
+#define HID_AUTH_FIELD_AUTHORITY_TYPE "SW_HID_AUTH_FIELD_AUTHORITY_TYPE"
+#define HID_AUTH_FIELD_ADDRESS "SW_HID_AUTH_FIELD_ADDRESS"
+#define HID_AUTH_FIELD_ANNOTE "SW_HID_AUTH_FIELD_ANNOTE"
+#define HID_AUTH_FIELD_AUTHOR "SW_HID_AUTH_FIELD_AUTHOR"
+#define HID_AUTH_FIELD_BOOKTITLE "SW_HID_AUTH_FIELD_BOOKTITLE"
+#define HID_AUTH_FIELD_CHAPTER "SW_HID_AUTH_FIELD_CHAPTER"
+#define HID_AUTH_FIELD_EDITION "SW_HID_AUTH_FIELD_EDITION"
+#define HID_AUTH_FIELD_EDITOR "SW_HID_AUTH_FIELD_EDITOR"
+#define HID_AUTH_FIELD_HOWPUBLISHED "SW_HID_AUTH_FIELD_HOWPUBLISHED"
+#define HID_AUTH_FIELD_INSTITUTION "SW_HID_AUTH_FIELD_INSTITUTION"
+#define HID_AUTH_FIELD_JOURNAL "SW_HID_AUTH_FIELD_JOURNAL"
+#define HID_AUTH_FIELD_MONTH "SW_HID_AUTH_FIELD_MONTH"
+#define HID_AUTH_FIELD_NOTE "SW_HID_AUTH_FIELD_NOTE"
+#define HID_AUTH_FIELD_NUMBER "SW_HID_AUTH_FIELD_NUMBER"
+#define HID_AUTH_FIELD_ORGANIZATIONS "SW_HID_AUTH_FIELD_ORGANIZATIONS"
+#define HID_AUTH_FIELD_PAGES "SW_HID_AUTH_FIELD_PAGES"
+#define HID_AUTH_FIELD_PUBLISHER "SW_HID_AUTH_FIELD_PUBLISHER"
+#define HID_AUTH_FIELD_SCHOOL "SW_HID_AUTH_FIELD_SCHOOL"
+#define HID_AUTH_FIELD_SERIES "SW_HID_AUTH_FIELD_SERIES"
+#define HID_AUTH_FIELD_TITLE "SW_HID_AUTH_FIELD_TITLE"
+#define HID_AUTH_FIELD_REPORT_TYPE "SW_HID_AUTH_FIELD_REPORT_TYPE"
+#define HID_AUTH_FIELD_VOLUME "SW_HID_AUTH_FIELD_VOLUME"
+#define HID_AUTH_FIELD_YEAR "SW_HID_AUTH_FIELD_YEAR"
+#define HID_AUTH_FIELD_URL "SW_HID_AUTH_FIELD_URL"
+#define HID_AUTH_FIELD_CUSTOM1 "SW_HID_AUTH_FIELD_CUSTOM1"
+#define HID_AUTH_FIELD_CUSTOM2 "SW_HID_AUTH_FIELD_CUSTOM2"
+#define HID_AUTH_FIELD_CUSTOM3 "SW_HID_AUTH_FIELD_CUSTOM3"
+#define HID_AUTH_FIELD_CUSTOM4 "SW_HID_AUTH_FIELD_CUSTOM4"
+#define HID_AUTH_FIELD_CUSTOM5 "SW_HID_AUTH_FIELD_CUSTOM5"
+#define HID_AUTH_FIELD_ISBN "SW_HID_AUTH_FIELD_ISBN"
+
+#define HID_AUTH_MARK_DLG_FROM_COMP_RB "SW_HID_AUTH_MARK_DLG_FROM_COMP_RB"
+#define HID_AUTH_MARK_DLG_FROM_DOC_RB "SW_HID_AUTH_MARK_DLG_FROM_DOC_RB"
+#define HID_AUTH_MARK_DLG_ID_LISTBOX "SW_HID_AUTH_MARK_DLG_ID_LISTBOX"
+
+#define HID_INSERT_INDEX_ENTRY_LEVEL_LB "SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB"
+#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE "SW_HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE"
+#define HID_INSERT_IDX_MRK_SRCH_WORDONLY "SW_HID_INSERT_IDX_MRK_SRCH_WORDONLY"
+#define HID_DLG_CREATE_AUTOMARK "SW_HID_DLG_CREATE_AUTOMARK"
+#define HID_BUSINESS_CARD_CONTENT "SW_HID_BUSINESS_CARD_CONTENT"
+#define HID_SAVE_LABEL_DLG "SW_HID_SAVE_LABEL_DLG"
+#define HID_BUSINESS_FMT_PAGE "SW_HID_BUSINESS_FMT_PAGE"
+#define HID_BUSINESS_FMT_PAGE_CONT "SW_HID_BUSINESS_FMT_PAGE_CONT"
+#define HID_BUSINESS_FMT_PAGE_SHEET "SW_HID_BUSINESS_FMT_PAGE_SHEET"
+#define HID_BUSINESS_FMT_PAGE_BRAND "SW_HID_BUSINESS_FMT_PAGE_BRAND"
+#define HID_BUSINESS_FMT_PAGE_TYPE "SW_HID_BUSINESS_FMT_PAGE_TYPE"
+#define HID_SEND_MASTER_DIALOG "SW_HID_SEND_MASTER_DIALOG"
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_OK"
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL"
+#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER "SW_HID_SEND_MASTER_CTRL_LISTBOX_FILTER"
+#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW"
+#define HID_SEND_MASTER_CTRL_EDIT_FILEURL "SW_HID_SEND_MASTER_CTRL_EDIT_FILEURL"
+#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION"
+#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE"
+#define HID_SEND_MASTER_CTRL_DUMMY "SW_HID_SEND_MASTER_CTRL_DUMMY"
+
+#define HID_SEND_HTML_DIALOG "SW_HID_SEND_HTML_DIALOG"
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_OK"
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL"
+#define HID_SEND_HTML_CTRL_LISTBOX_FILTER "SW_HID_SEND_HTML_CTRL_LISTBOX_FILTER"
+#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_HTML_CTRL_CONTROL_FILEVIEW"
+#define HID_SEND_HTML_CTRL_EDIT_FILEURL "SW_HID_SEND_HTML_CTRL_EDIT_FILEURL"
+#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION"
+#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE"
+#define HID_SEND_HTML_CTRL_DUMMY "SW_HID_SEND_HTML_CTRL_DUMMY"
+
+#define HID_INSERT_IDX_MRK_PHONETIC_READING "SW_HID_INSERT_IDX_MRK_PHONETIC_READING"
+#define HID_COLUMN_VALUESET "SW_HID_COLUMN_VALUESET"
+#define HID_PVIEW_ZOOM_LB "SW_HID_PVIEW_ZOOM_LB"
+#define HID_MAIL_MERGE_SELECT "SW_HID_MAIL_MERGE_SELECT"
+#define HID_MAIL_MERGE_CREATE_FROM "SW_HID_MAIL_MERGE_CREATE_FROM"
+#define HID_MAIL_MERGE_INSERT_FIELDS "SW_HID_MAIL_MERGE_INSERT_FIELDS"
+#define HID_PRINT_AS_MERGE "SW_HID_PRINT_AS_MERGE"
+#define HID_MERGE_SOURCE_UNAVAILABLE "SW_HID_MERGE_SOURCE_UNAVAILABLE"
+#define HID_DATA_SOURCES_UNAVAILABLE "SW_HID_DATA_SOURCES_UNAVAILABLE"
+#define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX"
+#define HID_SECTION_INDENTS_PAGE "SW_HID_SECTION_INDENTS_PAGE"
+
+#define HID_FLD_DROPDOWN "SW_HID_FLD_DROPDOWN"
+#define HID_MM_DOCSELECTPAGE "SW_HID_MM_DOCSELECTPAGE"
+#define HID_MM_OUTPUTTYPEPAGE "SW_HID_MM_OUTPUTTYPEPAGE"
+#define HID_MM_ADDRESSBLOCKPAGE "SW_HID_MM_ADDRESSBLOCKPAGE"
+#define HID_MM_GREETINGSPAGE "SW_HID_MM_GREETINGSPAGE"
+#define HID_MM_PREPAREMERGEPAGE "SW_HID_MM_PREPAREMERGEPAGE"
+#define HID_MM_MERGEPAGE "SW_HID_MM_MERGEPAGE"
+#define HID_MM_OUTPUTPAGE "SW_HID_MM_OUTPUTPAGE"
+#define HID_MM_ADDRESSLISTDIALOG "SW_HID_MM_ADDRESSLISTDIALOG"
+#define HID_MM_SELECTDBTABLEDDIALOG "SW_HID_MM_SELECTDBTABLEDDIALOG"
+#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX "SW_HID_MM_SELECTDBTABLEDDIALOG_LISTBOX"
+#define HID_MM_DBTABLEPREVIEWDIALOG "SW_HID_MM_DBTABLEPREVIEWDIALOG"
+#define HID_MM_CREATEADDRESSLIST "SW_HID_MM_CREATEADDRESSLIST"
+#define HID_MM_FIND_ENTRY "SW_HID_MM_FIND_ENTRY"
+#define HID_MM_ADD_RENAME_ENTRY "SW_HID_MM_ADD_RENAME_ENTRY"
+#define HID_MM_CUSTOMIZE_ADDRESS_LIST "SW_HID_MM_CUSTOMIZE_ADDRESS_LIST"
+#define HID_MM_CUSTOMIZEADDRESSBLOCK "SW_HID_MM_CUSTOMIZEADDRESSBLOCK"
+#define HID_MM_SELECTADDRESSBLOCK "SW_HID_MM_SELECTADDRESSBLOCK"
+#define HID_MM_ASSIGNFIELDS "SW_HID_MM_ASSIGNFIELDS"
+#define HID_MM_MAILNOTINSTALLED "SW_HID_MM_MAILNOTINSTALLED"
+#define HID_MM_LAYOUT_PAGE "SW_HID_MM_LAYOUT_PAGE"
+#define HID_MM_COPYTO "SW_HID_MM_COPYTO"
+#define HID_MM_ADDRESSLIST_HB "SW_HID_MM_ADDRESSLIST_HB"
+#define HID_MM_ADDRESSLIST_TLB "SW_HID_MM_ADDRESSLIST_TLB"
+#define HID_TP_MAILCONFIG "SW_HID_TP_MAILCONFIG"
+#define HID_MM_TESTACCOUNTSETTINGS "SW_HID_MM_TESTACCOUNTSETTINGS"
+#define HID_MM_TESTACCOUNTSETTINGS_TLB "SW_HID_MM_TESTACCOUNTSETTINGS_TLB"
+#define HID_MM_TESTACCOUNTSETTINGS_HB "SW_HID_MM_TESTACCOUNTSETTINGS_HB"
+#define HID_MM_MAILBODY "SW_HID_MM_MAILBODY"
+#define HID_MM_SENDMAILS "SW_HID_MM_SENDMAILS"
+#define HID_MM_SENDMAILS_STATUSLB "SW_HID_MM_SENDMAILS_STATUSLB"
+#define HID_MAILMERGECHILD "SW_HID_MAILMERGECHILD"
+#define HID_MM_CUSTOMFIELDS "SW_HID_MM_CUSTOMFIELDS"
+#define HID_DLG_WORDCOUNT "SW_HID_DLG_WORDCOUNT"
+#define HID_MM_MAILSTATUS_TLB "SW_HID_MM_MAILSTATUS_TLB"
+#define HID_RETURN_TO_MAILMERGE "SW_HID_RETURN_TO_MAILMERGE"
+#define HID_MM_SAVEWARNING "SW_HID_MM_SAVEWARNING"
+#define HID_MM_QUERY "SW_HID_MM_QUERY"
+#define HID_MM_SENDWARNING "SW_HID_MM_SENDWARNING"
+#define HID_MM_SERVERAUTHENTICATION "SW_HID_MM_SERVERAUTHENTICATION"
+
+#define HID_MEDIA_TOOLBOX "SW_HID_MEDIA_TOOLBOX"
+#define HID_NID_TBL "SW_HID_NID_TBL"
+#define HID_NID_FRM "SW_HID_NID_FRM"
+#define HID_NID_GRF "SW_HID_NID_GRF"
+#define HID_NID_OLE "SW_HID_NID_OLE"
+#define HID_NID_PGE "SW_HID_NID_PGE"
+#define HID_NID_OUTL "SW_HID_NID_OUTL"
+#define HID_NID_MARK "SW_HID_NID_MARK"
+#define HID_NID_DRW "SW_HID_NID_DRW"
+#define HID_NID_CTRL "SW_HID_NID_CTRL"
+#define HID_NID_PREV "SW_HID_NID_PREV"
+#define HID_NID_REG "SW_HID_NID_REG"
+#define HID_NID_BKM "SW_HID_NID_BKM"
+#define HID_NID_SEL "SW_HID_NID_SEL"
+#define HID_NID_FTN "SW_HID_NID_FTN"
+#define HID_NID_POSTIT "SW_HID_NID_POSTIT"
+#define HID_NID_SRCH_REP "SW_HID_NID_SRCH_REP"
+#define HID_NID_INDEX_ENTRY "SW_HID_NID_INDEX_ENTRY"
+#define HID_NID_TABLE_FORMULA "SW_HID_NID_TABLE_FORMULA"
+#define HID_NID_TABLE_FORMULA_ERROR "SW_HID_NID_TABLE_FORMULA_ERROR"
+#define HID_NID_NEXT "SW_HID_NID_NEXT"
+#define HID_MM_NEXT_PAGE "SW_HID_MM_NEXT_PAGE"
+#define HID_MM_PREV_PAGE "SW_HID_MM_PREV_PAGE"
+#define HID_MM_GREETINGS_CB_PERSONALIZED "SW_HID_MM_GREETINGS_CB_PERSONALIZED"
+#define HID_MM_GREETINGS_LB_FEMALE "SW_HID_MM_GREETINGS_LB_FEMALE"
+#define HID_MM_GREETINGS_PB_FEMALE "SW_HID_MM_GREETINGS_PB_FEMALE"
+#define HID_MM_GREETINGS_LB_MALE "SW_HID_MM_GREETINGS_LB_MALE"
+#define HID_MM_GREETINGS_PB_MALE "SW_HID_MM_GREETINGS_PB_MALE"
+#define HID_MM_GREETINGS_LB_FEMALECOLUMN "SW_HID_MM_GREETINGS_LB_FEMALECOLUMN"
+#define HID_MM_GREETINGS_CB_FEMALEFIELD "SW_HID_MM_GREETINGS_CB_FEMALEFIELD"
+#define HID_MM_GREETINGS_CB_NEUTRAL "SW_HID_MM_GREETINGS_CB_NEUTRAL"
+#define HID_MM_BODY_CB_PERSONALIZED "SW_HID_MM_BODY_CB_PERSONALIZED"
+#define HID_MM_BODY_LB_FEMALE "SW_HID_MM_BODY_LB_FEMALE"
+#define HID_MM_BODY_PB_FEMALE "SW_HID_MM_BODY_PB_FEMALE"
+#define HID_MM_BODY_LB_MALE "SW_HID_MM_BODY_LB_MALE"
+#define HID_MM_BODY_PB_MALE "SW_HID_MM_BODY_PB_MALE"
+#define HID_MM_BODY_LB_FEMALECOLUMN "SW_HID_MM_BODY_LB_FEMALECOLUMN"
+#define HID_MM_BODY_CB_FEMALEFIELD "SW_HID_MM_BODY_CB_FEMALEFIELD"
+#define HID_MM_BODY_CB_NEUTRAL "SW_HID_MM_BODY_CB_NEUTRAL"
+#define HID_MM_ASSIGN_FIELDS "SW_HID_MM_ASSIGN_FIELDS"
+#define HID_MM_HEADER_0 "SW_HID_MM_HEADER_0"
+#define HID_MM_HEADER_1 "SW_HID_MM_HEADER_1"
+#define HID_MM_HEADER_2 "SW_HID_MM_HEADER_2"
+#define HID_MM_HEADER_3 "SW_HID_MM_HEADER_3"
+#define HID_MM_HEADER_4 "SW_HID_MM_HEADER_4"
+#define HID_MM_HEADER_5 "SW_HID_MM_HEADER_5"
+#define HID_MM_HEADER_6 "SW_HID_MM_HEADER_6"
+#define HID_MM_HEADER_7 "SW_HID_MM_HEADER_7"
+#define HID_MM_HEADER_8 "SW_HID_MM_HEADER_8"
+#define HID_MM_HEADER_9 "SW_HID_MM_HEADER_9"
+#define HID_MM_HEADER_10 "SW_HID_MM_HEADER_10"
+#define HID_MM_HEADER_11 "SW_HID_MM_HEADER_11"
+#define HID_MM_HEADER_12 "SW_HID_MM_HEADER_12"
+#define HID_MM_HEADER_13 "SW_HID_MM_HEADER_13"
+
+#define HID_ITM_HOR_LEFT "SW_HID_ITM_HOR_LEFT"
+#define HID_ITM_HOR_CNTR "SW_HID_ITM_HOR_CNTR"
+#define HID_ITM_HOR_RGHT "SW_HID_ITM_HOR_RGHT"
+#define HID_ITM_VER_LEFT "SW_HID_ITM_VER_LEFT"
+#define HID_ITM_VER_CNTR "SW_HID_ITM_VER_CNTR"
+#define HID_ITM_VER_RGHT "SW_HID_ITM_VER_RGHT"
+
+#define HID_TBX_FORMULA_CALC "SW_HID_TBX_FORMULA_CALC"
+#define HID_TBX_FORMULA_CANCEL "SW_HID_TBX_FORMULA_CANCEL"
+#define HID_TBX_FORMULA_APPLY "SW_HID_TBX_FORMULA_APPLY"
+
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
new file mode 100644
index 000000000000..0a4103688335
--- /dev/null
+++ b/sw/inc/hfspacingitem.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
+{
+public:
+ SwHeaderAndFooterEatSpacingItem( sal_uInt16 nId = RES_HEADER_FOOTER_EAT_SPACING,
+ sal_Bool bPrt = sal_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(sal_Bool bInP) const
+ { return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
+
+inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(sal_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..7b60590db033
--- /dev/null
+++ b/sw/inc/hhcwrp.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <editeng/hangulhanja.hxx>
+#include <pam.hxx>
+
+class SwView;
+class Window;
+class SwWrtShell;
+struct SwConversionArgs;
+
+//////////////////////////////////////////////////////////////////////
+
+class SwHHCWrapper : public editeng::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;
+
+ sal_uInt16 nPageCount; // page count for progress bar
+ sal_uInt16 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 sal_Bool IsDrawObj() { return bIsDrawObj; }
+ inline void SetDrawObj( sal_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..c7aa3638d90a
--- /dev/null
+++ b/sw/inc/hintids.hxx
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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)0x06)
+
+/*
+ * 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 sal_uInt16 nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+inline bool isCHRATR(const sal_uInt16 nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
+}
+inline bool isTXTATR_WITHEND(const sal_uInt16 nWhich)
+{
+ return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
+ && (RES_TXTATR_WITHEND_END > nWhich);
+}
+inline bool isTXTATR_NOEND(const sal_uInt16 nWhich)
+{
+ return (RES_TXTATR_NOEND_BEGIN <= nWhich)
+ && (RES_TXTATR_NOEND_END > nWhich);
+}
+inline bool isTXTATR(const sal_uInt16 nWhich)
+{
+ return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
+}
+inline bool isPARATR(const sal_uInt16 nWhich)
+{
+ return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
+}
+inline bool isPARATR_LIST(const sal_uInt16 nWhich)
+{
+ return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); }
+inline bool isFRMATR(const sal_uInt16 nWhich)
+{
+ return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
+}
+inline bool isGRFATR(const sal_uInt16 nWhich)
+{
+ return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
+}
+inline bool isBOXATR(const sal_uInt16 nWhich)
+{
+ return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
+}
+inline bool isUNKNOWNATR(const sal_uInt16 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( sal_uInt16 nWhich );
+
+SW_DLLPUBLIC sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 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 sal_uInt16 __FAR_DATA aBreakSetRange[];
+// AttrSet-Range fuer die TxtFmtColl
+extern sal_uInt16 __FAR_DATA aTxtFmtCollSetRange[];
+// AttrSet-Range fuer die GrfFmtColl
+extern sal_uInt16 __FAR_DATA aGrfFmtCollSetRange[];
+// AttrSet-Range fuer die TextNode
+SW_DLLPUBLIC extern sal_uInt16 __FAR_DATA aTxtNodeSetRange[];
+// AttrSet-Range fuer die NoTxtNode
+extern sal_uInt16 __FAR_DATA aNoTxtNodeSetRange[];
+// AttrSet-Range fuer die SwTable
+extern sal_uInt16 __FAR_DATA aTableSetRange[];
+// AttrSet-Range fuer die SwTableLine
+extern sal_uInt16 __FAR_DATA aTableLineSetRange[];
+// AttrSet-Range fuer die SwTableBox
+extern sal_uInt16 __FAR_DATA aTableBoxSetRange[];
+// AttrSet-Range fuer die SwFrmFmt
+SW_DLLPUBLIC extern sal_uInt16 __FAR_DATA aFrmFmtSetRange[];
+// AttrSet-Range fuer die SwCharFmt
+extern sal_uInt16 __FAR_DATA aCharFmtSetRange[];
+// AttrSet-Range fuer die character autostyles
+extern sal_uInt16 __FAR_DATA aCharAutoFmtSetRange[];
+// AttrSet-Range fuer die SwPageDescFmt
+extern sal_uInt16 __FAR_DATA aPgFrmFmtSetRange[];
+
+// check if ID is InRange of AttrSet-Ids
+sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
+
+#endif
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
new file mode 100644
index 000000000000..8476d8542f70
--- /dev/null
+++ b/sw/inc/hints.hxx
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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( sal_uInt16 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( sal_uInt16 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 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;
+ sal_uInt16 nWhichAttr;
+ SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 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;
+ sal_uInt16 nSplitLine; // Split: ab dieser BaseLine wird gespl.
+ TableFmlUpdtFlags eFlags;
+ sal_Bool bModified : 1;
+ sal_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
+{
+ sal_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; }
+
+ sal_uInt16 Count() const { return pChgSet->Count(); }
+ void ClearItem( sal_uInt16 nWhichL = 0 )
+#ifndef DBG_UTIL
+ { 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, sal_Bool bOutline = sal_False );
+
+// const SwTxtNodeTable& GetTxtNodeList() const { return aList; }
+//};
+// <--
+
+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( sal_uInt16 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..cf95a232d9df
--- /dev/null
+++ b/sw/inc/htmltbl.hxx
@@ -0,0 +1,491 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <editeng/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.
+ sal_uInt8 nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
+ sal_uInt8 nWidthSet; // Wieoft wurde die Breite gesetzt?
+
+ sal_Bool bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
+
+public:
+
+ SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
+ sal_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( sal_uInt8 nRef ) { nWidthSet = nRef; }
+ sal_Bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==nWidthSet; }
+
+ void SetPass1Done( sal_uInt8 nRef ) { nPass1Done = nRef; }
+ sal_Bool IsPass1Done( sal_uInt8 nRef ) const { return nRef==nPass1Done; }
+
+ sal_Bool HasNoBreakTag() const { return bNoBreakTag; }
+};
+
+/* */
+
+class SwHTMLTableLayoutCell
+{
+ SwHTMLTableLayoutCnts *pContents; // der Inhalt der Zelle
+
+ sal_uInt16 nRowSpan; // ROWSPAN der Zelle
+ sal_uInt16 nColSpan; // COLSPAN der Zelle
+ sal_uInt16 nWidthOption;// angegebene Breite der Zelle in Twip oder %
+
+ sal_Bool bPrcWidthOption : 1;// nWidth ist %-Angabe
+ sal_Bool bNoWrapOption : 1; // NOWRAP-Option
+
+public:
+
+ SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
+ sal_uInt16 nRSpan, sal_uInt16 nCSpan,
+ sal_uInt16 nWidthOpt, sal_Bool bPrcWdthOpt,
+ sal_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( sal_uInt16 nRSpan ) { nRowSpan = nRSpan; }
+ sal_uInt16 GetRowSpan() const { return nRowSpan; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
+
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool IsPrcWidthOption() const { return bPrcWidthOption; }
+
+ sal_Bool HasNoWrapOption() const { return bNoWrapOption; }
+};
+
+/* */
+
+class SwHTMLTableLayoutColumn
+{
+ // Zwischenwerte von AutoLayoutPass1
+ sal_uLong nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
+
+ // Ergebnisse von AutoLayoutPass1
+ sal_uLong nMin, nMax;
+
+ // Ergibnisse von Pass 2
+ sal_uInt16 nAbsColWidth; // in Twips
+ sal_uInt16 nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
+
+ sal_uInt16 nWidthOption; // Optionen von <COL> oder <TD>/<TH>
+
+ sal_Bool bRelWidthOption : 1;
+ sal_Bool bLeftBorder : 1;
+
+public:
+
+ SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, sal_Bool bRelColWidthOpt,
+ sal_Bool bLBorder );
+
+ ~SwHTMLTableLayoutColumn() {}
+
+ inline void MergeCellWidthOption( sal_uInt16 nWidth, sal_Bool bPrc );
+ inline void SetWidthOption( sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest );
+
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool IsRelWidthOption() const { return bRelWidthOption; }
+
+ inline void MergeMinMaxNoAlign( sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin );
+ sal_uLong GetMinNoAlign() const { return nMinNoAlign; }
+ sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; }
+ sal_uLong GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
+ inline void ClearPass1Info( sal_Bool bWidthOpt );
+
+ inline void SetMinMax( sal_uLong nMin, sal_uLong nMax );
+ void SetMax( sal_uLong nVal ) { nMax = nVal; }
+ void AddToMin( sal_uLong nVal ) { nMin += nVal; }
+ void AddToMax( sal_uLong nVal ) { nMax += nVal; }
+ sal_uLong GetMin() const { return nMin; }
+ sal_uLong GetMax() const { return nMax; }
+
+ void SetAbsColWidth( sal_uInt16 nWidth ) { nAbsColWidth = nWidth; }
+ sal_uInt16 GetAbsColWidth() const { return nAbsColWidth; }
+
+ void SetRelColWidth( sal_uInt16 nWidth ) { nRelColWidth = nWidth; }
+ sal_uInt16 GetRelColWidth() const { return nRelColWidth; }
+
+ sal_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)
+
+ sal_uLong nMin; // minimale Breite der Tabelle (Twips)
+ sal_uLong nMax; // maximale Breite der Tabelle (Twips)
+
+ sal_uInt16 nRows; // Anzahl Zeilen
+ sal_uInt16 nCols; // Anzahl Spalten
+
+ sal_uInt16 nLeftMargin; // Abstand zum linken Rand (aus Absatz)
+ sal_uInt16 nRightMargin; // Abstand zum rechten Rand (aus Absatz)
+
+ sal_uInt16 nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
+ sal_uInt16 nInhAbsRightSpace; // der Zellen zugeschlagen wurde
+
+ sal_uInt16 nRelLeftFill; // relative Breiten der Zellen zur
+ sal_uInt16 nRelRightFill; // Ausrichtung von Tabellen in Tabellen
+
+ sal_uInt16 nRelTabWidth; // Die relative Breite der Tabelle
+
+ sal_uInt16 nWidthOption; // die Breite der Tabelle (in Twip oder %)
+ sal_uInt16 nCellPadding; // Abstand zum Inhalt (in Twip)
+ sal_uInt16 nCellSpacing; // Absatnd zwischen Zellen (in Twip)
+ sal_uInt16 nBorder; // Dicke der ausseren Umrandung bzw.
+ // Platz, den Netscape hierfuer einrechnet.
+
+ sal_uInt16 nLeftBorderWidth;
+ sal_uInt16 nRightBorderWidth;
+ sal_uInt16 nInhLeftBorderWidth;
+ sal_uInt16 nInhRightBorderWidth;
+ sal_uInt16 nBorderWidth;
+
+ sal_uInt16 nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
+ sal_uInt16 nLastResizeAbsAvail;
+
+ sal_uInt8 nPass1Done; // Vorgabe-Werte fuer die einzelen
+ sal_uInt8 nWidthSet; // Schleifen-Durchlauefe
+
+ SvxAdjust eTableAdjust; // Die Ausrichtung der Tabelle
+
+ sal_Bool bColsOption : 1; // Tabelle besitzt eine COLS-Option
+ sal_Bool bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
+ sal_Bool bPrcWidthOption : 1; // Breite ist eine %-Angabe
+ sal_Bool bUseRelWidth : 1; // SwTable bekommt relative Breite
+
+ sal_Bool bMustResize : 1; // Tabelle muss in der Breite ang. werden
+ sal_Bool bExportable : 1; // Layout kann zum Export genutzt werden
+ sal_Bool bBordersChanged : 1; // Umrandung wurde geaendert
+ sal_Bool bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
+
+ sal_Bool bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
+ sal_Bool bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
+ sal_Bool bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
+ // werden
+
+// sal_uInt16 GetLeftBorderWidth( sal_uInt16 nCol ) const;
+// sal_uInt16 GetRightBorderWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+
+ void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin,
+ sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ void SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+
+ const SwStartNode *GetAnyBoxStartNode() const;
+ SwFrmFmt *FindFlyFrmFmt() const;
+ const SwDoc *GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); }
+
+ void ClearPass1Info() { nMin = nMax = 0; }
+
+ void _Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
+
+ DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
+
+ static sal_uInt16 GetBrowseWidthByVisArea( const SwDoc& rDoc );
+public:
+
+ SwHTMLTableLayout( const SwTable *pSwTbl,
+ sal_uInt16 nRows, sal_uInt16 nCols, sal_Bool bColsOpt, sal_Bool ColTgs,
+ sal_uInt16 nWidth, sal_Bool bPrcWidth, sal_uInt16 nBorderOpt,
+ sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
+ sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth,
+ sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth,
+ sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth );
+
+ ~SwHTMLTableLayout();
+
+ sal_uInt16 GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ sal_uInt16 GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ inline sal_uInt16 GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+
+ inline void SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight );
+
+
+ void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail,
+ sal_uInt16& rRelAvail ) const;
+
+ void AutoLayoutPass1();
+ void AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
+ sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhSpace );
+ void SetWidths( sal_Bool bCallPass2=sal_False, sal_uInt16 nAbsAvail=0,
+ sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0,
+ sal_uInt16 nAbsRightSpace=0,
+ sal_uInt16 nParentInhSpace=0 );
+
+ inline SwHTMLTableLayoutColumn *GetColumn( sal_uInt16 nCol ) const;
+ inline void SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol );
+
+ inline SwHTMLTableLayoutCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const;
+ inline void SetCell( SwHTMLTableLayoutCell *pCell, sal_uInt16 nRow, sal_uInt16 nCol );
+
+ void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
+ void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
+
+ sal_uLong GetMin() const { return nMin; }
+ sal_uLong GetMax() const { return nMax; }
+ sal_uInt16 GetRelLeftFill() const { return nRelLeftFill; }
+ sal_uInt16 GetRelRightFill() const { return nRelRightFill; }
+
+ inline long GetBrowseWidthMin() const;
+
+ sal_Bool HasColsOption() const { return bColsOption; }
+ sal_Bool HasColTags() const { return bColTags; }
+
+ sal_Bool IsTopTable() const { return pSwTable != 0; }
+
+ void SetMustResize( sal_Bool bSet ) { bMustResize = bSet; }
+ void SetMustNotResize( sal_Bool bSet ) { bMustNotResize = bSet; }
+ void SetMustNotRecalc( sal_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.
+ sal_Bool Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False, sal_Bool bForce=sal_False,
+ sal_uLong nDelay=0 );
+
+ void BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_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 sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
+
+ // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
+ sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
+
+ // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame oder
+ // das statische GetBrowseWidth, wenn kein Layout existiert.
+ sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
+
+ // Fuer Export
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool HasPrcWidthOption() const { return bPrcWidthOption; }
+
+ sal_uInt16 GetCellPadding() const { return nCellPadding; }
+ sal_uInt16 GetCellSpacing() const { return nCellSpacing; }
+ sal_uInt16 GetBorder() const { return nBorder; }
+
+ sal_uInt16 GetRowCount() const { return nRows; }
+ sal_uInt16 GetColCount() const { return nCols; }
+
+ void SetExportable( sal_Bool bSet ) { bExportable = bSet; }
+ sal_Bool IsExportable() const { return bExportable; }
+
+ sal_Bool HaveBordersChanged() const { return bBordersChanged; }
+
+ void SetMayBeInFlyFrame( sal_Bool bSet ) { bMayBeInFlyFrame = bSet; }
+ sal_Bool MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
+};
+
+/* */
+
+inline void SwHTMLTableLayoutCell::SetProtected()
+{
+ nRowSpan = 1;
+ nColSpan = 1;
+
+ pContents = 0;
+}
+
+/* */
+
+inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
+ sal_uLong nCMax, sal_uLong nAbsMin )
+{
+ if( nCMin > nMinNoAlign )
+ nMinNoAlign = nCMin;
+ if( nCMax > nMaxNoAlign )
+ nMaxNoAlign = nCMax;
+ if( nAbsMin > nAbsMinNoAlign )
+ nAbsMinNoAlign = nAbsMin;
+}
+
+inline void SwHTMLTableLayoutColumn::ClearPass1Info( sal_Bool bWidthOpt )
+{
+ nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
+ nMin = nMax = 0;
+ if( bWidthOpt )
+ {
+ nWidthOption = 0;
+ bRelWidthOption = sal_False;
+ }
+}
+
+inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
+ sal_uInt16 nWidth, sal_Bool bRel )
+{
+ if( !nWidthOption ||
+ (bRel==bRelWidthOption && nWidthOption < nWidth) )
+ {
+ nWidthOption = nWidth;
+ bRelWidthOption = bRel;
+ }
+}
+
+inline void SwHTMLTableLayoutColumn::SetMinMax( sal_uLong nMn, sal_uLong nMx )
+{
+ nMin = nMn;
+ nMax = nMx;
+}
+
+/* */
+
+inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol,
+ sal_uInt16 nColSpan ) const
+{
+ sal_uInt16 nSpace = 0;
+ if( nCol==0 )
+ nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsLeftSpace);
+ if( nCol+nColSpan==nCols )
+ nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsRightSpace);
+
+ return nSpace;
+}
+
+inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( sal_uInt16 nCol ) const
+{
+ return aColumns[nCol];
+}
+
+inline void SwHTMLTableLayoutColumn::SetWidthOption(
+ sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest )
+{
+ if( bTest && bRelWidthOption==bRelWidth )
+ {
+ if( nWidth > nWidthOption )
+ nWidthOption = nWidth;
+ }
+ else
+ nWidthOption = nWidth;
+ bRelWidthOption = bRelWidth;
+}
+
+inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol )
+{
+ aColumns[nCol] = pCol;
+}
+
+inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const
+{
+ return aCells[nRow*nCols+nCol];
+}
+
+inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
+ sal_uInt16 nRow, sal_uInt16 nCol )
+{
+ aCells[nRow*nCols+nCol] = pCell;
+}
+
+inline long SwHTMLTableLayout::GetBrowseWidthMin() const
+{
+ return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
+}
+
+void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight )
+{
+ nInhLeftBorderWidth = nLeft;
+ nInhRightBorderWidth = nRight;
+}
+
+
+#endif
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
new file mode 100644
index 000000000000..badc0278b137
--- /dev/null
+++ b/sw/inc/index.hrc
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..fd5ba88b0a69
--- /dev/null
+++ b/sw/inc/index.hxx
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+
+#ifndef DBG_UTIL
+#define INLINE inline
+#else
+#define INLINE
+#endif
+
+class SW_DLLPUBLIC SwIndex
+{
+ friend class SwIndexReg;
+
+#ifdef DBG_UTIL
+ 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:
+ explicit SwIndex(SwIndexReg *const pReg, xub_StrLen const 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 sal_Bool operator<( const SwIndex& ) const;
+ INLINE sal_Bool operator<=( const SwIndex& ) const;
+ INLINE sal_Bool operator>( const SwIndex& ) const;
+ INLINE sal_Bool operator>=( const SwIndex& ) const;
+ sal_Bool operator==( const SwIndex& rSwIndex ) const
+ { return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); }
+
+ sal_Bool operator!=( const SwIndex& rSwIndex ) const
+ { return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); }
+
+ sal_Bool operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
+ sal_Bool operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
+ sal_Bool operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
+ sal_Bool operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
+ sal_Bool operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
+ sal_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();
+
+ sal_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 );
+};
+
+#ifndef DBG_UTIL
+
+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 sal_Bool SwIndex::operator<( const SwIndex& rIndex ) const
+{
+ return nIndex < rIndex.nIndex;
+}
+inline sal_Bool SwIndex::operator<=( const SwIndex& rIndex ) const
+{
+ return nIndex <= rIndex.nIndex;
+}
+inline sal_Bool SwIndex::operator>( const SwIndex& rIndex ) const
+{
+ return nIndex > rIndex.nIndex;
+}
+inline sal_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..4160928ea8ce
--- /dev/null
+++ b/sw/inc/inetfld.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SW_INETFLD_HXX
+#define SW_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;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwINetField( SwINetFieldType* pTyp, sal_uInt16 nFmt,
+ const String& rURL, const String& rText );
+ virtual ~SwINetField();
+
+ virtual String GetFieldName() 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( sal_uInt16 nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
+};
+
+
+#endif // SW_INETFLD_HXX
+
diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx
new file mode 100644
index 000000000000..55f6a1860459
--- /dev/null
+++ b/sw/inc/init.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..66af95e9a28a
--- /dev/null
+++ b/sw/inc/io.hxx
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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();
+ sal_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;
+ }
+
+ sal_Bool Ok();
+};
+
+
+
+#endif
+
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
new file mode 100644
index 000000000000..2fb66559b98d
--- /dev/null
+++ b/sw/inc/iodetect.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ sal_uInt16 nLen;
+
+ inline SwIoDetect( const sal_Char *pN, sal_uInt16 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, sal_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 sal_Bool IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+ const SfxFilter** ppFlt = 0 );
+
+ static sal_Bool IsValidStgFilter( SotStorage& , const SfxFilter& );
+ static sal_Bool IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
+
+ static bool IsDetectableText( const sal_Char* pBuf, sal_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, sal_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..af19caec9252
--- /dev/null
+++ b/sw/inc/istyleaccess.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ISTYLEACCESS_HXX
+#define _ISTYLEACCESS_HXX
+
+#include <vector>
+#include <svl/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..9dfa8c3a43b7
--- /dev/null
+++ b/sw/inc/itabenum.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_uInt16 DEFAULT_BORDER = 0x01;
+ const sal_uInt16 HEADLINE = 0x02;
+// const sal_uInt16 REPEAT = 0x04;
+// const sal_uInt16 HEADLINE_REPEAT = 0x06; // Headline + Repeat
+ const sal_uInt16 SPLIT_LAYOUT = 0x08;
+ const sal_uInt16 HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
+ const sal_uInt16 ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
+}
+
+struct SwInsertTableOptions
+{
+ sal_uInt16 mnInsMode;
+ sal_uInt16 mnRowsToRepeat;
+
+ SwInsertTableOptions( sal_uInt16 nInsMode, sal_uInt16 nRowsToRepeat ) :
+ mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {};
+};
+
+
+#endif
+
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
new file mode 100644
index 000000000000..91f5ac7712de
--- /dev/null
+++ b/sw/inc/lineinfo.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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"
+#include <editeng/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)
+ sal_uInt16 nPosFromLeft; //Position for paint
+ sal_uInt16 nCountBy; //Paint only for every n line
+ sal_uInt16 nDividerCountBy; //Interval for display of an user defined
+ //string every n lines
+ LineNumberPosition ePos; //Where should the display occur (number and divicer)
+ sal_Bool bPaintLineNumbers; //Should anything be displayed?
+ sal_Bool bCountBlankLines; //Count empty lines?
+ sal_Bool bCountInFlys; //Count also within FlyFrames?
+ sal_Bool bRestartEachPage; //Restart counting at the first paragraph of each page
+ //(even on follows when paragraphs are splitted)
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
+public:
+ SwLineNumberInfo();
+ SwLineNumberInfo(const SwLineNumberInfo&);
+
+ SwLineNumberInfo& operator=(const SwLineNumberInfo&);
+ sal_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; }
+ sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; }
+ void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; }
+
+ sal_uInt16 GetPosFromLeft() const { return nPosFromLeft; }
+ void SetPosFromLeft( sal_uInt16 n) { nPosFromLeft = n; }
+
+ sal_uInt16 GetCountBy() const { return nCountBy; }
+ void SetCountBy( sal_uInt16 n) { nCountBy = n; }
+
+ LineNumberPosition GetPos() const { return ePos; }
+ void SetPos( LineNumberPosition eP ){ ePos = eP; }
+
+ sal_Bool IsPaintLineNumbers() const { return bPaintLineNumbers; }
+ void SetPaintLineNumbers( sal_Bool b ){ bPaintLineNumbers = b; }
+
+ sal_Bool IsCountBlankLines() const { return bCountBlankLines; }
+ void SetCountBlankLines( sal_Bool b ) { bCountBlankLines = b; }
+
+ sal_Bool IsCountInFlys() const { return bCountInFlys; }
+ void SetCountInFlys( sal_Bool b ) { bCountInFlys = b; }
+
+ sal_Bool IsRestartEachPage() const { return bRestartEachPage; }
+ void SetRestartEachPage( sal_Bool b ) { bRestartEachPage = b; }
+
+ bool HasCharFormat() const { return GetRegisteredIn() != 0; }
+};
+
+
+
+#endif
+
diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx
new file mode 100644
index 000000000000..08fbb23654b3
--- /dev/null
+++ b/sw/inc/linkenum.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..a080440a55ea
--- /dev/null
+++ b/sw/inc/list.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#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 sal_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..b82ce6424249
--- /dev/null
+++ b/sw/inc/listfunc.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef 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/mdiexp.hxx b/sw/inc/mdiexp.hxx
new file mode 100644
index 000000000000..7a3f27bb0eed
--- /dev/null
+++ b/sw/inc/mdiexp.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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 &, sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+extern sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect &);
+extern void SizeNotify(ViewShell* pVwSh, const Size &);
+
+//Update der Statusleiste, waehrend einer Action.
+extern void PageNumNotify( ViewShell* pVwSh,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 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 ( sal_uInt16 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 ( sal_uInt16 nMessId, SwDocShell *pDocShell );
+void RescheduleProgress( SwDocShell *pDocShell );
+
+void EnableCmdInterface(sal_Bool bEnable = sal_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();
+
+sal_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..59b513965ed9
--- /dev/null
+++ b/sw/inc/modcfg.hxx
@@ -0,0 +1,343 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <tools/wintypes.hxx>
+#include <vcl/field.hxx>
+#include <svl/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
+ sal_uInt16 nMarkAlign; //Revision/LinesChanged/Mark
+ Color aMarkColor; //Revision/LinesChanged/Color
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwRevisionConfig();
+ ~SwRevisionConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ 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();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------11.10.00 09:00--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwTableConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ sal_uInt16 nTblHMove; //int Table/Shift/Row
+ sal_uInt16 nTblVMove; //int Table/Shift/Column
+ sal_uInt16 nTblHInsert; //int Table/Insert/Row
+ sal_uInt16 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();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------18.01.01 16:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwMiscConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ String sWordDelimiter; // Statistics/WordNumber/Delimiter
+ sal_Bool bDefaultFontsInCurrDocOnly; // DefaultFont/Document
+ sal_Bool bShowIndexPreview ; // Index/ShowPreview
+ sal_Bool bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
+ sal_Bool bNumAlignSize; // Numbering/Graphic/KeepRatio
+ sal_Bool bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
+ sal_Bool bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
+ sal_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();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ 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!
+ sal_Bool bHideFieldTips : 1;
+
+public:
+ SwModuleOptions();
+
+ TblChgMode GetTblMode() const { return aTableConfig.eTblChgMode;}
+ void SetTblMode( TblChgMode eSet ) { aTableConfig.eTblChgMode = eSet;
+ aTableConfig.SetModified();}
+
+ sal_uInt16 GetTblHMove() const { return aTableConfig.nTblHMove;}
+ void SetTblHMove( sal_uInt16 nSet ) { aTableConfig.nTblHMove = nSet;
+ aTableConfig.SetModified();}
+
+ sal_uInt16 GetTblVMove() const { return aTableConfig.nTblVMove;}
+ void SetTblVMove( sal_uInt16 nSet ) { aTableConfig.nTblVMove = nSet;
+ aTableConfig.SetModified();}
+
+ sal_uInt16 GetTblHInsert() const {return aTableConfig.nTblHInsert;}
+ void SetTblHInsert( sal_uInt16 nSet ) { aTableConfig.nTblHInsert = nSet;
+ aTableConfig.SetModified();}
+
+ sal_uInt16 GetTblVInsert() const {return aTableConfig.nTblVInsert;}
+ void SetTblVInsert( sal_uInt16 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();}
+
+ sal_uInt16 GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
+ void SetMarkAlignMode(sal_uInt16 nMode) { aRevisionConfig.nMarkAlign = nMode;
+ aRevisionConfig.SetModified();}
+
+ const Color& GetMarkAlignColor() const { return aRevisionConfig.aMarkColor; }
+ void SetMarkAlignColor(const Color &rColor) { aRevisionConfig.aMarkColor = rColor;
+ aRevisionConfig.SetModified();}
+
+ sal_Bool IsInsWithCaption(sal_Bool bHTML) const
+ { return bHTML ? sal_False : aInsertConfig.bInsWithCaption; }
+ void SetInsWithCaption( sal_Bool bHTML, sal_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();
+ }
+ }
+
+ sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblFormatNum : aTableConfig.bInsTblFormatNum; }
+ void SetInsTblFormatNum( sal_Bool bHTML, sal_Bool b )
+ { bHTML ? (aWebTableConfig.bInsTblFormatNum = b) : (aTableConfig.bInsTblFormatNum = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
+
+ sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblChangeNumFormat : aTableConfig.bInsTblChangeNumFormat; }
+ void SetInsTblChangeNumFormat( sal_Bool bHTML, sal_Bool b )
+ { bHTML ? (aWebTableConfig.bInsTblChangeNumFormat = b) : (aTableConfig.bInsTblChangeNumFormat = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
+
+
+ sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblAlignNum : aTableConfig.bInsTblAlignNum; }
+ void SetInsTblAlignNum( sal_Bool bHTML, sal_Bool b )
+ { bHTML ? (aWebTableConfig.bInsTblAlignNum = b) : (aTableConfig.bInsTblAlignNum = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;}
+
+ SwInsertTableOptions GetInsTblFlags(sal_Bool bHTML) const
+ { return bHTML ? aWebInsertConfig.aInsTblOpts : aInsertConfig.aInsTblOpts;}
+ void SetInsTblFlags( sal_Bool bHTML, const SwInsertTableOptions& rOpts ) {
+ bHTML ? (aWebInsertConfig.aInsTblOpts = rOpts) : (aInsertConfig.aInsTblOpts = rOpts);
+ bHTML ? aWebInsertConfig.SetModified() : aInsertConfig.SetModified();}
+
+ const InsCaptionOpt* GetCapOption(sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
+ sal_Bool SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt);
+
+
+ sal_Bool IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
+ void SetGrfToGalleryAsLnk( sal_Bool b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
+ aMiscConfig.SetModified();}
+
+ sal_Int16 GetMailingFormats() const { return aMiscConfig.nMailingFormats;}
+ void SetMailingFormats( sal_Int16 nSet ) { aMiscConfig.nMailingFormats = nSet;
+ aMiscConfig.SetModified();}
+
+ sal_Bool IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
+ void SetSinglePrintJob( sal_Bool b ) { aMiscConfig.bSinglePrintJob = b;
+ aMiscConfig.SetModified();}
+
+ sal_Bool IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
+ void SetNumAlignSize( sal_Bool b ) { aMiscConfig.bNumAlignSize = b;
+ aMiscConfig.SetModified();}
+
+ sal_Bool IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
+ void SetIsNameFromColumn( sal_Bool bSet )
+ {
+ aMiscConfig.SetModified();
+ aMiscConfig.bIsNameFromColumn = bSet;
+ }
+
+ sal_Bool IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
+ void SetAskForMailMerge(sal_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, sal_Bool bFromUI);
+
+ sal_Bool IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
+ void SetShowIndexPreview(sal_Bool bSet)
+ {aMiscConfig.bShowIndexPreview = bSet;
+ aMiscConfig.SetModified();}
+
+ sal_Bool IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
+ void SetDefaultFontInCurrDocOnly(sal_Bool bSet)
+ {
+ aMiscConfig.bDefaultFontsInCurrDocOnly = bSet;
+ aMiscConfig.SetModified();
+ }
+
+ sal_Bool IsHideFieldTips() const {return bHideFieldTips;}
+ void SetHideFieldTips(sal_Bool bSet) {bHideFieldTips = bSet;}
+};
+#endif
+
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
new file mode 100644
index 000000000000..2d97ca9b32fc
--- /dev/null
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..cea112f655a0
--- /dev/null
+++ b/sw/inc/ndarr.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_NDARR_HXX
+#define SW_NDARR_HXX
+
+#include <vector>
+
+#include <boost/utility.hpp>
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+#include <svl/svarray.hxx>
+#include <svtools/embedhlp.hxx>
+
+#include <bparr.hxx>
+#include <ndtyp.hxx>
+
+
+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 SwSectionData;
+class SwSectionFmt;
+class SwTOXBase;
+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 sal_Bool (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
+
+SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 )
+
+class SW_DLLPUBLIC SwNodes
+ : private BigPtrArray
+ , private ::boost::noncopyable
+{
+ 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,
+ sal_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
+
+ sal_Bool bInNodesDel : 1; // falls rekursiv aufgerufen wird
+ // Num/Outline nicht aktualisierem
+ sal_Bool bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
+ sal_Bool bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
+
+ // fuer dier Verwaltung der Indizies
+ void RegisterIndex( SwNodeIndex& rIdx );
+ void DeRegisterIndex( SwNodeIndex& rIdx );
+ void RemoveNode( sal_uLong nDelPos, sal_uLong nLen, sal_Bool bDel );
+
+ // Aktionen auf die Nodes
+ void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
+ void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 );
+
+ void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize,
+ SwNodeIndex& rInsPos, sal_Bool bNewFrms );
+
+ void UpdtOutlineIdx( const SwNode& ); // Update ab Node alle OutlineNodes
+
+ void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
+ sal_Bool bNewFrms = sal_True, sal_Bool bTblInsDummyNode = sal_False ) const;
+ void _DelDummyNodes( const SwNodeRange& rRg );
+
+protected:
+ SwNodes( SwDoc* pDoc );
+
+public:
+ ~SwNodes();
+
+ typedef ::std::vector<SwNodeRange> NodeRanges_t;
+ typedef ::std::vector<NodeRanges_t> TableRanges_t;
+
+ SwNodePtr operator[]( sal_uLong n ) const
+ { return (SwNodePtr)BigPtrArray::operator[] ( n ); }
+
+ sal_uLong Count() const { return BigPtrArray::Count(); }
+ void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ {
+ BigPtrArray::ForEach( 0, BigPtrArray::Count(),
+ (FnForEach) fnForEach, pArgs );
+ }
+ void ForEach( sal_uLong nStt, sal_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) !
+ sal_Bool IsDocNodes() const;
+
+ sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex) const;
+ void Delete(const SwNodeIndex &rPos, sal_uLong nNodes = 1);
+
+ sal_Bool _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
+ sal_Bool bNewFrms = sal_True );
+ void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes );
+
+ void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
+ sal_Bool bNewFrms = sal_True ) const
+ { _CopyNodes( rRg, rInsPos, bNewFrms ); }
+
+ void SectionUp( SwNodeRange *);
+ void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode );
+
+ sal_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 sal_False ==> GoNext/GoPrevious!!!)
+ SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = sal_True,
+ int bSkipProtect = sal_True ) const;
+ SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = sal_True,
+ int bSkipProtect = sal_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,
+ sal_Bool bDelayed = sal_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&, sal_uInt8 nOldLevel, sal_uInt8 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,
+ sal_uInt16 nBoxes, SwTxtFmtColl* pCntntTxtColl,
+ sal_uInt16 nLines = 0, sal_uInt16 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 );
+
+ SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange);
+
+ //create a table from a vector of NodeRanges - API support
+ SwTableNode* TextToTable( const TableRanges_t& rTableNodes,
+ SwTableFmt* pTblFmt,
+ SwTableLineFmt* pLineFmt,
+ SwTableBoxFmt* pBoxFmt,
+ SwTxtFmtColl* pTxtColl
+ /*, SwUndo... pUndo*/ );
+
+ // erzeuge aus der Tabelle wieder normalen Text
+ sal_Bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+ SwUndoTblToTxt* = 0 );
+ // steht im untbl.cxx und darf nur vom Undoobject gerufen werden
+ SwTableNode* UndoTableToText( sal_uLong nStt, sal_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 !
+ sal_Bool InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
+ // Formate fuer den TextNode der Box
+ SwTxtFmtColl*, const SfxItemSet* pAutoAttr,
+ sal_uInt16 nInsPos, sal_uInt16 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 sal_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, sal_Bool bAfter = sal_True,
+ sal_Bool bCalcNewSize = sal_False );
+ // fuegt 2 Tabellen, die hintereinander stehen, wieder zusammen
+ sal_Bool MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev = sal_True,
+ sal_uInt16 nMode = 0, SwHistory* pHistory = 0 );
+
+ // fuege eine neue SwSection ein
+ SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
+ SwSectionFmt& rSectionFmt,
+ SwSectionData const&,
+ SwTOXBase const*const pTOXBase,
+ SwNodeIndex const*const pEnde,
+ bool const bInsAtStart = true,
+ bool const 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#
+};
+
+#endif
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
new file mode 100644
index 000000000000..fb1c1d4c8c33
--- /dev/null
+++ b/sw/inc/ndgrf.hxx
@@ -0,0 +1,257 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svtools/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.
+ sal_Bool bTransparentFlagValid :1;
+ sal_Bool bInSwapIn :1;
+
+ sal_Bool bGrafikArrived :1;
+ sal_Bool bChgTwipSize :1;
+ sal_Bool bChgTwipSizeFromPixel :1;
+ sal_Bool bLoadLowResGrf :1;
+ sal_Bool bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
+ //SwapIn zu verhindern.
+ sal_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 );
+ sal_Bool ImportGraphic( SvStream& rStrm );
+ sal_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 );
+
+ sal_Bool IsTransparent() const;
+
+ inline sal_Bool IsAnimated() const { return aGrfObj.IsAnimated(); }
+
+ inline sal_Bool IsChgTwipSize() const { return bChgTwipSize; }
+ inline sal_Bool IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
+ inline void SetChgTwipSize( sal_Bool b, sal_Bool bFromPx=sal_False ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
+
+ inline sal_Bool IsGrafikArrived() const { return bGrafikArrived; }
+ inline void SetGrafikArrived( sal_Bool b ) { bGrafikArrived = b; }
+
+ inline sal_Bool IsFrameInPaint() const { return bFrameInPaint; }
+ inline void SetFrameInPaint( sal_Bool b ) { bFrameInPaint = b; }
+
+ inline sal_Bool IsScaleImageMap() const { return bScaleImageMap; }
+ inline void SetScaleImageMap( sal_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.
+ sal_Bool ReRead( const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const GraphicObject* pGrfObj = 0,
+ sal_Bool bModify = sal_True );
+ // Laden der Grafik unmittelbar vor der Anzeige
+ short SwapIn( sal_Bool bWaitForData = sal_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?
+ sal_Bool IsSelected() const;
+#endif
+
+ // Der Grafik sagen, dass sich der Node im Undobereich befindet
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ // Abfrage der Link-Daten
+ sal_Bool IsGrfLink() const { return refLink.Is(); }
+ inline sal_Bool IsLinkedFile() const;
+ inline sal_Bool IsLinkedDDE() const;
+ ::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
+ sal_Bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+ void ReleaseLink();
+
+ // 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 sal_Bool SwGrfNode::IsLinkedFile() const
+{
+ return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
+}
+inline sal_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..d549368d90f2
--- /dev/null
+++ b/sw/inc/ndhints.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svarray.hxx>
+#include <tools/mempool.hxx>
+
+#include "swtypes.hxx"
+
+
+class SwTxtNode;
+class SwRegHistory; // steht im RolBck.hxx
+class SwTxtAttr;
+class SwTxtAttrNesting;
+
+class SfxPoolItem;
+class SfxItemSet;
+class SwDoc;
+
+typedef enum {
+ COPY = true,
+ NEW = false,
+} CopyOrNew_t;
+
+// if COPY then pTxtNode must be given!
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew,
+ xub_StrLen const nStt, xub_StrLen const nEnd,
+ CopyOrNew_t const bIsCopy = NEW, SwTxtNode *const pTxtNode = 0);
+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 sal_uInt16 nPosInStart );
+ bool Resort();
+ SwTxtAttr * Cut( const sal_uInt16 nPosInStart );
+
+ inline const SwTxtAttr * GetStart( const sal_uInt16 nPos ) const
+ { return m_HintStarts[nPos]; }
+ inline const SwTxtAttr * GetEnd ( const sal_uInt16 nPos ) const
+ { return m_HintEnds [nPos]; }
+ inline SwTxtAttr * GetStart( const sal_uInt16 nPos )
+ { return m_HintStarts[nPos]; }
+ inline SwTxtAttr * GetEnd ( const sal_uInt16 nPos )
+ { return m_HintEnds [nPos]; }
+
+ inline sal_uInt16 GetEndCount() const { return m_HintEnds .Count(); }
+ inline sal_uInt16 GetStartCount() const { return m_HintStarts.Count(); }
+
+ inline sal_uInt16 GetStartOf( const SwTxtAttr *pHt ) const;
+ inline sal_uInt16 GetPos( const SwTxtAttr *pHt ) const
+ { return m_HintStarts.GetPos( pHt ); }
+
+ inline SwTxtAttr * GetTextHint( const sal_uInt16 nIdx )
+ { return GetStart(nIdx); }
+ inline const SwTxtAttr * operator[]( const sal_uInt16 nIdx ) const
+ { return m_HintStarts[nIdx]; }
+ inline sal_uInt16 Count() const { return m_HintStarts.Count(); }
+
+#ifdef DBG_UTIL
+ 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 sal_uInt16 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 sal_uInt16 SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
+{
+ sal_uInt16 nPos;
+ if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) )
+ {
+ nPos = USHRT_MAX;
+ }
+ return nPos;
+}
+
+inline SwTxtAttr *SwpHintsArray::Cut( const sal_uInt16 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..695560bf7878
--- /dev/null
+++ b/sw/inc/ndindex.hxx
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_NDINDEX_HXX
+#define SW_NDINDEX_HXX
+
+#include <limits.h>
+
+#include <tools/solar.h>
+
+#include <node.hxx>
+
+
+class SwNode;
+class SwNodes;
+
+class SW_DLLPUBLIC SwNodeIndex
+{
+ friend void SwNodes::RegisterIndex( SwNodeIndex& );
+ friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
+ friend void SwNodes::RemoveNode( sal_uLong, sal_uLong, sal_Bool );
+
+#ifdef DBG_UTIL
+ static int nSerial;
+ int MySerial;
+#endif
+
+ SwNode* pNd;
+ SwNodeIndex *pNext, *pPrev;
+
+ void Remove(); // Ausketten
+
+ // diese sind nicht erlaubt!
+ SwNodeIndex( SwNodes& rNds, sal_uInt16 nIdx );
+ SwNodeIndex( SwNodes& rNds, int nIdx );
+
+public:
+ SwNodeIndex( SwNodes& rNds, sal_uLong nIdx = 0 );
+ SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
+ SwNodeIndex( const SwNode&, long nDiff = 0 );
+ ~SwNodeIndex() { Remove(); }
+
+ inline sal_uLong operator++();
+ inline sal_uLong operator--();
+#ifndef CFRONT
+ inline sal_uLong operator++(int);
+ inline sal_uLong operator--(int);
+#endif
+
+ inline sal_uLong operator+=( sal_uLong );
+ inline sal_uLong operator-=( sal_uLong );
+ inline sal_uLong operator+=( const SwNodeIndex& );
+ inline sal_uLong operator-=( const SwNodeIndex& );
+
+ inline sal_Bool operator< ( const SwNodeIndex& ) const;
+ inline sal_Bool operator<=( const SwNodeIndex& ) const;
+ inline sal_Bool operator> ( const SwNodeIndex& ) const;
+ inline sal_Bool operator>=( const SwNodeIndex& ) const;
+ inline sal_Bool operator==( const SwNodeIndex& ) const;
+ inline sal_Bool operator!=( const SwNodeIndex& ) const;
+
+ inline sal_Bool operator< ( sal_uLong nWert ) const;
+ inline sal_Bool operator<=( sal_uLong nWert ) const;
+ inline sal_Bool operator> ( sal_uLong nWert ) const;
+ inline sal_Bool operator>=( sal_uLong nWert ) const;
+ inline sal_Bool operator==( sal_uLong nWert ) const;
+ inline sal_Bool operator!=( sal_uLong nWert ) const;
+
+ inline SwNodeIndex& operator=( sal_uLong );
+ SwNodeIndex& operator=( const SwNodeIndex& );
+ SwNodeIndex& operator=( const SwNode& );
+
+ // gebe den Wert vom Index als sal_uLong zurueck
+ inline sal_uLong GetIndex() const;
+
+ // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
+ SwNodeIndex& Assign( SwNodes& rNds, sal_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, sal_uLong nSttIdx = 0, sal_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 sal_uLong SwNodeIndex::GetIndex() const
+{
+ return pNd->GetIndex();
+}
+inline const SwNodes& SwNodeIndex::GetNodes() const
+{
+ return pNd->GetNodes();
+}
+inline SwNodes& SwNodeIndex::GetNodes()
+{
+ return pNd->GetNodes();
+}
+inline sal_Bool SwNodeIndex::operator< ( sal_uLong nWert ) const
+{
+ return pNd->GetIndex() < nWert;
+}
+inline sal_Bool SwNodeIndex::operator<=( sal_uLong nWert ) const
+{
+ return pNd->GetIndex() <= nWert;
+}
+inline sal_Bool SwNodeIndex::operator> ( sal_uLong nWert ) const
+{
+ return pNd->GetIndex() > nWert;
+}
+inline sal_Bool SwNodeIndex::operator>=( sal_uLong nWert ) const
+{
+ return pNd->GetIndex() >= nWert;
+}
+inline sal_Bool SwNodeIndex::operator==( sal_uLong nWert ) const
+{
+ return pNd->GetIndex() == nWert;
+}
+inline sal_Bool SwNodeIndex::operator!=( sal_uLong nWert ) const
+{
+ return pNd->GetIndex() != nWert;
+}
+inline sal_Bool SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() < rIndex.GetIndex();
+}
+inline sal_Bool SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() <= rIndex.GetIndex();
+}
+inline sal_Bool SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() > rIndex.GetIndex();
+}
+inline sal_Bool SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() >= rIndex.GetIndex();
+}
+inline sal_Bool SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
+{
+ return pNd == rIdx.pNd;
+}
+inline sal_Bool SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
+{
+ return pNd != rIdx.pNd;
+}
+
+inline sal_uLong SwNodeIndex::operator++()
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex();
+}
+inline sal_uLong SwNodeIndex::operator--()
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
+}
+#ifndef CFRONT
+inline sal_uLong SwNodeIndex::operator++(int)
+{
+ sal_uLong nOldIndex = pNd->GetIndex();
+ pNd = GetNodes()[ nOldIndex + 1 ];
+ return nOldIndex;
+}
+inline sal_uLong SwNodeIndex::operator--(int)
+{
+ sal_uLong nOldIndex = pNd->GetIndex();
+ pNd = GetNodes()[ nOldIndex - 1 ];
+ return nOldIndex;
+}
+#endif
+
+inline sal_uLong SwNodeIndex::operator+=( sal_uLong nWert )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex();
+}
+inline sal_uLong SwNodeIndex::operator-=( sal_uLong nWert )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex();
+}
+inline sal_uLong SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex();
+}
+inline sal_uLong SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex();
+}
+
+inline SwNodeIndex& SwNodeIndex::operator=( sal_uLong nWert )
+{
+ pNd = GetNodes()[ nWert ];
+ return *this;
+}
+
+#endif
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
new file mode 100644
index 000000000000..5aab4f9a5708
--- /dev/null
+++ b/sw/inc/ndnotxt.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+ sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
+ sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's
+ // prefered map mode, but either
+ // MM100 or or pixel
+ sal_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 sal_uInt8 nNdType,
+ SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
+
+public:
+ ~SwNoTxtNode();
+
+ virtual SwCntntFrm *MakeFrm( SwFrm* );
+
+ inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
+
+ virtual Size GetTwipSize() const = 0;
+
+ virtual sal_Bool SavePersistentData();
+ virtual sal_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,
+ sal_Bool bAutomatic = sal_False );
+ const PolyPolygon *HasContour() const;
+ sal_Bool _HasContour() const { return pContour!=0; };
+ void GetContour( PolyPolygon &rPoly ) const;
+ void CreateContour();
+
+ void SetAutomaticContour( sal_Bool bSet ) { bAutomaticContour = bSet; }
+ sal_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 sal_False if no contour is set.
+ sal_Bool GetContourAPI( PolyPolygon &rPoly ) const;
+
+ void SetPixelContour( sal_Bool bSet ) { bPixelContour = bSet; }
+ sal_Bool IsPixelContour() const;
+
+ sal_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..0199d2e399bb
--- /dev/null
+++ b/sw/inc/ndole.hxx
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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();
+
+ sal_Bool UnloadObject();
+ static sal_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
+ const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
+ svt::EmbeddedObjectRef& GetObject();
+ const String& GetCurrentPersistName() const { return aName; }
+ sal_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
+ sal_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 sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
+
+ sal_Bool IsInGlobalDocSection() const;
+ sal_Bool IsOLEObjectDeleted() const;
+
+ sal_Bool IsOLESizeInvalid() const { return bOLESizeInvalid; }
+ void SetOLESizeInvalid( sal_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..26dbd29870b4
--- /dev/null
+++ b/sw/inc/ndtxt.hxx
@@ -0,0 +1,914 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_NDTXT_HXX
+#define SW_NDTXT_HXX
+
+#include <cppuhelper/weakref.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 SfxHint;
+class SwNumRule;
+class SwNodeNum;
+class SwList;
+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;
+ }
+ namespace text { class XTextContent; }
+} } }
+
+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;
+
+ // sal_uInt8 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;
+ // <--
+ /// #i111677# cached expansion (for clipboard)
+ ::std::auto_ptr< ::rtl::OUString > m_pNumStringCache;
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextContent> m_wXParagraph;
+
+ 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&, sal_Bool bNext = sal_True,
+ sal_Bool bChgFollow = sal_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, sal_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(sal_Bool bInParent = sal_True) const;
+
+ SW_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId );
+
+ //
+ // Start: Data collected during idle time
+ //
+ SW_DLLPRIVATE void SetParaNumberOfWords( sal_uLong nTmpWords ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfWords() const;
+ SW_DLLPRIVATE void SetParaNumberOfChars( sal_uLong nTmpChars ) const;
+ SW_DLLPRIVATE sal_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();
+
+ SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet);
+
+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
+ //
+protected:
+ // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
+
+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( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs,
+ OutputDevice* pOut = 0 ) const;
+
+ // --> OD 2008-03-13 #refactorlists#
+ // overriding to handle change of certain paragraph attributes
+ virtual sal_Bool SetAttr( const SfxPoolItem& );
+ virtual sal_Bool SetAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
+ virtual sal_uInt16 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, sal_uInt16 nWhich = 0,
+ const SfxItemSet* pSet = 0, sal_Bool bInclRefToxMark = sal_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)
+ sal_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> == sal_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> == sal_False,
+ // corresponding node has not its own indent attributes and the
+ // position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT.
+ sal_Bool GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_Bool bOnlyTxtAttr = sal_False,
+ sal_Bool bGetFromChrFmt = sal_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 sal_uInt16 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( SwFrm* );
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+ virtual SwCntntNode *JoinNext();
+ virtual SwCntntNode *JoinPrev();
+
+ SwCntntNode *AppendNode( const SwPosition & );
+
+ // setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
+ sal_Bool DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
+ sal_Bool bFmtToTxtAttributes = sal_True );
+
+ enum GetTxtAttrMode {
+ DEFAULT, /// DEFAULT: (Start < nIndex <= End)
+ EXPAND, /// EXPAND : (Start <= nIndex < End)
+ PARENT, /// PARENT : (Start < nIndex < End)
+ };
+
+ /** get the innermost text attribute covering position nIndex.
+ @param nWhich only attribute with this id is returned.
+ @param eMode the predicate for matching (@see GetTxtAttrMode).
+
+ ATTENTION: this function is not well-defined for those
+ hints of which several may cover a single position, like
+ RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK
+ */
+ SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode = DEFAULT) const;
+
+ /** get the innermost text attributes covering position nIndex.
+ @param nWhich only attributes with this id are returned.
+ @param eMode the predicate for matching (@see GetTxtAttrMode).
+ */
+ ::std::vector<SwTxtAttr *> GetTxtAttrsAt(xub_StrLen const nIndex,
+ RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode = DEFAULT) 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;
+ sal_uInt16 Spell(SwSpellArgs*);
+ sal_uInt16 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(sal_Bool bInParent = sal_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 sal_True this text node may be numbered
+ @retval sal_False else
+ */
+ //sal_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( sal_Bool bTxtLeft = sal_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 sal_True this node has SwNodeNum and has numbering rule
+ @retval sal_False else
+ */
+ sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
+
+ // --> OD 2010-01-05 #b6884103#
+ SwTwips GetAdditionalIndentForStartingNewList() 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 sal_True This text node has a number.
+ @retval sal_False else
+ */
+ sal_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 sal_True This text node has a bullet.
+ @retval sal_False else
+ */
+ sal_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 sal_True even if the SwNumFmt has type
+ SVX_NUM_NUMBER_NONE.
+
+ @retval sal_True This node is numbered.
+ @retval sal_False else
+ */
+ sal_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
+ */
+ sal_uInt16 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 sal_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;
+
+ sal_uInt16 GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
+ sal_uInt16 nScript = 0 ) const;
+
+ // steht in ndcopy.cxx
+ sal_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
+ sal_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;
+ // <--
+ sal_Bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
+ xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
+ sal_Bool bWithNum = sal_False, sal_Bool bWithFtn = sal_True,
+ sal_Bool bReplaceTabsWithSpaces = sal_False ) const;
+
+ /*
+ *
+ */
+ const ModelToViewHelper::ConversionMap*
+ BuildConversionMap( rtl::OUString& rExpandText ) const;
+
+ XubString GetRedlineTxt( xub_StrLen nIdx = 0,
+ xub_StrLen nLen = STRING_LEN,
+ sal_Bool bExpandFlds = sal_False,
+ sal_Bool bWithNum = sal_False ) const;
+ //Liefert fuer die Initalfunktion tatsaechliche Anzahl der Initialzeichen
+ //bei nWishLen == 0 die des ersten Wortes
+ sal_uInt16 GetDropLen( sal_uInt16 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
+
+ // 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;
+
+ sal_uInt16 GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextContent> const& GetXParagraph() const
+ { return m_wXParagraph; }
+ SW_DLLPRIVATE void SetXParagraph(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent> const& xParagraph)
+ { m_wXParagraph = xParagraph; }
+
+ // 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..6fb429980703
--- /dev/null
+++ b/sw/inc/ndtyp.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _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 sal_uInt8 ND_ENDNODE = 0x01;
+const sal_uInt8 ND_STARTNODE = 0x02;
+const sal_uInt8 ND_TABLENODE = 0x06;
+const sal_uInt8 ND_TEXTNODE = 0x08;
+const sal_uInt8 ND_GRFNODE = 0x10;
+const sal_uInt8 ND_OLENODE = 0x20;
+
+const sal_uInt8 ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
+const sal_uInt8 ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
+
+const sal_uInt8 ND_SECTIONNODE = 0x42;
+// nur fuer internen Gebrauch!!
+const sal_uInt8 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 sal_uInt8 ND_HAS_PREV_LAYNODE = 0x01;
+const sal_uInt8 ND_HAS_NEXT_LAYNODE = 0x02;
+
+
+
+#endif
diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx
new file mode 100644
index 000000000000..574dc3f9167a
--- /dev/null
+++ b/sw/inc/newhdl.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 );
+
+ sal_Bool TryWarnMem();
+
+ sal_Bool Flush_WarnMem();
+ sal_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..4ff69260b044
--- /dev/null
+++ b/sw/inc/node.hxx
@@ -0,0 +1,768 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_HXX
+#define SW_NODE_HXX
+
+#include <vector>
+
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <tools/mempool.hxx>
+#include <tools/gen.hxx>
+
+#include "swdllapi.h"
+#include <ndarr.hxx>
+#include <ndtyp.hxx>
+#include <index.hxx>
+#include <fmtcol.hxx>
+
+// ---------------------
+// 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 SwTOXBase;
+class SwSectionNode;
+class SwStartNode;
+class SwTabFrm;
+class SwRootFrm;
+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;
+class IDocumentListItems;
+class SwOLENodes;
+
+// --------------------
+// class SwNode
+// --------------------
+class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
+{
+ friend class SwNodes;
+
+#ifdef DBG_UTIL
+ static long nSerial;
+ long nMySerial;
+#endif
+
+ sal_uInt8 nNodeType;
+
+ // JP 28.03.96
+ // fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
+ // gelandet, weil noch Bits frei sind
+ sal_uInt8 nAFmtNumLvl : 3;
+ sal_Bool bSetNumLSpace : 1; // fuer Numerierung: sal_True Einzug setzen
+ sal_Bool bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
+
+protected:
+ SwStartNode* pStartOfSection;
+
+ SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId );
+
+ // fuer den initialen StartNode
+ SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId );
+
+public:
+ virtual ~SwNode();
+
+#ifdef DBG_UTIL
+ long int GetSerial() const { return nMySerial; }
+#endif
+
+ sal_uInt16 GetSectionLevel() const;
+
+ inline sal_uLong StartOfSectionIndex() const;
+ inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; }
+ inline SwStartNode* StartOfSectionNode() { return pStartOfSection; }
+
+ inline sal_uLong EndOfSectionIndex() const;
+ inline const SwEndNode* EndOfSectionNode() const;
+ inline SwEndNode* EndOfSectionNode();
+
+ inline sal_uInt8 GetAutoFmtLvl() const { return nAFmtNumLvl; }
+ inline void SetAutoFmtLvl( sal_uInt8 nVal ) { nAFmtNumLvl = nVal; }
+
+ inline sal_Bool IsSetNumLSpace() const { return bSetNumLSpace; }
+ inline void SetNumLSpace( sal_Bool bFlag ) { bSetNumLSpace = bFlag; }
+
+ inline sal_Bool IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
+ inline void SetIgnoreDontExpand( sal_Bool bNew ) { bIgnoreDontExpand = bNew; }
+
+ sal_uInt8 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 sal_Bool IsStartNode() const;
+ inline sal_Bool IsCntntNode() const;
+ inline sal_Bool IsEndNode() const;
+ inline sal_Bool IsTxtNode() const;
+ inline sal_Bool IsTableNode() const;
+ inline sal_Bool IsSectionNode() const;
+ inline sal_Bool IsOLENode() const;
+ inline sal_Bool IsNoTxtNode() const;
+ inline sal_Bool IsGrfNode() const;
+
+ /**
+ Checks if this node is in redlines.
+
+ @retval sal_True this node is in redlines
+ @retval sal_False else
+ */
+ sal_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 ?
+ sal_Bool IsInVisibleArea( ViewShell* pSh = 0 ) const;
+ // befindet sich der Node in einem geschuetzten Bereich?
+ sal_Bool IsInProtectSect() const;
+ // befindet sich der Node in irgendetwas geschuetzten ?
+ // (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
+ // Rahmen/Fussnoten/..)
+ sal_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( sal_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 sal_uLong GetIndex() const { return GetPos(); }
+
+ const SwTxtNode* FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const;
+
+ sal_uInt8 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, sal_uLong nPos );
+
+protected:
+ SwStartNode( const SwNodeIndex &rWhere,
+ const sal_uInt8 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, sal_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 sal_uInt8 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):
+ sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ // MakeFrm will be called for a certain layout
+ // pSib is another SwFrm of the same layout (e.g. the SwRootFrm itself, a sibling, the parent)
+ virtual SwCntntFrm *MakeFrm( SwFrm* pSib ) = 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() ); }
+
+ sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
+ sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
+
+ // Replacement for good old GetFrm(..):
+ SwCntntFrm *getLayoutFrm( const SwRootFrm*,
+ const Point* pDocPos = 0,
+ const SwPosition *pPos = 0,
+ const sal_Bool bCalcFrm = sal_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 sal_Bool bPrtArea = sal_False,
+ const Point* pPoint = 0,
+ const sal_Bool bCalcFrm = sal_False ) const;
+ SwRect FindPageFrmRect( const sal_Bool bPrtArea = sal_False,
+ const Point* pPoint = 0,
+ const sal_Bool bCalcFrm = sal_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 sal_Bool GetInfo( SfxPoolItem& ) const;
+
+ // SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
+
+ // Ist bInParent sal_False, wird nur in diesem Node nach dem Attribut gesucht.
+ const SfxPoolItem& GetAttr( sal_uInt16 nWhich, sal_Bool bInParent=sal_True ) const;
+ sal_Bool GetAttr( SfxItemSet& rSet, sal_Bool bInParent=sal_True ) const;
+ // --> OD 2008-03-13 #refactorlists#
+ // made virtual
+ virtual sal_Bool SetAttr( const SfxPoolItem& );
+ virtual sal_Bool SetAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
+ virtual sal_uInt16 ResetAllAttr();
+ // <--
+
+ // liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
+ const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, sal_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 sal_Bool HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; }
+
+ virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
+ SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
+
+//FEATURE::CONDCOLL
+ inline SwFmtColl& GetAnyFmtColl() const;
+ void SetCondFmtColl( SwFmtColl* );
+ inline SwFmtColl* GetCondFmtColl() const;
+
+ sal_Bool IsAnyCondition( SwCollCondition& rTmp ) const;
+ void ChkCondColl();
+//FEATURE::CONDCOLL
+
+ // invalidiert die am Node gesetzte NumRule. Diese wird
+ // spaetestend in EndAction einer Shell geupdatet
+ sal_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; }
+
+ static SwOLENodes* CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize );
+
+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( SwFrm* );
+
+ //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* , sal_Bool bNewFrames=sal_True );
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwTableNode( const SwTableNode & rNode );
+ SwTableNode & operator= ( const SwTableNode & rNode );
+};
+
+
+//---------
+// SwSectionNode
+//---------
+class SwSectionNode
+ : public SwStartNode
+ , private ::boost::noncopyable
+{
+ friend class SwNodes;
+
+private:
+ ::std::auto_ptr<SwSection> const m_pSection;
+
+protected:
+ virtual ~SwSectionNode();
+
+public:
+ SwSectionNode(SwNodeIndex const&,
+ SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase);
+
+ const SwSection& GetSection() const { return *m_pSection; }
+ SwSection& GetSection() { return *m_pSection; }
+
+ SwFrm *MakeFrm( SwFrm* );
+
+ //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
+ sal_Bool IsCntntHidden() const;
+
+};
+
+
+
+// ---------------------- 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 sal_Bool SwNode::IsStartNode() const
+{
+ return ND_STARTNODE & nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsCntntNode() const
+{
+ return ND_CONTENTNODE & nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsEndNode() const
+{
+ return ND_ENDNODE == nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsTxtNode() const
+{
+ return ND_TEXTNODE == nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsTableNode() const
+{
+ return ND_TABLENODE == nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsSectionNode() const
+{
+ return ND_SECTIONNODE == nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsNoTxtNode() const
+{
+ return ND_NOTXTNODE & nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsOLENode() const
+{
+ return ND_OLENODE == nNodeType ? sal_True : sal_False;
+}
+inline sal_Bool SwNode::IsGrfNode() const
+{
+ return ND_GRFNODE == nNodeType ? sal_True : sal_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 sal_uLong SwNode::StartOfSectionIndex() const
+{
+ return pStartOfSection->GetIndex();
+}
+inline sal_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( sal_uInt16 nWhich,
+ sal_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..ba8f0d5f22b8
--- /dev/null
+++ b/sw/inc/numrule.hxx
@@ -0,0 +1,368 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <editeng/svxenum.hxx>
+#include <editeng/numitem.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <errhdl.hxx>
+#include <error.h>
+#include <hints.hxx>
+#include <hash_map>
+#include <stringhash.hxx>
+#include <SwNumberTreeTypes.hxx>
+#include <vector>
+
+class SwTxtFmtColl;
+class IDocumentListsAccess;
+class SwNodeNum;
+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 !=;
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
+public:
+ SwNumFmt();
+ SwNumFmt( const SwNumFmt& );
+ SwNumFmt( const SvxNumberFormat&, SwDoc* pDoc);
+
+ virtual ~SwNumFmt();
+
+ SwNumFmt& operator=( const SwNumFmt& );
+
+ sal_Bool operator==( const SwNumFmt& ) const;
+ sal_Bool operator!=( const SwNumFmt& r ) const { return !(*this == r); }
+
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+ void SetCharFmt( SwCharFmt* );
+ void ForgetCharFmt();
+
+ 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;
+
+ sal_Bool IsEnumeration() const; // #i22362#
+ sal_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();
+
+#ifdef DBG_UTIL
+ long int nSerial;
+ static long int nInstances;
+#endif
+
+ static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
+ static sal_uInt16 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 sal_uInt16 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;
+ sal_uInt16 nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
+ sal_uInt16 nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ sal_uInt8 nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ sal_Bool bAutoRuleFlag : 1;
+ sal_Bool bInvalidRuleFlag : 1;
+ sal_Bool bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
+ sal_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;
+ // <--
+
+public:
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // add parameter <eDefaultNumberFormatPositionAndSpaceMode>
+ SwNumRule( const String& rNm,
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
+ SwNumRuleType = NUM_RULE,
+ sal_Bool bAutoFlg = sal_True );
+
+ SwNumRule( const SwNumRule& );
+ ~SwNumRule();
+
+ SwNumRule& operator=( const SwNumRule& );
+ sal_Bool operator==( const SwNumRule& ) const;
+ sal_Bool operator!=( const SwNumRule& r ) const { return !(*this == r); }
+
+ const SwNumFmt* GetNumFmt( sal_uInt16 i ) const;
+ const SwNumFmt& Get( sal_uInt16 i ) const;
+
+ void Set( sal_uInt16 i, const SwNumFmt* );
+ void Set( sal_uInt16 i, const SwNumFmt& );
+ String MakeNumString( const SwNodeNum&, sal_Bool bInclStrings = sal_True,
+ sal_Bool bOnlyArabic = sal_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 sal_Bool bInclStrings = sal_True,
+ const sal_Bool bOnlyArabic = sal_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 sal_uInt16 GetNumIndent( sal_uInt8 nLvl );
+ static sal_uInt16 GetBullIndent( sal_uInt8 nLvl );
+
+ SwNumRuleType GetRuleType() const { return eRuleType; }
+ void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
+ bInvalidRuleFlag = sal_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#
+ // <--
+
+ sal_Bool IsAutoRule() const { return bAutoRuleFlag; }
+ void SetAutoRule( sal_Bool bFlag ) { bAutoRuleFlag = bFlag; }
+
+ sal_Bool IsInvalidRule() const { return bInvalidRuleFlag; }
+ void SetInvalidRule( sal_Bool bFlag );
+
+ sal_Bool IsContinusNum() const { return bContinusNum; }
+ void SetContinusNum( sal_Bool bFlag ) { bContinusNum = bFlag; }
+
+ sal_Bool IsAbsSpaces() const { return bAbsSpaces; }
+ void SetAbsSpaces( sal_Bool bFlag ) { bAbsSpaces = bFlag; }
+
+ // #115901#
+ sal_Bool IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
+
+ bool IsCountPhantoms() const;
+ void SetCountPhantoms(bool bCountPhantoms);
+
+ // erfragen und setzen der Poolvorlagen-Id's
+ sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
+
+ // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
+ sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( sal_uInt8 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, sal_Bool bRelative = sal_True,
+// sal_Bool bFirstLine = sal_True, sal_Bool bCheckGtZero = sal_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 sal_uInt16 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( sal_uInt8 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..af6f73f9d133
--- /dev/null
+++ b/sw/inc/pagedesc.hxx
@@ -0,0 +1,349 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <editeng/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.
+ sal_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; }
+ sal_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(sal_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& );
+
+ sal_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 sal_uInt16 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;
+ sal_uInt16 nRegHeight; // Zeilenabstand und Fontascent der Vorlage
+ sal_uInt16 nRegAscent; // fuer die Registerhaltigkeit
+ UseOnPage eUse;
+ sal_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 );
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
+
+public:
+ const String &GetName() const { return aDescName; }
+ void SetName( const String& rNewName ) { aDescName = rNewName; }
+
+ sal_Bool GetLandscape() const { return bLandscape; }
+ void SetLandscape( sal_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 sal_Bool IsHeaderShared() const;
+ inline sal_Bool IsFooterShared() const;
+ inline void ChgHeaderShare( sal_Bool bNew );
+ inline void ChgFooterShare( sal_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;
+
+ sal_uInt16 GetRegHeight() const { return nRegHeight; }
+ sal_uInt16 GetRegAscent() const { return nRegAscent; }
+ void SetRegHeight( sal_uInt16 nNew ){ nRegHeight = nNew; }
+ void SetRegAscent( sal_uInt16 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;
+ void RegisterChange();
+
+ // erfragen und setzen der PoolFormat-Id
+ sal_uInt16 GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
+ void SetPoolFmtId( sal_uInt16 nId ) { aMaster.SetPoolFmtId( nId ); }
+ sal_uInt16 GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
+ void SetPoolHelpId( sal_uInt16 nId ) { aMaster.SetPoolHelpId( nId ); }
+ sal_uInt8 GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { aMaster.SetPoolHlpFileId( nId ); }
+
+ // erfrage vom Client Informationen
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+
+ const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd,
+ sal_Bool bCheckForThisPgDc = sal_True ) const;
+ sal_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 sal_Bool SwPageDesc::IsHeaderShared() const
+{
+ return eUse & nsUseOnPage::PD_HEADERSHARE ? sal_True : sal_False;
+}
+inline sal_Bool SwPageDesc::IsFooterShared() const
+{
+ return eUse & nsUseOnPage::PD_FOOTERSHARE ? sal_True : sal_False;
+}
+inline void SwPageDesc::ChgHeaderShare( sal_Bool bNew )
+{
+ if ( bNew )
+ eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE);
+ // (sal_uInt16&)eUse |= (sal_uInt16)nsUseOnPage::PD_HEADERSHARE;
+ else
+ eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE);
+ // (sal_uInt16&)eUse &= (sal_uInt16)nsUseOnPage::PD_NOHEADERSHARE;
+}
+inline void SwPageDesc::ChgFooterShare( sal_Bool bNew )
+{
+ if ( bNew )
+ eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE);
+ // (sal_uInt16&)eUse |= (sal_uInt16)nsUseOnPage::PD_FOOTERSHARE;
+ else
+ eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHARE);
+ // (sal_uInt16&)eUse &= (sal_uInt16)nsUseOnPage::PD_NOFOOTERSHARE;
+}
+inline void SwPageDesc::SetUseOn( UseOnPage eNew )
+{
+ UseOnPage eTmp = nsUseOnPage::PD_NONE;
+ if ( eUse & nsUseOnPage::PD_HEADERSHARE )
+ eTmp = nsUseOnPage::PD_HEADERSHARE;
+ // (sal_uInt16&)eTmp |= (sal_uInt16)nsUseOnPage::PD_HEADERSHARE;
+ if ( eUse & nsUseOnPage::PD_FOOTERSHARE )
+ eTmp = (UseOnPage) (eTmp | nsUseOnPage::PD_FOOTERSHARE);
+ // (sal_uInt16&)eTmp |= (sal_uInt16)nsUseOnPage::PD_FOOTERSHARE;
+ eUse = (UseOnPage) (eTmp | eNew);
+ // (sal_uInt16&)eUse = eTmp | eNew;
+}
+inline UseOnPage SwPageDesc::GetUseOn() const
+{
+ UseOnPage eRet = eUse;
+ eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE);
+ // (sal_uInt16&)eRet &= (sal_uInt16)nsUseOnPage::PD_NOHEADERSHARE;
+ eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE);
+ // (sal_uInt16&)eRet &= (sal_uInt16)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#
+};
+
+
+SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
+
+#endif //_PAGEDESC_HXX
diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx
new file mode 100644
index 000000000000..2280ae414093
--- /dev/null
+++ b/sw/inc/pageiter.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 );
+
+ sal_Bool IsEnd() const { return 0 == pPage; }
+ sal_Bool NextPage();
+ const SwPageDesc* GetPageDesc() const;
+ sal_Bool Seek( const SwPosition &rPos );
+ sal_Bool GetPosition( SwPosition &rPos ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
new file mode 100644
index 000000000000..01d83afae52e
--- /dev/null
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -0,0 +1,621 @@
+#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 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..995246f8d9e9
--- /dev/null
+++ b/sw/inc/pam.hxx
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+
+ sal_Bool operator < (const SwPosition &) const;
+ sal_Bool operator > (const SwPosition &) const;
+ sal_Bool operator <=(const SwPosition &) const;
+ sal_Bool operator >=(const SwPosition &) const;
+ sal_Bool operator ==(const SwPosition &) const;
+ sal_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 sal_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
+ sal_Bool Move( SwMoveFn fnMove = fnMoveForward,
+ SwGoInDoc fnGo = fnGoCntnt );
+
+ // Suchen
+ sal_uInt8 Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
+ utl::TextSearch& rSTxt,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False);
+ sal_Bool Find( const SwFmt& rFmt,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False);
+ sal_Bool Find( const SfxPoolItem& rAttr, sal_Bool bValue = sal_True,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False );
+ sal_Bool Find( const SfxItemSet& rAttr, sal_Bool bNoColls,
+ SwMoveFn fnMove,
+ const SwPaM *pPam, sal_Bool bInReadOnly, sal_Bool bMoveFirst );
+
+ bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
+ SwMoveFn fnMove, sal_Bool bSrchForward, sal_Bool bRegSearch, sal_Bool bChkEmptyPara, sal_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;
+ }
+ }
+#ifndef DBG_UTIL
+
+ 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 sal_True: If the point is behind the mark then swap.
+ sal_False: If the mark is behind the point then swap.
+ */
+ SwPaM & Normalize(sal_Bool bPointFirst = sal_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
+ sal_uInt16 GetPageNum( sal_Bool bAtPoint = sal_True, const Point* pLayPos = 0 );
+
+ // steht in etwas geschuetztem oder in die Selektion umspannt
+ // etwas geschuetztes.
+ sal_Bool HasReadonlySel( bool bFormView ) const;
+
+ sal_Bool ContainsPosition(const SwPosition & rPos)
+ { return *Start() <= rPos && rPos <= *End(); }
+
+ static sal_Bool Overlap(const SwPaM & a, const SwPaM & b);
+
+ static sal_Bool LessThan(const SwPaM & a, const SwPaM & b);
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
+
+ String GetTxt() const;
+ void InvalidatePaM();
+};
+
+
+sal_Bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, sal_Bool );
+sal_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..8a7f119bb539
--- /dev/null
+++ b/sw/inc/paratr.hxx
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/eitem.hxx>
+#include <svl/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 ((sal_uInt16)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
+ sal_uInt16 nDistance; // Abstand zum Textbeginn
+ sal_uInt16 nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
+ sal_uInt8 nLines; // Anzahl der Zeilen
+ sal_uInt8 nChars; // Anzahl der Zeichen
+ sal_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 &);
+
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
+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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ inline sal_uInt8 GetLines() const { return nLines; }
+ inline sal_uInt8 &GetLines() { return nLines; }
+
+ inline sal_uInt8 GetChars() const { return nChars; }
+ inline sal_uInt8 &GetChars() { return nChars; }
+
+ inline sal_Bool GetWholeWord() const { return bWholeWord; }
+ inline sal_uInt8 &GetWholeWord() { return bWholeWord; }
+
+ inline sal_uInt16 GetDistance() const { return nDistance; }
+ inline sal_uInt16 &GetDistance() { return nDistance; }
+
+ inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+ inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)GetRegisteredIn(); }
+ void SetCharFmt( SwCharFmt *pNew );
+ // erfrage vom Client Informationen
+ virtual sal_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 sal_Bool bRegister = sal_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 sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
+};
+
+class SwParaConnectBorderItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ inline SwParaConnectBorderItem( const sal_Bool bConnect = sal_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 sal_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(sal_Bool bInP) const
+ { return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); }
+inline const SvxAdjustItem &SwAttrSet::GetAdjust(sal_Bool bInP) const
+ { return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); }
+inline const SvxFmtSplitItem &SwAttrSet::GetSplit(sal_Bool bInP) const
+ { return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); }
+inline const SwRegisterItem &SwAttrSet::GetRegister(sal_Bool bInP) const
+ { return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); }
+inline const SvxWidowsItem &SwAttrSet::GetWidows(sal_Bool bInP) const
+ { return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); }
+inline const SvxOrphansItem &SwAttrSet::GetOrphans(sal_Bool bInP) const
+ { return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); }
+inline const SvxTabStopItem &SwAttrSet::GetTabStops(sal_Bool bInP) const
+ { return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); }
+inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(sal_Bool bInP) const
+ { return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); }
+inline const SwFmtDrop &SwAttrSet::GetDrop(sal_Bool bInP) const
+ { return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); }
+inline const SwNumRuleItem &SwAttrSet::GetNumRule(sal_Bool bInP) const
+ { return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); }
+inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(sal_Bool bInP) const
+ { return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); }
+inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(sal_Bool bInP) const
+ { return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); }
+inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(sal_Bool bInP) const
+ { return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
+inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(sal_Bool bInP) const
+ { return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); }
+inline const SvxParaGridItem &SwAttrSet::GetParaGrid(sal_Bool bInP) const
+ { return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); }
+inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(sal_Bool bInP) const
+ { return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
+
+/******************************************************************************
+ * Implementierung der Paragraph-Attribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(sal_Bool bInP) const
+ { return aSet.GetLineSpacing(bInP); }
+inline const SvxAdjustItem &SwFmt::GetAdjust(sal_Bool bInP) const
+ { return aSet.GetAdjust(bInP); }
+inline const SvxFmtSplitItem &SwFmt::GetSplit(sal_Bool bInP) const
+ { return aSet.GetSplit(bInP); }
+inline const SwRegisterItem &SwFmt::GetRegister(sal_Bool bInP) const
+ { return aSet.GetRegister(bInP); }
+inline const SvxWidowsItem &SwFmt::GetWidows(sal_Bool bInP) const
+ { return aSet.GetWidows(bInP); }
+inline const SvxOrphansItem &SwFmt::GetOrphans(sal_Bool bInP) const
+ { return aSet.GetOrphans(bInP); }
+inline const SvxTabStopItem &SwFmt::GetTabStops(sal_Bool bInP) const
+ { return aSet.GetTabStops(bInP); }
+inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(sal_Bool bInP) const
+ { return aSet.GetHyphenZone(bInP); }
+inline const SwFmtDrop &SwFmt::GetDrop(sal_Bool bInP) const
+ { return aSet.GetDrop(bInP); }
+inline const SwNumRuleItem &SwFmt::GetNumRule(sal_Bool bInP) const
+ { return aSet.GetNumRule(bInP); }
+inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(sal_Bool bInP) const
+ { return aSet.GetScriptSpace(bInP) ; }
+inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(sal_Bool bInP) const
+ { return aSet.GetHangingPunctuation(bInP) ; }
+inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(sal_Bool bInP) const
+ { return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
+inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(sal_Bool bInP) const
+ { return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); }
+inline const SvxParaGridItem &SwFmt::GetParaGrid(sal_Bool bInP) const
+ { return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); }
+inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(sal_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..14bb9b56b5b1
--- /dev/null
+++ b/sw/inc/pausethreadstarting.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..04a4242b04f2
--- /dev/null
+++ b/sw/inc/pch/precompiled_sw.cxx
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 100755
index 000000000000..13e8cb3ddbdd
--- /dev/null
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -0,0 +1,1002 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "framework/interaction.hxx"
+
+#include "svtools/grfmgr.hxx"
+#include "svl/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/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 "svl/PasswordHelper.hxx"
+#include "svtools/accessibilityoptions.hxx"
+#include "svl/aeitem.hxx"
+#include "svl/cjkoptions.hxx"
+#include "unotools/cmdoptions.hxx"
+#include "svl/cntnrsrt.hxx"
+#include "svtools/collatorres.hxx"
+#include "svtools/colorcfg.hxx"
+#include "unotools/compatibility.hxx"
+#include "svtools/controldims.hrc"
+#include "svl/ctloptions.hxx"
+#include "svtools/ctrlbox.hxx"
+#include "svtools/ctrltool.hxx"
+#include "svtools/editbrowsebox.hxx"
+#include "svtools/ehdl.hxx"
+#include "svl/eitem.hxx"
+#include "svtools/embedhlp.hxx"
+#include "svtools/embedtransfer.hxx"
+#include "svtools/filter.hxx"
+#include "svl/flagitem.hxx"
+#include "unotools/fltrcfg.hxx"
+#include "svl/fstathelper.hxx"
+#include "svl/globalnameitem.hxx"
+#include "svtools/headbar.hxx"
+#include "svtools/htmlkywd.hxx"
+#include "svtools/htmltokn.h"
+#include "svl/imageitm.hxx"
+#include "svtools/imap.hxx"
+#include "svtools/indexentryres.hxx"
+#include "svl/inethist.hxx"
+#include "svtools/inetimg.hxx"
+#include "svtools/insdlg.hxx"
+#include "svl/intitem.hxx"
+#include "svl/isethint.hxx"
+#include "svl/itemiter.hxx"
+#include "svl/itempool.hxx"
+#include "svl/itemprop.hxx"
+#include "svl/itemset.hxx"
+#include "svl/languageoptions.hxx"
+#include "svl/lckbitem.hxx"
+#include "unotools/lingucfg.hxx"
+#include "unotools/linguprops.hxx"
+#include "svl/lstner.hxx"
+#include "unotools/misccfg.hxx"
+#include "unotools/moduleoptions.hxx"
+#include "svl/numuno.hxx"
+#include "svl/ownlist.hxx"
+#include "svtools/parhtml.hxx"
+#include "unotools/pathoptions.hxx"
+#include "svl/poolitem.hxx"
+#include "svtools/prgsbar.hxx"
+#include "svtools/prnsetup.hxx"
+#include "svl/ptitem.hxx"
+#include "svl/rectitem.hxx"
+#include "svtools/rtfkeywd.hxx"
+#include "svtools/rtfout.hxx"
+#include "svtools/rtftoken.h"
+#include "svtools/ruler.hxx"
+#include "unotools/saveopt.hxx"
+#include "svtools/scriptedtext.hxx"
+#include "svtools/sfxecode.hxx"
+#include "svl/slstitm.hxx"
+#include "svl/smplhint.hxx"
+#include "svtools/soerr.hxx"
+#include "svl/solar.hrc"
+#include "unotools/sourceviewconfig.hxx"
+#include "svtools/stdctrl.hxx"
+#include "svl/stritem.hxx"
+#include "svl/style.hrc"
+#include "svl/style.hxx"
+#include "svl/svarray.hxx"
+#include "svtools/svmedit.hxx"
+#include "svtools/svparser.hxx"
+#include "svl/svstdarr.hxx"
+#include "svtools/svtabbx.hxx"
+#include "svtools/svtreebx.hxx"
+#include "unotools/syslocale.hxx"
+#include "svtools/templdlg.hxx"
+#include "svtools/textview.hxx"
+#include "svtools/transfer.hxx"
+#include "svtools/txtattr.hxx"
+#include "svtools/txtcmp.hxx"
+#include "svl/undo.hxx"
+#include "unotools/undoopt.hxx"
+#include "svtools/unoevent.hxx"
+#include "svtools/unoimap.hxx"
+#include "svl/urihelper.hxx"
+#include "svl/urlbmk.hxx"
+#include "unotools/useroptions.hxx"
+#include "svtools/valueset.hxx"
+#include "svl/visitem.hxx"
+#include "svl/whiter.hxx"
+#include "svtools/xtextedt.hxx"
+
+#include "svx/IAccessibleParent.hxx"
+#include "svx/IAccessibleViewForwarder.hxx"
+#include "svx/SpellDialogChildWindow.hxx"
+#include "editeng/SpellPortions.hxx"
+#include "editeng/UnoForbiddenCharsTable.hxx"
+#include "editeng/acorrcfg.hxx"
+#include "svx/anchorid.hxx"
+#include "svl/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 "editeng/editdata.hxx"
+#include "editeng/editeng.hxx"
+#include "editeng/editobj.hxx"
+#include "editeng/editstat.hxx"
+#include "editeng/editview.hxx"
+#include "editeng/eeitem.hxx"
+#include "filter/msfilter/escherex.hxx"
+#include "svx/extrusionbar.hxx"
+#include "svx/extrusioncolorcontrol.hxx"
+#include "svx/fillctrl.hxx"
+#include "svx/flagsdef.hxx"
+#include "editeng/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 "editeng/forbiddencharacterstable.hxx"
+#include "svx/formatpaintbrushctrl.hxx"
+#include "editeng/frmdir.hxx"
+#include "svx/galbrws.hxx"
+#include "svx/gallery.hxx"
+#include "svx/globlmn.hrc"
+#include "svx/grafctrl.hxx"
+#include "editeng/hangulhanja.hxx"
+#include "svx/hdft.hxx"
+#include "svtools/htmlcfg.hxx"
+#include "svx/htmlmode.hxx"
+#include "svx/hyperdlg.hxx"
+#include "svx/hyprlink.hxx"
+#include "svx/imapdlg.hxx"
+#include "editeng/itemtype.hxx"
+#include "svx/langbox.hxx"
+#include "svx/layctrl.hxx"
+#include "svx/lboxctrl.hxx"
+#include "svx/linectrl.hxx"
+#include "sfx2/linkmgr.hxx"
+#include "filter/msfilter/mscodec.hxx"
+#include "filter/msfilter/msdffimp.hxx"
+#include "filter/msfilter/msfiltertracer.hxx"
+#include "filter/msfilter/msocximex.hxx"
+#include "filter/msfilter/msoleexp.hxx"
+#include "editeng/numitem.hxx"
+#include "svx/numvset.hxx"
+#include "svx/objfac3d.hxx"
+#include "svx/ofaitem.hxx"
+#include "svx/optgenrl.hxx"
+#include "svx/optgrid.hxx"
+#include "editeng/outliner.hxx"
+#include "editeng/outlobj.hxx"
+#include "svx/pagectrl.hxx"
+#include "editeng/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 "editeng/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 "editeng/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 "tools/fldunit.hxx"
+#include "vcl/font.hxx"
+#include "unotools/fontcvt.hxx"
+#include "vcl/graph.hxx"
+#include "vcl/group.hxx"
+#include "vcl/help.hxx"
+#include "vcl/image.hxx"
+#include "vcl/button.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 "tools/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..42e31bab981e
--- /dev/null
+++ b/sw/inc/poolfmt.awk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+#
+# 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..e68de680c243
--- /dev/null
+++ b/sw/inc/poolfmt.hrc
@@ -0,0 +1,288 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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)
+//IAccessibility2 Impplementaton 2009-----
+//Solution:Define column item's accessible name ID.
+#define STR_COLUMN_VALUESET_ITEM0 (RC_POOLNUMRULE_BEGIN + 10 )
+#define STR_COLUMN_VALUESET_ITEM1 (RC_POOLNUMRULE_BEGIN + 11 )
+#define STR_COLUMN_VALUESET_ITEM2 (RC_POOLNUMRULE_BEGIN + 12 )
+#define STR_COLUMN_VALUESET_ITEM3 (RC_POOLNUMRULE_BEGIN + 13 )
+#define STR_COLUMN_VALUESET_ITEM4 (RC_POOLNUMRULE_BEGIN + 14 )
+//-----IAccessibility2 Impplementaton 2009
+//-----------------
+// 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..e3dec80e22a8
--- /dev/null
+++ b/sw/inc/poolfmt.hxx
@@ -0,0 +1,443 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <editeng/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 sal_uInt16 POOLGRP_NOCOLLID = (1 << 10);
+
+// POLLCOLL-Gruppen:
+
+const sal_uInt16 USER_FMT = (1 << 15);
+const sal_uInt16 POOL_FMT = (0 << 15);
+
+const sal_uInt16 COLL_TEXT_BITS = (1 << 11);
+const sal_uInt16 COLL_LISTS_BITS = (2 << 11);
+const sal_uInt16 COLL_EXTRA_BITS = (3 << 11);
+const sal_uInt16 COLL_REGISTER_BITS = (4 << 11);
+const sal_uInt16 COLL_DOC_BITS = (5 << 11);
+const sal_uInt16 COLL_HTML_BITS = (6 << 11);
+const sal_uInt16 COLL_GET_RANGE_BITS = (15 << 11);
+
+// Sonstige Gruppen:
+
+const sal_uInt16 POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
+//const sal_uInt16 POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ?
+
+// fuer Erkennung ob Benutzer-Vorlage oder nicht:
+const sal_uInt16 POOL_IDUSER_FMT =
+ USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID);
+
+inline sal_Bool IsPoolUserFmt( sal_uInt16 nId )
+{
+ return POOL_IDUSER_FMT ==
+ (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID))
+ ? sal_True : sal_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
+sal_uInt16 GetPoolParent( sal_uInt16 nId );
+
+SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage);
+
+inline sal_Bool IsConditionalByPoolId(sal_uInt16 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/postithelper.hxx b/sw/inc/postithelper.hxx
new file mode 100644
index 000000000000..620936cdcf5b
--- /dev/null
+++ b/sw/inc/postithelper.hxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <SidebarWindowsTypes.hxx>
+#include <svl/brdcst.hxx>
+
+class SwTxtFld;
+class SwRootFrm;
+class SwPostIt;
+class String;
+class SwPostItMgr;
+class SwEditWin;
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+} }
+
+struct SwPosition;
+
+typedef sal_Int64 SwPostItBits;
+
+struct SwLayoutInfo
+{
+ const SwFrm* mpAnchorFrm;
+ SwRect mPosition;
+ SwRect mPageFrame;
+ SwRect mPagePrtArea;
+ unsigned long mnPageNumber;
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
+ sal_uInt16 mRedlineAuthor;
+
+ SwLayoutInfo()
+ : mpAnchorFrm(0)
+ , mPosition()
+ , mPageFrame()
+ , mPagePrtArea()
+ , mnPageNumber(1)
+ , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE)
+ , mRedlineAuthor(0)
+ {}
+};
+
+namespace SwPostItHelper
+{
+ enum SwLayoutStatus
+ {
+ INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN
+ };
+
+ SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& );
+ long getLayoutHeight( const SwRootFrm* pRoot );
+ void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode );
+ unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& );
+}
+
+class SwSidebarItem
+{
+public:
+ sw::sidebarwindows::SwSidebarWin* pPostIt;
+ bool bShow;
+ bool bFocus;
+
+ SwPostItHelper::SwLayoutStatus mLayoutStatus;
+ SwLayoutInfo maLayoutInfo;
+
+ SwSidebarItem( const bool aShow,
+ const bool aFocus)
+ : pPostIt(0)
+ , bShow(aShow)
+ , bFocus(aFocus)
+ , mLayoutStatus( SwPostItHelper::INVISIBLE )
+ , maLayoutInfo()
+ {}
+ virtual ~SwSidebarItem(){}
+ virtual SwPosition GetAnchorPosition() const = 0;
+ virtual bool UseElement() = 0;
+ virtual SwFmtFld* GetFmtFld() const = 0;
+ virtual SfxBroadcaster* GetBroadCaster() const = 0;
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits) = 0;
+};
+/*
+class SwRedCommentItem: public SwSidebarItem
+{
+private:
+ SwRedline* pRedline;
+public:
+
+ SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
+ : SwSidebarItem(aShow,aFocus),
+ pRedline(pRed) {}
+ virtual ~SwRedCommentItem() {}
+ virtual SwPosition GetAnchorPosition() const;
+ virtual bool UseElement();
+ virtual SwFmtFld* GetFmtFld() const {return 0; }
+ virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
+};
+*/
+
+class SwAnnotationItem: public SwSidebarItem
+{
+ private:
+ SwFmtFld* pFmtFld;
+
+ public:
+ SwAnnotationItem( SwFmtFld* p,
+ const bool aShow,
+ const bool aFocus)
+ : SwSidebarItem( aShow, aFocus )
+ , pFmtFld(p)
+ {}
+ virtual ~SwAnnotationItem() {}
+ virtual SwPosition GetAnchorPosition() const;
+ virtual bool UseElement();
+ virtual SwFmtFld* GetFmtFld() const {return pFmtFld;}
+ virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); }
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ 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..1e16d3d782e9
--- /dev/null
+++ b/sw/inc/printdata.hxx
@@ -0,0 +1,336 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+#include <vcl/print.hxx>
+
+#include <set>
+#include <map>
+#include <vector>
+#include <utility>
+
+class SwPageFrm;
+class SwDoc;
+class SwDocShell;
+class ViewShell;
+class _SetGetExpFlds;
+class SwViewOption;
+class OutputDevice;
+class SwViewOptionAdjust_Impl;
+class SwPrtOptions;
+class ViewShell;
+class SfxViewShell;
+
+// forward declarations
+class SwPrintUIOptions;
+class SwRenderData;
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintData
+{
+ const SwPrintUIOptions * m_pPrintUIOptions; // not owner
+ const SwRenderData * m_pRenderData; // not owner
+
+public:
+
+ sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground,
+ bPrintBlackFont,
+ //#i81434# - printing of hidden text
+ bPrintHiddenText, bPrintTextPlaceholder,
+ bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect,
+ bPrintProspectRTL,
+ 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()
+ {
+ m_pPrintUIOptions = NULL;
+ m_pRenderData = NULL;
+
+ bPrintGraphic =
+ bPrintTable =
+ bPrintDraw =
+ bPrintControl =
+ bPrintLeftPages =
+ bPrintRightPages =
+ bPrintPageBackground =
+ bPrintEmptyPages =
+ bUpdateFieldsInPrinting = sal_True;
+
+ bPaperFromSetup =
+ bPrintReverse =
+ bPrintProspect =
+ bPrintProspectRTL =
+ 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 &&
+ bPrintLeftPages == rData.bPrintLeftPages &&
+ bPrintRightPages == rData.bPrintRightPages &&
+ bPrintReverse == rData.bPrintReverse &&
+ bPrintProspect == rData.bPrintProspect &&
+ bPrintProspectRTL == rData.bPrintProspectRTL &&
+ bPrintSingleJobs == rData.bPrintSingleJobs &&
+ bPaperFromSetup == rData.bPaperFromSetup &&
+ bPrintEmptyPages == rData.bPrintEmptyPages &&
+ bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting &&
+ nPrintPostIts == rData.nPrintPostIts &&
+ sFaxName == rData.sFaxName &&
+ bPrintHiddenText == rData.bPrintHiddenText &&
+ bPrintTextPlaceholder == rData.bPrintTextPlaceholder;
+ }
+
+ // Note: in the context where this class ist used the pointers should always be valid
+ // during the lifetime of this object
+ const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; }
+ const SwRenderData & GetRenderData() const { return *m_pRenderData; }
+ void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; }
+ void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; }
+
+ 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 bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ 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 IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ 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(); bPrintLeftPages = b; }
+ void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = 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(); bPrintProspectRTL = 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;}
+};
+
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintUIOptions : public vcl::PrinterOptionsHelper
+{
+ OutputDevice* m_pLast;
+ const SwPrintData & m_rDefaultPrintData;
+
+public:
+ SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData );
+ virtual ~SwPrintUIOptions();
+
+ bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp );
+
+ bool IsPrintFormControls() const { return getBoolValue( "PrintControls", m_rDefaultPrintData.bPrintControl ); }
+ bool IsPrintPageBackground() const { return getBoolValue( "PrintPageBackground", m_rDefaultPrintData.bPrintPageBackground ); }
+ bool IsPrintProspect() const { return getBoolValue( "PrintProspect", m_rDefaultPrintData.bPrintProspect ); }
+ bool IsPrintProspectRTL() const { return getIntValue( "PrintProspectRTL", m_rDefaultPrintData.bPrintProspectRTL ) ? true : false; }
+ bool IsPrintTextPlaceholders() const { return getBoolValue( "PrintTextPlaceholder", m_rDefaultPrintData.bPrintTextPlaceholder ); }
+ bool IsPrintHiddenText() const { return getBoolValue( "PrintHiddenText", m_rDefaultPrintData.bPrintHiddenText ); }
+ bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); }
+ sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); }
+ bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); }
+ bool IsPrintReverse() const { return false; /*handled by print dialog now*/ /*getBoolValue( "PrintReversed", m_rDefaultPrintData.bPrintReverse );*/ }
+
+ bool IsPrintLeftPages() const;
+ bool IsPrintRightPages() const;
+ bool IsPrintEmptyPages( bool bIsPDFExport ) const;
+ bool IsPrintTables() const;
+ bool IsPrintGraphics() const;
+ bool IsPrintDrawings() const;
+};
+
+
+////////////////////////////////////////////////////////////
+
+// A class that stores temporary data that is needed for rendering the document.
+// Usually this data is created when 'getRendererCount' is called and
+// and it is used in the 'render' function of that same interface
+class SwRenderData
+{
+ // pages valid for printing (according to the current settings)
+ // and their respective start frames (see getRendererCount in unotxdoc.cxx)
+ // This set of pages does NOT depend on the 'PageRange' that is used as a printing option!
+ std::set< sal_Int32 > m_aValidPages; // the set of possible pages (see StringRangeEnumerator::getRangesFromString )
+ std::map< sal_Int32, const SwPageFrm * > m_aValidStartFrames; // the map of start frames for those pages
+
+ // printer paper tray to use for each of the m_aValidPages above
+ std::map< sal_Int32, sal_Int32 > m_aPrinterPaperTrays;
+
+ // vector of pages and their order to be printed (duplicates and any order allowed!)
+ // (see 'render' in unotxdoc.cxx)
+ std::vector< sal_Int32 > m_aPagesToPrint;
+
+ std::vector< const SwPageFrm * > m_aPostItStartFrames;
+
+ // for prospect printing: the pairs of pages to be printed together on a single prospect page.
+ // -1 indicates a half page to be left empty.
+ std::vector< std::pair< sal_Int32, sal_Int32 > > m_aPagePairs;
+
+ rtl::OUString m_aPageRange;
+
+ // the view options to be applied for printing
+ SwViewOptionAdjust_Impl * m_pViewOptionAdjust;
+
+ SwPrintData * m_pPrtOptions;
+
+public:
+
+ // PostIt relevant data
+ _SetGetExpFlds * m_pPostItFields; // an array of "_SetGetExpFld *" sorted by page and line numbers
+ SwDoc * m_pPostItDoc;
+ ViewShell * m_pPostItShell;
+
+public:
+ SwRenderData();
+ ~SwRenderData();
+
+
+ bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0 && m_pPostItShell != 0; }
+ void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev );
+ void DeletePostItData();
+
+ bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
+ bool NeedNewViewOptionAdjust( const ViewShell& ) const;
+ void ViewOptionAdjustStart( ViewShell &rSh, const SwViewOption &rViewOptions );
+ void ViewOptionAdjust( SwPrintData const* const pPrtOptions );
+ void ViewOptionAdjustStop();
+
+ bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
+ void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; }
+ SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; }
+ SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
+ void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell,
+ const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
+
+
+ typedef std::map< sal_Int32, const SwPageFrm * > ValidStartFramesMap_t;
+ typedef std::vector< std::pair< sal_Int32, sal_Int32 > > PagePairsVec_t;
+
+ std::set< sal_Int32 > & GetValidPagesSet() { return m_aValidPages; }
+ const std::set< sal_Int32 > & GetValidPagesSet() const { return m_aValidPages; }
+ ValidStartFramesMap_t & GetValidStartFrames() { return m_aValidStartFrames; }
+ const ValidStartFramesMap_t & GetValidStartFrames() const { return m_aValidStartFrames; }
+
+ // a map for printer paper tray numbers to use for each document page
+ // a value of -1 for the tray means that there is no specific tray defined
+ std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() { return m_aPrinterPaperTrays; }
+ const std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; }
+
+ // used for 'normal' printing
+ // A page value of 0 as entry indicates that this page is not from the document but
+ // from the post-it document. (See also GetPostItStartFrame below)
+ std::vector< sal_Int32 > & GetPagesToPrint() { return m_aPagesToPrint; }
+ const std::vector< sal_Int32 > & GetPagesToPrint() const { return m_aPagesToPrint; }
+
+ // used for 'normal' printing with post-its
+ // - if the map entry will be NULL then the respective page to be printed is from
+ // the document. In that case use the value from GetPagesToPrint at the same index to
+ // get the phys. page number to be printed, and then retrieve the start frame to use
+ // from GetValidStartFrms.
+ // - If the entry is not NULL it is the start frame of the page from the post-it document
+ // that is to be printed
+ std::vector< const SwPageFrm * > & GetPostItStartFrames() { return m_aPostItStartFrames; }
+ const std::vector< const SwPageFrm * > & GetPostItStartFrames() const { return m_aPostItStartFrames; }
+
+ // used for prospect printing only
+ PagePairsVec_t & GetPagePairsForProspectPrinting() { return m_aPagePairs; }
+ const PagePairsVec_t & GetPagePairsForProspectPrinting() const { return m_aPagePairs; }
+
+ rtl::OUString GetPageRange() const { return m_aPageRange; }
+ void SetPageRange( const rtl::OUString &rRange ) { m_aPageRange = rRange; }
+};
+
+
+////////////////////////////////////////////////////////////
+
+// last remnants of swprtopt.hxx:
+
+#define POSTITS_NONE 0
+#define POSTITS_ONLY 1
+#define POSTITS_ENDDOC 2
+#define POSTITS_ENDPAGE 3
+
+namespace sw {
+
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb);
+
+} // namespace sw
+
+#endif // SW_PRINTDATA_HXX
diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx
new file mode 100644
index 000000000000..75f0520e35e8
--- /dev/null
+++ b/sw/inc/prtopt.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _PRTOPT_HXX
+#define _PRTOPT_HXX
+
+#include <unotools/configitem.hxx>
+#include <printdata.hxx>
+
+class SwPrintOptions : public SwPrintData, public utl::ConfigItem
+{
+ sal_Bool bIsWeb;
+
+ com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+public:
+ SwPrintOptions(sal_Bool bWeb);
+ virtual ~SwPrintOptions();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ virtual void doSetModified( ) { bModified = sal_True; SetModified();}
+
+ SwPrintOptions& operator=(const SwPrintData& rData)
+ {
+ SwPrintData::operator=( rData );
+ SetModified();
+ return *this;
+ }
+};
+
+#endif
+
diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx
new file mode 100644
index 000000000000..14b20f147714
--- /dev/null
+++ b/sw/inc/pvprtdat.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+{
+ sal_uLong nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
+ nHorzSpace, nVertSpace;
+ sal_uInt8 nRow, nCol;
+ sal_Bool bLandscape : 1;
+ sal_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)
+ {}
+
+ sal_uLong GetLeftSpace() const { return nLeftSpace; }
+ void SetLeftSpace( sal_uLong n ) { nLeftSpace = n; }
+
+ sal_uLong GetRightSpace() const { return nRightSpace; }
+ void SetRightSpace( sal_uLong n ) { nRightSpace = n; }
+
+ sal_uLong GetTopSpace() const { return nTopSpace; }
+ void SetTopSpace( sal_uLong n ) { nTopSpace = n; }
+
+ sal_uLong GetBottomSpace() const { return nBottomSpace; }
+ void SetBottomSpace( sal_uLong n ) { nBottomSpace = n; }
+
+ sal_uLong GetHorzSpace() const { return nHorzSpace; }
+ void SetHorzSpace( sal_uLong n ) { nHorzSpace = n; }
+
+ sal_uLong GetVertSpace() const { return nVertSpace; }
+ void SetVertSpace( sal_uLong n ) { nVertSpace = n; }
+
+ sal_uInt8 GetRow() const { return nRow; }
+ void SetRow(sal_uInt8 n ) { nRow = n; }
+
+ sal_uInt8 GetCol() const { return nCol; }
+ void SetCol( sal_uInt8 n ) { nCol = n; }
+
+ sal_Bool GetLandscape() const { return bLandscape; }
+ void SetLandscape( sal_Bool b ) { bLandscape = b; }
+};
+
+
+#endif
+
+
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
new file mode 100644
index 000000000000..8a788933dc4e
--- /dev/null
+++ b/sw/inc/rcid.hrc
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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)
+#define RC_ANNOTATION (RC_BASE + 4150)
+
+/*--------------------------------------------------------------------
+ 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)
+
+// Annotation
+#define RC_ANNOTATION_BEGIN RC_ANNOTATION
+#define RC_ANNOTATION_END (RC_ANNOTATION_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..d4242d35f383
--- /dev/null
+++ b/sw/inc/redline.hxx
@@ -0,0 +1,314 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svstdarr.hxx>
+#include <pam.hxx>
+
+#include <IDocumentRedlineAccess.hxx>
+
+#include <svl/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;
+ sal_uInt16 nPoolId;
+public:
+ SwRedlineExtraData_FmtColl( const String& rColl, sal_uInt16 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;
+ sal_uInt16 nAuthor, nSeqNo;
+
+public:
+ SwRedlineData( RedlineType_t eT, sal_uInt16 nAut );
+ SwRedlineData( const SwRedlineData& rCpy, sal_Bool bCpyNext = sal_True );
+
+ // fuer sw3io: pNext/pExtraData gehen in eigenen Besitz ueber!
+ SwRedlineData( RedlineType_t eT, sal_uInt16 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; }
+ sal_uInt16 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!
+ sal_uInt16 GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( sal_uInt16 nNo ) { nSeqNo = nNo; }
+
+ String GetDescr() const;
+};
+
+
+class SW_DLLPUBLIC SwRedline : public SwPaM
+{
+ SwRedlineData* pRedlineData;
+ SwNodeIndex* pCntntSect;
+ sal_Bool bDelLastPara : 1;
+ sal_Bool bIsLastParaDelete : 1;
+ sal_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, sal_Bool bVsbl,
+ sal_Bool bDelLP, sal_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* );
+
+ sal_Bool IsVisible() const { return bIsVisible; }
+ sal_Bool IsDelLastPara() const { return bDelLastPara; }
+
+ // das sal_Bool besagt, ob nach dem setzen der Pos kein Bereich mehr
+ // aufgespannt ist. -> sal_True, ansonten Bereich und sal_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?
+ sal_Bool HasValidRange() const;
+
+ const SwRedlineData& GetRedlineData(sal_uInt16 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(); }
+
+ sal_uInt16 GetStackCount() const;
+ sal_uInt16 GetAuthor( sal_uInt16 nPos = 0) const;
+ const String& GetAuthorString( sal_uInt16 nPos = 0 ) const;
+ const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
+ RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
+ RedlineType_t GetType( sal_uInt16 nPos = 0) const
+ { return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ const String& GetComment( sal_uInt16 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!
+ sal_uInt16 GetSeqNo() const { return pRedlineData->GetSeqNo(); }
+ void SetSeqNo( sal_uInt16 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( sal_uInt16 nLoop = 0 );
+ void Show( sal_uInt16 nLoop = 0 );
+ void Hide( sal_uInt16 nLoop = 0 );
+ void ShowOriginal( sal_uInt16 nLoop = 0 );
+
+ // calculates the intersection with text node number nNdIdx
+ void CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+
+ void InvalidateRange(); // das Layout anstossen
+
+ sal_Bool IsOwnRedline( const SwRedline& rRedl ) const
+ { return GetAuthor() == rRedl.GetAuthor(); }
+ sal_Bool CanCombine( const SwRedline& rRedl ) const;
+
+ void PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext = sal_True );
+ sal_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(sal_uInt16 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..e1a238f0704b
--- /dev/null
+++ b/sw/inc/redlnaut.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ sal_uInt8 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..daf690861260
--- /dev/null
+++ b/sw/inc/reffld.hxx
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_REFFLD_HXX
+#define SW_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;
+protected:
+ // ueberlagert, um alle Ref-Felder zu updaten
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
+public:
+ SwGetRefFieldType(SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ SwDoc* GetDoc() const { return pDoc; }
+
+ void MergeWithOtherDoc( SwDoc& rDestDoc );
+
+ static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark,
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo,
+ sal_uInt16* pStt, sal_uInt16* pEnd = 0 );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Referenzfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwGetRefField : public SwField
+{
+private:
+ String sSetRefName;
+ String sTxt;
+ sal_uInt16 nSubType;
+ sal_uInt16 nSeqNo;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // --> OD 2007-08-24 #i81002#
+ String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
+ const SwTxtNode& rTxtNodeOfReferencedItem,
+ const sal_uInt32 nRefNumFormat ) const;
+ // <--
+public:
+ SwGetRefField( SwGetRefFieldType*, const String& rSetRef,
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFmt );
+
+ virtual ~SwGetRefField();
+
+ virtual String GetFieldName() 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 sal_uInt16 GetSubType() const;
+ virtual void SetSubType( sal_uInt16 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)
+ sal_uInt16 GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( sal_uInt16 n ) { nSeqNo = n; }
+
+ // Name der Referenz
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ virtual String GetPar2() const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+
+ void ConvertProgrammaticToUIName();
+
+ virtual String GetDescription() const;
+};
+
+
+#endif // SW_REFFLD_HXX
+
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
new file mode 100644
index 000000000000..db9fe273a229
--- /dev/null
+++ b/sw/inc/ring.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <swdllapi.h>
+#include <swtypes.hxx>
+
+class SW_DLLPUBLIC 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/rubylist.hxx b/sw/inc/rubylist.hxx
new file mode 100644
index 000000000000..7ade01996237
--- /dev/null
+++ b/sw/inc/rubylist.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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..ad8bddde0007
--- /dev/null
+++ b/sw/inc/section.hxx
@@ -0,0 +1,389 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <boost/utility.hpp>
+
+#include <com/sun/star/uno/Sequence.h>
+
+#include <tools/rtti.hxx>
+#include <tools/ref.hxx>
+#include <svl/svarray.hxx>
+#include <sfx2/lnkbase.hxx>
+#include <sfx2/Metadatable.hxx>
+
+#include <frmfmt.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XTextSection; }
+} } }
+
+// 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 SwSectionData
+{
+private:
+ SectionType m_eType;
+
+ String m_sSectionName;
+ String m_sCondition;
+ String m_sLinkFileName;
+ String m_sLinkFilePassword; // JP 27.02.2001: must be changed to Sequence
+ ::com::sun::star::uno::Sequence <sal_Int8> m_Password;
+
+ /// it seems this flag caches the current final "hidden" state
+ bool m_bHiddenFlag : 1;
+ /// flags that correspond to attributes in the format:
+ /// may have different value than format attribute:
+ /// format attr has value for this section, while flag is
+ /// effectively ORed with parent sections!
+ bool m_bProtectFlag : 1;
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool m_bEditInReadonlyFlag : 1;
+ // <--
+ bool m_bHidden : 1; // all paragraphs hidden?
+ bool m_bCondHiddenFlag : 1; // Hiddenflag for condition
+ bool m_bConnectFlag : 1; // connected to server?
+
+public:
+
+ SwSectionData(SectionType const eType, String const& rName);
+ explicit SwSectionData(SwSection const&);
+ SwSectionData(SwSectionData const&);
+ SwSectionData & operator=(SwSectionData const&);
+ bool operator==(SwSectionData const&) const;
+
+ String const& GetSectionName() const { return m_sSectionName; }
+ void SetSectionName(String const& rName){ m_sSectionName = rName; }
+ SectionType GetType() const { return m_eType; }
+ void SetType(SectionType const eNew) { m_eType = eNew; }
+
+ bool IsHidden() const { return m_bHidden; }
+ void SetHidden(bool const bFlag = true) { m_bHidden = bFlag; }
+
+ bool IsHiddenFlag() const { return m_bHiddenFlag; }
+ SW_DLLPRIVATE void
+ SetHiddenFlag(bool const bFlag) { m_bHiddenFlag = bFlag; }
+ bool IsProtectFlag() const { return m_bProtectFlag; }
+ SW_DLLPRIVATE void
+ SetProtectFlag(bool const bFlag) { m_bProtectFlag = bFlag; }
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool IsEditInReadonlyFlag() const { return m_bEditInReadonlyFlag; }
+ void SetEditInReadonlyFlag(bool const bFlag)
+ { m_bEditInReadonlyFlag = bFlag; }
+ // <--
+
+ void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; };
+ bool IsCondHidden() const { return m_bCondHiddenFlag; }
+
+ String const& GetCondition() const { return m_sCondition; }
+ void SetCondition(String const& rNew) { m_sCondition = rNew; }
+
+ String const& GetLinkFileName() const { return m_sLinkFileName; };
+ void SetLinkFileName(String const& rNew, String const* pPassWd = 0)
+ {
+ m_sLinkFileName = rNew;
+ if (pPassWd) { SetLinkFilePassword(*pPassWd); }
+ }
+
+ String const& GetLinkFilePassword() const { return m_sLinkFilePassword; }
+ void SetLinkFilePassword(String const& rS) { m_sLinkFilePassword = rS; }
+
+ ::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const
+ { return m_Password; }
+ void SetPassword(::com::sun::star::uno::Sequence<sal_Int8> const& rNew)
+ { m_Password = rNew; }
+ bool IsLinkType() const
+ { return (DDE_LINK_SECTION == m_eType) || (FILE_LINK_SECTION == m_eType); }
+
+ bool IsConnectFlag() const { return m_bConnectFlag; }
+ void SetConnectFlag(bool const bFlag = true){ m_bConnectFlag = bFlag; }
+};
+
+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;
+
+private:
+ SwSectionData m_Data;
+
+ SwServerObjectRef m_RefObj; // set if DataServer
+ ::sfx2::SvBaseLinkRef m_RefLink;
+
+ SW_DLLPRIVATE void ImplSetHiddenFlag(
+ bool const bHidden, bool const bCondition);
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
+public:
+ TYPEINFO(); // rtti
+
+ SwSection(SectionType const eType, String const& rName,
+ SwSectionFmt & rFormat);
+ virtual ~SwSection();
+
+ bool DataEquals(SwSectionData const& rCmp) const;
+
+ void SetSectionData(SwSectionData const& rData);
+
+ String const& GetSectionName() const { return m_Data.GetSectionName(); }
+ void SetSectionName(String const& rName){ m_Data.SetSectionName(rName); }
+ SectionType GetType() const { return m_Data.GetType(); }
+ void SetType(SectionType const eType) { return m_Data.SetType(eType); }
+
+ SwSectionFmt* GetFmt() { return (SwSectionFmt*)GetRegisteredIn(); }
+ SwSectionFmt* GetFmt() const { return (SwSectionFmt*)GetRegisteredIn(); }
+
+ // setze die Hidden/Protected -> gesamten Baum updaten !
+ // (Attribute/Flags werden gesetzt/erfragt)
+ bool IsHidden() const { return m_Data.IsHidden(); }
+ void SetHidden (bool const bFlag = true);
+ bool IsProtect() const;
+ void SetProtect(bool const bFlag = true);
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool IsEditInReadonly() const;
+ void SetEditInReadonly(bool const bFlag = true);
+ // <--
+
+ // erfrage die internen Flags (Zustand inklusive Parents nicht, was
+ // aktuell an der Section gesetzt ist!!)
+ bool IsHiddenFlag() const { return m_Data.IsHiddenFlag(); }
+ bool IsProtectFlag() const { return m_Data.IsProtectFlag(); }
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool IsEditInReadonlyFlag() const { return m_Data.IsEditInReadonlyFlag(); }
+ // <--
+
+ void SetCondHidden(bool const bFlag = true);
+ bool IsCondHidden() const { return m_Data.IsCondHidden(); }
+ // erfrage (auch ueber die Parents), ob diese Section versteckt sein soll.
+ sal_Bool CalcHiddenFlag() const;
+
+
+ inline SwSection* GetParent() const;
+
+ String const& GetCondition() const { return m_Data.GetCondition(); }
+ void SetCondition(String const& rNew) { m_Data.SetCondition(rNew); }
+
+ const String& GetLinkFileName() const;
+ void SetLinkFileName(String const& rNew, String const*const pPassWd = 0);
+ // password of linked file (only valid during runtime!)
+ String const& GetLinkFilePassword() const
+ { return m_Data.GetLinkFilePassword(); }
+ void SetLinkFilePassword(String const& rS)
+ { m_Data.SetLinkFilePassword(rS); }
+
+ // get / set password of this section
+ ::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const
+ { return m_Data.GetPassword(); }
+ void SetPassword(::com::sun::star::uno::Sequence <sal_Int8> const& rNew)
+ { m_Data.SetPassword(rNew); }
+
+ // Daten Server-Methoden
+ void SetRefObject( SwServerObject* pObj );
+ const SwServerObject* GetObject() const { return & m_RefObj; }
+ SwServerObject* GetObject() { return & m_RefObj; }
+ bool IsServer() const { return m_RefObj.Is(); }
+
+ // Methoden fuer gelinkte Bereiche
+ sal_uInt16 GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
+ void SetUpdateType(sal_uInt16 const nType )
+ { m_RefLink->SetUpdateMode(nType); }
+
+ bool IsConnected() const { return m_RefLink.Is(); }
+ void UpdateNow() { m_RefLink->Update(); }
+ void Disconnect() { m_RefLink->Disconnect(); }
+
+ const ::sfx2::SvBaseLink& GetBaseLink() const { return *m_RefLink; }
+ ::sfx2::SvBaseLink& GetBaseLink() { return *m_RefLink; }
+
+ void CreateLink( LinkCreateType eType );
+
+ void MakeChildLinksVisible( const SwSectionNode& rSectNd );
+
+ bool IsLinkType() const { return m_Data.IsLinkType(); }
+
+ // Flags fuer UI - Verbindung geklappt?
+ bool IsConnectFlag() const { return m_Data.IsConnectFlag(); }
+ void SetConnectFlag(bool const bFlag = true)
+ { m_Data.SetConnectFlag(bFlag); }
+
+ // return the TOX base class if the section is a TOX section
+ const SwTOXBase* GetTOXBase() const;
+
+ // --> OD 2007-02-14 #b6521322#
+ void BreakLink();
+ // <--
+
+};
+
+
+enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS };
+
+class SW_DLLPUBLIC SwSectionFmt
+ : public SwFrmFmt
+ , public ::sfx2::Metadatable
+{
+ friend class SwDoc;
+
+ /** why does this exist in addition to the m_wXObject in SwFrmFmt?
+ in case of an index, both a SwXDocumentIndex and a SwXTextSection
+ register at this SwSectionFmt, so we need to have two refs.
+ */
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextSection> m_wXTextSection;
+
+ SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert
+
+protected:
+ SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
+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();
+
+ // erfrage vom Format Informationen
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+
+ SwSection* GetSection() const;
+ 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
+ sal_uInt16 GetChildSections( SwSections& rArr,
+ SectionSort eSort = SORTSECT_NOT,
+ sal_Bool bAllSections = sal_True ) const;
+
+ // erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
+ // befindet.
+ sal_Bool IsInNodesArr() const;
+
+ SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false);
+ const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const
+ { return const_cast<SwSectionFmt *>(this)
+ ->GetSectionNode(bEvenIfInUndo); }
+
+ // ist die Section eine gueltige fuers GlobalDocument?
+ const SwSection* GetGlobalDocSection() const;
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextSection> const& GetXTextSection() const
+ { return m_wXTextSection; }
+ SW_DLLPRIVATE void SetXTextSection(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection> const& xTextSection)
+ { m_wXTextSection = xTextSection; }
+
+ // 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();
+
+};
+
+// -------------- 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..7ca50ff1e183
--- /dev/null
+++ b/sw/inc/shellid.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..acfb213911db
--- /dev/null
+++ b/sw/inc/shellio.hxx
@@ -0,0 +1,678 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_SHELLIO_HXX
+#define SW_SHELLIO_HXX
+
+#include <memory>
+#include <boost/utility.hpp>
+
+#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;
+ sal_uInt16 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; }
+
+ sal_uInt16 GetLanguage() const { return nLanguage; }
+ void SetLanguage( sal_uInt16 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
+ {
+ sal_Bool bFmtsOnly;
+ struct
+ {
+ sal_Bool bFrmFmts: 1;
+ sal_Bool bPageDescs: 1;
+ sal_Bool bTxtFmts: 1;
+ sal_Bool bNumRules: 1;
+ sal_Bool bMerge:1;
+ } Fmts;
+ } What;
+
+public:
+ void ResetAllFmtsOnly() { What.bFmtsOnly = 0; }
+ sal_Bool IsFmtsOnly() const { return What.bFmtsOnly; }
+
+ sal_Bool IsFrmFmts() const { return What.Fmts.bFrmFmts; }
+ void SetFrmFmts( const sal_Bool bNew) { What.Fmts.bFrmFmts = bNew; }
+
+ sal_Bool IsPageDescs() const { return What.Fmts.bPageDescs; }
+ void SetPageDescs( const sal_Bool bNew) { What.Fmts.bPageDescs = bNew; }
+
+ sal_Bool IsTxtFmts() const { return What.Fmts.bTxtFmts; }
+ void SetTxtFmts( const sal_Bool bNew) { What.Fmts.bTxtFmts = bNew; }
+
+ sal_Bool IsNumRules() const { return What.Fmts.bNumRules; }
+ void SetNumRules( const sal_Bool bNew) { What.Fmts.bNumRules = bNew; }
+
+ sal_Bool IsMerge() const { return What.Fmts.bMerge; }
+ void SetMerge( const sal_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!!!
+ */
+ sal_Bool NeedsPasswd( const Reader& );
+ sal_Bool CheckPasswd( const String&, const Reader& );
+ sal_uLong Read( const Reader& );
+
+ // ask for glossaries
+ sal_Bool HasGlossaries( const Reader& );
+ sal_Bool ReadGlossaries( const Reader&, SwTextBlocks&, sal_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;
+ sal_Bool bInsertMode : 1;
+ sal_Bool bTmplBrowseMode : 1;
+ sal_Bool bReadUTF8: 1; // Stream als UTF-8 interpretieren
+ sal_Bool bBlockMode: 1;
+ sal_Bool bOrganizerMode : 1;
+ sal_Bool bHasAskTemplateName : 1;
+ sal_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();
+ sal_Bool SetTemplate( SwDoc& rDoc );
+ void ClearTemplate();
+ void SetTemplateName( const String& rDir );
+ void MakeHTMLDummyTemplateDoc();
+
+ sal_Bool IsReadUTF8() const { return bReadUTF8; }
+ void SetReadUTF8( sal_Bool bSet ) { bReadUTF8 = bSet; }
+
+ sal_Bool IsBlockMode() const { return bBlockMode; }
+ void SetBlockMode( sal_Bool bSet ) { bBlockMode = bSet; }
+
+ sal_Bool IsOrganizerMode() const { return bOrganizerMode; }
+ void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; }
+
+ void SetIgnoreHTMLComments( sal_Bool bSet ) { bIgnoreHTMLComments = bSet; }
+
+ virtual sal_Bool HasGlossaries() const;
+ virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const;
+
+ // read the sections of the document, which is equal to the medium.
+ // returns the count of it
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
+ SvStrings& rStrings ) const;
+
+ SotStorageRef getSotStorageRef() { return pStg; };
+ void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
+
+private:
+ virtual sal_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 sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+public:
+ AsciiReader(): Reader() {}
+};
+
+/*class SwgReader: public Reader
+{
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+};
+*/
+class SW_DLLPUBLIC StgReader : public Reader
+{
+ String aFltName;
+
+protected:
+ sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize );
+
+public:
+ virtual int GetReaderType();
+ const String& GetFltName() { return aFltName; }
+ virtual void SetFltName( const String& r );
+};
+
+
+/*class Sw3Reader : public StgReader
+{
+ Sw3Io* pIO;
+ virtual sal_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 sal_uInt16 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;
+ sal_uLong nErr;
+
+public:
+ SwTextBlocks( const String& );
+ ~SwTextBlocks();
+
+ void Flush(){}
+
+ SwDoc* GetDoc();
+ void ClearDoc(); // Doc-Inhalt loeschen
+ const String& GetName();
+ void SetName( const String& );
+ sal_uLong GetError() const { return nErr; }
+
+ String GetBaseURL() const;
+ void SetBaseURL( const String& rURL );
+
+ sal_Bool IsOld() const;
+ sal_uLong ConvertToNew(); // Textbausteine konvertieren
+
+ sal_uInt16 GetCount() const; // Anzahl Textbausteine ermitteln
+ sal_uInt16 GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ sal_uInt16 GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck
+
+ sal_Bool Delete( sal_uInt16 ); // Loeschen
+ sal_uInt16 Rename( sal_uInt16, const String*, const String* ); // Umbenennen
+ sal_uLong CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+ const String& rLong ); // Block kopieren
+
+ sal_Bool BeginGetDoc( sal_uInt16 ); // Textbaustein einlesen
+ void EndGetDoc(); // Textbaustein wieder loslassen
+
+ sal_Bool BeginPutDoc( const String&, const String& ); // Speichern Beginn
+ sal_uInt16 PutDoc(); // Speichern Ende
+
+ sal_uInt16 PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
+
+ sal_Bool IsOnlyTextBlock( sal_uInt16 ) const;
+ sal_Bool IsOnlyTextBlock( const String& rShort ) const;
+
+ const String& GetFileName() const; // Dateiname von pImp
+ sal_Bool IsReadOnly() const; // ReadOnly-Flag von pImp
+
+ sal_Bool GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl );
+ sal_Bool SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTbl );
+
+ sal_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 sal_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
+ , private ::boost::noncopyable
+{
+ SwAsciiOptions aAscOpts;
+ String sBaseURL;
+
+ void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
+ void _AddFontItems( SfxItemPool& rPool, sal_uInt16 nWhichId );
+
+ ::std::auto_ptr<Writer_Impl> m_pImpl;
+
+protected:
+
+ SwPaM* pOrigPam; // der letze zu bearbeitende Pam
+ const String* pOrigFileName;
+
+ void ResetWriter();
+ sal_Bool CopyNextPam( SwPaM ** );
+
+ void PutNumFmtFontsInAttrPool();
+ void PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL = sal_True );
+ void PutCJKandCTLFontsInAttrPool();
+
+ virtual sal_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;
+ sal_Bool bWriteAll : 1;
+ sal_Bool bShowProgress : 1;
+ sal_Bool bWriteClipboardDoc : 1;
+ sal_Bool bWriteOnlyFirstTable : 1;
+ sal_Bool bASCII_ParaAsCR : 1;
+ sal_Bool bASCII_ParaAsBlanc : 1;
+ sal_Bool bASCII_NoLastLineEnd : 1;
+ sal_Bool bUCS2_WithStartChar : 1;
+ sal_Bool bExportPargraphNumbering : 1;
+
+ sal_Bool bBlock : 1;
+ sal_Bool bOrganizerMode : 1;
+
+ Writer();
+ virtual ~Writer();
+
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
+ sal_uLong Write( SwPaM&, SvStream&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 );
+
+ virtual void SetPasswd( const String& );
+ virtual void SetVersion( const String&, long );
+ virtual sal_Bool IsStgWriter() const;
+// virtual sal_Bool IsSw3Writer() const;
+
+ void SetShowProgress( sal_Bool bFlag = sal_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
+ sal_uInt16 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,
+ sal_uLong const nStartIdx, sal_uLong const nEndIdx);
+
+ // kopiere ggfs. eine lokale Datei ins Internet
+ sal_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, sal_uLong nVal );
+
+ // Hex-Zahl ausgeben, default ist 2.stellige Zahl
+ SvStream& OutHex( SvStream& rStrm, sal_uLong nHex, sal_uInt8 nLen = 2 );
+ // 4-st. Hex-Zahl ausgeben
+ inline SvStream& OutHex4( SvStream& rStrm, sal_uInt16 nHex )
+ { return OutHex( rStrm, nHex, 4 ); }
+
+ inline SvStream& OutHex( sal_uInt16 nHex, sal_uInt8 nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
+ inline SvStream& OutHex4( sal_uInt16 nHex ) { return OutHex( Strm(), nHex, 4 ); }
+ inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
+ inline SvStream& OutULong( sal_uLong nVal ) { return OutULong( Strm(), nVal ); }
+
+ void SetStream(SvStream *const pStream);
+ SvStream& Strm();
+
+ void SetOrganizerMode( sal_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 sal_uLong WriteStream();
+ virtual sal_uLong WriteStorage() = 0;
+ virtual sal_uLong WriteMedium( SfxMedium& ) = 0;
+
+ using Writer::Write;
+
+public:
+ StgWriter() : Writer() {}
+
+ virtual sal_Bool IsStgWriter() const;
+
+ virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 );
+
+ SotStorage& GetStorage() const { return *pStg; }
+};
+
+/*class Sw3Writer : public StgWriter
+{
+ Sw3Io* pIO;
+ sal_Bool bSaveAs : 1;
+
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& );
+
+public:
+ Sw3Writer() : pIO( 0 ), bSaveAs( sal_False ) {}
+
+ virtual sal_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;
+
+ sal_Bool bWriteAll;
+
+public:
+ sal_uLong Write( WriterRef& rxWriter, const String* = 0);
+
+ SwWriter( SvStream&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
+ SwWriter( SvStream&, SwDoc & );
+ SwWriter( SvStream&, SwPaM &, sal_Bool bWriteAll = sal_False );
+
+// SwWriter( SotStorage&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
+ SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
+// SwWriter( SotStorage&, SwPaM&, sal_Bool bWriteAll = sal_False );
+
+ SwWriter( SfxMedium&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
+ SwWriter( SfxMedium&, SwDoc & );
+// SwWriter( SfxMedium&, SwPaM&, sal_Bool bWriteAll = sal_False );
+
+ //const String& GetBaseURL() const { return sBaseURL;}
+};
+
+
+/* */
+/////////////////////////////////////////////////////////////////////////////
+
+typedef Reader* (*FnGetReader)();
+typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
+sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
+
+struct SwReaderWriterEntry
+{
+ Reader* pReader;
+ FnGetReader fnGetReader;
+ FnGetWriter fnGetWriter;
+ sal_Bool bDelReader;
+
+ SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, sal_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..02f9742016ad
--- /dev/null
+++ b/sw/inc/shellres.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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 <svl/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;
+ // custom fields of type css::util::Duration
+ String sDurationFormat;
+
+ //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( sal_uInt16 nNo, sal_Bool bFirst = sal_False,
+ sal_Bool bFollow = sal_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..dbb58486f879
--- /dev/null
+++ b/sw/inc/sortopt.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SORTOPT_HXX
+#define _SORTOPT_HXX
+
+
+#include <svl/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( sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder );
+ SwSortKey( const SwSortKey& rOld );
+
+ String sSortType;
+ SwSortOrder eSortOrder;
+ sal_uInt16 nColumnId;
+ sal_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;
+ sal_uInt16 nLanguage;
+ sal_Bool bTable;
+ sal_Bool bIgnoreCase;
+};
+
+#endif // _SORTOPT_HXX
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
new file mode 100644
index 000000000000..6de36a6ee245
--- /dev/null
+++ b/sw/inc/splargs.hxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..0c611051ba01
--- /dev/null
+++ b/sw/inc/statstr.hrc
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..12c7dc28b857
--- /dev/null
+++ b/sw/inc/stringhash.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
new file mode 100644
index 000000000000..12e245791f4c
--- /dev/null
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
+#define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (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..2768cc50bc82
--- /dev/null
+++ b/sw/inc/swabstdlg.hxx
@@ -0,0 +1,498 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 SwSectionData;
+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( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0;
+};
+
+class AbstractInsFootNoteDlg : public VclAbstractDialog //add for SwInsFootNoteDlg
+{
+public:
+ virtual String GetFontName() = 0;
+ virtual sal_Bool IsEndNote() = 0;
+ virtual String GetStr() = 0;
+ //from class Window
+ virtual void SetHelpId( const rtl::OString& sHelpId ) = 0;
+ virtual void SetText( const XubString& rStr ) = 0;
+};
+
+class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGrfRulerDlg
+{
+public:
+ virtual String GetGraphicName() = 0;
+ virtual sal_Bool IsSimpleLine() = 0;
+ virtual sal_Bool HasImages() const = 0;
+};
+
+class AbstractInsTableDlg : public VclAbstractDialog //add for SwInsTableDlg
+{
+public:
+ virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& 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 sal_Bool IsUrl() = 0;
+ virtual sal_Bool IsNew() = 0;
+ virtual sal_Bool IsUpdate() = 0;
+};
+
+class AbstractMailMergeDlg : public VclAbstractDialog //add for SwMailMergeDlg
+{
+public:
+ virtual sal_uInt16 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 sal_Bool IsThisDocument() const = 0;
+};
+class AbstractMailMergeFieldConnectionsDlg : public VclAbstractDialog //add for SwMailMergeFieldConnectionsDlg
+{
+public:
+ virtual sal_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 SetSectionData(SwSectionData const& 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 sal_uInt8 GetLevel() const = 0;
+ virtual sal_uInt8 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 sal_uInt16 GetKind() = 0;
+ virtual sal_uInt16 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( sal_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 sal_uInt16 GetSelectedIdx() const = 0; // inline
+ virtual void SelectEntryPos(sal_uInt16 nIdx) = 0; // inline
+};
+
+class AbstractSwSplitTableDlg :public VclAbstractDialog //add for SwSplitTableDlg
+{
+public:
+ virtual sal_Bool IsHorizontal() const = 0;
+ virtual sal_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( sal_Bool bShow = sal_True ) = 0; //this method from sfxtabdialog
+ virtual void Initialize(SfxChildWinInfo *pInfo) = 0;
+ virtual void ReInitDlg() = 0;
+ virtual void ActivateDatabasePage() = 0;
+ virtual void ShowPage( sal_uInt16 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( sal_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 sal_Bool ShowPage( sal_uInt16 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, sal_Bool bIsDrwTxtDlg = sal_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, sal_Bool bNextButton = sal_False ) = 0;
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ) = 0; //add for SwEnvDlg
+
+
+ virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
+ SwNewDBMgr* pNewDBMgr, sal_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,
+ sal_uInt8 nDialogMode,
+ int nResId,
+ const String *pCollName = 0,
+ sal_Bool bDraw = sal_False,
+ sal_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,
+ sal_Bool bSetAutoFmt = sal_True,
+ const SwTableAutoFmt* pSelFmt = 0 ) = 0;
+ virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, sal_uInt16 nType, int nResId ) = 0;//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_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, sal_Bool& rWithPrev ) = 0; //add for SwMergeTblDlg
+ virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
+ SfxViewFrame *pFrame, Window *pParent,
+ const SfxItemSet& rCoreSet,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
+ const String* pFmtStr = 0) = 0; //add for SwFrmDlg
+ virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
+ Window* pParent,
+ SfxStyleSheetBase& rBase,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn = sal_False,
+ SwWrtShell* pActShell = 0,
+ sal_Bool bNew = sal_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, sal_Bool bNextButton = sal_False ) = 0; //add for SwFldInputDlg
+ virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg
+ virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
+ SwView& rView, sal_Bool bCol = sal_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, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_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( sal_uInt16 nId ) = 0;
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId ) = 0;
+
+ // for tabpage
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
+};
+
+#endif
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
new file mode 100644
index 000000000000..c83bc740ea0a
--- /dev/null
+++ b/sw/inc/swacorr.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <editeng/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 sal_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 sal_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..cc2f1532a6fc
--- /dev/null
+++ b/sw/inc/swatrset.hxx
@@ -0,0 +1,353 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/itemset.hxx>
+#include <svl/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 sal_uInt16* pVersionMap1;
+ static sal_uInt16* pVersionMap2;
+ static sal_uInt16* pVersionMap3;
+ static sal_uInt16* 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 sal_uInt16* pVersionMap5;
+ static sal_uInt16* pVersionMap6;
+
+ SwDoc* pDoc;
+
+public:
+ SwAttrPool( SwDoc* pDoc );
+protected:
+ virtual ~SwAttrPool();
+public:
+
+ SwDoc* GetDoc() { return pDoc; }
+ const SwDoc* GetDoc() const { return pDoc; }
+
+ static sal_uInt16* GetVersionMap1() { return pVersionMap1; }
+ static sal_uInt16* GetVersionMap2() { return pVersionMap2; }
+ static sal_uInt16* GetVersionMap3() { return pVersionMap3; }
+ static sal_uInt16* 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&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
+ SwAttrSet( SwAttrPool&, const sal_uInt16* nWhichPairTable );
+ SwAttrSet( const SwAttrSet& );
+
+ virtual SfxItemSet* Clone(sal_Bool bItems = sal_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
+ sal_uInt16 ClearItem_BC( sal_uInt16 nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
+ sal_uInt16 ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 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 (sal_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( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
+ inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
+ inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const;
+ inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const;
+ inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const;
+ inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const;
+ inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const;
+ inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const;
+ inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const;
+ inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const;
+ inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const;
+ inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const;
+ inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const;
+ inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const;
+ inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
+ inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
+
+ // Frame-Attribute - impl. steht im frmatr.hxx
+ inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
+ inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
+ inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const;
+ inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const;
+ inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const;
+ inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
+ inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const;
+ inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const;
+ inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const;
+ inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const;
+ inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const;
+ inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const;
+ inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const;
+ inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const;
+ inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const;
+ inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const;
+ inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const;
+ inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const;
+ inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const;
+ inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
+ inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
+ // OD 18.09.2003 #i18732#
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
+ // OD 2004-05-05 #i28701#
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
+
+ // Grafik-Attribute - impl. steht im grfatr.hxx
+ inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
+ inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
+ inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const;
+ inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const;
+ inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const;
+ inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
+
+ // Paragraph-Attribute - impl. steht im paratr.hxx
+ inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
+ inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
+ inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
+ inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const;
+ inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const;
+ inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const;
+ inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const;
+ inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const;
+ inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const;
+ inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
+
+ // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_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..46fbb36df723
--- /dev/null
+++ b/sw/inc/swbaslnk.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ sal_Bool bSwapIn : 1;
+ sal_Bool bNoDataFlag : 1;
+ sal_Bool bIgnoreDataChanged : 1;
+ ReReadThread* m_pReReadThread;
+
+protected:
+ SwBaseLink(): m_pReReadThread(0) {}
+
+ SwBaseLink( const String& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj,
+ SwCntntNode* pNode = 0 )
+ : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
+ bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
+ m_pReReadThread(0)
+ {}
+
+public:
+ TYPEINFO();
+
+ SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 )
+ : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
+ bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_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
+ sal_Bool SwapIn( sal_Bool bWaitForData = sal_False, sal_Bool bNativFormat = sal_False );
+
+ sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
+
+ // nur fuer Grafik-Links ( zum Umschalten zwischen DDE / Grf-Link)
+ void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
+
+ sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const;
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
+ xub_StrLen nEnd = STRING_NOTFOUND ) const;
+
+ void SetNoDataFlag() { bNoDataFlag = sal_True; }
+ sal_Bool ChkNoDataFlag() { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; }
+ sal_Bool IsNoDataFlag() const { return bNoDataFlag; }
+};
+
+
+#endif
+
diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
new file mode 100644
index 000000000000..f7def58ab211
--- /dev/null
+++ b/sw/inc/swcalwrp.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+ sal_uInt16 nLang;
+
+public:
+ SwCalendarWrapper( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xMSF = ::comphelper::getProcessServiceFactory() )
+ : CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM )
+ {}
+
+ void LoadDefaultCalendar( sal_uInt16 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..86a42512475f
--- /dev/null
+++ b/sw/inc/swcli.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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
+{
+ sal_Bool bInDoVerb;
+ sal_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( sal_Bool bFlag ) { bInDoVerb = bFlag; }
+
+ sal_Bool IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
+
+ virtual void FormatChanged();
+};
+
+#endif
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
new file mode 100644
index 000000000000..8d3fe63b75bb
--- /dev/null
+++ b/sw/inc/swcommands.h
@@ -0,0 +1,434 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_SWCOMMANDS_HRC
+#define SW_SWCOMMANDS_HRC
+
+#define CMD_SID_CREATE_SW_DRAWVIEW ".uno:CreateSWDrawView"
+#define CMD_FN_REDLINE_ACCEPT ".uno:AcceptTrackedChanges"
+#define CMD_FN_REDLINE_ON ".uno:TrackChanges"
+#define CMD_FN_ADD_UNKNOWN ".uno:AddAllUnknownWords"
+#define CMD_FN_FRAME_ALIGN_VERT_BOTTOM ".uno:AlignBottom"
+#define CMD_FN_FRAME_ALIGN_VERT_CHAR_BOTTOM ".uno:AlignCharBottom"
+#define CMD_FN_FRAME_ALIGN_VERT_CHAR_TOP ".uno:AlignCharTop"
+#define CMD_FN_FRAME_ALIGN_HORZ_CENTER ".uno:AlignHorizontalCenter"
+#define CMD_FN_FRAME_ALIGN_HORZ_LEFT ".uno:AlignLeft"
+#define CMD_FN_FRAME_ALIGN_HORZ_RIGHT ".uno:AlignRight"
+#define CMD_FN_FRAME_ALIGN_VERT_ROW_BOTTOM ".uno:AlignRowBottom"
+#define CMD_FN_FRAME_ALIGN_VERT_ROW_TOP ".uno:AlignRowTop"
+#define CMD_FN_FRAME_ALIGN_VERT_TOP ".uno:AlignTop"
+#define CMD_FN_FRAME_ALIGN_VERT_CENTER ".uno:AlignVerticalCenter"
+#define CMD_FN_FRAME_ALIGN_VERT_CHAR_CENTER ".uno:AlignVerticalCharCenter"
+#define CMD_FN_FRAME_ALIGN_VERT_ROW_CENTER ".uno:AlignVerticalRowCenter"
+#define CMD_FN_EDIT_AUTH_ENTRY_DLG ".uno:AuthoritiesEntryDialog"
+#define CMD_FN_AUTOFORMAT_APPLY ".uno:AutoFormatApply"
+#define CMD_FN_AUTOFORMAT_REDLINE_APPLY ".uno:AutoFormatRedlineApply"
+#define CMD_FN_TABLE_AUTOSUM ".uno:AutoSum"
+#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND ".uno:BackColor"
+#define CMD_FN_FORMAT_BACKGROUND_DLG ".uno:BackgroundDialog"
+#define CMD_FN_BACKSPACE ".uno:SwBackspace"
+#define CMD_FN_FORMAT_BORDER_DLG ".uno:BorderDialog"
+#define CMD_FN_NUMBER_BULLETS ".uno:BulletsAndNumberingDialog"
+#define CMD_FN_CALC_TABLE ".uno:Calc"
+#define CMD_FN_CALCULATE ".uno:CalculateSel"
+#define CMD_FN_TABLE_VERT_BOTTOM ".uno:CellVertBottom"
+#define CMD_FN_TABLE_VERT_CENTER ".uno:CellVertCenter"
+#define CMD_FN_TABLE_VERT_NONE ".uno:CellVertTop"
+#define CMD_FN_FRAME_CHAIN ".uno:ChainFrames"
+#define CMD_FN_CHANGE_DBFIELD ".uno:ChangeDatabaseField"
+#define CMD_FN_NUMBERING_OUTLINE_DLG ".uno:ChapterNumberingDialog"
+#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ".uno:CharBackgroundExt"
+#define CMD_SID_ATTR_CHAR_COLOR_EXT ".uno:CharColorExt"
+#define CMD_FN_CHAR_LEFT_SEL ".uno:CharLeftSel"
+#define CMD_FN_CHAR_RIGHT_SEL ".uno:CharRightSel"
+#define CMD_FN_CLOSE_PAGEPREVIEW ".uno:ClosePreview"
+#define CMD_FN_REDLINE_COMMENT ".uno:CommentChangeTracking"
+#define CMD_FN_VIEW_META_CHARS ".uno:ControlCodes"
+#define CMD_FN_CONVERT_TEXT_TABLE ".uno:ConvertTableText"
+#define CMD_FN_ABSTRACT_NEWDOC ".uno:CreateAbstract"
+#define CMD_FN_DEC_INDENT_OFFSET ".uno:DecrementIndentValue"
+#define CMD_FN_NUM_BULLET_DOWN ".uno:DecrementLevel"
+#define CMD_FN_NUM_BULLET_OUTLINE_DOWN ".uno:DecrementSubLevels"
+#define CMD_FN_TABLE_DELETE_COL ".uno:DeleteColumns"
+#define CMD_FN_TABLE_DELETE_ROW ".uno:DeleteRows"
+#define CMD_FN_DELETE_WHOLE_LINE ".uno:DelLine"
+#define CMD_FN_DELETE_LINE ".uno:DelToEndOfLine"
+#define CMD_FN_DELETE_PARA ".uno:DelToEndOfPara"
+#define CMD_FN_DELETE_SENT ".uno:DelToEndOfSentence"
+#define CMD_FN_DELETE_WORD ".uno:DelToEndOfWord"
+#define CMD_FN_DELETE_BACK_LINE ".uno:DelToStartOfLine"
+#define CMD_FN_DELETE_BACK_PARA ".uno:DelToStartOfPara"
+#define CMD_FN_DELETE_BACK_SENT ".uno:DelToStartOfSentence"
+#define CMD_FN_DELETE_BACK_WORD ".uno:DelToStartOfWord"
+#define CMD_FN_TABLE_BALANCE_CELLS ".uno:DistributeColumns"
+#define CMD_FN_TABLE_BALANCE_ROWS ".uno:DistributeRows"
+#define CMD_FN_EDIT_CURRENT_TOX ".uno:EditCurIndex"
+#define CMD_FN_GLOSSARY_DLG ".uno:EditGlossary"
+#define CMD_FN_EDIT_HYPERLINK ".uno:EditHyperlink"
+#define CMD_FN_EDIT_REGION ".uno:EditRegion"
+#define CMD_FN_END_OF_DOCUMENT_SEL ".uno:EndOfDocumentSel"
+#define CMD_FN_END_OF_LINE_SEL ".uno:EndOfLineSel"
+#define CMD_FN_END_OF_PARA_SEL ".uno:EndOfParaSel"
+#define CMD_FN_TABLE_SELECT_COL ".uno:EntireColumn"
+#define CMD_FN_TABLE_SELECT_ROW ".uno:EntireRow"
+#define CMD_FN_ESCAPE ".uno:Escape"
+#define CMD_FN_EXECUTE_MACROFIELD ".uno:ExecuteMacroField"
+#define CMD_FN_EXPAND_GLOSSARY ".uno:ExpandGlossary"
+#define CMD_FN_EDIT_FIELD ".uno:FieldDialog"
+#define CMD_FN_VIEW_FIELDNAME ".uno:Fieldnames"
+#define CMD_FN_VIEW_FIELDS ".uno:Fields"
+#define CMD_FN_FLIP_HORZ_GRAFIC ".uno:FlipHorizontal"
+#define CMD_FN_FLIP_VERT_GRAFIC ".uno:FlipVertical"
+#define CMD_SID_ATTR_CHAR_COLOR2 ".uno:FontColor"
+#define CMD_FN_FORMAT_FOOTNOTE_DLG ".uno:FootnoteDialog"
+#define CMD_FN_EDIT_FOOTNOTE ".uno:EditFootnote"
+#define CMD_FN_FORMAT_COLUMN ".uno:FormatColumns"
+#define CMD_FN_FORMAT_DROPCAPS ".uno:FormatDropcap"
+#define CMD_FN_FORMAT_FRAME_DLG ".uno:FrameDialog"
+#define CMD_FN_LINE_DOWN ".uno:GoDown"
+#define CMD_FN_CHAR_LEFT ".uno:GoLeft"
+#define CMD_FN_CHAR_RIGHT ".uno:GoRight"
+#define CMD_FN_FRAME_TO_ANCHOR ".uno:GoToAnchor"
+#define CMD_FN_END_TABLE ".uno:GoToEnd"
+#define CMD_FN_END_OF_COLUMN ".uno:GoToEndOfColumn"
+#define CMD_FN_END_OF_DOCUMENT ".uno:GoToEndOfDoc"
+#define CMD_FN_END_OF_LINE ".uno:GoToEndOfLine"
+#define CMD_FN_END_OF_NEXT_COLUMN ".uno:GoToEndOfNextColumn"
+#define CMD_FN_END_OF_NEXT_PAGE ".uno:GoToEndOfNextPage"
+#define CMD_FN_END_OF_NEXT_PAGE_SEL ".uno:GoToEndOfNextPageSel"
+#define CMD_FN_END_OF_PAGE ".uno:GoToEndOfPage"
+#define CMD_FN_END_OF_PAGE_SEL ".uno:GoToEndOfPageSel"
+#define CMD_FN_END_OF_PARA ".uno:GoToEndOfPara"
+#define CMD_FN_END_OF_PREV_COLUMN ".uno:GoToEndOfPrevColumn"
+#define CMD_FN_END_OF_PREV_PAGE ".uno:GoToEndOfPrevPage"
+#define CMD_FN_END_OF_PREV_PAGE_SEL ".uno:GoToEndOfPrevPageSel"
+#define CMD_FN_NEXT_TOXMARK ".uno:GotoNextIndexMark"
+#define CMD_FN_GOTO_NEXT_INPUTFLD ".uno:GotoNextInputField"
+#define CMD_FN_GOTO_NEXT_OBJ ".uno:GotoNextObject"
+#define CMD_FN_NEXT_PARA ".uno:GoToNextPara"
+#define CMD_FN_GOTO_NEXT_MARK ".uno:GotoNextPlacemarker"
+#define CMD_FN_NEXT_SENT ".uno:GoToNextSentence"
+#define CMD_FN_NEXT_SENT_SEL ".uno:GotoNextSentenceSel"
+#define CMD_FN_NEXT_TBLFML ".uno:GotoNextTableFormula"
+#define CMD_FN_NEXT_WORD ".uno:GoToNextWord"
+#define CMD_FN_NEXT_TBLFML_ERR ".uno:GotoNextWrongTableFormula"
+#define CMD_FN_NAVIGATION_PI_GOTO_PAGE ".uno:GotoPage"
+#define CMD_FN_PREV_TOXMARK ".uno:GotoPrevIndexMark"
+#define CMD_FN_GOTO_PREV_INPUTFLD ".uno:GotoPrevInputField"
+#define CMD_FN_GOTO_PREV_OBJ ".uno:GotoPrevObject"
+#define CMD_FN_PREV_PARA ".uno:GoToPrevPara"
+#define CMD_FN_GOTO_PREV_MARK ".uno:GotoPrevPlacemarker"
+#define CMD_FN_PREV_SENT ".uno:GoToPrevSentence"
+#define CMD_FN_PREV_SENT_SEL ".uno:GotoPrevSentenceSel"
+#define CMD_FN_PREV_TBLFML ".uno:GotoPrevTableFormula"
+#define CMD_FN_PREV_WORD ".uno:GoToPrevWord"
+#define CMD_FN_PREV_TBLFML_ERR ".uno:GotoPrevWrongTableFormula"
+#define CMD_FN_START_TABLE ".uno:GoToStartOfTable"
+#define CMD_FN_START_OF_COLUMN ".uno:GoToStartOfColumn"
+#define CMD_FN_START_OF_DOCUMENT ".uno:GoToStartOfDoc"
+#define CMD_FN_START_OF_LINE ".uno:GoToStartOfLine"
+#define CMD_FN_START_OF_NEXT_COLUMN ".uno:GoToStartOfNextColumn"
+#define CMD_FN_START_OF_NEXT_PAGE ".uno:GoToStartOfNextPage"
+#define CMD_FN_START_OF_NEXT_PAGE_SEL ".uno:GoToStartOfNextPageSel"
+#define CMD_FN_START_OF_PAGE ".uno:GoToStartOfPage"
+#define CMD_FN_START_OF_PAGE_SEL ".uno:GoToStartOfPageSel"
+#define CMD_FN_START_OF_PARA ".uno:GoToStartOfPara"
+#define CMD_FN_START_OF_PREV_COLUMN ".uno:GoToStartOfPrevColumn"
+#define CMD_FN_START_OF_PREV_PAGE ".uno:GoToStartOfPrevPage"
+#define CMD_FN_START_OF_PREV_PAGE_SEL ".uno:GoToStartOfPrevPageSel"
+#define CMD_FN_LINE_UP ".uno:GoUp"
+#define CMD_FN_VIEW_GRAPHIC ".uno:Graphic"
+#define CMD_FN_FORMAT_GRAFIC_DLG ".uno:GraphicDialog"
+#define CMD_FN_SAVE_GRAPHIC ".uno:SaveGraphic"
+#define CMD_FN_GROW_FONT_SIZE ".uno:Grow"
+#define CMD_FN_HSCROLLBAR ".uno:HScroll"
+#define CMD_SID_HTML_MODE ".uno:HtmlMode"
+#define CMD_FN_HYPHENATE_OPT_DLG ".uno:Hyphenate"
+#define CMD_FN_INC_INDENT_OFFSET ".uno:IncrementIndentValue"
+#define CMD_FN_NUM_BULLET_UP ".uno:IncrementLevel"
+#define CMD_FN_NUM_BULLET_OUTLINE_UP ".uno:IncrementSubLevels"
+#define CMD_FN_EDIT_IDX_ENTRY_DLG ".uno:IndexEntryDialog"
+#define CMD_FN_IDX_MARK_TO_IDX ".uno:IndexMarkToIndex"
+#define CMD_FN_POSTIT ".uno:InsertAnnotation"
+#define CMD_FN_INSERT_FLD_AUTHOR ".uno:InsertAuthorField"
+#define CMD_FN_INSERT_AUTH_ENTRY_DLG ".uno:InsertAuthoritiesEntry"
+#define CMD_FN_INSERT_BOOKMARK ".uno:InsertBookmark"
+#define CMD_FN_INSERT_BREAK_DLG ".uno:InsertBreak"
+#define CMD_FN_INSERT_CAPTION ".uno:InsertCaptionDialog"
+#define CMD_FN_INSERT_COLUMN_BREAK ".uno:InsertColumnBreak"
+#define CMD_FN_TABLE_INSERT_COL_DLG ".uno:InsertColumnDialog"
+#define CMD_FN_TABLE_INSERT_COL ".uno:InsertColumns"
+#define CMD_FN_INSERT_REGION ".uno:InsertSection"
+#define CMD_FN_INSERT_CTRL ".uno:InsertCtrl"
+#define CMD_FN_INSERT_FLD_DATE ".uno:InsertDateField"
+#define CMD_FN_INSERT_ENDNOTE ".uno:InsertEndnote"
+#define CMD_FN_ENVELOP ".uno:InsertEnvelope"
+#define CMD_FN_INSERT_FIELD ".uno:InsertField"
+#define CMD_FN_INSERT_FIELD_CTRL ".uno:InsertFieldCtrl"
+#define CMD_FN_INSERT_FOOTNOTE_DLG ".uno:InsertFootnoteDialog"
+#define CMD_FN_INSERT_FOOTNOTE ".uno:InsertFootnote"
+#define CMD_FN_EDIT_FORMULA ".uno:InsertFormula"
+#define CMD_FN_INSERT_FRAME ".uno:InsertFrame"
+#define CMD_FN_INSERT_FRAME_INTERACT ".uno:InsertFrameInteract"
+#define CMD_FN_INSERT_FRAME_INTERACT_NOCOL ".uno:InsertFrameInteractNoColumns"
+#define CMD_FN_INSERT_HRULER ".uno:InsertGraphicRuler"
+#define CMD_FN_INSERT_HYPERLINK ".uno:InsertHyperlinkDlg"
+#define CMD_FN_INSERT_IDX_ENTRY_DLG ".uno:InsertIndexesEntry"
+#define CMD_FN_INSERT_LINEBREAK ".uno:InsertLinebreak"
+#define CMD_FN_INSERT_MULTI_TOX ".uno:InsertMultiIndex"
+#define CMD_FN_NUM_BULLET_NONUM ".uno:InsertNeutralParagraph"
+#define CMD_FN_INSERT_OBJ_CTRL ".uno:InsertObjCtrl"
+#define CMD_FN_INSERT_OBJECT_DLG ".uno:InsertObjectDialog"
+#define CMD_FN_INSERT_SMA ".uno:InsertObjectStarMath"
+#define CMD_FN_INSERT_PAGEBREAK ".uno:InsertPagebreak"
+#define CMD_FN_INSERT_FLD_PGCOUNT ".uno:InsertPageCountField"
+#define CMD_FN_INSERT_PAGEFOOTER ".uno:InsertPageFooter"
+#define CMD_FN_INSERT_PAGEHEADER ".uno:InsertPageHeader"
+#define CMD_FN_INSERT_FLD_PGNUMBER ".uno:InsertPageNumberField"
+#define CMD_FN_INSERT_BREAK ".uno:InsertPara"
+#define CMD_FN_INSERT_REF_FIELD ".uno:InsertReferenceField"
+#define CMD_FN_TABLE_INSERT_ROW_DLG ".uno:InsertRowDialog"
+#define CMD_FN_TABLE_INSERT_ROW ".uno:InsertRows"
+#define CMD_FN_JAVAEDIT ".uno:InsertScript"
+#define CMD_FN_INSERT_TABLE ".uno:InsertTable"
+#define CMD_FN_INSERT_FLD_TIME ".uno:InsertTimeField"
+#define CMD_FN_INSERT_FLD_TITLE ".uno:InsertTitleField"
+#define CMD_FN_INSERT_FLD_TOPIC ".uno:InsertTopicField"
+#define CMD_FN_NUM_BULLET_NEXT ".uno:JumpDownThisLevel"
+#define CMD_FN_END_DOC_DIRECT ".uno:JumpToEndOfDoc"
+#define CMD_FN_TO_FOOTER ".uno:JumpToFooter"
+#define CMD_FN_FOOTNOTE_TO_ANCHOR ".uno:JumpToFootnoteOrAnchor"
+#define CMD_FN_TO_HEADER ".uno:JumpToHeader"
+#define CMD_FN_NEXT_BOOKMARK ".uno:JumpToNextBookmark"
+#define CMD_FN_NEXT_FOOTNOTE ".uno:JumpToNextFootnote"
+#define CMD_FN_CNTNT_TO_NEXT_FRAME ".uno:JumpToNextFrame"
+#define CMD_FN_GOTO_NEXT_REGION ".uno:JumpToNextRegion"
+#define CMD_FN_NEXT_TABLE ".uno:JumpToNextTable"
+#define CMD_FN_PREV_BOOKMARK ".uno:JumpToPrevBookmark"
+#define CMD_FN_PREV_FOOTNOTE ".uno:JumpToPrevFootnote"
+#define CMD_FN_GOTO_PREV_REGION ".uno:JumpToPrevRegion"
+#define CMD_FN_PREV_TABLE ".uno:JumpToPrevTable"
+#define CMD_FN_GOTO_REFERENCE ".uno:JumpToReference"
+#define CMD_FN_START_DOC_DIRECT ".uno:JumpToStartOfDoc"
+#define CMD_FN_NUM_BULLET_PREV ".uno:JumpUpThisLevel"
+#define CMD_FN_LINE_DOWN_SEL ".uno:LineDownSel"
+#define CMD_FN_LINE_NUMBERING_DLG ".uno:LineNumberingDialog"
+#define CMD_FN_LINE_UP_SEL ".uno:LineUpSel"
+#define CMD_FN_EDIT_LINK_DLG ".uno:LinkDialog"
+#define CMD_SID_TEMPLATE_LOAD ".uno:LoadStyles"
+#define CMD_FN_VIEW_MARKS ".uno:Marks"
+#define CMD_FN_TABLE_MERGE_CELLS ".uno:MergeCells"
+#define CMD_FN_QRY_MERGE ".uno:MergeDialog"
+#define CMD_FN_MAILMERGE_WIZARD ".uno:MailMergeWizard"
+#define CMD_FN_TABLE_MERGE_TABLE ".uno:MergeTable"
+#define CMD_FN_FORMAT_APPLY_HEAD1 ".uno:ApplyStyleHead1"
+#define CMD_FN_FORMAT_APPLY_HEAD2 ".uno:ApplyStyleHead2"
+#define CMD_FN_FORMAT_APPLY_HEAD3 ".uno:ApplyStyleHead3"
+#define CMD_FN_FORMAT_APPLY_DEFAULT ".uno:ApplyStyleDefault"
+#define CMD_FN_FORMAT_APPLY_TEXTBODY ".uno:ApplyStyleTextbody"
+#define CMD_FN_GRAPHIC_MIRROR_ON_EVEN_PAGES ".uno:MirrorGraphicOnEvenPages"
+#define CMD_FN_FRAME_MIRROR_ON_EVEN_PAGES ".uno:MirrorOnEvenPages"
+#define CMD_FN_NUM_BULLET_MOVEDOWN ".uno:MoveDown"
+#define CMD_FN_NUM_BULLET_OUTLINE_MOVEDOWN ".uno:MoveDownSubItems"
+#define CMD_FN_NUM_BULLET_MOVEUP ".uno:MoveUp"
+#define CMD_FN_NUM_BULLET_OUTLINE_MOVEUP ".uno:MoveUpSubItems"
+#define CMD_FN_TITLE_DESCRIPTION_SHAPE ".uno:ObjectTitleDescription"
+#define CMD_FN_NAME_SHAPE ".uno:NameGroup"
+#define CMD_FN_NEW_GLOBAL_DOC ".uno:NewGlobalDoc"
+#define CMD_FN_NEW_HTML_DOC ".uno:NewHtmlDoc"
+#define CMD_FN_NUMBER_FORMAT ".uno:NumberFormat"
+#define CMD_FN_NUMBER_CURRENCY ".uno:NumberFormatCurrency"
+#define CMD_FN_NUMBER_DATE ".uno:NumberFormatDate"
+#define CMD_FN_NUMBER_TWODEC ".uno:NumberFormatDecimal"
+#define CMD_FN_NUMBER_PERCENT ".uno:NumberFormatPercent"
+#define CMD_FN_NUMBER_SCIENTIFIC ".uno:NumberFormatScientific"
+#define CMD_FN_NUMBER_STANDARD ".uno:NumberFormatStandard"
+#define CMD_FN_NUMBER_TIME ".uno:NumberFormatTime"
+#define CMD_FN_NUMBER_NEWSTART ".uno:NumberingStart"
+#define CMD_FN_NUM_OR_NONUM ".uno:NumberOrNoNumber"
+#define CMD_FN_FRAME_DOWN ".uno:ObjectBackOne"
+#define CMD_FN_FRAME_UP ".uno:ObjectForwardOne"
+#define CMD_FN_AUTOFORMAT_AUTO ".uno:OnlineAutoFormat"
+#define CMD_FN_OPTIMIZE_TABLE ".uno:OptimizeTable"
+#define CMD_FN_FORMAT_PAGE_COLUMN_DLG ".uno:PageColumnDialog"
+#define CMD_FN_FORMAT_PAGE_DLG ".uno:PageDialog"
+#define CMD_FN_PAGEDOWN ".uno:PageDown"
+#define CMD_FN_PAGEDOWN_SEL ".uno:PageDownSel"
+#define CMD_FN_CHANGE_PAGENUM ".uno:PageOffset"
+#define CMD_FN_SET_PAGE_STYLE ".uno:PageStyleApply"
+#define CMD_FN_STAT_TEMPLATE ".uno:PageStyleName"
+#define CMD_FN_PAGEUP ".uno:PageUp"
+#define CMD_FN_PAGEUP_SEL ".uno:PageUpSel"
+#define CMD_FN_PREVIEW_ZOOM ".uno:PreviewZoom"
+#define CMD_FN_PRINT_LAYOUT ".uno:PrintLayout"
+#define CMD_FN_PRINT_PAGEPREVIEW ".uno:PrintPagePreView"
+#define CMD_FN_TABLE_SET_READ_ONLY_CELLS ".uno:Protect"
+#define CMD_FN_REDLINE_PROTECT ".uno:ProtectTraceChangeMode"
+#define CMD_FN_REFRESH_VIEW ".uno:RefreshView"
+#define CMD_FN_NUM_BULLET_OFF ".uno:RemoveBullets"
+#define CMD_FN_REMOVE_CUR_TOX ".uno:RemoveTableOf"
+#define CMD_FN_REPAGINATE ".uno:Repaginate"
+#define CMD_FN_REPEAT_SEARCH ".uno:RepeatSearch"
+#define CMD_FN_FORMAT_RESET ".uno:ResetAttributes"
+#define CMD_FN_TABLE_UNSET_READ_ONLY ".uno:ResetTableProtection"
+#define CMD_FN_RULER ".uno:Ruler"
+#define CMD_FN_QRY_INSERT ".uno:SbaInsert"
+#define CMD_FN_QRY_INSERT_FIELD ".uno:SbaInsertField"
+#define CMD_FN_QRY_MERGE_FIELD ".uno:SbaMerge"
+#define CMD_FN_SCROLL_NAVIGATION ".uno:ScrollNavigation"
+#define CMD_FN_SCROLL_NEXT_PREV ".uno:ScrollNextPrev"
+#define CMD_FN_TABLE_SELECT_ALL ".uno:SelectTable"
+#define CMD_FN_STAT_SELMODE ".uno:SelectionMode"
+#define CMD_FN_SELECT_PARA ".uno:SelectText"
+#define CMD_FN_SELECT_WORD ".uno:SelectWord"
+#define CMD_FN_ABSTRACT_STARIMPRESS ".uno:SendAbstractToStarImpress"
+#define CMD_FN_OUTLINE_TO_CLIPBOARD ".uno:SendOutlineToClipboard"
+#define CMD_FN_OUTLINE_TO_IMPRESS ".uno:SendOutlineToStarImpress"
+#define CMD_FN_TOOL_ANKER_AT_CHAR ".uno:SetAnchorAtChar"
+#define CMD_FN_TOOL_ANKER_CHAR ".uno:SetAnchorToChar"
+#define CMD_FN_TOOL_ANKER_FRAME ".uno:SetAnchorToFrame"
+#define CMD_FN_TOOL_ANKER_PAGE ".uno:SetAnchorToPage"
+#define CMD_FN_TOOL_ANKER_PARAGRAPH ".uno:SetAnchorToPara"
+#define CMD_FN_TABLE_SET_COL_WIDTH ".uno:SetColumnWidth"
+#define CMD_FN_SET_EXT_MODE ".uno:SetExtSelection"
+#define CMD_FN_SET_ADD_MODE ".uno:SetMultiSelection"
+#define CMD_FN_TABLE_ADJUST_CELLS ".uno:SetOptimalColumnWidth"
+#define CMD_FN_TABLE_OPTIMAL_HEIGHT ".uno:SetOptimalRowHeight"
+#define CMD_FN_TABLE_SET_ROW_HEIGHT ".uno:SetRowHeight"
+#define CMD_FN_SHADOWCURSOR ".uno:ShadowCursor"
+#define CMD_FN_SHIFT_BACKSPACE ".uno:ShiftBackspace"
+#define CMD_FN_SHOW_MULTIPLE_PAGES ".uno:ShowMultiplePages"
+#define CMD_FN_VIEW_NOTES ".uno:ShowAnnotations"
+#define CMD_FN_VIEW_HIDDEN_PARA ".uno:ShowHiddenParagraphs"
+#define CMD_FN_REDLINE_SHOW ".uno:ShowTrackedChanges"
+#define CMD_FN_SHOW_TWO_PAGES ".uno:ShowTwoPages"
+#define CMD_FN_SHOW_BOOKVIEW ".uno:ShowBookview"
+#define CMD_FN_SHRINK_FONT_SIZE ".uno:Shrink"
+#define CMD_FN_SORTING_DLG ".uno:SortDialog"
+#define CMD_FN_TABLE_SPLIT_CELLS ".uno:SplitCell"
+#define CMD_FN_TABLE_SPLIT_TABLE ".uno:SplitTable"
+#define CMD_FN_AUTO_CORRECT ".uno:StartAutoCorrect"
+#define CMD_FN_START_OF_DOCUMENT_SEL ".uno:StartOfDocumentSel"
+#define CMD_FN_START_OF_LINE_SEL ".uno:StartOfLineSel"
+#define CMD_FN_START_OF_PARA_SEL ".uno:StartOfParaSel"
+#define CMD_FN_STAT_BOOKMARK ".uno:StateBookmark"
+#define CMD_FN_STAT_PAGE ".uno:StatePageNumber"
+#define CMD_FN_STAT_ZOOM ".uno:StateZoom"
+#define CMD_FN_SET_SUB_SCRIPT ".uno:SubScript"
+#define CMD_FN_SET_SUPER_SCRIPT ".uno:SuperScript"
+#define CMD_FN_SBA_BRW_INSERT ".uno:SwBrwInsert"
+#define CMD_FN_SBA_BRW_MERGE ".uno:SwMailMerge"
+#define CMD_FN_SBA_BRW_UPDATE ".uno:SwUpdate"
+#define CMD_FN_SYNC_LABELS ".uno:SynchronizeLabelsDlg"
+#define CMD_FN_VIEW_TABLEGRID ".uno:TableBoundaries"
+#define CMD_FN_FORMAT_TABLE_DLG ".uno:TableDialog"
+#define CMD_FN_TABLE_MODE_FIX ".uno:TableModeFix"
+#define CMD_FN_TABLE_MODE_FIX_PROP ".uno:TableModeFixProp"
+#define CMD_FN_TABLE_MODE_VARIABLE ".uno:TableModeVariable"
+#define CMD_FN_NUM_FORMAT_TABLE_DLG ".uno:TableNumberFormatDialog"
+#define CMD_FN_SET_MODOPT_TBLNUMFMT ".uno:TableNumberRecognition"
+#define CMD_FN_DRAWTEXT_ATTR_DLG ".uno:TextAttributes"
+#define CMD_FN_DRAW_WRAP_DLG ".uno:TextWrap"
+#define CMD_FN_THESAURUS_DLG ".uno:ThesaurusDialog"
+#define CMD_FN_TOOL_ANKER ".uno:ToggleAnchorType"
+#define CMD_FN_TOOL_HIERARCHIE ".uno:ToggleObjectLayer"
+#define CMD_FN_UNDERLINE_DOUBLE ".uno:UnderlineDouble"
+#define CMD_FN_FRAME_UNCHAIN ".uno:UnhainFrames"
+#define CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ".uno:UnsetCellsReadOnly"
+#define CMD_FN_UPDATE_ALL ".uno:UpdateAll"
+#define CMD_FN_UPDATE_TOX ".uno:UpdateAllIndexes"
+#define CMD_FN_UPDATE_ALL_LINKS ".uno:UpdateAllLinks"
+#define CMD_FN_UPDATE_CHARTS ".uno:UpdateCharts"
+#define CMD_FN_UPDATE_CUR_TOX ".uno:UpdateCurIndex"
+#define CMD_FN_UPDATE_FIELDS ".uno:UpdateFields"
+#define CMD_FN_UPDATE_INPUTFIELDS ".uno:UpdateInputFields"
+#define CMD_FN_VIEW_BOUNDS ".uno:ViewBounds"
+#define CMD_FN_VLINEAL ".uno:VRuler"
+#define CMD_FN_VSCROLLBAR ".uno:VScroll"
+#define CMD_FN_PREV_WORD_SEL ".uno:WordLeftSel"
+#define CMD_FN_NEXT_WORD_SEL ".uno:WordRightSel"
+#define CMD_FN_WRAP_ANCHOR_ONLY ".uno:WrapAnchorOnly"
+#define CMD_FN_FRAME_WRAP_CONTOUR ".uno:WrapContour"
+#define CMD_FN_FRAME_WRAP_IDEAL ".uno:WrapIdeal"
+#define CMD_FN_FRAME_WRAP_LEFT ".uno:WrapLeft"
+#define CMD_FN_FRAME_NOWRAP ".uno:WrapOff"
+#define CMD_FN_FRAME_WRAP ".uno:WrapOn"
+#define CMD_FN_FRAME_WRAP_RIGHT ".uno:WrapRight"
+#define CMD_FN_FRAME_WRAPTHRU ".uno:WrapThrough"
+#define CMD_FN_FRAME_WRAPTHRU_TRANSP ".uno:WrapThroughTransparent"
+#define CMD_FN_INSERT_STRING ".uno:InsertText"
+#define CMD_SID_ATTR_PARA_NUMRULE ".uno:NumRule"
+#define CMD_SID_ATTR_PARA_OUTLINE_LEVEL ".uno:OutlineLevel"
+#define CMD_FN_NUMBER_NEWSTART_AT ".uno:NumNewStartAt"
+#define CMD_FN_FORMAT_LINENUMBER ".uno:LineNumber"
+#define CMD_SID_ATTR_PARA_PAGENUM ".uno:PageNumber"
+#define CMD_SID_ATTR_PARA_REGISTER ".uno:RegisterTrue"
+#define CMD_FN_TO_FOOTNOTE_AREA ".uno:JumpToFootnoteArea"
+#define CMD_FN_TXTATR_INET ".uno:HyperlinkAttributes"
+#define CMD_FN_INSERT_GLOSSARY ".uno:InsertGlossary"
+#define CMD_FN_NEW_GLOSSARY ".uno:NewGlossary"
+#define CMD_FN_SET_ACT_GLOSSARY ".uno:SetActGlossaryGroup"
+#define CMD_FN_DELETE_BOOKMARK ".uno:DeleteBookmark"
+#define CMD_FN_DROP_TEXT ".uno:SetDropCapText"
+#define CMD_FN_DROP_CHAR_STYLE_NAME ".uno:SetDropCapCharStyleName"
+#define CMD_FN_READONLY_SELECTION_MODE ".uno:SelectTextMode"
+#define CMD_FN_INSERT_DBFIELD ".uno:InsertDBField"
+#define CMD_FN_GOTO_NEXT_CELL ".uno:JumpToNextCell"
+#define CMD_FN_GOTO_PREV_CELL ".uno:JumpToPrevCell"
+#define CMD_FN_INSERT_FIELD_DATA_ONLY ".uno:InsertFieldDataOnly"
+#define CMD_SID_ATTR_BRUSH_ROW ".uno:TableRowBackground"
+#define CMD_SID_ATTR_BRUSH_TABLE ".uno:TableBackground"
+#define CMD_FN_TABLE_ROW_SPLIT ".uno:RowSplit"
+#define CMD_FN_MAILMERGE_CHILDWINDOW ".uno:MailmergeChildWindow"
+#define CMD_FN_WORDCOUNT_DIALOG ".uno:WordCountDialog"
+#define CMD_FN_MAILMERGE_SENDMAIL_CHILDWINDOW ".uno:SendMailChildWindow"
+#define CMD_FN_TABLE_DELETE_TABLE ".uno:DeleteTable"
+#define CMD_FN_TABLE_SELECT_CELL ".uno:EntireCell"
+#define CMD_FN_CONVERT_TABLE_TO_TEXT ".uno:ConvertTableToText"
+#define CMD_FN_CONVERT_TEXT_TO_TABLE ".uno:ConvertTextToTable"
+#define CMD_FN_TABLE_HEADLINE_REPEAT ".uno:HeadingRowsRepeat"
+#define CMD_FN_TABLE_SORT_DIALOG ".uno:TableSort"
+#define CMD_FN_XFORMS_DESIGN_MODE ".uno:SwitchXFormsDesignMode"
+#define CMD_FN_REMOVE_DIRECT_CHAR_FORMATS ".uno:RemoveDirectCharFormats"
+#define CMD_FN_NUM_CONTINUE ".uno:ContinueNumbering"
+#define CMD_FN_SELECTION_MODE_DEFAULT ".uno:SelectionModeDefault"
+#define CMD_FN_DELETE_NOTE ".uno:DeleteNote"
+#define CMD_FN_REPLY ".uno:ReplyNote"
+#define CMD_FN_DELETE_COMMENT ".uno:DeleteComment"
+#define CMD_FN_DELETE_NOTE_AUTHOR ".uno:DeleteAuthor"
+#define CMD_FN_DELETE_ALL_NOTES ".uno:DeleteAllNotes"
+#define CMD_FN_HIDE_NOTE ".uno:HideNote"
+#define CMD_FN_HIDE_NOTE_AUTHOR ".uno:HideAuthor"
+#define CMD_SID_ATTR_VIEWLAYOUT ".uno:ViewLayout"
+#define CMD_FN_HIDE_ALL_NOTES ".uno:HideAllNotes"
+#define CMD_FN_SELECTION_MODE_BLOCK ".uno:SelectionModeBlock"
+#define CMD_FN_SPELL_GRAMMAR_DIALOG ".uno:SpellingAndGrammarDialog"
+#define CMD_FN_REDLINE_ACCEPT_DIRECT ".uno:AcceptTracedChange"
+#define CMD_FN_REDLINE_REJECT_DIRECT ".uno:RejectTracedChange"
+#define CMD_FN_REMOVE_HYPERLINK ".uno:RemoveHyperlink"
+#define CMD_FN_COPY_HYPERLINK_LOCATION ".uno:CopyHyperlinkLocation"
+
+#endif
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
new file mode 100644
index 000000000000..925e6522a120
--- /dev/null
+++ b/sw/inc/swcrsr.hxx
@@ -0,0 +1,308 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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*, sal_Bool ) = 0;
+ virtual int IsReplaceMode() const = 0;
+};
+
+typedef sal_uInt16 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
+ sal_uInt8 nCursorBidiLevel; // bidi level of the cursor
+ bool mbColumnSelection; // true: cursor is aprt of a column selection
+
+ sal_uLong FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, sal_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(
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_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);
+
+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;
+
+
+ sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ sal_Bool& bCancel,
+ FindRanges = FND_IN_BODY,
+ int bReplace = sal_False );
+ sal_uLong Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ sal_Bool& bCancel,
+ FindRanges = FND_IN_BODY,
+ const SwTxtFmtColl* pReplFmt = 0 );
+ sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ sal_Bool& bCancel,
+ FindRanges = FND_IN_BODY,
+ const com::sun::star::util::SearchOptions* pSearchOpt = 0,
+ const SfxItemSet* rReplSet = 0 );
+
+ // UI versions
+ sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsStartEndSentence( bool bEnd ) const;
+ sal_Bool GoStartWord();
+ sal_Bool GoEndWord();
+ sal_Bool GoNextWord();
+ sal_Bool GoPrevWord();
+ sal_Bool SelectWord( ViewShell* pViewShell, const Point* pPt = 0 );
+
+ // API versions of above functions (will be used with a different
+ // WordType for the break iterator)
+ sal_Bool IsStartWordWT( sal_Int16 nWordType ) const;
+ sal_Bool IsEndWordWT( sal_Int16 nWordType ) const;
+ sal_Bool IsInWordWT( sal_Int16 nWordType ) const;
+ sal_Bool GoStartWordWT( sal_Int16 nWordType );
+ sal_Bool GoEndWordWT( sal_Int16 nWordType );
+ sal_Bool GoNextWordWT( sal_Int16 nWordType );
+ sal_Bool GoPrevWordWT( sal_Int16 nWordType );
+ sal_Bool SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt = 0 );
+
+ enum SentenceMoveType
+ {
+ NEXT_SENT,
+ PREV_SENT,
+ START_SENT,
+ END_SENT
+ };
+ sal_Bool GoSentence(SentenceMoveType eMoveType);
+ sal_Bool GoNextSentence(){return GoSentence(NEXT_SENT);}
+ sal_Bool GoEndSentence(){return GoSentence(END_SENT);}
+ sal_Bool GoPrevSentence(){return GoSentence(PREV_SENT);}
+ sal_Bool GoStartSentence(){return GoSentence(START_SENT);}
+ sal_Bool ExpandToSentenceBorders();
+
+ virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr );
+ sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt, Point* pPt, long nUpDownX );
+ sal_Bool LeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False );
+ sal_Bool IsAtLeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False ) const;
+ sal_Bool SttEndDoc( sal_Bool bSttDoc );
+ sal_Bool GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt );
+
+ sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden )
+ { return LeftRight( sal_True, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); }
+ sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden )
+ { return LeftRight( sal_False, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); }
+ sal_Bool GoNextCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_True, nCnt ); }
+ sal_Bool GoPrevCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_False, nCnt ); }
+ virtual sal_Bool GotoTable( const String& rName );
+ sal_Bool GotoTblBox( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
+ sal_Bool GotoFtnAnchor();
+ sal_Bool GotoFtnTxt();
+ sal_Bool GotoNextFtnAnchor();
+ sal_Bool GotoPrevFtnAnchor();
+ sal_Bool GotoNextFtnCntnt();
+ sal_Bool GotoPrevFtnCntnt();
+
+ sal_Bool MovePara( SwWhichPara, SwPosPara );
+ sal_Bool MoveSection( SwWhichSection, SwPosSection );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_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 sal_Bool IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+ virtual sal_Bool IsInProtectTable( sal_Bool bMove = sal_False,
+ sal_Bool bChgCrsr = sal_True );
+ sal_Bool IsNoCntnt() const;
+
+ void RestoreSavePos(); // Point auf die SavePos setzen
+
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
+
+ // darf der Cursor in ReadOnlyBereiche?
+ virtual bool IsReadOnlyAvailable() const;
+
+ virtual sal_Bool IsSkipOverProtectSections() const;
+ virtual sal_Bool IsSkipOverHiddenSections() const;
+
+ sal_uInt8 GetCrsrBidiLevel() const { return nCursorBidiLevel; }
+ void SetCrsrBidiLevel( sal_uInt8 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
+{
+ sal_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:
+ sal_uLong nTblPtNd, nTblMkNd;
+ xub_StrLen nTblPtCnt, nTblMkCnt;
+ SwSelBoxes aSelBoxes;
+ sal_Bool bChg : 1;
+ sal_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 sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr );
+ virtual sal_Bool GotoTable( const String& rName );
+
+ void InsertBox( const SwTableBox& rTblBox );
+ void DeleteBox( sal_uInt16 nPos ) { aSelBoxes.Remove( nPos ); bChg = sal_True; }
+ sal_uInt16 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?
+ sal_Bool HasReadOnlyBoxSel() const;
+
+ // wurde der TabelleCursor veraendert ? Wenn ja speicher gleich
+ // die neuen Werte.
+ sal_Bool IsCrsrMovedUpdt();
+ // wurde der TabelleCursor veraendert ?
+ sal_Bool IsCrsrMoved() const
+ {
+ return nTblMkNd != GetMark()->nNode.GetIndex() ||
+ nTblPtNd != GetPoint()->nNode.GetIndex() ||
+ nTblMkCnt != GetMark()->nContent.GetIndex() ||
+ nTblPtCnt != GetPoint()->nContent.GetIndex();
+ }
+
+ sal_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..a19cd67e8783
--- /dev/null
+++ b/sw/inc/swdbdata.hxx
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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){}
+
+ sal_Bool operator !=(const SwDBData& rCmp) const
+ {return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;}
+ sal_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..067e58cbcf52
--- /dev/null
+++ b/sw/inc/swdbtoolsclient.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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 getFormattedValue(
+ 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..a06f8b08e073
--- /dev/null
+++ b/sw/inc/swddetbl.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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,
+ sal_Bool bUpdate = sal_True );
+ ~SwDDETable();
+
+ void ChangeContent();
+ sal_Bool NoDDETable();
+
+ SwDDEFieldType* GetDDEFldType();
+ inline const SwDDEFieldType* GetDDEFldType() const;
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
+};
+
+
+// ----------- 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..dd033fdea760
--- /dev/null
+++ b/sw/inc/swdll.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef 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..74755e45b74b
--- /dev/null
+++ b/sw/inc/swerror.h
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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( sal_uLong nErr )
+{
+ return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
+}
+
+inline FASTBOOL IsError( sal_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..4194042d2327
--- /dev/null
+++ b/sw/inc/swevent.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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; }
+
+ sal_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..50f645db8cfb
--- /dev/null
+++ b/sw/inc/swfltopt.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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 );
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+};
+
+#endif
diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx
new file mode 100644
index 000000000000..8b65028166a3
--- /dev/null
+++ b/sw/inc/swgstr.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+ sal_Bool bPasswd; // sal_True wenn mit Passwort
+ void encode( sal_Char*, sal_uInt16 ); // Puffer codieren/decodieren
+public:
+ swcrypter();
+ sal_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
+ sal_uInt16 nBuflen; // Laenge des Zwischenpuffers
+ short nLong; // Long-Laenge (3 oder 4)
+ sal_Bool bTempStrm; // sal_True: Stream loeschen
+ void checkbuf( sal_uInt16 ); // 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(); }
+
+ sal_uInt8 get();
+ void get( void* p, sal_uInt16 n ) { pStrm->Read( (sal_Char*) p, n ); }
+
+ inline swstreambase& operator>>( sal_Char& );
+ inline swstreambase& operator>>( sal_uInt8& );
+ inline swstreambase& operator>>( short& );
+ inline swstreambase& operator>>( sal_uInt16& );
+ swstreambase& operator>>( long& );
+ inline swstreambase& operator>>( sal_uLong& );
+};
+
+inline swstreambase& swstreambase::operator>>( sal_Char& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( sal_uInt8& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( short& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( sal_uInt16& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( sal_uLong& c )
+{
+ return *this >> (long&) c;
+}
+
+class swistream : public swstreambase {
+ sal_uInt8 cType; // Record-Typ
+ sal_uLong nOffset; // Record-Offset-Portion
+public:
+ swistream( SvStream& );
+
+ sal_uInt8 peek(); // 1 Byte testen
+ sal_uInt8 next(); // Blockstart
+ sal_uInt8 cur() { return cType; } // aktueller Block
+ sal_uInt8 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..c4a29135abcb
--- /dev/null
+++ b/sw/inc/swhints.hxx
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/smplhint.hxx>
+
+#define SW_BROADCASTID_START SFX_HINT_USER00
+#define SW_BROADCAST_DRAWVIEWS_CREATED SW_BROADCASTID_START
+
+
+#endif
diff --git a/sw/inc/switerator.hxx b/sw/inc/switerator.hxx
new file mode 100755
index 000000000000..be729771b54b
--- /dev/null
+++ b/sw/inc/switerator.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SWITERATOR_HXX
+#define _SWITERATOR_HXX
+
+#include <calbck.hxx>
+#include <tools/debug.hxx>
+
+template< class TElementType, class TSource > class SwIterator
+{
+ SwClientIter aClientIter;
+public:
+
+ SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { DBG_ASSERT( TElementType::IsOf( TYPE(SwClient) ), "Incompatible types!" ); }
+ TElementType* First() { SwClient* p = aClientIter.First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ TElementType* Last() { SwClient* p = aClientIter.Last( TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ TElementType* Next() { SwClient* p = aClientIter.Next(); return PTR_CAST(TElementType,p); }
+ TElementType* Previous() { SwClient* p = aClientIter.Previous(); return PTR_CAST(TElementType,p); }
+ static TElementType* FirstElement( const TSource& rMod ) { SwClient* p = SwClientIter(rMod).First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ bool IsChanged() { return aClientIter.IsChanged(); }
+};
+
+#endif
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
new file mode 100644
index 000000000000..2682d2c9eaf1
--- /dev/null
+++ b/sw/inc/swmodule.hxx
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <tools/fldunit.hxx>
+#include <svl/lstner.hxx>
+#include <unotools/options.hxx>
+#include <sfx2/module.hxx>
+
+#include <tools/shl.hxx>
+#include <svl/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, public utl::ConfigurationListener
+{
+ 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 );
+
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
+
+protected:
+ // Briefumschlaege, Etiketten
+ void InsertEnv(SfxRequest&);
+ void InsertLab(SfxRequest&, sal_Bool bLabel);
+
+public:
+ // public Data - used for internal Clipboard / Drag & Drop / XSelection
+ SwTransferable *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, sal_Bool bWeb );
+ void ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_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, sal_Bool bOnlyIfAvailable = sal_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/swrect.hxx b/sw/inc/swrect.hxx
new file mode 100644
index 000000000000..1cf85bfd5c42
--- /dev/null
+++ b/sw/inc/swrect.hxx
@@ -0,0 +1,364 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+{
+ Point m_Point;
+ Size m_Size;
+
+
+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;
+
+ sal_Bool IsInside( const Point& rPOINT ) const;
+ sal_Bool IsNear(const Point& rPoint, long nTolerance ) const;
+ sal_Bool IsInside( const SwRect& rRect ) const;
+ sal_Bool IsOver( const SwRect& rRect ) const;
+ inline sal_Bool HasArea() const;
+ inline sal_Bool IsEmpty() const;
+ inline void Clear();
+
+ inline SwRect &operator = ( const SwRect &rRect );
+
+ inline sal_Bool operator == ( const SwRect& rRect ) const;
+ inline sal_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;
+ sal_Bool OverStepLeft( long ) const;
+ sal_Bool OverStepBottom( long ) const;
+ sal_Bool OverStepTop( long ) const;
+ sal_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 sal_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 )
+{
+ m_Point = rNP;
+ m_Size = rNS;
+}
+inline void SwRect::Pos( const Point& rNew )
+{
+ m_Point = rNew;
+}
+inline void SwRect::Pos( const long nNewX, const long nNewY )
+{
+ m_Point.setX(nNewX);
+ m_Point.setY(nNewY);
+}
+inline void SwRect::SSize( const Size& rNew )
+{
+ m_Size = rNew;
+}
+inline void SwRect::SSize( const long nNewHeight, const long nNewWidth )
+{
+ m_Size.setWidth(nNewWidth);
+ m_Size.setHeight(nNewHeight);
+}
+inline void SwRect::Width( long nNew )
+{
+ m_Size.setWidth(nNew);
+}
+inline void SwRect::Height( long nNew )
+{
+ m_Size.setHeight(nNew);
+}
+inline void SwRect::Left( const long nLeft )
+{
+ m_Size.Width() += m_Point.getX() - nLeft;
+ m_Point.setX(nLeft);
+}
+inline void SwRect::Right( const long nRight )
+{
+ m_Size.setWidth(nRight - m_Point.getX() + 1);
+}
+inline void SwRect::Top( const long nTop )
+{
+ m_Size.Height() += m_Point.getY() - nTop;
+ m_Point.setY(nTop);
+}
+inline void SwRect::Bottom( const long nBottom )
+{
+ m_Size.setHeight(nBottom - m_Point.getY() + 1);
+}
+
+//----------------------------------- Get-Methoden
+inline const Point &SwRect::Pos() const
+{
+ return m_Point;
+}
+inline Point &SwRect::Pos()
+{
+ return m_Point;
+}
+inline const Size &SwRect::SSize() const
+{
+ return m_Size;
+}
+inline Size &SwRect::SSize()
+{
+ return m_Size;
+}
+inline long SwRect::Width() const
+{
+ return m_Size.Width();
+}
+inline long SwRect::Height() const
+{
+ return m_Size.Height();
+}
+inline long SwRect::Left() const
+{
+ return m_Point.X();
+}
+inline long SwRect::Right() const
+{
+ return m_Size.getWidth() ? m_Point.getX() + m_Size.getWidth() - 1 : m_Point.getX();
+}
+inline long SwRect::Top() const
+{
+ return m_Point.Y();
+}
+inline long SwRect::Bottom() const
+{
+ return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY();
+}
+
+//----------------------------------- operatoren
+inline SwRect &SwRect::operator = ( const SwRect &rRect )
+{
+ m_Point = rRect.m_Point;
+ m_Size = rRect.m_Size;
+ return *this;
+}
+inline sal_Bool SwRect::operator == ( const SwRect& rRect ) const
+{
+ return (m_Point == rRect.m_Point && m_Size == rRect.m_Size);
+}
+inline sal_Bool SwRect::operator != ( const SwRect& rRect ) const
+{
+ return (m_Point != rRect.m_Point || m_Size != rRect.m_Size);
+}
+
+inline SwRect &SwRect::operator+=( const Point &rPt )
+{
+ m_Point += rPt;
+ return *this;
+}
+inline SwRect &SwRect::operator-=( const Point &rPt )
+{
+ m_Point -= rPt;
+ return *this;
+}
+
+inline SwRect &SwRect::operator+=( const Size &rSz )
+{
+ m_Size.Width() += rSz.Width();
+ m_Size.Height() += rSz.Height();
+ return *this;
+}
+inline SwRect &SwRect::operator-=( const Size &rSz )
+{
+ m_Size.Width() -= rSz.Width();
+ m_Size.Height() -= rSz.Height();
+ return *this;
+}
+
+
+//--------------------------- Sonstiges
+inline Rectangle SwRect::SVRect() const
+{
+ ASSERT( !IsEmpty(), "SVRect() without Width or Height" );
+ return Rectangle( m_Point.getX(), m_Point.getY(),
+ m_Point.getX() + m_Size.getWidth() - 1, //Right()
+ m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom()
+}
+
+inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const
+{
+ return SwRect( *this ).Intersection( rRect );
+}
+
+inline sal_Bool SwRect::HasArea() const
+{
+ return !IsEmpty();
+}
+inline sal_Bool SwRect::IsEmpty() const
+{
+ return !(m_Size.getHeight() && m_Size.getWidth());
+}
+inline void SwRect::Clear()
+{
+ m_Point.setX(0);
+ m_Point.setY(0);
+ m_Size.setWidth(0);
+ m_Size.setHeight(0);
+}
+
+//-------------------------- CToren
+inline SwRect::SwRect() :
+ m_Point( 0, 0 ),
+ m_Size( 0, 0 )
+{
+}
+inline SwRect::SwRect( const SwRect &rRect ) :
+ m_Point( rRect.m_Point ),
+ m_Size( rRect.m_Size )
+{
+}
+inline SwRect::SwRect( const Point& rLT, const Size& rSize ) :
+ m_Point( rLT ),
+ m_Size( rSize )
+{
+}
+inline SwRect::SwRect( const Point& rLT, const Point& rRB ) :
+ m_Point( rLT ),
+ m_Size( rRB.X() - rLT.X() + 1, rRB.Y() - rLT.Y() + 1 )
+{
+}
+inline SwRect::SwRect( long X, long Y, long W, long H ) :
+ m_Point( X, Y ),
+ m_Size( W, H )
+{
+}
+
+
+#endif //_SWRECT_HXX
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
new file mode 100644
index 000000000000..5693622409aa
--- /dev/null
+++ b/sw/inc/swregion.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SWREGION_HXX
+#define _SWREGION_HXX
+
+#include <svl/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 sal_uInt16 nPos, sal_Bool &rDel);
+
+public:
+ SwRegionRects( const SwRect& rStartRect, sal_uInt16 nInit = 20,
+ sal_uInt16 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( sal_Bool bFuzzy = sal_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..797c57db44d7
--- /dev/null
+++ b/sw/inc/swserv.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_Bool GetData( ::com::sun::star::uno::Any & rData,
+ const String & rMimeType,
+ sal_Bool bSynchron = sal_False );
+
+ sal_Bool SetData( const String & rMimeType,
+ const ::com::sun::star::uno::Any& rData );
+
+ virtual void SendDataChanged( const SwPosition& rPos );
+ virtual void SendDataChanged( const SwPaM& rRange );
+
+ sal_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..cd266fb3d68d
--- /dev/null
+++ b/sw/inc/swstyle.h
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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..80e54c7e7468
--- /dev/null
+++ b/sw/inc/swtable.hxx
@@ -0,0 +1,494 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+#include <tools/ref.hxx>
+#include <svl/svarray.hxx>
+#include <tblenum.hxx>
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <swrect.hxx>
+#ifndef DBG_UTIL
+#include <node.hxx> // fuer StartNode->GetMyIndex
+#else
+class SwStartNode;
+#include <memory>
+#include <boost/noncopyable.hpp>
+#endif
+
+class SwFmt;
+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
+{
+
+
+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;
+
+ sal_uInt16 nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
+ // noch ein Resize der Tbl. anstossen
+ sal_uInt16 nRowsToRepeat; // number of rows to repeat on every page
+
+ sal_Bool bModifyLocked :1;
+ sal_Bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel
+#ifdef DBG_UTIL
+ bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
+#endif
+
+ sal_Bool IsModifyLocked(){ return bModifyLocked;}
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
+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();
+ sal_Bool OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
+ sal_Bool OldSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool );
+ sal_Bool NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
+ SwTableBox*, SwUndoTblMerge* );
+ sal_Bool NewSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool );
+ SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const;
+ void InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nIdx, sal_uInt16 nCnt );
+ sal_Bool _InsertRow( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, sal_Bool bBehind );
+ sal_Bool NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_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, sal_Bool bCurRowOnly );
+
+public:
+
+ SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; }
+ const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
+ void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang!
+
+ sal_uInt16 IncGrfsThatResize() { return ++nGrfsThatResize; }
+ sal_uInt16 DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
+
+ void LockModify() { bModifyLocked = sal_True; } //Muessen _immer_ paarig
+ void UnlockModify() { bModifyLocked = sal_False;} //benutzt werden!
+
+ void SetTableModel( sal_Bool bNew ){ bNewModel = bNew; }
+ sal_Bool IsNewModel() const { return bNewModel; }
+
+ sal_uInt16 GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
+ sal_uInt16 _GetRowsToRepeat() const { return nRowsToRepeat; }
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
+
+ bool IsHeadline( const SwTableLine& rLine ) const;
+
+ SwTableLines &GetTabLines() { return aLines; }
+ const SwTableLines &GetTabLines() const { return aLines; }
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwTableFmt* GetTableFmt() const { return (SwTableFmt*)GetRegisteredIn(); }
+
+ void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
+ sal_Bool bHidden = sal_False, sal_Bool bCurRowOnly = sal_False ) const;
+ void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, sal_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( sal_uInt16 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( sal_uInt16 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.
+
+ sal_Bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
+ SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
+ {
+#ifdef DBG_UTIL
+ bDontChangeModel = true;
+#endif
+ return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
+ OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
+ }
+ sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1,
+ sal_Bool bSameHeight = sal_False )
+ {
+#ifdef DBG_UTIL
+ 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 );
+
+ sal_Bool InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool AppendRow( SwDoc* pDoc, sal_uInt16 nCnt = 1 );
+ void PrepareDelBoxes( const SwSelBoxes& rBoxes );
+ sal_Bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
+ SwUndo* pUndo, const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder );
+ sal_Bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 );
+ sal_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 sal_uInt16 _GetBoxNum( String& rStr,
+ sal_Bool bFirst = sal_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.
+ sal_Bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
+ sal_Bool bCpyNds = sal_True, sal_Bool bCpyName = sal_False ) const;
+ // kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX)
+ sal_Bool InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
+ SwUndoTblCpyTbl* pUndo = 0 );
+ sal_Bool InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ SwUndoTblCpyTbl* pUndo = 0 );
+ sal_Bool InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ SwUndoTblCpyTbl* pUndo );
+ // kopiere die Headline (mit Inhalt!) der Tabelle in eine andere
+ sal_Bool CopyHeadlineIntoTable( SwTableNode& rTblNd );
+
+ // erfrage die Box, dessen Start-Index auf nBoxStt steht
+ SwTableBox* GetTblBox( sal_uLong nSttIdx );
+ const SwTableBox* GetTblBox( sal_uLong nSttIdx ) const
+ { return ((SwTable*)this)->GetTblBox( nSttIdx ); }
+
+ // returnt sal_True wenn sich in der Tabelle Verschachtelungen befinden
+ sal_Bool IsTblComplex() const;
+
+ //returnt sal_True wenn die Tabelle oder Selektion ausgeglichen ist
+ sal_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 = sal_True -> hoch bis zur Grundline,
+ // sal_False-> sonst nur die Line der Box
+ SwSelBoxes& SelLineFromBox( const SwTableBox* pBox,
+ SwSelBoxes& rBoxes, sal_Bool bToTop = sal_True ) const;
+ // erfrage vom Client Informationen
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+
+ // suche im Format nach der angemeldeten Tabelle
+ static SwTable * FindTable( SwFrmFmt const*const 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; }
+
+ sal_Bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+ sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+ void RegisterToFormat( SwFmt& rFmt );
+#ifdef DBG_UTIL
+ void CheckConsistency() const;
+#endif
+};
+
+class SW_DLLPUBLIC SwTableLine: public SwClient // Client vom FrmFmt
+{
+ SwTableBoxes aBoxes;
+ SwTableBox *pUpper;
+
+public:
+ TYPEINFO();
+
+ SwTableLine() : pUpper(0) {}
+
+ SwTableLine( SwTableLineFmt*, sal_uInt16 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*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ //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,
+ sal_Bool bOvrTblLns=sal_True ) const;
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ sal_Bool bOvrTblLns=sal_True ) const;
+
+ SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
+
+ bool hasSoftPageBreak() const;
+ void RegisterToFormat( SwFmt& rFmt );
+};
+
+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*, sal_uInt16 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*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ //Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen.
+ SwFrmFmt* ClaimFrmFmt();
+ void ChgFrmFmt( SwTableBoxFmt *pNewFmt );
+
+ const SwStartNode *GetSttNd() const { return pSttNd; }
+ sal_uLong GetSttIdx() const
+#ifndef DBG_UTIL
+ { return pSttNd ? pSttNd->GetIndex() : 0; }
+#else
+ ;
+#endif
+
+ // suche nach der naechsten/vorherigen Box mit Inhalt
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ sal_Bool bOvrTblLns=sal_True ) const;
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ sal_Bool bOvrTblLns=sal_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;
+
+ sal_Bool IsInHeadline( const SwTable* pTbl = 0 ) const;
+
+ // enthaelt die Box Inhalt, der als Nummer formatiert werden kann?
+ sal_Bool HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ sal_Bool& rIsEmptyTxtNd ) const;
+ sal_uLong IsValidNumTxtNd( sal_Bool bCheckAttr = sal_True ) const;
+ // teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine
+ // Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!)
+ sal_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 !!
+ sal_uInt16 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&, sal_uInt16 nMaxStep = USHRT_MAX );
+ const SwTableBox& FindStartOfRowSpan( const SwTable& rTable,
+ sal_uInt16 nMaxStep = USHRT_MAX ) const
+ { return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); }
+
+ SwTableBox& FindEndOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX );
+ const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
+ sal_uInt16 nMaxStep = USHRT_MAX ) const
+ { return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
+ void RegisterToFormat( SwFmt& rFmt ) ;
+ void ForgetFrmFmt();
+};
+
+class SwCellFrm;
+class SW_DLLPUBLIC SwTableCellInfo : public ::boost::noncopyable
+{
+ struct Impl;
+ ::std::auto_ptr<Impl> m_pImpl;
+
+ const SwCellFrm * getCellFrm() const ;
+
+public:
+ SwTableCellInfo(const SwTable * pTable);
+ ~SwTableCellInfo();
+
+ bool getNext();
+ SwRect getRect() const;
+ const SwTableBox * getTableBox() const;
+};
+
+#endif //_SWTABLE_HXX
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
new file mode 100644
index 000000000000..86ace11c4e6b
--- /dev/null
+++ b/sw/inc/swtblfmt.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 SW_DLLPUBLIC 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 )
+ {}
+
+ // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt)
+};
+
+
+#endif
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
new file mode 100644
index 000000000000..f09494d3d454
--- /dev/null
+++ b/sw/inc/swtypes.hxx
@@ -0,0 +1,340 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_uInt8 OLD_MAXLEVEL = 5;
+const sal_uInt8 MAXLEVEL = 10; //Ehemals numrule.hxx
+const sal_uInt8 NO_NUM = 200; //Ehemals numrule.hxx
+//const sal_uInt8 NO_NUMBERING = 201; //Ehemals numrule.hxx //#outline level,removed by zhaojianwei
+//const sal_uInt8 NO_INIT = 202; //Ehemals numrule.hxx
+
+// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln
+// DAMIT entfaellt das NO_NUM !!!!
+const sal_uInt8 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 sal_uInt16 lBullIndent = 1440/4;
+const short lBullFirstLineOffset = -lBullIndent;
+const sal_uInt16 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_PARA, // anchored at paragraph
+ FLY_AS_CHAR, // anchored as character
+ FLY_AT_PAGE, // anchored at page
+ FLY_AT_FLY, // anchored at frame
+ FLY_AT_CHAR, // anchored at character
+ //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 sal_uInt16 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;
+ /// the inserted item is a copy -- intended for use in ndtxt.cxx
+ const SetAttrMode SETATTR_IS_COPY = 0x0100;
+}
+
+//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 sal_Bool& uebergeben, dieser zeigt mit sal_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..3506a7e176b9
--- /dev/null
+++ b/sw/inc/swundo.hxx
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <vector>
+
+#include <rtl/ustring.hxx>
+
+
+typedef ::std::vector< ::rtl::OUString > SwUndoComments_t;
+
+
+// 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
+};
+
+
+#endif
diff --git a/sw/inc/swunodef.hxx b/sw/inc/swunodef.hxx
new file mode 100644
index 000000000000..e63514e11f1a
--- /dev/null
+++ b/sw/inc/swunodef.hxx
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..f2623f48aa3b
--- /dev/null
+++ b/sw/inc/swunohelper.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_Bool UCB_DeleteFile( const String& rURL );
+
+ // copy/move the file to a new location
+sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL,
+ sal_Bool bCopyIsMove = sal_False );
+
+ // is the URL on the current system case sentive?
+SW_DLLPUBLIC sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL );
+
+ // is the URL readonly?
+SW_DLLPUBLIC sal_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!!
+sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+ const String* pExtension = 0,
+ SvPtrarr* pDateTimeList = 0 );
+
+ // is the URL an existing file?
+SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL );
+
+ // is the URL a existing directory?
+sal_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..07f4b0631d78
--- /dev/null
+++ b/sw/inc/swurl.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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,
+ sal_uInt16 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..19fb6cfb40a3
--- /dev/null
+++ b/sw/inc/swwait.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SWWAIT_HXX
+#define _SWWAIT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+class SwDocShell;
+
+class SW_DLLPUBLIC SwWait
+{
+ SwDocShell &rDoc;
+ sal_Bool bLock;
+public:
+ SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher );
+ ~SwWait();
+};
+
+#endif
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx
new file mode 100644
index 000000000000..abbb7dcf9933
--- /dev/null
+++ b/sw/inc/tabcol.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svstdarr.hxx>
+#endif
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+#include "swdllapi.h"
+
+struct SwTabColsEntry
+{
+ long nPos;
+ long nMin;
+ long nMax;
+ sal_Bool bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
+ //Wenn das Flag Hidden sal_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( sal_uInt16 nSize = 0 );
+ SwTabCols( const SwTabCols& );
+ SwTabCols &operator=( const SwTabCols& );
+ sal_Bool operator==( const SwTabCols& rCmp ) const;
+ long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; }
+ long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; }
+ sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); }
+
+ sal_Bool IsHidden( sal_uInt16 nPos ) const { return aData[nPos].bHidden; }
+ void SetHidden( sal_uInt16 nPos, sal_Bool bValue ) { aData[nPos].bHidden = bValue; }
+
+ void Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos );
+ void Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nAnz = 1 );
+
+ const SwTabColsEntry& GetEntry( sal_uInt16 nPos ) const { return aData[nPos]; }
+ SwTabColsEntry& GetEntry( sal_uInt16 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..99324909e20c
--- /dev/null
+++ b/sw/inc/tblafmt.hxx
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svarray.hxx>
+#include "hintids.hxx" //_immmer_ vor den solar-items!
+#include <svx/algitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/crsditem.hxx>
+#ifndef _SVX_CNTRTITEM_HXX //autogen
+#include <editeng/cntritem.hxx>
+#endif
+#include <editeng/shdditem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <svx/rotmodit.hxx>
+#include <svl/intitem.hxx>
+#include <editeng/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; }
+
+ sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer );
+ sal_Bool Save( SvStream& rStream ) const;
+ sal_Bool SaveVerionNo( SvStream& rStream ) const;
+
+#ifdef READ_OLDVERS
+ // lade alte Version
+ sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
+#endif
+};
+
+class SW_DLLPUBLIC SwTableAutoFmt
+{
+ friend void _FinitCore(); // zum Zerstoeren des dflt. Pointers
+ static SwBoxAutoFmt* pDfltBoxAutoFmt;
+
+ String aName;
+ sal_uInt16 nStrResId;
+
+ // common flags of Calc and Writer
+ sal_Bool bInclFont : 1;
+ sal_Bool bInclJustify : 1;
+ sal_Bool bInclFrame : 1;
+ sal_Bool bInclBackground : 1;
+ sal_Bool bInclValueFormat : 1;
+
+ // Calc specific flags
+ sal_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, sal_uInt8 nPos );
+ const SwBoxAutoFmt& GetBoxFmt( sal_uInt8 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( sal_uInt8 nPos, const SfxItemSet& rSet,
+ UpdateFlags eFlags, SvNumberFormatter* );
+ void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
+ SvNumberFormatter* ) const ;
+
+ sal_Bool IsFont() const { return bInclFont; }
+ sal_Bool IsJustify() const { return bInclJustify; }
+ sal_Bool IsFrame() const { return bInclFrame; }
+ sal_Bool IsBackground() const { return bInclBackground; }
+ sal_Bool IsValueFormat() const { return bInclValueFormat; }
+
+ void SetFont( const sal_Bool bNew ) { bInclFont = bNew; }
+ void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; }
+ void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; }
+ void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; }
+ void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; }
+ void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; }
+
+ sal_Bool Load( SvStream& rStream, const SwAfVersions& );
+ sal_Bool Save( SvStream& rStream ) const;
+
+#ifdef READ_OLDVERS
+ // lade alte Version
+ sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
+#endif
+};
+
+typedef SwTableAutoFmt* SwTableAutoFmtPtr ;
+SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 )
+
+class SW_DLLPUBLIC SwTableAutoFmtTbl : public _SwTableAutoFmtTbl
+{
+ SW_DLLPRIVATE sal_Bool Load( SvStream& rStream );
+ SW_DLLPRIVATE sal_Bool Save( SvStream& rStream ) const;
+
+public:
+ SwTableAutoFmtTbl();
+
+ sal_Bool Load();
+ sal_Bool Save() const;
+};
+
+#endif
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
new file mode 100644
index 000000000000..e5ca58c3df78
--- /dev/null
+++ b/sw/inc/tblenum.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 sal_uInt16 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..f284c1597ed9
--- /dev/null
+++ b/sw/inc/tblsel.hxx
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _TBLSEL_HXX
+#define _TBLSEL_HXX
+
+#include <svl/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 sal_uInt16 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
+sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+
+// check if the SelBoxes contains protected Boxes
+sal_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)
+
+sal_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)
+sal_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
+sal_uInt16 CheckMergeSel( const SwPaM& rPam );
+sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes );
+
+sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
+
+// teste ob ein Split oder InsertCol dazu fuehrt, das eine Box
+// kleiner als MINLAY wird.
+sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 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 sal_uInt16 nNumber,
+ const sal_Bool bBehind );
+ sal_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) {}
+};
+
+sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
+SW_DLLPUBLIC sal_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..267aeacb7793
--- /dev/null
+++ b/sw/inc/tgrditem.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SW_TGRDITEM_HXX
+#define SW_TGRDITEM_HXX
+
+#include <tools/color.hxx>
+#include <svl/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;
+ sal_Bool bRubyTextBelow;
+ sal_Bool bPrintGrid;
+ sal_Bool bDisplayGrid;
+
+ //for textgrid enhancement
+ sal_uInt16 nBaseWidth;
+ sal_Bool bSnapToChars;
+ sal_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 sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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; }
+
+ sal_Bool IsRubyTextBelow() const { return bRubyTextBelow; }
+ sal_Bool GetRubyTextBelow() const { return bRubyTextBelow; }
+ void SetRubyTextBelow( sal_Bool bNew ) { bRubyTextBelow = bNew; }
+
+ sal_Bool IsPrintGrid() const { return bPrintGrid; }
+ sal_Bool GetPrintGrid() const { return bPrintGrid; }
+ void SetPrintGrid( sal_Bool bNew ) { bPrintGrid = bNew; }
+
+ sal_Bool IsDisplayGrid() const { return bDisplayGrid; }
+ sal_Bool GetDisplayGrid() const { return bDisplayGrid; }
+ void SetDisplayGrid( sal_Bool bNew ) { bDisplayGrid = bNew; }
+
+ //for textgrid enhancement
+ sal_uInt16 GetBaseWidth() const { return nBaseWidth;}
+ void SetBaseWidth( sal_uInt16 nNew ) { nBaseWidth = nNew; }
+
+ sal_Bool IsSnapToChars() const { return bSnapToChars; }
+ sal_Bool GetSnapToChars() const { return bSnapToChars; }
+ void SetSnapToChars( sal_Bool bNew ) { bSnapToChars = bNew; }
+
+ sal_Bool IsSquaredMode() const { return bSquaredMode; }
+ sal_Bool GetSquaredMode() const { return bSquaredMode; }
+ void SetSquaredMode( sal_Bool bNew ) { bSquaredMode = bNew; }
+ void SwitchPaperMode(sal_Bool bNew );
+
+ void Init();
+};
+
+inline const SwTextGridItem &SwAttrSet::GetTextGrid(sal_Bool bInP) const
+ { return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); }
+inline const SwTextGridItem &SwFmt::GetTextGrid(sal_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..88e5cea8a8fb
--- /dev/null
+++ b/sw/inc/tox.hxx
@@ -0,0 +1,797 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_TOX_HXX
+#define SW_TOX_HXX
+
+#include <cppuhelper/weakref.hxx>
+
+#include <i18npool/lang.h>
+#include <tools/string.hxx>
+
+#include <editeng/svxenum.hxx>
+#include <svl/svarray.hxx>
+#include <svl/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
+
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XDocumentIndexMark; }
+} } }
+
+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 ((sal_uInt16)1)
+#define IVER_TOXMARK_NEWTOX ((sal_uInt16)2)
+
+class SW_DLLPUBLIC SwTOXMark
+ : public SfxPoolItem
+ , public SwModify
+{
+ 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;
+
+ sal_uInt16 nLevel;
+ sal_Bool bAutoGenerated : 1; // generated using a concordance file
+ sal_Bool bMainEntry : 1; // main entry emphasized by character style
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark;
+
+ SwTOXMark(); // to create the dflt. atr. in _InitCore
+
+protected:
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
+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;
+
+ void InvalidateTOXMark();
+
+ String GetText() const;
+
+ inline sal_Bool IsAlternativeText() const;
+ inline const String& GetAlternativeText() const;
+
+ inline void SetAlternativeText( const String& rAlt );
+
+ // content or user defined index
+ inline void SetLevel(sal_uInt16 nLevel);
+ inline sal_uInt16 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;
+
+ sal_Bool IsAutoGenerated() const {return bAutoGenerated;}
+ void SetAutoGenerated(sal_Bool bSet) {bAutoGenerated = bSet;}
+
+ sal_Bool IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(sal_Bool bSet) { bMainEntry = bSet;}
+
+ inline const SwTOXType* GetTOXType() const;
+
+ const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; }
+ SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; }
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const
+ { return m_wXDocumentIndexMark; }
+ SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndexMark> const& xMark)
+ { m_wXDocumentIndexMark = xMark; }
+ void DeRegister() { GetRegisteredInNonConst()->Remove( this ); }
+ void RegisterToTOXType( SwTOXType& rMark );
+ static void InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType );
+};
+
+/*--------------------------------------------------------------------
+ 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;
+ sal_uInt16 nPoolId;
+ SvxTabAdjust eTabAlign;
+ sal_uInt16 nChapterFormat; //SwChapterFormat;
+ sal_uInt16 nOutlineLevel;//the maximum permitted outline level in numbering
+ sal_uInt16 nAuthorityField; //enum ToxAuthorityField
+ sal_Unicode cTabFillChar;
+ sal_Bool bWithTab; // sal_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 sal_True the token has the given type
+ @retval sal_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;
+ sal_uInt16 nFormMaxLevel;
+
+ //sal_uInt16 nFirstTabPos; -> Value in tab token
+// sal_Bool bHasFirstTabPos : 1;
+ sal_Bool bGenerateTabPos : 1;
+ sal_Bool bIsRelTabPos : 1;
+ sal_Bool bCommaSeparated : 1;
+
+public:
+ SwForm( TOXTypes eTOXType = TOX_CONTENT );
+ SwForm( const SwForm& rForm );
+
+ SwForm& operator=( const SwForm& rForm );
+
+ inline void SetTemplate(sal_uInt16 nLevel, const String& rName);
+ inline const String& GetTemplate(sal_uInt16 nLevel) const;
+
+ // #i21237#
+ void SetPattern(sal_uInt16 nLevel, const SwFormTokens& rName);
+ void SetPattern(sal_uInt16 nLevel, const String& rStr);
+ const SwFormTokens& GetPattern(sal_uInt16 nLevel) const;
+
+ // fill tab stop positions from template to pattern
+ // #i21237#
+ void AdjustTabStops(SwDoc& rDoc,
+ sal_Bool bInsertNewTabStops = sal_False);
+
+ inline TOXTypes GetTOXType() const;
+ inline sal_uInt16 GetFormMax() const;
+
+ sal_Bool IsRelTabPos() const { return bIsRelTabPos; }
+ void SetRelTabPos( sal_Bool b ) { bIsRelTabPos = b; }
+
+ sal_Bool IsCommaSeparated() const { return bCommaSeparated;}
+ void SetCommaSeparated( sal_Bool b) { bCommaSeparated = b;}
+
+ static sal_uInt16 GetFormMaxLevel( TOXTypes eType );
+
+ static const sal_Char* aFormEntry; // <E>
+ static sal_uInt8 nFormEntryLen; // 3 characters
+ static const sal_Char* aFormTab; // <T>
+ static sal_uInt8 nFormTabLen; // 3 characters
+ static const sal_Char* aFormPageNums; // <P>
+ static sal_uInt8 nFormPageNumsLen; // 3 characters
+ static const sal_Char* aFormLinkStt; // <LS>
+ static sal_uInt8 nFormLinkSttLen; // 4 characters
+ static const sal_Char* aFormLinkEnd; // <LE>
+ static sal_uInt8 nFormLinkEndLen; // 4 characters
+ static const sal_Char* aFormEntryNum; // <E#>
+ static sal_uInt8 nFormEntryNumLen; // 4 characters
+ static const sal_Char* aFormEntryTxt; // <ET>
+ static sal_uInt8 nFormEntryTxtLen; // 4 characters
+ static const sal_Char* aFormChapterMark; // <C>
+ static sal_uInt8 nFormChapterMarkLen; // 3 characters
+ static const sal_Char* aFormText; // <TX>
+ static sal_uInt8 nFormTextLen; // 4 characters
+ static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value
+ static sal_uInt8 nFormAuthLen; // 3 characters
+};
+
+/*--------------------------------------------------------------------
+ Description: Content to create indexes of
+ --------------------------------------------------------------------*/
+
+typedef sal_uInt16 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 sal_uInt16 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 sal_uInt16 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 {
+ sal_uInt16 nLevel; // consider outline levels
+ sal_uInt16 nOptions; // options of alphabetical index
+ } aData;
+
+ sal_uInt16 nCreateType; // sources to create the index from
+ sal_uInt16 nOLEOptions; // OLE sources
+ SwCaptionDisplay eCaptionDisplay; //
+ sal_Bool bProtected : 1; // index protected ?
+ sal_Bool bFromChapter : 1; // create from chapter or document
+ sal_Bool bFromObjectNames : 1; // create a table or object index
+ // from the names rather than the caption
+ sal_Bool bLevelFromChapter : 1; // User index: get the level from the source chapter
+public:
+ SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
+ sal_uInt16 nCreaType, const String& rTitle );
+ SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
+ virtual ~SwTOXBase();
+
+ virtual sal_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; //
+
+ sal_uInt16 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(sal_uInt16);
+ 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(sal_uInt16); // consider outline level
+ inline sal_uInt16 GetLevel() const;
+
+ // alphabetical index only
+ inline sal_uInt16 GetOptions() const; // alphabetical index options
+ inline void SetOptions(sal_uInt16 nOpt);
+
+ // index of objects
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
+
+ // index of objects
+
+ // user defined index only
+ inline void SetTemplateName(const String& rName); // Absatzlayout beachten
+
+ const String& GetStyleNames(sal_uInt16 nLevel) const
+ {
+ DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
+ return aStyleNames[nLevel];
+ }
+ void SetStyleNames(const String& rSet, sal_uInt16 nLevel)
+ {
+ DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
+ aStyleNames[nLevel] = rSet;
+ }
+ sal_Bool IsFromChapter() const { return bFromChapter;}
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
+
+ sal_Bool IsFromObjectNames() const {return bFromObjectNames;}
+ void SetFromObjectNames(sal_Bool bSet) {bFromObjectNames = bSet;}
+
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
+
+ sal_Bool IsProtected() const { return bProtected; }
+ void SetProtected(sal_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;}
+
+ sal_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, sal_Bool bDefaultRightTabStop);
+ SwTOXBase& operator=(const SwTOXBase& rSource);
+ void RegisterToTOXType( SwTOXType& rMark );
+};
+
+
+/*--------------------------------------------------------------------
+ Description: Inlines
+ --------------------------------------------------------------------*/
+
+//
+//SwTOXMark
+//
+inline const String& SwTOXMark::GetAlternativeText() const
+ { return aAltText; }
+
+inline const SwTOXType* SwTOXMark::GetTOXType() const
+ { return (SwTOXType*)GetRegisteredIn(); }
+
+inline sal_Bool SwTOXMark::IsAlternativeText() const
+ { return aAltText.Len() > 0; }
+
+inline void SwTOXMark::SetAlternativeText(const String& rAlt)
+{
+ aAltText = rAlt;
+}
+
+inline void SwTOXMark::SetLevel( sal_uInt16 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 sal_uInt16 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(sal_uInt16 nLevel, const String& rTemplate)
+{
+ ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ aTemplate[nLevel] = rTemplate;
+}
+
+inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const
+{
+ ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ return aTemplate[nLevel];
+}
+
+inline TOXTypes SwForm::GetTOXType() const
+{
+ return eType;
+}
+
+inline sal_uInt16 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 sal_uInt16 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, sal_Bool bDefaultRightTabStop)
+{
+ aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
+}
+
+inline void SwTOXBase::SetCreate(sal_uInt16 nCreate)
+ { nCreateType = nCreate; }
+
+inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
+ { aForm = rForm; }
+
+inline TOXTypes SwTOXBase::GetType() const
+ { return GetTOXType()->GetType(); }
+
+inline void SwTOXBase::SetLevel(sal_uInt16 nLev)
+{
+ ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ aData.nLevel = nLev;
+}
+
+inline sal_uInt16 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 sal_uInt16 SwTOXBase::GetOptions() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aData.nOptions;
+}
+
+inline void SwTOXBase::SetOptions(sal_uInt16 nOpt)
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aData.nOptions = nOpt;
+}
+
+
+#endif // SW_TOX_HXX
diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx
new file mode 100644
index 000000000000..064c2e0aac9f
--- /dev/null
+++ b/sw/inc/toxe.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..8546f04b830c
--- /dev/null
+++ b/sw/inc/toxinit.hxx
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..f38cd15c877c
--- /dev/null
+++ b/sw/inc/toxwrap.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#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( sal_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..4829b1bcb012
--- /dev/null
+++ b/sw/inc/txatbase.hxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 sal_uInt16 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 SwFmtRuby &GetRuby() const;
+ inline const SwFmtMeta &GetMeta() const;
+
+};
+
+class SwTxtAttrEnd : public SwTxtAttr
+{
+protected:
+ xub_StrLen m_nEnd;
+
+public:
+ SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 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 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..6c6b354a7b59
--- /dev/null
+++ b/sw/inc/txatritr.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/svarray.hxx>
+#include <editeng/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, sal_uInt16 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,
+ sal_uInt16 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..cd16a93bd09b
--- /dev/null
+++ b/sw/inc/txtatr.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+
+namespace sw {
+ class MetaFieldManager;
+}
+
+
+// ATT_CHARFMT *********************************************
+
+class SwTxtCharFmt : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ sal_uInt16 m_nSortNumber;
+
+public:
+ SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtCharFmt( );
+
+ // werden vom SwFmtCharFmt hierher weitergeleitet (no derivation from SwClient!)
+ void ModifyNotification( const SfxPoolItem*, const SfxPoolItem* );
+ bool GetInfo( SfxPoolItem& rInfo ) const;
+
+ // get and set TxtNode pointer
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ void SetSortNumber( sal_uInt16 nSortNumber ) { m_nSortNumber = nSortNumber; }
+ sal_uInt16 GetSortNumber() const { return m_nSortNumber; }
+};
+
+
+// ******************************
+
+class SwTxtAttrNesting : public SwTxtAttrEnd
+{
+protected:
+ SwTxtAttrNesting( SfxPoolItem & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtAttrNesting();
+};
+
+class SwTxtMeta : public SwTxtAttrNesting
+{
+private:
+ SwTxtMeta( SwFmtMeta & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+
+public:
+ static SwTxtMeta * CreateTxtMeta(
+ ::sw::MetaFieldManager & i_rTargetDocManager,
+ SwTxtNode *const i_pTargetTxtNode,
+ SwFmtMeta & i_rAttr,
+ xub_StrLen const i_nStart, xub_StrLen const i_nEnd,
+ bool const i_bIsCopy);
+
+ virtual ~SwTxtMeta();
+
+ void ChgTxtNode(SwTxtNode * const pNode);
+};
+
+
+// ******************************
+
+class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient
+{
+ SwTxtNode* m_pTxtNode;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+public:
+ SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtRuby();
+ TYPEINFO();
+
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+
+ SW_DLLPRIVATE void InitRuby(SwTxtNode & rNode);
+
+ /// 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..8a9dfecb422b
--- /dev/null
+++ b/sw/inc/txtflcnt.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..6dd556a84436
--- /dev/null
+++ b/sw/inc/txtfld.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 const 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..e8c7c77e8f86
--- /dev/null
+++ b/sw/inc/txtftn.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+class SwFrm;
+
+// ATT_FTN **********************************************************
+
+class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
+{
+ SwNodeIndex * m_pStartNode;
+ SwTxtNode * m_pTxtNode;
+ sal_uInt16 m_nSeqNo;
+
+public:
+ SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtFtn();
+
+ inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
+ void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True );
+ void SetNumber( const sal_uInt16 nNumber, const String* = 0 );
+ void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) 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( const SwFrm* );
+ // bedingten Absatzvorlagen checken
+ void CheckCondColl();
+
+ // fuer die Querverweise auf Fussnoten
+ sal_uInt16 SetSeqRefNo();
+ void SetSeqNo( sal_uInt16 n ) { m_nSeqNo = n; } // for Readers
+ sal_uInt16 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..5ea0df9fe3b2
--- /dev/null
+++ b/sw/inc/txtinet.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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?
+
+protected:
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+ SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtINetFmt();
+ TYPEINFO();
+
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+
+ SW_DLLPRIVATE void InitINetFmt(SwTxtNode & rNode);
+
+ // 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; }
+
+ sal_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..d5deb2830eac
--- /dev/null
+++ b/sw/inc/txtrfmrk.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 const nStart, xub_StrLen const*const 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..311432d9287b
--- /dev/null
+++ b/sw/inc/txttxmrk.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 const nStart, xub_StrLen const*const 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..9d447c18034f
--- /dev/null
+++ b/sw/inc/undobj.hxx
@@ -0,0 +1,335 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNDOBJ_HXX
+#define SW_UNDOBJ_HXX
+
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
+
+#include <svl/undo.hxx>
+
+#include <SwRewriter.hxx>
+#include <swundo.hxx>
+
+
+class SwHistory;
+class SwIndex;
+class SwPaM;
+struct SwPosition;
+class SwDoc;
+class SwTxtFmtColl;
+class SwFrmFmt;
+class SwNodeIndex;
+class SwNodeRange;
+class SwRedlineData;
+class SwRedlineSaveDatas;
+
+namespace sw {
+ class UndoRedoContext;
+ class RepeatContext;
+}
+
+
+class SwUndo
+ : public SfxUndoAction
+{
+ SwUndoId const m_nId;
+ sal_uInt16 nOrigRedlineMode;
+
+protected:
+ bool bCacheComment;
+ mutable String * pComment;
+
+ void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 );
+ void RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext );
+ void RemoveIdxRel( sal_uLong, const SwPosition& );
+
+ static sal_Bool CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ const SwRedlineSaveDatas& rCheck,
+ sal_Bool bCurrIsEnd );
+
+ // #111827#
+ /**
+ Returns the rewriter for this object.
+
+ @return the rewriter for this object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ // return type is sal_uInt16 because this overrides SfxUndoAction::GetId()
+ virtual sal_uInt16 GetId() const { return static_cast<sal_uInt16>(m_nId); }
+
+ // the 4 methods that derived classes have to override
+ // base implementation does nothing
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+ virtual bool CanRepeatImpl( ::sw::RepeatContext & ) const;
+public: // should not be public, but ran into trouble in untbl.cxx
+ virtual void UndoImpl( ::sw::UndoRedoContext & ) = 0;
+ virtual void RedoImpl( ::sw::UndoRedoContext & ) = 0;
+
+private:
+ // SfxUndoAction
+ virtual void Undo();
+ virtual void Redo();
+ virtual void UndoWithContext(SfxUndoContext &);
+ virtual void RedoWithContext(SfxUndoContext &);
+ virtual void Repeat(SfxRepeatTarget &);
+ virtual sal_Bool CanRepeat(SfxRepeatTarget &) const;
+
+public:
+ SwUndo(SwUndoId const nId);
+ virtual ~SwUndo();
+
+ // #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
+ sal_uInt16 GetRedlineMode() const { return nOrigRedlineMode; }
+ void SetRedlineMode( sal_uInt16 eMode ) { nOrigRedlineMode = eMode; }
+
+ bool IsDelBox() const;
+
+ // sicher und setze die RedlineDaten
+ static sal_Bool FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ sal_Bool bDelRange = sal_True, sal_Bool bCopyNext = sal_True );
+ static sal_Bool FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
+ static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData );
+ static sal_Bool HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
+};
+
+typedef sal_uInt16 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;
+}
+
+/// will DelCntntIndex destroy a frame anchored at character at rAnchorPos?
+bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
+ SwPosition const & rStart, SwPosition const & rEnd,
+ DelCntntType const nDelCntntType = nsDelCntntType::DELCNT_ALL);
+
+// 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,
+ sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, xub_StrLen nCntntIdx,
+ SwPosition& rInsPos,
+ sal_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.
+ sal_Bool MovePtBackward( SwPaM& rPam );
+ void MovePtForward( SwPaM& rPam, sal_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();
+};
+
+
+// sicher eine vollstaendige Section im Nodes-Array
+class SwUndoSaveSection : private SwUndoSaveCntnt
+{
+ SwNodeIndex *pMvStt;
+ SwRedlineSaveDatas* pRedlSaveData;
+ sal_uLong nMvLen; // Index ins UndoNodes-Array
+ sal_uLong nStartPos;
+
+protected:
+ SwNodeIndex* GetMvSttIdx() const { return pMvStt; }
+ sal_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, sal_uInt16 nSectType );
+ void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos );
+
+ const SwHistory* GetHistory() const { return pHistory; }
+ SwHistory* GetHistory() { return pHistory; }
+};
+
+
+// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu
+// einem PaM zusammensetzen
+class SwUndRng
+{
+public:
+ sal_uLong nSttNode, nEndNode;
+ xub_StrLen nSttCntnt, nEndCntnt;
+
+ SwUndRng();
+ SwUndRng( const SwPaM& );
+
+ void SetValues( const SwPaM& rPam );
+ void SetPaM( SwPaM&, sal_Bool bCorrToCntnt = sal_False ) const;
+ SwPaM & AddUndoRedoPaM(
+ ::sw::UndoRedoContext &, bool const bCorrToCntnt = false) const;
+};
+
+
+
+class SwUndoInsLayFmt;
+
+// base class for insertion of Document, Glossaries and Copy
+class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt
+{
+ SwTxtFmtColl *pTxtFmtColl, *pLastNdColl;
+ SvPtrarr* pFrmFmts;
+ ::std::vector< ::boost::shared_ptr<SwUndoInsLayFmt> > m_FlyUndos;
+ SwRedlineData* pRedlData;
+ sal_Bool bSttWasTxtNd;
+protected:
+ sal_uLong nNdDiff;
+ SwPosition *pPos; // Inhalt fuers Redo
+ sal_uInt16 nSetPos; // Start in der History-Liste
+
+ SwUndoInserts( SwUndoId nUndoId, const SwPaM& );
+public:
+ virtual ~SwUndoInserts();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ // setze den Destination-Bereich nach dem Einlesen.
+ void SetInsertRange( const SwPaM&, sal_Bool bScanFlys = sal_True,
+ sal_Bool bSttWasTxtNd = sal_True );
+};
+
+class SwUndoInsDoc : public SwUndoInserts
+{
+public:
+ SwUndoInsDoc( const SwPaM& );
+};
+
+class SwUndoCpyDoc : public SwUndoInserts
+{
+public:
+ SwUndoCpyDoc( const SwPaM& );
+};
+
+
+
+//--------------------------------------------------------------------
+
+class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection
+{
+protected:
+ SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
+ sal_uLong nNdPgPos;
+ xub_StrLen nCntPos; // Seite/am Absatz/im Absatz
+ sal_uInt16 nRndId;
+ sal_Bool bDelFmt; // loesche das gespeicherte Format
+
+ void InsFly(::sw::UndoRedoContext & rContext, bool bShowSel = true);
+ void DelFly( SwDoc* );
+
+ SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId );
+
+ SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); }
+ sal_uLong GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
+
+public:
+ virtual ~SwUndoFlyBase();
+
+};
+
+class SwUndoInsLayFmt : public SwUndoFlyBase
+{
+ sal_uLong mnCrsrSaveIndexPara; // Cursor position
+ xub_StrLen mnCrsrSaveIndexPos; // for undo
+public:
+ SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx );
+
+ virtual ~SwUndoInsLayFmt();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ String GetComment() const;
+
+};
+
+class SwUndoDelLayFmt : public SwUndoFlyBase
+{
+ sal_Bool bShowSelFrm;
+public:
+ SwUndoDelLayFmt( SwFrmFmt* pFormat );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void RedoForRollback();
+
+ void ChgShowSel( sal_Bool bNew ) { bShowSelFrm = bNew; }
+
+ virtual SwRewriter GetRewriter() const;
+
+};
+
+#endif
diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx
new file mode 100644
index 000000000000..01033eb856ec
--- /dev/null
+++ b/sw/inc/unoatxt.hxx
@@ -0,0 +1,306 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/itemprop.hxx>
+#include <svl/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 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 );
+
+};
+
+/* -----------------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 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 );
+
+ //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, sal_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, sal_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, sal_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 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 );
+
+ // 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 sal_uInt16 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 sal_uInt16 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..9e3425e04c90
--- /dev/null
+++ b/sw/inc/unobaseclass.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOBASECLASS_HXX
+#define SW_UNOBASECLASS_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+
+class SfxPoolItem;
+class SwClient;
+class SwDoc;
+
+
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumeration
+>
+SwSimpleEnumeration_Base;
+
+
+/* -----------------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, // for Search&Replace
+ CURSOR_SELECTION, // create a paragraph enumeration from
+ // a text range or cursor
+ CURSOR_SELECTION_IN_TABLE,
+ CURSOR_META, // meta/meta-field
+};
+
+/*-----------------04.03.98 11:54-------------------
+ Start/EndAction or Start/EndAllAction
+ -------------------------------------------------- */
+class UnoActionContext
+{
+ private:
+ SwDoc * m_pDoc;
+
+ public:
+ UnoActionContext(SwDoc *const pDoc);
+ ~UnoActionContext();
+
+ void InvalidateDocument() { m_pDoc = 0; }
+};
+
+/* -----------------07.07.98 12:03-------------------
+ interrupt Actions for a little while
+ -------------------------------------------------- */
+class UnoActionRemoveContext
+{
+ private:
+ SwDoc *const m_pDoc;
+
+ public:
+ UnoActionRemoveContext(SwDoc *const pDoc);
+ ~UnoActionRemoveContext();
+};
+
+
+::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
+
+/// helper function for implementing SwClient::Modify
+void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem *pNew);
+
+
+#include <boost/utility.hpp>
+#include <osl/diagnose.h>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+namespace sw {
+
+ template<typename T> class UnoImplPtr
+ : private ::boost::noncopyable
+ {
+ private:
+ T * m_p;
+
+ public:
+ UnoImplPtr(T *const i_p)
+ : m_p(i_p)
+ {
+ OSL_ENSURE(i_p, "UnoImplPtr: null");
+ }
+
+ ~UnoImplPtr()
+ {
+ ::vos::OGuard g(Application::GetSolarMutex());
+ delete m_p; // #i105557#: call dtor with locked solar mutex
+ m_p = 0;
+ }
+
+ T & operator * () const { return *m_p; }
+
+ T * operator ->() const { return m_p; }
+
+ T * get () const { return m_p; }
+ };
+
+ template< class C > C *
+ UnoTunnelGetImplementation(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XUnoTunnel > const & xUnoTunnel)
+ {
+ if (!xUnoTunnel.is()) { return 0; }
+ C *const pC( reinterpret_cast< C* >(
+ ::sal::static_int_cast< sal_IntPtr >(
+ xUnoTunnel->getSomething(C::getUnoTunnelId()))));
+ return pC;
+ }
+
+ template< class C > sal_Int64
+ UnoTunnelImpl(const ::com::sun::star::uno::Sequence< sal_Int8 > & rId,
+ C *const pThis)
+ {
+ if ((rId.getLength() == 16) &&
+ (0 == rtl_compareMemory(C::getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16)))
+ {
+ return ::sal::static_int_cast< sal_Int64 >(
+ reinterpret_cast< sal_IntPtr >(pThis) );
+ }
+ return 0;
+ }
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetSupportedServiceNamesImpl(
+ size_t const nServices, char const*const pServices[]);
+ sal_Bool SupportsServiceImpl(
+ size_t const nServices, char const*const pServices[],
+ ::rtl::OUString const & rServiceName);
+
+} // namespace sw
+
+#endif // SW_UNOBASECLASS_HXX
+
diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx
new file mode 100644
index 000000000000..a212efd933f3
--- /dev/null
+++ b/sw/inc/unobookmark.hxx
@@ -0,0 +1,261 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOBOOKMARK_HXX
+#define SW_UNOBOOKMARK_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XFormField.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unobaseclass.hxx>
+#include <IDocumentMarkAccess.hxx>
+
+
+class SwDoc;
+
+
+typedef ::cppu::ImplInheritanceHelper5
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XTextContent
+> SwXBookmark_Base;
+
+class SwXBookmark
+ : public SwXBookmark_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+protected:
+
+ 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);
+
+ const ::sw::mark::IMark* GetBookmark() const;
+
+ virtual ~SwXBookmark();
+
+ /// @param pDoc and pMark != 0, but not & because of ImplInheritanceHelper
+ SwXBookmark(::sw::mark::IMark *const pMark, SwDoc *const pDoc);
+
+public:
+
+ /// descriptor
+ SwXBookmark();
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>
+ CreateXBookmark(SwDoc & rDoc, ::sw::mark::IMark & rBookmark);
+
+ /// @return IMark for this, but only if it lives in pDoc
+ static ::sw::mark::IMark const* GetBookmarkInDoc(SwDoc const*const pDoc,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XUnoTunnel> & xUT);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > GetModel();
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ 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);
+
+};
+
+class SwXFieldmarkParameters
+ : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XNameContainer>
+ , private SwClient
+{
+ public:
+ SwXFieldmarkParameters(::sw::mark::IFieldmark* const pFieldmark)
+ {
+ pFieldmark->Add(this);
+ }
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
+ // XElementAccess
+ virtual ::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);
+ protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+ private:
+ ::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException);
+};
+
+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 getFieldType(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setFieldType(const ::rtl::OUString& description )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getParameters( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOBOOKMARK_HXX
+
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
new file mode 100644
index 000000000000..de8a78610bf5
--- /dev/null
+++ b/sw/inc/unochart.hxx
@@ -0,0 +1,432 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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/lang/XUnoTunnel.hpp>
+#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 <tools/string.hxx>
+#include <tools/link.hxx>
+#include <vcl/timer.hxx>
+
+#include <calbck.hxx>
+
+
+class SfxItemPropertySet;
+class SwDoc;
+class SwTable;
+class SwTableBox;
+class SwUnoCrsr;
+struct SwRangeDescriptor;
+class SwSelBoxes;
+class SwFrmFmt;
+
+//////////////////////////////////////////////////////////////////////
+
+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 );
+
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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);
+
+ 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, sal_uInt16 nLines, sal_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 & );
+
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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);
+
+ 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..8b799ad98b9b
--- /dev/null
+++ b/sw/inc/unocoll.hxx
@@ -0,0 +1,581 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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>
+#include "swdllapi.h"
+/***************************************************
+ ***************************************************
+ *
+ ***************************************************/
+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 SW_DLLPUBLIC 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 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 );
+
+ 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 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 );
+
+ 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 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 );
+
+};
+
+/*-----------------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 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 );
+
+};
+
+/*-----------------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 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 );
+
+};
+
+/*-----------------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 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 );
+
+ 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 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 );
+
+};
+
+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 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 );
+
+ 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 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 );
+
+ 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..428229d88968
--- /dev/null
+++ b/sw/inc/unocore.hrc
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..05738f4fd3c4
--- /dev/null
+++ b/sw/inc/unocrsr.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+{
+ sal_Bool bRemainInSection : 1;
+ sal_Bool bSkipOverHiddenSections : 1;
+ sal_Bool bSkipOverProtectSections : 1;
+
+public:
+ SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
+ virtual ~SwUnoCrsr();
+
+protected:
+
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_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 sal_Bool IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+
+ virtual bool IsReadOnlyAvailable() const;
+
+ sal_Bool IsRemainInSection() const { return bRemainInSection; }
+ void SetRemainInSection( sal_Bool bFlag ) { bRemainInSection = bFlag; }
+
+ virtual sal_Bool IsSkipOverProtectSections() const
+ { return bSkipOverProtectSections; }
+ void SetSkipOverProtectSections( sal_Bool bFlag )
+ { bSkipOverProtectSections = bFlag; }
+
+ virtual sal_Bool IsSkipOverHiddenSections() const
+ { return bSkipOverHiddenSections; }
+ void SetSkipOverHiddenSections( sal_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 sal_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..f2f8ca922b8c
--- /dev/null
+++ b/sw/inc/unocrsrhelper.hxx
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <map>
+
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <swtypes.hxx>
+#include <pam.hxx>
+
+
+class String;
+class SfxItemSet;
+class SfxItemPropertySet;
+struct SfxItemPropertySimpleEntry;
+class SwTxtNode;
+class SwPaM;
+class SwCursor;
+class SwUnoCrsr;
+class SwFmtColl;
+struct SwSortOptions;
+class SwDoc;
+
+namespace com{ namespace sun{ namespace star{
+ namespace uno{
+ class Any;
+ }
+ namespace beans{
+ struct PropertyValue;
+ }
+ namespace text {
+ class XTextContent;
+ }
+}}}
+
+/* -----------------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
+};
+
+/* -----------------------------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( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any& rAny );
+ bool FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any*& pAny );
+ };
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex,
+ bool const bParent);
+
+ 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);
+
+
+ /// @param bTableMode: attributes should be applied to a table selection
+ void SetCrsrAttr(SwPaM & rPam, const SfxItemSet & rSet,
+ const SetAttrMode nAttrMode,
+ const bool bTableMode = false);
+ void GetCrsrAttr(SwPaM & rPam, SfxItemSet & rSet,
+ const bool bOnlyTxtAttr = false,
+ const bool bGetFromChrFmt = true);
+ void GetTextFromPam(SwPaM & rPam, ::rtl::OUString & rBuffer);
+ SwFmtColl * GetCurTxtFmtColl(SwPaM & rPam, const bool bConditional);
+
+ void SelectPam(SwPaM & rPam, const bool bExpand);
+ void SetString(SwCursor & rCursor, const ::rtl::OUString & rString);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ CreateSortDescriptor(const bool bFromTable);
+ sal_Bool ConvertSortProperties(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& rDescriptor,
+ SwSortOptions & rSortOpt);
+
+ /// @param bTableMode: attributes should be applied to a table selection
+ void SetPropertyValue(
+ SwPaM& rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName,
+ const ::com::sun::star::uno::Any & rValue,
+ const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT,
+ const bool bTableMode = false)
+ 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::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);
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > GetPropertyStates(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const SwGetPropertyStatesCaller eCaller =
+ SW_PROPERTY_STATE_CALLER_DEFAULT)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ ::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);
+ void SetPropertyToDefault(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ ::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);
+
+ bool SetPageDesc(
+ const ::com::sun::star::uno::Any& rValue,
+ SwDoc & rDoc, SfxItemSet & rSet);
+ void SetTxtFmtColl(const ::com::sun::star::uno::Any & rAny, SwPaM & rPaM)
+ throw (::com::sun::star::lang::IllegalArgumentException);
+ bool SetCursorPropertyValue(
+ SfxItemPropertySimpleEntry const& rEntry,
+ ::com::sun::star::uno::Any const& rValue,
+ SwPaM & rPam, SfxItemSet & rItemSet)
+ throw (::com::sun::star::lang::IllegalArgumentException);
+
+} // namespace SwUnoCursorHelper
+
+#endif
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
new file mode 100644
index 000000000000..b1307f9678a0
--- /dev/null
+++ b/sw/inc/unodraw.hxx
@@ -0,0 +1,353 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 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 );
+
+ 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();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 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 );
+
+ // --> 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);
+ // <--
+
+ 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..6a9087519e68
--- /dev/null
+++ b/sw/inc/unoevent.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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..3b56ff6c3d33
--- /dev/null
+++ b/sw/inc/unoevtlstnr.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _UNOEVTLSTNR_HXX
+#define _UNOEVTLSTNR_HXX
+
+#include <svl/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);
+ sal_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..02b57aff8c17
--- /dev/null
+++ b/sw/inc/unofield.hxx
@@ -0,0 +1,321 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
+#include <com/sun/star/text/XDependentTextField.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <calbck.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();
+ //SwClient
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 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 );
+
+ 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;}
+};
+
+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();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 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 );
+
+ //XUpdatable
+ virtual void SAL_CALL update( ) 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 );
+
+ const SwField* GetField() const;
+ const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; };
+
+ void Invalidate();
+
+ /// @return an SwXTextField, either an already existing one or a new one
+ static SwXTextField* CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+};
+
+
+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 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 );
+
+
+ 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 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 );
+
+ // SwUnoCollection
+ virtual void Invalidate();
+};
+
+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();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+public:
+ SwXFieldEnumeration(SwDoc* pDoc);
+
+ //XEnumeration
+ virtual sal_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 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 );
+
+};
+#endif
+
+
+
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
new file mode 100644
index 000000000000..0662be96fdd6
--- /dev/null
+++ b/sw/inc/unoflatpara.hxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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/lang/XUnoTunnel.hpp>
+#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::WeakImplHelper2
+ <
+ css::text::XFlatParagraph,
+ css::lang::XUnoTunnel
+ >,
+ 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;
+
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 >& rId)
+ throw (css::uno::RuntimeException);
+
+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);
+
+protected:
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const 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;
+
+ sal_uLong mnCurrentNode; // used for non-automatic mode
+ sal_uLong mnStartNode; // used for non-automatic mode
+ sal_uLong mnEndNode; // used for non-automatic mode
+ sal_Bool mbWrapped; // used for non-automatic mode
+};
+
+#endif
diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx
new file mode 100644
index 000000000000..784a72098e87
--- /dev/null
+++ b/sw/inc/unofootnote.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOFOOTNOTE_HXX
+#define SW_UNOFOOTNOTE_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <unotext.hxx>
+
+
+class SwDoc;
+class SwModify;
+class SwFmtFtn;
+
+
+/*-----------------12.02.98 08:01-------------------
+
+--------------------------------------------------*/
+typedef ::cppu::WeakImplHelper5
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::text::XFootnote
+> SwXFootnote_Base;
+
+class SwXFootnote
+ : public SwXFootnote_Base
+ , public SwXText
+{
+
+private:
+
+ friend class SwXFootnotes;
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+
+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();
+
+ SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt);
+
+public:
+
+ SwXFootnote(const bool bEndnote);
+
+ static SwXFootnote *
+ CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt);
+ /// may return 0
+ static SwXFootnote *
+ GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() { OWeakObject::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);
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::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);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ 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);
+
+ // XFootnote
+ virtual ::rtl::OUString SAL_CALL getLabel()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabel(const ::rtl::OUString& rLabel)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursor()
+ 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 > & xTextPosition)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOFOOTNOTE_HXX
+
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
new file mode 100644
index 000000000000..297cb561cf88
--- /dev/null
+++ b/sw/inc/unoframe.hxx
@@ -0,0 +1,370 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#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 <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase6.hxx>
+
+#include <sfx2/objsh.hxx>
+
+#include <flyenum.hxx>
+#include <frmfmt.hxx>
+#include <unoevtlstnr.hxx>
+#include <unotext.hxx>
+
+
+class SfxItemPropertSet;
+class SdrObject;
+class SwDoc;
+class SwFmt;
+class SwFlyFrmFmt;
+
+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 void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+ 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 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 );
+
+ 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 SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt );
+};
+
+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);
+
+ // FIXME: EVIL HACK: make available for SwXFrame::attachToRange
+ void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(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();
+ 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 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 );
+
+ // 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();
+};
+
+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 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 );
+
+ // 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 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 );
+
+ // 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);
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+};
+
+
+
+#endif
+
diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx
new file mode 100644
index 000000000000..fe42330685a6
--- /dev/null
+++ b/sw/inc/unoidx.hxx
@@ -0,0 +1,375 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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/lang/XUnoTunnel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XDocumentIndexMark.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unocoll.hxx>
+#include <toxe.hxx>
+
+
+class SwTOXBaseSection;
+class SwTOXMark;
+class SwTOXType;
+
+/* -----------------07.12.98 10:08-------------------
+ *
+ * --------------------------------------------------*/
+
+typedef ::cppu::ImplInheritanceHelper5
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XDocumentIndex
+> SwXDocumentIndex_Base;
+
+class SwXDocumentIndex
+ : public SwXDocumentIndex_Base
+{
+
+private:
+
+ class StyleAccess_Impl;
+ class TokenAccess_Impl;
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXDocumentIndex();
+
+ SwXDocumentIndex(SwTOXBaseSection const&, SwDoc &);
+
+public:
+
+ /// descriptor
+ SwXDocumentIndex(const TOXTypes eToxType, SwDoc& rDoc);
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndex>
+ CreateXDocumentIndex(SwDoc & rDoc, SwTOXBaseSection const& rSection);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ 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);
+
+
+ // XDocumentIndex
+ virtual ::rtl::OUString SAL_CALL getServiceName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL update()
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+/* -----------------07.12.98 10:08-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper4
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::text::XDocumentIndexMark
+> SwXDocumentIndexMark_Base;
+
+class SwXDocumentIndexMark
+ : public SwXDocumentIndexMark_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXDocumentIndexMark();
+
+ SwXDocumentIndexMark(SwDoc & rDoc,
+ SwTOXType & rType, SwTOXMark & rMark);
+
+public:
+
+ /// descriptor
+ SwXDocumentIndexMark(const TOXTypes eToxType);
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndexMark>
+ CreateXDocumentIndexMark(SwDoc & rDoc,
+ SwTOXType & rType, SwTOXMark & rMark);
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ 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);
+
+ // XDocumentIndexMark
+ virtual rtl::OUString SAL_CALL getMarkEntry()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMarkEntry(const rtl::OUString& rIndexEntry)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+/* -----------------05.05.99 12:27-------------------
+ *
+ * --------------------------------------------------*/
+class SwXDocumentIndexes
+ : public SwCollectionBaseClass
+ , public SwUnoCollection
+{
+
+private:
+
+ virtual ~SwXDocumentIndexes();
+
+public:
+
+ SwXDocumentIndexes(SwDoc *const pDoc);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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);
+
+ // 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& rName)
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getElementNames() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& rName)
+ 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..d7f19640ab09
--- /dev/null
+++ b/sw/inc/unomailmerge.hxx
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/itemprop.hxx>
+#include <sfx2/objsh.hxx>
+
+#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 sal_Int32 &s) const { return s; }
+};
+
+typedef cppu::OMultiTypeInterfaceContainerHelperVar
+ <
+ sal_Int32,
+ PropHashType_Impl,
+ std::equal_to< sal_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..6f085bf0d26a
--- /dev/null
+++ b/sw/inc/unomap.hxx
@@ -0,0 +1,351 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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
+//IAccessibility2 Implementation 2009-----
+#define PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE 99
+//-----IAccessibility2 Implementation 2009
+#define PROPERTY_MAP_END 100
+
+//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
+#define WID_DOC_ISTEMPLATEID 1025
+// --> 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
+#define WID_DOC_VBA_DOCOBJ 1106
+
+
+//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..8f35f4146c59
--- /dev/null
+++ b/sw/inc/unomid.h
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..b65ae69d49fe
--- /dev/null
+++ b/sw/inc/unomod.hxx
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+class 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/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx
new file mode 100644
index 000000000000..90b1f8141902
--- /dev/null
+++ b/sw/inc/unoparaframeenum.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOPARAFRAMEENUM_HXX
+#define SW_UNOPARAFRAMEENUM_HXX
+
+#include <deque>
+
+#include <boost/shared_ptr.hpp>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <unobaseclass.hxx>
+
+
+class SwDepend;
+class SwNodeIndex;
+class SwPaM;
+class SwFrmFmt;
+
+
+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;
+
+
+// OD 2004-05-07 #i28701# - adjust 4th parameter
+void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
+ FrameDependSortList_t & rFrames,
+ const bool _bAtCharAnchoredObjs );
+
+
+/* -----------------23.03.99 12:57-------------------
+ *
+ * --------------------------------------------------*/
+
+enum ParaFrameMode
+{
+ PARAFRAME_PORTION_PARAGRAPH,
+ PARAFRAME_PORTION_CHAR,
+ PARAFRAME_PORTION_TEXTRANGE,
+};
+
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumeration
+> SwXParaFrameEnumeration_Base;
+
+class SwXParaFrameEnumeration
+ : public SwXParaFrameEnumeration_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXParaFrameEnumeration();
+
+public:
+
+ SwXParaFrameEnumeration(const SwPaM& rPaM,
+ const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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);
+
+};
+
+#endif // SW_UNOPARAFRAMEENUM_HXX
+
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
new file mode 100644
index 000000000000..5093efaf65a3
--- /dev/null
+++ b/sw/inc/unoparagraph.hxx
@@ -0,0 +1,365 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOPARAGRAPH_HXX
+#define SW_UNOPARAGRAPH_HXX
+
+#include <memory>
+
+#include <com/sun/star/lang/XUnoTunnel.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/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+
+#include <cppuhelper/implbase10.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unobaseclass.hxx>
+
+
+struct SwPosition;
+class SwPaM;
+class SwUnoCrsr;
+class SwStartNode;
+class SwTxtNode;
+class SwTable;
+class SwXText;
+
+
+/*-----------------07.04.98 08:15-------------------
+
+--------------------------------------------------*/
+typedef ::cppu::ImplInheritanceHelper10
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::beans::XMultiPropertySet
+, ::com::sun::star::beans::XTolerantMultiPropertySet
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::container::XContentEnumerationAccess
+, ::com::sun::star::text::XTextContent
+, ::com::sun::star::text::XTextRange
+> SwXParagraph_Base;
+
+class SwXParagraph
+ : public SwXParagraph_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXParagraph();
+
+ SwXParagraph(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > const & xParent,
+ SwTxtNode & rTxtNode,
+ const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
+
+public:
+
+ /// descriptor
+ SwXParagraph();
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>
+ CreateXParagraph(SwDoc & rDoc, SwTxtNode& rTxtNode,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText>
+ const& xParentText = 0,
+ const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
+
+ const SwTxtNode * GetTxtNode() const;
+ bool IsDescriptor() const;
+ /// make rPaM select the paragraph
+ bool SelectPaM(SwPaM & rPaM);
+ /// for SwXText
+ void attachToText(SwXText & rParent, SwTxtNode & rTxtNode);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ 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);
+
+ // XMultiPropertySet
+ virtual void SAL_CALL setPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rValues)
+ 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 >&
+ rPropertyNames)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ 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 >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ 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 >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rValues)
+ 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 >&
+ rPropertyNames)
+ 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 >&
+ rPropertyNames)
+ 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);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createContentEnumeration(const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getAvailableServiceNames()
+ 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);
+
+ // 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& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+/*-----------------07.04.98 08:10-------------------
+
+--------------------------------------------------*/
+class SwXParagraphEnumeration
+ : public SwSimpleEnumeration_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXParagraphEnumeration();
+
+public:
+
+ /// takes ownership of cursor
+ SwXParagraphEnumeration(
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const & xParent,
+ ::std::auto_ptr<SwUnoCrsr> pCursor,
+ const CursorType eType,
+ SwStartNode const*const pStartNode = 0,
+ SwTable const*const pTable = 0);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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);
+
+};
+
+#endif // SW_UNOPARAGRAPH_HXX
+
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
new file mode 100644
index 000000000000..bb48c64b208b
--- /dev/null
+++ b/sw/inc/unoport.hxx
@@ -0,0 +1,322 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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);
+
+ void init(const SwUnoCrsr* pPortionCursor);
+
+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);
+
+ 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();
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 );
+
+ 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 );
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+};
+
+#endif
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
new file mode 100644
index 000000000000..d0edd92e8e06
--- /dev/null
+++ b/sw/inc/unoprnms.hxx
@@ -0,0 +1,842 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
+/* 0740 */ UNO_NAME_EMBEDDED_OBJECT,
+/* 0741 */ SW_PROPNAME_END
+};
+
+
+struct SwPropNameLen
+{
+ const char* pName;
+ sal_uInt16 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( sal_uInt16 nId );
+SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( sal_uInt16 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..cda88eb01aa7
--- /dev/null
+++ b/sw/inc/unoredline.hxx
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <unotext.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,
+ sal_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);
+
+ const SwRedline* GetRedline() const {return pRedline;}
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+};
+#endif
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
new file mode 100644
index 000000000000..c0ce98d80336
--- /dev/null
+++ b/sw/inc/unoredlines.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 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 );
+
+ static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
+};
+/* -----------------------------12.01.01 14:58--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXRedlineEnumeration
+ : public SwSimpleEnumeration_Base
+ , public SwClient
+{
+ SwDoc* pDoc;
+ sal_uInt16 nCurrentIndex;
+protected:
+ virtual ~SwXRedlineEnumeration();
+public:
+ SwXRedlineEnumeration(SwDoc& rDoc);
+
+
+ //XEnumeration
+ virtual sal_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 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 );
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+};
+
+
+#endif
+
diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx
new file mode 100644
index 000000000000..ba8ca8e8b45c
--- /dev/null
+++ b/sw/inc/unorefmark.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOREFMARK_HXX
+#define SW_UNOREFMARK_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <unobaseclass.hxx>
+
+
+class SwDoc;
+class SwModify;
+class SwFmtRefMark;
+
+
+/* -----------------27.08.98 15:11-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper5
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XTextContent
+> SwXReferenceMark_Base;
+
+class SwXReferenceMark
+ : public SwXReferenceMark_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXReferenceMark();
+
+public:
+
+ SwXReferenceMark(SwDoc *const pDoc, const SwFmtRefMark *const pMark);
+
+ static SwXReferenceMark *
+ CreateXReferenceMark(SwDoc & rDoc, SwFmtRefMark const& rMarkFmt);
+ /// may return 0
+ static SwXReferenceMark *
+ GetReferenceMark(SwModify const& rUnoCB, SwFmtRefMark const& rMarkFmt);
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ 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);
+
+};
+
+#endif // SW_UNOREFMARK_HXX
+
diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx
new file mode 100644
index 000000000000..e54bdd5775af
--- /dev/null
+++ b/sw/inc/unosection.hxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOSECTION_HXX
+#define SW_UNOSECTION_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.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/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextSection.hpp>
+
+#include <cppuhelper/implbase7.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unobaseclass.hxx>
+
+
+class SwSectionFmt;
+
+
+/*-----------------09.03.98 13:57-------------------
+
+--------------------------------------------------*/
+
+
+struct SwTextSectionProperties_Impl;
+
+typedef ::cppu::ImplInheritanceHelper7
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::beans::XMultiPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XTextSection
+> SwXTextSection_Base;
+
+class SwXTextSection
+ : public SwXTextSection_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false);
+
+ virtual ~SwXTextSection();
+
+public:
+
+ SwSectionFmt* GetFmt() const;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection >
+ CreateXTextSection(SwSectionFmt *const pFmt = 0,
+ const bool bIndexHeader = false);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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 > & 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ 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);
+
+ // XMultiPropertySet
+ virtual void SAL_CALL setPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rValues)
+ 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 >&
+ rPropertyNames)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ 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 >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ 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);
+
+ // XTextSection
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection > SAL_CALL
+ getParentSection()
+ 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()
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOSECTION_HXX
+
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
new file mode 100644
index 000000000000..92f52d5ad190
--- /dev/null
+++ b/sw/inc/unosett.hxx
@@ -0,0 +1,327 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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 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 );
+
+ 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 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 );
+
+ 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 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 );
+
+ 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();
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 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 );
+
+ ::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 );
+
+ 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 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 );
+
+};
+
+/* -----------------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 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_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..a4021761925f
--- /dev/null
+++ b/sw/inc/unosrch.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 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 );
+
+ 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..080d2e03bc4b
--- /dev/null
+++ b/sw/inc/unostyle.hxx
@@ -0,0 +1,472 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/style.hxx>
+#include <svl/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 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 );
+};
+
+/* -----------------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 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 );
+};
+/* -----------------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);
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+public:
+ SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_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 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 );
+
+ //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; }
+};
+/* -----------------------------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;
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+ SwXAutoStyleFamily(SwDocShell* pDocShell, IStyleAccess::SwAutoStyleFamily eFamily);
+ virtual ~SwXAutoStyleFamily();
+
+ //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();
+
+ //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);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+};
+
+/*-- 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();
+
+ //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);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+};
+#endif
+
+
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
new file mode 100644
index 000000000000..b875a8798f0f
--- /dev/null
+++ b/sw/inc/unotbl.hxx
@@ -0,0 +1,623 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/util/XSortable.hpp>
+#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/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <cppuhelper/implbase10.hxx>
+
+#include <comphelper/uno3.hxx>
+#include <tools/string.hxx>
+
+#include <calbck.hxx>
+#include <TextCursorHelper.hxx>
+#include <unoevtlstnr.hxx>
+#include <unotext.hxx>
+
+
+class SwUnoCrsr;
+class SwTable;
+class SwTableBox;
+class SwTableLine;
+class SwTableCursor;
+class SwTableBoxFmt;
+class SwChartDataProvider;
+class SwFrmFmt;
+
+
+/* -----------------------------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,
+ sal_Bool bKeepNumberFmt = sal_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;
+
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ bool IsValid() const;
+
+ virtual ~SwXCell();
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 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 );
+
+ //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();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+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 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 );
+
+ 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 SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base
+ ,public SwClient
+ ,public OTextCursorHelper
+{
+ SwDepend aCrsrDepend;
+ const SfxItemPropertySet* m_pPropSet;
+
+ // 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 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 );
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const 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();
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+};
+
+/*-----------------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 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 );
+
+ 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( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+};
+
+/* -----------------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 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 );
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const 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 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 );
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const 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 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 );
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+};
+
+#endif
+
+
+
+
diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx
new file mode 100644
index 000000000000..908c48aac4ac
--- /dev/null
+++ b/sw/inc/unotext.hxx
@@ -0,0 +1,346 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOTEXT_HXX
+#define SW_UNOTEXT_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextCopy.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 <unobaseclass.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextContent;
+ }
+} } }
+
+class SfxItemPropertySet;
+class SwDoc;
+class SwStartNode;
+class SwPaM;
+class OTextCursorHelper;
+class SwXTextRange;
+
+
+/* -----------------03.12.98 12:22-------------------
+ *
+ * --------------------------------------------------*/
+
+class SwXText
+ : public ::com::sun::star::lang::XTypeProvider
+ , public ::com::sun::star::lang::XUnoTunnel
+ , public ::com::sun::star::beans::XPropertySet
+ , public ::com::sun::star::text::XTextAppendAndConvert
+ , public ::com::sun::star::text::XTextCopy
+ , public ::com::sun::star::text::XTextRangeCompare
+ , public ::com::sun::star::text::XRelativeTextContentInsert
+ , public ::com::sun::star::text::XRelativeTextContentRemove
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual void PrepareForAttach(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ SwPaM const & rPam);
+ virtual bool CheckForOwnMemberMeta(
+ const SwPaM & rPam, const bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+protected:
+
+ bool IsValid() const;
+ void Invalidate();
+ void SetDoc(SwDoc *const pDoc);
+
+ virtual ~SwXText();
+
+public: /*not protected because C++ is retarded*/
+ virtual const SwStartNode *GetStartNode() const;
+
+public:
+
+ SwXText(SwDoc *const pDoc, const enum CursorType eType);
+
+ const SwDoc* GetDoc() const;
+ SwDoc* GetDoc();
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+ SAL_CALL getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ 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 >& rIdentifier)
+ 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // 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& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual void SAL_CALL insertString(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ const ::rtl::OUString& aString, sal_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, sal_Bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XText
+ 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,
+ sal_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);
+
+ // 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 >&
+ rCharacterAndParagraphProperties)
+ 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 >&
+ rCharacterAndParagraphProperties)
+ 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& rText,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >&
+ rCharacterAndParagraphProperties)
+ 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 >& xTextContent,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >&
+ rCharacterAndParagraphProperties)
+ 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 >& xStart,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xEnd,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& xFrameProperties)
+ 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(
+ ::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 > > > > const&
+ rTableRanges,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > > > const&
+ rCellProperties,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > > const&
+ rRowProperties,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > const&
+ rTableProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextCopy
+ virtual void SAL_CALL copyText(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCopy >& xSource )
+ 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);
+};
+
+#endif // SW_UNOTEXT_HXX
+
diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx
new file mode 100644
index 000000000000..dd5fa736fe17
--- /dev/null
+++ b/sw/inc/unotextbodyhf.hxx
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOTEXTBODYHF_HXX
+#define SW_UNOTEXTBODYHF_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <unotext.hxx>
+
+
+class SwDoc;
+class SwFrmFmt;
+class SwXTextCursor;
+
+
+typedef ::cppu::WeakAggImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumerationAccess
+> SwXBodyText_Base;
+
+class SwXBodyText
+ : public SwXBodyText_Base
+ , public SwXText
+{
+
+protected:
+
+ virtual ~SwXBodyText();
+
+public:
+
+ SwXBodyText(SwDoc *const pDoc);
+
+ SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ 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& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+ SAL_CALL getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
+ getImplementationId()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursor()
+ 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 > & xTextPosition)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+/* -----------------25.08.98 11:02-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumerationAccess
+> SwXHeadFootText_Base;
+
+class SwXHeadFootText
+ : public SwXHeadFootText_Base
+ , public SwXText
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+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 ~SwXHeadFootText();
+
+ SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader);
+
+public:
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ CreateXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader);
+ static bool IsXHeadFootText(SwClient *const pClient);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() { OWeakObject::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);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursor()
+ 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 > & xTextPosition)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOTEXTBODYHF_HXX
+
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
new file mode 100644
index 000000000000..fe04602377c0
--- /dev/null
+++ b/sw/inc/unotextcursor.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOTEXTCURSOR_HXX
+#define SW_UNOTEXTCURSOR_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.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/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/util/XSortable.hpp>
+#include <com/sun/star/document/XDocumentInsertable.hpp>
+#include <com/sun/star/text/XSentenceCursor.hpp>
+#include <com/sun/star/text/XWordCursor.hpp>
+#include <com/sun/star/text/XParagraphCursor.hpp>
+#include <com/sun/star/text/XRedline.hpp>
+
+#include <cppuhelper/implbase12.hxx>
+
+#include <comphelper/uno3.hxx>
+
+#include <unobaseclass.hxx>
+#include <TextCursorHelper.hxx>
+
+
+class SwDoc;
+struct SwPosition;
+class SwUnoCrsr;
+
+
+typedef ::cppu::WeakImplHelper12
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::beans::XMultiPropertyStates
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::container::XContentEnumerationAccess
+, ::com::sun::star::util::XSortable
+, ::com::sun::star::document::XDocumentInsertable
+, ::com::sun::star::text::XSentenceCursor
+, ::com::sun::star::text::XWordCursor
+, ::com::sun::star::text::XParagraphCursor
+, ::com::sun::star::text::XRedline
+> SwXTextCursor_Base;
+
+class SwXTextCursor
+ : public SwXTextCursor_Base
+ , public OTextCursorHelper
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXTextCursor();
+
+public:
+
+ SwXTextCursor(
+ SwDoc & rDoc,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > const& xParent,
+ const enum CursorType eType,
+ SwPosition const& rPos,
+ SwPosition const*const pMark = 0);
+ SwXTextCursor(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > const& xParent,
+ SwPaM const& rSourceCursor,
+ const enum CursorType eType = CURSOR_ALL);
+
+ SwUnoCrsr * GetCursor();
+ const SwUnoCrsr * GetCursor() const;
+
+ bool IsAtEndOfMeta() const;
+
+ void DeleteAndInsert(::rtl::OUString const& rText,
+ const bool bForceExpandHints);
+
+ // OTextCursorHelper
+ virtual const SwPaM* GetPaM() const;
+ virtual SwPaM* GetPaM();
+ virtual const SwDoc* GetDoc() const;
+ virtual SwDoc* GetDoc();
+
+ DECLARE_XINTERFACE()
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ 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);
+
+ // XMultiPropertyStates
+ virtual void SAL_CALL setAllPropertiesToDefault()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ 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 >&
+ rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::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);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createContentEnumeration(const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getAvailableServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSortable
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > SAL_CALL
+ createSortDescriptor()
+ 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);
+
+ // XDocumentInsertable
+ virtual void SAL_CALL insertDocumentFromURL(
+ const ::rtl::OUString& 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);
+
+ // 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& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextCursor
+ virtual void SAL_CALL collapseToStart()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL collapseToEnd()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isCollapsed()
+ 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 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 void SAL_CALL gotoRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xRange,
+ sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XWordCursor
+ virtual sal_Bool SAL_CALL isStartOfWord()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEndOfWord()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoNextWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoPreviousWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoEndOfWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoStartOfWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSentenceCursor
+ virtual sal_Bool SAL_CALL isStartOfSentence()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEndOfSentence()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoNextSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoPreviousSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoStartOfSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoEndOfSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XParagraphCursor
+ virtual sal_Bool SAL_CALL isStartOfParagraph()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEndOfParagraph()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoStartOfParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoEndOfParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoNextParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoPreviousParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XRedline
+ virtual void SAL_CALL makeRedline(
+ const ::rtl::OUString& rRedlineType,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& RedlineProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOTEXTCURSOR_HXX
+
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
new file mode 100644
index 000000000000..7d48595e8e3b
--- /dev/null
+++ b/sw/inc/unotextmarkup.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#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 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);
+
+private:
+ SwXTextMarkup( const SwXTextMarkup & ); // not defined
+ SwXTextMarkup & operator =( const SwXTextMarkup & ); // not defined
+
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+ 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/unotextrange.hxx b/sw/inc/unotextrange.hxx
new file mode 100644
index 000000000000..4a10c7acf513
--- /dev/null
+++ b/sw/inc/unotextrange.hxx
@@ -0,0 +1,338 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_UNOTEXTRANGE_HXX
+#define SW_UNOTEXTRANGE_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.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/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XRedline.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase8.hxx>
+
+#include <pam.hxx>
+#include <unobaseclass.hxx>
+
+
+class SwDoc;
+struct SwPosition;
+class SwPaM;
+class SwUnoCrsr;
+class SwFrmFmt;
+
+/* -----------------29.04.98 07:35-------------------
+ *
+ * --------------------------------------------------*/
+class SwUnoInternalPaM
+ : public SwPaM
+{
+
+private:
+ SwUnoInternalPaM(const SwUnoInternalPaM&);
+
+public:
+ SwUnoInternalPaM(SwDoc& rDoc);
+ virtual ~SwUnoInternalPaM();
+
+ SwUnoInternalPaM& operator=(const SwPaM& rPaM);
+};
+
+
+namespace sw {
+
+ void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget);
+
+ bool XTextRangeToSwPaM(SwUnoInternalPaM& rToFill,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos);
+
+ bool GetDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
+ const ::rtl::OUString& rPropertyName, sal_uInt16 nWID = 0);
+
+} // namespace sw
+
+
+typedef ::cppu::WeakImplHelper8
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::container::XContentEnumerationAccess
+, ::com::sun::star::text::XTextRange
+, ::com::sun::star::text::XRedline
+> SwXTextRange_Base;
+
+class SW_DLLPUBLIC SwXTextRange
+ : public SwXTextRange_Base
+{
+
+private:
+
+ friend class SwXText;
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ enum RangePosition
+ {
+ RANGE_IN_TEXT, // "ordinary" ::com::sun::star::text::TextRange
+ RANGE_IN_CELL, // position created with a cell that has no uno object
+ RANGE_IS_TABLE, // anchor of a table
+ };
+
+ void SetPositions(SwPaM const& rPam);
+ //TODO: new exception type for protected content
+ void DeleteAndInsert(
+ const ::rtl::OUString& rText, const bool bForceExpandHints)
+ throw (::com::sun::star::uno::RuntimeException);
+ void Invalidate();
+
+ virtual ~SwXTextRange();
+
+public:
+
+ SwXTextRange(SwPaM& rPam,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > & xParent,
+ const enum RangePosition eRange = RANGE_IN_TEXT);
+ // only for RANGE_IS_TABLE
+ SwXTextRange(SwFrmFmt& rTblFmt);
+
+ const SwDoc* GetDoc() const;
+ SwDoc* GetDoc();
+ bool GetPositions(SwPaM & rToFill) const;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > CreateXTextRange(
+ SwDoc & rDoc,
+ const SwPosition& rPos, const SwPosition *const pMark);
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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& rPropertyName,
+ 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,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ 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& rPropertyName,
+ 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 addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ 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);
+
+ // 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);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createContentEnumeration(const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getAvailableServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // 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& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XRedline
+ virtual void SAL_CALL makeRedline(
+ const ::rtl::OUString& rRedlineType,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& RedlineProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+/* -----------------15.05.98 08:29-------------------
+ *
+ * --------------------------------------------------*/
+
+typedef ::cppu::WeakImplHelper3
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XIndexAccess
+> SwXTextRanges_Base;
+
+class SwXTextRanges
+ : public SwXTextRanges_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXTextRanges();
+
+public:
+
+ SwXTextRanges(SwPaM *const pCrsr);
+
+ const SwUnoCrsr* GetCursor() const;
+
+ 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 >& rIdentifier)
+ 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& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ 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);
+
+ // 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);
+
+};
+
+#endif // SW_UNOTEXTRANGE_HXX
+
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
new file mode 100644
index 000000000000..bb5168a16c1c
--- /dev/null
+++ b/sw/inc/unotxdoc.hxx
@@ -0,0 +1,611 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svl/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/frame/XController.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 <svl/itemprop.hxx>
+#include <svx/fmdmod.hxx>
+#include <editeng/UnoForbiddenCharsTable.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <RefreshListenerContainer.hxx>
+
+#include <viewopt.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 )
+
+namespace css = ::com::sun::star;
+
+class SwDoc;
+class SwDocShell;
+class UnoActionContext;
+class SwXBodyText;
+class SwXDrawPage;
+class SwUnoCrsr;
+class SwXDocumentPropertyHelper;
+class SfxViewFrame;
+class SwPrintUIOptions;
+class SwPrintData;
+class SwRenderData;
+class ViewShell;
+
+typedef UnoActionContext* UnoActionContextPtr;
+SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
+
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+
+
+typedef cppu::WeakImplHelper32
+<
+ css::text::XTextDocument,
+ css::text::XLineNumberingProperties,
+ css::text::XChapterNumberingSupplier,
+ css::text::XNumberingRulesSupplier,
+ css::text::XFootnotesSupplier,
+ css::text::XEndnotesSupplier,
+ css::util::XReplaceable,
+ css::text::XPagePrintable,
+ css::text::XReferenceMarksSupplier,
+ css::text::XTextTablesSupplier,
+ css::text::XTextFramesSupplier,
+ css::text::XBookmarksSupplier,
+ css::text::XTextSectionsSupplier,
+ css::text::XTextGraphicObjectsSupplier,
+ css::text::XTextEmbeddedObjectsSupplier,
+ css::text::XTextFieldsSupplier,
+ css::style::XStyleFamiliesSupplier,
+ css::style::XAutoStylesSupplier,
+ css::lang::XServiceInfo,
+ css::drawing::XDrawPageSupplier,
+ css::text::XDocumentIndexesSupplier,
+ css::beans::XPropertySet,
+ css::beans::XPropertyState,
+ css::document::XLinkTargetSupplier,
+ css::document::XRedlinesSupplier,
+ css::util::XRefreshable,
+ css::util::XLinkUpdate,
+ css::view::XRenderable,
+ css::xforms::XFormsSupplier,
+ css::text::XFlatParagraphIteratorProvider,
+ css::document::XDocumentLanguages,
+ css::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;
+ css::uno::Reference< css::drawing::XDrawPage > * pxXDrawPage;
+
+ css::uno::Reference< css::text::XText > xBodyText;
+ SwXBodyText* pBodyText;
+ css::uno::Reference< css::uno::XAggregation > xNumFmtAgg;
+
+ css::uno::Reference< css::container::XIndexAccess > * pxXNumberingRules;
+ css::uno::Reference< css::container::XIndexAccess > * pxXFootnotes;
+ css::uno::Reference< css::beans::XPropertySet > * pxXFootnoteSettings;
+ css::uno::Reference< css::container::XIndexAccess > * pxXEndnotes;
+ css::uno::Reference< css::beans::XPropertySet > * pxXEndnoteSettings;
+ css::uno::Reference< css::container::XNameAccess > * pxXReferenceMarks;
+ css::uno::Reference< css::container::XEnumerationAccess > * pxXTextFieldTypes;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextFieldMasters;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextSections;
+ css::uno::Reference< css::container::XNameAccess > * pxXBookmarks;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextTables;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextFrames;
+ css::uno::Reference< css::container::XNameAccess > * pxXGraphicObjects;
+ css::uno::Reference< css::container::XNameAccess > * pxXEmbeddedObjects;
+ css::uno::Reference< css::container::XNameAccess > * pxXStyleFamilies;
+ mutable css::uno::Reference< css::style::XAutoStyles > * pxXAutoStyles;
+ css::uno::Reference< css::container::XIndexReplace > * pxXChapterNumbering;
+ css::uno::Reference< css::container::XIndexAccess > * pxXDocumentIndexes;
+
+ css::uno::Reference< css::beans::XPropertySet > * pxXLineNumberingProperties;
+ css::uno::Reference< css::container::XNameAccess > * pxLinkTargetSupplier;
+ css::uno::Reference< css::container::XEnumerationAccess >* pxXRedlines;
+ css::uno::Reference< css::container::XNameContainer> xXFormsContainer;
+
+ //temporary frame to enable PDF export if no valid view is available
+ SfxViewFrame* m_pHiddenViewFrame;
+ css::uno::Reference< css::uno::XInterface> xPropertyHelper;
+ SwXDocumentPropertyHelper* pPropertyHelper;
+
+ SwPrintUIOptions * m_pPrintUIOptions;
+ SwRenderData * m_pRenderData;
+
+ void GetBodyText();
+ void GetNumberFormatter();
+
+ // used for XRenderable implementation
+ SfxViewShell * GuessViewShell( /* out */ bool &rbIsSwSrcView, const css::uno::Reference< css::frame::XController > xController = css::uno::Reference< css::frame::XController >() );
+ SwDoc * GetRenderDoc( SfxViewShell *&rpView, const css::uno::Any& rSelection, bool bIsPDFExport );
+ SfxViewShell * GetRenderView( bool &rbIsSwSrcView, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions, bool bIsPDFExport );
+
+ rtl::OUString maBuildId;
+
+ using SfxBaseModel::addEventListener;
+ using SfxBaseModel::removeEventListener;
+
+protected:
+ virtual ~SwXTextDocument();
+public:
+ SwXTextDocument(SwDocShell* pShell);
+
+ inline void notifyRefreshListeners() { aRefreshCont.Refreshed(); }
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XWeak
+ virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter( ) throw(css::uno::RuntimeException);
+
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw(css::uno::RuntimeException);
+
+ static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException);
+
+ //XTextDocument
+ virtual css::uno::Reference< css::text::XText > SAL_CALL getText(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL reformat(void) throw( css::uno::RuntimeException );
+
+ //XModel
+ virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) throw(css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getURL( ) throw(css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL lockControllers( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL unlockControllers( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(css::uno::RuntimeException);
+ virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::container::NoSuchElementException, css::uno::RuntimeException);
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(css::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException );
+
+ //XCloseable
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException);
+
+ //XLineNumberingProperties
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( css::uno::RuntimeException );
+
+ //XChapterNumberingSupplier
+ virtual css::uno::Reference< css::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( css::uno::RuntimeException );
+
+ //XNumberingRulesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() throw (css::uno::RuntimeException);
+
+ //XFootnotesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( css::uno::RuntimeException );
+
+ //XEndnotesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( css::uno::RuntimeException );
+
+ //XReplaceable
+ virtual css::uno::Reference< css::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( css::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL replaceAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+
+ //XSearchable
+ virtual css::uno::Reference< css::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL findAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findFirst(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findNext(const css::uno::Reference< css::uno::XInterface > & xStartAt, const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+
+ //XPagePrintable
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL setPagePrintSettings(const css::uno::Sequence< css::beans::PropertyValue >& aSettings) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL printPages(const css::uno::Sequence< css::beans::PropertyValue >& xOptions) throw( css::lang::IllegalArgumentException, css::uno::RuntimeException );
+
+ //XReferenceMarksSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextFieldsSupplier
+ virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextEmbeddedObjectsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( css::uno::RuntimeException );
+
+// // css::text::XTextShapesSupplier
+// virtual css::uno::Reference< css::container::XIndexAccess > getShapes(void) throw( css::uno::RuntimeException );
+
+ // css::text::XBookmarksSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getBookmarks(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextSectionsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextSections(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextTablesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextTables(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextGraphicObjectsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextFramesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFrames(void) throw( css::uno::RuntimeException );
+
+ //XStyleFamiliesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( css::uno::RuntimeException );
+
+ //XAutoStylesSupplier
+ virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (css::uno::RuntimeException);
+
+ //XMultiServiceFactory
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier)
+ throw( css::uno::Exception, css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier,
+ const css::uno::Sequence< css::uno::Any >& Arguments)
+ throw( css::uno::Exception, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void)
+ throw( css::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+
+ // css::drawing::XDrawPageSupplier
+ virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( css::uno::RuntimeException );
+
+ // css::text::XDocumentIndexesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( css::uno::RuntimeException );
+
+ //XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XPropertyState
+ virtual css::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XLinkTargetSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
+
+ //XRedlinesSupplier
+ virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(css::uno::RuntimeException);
+
+ // css::util::XRefreshable
+ virtual void SAL_CALL refresh(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException );
+
+ // css::util::XLinkUpdate,
+ virtual void SAL_CALL updateLinks( ) throw(css::uno::RuntimeException);
+
+ // css::view::XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ // css::xforms::XFormsSupplier
+ virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms( ) throw (css::uno::RuntimeException);
+
+ // css::document::XDocumentLanguages
+ virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ // css::text::XFlatParagraphIteratorProvider:
+ virtual css::uno::Reference< css::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (css::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(css::uno::Reference< css::text::XTextCursor > & xCrsr);
+ SwUnoCrsr* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc,
+ css::uno::Reference< css::text::XTextCursor > & xCrsr, sal_Bool bAll,
+ sal_Int32& nResult,
+ css::uno::Reference< css::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
+<
+ css::container::XNameAccess,
+ css::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 css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException );
+
+ //XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+
+ //
+ void Invalidate() {pxDoc = 0;}
+};
+/* -----------------26.10.99 09:05-------------------
+
+ --------------------------------------------------*/
+class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
+<
+ css::beans::XPropertySet,
+ css::container::XNameAccess,
+ css::lang::XServiceInfo,
+ css::document::XLinkTargetSupplier
+>
+{
+ css::uno::Reference< css::container::XNameAccess > xRealAccess;
+ const SfxItemPropertySet* pPropSet;
+ const String sLinkSuffix;
+ const String sLinkDisplayName;
+ css::uno::Reference< css::text::XTextDocument > xDoc;
+ SwXTextDocument* pxDoc;
+
+
+public:
+ SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > xAccess,
+ const String& rLinkDisplayName, String sSuffix);
+ SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
+ const String& rLinkDisplayName, String sSuffix);
+ ~SwXLinkNameAccessWrapper();
+
+ //XNameAccess
+ virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException );
+
+ //XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException);
+
+ //XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XLinkTargetSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+
+};
+/* -----------------26.10.99 15:46-------------------
+
+ --------------------------------------------------*/
+class SwXOutlineTarget : public cppu::WeakImplHelper2
+<
+ css::beans::XPropertySet,
+ css::lang::XServiceInfo
+>
+{
+ const SfxItemPropertySet* pPropSet;
+ String sOutlineText;
+
+public:
+ SwXOutlineTarget(const String& rOutlineText);
+ ~SwXOutlineTarget();
+
+ //XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+};
+#endif
+
+class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
+{
+ css::uno::Reference < css::uno::XInterface > xDashTable;
+ css::uno::Reference < css::uno::XInterface > xGradientTable;
+ css::uno::Reference < css::uno::XInterface > xHatchTable;
+ css::uno::Reference < css::uno::XInterface > xBitmapTable;
+ css::uno::Reference < css::uno::XInterface > xTransGradientTable;
+ css::uno::Reference < css::uno::XInterface > xMarkerTable;
+ css::uno::Reference < css::uno::XInterface > xDrawDefaults;
+
+ SwDoc* m_pDoc;
+public:
+ SwXDocumentPropertyHelper(SwDoc& rDoc);
+ ~SwXDocumentPropertyHelper();
+ css::uno::Reference<css::uno::XInterface> GetDrawTable(short nWhich);
+ void Invalidate();
+
+ virtual void onChange();
+};
+
+
+/*-- 06.01.2004 15:08:34---------------------------------------------------
+ The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
+ the current ViewShell so that fields are not printed as commands and
+ hidden characters are always invisible. Hidden text and place holders
+ should be printed according to the current print options.
+ After printing the view options are restored
+ -----------------------------------------------------------------------*/
+class SwViewOptionAdjust_Impl
+{
+ ViewShell & m_rShell;
+ SwViewOption m_aOldViewOptions;
+// SwViewOption m_aRenderViewOptions; // view options to use when rendering for PDF export or printing
+// bool m_bRestoreViewOptions;
+
+public:
+ SwViewOptionAdjust_Impl( ViewShell& rSh, const SwViewOption &rViewOptions );
+ ~SwViewOptionAdjust_Impl();
+ void AdjustViewOptions( SwPrintData const* const pPrtOptions );
+ bool checkShell( const ViewShell& rCompare ) const
+ { return &rCompare == &m_rShell; }
+};
+
+
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
new file mode 100644
index 000000000000..11d1db177c84
--- /dev/null
+++ b/sw/inc/usrfld.hxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_USRFLD_HXX
+#define SW_USRFLD_HXX
+
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+class SfxPoolItem;
+class SwCalc;
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Benutzerfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType
+{
+ sal_Bool bValidValue : 1;
+ sal_Bool bDeleted : 1;
+ double nValue;
+ String aName;
+ String aContent;
+ sal_uInt16 nType;
+
+public:
+ SwUserFieldType( SwDoc* pDocPtr, const String& );
+
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const;
+
+ String Expand(sal_uInt32 nFmt, sal_uInt16 nSubType, sal_uInt16 nLng);
+
+ String GetContent( sal_uInt32 nFmt = 0 );
+ void SetContent( const String& rStr, sal_uInt32 nFmt = 0 );
+
+ inline sal_Bool IsValid() const;
+ inline void ChgValid( sal_Bool bNew );
+
+ double GetValue(SwCalc& rCalc); // Member nValue neu berrechnen
+ inline double GetValue() const;
+ inline void SetValue(const double nVal);
+
+ inline sal_uInt16 GetType() const;
+ inline void SetType(sal_uInt16);
+
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+};
+
+inline sal_Bool SwUserFieldType::IsValid() const
+ { return bValidValue; }
+
+inline void SwUserFieldType::ChgValid( sal_Bool bNew )
+ { bValidValue = bNew; }
+
+inline double SwUserFieldType::GetValue() const
+ { return nValue; }
+
+inline void SwUserFieldType::SetValue(const double nVal)
+ { nValue = nVal; }
+
+inline sal_uInt16 SwUserFieldType::GetType() const
+ { return nType; }
+
+inline void SwUserFieldType::SetType(sal_uInt16 nSub)
+{
+ nType = nSub;
+ EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Benutzerfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwUserField : public SwValueField
+{
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+public:
+ SwUserField(SwUserFieldType*, sal_uInt16 nSub = 0, sal_uInt32 nFmt = 0);
+
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+
+ virtual double GetValue() const;
+ virtual void SetValue( const double& rVal );
+
+ virtual String GetFieldName() const;
+
+ // Name kann nicht geaendert werden
+ virtual const String& GetPar1() const;
+
+ // Inhalt
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
+};
+
+#endif // SW_USRFLD_HXX
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
new file mode 100644
index 000000000000..c290f1ed9c99
--- /dev/null
+++ b/sw/inc/viewopt.hxx
@@ -0,0 +1,615 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 no longer used, see new member 'bIdle'
+#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_PRINTING 0x00000020L
+#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 sal_uInt16 nPixelTwips;// 1 Pixel == ? Twips
+
+ String sSymbolFont; // Symbolzeichensatz
+ sal_uInt32 nCoreOptions; // Bits fuer die ViewShell
+ sal_uInt32 nCore2Options; // Bits fuer die ViewShell
+ sal_uInt32 nUIOptions; // UI-Bits
+ Color aRetoucheColor; // DefaultBackground fuer BrowseView
+ Size aSnapSize; // Beschreibt hori. wie vert. Snap
+ sal_uInt16 mnViewLayoutColumns;// # columns for edit view
+ short nDivisionX; // Rasterunterteilung
+ short nDivisionY;
+ sal_uInt8 nPagePrevRow; // Page Preview Row/Columns
+ sal_uInt8 nPagePrevCol; // Page Preview Row/Columns
+ sal_uInt8 nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
+ sal_Bool bReadonly : 1; // Readonly-Doc
+ sal_Bool bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
+ sal_Bool bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
+ sal_Bool bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
+ sal_Bool mbFormView : 1;
+ sal_Bool mbBrowseMode : 1; //swmod 080130
+ sal_Bool mbBookView : 1; // view mode for page preview
+ sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view
+ sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
+ mutable bool bIdle;
+
+ // Maszstab
+ sal_uInt16 nZoom; // Angaben in Prozent
+ SvxZoomType eZoom; // 'enum' fuer Zoom
+
+ sal_uInt8 nTblDest; // Ziel fuer Tabellenhintergrund
+
+#ifdef DBG_UTIL
+ // korrespondieren zu den Angaben in ui/config/cfgvw.src
+ sal_Bool bTest1 :1; // Test-Flag "Layout not loading"
+ sal_Bool bTest2 :1; // Test-Flag "WYSIWYG++"
+ sal_Bool bTest3 :1; // Test-Flag ""
+ sal_Bool bTest4 :1; // Test-Flag "WYSIWYG debug"
+ sal_Bool bTest5 :1; // Test-Flag "No idle format"
+ sal_Bool bTest6 :1; // Test-Flag "No screen adj"
+ sal_Bool bTest7 :1; // Test-Flag "win format"
+ sal_Bool bTest8 :1; // Test-Flag ""
+ static sal_Bool bTest9; // Test-Flag "DrawingLayerNotLoading"
+ sal_Bool bTest10 :1; // Test-Flag "Format by Input"
+#endif
+
+public:
+ SwViewOption(); // CTOR
+ SwViewOption(const SwViewOption&); //
+ ~SwViewOption(); //
+
+ void Init( Window *pWin ); // Initialisierung der statischen Daten
+
+ sal_uInt16 GetPixelTwips() const { return nPixelTwips; }
+
+ inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;}
+ inline void SetUIOptions( const SwViewOption& );
+
+/*---------------------------------------------------------------------------
+ Optionen aus nCoreOptions
+----------------------------------------------------------------------------*/
+
+ inline sal_Bool IsIdle() const
+ { return bIdle; }
+
+ // logically this is a const function since it does not modify the viewoptions
+ // but only effects idle formatting. Of course that member is already implement
+ // in the wrong place here... Also currently there are many const modifying casts in the code
+ // just to call this function on otherwise const objects. Thus declaring it as const now.
+ inline void SetIdle( sal_Bool b ) const
+ { bIdle = b; }
+
+ inline sal_Bool IsTab(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? sal_True : sal_False; }
+ inline void SetTab( sal_Bool b ) {
+ (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
+
+ inline sal_Bool IsBlank(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? sal_True : sal_False; }
+ inline void SetBlank( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
+
+ inline sal_Bool IsHardBlank() const
+ { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; }
+ inline void SetHardBlank( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
+
+ inline sal_Bool IsParagraph(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? sal_True : sal_False; }
+ inline void SetParagraph( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
+
+ inline sal_Bool IsLineBreak(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? sal_True : sal_False; }
+ inline void SetLineBreak( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
+
+ inline void SetPageBreak( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
+
+ inline void SetColumnBreak( sal_Bool b)
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
+
+ inline sal_Bool IsSoftHyph() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; }
+ inline void SetSoftHyph( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
+
+ inline sal_Bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; }
+ inline void SetFldName( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
+
+ inline sal_Bool IsPostIts() const
+ { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; }
+ inline void SetPostIts( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); }
+ void PaintPostIts( OutputDevice *pOut, const SwRect &rRect,
+ sal_Bool bIsScript ) const;
+ sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
+
+ inline sal_Bool IsShowHiddenChar(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? sal_True : sal_False; }
+
+ inline void SetShowHiddenChar( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); }
+
+
+ inline sal_Bool IsShowHiddenField() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; }
+ inline void SetShowHiddenField( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); }
+
+ inline sal_Bool IsGraphic() const
+ { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; }
+ inline void SetGraphic( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
+
+ inline sal_Bool IsPageBack() const
+ { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; }
+ inline void SetPageBack( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
+
+ inline sal_Bool IsSolidMarkHdl() const
+ { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? sal_True : sal_False; }
+ inline void SetSolidMarkHdl( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
+
+ inline sal_Bool IsBigMarkHdl() const
+ { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? sal_True : sal_False;}
+ inline void SetBigMarkHdl(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
+
+ inline sal_Bool IsTable() const
+ { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; }
+ inline void SetTable( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
+
+ inline sal_Bool IsDraw() const
+ { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; }
+ inline void SetDraw( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
+
+ inline sal_Bool IsControl() const
+ { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; }
+ inline void SetControl( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
+
+ inline sal_Bool IsSnap() const
+ { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; }
+ inline void SetSnap( sal_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 sal_Bool IsGridVisible() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; }
+ inline void SetGridVisible( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
+
+ inline sal_Bool IsOnlineSpell() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; }
+ inline void SetOnlineSpell( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
+
+ inline sal_Bool IsViewMetaChars() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; }
+ inline void SetViewMetaChars( sal_Bool b)
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
+
+ inline sal_Bool IsSynchronize() const
+ { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;}
+ inline void SetSynchronize( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
+
+ inline sal_Bool IsCrossHair() const
+ { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; }
+ inline void SetCrossHair( sal_Bool b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); }
+
+/*---------------------------------------------------------------------------
+ Optionen aus nCore2Options
+----------------------------------------------------------------------------*/
+ inline sal_Bool IsBlackFont() const
+ {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;}
+
+ inline void SetBlackFont(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
+
+ inline sal_Bool IsShowHiddenPara() const
+ {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;}
+
+ inline void SetShowHiddenPara(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
+
+ inline sal_Bool IsSmoothScroll() const
+ {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;}
+
+ inline void SetSmoothScroll(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
+
+ inline sal_Bool IsCursorInProtectedArea() const
+ {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;}
+
+ inline void SetCursorInProtectedArea(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
+
+ inline sal_Bool IsPDFExport() const
+ {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;}
+
+ inline void SetPDFExport(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
+
+ inline sal_Bool IsPrinting() const
+ {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;}
+
+ inline void SetPrinting(sal_Bool b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
+
+/*---------------------------------------------------------------------------
+
+----------------------------------------------------------------------------*/
+
+
+ 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 sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; }
+ inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; }
+ inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; }
+ inline void SetPagePrevCol( sal_uInt8 n ) { nPagePrevCol = n; }
+ sal_Bool IsReadonly() const { return bReadonly; }
+ void SetReadonly(sal_Bool bSet) { bReadonly = bSet; }
+
+ sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;}
+ void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;}
+
+ sal_Bool IsFormView() const { return mbFormView; }
+ void SetFormView( sal_Bool bSet ) { mbFormView = bSet; }
+ // <--
+
+ inline sal_Bool getBrowseMode() const { return mbBrowseMode; }
+ inline void setBrowseMode(sal_Bool bSet) { mbBrowseMode = bSet; }
+ inline sal_Bool IsPagePrevBookview() const { return mbBookView; }
+ inline void SetPagePrevBookview(sal_Bool bSet) { mbBookView = bSet; }
+
+ sal_Bool IsAutoCompleteWords() const;
+
+ // PAGES01
+ bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
+ void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
+ sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
+ void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
+
+#ifdef DBG_UTIL
+ // korrespondieren zu den Angaben in ui/config/cfgvw.src
+ inline sal_Bool IsTest1() const { return bTest1; }
+ inline void SetTest1( sal_Bool b ) { bTest1 = b; }
+ inline sal_Bool IsTest2() const { return bTest2; }
+ inline void SetTest2( sal_Bool b ) { bTest2 = b; }
+ inline sal_Bool IsTest3() const { return bTest3; }
+ inline void SetTest3( sal_Bool b ) { bTest3 = b; }
+ inline sal_Bool IsTest4() const { return bTest4; }
+ inline void SetTest4( sal_Bool b ) { bTest4 = b; }
+ inline sal_Bool IsTest5() const { return bTest5; }
+ inline void SetTest5( sal_Bool b ) { bTest5 = b; }
+ inline sal_Bool IsTest6() const { return bTest6; }
+ inline void SetTest6( sal_Bool b ) { bTest6 = b; }
+ inline sal_Bool IsTest7() const { return bTest7; }
+ inline void SetTest7( sal_Bool b ) { bTest7 = b; }
+ inline sal_Bool IsTest8() const { return bTest8; }
+ inline void SetTest8( sal_Bool b ) { bTest8 = b; }
+ static inline sal_Bool IsTest9() { return bTest9; }
+ static inline void SetTest9( sal_Bool b ) { bTest9 = b; }
+ inline sal_Bool IsTest10() const { return bTest10; }
+ inline void SetTest10( sal_Bool b ) { bTest10 = b; }
+#endif
+
+ inline sal_uInt16 GetZoom() const { return nZoom; }
+ inline void SetZoom( sal_uInt16 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
+ sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const;
+ inline sal_Bool operator == ( const SwViewOption &rOpt ) const;
+ inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
+
+
+/*---------------------------------------------------------------------------
+ Optionen aus nUIOptions
+----------------------------------------------------------------------------*/
+
+ sal_Bool IsViewVScrollBar() const
+ { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; }
+ sal_Bool IsViewHScrollBar() const
+ { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; }
+ sal_Bool IsKeepRatio() const
+ { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; }
+ sal_Bool IsGrfKeepZoom() const
+ { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; }
+ sal_Bool IsPreventTips() const
+ { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? sal_True : sal_False; }
+ sal_Bool IsPrtFormat() const
+ { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; }
+
+ SvxZoomType GetZoomType() const { return eZoom; }
+
+ sal_uInt8 GetTblDest() const { return nTblDest; }
+
+ void SetViewVScrollBar(sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
+ void SetViewHScrollBar(sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
+ void SetKeepRatio (sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
+ void SetGrfKeepZoom (sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
+ void SetPreventTips( sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
+ void SetPrtFormat( sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
+
+ void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
+ void SetTblDest( sal_uInt8 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; }
+
+ sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
+ void SetViewAnyRuler(sal_Bool bSet)
+ { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
+
+ sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const
+ {
+ sal_Bool bRet = sal::static_int_cast< sal_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)
+ : sal_False );
+ return bRet;
+
+ }
+ void SetViewHRuler (sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
+
+ sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const
+ {
+ sal_Bool bRet = sal::static_int_cast< sal_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)
+ : sal_False );
+ return bRet;
+ }
+ void SetViewVRuler (sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
+
+ // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
+ sal_Bool IsShadowCursor() const
+ { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; }
+ void SetShadowCursor(sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
+
+ //move vertical ruler to the right
+ sal_Bool IsVRulerRight() const
+ { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; }
+ void SetVRulerRight(sal_Bool b)
+ { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
+
+ sal_Bool IsStarOneSetting() const {return bStarOneSetting; }
+ void SetStarOneSetting(sal_Bool bSet) {bStarOneSetting = bSet; }
+
+ sal_Bool IsPagePreview() const {return bIsPagePreview; }
+ void SetPagePreview(sal_Bool bSet) { bIsPagePreview= bSet; }
+
+ sal_uInt8 GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
+ void SetShdwCrsrFillMode( sal_uInt8 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 sal_Bool IsAppearanceFlag(sal_Int32 nFlag);
+
+ static sal_Bool IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
+ static sal_Bool IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
+ static sal_Bool IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
+ static sal_Bool IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
+ static sal_Bool IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
+ static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
+ static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
+ static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
+
+ static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False);
+
+ void SetDocBoundaries(sal_Bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
+
+ static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
+};
+
+
+inline sal_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 sal_uInt16 GetHtmlMode(const SwDocShell*);
+
+
+#endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
new file mode 100644
index 000000000000..2daf85092b40
--- /dev/null
+++ b/sw/inc/viewsh.hxx
@@ -0,0 +1,645 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_VIEWSH_HXX
+#define SW_VIEWSH_HXX
+
+#include <com/sun/star/embed/XClassifiedObject.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <tools/rtti.hxx>
+#include <svl/svarray.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <ring.hxx>
+#include <swrect.hxx>
+#include <errhdl.hxx>
+#include <boost/shared_ptr.hpp>// swmod 080115
+#include <vcl/mapmod.hxx>
+#include <vcl/print.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 SwPrintData;
+class SwPagePreViewPrtData;
+class Window;
+class OutputDevice;
+class SwLayIdle;
+struct ShellResource;
+class SwRegionRects;
+class SwFrm;
+class SvtAccessibilityOptions;
+class SwPagePreviewLayout;
+class SwTxtFrm;
+class BitmapEx;
+
+struct SwAccessibilityOptions;
+class Region;
+class SwPostItMgr;
+class SdrPaintWindow;
+class SwAccessibleMap;
+
+namespace vcl
+{
+ class OldStylePrintAdaptor;
+}
+
+
+//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)
+#define VSHELLFLAG_SHARELAYOUT ((long)0x2)//swmod 080125 flag
+typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
+
+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 &, sal_Bool bPDFExport = sal_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;
+
+ SwRootFrmPtr pLayout; //swmod 080116
+
+ //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 PrepareForPrint( const SwPrintData &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
+ void InitPrt( OutputDevice *pOutDev );
+
+ //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();
+
+ sal_Bool AddPaintRect( const SwRect &rRect );
+
+ 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( sal_uInt16 nPageNum ) const; // An empty page?
+
+ //Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
+ void SetFirstVisPageInvalid();
+
+ SwRootFrm *GetLayout() const;//swmod 080116
+ 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.
+
+ sal_uInt16 GetPageCount() const;
+
+ const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
+
+ 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 const& GetIDocumentUndoRedo() const;
+ IDocumentUndoRedo & GetIDocumentUndoRedo();
+
+ // --> 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 );
+
+ // printing of one page.
+ // bIsPDFExport == true is: do PDF Export (no printing!)
+ sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
+ SwPrintData const& rPrintData,
+ sal_Int32 nRenderer /* offset in vector of pages to print */ );
+
+ // printing of one brochure page
+ void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
+ sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
+
+ // printing for OLE 2.0
+ static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
+ OutputDevice* pOleOut, const Rectangle& rRect );
+
+ /// fill temporary doc with selected text for Print or PDF export
+ SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
+
+ //Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
+ void CalcPagesForPrint( sal_uInt16 nMax );
+
+ //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 );
+
+ // 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; }
+ virtual 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( SwPrintData const& rPrintOptions );
+
+ 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( sal_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 and paragraph's characters
+
+ OD 2009-01-06 #i88069#
+ OD 2010-02-16 #i104008# - usage also for changes of the attributes of
+ paragraph's characters.
+
+ @author OD
+
+ @param rTxtFrm
+ input parameter - paragraph frame, whose attributes have changed
+ */
+ void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
+
+ SwAccessibleMap* GetAccessibleMap();
+
+ 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 // SW_VIEWSH_HXX
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
new file mode 100644
index 000000000000..0dc52572d40e
--- /dev/null
+++ b/sw/inc/viscrs.hxx
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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();
+
+ sal_Bool bIsVisible : 1;
+ sal_Bool bIsDragCrsr : 1;
+
+#ifdef SW_CRSR_TIMER
+ sal_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();
+
+ sal_Bool IsVisible() const { return bIsVisible; }
+ void SetDragCrsr( sal_Bool bFlag = sal_True ) { bIsDragCrsr = bFlag; }
+
+#ifdef SW_CRSR_TIMER
+ sal_Bool ChgTimerFlag( sal_Bool bTimerOn = sal_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;
+
+ 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 );
+
+ sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt = 1 );
+
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
+
+#ifdef DBG_UTIL
+// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+// am sichtbaren Cursor
+ virtual sal_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
+ sal_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 );
+
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
+
+#ifdef DBG_UTIL
+// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+// am sichtbaren Cursor
+ virtual sal_Bool IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+#endif
+};
+
+
+
+#endif // _VISCRS_HXX
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
new file mode 100644
index 000000000000..7b97317bc23b
--- /dev/null
+++ b/sw/inc/wdocsh.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+{
+ sal_uInt16 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;
+ sal_uInt16 GetSourcePara()const
+ {return nSourcePara;}
+ void SetSourcePara(sal_uInt16 nSet) {nSourcePara = nSet;}
+};
+
+#endif
+
+
diff --git a/sw/prj/build.lst b/sw/prj/build.lst
new file mode 100644
index 000000000000..c491c7f4e726
--- /dev/null
+++ b/sw/prj/build.lst
@@ -0,0 +1,2 @@
+sw sw : filter L10N:l10n connectivity OOo:writerperfect vbahelper svx stoc writerfilter LIBXSLT:libxslt NULL
+sw sw\prj nmake - all sw_prj NULL
diff --git a/sw/prj/d.lst b/sw/prj/d.lst
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sw/prj/d.lst
diff --git a/sw/prj/makefile.mk b/sw/prj/makefile.mk
new file mode 100644
index 000000000000..e312a7ccab65
--- /dev/null
+++ b/sw/prj/makefile.mk
@@ -0,0 +1,40 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..
+TARGET=prj
+
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java
new file mode 100644
index 000000000000..a6da2f29115a
--- /dev/null
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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.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 org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.AccessibilityTools;
+import util.WriterTools;
+import static org.junit.Assert.*;
+
+public class AccessibleRelationSet {
+ private XAccessible para1 = null;
+ private XAccessible para2 = null;
+ private XAccessible para3 = null;
+ private 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"};
+
+ @Test public void contents_flows_to() {
+ XAccessibleRelationSet set = getAccessibleRelation(para1);
+
+ short firstrelation=-1;
+ XAccessibleText atarget=null;
+ if (set != null) {
+ assertEquals(
+ "didn't gain correct count of relations", 1,
+ set.getRelationCount());
+ try {
+ firstrelation = set.getRelation(0).RelationType;
+ Object oTmp = set.getRelation(0).TargetSet[0];
+ atarget = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
+ } catch (IndexOutOfBoundsException e) {
+ fail("Exception when getting relations "+e);
+ }
+ }
+
+ assertEquals(
+ "didn't gain correct relation type for paragraph 0", types[2],
+ types[firstrelation]);
+
+ XAccessibleText paraTxt2 =
+ (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para2);
+ assertEquals(
+ "didn't gain correct target paragraph", atarget.getText(),
+ paraTxt2.getText());
+ }
+
+ @Test public void contents_flows_from() {
+ XAccessibleRelationSet set = getAccessibleRelation(para2);
+
+ short[] relationtypes = new short[2];
+ XAccessibleText[] atargets = new XAccessibleText[2];
+ if (set != null) {
+ assertEquals(
+ "didn't gain correct count of relations", 2,
+ set.getRelationCount());
+ 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
+ {
+ fail("didn't gain correct relation type");
+ }
+ 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
+ {
+ fail("didn't gain correct relation type");
+ }
+ } catch (IndexOutOfBoundsException e) {
+ fail("Exception when getting relations "+e);
+ }
+ }
+
+ assertEquals(
+ "didn't gain correct relation type for paragraph 1", types[1],
+ types[relationtypes[0]]);
+
+ XAccessibleText paraTxt1 =
+ (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para1);
+ assertEquals(
+ "didn't gain correct target paragraph", atargets[0].getText(),
+ paraTxt1.getText());
+
+ assertEquals(
+ "didn't gain correct relation type for paragraph 3", types[2],
+ types[relationtypes[1]]);
+
+ XAccessibleText paraTxt3 =
+ (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para3);
+ assertEquals(
+ "didn't gain correct target paragraph", atargets[1].getText(),
+ paraTxt3.getText());
+ }
+
+ @Before public void before()
+ throws com.sun.star.lang.IllegalArgumentException,
+ IndexOutOfBoundsException
+ {
+ XMultiServiceFactory factory = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+
+ xTextDoc = WriterTools.createTextDoc(factory);
+
+ XText oText = xTextDoc.getText();
+ XTextCursor oCursor = oText.createTextCursor();
+
+ for (int i=0; i<5; i++){
+ oText.insertString( oCursor,"Paragraph Number: " + i, false);
+ oText.insertControlCharacter(
+ oCursor, ControlCharacter.PARAGRAPH_BREAK, false );
+ }
+
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, xTextDoc);
+
+ AccessibilityTools at = new AccessibilityTools();
+
+ XWindow xWindow = at.getCurrentWindow(factory, aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
+
+ para1 = at.SearchedContext.getAccessibleChild(0);
+ para2 = at.SearchedContext.getAccessibleChild(1);
+ para3 = at.SearchedContext.getAccessibleChild(2);
+ }
+
+ @After public void after() {
+ util.DesktopTools.closeDoc(xTextDoc);
+ }
+
+ public XAccessibleRelationSet getAccessibleRelation(XAccessible xAcc) {
+ XAccessibleContext oObj = (XAccessibleContext)
+ UnoRuntime.queryInterface(XAccessibleContext.class, xAcc);
+
+ XAccessibleRelationSet set = oObj.getAccessibleRelationSet();
+ return set;
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/qa/complex/accessibility/makefile.mk
new file mode 100644
index 000000000000..06e7c6a70408
--- /dev/null
+++ b/sw/qa/complex/accessibility/makefile.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../../..
+PRJNAME = sw
+TARGET = qa_complex_accessibility
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/accessibility
+JAVATESTFILES = AccessibleRelationSet.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sw/qa/complex/checkColor/CheckChangeColor.java b/sw/qa/complex/checkColor/CheckChangeColor.java
new file mode 100755
index 000000000000..a072072e18c8
--- /dev/null
+++ b/sw/qa/complex/checkColor/CheckChangeColor.java
@@ -0,0 +1,89 @@
+package complex.checkColor;
+
+import com.sun.star.awt.Size;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.container.XNameContainer;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.style.XStyleFamiliesSupplier;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.Type;
+import com.sun.star.uno.UnoRuntime;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.DesktopTools;
+import util.SOfficeFactory;
+import static org.junit.Assert.*;
+
+/**
+ * Created because of complaint on dev@openoffice.org: check the changing of
+ * BackColor and IsLandscape properties on the PageStyle service.
+ */
+public class CheckChangeColor {
+ /**
+ * Check BackColor and IsLandscape properties, wait for an exception: test
+ * is ok if no exception happened.
+ */
+ @Test public void checkChangeColor() throws Exception {
+ // create a supplier to get the Style family collection
+ XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, document);
+
+ // 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") );
+
+ assertEquals(
+ "BackColor", new Any(Type.LONG, 0xFFFFFFFF),
+ Any.complete(xPropertySet.getPropertyValue("BackColor")));
+ assertEquals(
+ "IsLandscape", new Any(Type.BOOLEAN, false),
+ Any.complete(xPropertySet.getPropertyValue("IsLandscape")));
+ assertEquals(
+ "Size", new Type(Size.class),
+ Any.complete(xPropertySet.getPropertyValue("Size")).getType());
+
+ xPropertySet.setPropertyValue("BackColor", 0xFF000000);
+ xPropertySet.setPropertyValue("IsLandscape", true);
+ assertEquals(
+ "BackColor", new Any(Type.LONG, 0xFF000000),
+ Any.complete(xPropertySet.getPropertyValue("BackColor")));
+ assertEquals(
+ "IsLandscape", new Any(Type.BOOLEAN, true),
+ Any.complete(xPropertySet.getPropertyValue("IsLandscape")));
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = SOfficeFactory.getFactory(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager())).
+ createTextDoc(null);
+ }
+
+ @After public void tearDownDocument() {
+ DesktopTools.closeDoc(document);
+ }
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk
new file mode 100644
index 000000000000..e5b368083ada
--- /dev/null
+++ b/sw/qa/complex/checkColor/makefile.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../../..
+PRJNAME = sw
+TARGET = qa_complex_checkColor
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/checkColor
+JAVATESTFILES = CheckChangeColor.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
new file mode 100755
index 000000000000..23a6d89ccf51
--- /dev/null
+++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.AccessibleStateType;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.awt.FontWeight;
+import com.sun.star.awt.XWindow;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.frame.XController;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.text.XTextRange;
+import com.sun.star.text.XTextViewCursorSupplier;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XInterface;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.AccessibilityTools;
+import util.DesktopTools;
+import util.SOfficeFactory;
+import static org.junit.Assert.*;
+
+/**
+ */
+public class CheckIndeterminateState {
+ /*
+ * Test the indeterminate state of AccessibleToolBarItem
+ * The used tools are in project qadevOOo/runner
+ */
+ @Test public void checkToolBoxItem() throws Exception {
+ XModel aModel = (XModel)
+ UnoRuntime.queryInterface(XModel.class, document);
+
+ XController xController = aModel.getCurrentController();
+
+ XText text = document.getText();
+ text.setString("normal");
+ XTextRange end = text.getEnd();
+ end.setString("bold");
+ UnoRuntime.queryInterface(XPropertySet.class, end).setPropertyValue(
+ "CharWeight", FontWeight.BOLD);
+ UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController).
+ getViewCursor().gotoRange(text, false);
+
+ XInterface oObj = null;
+
+ AccessibilityTools at = new AccessibilityTools();
+ XWindow xWindow = at.getCurrentContainerWindow(getFactory(), aModel);
+ XAccessible xRoot = at.getAccessibleObject(xWindow);
+
+ oObj = at.getAccessibleObjectForRole(xRoot,
+ AccessibleRole.TOGGLE_BUTTON, "Bold");
+ assertNotNull("Found a TOGGLE_BUTTON", oObj);
+
+ XAccessibleContext oContext = (XAccessibleContext)
+ UnoRuntime.queryInterface(XAccessibleContext.class, oObj);
+
+ XAccessibleStateSet oSet = oContext.getAccessibleStateSet();
+
+ assertTrue("The 'INDETERMINATE' state is not set.",oSet.contains(AccessibleStateType.INDETERMINATE));
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = SOfficeFactory.getFactory(getFactory()).createTextDoc(null);
+ }
+
+ @After public void tearDownDocument() {
+ DesktopTools.closeDoc(document);
+ }
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+ private static final XMultiServiceFactory getFactory() {
+ return UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ }
+}
diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
new file mode 100644
index 000000000000..84bfe15ba045
--- /dev/null
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+class BookmarkHashes {
+ 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 void assertExpectation(BookmarkHashes aExpectation) {
+ assertEquals(aExpectation.m_nSetupHash, m_nSetupHash);
+ assertEquals(aExpectation.m_nInsertRandomHash, m_nInsertRandomHash);
+ assertEquals(aExpectation.m_nDeleteRandomHash, m_nDeleteRandomHash);
+ assertEquals(aExpectation.m_nLinebreakHash, m_nLinebreakHash);
+ assertEquals(aExpectation.m_nOdfReloadHash, m_nOdfReloadHash);
+ assertEquals(aExpectation.m_nMsWordReloadHash, m_nMsWordReloadHash);
+ }
+
+ 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 {
+ private XMultiServiceFactory m_xMsf = null;
+ private XTextDocument m_xDoc = null;
+ private XTextDocument m_xOdfReloadedDoc = null;
+ private XTextDocument m_xMsWordReloadedDoc = null;
+ private final BookmarkHashes actualHashes = new BookmarkHashes();
+
+ private BookmarkHashes getDEV300m41Expectations() {
+ BookmarkHashes result = new BookmarkHashes();
+ 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;
+ }
+
+ @Test public void checkBookmarks()
+ throws com.sun.star.uno.Exception,
+ com.sun.star.io.IOException,
+ java.security.NoSuchAlgorithmException
+ {
+ actualHashes.assertExpectation(getDEV300m41Expectations());
+ }
+
+ @Before public void setUpDocuments() throws Exception {
+ m_xMsf = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
+ 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);
+ }
+
+ @After public void tearDownDocuments() {
+ util.DesktopTools.closeDoc(m_xDoc);
+ util.DesktopTools.closeDoc(m_xOdfReloadedDoc);
+ util.DesktopTools.closeDoc(m_xMsWordReloadedDoc);
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+ 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..cc7fcb1c7e53
--- /dev/null
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -0,0 +1,291 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General 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.lang.XMultiServiceFactory;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.UnoRuntime;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author od138299
+ */
+public class CheckCrossReferences {
+
+ private com.sun.star.container.XEnumeration xParaEnum;
+ private com.sun.star.container.XEnumeration xPortionEnum;
+ private com.sun.star.util.XRefreshable xFldsRefresh;
+
+ public com.sun.star.text.XTextField getNextField()
+ throws com.sun.star.uno.Exception
+ {
+ if ( xPortionEnum != null ) {
+ 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") ) {
+ com.sun.star.text.XTextField xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ assertNotNull("Cannot retrieve next field.", xField);
+ return xField;
+ }
+ }
+ }
+
+ while ( xParaEnum.hasMoreElements() ) {
+ 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") ) {
+ com.sun.star.text.XTextField xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ assertNotNull("Cannot retrieve next field.", xField);
+ return xField;
+ }
+ }
+ }
+
+ fail("Cannot retrieve next field.");
+ return null; // unreachable
+ }
+
+ 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 );
+
+ assertNotNull("Cannot retrieve field properties.", xProps);
+
+ return xProps;
+ }
+
+ public void checkField( com.sun.star.text.XTextField xField,
+ com.sun.star.beans.XPropertySet xProps,
+ short nFormat,
+ String aExpectedFldResult )
+ throws com.sun.star.uno.Exception
+ {
+ // set requested format
+ xProps.setPropertyValue("ReferenceFieldPart", new Short(nFormat));
+
+ // refresh fields in order to get new format applied
+ xFldsRefresh.refresh();
+
+ String aFldResult = xField.getPresentation( false );
+ assertEquals( "set reference field format doesn't result in correct field result",
+ aExpectedFldResult, aFldResult);
+ }
+
+ @Test public void checkCrossReferences() throws com.sun.star.uno.Exception {
+ // setup paragraph enumeration
+ {
+ com.sun.star.container.XEnumerationAccess xParaEnumAccess =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, document.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, document);
+ 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;
+
+ 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
+ {
+ // restart paragraph enumeration
+ com.sun.star.container.XEnumerationAccess xParaEnumAccess =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, document.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() ) {
+ 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;
+ }
+ }
+ assertNotNull(
+ "Cannot find paragraph to insert cross-reference bookmark.",
+ xParaTextRange);
+
+ // insert bookmark
+ XMultiServiceFactory xFac = (XMultiServiceFactory)UnoRuntime.queryInterface(
+ XMultiServiceFactory.class, document);
+ final String cBookmarkName = "__RefNumPara__47114711";
+ com.sun.star.text.XTextContent xBookmark =
+ (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.Bookmark" ) );
+ 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 =
+ (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.TextField.GetReference" ) );
+ 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 );
+ assertEquals( "inserted reference field doesn't has correct field result",
+ "J", xField.getPresentation( false ) );
+
+ xParaTextRange.getStart().setString( "Hallo new bookmark: " );
+ xFldsRefresh.refresh();
+ assertEquals( "inserted reference field doesn't has correct field result",
+ "Hallo new bookmark: J", xField.getPresentation( false ) );
+ }
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = util.WriterTools.loadTextDoc(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
+ TestDocument.getUrl("CheckCrossReferences.odt"));
+ }
+
+ @After public void tearDownDocument() {
+ util.DesktopTools.closeDoc(document);
+ }
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/complex/writer/CheckFlies.java b/sw/qa/complex/writer/CheckFlies.java
new file mode 100644
index 000000000000..a65c01ec147d
--- /dev/null
+++ b/sw/qa/complex/writer/CheckFlies.java
@@ -0,0 +1,222 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public class CheckFlies {
+ @Test public void checkFlies()
+ throws com.sun.star.uno.Exception
+ {
+ com.sun.star.text.XTextFramesSupplier xTFS = (com.sun.star.text.XTextFramesSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextFramesSupplier.class,
+ document);
+ checkTextFrames(xTFS);
+ com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = (com.sun.star.text.XTextGraphicObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextGraphicObjectsSupplier.class,
+ document);
+ checkGraphicFrames(xTGOS);
+ com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = (com.sun.star.text.XTextEmbeddedObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
+ document);
+ checkEmbeddedFrames(xTEOS);
+ }
+
+ private void checkEmbeddedFrames(com.sun.star.text.XTextEmbeddedObjectsSupplier xTGOS)
+ throws com.sun.star.uno.Exception
+ {
+ 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())
+ {
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedEmbeddedFrames.remove(sFrameName));
+ xEmbeddedFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find embedded frame by name.",
+ xEmbeddedFrames.hasByName(sFrameName));
+ }
+ assertTrue(
+ "Missing expected embedded frames.",
+ vExpectedEmbeddedFrames.isEmpty());
+ try
+ {
+ xEmbeddedFrames.getByName("Nonexisting embedded frame");
+ fail("Got nonexisting embedded frame");
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {}
+ assertFalse(
+ "Has nonexisting embedded frame",
+ xEmbeddedFrames.hasByName("Nonexisting embedded frame"));
+
+ com.sun.star.container.XIndexAccess xEmbeddedFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XIndexAccess.class,
+ xEmbeddedFrames);
+ assertEquals(
+ "Unexpected number of embedded frames reported.", nEmbeddedFrames,
+ xEmbeddedFramesIdx.getCount());
+ for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xEmbeddedFramesIdx.getCount(); nCurrentFrameIdx++)
+ {
+ xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx);
+ }
+ }
+
+ private void checkGraphicFrames(com.sun.star.text.XTextGraphicObjectsSupplier xTGOS)
+ throws com.sun.star.uno.Exception
+ {
+ 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())
+ {
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedGraphicFrames.remove(sFrameName));
+ xGraphicFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find graphics frame by name.",
+ xGraphicFrames.hasByName(sFrameName));
+ }
+ assertTrue(
+ "Missing expected graphics frames.",
+ vExpectedGraphicFrames.isEmpty());
+ try
+ {
+ xGraphicFrames.getByName("Nonexisting graphics frame");
+ fail("Got nonexisting graphics frame");
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {}
+ assertFalse(
+ "Has nonexisting graphics frame",
+ xGraphicFrames.hasByName("Nonexisting graphics frame"));
+
+ com.sun.star.container.XIndexAccess xGraphicFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XIndexAccess.class,
+ xGraphicFrames);
+ assertEquals(
+ "Unexpected number of graphics frames reported.", nGraphicFrames,
+ xGraphicFramesIdx.getCount());
+ for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xGraphicFramesIdx.getCount(); nCurrentFrameIdx++)
+ {
+ xGraphicFramesIdx.getByIndex(nCurrentFrameIdx);
+ }
+ }
+
+ private void checkTextFrames(com.sun.star.text.XTextFramesSupplier xTFS)
+ throws com.sun.star.uno.Exception
+ {
+ 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())
+ {
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedTextFrames.remove(sFrameName));
+ xTextFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find text frame by name.",
+ xTextFrames.hasByName(sFrameName));
+ }
+ assertTrue(
+ "Missing expected text frames.", vExpectedTextFrames.isEmpty());
+ try
+ {
+ xTextFrames.getByName("Nonexisting Textframe");
+ fail("Got nonexisting text frame.");
+ }
+ catch(com.sun.star.container.NoSuchElementException e)
+ {}
+ assertFalse(
+ "Has nonexisting text frame.",
+ xTextFrames.hasByName("Nonexisting text frame"));
+
+ com.sun.star.container.XIndexAccess xTextFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XIndexAccess.class,
+ xTextFrames);
+ assertEquals(
+ "Unexpected number of text frames reported.", nTextFrames,
+ xTextFramesIdx.getCount());
+ for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xTextFramesIdx.getCount(); nCurrentFrameIdx++)
+ {
+ xTextFramesIdx.getByIndex(nCurrentFrameIdx);
+ }
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = util.WriterTools.loadTextDoc(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
+ TestDocument.getUrl("CheckFlies.odt"));
+ }
+
+ @After public void tearDownDocument() {
+ util.DesktopTools.closeDoc(document);
+ }
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
new file mode 100755
index 000000000000..c381cd5825c4
--- /dev/null
+++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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.XIndexContainer;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.Type;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+/**
+ * Test the com.sun.star.document.IndexedPropertyValues service
+ */
+public class CheckIndexedPropertyValues {
+ @Test public void checkIndexedPropertyValues()
+ throws com.sun.star.uno.Exception
+ {
+ XIndexContainer xCont = UnoRuntime.queryInterface(
+ XIndexContainer.class,
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.IndexedPropertyValues",
+ connection.getComponentContext())));
+
+ assertNotNull("XIndexContainer was queried but returned null.", xCont);
+ 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";
+
+ Type t = xCont.getElementType();
+ assertEquals("Initial container is not empty", 0, xCont.getCount());
+ xCont.insertByIndex(0, prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
+ assertEquals(prop1[0].Name, ret[0].Name);
+ assertEquals(prop1[0].Value, ret[0].Value);
+ xCont.replaceByIndex(0, prop2);
+ ret = (PropertyValue[])xCont.getByIndex(0);
+ assertEquals(prop2[0].Name, ret[0].Name);
+ assertEquals(prop2[0].Value, ret[0].Value);
+ xCont.removeByIndex(0);
+ assertTrue("Could not remove PropertyValue.",
+ !xCont.hasElements() && xCont.getCount()==0);
+ xCont.insertByIndex(0, prop1);
+ xCont.insertByIndex(1, prop2);
+ assertTrue("Did not insert PropertyValue.",
+ xCont.hasElements() && xCont.getCount()==2);
+
+ try {
+ xCont.insertByIndex(25, prop2);
+ fail("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ }
+
+ try {
+ xCont.removeByIndex(25);
+ fail("IndexOutOfBoundsException was not thrown.");
+ }
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ }
+
+ try {
+ xCont.insertByIndex(2, "Example String");
+ fail("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ }
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java
new file mode 100755
index 000000000000..b2541954ce9f
--- /dev/null
+++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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.XNameContainer;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.Type;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+/**
+ *
+ */
+public class CheckNamedPropertyValues {
+ @Test public void checkNamedPropertyValues()
+ throws com.sun.star.uno.Exception
+ {
+ XNameContainer xCont = UnoRuntime.queryInterface(
+ XNameContainer.class,
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.NamedPropertyValues",
+ connection.getComponentContext())));
+
+ assertNotNull("XNameContainer was queried but returned null.", xCont);
+ 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";
+
+ Type t = xCont.getElementType();
+ assertFalse("Initial container is not empty.", xCont.hasElements());
+
+ xCont.insertByName("prop1", prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
+ assertEquals(prop1[0].Name, ret[0].Name);
+ assertEquals(prop1[0].Value, ret[0].Value);
+ xCont.replaceByName("prop1", prop2);
+ ret = (PropertyValue[])xCont.getByName("prop1");
+ assertEquals(prop2[0].Name, ret[0].Name);
+ assertEquals(prop2[0].Value, ret[0].Value);
+ xCont.removeByName("prop1");
+ assertFalse("Could not remove PropertyValue.", xCont.hasElements());
+ xCont.insertByName("prop1", prop1);
+ xCont.insertByName("prop2", prop2);
+ assertTrue("Did not insert PropertyValue.", xCont.hasElements());
+ String[] names = xCont.getElementNames();
+ assertEquals("Not all element names were returned.", 2, names.length);
+ for (int i=0; i<names.length; i++) {
+ assertTrue(
+ "Got a wrong element name",
+ names[i].equals("prop1") || names[i].equals("prop2"));
+ }
+
+ try {
+ xCont.insertByName("prop2", prop1);
+ fail("ElementExistException was not thrown.");
+ }
+ catch(com.sun.star.container.ElementExistException e) {
+ }
+
+ try {
+ xCont.insertByName("prop3", "Example String");
+ fail("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
+ }
+
+ try {
+ xCont.removeByName("prop3");
+ fail("NoSuchElementException was not thrown.");
+ }
+ catch(com.sun.star.container.NoSuchElementException e) {
+ }
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java
new file mode 100644
index 000000000000..a1600488c7bc
--- /dev/null
+++ b/sw/qa/complex/writer/LoadSaveTest.java
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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.WrappedTargetException;
+import com.sun.star.lang.WrappedTargetRuntimeException;
+import com.sun.star.lang.EventObject;
+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.PropertyValue;
+import com.sun.star.beans.Pair;
+import com.sun.star.util.XCloseable;
+import com.sun.star.frame.XStorable;
+import com.sun.star.document.DocumentEvent;
+import com.sun.star.document.XDocumentEventBroadcaster;
+import com.sun.star.document.XDocumentEventListener;
+import com.sun.star.text.XTextDocument;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * a small program to load documents from one directory (recursively)
+ * and store them in another, implemented as a complex test.
+ */
+public class LoadSaveTest extends ComplexTestCase
+{
+ private XMultiServiceFactory m_xMSF = null;
+ private XComponentContext m_xContext = null;
+ private XDocumentEventBroadcaster m_xGEB = null;
+ private String m_TmpDir = null;
+
+ private String m_fileURL = "file://";
+ // these should be parameters or something?
+ private String m_SourceDir = "FIXME";
+ private String m_TargetDir = "/tmp/out";
+
+ public String[] getTestMethodNames() {
+ return new String[] { "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);
+ Object oGEB = m_xMSF.createInstance(
+ "com.sun.star.frame.GlobalEventBroadcaster");
+ m_xGEB = (XDocumentEventBroadcaster)
+ UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, oGEB);
+ assure("could not get global event broadcaster.", m_xGEB != null);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ log.println("tempdir: " + m_TmpDir);
+ log.println("sourcedir: " + m_SourceDir);
+ log.println("targetdir: " + m_TargetDir);
+ }
+
+ /*
+ public void after()
+ {
+ }
+ */
+
+ public void testLoadStore() throws Exception
+ {
+ Pair<List<String>, List<String>> dirsFiles =
+ getDirAndFileNames(m_SourceDir);
+ makeDirs(m_TargetDir, dirsFiles.First);
+ for (String fileName : dirsFiles.Second)
+ {
+ try {
+ testDoc(fileName);
+ } catch (Exception e) {
+ report(e);
+ }
+ }
+ }
+
+ public void testDoc(String fileName) throws Exception
+ {
+ XComponent xDoc = null;
+ EventListener xListener = new EventListener();
+ try {
+ m_xGEB.addDocumentEventListener(xListener);
+
+ log.println("Loading document: " + fileName + " ...");
+
+ PropertyValue[] loadProps = new PropertyValue[1];
+ loadProps[0] = new PropertyValue();
+ loadProps[0].Name = "ReadOnly";
+ loadProps[0].Value = new Boolean(true);
+
+ String sourceFile = m_fileURL + m_SourceDir + fileName;
+
+ xDoc = util.DesktopTools.loadDoc(m_xMSF, sourceFile, loadProps);
+
+ log.println("... done");
+
+ {
+ // apparently OnLayoutFinished is not sent for every doc???
+ // 10 seconds is evidently not enough for large documents
+ int time = 0;
+ while (!xListener.IsLayoutFinished() && (time < 30000)) {
+ Thread.sleep(100);
+ time += 100;
+ }
+ if (time >= 30000) {
+ log.println("timeout: no OnLayoutFinished received!");
+ }
+ }
+
+ log.println("Storing document: " + fileName + " ...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xDoc);
+
+ String targetFile = m_fileURL + m_TargetDir + fileName;
+
+ xStor.storeToURL(targetFile, new PropertyValue[0]);
+
+ log.println("... done");
+
+ } finally {
+ if (xDoc != null) {
+ util.DesktopTools.closeDoc(xDoc);
+ }
+ if (xListener != null) {
+ m_xGEB.removeDocumentEventListener(xListener);
+ }
+ }
+ }
+
+ class EventListener implements XDocumentEventListener
+ {
+ boolean m_isLayoutFinished = false;
+ boolean IsLayoutFinished() { return m_isLayoutFinished; }
+ public void documentEventOccured(DocumentEvent Event)
+ {
+// log.println("event: " + Event.EventName);
+ if ("OnLayoutFinished".equals(Event.EventName))
+ {
+ // we only have one doc at any time, so no need to check
+ m_isLayoutFinished = true;
+// log.println("received OnLayoutFinished");
+ }
+ }
+ public void disposing(EventObject Event) { }
+ }
+
+ void report2(Exception e)
+ {
+ if (e instanceof WrappedTargetException)
+ {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ } else if (e instanceof WrappedTargetRuntimeException) {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetRuntimeException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ }
+ }
+
+ void report(Exception e) {
+ log.println("Exception occurred:");
+ log.println(e.toString());
+ e.printStackTrace((java.io.PrintWriter) log);
+ report2(e);
+// failed();
+ }
+
+ Pair<List<String>, List<String>> getDirAndFileNames(String dir)
+ {
+ List<String> dirs = new ArrayList<String>();
+ List<String> files = new ArrayList<String>();
+ File root = new File(dir);
+ getDirAndFileNames(root, "", dirs, files);
+ return new Pair<List<String>, List<String>>(dirs, files);
+ }
+
+ void getDirAndFileNames(File file, String relPath,
+ List<String> dirs, List<String> files)
+ {
+ assure("does not exist: " + relPath, file.exists());
+ if (file.isDirectory()) {
+ dirs.add(relPath);
+ File[] subfiles = file.listFiles();
+ for (File subfile : subfiles)
+ {
+ String subfileName =
+ relPath + File.separator + subfile.getName();
+ getDirAndFileNames(subfile, subfileName, dirs, files);
+ }
+ }
+ else if (file.isFile()) {
+ if (file.getName().endsWith(".odt")) {
+ files.add(relPath);
+ }
+ }
+ }
+
+ void makeDirs(String target, List<String> dirs) throws Exception
+ {
+ for (String dir : dirs) {
+ File f = new File(target + dir);
+ if (!f.exists()) {
+ if (!f.mkdir()) {
+ throw new Exception("cannot mkdir: " + target + dir);
+ }
+ }
+ }
+ }
+}
+
diff --git a/sw/qa/complex/writer/TestDocument.java b/sw/qa/complex/writer/TestDocument.java
new file mode 100644
index 000000000000..088c9aede3d6
--- /dev/null
+++ b/sw/qa/complex/writer/TestDocument.java
@@ -0,0 +1,40 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.writer;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+import org.openoffice.test.Argument;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
new file mode 100755
index 000000000000..114359bc3581
--- /dev/null
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -0,0 +1,4164 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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.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.lang.NoSupportException;
+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.XChild;
+import com.sun.star.container.XIndexAccess;
+import com.sun.star.container.XNameAccess;
+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.XBookmarksSupplier;
+import com.sun.star.text.XTextSectionsSupplier;
+import com.sun.star.text.XDocumentIndexesSupplier;
+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 com.sun.star.rdf.Statement;
+import com.sun.star.rdf.XDocumentRepository;
+import com.sun.star.rdf.XRepositorySupplier;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+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;
+
+ FuzzyTester() {
+ 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. */
+ void doTest(TreeNode expected, TreeNode actual)
+ {
+ assertEquals("__ROOT__", expected.getType());
+ assertEquals("__ROOT__", actual.getType());
+ 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) {
+ System.out.println("warning: " + m_DiffSequence
+ + " differences in sequence");
+ }
+ if (m_DiffSpuriousEmptyText != 0) {
+ System.out.println("warning: " + m_DiffSpuriousEmptyText
+ + " spurious empty text nodes");
+ }
+ if (m_DiffNesting != 0) {
+ System.out.println("WARNING: " + m_DiffNesting
+ + " differences in nesting");
+ }
+ assertEquals(0, m_DiffContent);
+ assertEquals(0, m_DiffMissing);
+ }
+
+ 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 {
+//System.out.println("testBuffer:");
+ printMissing(node);
+ m_DiffMissing++;
+ }
+ }
+ for (int j = 0; j < lenActual - 1; j++)
+ {
+ TreeNode node = m_BufferActual.get(j);
+ if (node != null)
+ {
+//System.out.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)
+ {
+ System.out.println(prefix +
+ ":\texpected: " + expected + "\tactual: " + actual);
+ }
+
+ void printNesting(TreeNode node, TreeNode nesting)
+ {
+ System.out.println("node: " + node.toString()
+ + " possibly moved across nesting " + nesting.toString());
+ }
+
+ void printMissing(TreeNode node)
+ {
+ System.out.println(" missing node: " + node.toString());
+
+ }
+
+ void printUnexpected(TreeNode node)
+ {
+ System.out.println("unexpected node: " + node.toString());
+
+ }
+}
+
+
+//----------------------------------------------------------------------
+
+class EnumConverter
+{
+ private Stack<TreeNode> m_Stack;
+
+ EnumConverter() {
+ m_Stack = new Stack<TreeNode>();
+ }
+
+ TreeNode convert(XEnumeration xEnum) throws Exception
+ {
+ TreeNode root = new TreeNode();
+ m_Stack.push(root);
+ TreeNode ret = convertChildren(xEnum);
+ assertTrue("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);
+ assertSame("stack error: meta-field", node2, node);
+ } else {
+ XPropertySet xFieldPropSet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xField);
+ String content = (String)
+ xFieldPropSet.getPropertyValue("Content");
+ boolean isFixed = (Boolean)
+ xFieldPropSet.getPropertyValue("IsFixed");
+ assertTrue("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();
+ assertTrue("stack error: Ruby expected; is: " +
+ node.toString(), node instanceof RubyNode);
+ }
+ } 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);
+ assertSame("stack error: meta", node2, node);
+ } 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);
+ }
+
+ XTextContent insertMeta(XTextCursor xCursor, StringPair xmlid)
+ throws Exception
+ {
+ XTextContent xContent = makeMeta();
+ xContent.attach(xCursor);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xContent);
+ xMetadatable.setMetadataReference(xmlid);
+ return xContent;
+ }
+
+ XTextContent makeMeta() throws Exception
+ {
+ Object xMeta = m_xDocFactory.createInstance(
+ "com.sun.star.text.InContentMetadata");
+ XTextContent xContent = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, xMeta);
+ return xContent;
+ }
+
+ XTextField insertMetaField(XTextCursor xCursor, StringPair xmlid)
+ throws Exception
+ {
+ XTextField xContent = makeMetaField();
+ xContent.attach(xCursor);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xContent);
+ xMetadatable.setMetadataReference(xmlid);
+ return xContent;
+ }
+
+ 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);
+ }
+ */
+
+ XTextContent insertRange(Range range) throws Exception
+ {
+ m_xCursor.gotoStartOfParagraph(false);
+ m_xCursor.goRight(range.getStart(), false);
+ m_xCursor.goRight(range.getExtent(), true);
+ return insertNode(m_xCursor, range.getNode());
+ }
+
+ XTextContent 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;
+ return insertMeta(xCursor, meta.getXmlId());
+ } else if (type.equals("MetadataField")) {
+ MetaFieldNode meta = (MetaFieldNode) node;
+ return 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);
+ }
+ return null;
+ }
+}
+
+
+//----------------------------------------------------------------------
+
+public class TextPortionEnumerationTest
+{
+ 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;
+
+ @Before public void before() throws Exception
+ {
+ m_xMSF = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
+ Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
+ m_xContext = (XComponentContext)
+ UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assertNotNull("could not get component context.", m_xContext);
+ m_xDoc = util.WriterTools.createTextDoc(m_xMSF);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ System.out.println("tempdir: " + m_TmpDir);
+ }
+
+ @After public void after()
+ {
+ util.DesktopTools.closeDoc(m_xDoc);
+ }
+
+ @Test public void testText() throws Exception
+ {
+ TreeNode root = new TreeNode();
+ TreeNode text = new TextNode("abc");
+ root.appendChild(text);
+ doTest(root);
+ }
+
+ @Test public void testTextField() throws Exception
+ {
+ String name = mkName("ruby");
+ TreeNode root = new TreeNode();
+ TreeNode txtf = new TextFieldNode("abc");
+ root.appendChild(txtf);
+ doTest(root);
+ }
+
+ /*@Test*/ 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);
+ }
+
+ /*@Test*/ 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);
+ }
+
+ @Test public void testFootnote() throws Exception
+ {
+ String name = mkName("ftn");
+ TreeNode root = new TreeNode();
+ TreeNode ftnd = new FootnoteNode(name);
+ root.appendChild(ftnd);
+ doTest(root);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test public void testRefMark3() throws Exception
+ {
+ // BUG: #i107672# (non-deterministic; depends on pointer ordering)
+ String name1 = mkName("refmark");
+ String name2 = mkName("refmark");
+ String name3 = mkName("refmark");
+ String name4 = mkName("refmark");
+ String name5 = mkName("refmark");
+ String name6 = mkName("refmark");
+ String name7 = mkName("refmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new ReferenceMarkStartNode(name1) );
+ root.appendChild( new ReferenceMarkStartNode(name2) );
+ root.appendChild( new ReferenceMarkStartNode(name3) );
+ root.appendChild( new ReferenceMarkStartNode(name4) );
+ root.appendChild( new ReferenceMarkStartNode(name5) );
+ root.appendChild( new ReferenceMarkStartNode(name6) );
+ root.appendChild( new ReferenceMarkStartNode(name7) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new ReferenceMarkEndNode(name7) );
+ root.appendChild( new ReferenceMarkEndNode(name6) );
+ root.appendChild( new ReferenceMarkEndNode(name5) );
+ root.appendChild( new ReferenceMarkEndNode(name4) );
+ root.appendChild( new ReferenceMarkEndNode(name3) );
+ root.appendChild( new ReferenceMarkEndNode(name2) );
+ root.appendChild( new ReferenceMarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ doTest(root);
+ }
+
+ @Test 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);
+ }
+
+ @Test public void testToxMark3() throws Exception
+ {
+ // BUG: #i107672# (non-deterministic; depends on pointer ordering)
+ String name1 = mkName("toxmark");
+ String name2 = mkName("toxmark");
+ String name3 = mkName("toxmark");
+ String name4 = mkName("toxmark");
+ String name5 = mkName("toxmark");
+ String name6 = mkName("toxmark");
+ String name7 = mkName("toxmark");
+ TreeNode root = new TreeNode();
+ root.appendChild( new DocumentIndexMarkStartNode(name1) );
+ root.appendChild( new DocumentIndexMarkStartNode(name2) );
+ root.appendChild( new DocumentIndexMarkStartNode(name3) );
+ root.appendChild( new DocumentIndexMarkStartNode(name4) );
+ root.appendChild( new DocumentIndexMarkStartNode(name5) );
+ root.appendChild( new DocumentIndexMarkStartNode(name6) );
+ root.appendChild( new DocumentIndexMarkStartNode(name7) );
+ root.appendChild( new TextNode("abc") );
+ root.appendChild( new DocumentIndexMarkEndNode(name7) );
+ root.appendChild( new DocumentIndexMarkEndNode(name6) );
+ root.appendChild( new DocumentIndexMarkEndNode(name5) );
+ root.appendChild( new DocumentIndexMarkEndNode(name4) );
+ root.appendChild( new DocumentIndexMarkEndNode(name3) );
+ root.appendChild( new DocumentIndexMarkEndNode(name2) );
+ root.appendChild( new DocumentIndexMarkEndNode(name1) );
+ root.appendChild( new TextNode("de") );
+ doTest(root);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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!
+ */
+
+ @Test 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);
+ }
+
+ @Test 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);
+ // empty
+ TreeNode url6 = new HyperlinkNode( mkName("url") );
+ inserter.insertRange( new Range(7, 7, url6) );
+ 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") ) )
+// this one gets eaten, but we still need to test inserting it (#i106930#)
+// .appendChild( url6.dup().appendChild( new TextNode("") ) )
+ .appendChild( new TextNode("89") );
+ doTest(root, false);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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) );
+ fail("testRangeMetaMeta: overlap left allowed");
+ } 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) );
+ fail("testRangeMetaMeta: overlap right allowed");
+ } 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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);
+ }
+
+ @Test 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 */
+
+ // #i109601# NestedTextContent and XChild
+ @Test public void testMetaXChild() throws Exception
+ {
+ StringPair id1 = new StringPair("content.xml", mkName("id"));
+ StringPair id2 = new StringPair("content.xml", mkName("id"));
+ StringPair id3 = new StringPair("content.xml", mkName("id"));
+ StringPair id4 = new StringPair("content.xml", mkName("id"));
+ StringPair id5 = new StringPair("content.xml", mkName("id"));
+ StringPair id6 = new StringPair("content.xml", mkName("id"));
+ TreeNode meta1 = new MetaNode(id1);
+ TreeNode meta2 = new MetaNode(id2);
+ TreeNode meta3 = new MetaFieldNode(id3);
+ TreeNode meta4 = new MetaNode(id4);
+ TreeNode meta5 = new MetaNode(id5);
+ TreeNode meta6 = new MetaFieldNode(id6);
+ TreeNode root = new TreeNode()
+ .appendChild( meta1.dup()
+ .appendChild( new TextNode("1") ) )
+ .appendChild( new TextNode("2") )
+ .appendChild( meta2.dup()
+ .appendChild( meta3.dup()
+ .appendChild( new TextNode("34") )
+ .appendChild( meta4.dup()
+ .appendChild( new TextNode("56") ) )
+ .appendChild( meta5.dup() )
+ .appendChild( new TextNode("7") ) ) )
+ .appendChild( new TextNode("8") )
+ .appendChild( meta6.dup()
+ .appendChild( new TextNode("9") ) );
+
+ RangeInserter inserter = new RangeInserter(m_xDoc);
+ TreeNode text = new TextNode("123456789");
+ inserter.insertRange( new Range(0, 0, text) );
+ XTextContent xMeta1 = inserter.insertRange( new Range(0, 1, meta1) );
+ XTextContent xMeta2 = inserter.insertRange( new Range(3, 8, meta2) );
+ XTextContent xMeta3 = inserter.insertRange( new Range(4, 9, meta3) );
+ XTextContent xMeta4 = inserter.insertRange( new Range(7, 9, meta4) );
+ XTextContent xMeta5 = inserter.insertRange( new Range(10, 10, meta5) );
+ XTextContent xMeta6 = inserter.insertRange( new Range(13, 14, meta6) );
+
+ doTest(root, false);
+
+ XText xDocText = m_xDoc.getText();
+ XTextCursor xDocTextCursor = xDocText.createTextCursor();
+ XParagraphCursor xParagraphCursor = (XParagraphCursor)
+ UnoRuntime.queryInterface(XParagraphCursor.class, xDocTextCursor);
+ xParagraphCursor.gotoNextParagraph(false); // second paragraph
+ // X12XX34X56X78X9
+ // 1 23 4 5 6
+ // 1 452 6
+ // 3
+ StringPair [] nestedTextContent = new StringPair[] {
+ null,
+ id1,
+ id1,
+ null,
+ id2,
+ id3,
+ id3,
+ id3,
+ id4,
+ id4,
+ id4,
+ id5,
+ id3,
+ null,
+ id6,
+ id6,
+ };
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, xDocTextCursor);
+ for (int i = 0; i < nestedTextContent.length; ++i) {
+ Object oNTC = xPropertySet.getPropertyValue("NestedTextContent");
+ XTextContent xNTC = (XTextContent)
+ UnoRuntime.queryInterface(XTextContent.class, oNTC);
+ if (null == nestedTextContent[i]) {
+ assertNull("unexpected NestedTextContent at: " + i, xNTC);
+ } else {
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xNTC);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assertTrue("wrong NestedTextContent at: " + i,
+ MetaNode.eq(nestedTextContent[i], xmlid));
+ }
+ xDocTextCursor.goRight((short)1, false);
+ }
+
+ XChild xChild1 = (XChild)
+ UnoRuntime.queryInterface(XChild.class, xMeta1);
+ XChild xChild2 = (XChild)
+ UnoRuntime.queryInterface(XChild.class, xMeta2);
+ XChild xChild3 = (XChild)
+ UnoRuntime.queryInterface(XChild.class, xMeta3);
+ XChild xChild4 = (XChild)
+ UnoRuntime.queryInterface(XChild.class, xMeta4);
+ XChild xChild5 = (XChild)
+ UnoRuntime.queryInterface(XChild.class, xMeta5);
+ XChild xChild6 = (XChild)
+ UnoRuntime.queryInterface(XChild.class, xMeta6);
+ try {
+ xChild1.setParent(xChild4);
+ fail("setParent(): allowed?");
+ } catch (NoSupportException e) { /* expected */ }
+ assertNull("getParent(): not null", xChild1.getParent());
+ assertNull("getParent(): not null", xChild2.getParent());
+ assertNull("getParent(): not null", xChild6.getParent());
+ {
+ Object xParent3 = xChild3.getParent();
+ assertNotNull("getParent(): null", xParent3);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xParent3);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id2));
+ }{
+ Object xParent4 = xChild4.getParent();
+ assertNotNull("getParent(): null", xParent4);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xParent4);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ }{
+ Object xParent5 = xChild5.getParent();
+ assertNotNull("getParent(): null", xParent5);
+ XMetadatable xMetadatable = (XMetadatable)
+ UnoRuntime.queryInterface(XMetadatable.class, xParent5);
+ StringPair xmlid = xMetadatable.getMetadataReference();
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ }
+ }
+
+ /** test SwXMeta XText interface */
+ @Test 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();
+ assertNotNull("getText(): no parent", xParentText);
+
+ XTextRange xStart = xText.getStart();
+ assertNotNull("getStart(): no start", xStart);
+
+ XTextRange xEnd = xText.getEnd();
+ assertNotNull("getEnd(): no end", xEnd);
+
+ xText.setString("45");
+
+ {
+ String string = xText.getString();
+ assertEquals("getString(): invalid string returned",
+ "45", string);
+ }
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ assertNotNull("createTextCursor(): failed", xTextCursor);
+
+ try {
+ xText.createTextCursorByRange(null);
+ fail("createTextCursorByRange(): null allowed?");
+ } catch (RuntimeException e) { /* expected */ }
+
+ XTextCursor xTextCursorStart = xText.createTextCursorByRange(xStart);
+ assertNotNull("createTextCursorByRange(): failed for start",
+ xTextCursorStart);
+
+ XTextCursor xTextCursorEnd = xText.createTextCursorByRange(xEnd);
+ assertNotNull("createTextCursorByRange(): failed for end",
+ xTextCursorEnd);
+
+ // move outside meta
+ xDocTextCursor.gotoStart(false);
+
+ try {
+ xText.insertString(null, "foo", false);
+ fail("insertString(): null allowed?");
+ } catch (RuntimeException e) { /* expected */ }
+
+ try {
+ xText.insertString(xDocTextCursor, "foo", false);
+ fail("insertString(): cursor outside allowed?");
+ } catch (RuntimeException e) { /* expected */ }
+
+ xStart = xText.getStart();
+ xText.insertString(xStart, "A", false);
+ {
+ String string = xText.getString();
+ assertEquals("getString(): invalid string returned",
+ "A45", string);
+ }
+
+ xText.insertString(xEnd, "B", false);
+ {
+ String string = xText.getString();
+ assertEquals("getString(): invalid string returned",
+ "A45B", string);
+ }
+
+ try {
+ xText.insertControlCharacter(null, HARD_HYPHEN, false);
+ fail("insertControlCharacter(): null allowed?");
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ xStart = xText.getStart();
+ try {
+ xText.insertControlCharacter(xDocTextCursor, HARD_HYPHEN, false);
+ fail("insertControlCharacter(): cursor outside allowed?");
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ xText.insertControlCharacter(xStart, HARD_HYPHEN, false);
+ {
+ String string = xText.getString();
+ assertEquals("getString(): invalid string returned",
+ '\u2011' + "A45B", string);
+ }
+
+ xText.insertControlCharacter(xEnd, HARD_HYPHEN, false);
+ {
+ String string = xText.getString();
+ assertEquals("getString(): invalid string returned",
+ '\u2011' + "A45B" + '\u2011', string);
+ }
+
+ xText.setString("45");
+
+ try {
+ xText.insertTextContent(null, xMeta, false);
+ fail("insertTextContent(): null range allowed?");
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ try {
+ xText.insertTextContent(xStart, null, false);
+ fail("insertTextContent(): null content allowed?");
+ } catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
+
+ try {
+ xText.insertTextContent(xDocTextCursor, xMeta, false);
+ fail("insertTextContent(): cursor outside allowed?");
+ } 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);
+ fail("removeTextContent(): null content allowed?");
+ } catch (RuntimeException e) { /* expected */ }
+
+ xText.removeTextContent(xField1);
+
+ XTextRange xAnchor = xMeta.getAnchor();
+ assertNotNull("getAnchor(): null", xAnchor);
+
+ // 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();
+ assertNotNull("createEnumeration(): returns null", xEnum);
+ {
+ assertTrue("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");
+ assertEquals("first: not text", "Text", type);
+ String txt = xPortion.getString();
+ assertEquals("first: text differs", "45", txt);
+ }
+ {
+ assertTrue("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");
+ assertEquals("second: not text", "TextField", type);
+ }
+ // no ruby end here!!!
+ assertFalse("hasNext(): more elements?", xEnum.hasMoreElements());
+
+ XComponent xComponent = (XComponent)
+ UnoRuntime.queryInterface(XComponent.class, xMeta);
+ xComponent.dispose();
+
+ try {
+ XTextCursor xCursor = xText.createTextCursor();
+ assertNull("createTextCursor(): succeeds on disposed object?",
+ xCursor);
+ } catch (RuntimeException e) { /* expected */ }
+ }
+
+ /** check that cursor move methods move to positions in the meta,
+ but do not move to positions outside the meta. */
+ @Test 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();
+ assertNotNull("getStart(): no start", xStart);
+ XTextRange xEnd = xText.getEnd();
+ assertNotNull("getEnd(): no end", xEnd);
+
+ XTextCursor xTextCursor = xText.createTextCursor();
+ assertNotNull("createTextCursor(): no cursor", xTextCursor);
+
+ // XTextCursor
+ boolean bSuccess = false;
+ xTextCursor.gotoStart(false);
+ xTextCursor.gotoEnd(false);
+ bSuccess = xTextCursor.goLeft((short)1, false);
+ assertTrue("goLeft(): failed", bSuccess);
+ bSuccess = xTextCursor.goLeft((short)1000, false);
+ assertFalse("goLeft(): succeeded", bSuccess);
+ bSuccess = xTextCursor.goRight((short)1, false);
+ assertTrue("goRight(): failed", bSuccess);
+ bSuccess = xTextCursor.goRight((short)1000, false);
+ assertFalse("goRight(): succeeded", bSuccess);
+ xTextCursor.gotoRange(xStart, false);
+ xTextCursor.gotoRange(xEnd, false);
+ try {
+ xTextCursor.gotoRange(xDocTextCursor, false);
+ fail("gotoRange(): succeeded");
+ } catch (RuntimeException e) { /* expected */ }
+
+ // XWordCursor
+ xText.setString("Two words");
+ xTextCursor.gotoStart(false);
+ XWordCursor xWordCursor = (XWordCursor)
+ UnoRuntime.queryInterface(XWordCursor.class, xTextCursor);
+
+ bSuccess = xWordCursor.gotoNextWord(true);
+ assertTrue("gotoNextWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoNextWord(): wrong string",
+ "Two ", string);
+ }
+ bSuccess = xWordCursor.gotoNextWord(false);
+ assertFalse("gotoNextWord(): succeeded", bSuccess);
+ xTextCursor.collapseToEnd();
+ bSuccess = xWordCursor.gotoPreviousWord(true);
+ assertTrue("gotoPreviousWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoPreviousWord(): wrong string",
+ "words", string);
+ }
+ bSuccess = xWordCursor.gotoPreviousWord(false);
+ assertFalse("gotoPreviousWord(): succeeded", bSuccess);
+ bSuccess = xWordCursor.gotoEndOfWord(true);
+ assertTrue("gotoEndOfWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoEndOfWord(): wrong string",
+ "Two", string);
+ }
+ xTextCursor.gotoEnd(false);
+ bSuccess = xWordCursor.gotoStartOfWord(true);
+ assertTrue("gotoStartOfWord(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoStartOfWord(): wrong string",
+ "words", string);
+ }
+ xText.setString("");
+ bSuccess = xWordCursor.gotoEndOfWord(false);
+ assertFalse("gotoEndOfWord(): succeeded", bSuccess);
+ bSuccess = xWordCursor.gotoStartOfWord(false);
+ assertFalse("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);
+ assertTrue("gotoNextSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoNextSentence(): wrong string",
+ "This is a sentence. ", string);
+ }
+ bSuccess = xSentenceCursor.gotoNextSentence(false);
+ assertFalse("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);
+ assertTrue("gotoPreviousSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoPreviousSentence(): wrong string",
+ "Another sentence. Sentence 3.", string);
+ }
+ bSuccess = xSentenceCursor.gotoPreviousSentence(false);
+ assertFalse("gotoPreviousSentence(): succeeded", bSuccess);
+ bSuccess = xSentenceCursor.gotoEndOfSentence(true);
+ assertTrue("gotoEndOfSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoEndOfSentence(): wrong string",
+ "This is a sentence.", string);
+ }
+ xTextCursor.gotoEnd(false);
+ bSuccess = xSentenceCursor.gotoStartOfSentence(true);
+ assertTrue("gotoStartOfSentence(): failed", bSuccess);
+ {
+ String string = xTextCursor.getString();
+ assertEquals("gotoStartOfSentence(): wrong string",
+ "Sentence 3.", string);
+ }
+ xText.setString("");
+ bSuccess = xSentenceCursor.gotoEndOfSentence(false);
+ assertFalse("gotoEndOfSentence(): succeeded", bSuccess);
+ bSuccess = xSentenceCursor.gotoStartOfSentence(false);
+ assertFalse("gotoStartOfSentence(): succeeded", bSuccess);
+
+ XParagraphCursor xParagraphCursor = (XParagraphCursor)
+ UnoRuntime.queryInterface(XParagraphCursor.class, xTextCursor);
+
+ // XParagraphCursor (does not make sense)
+ bSuccess = xParagraphCursor.gotoNextParagraph(false);
+ assertFalse("gotoNextParagraph(): succeeded", bSuccess);
+ bSuccess = xParagraphCursor.gotoPreviousParagraph(false);
+ assertFalse("gotoPreviousParagraph(): succeeded", bSuccess);
+ bSuccess = xParagraphCursor.gotoStartOfParagraph(false);
+ assertFalse("gotoStartOfParagraph(): succeeded", bSuccess);
+ bSuccess = xParagraphCursor.gotoEndOfParagraph(false);
+ assertFalse("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 { }
+ }
+
+ @Test 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());
+ }
+ });
+ }
+
+ @Test 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());
+ }
+ });
+ }
+
+ @Test 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());
+ }
+ });
+ }
+
+ @Test 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());
+ }
+ });
+ }
+
+ @Test 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);
+ }
+ }
+
+ @Test 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);
+ assertEquals("getPresentation(): wrong",
+ "fooabcbar", xMetaField.getPresentation(false));
+ inserter.insertRange( new Range(0, 0, text) );
+ }
+
+ @Test 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);
+ assertNotNull("PropertySet: not supported?", xPropertySet);
+ XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
+ assertTrue("hasPropertyByName(\"NumberFormat\"):",
+ xPropertySetInfo.hasPropertyByName("NumberFormat"));
+ assertTrue("hasPropertyByName(\"IsFixedLanguage\"):",
+ xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));
+
+ int def = (Integer) xPropertySet.getPropertyValue("NumberFormat");
+ System.out.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");
+ assertEquals("NumberFormat: failed", INT, format);
+ boolean isFixed = (Boolean)
+ xPropertySet.getPropertyValue("IsFixedLanguage");
+ assertTrue("IsFixedLanguage: failed", isFixed);
+ }
+
+ @Test public void testLoadStore() throws Exception
+ {
+ XTextDocument xComp = null;
+ String filename = "TESTMETA.odt";
+ String file;
+ try {
+ file = TestDocument.getUrl(filename);
+ xComp = doLoad(file);
+ if (xComp != null)
+ {
+ checkLoadMeta(xComp);
+ file = m_TmpDir + filename;
+ doStore(xComp, file);
+ close(xComp);
+ xComp = doLoad(file);
+ checkLoadMeta(xComp);
+ }
+ } finally {
+ close(xComp);
+ }
+ }
+
+ private void doStore(XComponent xComp, String file) throws Exception
+ {
+ System.out.println("Storing test document...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xComp);
+
+ xStor.storeToURL(file, new PropertyValue[0]);
+
+ System.out.println("...done");
+ }
+
+ public XTextDocument doLoad(String file) throws Exception
+ {
+ XComponent xComp = null;
+
+ System.out.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);
+
+ assertNotNull("cannot load: " + file, xTextDoc);
+
+ System.out.println("...done");
+
+ return xTextDoc;
+ }
+
+ public void checkLoadMeta(XTextDocument xTextDoc) throws Exception
+ {
+ XText xText = xTextDoc.getText();
+
+ System.out.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);
+
+ System.out.println("...done");
+ }
+
+ @Test public void testLoadStoreXmlid() throws Exception
+ {
+ XTextDocument xComp = null;
+ String filename = "TESTXMLID.odt";
+ String file;
+ try {
+ file = TestDocument.getUrl(filename);
+ xComp = doLoad(file);
+ if (xComp != null)
+ {
+ checkLoadXmlId(xComp);
+ file = m_TmpDir + filename;
+ doStore(xComp, file);
+ close(xComp);
+ xComp = doLoad(file);
+ checkLoadXmlId(xComp);
+ }
+ } finally {
+ close(xComp);
+ }
+ }
+
+ public void checkLoadXmlId(XTextDocument xTextDoc) throws Exception
+ {
+ XText xText = xTextDoc.getText();
+
+ System.out.println("Checking bookmarks in loaded test document...");
+
+ XRepositorySupplier xRS = (XRepositorySupplier)
+ UnoRuntime.queryInterface(XRepositorySupplier.class, xTextDoc);
+ XDocumentRepository xRepo = (XDocumentRepository)
+ UnoRuntime.queryInterface(XDocumentRepository.class,
+ xRS.getRDFRepository());
+ XBookmarksSupplier xBMS = (XBookmarksSupplier)
+ UnoRuntime.queryInterface(XBookmarksSupplier.class, xTextDoc);
+ XNameAccess xBookmarks = xBMS.getBookmarks();
+ XMetadatable xMark1 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xBookmarks.getByName("mk1"));
+ assertTrue("mark1",
+ eq(xMark1.getMetadataReference(),
+ new StringPair("content.xml", "id90")));
+
+ XMetadatable xMark2 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xBookmarks.getByName("mk2"));
+ Pair<Statement[], Boolean> result = xRepo.getStatementRDFa(xMark2);
+ assertTrue("mark2", (result.First.length == 1)
+ && result.First[0].Subject.getStringValue().equals("uri:foo")
+ && result.First[0].Predicate.getStringValue().equals("uri:bar")
+ && result.First[0].Object.getStringValue().contains("a fooish bar")
+ );
+
+ XMetadatable xMark3 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xBookmarks.getByName("mk3"));
+ assertTrue("mark3",
+ eq(xMark3.getMetadataReference(),
+ new StringPair("content.xml", "id91")));
+
+ System.out.println("...done");
+
+ System.out.println("Checking sections in loaded test document...");
+
+ XTextSectionsSupplier xTSS = (XTextSectionsSupplier)
+ UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDoc);
+
+ XNameAccess xSections = xTSS.getTextSections();
+
+ XMetadatable xSection1 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Section 1"));
+ assertTrue("idsection1", eq(xSection1.getMetadataReference(),
+ new StringPair("content.xml", "idSection1")));
+
+ XMetadatable xSection2 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Section 2"));
+ assertTrue("idSection2", eq(xSection2.getMetadataReference(),
+ new StringPair("content.xml", "idSection2")));
+
+ XMetadatable xSection3 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Table of Contents1_Head"));
+ assertTrue("idTOCTitle", eq(xSection3.getMetadataReference(),
+ new StringPair("content.xml", "idTOCTitle")));
+
+ XMetadatable xSection4 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Alphabetical Index1_Head"));
+ assertTrue("idAITitle", eq(xSection4.getMetadataReference(),
+ new StringPair("content.xml", "idAITitle")));
+
+ XMetadatable xSection5 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Illustration Index1_Head"));
+ assertTrue("idIITitle", eq(xSection5.getMetadataReference(),
+ new StringPair("content.xml", "idIITitle")));
+
+ XMetadatable xSection6 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Index of Tables1_Head"));
+ assertTrue("idIOTTitle", eq(xSection6.getMetadataReference(),
+ new StringPair("content.xml", "idIOTTitle")));
+
+ XMetadatable xSection7 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("User-Defined1_Head"));
+ assertTrue("idUDTitle", eq(xSection7.getMetadataReference(),
+ new StringPair("content.xml", "idUDTitle")));
+
+ XMetadatable xSection8 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class,
+ xSections.getByName("Table of Objects1_Head"));
+ assertTrue("idTOOTitle", eq(xSection8.getMetadataReference(),
+ new StringPair("content.xml", "idTOOTitle")));
+
+ XMetadatable xSection9 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Bibliography1_Head"));
+ assertTrue("idBibTitle", eq(xSection9.getMetadataReference(),
+ new StringPair("content.xml", "idBibTitle")));
+
+ System.out.println("...done");
+
+ System.out.println("Checking indexes in loaded test document...");
+
+ XDocumentIndexesSupplier xDIS = (XDocumentIndexesSupplier)
+ UnoRuntime.queryInterface(XDocumentIndexesSupplier.class, xTextDoc);
+ XIndexAccess xIndexesIA = xDIS.getDocumentIndexes();
+ XNameAccess xIndexes =
+ UnoRuntime.queryInterface(XNameAccess.class, xIndexesIA);
+
+ XMetadatable xIndex1 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Table of Contents1"));
+ assertTrue("idTOC", eq(xIndex1.getMetadataReference(),
+ new StringPair("content.xml", "idTOC")));
+ XMetadatable xIndex1s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Table of Contents1"));
+ assertTrue("idTOC", eq(xIndex1s.getMetadataReference(),
+ new StringPair("content.xml", "idTOC")));
+
+ XMetadatable xIndex2 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Alphabetical Index1"));
+ assertTrue("idAI", eq(xIndex2.getMetadataReference(),
+ new StringPair("content.xml", "idAI")));
+ XMetadatable xIndex2s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Alphabetical Index1"));
+ assertTrue("idAI", eq(xIndex2s.getMetadataReference(),
+ new StringPair("content.xml", "idAI")));
+
+ XMetadatable xIndex3 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Illustration Index1"));
+ assertTrue("idII", eq(xIndex3.getMetadataReference(),
+ new StringPair("content.xml", "idII")));
+ XMetadatable xIndex3s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Illustration Index1"));
+ assertTrue("idII", eq(xIndex3s.getMetadataReference(),
+ new StringPair("content.xml", "idII")));
+
+ XMetadatable xIndex4 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Index of Tables1"));
+ assertTrue("idIOT", eq(xIndex4.getMetadataReference(),
+ new StringPair("content.xml", "idIOT")));
+ XMetadatable xIndex4s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Index of Tables1"));
+ assertTrue("idIOT", eq(xIndex4s.getMetadataReference(),
+ new StringPair("content.xml", "idIOT")));
+
+ XMetadatable xIndex5 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("User-Defined1"));
+ assertTrue("idUD", eq(xIndex5.getMetadataReference(),
+ new StringPair("content.xml", "idUD")));
+ XMetadatable xIndex5s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("User-Defined1"));
+ assertTrue("idUD", eq(xIndex5s.getMetadataReference(),
+ new StringPair("content.xml", "idUD")));
+
+ XMetadatable xIndex6 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Table of Objects1"));
+ assertTrue("idTOO", eq(xIndex6.getMetadataReference(),
+ new StringPair("content.xml", "idTOO")));
+ XMetadatable xIndex6s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Table of Objects1"));
+ assertTrue("idTOO", eq(xIndex6s.getMetadataReference(),
+ new StringPair("content.xml", "idTOO")));
+
+ XMetadatable xIndex7 = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xIndexes.getByName("Bibliography1"));
+ assertTrue("idBib", eq(xIndex7.getMetadataReference(),
+ new StringPair("content.xml", "idBib")));
+ XMetadatable xIndex7s = (XMetadatable) UnoRuntime.queryInterface(
+ XMetadatable.class, xSections.getByName("Bibliography1"));
+ assertTrue("idBib", eq(xIndex7s.getMetadataReference(),
+ new StringPair("content.xml", "idBib")));
+
+ System.out.println("...done");
+ }
+
+ 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().convert(xEnum);
+
+ dumpTree(outtree, "O: ");
+
+ new FuzzyTester().doTest(intree, outtree);
+ }
+
+ private void dumpTree(TreeNode tree) { dumpTree(tree, "> "); }
+
+ private void dumpTree(TreeNode tree, String prefix)
+ {
+ System.out.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);
+ }
+
+ static boolean eq(StringPair i_Left, StringPair i_Right)
+ {
+ return ((i_Left.First).equals(i_Right.First)) &&
+ ((i_Left.Second).equals(i_Right.Second));
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+}
+
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/complex/writer/testdocuments/TESTXMLID.odt b/sw/qa/complex/writer/testdocuments/TESTXMLID.odt
new file mode 100644
index 000000000000..063d392a489f
--- /dev/null
+++ b/sw/qa/complex/writer/testdocuments/TESTXMLID.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..4e828bb980b9
--- /dev/null
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -0,0 +1,877 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <testshl/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;
+ }
+
+ sal_uLong Position() const
+ {
+ return GetPos();
+ }
+
+ private:
+ int count_;
+ };
+
+ sal_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, sal_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++)
+ {
+ sal_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);
+
+ sal_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);
+
+ sal_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++)
+ {
+ sal_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--)
+ {
+ sal_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())
+ {
+ sal_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())
+ {
+ sal_uLong nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
+ sal_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..a769a8e3fae0
--- /dev/null
+++ b/sw/qa/core/bigpointerarray-new.cxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#include "bparr.hxx"
+#include <algorithm>
+
+BigPtrArray::BigPtrArray()
+{
+ //container_.reserve(1000);
+}
+
+sal_uLong BigPtrArray::Count() const
+{
+ return container_.size();
+}
+
+void BigPtrArray::Move(sal_uLong fromPos, sal_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(sal_uLong fromPos, sal_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[](sal_uLong pos) const
+{
+ DBG_ASSERT(pos < container_.size(), "BigPtrArray::operator[] precondition violation");
+ return container_[pos];
+}
+
+void BigPtrArray::Insert(const ElementPtr& rElem, sal_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( sal_uLong pos, sal_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(sal_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..af6805880fe8
--- /dev/null
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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_;
+ sal_uLong pos_;
+
+protected:
+ BigPtrEntry() : pBigPtrArray_(0), pos_(0)
+ {}
+
+ virtual ~BigPtrEntry()
+ {}
+
+ sal_uLong GetPos() const
+ {
+ return pos_;
+ }
+
+ BigPtrArray& GetArray() const
+ {
+ return *pBigPtrArray_;
+ }
+};
+
+typedef BigPtrEntry* ElementPtr;
+typedef sal_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
+ */
+ sal_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, sal_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(sal_uLong pos, sal_uLong n = 1);
+
+ /** Move an entry from a certain position to another on.
+
+ @param from
+ [in]
+
+ @param to
+ [in]
+ */
+ void Move(sal_uLong fromPos, sal_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(sal_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[](sal_uLong pos) const;
+
+ /**
+ */
+ void ForEach(FnForEach fn, void* pArgs = NULL);
+
+ /**
+ */
+ void ForEach(sal_uLong fromPos, sal_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..7321bbca16ad
--- /dev/null
+++ b/sw/qa/core/export.map
@@ -0,0 +1,34 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General 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_0 {
+ global:
+ registerAllTestFunction;
+
+ local:
+ *;
+};
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/Test.java b/sw/qa/unoapi/Test.java
new file mode 100644
index 000000000000..8a5b9b58fb95
--- /dev/null
+++ b/sw/qa/unoapi/Test.java
@@ -0,0 +1,52 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General 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 org.openoffice.sw.qa.unoapi;
+
+import org.openoffice.Runner;
+import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
+import static org.junit.Assert.*;
+
+public final class Test {
+ @org.junit.Before public void setUp() throws Exception {
+ connection.setUp();
+ }
+
+ @org.junit.After public void tearDown()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ @org.junit.Test public void test() {
+ assertTrue(
+ Runner.run(
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
+ }
+
+ private final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
new file mode 100644
index 000000000000..99d7c7f12881
--- /dev/null
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -0,0 +1,186 @@
+### 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
+
+### i109917 ###
+sw.SwXTextDocument::com::sun::star::document::XEventBroadcaster
+
+### i111186 ###
+sw.PageStyle::com::sun::star::beans::XPropertySet
+
+### i111218 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleEventBroadcaster
+
+### i111220 ###
+sw.XMLContentExporter::com::sun::star::document::XFilter
+sw.XMLSettingsExporter::com::sun::star::document::XFilter
+
+### i111273 ###
+sw.SwXTextEmbeddedObject::com::sun::star::document::XEmbeddedObjectSupplier
+
+### i111332 ###
+sw.XMLStylesExporter::com::sun::star::document::XFilter
+
+### i113020 ###
+sw.SwXTextEmbeddedObject::com::sun::star::beans::XPropertySet
+sw.SwXTextGraphicObject::com::sun::star::beans::XPropertySet
+sw.SwXTextFrame::com::sun::star::beans::XPropertySet
+
+### i113136 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleEditableText
+
+### i114205 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleText
+
+### i114889 ###
+sw.SwXTextViewCursor::com::sun::star::view::XScreenCursor
diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..f5102c2c9c84
--- /dev/null
+++ b/sw/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = sw
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/sw/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
new file mode 100644
index 000000000000..f6ae766af2d7
--- /dev/null
+++ b/sw/qa/unoapi/sw.sce
@@ -0,0 +1,94 @@
+-o sw.CharacterStyle
+-o sw.ConditionalParagraphStyle
+-o sw.PageStyle
+-o sw.ParagraphStyle
+#i111197 -o sw.SwAccessibleDocumentPageView
+#i86751 -o sw.SwAccessibleDocumentView
+-o sw.SwAccessibleEndnoteView
+#i113142 -o sw.SwAccessibleFooterView
+#i114637 -o sw.SwAccessibleFootnoteView
+#i113142 -o sw.SwAccessibleHeaderView
+#i89022 -o sw.SwAccessiblePageView
+-o sw.SwAccessibleParagraphView
+-o sw.SwAccessibleTableCellView
+#i85634 -o sw.SwAccessibleTableView
+#i111178 -o sw.SwAccessibleTextEmbeddedObject
+#i111178 -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
+#i111190 -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
+#i111194-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..d77df897a95a
--- /dev/null
+++ b/sw/sdi/_annotsh.sdi
@@ -0,0 +1,385 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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_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..52e59e9e5fed
--- /dev/null
+++ b/sw/sdi/_basesh.sdi
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..37c95d20699c
--- /dev/null
+++ b/sw/sdi/_beziers.sdi
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..ad37160a3c1f
--- /dev/null
+++ b/sw/sdi/_docsh.sdi
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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
+[
+ 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_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_MAIL_PREPAREEXPORT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
+}
+
+
diff --git a/sw/sdi/_drwbase.sdi b/sw/sdi/_drwbase.sdi
new file mode 100644
index 000000000000..d43a2d64512a
--- /dev/null
+++ b/sw/sdi/_drwbase.sdi
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..76497efed516
--- /dev/null
+++ b/sw/sdi/_formsh.sdi
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+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..a83270a6d196
--- /dev/null
+++ b/sw/sdi/_frmsh.sdi
@@ -0,0 +1,305 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..3d7fd41af98d
--- /dev/null
+++ b/sw/sdi/_grfsh.sdi
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..eff1c5ee1c2d
--- /dev/null
+++ b/sw/sdi/_listsh.sdi
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..a2e2f5535dc8
--- /dev/null
+++ b/sw/sdi/_mediash.sdi
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..947ec5b86941
--- /dev/null
+++ b/sw/sdi/_olesh.sdi
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..06eccd3d555e
--- /dev/null
+++ b/sw/sdi/_tabsh.sdi
@@ -0,0 +1,409 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..6ea824eab6cf
--- /dev/null
+++ b/sw/sdi/_textsh.sdi
@@ -0,0 +1,1610 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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";
+ ]
+ 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
+ //
+ SID_FM_TOGGLECONTROLFOCUS
+ [
+ ExecMethod = ExecMoveMisc ;
+ StateMethod = NoState ;
+ ]
+ 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_COMMENT
+ [
+ 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_SENTENCE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TITLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ 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
+ ]
+
+ SID_THES
+ [
+ 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..a17fbb8f5742
--- /dev/null
+++ b/sw/sdi/_viewsh.sdi
@@ -0,0 +1,784 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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
+[
+ 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 ;
+ ]
+ SID_BROWSER_MODE
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
+ FN_PRINT_LAYOUT
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
+ 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 ;
+ ]
+ SID_THESAURUS // 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..349e17b9d985
--- /dev/null
+++ b/sw/sdi/annotsh.sdi
@@ -0,0 +1,380 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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"
+]
+{
+
+ SID_THESAURUS // 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_SENTENCE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_TITLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+
+ SID_TRANSLITERATE_TOGGLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ 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";
+ ]
+
+ SID_THES
+ [
+ ExecMethod = ExecLingu ;
+ StateMethod = GetLinguState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
+
+}
+
+shell SwAnnotationShell
+{
+ import Annotation[Automation];
+}
diff --git a/sw/sdi/basesh.sdi b/sw/sdi/basesh.sdi
new file mode 100644
index 000000000000..230d977b0cfc
--- /dev/null
+++ b/sw/sdi/basesh.sdi
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..6a2c8289b628
--- /dev/null
+++ b/sw/sdi/beziersh.sdi
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..5925edd7528c
--- /dev/null
+++ b/sw/sdi/docsh.sdi
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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
+{
+ 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..303190e88f2d
--- /dev/null
+++ b/sw/sdi/drawsh.sdi
@@ -0,0 +1,477 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..7d2ec32f3a8e
--- /dev/null
+++ b/sw/sdi/drwbassh.sdi
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..d98d368a9460
--- /dev/null
+++ b/sw/sdi/drwtxtsh.sdi
@@ -0,0 +1,659 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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";
+ ]
+
+ SID_THESAURUS // 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_SENTENCE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TITLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE
+ [
+ ExecMethod = ExecTransliteration;
+ StateMethod = NoState ;
+ 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_LANGUAGE_STATUS
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; // e.g. disable for read-only documents
+ ]
+
+ SID_THES
+ [
+ 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..e6058fb40ac0
--- /dev/null
+++ b/sw/sdi/formsh.sdi
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+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..ff0d951eb51f
--- /dev/null
+++ b/sw/sdi/frmsh.sdi
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..4e6a7675862f
--- /dev/null
+++ b/sw/sdi/grfsh.sdi
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+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..1acb01fecab7
--- /dev/null
+++ b/sw/sdi/listsh.sdi
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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/mediash.sdi b/sw/sdi/mediash.sdi
new file mode 100644
index 000000000000..647a02434351
--- /dev/null
+++ b/sw/sdi/mediash.sdi
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..c10717b945a9
--- /dev/null
+++ b/sw/sdi/olesh.sdi
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..01a741cc04b5
--- /dev/null
+++ b/sw/sdi/swinterf.c
@@ -0,0 +1,249 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..f2595aa104df
--- /dev/null
+++ b/sw/sdi/switems.sdi
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..64f52343cb7b
--- /dev/null
+++ b/sw/sdi/swriter.sdi
@@ -0,0 +1,10268 @@
+//--------------------------------------------------------------------------
+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 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 = FALSE,
+ 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 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 ReplyComment 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..c4be8f9559fc
--- /dev/null
+++ b/sw/sdi/swslots.hrc
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <editeng/memberids.hrc>
+#include <editeng/editids.hrc>
+#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..0b59ebb0c211
--- /dev/null
+++ b/sw/sdi/swslots.sdi
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+module
+"9F76B581-23DD-101C-80B6-000024021835"
+"A1810F00-23DE-101C-80B6-000024021835"
+StarWriter
+[
+HelpText( "StarWriter Application" )
+SlotIdFile( "swslots.hrc" )
+ModulePrefix( "Sw" )
+]
+{
+ include "sfx2/sfxitems.sdi"
+ include "sfx2/sfx.sdi"
+ include "svx/svxitems.sdi"
+ include "svx/xoitems.sdi"
+ include "svx/svx.sdi"
+
+ 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/tabsh.sdi b/sw/sdi/tabsh.sdi
new file mode 100644
index 000000000000..3e112a9ff11f
--- /dev/null
+++ b/sw/sdi/tabsh.sdi
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..cd321d95d1bf
--- /dev/null
+++ b/sw/sdi/textsh.sdi
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..1005c96040a1
--- /dev/null
+++ b/sw/sdi/viewsh.sdi
@@ -0,0 +1,326 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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
+
+{
+ import TextEditView [Automation];
+// import TextPage "Page";
+// import SearchSettings;
+// import SearchAttributes;
+// import ReplaceAttributes;
+}
+
+interface TextPrintPreview
+[ 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_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
+{
+ import TextPrintPreview[Automation];
+}
+
+
diff --git a/sw/sdi/wbasesh.sdi b/sw/sdi/wbasesh.sdi
new file mode 100644
index 000000000000..59328cb69dd7
--- /dev/null
+++ b/sw/sdi/wbasesh.sdi
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..41eeadb6b9e0
--- /dev/null
+++ b/sw/sdi/wbeziers.sdi
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..df1b60ecbc62
--- /dev/null
+++ b/sw/sdi/wdocsh.sdi
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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
+{
+ 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..990475298c0a
--- /dev/null
+++ b/sw/sdi/wdrwbase.sdi
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..497008033eba
--- /dev/null
+++ b/sw/sdi/wformsh.sdi
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+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..b5d87c8cfc4b
--- /dev/null
+++ b/sw/sdi/wfrmsh.sdi
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..19384e7983e2
--- /dev/null
+++ b/sw/sdi/wgrfsh.sdi
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..a6777b9c01ee
--- /dev/null
+++ b/sw/sdi/wlistsh.sdi
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+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..29497a61a407
--- /dev/null
+++ b/sw/sdi/wolesh.sdi
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..9786eb38daf1
--- /dev/null
+++ b/sw/sdi/wrtapp.sdi
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..ee2ae7503e9f
--- /dev/null
+++ b/sw/sdi/wtabsh.sdi
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+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..42d6a9e69cdd
--- /dev/null
+++ b/sw/sdi/wtextsh.sdi
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..9d0ebde9c800
--- /dev/null
+++ b/sw/sdi/wviewsh.sdi
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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
+{
+ import WebEditView [Automation];
+// import SearchSettings;
+// import TextPage "Page";
+// import SearchAttributes;
+// import ReplaceAttributes;
+
+}
+
+interface WebSourceView
+[ 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
+
+{
+ 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..cec279e73096
--- /dev/null
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -0,0 +1,534 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <editeng/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 2010-01-13 #b6912256#
+//#include <svtools/svstdarr.hxx>
+#include <doc.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<sal_uInt16>(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 )
+ {
+ pTxtNode->RemoveFromList();
+ // --> OD 2010-01-13 #b6912256#
+ // clear all list attributes and the list style
+ SvUShortsSort aResetAttrsArray;
+ aResetAttrsArray.Insert( RES_PARATR_LIST_ID );
+ aResetAttrsArray.Insert( RES_PARATR_LIST_LEVEL );
+ aResetAttrsArray.Insert( RES_PARATR_LIST_ISRESTART );
+ aResetAttrsArray.Insert( RES_PARATR_LIST_RESTARTVALUE );
+ aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED );
+ aResetAttrsArray.Insert( RES_PARATR_NUMRULE );
+ SwPaM aPam( *pTxtNode );
+ pTxtNode->GetDoc()->ResetAttrs( aPam, sal_False,
+ &aResetAttrsArray,
+ false );
+ // <--
+ }
+ }
+}
+// <--
+
+// --> 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..05c30aa97f5b
--- /dev/null
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -0,0 +1,1409 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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;
+
+#ifdef DBG_UTIL
+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();
+
+#ifdef DBG_UTIL
+ 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.");
+
+#ifdef DBG_UTIL
+ 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;
+}
+
+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;
+//}
+
+#ifdef DBG_UTIL
+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/access/acccell.cxx b/sw/source/core/access/acccell.cxx
new file mode 100644
index 000000000000..f4cf864b7217
--- /dev/null
+++ b/sw/source/core/access/acccell.cxx
@@ -0,0 +1,375 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <accfrmobj.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;
+using namespace sw::access;
+
+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 SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *GetMap() );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwAccessibleChild& 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( SwAccessibleChild(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( SwAccessibleChild(GetFrm()), IsInPagePreview() );
+ ::vos::ORef< SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pParent, sal_False ) );
+ if( xAccImpl.isValid() )
+ xAccImpl->DisposeChild( SwAccessibleChild(GetFrm()), bRecursive );
+ SwAccessibleContext::Dispose( bRecursive );
+}
+
+void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
+{
+ const SwFrm *pParent = GetParent( SwAccessibleChild(GetFrm()), IsInPagePreview() );
+ ::vos::ORef< SwAccessibleContext > xAccImpl(
+ GetMap()->GetContextImpl( pParent, sal_False ) );
+ if( xAccImpl.isValid() )
+ xAccImpl->InvalidateChildPosOrSize( SwAccessibleChild(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..db3d7d5fd5cb
--- /dev/null
+++ b/sw/source/core/access/acccell.hxx
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+
+#include "acccontext.hxx"
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+
+class SwCellFrm;
+class SwFrmFmt;
+
+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..1b5e66071b84
--- /dev/null
+++ b/sw/source/core/access/acccontext.cxx
@@ -0,0 +1,1604 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <pagefrm.hxx>
+#include <flyfrm.hxx>
+#include <dflyobj.hxx>
+#include <pam.hxx>
+#include <viewimp.hxx>
+#include <accmap.hxx>
+#include <accfrmobjslist.hxx>
+#include <acccontext.hxx>
+#include <svx/AccessibleShape.hxx>
+#include <comphelper/accessibleeventnotifier.hxx>
+#include <PostItMgr.hxx>
+
+using namespace sw::access;
+
+#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 = GetMap() ? IsShowing( *(GetMap()) ) : sal_False;
+
+ 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();
+ const bool bVisibleChildrenOnly = SwAccessibleChild( pFrm ).IsVisibleChildrenOnly();
+
+ const SwAccessibleChildSList aList( *pFrm, *(GetMap()) );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ while( aIter != aList.end() )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwRect aBox( rLower.GetBox( *(GetMap()) ) );
+ if( rLower.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ Action eAction = NONE;
+ if( aBox.IsOver( rNewVisArea ) )
+ {
+ if( aBox.IsOver( rOldVisArea ) )
+ {
+ eAction = SCROLLED_WITHIN;
+ }
+ else
+ {
+ if ( bVisibleChildrenOnly &&
+ !rLower.AlwaysIncludeAsChild() )
+ {
+ eAction = SCROLLED_IN;
+ }
+ else
+ {
+ eAction = SCROLLED;
+ }
+ }
+ }
+ else if( aBox.IsOver( rOldVisArea ) )
+ {
+ if ( bVisibleChildrenOnly &&
+ !rLower.AlwaysIncludeAsChild() )
+ {
+ eAction = SCROLLED_OUT;
+ }
+ else
+ {
+ eAction = SCROLLED;
+ }
+ }
+ else if( !bVisibleChildrenOnly ||
+ rLower.AlwaysIncludeAsChild() )
+ {
+ // This wouldn't be required if the SwAccessibleFrame,
+ // wouldn't know about the vis area.
+ eAction = SCROLLED;
+ }
+ if( NONE != eAction )
+ {
+ if ( rLower.GetSwFrm() )
+ {
+ ASSERT( !rLower.AlwaysIncludeAsChild(),
+ "<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
+ const SwFrm* pLower( rLower.GetSwFrm() );
+ ::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 if ( rLower.GetDrawObject() )
+ {
+ ASSERT( !rLower.AlwaysIncludeAsChild(),
+ "<SwAccessibleContext::ChildrenScrolled(..)> - always included child not considered!" );
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rLower.GetDrawObject(),
+ 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.GetDrawObject(),
+ xAccImpl.getBodyPtr() );
+ break;
+ case SCROLLED_OUT:
+ {
+ xAccImpl->ViewForwarderChanged(
+ ::accessibility::IAccessibleViewForwarderListener::VISIBLE_AREA,
+ GetMap() );
+ DisposeShape( rLower.GetDrawObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ break;
+ case NONE:
+ break;
+ }
+ }
+ }
+ else if ( rLower.GetWindow() )
+ {
+ // nothing to do - as such children are always included as children.
+ ASSERT( rLower.AlwaysIncludeAsChild(),
+ "<SwAccessibleContext::ChildrenScrolled(..)> - not always included child not considered!" );
+ }
+ }
+ }
+ else if ( rLower.GetSwFrm() &&
+ ( !bVisibleChildrenOnly ||
+ aBox.IsOver( rOldVisArea ) ||
+ aBox.IsOver( rNewVisArea ) ) )
+ {
+ // There are no unaccessible SdrObjects that need to be notified
+ ChildrenScrolled( rLower.GetSwFrm(), rOldVisArea );
+ }
+ ++aIter;
+ }
+}
+
+void SwAccessibleContext::Scrolled( const SwRect& rOldVisArea )
+{
+ SetVisArea( GetMap()->GetVisArea() );
+
+ ChildrenScrolled( GetFrm(), rOldVisArea );
+
+ sal_Bool bIsOldShowingState;
+ sal_Bool bIsNewShowingState = IsShowing( *(GetMap()) );
+ {
+ 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 SwAccessibleChildSList aVisList( GetVisArea(), *_pFrm, *(GetMap()) );
+
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwAccessibleChild& 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 if ( rLower.GetDrawObject() )
+ {
+ // TODO: SdrObjects
+ }
+ else if ( rLower.GetWindow() )
+ {
+ // nothing to do ?
+ }
+
+ ++aIter;
+ }
+}
+// <--
+
+void SwAccessibleContext::DisposeChildren( const SwFrm *pFrm,
+ sal_Bool bRecursive )
+{
+ const SwAccessibleChildSList aVisList( GetVisArea(), *pFrm, *(GetMap()) );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwAccessibleChild& 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 if ( rLower.GetDrawObject() )
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl(
+ GetMap()->GetContextImpl( rLower.GetDrawObject(),
+ this, sal_False ) );
+ if( xAccImpl.isValid() )
+ DisposeShape( rLower.GetDrawObject(), xAccImpl.getBodyPtr() );
+ }
+ else if ( rLower.GetWindow() )
+ {
+ DisposeChild( rLower, sal_False );
+ }
+ ++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 )
+ , bRegisteredAtAccessibleMap( true )
+{
+ InitStates();
+ DBG_MSG_CD( "constructed" )
+}
+
+SwAccessibleContext::~SwAccessibleContext()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ DBG_MSG_CD( "destructed" )
+ 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( *(GetMap()) );
+}
+
+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 SwAccessibleChild aChild( GetChild( *(GetMap()), 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 if ( aChild.GetDrawObject() )
+ {
+ ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+ GetMap()->GetContextImpl( aChild.GetDrawObject(),
+ this, !bDisposing ) );
+ if( xChildImpl.isValid() )
+ xChild = xChildImpl.getBodyPtr();
+ }
+ else if ( aChild.GetWindow() )
+ {
+ xChild = aChild.GetWindow()->GetAccessible();
+ }
+
+ 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( *(GetMap()), SwAccessibleChild(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( *(GetMap()), GetFrm() ) ); // twip rel to doc root
+ Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() );
+ aPixPoint.X() += aPixPos.X();
+ aPixPoint.Y() += aPixPos.Y();
+ }
+
+ const SwAccessibleChild aChild( GetChildAtPixel( aPixPoint, *(GetMap()) ) );
+ if( aChild.GetSwFrm() )
+ {
+ xAcc = GetMap()->GetContext( aChild.GetSwFrm() );
+ }
+ else if( aChild.GetDrawObject() )
+ {
+ xAcc = GetMap()->GetContext( aChild.GetDrawObject(), this );
+ }
+ else if ( aChild.GetWindow() )
+ {
+ xAcc = aChild.GetWindow()->GetAccessible();
+ }
+
+ 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( *(GetMap()), 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( *(GetMap()), 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" )
+ }
+
+ RemoveFrmFromAccessibleMap();
+ ClearFrm();
+ pMap = 0;
+
+ bDisposing = sal_False;
+}
+
+void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
+ sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if ( IsShowing( *(GetMap()), rChildFrmOrObj ) ||
+ rChildFrmOrObj.AlwaysIncludeAsChild() ||
+ !SwAccessibleChild( GetFrm() ).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 if ( rChildFrmOrObj.GetDrawObject() )
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
+ this, sal_True );
+ DisposeShape( rChildFrmOrObj.GetDrawObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ else if ( rChildFrmOrObj.GetWindow() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ uno::Reference< XAccessible > xAcc =
+ rChildFrmOrObj.GetWindow()->GetAccessible();
+ aEvent.OldValue <<= xAcc;
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ 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( *(GetMap()) );
+ {
+ 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();
+ }
+
+ if( !bIsNewShowingState &&
+ SwAccessibleChild( GetParent() ).IsVisibleChildrenOnly() )
+ {
+ // The frame is now invisible -> dispose it
+ Dispose( sal_True );
+ }
+ else
+ {
+ _InvalidateContent( sal_True );
+ }
+}
+
+void SwAccessibleContext::InvalidateChildPosOrSize(
+ const SwAccessibleChild& rChildFrmOrObj,
+ const SwRect& rOldFrm )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ASSERT( !rChildFrmOrObj.GetSwFrm() ||
+ !rChildFrmOrObj.GetSwFrm()->Frm().IsEmpty(),
+ "child context should have a size" );
+
+ if ( rChildFrmOrObj.AlwaysIncludeAsChild() )
+ {
+ // nothing to do;
+ return;
+ }
+
+ const bool bVisibleChildrenOnly = SwAccessibleChild( GetFrm() ).IsVisibleChildrenOnly();
+ const bool bNew = rOldFrm.IsEmpty() ||
+ ( rOldFrm.Left() == 0 && rOldFrm.Top() == 0 );
+ if( IsShowing( *(GetMap()), 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 || (bVisibleChildrenOnly && !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 if ( rChildFrmOrObj.GetDrawObject() )
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
+ this, sal_True );
+ // --> OD 2004-11-29 #i37790#
+ if ( xAccImpl.isValid() )
+ {
+ ScrolledInShape( rChildFrmOrObj.GetDrawObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ else
+ {
+ ASSERT( false ,
+ "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - no accessible shape found." );
+ }
+ // <--
+ }
+ else if ( rChildFrmOrObj.GetWindow() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::CHILD;
+ aEvent.NewValue <<= (rChildFrmOrObj.GetWindow()->GetAccessible());
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ }
+ 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( bVisibleChildrenOnly &&
+ !bNew && IsShowing( rOldFrm ) )
+ {
+ if( rChildFrmOrObj.GetSwFrm() )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetSwFrm(),
+ sal_True );
+ xAccImpl->SetParent( this );
+ xAccImpl->Dispose( sal_True );
+ }
+ else if ( rChildFrmOrObj.GetDrawObject() )
+ {
+ ::vos::ORef< ::accessibility::AccessibleShape > xAccImpl =
+ GetMap()->GetContextImpl( rChildFrmOrObj.GetDrawObject(),
+ this, sal_True );
+ DisposeShape( rChildFrmOrObj.GetDrawObject(),
+ xAccImpl.getBodyPtr() );
+ }
+ else if ( rChildFrmOrObj.GetWindow() )
+ {
+ ASSERT( false,
+ "<SwAccessibleContext::InvalidateChildPosOrSize(..)> - not expected to handle dispose of child of type <Window>." );
+ }
+ }
+ }
+}
+
+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 );
+}
+
+void SwAccessibleContext::RemoveFrmFromAccessibleMap()
+{
+ if( bRegisteredAtAccessibleMap && GetFrm() && GetMap() )
+ GetMap()->RemoveContext( GetFrm() );
+}
+
+bool SwAccessibleContext::HasAdditionalAccessibleChildren()
+{
+ bool bRet( false );
+
+ if ( GetFrm()->IsTxtFrm() )
+ {
+ SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr();
+ if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
+ {
+ bRet = pPostItMgr->HasFrmConnectedSidebarWins( *(GetFrm()) );
+ }
+ }
+
+ return bRet;
+}
+/** get additional accessible child by index
+
+ OD 2010-01-27 #i88070#
+
+ @author OD
+*/
+Window* SwAccessibleContext::GetAdditionalAccessibleChild( const sal_Int32 nIndex )
+{
+ Window* pAdditionalAccessibleChild( 0 );
+
+ if ( GetFrm()->IsTxtFrm() )
+ {
+ SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr();
+ if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
+ {
+ pAdditionalAccessibleChild =
+ pPostItMgr->GetSidebarWinForFrmByIndex( *(GetFrm()), nIndex );
+ }
+ }
+
+ return pAdditionalAccessibleChild;
+}
+
+/** get all additional accessible children
+
+ OD 2010-01-27 #i88070#
+
+ @author OD
+*/
+void SwAccessibleContext::GetAdditionalAccessibleChildren( std::vector< Window* >* pChildren )
+{
+ if ( GetFrm()->IsTxtFrm() )
+ {
+ SwPostItMgr* pPostItMgr = GetMap()->GetShell()->GetPostItMgr();
+ if ( pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
+ {
+ pPostItMgr->GetAllSidebarWinForFrm( *(GetFrm()), pChildren );
+ }
+ }
+}
+
+#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..8bad4ab9074b
--- /dev/null
+++ b/sw/source/core/access/acccontext.hxx
@@ -0,0 +1,459 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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;
+}
+class SwFmtFld;
+class SwAccessibleChildContainer;
+
+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 sw::access::SwAccessibleChild& 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 sw::access::SwAccessibleChild& 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();
+
+ bool HasAdditionalAccessibleChildren();
+
+ /** get additional child by index
+
+ OD 2010-01-27 #i88070#
+
+ @author OD
+ */
+ Window* GetAdditionalAccessibleChild( const sal_Int32 nIndex );
+
+ /** get all additional accessible children
+
+ OD 2010-01-27 #i88070#
+
+ @author OD
+ */
+ void GetAdditionalAccessibleChildren( std::vector< Window* >* pChildren );
+
+
+ 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..08de7edba46f
--- /dev/null
+++ b/sw/source/core/access/accdoc.cxx
@@ -0,0 +1,515 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 *_pMap ) :
+ SwAccessibleContext( _pMap, AccessibleRole::DOCUMENT,
+ _pMap->GetShell()->GetLayout() ),//swmod 071107//swmod 071225
+ mxParent( _pMap->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( *(GetMap()) ) )
+ {
+ 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 ));
+ sal_uInt16 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..3e2153876219
--- /dev/null
+++ b/sw/source/core/access/accdoc.hxx
@@ -0,0 +1,213 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..33a32dc5c9ca
--- /dev/null
+++ b/sw/source/core/access/accembedded.cxx
@@ -0,0 +1,97 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..cd7205293ed0
--- /dev/null
+++ b/sw/source/core/access/accembedded.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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..1fb553d58120
--- /dev/null
+++ b/sw/source/core/access/accfootnote.cxx
@@ -0,0 +1,157 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..1c7330bc694d
--- /dev/null
+++ b/sw/source/core/access/accfootnote.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+
+#include <sal/types.h>
+
+#include <acccontext.hxx>
+
+class SwAccessibleMap;
+class SwFtnFrm;
+
+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..043e40bb943b
--- /dev/null
+++ b/sw/source/core/access/accframe.cxx
@@ -0,0 +1,497 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <editeng/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>
+
+using namespace sw::access;
+
+// 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.
+/* static */ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bInPagePreview )
+{
+ sal_Int32 nCount = 0;
+
+ const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ nCount++;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ nCount += GetChildCount( rAccMap,
+ rVisArea, rLower.GetSwFrm(),
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+
+ return nCount;
+}
+
+/* static */ SwAccessibleChild SwAccessibleFrame::GetChild(
+ SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
+{
+ SwAccessibleChild aRet;
+
+ if( rPos >= 0 )
+ {
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
+ {
+ // We need a sorted list here
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
+ while( aIter != aVisMap.end() && !aRet.IsValid() )
+ {
+ const SwAccessibleChild& 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( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rPos,
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it return lower
+ // frames in the correct order.
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() && !aRet.IsValid() )
+ {
+ const SwAccessibleChild& 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( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rPos,
+ bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ }
+
+ return aRet;
+}
+
+/* static */ sal_Bool SwAccessibleFrame::GetChildIndex(
+ SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ const SwAccessibleChild& rChild,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview )
+{
+ sal_Bool bFound = sal_False;
+
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
+ {
+ // We need a sorted list here
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
+ while( aIter != aVisMap.end() && !bFound )
+ {
+ const SwAccessibleChild& 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( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rChild,
+ rPos, bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it return lower
+ // frames in the correct order.
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() && !bFound )
+ {
+ const SwAccessibleChild& 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( rAccMap,
+ rVisArea, *(rLower.GetSwFrm()), rChild,
+ rPos, bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+
+ return bFound;
+}
+
+SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ const Point& rPixPos,
+ sal_Bool bInPagePreview,
+ SwAccessibleMap& rAccMap )
+{
+ SwAccessibleChild aRet;
+
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
+ {
+ // We need a sorted list here, and we have to reverse iterate,
+ // because objects in front should be returned.
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_reverse_iterator aRIter( aVisMap.rbegin() );
+ while( aRIter != aVisMap.rend() && !aRet.IsValid() )
+ {
+ const SwAccessibleChild& 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( rAccMap ) );
+ if( !aLogBounds.IsEmpty() )
+ {
+ Rectangle aPixBounds( rAccMap.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, rAccMap );
+ }
+ 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 SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() && !aRet.IsValid() )
+ {
+ const SwAccessibleChild& 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( rAccMap ) );
+ if( !aLogBounds.IsEmpty() )
+ {
+ Rectangle aPixBounds( rAccMap.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, rAccMap );
+ }
+ ++aIter;
+ }
+ }
+
+ return aRet;
+}
+
+/* static */ void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ ::std::list< SwAccessibleChild >& rChildren,
+ sal_Bool bInPagePreview )
+{
+ if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
+ {
+ // We need a sorted list here
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
+ while( aIter != aVisMap.end() )
+ {
+ const SwAccessibleChild& rLower = (*aIter).second;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ rChildren.push_back( rLower );
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()),
+ rChildren, bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+ else
+ {
+ // The unsorted list is sorted enough, because it return lower
+ // frames in the correct order.
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ if( rLower.IsAccessible( bInPagePreview ) )
+ {
+ rChildren.push_back( rLower );
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ GetChildren( rAccMap, rVisArea, *(rLower.GetSwFrm()),
+ rChildren, bInPagePreview );
+ }
+ ++aIter;
+ }
+ }
+}
+
+SwRect SwAccessibleFrame::GetBounds( const SwAccessibleMap& rAccMap,
+ const SwFrm *pFrm )
+{
+ if( !pFrm )
+ pFrm = GetFrm();
+
+ SwAccessibleChild aFrm( pFrm );
+ SwRect aBounds( aFrm.GetBounds( rAccMap ).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
+{
+ SwAccessibleChild 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()
+{
+}
+
+/* static */ const SwFrm* SwAccessibleFrame::GetParent( const SwAccessibleChild& rFrmOrObj,
+ sal_Bool bInPagePreview )
+{
+ return rFrmOrObj.GetParent( bInPagePreview );
+}
+
+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;
+}
+
+sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap ) const
+{
+ return GetChildCount( rAccMap, maVisArea, mpFrm, IsInPagePreview() );
+}
+
+sw::access::SwAccessibleChild SwAccessibleFrame::GetChild(
+ SwAccessibleMap& rAccMap,
+ sal_Int32 nPos ) const
+{
+ return SwAccessibleFrame::GetChild( rAccMap, maVisArea, *mpFrm, nPos, IsInPagePreview() );
+}
+
+sal_Int32 SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap,
+ const sw::access::SwAccessibleChild& rChild ) const
+{
+ sal_Int32 nPos = 0;
+ return GetChildIndex( rAccMap, maVisArea, *mpFrm, rChild, nPos, IsInPagePreview() )
+ ? nPos
+ : -1L;
+}
+
+sw::access::SwAccessibleChild SwAccessibleFrame::GetChildAtPixel(
+ const Point& rPos,
+ SwAccessibleMap& rAccMap ) const
+{
+ return GetChildAtPixel( maVisArea, *mpFrm, rPos, IsInPagePreview(), rAccMap );
+}
+
+void SwAccessibleFrame::GetChildren( SwAccessibleMap& rAccMap,
+ ::std::list< sw::access::SwAccessibleChild >& rChildren ) const
+{
+ GetChildren( rAccMap, maVisArea, *mpFrm, rChildren, IsInPagePreview() );
+}
+
+sal_Bool SwAccessibleFrame::IsShowing( const SwAccessibleMap& rAccMap,
+ const sw::access::SwAccessibleChild& rFrmOrObj ) const
+{
+ return IsShowing( rFrmOrObj.GetBox( rAccMap ) );
+}
+
diff --git a/sw/source/core/access/accframe.hxx b/sw/source/core/access/accframe.hxx
new file mode 100644
index 000000000000..48da1bdbb9cb
--- /dev/null
+++ b/sw/source/core/access/accframe.hxx
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <swrect.hxx>
+
+#include <sal/types.h>
+#include <tools/string.hxx>
+
+#include <list>
+#include <accfrmobj.hxx>
+
+class SwAccessibleMap;
+class SwFrm;
+class ViewShell;
+namespace sw { namespace access {
+ class SwAccessibleChild;
+}}
+
+// Any method of this class must be called with an acquired solar mutex!
+
+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( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm *pFrm,
+ sal_Bool bInPagePreview );
+private:
+ static sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview);
+
+ static sal_Bool GetChildIndex( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ const sw::access::SwAccessibleChild& rChild,
+ sal_Int32& rPos,
+ sal_Bool bInPagePreview );
+
+ static sw::access::SwAccessibleChild GetChildAtPixel( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ const Point& rPos,
+ sal_Bool bInPagePreview,
+ SwAccessibleMap& rAccMap );
+
+ static void GetChildren( SwAccessibleMap& rAccMap,
+ const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ ::std::list< sw::access::SwAccessibleChild >& rChildren,
+ sal_Bool bInPagePreview );
+
+protected:
+
+ sal_Bool IsEditable( ViewShell *pVSh ) const;
+
+ sal_Bool IsOpaque( ViewShell *pVSh ) const;
+
+ sal_Bool IsShowing( const SwAccessibleMap& rAccMap,
+ const sw::access::SwAccessibleChild& rFrmOrObj ) const;
+ inline sal_Bool IsShowing( const SwRect& rFrm ) const;
+ inline sal_Bool IsShowing( const SwAccessibleMap& rAccMap ) 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 sw::access::SwAccessibleChild& rFrmOrObj,
+ sal_Bool bInPagePreview );
+
+ sal_Int32 GetChildIndex( SwAccessibleMap& rAccMap,
+ const sw::access::SwAccessibleChild& rChild ) const;
+
+protected:
+
+ // Return the bounding box of the frame clipped to the vis area. If
+ // no frame is specified, use this' frame.
+ SwRect GetBounds( const SwAccessibleMap& rAccMap,
+ 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
+ sal_Int32 GetChildCount( SwAccessibleMap& rAccMap ) const;
+ sw::access::SwAccessibleChild GetChild( SwAccessibleMap& rAccMap,
+ sal_Int32 nPos ) const;
+ sw::access::SwAccessibleChild GetChildAtPixel( const Point& rPos,
+ SwAccessibleMap& rAccMap ) const;
+ void GetChildren( SwAccessibleMap& rAccMap,
+ ::std::list< sw::access::SwAccessibleChild >& 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 SwAccessibleMap& rAccMap ) const
+{
+ sw::access::SwAccessibleChild aFrmOrObj( GetFrm() );
+ return IsShowing( rAccMap, aFrmOrObj );
+}
+
+inline const SwFrm *SwAccessibleFrame::GetParent() const
+{
+ sw::access::SwAccessibleChild aFrmOrObj( GetFrm() );
+ return GetParent( aFrmOrObj, IsInPagePreview() );
+}
+
+#endif
+
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
new file mode 100644
index 000000000000..91cbe0b9324f
--- /dev/null
+++ b/sw/source/core/access/accframebase.cxx
@@ -0,0 +1,279 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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( const SfxPoolItem* pOld, const 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 < const SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
+ "invalid old name" );
+
+ const String& rNewName = pFrmFmt->GetName();
+ SetName( rNewName );
+ ASSERT( !pNew ||
+ static_cast < const 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:
+ // mba: it seems that this class intentionally does not call code in base class SwClient
+ if( GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ GetRegisteredInNonConst()->Remove( this );
+ break;
+
+ case RES_FMT_CHG:
+ if( static_cast< const SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ static_cast< const SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
+ GetRegisteredInNonConst()->Remove( this );
+ break;
+
+ default:
+ // mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
+ break;
+ }
+}
+
+void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( GetRegisteredIn() )
+ GetRegisteredInNonConst()->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..551f8b452621
--- /dev/null
+++ b/sw/source/core/access/accframebase.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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
+
+#include <acccontext.hxx>
+
+#include <calbck.hxx>
+
+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();
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+
+ SwAccessibleFrameBase( SwAccessibleMap* pInitMap,
+ sal_Int16 nInitRole,
+ const SwFlyFrm *pFlyFrm );
+
+ virtual sal_Bool HasCursor(); // required by map to remember that object
+
+ 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..66f41e2d7ec1
--- /dev/null
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -0,0 +1,428 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <accfrmobj.hxx>
+
+#include <accmap.hxx>
+#include <acccontext.hxx>
+
+#include <viewsh.hxx>
+#include <rootfrm.hxx>
+#include <flyfrm.hxx>
+#include <pagefrm.hxx>
+#include <cellfrm.hxx>
+#include <swtable.hxx>
+#include <dflyobj.hxx>
+#include <frmfmt.hxx>
+#include <fmtanchr.hxx>
+#include <dcontact.hxx>
+
+#include <vcl/window.hxx>
+
+namespace css = ::com::sun::star;
+
+namespace sw { namespace access {
+
+SwAccessibleChild::SwAccessibleChild()
+ : mpFrm( 0 )
+ , mpDrawObj( 0 )
+ , mpWindow( 0 )
+{}
+
+SwAccessibleChild::SwAccessibleChild( const SdrObject* pDrawObj )
+ : mpFrm( 0 )
+ , mpDrawObj( 0 )
+ , mpWindow( 0 )
+{
+ Init( pDrawObj );
+}
+
+SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm )
+ : mpFrm( 0 )
+ , mpDrawObj( 0 )
+ , mpWindow( 0 )
+{
+ Init( pFrm );
+}
+
+SwAccessibleChild::SwAccessibleChild( Window* pWindow )
+ : mpFrm( 0 )
+ , mpDrawObj( 0 )
+ , mpWindow( 0 )
+{
+ Init( pWindow );
+}
+
+
+SwAccessibleChild::SwAccessibleChild( const SwFrm* pFrm,
+ const SdrObject* pDrawObj,
+ Window* pWindow )
+{
+ if ( pFrm )
+ {
+ Init( pFrm );
+ }
+ else if ( pDrawObj )
+ {
+ Init( pDrawObj );
+ }
+ else if ( pWindow )
+ {
+ Init( pWindow );
+ }
+ ASSERT( (!pFrm || pFrm == mpFrm) &&
+ (!pDrawObj || pDrawObj == mpDrawObj) &&
+ (!pWindow || pWindow == mpWindow),
+ "invalid frame/object/window combination" );
+
+}
+
+void SwAccessibleChild::Init( const SdrObject* pDrawObj )
+{
+ mpDrawObj = pDrawObj;
+ mpFrm = mpDrawObj && mpDrawObj->ISA(SwVirtFlyDrawObj)
+ ? static_cast < const SwVirtFlyDrawObj * >( mpDrawObj )->GetFlyFrm()
+ : 0;
+ mpWindow = 0;
+}
+
+void SwAccessibleChild::Init( const SwFrm* pFrm )
+{
+ mpFrm = pFrm;
+ mpDrawObj = mpFrm && mpFrm->IsFlyFrm()
+ ? static_cast < const SwFlyFrm * >( mpFrm )->GetVirtDrawObj()
+ : 0;
+ mpWindow = 0;
+}
+
+void SwAccessibleChild::Init( Window* pWindow )
+{
+ mpWindow = pWindow;
+ mpFrm = 0;
+ mpDrawObj = 0;
+}
+
+bool SwAccessibleChild::IsAccessible( sal_Bool bPagePreview ) const
+{
+ bool bRet( false );
+
+ if ( mpFrm )
+ {
+ bRet = mpFrm->IsAccessibleFrm() &&
+ ( !mpFrm->IsCellFrm() ||
+ static_cast<const SwCellFrm *>( mpFrm )->GetTabBox()->GetSttNd() != 0 ) &&
+ !mpFrm->IsInCoveredCell() &&
+ ( bPagePreview ||
+ !mpFrm->IsPageFrm() );
+ }
+ else if ( mpDrawObj )
+ {
+ bRet = true;
+ }
+ else if ( mpWindow )
+ {
+ bRet = true;
+ }
+
+ return bRet;
+}
+
+bool SwAccessibleChild::IsBoundAsChar() const
+{
+ bool bRet( false );
+
+ if ( mpFrm )
+ {
+ bRet = mpFrm->IsFlyFrm() &&
+ static_cast< const SwFlyFrm *>(mpFrm)->IsFlyInCntFrm();
+ }
+ else if ( mpDrawObj )
+ {
+ const SwFrmFmt* mpFrmFmt = ::FindFrmFmt( mpDrawObj );
+ bRet = mpFrmFmt
+ ? (FLY_AS_CHAR == mpFrmFmt->GetAnchor().GetAnchorId())
+ : false;
+ }
+ else if ( mpWindow )
+ {
+ bRet = false;
+ }
+
+ return bRet;
+}
+
+SwAccessibleChild::SwAccessibleChild( const SwAccessibleChild& r )
+ : mpFrm( r.mpFrm )
+ , mpDrawObj( r.mpDrawObj )
+ , mpWindow( r.mpWindow )
+{}
+
+SwAccessibleChild& SwAccessibleChild::operator=( const SwAccessibleChild& r )
+{
+ mpDrawObj = r.mpDrawObj;
+ mpFrm = r.mpFrm;
+ mpWindow = r.mpWindow;
+
+ return *this;
+}
+
+SwAccessibleChild& SwAccessibleChild::operator=( const SdrObject* pDrawObj )
+{
+ Init( pDrawObj );
+ return *this;
+}
+
+SwAccessibleChild& SwAccessibleChild::operator=( const SwFrm* pFrm )
+{
+ Init( pFrm );
+ return *this;
+}
+
+SwAccessibleChild& SwAccessibleChild::operator=( Window* pWindow )
+{
+ Init( pWindow );
+ return *this;
+}
+
+bool SwAccessibleChild::operator==( const SwAccessibleChild& r ) const
+{
+ return mpFrm == r.mpFrm &&
+ mpDrawObj == r.mpDrawObj &&
+ mpWindow == r.mpWindow;
+}
+
+bool SwAccessibleChild::IsValid() const
+{
+ return mpFrm != 0 ||
+ mpDrawObj != 0 ||
+ mpWindow != 0;
+}
+
+const SdrObject* SwAccessibleChild::GetDrawObject() const
+{
+ return mpDrawObj;
+}
+
+const SwFrm *SwAccessibleChild::GetSwFrm() const
+{
+ return mpFrm;
+}
+
+Window* SwAccessibleChild::GetWindow() const
+{
+ return mpWindow;
+}
+
+bool SwAccessibleChild::IsVisibleChildrenOnly() const
+{
+ bool bRet( false );
+
+ if ( !mpFrm )
+ {
+ bRet = true;
+ }
+ else
+ {
+ bRet = mpFrm->IsRootFrm() ||
+ !( mpFrm->IsTabFrm() ||
+ mpFrm->IsInTab() ||
+ ( IsBoundAsChar() &&
+ static_cast<const SwFlyFrm*>(mpFrm)->GetAnchorFrm()->IsInTab() ) );
+ }
+
+ return bRet;
+}
+
+SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const
+{
+ SwRect aBox;
+
+ if ( mpFrm )
+ {
+ if ( mpFrm->IsPageFrm() &&
+ static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() )
+ {
+ aBox = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 1, 1 );
+ }
+ else if ( mpFrm->IsTabFrm() )
+ {
+ aBox = SwRect( mpFrm->Frm() );
+ aBox.Intersection( mpFrm->GetUpper()->Frm() );
+ }
+ else
+ {
+ aBox = mpFrm->Frm();
+ }
+ }
+ else if( mpDrawObj )
+ {
+ aBox = SwRect( mpDrawObj->GetCurrentBoundRect() );
+ }
+ else if ( mpWindow )
+ {
+ aBox = SwRect( rAccMap.GetShell()->GetWin()->PixelToLogic(
+ Rectangle( mpWindow->GetPosPixel(),
+ mpWindow->GetSizePixel() ) ) );
+}
+
+ return aBox;
+}
+
+SwRect SwAccessibleChild::GetBounds( const SwAccessibleMap& rAccMap ) const
+{
+ SwRect aBound;
+
+ if( mpFrm )
+ {
+ if( mpFrm->IsPageFrm() &&
+ static_cast< const SwPageFrm * >( mpFrm )->IsEmptyPage() )
+ {
+ aBound = SwRect( mpFrm->Frm().Left(), mpFrm->Frm().Top()-1, 0, 0 );
+ }
+ else
+ aBound = mpFrm->PaintArea();
+ }
+ else if( mpDrawObj )
+ {
+ aBound = GetBox( rAccMap );
+ }
+ else if ( mpWindow )
+ {
+ aBound = GetBox( rAccMap );
+ }
+
+ return aBound;
+}
+
+bool SwAccessibleChild::AlwaysIncludeAsChild() const
+{
+ bool bAlwaysIncludedAsChild( false );
+
+ if ( mpWindow )
+ {
+ bAlwaysIncludedAsChild = true;
+ }
+
+ return bAlwaysIncludedAsChild;
+}
+
+const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const
+{
+ const SwFrm* pParent( 0 );
+
+ if ( mpFrm )
+ {
+ if( mpFrm->IsFlyFrm() )
+ {
+ const SwFlyFrm* pFly = static_cast< const SwFlyFrm *>( mpFrm );
+ if( pFly->IsFlyInCntFrm() )
+ {
+ // For FLY_AS_CHAR the parent is the anchor
+ pParent = pFly->GetAnchorFrm();
+ ASSERT( SwAccessibleChild( pParent ).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 )
+ pParent = pFly->FindPageFrm();
+ else
+ pParent = pFly->getRootFrm();
+ }
+ }
+ else
+ {
+ SwAccessibleChild aUpper( mpFrm->GetUpper() );
+ while( aUpper.GetSwFrm() && !aUpper.IsAccessible(bInPagePreview) )
+ {
+ aUpper = aUpper.GetSwFrm()->GetUpper();
+ }
+ pParent = aUpper.GetSwFrm();
+ }
+ }
+ else if( mpDrawObj )
+ {
+ const SwDrawContact *pContact =
+ static_cast< const SwDrawContact* >( GetUserCall( mpDrawObj ) );
+ ASSERT( pContact, "sdr contact is missing" );
+ if( pContact )
+ {
+ const SwFrmFmt *pFrmFmt = pContact->GetFmt();
+ ASSERT( pFrmFmt, "frame format is missing" );
+ if( pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
+ {
+ // For FLY_AS_CHAR the parent is the anchor
+ pParent = pContact->GetAnchorFrm();
+ ASSERT( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ),
+ "parent is not accessible" );
+
+ }
+ else
+ {
+ // In any other case the parent is the root frm
+ if( bInPagePreview )
+ pParent = pContact->GetAnchorFrm()->FindPageFrm();
+ else
+ pParent = pContact->GetAnchorFrm()->getRootFrm();
+ }
+ }
+ }
+ else if ( mpWindow )
+ {
+ css::uno::Reference < css::accessibility::XAccessible > xAcc =
+ mpWindow->GetAccessible();
+ if ( xAcc.is() )
+ {
+ css::uno::Reference < css::accessibility::XAccessibleContext > xAccContext =
+ xAcc->getAccessibleContext();
+ if ( xAccContext.is() )
+ {
+ css::uno::Reference < css::accessibility::XAccessible > xAccParent =
+ xAccContext->getAccessibleParent();
+ if ( xAccParent.is() )
+ {
+ SwAccessibleContext* pAccParentImpl =
+ dynamic_cast< SwAccessibleContext *>( xAccParent.get() );
+ if ( pAccParentImpl )
+ {
+ pParent = pAccParentImpl->GetFrm();
+ }
+ }
+ }
+ }
+ }
+
+ return pParent;
+}
+
+} } // eof of namespace sw::access
+
diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx
new file mode 100644
index 000000000000..76113c62eae3
--- /dev/null
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <sal/types.h>
+
+class SwAccessibleMap;
+class SwFrm;
+class SdrObject;
+class Window;
+class SwRect;
+
+namespace sw { namespace access {
+
+class SwAccessibleChild
+{
+ public:
+ SwAccessibleChild();
+ explicit SwAccessibleChild( const SdrObject* pDrawObj );
+ explicit SwAccessibleChild( const SwFrm* pFrm );
+ explicit SwAccessibleChild( Window* pWindow );
+ SwAccessibleChild( const SwFrm* pFrm,
+ const SdrObject* pDrawObj,
+ Window* pWindow );
+
+ SwAccessibleChild( const SwAccessibleChild& r );
+ SwAccessibleChild& operator=( const SwAccessibleChild& r );
+
+ SwAccessibleChild& operator=( const SdrObject* pDrawObj );
+ SwAccessibleChild& operator=( const SwFrm* pFrm );
+ SwAccessibleChild& operator=( Window* pWindow );
+
+ bool operator==( const SwAccessibleChild& r ) const;
+
+ bool IsValid() const;
+
+ const SwFrm* GetSwFrm() const;
+ const SdrObject* GetDrawObject() const;
+ Window* GetWindow() const;
+
+ const SwFrm* GetParent( const sal_Bool bInPagePreview ) const;
+
+ bool IsAccessible( sal_Bool bPagePreview ) const;
+ bool IsBoundAsChar() const;
+
+ bool IsVisibleChildrenOnly() const;
+ SwRect GetBox( const SwAccessibleMap& rAccMap ) const;
+ SwRect GetBounds( const SwAccessibleMap& rAccMap ) const;
+
+ /** indicating, if accessible child is included even, if the corresponding
+ object is not visible.
+
+ @author OD
+ */
+ bool AlwaysIncludeAsChild() const;
+
+ private:
+ const SwFrm* mpFrm;
+ const SdrObject* mpDrawObj;
+ Window* mpWindow;
+
+ void Init( const SdrObject* pDrawObj );
+ void Init( const SwFrm* pFrm );
+ void Init( Window* pWindow );
+};
+
+
+} } // eof of namespace sw::access
+
+#endif
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
new file mode 100644
index 000000000000..11834ee89963
--- /dev/null
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -0,0 +1,168 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <accfrmobjmap.hxx>
+#include <accframe.hxx>
+#include <accmap.hxx>
+#include <acccontext.hxx>
+
+#include <viewsh.hxx>
+#include <doc.hxx>
+#include <frmfmt.hxx>
+#include <pagefrm.hxx>
+#include <txtfrm.hxx>
+#include <node.hxx>
+#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
+
+#include <svx/svdobj.hxx>
+
+using namespace sw::access;
+
+SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ SwAccessibleMap& rAccMap )
+ : nHellId( rAccMap.GetShell()->GetDoc()->GetHellId() )
+ , nControlsId( rAccMap.GetShell()->GetDoc()->GetControlsId() )
+{
+ const bool bVisibleChildrenOnly = SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly();
+
+ sal_uInt32 nPos = 0;
+ SwAccessibleChild aLower( rFrm.GetLower() );
+ while( aLower.GetSwFrm() )
+ {
+ if ( !bVisibleChildrenOnly ||
+ aLower.AlwaysIncludeAsChild() ||
+ aLower.GetBox( rAccMap ).IsOver( rVisArea ) )
+ {
+ insert( nPos++, SwAccessibleChildMapKey::TEXT, aLower );
+ }
+
+ aLower = aLower.GetSwFrm()->GetNext();
+ }
+
+ if ( rFrm.IsPageFrm() )
+ {
+ ASSERT( bVisibleChildrenOnly, "page frame within tab frame???" );
+ const SwPageFrm *pPgFrm =
+ static_cast< const SwPageFrm * >( &rFrm );
+ const SwSortedObjs *pObjs = pPgFrm->GetSortedObjs();
+ if ( pObjs )
+ {
+ for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
+ {
+ aLower = (*pObjs)[i]->GetDrawObj();
+ if ( aLower.GetBox( rAccMap ).IsOver( rVisArea ) )
+ {
+ insert( aLower.GetDrawObject(), aLower );
+ }
+ }
+ }
+ }
+ else if( rFrm.IsTxtFrm() )
+ {
+ const SwSortedObjs *pObjs = rFrm.GetDrawObjs();
+ if ( pObjs )
+ {
+ for( sal_uInt16 i=0; i<pObjs->Count(); i++ )
+ {
+ aLower = (*pObjs)[i]->GetDrawObj();
+ if ( aLower.IsBoundAsChar() &&
+ ( !bVisibleChildrenOnly ||
+ aLower.AlwaysIncludeAsChild() ||
+ aLower.GetBox( rAccMap ).IsOver( rVisArea ) ) )
+ {
+ insert( aLower.GetDrawObject(), aLower );
+ }
+ }
+ }
+
+ {
+ ::vos::ORef < SwAccessibleContext > xAccImpl =
+ rAccMap.GetContextImpl( &rFrm, sal_False );
+ if( xAccImpl.isValid() )
+ {
+ SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr();
+ if ( pAccImpl &&
+ pAccImpl->HasAdditionalAccessibleChildren() )
+ {
+ std::vector< Window* >* pAdditionalChildren =
+ new std::vector< Window* >();
+ pAccImpl->GetAdditionalAccessibleChildren( pAdditionalChildren );
+
+ sal_Int32 nCounter( 0 );
+ for ( std::vector< Window* >::iterator aIter = pAdditionalChildren->begin();
+ aIter != pAdditionalChildren->end();
+ ++aIter )
+ {
+ aLower = (*aIter);
+ insert( ++nCounter, SwAccessibleChildMapKey::XWINDOW, aLower );
+ }
+
+ delete pAdditionalChildren;
+ }
+ }
+ }
+ }
+}
+
+::std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert(
+ const sal_uInt32 nPos,
+ const SwAccessibleChildMapKey::LayerId eLayerId,
+ const SwAccessibleChild& rLower )
+{
+ SwAccessibleChildMapKey aKey( eLayerId, nPos );
+ value_type aEntry( aKey, rLower );
+ return _SwAccessibleChildMap::insert( aEntry );
+}
+
+::std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert(
+ const SdrObject *pObj,
+ const SwAccessibleChild& rLower )
+{
+ const SdrLayerID nLayer = pObj->GetLayer();
+ SwAccessibleChildMapKey::LayerId eLayerId =
+ (nHellId == nLayer)
+ ? SwAccessibleChildMapKey::HELL
+ : ( (nControlsId == nLayer)
+ ? SwAccessibleChildMapKey::CONTROLS
+ : SwAccessibleChildMapKey::HEAVEN );
+ SwAccessibleChildMapKey aKey( eLayerId, pObj->GetOrdNum() );
+ value_type aEntry( aKey, rLower );
+ return _SwAccessibleChildMap::insert( aEntry );
+}
+
+/* static */ sal_Bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm )
+{
+ return ( rFrm.IsPageFrm() &&
+ static_cast< const SwPageFrm& >( rFrm ).GetSortedObjs() ) ||
+ ( rFrm.IsTxtFrm() &&
+ rFrm.GetDrawObjs() );
+}
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
new file mode 100644
index 000000000000..91365ed9c258
--- /dev/null
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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 <svx/svdtypes.hxx>
+
+#include <map>
+
+class SwAccessibleMap;
+class SwDoc;
+class SwRect;
+class SwFrm;
+class SdrObject;
+
+class SwAccessibleChildMapKey
+{
+public:
+ enum LayerId { INVALID, HELL, TEXT, HEAVEN, CONTROLS, XWINDOW };
+
+ inline SwAccessibleChildMapKey()
+ : eLayerId( INVALID )
+ , nOrdNum( 0 )
+ {}
+
+ inline SwAccessibleChildMapKey( LayerId eId, sal_uInt32 nOrd )
+ : eLayerId( eId )
+ , nOrdNum( nOrd )
+ {}
+
+ inline bool operator()( const SwAccessibleChildMapKey& r1,
+ const SwAccessibleChildMapKey& r2 ) const
+ {
+ return (r1.eLayerId == r2.eLayerId)
+ ? (r1.nOrdNum < r2.nOrdNum)
+ : (r1.eLayerId < r2.eLayerId);
+ }
+
+private:
+
+ LayerId eLayerId;
+ sal_uInt32 nOrdNum;
+
+};
+
+typedef ::std::map < SwAccessibleChildMapKey, sw::access::SwAccessibleChild, SwAccessibleChildMapKey >
+ _SwAccessibleChildMap;
+
+class SwAccessibleChildMap : public _SwAccessibleChildMap
+{
+ const SdrLayerID nHellId;
+ const SdrLayerID nControlsId;
+
+ ::std::pair< iterator, bool > insert( const sal_uInt32 nPos,
+ const SwAccessibleChildMapKey::LayerId eLayerId,
+ const sw::access::SwAccessibleChild& rLower );
+ ::std::pair< iterator, bool > insert( const SdrObject* pObj,
+ const sw::access::SwAccessibleChild& rLower );
+
+public:
+
+ SwAccessibleChildMap( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ SwAccessibleMap& rAccMap );
+
+ static sal_Bool IsSortingRequired( const SwFrm& rFrm );
+};
+
+#endif
+
diff --git a/sw/source/core/access/accfrmobjslist.cxx b/sw/source/core/access/accfrmobjslist.cxx
new file mode 100644
index 000000000000..2f3e8399187a
--- /dev/null
+++ b/sw/source/core/access/accfrmobjslist.cxx
@@ -0,0 +1,173 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <accfrmobjslist.hxx>
+#include <accmap.hxx>
+#include <acccontext.hxx>
+
+#include <pagefrm.hxx>
+#include <sortedobjs.hxx>
+#include <anchoredobject.hxx>
+
+using namespace ::sw::access;
+
+SwAccessibleChildSList_const_iterator::SwAccessibleChildSList_const_iterator(
+ const SwAccessibleChildSList& rLst,
+ SwAccessibleMap& rAccMap )
+ : rList( rLst ),
+ aCurr( rList.GetFrm().GetLower() ),
+ nNextObj( 0 )
+{
+ if( !aCurr.GetSwFrm() )
+ {
+ const SwFrm& rFrm = rList.GetFrm();
+ if( rFrm.IsPageFrm() )
+ {
+ const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm );
+ const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs();
+ if( pObjs && pObjs->Count() )
+ {
+ aCurr = (*pObjs)[nNextObj++]->GetDrawObj();
+ }
+ }
+ else if( rFrm.IsTxtFrm() )
+ {
+ const SwSortedObjs *pObjs = rFrm.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 ( !aCurr.IsValid() )
+ {
+ ::vos::ORef < SwAccessibleContext > xAccImpl =
+ rAccMap.GetContextImpl( &rFrm, sal_False );
+ if( xAccImpl.isValid() )
+ {
+ SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr();
+ aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( 0 ) );
+ ++nNextObj;
+ }
+ }
+ }
+ }
+
+ if( rList.IsVisibleChildrenOnly() )
+ {
+ // Find the first visible
+ while( aCurr.IsValid() &&
+ !aCurr.AlwaysIncludeAsChild() &&
+ !aCurr.GetBox( rAccMap ).IsOver( rList.GetVisArea() ) )
+ {
+ next();
+ }
+ }
+}
+
+SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next()
+{
+ bool bNextTaken( true );
+ if( aCurr.GetDrawObject() || aCurr.GetWindow() )
+ {
+ bNextTaken = false;
+ }
+ else if( aCurr.GetSwFrm() )
+ {
+ aCurr = aCurr.GetSwFrm()->GetNext();
+ if( !aCurr.GetSwFrm() )
+ {
+ bNextTaken = false;
+ }
+ }
+
+ if( !bNextTaken )
+ {
+ const SwFrm& rFrm = rList.GetFrm();
+ if( rFrm.IsPageFrm() )
+ {
+ const SwPageFrm& rPgFrm = static_cast< const SwPageFrm& >( rFrm );
+ const SwSortedObjs *pObjs = rPgFrm.GetSortedObjs();
+ aCurr = ( pObjs && nNextObj < pObjs->Count() )
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+ }
+ else if( rFrm.IsTxtFrm() )
+ {
+ const SwSortedObjs* pObjs = rFrm.GetDrawObjs();
+ const sal_uInt32 nObjsCount = pObjs ? pObjs->Count() : 0;
+ aCurr = ( pObjs && nNextObj < nObjsCount )
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+ while( aCurr.IsValid() && !aCurr.IsBoundAsChar() )
+ {
+ aCurr = ( nNextObj < nObjsCount )
+ ? (*pObjs)[nNextObj++]->GetDrawObj()
+ : static_cast< const SdrObject *>( 0 );
+ }
+ if ( !aCurr.IsValid() )
+ {
+ ::vos::ORef < SwAccessibleContext > xAccImpl =
+ rList.GetAccMap().GetContextImpl( &rFrm, sal_False );
+ if( xAccImpl.isValid() )
+ {
+ SwAccessibleContext* pAccImpl = xAccImpl.getBodyPtr();
+ aCurr = SwAccessibleChild( pAccImpl->GetAdditionalAccessibleChild( nNextObj - nObjsCount ) );
+ ++nNextObj;
+ }
+ }
+ }
+ }
+
+ return *this;
+}
+
+SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::next_visible()
+{
+ next();
+ while( aCurr.IsValid() &&
+ !aCurr.AlwaysIncludeAsChild() &&
+ !aCurr.GetBox( rList.GetAccMap() ).IsOver( rList.GetVisArea() ) )
+ {
+ next();
+ }
+
+ return *this;
+}
+
+SwAccessibleChildSList_const_iterator& SwAccessibleChildSList_const_iterator::operator++()
+{
+ return rList.IsVisibleChildrenOnly() ? next_visible() : next();
+}
+
diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx
new file mode 100644
index 000000000000..f81cfc85a9d7
--- /dev/null
+++ b/sw/source/core/access/accfrmobjslist.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCFRMOBJSLIST_HXX
+#define _ACCFRMOBJSLIST_HXX
+
+#include <accfrmobj.hxx>
+#include <swrect.hxx>
+
+class SwAccessibleMap;
+
+class SwAccessibleChildSList;
+
+class SwAccessibleChildSList_const_iterator
+{
+private:
+ friend class SwAccessibleChildSList;
+
+ const SwAccessibleChildSList& rList; // The frame we are iterating over
+ sw::access::SwAccessibleChild aCurr; // The current object
+ sal_uInt16 nNextObj; // The index of the current sdr object
+
+ inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst )
+ : rList( rLst )
+ , nNextObj( 0 )
+ {}
+
+ SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst,
+ SwAccessibleMap& rAccMap );
+
+ SwAccessibleChildSList_const_iterator& next();
+ SwAccessibleChildSList_const_iterator& next_visible();
+
+public:
+
+ inline SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList_const_iterator& rIter )
+ : rList( rIter.rList )
+ , aCurr( rIter.aCurr )
+ , nNextObj( rIter.nNextObj )
+ {}
+
+ inline sal_Bool operator==( const SwAccessibleChildSList_const_iterator& r ) const
+ {
+ return aCurr == r.aCurr;
+ }
+
+ inline sal_Bool operator!=(
+ const SwAccessibleChildSList_const_iterator& r ) const
+ {
+ return !(*this == r);
+ }
+
+ SwAccessibleChildSList_const_iterator& operator++();
+
+ inline const sw::access::SwAccessibleChild& operator*() const
+ {
+ return aCurr;
+ }
+};
+
+// An iterator to iterate over a frame's child in any order
+class SwAccessibleChildSList
+{
+ const SwRect maVisArea;
+ const SwFrm& mrFrm;
+ const sal_Bool mbVisibleChildrenOnly;
+ SwAccessibleMap& mrAccMap;
+
+public:
+
+ typedef SwAccessibleChildSList_const_iterator const_iterator;
+
+ inline SwAccessibleChildSList( const SwFrm& rFrm,
+ SwAccessibleMap& rAccMap )
+ : maVisArea()
+ , mrFrm( rFrm )
+ , mbVisibleChildrenOnly( sal_False )
+ , mrAccMap( rAccMap )
+ {}
+
+ inline SwAccessibleChildSList( const SwRect& rVisArea,
+ const SwFrm& rFrm,
+ SwAccessibleMap& rAccMap )
+ : maVisArea( rVisArea )
+ , mrFrm( rFrm )
+ , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrm ).IsVisibleChildrenOnly() )
+ , mrAccMap( rAccMap )
+ {
+ }
+
+ inline const_iterator begin() const
+ {
+ return SwAccessibleChildSList_const_iterator( *this, mrAccMap );
+ }
+
+ inline const_iterator end() const
+ {
+ return SwAccessibleChildSList_const_iterator( *this );
+ }
+
+ inline const SwFrm& GetFrm() const
+ {
+ return mrFrm;
+ }
+
+ inline sal_Bool IsVisibleChildrenOnly() const
+ {
+ return mbVisibleChildrenOnly;
+ }
+
+ inline const SwRect& GetVisArea() const
+ {
+ return maVisArea;
+ }
+
+ inline SwAccessibleMap& GetAccMap() const
+ {
+ return mrAccMap;
+ }
+};
+
+#endif
diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx
new file mode 100644
index 000000000000..40888f4b3738
--- /dev/null
+++ b/sw/source/core/access/accgraphic.cxx
@@ -0,0 +1,97 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..aa64ee0df7e1
--- /dev/null
+++ b/sw/source/core/access/accgraphic.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _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..dada1083c810
--- /dev/null
+++ b/sw/source/core/access/accheaderfooter.cxx
@@ -0,0 +1,145 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// 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..8a0bbb84b6e5
--- /dev/null
+++ b/sw/source/core/access/accheaderfooter.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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..6d252488c792
--- /dev/null
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -0,0 +1,190 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..ed81feb9deb3
--- /dev/null
+++ b/sw/source/core/access/acchyperlink.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..5a6193489255
--- /dev/null
+++ b/sw/source/core/access/acchypertextdata.cxx
@@ -0,0 +1,55 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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..fde1809fef1b
--- /dev/null
+++ b/sw/source/core/access/acchypertextdata.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..6684354ef7ac
--- /dev/null
+++ b/sw/source/core/access/accmap.cxx
@@ -0,0 +1,2878 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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>
+#include <acccontext.hxx>
+#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 <flyfrm.hxx>
+#include <ndtyp.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#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>
+#include <pagepreviewlayout.hxx>
+#include <pam.hxx>
+#include <ndtxt.hxx>
+#include <dflyobj.hxx>
+#include <prevwpage.hxx>
+#include <switerator.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+using namespace ::sw::access;
+
+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:
+
+#ifdef DBG_UTIL
+ sal_Bool mbLocked;
+#endif
+
+ SwAccessibleContextMap_Impl()
+#ifdef DBG_UTIL
+ : 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:
+
+#ifdef DBG_UTIL
+ sal_Bool mbLocked;
+#endif
+ SwAccessibleShapeMap_Impl( SwAccessibleMap *pMap )
+#ifdef DBG_UTIL
+ : 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
+ SwAccessibleChild 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 SwAccessibleChild& rFrmOrObj )
+ : mxAcc( pA ),
+ maFrmOrObj( rFrmOrObj ),
+ meType( eT ),
+ mnStates( 0 )
+ {}
+
+ SwAccessibleEvent_Impl( EventType eT,
+ const SwAccessibleChild& 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 SwAccessibleChild& 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 SwAccessibleChild& 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 SwAccessibleChild& 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 SwAccessibleChildFunc
+{
+ sal_Bool operator()( const SwAccessibleChild& r1,
+ const SwAccessibleChild& r2 ) const
+ {
+ const void *p1 = r1.GetSwFrm()
+ ? static_cast < const void * >( r1.GetSwFrm())
+ : ( r1.GetDrawObject()
+ ? static_cast < const void * >( r1.GetDrawObject() )
+ : static_cast < const void * >( r1.GetWindow() ) );
+ const void *p2 = r2.GetSwFrm()
+ ? static_cast < const void * >( r2.GetSwFrm())
+ : ( r2.GetDrawObject()
+ ? static_cast < const void * >( r2.GetDrawObject() )
+ : static_cast < const void * >( r2.GetWindow() ) );
+ return p1 < p2;
+ }
+};
+typedef ::std::map < SwAccessibleChild, SwAccessibleEventList_Impl::iterator,
+ SwAccessibleChildFunc > _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
+{};
+// <--
+
+// 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 SwAccessibleMap& rAccMap,
+ 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 );
+};
+
+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 SwAccessibleMap& rAccMap,
+ 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();
+ SwAccessibleChild 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( rAccMap ) );
+ 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 );
+}
+
+//------------------------------------------------------------------------------
+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,
+ SwAccessibleChild(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 )
+ {
+ const SwFrm* pParent = SwAccessibleFrame::GetParent(
+ SwAccessibleChild( pShape->first ),
+ GetShell()->IsPreView() );
+ aParents.push_back( pParent );
+ }
+ }
+
+ --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 );
+#ifdef DBG_UTIL
+ 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 );
+#ifdef DBG_UTIL
+ 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;
+#ifdef DBG_UTIL
+ mpFrmMap->mbLocked = sal_False;
+#endif
+ }
+
+#ifdef DBG_UTIL
+ 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 );
+ }
+ }
+
+#ifdef DBG_UTIL
+ 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( *this, _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,
+ Window* pWindow,
+ sal_Bool bRecursive )
+{
+ SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow );
+
+ // 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" );
+
+ if( aFrmOrObj.IsAccessible( GetShell()->IsPreView() ) )
+ {
+ ::vos::ORef< SwAccessibleContext > xAccImpl;
+ ::vos::ORef< SwAccessibleContext > xParentAccImpl;
+ ::vos::ORef< ::accessibility::AccessibleShape > xShapeAccImpl;
+ // 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.GetDrawObject() );
+ 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.GetDrawObject() );
+ xShapeAccImpl->dispose();
+ }
+
+ if( mpPreview && pFrm && pFrm->IsPageFrm() )
+ mpPreview->DisposePage( static_cast< const SwPageFrm *>( pFrm ) );
+ }
+}
+
+void SwAccessibleMap::InvalidatePosOrSize( const SwFrm *pFrm,
+ const SdrObject *pObj,
+ Window* pWindow,
+ const SwRect& rOldBox )
+{
+ SwAccessibleChild aFrmOrObj( pFrm, pObj, pWindow );
+ 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 )
+{
+ SwAccessibleChild 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 )
+{
+ SwAccessibleChild 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 )
+{
+ SwAccessibleChild 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
+ SwAccessibleChild 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,
+ SwAccessibleChild(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
+ SwAccessibleChild 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, SwAccessibleChild(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
+ SwAccessibleChild 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,
+ SwAccessibleChild( &_rTxtFrm ),
+ ACC_STATE_TEXT_SELECTION_CHANGED );
+ AppendEvent( aEvent );
+ }
+ else
+ {
+ FireEvents();
+ pAccImpl->InvalidateTextSelection();
+ }
+ }
+ }
+}
+
+sal_Int32 SwAccessibleMap::GetChildIndex( const SwFrm& rParentFrm,
+ Window& rChild ) const
+{
+ sal_Int32 nIndex( -1 );
+
+ SwAccessibleChild aFrmOrObj( &rParentFrm );
+ 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() );
+
+ nIndex = pAccImpl->GetChildIndex( const_cast<SwAccessibleMap&>(*this),
+ SwAccessibleChild( &rChild ) );
+ }
+ }
+
+ return nIndex;
+}
+
+
+// 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( *this, _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, 0 );
+
+ {
+ 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, 0, 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( sal_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.
+ SwIterator<SwTxtFrm,SwTxtNode> aIter( *pTxtNode );
+ for( SwTxtFrm* pTxtFrm = aIter.First(); pTxtFrm; pTxtFrm = aIter.Next() )
+ {
+ 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;
+ }
+}
+
+const SwRect& SwAccessibleMap::GetVisArea() const
+{
+ DBG_ASSERT( !GetShell()->IsPreView() || (mpPreview != NULL),
+ "preview without preview data?" );
+
+ return GetShell()->IsPreView()
+ ? mpPreview->GetVisArea()
+ : GetShell()->VisArea();
+}
+
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
new file mode 100644
index 000000000000..8764feff8d74
--- /dev/null
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -0,0 +1,275 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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( const SfxPoolItem* pOld, const 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<const SwStringMsgPoolItem*>(pOld)->GetString() );
+ const String& sNewTitle(
+ dynamic_cast<const 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() )
+ GetRegisteredIn()->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..e07d9ff0ffc0
--- /dev/null
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#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;
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+
+ SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap,
+ sal_Int16 nInitRole,
+ const SwFlyFrm *pFlyFrm );
+
+ //===== 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..d5feca2e0ba9
--- /dev/null
+++ b/sw/source/core/access/accpage.cxx
@@ -0,0 +1,200 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 )
+ , bIsSelected( sal_False )
+{
+ 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..f8972060ecb3
--- /dev/null
+++ b/sw/source/core/access/accpage.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public 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..ec8ab7a7c703
--- /dev/null
+++ b/sw/source/core/access/accpara.cxx
@@ -0,0 +1,2678 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <flyfrm.hxx>
+#include <ndtxt.hxx>
+#include <pam.hxx>
+#include <unotextrange.hxx>
+#include <unocrsrhelper.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>
+#include <access.hrc>
+#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>
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <comphelper/accessibletexthelper.hxx>
+#include <unomap.hxx>
+#include <unoprnms.hxx>
+#include <com/sun/star/text/WritingMode2.hpp>
+#include <editeng/brshitem.hxx>
+#include <viewimp.hxx>
+#include <boost/scoped_ptr.hpp>
+#include <textmarkuphelper.hxx>
+// --> OD 2010-02-22 #i10825#
+#include <parachangetrackinginfo.hxx>
+#include <com/sun/star/text/TextMarkupType.hpp>
+// <--
+// --> OD 2010-03-08 #i92233#
+#include <comphelper/stlunosequence.hxx>
+// <--
+
+#include <algorithm>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+
+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;
+}
+
+::rtl::OUString SwAccessibleParagraph::GetString()
+{
+ return GetPortionData().GetAccessibleString();
+}
+
+::rtl::OUString SwAccessibleParagraph::GetDescription()
+{
+ // --> OD 2004-09-29 #117933# - provide empty description for paragraphs
+ return ::rtl::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
+ sal_uInt16 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();
+ sal_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();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
+ SwPosition* pEnd = pCrsr->End();
+ sal_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
+ sal_uInt16 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
+ sal_uInt16 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( sal_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 )
+{
+ ::rtl::OUString sOldText( GetString() );
+
+ ClearPortionData();
+
+ const ::rtl::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 )
+ {
+ ::rtl::OUString sNewDesc( GetDescription() );
+ ::rtl::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& rInitMap,
+ const SwTxtFrm& rTxtFrm )
+ // --> OD 2010-02-24 #i108125#
+ : SwClient( const_cast<SwTxtNode*>(rTxtFrm.GetTxtNode()) )
+ // <--
+ , SwAccessibleContext( &rInitMap, AccessibleRole::PARAGRAPH, &rTxtFrm )
+ , sDesc()
+ , pPortionData( NULL )
+ , pHyperTextData( NULL )
+ , nOldCaretPos( -1 )
+ , bIsHeading( sal_False )
+ , aSelectionHelper( *this )
+ // --> OD 2010-02-19 #i108125#
+ , mpParaChangeTrackInfo( new SwParaChangeTrackingInfo( rTxtFrm ) )
+ // <--
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ bIsHeading = IsHeading();
+ // --> OD 2004-09-27 #117970# - set an empty accessibility name for paragraphs
+ SetName( ::rtl::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;
+ // --> OD 2010-02-22 #i108125#
+ delete mpParaChangeTrackInfo;
+ // <--
+}
+
+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( sal_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" );
+
+ sal_uInt16 nStart = GetPortionData().GetModelPosition( nStartIndex );
+ sal_uInt16 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(
+ i18n::Boundary& rBound,
+ const ::rtl::OUString&,
+ sal_Int32 nPos )
+{
+ rBound.startPos = nPos;
+ rBound.endPos = nPos+1;
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetWordBoundary(
+ i18n::Boundary& rBound,
+ const ::rtl::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
+ sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
+ lang::Locale aLocale = pBreakIt->GetLocale(
+ GetTxtNode()->GetLang( nModelPos ) );
+
+ // which type of word are we interested in?
+ // (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.)
+ const sal_uInt16 nWordType = i18n::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(
+ i18n::Boundary& rBound,
+ const ::rtl::OUString&,
+ sal_Int32 nPos )
+{
+ GetPortionData().GetSentenceBoundary( rBound, nPos );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetLineBoundary(
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
+ sal_Int32 nPos )
+{
+ if( rText.getLength() == nPos )
+ GetPortionData().GetLastLineBoundary( rBound );
+ else
+ GetPortionData().GetLineBoundary( rBound, nPos );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetParagraphBoundary(
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
+ sal_Int32 )
+{
+ rBound.startPos = 0;
+ rBound.endPos = rText.getLength();
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetAttributeBoundary(
+ i18n::Boundary& rBound,
+ const ::rtl::OUString&,
+ sal_Int32 nPos )
+{
+ GetPortionData().GetAttributeBoundary( rBound, nPos );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
+ i18n::Boundary& rBound,
+ const ::rtl::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
+ sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
+ lang::Locale aLocale = pBreakIt->GetLocale(
+ GetTxtNode()->GetLang( nModelPos ) );
+
+ // get word boundary, as the Break-Iterator sees fit.
+ const sal_uInt16 nIterMode = i18n::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(
+ i18n::Boundary& rBound,
+ const ::rtl::OUString& rText,
+ sal_Int32 nPos,
+ sal_Int16 nTextType )
+ throw (
+ lang::IndexOutOfBoundsException,
+ lang::IllegalArgumentException,
+ uno::RuntimeException)
+{
+ // error checking
+ if( !( AccessibleTextType::LINE == nTextType
+ ? IsValidPosition( nPos, rText.getLength() )
+ : IsValidChar( nPos, rText.getLength() ) ) )
+ throw lang::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 lang::IllegalArgumentException( );
+ }
+
+ return bRet;
+}
+
+::rtl::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;
+}
+
+lang::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();
+ lang::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();
+}
+// <--
+
+::rtl::OUString SAL_CALL SwAccessibleParagraph::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return ::rtl::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 );
+}
+
+uno::Sequence< ::rtl::OUString > SAL_CALL SwAccessibleParagraph::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< ::rtl::OUString > aRet(2);
+ ::rtl::OUString* pArray = aRet.getArray();
+ pArray[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(sServiceName) );
+ pArray[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(sAccessibleServiceName) );
+ return aRet;
+}
+
+//
+//===== XInterface =======================================================
+//
+
+uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType )
+ throw (uno::RuntimeException)
+{
+ uno::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 ====================================================
+uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno::RuntimeException)
+{
+ uno::Sequence< uno::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 );
+
+ uno::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;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleParagraph::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;
+}
+
+
+//
+//===== XAccesibleText ===================================================
+//
+
+sal_Int32 SwAccessibleParagraph::getCaretPosition()
+ throw (uno::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 (lang::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 lang::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 (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ ::rtl::OUString sText( GetString() );
+
+ // return character (if valid)
+ if( IsValidChar(nIndex, sText.getLength() ) )
+ {
+ return sText.getStr()[nIndex];
+ }
+ else
+ throw lang::IndexOutOfBoundsException();
+}
+
+// --> OD 2006-07-20 #i63870#
+// re-implement method on behalf of methods <_getDefaultAttributesImpl(..)> and
+// <_getRunAttributesImpl(..)>
+uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
+ sal_Int32 nIndex,
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ const ::rtl::OUString& rText = GetString();
+
+ if( ! IsValidChar( nIndex, rText.getLength() ) )
+ throw lang::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
+ uno::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 )
+ {
+ uno::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 ::rtl::OUString sParaStyleName =
+ ::rtl::OUString::createFromAscii(
+ GetPropName( UNO_NAME_PARA_STYLE_NAME ).pName );
+ if ( aDefAttrSeq.find( sParaStyleName ) == aDefAttrSeq.end() )
+ {
+ PropertyValue rPropVal;
+ rPropVal.Name = sParaStyleName;
+ uno::Any aVal( uno::makeAny( ::rtl::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 ::rtl::OUString sWritingMode =
+ ::rtl::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 ::rtl::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;
+ }
+ }
+ }
+}
+
+uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ tAccParaPropValMap aDefAttrSeq;
+ _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq );
+
+ // --> OD 2010-03-08 #i92233#
+ static rtl::OUString sMMToPixelRatio( rtl::OUString::createFromAscii( "MMToPixelRatio" ) );
+ bool bProvideMMToPixelRatio( false );
+ {
+ if ( aRequestedAttributes.getLength() == 0 )
+ {
+ bProvideMMToPixelRatio = true;
+ }
+ else
+ {
+ const rtl::OUString* aRequestedAttrIter =
+ ::std::find( ::comphelper::stl_begin( aRequestedAttributes ),
+ ::comphelper::stl_end( aRequestedAttributes ),
+ sMMToPixelRatio );
+ if ( aRequestedAttrIter != ::comphelper::stl_end( aRequestedAttributes ) )
+ {
+ bProvideMMToPixelRatio = true;
+ }
+ }
+ }
+ // <--
+
+ uno::Sequence< PropertyValue > aValues( aDefAttrSeq.size() +
+ ( bProvideMMToPixelRatio ? 1 : 0 ) );
+ PropertyValue* pValues = aValues.getArray();
+ sal_Int32 i = 0;
+ for ( tAccParaPropValMap::const_iterator aIter = aDefAttrSeq.begin();
+ aIter != aDefAttrSeq.end();
+ ++aIter )
+ {
+ pValues[i] = aIter->second;
+ ++i;
+ }
+
+ // --> OD 2010-03-08 #i92233#
+ if ( bProvideMMToPixelRatio )
+ {
+ PropertyValue rPropVal;
+ rPropVal.Name = sMMToPixelRatio;
+ const Size a100thMMSize( 1000, 1000 );
+ const Size aPixelSize = GetMap()->LogicToPixel( a100thMMSize );
+ const float fRatio = ((float)a100thMMSize.Width()/100)/aPixelSize.Width();
+ rPropVal.Value = uno::makeAny( fRatio );
+ rPropVal.Handle = -1;
+ rPropVal.State = beans::PropertyState_DEFAULT_VALUE;
+ pValues[ aValues.getLength() - 1 ] = rPropVal;
+ }
+ // <--
+
+ return aValues;
+}
+
+void SwAccessibleParagraph::_getRunAttributesImpl(
+ const sal_Int32 nIndex,
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
+ tAccParaPropValMap& rRunAttrSeq )
+{
+ // create PaM for character at position <nIndex>
+ SwPaM* pPaM( 0 );
+ {
+ const SwTxtNode* pTxtNode( GetTxtNode() );
+ SwPosition* pStartPos = new SwPosition( *pTxtNode );
+ pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex) );
+ SwPosition* pEndPos = new SwPosition( *pTxtNode );
+ pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex+1) );
+
+ pPaM = new SwPaM( *pStartPos, *pEndPos );
+
+ delete pStartPos;
+ delete pEndPos;
+ }
+
+ // retrieve character attributes for the created PaM <pPaM>
+ SfxItemSet aSet( pPaM->GetDoc()->GetAttrPool(),
+ RES_CHRATR_BEGIN, RES_CHRATR_END -1,
+ 0 );
+ // --> OD 2007-11-12 #i82637#
+ // From the perspective of the a11y API the character attributes, which
+ // are set at the automatic paragraph style of the paragraph are treated
+ // as run attributes.
+// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True );
+ // get character attributes from automatic paragraph style and merge these into <aSet>
+ {
+ const SwTxtNode* pTxtNode( GetTxtNode() );
+ if ( pTxtNode->HasSwAttrSet() )
+ {
+ SfxItemSet aAutomaticParaStyleCharAttrs( pPaM->GetDoc()->GetAttrPool(),
+ RES_CHRATR_BEGIN, RES_CHRATR_END -1,
+ 0 );
+ aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), sal_False );
+ aSet.Put( aAutomaticParaStyleCharAttrs );
+ }
+ }
+ // get character attributes at <pPaM> and merge these into <aSet>
+ {
+ SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(),
+ RES_CHRATR_BEGIN, RES_CHRATR_END -1,
+ 0 );
+ SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, sal_True, sal_True);
+ aSet.Put( aCharAttrsAtPaM );
+ }
+ // <--
+
+ // build-up sequence containing the run attributes <rRunAttrSeq>
+ {
+ tAccParaPropValMap aRunAttrSeq;
+ {
+ // --> OD 2007-11-12 #i82637#
+ tAccParaPropValMap aDefAttrSeq;
+ uno::Sequence< ::rtl::OUString > aDummy;
+ _getDefaultAttributesImpl( aDummy, aDefAttrSeq, true );
+ // <--
+
+ 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( 0 );
+ // --> OD 2007-11-12 #i82637#
+ // Found character attributes, whose value equals the value of
+ // the corresponding default character attributes, are excluded.
+ if ( aSet.GetItemState( aPropIt->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
+ {
+ uno::Any aVal;
+ pItem->QueryValue( aVal, aPropIt->nMemberId );
+
+ PropertyValue rPropVal;
+ rPropVal.Name = aPropIt->sName;
+ rPropVal.Value = aVal;
+ rPropVal.Handle = -1;
+ rPropVal.State = PropertyState_DIRECT_VALUE;
+
+ tAccParaPropValMap::const_iterator aDefIter =
+ aDefAttrSeq.find( rPropVal.Name );
+ if ( aDefIter == aDefAttrSeq.end() ||
+ rPropVal.Value != aDefIter->second.Value )
+ {
+ aRunAttrSeq[rPropVal.Name] = rPropVal;
+ }
+ }
+
+ ++aPropIt;
+ }
+ }
+
+ if ( aRequestedAttributes.getLength() == 0 )
+ {
+ rRunAttrSeq = aRunAttrSeq;
+ }
+ else
+ {
+ const ::rtl::OUString* pReqAttrs = aRequestedAttributes.getConstArray();
+ const sal_Int32 nLength = aRequestedAttributes.getLength();
+ for( sal_Int32 i = 0; i < nLength; ++i )
+ {
+ tAccParaPropValMap::iterator aIter = aRunAttrSeq.find( pReqAttrs[i] );
+ if ( aIter != aRunAttrSeq.end() )
+ {
+ rRunAttrSeq[ (*aIter).first ] = (*aIter).second;
+ }
+ }
+ }
+ }
+
+ delete pPaM;
+}
+
+uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(
+ sal_Int32 nIndex,
+ const uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ {
+ const ::rtl::OUString& rText = GetString();
+ if ( !IsValidChar( nIndex, rText.getLength() ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+ }
+
+ tAccParaPropValMap aRunAttrSeq;
+ _getRunAttributesImpl( nIndex, aRequestedAttributes, aRunAttrSeq );
+
+ uno::Sequence< PropertyValue > aValues( aRunAttrSeq.size() );
+ PropertyValue* pValues = aValues.getArray();
+ sal_Int32 i = 0;
+ for ( tAccParaPropValMap::const_iterator aIter = aRunAttrSeq.begin();
+ aIter != aRunAttrSeq.end();
+ ++aIter )
+ {
+ pValues[i] = aIter->second;
+ ++i;
+ }
+
+ return aValues;
+}
+// <--
+
+awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
+ sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+
+ /* #i12332# The position after the string needs special treatment.
+ IsValidChar -> IsValidPosition
+ */
+ if( ! (IsValidPosition( nIndex, GetString().getLength() ) ) )
+ throw lang::IndexOutOfBoundsException();
+
+ /* #i12332# */
+ sal_Bool bBehindText = sal_False;
+ if ( nIndex == GetString().getLength() )
+ bBehindText = sal_True;
+
+ // get model position & prepare GetCharRect() arguments
+ SwCrsrMoveState aMoveState;
+ aMoveState.bRealHeight = sal_True;
+ aMoveState.bRealWidth = sal_True;
+ SwSpecialPos aSpecialPos;
+ SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
+
+ sal_uInt16 nPos = 0;
+
+ /* #i12332# FillSpecialPos does not accept nIndex ==
+ GetString().getLength(). In that case nPos is set to the
+ length of the string in the core. This way GetCharRect
+ returns the rectangle for a cursor at the end of the
+ paragraph. */
+ if (bBehindText)
+ {
+ nPos = pNode->GetTxt().Len();
+ }
+ else
+ nPos = GetPortionData().FillSpecialPos
+ (nIndex, aSpecialPos, aMoveState.pSpecialPos );
+
+ // call GetCharRect
+ SwRect aCoreRect;
+ SwIndex aIndex( pNode, nPos );
+ SwPosition aPosition( *pNode, aIndex );
+ GetFrm()->GetCharRect( aCoreRect, aPosition, &aMoveState );
+
+ // translate core coordinates into accessibility coordinates
+ Window *pWin = GetWindow();
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin );
+
+ Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() ));
+ SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
+
+ Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
+ aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
+
+ // convert into AWT Rectangle
+ return awt::Rectangle(
+ aScreenRect.Left(), aScreenRect.Top(),
+ aScreenRect.GetWidth(), aScreenRect.GetHeight() );
+}
+
+sal_Int32 SwAccessibleParagraph::getCharacterCount()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ return GetString().getLength();
+}
+
+sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ // construct SwPosition (where GetCrsrOfst() will put the result into)
+ SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
+ SwIndex aIndex( pNode, 0);
+ SwPosition aPos( *pNode, aIndex );
+
+ // construct Point (translate into layout coordinates)
+ Window *pWin = GetWindow();
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin );
+ Point aPoint( rPoint.X, rPoint.Y );
+ SwRect aLogBounds( GetBounds( *(GetMap()), GetFrm() ) ); // twip rel to doc root
+ Point aPixPos( GetMap()->CoreToPixel( aLogBounds.SVRect() ).TopLeft() );
+ aPoint.X() += aPixPos.X();
+ aPoint.Y() += aPixPos.Y();
+ MapMode aMapMode = pWin->GetMapMode();
+ Point aCorePoint( GetMap()->PixelToCore( aPoint ) );
+ if( !aLogBounds.IsInside( aCorePoint ) )
+ {
+ /* #i12332# rPoint is may also be in rectangle returned by
+ getCharacterBounds(getCharacterCount() */
+
+ awt::Rectangle aRectEndPos =
+ getCharacterBounds(getCharacterCount());
+
+ if (rPoint.X - aRectEndPos.X >= 0 &&
+ rPoint.X - aRectEndPos.X < aRectEndPos.Width &&
+ rPoint.Y - aRectEndPos.Y >= 0 &&
+ rPoint.Y - aRectEndPos.Y < aRectEndPos.Height)
+ return getCharacterCount();
+
+ return -1;
+ }
+
+ // ask core for position
+ 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() );
+ SwCrsrMoveState aMoveState;
+ aMoveState.bPosMatchesBounds = sal_True;
+ sal_Bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState );
+
+ SwIndex aCntntIdx = aPos.nContent;
+ const xub_StrLen nIndex = aCntntIdx.GetIndex();
+ if ( nIndex > 0 )
+ {
+ SwRect aResultRect;
+ pFrm->GetCharRect( aResultRect, aPos );
+ bool bVert = pFrm->IsVertical();
+ bool bR2L = pFrm->IsRightToLeft();
+
+ if ( (!bVert && aResultRect.Pos().X() > aCorePoint.X()) ||
+ ( bVert && aResultRect.Pos().Y() > aCorePoint.Y()) ||
+ ( bR2L && aResultRect.Right() < aCorePoint.X()) )
+ {
+ SwIndex aIdxPrev( pNode, nIndex - 1);
+ SwPosition aPosPrev( *pNode, aIdxPrev );
+ SwRect aResultRectPrev;
+ pFrm->GetCharRect( aResultRectPrev, aPosPrev );
+ if ( (!bVert && aResultRectPrev.Pos().X() < aCorePoint.X() && aResultRect.Pos().Y() == aResultRectPrev.Pos().Y()) ||
+ ( bVert && aResultRectPrev.Pos().Y() < aCorePoint.Y() && aResultRect.Pos().X() == aResultRectPrev.Pos().X()) ||
+ ( bR2L && aResultRectPrev.Right() > aCorePoint.X() && aResultRect.Pos().Y() == aResultRectPrev.Pos().Y()) )
+ aPos = aPosPrev;
+ }
+ }
+
+ return bSuccess ?
+ GetPortionData().GetAccessiblePosition( aPos.nContent.GetIndex() )
+ : -1L;
+}
+
+::rtl::OUString SwAccessibleParagraph::getSelectedText()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ sal_Int32 nStart, nEnd;
+ sal_Bool bSelected = GetSelection( nStart, nEnd );
+ return bSelected
+ ? GetString().copy( nStart, nEnd - nStart )
+ : ::rtl::OUString();
+}
+
+sal_Int32 SwAccessibleParagraph::getSelectionStart()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ sal_Int32 nStart, nEnd;
+ GetSelection( nStart, nEnd );
+ return nStart;
+}
+
+sal_Int32 SwAccessibleParagraph::getSelectionEnd()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ sal_Int32 nStart, nEnd;
+ GetSelection( nStart, nEnd );
+ return nEnd;
+}
+
+sal_Bool SwAccessibleParagraph::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ // parameter checking
+ sal_Int32 nLength = GetString().getLength();
+ if ( ! IsValidRange( nStartIndex, nEndIndex, nLength ) )
+ {
+ throw lang::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(nStartIndex));
+ SwPosition aStartPos( *pNode, aIndex );
+ SwPaM aPaM( aStartPos );
+ aPaM.SetMark();
+ aPaM.GetPoint()->nContent =
+ GetPortionData().GetModelPosition(nEndIndex);
+
+ // set PaM at cursor shell
+ bRet = Select( aPaM );
+ }
+
+ return bRet;
+}
+
+::rtl::OUString SwAccessibleParagraph::getText()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ return GetString();
+}
+
+::rtl::OUString SwAccessibleParagraph::getTextRange(
+ sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ ::rtl::OUString sText( GetString() );
+
+ if ( IsValidRange( nStartIndex, nEndIndex, sText.getLength() ) )
+ {
+ OrderRange( nStartIndex, nEndIndex );
+ return sText.copy(nStartIndex, nEndIndex-nStartIndex );
+ }
+ else
+ throw lang::IndexOutOfBoundsException();
+}
+
+/*accessibility::*/TextSegment SwAccessibleParagraph::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ /*accessibility::*/TextSegment aResult;
+ aResult.SegmentStart = -1;
+ aResult.SegmentEnd = -1;
+
+ const ::rtl::OUString rText = GetString();
+ // implement the silly specification that first position after
+ // text must return an empty string, rather than throwing an
+ // IndexOutOfBoundsException, except for LINE, where the last
+ // line is returned
+ if( nIndex == rText.getLength() && AccessibleTextType::LINE != nTextType )
+ return aResult;
+
+ // with error checking
+ i18n::Boundary aBound;
+ sal_Bool bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
+
+ DBG_ASSERT( aBound.startPos >= 0, "illegal boundary" );
+ DBG_ASSERT( aBound.startPos <= aBound.endPos, "illegal boundary" );
+
+ // return word (if present)
+ if ( bWord )
+ {
+ aResult.SegmentText = rText.copy( aBound.startPos, aBound.endPos - aBound.startPos );
+ aResult.SegmentStart = aBound.startPos;
+ aResult.SegmentEnd = aBound.endPos;
+ }
+
+ return aResult;
+}
+
+/*accessibility::*/TextSegment SwAccessibleParagraph::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ const ::rtl::OUString rText = GetString();
+
+ /*accessibility::*/TextSegment aResult;
+ aResult.SegmentStart = -1;
+ aResult.SegmentEnd = -1;
+
+ // get starting pos
+ i18n::Boundary aBound;
+ if (nIndex == rText.getLength())
+ aBound.startPos = aBound.endPos = nIndex;
+ else
+ {
+ sal_Bool bTmp = GetTextBoundary( aBound, rText, nIndex, nTextType );
+
+ if ( ! bTmp )
+ aBound.startPos = aBound.endPos = nIndex;
+ }
+
+ // now skip to previous word
+ sal_Bool bWord = sal_False;
+ while( !bWord )
+ {
+ nIndex = min( nIndex, aBound.startPos ) - 1;
+ if( nIndex >= 0 )
+ bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
+ else
+ break; // exit if beginning of string is reached
+ }
+
+ if ( bWord )
+ {
+ aResult.SegmentText = rText.copy( aBound.startPos, aBound.endPos - aBound.startPos );
+ aResult.SegmentStart = aBound.startPos;
+ aResult.SegmentEnd = aBound.endPos;
+ };
+ return aResult;
+}
+
+/*accessibility::*/TextSegment SwAccessibleParagraph::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 nTextType ) throw (lang::IndexOutOfBoundsException, lang::IllegalArgumentException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+
+ /*accessibility::*/TextSegment aResult;
+ aResult.SegmentStart = -1;
+ aResult.SegmentEnd = -1;
+ const ::rtl::OUString rText = GetString();
+
+ // implement the silly specification that first position after
+ // text must return an empty string, rather than throwing an
+ // IndexOutOfBoundsException
+ if( nIndex == rText.getLength() )
+ return aResult;
+
+
+ // get first word, then skip to next word
+ i18n::Boundary aBound;
+ GetTextBoundary( aBound, rText, nIndex, nTextType );
+ sal_Bool bWord = sal_False;
+ while( !bWord )
+ {
+ nIndex = max( sal_Int32(nIndex+1), aBound.endPos );
+ if( nIndex < rText.getLength() )
+ bWord = GetTextBoundary( aBound, rText, nIndex, nTextType );
+ else
+ break; // exit if end of string is reached
+ }
+
+ if ( bWord )
+ {
+ aResult.SegmentText = rText.copy( aBound.startPos, aBound.endPos - aBound.startPos );
+ aResult.SegmentStart = aBound.startPos;
+ aResult.SegmentEnd = aBound.endPos;
+ }
+ return aResult;
+}
+
+sal_Bool SwAccessibleParagraph::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ CHECK_FOR_DEFUNC_THIS( XAccessibleText, *this );
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // select and copy (through dispatch mechanism)
+ setSelection( nStartIndex, nEndIndex );
+ ExecuteAtViewShell( SID_COPY );
+ return sal_True;
+}
+
+
+//
+//===== XAccesibleEditableText ==========================================
+//
+
+sal_Bool SwAccessibleParagraph::cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ CHECK_FOR_DEFUNC( XAccessibleEditableText );
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( !IsEditableState() )
+ return sal_False;
+
+ // select and cut (through dispatch mechanism)
+ setSelection( nStartIndex, nEndIndex );
+ ExecuteAtViewShell( SID_CUT );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::pasteText( sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ CHECK_FOR_DEFUNC( XAccessibleEditableText );
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( !IsEditableState() )
+ return sal_False;
+
+ // select and paste (through dispatch mechanism)
+ setSelection( nIndex, nIndex );
+ ExecuteAtViewShell( SID_PASTE );
+ return sal_True;
+}
+
+sal_Bool SwAccessibleParagraph::deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return replaceText( nStartIndex, nEndIndex, ::rtl::OUString() );
+}
+
+sal_Bool SwAccessibleParagraph::insertText( const ::rtl::OUString& sText, sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ return replaceText( nIndex, nIndex, sText );
+}
+
+sal_Bool SwAccessibleParagraph::replaceText(
+ sal_Int32 nStartIndex, sal_Int32 nEndIndex,
+ const ::rtl::OUString& sReplacement )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleEditableText );
+
+ const ::rtl::OUString& rText = GetString();
+
+ if( IsValidRange( nStartIndex, nEndIndex, rText.getLength() ) )
+ {
+ if( !IsEditableState() )
+ return sal_False;
+
+ SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
+
+ // translate positions
+ sal_uInt16 nStart, nEnd;
+ sal_Bool bSuccess = GetPortionData().GetEditableRange(
+ nStartIndex, nEndIndex, nStart, nEnd );
+
+ // edit only if the range is editable
+ if( bSuccess )
+ {
+ // create SwPosition for nStartIndex
+ SwIndex aIndex( pNode, nStart );
+ SwPosition aStartPos( *pNode, aIndex );
+
+ // create SwPosition for nEndIndex
+ SwPosition aEndPos( aStartPos );
+ aEndPos.nContent = nEnd;
+
+ // now create XTextRange as helper and set string
+ const uno::Reference<text::XTextRange> xRange(
+ SwXTextRange::CreateXTextRange(
+ *pNode->GetDoc(), aStartPos, &aEndPos));
+ xRange->setString(sReplacement);
+
+ // delete portion data
+ ClearPortionData();
+ }
+
+ return bSuccess;
+ }
+ else
+ throw lang::IndexOutOfBoundsException();
+}
+
+struct IndexCompare
+{
+ const PropertyValue* pValues;
+ IndexCompare( const PropertyValue* pVals ) : pValues(pVals) {}
+ bool operator() ( const sal_Int32& a, const sal_Int32& b ) const
+ {
+ return (pValues[a].Name < pValues[b].Name) ? true : false;
+ }
+};
+
+
+sal_Bool SwAccessibleParagraph::setAttributes(
+ sal_Int32 nStartIndex,
+ sal_Int32 nEndIndex,
+ const uno::Sequence<PropertyValue>& rAttributeSet )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleEditableText );
+
+ const ::rtl::OUString& rText = GetString();
+
+ if( ! IsValidRange( nStartIndex, nEndIndex, rText.getLength() ) )
+ throw lang::IndexOutOfBoundsException();
+
+ if( !IsEditableState() )
+ return sal_False;
+
+
+ // create a (dummy) text portion for the sole purpose of calling
+ // setPropertyValue on it
+ uno::Reference<XMultiPropertySet> xPortion = CreateUnoPortion( nStartIndex,
+ nEndIndex );
+
+ // build sorted index array
+ sal_Int32 nLength = rAttributeSet.getLength();
+ const PropertyValue* pPairs = rAttributeSet.getConstArray();
+ sal_Int32* pIndices = new sal_Int32[nLength];
+ sal_Int32 i;
+ for( i = 0; i < nLength; i++ )
+ pIndices[i] = i;
+ sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) );
+
+ // create sorted sequences accoring to index array
+ uno::Sequence< ::rtl::OUString > aNames( nLength );
+ ::rtl::OUString* pNames = aNames.getArray();
+ uno::Sequence< uno::Any > aValues( nLength );
+ uno::Any* pValues = aValues.getArray();
+ for( i = 0; i < nLength; i++ )
+ {
+ const PropertyValue& rVal = pPairs[pIndices[i]];
+ pNames[i] = rVal.Name;
+ pValues[i] = rVal.Value;
+ }
+ delete[] pIndices;
+
+ // now set the values
+ sal_Bool bRet = sal_True;
+ try
+ {
+ xPortion->setPropertyValues( aNames, aValues );
+ }
+ catch( UnknownPropertyException e )
+ {
+ // error handling through return code!
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+sal_Bool SwAccessibleParagraph::setText( const ::rtl::OUString& sText )
+ throw (uno::RuntimeException)
+{
+ return replaceText(0, GetString().getLength(), sText);
+}
+
+//===== XAccessibleSelection ============================================
+
+void SwAccessibleParagraph::selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ aSelectionHelper.selectAccessibleChild(nChildIndex);
+}
+
+sal_Bool SwAccessibleParagraph::isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ return aSelectionHelper.isAccessibleChildSelected(nChildIndex);
+}
+
+void SwAccessibleParagraph::clearAccessibleSelection( )
+ throw ( uno::RuntimeException )
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ aSelectionHelper.clearAccessibleSelection();
+}
+
+void SwAccessibleParagraph::selectAllAccessibleChildren( )
+ throw ( uno::RuntimeException )
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ aSelectionHelper.selectAllAccessibleChildren();
+}
+
+sal_Int32 SwAccessibleParagraph::getSelectedAccessibleChildCount( )
+ throw ( uno::RuntimeException )
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ return aSelectionHelper.getSelectedAccessibleChildCount();
+}
+
+uno::Reference<XAccessible> SwAccessibleParagraph::getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException)
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ return aSelectionHelper.getSelectedAccessibleChild(nSelectedChildIndex);
+}
+
+// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+void SwAccessibleParagraph::deselectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ CHECK_FOR_DEFUNC( XAccessibleSelection );
+
+ aSelectionHelper.deselectAccessibleChild( nChildIndex );
+}
+
+//===== XAccessibleHypertext ============================================
+
+class SwHyperlinkIter_Impl
+{
+ const SwpHints *pHints;
+ xub_StrLen nStt;
+ xub_StrLen nEnd;
+ sal_uInt16 nPos;
+
+public:
+ SwHyperlinkIter_Impl( const SwTxtFrm *pTxtFrm );
+ const SwTxtAttr *next();
+ sal_uInt16 getCurrHintPos() const { return nPos-1; }
+
+ xub_StrLen startIdx() const { return nStt; }
+ xub_StrLen endIdx() const { return nEnd; }
+};
+
+SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTxtFrm *pTxtFrm ) :
+ pHints( pTxtFrm->GetTxtNode()->GetpSwpHints() ),
+ nStt( pTxtFrm->GetOfst() ),
+ nPos( 0 )
+{
+ const SwTxtFrm *pFollFrm = pTxtFrm->GetFollow();
+ nEnd = pFollFrm ? pFollFrm->GetOfst() : pTxtFrm->GetTxtNode()->Len();
+}
+
+const SwTxtAttr *SwHyperlinkIter_Impl::next()
+{
+ const SwTxtAttr *pAttr = 0;
+ if( pHints )
+ {
+ while( !pAttr && nPos < pHints->Count() )
+ {
+ const SwTxtAttr *pHt = (*pHints)[nPos];
+ if( RES_TXTATR_INETFMT == pHt->Which() )
+ {
+ xub_StrLen nHtStt = *pHt->GetStart();
+ xub_StrLen nHtEnd = *pHt->GetAnyEnd();
+ if( nHtEnd > nHtStt &&
+ ( (nHtStt >= nStt && nHtStt < nEnd) ||
+ (nHtEnd > nStt && nHtEnd <= nEnd) ) )
+ {
+ pAttr = pHt;
+ }
+ }
+ ++nPos;
+ }
+ }
+
+ return pAttr;
+};
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkCount()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleHypertext );
+
+ sal_Int32 nCount = 0;
+ // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
+// if( !IsEditableState() )
+ // <--
+ {
+ const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+ SwHyperlinkIter_Impl aIter( pTxtFrm );
+ while( aIter.next() )
+ nCount++;
+ }
+
+ return nCount;
+}
+
+uno::Reference< XAccessibleHyperlink > SAL_CALL
+ SwAccessibleParagraph::getHyperLink( sal_Int32 nLinkIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleHypertext );
+
+ uno::Reference< XAccessibleHyperlink > xRet;
+
+ // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
+// if( !IsEditableState() )
+ // <--
+ {
+ const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+ SwHyperlinkIter_Impl aHIter( pTxtFrm );
+ while( nLinkIndex-- )
+ aHIter.next();
+
+ const SwTxtAttr *pHt = aHIter.next();
+ if( pHt )
+ {
+ if( !pHyperTextData )
+ pHyperTextData = new SwAccessibleHyperTextData;
+ SwAccessibleHyperTextData::iterator aIter =
+ pHyperTextData ->find( pHt );
+ if( aIter != pHyperTextData->end() )
+ {
+ xRet = (*aIter).second;
+ }
+ if( !xRet.is() )
+ {
+ sal_Int32 nHStt= GetPortionData().GetAccessiblePosition(
+ max( aHIter.startIdx(), *pHt->GetStart() ) );
+ sal_Int32 nHEnd= GetPortionData().GetAccessiblePosition(
+ min( aHIter.endIdx(), *pHt->GetAnyEnd() ) );
+ xRet = new SwAccessibleHyperlink( aHIter.getCurrHintPos(),
+ this, nHStt, nHEnd );
+ if( aIter != pHyperTextData->end() )
+ {
+ (*aIter).second = xRet;
+ }
+ else
+ {
+ SwAccessibleHyperTextData::value_type aEntry( pHt, xRet );
+ pHyperTextData->insert( aEntry );
+ }
+ }
+ }
+ }
+
+ if( !xRet.is() )
+ throw lang::IndexOutOfBoundsException();
+
+ return xRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleHypertext );
+
+ // parameter checking
+ sal_Int32 nLength = GetString().getLength();
+ if ( ! IsValidPosition( nCharIndex, nLength ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ sal_Int32 nRet = -1;
+ // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
+// if( !IsEditableState() )
+ // <--
+ {
+ const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
+ SwHyperlinkIter_Impl aHIter( pTxtFrm );
+
+ xub_StrLen nIdx = GetPortionData().GetModelPosition( nCharIndex );
+ sal_Int32 nPos = 0;
+ const SwTxtAttr *pHt = aHIter.next();
+ while( pHt && !(nIdx >= *pHt->GetStart() && nIdx < *pHt->GetAnyEnd()) )
+ {
+ pHt = aHIter.next();
+ nPos++;
+ }
+
+ if( pHt )
+ nRet = nPos;
+
+ }
+
+ return nRet;
+}
+
+// --> OD 2008-05-26 #i71360#
+// --> OD 2010-02-22 #i108125# - adjustments for change tracking text markup
+sal_Int32 SAL_CALL SwAccessibleParagraph::getTextMarkupCount( sal_Int32 nTextMarkupType )
+ throw (lang::IllegalArgumentException,
+ uno::RuntimeException)
+{
+ std::auto_ptr<SwTextMarkupHelper> pTextMarkupHelper;
+ switch ( nTextMarkupType )
+ {
+ case text::TextMarkupType::TRACK_CHANGE_INSERTION:
+ case text::TextMarkupType::TRACK_CHANGE_DELETION:
+ case text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE:
+ {
+ pTextMarkupHelper.reset( new SwTextMarkupHelper(
+ GetPortionData(),
+ *(mpParaChangeTrackInfo->getChangeTrackingTextMarkupList( nTextMarkupType ) )) );
+ }
+ break;
+ default:
+ {
+ pTextMarkupHelper.reset( new SwTextMarkupHelper( GetPortionData(), *GetTxtNode() ) );
+ }
+ }
+
+ return pTextMarkupHelper->getTextMarkupCount( nTextMarkupType );
+}
+
+/*accessibility::*/TextSegment SAL_CALL
+ SwAccessibleParagraph::getTextMarkup( sal_Int32 nTextMarkupIndex,
+ sal_Int32 nTextMarkupType )
+ throw (lang::IndexOutOfBoundsException,
+ lang::IllegalArgumentException,
+ uno::RuntimeException)
+{
+ std::auto_ptr<SwTextMarkupHelper> pTextMarkupHelper;
+ switch ( nTextMarkupType )
+ {
+ case text::TextMarkupType::TRACK_CHANGE_INSERTION:
+ case text::TextMarkupType::TRACK_CHANGE_DELETION:
+ case text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE:
+ {
+ pTextMarkupHelper.reset( new SwTextMarkupHelper(
+ GetPortionData(),
+ *(mpParaChangeTrackInfo->getChangeTrackingTextMarkupList( nTextMarkupType ) )) );
+ }
+ break;
+ default:
+ {
+ pTextMarkupHelper.reset( new SwTextMarkupHelper( GetPortionData(), *GetTxtNode() ) );
+ }
+ }
+
+ return pTextMarkupHelper->getTextMarkup( nTextMarkupIndex, nTextMarkupType );
+}
+
+uno::Sequence< /*accessibility::*/TextSegment > SAL_CALL
+ SwAccessibleParagraph::getTextMarkupAtIndex( sal_Int32 nCharIndex,
+ sal_Int32 nTextMarkupType )
+ throw (lang::IndexOutOfBoundsException,
+ lang::IllegalArgumentException,
+ uno::RuntimeException)
+{
+ // parameter checking
+ const sal_Int32 nLength = GetString().getLength();
+ if ( ! IsValidPosition( nCharIndex, nLength ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ std::auto_ptr<SwTextMarkupHelper> pTextMarkupHelper;
+ switch ( nTextMarkupType )
+ {
+ case text::TextMarkupType::TRACK_CHANGE_INSERTION:
+ case text::TextMarkupType::TRACK_CHANGE_DELETION:
+ case text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE:
+ {
+ pTextMarkupHelper.reset( new SwTextMarkupHelper(
+ GetPortionData(),
+ *(mpParaChangeTrackInfo->getChangeTrackingTextMarkupList( nTextMarkupType ) )) );
+ }
+ break;
+ default:
+ {
+ pTextMarkupHelper.reset( new SwTextMarkupHelper( GetPortionData(), *GetTxtNode() ) );
+ }
+ }
+
+ return pTextMarkupHelper->getTextMarkupAtIndex( nCharIndex, nTextMarkupType );
+}
+// <--
+
+// --> OD 2008-05-29 #i89175#
+sal_Int32 SAL_CALL SwAccessibleParagraph::getLineNumberAtIndex( sal_Int32 nIndex )
+ throw (lang::IndexOutOfBoundsException,
+ uno::RuntimeException)
+{
+ // parameter checking
+ const sal_Int32 nLength = GetString().getLength();
+ if ( ! IsValidPosition( nIndex, nLength ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ const sal_Int32 nLineNo = GetPortionData().GetLineNo( nIndex );
+ return nLineNo;
+}
+
+/*accessibility::*/TextSegment SAL_CALL
+ SwAccessibleParagraph::getTextAtLineNumber( sal_Int32 nLineNo )
+ throw (lang::IndexOutOfBoundsException,
+ uno::RuntimeException)
+{
+ // parameter checking
+ if ( nLineNo < 0 ||
+ nLineNo >= GetPortionData().GetLineCount() )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ i18n::Boundary aLineBound;
+ GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound );
+
+ /*accessibility::*/TextSegment aTextAtLine;
+ const ::rtl::OUString rText = GetString();
+ aTextAtLine.SegmentText = rText.copy( aLineBound.startPos,
+ aLineBound.endPos - aLineBound.startPos );
+ aTextAtLine.SegmentStart = aLineBound.startPos;
+ aTextAtLine.SegmentEnd = aLineBound.endPos;
+
+ return aTextAtLine;
+}
+
+/*accessibility::*/TextSegment SAL_CALL SwAccessibleParagraph::getTextAtLineWithCaret()
+ throw (uno::RuntimeException)
+{
+ const sal_Int32 nLineNoOfCaret = getNumberOfLineWithCaret();
+
+ if ( nLineNoOfCaret >= 0 &&
+ nLineNoOfCaret < GetPortionData().GetLineCount() )
+ {
+ return getTextAtLineNumber( nLineNoOfCaret );
+ }
+
+ return /*accessibility::*/TextSegment();
+}
+
+sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
+ throw (uno::RuntimeException)
+{
+ const sal_Int32 nCaretPos = getCaretPosition();
+ const sal_Int32 nLength = GetString().getLength();
+ if ( !IsValidPosition( nCaretPos, nLength ) )
+ {
+ return -1;
+ }
+
+ sal_Int32 nLineNo = GetPortionData().GetLineNo( nCaretPos );
+
+ // special handling for cursor positioned at end of text line via End key
+ if ( nCaretPos != 0 )
+ {
+ i18n::Boundary aLineBound;
+ GetPortionData().GetBoundaryOfLine( nLineNo, aLineBound );
+ if ( nCaretPos == aLineBound.startPos )
+ {
+ SwCrsrShell* pCrsrShell = SwAccessibleParagraph::GetCrsrShell();
+ if ( pCrsrShell != 0 )
+ {
+ const awt::Rectangle aCharRect = getCharacterBounds( nCaretPos );
+
+ const SwRect& aCursorCoreRect = pCrsrShell->GetCharRect();
+ // translate core coordinates into accessibility coordinates
+ Window *pWin = GetWindow();
+ CHECK_FOR_WINDOW( XAccessibleComponent, pWin );
+
+ Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() ));
+
+ SwRect aFrmLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root
+ Point aFrmPixPos( GetMap()->CoreToPixel( aFrmLogBounds.SVRect() ).TopLeft() );
+ aScreenRect.Move( -aFrmPixPos.X(), -aFrmPixPos.Y() );
+
+ // convert into AWT Rectangle
+ const awt::Rectangle aCursorRect( aScreenRect.Left(),
+ aScreenRect.Top(),
+ aScreenRect.GetWidth(),
+ aScreenRect.GetHeight() );
+
+ if ( aCharRect.X != aCursorRect.X ||
+ aCharRect.Y != aCursorRect.Y )
+ {
+ --nLineNo;
+ }
+ }
+ }
+ }
+
+ return nLineNo;
+}
+
+// --> OD 2010-02-19 #i108125#
+void SwAccessibleParagraph::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
+{
+ mpParaChangeTrackInfo->reset();
+
+ CheckRegistration( pOld, pNew );
+}
+// <--
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
new file mode 100644
index 000000000000..440fd08c7ebd
--- /dev/null
+++ b/sw/source/core/access/accpara.hxx
@@ -0,0 +1,447 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCPARA_HXX
+#define _ACCPARA_HXX
+
+#include <acccontext.hxx>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
+#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <hash_map>
+#include <accselectionhelper.hxx>
+// --> OD 2010-02-19 #i108125#
+#include <calbck.hxx>
+// <--
+
+class SwTxtFrm;
+class SwTxtNode;
+class SwPaM;
+class SwAccessiblePortionData;
+class SwAccessibleHyperTextData;
+class SwXTextPortion;
+// --> OD 2010-02-19 #i108125#
+class SwParaChangeTrackingInfo;
+// <--
+
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star {
+ namespace i18n { struct Boundary; }
+ namespace accessibility { class XAccessibleHyperlink; }
+} } }
+
+typedef ::std::hash_map< ::rtl::OUString,
+ ::com::sun::star::beans::PropertyValue,
+ ::rtl::OUStringHash,
+ ::std::equal_to< ::rtl::OUString > > tAccParaPropValMap;
+
+class SwAccessibleParagraph :
+ // --> OD 2010-02-19 #i108125#
+ public SwClient,
+ // <--
+ public SwAccessibleContext,
+ public ::com::sun::star::accessibility::XAccessibleEditableText,
+ public com::sun::star::accessibility::XAccessibleSelection,
+ public com::sun::star::accessibility::XAccessibleHypertext,
+ public com::sun::star::accessibility::XAccessibleTextMarkup,
+ public com::sun::star::accessibility::XAccessibleMultiLineText,
+ public ::com::sun::star::accessibility::XAccessibleTextAttributes
+{
+ friend class SwAccessibleHyperlink;
+
+ ::rtl::OUString sDesc; // protected by base classes mutex
+
+ /// data for this paragraph's text portions; this contains the
+ /// mapping from the core 'model string' to the accessible text
+ /// string.
+ /// pPortionData may be NULL; it should only be accessed through the
+ /// Get/Clear/Has/UpdatePortionData() methods
+ SwAccessiblePortionData* pPortionData;
+ SwAccessibleHyperTextData *pHyperTextData;
+
+ sal_Int32 nOldCaretPos; // The 'old' caret pos. It's only valid as long
+ // as the cursor is inside this object (protected by
+ // mutex)
+
+ sal_Bool bIsHeading; // protected by base classes mutex
+
+ // implementation for XAccessibleSelection
+ SwAccessibleSelectionHelper aSelectionHelper;
+
+ // --> OD 2010-02-19 #i108125#
+ SwParaChangeTrackingInfo* mpParaChangeTrackInfo;
+ // <--
+
+ /// get the SwTxtNode (requires frame; check before)
+ const SwTxtNode* GetTxtNode() const;
+
+ /// get the (accessible) text string (requires frame; check before)
+ ::rtl::OUString GetString();
+
+ ::rtl::OUString GetDescription();
+
+ // get the current care position
+ sal_Int32 GetCaretPos();
+
+ /// determine the current selection. Fill the values with
+ /// -1 if there is no selection in the this paragraph
+ sal_Bool GetSelection(sal_Int32& nStart, sal_Int32& nEnd);
+
+ // helper for GetSelection and getCaretPosition
+ // --> OD 2005-12-20 #i27301#
+ // - add parameter <_bForSelection>, which indicates, if the cursor is
+ // retrieved for selection or for caret position.
+ SwPaM* GetCursor( const bool _bForSelection );
+
+ /// for cut/copy/paste: execute a particular slot at the view shell
+ void ExecuteAtViewShell( sal_uInt16 nSlot );
+
+ /// helper method for get/setAttributes
+ /// (for the special case of (nEndIndex==-1) a single character will
+ /// be selected)
+ SwXTextPortion* CreateUnoPortion( sal_Int32 nStart, sal_Int32 nEnd );
+
+
+ // methods for checking the parameter range:
+
+ /// does nPos point to a char?
+ sal_Bool IsValidChar(sal_Int32 nPos, sal_Int32 nLength);
+
+ /// does nPos point to a position? (may be behind the last character)
+ sal_Bool IsValidPosition(sal_Int32 nPos, sal_Int32 nLength);
+
+ /// is nBegin...nEnd a valid range? (nEnd points past the last character)
+ sal_Bool IsValidRange(sal_Int32 nBegin, sal_Int32 nEnd, sal_Int32 nLength);
+
+ /// Ensure ordered range (i.e. nBegin is smaller then nEnd)
+ inline void OrderRange(sal_Int32& nBegin, sal_Int32& nEnd)
+ {
+ if( nBegin > nEnd )
+ {
+ sal_Int32 nTmp = nBegin; nBegin = nEnd; nEnd = nTmp;
+ }
+ }
+
+ // --> OD 2006-07-13 #i63870#
+ void _getDefaultAttributesImpl(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
+ tAccParaPropValMap& rDefAttrSeq,
+ const bool bOnlyCharAttrs = false );
+ void _getRunAttributesImpl(
+ const sal_Int32 nIndex,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes,
+ tAccParaPropValMap& rRunAttrSeq );
+ // <--
+
+public:
+
+ sal_Bool IsHeading() const;
+
+protected:
+
+ // Set states for getAccessibleStateSet.
+ // This drived class additinaly sets MULTILINE(1), MULTISELECTABLE(+),
+ // FOCUSABLE(+) and FOCUSED(+)
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ virtual void _InvalidateContent( sal_Bool bVisibleDataFired );
+
+ virtual void _InvalidateCursorPos();
+ virtual void _InvalidateFocus();
+
+ virtual ~SwAccessibleParagraph();
+
+ //===== handling of data for the text portions ===========================
+
+ /// force update of new portion data
+ void UpdatePortionData()
+ throw( com::sun::star::uno::RuntimeException );
+
+ /// remove the current portion data
+ void ClearPortionData();
+
+ /// get portion data; update if necesary
+ SwAccessiblePortionData& GetPortionData()
+ throw( com::sun::star::uno::RuntimeException )
+ {
+ if( pPortionData == NULL )
+ UpdatePortionData();
+ return *pPortionData;
+ }
+
+ /// determine if portion data is currently available
+ sal_Bool HasPortionData() { return (pPortionData != NULL); }
+
+
+ //===== helpers for word boundaries ====================================
+
+ sal_Bool GetCharBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+ sal_Bool GetWordBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+ sal_Bool GetSentenceBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+ sal_Bool GetLineBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+ sal_Bool GetParagraphBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+ sal_Bool GetAttributeBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+ sal_Bool GetGlyphBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos );
+
+ /// get boundaries of word/sentence/etc. for specified text type
+ /// Does all argument checking, and then delegates to helper methods above.
+ sal_Bool GetTextBoundary( com::sun::star::i18n::Boundary& rBound,
+ const rtl::OUString& rText,
+ sal_Int32 nPos,
+ sal_Int16 aTextType )
+ throw (
+ ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew);
+
+public:
+
+ SwAccessibleParagraph( SwAccessibleMap& rInitMap,
+ const SwTxtFrm& rTxtFrm );
+
+ inline operator ::com::sun::star::accessibility::XAccessibleText *();
+
+ 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);
+
+ /** 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);
+
+ /** paragraphs are in relation CONTENT_FLOWS_FROM and/or CONTENT_FLOWS_TO
+
+ OD 2005-12-02 #i27138#
+
+ @author OD
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ============================================
+
+ virtual void SAL_CALL grabFocus()
+ throw (::com::sun::star::uno::RuntimeException);
+ // --> OD 2007-01-17 #i71385#
+ 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);
+
+
+ //===== XInterface ======================================================
+
+ // (XInterface methods need to be implemented to disambiguate
+ // between those inherited through SwAcessibleContext and
+ // XAccessibleEditableText).
+
+ 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);
+
+ //===== XAccesibleText ==================================================
+ virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ //===== XAccesibleEditableText ==========================================
+ virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL pasteText( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL insertText( const ::rtl::OUString& sText, sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const ::rtl::OUString& sReplacement ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aAttributeSet ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setText( const ::rtl::OUString& sText ) 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 );
+
+ //===== XAccessibleHypertext ============================================
+ virtual sal_Int32 SAL_CALL getHyperLinkCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleHyperlink >
+ SAL_CALL getHyperLink( sal_Int32 nLinkIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // --> OD 2008-05-19 #i71360#
+ //===== XAccesibleTextMarkup ============================================
+ virtual sal_Int32 SAL_CALL getTextMarkupCount( sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL
+ getTextMarkup( sal_Int32 nTextMarkupIndex,
+ sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment > SAL_CALL
+ getTextMarkupAtIndex( sal_Int32 nCharIndex,
+ sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ // <--
+
+ // --> OD 2008-05-29 #i89175#
+ //===== XAccessibleMultiLineText ========================================
+ virtual sal_Int32 SAL_CALL getLineNumberAtIndex( sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL
+ getTextAtLineNumber( sal_Int32 nLineNo )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL
+ getTextAtLineWithCaret()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getNumberOfLineWithCaret()
+ throw (::com::sun::star::uno::RuntimeException);
+ // <--
+
+ // --> OD 2006-07-11 #i63870#
+ //===== XAccesibleTextAttributes ========================================
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ // <--
+};
+
+inline SwAccessibleParagraph::operator ::com::sun::star::accessibility::XAccessibleText *()
+{
+ return static_cast<
+ ::com::sun::star::accessibility::XAccessibleEditableText * >( this );
+}
+
+#endif
+
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
new file mode 100644
index 000000000000..c90fa9d4e34d
--- /dev/null
+++ b/sw/source/core/access/accportions.cxx
@@ -0,0 +1,753 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 "accportions.hxx"
+#include <tools/debug.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/i18n/Boundary.hpp>
+#include <txttypes.hxx>
+
+// for portion replacement in Special()
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+#include <tools/resid.hxx>
+#include "viewopt.hxx"
+
+// for GetWordBoundary(...), GetSentenceBoundary(...):
+#include <breakit.hxx>
+#include <com/sun/star/i18n/WordType.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <ndtxt.hxx>
+
+// for FillSpecialPos(...)
+#include "crstate.hxx"
+
+// for SwAccessibleContext::GetResource()
+#include "acccontext.hxx"
+
+// for Post-It replacement text:
+#include "txatbase.hxx"
+#include "fmtfld.hxx"
+#include "fldbas.hxx"
+#include "docufld.hxx"
+
+// for in-line graphics replacement:
+#include "ndindex.hxx"
+#include "ndnotxt.hxx"
+#include "fmtflcnt.hxx"
+#include "frmfmt.hxx"
+#include "fmtcntnt.hxx"
+
+
+using namespace ::com::sun::star;
+
+using rtl::OUString;
+using rtl::OUStringBuffer;
+using i18n::Boundary;
+
+
+// 'portion type' for terminating portions
+#define POR_TERMINATE 0
+
+
+// portion attributes
+#define PORATTR_SPECIAL 1
+#define PORATTR_READONLY 2
+#define PORATTR_GRAY 4
+#define PORATTR_TERM 128
+
+SwAccessiblePortionData::SwAccessiblePortionData(
+ const SwTxtNode* pTxtNd,
+ const SwViewOption* pViewOpt ) :
+ SwPortionHandler(),
+ pTxtNode( pTxtNd ),
+ aBuffer(),
+ nModelPosition( 0 ),
+ bFinished( sal_False ),
+ pViewOptions( pViewOpt ),
+ sAccessibleString(),
+ aLineBreaks(),
+ aModelPositions(),
+ aAccessiblePositions(),
+ pSentences( 0 ),
+ nBeforePortions( 0 ),
+ bLastIsSpecial( sal_False )
+{
+ DBG_ASSERT( pTxtNode != NULL, "Text node is needed!" );
+
+ // reserve some space to reduce memory allocations
+ aLineBreaks.reserve( 5 );
+ aModelPositions.reserve( 10 );
+ aAccessiblePositions.reserve( 10 );
+
+ // always include 'first' line-break position
+ aLineBreaks.push_back( 0 );
+}
+
+SwAccessiblePortionData::~SwAccessiblePortionData()
+{
+ delete pSentences;
+}
+
+void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType)
+{
+ DBG_ASSERT( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
+ "portion exceeds model string!" );
+
+ DBG_ASSERT( !bFinished, "We are already done!" );
+
+ // ignore zero-length portions
+ if( nLength == 0 )
+ return;
+
+ // store 'old' positions
+ aModelPositions.push_back( nModelPosition );
+ aAccessiblePositions.push_back( aBuffer.getLength() );
+
+ // store portion attributes
+ sal_uInt8 nAttr = IsGrayPortionType(nType) ? PORATTR_GRAY : 0;
+ aPortionAttrs.push_back( nAttr );
+
+ // update buffer + nModelPosition
+ aBuffer.append( OUString(
+ pTxtNode->GetTxt().Copy(
+ static_cast<sal_uInt16>( nModelPosition ),
+ nLength ) ) );
+ nModelPosition += nLength;
+
+ bLastIsSpecial = sal_False;
+}
+
+void SwAccessiblePortionData::Special(
+ sal_uInt16 nLength, const String& rText, sal_uInt16 nType)
+{
+ DBG_ASSERT( nModelPosition >= 0, "illegal position" );
+ DBG_ASSERT( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
+ "portion exceeds model string!" );
+
+ DBG_ASSERT( !bFinished, "We are already done!" );
+
+ // construct string with representation; either directly from
+ // rText, or use resources for special case portions
+ String sDisplay;
+ switch( nType )
+ {
+ case POR_POSTITS:
+ case POR_FLYCNT:
+ case POR_GRFNUM:
+ sDisplay = String(sal_Unicode(0xfffc));
+
+ break;
+ case POR_NUMBER:
+ {
+ OUStringBuffer aTmpBuffer( rText.Len() + 1 );
+ aTmpBuffer.append( rText );
+ aTmpBuffer.append( sal_Unicode(' ') );
+ sDisplay = aTmpBuffer.makeStringAndClear();
+ break;
+ }
+ // --> OD 2010-06-04 #i111768# - apply patch from kstribley:
+ // Include the control characters.
+ case POR_CONTROLCHAR:
+ {
+ OUStringBuffer aTmpBuffer( rText.Len() + 1 );
+ aTmpBuffer.append( rText );
+ aTmpBuffer.append( pTxtNode->GetTxt().GetChar(nModelPosition) );
+ sDisplay = aTmpBuffer.makeStringAndClear();
+ break;
+ }
+ // <--
+ default:
+ sDisplay = rText;
+ break;
+ }
+
+ // ignore zero/zero portions (except for terminators)
+ if( (nLength == 0) && (sDisplay.Len() == 0) && (nType != POR_TERMINATE) )
+ return;
+
+ // special treatment for zero length portion at the beginning:
+ // count as 'before' portion
+ if( ( nLength == 0 ) && ( nModelPosition == 0 ) )
+ nBeforePortions++;
+
+ // store the 'old' positions
+ aModelPositions.push_back( nModelPosition );
+ aAccessiblePositions.push_back( aBuffer.getLength() );
+
+ // store portion attributes
+ sal_uInt8 nAttr = PORATTR_SPECIAL;
+ if( IsGrayPortionType(nType) ) nAttr |= PORATTR_GRAY;
+ if( nLength == 0 ) nAttr |= PORATTR_READONLY;
+ if( nType == POR_TERMINATE ) nAttr |= PORATTR_TERM;
+ aPortionAttrs.push_back( nAttr );
+
+ // update buffer + nModelPosition
+ aBuffer.append( OUString(sDisplay) );
+ nModelPosition += nLength;
+
+ // remember 'last' special portion (unless it's our own 'closing'
+ // portions from 'Finish()'
+ if( nType != POR_TERMINATE )
+ bLastIsSpecial = sal_True;
+}
+
+void SwAccessiblePortionData::LineBreak()
+{
+ DBG_ASSERT( !bFinished, "We are already done!" );
+
+ aLineBreaks.push_back( aBuffer.getLength() );
+}
+
+void SwAccessiblePortionData::Skip(sal_uInt16 nLength)
+{
+ DBG_ASSERT( !bFinished, "We are already done!" );
+ DBG_ASSERT( aModelPositions.size() == 0, "Never Skip() after portions" );
+ DBG_ASSERT( nLength <= pTxtNode->GetTxt().Len(), "skip exceeds model string!" );
+
+ nModelPosition += nLength;
+}
+
+void SwAccessiblePortionData::Finish()
+{
+ DBG_ASSERT( !bFinished, "We are already done!" );
+
+ // include terminator values: always include two 'last character'
+ // markers in the position arrays to make sure we always find one
+ // position before the end
+ Special( 0, String(), POR_TERMINATE );
+ Special( 0, String(), POR_TERMINATE );
+ LineBreak();
+ LineBreak();
+
+ sAccessibleString = aBuffer.makeStringAndClear();
+ bFinished = sal_True;
+}
+
+
+sal_Bool SwAccessiblePortionData::IsPortionAttrSet(
+ size_t nPortionNo, sal_uInt8 nAttr ) const
+{
+ DBG_ASSERT( nPortionNo < aPortionAttrs.size(),
+ "Illegal portion number" );
+ return (aPortionAttrs[nPortionNo] & nAttr) != 0;
+}
+
+sal_Bool SwAccessiblePortionData::IsSpecialPortion( size_t nPortionNo ) const
+{
+ return IsPortionAttrSet(nPortionNo, PORATTR_SPECIAL);
+}
+
+sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const
+{
+ return IsPortionAttrSet(nPortionNo, PORATTR_READONLY);
+}
+
+sal_Bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
+{
+ // gray portions?
+ // Compare with: inftxt.cxx, SwTxtPaintInfo::DrawViewOpt(...)
+ sal_Bool bGray = sal_False;
+ switch( nType )
+ {
+ case POR_FTN:
+ case POR_ISOREF:
+ case POR_REF:
+ case POR_QUOVADIS:
+ case POR_NUMBER:
+ case POR_FLD:
+ case POR_URL:
+ case POR_ISOTOX:
+ case POR_TOX:
+ case POR_HIDDEN:
+ bGray = !pViewOptions->IsPagePreview() &&
+ !pViewOptions->IsReadonly() && SwViewOption::IsFieldShadings();
+ break;
+ case POR_TAB: bGray = pViewOptions->IsTab(); break;
+ case POR_SOFTHYPH: bGray = pViewOptions->IsSoftHyph(); break;
+ case POR_BLANK: bGray = pViewOptions->IsHardBlank(); break;
+ default:
+ break; // bGray is false
+ }
+ return bGray;
+}
+
+
+const OUString& SwAccessiblePortionData::GetAccessibleString() const
+{
+ DBG_ASSERT( bFinished, "Shouldn't call this before we are done!" );
+
+ return sAccessibleString;
+}
+
+
+void SwAccessiblePortionData::GetLineBoundary(
+ Boundary& rBound,
+ sal_Int32 nPos ) const
+{
+ FillBoundary( rBound, aLineBreaks,
+ FindBreak( aLineBreaks, nPos ) );
+}
+
+// --> OD 2008-05-30 #i89175#
+sal_Int32 SwAccessiblePortionData::GetLineCount() const
+{
+ size_t nBreaks = aLineBreaks.size();
+ // A non-empty paragraph has at least 4 breaks: one for each line3 and
+ // 3 additional ones.
+ // An empty paragraph has 3 breaks.
+ // Less than 3 breaks is an error case.
+ sal_Int32 nLineCount = ( nBreaks > 3 )
+ ? nBreaks - 3
+ : ( ( nBreaks == 3 ) ? 1 : 0 );
+ return nLineCount;
+}
+
+sal_Int32 SwAccessiblePortionData::GetLineNo( const sal_Int32 nPos ) const
+{
+ sal_Int32 nLineNo = FindBreak( aLineBreaks, nPos );
+
+ // handling of position after last character
+ const sal_Int32 nLineCount( GetLineCount() );
+ if ( nLineNo >= nLineCount )
+ {
+ nLineNo = nLineCount - 1;
+ }
+
+ return nLineNo;
+}
+
+void SwAccessiblePortionData::GetBoundaryOfLine( const sal_Int32 nLineNo,
+ i18n::Boundary& rLineBound )
+{
+ FillBoundary( rLineBound, aLineBreaks, nLineNo );
+}
+// <--
+
+void SwAccessiblePortionData::GetLastLineBoundary(
+ Boundary& rBound ) const
+{
+ DBG_ASSERT( aLineBreaks.size() >= 2, "need min + max value" );
+
+ // The last two positions except the two deleimiters are the ones
+ // we are looking for, except for empty paragraphs (nBreaks==3)
+ size_t nBreaks = aLineBreaks.size();
+ FillBoundary( rBound, aLineBreaks, nBreaks <= 3 ? 0 : nBreaks-4 );
+}
+
+sal_uInt16 SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
+{
+ DBG_ASSERT( nPos >= 0, "illegal position" );
+ DBG_ASSERT( nPos <= sAccessibleString.getLength(), "illegal position" );
+
+ // find the portion number
+ size_t nPortionNo = FindBreak( aAccessiblePositions, nPos );
+
+ // get model portion size
+ sal_Int32 nStartPos = aModelPositions[nPortionNo];
+
+ // if it's a non-special portion, move into the portion, else
+ // return the portion start
+ if( ! IsSpecialPortion( nPortionNo ) )
+ {
+ // 'wide' portions have to be of the same width
+ DBG_ASSERT( ( aModelPositions[nPortionNo+1] - nStartPos ) ==
+ ( aAccessiblePositions[nPortionNo+1] -
+ aAccessiblePositions[nPortionNo] ),
+ "accesability portion disagrees with text model" );
+
+ sal_Int32 nWithinPortion = nPos - aAccessiblePositions[nPortionNo];
+ nStartPos += nWithinPortion;
+ }
+ // else: return nStartPos unmodified
+
+ DBG_ASSERT( (nStartPos >= 0) && (nStartPos < USHRT_MAX),
+ "How can the SwTxtNode have so many characters?" );
+ return static_cast<sal_uInt16>(nStartPos);
+}
+
+void SwAccessiblePortionData::FillBoundary(
+ Boundary& rBound,
+ const Positions_t& rPositions,
+ size_t nPos ) const
+{
+ rBound.startPos = rPositions[nPos];
+ rBound.endPos = rPositions[nPos+1];
+}
+
+
+size_t SwAccessiblePortionData::FindBreak(
+ const Positions_t& rPositions,
+ sal_Int32 nValue ) const
+{
+ DBG_ASSERT( rPositions.size() >= 2, "need min + max value" );
+ DBG_ASSERT( rPositions[0] <= nValue, "need min value" );
+ DBG_ASSERT( rPositions[rPositions.size()-1] >= nValue,
+ "need first terminator value" );
+ DBG_ASSERT( rPositions[rPositions.size()-2] >= nValue,
+ "need second terminator value" );
+
+ size_t nMin = 0;
+ size_t nMax = rPositions.size()-2;
+
+ // loop until no more than two candidates are left
+ while( nMin+1 < nMax )
+ {
+ // check loop invariants
+ DBG_ASSERT( ( (nMin == 0) && (rPositions[nMin] <= nValue) ) ||
+ ( (nMin != 0) && (rPositions[nMin] < nValue) ),
+ "minvalue not minimal" );
+ DBG_ASSERT( nValue <= rPositions[nMax], "max value not maximal" );
+
+ // get middle (and ensure progress)
+ size_t nMiddle = (nMin + nMax)/2;
+ DBG_ASSERT( nMin < nMiddle, "progress?" );
+ DBG_ASSERT( nMiddle < nMax, "progress?" );
+
+ // check array
+ DBG_ASSERT( rPositions[nMin] <= rPositions[nMiddle],
+ "garbled positions array" );
+ DBG_ASSERT( rPositions[nMiddle] <= rPositions[nMax],
+ "garbled positions array" );
+
+ if( nValue > rPositions[nMiddle] )
+ nMin = nMiddle;
+ else
+ nMax = nMiddle;
+ }
+
+ // only two are left; we only need to check which one is the winner
+ DBG_ASSERT( (nMax == nMin) || (nMax == nMin+1), "only two left" );
+ if( (rPositions[nMin] < nValue) && (rPositions[nMin+1] <= nValue) )
+ nMin = nMin+1;
+
+ // finally, check to see whether the returned value is the 'right' position
+ DBG_ASSERT( rPositions[nMin] <= nValue, "not smaller or equal" );
+ DBG_ASSERT( nValue <= rPositions[nMin+1], "not equal or larger" );
+ DBG_ASSERT( (nMin == 0) || (rPositions[nMin-1] <= nValue),
+ "earlier value should have been returned" );
+
+ DBG_ASSERT( nMin < rPositions.size()-1,
+ "shouldn't return last position (due to termintator values)" );
+
+ return nMin;
+}
+
+size_t SwAccessiblePortionData::FindLastBreak(
+ const Positions_t& rPositions,
+ sal_Int32 nValue ) const
+{
+ size_t nResult = FindBreak( rPositions, nValue );
+
+ // skip 'zero-length' portions
+ // --> OD 2006-10-19 #i70538#
+ // consider size of <rPosition> and ignore last entry
+// while( rPositions[nResult+1] <= nValue )
+ while ( nResult < rPositions.size() - 2 &&
+ rPositions[nResult+1] <= nValue )
+ {
+ nResult++;
+ }
+ // <--
+
+ return nResult;
+}
+
+
+void SwAccessiblePortionData::GetSentenceBoundary(
+ Boundary& rBound,
+ sal_Int32 nPos )
+{
+ DBG_ASSERT( nPos >= 0, "illegal position; check before" );
+ DBG_ASSERT( nPos < sAccessibleString.getLength(), "illegal position" );
+
+ if( pSentences == NULL )
+ {
+ DBG_ASSERT( pBreakIt != NULL, "We always need a break." );
+ DBG_ASSERT( pBreakIt->GetBreakIter().is(), "No break-iterator." );
+ if( pBreakIt->GetBreakIter().is() )
+ {
+ pSentences = new Positions_t();
+ pSentences->reserve(10);
+
+ // use xBreak->endOfSentence to iterate over all words; store
+ // positions in pSentences
+ sal_Int32 nCurrent = 0;
+ sal_Int32 nLength = sAccessibleString.getLength();
+ do
+ {
+ pSentences->push_back( nCurrent );
+
+ sal_uInt16 nModelPos = GetModelPosition( nCurrent );
+
+ sal_Int32 nNew = pBreakIt->GetBreakIter()->endOfSentence(
+ sAccessibleString, nCurrent,
+ pBreakIt->GetLocale(pTxtNode->GetLang(nModelPos)) ) + 1;
+
+ if( (nNew < 0) && (nNew > nLength) )
+ nNew = nLength;
+ else if (nNew <= nCurrent)
+ nNew = nCurrent + 1; // ensure forward progress
+
+ nCurrent = nNew;
+ }
+ while (nCurrent < nLength);
+
+ // finish with two terminators
+ pSentences->push_back( nLength );
+ pSentences->push_back( nLength );
+ }
+ else
+ {
+ // no break iterator -> empty word
+ rBound.startPos = 0;
+ rBound.endPos = 0;
+ return;
+ }
+ }
+
+ FillBoundary( rBound, *pSentences, FindBreak( *pSentences, nPos ) );
+}
+
+void SwAccessiblePortionData::GetAttributeBoundary(
+ Boundary& rBound,
+ sal_Int32 nPos) const
+{
+ DBG_ASSERT( pTxtNode != NULL, "Need SwTxtNode!" );
+
+ // attribute boundaries can only occur on portion boundaries
+ FillBoundary( rBound, aAccessiblePositions,
+ FindBreak( aAccessiblePositions, nPos ) );
+}
+
+
+sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( sal_uInt16 nPos ) const
+{
+ DBG_ASSERT( nPos <= pTxtNode->GetTxt().Len(), "illegal position" );
+
+ // find the portion number
+ // --> OD 2006-10-19 #i70538#
+ // consider "empty" model portions - e.g. number portion
+ size_t nPortionNo = FindLastBreak( aModelPositions,
+ static_cast<sal_Int32>(nPos) );
+ // <--
+
+ sal_Int32 nRet = aAccessiblePositions[nPortionNo];
+
+ // if the model portion has more than one position, go into it;
+ // else return that position
+ sal_Int32 nStartPos = aModelPositions[nPortionNo];
+ sal_Int32 nEndPos = aModelPositions[nPortionNo+1];
+ if( (nEndPos - nStartPos) > 1 )
+ {
+ // 'wide' portions have to be of the same width
+ DBG_ASSERT( ( nEndPos - nStartPos ) ==
+ ( aAccessiblePositions[nPortionNo+1] -
+ aAccessiblePositions[nPortionNo] ),
+ "accesability portion disagrees with text model" );
+
+ sal_Int32 nWithinPortion = nPos - aModelPositions[nPortionNo];
+ nRet += nWithinPortion;
+ }
+ // else: return nRet unmodified
+
+ DBG_ASSERT( (nRet >= 0) && (nRet <= sAccessibleString.getLength()),
+ "too long!" );
+ return nRet;
+}
+
+sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
+ sal_Int32 nPos,
+ SwSpecialPos& rPos,
+ SwSpecialPos*& rpPos ) const
+{
+ size_t nPortionNo = FindLastBreak( aAccessiblePositions, nPos );
+
+ sal_uInt8 nExtend(SP_EXTEND_RANGE_NONE);
+ sal_Int32 nRefPos(0);
+ sal_Int32 nModelPos(0);
+
+ if( nPortionNo < nBeforePortions )
+ {
+ nExtend = SP_EXTEND_RANGE_BEFORE;
+ rpPos = &rPos;
+ }
+ else
+ {
+ sal_Int32 nModelEndPos = aModelPositions[nPortionNo+1];
+ nModelPos = aModelPositions[nPortionNo];
+
+ // skip backwards over zero-length portions, since GetCharRect()
+ // counts all model-zero-length portions as belonging to the
+ // previus portion
+ size_t nCorePortionNo = nPortionNo;
+ while( nModelPos == nModelEndPos )
+ {
+ nCorePortionNo--;
+ nModelEndPos = nModelPos;
+ nModelPos = aModelPositions[nCorePortionNo];
+
+ DBG_ASSERT( nModelPos >= 0, "Can't happen." );
+ DBG_ASSERT( nCorePortionNo >= nBeforePortions, "Can't happen." );
+ }
+ DBG_ASSERT( nModelPos != nModelEndPos,
+ "portion with core-representation expected" );
+
+ // if we have anything except plain text, compute nExtend + nRefPos
+ if( (nModelEndPos - nModelPos == 1) &&
+ (pTxtNode->GetTxt().GetChar(static_cast<sal_uInt16>(nModelPos)) !=
+ sAccessibleString.getStr()[nPos]) )
+ {
+ // case 1: a one-character, non-text portion
+ // reference position is the first accessibilty for our
+ // core portion
+ nRefPos = aAccessiblePositions[ nCorePortionNo ];
+ nExtend = SP_EXTEND_RANGE_NONE;
+ rpPos = &rPos;
+ }
+ else if(nPortionNo != nCorePortionNo)
+ {
+ // case 2: a multi-character (text!) portion, followed by
+ // zero-length portions
+ // reference position is the first character of the next
+ // portion, and we are 'behind'
+ nRefPos = aAccessiblePositions[ nCorePortionNo+1 ];
+ nExtend = SP_EXTEND_RANGE_BEHIND;
+ rpPos = &rPos;
+ }
+ else
+ {
+ // case 3: regular text portion
+ DBG_ASSERT( ( nModelEndPos - nModelPos ) ==
+ ( aAccessiblePositions[nPortionNo+1] -
+ aAccessiblePositions[nPortionNo] ),
+ "text portion expected" );
+
+ nModelPos += nPos - aAccessiblePositions[ nPortionNo ];
+ rpPos = NULL;
+ }
+ }
+ if( rpPos != NULL )
+ {
+ DBG_ASSERT( rpPos == &rPos, "Yes!" );
+ DBG_ASSERT( nRefPos <= nPos, "wrong reference" );
+ DBG_ASSERT( (nExtend == SP_EXTEND_RANGE_NONE) ||
+ (nExtend == SP_EXTEND_RANGE_BEFORE) ||
+ (nExtend == SP_EXTEND_RANGE_BEHIND), "need extend" );
+
+ // get the line number, and adjust nRefPos for the line
+ // (if necessary)
+ size_t nRefLine = FindBreak( aLineBreaks, nRefPos );
+ size_t nMyLine = FindBreak( aLineBreaks, nPos );
+ sal_uInt16 nLineOffset = static_cast<sal_uInt16>( nMyLine - nRefLine );
+ if( nLineOffset != 0 )
+ nRefPos = aLineBreaks[ nMyLine ];
+
+ // fill char offset and 'special position'
+ rPos.nCharOfst = static_cast<sal_uInt16>( nPos - nRefPos );
+ rPos.nExtendRange = nExtend;
+ rPos.nLineOfst = nLineOffset;
+ }
+
+ return static_cast<sal_uInt16>( nModelPos );
+}
+
+void SwAccessiblePortionData::AdjustAndCheck(
+ sal_Int32 nPos,
+ size_t& nPortionNo,
+ sal_uInt16& nCorePos,
+ sal_Bool& bEdit) const
+{
+ // find portion and get mode position
+ nPortionNo = FindBreak( aAccessiblePositions, nPos );
+ nCorePos = static_cast<sal_uInt16>( aModelPositions[ nPortionNo ] );
+
+ // for special portions, make sure we're on a portion boundary
+ // for text portions, add the in-portion offset
+ if( IsSpecialPortion( nPortionNo ) )
+ bEdit &= nPos == aAccessiblePositions[nPortionNo];
+ else
+ nCorePos = static_cast<sal_uInt16>( nCorePos +
+ nPos - aAccessiblePositions[nPortionNo] );
+}
+
+sal_Bool SwAccessiblePortionData::GetEditableRange(
+ sal_Int32 nStart, sal_Int32 nEnd,
+ sal_uInt16& nCoreStart, sal_uInt16& nCoreEnd ) const
+{
+ sal_Bool bIsEditable = sal_True;
+
+ // get start and end portions
+ size_t nStartPortion, nEndPortion;
+ AdjustAndCheck( nStart, nStartPortion, nCoreStart, bIsEditable );
+ AdjustAndCheck( nEnd, nEndPortion, nCoreEnd, bIsEditable );
+
+ // iterate over portions, and make sure there is no read-only portion
+ // in-between
+ size_t nLastPortion = nEndPortion;
+
+ // don't count last portion if we're in front of a special portion
+ if( IsSpecialPortion(nLastPortion) )
+ {
+ if (nLastPortion > 0)
+ nLastPortion--;
+ else
+ // special case: because size_t is usually unsigned, we can't just
+ // decrease nLastPortion to -1 (which would normally do the job, so
+ // this whole if wouldn't be needed). Instead, we'll do this
+ // special case and just increae the start portion beyond the last
+ // portion to make sure the loop below will have zero iteration.
+ nStartPortion = nLastPortion + 1;
+ }
+
+ for( size_t nPor = nStartPortion; nPor <= nLastPortion; nPor ++ )
+ {
+ bIsEditable &= ! IsReadOnlyPortion( nPor );
+ }
+
+ return bIsEditable;
+}
+
+sal_Bool SwAccessiblePortionData::IsValidCorePosition( sal_uInt16 nPos ) const
+{
+ // a position is valid its within the model positions that we know
+ return ( aModelPositions[0] <= nPos ) &&
+ ( nPos <= aModelPositions[ aModelPositions.size()-1 ] );
+}
+
+sal_uInt16 SwAccessiblePortionData::GetFirstValidCorePosition() const
+{
+ return static_cast<sal_uInt16>( aModelPositions[0] );
+}
+
+sal_uInt16 SwAccessiblePortionData::GetLastValidCorePosition() const
+{
+ return static_cast<sal_uInt16>( aModelPositions[ aModelPositions.size()-1 ] );
+}
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
new file mode 100644
index 000000000000..1e147ff2d99b
--- /dev/null
+++ b/sw/source/core/access/accportions.hxx
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCPORTIONS_HXX
+#define _ACCPORTIONS_HXX
+#include <SwPortionHandler.hxx>
+#include <sal/types.h>
+#include <rtl/ustrbuf.hxx>
+#include <vector>
+
+class String;
+class SwTxtNode;
+struct SwSpecialPos;
+class SwViewOption;
+namespace com { namespace sun { namespace star {
+ namespace i18n { struct Boundary; }
+} } }
+
+/**
+ * collect text portion data from the layout through SwPortionHandler interface
+ */
+class SwAccessiblePortionData : public SwPortionHandler
+{
+ // the node this portion is referring to
+ const SwTxtNode* pTxtNode;
+
+ // variables used while collecting the data
+ rtl::OUStringBuffer aBuffer;
+ sal_Int32 nModelPosition;
+ sal_Bool bFinished;
+ const SwViewOption* pViewOptions;
+
+ // the accessible string
+ rtl::OUString sAccessibleString;
+
+ // positions array
+ // instances of Position_t must always include the minimum and
+ // maximum positions as first/last elements (to simplify the
+ // algorithms)
+ typedef std::vector<sal_Int32> Positions_t;
+
+ Positions_t aLineBreaks; /// position of line breaks
+ Positions_t aModelPositions; /// position of portion breaks in the model
+ Positions_t aAccessiblePositions; /// portion breaks in sAccessibleString
+
+ typedef std::vector<sal_uInt8> PortionAttrs_t;
+ PortionAttrs_t aPortionAttrs; /// additional portion attributes
+
+ Positions_t* pSentences; /// positions of sentence breaks
+
+ size_t nBeforePortions; /// # of portions before first model character
+ sal_Bool bLastIsSpecial; /// set if last portion was 'Special()'
+
+ /// returns the index of the first position whose value is smaller
+ /// or equal, and whose following value is equal or larger
+ size_t FindBreak( const Positions_t& rPositions, sal_Int32 nValue ) const;
+
+ /// like FindBreak, but finds the last equal or larger position
+ size_t FindLastBreak( const Positions_t& rPositions, sal_Int32 nValue ) const;
+
+ /// fill the boundary with the values from rPositions[nPos]
+ void FillBoundary(com::sun::star::i18n::Boundary& rBound,
+ const Positions_t& rPositions,
+ size_t nPos ) const;
+
+ /// Access to portion attributes
+ sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const;
+ sal_Bool IsSpecialPortion( size_t nPortionNo ) const;
+ sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const;
+ sal_Bool IsGrayPortionType( sal_uInt16 nType ) const;
+
+ // helper method for GetEditableRange(...):
+ void AdjustAndCheck( sal_Int32 nPos, size_t& nPortionNo,
+ sal_uInt16& nCorePos, sal_Bool& bEdit ) const;
+
+public:
+ SwAccessiblePortionData( const SwTxtNode* pTxtNd,
+ const SwViewOption* pViewOpt = NULL );
+ virtual ~SwAccessiblePortionData();
+
+ // SwPortionHandler methods
+ virtual void Text(sal_uInt16 nLength, sal_uInt16 nType);
+ virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType);
+ virtual void LineBreak();
+ virtual void Skip(sal_uInt16 nLength);
+ virtual void Finish();
+
+
+ // access to the portion data
+
+ /// get the text string, as presented by the layout
+ const rtl::OUString& GetAccessibleString() const;
+
+ /// get the start & end positions of the sentence
+ void GetLineBoundary( com::sun::star::i18n::Boundary& rBound,
+ sal_Int32 nPos ) const;
+
+ // get start and end position of the last line
+ void GetLastLineBoundary( com::sun::star::i18n::Boundary& rBound ) const;
+
+ // --> OD 2008-05-30 #i89175#
+ sal_Int32 GetLineCount() const;
+ sal_Int32 GetLineNo( const sal_Int32 nPos ) const;
+ void GetBoundaryOfLine( const sal_Int32 nLineNo,
+ com::sun::star::i18n::Boundary& rLineBound );
+ // <--
+
+ /// get the position in the model string for a given
+ /// (accessibility) position
+ sal_uInt16 GetModelPosition( sal_Int32 nPos ) const;
+
+ /// get the position in the accessibility string for a given model position
+ sal_Int32 GetAccessiblePosition( sal_uInt16 nPos ) const;
+
+ /// fill a SwSpecialPos structure, suitable for calling
+ /// SwTxtFrm->GetCharRect
+ /// Returns the core position, and fills thr rpPos either with NULL or
+ /// with the &rPos, after putting the appropriate data into it.
+ sal_uInt16 FillSpecialPos( sal_Int32 nPos,
+ SwSpecialPos& rPos,
+ SwSpecialPos*& rpPos ) const;
+
+
+ // get boundaries of words/sentences. The data structures are
+ // created on-demand.
+ void GetSentenceBoundary( com::sun::star::i18n::Boundary& rBound,
+ sal_Int32 nPos );
+
+ // get (a) boundary for attribut change
+ void GetAttributeBoundary( com::sun::star::i18n::Boundary& rBound,
+ sal_Int32 nPos ) const;
+
+ /// Convert start and end positions into core positions.
+ /// @returns true if 'special' portions are included either completely
+ /// or not at all. This can be used to test whether editing
+ /// that range would be legal
+ sal_Bool GetEditableRange( sal_Int32 nStart, sal_Int32 nEnd,
+ sal_uInt16& nCoreStart, sal_uInt16& nCoreEnd ) const;
+
+ /// Determine whether this core position is valid for these portions.
+ /// (A paragraph may be split into several frames, e.g. at page
+ /// boundaries. In this case, only part of a paragraph is represented
+ /// through this object. This method determines whether one particular
+ /// position is valid for this object or not.)
+ sal_Bool IsValidCorePosition( sal_uInt16 nPos ) const;
+ sal_uInt16 GetFirstValidCorePosition() const;
+ sal_uInt16 GetLastValidCorePosition() const;
+};
+
+
+#endif
+
diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx
new file mode 100644
index 000000000000..b8fabc3d5f25
--- /dev/null
+++ b/sw/source/core/access/accpreview.cxx
@@ -0,0 +1,104 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <vcl/svapp.hxx>
+#include <rtl/uuid.h>
+#ifndef _ACCESS_HRC
+#include "access.hrc"
+#endif
+#include <accpreview.hxx>
+
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentPageView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
+
+
+// using namespace accessibility;
+
+using ::com::sun::star::lang::IndexOutOfBoundsException;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::uno::Sequence;
+using ::rtl::OUString;
+
+
+
+
+//
+// SwAccessiblePreview
+//
+
+SwAccessiblePreview::SwAccessiblePreview( SwAccessibleMap *pMp ) :
+ SwAccessibleDocumentBase( pMp )
+{
+ SetName( GetResource( STR_ACCESS_DOC_NAME ) );
+}
+
+SwAccessiblePreview::~SwAccessiblePreview()
+{
+}
+
+OUString SwAccessiblePreview::getImplementationName( )
+ throw( RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( sImplementationName ) );
+}
+
+sal_Bool SwAccessiblePreview::supportsService( const OUString& rServiceName )
+ throw( RuntimeException )
+{
+ return rServiceName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM( sServiceName) ) ||
+ rServiceName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM( sAccessibleServiceName ) );
+}
+
+Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
+ throw( RuntimeException )
+{
+ Sequence<OUString> aSeq( 2 );
+ aSeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( sServiceName ) );
+ aSeq[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( sAccessibleServiceName ) );
+ return aSeq;
+}
+
+Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::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/accpreview.hxx b/sw/source/core/access/accpreview.hxx
new file mode 100644
index 000000000000..aab14dc80026
--- /dev/null
+++ b/sw/source/core/access/accpreview.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCPREVIEW_HXX
+#define _ACCPREVIEW_HXX
+
+#include "accdoc.hxx"
+
+/**
+ * accessibility implementation for the page preview.
+ * The children of the page preview are the pages that are visible in the
+ * preview.
+ *
+ * The vast majority of the implemention logic is inherited from
+ * SwAccessibleDocumentBase.
+ */
+class SwAccessiblePreview : public SwAccessibleDocumentBase
+{
+ virtual ~SwAccessiblePreview();
+
+public:
+
+ SwAccessiblePreview( SwAccessibleMap *pMap );
+
+
+
+ //===== 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/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
new file mode 100644
index 000000000000..8e4593377c63
--- /dev/null
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -0,0 +1,334 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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/XAccessibleSelection.hpp>
+#include <accselectionhelper.hxx>
+
+#include <acccontext.hxx>
+#include <accmap.hxx>
+#include <svx/AccessibleShape.hxx>
+#include <viewsh.hxx>
+#include <fesh.hxx>
+#include <vcl/svapp.hxx> // for SolarMutex
+#include <tools/debug.hxx>
+#include <flyfrm.hxx>
+
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+using ::com::sun::star::accessibility::XAccessible;
+using ::com::sun::star::accessibility::XAccessibleContext;
+using ::com::sun::star::accessibility::XAccessibleSelection;
+
+using namespace ::sw::access;
+
+SwAccessibleSelectionHelper::SwAccessibleSelectionHelper(
+ SwAccessibleContext& rCtxt ) :
+ rContext( rCtxt )
+{
+}
+
+SwAccessibleSelectionHelper::~SwAccessibleSelectionHelper()
+{
+}
+
+SwFEShell* SwAccessibleSelectionHelper::GetFEShell()
+{
+ DBG_ASSERT( rContext.GetMap() != NULL, "no map?" );
+ ViewShell* pViewShell = rContext.GetMap()->GetShell();
+ DBG_ASSERT( pViewShell != NULL,
+ "No view shell? Then what are you looking at?" );
+
+ SwFEShell* pFEShell = NULL;
+ if( pViewShell->ISA( SwFEShell ) )
+ {
+ pFEShell = static_cast<SwFEShell*>( pViewShell );
+ }
+
+ return pFEShell;
+}
+
+void SwAccessibleSelectionHelper::throwIndexOutOfBoundsException()
+ throw ( lang::IndexOutOfBoundsException )
+{
+ Reference < XAccessibleContext > xThis( &rContext );
+ Reference < XAccessibleSelection >xSelThis( xThis, UNO_QUERY );
+ lang::IndexOutOfBoundsException aExcept(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("index out of bounds") ),
+ xSelThis ); \
+ throw aExcept;
+}
+
+
+//===== XAccessibleSelection ============================================
+
+void SwAccessibleSelectionHelper::selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // Get the respective child as SwFrm (also do index checking), ...
+ const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()),
+ nChildIndex );
+ if( !aChild.IsValid() )
+ throwIndexOutOfBoundsException();
+
+ // we can only select fly frames, so we ignore (should: return
+ // false) all other attempts at child selection
+ sal_Bool bRet = sal_False;
+ SwFEShell* pFEShell = GetFEShell();
+ if( pFEShell != NULL )
+ {
+ const SdrObject *pObj = aChild.GetDrawObject();
+ if( pObj )
+ {
+ bRet = rContext.Select( const_cast< SdrObject *>( pObj ), 0==aChild.GetSwFrm());
+ }
+ }
+ // no frame shell, or no frame, or no fly frame -> can't select
+
+ // return bRet;
+}
+
+sal_Bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // Get the respective child as SwFrm (also do index checking), ...
+ const SwAccessibleChild aChild = rContext.GetChild( *(rContext.GetMap()),
+ nChildIndex );
+ if( !aChild.IsValid() )
+ throwIndexOutOfBoundsException();
+
+ // ... and compare to the currently selected frame
+ sal_Bool bRet = sal_False;
+ SwFEShell* pFEShell = GetFEShell();
+ if( pFEShell )
+ {
+ if ( aChild.GetSwFrm() != 0 )
+ {
+ bRet = (pFEShell->GetCurrFlyFrm() == aChild.GetSwFrm());
+ }
+ else if ( aChild.GetDrawObject() )
+ {
+ bRet = pFEShell->IsObjSelected( *aChild.GetDrawObject() );
+ }
+ }
+
+ return bRet;
+}
+
+void SwAccessibleSelectionHelper::clearAccessibleSelection( )
+ throw ( RuntimeException )
+{
+ // return sal_False // we can't deselect
+}
+
+void SwAccessibleSelectionHelper::selectAllAccessibleChildren( )
+ throw ( RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // We can select only one. So iterate over the children to find
+ // the first we can select, and select it.
+
+ SwFEShell* pFEShell = GetFEShell();
+ if( pFEShell )
+ {
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
+
+ ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin();
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end();
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& rChild = *aIter;
+ const SdrObject* pObj = rChild.GetDrawObject();
+ const SwFrm* pFrm = rChild.GetSwFrm();
+ if( pObj && !(pFrm != 0 && pFEShell->IsObjSelected()) )
+ {
+ rContext.Select( const_cast< SdrObject *>( pObj ), 0==pFrm );
+ if( pFrm )
+ break;
+ }
+ ++aIter;
+ }
+ }
+}
+
+sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
+ throw ( RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ sal_Int32 nCount = 0;
+ // Only one frame can be selected at a time, and we only frames
+ // for selectable children.
+ SwFEShell* pFEShell = GetFEShell();
+ if( pFEShell != 0 )
+ {
+ const SwFlyFrm* pFlyFrm = pFEShell->GetCurrFlyFrm();
+ if( pFlyFrm )
+ {
+ if( rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
+ rContext.GetFrm() )
+ {
+ nCount = 1;
+ }
+ }
+ else
+ {
+ sal_uInt16 nSelObjs = pFEShell->IsObjSelected();
+ if( nSelObjs > 0 )
+ {
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
+
+ ::std::list< SwAccessibleChild >::const_iterator aIter =
+ aChildren.begin();
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter =
+ aChildren.end();
+ while( aIter != aEndIter && nCount < nSelObjs )
+ {
+ const SwAccessibleChild& rChild = *aIter;
+ if( rChild.GetDrawObject() && !rChild.GetSwFrm() &&
+ rContext.GetParent(rChild, rContext.IsInPagePreview())
+ == rContext.GetFrm() &&
+ pFEShell->IsObjSelected( *rChild.GetDrawObject() ) )
+ {
+ nCount++;
+ }
+ ++aIter;
+ }
+ }
+ }
+ }
+ return nCount;
+}
+
+Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ // Since the index is relative to the selected children, and since
+ // there can be at most one selected frame child, the index must
+ // be 0, and a selection must exist, otherwise we have to throw an
+ // lang::IndexOutOfBoundsException
+ SwFEShell* pFEShell = GetFEShell();
+ if( 0 == pFEShell )
+ throwIndexOutOfBoundsException();
+
+ SwAccessibleChild aChild;
+ const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm();
+ if( pFlyFrm )
+ {
+ if( 0 == nSelectedChildIndex &&
+ rContext.GetParent( SwAccessibleChild(pFlyFrm), rContext.IsInPagePreview()) ==
+ rContext.GetFrm() )
+ {
+ aChild = pFlyFrm;
+ }
+ }
+ else
+ {
+ sal_uInt16 nSelObjs = pFEShell->IsObjSelected();
+ if( 0 == nSelObjs || nSelectedChildIndex >= nSelObjs )
+ throwIndexOutOfBoundsException();
+
+ ::std::list< SwAccessibleChild > aChildren;
+ rContext.GetChildren( *(rContext.GetMap()), aChildren );
+
+ ::std::list< SwAccessibleChild >::const_iterator aIter = aChildren.begin();
+ ::std::list< SwAccessibleChild >::const_iterator aEndIter = aChildren.end();
+ while( aIter != aEndIter && !aChild.IsValid() )
+ {
+ const SwAccessibleChild& rChild = *aIter;
+ if( rChild.GetDrawObject() && !rChild.GetSwFrm() &&
+ rContext.GetParent(rChild, rContext.IsInPagePreview()) ==
+ rContext.GetFrm() &&
+ pFEShell->IsObjSelected( *rChild.GetDrawObject() ) )
+ {
+ if( 0 == nSelectedChildIndex )
+ aChild = rChild;
+ else
+ --nSelectedChildIndex;
+ }
+ ++aIter;
+ }
+ }
+
+ if( !aChild.IsValid() )
+ throwIndexOutOfBoundsException();
+
+ DBG_ASSERT( rContext.GetMap() != NULL, "We need the map." );
+ Reference< XAccessible > xChild;
+ if( aChild.GetSwFrm() )
+ {
+ ::vos::ORef < SwAccessibleContext > xChildImpl(
+ rContext.GetMap()->GetContextImpl( aChild.GetSwFrm(),
+ sal_True ) );
+ if( xChildImpl.isValid() )
+ {
+ xChildImpl->SetParent( &rContext );
+ xChild = xChildImpl.getBodyPtr();
+ }
+ }
+ else if ( aChild.GetDrawObject() )
+ {
+ ::vos::ORef < ::accessibility::AccessibleShape > xChildImpl(
+ rContext.GetMap()->GetContextImpl( aChild.GetDrawObject(),
+ &rContext, sal_True ) );
+ if( xChildImpl.isValid() )
+ xChild = xChildImpl.getBodyPtr();
+ }
+ return xChild;
+}
+
+// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+void SwAccessibleSelectionHelper::deselectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ RuntimeException )
+{
+ // return sal_False // we can't deselect
+ if( nChildIndex < 0 ||
+ nChildIndex >= rContext.GetChildCount( *(rContext.GetMap()) ) )
+ throwIndexOutOfBoundsException();
+}
diff --git a/sw/source/core/access/accselectionhelper.hxx b/sw/source/core/access/accselectionhelper.hxx
new file mode 100644
index 000000000000..ff0833d25ed6
--- /dev/null
+++ b/sw/source/core/access/accselectionhelper.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCSELECTIONHELPER_HXX_
+#define _ACCSELECTIONHELPER_HXX_
+class SwAccessibleContext;
+class SwFEShell;
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+
+class SwAccessibleSelectionHelper
+{
+ /// the context on which this helper works
+ SwAccessibleContext& rContext;
+
+
+ /// get FE-Shell
+ SwFEShell* GetFEShell();
+
+ void throwIndexOutOfBoundsException()
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+public:
+
+ SwAccessibleSelectionHelper( SwAccessibleContext& rContext );
+ ~SwAccessibleSelectionHelper();
+
+
+ //===== XAccessibleSelection ============================================
+
+ void selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ sal_Bool isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ void clearAccessibleSelection( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ void selectAllAccessibleChildren( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ sal_Int32 getSelectedAccessibleChildCount( )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > 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.
+ void deselectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+};
+
+
+#endif
+
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
new file mode 100644
index 000000000000..fd788574aad7
--- /dev/null
+++ b/sw/source/core/access/acctable.cxx
@@ -0,0 +1,1804 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <rtl/uuid.h>
+#include <rtl/ustrbuf.hxx>
+
+#include <list>
+#include <set>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
+#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <vcl/svapp.hxx>
+#include <frmfmt.hxx>
+#include <tabfrm.hxx>
+#include <rowfrm.hxx>
+#include <cellfrm.hxx>
+#include <swtable.hxx>
+#include <crsrsh.hxx>
+#include <viscrs.hxx>
+#include <hints.hxx>
+#include <fesh.hxx>
+#include <accfrmobjslist.hxx>
+#include <accmap.hxx>
+#include <access.hrc>
+#include <acctable.hxx>
+
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using namespace ::sw::access;
+
+const sal_Char sServiceName[] = "com.sun.star.table.AccessibleTableView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleTableView";
+
+typedef ::std::less < sal_Int32 > Int32Less_Impl;
+typedef ::std::set < sal_Int32, Int32Less_Impl > Int32Set_Impl;
+
+typedef ::std::pair < sal_Int32, sal_Int32 > Int32Pair_Impl;
+typedef ::std::list < Int32Pair_Impl > Int32PairList_Impl;
+
+class SwAccTableSelHander_Impl
+{
+public:
+ virtual void Unselect( sal_Int32 nRowOrCol, sal_Int32 nExt ) = 0;
+};
+
+
+//------------------------------------------------------------------------------
+
+class SwAccessibleTableData_Impl
+{
+ SwAccessibleMap& mrAccMap;
+ Int32Set_Impl maRows;
+ Int32Set_Impl maColumns;
+ Int32PairList_Impl maExtents; // cell extends for event processing only
+ Point maTabFrmPos;
+ const SwTabFrm *mpTabFrm;
+ sal_Bool mbIsInPagePreview;
+ bool mbOnlyTableColumnHeader;
+
+ void CollectData( const SwFrm *pFrm );
+ void CollectExtents( const SwFrm *pFrm );
+
+ sal_Bool FindCell( const Point& rPos, const SwFrm *pFrm ,
+ sal_Bool bExact, const SwFrm *& rFrm ) const;
+
+ void GetSelection( const Point& rTabPos, const SwRect& rArea,
+ const SwSelBoxes& rSelBoxes, const SwFrm *pFrm,
+ SwAccTableSelHander_Impl& rSelHdl,
+ sal_Bool bColumns ) const;
+
+ // --> OD 2007-06-27 #i77106#
+ inline bool IncludeRow( const SwFrm& rFrm ) const
+ {
+ return !mbOnlyTableColumnHeader ||
+ mpTabFrm->IsInHeadline( rFrm );
+ }
+ // <--
+public:
+ // --> OD 2007-06-27 #i77106#
+ // add third optional parameter <bOnlyTableColumnHeader>, default value <false>
+ SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
+ const SwTabFrm *pTabFrm,
+ sal_Bool bIsInPagePreview,
+ bool bOnlyTableColumnHeader = false );
+ // <--
+
+ const Int32Set_Impl& GetRows() const { return maRows; }
+ const Int32Set_Impl& GetColumns() const { return maColumns; }
+
+ inline Int32Set_Impl::const_iterator GetRowIter( sal_Int32 nRow ) const;
+ inline Int32Set_Impl::const_iterator GetColumnIter( sal_Int32 nCol ) const;
+
+ const SwFrm *GetCell( sal_Int32 nRow, sal_Int32 nColumn, sal_Bool bExact,
+ SwAccessibleTable *pThis ) const
+ throw(lang::IndexOutOfBoundsException );
+ const SwFrm *GetCellAtPos( sal_Int32 nLeft, sal_Int32 nTop,
+ sal_Bool bExact ) const;
+ inline sal_Int32 GetRowCount() const;
+ inline sal_Int32 GetColumnCount() const;
+ sal_Bool CompareExtents( const SwAccessibleTableData_Impl& r ) const;
+
+ void GetSelection( sal_Int32 nStart, sal_Int32 nEnd,
+ const SwSelBoxes& rSelBoxes,
+ SwAccTableSelHander_Impl& rSelHdl,
+ sal_Bool bColumns ) const;
+
+ void CheckRowAndCol( sal_Int32 nRow, sal_Int32 nCol,
+ SwAccessibleTable *pThis ) const
+ throw(lang::IndexOutOfBoundsException );
+
+ void GetRowColumnAndExtent( const SwRect& rBox,
+ sal_Int32& rRow, sal_Int32& rColumn,
+ sal_Int32& rRowExtent,
+ sal_Int32& rColumnExtent ) const;
+
+ const Point& GetTablePos() const { return maTabFrmPos; }
+ void SetTablePos( const Point& rPos ) { maTabFrmPos = rPos; }
+};
+
+void SwAccessibleTableData_Impl::CollectData( const SwFrm *pFrm )
+{
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ if( pLower->IsRowFrm() )
+ {
+ // --> OD 2007-06-27 #i77106#
+ if ( IncludeRow( *pLower ) )
+ {
+ maRows.insert( pLower->Frm().Top() - maTabFrmPos.Y() );
+ CollectData( pLower );
+ }
+ // <--
+ }
+ else if( pLower->IsCellFrm() &&
+ rLower.IsAccessible( mbIsInPagePreview ) )
+ {
+ maColumns.insert( pLower->Frm().Left() - maTabFrmPos.X() );
+ }
+ else
+ {
+ CollectData( pLower );
+ }
+ }
+ ++aIter;
+ }
+}
+
+void SwAccessibleTableData_Impl::CollectExtents( const SwFrm *pFrm )
+{
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ if( pLower )
+ {
+ if( pLower->IsCellFrm() &&
+ rLower.IsAccessible( mbIsInPagePreview ) )
+ {
+ sal_Int32 nRow, nCol;
+ Int32Pair_Impl aCellExtents;
+ GetRowColumnAndExtent( pLower->Frm(), nRow, nCol,
+ aCellExtents.first,
+ aCellExtents.second );
+
+ maExtents.push_back( aCellExtents );
+ }
+ else
+ {
+ // --> OD 2007-06-27 #i77106#
+ if ( !pLower->IsRowFrm() ||
+ IncludeRow( *pLower ) )
+ {
+ CollectExtents( pLower );
+ }
+ // <--
+ }
+ }
+ ++aIter;
+ }
+}
+
+sal_Bool SwAccessibleTableData_Impl::FindCell(
+ const Point& rPos, const SwFrm *pFrm, sal_Bool bExact,
+ const SwFrm *& rRet ) const
+{
+ sal_Bool bFound = sal_False;
+
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
+ while( !bFound && aIter != aEndIter )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ ASSERT( pLower, "child should be a frame" );
+ if( pLower )
+ {
+ if( rLower.IsAccessible( mbIsInPagePreview ) )
+ {
+ ASSERT( pLower->IsCellFrm(), "lower is not a cell frame" );
+ const SwRect& rFrm = pLower->Frm();
+ if( rFrm.Right() >= rPos.X() && rFrm.Bottom() >= rPos.Y() )
+ {
+ // We have found the cell
+ ASSERT( rFrm.Left() <= rPos.X() && rFrm.Top() <= rPos.Y(),
+ "find frame moved to far!" );
+ bFound = sal_True;
+ if( !bExact ||
+ (rFrm.Top() == rPos.Y() && rFrm.Left() == rPos.Y() ) )
+ {
+ rRet = pLower;
+ }
+ }
+ }
+ else
+ {
+ // --> OD 2007-06-27 #i77106#
+ if ( !pLower->IsRowFrm() ||
+ IncludeRow( *pLower ) )
+ {
+ bFound = FindCell( rPos, pLower, bExact, rRet );
+ }
+ // <--
+ }
+ }
+ ++aIter;
+ }
+
+ return bFound;
+}
+
+void SwAccessibleTableData_Impl::GetSelection(
+ const Point& rTabPos,
+ const SwRect& rArea,
+ const SwSelBoxes& rSelBoxes,
+ const SwFrm *pFrm,
+ SwAccTableSelHander_Impl& rSelHdl,
+ sal_Bool bColumns ) const
+{
+ const SwAccessibleChildSList aList( *pFrm, mrAccMap );
+ SwAccessibleChildSList::const_iterator aIter( aList.begin() );
+ SwAccessibleChildSList::const_iterator aEndIter( aList.end() );
+ while( aIter != aEndIter )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ const SwFrm *pLower = rLower.GetSwFrm();
+ ASSERT( pLower, "child should be a frame" );
+ const SwRect& rBox = rLower.GetBox( mrAccMap );
+ if( pLower && rBox.IsOver( rArea ) )
+ {
+ if( rLower.IsAccessible( mbIsInPagePreview ) )
+ {
+ ASSERT( pLower->IsCellFrm(), "lower is not a cell frame" );
+ const SwCellFrm *pCFrm =
+ static_cast < const SwCellFrm * >( pLower );
+ SwTableBox *pBox =
+ const_cast< SwTableBox *>( pCFrm->GetTabBox() ); //SVPtrArr!
+ if( !rSelBoxes.Seek_Entry( pBox ) )
+ {
+ const Int32Set_Impl rRowsOrCols =
+ bColumns ? maColumns : maRows;
+
+ sal_Int32 nPos = bColumns ? (rBox.Left() - rTabPos.X())
+ : (rBox.Top() - rTabPos.Y());
+ Int32Set_Impl::const_iterator aSttRowOrCol(
+ rRowsOrCols.lower_bound( nPos ) );
+ sal_Int32 nRowOrCol =
+ static_cast< sal_Int32 >( ::std::distance(
+ rRowsOrCols.begin(), aSttRowOrCol ) );
+
+ nPos = bColumns ? (rBox.Right() - rTabPos.X())
+ : (rBox.Bottom() - rTabPos.Y());
+ Int32Set_Impl::const_iterator aEndRowOrCol(
+ rRowsOrCols.upper_bound( nPos ) );
+ sal_Int32 nExt =
+ static_cast< sal_Int32 >( ::std::distance(
+ aSttRowOrCol, aEndRowOrCol ) );
+
+ rSelHdl.Unselect( nRowOrCol, nExt );
+ }
+ }
+ else
+ {
+ // --> OD 2007-06-27 #i77106#
+ if ( !pLower->IsRowFrm() ||
+ IncludeRow( *pLower ) )
+ {
+ GetSelection( rTabPos, rArea, rSelBoxes, pLower, rSelHdl,
+ bColumns );
+ }
+ // <--
+ }
+ }
+ ++aIter;
+ }
+}
+
+const SwFrm *SwAccessibleTableData_Impl::GetCell(
+ sal_Int32 nRow, sal_Int32 nColumn, sal_Bool,
+ SwAccessibleTable *pThis ) const
+ throw(lang::IndexOutOfBoundsException )
+{
+ CheckRowAndCol( nRow, nColumn, pThis );
+
+ Int32Set_Impl::const_iterator aSttCol( GetColumnIter( nColumn ) );
+ Int32Set_Impl::const_iterator aSttRow( GetRowIter( nRow ) );
+ const SwFrm *pCellFrm = GetCellAtPos( *aSttCol, *aSttRow, sal_False );
+
+ return pCellFrm;
+}
+
+void SwAccessibleTableData_Impl::GetSelection(
+ sal_Int32 nStart, sal_Int32 nEnd,
+ const SwSelBoxes& rSelBoxes,
+ SwAccTableSelHander_Impl& rSelHdl,
+ sal_Bool bColumns ) const
+{
+ SwRect aArea( mpTabFrm->Frm() );
+ Point aPos( aArea.Pos() );
+
+ const Int32Set_Impl& rRowsOrColumns = bColumns ? maColumns : maRows;
+ if( nStart > 0 )
+ {
+ Int32Set_Impl::const_iterator aStt( rRowsOrColumns.begin() );
+ ::std::advance( aStt,
+ static_cast< Int32Set_Impl::difference_type >( nStart ) );
+ if( bColumns )
+ aArea.Left( *aStt + aPos.X() );
+ else
+ aArea.Top( *aStt + aPos.Y() );
+ }
+ if( nEnd < static_cast< sal_Int32 >( rRowsOrColumns.size() ) )
+ {
+ Int32Set_Impl::const_iterator aEnd( rRowsOrColumns.begin() );
+ ::std::advance( aEnd,
+ static_cast< Int32Set_Impl::difference_type >( nEnd ) );
+ if( bColumns )
+ aArea.Right( *aEnd + aPos.X() - 1 );
+ else
+ aArea.Bottom( *aEnd + aPos.Y() - 1 );
+ }
+
+ GetSelection( aPos, aArea, rSelBoxes, mpTabFrm, rSelHdl, bColumns );
+}
+
+const SwFrm *SwAccessibleTableData_Impl::GetCellAtPos(
+ sal_Int32 nLeft, sal_Int32 nTop, sal_Bool bExact ) const
+{
+ Point aPos( mpTabFrm->Frm().Pos() );
+ aPos.Move( nLeft, nTop );
+ const SwFrm *pRet = 0;
+ FindCell( aPos, mpTabFrm, bExact, pRet );
+
+ return pRet;
+}
+
+inline sal_Int32 SwAccessibleTableData_Impl::GetRowCount() const
+{
+ return static_cast< sal_Int32 >( maRows.size() );
+}
+
+inline sal_Int32 SwAccessibleTableData_Impl::GetColumnCount() const
+{
+ return static_cast< sal_Int32 >( maColumns.size() );
+}
+
+sal_Bool SwAccessibleTableData_Impl::CompareExtents(
+ const SwAccessibleTableData_Impl& rCmp ) const
+{
+ if( maExtents.size() != rCmp.maExtents.size() )
+ return sal_False;
+
+ Int32PairList_Impl::const_iterator aIter( maExtents.begin() );
+ Int32PairList_Impl::const_iterator aEndIter( maExtents.end() );
+ Int32PairList_Impl::const_iterator aCmpIter( rCmp.maExtents.begin() );
+ while( aIter != aEndIter )
+ {
+ if( *aIter != *aCmpIter )
+ return sal_False;
+
+ ++aIter;
+ ++aCmpIter;
+ }
+
+ return sal_True;
+}
+
+SwAccessibleTableData_Impl::SwAccessibleTableData_Impl( SwAccessibleMap& rAccMap,
+ const SwTabFrm *pTabFrm,
+ sal_Bool bIsInPagePreview,
+ bool bOnlyTableColumnHeader )
+ : mrAccMap( rAccMap )
+ , maTabFrmPos( pTabFrm->Frm().Pos() )
+ , mpTabFrm( pTabFrm )
+ , mbIsInPagePreview( bIsInPagePreview )
+ , mbOnlyTableColumnHeader( bOnlyTableColumnHeader )
+{
+ CollectData( mpTabFrm );
+ CollectExtents( mpTabFrm );
+}
+
+inline Int32Set_Impl::const_iterator SwAccessibleTableData_Impl::GetRowIter(
+ sal_Int32 nRow ) const
+{
+ Int32Set_Impl::const_iterator aCol( GetRows().begin() );
+ if( nRow > 0 )
+ {
+ ::std::advance( aCol,
+ static_cast< Int32Set_Impl::difference_type >( nRow ) );
+ }
+ return aCol;
+}
+
+inline Int32Set_Impl::const_iterator SwAccessibleTableData_Impl::GetColumnIter(
+ sal_Int32 nColumn ) const
+{
+ Int32Set_Impl::const_iterator aCol = GetColumns().begin();
+ if( nColumn > 0 )
+ {
+ ::std::advance( aCol,
+ static_cast< Int32Set_Impl::difference_type >( nColumn ) );
+ }
+ return aCol;
+}
+
+void SwAccessibleTableData_Impl::CheckRowAndCol(
+ sal_Int32 nRow, sal_Int32 nCol, SwAccessibleTable *pThis ) const
+ throw(lang::IndexOutOfBoundsException )
+{
+ if( ( nRow < 0 || nRow >= static_cast< sal_Int32 >( maRows.size() ) ) ||
+ ( nCol < 0 || nCol >= static_cast< sal_Int32 >( maColumns.size() ) ) )
+ {
+ uno::Reference < XAccessibleTable > xThis( pThis );
+ lang::IndexOutOfBoundsException aExcept(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "row or column index out of range") ),
+ xThis );
+ throw aExcept;
+ }
+}
+
+void SwAccessibleTableData_Impl::GetRowColumnAndExtent(
+ const SwRect& rBox,
+ sal_Int32& rRow, sal_Int32& rColumn,
+ sal_Int32& rRowExtent, sal_Int32& rColumnExtent ) const
+{
+ Int32Set_Impl::const_iterator aStt(
+ maRows.lower_bound( rBox.Top() - maTabFrmPos.Y() ) );
+ Int32Set_Impl::const_iterator aEnd(
+ maRows.upper_bound( rBox.Bottom() - maTabFrmPos.Y() ) );
+ rRow =
+ static_cast< sal_Int32 >( ::std::distance( maRows.begin(), aStt ) );
+ rRowExtent =
+ static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
+
+ aStt = maColumns.lower_bound( rBox.Left() - maTabFrmPos.X() );
+ aEnd = maColumns.upper_bound( rBox.Right() - maTabFrmPos.X() );
+ rColumn =
+ static_cast< sal_Int32 >( ::std::distance( maColumns.begin(), aStt ) );
+ rColumnExtent =
+ static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
+}
+
+//------------------------------------------------------------------------------
+
+class SwAccSingleTableSelHander_Impl : public SwAccTableSelHander_Impl
+{
+ sal_Bool bSelected;
+
+public:
+
+ inline SwAccSingleTableSelHander_Impl();
+
+ inline sal_Bool IsSelected() const { return bSelected; }
+
+ virtual void Unselect( sal_Int32, sal_Int32 );
+};
+
+inline SwAccSingleTableSelHander_Impl::SwAccSingleTableSelHander_Impl() :
+ bSelected( sal_True )
+{
+}
+
+void SwAccSingleTableSelHander_Impl::Unselect( sal_Int32, sal_Int32 )
+{
+ bSelected = sal_False;
+}
+
+//------------------------------------------------------------------------------
+
+class SwAccAllTableSelHander_Impl : public SwAccTableSelHander_Impl
+
+{
+ ::std::vector< sal_Bool > aSelected;
+ sal_Int32 nCount;
+
+public:
+
+ inline SwAccAllTableSelHander_Impl( sal_Int32 nSize );
+
+ uno::Sequence < sal_Int32 > GetSelSequence();
+
+ virtual void Unselect( sal_Int32 nRowOrCol, sal_Int32 nExt );
+ virtual ~SwAccAllTableSelHander_Impl();
+};
+
+SwAccAllTableSelHander_Impl::~SwAccAllTableSelHander_Impl()
+{
+}
+
+inline SwAccAllTableSelHander_Impl::SwAccAllTableSelHander_Impl( sal_Int32 nSize ) :
+ aSelected( nSize, sal_True ),
+ nCount( nSize )
+{
+}
+
+uno::Sequence < sal_Int32 > SwAccAllTableSelHander_Impl::GetSelSequence()
+{
+ ASSERT( nCount >= 0, "underflow" );
+ uno::Sequence < sal_Int32 > aRet( nCount );
+ sal_Int32 *pRet = aRet.getArray();
+ sal_Int32 nPos = 0;
+ size_t nSize = aSelected.size();
+ for( size_t i=0; i < nSize && nPos < nCount; i++ )
+ {
+ if( aSelected[i] )
+ {
+ *pRet++ = i;
+ nPos++;
+ }
+ }
+
+ ASSERT( nPos == nCount, "count is wrong" );
+
+ return aRet;
+}
+
+void SwAccAllTableSelHander_Impl::Unselect( sal_Int32 nRowOrCol,
+ sal_Int32 nExt )
+{
+ ASSERT( static_cast< size_t >( nRowOrCol ) < aSelected.size(),
+ "index to large" );
+ ASSERT( static_cast< size_t >( nRowOrCol+nExt ) <= aSelected.size(),
+ "extent to large" );
+ while( nExt )
+ {
+ if( aSelected[static_cast< size_t >( nRowOrCol )] )
+ {
+ aSelected[static_cast< size_t >( nRowOrCol )] = sal_False;
+ nCount--;
+ }
+ nExt--;
+ nRowOrCol++;
+ }
+}
+
+//------------------------------------------------------------------------------
+
+const SwSelBoxes *SwAccessibleTable::GetSelBoxes() const
+{
+ const SwSelBoxes *pSelBoxes = 0;
+ const SwCrsrShell *pCSh = GetCrsrShell();
+ if( (pCSh != NULL) && pCSh->IsTableMode() )
+ {
+ pSelBoxes = &pCSh->GetTableCrsr()->GetBoxes();
+ }
+
+ return pSelBoxes;
+}
+
+void SwAccessibleTable::FireTableChangeEvent(
+ const SwAccessibleTableData_Impl& rTableData )
+{
+ AccessibleTableModelChange aModelChange;
+ aModelChange.Type = AccessibleTableModelChangeType::UPDATE;
+ aModelChange.FirstRow = 0;
+ aModelChange.LastRow = rTableData.GetRowCount() - 1;
+ aModelChange.FirstColumn = 0;
+ aModelChange.LastColumn = rTableData.GetColumnCount() - 1;
+
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::TABLE_MODEL_CHANGED;
+ aEvent.NewValue <<= aModelChange;
+
+ FireAccessibleEvent( aEvent );
+}
+
+
+const SwTableBox* SwAccessibleTable::GetTableBox( sal_Int32 nChildIndex ) const
+{
+ DBG_ASSERT( nChildIndex >= 0, "Illegal child index." );
+ // --> OD 2007-06-27 #i77106#
+ DBG_ASSERT( nChildIndex < const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(), "Illegal child index." );
+ // <--
+
+ const SwTableBox* pBox = NULL;
+
+ // get table box for 'our' table cell
+ SwAccessibleChild aCell( GetChild( *(const_cast<SwAccessibleMap*>(GetMap())), nChildIndex ) );
+ if( aCell.GetSwFrm() )
+ {
+ const SwFrm* pChildFrm = aCell.GetSwFrm();
+ if( (pChildFrm != NULL) && pChildFrm->IsCellFrm() )
+ {
+ const SwCellFrm* pCellFrm =
+ static_cast<const SwCellFrm*>( pChildFrm );
+ pBox = pCellFrm->GetTabBox();
+ }
+ }
+
+ DBG_ASSERT( pBox != NULL, "We need the table box." );
+ return pBox;
+}
+
+sal_Bool SwAccessibleTable::IsChildSelected( sal_Int32 nChildIndex ) const
+{
+ sal_Bool bRet = sal_False;
+ const SwSelBoxes* pSelBoxes = GetSelBoxes();
+ if( pSelBoxes )
+ {
+ const SwTableBox* pBox = GetTableBox( nChildIndex );
+ DBG_ASSERT( pBox != NULL, "We need the table box." );
+ bRet = pSelBoxes->Seek_Entry( const_cast<SwTableBox*>( pBox ) );
+ }
+
+ return bRet;
+}
+
+sal_Int32 SwAccessibleTable::GetIndexOfSelectedChild(
+ sal_Int32 nSelectedChildIndex ) const
+{
+ // iterate over all children to n-th isAccessibleChildSelected()
+ // --> OD 2007-06-27 #i77106#
+ sal_Int32 nChildren = const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount();
+ // <--
+ if( nSelectedChildIndex >= nChildren )
+ return -1L;
+
+ sal_Int32 n = 0;
+ while( n < nChildren )
+ {
+ if( IsChildSelected( n ) )
+ {
+ if( 0 == nSelectedChildIndex )
+ break;
+ else
+ --nSelectedChildIndex;
+ }
+ ++n;
+ }
+
+ return n < nChildren ? n : -1L;
+}
+
+void SwAccessibleTable::GetStates(
+ ::utl::AccessibleStateSetHelper& rStateSet )
+{
+ SwAccessibleContext::GetStates( rStateSet );
+
+ // MULTISELECTABLE
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell )
+ rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
+}
+
+SwAccessibleTable::SwAccessibleTable(
+ SwAccessibleMap* pInitMap,
+ const SwTabFrm* pTabFrm ) :
+ SwAccessibleContext( pInitMap, AccessibleRole::TABLE, pTabFrm ),
+ mpTableData( 0 )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
+ const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
+ const String& rName = pFrmFmt->GetName();
+
+ OUStringBuffer aBuffer( rName.Len() + 4 );
+ aBuffer.append( OUString(rName) );
+ aBuffer.append( static_cast<sal_Unicode>( '-' ) );
+ aBuffer.append( static_cast<sal_Int32>( pTabFrm->GetPhyPageNum() ) );
+
+ SetName( aBuffer.makeStringAndClear() );
+
+ OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )
+ ->GetFmt()->GetName() );
+ OUString sArg2( GetFormattedPageNumber() );
+
+ sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
+}
+
+SwAccessibleTable::~SwAccessibleTable()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ delete mpTableData;
+}
+
+void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
+{
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() );
+ switch( nWhich )
+ {
+ case RES_NAME_CHANGED:
+ if( pTabFrm )
+ {
+ const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
+ ASSERT( pFrmFmt == GetRegisteredIn(), "invalid frame" );
+
+ OUString sOldName( GetName() );
+
+ const String& rNewTabName = pFrmFmt->GetName();
+ OUStringBuffer aBuffer( rNewTabName.Len() + 4 );
+ aBuffer.append( OUString(rNewTabName) );
+ aBuffer.append( static_cast<sal_Unicode>( '-' ) );
+ aBuffer.append( static_cast<sal_Int32>( pTabFrm->GetPhyPageNum() ) );
+
+ SetName( aBuffer.makeStringAndClear() );
+ if( sOldName != GetName() )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+ aEvent.OldValue <<= sOldName;
+ aEvent.NewValue <<= GetName();
+ FireAccessibleEvent( aEvent );
+ }
+
+ OUString sOldDesc( sDesc );
+ OUString sArg1( rNewTabName );
+ OUString sArg2( GetFormattedPageNumber() );
+
+ sDesc = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
+ if( sDesc != sOldDesc )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::DESCRIPTION_CHANGED;
+ aEvent.OldValue <<= sOldDesc;
+ aEvent.NewValue <<= sDesc;
+ FireAccessibleEvent( aEvent );
+ }
+ }
+ break;
+
+ case RES_OBJECTDYING:
+ // mba: it seems that this class intentionally does not call code in base class SwClient
+ if( GetRegisteredIn() ==
+ static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ GetRegisteredInNonConst()->Remove( this );
+ break;
+
+ default:
+ // mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
+ break;
+ }
+}
+
+uno::Any SwAccessibleTable::queryInterface( const uno::Type& rType )
+ throw (uno::RuntimeException)
+{
+ uno::Any aRet;
+ if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleTable > * >( 0 ) ) )
+ {
+ uno::Reference<XAccessibleTable> xThis( this );
+ aRet <<= xThis;
+ }
+ else if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ) )
+ {
+ uno::Reference<XAccessibleSelection> xSelection( this );
+ aRet <<= xSelection;
+ }
+ else
+ {
+ aRet = SwAccessibleContext::queryInterface(rType);
+ }
+
+ return aRet;
+}
+
+//====== XTypeProvider ====================================================
+uno::Sequence< uno::Type > SAL_CALL SwAccessibleTable::getTypes()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< uno::Type > aTypes( SwAccessibleContext::getTypes() );
+
+ sal_Int32 nIndex = aTypes.getLength();
+ aTypes.realloc( nIndex + 2 );
+
+ uno::Type* pTypes = aTypes.getArray();
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
+ pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTable > * >( 0 ) );
+
+ return aTypes;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SwAccessibleTable::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;
+}
+
+// --> OD 2007-06-28 #i77106#
+SwAccessibleTableData_Impl* SwAccessibleTable::CreateNewTableData()
+{
+ const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
+ return new SwAccessibleTableData_Impl( *GetMap(), pTabFrm, IsInPagePreview() );
+}
+// <--
+
+void SwAccessibleTable::UpdateTableData()
+{
+ // --> OD 2007-06-28 #i77106# - usage of new method <CreateNewTableData()>
+ delete mpTableData;
+ mpTableData = CreateNewTableData();
+ // <--
+}
+
+void SwAccessibleTable::ClearTableData()
+{
+ delete mpTableData;
+ mpTableData = 0;
+}
+
+OUString SAL_CALL SwAccessibleTable::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ return sDesc;
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowCount()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ return GetTableData().GetRowCount();
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnCount( )
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ return GetTableData().GetColumnCount();
+}
+
+OUString SAL_CALL SwAccessibleTable::getAccessibleRowDescription(
+ sal_Int32 nRow )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ // --> OD 2010-03-10 #i87532#
+ // determine table cell in <nRow>th row and in first column of row header table
+ // and return its text content.
+ OUString sRowDesc;
+
+ GetTableData().CheckRowAndCol(nRow, 0, this);
+
+ uno::Reference< XAccessibleTable > xTableRowHeader = getAccessibleRowHeaders();
+ if ( xTableRowHeader.is() )
+ {
+ uno::Reference< XAccessible > xRowHeaderCell =
+ xTableRowHeader->getAccessibleCellAt( nRow, 0 );
+ ASSERT( xRowHeaderCell.is(),
+ "<SwAccessibleTable::getAccessibleRowDescription(..)> - missing row header cell -> serious issue." );
+ uno::Reference< XAccessibleContext > xRowHeaderCellContext =
+ xRowHeaderCell->getAccessibleContext();
+ const sal_Int32 nCellChildCount( xRowHeaderCellContext->getAccessibleChildCount() );
+ for ( sal_Int32 nChildIndex = 0; nChildIndex < nCellChildCount; ++nChildIndex )
+ {
+ uno::Reference< XAccessible > xChild = xRowHeaderCellContext->getAccessibleChild( nChildIndex );
+ uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY );
+ if ( xChildText.is() )
+ {
+ sRowDesc = sRowDesc + xChildText->getText();
+ }
+ }
+ }
+
+ return sRowDesc;
+ // <--
+}
+
+OUString SAL_CALL SwAccessibleTable::getAccessibleColumnDescription(
+ sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ // --> OD 2010-03-10 #i87532#
+ // determine table cell in first row and in <nColumn>th column of column header table
+ // and return its text content.
+ OUString sColumnDesc;
+
+ GetTableData().CheckRowAndCol(0, nColumn, this);
+
+ uno::Reference< XAccessibleTable > xTableColumnHeader = getAccessibleColumnHeaders();
+ if ( xTableColumnHeader.is() )
+ {
+ uno::Reference< XAccessible > xColumnHeaderCell =
+ xTableColumnHeader->getAccessibleCellAt( 0, nColumn );
+ ASSERT( xColumnHeaderCell.is(),
+ "<SwAccessibleTable::getAccessibleColumnDescription(..)> - missing column header cell -> serious issue." );
+ uno::Reference< XAccessibleContext > xColumnHeaderCellContext =
+ xColumnHeaderCell->getAccessibleContext();
+ const sal_Int32 nCellChildCount( xColumnHeaderCellContext->getAccessibleChildCount() );
+ for ( sal_Int32 nChildIndex = 0; nChildIndex < nCellChildCount; ++nChildIndex )
+ {
+ uno::Reference< XAccessible > xChild = xColumnHeaderCellContext->getAccessibleChild( nChildIndex );
+ uno::Reference< XAccessibleText > xChildText( xChild, uno::UNO_QUERY );
+ if ( xChildText.is() )
+ {
+ sColumnDesc = sColumnDesc + xChildText->getText();
+ }
+ }
+ }
+
+ return sColumnDesc;
+ // <--
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRowExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ sal_Int32 nExtend = -1;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ GetTableData().CheckRowAndCol( nRow, nColumn, this );
+
+ Int32Set_Impl::const_iterator aSttCol(
+ GetTableData().GetColumnIter( nColumn ) );
+ Int32Set_Impl::const_iterator aSttRow(
+ GetTableData().GetRowIter( nRow ) );
+ const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow,
+ sal_False );
+ if( pCellFrm )
+ {
+ sal_Int32 nBottom = pCellFrm->Frm().Bottom();
+ nBottom -= GetFrm()->Frm().Top();
+ Int32Set_Impl::const_iterator aEndRow(
+ GetTableData().GetRows().upper_bound( nBottom ) );
+ nExtend =
+ static_cast< sal_Int32 >( ::std::distance( aSttRow, aEndRow ) );
+ }
+
+ return nExtend;
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumnExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ sal_Int32 nExtend = -1;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ GetTableData().CheckRowAndCol( nRow, nColumn, this );
+
+ Int32Set_Impl::const_iterator aSttCol(
+ GetTableData().GetColumnIter( nColumn ) );
+ Int32Set_Impl::const_iterator aSttRow(
+ GetTableData().GetRowIter( nRow ) );
+ const SwFrm *pCellFrm = GetTableData().GetCellAtPos( *aSttCol, *aSttRow,
+ sal_False );
+ if( pCellFrm )
+ {
+ sal_Int32 nRight = pCellFrm->Frm().Right();
+ nRight -= GetFrm()->Frm().Left();
+ Int32Set_Impl::const_iterator aEndCol(
+ GetTableData().GetColumns().upper_bound( nRight ) );
+ nExtend =
+ static_cast< sal_Int32 >( ::std::distance( aSttCol, aEndCol ) );
+ }
+
+ return nExtend;
+}
+
+uno::Reference< XAccessibleTable > SAL_CALL
+ SwAccessibleTable::getAccessibleRowHeaders( )
+ throw (uno::RuntimeException)
+{
+ // Row headers aren't supported
+ return uno::Reference< XAccessibleTable >();
+}
+
+uno::Reference< XAccessibleTable > SAL_CALL
+ SwAccessibleTable::getAccessibleColumnHeaders( )
+ throw (uno::RuntimeException)
+{
+ // --> OD 2010-03-10 #i87532#
+ // assure that return accesible object is empty, if no column header exists.
+ SwAccessibleTableColHeaders* pTableColHeaders =
+ new SwAccessibleTableColHeaders( GetMap(), static_cast< const SwTabFrm *>( GetFrm() ) );
+ uno::Reference< XAccessibleTable > xTableColumnHeaders( pTableColHeaders );
+ if ( pTableColHeaders->getAccessibleChildCount() <= 0 )
+ {
+ return uno::Reference< XAccessibleTable >();
+ }
+
+ return xTableColumnHeaders;
+ // <--
+}
+
+uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleRows()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ const SwSelBoxes *pSelBoxes = GetSelBoxes();
+ if( pSelBoxes )
+ {
+ sal_Int32 nRows = GetTableData().GetRowCount();
+ SwAccAllTableSelHander_Impl aSelRows( nRows );
+
+ GetTableData().GetSelection( 0, nRows, *pSelBoxes, aSelRows,
+ sal_False );
+
+ return aSelRows.GetSelSequence();
+ }
+ else
+ {
+ return uno::Sequence< sal_Int32 >( 0 );
+ }
+}
+
+uno::Sequence< sal_Int32 > SAL_CALL SwAccessibleTable::getSelectedAccessibleColumns()
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ const SwSelBoxes *pSelBoxes = GetSelBoxes();
+ if( pSelBoxes )
+ {
+ sal_Int32 nCols = GetTableData().GetColumnCount();
+ SwAccAllTableSelHander_Impl aSelCols( nCols );
+
+ GetTableData().GetSelection( 0, nCols, *pSelBoxes, aSelCols, sal_True );
+
+ return aSelCols.GetSelSequence();
+ }
+ else
+ {
+ return uno::Sequence< sal_Int32 >( 0 );
+ }
+}
+
+sal_Bool SAL_CALL SwAccessibleTable::isAccessibleRowSelected( sal_Int32 nRow )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ GetTableData().CheckRowAndCol( nRow, 0, this );
+
+ sal_Bool bRet;
+ const SwSelBoxes *pSelBoxes = GetSelBoxes();
+ if( pSelBoxes )
+ {
+ SwAccSingleTableSelHander_Impl aSelRow;
+ GetTableData().GetSelection( nRow, nRow+1, *pSelBoxes, aSelRow,
+ sal_False );
+ bRet = aSelRow.IsSelected();
+ }
+ else
+ {
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+sal_Bool SAL_CALL SwAccessibleTable::isAccessibleColumnSelected(
+ sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ GetTableData().CheckRowAndCol( 0, nColumn, this );
+
+ sal_Bool bRet;
+ const SwSelBoxes *pSelBoxes = GetSelBoxes();
+ if( pSelBoxes )
+ {
+ SwAccSingleTableSelHander_Impl aSelCol;
+
+ GetTableData().GetSelection( nColumn, nColumn+1, *pSelBoxes, aSelCol,
+ sal_True );
+ bRet = aSelCol.IsSelected();
+ }
+ else
+ {
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCellAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ uno::Reference< XAccessible > xRet;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ const SwFrm *pCellFrm =
+ GetTableData().GetCell( nRow, nColumn, sal_False, this );
+ if( pCellFrm )
+ xRet = GetMap()->GetContext( pCellFrm, sal_True );
+
+ return xRet;
+}
+
+uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleCaption()
+ throw (uno::RuntimeException)
+{
+ // captions aren't supported
+ return uno::Reference< XAccessible >();
+}
+
+uno::Reference< XAccessible > SAL_CALL SwAccessibleTable::getAccessibleSummary()
+ throw (uno::RuntimeException)
+{
+ // summaries aren't supported
+ return uno::Reference< XAccessible >();
+}
+
+sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ sal_Bool bRet = sal_False;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ const SwFrm *pFrm =
+ GetTableData().GetCell( nRow, nColumn, sal_False, this );
+ if( pFrm && pFrm->IsCellFrm() )
+ {
+ const SwSelBoxes *pSelBoxes = GetSelBoxes();
+ if( pSelBoxes )
+ {
+ const SwCellFrm *pCFrm = static_cast < const SwCellFrm * >( pFrm );
+ SwTableBox *pBox =
+ const_cast< SwTableBox *>( pCFrm->GetTabBox() ); //SVPtrArr!
+ bRet = pSelBoxes->Seek_Entry( pBox );
+ }
+ }
+
+ return bRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleIndex(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ sal_Int32 nRet = -1;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ SwAccessibleChild aCell( GetTableData().GetCell( nRow, nColumn, sal_False, this ));
+ if ( aCell.IsValid() )
+ {
+ nRet = GetChildIndex( *(GetMap()), aCell );
+ }
+
+ return nRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleRow( sal_Int32 nChildIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ sal_Int32 nRet = -1;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ // --> OD 2007-06-27 #i77106#
+ if ( ( nChildIndex < 0 ) ||
+ ( nChildIndex >= getAccessibleChildCount() ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+ // <--
+
+ SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
+ if ( aCell.GetSwFrm() )
+ {
+ sal_Int32 nTop = aCell.GetSwFrm()->Frm().Top();
+ nTop -= GetFrm()->Frm().Top();
+ Int32Set_Impl::const_iterator aRow(
+ GetTableData().GetRows().lower_bound( nTop ) );
+ nRet = static_cast< sal_Int32 >( ::std::distance(
+ GetTableData().GetRows().begin(), aRow ) );
+ }
+ else
+ {
+ ASSERT( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
+ "aCell not expected to be valid.");
+
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ return nRet;
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getAccessibleColumn(
+ sal_Int32 nChildIndex )
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+{
+ sal_Int32 nRet = -1;
+
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable )
+
+ // --> OD 2007-06-27 #i77106#
+ if ( ( nChildIndex < 0 ) ||
+ ( nChildIndex >= getAccessibleChildCount() ) )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+ // <--
+
+ SwAccessibleChild aCell( GetChild( *(GetMap()), nChildIndex ) );
+ if ( aCell.GetSwFrm() )
+ {
+ sal_Int32 nLeft = aCell.GetSwFrm()->Frm().Left();
+ nLeft -= GetFrm()->Frm().Left();
+ Int32Set_Impl::const_iterator aCol(
+ GetTableData().GetColumns().lower_bound( nLeft ) );
+ nRet = static_cast< sal_Int32 >( ::std::distance(
+ GetTableData().GetColumns().begin(), aCol ) );
+ }
+ else
+ {
+ ASSERT( !aCell.IsValid(), "SwAccessibleTable::getAccessibleColumn:"
+ "aCell not expected to be valid.");
+
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ return nRet;
+}
+
+
+OUString SAL_CALL SwAccessibleTable::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleTable::supportsService(
+ const OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+uno::Sequence< OUString > SAL_CALL SwAccessibleTable::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 SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( HasTableData() )
+ GetTableData().SetTablePos( GetFrm()->Frm().Pos() );
+
+ SwAccessibleContext::InvalidatePosOrSize( rOldBox );
+}
+
+void SwAccessibleTable::Dispose( sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( GetRegisteredIn() )
+ GetRegisteredInNonConst()->Remove( this );
+
+ SwAccessibleContext::Dispose( bRecursive );
+}
+
+void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrmOrObj,
+ sal_Bool bRecursive )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ const SwFrm *pFrm = rChildFrmOrObj.GetSwFrm();
+ ASSERT( pFrm, "frame expected" );
+ if( HasTableData() )
+ {
+ FireTableChangeEvent( GetTableData() );
+ ClearTableData();
+ }
+
+ // There are two reason why this method has been called. The first one
+ // is there is no context for pFrm. The method is them called by
+ // the map, and we have to call our superclass.
+ // The other situation is that we have been call by a call to get notified
+ // about its change. We then must not call the superclass
+ uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrm, sal_False ) );
+ if( !xAcc.is() )
+ SwAccessibleContext::DisposeChild( rChildFrmOrObj, bRecursive );
+}
+
+void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrmOrObj,
+ const SwRect& rOldBox )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ if( HasTableData() )
+ {
+ ASSERT( !HasTableData() ||
+ GetFrm()->Frm().Pos() == GetTableData().GetTablePos(),
+ "table has invalid position" );
+ if( HasTableData() )
+ {
+ // --> OD 2007-06-28 #i77106#
+ SwAccessibleTableData_Impl *pNewTableData = CreateNewTableData();
+ // <--
+ if( !pNewTableData->CompareExtents( GetTableData() ) )
+ {
+ FireTableChangeEvent( GetTableData() );
+ ClearTableData();
+ mpTableData = pNewTableData;
+ }
+ else
+ {
+ delete pNewTableData;
+ }
+ }
+ }
+
+ // --> OD 2010-02-18 #i013961# - always call super class method
+ SwAccessibleContext::InvalidateChildPosOrSize( rChildFrmOrObj, rOldBox );
+ // <--
+}
+
+
+//
+// XAccessibleSelection
+//
+
+void SAL_CALL SwAccessibleTable::selectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException, uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleTable );
+
+ // --> OD 2007-06-27 #i77106#
+ if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) )
+ // <--
+ throw lang::IndexOutOfBoundsException();
+
+ // preliminaries: get 'our' table box, and get the cursor shell
+ const SwTableBox* pBox = GetTableBox( nChildIndex );
+ DBG_ASSERT( pBox != NULL, "We need the table box." );
+
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell == NULL )
+ return;
+
+ // --> OD 2004-11-16 #111714# - assure, that child, indentified by the given
+ // index, isn't already selected.
+ if ( IsChildSelected( nChildIndex ) )
+ {
+ return;
+ }
+ // <--
+
+ // now we can start to do the work: check whether we already have
+ // a table selection (in 'our' table). If so, extend the
+ // selection, else select the current cell.
+
+ // if we have a selection in a table, check if it's in the
+ // same table that we're trying to select in
+ const SwTableNode* pSelectedTable = pCrsrShell->IsCrsrInTbl();
+ if( pSelectedTable != NULL )
+ {
+ // get top-most table line
+ const SwTableLine* pUpper = pBox->GetUpper();
+ while( pUpper->GetUpper() != NULL )
+ pUpper = pUpper->GetUpper()->GetUpper();
+ sal_uInt16 nPos =
+ pSelectedTable->GetTable().GetTabLines().GetPos( pUpper );
+ if( nPos == USHRT_MAX )
+ pSelectedTable = NULL;
+ }
+
+ // create the new selection
+ const SwStartNode* pStartNode = pBox->GetSttNd();
+ if( pSelectedTable == NULL || !pCrsrShell->GetTblCrs() )
+ {
+ // if we're in the wrong table, or there's no table selection
+ // at all, then select the current table cell.
+// SwPaM* pPaM = pCrsrShell->GetCrsr();
+// pPaM->DeleteMark();
+// *(pPaM->GetPoint()) = SwPosition( *pStartNode );
+// pPaM->Move( fnMoveForward, fnGoNode );
+// // pCrsrShell->SelTblBox();
+
+ pCrsrShell->StartAction();
+ // Set cursor into current cell. This deletes any table cursor.
+ SwPaM aPaM( *pStartNode );
+ aPaM.Move( fnMoveForward, fnGoNode );
+ Select( aPaM );
+ // Move cursor to the end of the table creating a selection and a table
+ // cursor.
+ pCrsrShell->SetMark();
+ pCrsrShell->MoveTable( fnTableCurr, fnTableEnd );
+ // now set the cursor into the cell again.
+ SwPaM *pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
+ : pCrsrShell->GetCrsr();
+ *pPaM->GetPoint() = *pPaM->GetMark();
+ pCrsrShell->EndAction();
+ // we now have one cell selected!
+ }
+ else
+ {
+ // if the cursor is already in this table,
+ // expand the current selection (i.e., set
+ // point to new position; keep mark)
+ SwPaM aPaM( *pStartNode );
+ aPaM.Move( fnMoveForward, fnGoNode );
+ aPaM.SetMark();
+ const SwPaM *pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
+ : pCrsrShell->GetCrsr();
+ *(aPaM.GetMark()) = *pPaM->GetMark();
+ Select( aPaM );
+
+ // if only one box is selected, we select this one in
+ // order to maintain our table selection
+// if( aPaM.GetPoint()->nNode.GetNode().FindTableBoxStartNode() ==
+// aPaM.GetMark()->nNode.GetNode().FindTableBoxStartNode() )
+// {
+// // pCrsrShell->SelTblBox();
+// }
+// else
+// {
+ // finally; set the selection. This will call UpdateCursor
+ // on the cursor shell, too.
+// pCrsrShell->KillPams();
+ // pCrsrShell->SetSelection( aPaM );
+// }
+ }
+}
+
+
+sal_Bool SAL_CALL SwAccessibleTable::isAccessibleChildSelected(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleTable );
+
+ // --> OD 2007-06-27 #i77106#
+ if( (nChildIndex < 0) || (nChildIndex >= getAccessibleChildCount()) )
+ // <--
+ throw lang::IndexOutOfBoundsException();
+
+ return IsChildSelected( nChildIndex );
+}
+
+void SAL_CALL SwAccessibleTable::clearAccessibleSelection( )
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleTable );
+
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+ if( pCrsrShell != NULL )
+ {
+ pCrsrShell->StartAction();
+ pCrsrShell->ClearMark();
+ pCrsrShell->EndAction();
+ }
+}
+
+void SAL_CALL SwAccessibleTable::selectAllAccessibleChildren( )
+ throw ( uno::RuntimeException )
+{
+ // first clear selection, then select first and last child
+ clearAccessibleSelection();
+ selectAccessibleChild( 0 );
+ // --> OD 2007-06-27 #i77106#
+ selectAccessibleChild( getAccessibleChildCount()-1 );
+ // <--
+}
+
+sal_Int32 SAL_CALL SwAccessibleTable::getSelectedAccessibleChildCount( )
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleTable );
+
+ // iterate over all children and count isAccessibleChildSelected()
+ sal_Int32 nCount = 0;
+
+ // --> OD 2007-06-27 #i71106#
+ sal_Int32 nChildren = getAccessibleChildCount();
+ // <--
+ for( sal_Int32 n = 0; n < nChildren; n++ )
+ if( IsChildSelected( n ) )
+ nCount++;
+
+ return nCount;
+}
+
+uno::Reference<XAccessible> SAL_CALL SwAccessibleTable::getSelectedAccessibleChild(
+ sal_Int32 nSelectedChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleTable );
+
+ // paremter checking (part 1): index lower 0
+ if( nSelectedChildIndex < 0 )
+ throw lang::IndexOutOfBoundsException();
+
+ sal_Int32 nChildIndex = GetIndexOfSelectedChild( nSelectedChildIndex );
+
+ // parameter checking (part 2): index higher than selected children?
+ if( nChildIndex < 0 )
+ throw lang::IndexOutOfBoundsException();
+
+ // --> OD 2007-06-28 #i77106#
+ if ( nChildIndex >= getAccessibleChildCount() )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+ // <--
+
+ return getAccessibleChild( nChildIndex );
+}
+
+// --> OD 2004-11-16 #111714# - index has to be treated as global child index.
+void SAL_CALL SwAccessibleTable::deselectAccessibleChild(
+ sal_Int32 nChildIndex )
+ throw ( lang::IndexOutOfBoundsException,
+ uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleTable );
+
+ SwCrsrShell* pCrsrShell = GetCrsrShell();
+
+ // --> OD 2004-11-16 #111714# - index has to be treated as global child index
+ if ( !pCrsrShell )
+ throw lang::IndexOutOfBoundsException();
+
+ // assure, that given child index is in bounds.
+ // --> OD 2007-06-27 #i77106#
+ if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() )
+ // <--
+ throw lang::IndexOutOfBoundsException();
+
+ // assure, that child, identified by the given index, is selected.
+ if ( !IsChildSelected( nChildIndex ) )
+ return;
+ // <--
+
+ const SwTableBox* pBox = GetTableBox( nChildIndex );
+ DBG_ASSERT( pBox != NULL, "We need the table box." );
+
+ // If we unselect point, then set cursor to mark. If we clear another
+ // selected box, then set cursor to point.
+ // reduce selection to mark.
+ SwPaM *pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
+ : pCrsrShell->GetCrsr();
+ sal_Bool bDeselectPoint =
+ pBox->GetSttNd() ==
+ pPaM->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
+
+ SwPaM aPaM( bDeselectPoint ? *pPaM->GetMark() : *pPaM->GetPoint() );
+
+ pCrsrShell->StartAction();
+
+ // Set cursor into either point or mark
+ Select( aPaM );
+ // Move cursor to the end of the table creating a selection and a table
+ // cursor.
+ pCrsrShell->SetMark();
+ pCrsrShell->MoveTable( fnTableCurr, fnTableEnd );
+ // now set the cursor into the cell again.
+ pPaM = pCrsrShell->GetTblCrs() ? pCrsrShell->GetTblCrs()
+ : pCrsrShell->GetCrsr();
+ *pPaM->GetPoint() = *pPaM->GetMark();
+ pCrsrShell->EndAction();
+}
+
+// --> OD 2007-06-28 #i77106#
+// implementation of class <SwAccessibleTableColHeaders>
+SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2,
+ const SwTabFrm *pTabFrm )
+ : SwAccessibleTable( pMap2, pTabFrm )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ const SwFrmFmt *pFrmFmt = pTabFrm->GetFmt();
+ const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
+ const String& rName = pFrmFmt->GetName();
+
+ OUStringBuffer aBuffer( rName.Len() + 15 + 6 );
+ aBuffer.append( OUString(rName) );
+ aBuffer.append( String::CreateFromAscii("-ColumnHeaders-") );
+ aBuffer.append( static_cast<sal_Int32>( pTabFrm->GetPhyPageNum() ) );
+
+ SetName( aBuffer.makeStringAndClear() );
+
+ OUStringBuffer aBuffer2( rName.Len() + 14 );
+ aBuffer2.append( OUString(rName) );
+ aBuffer2.append( String::CreateFromAscii("-ColumnHeaders") );
+ OUString sArg1( aBuffer2.makeStringAndClear() );
+ OUString sArg2( GetFormattedPageNumber() );
+
+ OUString sDesc2 = GetResource( STR_ACCESS_TABLE_DESC, &sArg1, &sArg2 );
+ SetDesc( sDesc2 );
+
+ // --> OD 2008-03-10 #i85634#
+ NotRegisteredAtAccessibleMap();
+ // <--
+}
+
+SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData()
+{
+ const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
+ return new SwAccessibleTableData_Impl( *(GetMap()), pTabFrm, IsInPagePreview(), true );
+}
+
+
+void SwAccessibleTableColHeaders::Modify( const SfxPoolItem * /*pOld*/, const SfxPoolItem * /*pNew*/ )
+{
+}
+
+//===== XInterface ======================================================
+uno::Any SAL_CALL SwAccessibleTableColHeaders::queryInterface( const uno::Type& aType )
+ throw (uno::RuntimeException)
+{
+ return SwAccessibleTable::queryInterface( aType );
+}
+
+//===== XAccessibleContext ==============================================
+sal_Int32 SAL_CALL SwAccessibleTableColHeaders::getAccessibleChildCount(void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ sal_Int32 nCount = 0;
+
+ const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( GetFrm() );
+ const SwAccessibleChildSList aVisList( GetVisArea(), *pTabFrm, *(GetMap()) );
+ SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
+ while( aIter != aVisList.end() )
+ {
+ const SwAccessibleChild& rLower = *aIter;
+ if( rLower.IsAccessible( IsInPagePreview() ) )
+ {
+ nCount++;
+ }
+ else if( rLower.GetSwFrm() )
+ {
+ // There are no unaccessible SdrObjects that count
+ if ( !rLower.GetSwFrm()->IsRowFrm() ||
+ pTabFrm->IsInHeadline( *(rLower.GetSwFrm()) ) )
+ {
+ nCount += SwAccessibleFrame::GetChildCount( *(GetMap()),
+ GetVisArea(),
+ rLower.GetSwFrm(),
+ IsInPagePreview() );
+ }
+ }
+ ++aIter;
+ }
+
+ return nCount;
+}
+
+uno::Reference< XAccessible> SAL_CALL
+ SwAccessibleTableColHeaders::getAccessibleChild (sal_Int32 nIndex)
+ throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
+{
+ if ( nIndex < 0 || nIndex >= getAccessibleChildCount() )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ return SwAccessibleTable::getAccessibleChild( nIndex );
+}
+
+//===== XAccessibleTable ================================================
+uno::Reference< XAccessibleTable >
+ SAL_CALL SwAccessibleTableColHeaders::getAccessibleRowHeaders()
+ throw (uno::RuntimeException)
+{
+ return uno::Reference< XAccessibleTable >();
+}
+
+uno::Reference< XAccessibleTable >
+ SAL_CALL SwAccessibleTableColHeaders::getAccessibleColumnHeaders()
+ throw (uno::RuntimeException)
+{
+ return uno::Reference< XAccessibleTable >();
+}
+
+//===== XServiceInfo ====================================================
+
+::rtl::OUString SAL_CALL SwAccessibleTableColHeaders::getImplementationName (void)
+ throw (uno::RuntimeException)
+{
+ static const sal_Char sImplName[] = "com.sun.star.comp.Writer.SwAccessibleTableColumnHeadersView";
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplName));
+}
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
new file mode 100644
index 000000000000..82141c09bead
--- /dev/null
+++ b/sw/source/core/access/acctable.hxx
@@ -0,0 +1,331 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCTABLE_HXX
+#define _ACCTABLE_HXX
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+
+#include <acccontext.hxx>
+
+class SwTabFrm;
+class SwAccessibleTableData_Impl;
+class SwTableBox;
+class SwSelBoxes;
+
+namespace sw { namespace access {
+ class SwAccessibleChild;
+} }
+
+class SwAccessibleTable :
+ public SwAccessibleContext,
+ public ::com::sun::star::accessibility::XAccessibleTable,
+ public ::com::sun::star::accessibility::XAccessibleSelection,
+ public SwClient
+{
+ SwAccessibleTableData_Impl *mpTableData; // the table's data, prot by Sol-Mutex
+ ::rtl::OUString sDesc;
+ const SwSelBoxes *GetSelBoxes() const;
+
+ void FireTableChangeEvent( const SwAccessibleTableData_Impl& rTableData );
+
+ /** get the SwTableBox* for the given child */
+ const SwTableBox* GetTableBox( sal_Int32 ) const;
+
+ sal_Bool IsChildSelected( sal_Int32 nChildIndex ) const;
+
+ sal_Int32 GetIndexOfSelectedChild( sal_Int32 nSelectedChildIndex ) const;
+
+protected:
+
+ // Set states for getAccessibleStateSet.
+ // This drived class additinaly sets MULTISELECTABLE(+)
+ virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
+
+ virtual ~SwAccessibleTable();
+
+ // --> OD 2007-06-27 #i77106#
+ inline void SetDesc( ::rtl::OUString sNewDesc )
+ {
+ sDesc = sNewDesc;
+ }
+
+ // --> OD 2007-06-28 #i77106#
+ virtual SwAccessibleTableData_Impl* CreateNewTableData();
+ // <--
+
+ // force update of table data
+ void UpdateTableData();
+
+ // remove the current table data
+ void ClearTableData();
+
+ // get table data, update if necessary
+ inline SwAccessibleTableData_Impl& GetTableData();
+
+ // Is table data evailable?
+ sal_Bool HasTableData() const { return (mpTableData != 0); }
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+
+ SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrm* pTableFrm );
+
+ //===== XInterface ======================================================
+
+ // (XInterface methods need to be implemented to disambigouate
+ // between those inherited through SwAcessibleContext and
+ // XAccessibleTable).
+
+ 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);
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription (void)
+ throw (com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleTable ================================================
+
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription(
+ sal_Int32 nRow )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription(
+ sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ SAL_CALL getAccessibleRowHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ SAL_CALL getAccessibleColumnHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleSelected(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndex(
+ sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::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);
+
+ //===== C++ interface ======================================================
+
+ // The object has been moved by the layout
+ virtual void InvalidatePosOrSize( const SwRect& rOldBox );
+
+ // The object is not visible an longer and should be destroyed
+ virtual void Dispose( sal_Bool bRecursive = sal_False );
+
+ virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrmOrObj,
+ sal_Bool bRecursive );
+ virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrmOrObj,
+ const SwRect& rFrm );
+
+ //===== 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 );
+
+};
+
+inline SwAccessibleTableData_Impl& SwAccessibleTable::GetTableData()
+{
+ if( !mpTableData )
+ UpdateTableData();
+ return *mpTableData;
+}
+
+// --> OD 2007-06-28 #i77106#
+// subclass to represent table column headers
+class SwAccessibleTableColHeaders : public SwAccessibleTable
+{
+protected:
+
+ virtual ~SwAccessibleTableColHeaders()
+ {}
+
+ virtual SwAccessibleTableData_Impl* CreateNewTableData();
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+
+ SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrm *pTabFrm );
+
+ //===== XInterface ======================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& aType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire( ) throw ()
+ { SwAccessibleContext::acquire(); };
+
+ virtual void SAL_CALL release( ) throw ()
+ { SwAccessibleContext::release(); };
+
+ //===== 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);
+
+ //===== XAccessibleTable ================================================
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ SAL_CALL getAccessibleRowHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ SAL_CALL getAccessibleColumnHeaders( )
+ 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);
+
+};
+// <--
+#endif
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
new file mode 100644
index 000000000000..c0188c7eb193
--- /dev/null
+++ b/sw/source/core/access/acctextframe.cxx
@@ -0,0 +1,278 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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/XAccessibleContext.hpp>
+#include <rtl/uuid.h>
+#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/AccessibleRelation.hpp>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <frmfmt.hxx>
+#include <flyfrm.hxx>
+#include <accmap.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
+// --> OD 2009-07-14 #i73249#
+#include <hints.hxx>
+// <--
+#include "acctextframe.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::accessibility;
+using ::rtl::OUString;
+
+using utl::AccessibleRelationSetHelper;
+using ::com::sun::star::accessibility::XAccessibleContext;
+
+const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextFrameView";
+const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleTextFrameView";
+
+SwAccessibleTextFrame::SwAccessibleTextFrame(
+ SwAccessibleMap* pInitMap,
+ const SwFlyFrm* pFlyFrm ) :
+ SwAccessibleFrameBase( pInitMap, AccessibleRole::TEXT_FRAME, pFlyFrm ),
+ msTitle(),
+ msDesc()
+{
+ if ( pFlyFrm )
+ {
+ const SwFlyFrmFmt* pFlyFrmFmt =
+ dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
+ msTitle = pFlyFrmFmt->GetObjTitle();
+
+ msDesc = pFlyFrmFmt->GetObjDescription();
+ if ( msDesc.getLength() == 0 &&
+ msTitle != GetName() )
+ {
+ msDesc = msTitle;
+ }
+ }
+}
+
+SwAccessibleTextFrame::~SwAccessibleTextFrame()
+{
+}
+
+void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const 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 SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
+ switch( nWhich )
+ {
+ // --> OD 2009-07-14 #i73249#
+ case RES_TITLE_CHANGED:
+ {
+ const String& sOldTitle(
+ dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
+ const String& sNewTitle(
+ dynamic_cast<const 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 );
+
+ const SwFlyFrmFmt* pFlyFrmFmt =
+ dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
+ if ( pFlyFrmFmt->GetObjDescription().Len() != 0 )
+ {
+ break;
+ }
+ }
+ // intentional no break here
+ case RES_DESCRIPTION_CHANGED:
+ {
+ if ( pFlyFrm )
+ {
+ const OUString sOldDesc( msDesc );
+
+ const SwFlyFrmFmt* pFlyFrmFmt =
+ dynamic_cast<const SwFlyFrmFmt*>( pFlyFrm->GetFmt() );
+ const String& rDesc = pFlyFrmFmt->GetObjDescription();
+ 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;
+ // <--
+ }
+}
+
+// --> OD 2009-07-14 #i73249#
+OUString SAL_CALL SwAccessibleTextFrame::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 SwAccessibleTextFrame::getAccessibleDescription (void)
+ throw (uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ CHECK_FOR_DEFUNC( XAccessibleContext )
+
+ return msDesc;
+
+}
+
+OUString SAL_CALL SwAccessibleTextFrame::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(sImplementationName));
+}
+
+sal_Bool SAL_CALL SwAccessibleTextFrame::supportsService(
+ const OUString& sTestServiceName)
+ throw (uno::RuntimeException)
+{
+ return sTestServiceName.equalsAsciiL( sServiceName,
+ sizeof(sServiceName)-1 ) ||
+ sTestServiceName.equalsAsciiL( sAccessibleServiceName,
+ sizeof(sAccessibleServiceName)-1 );
+}
+
+uno::Sequence< OUString > SAL_CALL SwAccessibleTextFrame::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 SwAccessibleTextFrame::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;
+}
+
+
+//
+// XAccessibleRelationSet
+//
+
+
+SwFlyFrm* SwAccessibleTextFrame::getFlyFrm() const
+{
+ SwFlyFrm* pFlyFrm = NULL;
+
+ const SwFrm* pFrm = GetFrm();
+ DBG_ASSERT( pFrm != NULL, "frame expected" );
+ if( pFrm->IsFlyFrm() )
+ {
+ pFlyFrm = static_cast<SwFlyFrm*>( const_cast<SwFrm*>( pFrm ) );
+ }
+
+ return pFlyFrm;
+}
+
+AccessibleRelation SwAccessibleTextFrame::makeRelation( sal_Int16 nType, const SwFlyFrm* pFrm )
+{
+ uno::Sequence<uno::Reference<XInterface> > aSequence(1);
+ aSequence[0] = GetMap()->GetContext( pFrm );
+ return AccessibleRelation( nType, aSequence );
+}
+
+
+uno::Reference<XAccessibleRelationSet> SAL_CALL SwAccessibleTextFrame::getAccessibleRelationSet( )
+ throw ( uno::RuntimeException )
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ CHECK_FOR_DEFUNC( XAccessibleContext );
+
+ // get the frame, and insert prev/next relations into helper
+
+ AccessibleRelationSetHelper* pHelper = new AccessibleRelationSetHelper();
+
+ SwFlyFrm* pFlyFrm = getFlyFrm();
+ DBG_ASSERT( pFlyFrm != NULL, "fly frame expected" );
+
+ const SwFlyFrm* pPrevFrm = pFlyFrm->GetPrevLink();
+ if( pPrevFrm != NULL )
+ pHelper->AddRelation( makeRelation(
+ AccessibleRelationType::CONTENT_FLOWS_FROM, pPrevFrm ) );
+
+ const SwFlyFrm* pNextFrm = pFlyFrm->GetNextLink();
+ if( pNextFrm != NULL )
+ pHelper->AddRelation( makeRelation(
+ AccessibleRelationType::CONTENT_FLOWS_TO, pNextFrm ) );
+
+ return pHelper;
+}
diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx
new file mode 100644
index 000000000000..a2b891de18e4
--- /dev/null
+++ b/sw/source/core/access/acctextframe.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _ACCTEXTFRAME_HXX
+#define _ACCTEXTFRAME_HXX
+#include "accframebase.hxx"
+
+class SwFlyFrm;
+namespace utl { class AccessibleRelationSetHelper; }
+namespace com { namespace star {
+ namespace accessibility { struct AccessibleRelation; }
+} }
+
+class SwAccessibleTextFrame : public SwAccessibleFrameBase
+{
+private:
+ // --> OD 2009-07-14 #i73249#
+ ::rtl::OUString msTitle;
+ ::rtl::OUString msDesc;
+ // <--
+
+protected:
+
+ virtual ~SwAccessibleTextFrame();
+
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
+public:
+
+ SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm );
+
+ //===== 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);
+
+ //===== 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);
+
+
+ //===== XAccessibleContext::getAccessibleRelationSet ====================
+
+ // text frame may have accessible relations to their
+ // predocesor/successor frames
+
+private:
+ // helper methods for getAccessibleRelationSet:
+ SwFlyFrm* getFlyFrm() const;
+
+ com::sun::star::accessibility::AccessibleRelation makeRelation(
+ sal_Int16 nType, const SwFlyFrm* pFrm );
+
+public:
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet (void)
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
new file mode 100644
index 000000000000..465e4a01b3da
--- /dev/null
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * DO NOT 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_sw.hxx"
+
+#include <parachangetrackinginfo.hxx>
+
+#include <errhdl.hxx>
+#include <wrong.hxx>
+#include <com/sun/star/text/TextMarkupType.hpp>
+
+#include <txtfrm.hxx>
+#include <ndtxt.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <docary.hxx>
+#include <redline.hxx>
+
+namespace css = com::sun::star;
+
+namespace {
+ void initChangeTrackTextMarkupLists( const SwTxtFrm& rTxtFrm,
+ SwWrongList*& opChangeTrackInsertionTextMarkupList,
+ SwWrongList*& opChangeTrackDeletionTextMarkupList,
+ SwWrongList*& opChangeTrackFormatChangeTextMarkupList )
+ {
+ opChangeTrackInsertionTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING );
+ opChangeTrackDeletionTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING );
+ opChangeTrackFormatChangeTextMarkupList = new SwWrongList( WRONGLIST_CHANGETRACKING );
+
+ if ( !rTxtFrm.GetTxtNode() )
+ {
+ ASSERT( false,
+ "<initChangeTrackTextMarkupLists(..) - missing <SwTxtNode> instance!" );
+ return;
+ }
+ const SwTxtNode& rTxtNode( *(rTxtFrm.GetTxtNode()) );
+
+ const IDocumentRedlineAccess* pIDocChangeTrack( rTxtNode.getIDocumentRedlineAccess() );
+ if ( !pIDocChangeTrack )
+ {
+ ASSERT( false,
+ "<initChangeTrackTextMarkupLists(..) - missing <IDocumentRedlineAccess> instance!" );
+ return;
+ }
+
+ if ( !IDocumentRedlineAccess::IsShowChanges( pIDocChangeTrack->GetRedlineMode() ) ||
+ pIDocChangeTrack->GetRedlineTbl().Count() == 0 )
+ {
+ // nothing to do --> empty change track text markup lists.
+ return;
+ }
+
+ const sal_uInt16 nIdxOfFirstRedlineForTxtNode =
+ pIDocChangeTrack->GetRedlinePos( rTxtNode, USHRT_MAX );
+ if ( nIdxOfFirstRedlineForTxtNode == USHRT_MAX )
+ {
+ // nothing to do --> empty change track text markup lists.
+ return;
+ }
+
+ const xub_StrLen nTxtFrmTextStartPos = rTxtFrm.IsFollow()
+ ? rTxtFrm.GetOfst()
+ : 0;
+ const xub_StrLen nTxtFrmTextEndPos = rTxtFrm.HasFollow()
+ ? rTxtFrm.GetFollow()->GetOfst()
+ : rTxtFrm.GetTxt().Len();
+
+ // iteration over the redlines which overlap with the text node.
+ const SwRedlineTbl& rRedlineTbl = pIDocChangeTrack->GetRedlineTbl();
+ const sal_uInt16 nRedlineCount( rRedlineTbl.Count() );
+ for ( sal_uInt16 nActRedline = nIdxOfFirstRedlineForTxtNode;
+ nActRedline < nRedlineCount;
+ ++nActRedline)
+ {
+ const SwRedline* pActRedline = rRedlineTbl[ nActRedline ];
+ if ( pActRedline->Start()->nNode > rTxtNode.GetIndex() )
+ {
+ break;
+ }
+
+ xub_StrLen nTxtNodeChangeTrackStart( STRING_LEN );
+ xub_StrLen nTxtNodeChangeTrackEnd( STRING_LEN );
+ pActRedline->CalcStartEnd( rTxtNode.GetIndex(),
+ nTxtNodeChangeTrackStart,
+ nTxtNodeChangeTrackEnd );
+ if ( nTxtNodeChangeTrackStart > nTxtFrmTextEndPos ||
+ nTxtNodeChangeTrackEnd < nTxtFrmTextStartPos )
+ {
+ // Consider only redlines which overlap with the text frame's text.
+ continue;
+ }
+
+ SwWrongList* pMarkupList( 0 );
+ switch ( pActRedline->GetType() )
+ {
+ case nsRedlineType_t::REDLINE_INSERT:
+ {
+ pMarkupList = opChangeTrackInsertionTextMarkupList;
+ }
+ break;
+ case nsRedlineType_t::REDLINE_DELETE:
+ {
+ pMarkupList = opChangeTrackDeletionTextMarkupList;
+ }
+ break;
+ case nsRedlineType_t::REDLINE_FORMAT:
+ {
+ pMarkupList = opChangeTrackFormatChangeTextMarkupList;
+ }
+ break;
+ default:
+ {
+ // other types are not considered
+ }
+ }
+ if ( pMarkupList )
+ {
+ const xub_StrLen nTxtFrmChangeTrackStart =
+ nTxtNodeChangeTrackStart <= nTxtFrmTextStartPos
+ ? nTxtFrmTextStartPos
+ : nTxtNodeChangeTrackStart;
+
+ const xub_StrLen nTxtFrmChangeTrackEnd =
+ nTxtNodeChangeTrackEnd >= nTxtFrmTextEndPos
+ ? nTxtFrmTextEndPos
+ : nTxtNodeChangeTrackEnd;
+
+ pMarkupList->Insert( rtl::OUString(), 0,
+ nTxtFrmChangeTrackStart,
+ nTxtFrmChangeTrackEnd - nTxtFrmChangeTrackStart,
+ pMarkupList->Count() );
+ }
+ } // eof iteration over the redlines which overlap with the text node
+ }
+} // eof anonymous namespace
+
+SwParaChangeTrackingInfo::SwParaChangeTrackingInfo( const SwTxtFrm& rTxtFrm )
+ : mrTxtFrm( rTxtFrm )
+ , mpChangeTrackInsertionTextMarkupList( 0 )
+ , mpChangeTrackDeletionTextMarkupList( 0 )
+ , mpChangeTrackFormatChangeTextMarkupList( 0 )
+{
+}
+
+
+SwParaChangeTrackingInfo::~SwParaChangeTrackingInfo()
+{
+ reset();
+}
+
+void SwParaChangeTrackingInfo::reset()
+{
+ delete mpChangeTrackInsertionTextMarkupList;
+ mpChangeTrackInsertionTextMarkupList = 0;
+
+ delete mpChangeTrackDeletionTextMarkupList;
+ mpChangeTrackDeletionTextMarkupList = 0;
+
+ delete mpChangeTrackFormatChangeTextMarkupList;
+ mpChangeTrackFormatChangeTextMarkupList = 0;
+}
+
+const SwWrongList* SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList( const sal_Int32 nTextMarkupType )
+{
+ SwWrongList* pChangeTrackingTextMarkupList = 0;
+
+ if ( mpChangeTrackInsertionTextMarkupList == 0 )
+ {
+ ASSERT( mpChangeTrackDeletionTextMarkupList == 0,
+ "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackDeletionTextMarkupList> expected to be NULL." );
+ ASSERT( mpChangeTrackFormatChangeTextMarkupList == 0,
+ "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..) - <mpChangeTrackFormatChangeTextMarkupList> expected to be NULL." );
+ initChangeTrackTextMarkupLists( mrTxtFrm,
+ mpChangeTrackInsertionTextMarkupList,
+ mpChangeTrackDeletionTextMarkupList,
+ mpChangeTrackFormatChangeTextMarkupList );
+ }
+
+ switch ( nTextMarkupType )
+ {
+ case css::text::TextMarkupType::TRACK_CHANGE_INSERTION:
+ {
+ pChangeTrackingTextMarkupList = mpChangeTrackInsertionTextMarkupList;
+ }
+ break;
+ case css::text::TextMarkupType::TRACK_CHANGE_DELETION:
+ {
+ pChangeTrackingTextMarkupList = mpChangeTrackDeletionTextMarkupList;
+ }
+ break;
+ case css::text::TextMarkupType::TRACK_CHANGE_FORMATCHANGE:
+ {
+ pChangeTrackingTextMarkupList = mpChangeTrackFormatChangeTextMarkupList;
+ }
+ break;
+ default:
+ {
+ ASSERT( false,
+ "<SwParaChangeTrackingInfo::getChangeTrackingTextMarkupList(..)> - misusage - unexpected text markup type for change tracking." );
+ }
+ }
+
+ return pChangeTrackingTextMarkupList;
+}
diff --git a/sw/source/core/access/parachangetrackinginfo.hxx b/sw/source/core/access/parachangetrackinginfo.hxx
new file mode 100644
index 000000000000..91131f37b757
--- /dev/null
+++ b/sw/source/core/access/parachangetrackinginfo.hxx
@@ -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: $
+ * $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 _PARACHANGETRACKINGINFO_HXX_
+#define _PARACHANGETRACKINGINFO_HXX_
+
+#include <sal/types.h>
+
+class SwTxtFrm;
+class SwWrongList;
+
+class SwParaChangeTrackingInfo
+{
+ public:
+ explicit SwParaChangeTrackingInfo( const SwTxtFrm& rTxtFrm );
+ ~SwParaChangeTrackingInfo();
+
+ void reset();
+
+ const SwWrongList* getChangeTrackingTextMarkupList( const sal_Int32 nTextMarkupType );
+
+ private:
+ SwParaChangeTrackingInfo( const SwParaChangeTrackingInfo& );
+ SwParaChangeTrackingInfo& operator=( const SwParaChangeTrackingInfo& );
+
+ const SwTxtFrm& mrTxtFrm;
+
+ SwWrongList* mpChangeTrackInsertionTextMarkupList;
+ SwWrongList* mpChangeTrackDeletionTextMarkupList;
+ SwWrongList* mpChangeTrackFormatChangeTextMarkupList;
+};
+#endif
+
diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx
new file mode 100644
index 000000000000..90444e4cdca0
--- /dev/null
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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"
+
+#include <textmarkuphelper.hxx>
+#include <accportions.hxx>
+
+#include <vector>
+#include <algorithm>
+#include <comphelper/stlunosequence.hxx>
+
+#include <errhdl.hxx>
+
+#include <com/sun/star/text/TextMarkupType.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+
+#include <ndtxt.hxx>
+#include <wrong.hxx>
+
+using namespace com::sun::star;
+
+// helper functions
+namespace {
+ const SwWrongList* getTextMarkupList( const SwTxtNode& rTxtNode,
+ const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException)
+ {
+ const SwWrongList* pTextMarkupList( 0 );
+ switch ( nTextMarkupType )
+ {
+ case text::TextMarkupType::SPELLCHECK:
+ {
+ pTextMarkupList = rTxtNode.GetWrong();
+ }
+ break;
+ case text::TextMarkupType::PROOFREADING:
+ {
+ // support not implemented yet
+ pTextMarkupList = 0;
+ }
+ break;
+ case text::TextMarkupType::SMARTTAG:
+ {
+ // support not implemented yet
+ pTextMarkupList = 0;
+ }
+ break;
+ default:
+ {
+ throw lang::IllegalArgumentException();
+ }
+ }
+
+ return pTextMarkupList;
+ }
+}
+
+// implementation of class <SwTextMarkupoHelper>
+SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwTxtNode& rTxtNode )
+ : mrPortionData( rPortionData )
+ // --> OD 2010-02-19 #i108125#
+ , mpTxtNode( &rTxtNode )
+ , mpTextMarkupList( 0 )
+ // <--
+{
+}
+
+// --> OD 2010-02-19 #i108125#
+SwTextMarkupHelper::SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwWrongList& rTextMarkupList )
+ : mrPortionData( rPortionData )
+ , mpTxtNode( 0 )
+ , mpTextMarkupList( &rTextMarkupList )
+{
+}
+// <--
+
+sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nTextMarkupCount( 0 );
+
+ // --> OD 2010-02-19 #i108125#
+ const SwWrongList* pTextMarkupList =
+ mpTextMarkupList
+ ? mpTextMarkupList
+ : getTextMarkupList( *mpTxtNode, nTextMarkupType );
+ // <--
+ if ( pTextMarkupList )
+ {
+ nTextMarkupCount = pTextMarkupList->Count();
+ }
+
+ return nTextMarkupCount;
+}
+::com::sun::star::accessibility::TextSegment
+ SwTextMarkupHelper::getTextMarkup( const sal_Int32 nTextMarkupIndex,
+ const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException)
+{
+ if ( nTextMarkupIndex >= getTextMarkupCount( nTextMarkupType ) ||
+ nTextMarkupIndex < 0 )
+ {
+ throw lang::IndexOutOfBoundsException();
+ }
+
+ ::com::sun::star::accessibility::TextSegment aTextMarkupSegment;
+ aTextMarkupSegment.SegmentStart = -1;
+ aTextMarkupSegment.SegmentEnd = -1;
+
+ // --> OD 2010-02-19 #i108125#
+ const SwWrongList* pTextMarkupList =
+ mpTextMarkupList
+ ? mpTextMarkupList
+ : getTextMarkupList( *mpTxtNode, nTextMarkupType );
+ // <--
+ if ( pTextMarkupList )
+ {
+ const SwWrongArea* pTextMarkup =
+ pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIndex) );
+ if ( pTextMarkup )
+ {
+ const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
+ const sal_Int32 nStartPos =
+ mrPortionData.GetAccessiblePosition( pTextMarkup->mnPos );
+ const sal_Int32 nEndPos =
+ mrPortionData.GetAccessiblePosition( pTextMarkup->mnPos + pTextMarkup->mnLen );
+ aTextMarkupSegment.SegmentText = rText.copy( nStartPos, nEndPos - nStartPos );
+ aTextMarkupSegment.SegmentStart = nStartPos;
+ aTextMarkupSegment.SegmentEnd = nEndPos;
+ }
+ else
+ {
+ ASSERT( false,
+ "<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" );
+ }
+ }
+
+ return aTextMarkupSegment;
+}
+
+::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment >
+ SwTextMarkupHelper::getTextMarkupAtIndex( const sal_Int32 nCharIndex,
+ const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException)
+{
+ // assumption:
+ // value of <nCharIndex> is in range [0..length of accessible text)
+
+ const sal_uInt16 nCoreCharIndex = mrPortionData.GetModelPosition( nCharIndex );
+ // Handling of portions with core length == 0 at the beginning of the
+ // paragraph - e.g. numbering portion.
+ if ( mrPortionData.GetAccessiblePosition( nCoreCharIndex ) > nCharIndex )
+ {
+ return uno::Sequence< ::com::sun::star::accessibility::TextSegment >();
+ }
+
+ // --> OD 2010-02-19 #i108125#
+ const SwWrongList* pTextMarkupList =
+ mpTextMarkupList
+ ? mpTextMarkupList
+ : getTextMarkupList( *mpTxtNode, nTextMarkupType );
+ // <--
+ ::std::vector< ::com::sun::star::accessibility::TextSegment > aTmpTextMarkups;
+ if ( pTextMarkupList )
+ {
+ const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
+
+ const sal_uInt16 nTextMarkupCount = pTextMarkupList->Count();
+ for ( sal_uInt16 nTextMarkupIdx = 0; nTextMarkupIdx < nTextMarkupCount; ++nTextMarkupIdx )
+ {
+ const SwWrongArea* pTextMarkup =
+ pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIdx) );
+ ASSERT( pTextMarkup,
+ "<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" );
+ if ( pTextMarkup &&
+ pTextMarkup->mnPos <= nCoreCharIndex &&
+ nCoreCharIndex < ( pTextMarkup->mnPos + pTextMarkup->mnLen ) )
+ {
+ const sal_Int32 nStartPos =
+ mrPortionData.GetAccessiblePosition( pTextMarkup->mnPos );
+ const sal_Int32 nEndPos =
+ mrPortionData.GetAccessiblePosition( pTextMarkup->mnPos + pTextMarkup->mnLen );
+ ::com::sun::star::accessibility::TextSegment aTextMarkupSegment;
+ aTextMarkupSegment.SegmentText = rText.copy( nStartPos, nEndPos - nStartPos );
+ aTextMarkupSegment.SegmentStart = nStartPos;
+ aTextMarkupSegment.SegmentEnd = nEndPos;
+ aTmpTextMarkups.push_back( aTextMarkupSegment );
+ }
+ }
+ }
+
+ uno::Sequence< ::com::sun::star::accessibility::TextSegment > aTextMarkups(
+ aTmpTextMarkups.size() );
+ ::std::copy( aTmpTextMarkups.begin(), aTmpTextMarkups.end(),
+ ::comphelper::stl_begin( aTextMarkups ) );
+
+ return aTextMarkups;
+}
diff --git a/sw/source/core/access/textmarkuphelper.hxx b/sw/source/core/access/textmarkuphelper.hxx
new file mode 100644
index 000000000000..9b2bb519a2a1
--- /dev/null
+++ b/sw/source/core/access/textmarkuphelper.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _TEXTMARKUPHELPER_HXX_
+#define _TEXTMARKUPHELPER_HXX_
+
+#include <sal/types.h>
+#include "com/sun/star/lang/IndexOutOfBoundsException.hdl"
+#include "com/sun/star/lang/IllegalArgumentException.hdl"
+#include "com/sun/star/uno/RuntimeException.hdl"
+#include "com/sun/star/uno/Sequence.h"
+
+namespace com { namespace sun { namespace star { namespace accessibility {
+struct TextSegment;
+} } } }
+
+class SwAccessiblePortionData;
+class SwTxtNode;
+// --> OD 2010-02-19 #i108125#
+class SwWrongList;
+// <--
+
+class SwTextMarkupHelper
+{
+ public:
+ SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwTxtNode& rTxtNode );
+ // --> OD 2010-02-19 #i108125#
+ SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
+ const SwWrongList& rTextMarkupList );
+ // <--
+ ~SwTextMarkupHelper() {}
+
+ sal_Int32 getTextMarkupCount( const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ ::com::sun::star::accessibility::TextSegment getTextMarkup(
+ const sal_Int32 nTextMarkupIndex,
+ const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::accessibility::TextSegment >
+ getTextMarkupAtIndex( const sal_Int32 nCharIndex,
+ const sal_Int32 nTextMarkupType )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ private:
+ SwTextMarkupHelper( const SwTextMarkupHelper& );
+ SwTextMarkupHelper& operator=( const SwTextMarkupHelper& );
+
+ const SwAccessiblePortionData& mrPortionData;
+
+ // --> OD 2010-02-19 #i108125#
+ const SwTxtNode* mpTxtNode;
+ const SwWrongList* mpTextMarkupList;
+ // <--
+};
+#endif
+
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
new file mode 100644
index 000000000000..68150f3f9e5d
--- /dev/null
+++ b/sw/source/core/attr/calbck.cxx
@@ -0,0 +1,564 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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> // contains RES_.. IDs
+#include <frame.hxx>
+#include <hints.hxx>
+#include <swcache.hxx> // mba: get rid of that dependency
+#include <swfntcch.hxx> // mba: get rid of that dependency
+
+static SwClientIter* pClientIters = 0;
+
+TYPEINIT0(SwClient);
+
+/*************************************************************************/
+SwClient::SwClient(SwModify *pToRegisterIn)
+ : pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 ), mbIsAllowedToBeRemovedInModifyCall(false)
+{
+ if(pToRegisterIn)
+ // connect to SwModify
+ pToRegisterIn->Add(this);
+}
+
+/*************************************************************************/
+void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem * )
+{
+ // this method only handles notification about dying SwModify objects
+ if( (!pOld || pOld->Which() != RES_OBJECTDYING) )
+ return;
+
+ const SwPtrMsgPoolItem *pDead = static_cast<const SwPtrMsgPoolItem*>(pOld);
+ if(pDead && pDead->pObject == pRegisteredIn)
+ {
+ // I've got a notification from the object I know
+ SwModify *pAbove = const_cast<SwModify*>(pRegisteredIn->GetRegisteredIn());
+ if(pAbove)
+ {
+ // if the dying object itself was listening at an SwModify, I take over
+ // adding myself to pAbove will automatically remove me from my current pRegisteredIn
+ pAbove->Add(this);
+ return;
+ }
+
+ // destroy connection
+ pRegisteredIn->Remove(this);
+ }
+}
+
+void SwClient::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
+{
+ CheckRegistration( pOldValue, pNewValue );
+}
+
+void SwClient::SwClientNotify( const SwModify&, const SfxHint& )
+{
+
+}
+
+//*************************************************************************
+SwClient::~SwClient()
+{
+ DBG_ASSERT( !pRegisteredIn || pRegisteredIn->GetDepends(),"SwModify still known, but Client already disconnected!" );
+ if( pRegisteredIn && pRegisteredIn->GetDepends() )
+ // still connected
+ pRegisteredIn->Remove( this );
+}
+
+
+sal_Bool SwClient::GetInfo( SfxPoolItem& ) const
+{
+ return sal_True; // und weiter
+}
+
+
+/*************************************************************************/
+SwModify::SwModify()
+ : SwClient(0), pRoot(0)
+{
+ bModifyLocked = sal_False;
+ bLockClientList = sal_False;
+ bInDocDTOR = sal_False;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
+}
+
+SwModify::SwModify( SwModify *pToRegisterIn )
+ : SwClient(pToRegisterIn), pRoot( 0 )
+{
+ bModifyLocked = sal_False;
+ bLockClientList = sal_False;
+ bInDocDTOR = sal_False;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
+}
+
+/*************************************************************************/
+SwModify::~SwModify()
+{
+ ASSERT( !IsModifyLocked(), "Modify destroyed but locked." );
+
+ if ( IsInCache() )
+ SwFrm::GetCache().Delete( this );
+
+ if ( IsInSwFntCache() )
+ pSwFontCache->Delete( this );
+
+ if( pRoot )
+ {
+ // there are depending objects
+ if( IsInDocDTOR() )
+ {
+ // if document gets destroyed anyway, just tell clients to forget me
+ // so that they don't try to get removed from my list later when they also get destroyed
+ SwClientIter aIter( *this );
+ SwClient* p = aIter.GoStart();
+ while ( p )
+ {
+ p->pRegisteredIn = 0;
+ p = aIter++;
+ }
+ }
+ else
+ {
+ // notify all clients that they shall remove themselves
+ SwPtrMsgPoolItem aDyObject( RES_OBJECTDYING, this );
+ NotifyClients( &aDyObject, &aDyObject );
+
+ // remove all clients that have not done themselves
+ // mba: possibly a hotfix for forgotten base class calls?!
+ while( pRoot )
+ pRoot->CheckRegistration(&aDyObject, &aDyObject);
+ }
+ }
+}
+
+/*************************************************************************/
+void SwModify::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
+{
+ NotifyClients( pOldValue, pNewValue );
+}
+
+void SwModify::NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
+{
+ if (IsInCache() || IsInSwFntCache())
+ {
+ const sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
+ pNewValue ? pNewValue->Which() : 0;
+ CheckCaching( nWhich );
+ }
+
+ if (!pRoot || IsModifyLocked())
+ return;
+
+ LockModify();
+
+ // mba: WTF?!
+ if( !pOldValue )
+ bLockClientList = sal_True;
+ else
+ {
+ // following Modifies shouldn't call an ASSERT
+ switch( pOldValue->Which() )
+ {
+ case RES_OBJECTDYING:
+ case RES_REMOVE_UNO_OBJECT:
+ bLockClientList = ((SwPtrMsgPoolItem *)pOldValue)->pObject != this;
+ break;
+
+ case RES_FOOTNOTE_DELETED:
+ case RES_REFMARK_DELETED:
+ case RES_TOXMARK_DELETED:
+ case RES_FIELD_DELETED:
+ bLockClientList = sal_False;
+ break;
+ default:
+ bLockClientList = sal_True;
+ }
+ }
+
+ ModifyBroadcast( pOldValue, pNewValue );
+ bLockClientList = sal_False;
+ UnlockModify();
+}
+
+sal_Bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
+{
+ sal_Bool bRet = sal_True; // bedeutet weiter zum naechsten
+
+ if( pRoot )
+ {
+ SwClientIter aIter( *(SwModify*)this );
+
+ SwClient* pLast = aIter.GoStart();
+ if( pLast )
+ while( 0 != ( bRet = pLast->GetInfo( rInfo )) &&
+ 0 != ( pLast = aIter++ ) )
+ ;
+ }
+
+ return bRet;
+}
+
+/*************************************************************************/
+void SwModify::Add(SwClient *pDepend)
+{
+ ASSERT( !bLockClientList, "Client inserted while in Modify" );
+
+ if(pDepend->pRegisteredIn != this )
+ {
+#ifdef DBG_UTIL
+ SwClientIter* pTmp = pClientIters;
+ while( pTmp )
+ {
+ ASSERT( &pTmp->GetModify() != pRoot, "Client added to active ClientIter" );
+ pTmp = pTmp->pNxtIter;
+ }
+#endif
+ // deregister new client in case it is already registered elsewhere
+ if( pDepend->pRegisteredIn != 0 )
+ pDepend->pRegisteredIn->Remove( pDepend );
+
+ if( !pRoot )
+ {
+ // first client added
+ pRoot = pDepend;
+ pRoot->pLeft = 0;
+ pRoot->pRight = 0;
+ }
+ else
+ {
+ // append client
+ pDepend->pRight = pRoot->pRight;
+ pRoot->pRight = pDepend;
+ pDepend->pLeft = pRoot;
+ if( pDepend->pRight )
+ pDepend->pRight->pLeft = pDepend;
+ }
+
+ // connect client to me
+ pDepend->pRegisteredIn = this;
+ }
+}
+
+/*************************************************************************/
+
+SwClient* SwModify::Remove(SwClient * pDepend)
+{
+ if ( bInDocDTOR )
+ return 0;
+
+ ASSERT( !bLockClientList || pDepend->mbIsAllowedToBeRemovedInModifyCall, "SwClient shall be removed in Modify call!" );
+
+ if( pDepend->pRegisteredIn == this )
+ {
+ // SwClient is my listener
+ // remove it from my list
+ SwClient* pR = pDepend->pRight;
+ SwClient* pL = pDepend->pLeft;
+ if( pRoot == pDepend )
+ pRoot = pL ? pL : pR;
+
+ if( pL )
+ pL->pRight = pR;
+ if( pR )
+ pR->pLeft = pL;
+
+ // update ClientIters
+ SwClientIter* pTmp = pClientIters;
+ while( pTmp )
+ {
+ if( pTmp->pAct == pDepend || pTmp->pDelNext == pDepend )
+ // if object being removed is the current or next object in an iterator, advance this iterator
+ pTmp->pDelNext = pR;
+ pTmp = pTmp->pNxtIter;
+ }
+
+ pDepend->pLeft = 0;
+ pDepend->pRight = 0;
+ }
+ else
+ {
+ ASSERT( false, "SwModify::Remove(): pDepend nicht gefunden" );
+ }
+
+ // disconnect client from me
+ pDepend->pRegisteredIn = 0;
+ return pDepend;
+}
+
+int SwModify::GetClientCount() const
+{
+ int nRet=0;
+ SwClientIter aIter( *this );
+ SwClient *pLast = aIter.GoStart();
+ if( pLast )
+ do
+ {
+ ++nRet;
+ } while( 0 != ( pLast = aIter++ ));
+ return nRet;
+}
+
+void SwModify::CheckCaching( const sal_uInt16 nWhich )
+{
+ if (isCHRATR(nWhich))
+ {
+ SetInSwFntCache( sal_False );
+ }
+ else
+ switch ( nWhich )
+ {
+ case RES_OBJECTDYING:
+ case RES_FMT_CHG:
+ case RES_ATTRSET_CHG:
+ SetInSwFntCache( sal_False );
+
+ case RES_UL_SPACE:
+ case RES_LR_SPACE:
+ case RES_BOX:
+ case RES_SHADOW:
+ case RES_FRM_SIZE:
+ case RES_KEEP:
+ case RES_BREAK:
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ break;
+ }
+}
+
+void SwModify::CallSwClientNotify( const SfxHint& rHint ) const
+{
+ SwClientIter aIter(*this);
+ SwClient * pClient = aIter.GoStart();
+ while (pClient)
+ {
+ pClient->SwClientNotify( *this, rHint );
+ pClient = aIter++;
+ }
+}
+
+void SwModify::ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType )
+{
+ SwClientIter aIter(*this);
+ SwClient * pClient = aIter.First( nType );
+ while (pClient)
+ {
+ pClient->Modify( pOldValue, pNewValue );
+ pClient = aIter.Next();
+ }
+}
+
+// ----------
+// SwDepend
+// ----------
+
+/*************************************************************************/
+
+SwDepend::SwDepend(SwClient *pTellHim, SwModify *pDepend)
+ : SwClient(pDepend)
+{
+ pToTell = pTellHim;
+}
+
+/*************************************************************************/
+
+void SwDepend::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue )
+{
+ if(pNewValue && pNewValue->Which() == RES_OBJECTDYING)
+ CheckRegistration(pOldValue,pNewValue);
+ else if(pToTell)
+ pToTell->ModifyNotification(pOldValue, pNewValue);
+}
+
+void SwDepend::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
+{
+ if ( pToTell )
+ pToTell->SwClientNotifyCall( rMod, rHint );
+}
+
+sal_Bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const
+{
+ return pToTell ? pToTell->GetInfo( rInfo ) : sal_True;
+}
+
+/********************************************************************/
+
+SwClientIter::SwClientIter( const SwModify& rModify )
+ : rRoot( rModify )
+{
+ pNxtIter = 0;
+ if( pClientIters )
+ {
+ // append to list of ClientIters
+ SwClientIter* pTmp = pClientIters;
+ while( pTmp->pNxtIter )
+ pTmp = pTmp->pNxtIter;
+ pTmp->pNxtIter = this;
+ }
+ else
+ pClientIters = this;
+
+ pAct = const_cast<SwClient*>(rRoot.GetDepends());
+ pDelNext = pAct;
+}
+
+
+
+SwClientIter::~SwClientIter()
+{
+ if( pClientIters )
+ {
+ // reorganize list of ClientIters
+ if( pClientIters == this )
+ pClientIters = pNxtIter;
+ else
+ {
+ SwClientIter* pTmp = pClientIters;
+ while( pTmp->pNxtIter != this )
+ if( 0 == ( pTmp = pTmp->pNxtIter ) )
+ {
+ ASSERT( this, "wo ist mein Pointer" );
+ return ;
+ }
+ pTmp->pNxtIter = pNxtIter;
+ }
+ }
+}
+
+
+SwClient* SwClientIter::operator++(int)
+{
+ if( pDelNext == pAct )
+ {
+ pAct = pAct->pRight;
+ pDelNext = pAct;
+ }
+ else
+ pAct = pDelNext;
+ return pAct;
+}
+
+SwClient* SwClientIter::GoStart()
+{
+ pAct = const_cast<SwClient*>(rRoot.GetDepends());
+ if( pAct )
+ while( pAct->pLeft )
+ pAct = pAct->pLeft;
+ pDelNext = pAct;
+ return pAct;
+}
+
+SwClient* SwClientIter::GoEnd()
+{
+ pAct = pDelNext;
+ if( !pAct )
+ pAct = const_cast<SwClient*>(rRoot.GetDepends());
+ if( pAct )
+ while( pAct->pRight )
+ pAct = pAct->pRight;
+ pDelNext = pAct;
+ return pAct;
+}
+
+SwClient* SwClientIter::First( TypeId nType )
+{
+ aSrchId = nType;
+ GoStart();
+ if( pAct )
+ do {
+ if( pAct->IsA( aSrchId ) )
+ break;
+
+ if( pDelNext == pAct )
+ {
+ pAct = pAct->pRight;
+ pDelNext = pAct;
+ }
+ else
+ pAct = pDelNext;
+
+ } while( pAct );
+ return pAct;
+}
+
+SwClient* SwClientIter::Next()
+{
+ do {
+ if( pDelNext == pAct )
+ {
+ pAct = pAct->pRight;
+ pDelNext = pAct;
+ }
+ else
+ pAct = pDelNext;
+
+ if( pAct && pAct->IsA( aSrchId ) )
+ break;
+ } while( pAct );
+ return pAct;
+}
+
+SwClient* SwClientIter::Last( TypeId nType )
+{
+ aSrchId = nType;
+ GoEnd();
+ if( pAct )
+ do {
+ if( pAct->IsA( aSrchId ) )
+ break;
+
+ if( pDelNext == pAct )
+ pAct = pAct->pLeft;
+ else
+ pAct = pDelNext->pLeft;
+ pDelNext = pAct;
+
+ } while( pAct );
+ return pAct;
+}
+
+SwClient* SwClientIter::Previous()
+{
+ do {
+ if( pDelNext == pAct )
+ pAct = pAct->pLeft;
+ else
+ pAct = pDelNext->pLeft;
+ pDelNext = pAct;
+
+ if( pAct && pAct->IsA( aSrchId ) )
+ break;
+ } while( pAct );
+ return pAct;
+}
+
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
new file mode 100644
index 000000000000..e171b4408018
--- /dev/null
+++ b/sw/source/core/attr/cellatr.cxx
@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <float.h>
+#include <rtl/math.hxx>
+#include <hintids.hxx> // fuer RES_..
+#include <cellatr.hxx>
+#include <calc.hxx>
+#include <format.hxx>
+#include <doc.hxx>
+#include <swtable.hxx>
+#include <node.hxx>
+#include <hints.hxx>
+#include <rolbck.hxx>
+#include <switerator.hxx>
+
+
+//TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
+
+/*************************************************************************
+|*
+*************************************************************************/
+
+
+SwTblBoxNumFormat::SwTblBoxNumFormat( sal_uInt32 nFormat, sal_Bool bFlag )
+ : SfxUInt32Item( RES_BOXATR_FORMAT, nFormat ), bAuto( bFlag )
+{
+}
+
+
+int SwTblBoxNumFormat::operator==( const SfxPoolItem& rAttr ) const
+{
+ ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ return GetValue() == ((SwTblBoxNumFormat&)rAttr).GetValue() &&
+ bAuto == ((SwTblBoxNumFormat&)rAttr).bAuto;
+}
+
+
+SfxPoolItem* SwTblBoxNumFormat::Clone( SfxItemPool* ) const
+{
+ return new SwTblBoxNumFormat( GetValue(), bAuto );
+}
+
+
+/*************************************************************************
+|*
+*************************************************************************/
+
+
+
+SwTblBoxFormula::SwTblBoxFormula( const String& rFormula )
+ : SfxPoolItem( RES_BOXATR_FORMULA ),
+ SwTableFormula( rFormula ),
+ pDefinedIn( 0 )
+{
+}
+
+
+int SwTblBoxFormula::operator==( const SfxPoolItem& rAttr ) const
+{
+ ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+ return GetFormula() == ((SwTblBoxFormula&)rAttr).GetFormula() &&
+ pDefinedIn == ((SwTblBoxFormula&)rAttr).pDefinedIn;
+}
+
+
+SfxPoolItem* SwTblBoxFormula::Clone( SfxItemPool* ) const
+{
+// auf externe Darstellung umschalten!!
+ SwTblBoxFormula* pNew = new SwTblBoxFormula( GetFormula() );
+ pNew->SwTableFormula::operator=( *this );
+ return pNew;
+}
+
+
+
+ // suche den Node, in dem die Formel steht:
+ // TextFeld -> TextNode,
+ // BoxAttribut -> BoxStartNode
+ // !!! MUSS VON JEDER ABLEITUNG UEBERLADEN WERDEN !!!
+const SwNode* SwTblBoxFormula::GetNodeOfFormula() const
+{
+ const SwNode* pRet = 0;
+ if( pDefinedIn )
+ {
+ SwTableBox* pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
+ if( pBox )
+ pRet = pBox->GetSttNd();
+ }
+ return pRet;
+}
+
+
+SwTableBox* SwTblBoxFormula::GetTableBox()
+{
+ SwTableBox* pBox = 0;
+ if( pDefinedIn )
+ pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
+ return pBox;
+}
+
+
+void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
+{
+ if( !pDefinedIn )
+ return ;
+
+ SwTableFmlUpdate* pUpdtFld;
+ if( !pItem || RES_TABLEFML_UPDATE != pItem->Which() )
+ {
+ // setze bei allen das Value-Flag zurueck
+ ChgValid( sal_False );
+ return ;
+ }
+
+ pUpdtFld = (SwTableFmlUpdate*)pItem;
+
+ // bestimme die Tabelle, in der das Attribut steht
+ const SwTableNode* pTblNd;
+ const SwNode* pNd = GetNodeOfFormula();
+ if( pNd && &pNd->GetNodes() == &pNd->GetDoc()->GetNodes() &&
+ 0 != ( pTblNd = pNd->FindTableNode() ))
+ {
+ switch( pUpdtFld->eFlags )
+ {
+ case TBL_CALC:
+ // setze das Value-Flag zurueck
+ // JP 17.06.96: interne Darstellung auf alle Formeln
+ // (Referenzen auf andere Tabellen!!!)
+// if( VF_CMD & pFld->GetFormat() )
+// pFld->PtrToBoxNm( pUpdtFld->pTbl );
+// else
+ ChgValid( sal_False );
+ break;
+ case TBL_BOXNAME:
+ // ist es die gesuchte Tabelle ??
+ if( &pTblNd->GetTable() == pUpdtFld->pTbl )
+ // zur externen Darstellung
+ PtrToBoxNm( pUpdtFld->pTbl );
+ break;
+ case TBL_BOXPTR:
+ // zur internen Darstellung
+ // JP 17.06.96: interne Darstellung auf alle Formeln
+ // (Referenzen auf andere Tabellen!!!)
+ BoxNmToPtr( &pTblNd->GetTable() );
+ break;
+ case TBL_RELBOXNAME:
+ // ist es die gesuchte Tabelle ??
+ if( &pTblNd->GetTable() == pUpdtFld->pTbl )
+ // zur relativen Darstellung
+ ToRelBoxNm( pUpdtFld->pTbl );
+ break;
+
+ case TBL_SPLITTBL:
+ if( &pTblNd->GetTable() == pUpdtFld->pTbl )
+ {
+ sal_uInt16 nLnPos = SwTableFormula::GetLnPosInTbl(
+ pTblNd->GetTable(), GetTableBox() );
+ pUpdtFld->bBehindSplitLine = USHRT_MAX != nLnPos &&
+ pUpdtFld->nSplitLine <= nLnPos;
+ }
+ else
+ pUpdtFld->bBehindSplitLine = sal_False;
+ // kein break
+ case TBL_MERGETBL:
+ if( pUpdtFld->pHistory )
+ {
+ // fuer die History brauche ich aber die unveraenderte Formel
+ SwTblBoxFormula aCopy( *this );
+ pUpdtFld->bModified = sal_False;
+ ToSplitMergeBoxNm( *pUpdtFld );
+
+ if( pUpdtFld->bModified )
+ {
+ // und dann in der externen Darstellung
+ aCopy.PtrToBoxNm( &pTblNd->GetTable() );
+ pUpdtFld->pHistory->Add( &aCopy, &aCopy,
+ pNd->FindTableBoxStartNode()->GetIndex() );
+ }
+ }
+ else
+ ToSplitMergeBoxNm( *pUpdtFld );
+ break;
+ }
+ }
+}
+
+
+void SwTblBoxFormula::Calc( SwTblCalcPara& rCalcPara, double& rValue )
+{
+ if( !rCalcPara.rCalc.IsCalcError() ) // ist schon Fehler gesetzt ?
+ {
+ // erzeuge aus den BoxNamen die Pointer
+ BoxNmToPtr( rCalcPara.pTbl );
+ String sFml( MakeFormel( rCalcPara ));
+ if( !rCalcPara.rCalc.IsCalcError() )
+ rValue = rCalcPara.rCalc.Calculate( sFml ).GetDouble();
+ else
+ rValue = DBL_MAX;
+ ChgValid( !rCalcPara.IsStackOverFlow() ); // der Wert ist wieder gueltig
+ }
+}
+
+/*************************************************************************
+|*
+*************************************************************************/
+
+
+SwTblBoxValue::SwTblBoxValue()
+ : SfxPoolItem( RES_BOXATR_VALUE ), nValue( 0 )
+{
+}
+
+
+SwTblBoxValue::SwTblBoxValue( const double nVal )
+ : SfxPoolItem( RES_BOXATR_VALUE ), nValue( nVal )
+{
+}
+
+
+int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const
+{
+ ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal");
+ SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) );
+ // items with NaN should be equal to enable pooling
+ return ::rtl::math::isNan(nValue)
+ ? ::rtl::math::isNan(rOther.nValue)
+ : (nValue == rOther.nValue);
+}
+
+
+SfxPoolItem* SwTblBoxValue::Clone( SfxItemPool* ) const
+{
+ return new SwTblBoxValue( nValue );
+}
+
+
+
+
diff --git a/sw/source/core/attr/fmtfollowtextflow.cxx b/sw/source/core/attr/fmtfollowtextflow.cxx
new file mode 100644
index 000000000000..8bcd5b682116
--- /dev/null
+++ b/sw/source/core/attr/fmtfollowtextflow.cxx
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <fmtfollowtextflow.hxx>
+
+TYPEINIT1(SwFmtFollowTextFlow, SfxBoolItem);
+
+SfxPoolItem* SwFmtFollowTextFlow::Clone( SfxItemPool * ) const
+{
+ return new SwFmtFollowTextFlow(*this);
+}
diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
new file mode 100644
index 000000000000..fde57e74e2ff
--- /dev/null
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <fmtwrapinfluenceonobjpos.hxx>
+
+#ifndef _UNOMID_H
+#include <unomid.h>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+TYPEINIT1(SwFmtWrapInfluenceOnObjPos, SfxPoolItem);
+
+SwFmtWrapInfluenceOnObjPos::SwFmtWrapInfluenceOnObjPos(
+ sal_Int16 _nWrapInfluenceOnPosition )
+ : SfxPoolItem( RES_WRAP_INFLUENCE_ON_OBJPOS ),
+ mnWrapInfluenceOnPosition( _nWrapInfluenceOnPosition )
+{
+}
+
+SwFmtWrapInfluenceOnObjPos::SwFmtWrapInfluenceOnObjPos(
+ const SwFmtWrapInfluenceOnObjPos& _rCpy )
+ : SfxPoolItem( RES_WRAP_INFLUENCE_ON_OBJPOS ),
+ mnWrapInfluenceOnPosition( _rCpy.GetWrapInfluenceOnObjPos() )
+{
+}
+
+SwFmtWrapInfluenceOnObjPos::~SwFmtWrapInfluenceOnObjPos()
+{
+}
+
+SwFmtWrapInfluenceOnObjPos& SwFmtWrapInfluenceOnObjPos::operator=(
+ const SwFmtWrapInfluenceOnObjPos& _rSource )
+{
+ mnWrapInfluenceOnPosition = _rSource.GetWrapInfluenceOnObjPos();
+
+ return *this;
+}
+
+int SwFmtWrapInfluenceOnObjPos::operator==( const SfxPoolItem& _rAttr ) const
+{
+ ASSERT( SfxPoolItem::operator==( _rAttr ), "keine gleichen Attribute" );
+ return ( mnWrapInfluenceOnPosition ==
+ static_cast<const SwFmtWrapInfluenceOnObjPos&>(_rAttr).
+ GetWrapInfluenceOnObjPos() );
+}
+
+SfxPoolItem* SwFmtWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
+{
+ return new SwFmtWrapInfluenceOnObjPos(*this);
+}
+
+sal_Bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
+{
+ nMemberId &= ~CONVERT_TWIPS;
+ sal_Bool bRet = sal_True;
+ switch ( nMemberId )
+ {
+ case MID_WRAP_INFLUENCE:
+ {
+ rVal <<= GetWrapInfluenceOnObjPos();
+ }
+ break;
+ default:
+ ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+sal_Bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMemberId )
+{
+ nMemberId &= ~CONVERT_TWIPS;
+ sal_Bool bRet = sal_True;
+
+ switch ( nMemberId )
+ {
+ case MID_WRAP_INFLUENCE:
+ {
+ sal_Int16 nNewWrapInfluence = 0;
+ rVal >>= nNewWrapInfluence;
+ // --> OD 2004-10-18 #i35017# - constant names have changed and
+ // <ITERATIVE> has been added
+ if ( nNewWrapInfluence == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
+ nNewWrapInfluence == text::WrapInfluenceOnPosition::ONCE_CONCURRENT ||
+ nNewWrapInfluence == text::WrapInfluenceOnPosition::ITERATIVE )
+ // <--
+ {
+ SetWrapInfluenceOnObjPos( nNewWrapInfluence );
+ }
+ else
+ {
+ ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::PutValue(..)> - invalid attribute value" );
+ bRet = sal_False;
+ }
+ }
+ break;
+ default:
+ ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+void SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition )
+{
+ // --> OD 2004-10-18 #i35017# - constant names have changed and consider
+ // new value <ITERATIVE>
+ if ( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
+ _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT ||
+ _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ITERATIVE )
+ // <--
+ {
+ mnWrapInfluenceOnPosition = _nWrapInfluenceOnPosition;
+ }
+ else
+ {
+ ASSERT( false, "<SwFmtWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos(..)> - invalid attribute value" );
+ }
+}
+
+// --> OD 2004-10-18 #i35017# - add parameter <_bIterativeAsOnceConcurrent>
+// to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
+sal_Int16 SwFmtWrapInfluenceOnObjPos::GetWrapInfluenceOnObjPos(
+ const bool _bIterativeAsOnceConcurrent ) const
+{
+ sal_Int16 nWrapInfluenceOnPosition( mnWrapInfluenceOnPosition );
+
+ if ( _bIterativeAsOnceConcurrent &&
+ nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ITERATIVE )
+ {
+ nWrapInfluenceOnPosition = text::WrapInfluenceOnPosition::ONCE_CONCURRENT;
+ }
+
+ return nWrapInfluenceOnPosition;
+}
+// <--
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
new file mode 100644
index 000000000000..2e4212fea321
--- /dev/null
+++ b/sw/source/core/attr/format.cxx
@@ -0,0 +1,692 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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> // fuer RES_..
+#include <frame.hxx> // fuer AttrCache
+#include <format.hxx>
+#include <hints.hxx> // fuer SwFmtChg
+#include <doc.hxx>
+#include <paratr.hxx> // fuer SwParaFmt - SwHyphenBug
+#include <swcache.hxx>
+#include <fmtcolfunc.hxx>
+
+TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
+
+/*************************************************************************
+|* SwFmt::SwFmt
+*************************************************************************/
+
+
+SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich )
+ : SwModify( pDrvdFrm ),
+ aSet( rPool, pWhichRanges ),
+ nWhichId( nFmtWhich ),
+ nFmtId( 0 ),
+ nPoolFmtId( USHRT_MAX ),
+ nPoolHelpId( USHRT_MAX ),
+ nPoolHlpFileId( UCHAR_MAX )
+{
+ aFmtName.AssignAscii( pFmtNm );
+ bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
+ bAutoFmt = sal_True;
+
+ if( pDrvdFrm )
+ aSet.SetParent( &pDrvdFrm->aSet );
+}
+
+
+SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm,
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich )
+ : SwModify( pDrvdFrm ),
+ aFmtName( rFmtNm ),
+ aSet( rPool, pWhichRanges ),
+ nWhichId( nFmtWhich ),
+ nFmtId( 0 ),
+ nPoolFmtId( USHRT_MAX ),
+ nPoolHelpId( USHRT_MAX ),
+ nPoolHlpFileId( UCHAR_MAX )
+{
+ bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
+ bAutoFmt = sal_True;
+
+ if( pDrvdFrm )
+ aSet.SetParent( &pDrvdFrm->aSet );
+}
+
+
+SwFmt::SwFmt( const SwFmt& rFmt )
+ : SwModify( rFmt.DerivedFrom() ),
+ aFmtName( rFmt.aFmtName ),
+ aSet( rFmt.aSet ),
+ nWhichId( rFmt.nWhichId ),
+ nFmtId( 0 ),
+ nPoolFmtId( rFmt.GetPoolFmtId() ),
+ nPoolHelpId( rFmt.GetPoolHelpId() ),
+ nPoolHlpFileId( rFmt.GetPoolHlpFileId() )
+{
+ bWritten = bFmtInDTOR = sal_False; // LAYER_IMPL
+ bAutoFmt = rFmt.bAutoFmt;
+ bAutoUpdateFmt = rFmt.bAutoUpdateFmt;
+
+ if( rFmt.DerivedFrom() )
+ aSet.SetParent( &rFmt.DerivedFrom()->aSet );
+ // einige Sonderbehandlungen fuer Attribute
+ aSet.SetModifyAtAttr( this );
+}
+
+/*************************************************************************
+|* SwFmt &SwFmt::operator=(const SwFmt& aFmt)
+|*
+|* Beschreibung Dokument 1.14
+|* Ersterstellung JP 22.11.90
+|* Letzte Aenderung JP 05.08.94
+*************************************************************************/
+
+
+SwFmt &SwFmt::operator=(const SwFmt& rFmt)
+{
+ nWhichId = rFmt.nWhichId;
+ nPoolFmtId = rFmt.GetPoolFmtId();
+ nPoolHelpId = rFmt.GetPoolHelpId();
+ nPoolHlpFileId = rFmt.GetPoolHlpFileId();
+
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ SetInSwFntCache( sal_False );
+
+ // kopiere nur das Attribut-Delta Array
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+ aSet.Intersect_BC( rFmt.aSet, &aOld, &aNew );
+ aSet.Put_BC( rFmt.aSet, &aOld, &aNew );
+
+ // einige Sonderbehandlungen fuer Attribute
+ aSet.SetModifyAtAttr( this );
+
+ // PoolItem-Attr erzeugen fuers Modify !!!
+ if( aOld.Count() )
+ {
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+
+ if( GetRegisteredIn() != rFmt.GetRegisteredIn() )
+ {
+ if( GetRegisteredIn() )
+ GetRegisteredInNonConst()->Remove(this);
+ if(rFmt.GetRegisteredIn())
+ {
+ const_cast<SwFmt&>(rFmt).GetRegisteredInNonConst()->Add(this);
+ aSet.SetParent( &rFmt.aSet );
+ }
+ else
+ aSet.SetParent( 0 );
+ }
+ bAutoFmt = rFmt.bAutoFmt;
+ bAutoUpdateFmt = rFmt.bAutoUpdateFmt;
+ return *this;
+}
+
+void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
+{
+ ASSERT(!IsDefault(), "SetName: Defaultformat" );
+ if( bBroadcast )
+ {
+ SwStringMsgPoolItem aOld( RES_NAME_CHANGED, aFmtName );
+ SwStringMsgPoolItem aNew( RES_NAME_CHANGED, rNewName );
+ aFmtName = rNewName;
+ ModifyNotification( &aOld, &aNew );
+ }
+ else
+ {
+ aFmtName = rNewName;
+ }
+}
+
+/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ * diese Funktion wird in jedem Copy-Ctor gerufen, damit die
+ * Attribute kopiert werden. Diese koennen erst kopiert werden,
+ * wenn die abgeleitet Klasse existiert, denn beim Setzen der
+ * Attribute wird die Which()-Methode gerufen, die hier in der
+ * Basis-Klasse auf 0 defaultet ist.
+ *
+ * Zusatz: JP 8.4.1994
+ * Wird ueber Dokumentgrenzen kopiert, so muss das neue Dokument
+ * mit angeben werden, in dem this steht. Z.Z. ist das fuers
+ * DropCaps wichtig, dieses haelt Daten, die tief kopiert werden
+ * muessen !!
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+
+
+void SwFmt::CopyAttrs( const SwFmt& rFmt, sal_Bool bReplace )
+{
+ // kopiere nur das Attribut-Delta Array
+
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ SetInSwFntCache( sal_False );
+
+ // Sonderbehandlung fuer einige Attribute
+ SwAttrSet* pChgSet = (SwAttrSet*)&rFmt.aSet;
+
+ if( !bReplace ) // nur die neu, die nicht gesetzt sind ??
+ {
+ if( pChgSet == (SwAttrSet*)&rFmt.aSet ) // Set hier kopieren
+ pChgSet = new SwAttrSet( rFmt.aSet );
+ pChgSet->Differentiate( aSet );
+ }
+
+ // kopiere nur das Attribut-Delta Array
+ if( pChgSet->GetPool() != aSet.GetPool() )
+ pChgSet->CopyToModify( *this );
+ else
+ {
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+
+ if ( 0 != aSet.Put_BC( *pChgSet, &aOld, &aNew ) )
+ {
+ // einige Sonderbehandlungen fuer Attribute
+ aSet.SetModifyAtAttr( this );
+
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+ }
+
+ if( pChgSet != (SwAttrSet*)&rFmt.aSet ) // Set hier angelegt ?
+ delete pChgSet;
+}
+
+/*************************************************************************
+|* SwFmt::~SwFmt()
+|*
+|* Beschreibung Dokument 1.14
+|* Ersterstellung JP 22.11.90
+|* Letzte Aenderung JP 14.02.91
+*************************************************************************/
+
+
+SwFmt::~SwFmt()
+{
+ /* das passiert bei der ObjectDying Message */
+ /* alle Abhaengigen auf DerivedFrom umhaengen */
+ if( GetDepends() )
+ {
+ ASSERT(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" );
+
+ bFmtInDTOR = sal_True;
+
+ SwFmt *pParentFmt = DerivedFrom();
+ if (!pParentFmt) // see #112405#
+ {
+ DBG_ERROR( "~SwFmt: parent format missing" );
+ }
+ else
+ {
+ while( GetDepends() )
+ {
+ SwFmtChg aOldFmt(this);
+ SwFmtChg aNewFmt(pParentFmt);
+ SwClient * pDepend = (SwClient*)GetDepends();
+ pParentFmt->Add(pDepend);
+ pDepend->ModifyNotification(&aOldFmt, &aNewFmt);
+ }
+ }
+ }
+}
+
+
+/*************************************************************************
+|* void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
+|*
+|* Beschreibung Dokument 1.14
+|* Ersterstellung JP 22.11.90
+|* Letzte Aenderung JP 05.08.94
+*************************************************************************/
+
+
+void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
+{
+ sal_Bool bWeiter = sal_True; // sal_True = Propagierung an die Abhaengigen
+
+ sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
+ pNewValue ? pNewValue->Which() : 0 ;
+ switch( nWhich )
+ {
+ case 0: break; // Which-Id von 0 ???
+
+ case RES_OBJECTDYING :
+ {
+ // ist das sterbende Object das "Parent"-Format von diesen Format,
+ // dann haengt sich dieses Format an den Parent vom Parent
+ SwFmt * pFmt = (SwFmt *) ((SwPtrMsgPoolItem *)pNewValue)->pObject;
+
+ // nicht umhaengen wenn dieses das oberste Format ist !!
+ if( GetRegisteredIn() && GetRegisteredIn() == pFmt )
+ {
+ if( pFmt->GetRegisteredIn() )
+ {
+ // wenn Parent, dann im neuen Parent wieder anmelden
+ pFmt->DerivedFrom()->Add( this );
+ aSet.SetParent( &DerivedFrom()->aSet );
+ }
+ else
+ {
+ // sonst auf jeden Fall beim sterbenden abmelden
+ DerivedFrom()->Remove( this );
+ aSet.SetParent( 0 );
+ }
+ }
+ } // OBJECTDYING
+ break;
+
+ case RES_ATTRSET_CHG:
+ if( ((SwAttrSetChg*)pOldValue)->GetTheChgdSet() != &aSet )
+ {
+ //nur die weiter geben, die hier nicht gesetzt sind !!
+ SwAttrSetChg aOld( *(SwAttrSetChg*)pOldValue );
+ SwAttrSetChg aNew( *(SwAttrSetChg*)pNewValue );
+
+ aOld.GetChgSet()->Differentiate( aSet );
+ aNew.GetChgSet()->Differentiate( aSet );
+
+ if( aNew.Count() )
+ // keine mehr gesetzt, dann Ende !!
+ NotifyClients( &aOld, &aNew );
+ bWeiter = sal_False;
+ }
+ break;
+ case RES_FMT_CHG:
+ // falls mein Format Parent umgesetzt wird, dann melde ich
+ // meinen Attrset beim Neuen an.
+
+ // sein eigenes Modify ueberspringen !!
+ if( ((SwFmtChg*)pOldValue)->pChangedFmt != this &&
+ ((SwFmtChg*)pNewValue)->pChangedFmt == DerivedFrom() )
+ {
+ // den Set an den neuen Parent haengen
+ aSet.SetParent( DerivedFrom() ? &DerivedFrom()->aSet : 0 );
+ }
+ break;
+
+ case RES_RESET_FMTWRITTEN:
+ {
+ // IsWritten-Flag zuruecksetzen. Hint nur an abhanegige
+ // Formate (und keine Frames) propagieren.
+ // mba: the code does the opposite from what is written in the comment!
+ ResetWritten();
+ // mba: here we don't use the additional stuff from NotifyClients().
+ // should we?!
+ // mba: move the code that ignores this event to the clients
+ ModifyBroadcast( pOldValue, pNewValue, TYPE(SwFmt) );
+ bWeiter = sal_False;
+ }
+ break;
+
+ default:
+ {
+ // Ist das Attribut in diesem Format definiert, dann auf
+ // NICHT weiter propagieren !!
+ if( SFX_ITEM_SET == aSet.GetItemState( nWhich, sal_False ))
+ {
+// wie finde ich heraus, ob nicht ich die Message versende ??
+// aber wer ruft das hier ????
+//ASSERT( sal_False, "Modify ohne Absender verschickt" );
+//JP 11.06.96: DropCaps koennen hierher kommen
+ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
+ bWeiter = sal_False;
+ }
+
+ } // default
+ } // switch
+
+ if( bWeiter )
+ {
+ // laufe durch alle abhaengigen Formate
+ NotifyClients( pOldValue, pNewValue );
+ }
+
+}
+
+
+sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
+{
+ if ( pDerFrom )
+ {
+ // Zyklus?
+ const SwFmt* pFmt = pDerFrom;
+ while ( pFmt != 0 )
+ {
+ if ( pFmt == this )
+ return sal_False;
+
+ pFmt=pFmt->DerivedFrom();
+ }
+ }
+ else
+ {
+ // Nichts angegeben, Dflt-Format suchen
+ pDerFrom = this;
+ while ( pDerFrom->DerivedFrom() )
+ pDerFrom = pDerFrom->DerivedFrom();
+ }
+ if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) )
+ return sal_False;
+
+ ASSERT( Which()==pDerFrom->Which()
+ || ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
+ || ( Which()==RES_TXTFMTCOLL && pDerFrom->Which()==RES_CONDTXTFMTCOLL)
+ || ( Which()==RES_FLYFRMFMT && pDerFrom->Which()==RES_FRMFMT ),
+ "SetDerivedFrom: Aepfel von Birnen ableiten?");
+
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ SetInSwFntCache( sal_False );
+
+ pDerFrom->Add(this);
+ aSet.SetParent( &pDerFrom->aSet );
+
+ SwFmtChg aOldFmt(this);
+ SwFmtChg aNewFmt(this);
+ ModifyNotification( &aOldFmt, &aNewFmt );
+
+ return sal_True;
+}
+
+
+sal_Bool SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
+{
+ if ( IsInCache() || IsInSwFntCache() )
+ {
+ const sal_uInt16 nWhich = rAttr.Which();
+ CheckCaching( nWhich );
+ }
+
+ // wenn Modify gelockt ist, werden keine Modifies verschickt;
+ // fuer FrmFmt's immer das Modify verschicken!
+ sal_Bool bRet = sal_False;
+ const sal_uInt16 nFmtWhich = Which();
+ if( IsModifyLocked() || (!GetDepends() &&
+ (RES_GRFFMTCOLL == nFmtWhich ||
+ RES_TXTFMTCOLL == nFmtWhich ) ) )
+ {
+ if( 0 != ( bRet = (0 != aSet.Put( rAttr ))) )
+ aSet.SetModifyAtAttr( this );
+ // --> OD 2006-11-22 #i71574#
+ if ( nFmtWhich == RES_TXTFMTCOLL && rAttr.Which() == RES_PARATR_NUMRULE )
+ {
+ TxtFmtCollFunc::CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle( this );
+ }
+ // <--
+ }
+ else
+ {
+ // kopiere nur das Attribut-Delta Array
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+
+ bRet = 0 != aSet.Put_BC( rAttr, &aOld, &aNew );
+ if( bRet )
+ {
+ // einige Sonderbehandlungen fuer Attribute
+ aSet.SetModifyAtAttr( this );
+
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+ }
+ return bRet;
+}
+
+
+sal_Bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
+{
+ if( !rSet.Count() )
+ return sal_False;
+
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ SetInSwFntCache( sal_False );
+
+ // wenn Modify gelockt ist, werden keine Modifies verschickt;
+ // fuer FrmFmt's immer das Modify verschicken!
+ sal_Bool bRet = sal_False;
+ const sal_uInt16 nFmtWhich = Which();
+ if ( IsModifyLocked() ||
+ ( !GetDepends() &&
+ ( RES_GRFFMTCOLL == nFmtWhich ||
+ RES_TXTFMTCOLL == nFmtWhich ) ) )
+ {
+ if( 0 != ( bRet = (0 != aSet.Put( rSet ))) )
+ aSet.SetModifyAtAttr( this );
+ // --> OD 2006-11-22 #i71574#
+ if ( nFmtWhich == RES_TXTFMTCOLL )
+ {
+ TxtFmtCollFunc::CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle( this );
+ }
+ // <--
+ }
+ else
+ {
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+ bRet = 0 != aSet.Put_BC( rSet, &aOld, &aNew );
+ if( bRet )
+ {
+ // einige Sonderbehandlungen fuer Attribute
+ aSet.SetModifyAtAttr( this );
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+ }
+ return bRet;
+}
+
+// Nimmt den Hint mit nWhich aus dem Delta-Array
+
+
+sal_Bool SwFmt::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
+{
+ if( !aSet.Count() )
+ return sal_False;
+
+ if( !nWhich2 || nWhich2 < nWhich1 )
+ nWhich2 = nWhich1; // dann setze auf 1. Id, nur dieses Item
+
+ if ( IsInCache() || IsInSwFntCache() )
+ {
+ for( sal_uInt16 n = nWhich1; n < nWhich2; ++n )
+ CheckCaching( n );
+ }
+
+ // wenn Modify gelockt ist, werden keine Modifies verschickt
+ if( IsModifyLocked() )
+ return 0 != (( nWhich2 == nWhich1 )
+ ? aSet.ClearItem( nWhich1 )
+ : aSet.ClearItem_BC( nWhich1, nWhich2 ));
+
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+ sal_Bool bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew );
+
+ if( bRet )
+ {
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+ return bRet;
+}
+
+
+
+// --> OD 2007-01-24 #i73790#
+// method renamed
+sal_uInt16 SwFmt::ResetAllFmtAttr()
+// <--
+{
+ if( !aSet.Count() )
+ return 0;
+
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ SetInSwFntCache( sal_False );
+
+ // wenn Modify gelockt ist, werden keine Modifies verschickt
+ if( IsModifyLocked() )
+ return aSet.ClearItem( 0 );
+
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+ sal_Bool bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew );
+
+ if( bRet )
+ {
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+ return aNew.Count();
+}
+
+
+/*************************************************************************
+|* void SwFmt::GetInfo( const SfxPoolItem& ) const
+|*
+|* Beschreibung
+|* Ersterstellung JP 18.04.94
+|* Letzte Aenderung JP 05.08.94
+*************************************************************************/
+
+
+sal_Bool SwFmt::GetInfo( SfxPoolItem& rInfo ) const
+{
+ sal_Bool bRet = SwModify::GetInfo( rInfo );
+ return bRet;
+}
+
+
+void SwFmt::DelDiffs( const SfxItemSet& rSet )
+{
+ if( !aSet.Count() )
+ return;
+
+ if ( IsInCache() )
+ {
+ SwFrm::GetCache().Delete( this );
+ SetInCache( sal_False );
+ }
+ SetInSwFntCache( sal_False );
+
+ // wenn Modify gelockt ist, werden keine Modifies verschickt
+ if( IsModifyLocked() )
+ {
+ aSet.Intersect( rSet );
+ return;
+ }
+
+ SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
+ aNew( *aSet.GetPool(), aSet.GetRanges() );
+ sal_Bool bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew );
+
+ if( bRet )
+ {
+ SwAttrSetChg aChgOld( aSet, aOld );
+ SwAttrSetChg aChgNew( aSet, aNew );
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ }
+}
+
+/** 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
+*/
+sal_Bool SwFmt::IsBackgroundTransparent() const
+{
+ return sal_False;
+}
+
+/** 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
+*/
+sal_Bool SwFmt::IsShadowTransparent() const
+{
+ return sal_False;
+}
+
+/*
+ * Document Interface Access
+ */
+const IDocumentSettingAccess* SwFmt::getIDocumentSettingAccess() const { return GetDoc(); }
+const IDocumentDrawModelAccess* SwFmt::getIDocumentDrawModelAccess() const { return GetDoc(); }
+IDocumentDrawModelAccess* SwFmt::getIDocumentDrawModelAccess() { return GetDoc(); }
+const IDocumentLayoutAccess* SwFmt::getIDocumentLayoutAccess() const { return GetDoc(); }
+IDocumentLayoutAccess* SwFmt::getIDocumentLayoutAccess() { return GetDoc(); }
+IDocumentTimerAccess* SwFmt::getIDocumentTimerAccess() { return GetDoc(); }
+IDocumentFieldsAccess* SwFmt::getIDocumentFieldsAccess() { return GetDoc(); }
+IDocumentChartDataProviderAccess* SwFmt::getIDocumentChartDataProviderAccess() { return GetDoc(); }
+
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
new file mode 100644
index 000000000000..3d9d284b8c6d
--- /dev/null
+++ b/sw/source/core/attr/hints.cxx
@@ -0,0 +1,308 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <hints.hxx>
+
+#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
+#include <com/sun/star/i18n/ScriptType.hdl>
+#endif
+#include <editeng/scripttypeitem.hxx>
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <ndtxt.hxx>
+#include <errhdl.hxx>
+
+SwFmtChg::SwFmtChg( SwFmt *pFmt )
+ : SwMsgPoolItem( RES_FMT_CHG ),
+ pChangedFmt( pFmt )
+{}
+
+
+
+SwInsTxt::SwInsTxt( xub_StrLen nP, xub_StrLen nL )
+ : SwMsgPoolItem( RES_INS_TXT ),
+ nPos( nP ),
+ nLen( nL )
+{}
+
+
+
+SwDelChr::SwDelChr( xub_StrLen nP )
+ : SwMsgPoolItem( RES_DEL_CHR ),
+ nPos( nP )
+{}
+
+
+
+SwDelTxt::SwDelTxt( xub_StrLen nS, xub_StrLen nL )
+ : SwMsgPoolItem( RES_DEL_TXT ),
+ nStart( nS ),
+ nLen( nL )
+{}
+
+
+
+SwUpdateAttr::SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW )
+ : SwMsgPoolItem( RES_UPDATE_ATTR ),
+ nStart( nS ),
+ nEnd( nE ),
+ nWhichAttr( 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.
+
+
+SwRefMarkFldUpdate::SwRefMarkFldUpdate( const OutputDevice* pOutput )
+ : SwMsgPoolItem( RES_REFMARKFLD_UPDATE ),
+ pOut( pOutput )
+{
+ ASSERT( pOut, "es muss ein OutputDevice-Pointer gesetzt werden!" );
+}
+
+
+SwDocPosUpdate::SwDocPosUpdate( const SwTwips nDcPos )
+ : SwMsgPoolItem( RES_DOCPOS_UPDATE ),
+ nDocPos(nDcPos)
+{}
+
+
+
+// SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll
+SwTableFmlUpdate::SwTableFmlUpdate( const SwTable* pNewTbl )
+ : SwMsgPoolItem( RES_TABLEFML_UPDATE ),
+ pTbl( pNewTbl ), pHistory( 0 ), nSplitLine( USHRT_MAX ),
+ eFlags( TBL_CALC )
+{
+ DATA.pDelTbl = 0;
+ bModified = bBehindSplitLine = sal_False;
+ ASSERT( pTbl, "es muss ein Table-Pointer gesetzt werden!" );
+}
+
+
+SwAutoFmtGetDocNode::SwAutoFmtGetDocNode( const SwNodes* pNds )
+ : SwMsgPoolItem( RES_AUTOFMT_DOCNODE ),
+ pCntntNode( 0 ), pNodes( pNds )
+{}
+
+
+SwAttrSetChg::SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet )
+ : SwMsgPoolItem( RES_ATTRSET_CHG ),
+ bDelSet( sal_False ),
+ pChgSet( &rSet ),
+ pTheChgdSet( &rTheSet )
+{}
+
+
+SwAttrSetChg::SwAttrSetChg( const SwAttrSetChg& rChgSet )
+ : SwMsgPoolItem( RES_ATTRSET_CHG ),
+ bDelSet( sal_True ),
+ pTheChgdSet( rChgSet.pTheChgdSet )
+{
+ pChgSet = new SwAttrSet( *rChgSet.pChgSet );
+}
+
+
+SwAttrSetChg::~SwAttrSetChg()
+{
+ if( bDelSet )
+ delete pChgSet;
+}
+
+
+#ifdef DBG_UTIL
+
+void SwAttrSetChg::ClearItem( sal_uInt16 nWhch )
+{
+ ASSERT( bDelSet, "der Set darf nicht veraendert werden!" );
+ pChgSet->ClearItem( nWhch );
+}
+
+#endif
+
+
+SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch )
+ : SfxPoolItem( nWhch )
+{}
+
+
+// "Overhead" vom SfxPoolItem
+int SwMsgPoolItem::operator==( const SfxPoolItem& ) const
+{
+ ASSERT( sal_False, "SwMsgPoolItem kennt kein ==" );
+ return 0;
+}
+
+
+SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
+{
+ ASSERT( sal_False, "SwMsgPoolItem kennt kein Clone" );
+ return 0;
+}
+
+/******************************************************************************
+ * hole aus der Default-Attribut Tabelle ueber den Which-Wert
+ * das entsprechende default Attribut.
+ * Ist keines vorhanden, returnt ein 0-Pointer !!!
+ * Used to be inlined (hintids.hxx) in PRODUCT.
+ ******************************************************************************/
+#ifndef DBG_UTIL
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
+{
+ return aAttrTab[ nWhich - POOLATTR_BEGIN ];
+}
+#else
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
+{
+ ASSERT_ID( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN,
+ ERR_OUTOFSCOPE );
+
+ SfxPoolItem *pHt = aAttrTab[ nWhich - POOLATTR_BEGIN ];
+ ASSERT( pHt, "GetDfltFmtAttr(): Dflt == 0" );
+ return pHt;
+}
+#endif
+
+
+
+SwCondCollCondChg::SwCondCollCondChg( SwFmt *pFmt )
+ : SwMsgPoolItem( RES_CONDCOLL_CONDCHG ), pChangedFmt( pFmt )
+{
+}
+
+
+SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrm *pPg ) :
+ SwMsgPoolItem( RES_VIRTPAGENUM_INFO ),
+ pPage( 0 ),
+ pOrigPage( pPg ),
+ pFrm( 0 )
+{
+}
+
+// --> OD 2008-02-19 #refactorlists#
+//SwNumRuleInfo::SwNumRuleInfo( const String& rRuleName )
+// : SwMsgPoolItem( RES_GETNUMNODES ), rName( rRuleName )
+//{
+//}
+
+//void SwNumRuleInfo::AddNode( SwTxtNode& rNd )
+//{
+// aList.Insert(rNd.GetIndex(), &rNd);
+//}
+
+
+SwFindNearestNode::SwFindNearestNode( const SwNode& rNd )
+ : SwMsgPoolItem( RES_FINDNEARESTNODE ), pNd( &rNd ), pFnd( 0 )
+{
+}
+
+void SwFindNearestNode::CheckNode( const SwNode& rNd )
+{
+ if( &pNd->GetNodes() == &rNd.GetNodes() )
+ {
+ sal_uLong nIdx = rNd.GetIndex();
+ if( nIdx < pNd->GetIndex() &&
+ ( !pFnd || nIdx > pFnd->GetIndex() ) &&
+ nIdx > rNd.GetNodes().GetEndOfExtras().GetIndex() )
+ pFnd = &rNd;
+ }
+}
+
+
+
+sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript )
+{
+ static const sal_uInt16 aLangMap[3] =
+ { RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE };
+ static const sal_uInt16 aFontMap[3] =
+ { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT};
+ static const sal_uInt16 aFontSizeMap[3] =
+ { RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE };
+ static const sal_uInt16 aWeightMap[3] =
+ { RES_CHRATR_WEIGHT, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CTL_WEIGHT};
+ static const sal_uInt16 aPostureMap[3] =
+ { RES_CHRATR_POSTURE, RES_CHRATR_CJK_POSTURE, RES_CHRATR_CTL_POSTURE};
+
+ const sal_uInt16* pM;
+ switch( nWhich )
+ {
+ case RES_CHRATR_LANGUAGE:
+ case RES_CHRATR_CJK_LANGUAGE:
+ case RES_CHRATR_CTL_LANGUAGE:
+ pM = aLangMap;
+ break;
+
+ case RES_CHRATR_FONT:
+ case RES_CHRATR_CJK_FONT:
+ case RES_CHRATR_CTL_FONT:
+ pM = aFontMap;
+ break;
+
+ case RES_CHRATR_FONTSIZE:
+ case RES_CHRATR_CJK_FONTSIZE:
+ case RES_CHRATR_CTL_FONTSIZE:
+ pM = aFontSizeMap;
+ break;
+
+ case RES_CHRATR_WEIGHT:
+ case RES_CHRATR_CJK_WEIGHT:
+ case RES_CHRATR_CTL_WEIGHT:
+ pM = aWeightMap;
+ break;
+ case RES_CHRATR_POSTURE:
+ case RES_CHRATR_CJK_POSTURE:
+ case RES_CHRATR_CTL_POSTURE:
+ pM = aPostureMap;
+ break;
+
+ default:
+ pM = 0;
+ }
+
+ sal_uInt16 nRet;
+ if( pM )
+ {
+ using namespace ::com::sun::star::i18n;
+ {
+ if( ScriptType::WEAK == nScript )
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
+ switch( nScript)
+ {
+ case ScriptType::COMPLEX: ++pM; // no break;
+ case ScriptType::ASIAN: ++pM; // no break;
+ default: nRet = *pM;
+ }
+ }
+ }
+ else
+ nRet = nWhich;
+ return nRet;
+}
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
new file mode 100644
index 000000000000..1753f06a8c1f
--- /dev/null
+++ b/sw/source/core/attr/swatrset.cxx
@@ -0,0 +1,404 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General 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 <svl/whiter.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/bolnitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <svx/xtable.hxx>
+#include <fmtpdsc.hxx>
+#include <pagedesc.hxx>
+#include <charfmt.hxx>
+#include <doc.hxx>
+#include <node.hxx>
+#include <paratr.hxx> // fuer SetModifyAtAttr
+#include <cellatr.hxx> // fuer SetModifyAtAttr
+#ifndef _CMDID_H
+#include <cmdid.h>
+#endif
+#include <istyleaccess.hxx>
+#include <numrule.hxx>
+// --> OD 2008-03-19 #refactorlists#
+#include <list.hxx>
+// <--
+
+
+SwAttrPool::SwAttrPool( SwDoc* pD )
+ : SfxItemPool( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "SWG" )),
+ POOLATTR_BEGIN, POOLATTR_END-1,
+ aSlotTab, aAttrTab ),
+ pDoc( pD )
+{
+ SetVersionMap( 1, 1, 60, pVersionMap1 );
+ SetVersionMap( 2, 1, 75, pVersionMap2 );
+ SetVersionMap( 3, 1, 86, pVersionMap3 );
+ SetVersionMap( 4, 1,121, pVersionMap4 );
+ // OD 2004-01-21 #i18732# - apply new version map
+ SetVersionMap( 5, 1,130, pVersionMap5 );
+ SetVersionMap( 6, 1,136, pVersionMap6 );
+}
+
+SwAttrPool::~SwAttrPool()
+{
+}
+
+SwAttrSet::SwAttrSet( SwAttrPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2 )
+ : SfxItemSet( rPool, nWh1, nWh2 ), pOldSet( 0 ), pNewSet( 0 )
+{
+}
+
+
+SwAttrSet::SwAttrSet( SwAttrPool& rPool, const sal_uInt16* nWhichPairTable )
+ : SfxItemSet( rPool, nWhichPairTable ), pOldSet( 0 ), pNewSet( 0 )
+{
+}
+
+
+SwAttrSet::SwAttrSet( const SwAttrSet& rSet )
+ : SfxItemSet( rSet ), pOldSet( 0 ), pNewSet( 0 )
+{
+}
+
+SfxItemSet* SwAttrSet::Clone( sal_Bool bItems, SfxItemPool *pToPool ) const
+{
+ if ( pToPool && pToPool != GetPool() )
+ {
+ SwAttrPool* pAttrPool = dynamic_cast< SwAttrPool* >(pToPool);
+ SfxItemSet* pTmpSet = 0;
+ if ( !pAttrPool )
+ pTmpSet = SfxItemSet::Clone( bItems, pToPool );
+ else
+ {
+ pTmpSet = new SwAttrSet( *pAttrPool, GetRanges() );
+ if ( bItems )
+ {
+ SfxWhichIter aIter(*pTmpSet);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ const SfxPoolItem* pItem;
+ if ( SFX_ITEM_SET == GetItemState( nWhich, sal_False, &pItem ) )
+ pTmpSet->Put( *pItem, pItem->Which() );
+ nWhich = aIter.NextWhich();
+ }
+ }
+ }
+ return pTmpSet;
+ }
+ else
+ return bItems
+ ? new SwAttrSet( *this )
+ : new SwAttrSet( *GetPool(), GetRanges() );
+}
+
+int SwAttrSet::Put_BC( const SfxPoolItem& rAttr,
+ SwAttrSet* pOld, SwAttrSet* pNew )
+{
+ pNewSet = pNew;
+ pOldSet = pOld;
+ int nRet = 0 != SfxItemSet::Put( rAttr );
+ pOldSet = pNewSet = 0;
+ return nRet;
+}
+
+
+int SwAttrSet::Put_BC( const SfxItemSet& rSet,
+ SwAttrSet* pOld, SwAttrSet* pNew )
+{
+ pNewSet = pNew;
+ pOldSet = pOld;
+ int nRet = 0 != SfxItemSet::Put( rSet );
+ pOldSet = pNewSet = 0;
+ return nRet;
+}
+
+
+
+sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich,
+ SwAttrSet* pOld, SwAttrSet* pNew )
+{
+ pNewSet = pNew;
+ pOldSet = pOld;
+ sal_uInt16 nRet = SfxItemSet::ClearItem( nWhich );
+ pOldSet = pNewSet = 0;
+ return nRet;
+}
+
+
+sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
+ SwAttrSet* pOld, SwAttrSet* pNew )
+{
+ ASSERT( nWhich1 <= nWhich2, "kein gueltiger Bereich" );
+ pNewSet = pNew;
+ pOldSet = pOld;
+ sal_uInt16 nRet = 0;
+ for( ; nWhich1 <= nWhich2; ++nWhich1 )
+ nRet = nRet + SfxItemSet::ClearItem( nWhich1 );
+ pOldSet = pNewSet = 0;
+ return nRet;
+}
+
+
+
+int SwAttrSet::Intersect_BC( const SfxItemSet& rSet,
+ SwAttrSet* pOld, SwAttrSet* pNew )
+{
+ pNewSet = pNew;
+ pOldSet = pOld;
+ SfxItemSet::Intersect( rSet );
+ pOldSet = pNewSet = 0;
+ return pNew ? pNew->Count() : ( pOld ? pOld->Count() : 0 );
+}
+
+// Notification-Callback
+void SwAttrSet::Changed( const SfxPoolItem& rOld,
+ const SfxPoolItem& rNew )
+{
+ if( pOldSet )
+ pOldSet->PutChgd( rOld );
+
+ if( pNewSet )
+ pNewSet->PutChgd( rNew );
+}
+
+
+// ----------------------------------------------------------------
+// Sonderbehandlung fuer einige Attribute
+// Setze den Modify-Pointer (alten pDefinedIn) bei folgenden Attributen:
+// - SwFmtDropCaps
+// - SwFmtPageDesc
+// (Wird beim Einfuegen in Formate/Nodes gerufen)
+// ----------------------------------------------------------------
+
+bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
+{
+ bool bSet = false;
+
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, sal_False, &pItem ) &&
+ ((SwFmtPageDesc*)pItem)->GetDefinedIn() != pModify )
+ {
+ ((SwFmtPageDesc*)pItem)->ChgDefinedIn( pModify );
+ bSet = true;
+ }
+
+ if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, sal_False, &pItem ) &&
+ ((SwFmtDrop*)pItem)->GetDefinedIn() != pModify )
+ {
+ // CharFormat gesetzt und dann noch in unterschiedlichen
+ // Attribut Pools, dann muss das CharFormat kopiert werden!
+ SwCharFmt* pCharFmt;
+ if( 0 != ( pCharFmt = ((SwFmtDrop*)pItem)->GetCharFmt() )
+ && GetPool() != pCharFmt->GetAttrSet().GetPool() )
+ {
+ pCharFmt = GetDoc()->CopyCharFmt( *pCharFmt );
+ ((SwFmtDrop*)pItem)->SetCharFmt( pCharFmt );
+ }
+ ((SwFmtDrop*)pItem)->ChgDefinedIn( pModify );
+ bSet = true;
+ }
+
+ if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, sal_False, &pItem ) &&
+ ((SwTblBoxFormula*)pItem)->GetDefinedIn() != pModify )
+ {
+ ((SwTblBoxFormula*)pItem)->ChgDefinedIn( pModify );
+ bSet = true;
+ }
+
+ return bSet;
+}
+
+void SwAttrSet::CopyToModify( SwModify& rMod ) const
+{
+ // kopiere die Attribute ggfs. ueber Dokumentgrenzen
+ SwCntntNode* pCNd = PTR_CAST( SwCntntNode, &rMod );
+ SwFmt* pFmt = PTR_CAST( SwFmt, &rMod );
+
+ if( pCNd || pFmt )
+ {
+ if( Count() )
+ {
+ // --> OD 2008-08-15 #i92811#
+ SfxStringItem* pNewListIdItem( 0 );
+ // <--
+
+ const SfxPoolItem* pItem;
+ const SwDoc *pSrcDoc = GetDoc();
+ SwDoc *pDstDoc = pCNd ? pCNd->GetDoc() : pFmt->GetDoc();
+
+ // muss die NumRule kopiert werden?
+ if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
+ RES_PARATR_NUMRULE, sal_False, &pItem ) )
+ {
+ const String& rNm = ((SwNumRuleItem*)pItem)->GetValue();
+ if( rNm.Len() )
+ {
+ SwNumRule* pDestRule = pDstDoc->FindNumRulePtr( rNm );
+ if( pDestRule )
+ pDestRule->SetInvalidRule( sal_True );
+ else
+ pDstDoc->MakeNumRule( rNm,